codebee 0.1.6 → 0.1.7
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 +8 -0
- package/README.md +431 -421
- package/app/core/automation.py +30 -5
- package/app/core/catalog.py +23 -0
- package/app/core/health.py +7 -50
- package/app/core/manager.py +80 -11
- package/app/core/modelhub.py +2883 -2896
- package/app/core/pipeline.py +9 -15
- package/app/core/remote.py +310 -303
- package/app/core/runner.py +26 -3
- package/app/core/selfupdate.py +47 -16
- package/app/core/store.py +138 -47
- package/app/core/usage.py +51 -1
- package/app/main.py +219 -23
- package/app/ui/app.js +519 -156
- package/app/ui/i18n.js +30 -1
- package/app/ui/index.html +57 -45
- package/app/ui/style.css +1056 -2
- package/package.json +1 -1
package/app/ui/i18n.js
CHANGED
|
@@ -146,8 +146,30 @@
|
|
|
146
146
|
"查看内容": "View content",
|
|
147
147
|
"预览": "Preview",
|
|
148
148
|
"点击查看": "Click to view",
|
|
149
|
+
"任务操作": "Task actions",
|
|
149
150
|
"蜂巢": "Hive",
|
|
150
151
|
"对话": "Chat",
|
|
152
|
+
"CLI 日志": "CLI log",
|
|
153
|
+
"打开 CLI 日志": "Open CLI log",
|
|
154
|
+
"点击步骤卡片查看 CLI 日志": "Click a step card to view its CLI log",
|
|
155
|
+
"任务完成": "Task completed",
|
|
156
|
+
"任务失败": "Task failed",
|
|
157
|
+
"轮对话": "turns",
|
|
158
|
+
"产出文件": "Output files",
|
|
159
|
+
"无文件产出": "No output files",
|
|
160
|
+
"查看执行步骤": "View execution steps",
|
|
161
|
+
"查看步骤": "View steps",
|
|
162
|
+
"查看成果": "View results",
|
|
163
|
+
"任务概览": "Task overview",
|
|
164
|
+
"当前状态": "Current status",
|
|
165
|
+
"步骤已完成": "steps complete",
|
|
166
|
+
"最近一步": "Latest step",
|
|
167
|
+
"描述目标即可,CodeBee 会自动拆解并执行": "Describe the goal and CodeBee will break it down and run it",
|
|
168
|
+
"秒": "sec",
|
|
169
|
+
"分": "min",
|
|
170
|
+
"执行结果": "Execution result",
|
|
171
|
+
"执行者": "Executor",
|
|
172
|
+
"未知状态": "Unknown status",
|
|
151
173
|
"发送": "Send",
|
|
152
174
|
"继续说…(Enter 发送,Shift+Enter 换行;可直接粘贴截图)": "Keep typing… (Enter to send, Shift+Enter for a new line; paste screenshots directly)",
|
|
153
175
|
"成果": "Results",
|
|
@@ -256,6 +278,10 @@
|
|
|
256
278
|
"指令已撤回,不会送达执行": "Directive retracted — it will not reach the agent",
|
|
257
279
|
"撤回失败:": "Retract failed: ",
|
|
258
280
|
"蜂巢工作台": "Hive workbench",
|
|
281
|
+
"初始故事圣经": "Initial story bible",
|
|
282
|
+
"可选": "Optional",
|
|
283
|
+
"人物、世界观、主线冲突、伏笔和不能违背的设定;会在开跑前写入 story-bible.md": "Characters, world rules, main conflict, foreshadowing, and non-negotiable canon; saved to story-bible.md before the run starts",
|
|
284
|
+
"连载任务会在每章起草与评审时自动注入;工作目录已有 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.",
|
|
259
285
|
"在岗": "busy",
|
|
260
286
|
"全部空闲": "all idle",
|
|
261
287
|
"工作中": "working",
|
|
@@ -609,11 +635,14 @@
|
|
|
609
635
|
"下午好呀,有什么想让我帮忙的吗": "Good afternoon — what can I help you with?",
|
|
610
636
|
"晚上好呀,有什么想让我帮忙的吗": "Good evening — what can I help you with?",
|
|
611
637
|
"常用类型": "Common types",
|
|
638
|
+
"预估:≈{0}{1}": "Est: ≈{0}{1}",
|
|
639
|
+
"近{0}天 · {1}次同类": "last {0}d · {1} similar runs",
|
|
612
640
|
"背景信息、约束、相关文件(可空)": "Background, constraints, related files (optional)",
|
|
613
641
|
"留空则保存到:": "Leave blank to save to: ",
|
|
614
642
|
"选择…": "Browse…",
|
|
615
643
|
"保存并运行": "Save and run",
|
|
616
644
|
"创建并运行": "Create and run",
|
|
645
|
+
"更多选项": "More options",
|
|
617
646
|
"高级选项(默认全智能,无需改动)": "Advanced (smart defaults — leave as-is)",
|
|
618
647
|
"智能": "Smart",
|
|
619
648
|
"手动": "Manual",
|
|
@@ -1752,4 +1781,4 @@
|
|
|
1752
1781
|
} else {
|
|
1753
1782
|
applyI18n();
|
|
1754
1783
|
}
|
|
1755
|
-
})();
|
|
1784
|
+
})();
|
package/app/ui/index.html
CHANGED
|
@@ -233,24 +233,14 @@
|
|
|
233
233
|
<button type="button" id="btn-wizard" class="ghost small" data-i18n="✨ 向导创建" data-i18n-title="三问一确认:目标 → 类型 → 目录,预填进表单" title="三问一确认:目标 → 类型 → 目录,预填进表单" onclick="openTaskWizard()">✨ 向导创建</button>
|
|
234
234
|
</div>
|
|
235
235
|
<p data-i18n="一句话目标即可 —— CodeBee 自动拆解、智能路由、执行、验证并跨厂商评审。" class="hint hero-sub">一句话目标即可 —— CodeBee 自动拆解、智能路由、执行、验证并跨厂商评审。</p>
|
|
236
|
-
<div class="form">
|
|
237
|
-
<!--
|
|
238
|
-
值真源仍是 #f-type / #f-workdir(既有 ID,联动与测试锚点全兼容)。 -->
|
|
239
|
-
<div class="cmp-pills">
|
|
240
|
-
<div class="
|
|
241
|
-
<
|
|
242
|
-
<
|
|
243
|
-
<
|
|
244
|
-
<span class="tp-name" id="f-type-name"></span>
|
|
245
|
-
<svg class="ico chev" aria-hidden="true"><use href="#i-chevron-r"></use></svg>
|
|
246
|
-
</button>
|
|
247
|
-
<div id="type-menu" class="type-menu hidden" role="listbox" aria-label="任务类型" data-i18n-aria="任务类型"></div>
|
|
248
|
-
</div>
|
|
249
|
-
<button type="button" class="ghost small" id="btn-flows-mgr" data-i18n="管理" data-i18n-title="管理任务类型:新增/编辑自定义流程" title="管理任务类型:新增/编辑自定义流程" onclick="openFlowsManager()">管理</button>
|
|
250
|
-
<div class="cmp-wd">
|
|
251
|
-
<svg class="ico" aria-hidden="true"><use href="#i-folder"></use></svg>
|
|
252
|
-
<div class="input-row">
|
|
253
|
-
<input id="f-workdir" placeholder="留空则保存到默认路径;或填绝对路径,例 E:\GoOut\my-project" data-i18n-ph="留空则保存到默认路径;或填绝对路径,例 E:\GoOut\my-project">
|
|
236
|
+
<div class="form">
|
|
237
|
+
<!-- 参考对话式工作台:工作目录是上下文,任务类型放到底部工具栏。
|
|
238
|
+
值真源仍是 #f-type / #f-workdir(既有 ID,联动与测试锚点全兼容)。 -->
|
|
239
|
+
<div class="cmp-pills">
|
|
240
|
+
<div class="cmp-wd">
|
|
241
|
+
<svg class="ico" aria-hidden="true"><use href="#i-folder"></use></svg>
|
|
242
|
+
<div class="input-row">
|
|
243
|
+
<input id="f-workdir" placeholder="留空则保存到默认路径;或填绝对路径,例 E:\GoOut\my-project" data-i18n-ph="留空则保存到默认路径;或填绝对路径,例 E:\GoOut\my-project">
|
|
254
244
|
<button data-i18n="选择…" class="ghost small" type="button" title="浏览本机目录选择" data-i18n-title="浏览本机目录选择" onclick="pickFolder('f-workdir')">选择…</button>
|
|
255
245
|
</div>
|
|
256
246
|
</div>
|
|
@@ -263,10 +253,23 @@
|
|
|
263
253
|
<p class="hint" id="git-hint"></p>
|
|
264
254
|
</div>
|
|
265
255
|
<!-- Composer 大输入框:附件在左下、发送在右下;Enter 发送,Shift+Enter 换行 -->
|
|
266
|
-
<div class="cmp-box">
|
|
267
|
-
<
|
|
268
|
-
<
|
|
269
|
-
|
|
256
|
+
<div class="cmp-box">
|
|
257
|
+
<div class="cmp-context-note"><svg class="ico" aria-hidden="true"><use href="#i-chat"></use></svg><span data-i18n="描述目标即可,CodeBee 会自动拆解并执行">描述目标即可,CodeBee 会自动拆解并执行</span></div>
|
|
258
|
+
<textarea id="f-goal" rows="3" placeholder="要完成什么,一句话即可" required data-i18n-ph="要完成什么,一句话即可"></textarea>
|
|
259
|
+
<div class="cmp-bar">
|
|
260
|
+
<div class="cmp-mode">
|
|
261
|
+
<div class="type-wrap">
|
|
262
|
+
<select id="f-type" class="hidden" tabindex="-1" aria-hidden="true"></select>
|
|
263
|
+
<button type="button" id="f-type-btn" class="type-pick" onclick="toggleTypeMenu()" aria-haspopup="listbox" aria-controls="type-menu">
|
|
264
|
+
<span class="tp-ico" id="f-type-ico" aria-hidden="true"></span>
|
|
265
|
+
<span class="tp-name" id="f-type-name"></span>
|
|
266
|
+
<svg class="ico chev" aria-hidden="true"><use href="#i-chevron-r"></use></svg>
|
|
267
|
+
</button>
|
|
268
|
+
<div id="type-menu" class="type-menu hidden" role="listbox" aria-label="任务类型" data-i18n-aria="任务类型"></div>
|
|
269
|
+
</div>
|
|
270
|
+
<button type="button" class="ghost small" id="btn-flows-mgr" data-i18n="管理" data-i18n-title="管理任务类型:新增/编辑自定义流程" title="管理任务类型:新增/编辑自定义流程" onclick="openFlowsManager()">管理</button>
|
|
271
|
+
</div>
|
|
272
|
+
<div class="att-strip">
|
|
270
273
|
<button type="button" class="ghost small" id="btn-attach" title="添加附件:截图 / 文本 / Word·Excel·PPT / PDF 等(普通 8MB,Office 24MB),创建任务时落盘到工作目录 _attachments/" data-i18n-title="添加附件:截图 / 文本 / Word·Excel·PPT / PDF 等(普通 8MB,Office 24MB),创建任务时落盘到工作目录 _attachments/"><svg class="ico" aria-hidden="true"><use href="#i-paperclip"></use></svg><span data-i18n="附件">附件</span></button>
|
|
271
274
|
<span class="att-hint" data-i18n="也可直接粘贴截图">也可直接粘贴截图</span>
|
|
272
275
|
<div id="att-chips" class="att-chips"></div>
|
|
@@ -280,6 +283,8 @@
|
|
|
280
283
|
</div>
|
|
281
284
|
<!-- 快捷类型:点一个即选定并聚焦目标框(renderQuickChips 渲染) -->
|
|
282
285
|
<div id="cmp-quick" class="cmp-quick" role="group" aria-label="常用类型" data-i18n-aria="常用类型"></div>
|
|
286
|
+
<!-- 开跑前成本预估(refreshEstimate 填充;无同类样本时保持隐藏) -->
|
|
287
|
+
<p class="hint cmp-estimate hidden" id="cmp-estimate"></p>
|
|
283
288
|
<div class="field hidden" id="row-resume-session">
|
|
284
289
|
<label data-i18n="选择会话">选择会话</label>
|
|
285
290
|
<select id="f-resume-session"><option data-i18n="(加载中…)">(加载中…)</option></select>
|
|
@@ -287,7 +292,7 @@
|
|
|
287
292
|
</div>
|
|
288
293
|
|
|
289
294
|
<details id="f-advanced">
|
|
290
|
-
<summary data-i18n="
|
|
295
|
+
<summary data-i18n="更多选项">更多选项</summary>
|
|
291
296
|
<div class="adv-body">
|
|
292
297
|
<div class="grid-2">
|
|
293
298
|
<div class="field">
|
|
@@ -310,8 +315,13 @@
|
|
|
310
315
|
<div id="f-code-only">
|
|
311
316
|
<div class="field"><label data-i18n="验证命令">验证命令</label><input id="f-verify" placeholder="例:python -m pytest -q(可空=只评审)" data-i18n-ph="例:python -m pytest -q(可空=只评审)"></div>
|
|
312
317
|
</div>
|
|
313
|
-
<div id="f-review-only" class="hidden">
|
|
314
|
-
<div
|
|
318
|
+
<div id="f-review-only" class="hidden">
|
|
319
|
+
<div id="bible-create-field" class="field hidden">
|
|
320
|
+
<label><svg class="ico" aria-hidden="true"><use href="#i-book"></use></svg><span data-i18n="初始故事圣经">初始故事圣经</span><span class="field-optional" data-i18n="可选">可选</span></label>
|
|
321
|
+
<textarea id="f-bible" rows="5" placeholder="人物、世界观、主线冲突、伏笔和不能违背的设定;会在开跑前写入 story-bible.md" data-i18n-ph="人物、世界观、主线冲突、伏笔和不能违背的设定;会在开跑前写入 story-bible.md"></textarea>
|
|
322
|
+
<p class="hint" data-i18n="连载任务会在每章起草与评审时自动注入;工作目录已有 story-bible.md 时请留空,避免覆盖已有设定。">连载任务会在每章起草与评审时自动注入;工作目录已有 story-bible.md 时请留空,避免覆盖已有设定。</p>
|
|
323
|
+
</div>
|
|
324
|
+
<div class="grid-3">
|
|
315
325
|
<div class="field"><label data-i18n="稿件文件(合并稿)">稿件文件(合并稿)</label><input id="f-manuscript" value="manuscript.md" placeholder="工作目录内的文件名" data-i18n-ph="工作目录内的文件名"></div>
|
|
316
326
|
<div class="field"><label data-i18n="评审轮数">评审轮数</label><input id="f-rounds" type="number" value="2" min="1" max="5"></div>
|
|
317
327
|
<div class="field"><label data-i18n="发布阈值(全书)">发布阈值(全书)</label><input id="f-threshold" type="number" value="7.0" min="1" max="10" step="0.5"></div>
|
|
@@ -363,16 +373,17 @@
|
|
|
363
373
|
<button data-i18n="基于此任务新建" id="btn-newfrom" class="ghost hidden">基于此任务新建</button>
|
|
364
374
|
<button data-i18n="删除记录" id="btn-delete" class="danger hidden">删除记录</button>
|
|
365
375
|
</div>
|
|
366
|
-
</div>
|
|
367
|
-
<div id="rd-meta" class="stats rd-meta-strip"></div>
|
|
368
|
-
<div id="rd-
|
|
369
|
-
|
|
370
|
-
<button class="rd-tab" data-tab="
|
|
371
|
-
<button class="rd-tab" data-tab="
|
|
372
|
-
<button class="rd-tab" data-tab="
|
|
373
|
-
<button class="rd-tab" data-tab="
|
|
374
|
-
<button class="rd-tab" data-tab="
|
|
375
|
-
<button class="rd-tab" data-tab="
|
|
376
|
+
</div>
|
|
377
|
+
<div id="rd-meta" class="stats rd-meta-strip"></div>
|
|
378
|
+
<div id="rd-overview" class="rd-overview hidden" aria-live="polite"></div>
|
|
379
|
+
<div id="rd-tabs" class="rd-tabs" role="tablist" data-i18n-aria="详情分区">
|
|
380
|
+
<button id="rd-tab-chat" class="rd-tab" role="tab" aria-controls="rd-pane-chat" aria-selected="false" tabindex="-1" data-tab="chat" data-i18n="对话"><svg class="ico tab-ico" aria-hidden="true"><use href="#i-chat"></use></svg>对话<span class="rd-badge hidden"></span></button>
|
|
381
|
+
<button id="rd-tab-hive" class="rd-tab" role="tab" aria-controls="rd-pane-hive" aria-selected="false" tabindex="-1" data-tab="hive" data-i18n="蜂巢"><svg class="ico tab-ico" aria-hidden="true"><use href="#i-bee"></use></svg>蜂巢<span class="rd-badge hidden"></span></button>
|
|
382
|
+
<button id="rd-tab-steps" class="rd-tab" role="tab" aria-controls="rd-pane-steps" aria-selected="false" tabindex="-1" data-tab="steps" data-i18n="步骤"><svg class="ico tab-ico" aria-hidden="true"><use href="#i-tasks"></use></svg>步骤<span class="rd-badge hidden"></span></button>
|
|
383
|
+
<button id="rd-tab-result" class="rd-tab" role="tab" aria-controls="rd-pane-result" aria-selected="false" tabindex="-1" data-tab="result" data-i18n="成果"><svg class="ico tab-ico" aria-hidden="true"><use href="#i-file-text"></use></svg>成果<span class="rd-badge hidden"></span></button>
|
|
384
|
+
<button id="rd-tab-git" class="rd-tab" role="tab" aria-controls="rd-pane-git" aria-selected="false" tabindex="-1" data-tab="git" data-i18n="Git"><svg class="ico tab-ico" aria-hidden="true"><use href="#i-git-branch"></use></svg>Git<span class="rd-badge hidden"></span></button>
|
|
385
|
+
<button id="rd-tab-bible" class="rd-tab" role="tab" aria-controls="rd-pane-bible" aria-selected="false" tabindex="-1" data-tab="bible" data-i18n="圣经"><svg class="ico tab-ico" aria-hidden="true"><use href="#i-book"></use></svg>圣经<span class="rd-badge hidden"></span></button>
|
|
386
|
+
<button id="rd-tab-bookmeta" class="rd-tab" role="tab" aria-controls="rd-pane-bookmeta" aria-selected="false" tabindex="-1" data-tab="bookmeta" data-i18n="作品信息"><svg class="ico tab-ico" aria-hidden="true"><use href="#i-idcard"></use></svg>作品信息<span class="rd-badge hidden"></span></button>
|
|
376
387
|
</div>
|
|
377
388
|
<!-- 直连任务「对话为主」导航:常规页签条收起(chat-mode),这里给按需打开
|
|
378
389
|
其它分区的小按钮 + 非对话分区时的「返回对话」入口 -->
|
|
@@ -380,7 +391,7 @@
|
|
|
380
391
|
<div class="rd-main">
|
|
381
392
|
<!-- 对话分区(直连任务默认):用户消息与 CLI 输出混排的时间线 + 贴底追话框。
|
|
382
393
|
运行中发出去走信箱(下一步送达);已结束发出去走 /chat 自动续跑新一轮。 -->
|
|
383
|
-
<div class="rd-pane" data-pane="chat">
|
|
394
|
+
<div id="rd-pane-chat" class="rd-pane" role="tabpanel" aria-labelledby="rd-tab-chat" data-pane="chat">
|
|
384
395
|
<div id="rd-chat" class="rd-chat hidden">
|
|
385
396
|
<div id="rd-chat-flow" class="rd-chat-flow"></div>
|
|
386
397
|
<div class="rd-chat-bar">
|
|
@@ -395,7 +406,7 @@
|
|
|
395
406
|
</div>
|
|
396
407
|
</div>
|
|
397
408
|
</div>
|
|
398
|
-
<div class="rd-pane" data-pane="hive">
|
|
409
|
+
<div id="rd-pane-hive" class="rd-pane" role="tabpanel" aria-labelledby="rd-tab-hive" data-pane="hive">
|
|
399
410
|
<div id="rd-hive" class="rd-hive hidden">
|
|
400
411
|
<div class="sec-title"><svg class="ico" aria-hidden="true"><use href="#i-bee"></use></svg><span data-i18n="蜂巢工作台">蜂巢工作台</span><span id="rd-hive-sub" class="tag"></span></div>
|
|
401
412
|
<div id="rd-hive-cells" class="hive-cells"></div>
|
|
@@ -417,22 +428,23 @@
|
|
|
417
428
|
</div>
|
|
418
429
|
</div>
|
|
419
430
|
</div>
|
|
420
|
-
<div class="rd-pane" data-pane="steps">
|
|
431
|
+
<div id="rd-pane-steps" class="rd-pane" role="tabpanel" aria-labelledby="rd-tab-steps" data-pane="steps">
|
|
421
432
|
<div id="rd-plan" class="hidden"></div>
|
|
422
433
|
<div id="rd-steps" class="steps"></div>
|
|
423
|
-
</div>
|
|
424
|
-
<div class="rd-pane" data-pane="result">
|
|
425
|
-
<
|
|
426
|
-
<
|
|
434
|
+
</div>
|
|
435
|
+
<div id="rd-pane-result" class="rd-pane" role="tabpanel" aria-labelledby="rd-tab-result" data-pane="result">
|
|
436
|
+
<div id="rd-outcome" class="rd-outcome hidden"></div>
|
|
437
|
+
<h3 data-i18n="报告" class="sec-title">报告</h3>
|
|
438
|
+
<div id="rd-report" class="report"></div>
|
|
427
439
|
<div id="rd-arts" class="rd-arts hidden"></div>
|
|
428
440
|
</div>
|
|
429
|
-
<div class="rd-pane" data-pane="git">
|
|
441
|
+
<div id="rd-pane-git" class="rd-pane" role="tabpanel" aria-labelledby="rd-tab-git" data-pane="git">
|
|
430
442
|
<div id="rd-git" class="rd-git hidden"></div>
|
|
431
443
|
</div>
|
|
432
|
-
<div class="rd-pane" data-pane="bible">
|
|
444
|
+
<div id="rd-pane-bible" class="rd-pane" role="tabpanel" aria-labelledby="rd-tab-bible" data-pane="bible">
|
|
433
445
|
<div id="rd-bible" class="rd-bible hidden"></div>
|
|
434
446
|
</div>
|
|
435
|
-
<div class="rd-pane" data-pane="bookmeta">
|
|
447
|
+
<div id="rd-pane-bookmeta" class="rd-pane" role="tabpanel" aria-labelledby="rd-tab-bookmeta" data-pane="bookmeta">
|
|
436
448
|
<div id="rd-bookmeta" class="rd-bookmeta hidden"></div>
|
|
437
449
|
</div>
|
|
438
450
|
<div id="rd-log" class="logbox rd-logdrawer hidden">
|