codebee 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ CodeBee 的用户可感知变更记录。发布新版时:最上面加一节,
4
4
  `<!-- relnotes:start -->…<!-- relnotes:end -->` 段(那段会被 `npm view` 的
5
5
  README 元数据带回,供老版本在「发现新版本」时展示新版更新内容)。
6
6
 
7
+ ## v0.1.12(2026-09-19)
8
+
9
+ - 代码任务计划落盘:每次运行把编排计划写进工作目录 .codebee/task_plan.md,与任务规格(spec.md)、验证证据(evidence.md)同居「任务档案」,断点续跑/复盘全程可查
10
+ - 多子任务防漂移:实现子任务提示词自动带上「第 i/N 项 + 已完成清单」,长任务链不再重做已完成项
11
+ - 连载剧情模块库:plot-modules.md(拆文沉淀的桥段/爽点素材)每章自动注入
12
+ - 连载赛马败者精华:落选候选稿的优点自动并入首轮修订意见
13
+
7
14
  ## v0.1.11(2026-09-18)
8
15
 
9
16
  - **连载发布闭环(主轨)**:番茄/七猫作家后台 CDP 直操通道(连接扫码/建书/发章/表单探测/截图存证)+ 详情页出版台面板;发布台账幂等(章号去重)+ 三道护栏(每日上限/连续失败暂停/人工确认闸——默认填好表单停,提交权留给用户)
@@ -891,6 +891,8 @@ def _run_code(run, task, agents, ev, stats, mode):
891
891
  plan = {"source": "manual", "steps": [{"title": "实现任务", "detail": task["goal"]}]}
892
892
  store.update_run(run_id, plan=plan, difficulty=difficulty)
893
893
  subtasks = plan["steps"]
894
+ # 计划落盘(planning-with-files):磁盘上的计划与 spec/evidence 同居任务档案
895
+ _write_task_plan(task, workdir, plan)
894
896
 
895
897
  # ---- 评审者(有会话延续时评审者仍用新鲜上下文,避免偏见)
896
898
  if mode == "auto":
@@ -923,12 +925,20 @@ def _run_code(run, task, agents, ev, stats, mode):
923
925
  except Exception:
924
926
  pass
925
927
  for i, sub in enumerate(subtasks):
928
+ # 子任务进度注入(planning-with-files 的每轮注入计划头):多子任务时
929
+ # 让实现者知道全局位置与已完成项,防止长链目标漂移;单子任务零噪音
930
+ prog = ""
931
+ if len(subtasks) > 1:
932
+ done_titles = "、".join(
933
+ (s.get("title") or "")[:40] for s in subtasks[:i]) or "(无)"
934
+ prog = ("\n\n## 计划进度(第 %d/%d 项)\n已完成:%s。当前接着做下面这一项,"
935
+ "不要重做已完成的。" % (i + 1, len(subtasks), done_titles))
926
936
  prompt = (CODE_IMPL_PROMPT
927
937
  .replace("__GOAL__", task["goal"])
928
938
  .replace("__SUBTASK__",
929
939
  sub["detail"] if sub["detail"] else sub["title"])
930
940
  .replace("__CONTEXT__", task.get("context") or "(无)")
931
- .replace("__VERIFY_HINT__", _verify_hint(task)))
941
+ .replace("__VERIFY_HINT__", _verify_hint(task))) + prog
932
942
  role = "implement" if len(subtasks) == 1 else "implement-%d/%d" % (i + 1, len(subtasks))
933
943
  res = _run_step(run_id, role, agt_b, prompt, step_wd,
934
944
  readonly=False, ev=ev,
@@ -2871,6 +2881,29 @@ def _evidence_lines_from_run(run_id, task):
2871
2881
  return lines
2872
2882
 
2873
2883
 
2884
+ def _write_task_plan(task, workdir, plan):
2885
+ """计划落盘 .codebee/task_plan.md(planning-with-files 精髓:计划活在磁盘上,
2886
+ /clear、压缩、崩溃、续跑都不丢)。与 spec.md/evidence.md 同居任务档案;
2887
+ 失败静默——计划文件永远不能挡住任务执行。"""
2888
+ try:
2889
+ from pathlib import Path as _P
2890
+ steps = (plan or {}).get("steps") or []
2891
+ if not steps:
2892
+ return "" # 无步骤不产空计划文件
2893
+ root = _P(workdir).resolve()
2894
+ target = (root / ".codebee" / "task_plan.md").resolve()
2895
+ if root not in target.parents:
2896
+ return ""
2897
+ target.parent.mkdir(parents=True, exist_ok=True)
2898
+ lines = ["# 任务计划", "", "来源:%s" % (plan or {}).get("source", "?"), ""]
2899
+ for i, s in enumerate((plan or {}).get("steps") or [], 1):
2900
+ lines.append("%d. %s" % (i, str(s.get("detail") or s.get("title") or "")[:200]))
2901
+ target.write_text("\n".join(lines) + "\n", encoding="utf-8")
2902
+ return str(target)
2903
+ except Exception:
2904
+ return ""
2905
+
2906
+
2874
2907
  def execute_run(run_id):
2875
2908
  run = store.get_run(run_id)
2876
2909
  if not run:
package/app/ui/i18n.js CHANGED
@@ -285,6 +285,7 @@
285
285
  "可选": "Optional",
286
286
  "人物、世界观、主线冲突、伏笔和不能违背的设定;会在开跑前写入 story-bible.md": "Characters, world rules, main conflict, foreshadowing, and non-negotiable canon; saved to story-bible.md before the run starts",
287
287
  "连载任务会在每章起草与评审时自动注入;工作目录已有 story-bible.md 时请留空,避免覆盖已有设定。": "Serial tasks inject it into every drafting and review step; leave this blank when the workdir already has story-bible.md to avoid overwriting existing canon.",
288
+ "连载任务会在每章起草与评审时自动注入;工作目录已有 story-bible.md 时请留空,避免覆盖已有设定。另可放 plot-modules.md 剧情模块库(拆文沉淀的桥段/爽点素材,每章自动注入)。": "Serial tasks inject it into every drafting and review step; leave this blank when the workdir already has story-bible.md to avoid overwriting existing canon. You can also add plot-modules.md (a reusable scene/trope library) — it's injected into every chapter too.",
288
289
  "在岗": "busy",
289
290
  "全部空闲": "all idle",
290
291
  "工作中": "working",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebee",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "CodeBee · 多智能体编排台 — 统一编排本机 AI 编码 CLI(Codex / Claude Code / QwenCode / OpenCode / Aider…):目标→拆解→路由→执行→验证→跨厂商评审→修复→报告。纯 Python 标准库实现,本地 Web UI。",
5
5
  "license": "MIT",
6
6
  "bin": {