Commit Graph
133 Commits
Author SHA1 Message Date
60c043db7c fix(HEL-627): 补齐真实工作流参数并修正虚假完成
- 解析 ResolutionSelector 比例/总像素、KSampler/BasicScheduler 降噪,附带 ComfyUI 取值范围
- 已导入的自动识别工作流读取时按最新规则重新解析,无需重导
- 提交前后端校验参数(中文原因),非法值 400 拒绝不入队
- 任务新增 phase / comfy_prompt_id:连接中→已接收(前方排队)→执行中→保存中→完成
- 空产出、队列与历史都丢失、执行中断均判失败;Dry-run 结果标为占位,不算完成
- ComfyUI 缺模型报错写明缺哪个文件
- 生图/生视频/任务页统一用 jobStatusInfo 展示真实状态,结果区支持复用参数

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 23:05:34 +08:00
0031a897d7 fix(HEL-623): split dual-prompt text encoders; positive wiring wins; detect duration via expression
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 18:57:00 +08:00
shigongyuan-agentandmultica-agent 063a3c7063 fix: untagged ComfyUI workflows expose inputs; studio generate always gives feedback (HEL-623)
Root cause: parse_dynamic_inputs only recognised (Input:role) title tags.
A workflow exported straight from ComfyUI has default titles, so its
input_schema was empty and the studio form rendered no prompt box; the
generate click then enqueued (or was blocked) with no toast at all.

- parser: untagged fallback detects prompt/negative (via wiring to
  sampler positive/negative), seed/steps/cfg, latent width/height/batch,
  numeric primitives, LoadImage/LoadImageMask/video/audio slots; only the
  prompt is required; entries carry auto=true
- patcher: "<nodeId>@<widget>" keys target one widget on multi-widget
  nodes, never overwrite linked inputs; LoadImageMask uploads like images
- workflows API re-derives an empty stored schema (old imports fixed
  without re-import); smart_fill sort accepts subgraph/field ids
- studio: blocked submit toasts the reason and scrolls to the field;
  success toasts "已提交"; submit errors show the API detail; job.failed
  for this window's jobs toasts the reason; no-param workflows show a
  note + disabled prompt box; auto-detected params show a note
- connections import: chip shows node count, toast reports real params
- Chinese messages for ComfyUI rejection/upload/timeout/execution errors
  and playground workflow-not-found/disabled
- tests: native Qwen t2i / Qwen edit+mask / untagged H3 fixtures, patch
  keys, backfill, full fake-ComfyUI chain, Chinese rejection

Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 18:25:41 +08:00
施工员andmultica-agent 1a7a682cd0 HEL-615: 全部页面统一为 A「片场暗房」界面
- 设置页重写进 AppShell:生成与队列 / 智能体运行 / 存储路径三段,其余设置入口链到模型设置、ComfyUI 连接、智能体;旧 ?tab= 链接跳转到对应新页
- 项目卡状态标签改为按五段真实进度显示(已完成 / 某阶段生成中·待确认 / 进行中 / 待开始)
- 首页生成任务行对齐 a1(来源标签、项目名、进度条、本地时间)
- 连接页:右栏默认新增表单 + 任务使用目标面板,进入页面自动实测各连接;模型页默认新增表单、自动 1-token 实测,去掉双加号
- 生图/生视频:生成参数面板标题、通栏生成按钮、成片预览、按类型的历史标题与 16:9 视频历史、顶栏连接状态胶囊,连接状态改用服务器实测
- 智能体页:五个 Agent / Skill 库 / 已装 Skill 面板标题,内置 Skill 中文名,去掉对话空态 Calliope 字样
- 侧栏底部 ComfyUI 状态修正为真实实测(原查询不响应导致一直测试中)
- 统一样式来源:.a-btn/.a-panel/.a-select/.status-chip 等只在 app.css 定义一次,删除各页重复定义;新增 Switch、Button block、ProgressBar tone
- 旧 Calliope 路由(/projects、/project/:id、/canvas、/library、/build-scene、/playground)重定向到 A 页面;页面标题改为影工坊
- 轮询间隔单位改为秒(7 种语言)

Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 16:25:55 +08:00
总工 d2a8ebf7dd merge: HEL-614 five-stage creation workbench into test branch (06b15dc) 2026-09-28 14:59:42 +08:00
总工andmultica-agent 06b15dc3b6 feat: five-stage creation workbench (HEL-614)
- backend: project_stages/stage_runs tables; /api/workbench router
  (overview, run agent with confirmed-upstream context only, edit draft,
  confirm, restore, script import, in-flow image/video generation via the
  shared queue with source=workbench); project stats gain real
  stage_confirmed/stage_status/active_jobs
- frontend: /workbench picker + /workbench/[id] five-stage page (stepper,
  per-stage editors, style direction chooser, storyboard table, asset
  prompt cards with in-flow generation, shot video prompts with player,
  agent + task side rail); nav 创作工作台 now opens it; home entries go
  through the workbench (导入剧本 skips 剧本创作); project cards show
  real five-stage progress; i18n keys in all seven dictionaries
- tests: 9 backend workbench tests (flow handoff, edit/confirm/restore,
  import, generation, Chinese failure states)

Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 13:30:19 +08:00
总工 eeafe739f7 merge: HEL-613 five named agents chat + custom skills into test branch (rework 88660cb) 2026-09-28 12:13:42 +08:00
shigongyuan-agentandmultica-agent 88660cb3b4 fix: strip SKILL.md frontmatter in the skill editor (HEL-613 rework)
The editor's strip regex anchored on \\A — a Python-ism JS treats as a
literal — so it never matched: the editor showed the raw frontmatter and
every save re-wrapped the file in one more frontmatter layer. Extract the
strip into lib/skillFrontmatter.ts with a ^ anchor, import it from the
page, and guard it with scripts/check-skill-frontmatter.mjs (wired into
npm test): strips the render_skill_md block shape, exact split boundary,
idempotent, save-reload round-trip adds no layer, and the inline \\A
pattern is banned statically.

Also per review notes: skill toggles are now the spec-v2 §5 34x19 capsule
(amber track + dark knob when on), and version-history timestamps render
localized instead of the raw SQLite UTC string.

Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 12:03:20 +08:00
shigongyuan-agentandmultica-agent cdd6eba8ba feat: five named agents independent chat + custom skill management (HEL-613)
Backend:
- agents_registry: five AIGC roles (剧本创作/视觉设计/分镜设计/素材资产/镜头脚本)
  with zh personas, agent-chat mode text, and llm_role mapping onto the
  models-page five-role binding surface (story/style/script/assets/video)
- agent_sessions.agent_key column + migration; sessions filter/exclusion;
  named replies stamped with the owner agent's display name
- prompt assembly: per-agent persona + AGENT CHAT mode section replace the
  generic sandbox text; mentions section suppressed for agent chats
- main loop routes the LLM through the agent's bound role
- skill admin surface: skill_overrides/skill_bindings/skill_versions tables,
  PUT/PATCH/DELETE /api/agent/skills/{name} + bindings + versions/restore;
  effective rule = global enable ∩ enabled per-agent binding; builtin skills
  seeded to all five agents at upgrade; read_skill/list_skills gated for
  named-agent sessions

Frontend:
- /agents is now the three-column A-darkroom page (agent list + skill library
  / chat with reused AgentChat / skill manager with editor, assignment
  capsules, version history + rollback); per-agent model select synced with
  the models page; narrow breakpoint turns the manager into a drawer
- legacy ?project=&task= deep links still route into the canvas flow
- i18n keys added to all 7 locales

Tests: tests/test_agent_roles.py + tests/test_skill_admin.py (27 cases)
Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 11:28:26 +08:00
shigongyuan-agent 7be478dafd merge: HEL-612 standalone image/video studio + tasks page into test branch (HEL-620) 2026-09-28 10:17:45 +08:00
shigongyuan-agentandmultica-agent d49797fe5d fix: home tasks note no longer claims the jobs page is under development (HEL-620 review)
Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 10:17:40 +08:00
shigongyuan-agentandmultica-agent df84c22143 feat: standalone image/video studio windows + generation tasks page (HEL-612)
- /image and /video pages (a3/a4): three-column layout — params (connection,
  workflow, upload slots driven by declared inputs, prompt/negative/seed/
  size/duration fields, dynamic params), current-task card with live SSE
  progress + cancel, result grid with zoom/send-to-img2img/download, video
  player with custom amber controls + first/last-frame strip, right history
  with retry/delete and failure reasons
- /tasks page: both task classes summarized with source labels
  (独立生图/独立生视频/Playground/创作流程), filters, retry/cancel/delete
- nav: 生图/生视频/生成任务 real pages with active-jobs badge (进行数徽章)
- playground generate accepts source (studio-image/studio-video) for origin
  labeling; api.ts types follow
- parseDbTs helper: UTC-naive backend timestamps parse as UTC so elapsed/
  ETA/duration math is offset-correct
- backend tests: full-chain fake-ComfyUI server — image chain, video chain
  with frame uploads, retry-after-failure, delete-removes-outputs, tasks
  listing; i18n zh/en/es/fr/de/ja/ko complete

Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 09:47:48 +08:00
shigongyuan-agentandmultica-agent 1cf9188955 feat: multi-ComfyUI connections + workflow foundation (HEL-611)
Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 00:03:05 +08:00
shigongyuan-agentandmultica-agent 25d1e05a30 fix: survive missing crypto.randomUUID on insecure LAN HTTP (HEL-610)
Co-authored-by: multica-agent <github@multica.ai>
2026-09-27 22:37:42 +08:00
shigongyuan-agentandmultica-agent 4945d29e52 feat: A darkroom shell + projects overview home, models page into the shell (HEL-608)
Co-authored-by: multica-agent <github@multica.ai>
2026-09-27 21:42:06 +08:00
multica-builderandmultica-agent 5d909aca3b feat: models settings page per approved A darkroom spec (HEL-605)
- New /models page: LLM cards (type tag, agent-default badge, test state
  with latency/consecutive failures), add/edit form (OpenAI-compatible
  segment, mono base URL/model, masked key with sk-****tail, timeout
  dropdown, save gated on a passing test), agent default-model panel for
  the five AIGC agents, dashed server-connectivity notice, disabled
  image/video tabs as future placeholders; responsive 1440/1024/768
  breakpoints per spec-v2 §9.
- Scoped A darkroom design tokens in app.css (.a-darkroom) + Noto Sans SC.
- Top nav: add Agents and Models entries before Settings.
- Backend: add 'style' agent role, llm-test timeout_sec (5-60, default 10),
  api_key_tail (last 4 chars) in public profiles; 4 new tests.
- i18n: 84 models.* keys + nav.agents/nav.models in all 7 dictionaries.

Co-authored-by: multica-agent <github@multica.ai>
2026-09-27 20:49:59 +08:00
multica-builder 786b349752 feat: default UI language to zh and add LLM connection test
- First-open default language is now Simplified Chinese (i18n.svelte.ts);
  stored language choice still wins.
- New POST /api/settings/llm-test endpoint probes an OpenAI-compatible
  endpoint with a 1-token chat completion; falls back to a saved profile's
  secret so keys never travel back to the browser.
- Settings LLM cards gain a connection-test button with readable
  success/failure feedback (auth / timeout / connect / HTTP detail),
  localized in all seven dictionaries.
- Backend tests cover success, saved-secret reuse, 401, connection
  refused, and input validation against a local fake OpenAI server.
2026-09-27 20:04:46 +08:00
Benjiyaya b28f6eea2b feat: commit the local agent shell, history budget, and loop hardening
These files were already edited on this machine. Publish that tree instead of rewriting a slice onto a GitHub checkout.
base-v1.5.8
2026-09-27 04:42:22 +08:00
Benjiyaya 61db492ee2 fix: keep the compiled H3 prompt when the continuity critic is unreadable
A prose critic reply was replacing the prompt with the fallback template. Retry once for JSON and leave the compiled text in place.
2026-09-27 04:36:57 +08:00
Benjiyaya 4a74b4c8f9 fix: agent tools follow Settings Queue timeout
The hidden 600s agent_tool_timeout_sec never appeared in Settings, so tool calls still died after Queue timeout was set to wait forever.
2026-09-27 04:23:57 +08:00
Benjiyaya 18bedfc394 feat: release 1.5.8 - one continuity plan for H3 clips 2026-09-27 03:10:48 +08:00
Benjiyaya a8fc4e451c fix(agent): attachments no longer crash linked-session turns; ask_user closes its tool batch
Two agent-loop bugs found in the Sep 24 loop evaluation, folded into the
1.5.7 line:

1. A linked-session turn whose user message carried an image/video/document
   attachment crashed 100% of the time: derive_llm_history projects multimodal
   content as an OpenAI parts list, and orchestrate() read that list as the
   goal and called .strip() on it (AttributeError: 'list' object has no
   attribute 'strip'). New log.text_of_content() extracts the text part; the
   goal read uses it, so single-loop and swarm paths both survive attachments.

2. When ask_user paused the turn mid tool-batch, the remaining calls of that
   step never executed but also never received tool results, leaving an
   assistant tool_calls message with dangling ids - an invalid request
   sequence that strict OpenAI-compatible servers 400 on the next turn. The
   pause path now synthesizes skipped tool/call + tool/result events and
   tool-role messages for the un-executed ids before ending the turn.

The new multimodal-goal tests now stub the planner LLM: the attachment
appendix puts newlines in the extracted goal, so the message is never
trivial-path and the unstubbed planner made a real network call - the source
of the tests' flakiness (and the swarm-path test now attaches the document
it always claimed to).

Backend suite: 538 passed.
2026-09-24 03:28:19 +08:00
Benjiyaya d2240b9c5a feat: release 1.5.7 - per-clip workflows, runtime budgets, media-path guards
Three reported issues:

#66: the Video stage workflow picker was keyed by scene id, so choosing a
workflow for one clip overwrote every sibling clip. It is now keyed by clip
id, hydrates each clip's persisted choice, autosaves both
clips.workflow_id and form_workflow_id, and Generate One / Generate All
resolve the workflow per clip (a scene can mix image->video and
video->video extend across its clips).

#64: a 30-second ask could produce a 1:51 script - prompts carried no
per-scene scale and the duration rescale could only grow. Prompts now
state the total seconds and a per-scene budget, and the rescale may shrink
(floor 0.5) so over-written boards pull toward the target; content itself
is never edited.

#67: a hand-written directory path (e.g. ComfyUI's input dir) reached
ComfyUI and died as an opaque Errno 21. prepare_media_inputs now rejects
directory / missing local files before queueing with a node-naming error,
and the agent's run_workflow validates media input_values at call time.
Bare Comfy-side names pass untouched.

534 backend tests pass; svelte-check clean.
2026-09-24 02:26:47 +08:00
Benjiyaya 7551ba9d88 fix: accept name as an alias for a project's title so agent/API creates stop 422ing 2026-09-22 18:15:56 +08:00
Benjiyaya 6bd8ce1190 fix: release 1.5.5 - swarm renders enqueue, scenes get written, the board fills
Live event logs (session 908) showed a planner-scheduled render task whose
tools were hidden by the HITL visibility rule, a story sub-agent denied the
add_scene tools the planner told it to use, deep-linked chats orphaning as
duplicate empty sessions, and new project assets missing from the canvas
until re-open. Render-intent now recognizes clip/shot/storyboard; sub-agent
payloads keep approval-gated tools visible (permission stays at the
execute-time guard, whose denial teaches ask_user); the story role owns
scene structure; the canvas deep-link session param is trusted; GET
/api/canvas/{id} auto-seeds new entity cards.
2026-09-22 03:48:57 +08:00
Benjiyaya ee7648d957 feat: release 1.5.4 - steering, Asset Library, canvas delete, agent hardening
- Mid-run steering input in AI Canvas + Build Scene (steering/message event, step-boundary drain, composer Steer mode)
- New /library Asset Library page: unlinked Playground media with All/Image/Video filters, 50-per-page lazy loading, bulk delete, add-to-project
- AI Canvas delete now persists: reference-checked file cleanup for playground-owned artifacts, entity tombstones, canvas.updated sync
- Agent loop hardening batch: swarm safety nets, clip tools in roles, capture false-success fix, planner fast-path, per-tool timeout, char-bounded history
- Build Scene Brief/Cut gates + MP4 export normalization
2026-09-19 06:31:14 +08:00
Benjiyaya bf557d8d5e feat: release 1.5.3 - fix the SSR localStorage crash on Node 22+
Patch the app-breaking regression 1.5.2 shipped: every server render threw
`localStorage.getItem is not a function`, so the UI only appeared behind a Vite
error overlay.

Node 22+ exposes a `localStorage` global that is not a Storage when no valid
`--localstorage-file` is set, which defeats the `typeof localStorage` guard the
language layer used. The code fix landed in 3363620; this commit cuts it as a
release and adds `npm test`, which fails if the unsafe idiom reappears.

Docs: docs/changelogs/2026-09-16-ssr-storage-fix.md
2026-09-16 04:22:07 +08:00
Benjiyaya 33636200f3 fix(i18n): stop SSR crashing on Node's non-Storage localStorage global
`localStorage.getItem is not a function` aborted every server render, so the
whole UI loaded behind a Vite error overlay.

Node 22+ exposes a global `localStorage`, and without a usable
`--localstorage-file` it is a bare object with no Storage methods. The
`typeof localStorage === 'undefined'` guard therefore passed and the next call
threw. It only bit at module/component scope, because SvelteKit evaluates those
on the server too — the same guard is harmless inside onMount and $effect.

Probe for a callable method in a shared storage helper instead of trusting the
binding to exist, and route the SSR-executed reads through it.
2026-09-16 04:17:42 +08:00
Benjiyaya f8855e8b07 chore(i18n): drop the dead toggleLanguage helper
It had no callers and its body hardcoded the en/zh pair, so it could not
have worked once the language set grew past two.
2026-09-16 04:02:33 +08:00
Benjiyaya a3588a2024 feat: complete the 1.5.2 language set (es/fr/de/ja/ko) and fix the reported version
The dictionary layer shipped with en/zh only, so the five other translations
were stranded outside the release while the notes described a bilingual UI.
Register them: seven languages, 1001 keys each, all typed against `Dict` so a
missing key fails the build instead of rendering the raw key.

Also align `__version__`, which had stayed at 1.4.1 through the 1.5.0 and 1.5.1
releases, leaving /api/health and the OpenAPI schema reporting a stale version.
The bat scripts now emit English so non-Chinese locales render them correctly.

Docs: docs/changelogs/2026-09-16-multilingual-ui.md
2026-09-16 04:00:14 +08:00
Benjiyaya fc7611ce7d fix(tests): let i18n dictionary keys through the SSE contract gate
The gate flags any `agent.*` / `job.*` / `canvas.*` string in calliope-web as
an SSE event the backend must publish. The new dictionary layer names UI labels
in those same dotted namespaces (`'canvas.tidy': 'Tidy'`), so every label read
as a missing event and the gate went red on main.

A dotted name that resolves to a dictionary key is a label, not a contract name:
collect the keys from lib/i18n/*.ts and exempt them.
2026-09-16 03:54:58 +08:00
Benjiyaya c6ef5e7204 feat: release 1.5.2 - bilingual UI (en/zh) and local start scripts
Ship the merged dictionary layer as 1.5.2. Every user-facing string now
resolves through the en/zh dictionaries instead of hardcoded English, with
a language switcher in the header and local setup/start scripts for the
first-run path.

Docs: docs/changelogs/2026-09-16-bilingual-ui.md
2026-09-16 03:41:41 +08:00
BenjiandGitHub 035a53333b Merge pull request #58 from happymy/dev
i18n: Full-site bilingual dictionary and component integration + local start scripts
2026-09-16 03:18:43 +08:00
happymy 31a859cd5e merge: 合并主分支更新 (shot brief 展示、README 截图) 2026-09-13 08:26:02 +08:00
happymy 389b4c0db7 fix(i18n): 清除剩余硬编码英文文案并接入字典
消除 canvas 页 2 处 aria-label 与 Unlink 按钮、LanguageSwitcher aria、QueueStage "Clip #"、StoryStage "New beat"、JobInputsDrawer "Job #" 等硬编码英文;en/zh 字典同步新增 6 组 key 保持对齐。npm run check 0 errors。
2026-09-13 08:19:24 +08:00
happymy ba99cb4929 fix(i18n): 修复设置页面包屑字面显示 {t('nav.settings')}
Svelte 属性表达式中嵌套花括号的模板字面量被按字面解析,改为字符串拼接后实测渲染 / 设置。
2026-09-13 08:14:31 +08:00
BenjiandGitHub 247a0359b0 Update screenshot in README.md
Replaced an old screenshot with a new one in the README.
2026-09-13 02:59:29 +08:00
Benjiyaya 4c71cc497e feat(video): show the selected clip's shot brief in the composer
1.5 moved rendering to clips but the Video stage only surfaced the scene
script, so the workflow prompt field gave no hint of what an individual
clip performs. Each clip now carries its description, shot size, and
covered dialog lines into a brief panel above the composer, with a copy
button feeding the prompt. The stage splits into player + a scrollable
input inspector so the input stack can no longer squeeze the player out.
2026-09-13 02:57:17 +08:00
happymy 2483c7278f i18n: 将 bat 脚本输出改为中英文双语
setup/start/start-bg/stop 四个 bat 的 echo 改为 English / 中文 对照,GBK+CRLF 不变。
2026-09-12 16:04:46 +08:00
happymy 44ab8389d6 fix(i18n): 修复 {n} 占位符插值断裂
t() 按 {占位名} 逐名替换,但多数 count 语义键字典用 {n}、调用处传 count 或不传参,导致页面显示字面 "{n}"。t() 增加 count→{n} 约定,一次性修复 WorkflowsLibrary 统计、ProjectCard 相对时间、ActivityPanel、NavRail、MemoryPanel、ScriptStage、AssetsStage 等错配;queue.exportingSub/filmstrip.sceneClips/queue.scene/script.shotClipPlural 补 {n} 参数;queue.queueingProgress 与 queue.filmMeta 调用参数对齐字典;filmstrip.clipTitle 重写为 {scene}·镜头 {shot}·{time}。en/zh 983 keys 对齐,svelte-check 0 errors。
2026-09-12 15:56:31 +08:00
happymy 0caadd5a97 i18n: 补齐设置导航与画布/项目页缺失的中文文案
SettingsNav 7 个 tab 的 nav.* key(label/blurb)补齐中英文案;画布页 canvas/[id] 所有硬编码英文(toast、确认框、按钮 title、空态/错误提示)改为 t() 动态键;项目页 project/[id] 错误态、视频工作台按钮、队列状态接入 i18n;agents 页自动会话标题改用 t()(agent.task.*),移除静态 AGENT_TASK_TITLES;hooks.client.ts 全局兜底错误消息接入 i18n。en/zh 各 983 keys 键集完全对齐,svelte-check 0 errors。
2026-09-12 13:21:59 +08:00
happymy be0f5b6046 feat(i18n): 全量中英双语字典与组件接入
- en.ts 934 键无重复,zh.ts 全量镜像
- 补齐 assets/buildScene/queue 缺失键,修正 promptPreview.sceneMeta/shotMeta 占位符
- i18n.svelte.ts 修复 \ 响应式语言状态
- 修复 QueueStage/ToastHost 局部变量遮蔽 t()
2026-09-12 13:00:19 +08:00
happymy 929df8c9b6 feat: 添加本地启动/停止脚本并纳入版本控制
新增 setup.bat(首次安装)、start.bat(前台启动)、start-bg.bat(后台启动)、
stop.bat(停止)四个脚本,便于一键起停前后端;.gitignore 移除
start.bat/end.bat 遗留忽略条目。
2026-09-12 08:42:45 +08:00
BenjiandGitHub 047048eee5 Update 2026-09-10-build-scene-clips.md 2026-09-11 22:13:08 +08:00
Benjiyaya ce0b4e1983 feat: release 1.5.0 — Build Scene 3D blockout composer + 1 scene : N shot clips
Build Scene (/build-scene): three.js + mannequin-js blockout viewport ported
from open-media, with per-session compositions (origin='scene' keeps rails
separate), agent shot_* tools as the only toolset for that surface, viewport
toolbar, keyframe motion + camera timeline with 60s video export, and
captures usable as project reference images.

Scene to Clips: clips table (1 scene : N renderable shots), coverage agent
breaks scenes into shots with full dialogue/action allocation, script
generation stays faithful to the screenplay (verbatim dialogue, content-
derived durations, chunked + durable inserts), video pipeline re-scoped to
clips (enqueue, continue-from, export, drafts), Script/Video UI clip-first
(#N.M labels, per-scene Break Into Shots scoped to one scene).

Agent loop: lean ReAct discipline with fail-streak escalation and budget
nudge; policy treats explicit user commands as permission; Build Scene tool
scope enforced mechanically; document + video attachments feed the VLM.
2026-09-11 18:05:21 +08:00
Benjiyaya f8faa72653 fix(agent): per-session event seq, parsed SSE echo, and vision attachments
Implements the intent of open PRs #48, #49, and part of #47 (all reviewed
against the working tree — none of the three bugs were fixed yet):

- #48 append_event returned cur.lastrowid (global row id) as the event's
  seq, while the INSERT allocates a per-session seq. The two only agree on
  a single-session DB, so ask_user's question_seq never matched
  latest_open_question() on a real install — card clicks never recorded an
  approval. The allocated seq is now read back from the inserted row; the
  atomic single-INSERT allocation is unchanged.

- #49 the agent.message SSE echo carried the raw agent_messages row
  (tool_args_json / tool_result_json strings, no parsed keys), while GET
  /sessions/{id} hands clients the parsed shape. _persist_message now
  returns parsed tool_args / tool_result alongside the raw keys, so the
  ask_user question card renders live instead of after a reload.

- #47 (partial) main.py carried the version as two literals that drifted
  from pyproject twice (1.3.2 reported 1.2.1; 1.4.1 reported 1.4.0). The
  version is now single-sourced in calliope.__version__, consumed by both
  FastAPI and /api/health; pyproject uses hatchling dynamic version. The
  PR's importlib.metadata approach was avoided: the venv's editable
  dist-info still says 0.1.0, which would report a third stale version.

- Vision attachments: user-attached images now project as OpenAI
  image_url content parts (data URLs read from disk), so vision-capable
  models see the actual pixels instead of a path line (derive_chat_rows /
  project_user_content, tested in test_agent_event_log).

Regression tests: per-session seq with a diverging second session, the
full card-answer flow across sessions, and the health version matching
the single-sourced metadata (tests/test_agent_interaction.py,
tests/test_projects.py).
2026-09-08 05:20:23 +08:00
BenjiandGitHub 7b2d4c9c08 Merge pull request #48 from justostoll/fix/event-seq-from-row
Event log: append_event returns the row id, not the per-session seq — card clicks never record an approval
2026-09-08 04:30:38 +08:00
Justo StollandClaude Fable 5.1 693656757c Event log: return the per-session seq from append_event, not the row id
append_event handed back cur.lastrowid — the table-wide row id — while the
INSERT allocates a per-session seq and read_events returns that column. The
two only agree while a single session exists, so ask_user's question_seq
never matched latest_open_question() on a real install: a card click never
wrote question/answered and never counted as a structured approval.

Read the allocated seq back for the inserted row and return it. Two
regression tests seed a second session first so row id != seq.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-07 07:27:18 +02:00
Benjiyaya f4424a5c4f chore: release 1.4.1 — chunked story/script generation + working question cards 2026-09-07 05:43:15 +08:00
Benjiyaya dc5421c4a5 fix(agent): make ask_user question cards actually appear
The loop raised the end-turn control flow BEFORE logging/emitting the
ask_user tool result, so the frontend never received the question — the
chat sat on "working…" with no card until the user hit Stop or refreshed
(the report: "the agent loop just stops there"). The result is now
logged + emitted first, then the turn ends with status awaiting_input.

- Question card renders the question text plus stacked option buttons
  (long sentences read cleanly) and a hint line.
- Card answers are graded by first word: "Yes, replace with ~40 shorter
  scenes" grants, "No, keep existing scenes" refuses — previously a
  sentence option had to match "yes" exactly.
- Two regression tests: tool/result precedes turn/end with the question
  payload; option-sentence approval matrix.
2026-09-07 05:36:05 +08:00