Files
storyforge/docs/NEXT_THREAD_HANDOFF_2026-05-02.md
kris 65db3cd336
Some checks failed
StoryForge CI / Baseline checks (push) Has been cancelled
StoryForge CI / Backend tests (push) Has been cancelled
StoryForge CI / Web tests (push) Has been cancelled
chore: sync storyforge handoff state
2026-05-02 17:50:21 +08:00

8.5 KiB

StoryForge Next Thread Handoff - 2026-05-02

Gitea

Project Goal

StoryForge is being shaped into a multi-platform new-media operating workbench: project-first workspace, benchmark discovery, creator-center account analysis, production queue, live recording, AI video generation, review, and a OneLiner main Agent layer that can route unfinished flows into platform Agents.

Current Progress

  • The public web workbench is deployed at storyforge.hyzq.net and can auto-login with the configured web auto-session.
  • The UI has been returned to the preferred current design direction and refined for mobile/workbench use. The dashboard keeps the 1 main + 2 secondary action model.
  • OneLiner now opens immediately. Context hydration happens inside the OneLiner panel instead of leaving the global header stuck on 正在打开 OneLiner.
  • Discovery/creator-center flows now support Douyin and Kuaishou style creator-center sync, account analysis, top-video analysis, similar-account state isolation, and selected-account cache cleanup.
  • Production Center exposes intake entry points for creator-center sync, import homepage/video/text, upload video, AI video, real-cut, and live-recorder maintenance.
  • Admin Model Access centralizes language model, ASR, image, image-to-image, video, Huobao, Seedance, and runtime integration configuration behind super-admin access.
  • Seedance 2.0 is routed through Huobao/Volcengine style video config. AI video creation preflights Huobao video config before dispatch.
  • Public deployment scripts and fnOS/NAS deployment scripts are present for web, collector, live-recorder, cutvideo tunnel, n8n, Huobao, and CLI proxy.

Architecture Snapshot

  • Frontend: static vanilla JS app under web/storyforge-web-v4, with runtime config, API client, session store, platform runtime, and large workbench renderer in assets/app.js.
  • Backend: FastAPI collector under collector-service/app, with core_main.py as the main app surface and feature modules for Douyin, domestic platforms, OneLiner, integrations, and database access.
  • Data: server-side SQLite under /home/ubuntu/storyforge/data/collector/storyforge.db in production.
  • Public server: https://storyforge.hyzq.net proxies the static web and collector API.
  • fnOS/NAS: local storage and optional service workloads live under /vol1/docker/hyzq-stack/... on the fnOS host.
  • Windows ASR target: intended Windows host is 192.168.31.18, using faster-whisper with GPU-capable auto mode and mixed Chinese/English recognition.

Current Public Runtime Status

Fresh checks on 2026-05-02:

  • GET https://storyforge.hyzq.net/healthz: OK.
  • POST https://storyforge.hyzq.net/v2/auth/auto-session: OK, returns the kris super-admin session.
  • cutvideo: configured and reachable at the server-local route.
  • n8n: configured and reachable at the server-local route.
  • Huobao: configured and reachable, but video config count is 0; Seedance/AI video still needs an enabled Huobao video config.
  • local_model: intentionally not configured because the project decision is to use public/cloud models rather than local models.
  • ASR: configured as Windows deployment, but public collector currently reports Connection refused on http://127.0.0.1:28088/health.
  • live_recorder: configured as NAS deployment, but public collector currently reports connection reset on http://127.0.0.1:19106/api/healthz.

Important Files For The Next Thread

  • web/storyforge-web-v4/assets/app.js: primary workbench UI, OneLiner runtime, admin model config, discovery, production, and mobile interaction logic.
  • web/storyforge-web-v4/assets/storyforge-platform-runtime.js: platform route contract for Douyin/Kuaishou/Xiaohongshu/Bilibili/Video Account style workbenches.
  • web/storyforge-web-v4/tests/workbench-pages.test.mjs: frontend contract tests; most UI workflow guarantees live here.
  • collector-service/app/core_main.py: collector API, auth, integrations, runtime config, live recorder proxy, Huobao model access, AI video job creation.
  • collector-service/app/domestic_platform_features.py: domestic-platform creator-center sync, analysis, relations, video persistence, and top-video followups.
  • collector-service/app/douyin_features.py: Douyin-specific account and public fetch behavior.
  • collector-service/app/oneliner_features.py: OneLiner main Agent, governance, run lifecycle, execution cards, and platform Agent routing.
  • tests/test_platform_contracts.py: backend route contracts for platform sync/analysis flows.
  • tests/test_production_baseline.py: production, model access, AI video, and integration baseline tests.
  • docs/superpowers/specs/* and docs/superpowers/plans/*: design and implementation plans used during this build phase.
  • docs/FNOS_LAN_DELIVERY_RUNBOOK_2026-03-27.md: fnOS/NAS deployment guide.
  • docs/WINDOWS_CUTVIDEO_OPERATIONS_2026-03-27.md: Windows cutvideo operating notes.
  • deploy/STORYFORGE_PUBLIC_GATEWAY.md: public gateway deployment notes.

Recent Change Highlights

  • OneLiner opening behavior:

    • Added onelinerHydrating and onelinerHydrationMessage.
    • open-oneliner opens the panel first, renders immediately, then hydrates control surfaces and messages.
    • Loading text is panel-local (正在同步 OneLiner 上下文...) and clears after hydration.
  • Creator-center and benchmark discovery:

    • Kuaishou/Douyin creator-center sync can persist snapshots and creator works into video sources.
    • Account analysis carries model profile, linked-account, recent-similar, creator-center, and top-video context.
    • Similar-account search results are isolated by selected account to avoid stale/cross-account state.
  • AI video and Seedance:

    • AI video form exposes provider/model controls and points admins to Huobao video config.
    • Backend validates that Huobao has active video config before AI video dispatch.
    • Seedance 2.0 uses the Huobao/Volcengine config path, not a local model path.
  • Runtime governance and admin config:

    • Admin Model Access covers runtime config, system model config, Huobao AI config, quota, policy, and integration status.
    • Local model is left blank by design; public/cloud model configuration is the intended path.
  • Deployment:

    • Added fnOS compose/deploy scripts for CLI proxy, Huobao, and n8n.
    • LAN stack deployment now includes cutvideo tunnel, live recorder, CLI proxy, n8n, Huobao, collector, web, and smoke checks.

Verification Commands

Run from repository root:

node --test web/storyforge-web-v4/tests/workbench-pages.test.mjs
python3 -m unittest tests.test_platform_contracts
python3 -m unittest tests.test_production_baseline
curl -fsS https://storyforge.hyzq.net/healthz

Useful public deploy commands:

STORYFORGE_PUBLIC_SYNC_COLLECTOR=0 ./scripts/deploy_public_storyforge.sh
STORYFORGE_PUBLIC_SYNC_COLLECTOR=1 ./scripts/deploy_public_storyforge.sh

Useful fnOS/NAS deploy commands:

SKIP_SMOKE=1 ./scripts/deploy_fnos_storyforge_lan_stack.sh
./scripts/deploy_fnos_storyforge_cliproxy.sh
./scripts/deploy_fnos_storyforge_n8n.sh
./scripts/deploy_fnos_storyforge_huobao.sh

Known Follow-Up Work

  • Restore ASR reachability from the public collector to the Windows ASR host. The intended host is 192.168.31.18; check whether the server-side runtime config should point at the relay/tunnel URL rather than 127.0.0.1:28088.
  • Restore live-recorder health from the public collector to the NAS service. The current public probe reports connection reset.
  • Configure at least one active Huobao video model config for Seedance 2.0 before expecting AI video jobs to dispatch successfully.
  • The public deploy smoke can fail if ASR/live-recorder are offline even when the web and collector deploy succeeded; check the individual health results before assuming the deploy itself failed.
  • Keep secrets out of Git: API keys, cookies, creator-center login cookies, and Gitea credentials must stay in runtime config, Keychain, or server-side storage.

Handoff Recommendation

For the next thread, start by pulling this branch from Gitea, reading this document, then running the verification commands above. After that, focus first on the three runtime gaps: ASR, live-recorder, and Huobao Seedance video config. Once those are green, test the real creator-center account flow and AI video creation from the public site.