diff --git a/.memory/worklog.json b/.memory/worklog.json index b860abc..504e9f5 100644 --- a/.memory/worklog.json +++ b/.memory/worklog.json @@ -1,18 +1,5 @@ { "entries": [ - { - "files_changed": 1, - "message": "Codex 会话活跃 · 最近命令:codex · 1 项未提交变更 · 最近提交:auto-save 2026-05-14 17:43 (~1)", - "ts": "2026-05-14T09:48:43Z", - "type": "session-heartbeat" - }, - { - "files_changed": 1, - "hash": "807f89b", - "message": "auto-save 2026-05-14 17:48 (~1)", - "ts": "2026-05-14T17:48:47+08:00", - "type": "commit" - }, { "files_changed": 1, "hash": "32eca89", @@ -3269,6 +3256,19 @@ "message": "auto-save 2026-05-17 12:50 (~8)", "hash": "4dc4092", "files_changed": 8 + }, + { + "ts": "2026-05-17T12:55:45+08:00", + "type": "commit", + "message": "refactor: narrow intake to audio-first workflow", + "hash": "3b9e74f", + "files_changed": 9 + }, + { + "ts": "2026-05-17T04:58:24Z", + "type": "session-heartbeat", + "message": "Codex 会话活跃 · 最近命令:codex · 分支 main · 1 项未提交变更 · 最近提交:refactor: narrow intake to audio-first workflow", + "files_changed": 1 } ] } diff --git a/api/main.py b/api/main.py index b960f1d..ef9e9a2 100644 --- a/api/main.py +++ b/api/main.py @@ -7,6 +7,7 @@ import hmac import json import os import random +import re import secrets import shutil import subprocess @@ -133,6 +134,14 @@ VIDEO_STATUS_PATH = os.getenv("VIDEO_STATUS_PATH", DEFAULT_VIDEO_STATUS_PATH).st VIDEO_CONTENT_PATH = os.getenv("VIDEO_CONTENT_PATH", DEFAULT_VIDEO_CONTENT_PATH).strip() or DEFAULT_VIDEO_CONTENT_PATH VIDEO_DURATION_FIELD = os.getenv("VIDEO_DURATION_FIELD", "seconds").strip() or "seconds" VIDEO_POLL_TIMEOUT_SECONDS = max(60, int(os.getenv("VIDEO_POLL_TIMEOUT_SECONDS", "900"))) +FFMPEG_BIN = os.getenv("FFMPEG_BIN", "").strip() +FFPROBE_BIN = os.getenv("FFPROBE_BIN", "").strip() +LOCAL_FFMPEG_CANDIDATES = [ + "/Applications/Downie 4.app/Contents/Resources/ffmpeg", + "/Applications/Permute 3.app/Contents/Resources/ffmpeg", + "/Applications/VideoFusion-macOS.app/Contents/Resources/ffmpeg", +] +_MEDIA_BIN_CACHE: dict[str, str] = {} # OpenAI 客户端(OpenAI 兼容网关,含 SKG ezlink) from openai import OpenAI