codebee 0.1.60 → 0.1.62

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.
Files changed (96) hide show
  1. package/CHANGELOG.md +490 -490
  2. package/LICENSE +21 -21
  3. package/README.md +486 -484
  4. package/app/core/aiflavor.py +197 -197
  5. package/app/core/attachments.py +532 -532
  6. package/app/core/automation.py +758 -758
  7. package/app/core/backup.py +470 -470
  8. package/app/core/beekeeper.py +183 -183
  9. package/app/core/board.py +209 -209
  10. package/app/core/bookmeta_catalog.py +180 -180
  11. package/app/core/branching.py +137 -130
  12. package/app/core/builtin_agent.py +1191 -1191
  13. package/app/core/capability.py +144 -144
  14. package/app/core/chaptersafe.py +32 -32
  15. package/app/core/cleanup.py +303 -303
  16. package/app/core/compaction.py +186 -186
  17. package/app/core/covergen.py +356 -356
  18. package/app/core/diagnostics.py +114 -114
  19. package/app/core/dispatch.py +173 -173
  20. package/app/core/dispatch_log.py +113 -113
  21. package/app/core/env_scrub.py +85 -85
  22. package/app/core/error_codes.py +64 -64
  23. package/app/core/errorlog.py +137 -137
  24. package/app/core/flows.py +355 -355
  25. package/app/core/goal_service.py +167 -167
  26. package/app/core/health.py +341 -341
  27. package/app/core/history.py +38 -38
  28. package/app/core/hooks.py +156 -156
  29. package/app/core/jobs.py +1022 -1022
  30. package/app/core/manager.py +48 -2
  31. package/app/core/market.py +362 -362
  32. package/app/core/market_remote.py +66 -66
  33. package/app/core/mocks.py +64 -64
  34. package/app/core/modelhub.py +3266 -3266
  35. package/app/core/notify.py +106 -106
  36. package/app/core/paihang.py +109 -109
  37. package/app/core/paths.py +2 -2
  38. package/app/core/pipeline.py +4426 -4384
  39. package/app/core/planner.py +27 -27
  40. package/app/core/portguard.py +111 -111
  41. package/app/core/preview.py +293 -293
  42. package/app/core/publish/__init__.py +7 -7
  43. package/app/core/publish/auto.py +367 -367
  44. package/app/core/publish/browser.py +533 -533
  45. package/app/core/publish/fanqie.py +128 -128
  46. package/app/core/publish/flow.py +406 -406
  47. package/app/core/publish/ledger.py +198 -198
  48. package/app/core/publish/manager.py +590 -590
  49. package/app/core/publish/qimao.py +141 -141
  50. package/app/core/publish/ws.py +139 -139
  51. package/app/core/redact.py +38 -38
  52. package/app/core/repeat_guard.py +124 -124
  53. package/app/core/router.py +307 -307
  54. package/app/core/selfupdate.py +384 -384
  55. package/app/core/session_log.py +161 -161
  56. package/app/core/sessions.py +312 -312
  57. package/app/core/settings.py +149 -149
  58. package/app/core/settings_schema.py +262 -262
  59. package/app/core/share_page.py +114 -114
  60. package/app/core/skill_scan.py +106 -95
  61. package/app/core/skillpacks/fanqie-novel.md +80 -80
  62. package/app/core/skillpacks/market/character-bible.md +66 -66
  63. package/app/core/skillpacks/market/code-risk-checklist.md +58 -58
  64. package/app/core/skillpacks/market/git-workflow.md +57 -57
  65. package/app/core/skillpacks/market/release-notes.md +72 -72
  66. package/app/core/skillpacks/market/weekly-report.md +71 -71
  67. package/app/core/skillpacks/market/worldview-consistency.md +70 -70
  68. package/app/core/step_runner.py +132 -132
  69. package/app/core/task_compile.py +199 -199
  70. package/app/core/telemetry.py +292 -292
  71. package/app/core/tlsctx.py +64 -64
  72. package/app/core/token_meter.py +147 -147
  73. package/app/core/volumes.py +355 -355
  74. package/app/core/wxdigest.py +858 -858
  75. package/app/core/zentao.py +2090 -2090
  76. package/app/main.py +2826 -2826
  77. package/app/pick_dialog.py +110 -110
  78. package/app/ui/app.js +13977 -13971
  79. package/app/ui/board.html +162 -162
  80. package/app/ui/board.js +305 -305
  81. package/app/ui/i18n.js +2 -0
  82. package/app/ui/icons/bee.svg +79 -79
  83. package/app/ui/index.html +1 -1
  84. package/app/ui/manifest.json +16 -16
  85. package/app/ui/qrcode.js +2297 -2297
  86. package/app/ui/style.css +6125 -6118
  87. package/bin/tutti.js +147 -147
  88. package/package.json +41 -41
  89. package/tools/wx_reader.py +261 -261
  90. package/app/.playwright-cli/console-2026-09-23T08-26-03-635Z.log +0 -88
  91. package/app/.playwright-cli/page-2026-09-23T08-26-03-845Z.yml +0 -126
  92. package/app/.playwright-cli/page-2026-09-23T08-29-44-203Z.png +0 -0
  93. package/app/.playwright-cli/page-2026-09-23T08-35-42-046Z.yml +0 -210
  94. package/app/.playwright-cli/page-2026-09-23T08-36-52-858Z.png +0 -0
  95. package/app/.playwright-cli/page-2026-09-23T08-37-33-938Z.png +0 -0
  96. package/app/.playwright-cli/run-detail-after.png +0 -0
@@ -1260,6 +1260,51 @@ def _opencode_config_candidates(entry):
1260
1260
  return out
1261
1261
 
1262
1262
 
1263
+ def _sync_mimo_settings(entry, model, prov):
1264
+ """mimo(opencode 系)专属:把绑定供应商落进 mimocode.jsonc 的
1265
+ provider.codebee 块。mimo 不读任何 env key(内嵌文档明示
1266
+ MIMO_API_KEY is never read),唯一凭据通道是配置内 provider.options.apiKey
1267
+ ——此前只有模型名提示,绑定后照样裸奔:2026-09-24 禅道双单实案,评审器
1268
+ 连续 20+ 轮全灭在 Invalid API Key,而 Key 本身是好的。
1269
+ 只吃 OpenAI 兼容端点;anthropic 协议供应商明确拒绝(不猜 wire)。"""
1270
+ if tmp_data_no_home_write():
1271
+ return "测试数据目录(TUTTI_DATA 在临时目录)不写真实 CLI 配置,已拦截"
1272
+ if str(prov.get("protocol") or "").lower() != "openai":
1273
+ return ("mimo 只吃 OpenAI 兼容端点,供应商 %s 是 %s 协议——请绑 openai 协议供应商"
1274
+ % (prov.get("name") or prov.get("id") or "?", prov.get("protocol") or "?"))
1275
+ key = str(prov.get("api_key") or "")
1276
+ if not key:
1277
+ ks = prov.get("keys") or []
1278
+ key = str((ks[0] or {}).get("key") or "") if ks else ""
1279
+ base = str(prov.get("base_url") or "").rstrip("/")
1280
+ if not key or not base:
1281
+ return "供应商缺少 API 地址或密钥,无法写入 mimo 配置"
1282
+ path = _config_path(entry)
1283
+ if not path:
1284
+ return "mimo 配置路径无效"
1285
+ try:
1286
+ Path(path).parent.mkdir(parents=True, exist_ok=True)
1287
+ text = ""
1288
+ if os.path.isfile(path):
1289
+ text = _read_text(path, preserve_newlines=True)
1290
+ shutil.copyfile(path, path + ".bak")
1291
+ block = {"npm": "@ai-sdk/openai-compatible",
1292
+ "options": {"baseURL": base, "apiKey": key},
1293
+ "models": {model: {}}}
1294
+ new_text, ok = _jsonc_set(text, ("provider", "codebee"),
1295
+ json.dumps(block, ensure_ascii=False))
1296
+ if not ok:
1297
+ return "mimocode.jsonc 结构异常,未能写入 provider 块(已避免覆盖)"
1298
+ new_text, ok = _jsonc_set(new_text, ("model",),
1299
+ json.dumps("codebee/" + model))
1300
+ if not ok:
1301
+ return "mimocode.jsonc 结构异常,未能写入 model(已避免覆盖)"
1302
+ Path(path).write_bytes(new_text.encode("utf-8"))
1303
+ return None
1304
+ except OSError as e:
1305
+ return "写入 mimocode.jsonc 失败:%s" % str(e)[:80]
1306
+
1307
+
1263
1308
  def _sync_opencode_settings(entry, model, prov):
1264
1309
  """opencode 专属:把绑定供应商写进其配置的 provider.orch 段 + 顶层 model
1265
1310
  (opencode 交互 TUI 只认自家配置文件里的凭据,ORCH_API_KEY env 对它等于
@@ -1451,12 +1496,13 @@ _AGENT_INJECTORS = {
1451
1496
  "opencode": (("anthropic", "openai"), _sync_opencode_settings),
1452
1497
  "qwencode": (("openai",), _sync_qwen_settings),
1453
1498
  "kimi-code": (("openai", "anthropic"), _sync_kimi_settings),
1499
+ "mimo-code": (("openai",), _sync_mimo_settings),
1454
1500
  }
1455
1501
 
1456
1502
  # 无专属注入通道的专有协议 CLI:env 注入大概率无效,打开时明确告知而非静默废
1457
- # (mimo 系 opencode 衍生但配置路径未实证,先按提示类;grok 吃 XAI_API_KEY 但
1503
+ # (mimo 已实证配置注入:provider.codebee 块(apiKey 走 options);grok 吃 XAI_API_KEY 但
1458
1504
  # 无端点 env 可指中转,openai 协议供应商也用不上)
1459
- _NO_CHANNEL_HINT = ("grok-build", "pi", "mimo-code")
1505
+ _NO_CHANNEL_HINT = ("grok-build", "pi") # mimo 已有 provider 块注入(2026-09-24)
1460
1506
 
1461
1507
 
1462
1508
  def _sync_agent_injection(entry, binding):