@tea-agent/loop-agent 0.39.0-next.19 → 0.39.0-next.20
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 +1 -0
- package/dist/build-stamp.json +2 -2
- package/dist/shared/operator/capabilities.js +84 -19
- package/dist/worker/console/chat/pi-runtime.js +10 -5
- package/dist/worker/console/operator-actions.js +5 -4
- package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-DwiNHTdC.js → abnfDiagram-N423BO3Z-BmOEx0gA.js} +1 -1
- package/dist/worker/console/static/assets/{arc-CqaEjHku.js → arc-BGiVVe8b.js} +1 -1
- package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-BoztYl-Q.js → architectureDiagram-T3A2C74G-nDdu4rgJ.js} +1 -1
- package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-BR6kEDU-.js → blockDiagram-VBNYF7ZC-Bb5u0BWf.js} +1 -1
- package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-x8RjYRwv.js → c4Diagram-5PPSVZJV-BlhC0j94.js} +1 -1
- package/dist/worker/console/static/assets/channel-Tl-FkUqr.js +1 -0
- package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-_HKgW9Gv.js → chunk-2GRJ4B5K-Ai8_qQXI.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-BF0MICQ6.js → chunk-2Q5K7J3B-B9gyCjqX.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5RXB4S5H-CwMHVJ8a.js → chunk-5RXB4S5H-Bzbj3zGH.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5VM5RSS4-BsAqLAeh.js → chunk-5VM5RSS4-BT415PvT.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-IdBfnQF8.js → chunk-6Q2QTUOP-D_A5_5QL.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-GF5L2VYU-CmnTA6PM.js → chunk-GF5L2VYU-srJkaP3f.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-JWPE2WC7-DDC1y-tm.js → chunk-JWPE2WC7-UYGvEP4l.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-KBJHAD2P-Df-jjFHX.js → chunk-KBJHAD2P-B8luBrrz.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-RYQCIY6F-DXHlHej7.js → chunk-RYQCIY6F-DN7wXZSq.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-XXDRQBXY-BJUMTtaD.js → chunk-XXDRQBXY-DXKyMuKS.js} +1 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-BaehtRk4.js +1 -0
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-BaehtRk4.js +1 -0
- package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-DvfSBnQA.js → cose-bilkent-JH36ORCC-dqvoynXj.js} +1 -1
- package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-BXe-YrAg.js → cynefin-VYW2F7L2--PcyL34A.js} +1 -1
- package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-C25KAXmE.js → cynefinDiagram-MW4NZA55-DvWs_hTY.js} +1 -1
- package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-DvTVWxGT.js → dagre-VZM6K2ZE-DxeIxbyO.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-7IWD3JNH-e_4e-pmQ.js → diagram-7IWD3JNH-DPCG61Of.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-vG09145o.js → diagram-B4RE2ZJO-CmuU50-U.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-LBJQPF4R-DlqSYoTs.js → diagram-LBJQPF4R-B61XLD_v.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-Q27KOJAE-BI-4PyfE.js → diagram-Q27KOJAE-BB7HTRRY.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-UB23O5K3-C9dLNlyM.js → diagram-UB23O5K3-DvkboAIp.js} +1 -1
- package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-CuqayYwb.js → ebnfDiagram-BXEA7PRR-BdJ_y1fL.js} +1 -1
- package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-Cjt_WoXR.js → erDiagram-JOGREHBK-9bUBZTRi.js} +1 -1
- package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-DI5LAkdd.js → flowDiagram-UKHOOZJN-Dw4L4RBa.js} +1 -1
- package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-BNulKWJe.js → ganttDiagram-PKOTCBZU-Jr82N_QP.js} +1 -1
- package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-BjWpiSad.js → gitGraphDiagram-DS77QQ5N-DAz9wFLr.js} +1 -1
- package/dist/worker/console/static/assets/index-B7Y-0g3J.css +1 -0
- package/dist/worker/console/static/assets/{index-DAAlqKAz.js → index-DkCrqaYg.js} +2 -2
- package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-C2z-HyGf.js → infoDiagram-6WML65LV-CBB5Np7y.js} +1 -1
- package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-BqiVeYz0.js → ishikawaDiagram-WSZJBQD7-D8IOp94y.js} +1 -1
- package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-jEOZ2ROo.js → journeyDiagram-NVQOT4AX-Dgd3AHGG.js} +1 -1
- package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-CArokfSN.js → kanban-definition-27J2QSJJ-BmYOxLE9.js} +1 -1
- package/dist/worker/console/static/assets/{linear-Bq9c9mgI.js → linear-DfYTEF6J.js} +1 -1
- package/dist/worker/console/static/assets/{mermaid.core-CD1Q-FZj.js → mermaid.core-BjuFPRqa.js} +5 -5
- package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-C3_TRMVq.js → mindmap-definition-FAOFIHXS-CLyUViGd.js} +1 -1
- package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-d6-3C5eP.js → pegDiagram-VL7TDLO6-BvX2Di4-.js} +1 -1
- package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-rBMZEugn.js → pieDiagram-7S7Q4E2Y-BFj0_OLv.js} +1 -1
- package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-B1oYGuOW.js → quadrantDiagram-CIZ2JOQS-BIUrD_hx.js} +1 -1
- package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-CduEVeL8.js → railroadDiagram-AXF67PYL-CHBB48fj.js} +1 -1
- package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-BX1CnUrJ.js → requirementDiagram-LRYGKXZP-sJrYw2Sf.js} +1 -1
- package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-Cf5q1crB.js → sankeyDiagram-W5VNT64P-BzHH6fPR.js} +1 -1
- package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-D84Udu8j.js → sequenceDiagram-SI44F4Z6-7QCnelCt.js} +1 -1
- package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-BGbReoBj.js → sizeCapture-X5ZJPWSS-sDYSxn72.js} +1 -1
- package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-CW1DYgTf.js → stateDiagram-OKZ733FA-XpiUdwzm.js} +1 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-eEhq2A8Y.js +1 -0
- package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-B0Ps2tSZ.js → swimlanes-SLNWSIFB-DvqgNPzD.js} +2 -2
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-la8AC7fo.js +8 -0
- package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-CAvdUBWu.js → timeline-definition-Z64GVDOM-2TyOYNx0.js} +1 -1
- package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-Cc5Qi527.js → vennDiagram-T6HMQDX7-B-nM6wM2.js} +1 -1
- package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-m_CGFXYN.js → wardleyDiagram-T6FBY63Y-B86wPdbr.js} +1 -1
- package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-DNfoFR4W.js → xychartDiagram-ELKLHX3M-Dr1C4AQz.js} +1 -1
- package/dist/worker/console/static/index.html +2 -2
- package/package.json +1 -1
- package/dist/worker/console/static/assets/channel-1N7RyL5T.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-BEne8l1a.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-BEne8l1a.js +0 -1
- package/dist/worker/console/static/assets/index-CLGXEKz8.css +0 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-BPT5G0Dj.js +0 -1
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-BGMpptSy.js +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
- `frontend-plan-pi` 改为 runtime skeleton + editable RFC 7386 patch:`schemaVersion`、source binding、risk、writer target files 与生产 Mock 安全位由 DAG 冻结且不可被 plan/revision 覆盖;节点 validator 将补丁编译为 canonical 完整契约后再交给 review/prewrite,并在 `contracts/candidates/<nodeId>/` 保存每次 raw/extracted/normalized/validation 证据。任务提示与三类结构化重试(invalid-output / provider length 截断 / output-too-large)同步收敛为单一 patch + 唯一 `openspec-citations`;无法在声明文件中解析的可选 verification symbol 会被确定性移除并留下 normalization action,避免格式冲突、完整契约重复输出和说明性 symbol 延迟到 trace 才失败。
|
|
32
32
|
- Operator Chat 恢复工具对齐真实能力:系统提示改用 `dagReport` / `dagRerunPlan` / `dagRerun` / `standaloneTaskRerun` / `workerTaskRetry` 真名,不再写 `operator_*` 或把 `dagResume` 当成模型可执行项;`dagDoctor` / `dagStatus` / `workerPoolDoctor` 改为 typed `runId`/`taskId`,不再让模型猜 CLI `args[]`。ADR 0013 自定义 base prompt 上限由 1900 统一调整为 2500(2026-08-18,废止 0.8×2498 比例),预算用于写清节点续跑 / 整单重生 / Worker 重排队分流,以及多轮迭代恢复纪律(先一句话总结上一轮错误、修根因不修症状、禁止原样重交、同错两轮后停下报告)。
|
|
33
|
+
- Operator Chat 模型工具面收敛:`advanced` 分类的命令(workflow/loop/benchmark/knowledge-graph 等 8 个只读低频入口)不再进入模型工具白名单,模型注意力集中到高频工具;保留的 27 个 model-callable 官方 CLI 动作全部换上「做什么 + 何时用」语义描述,不再是无信息的 `Official CLI action coverage for ...` 模板;dispatcher 对官方尾部动作的识别从描述前缀匹配改为结构化 `OFFICIAL_TAIL_ACTION_IDS` 集合判断。审查收口:`knowledgeCurate` 纠正为 `mutation`/`advanced`(条件写盘,移出模型面,防经 read 通道传 `--output` 写盘);`promoteRun`/`closeoutTask` 描述去掉 dispatch 不保证的生命周期断言,如实标注为 task-advance 别名并提示先核 run/任务状态。工具清单渲染修复:promptSnippet 去掉重复工具名前缀(SDK 渲染自带 `- name:`,原实现名字出现两遍);`inspect`/`status`/`spineCheck`/`sourceInstructions` 四条占位描述换成语义描述;task-advance 家族(`newTask`/`dagRunTask`)标注与标准流 `taskAdvance` 的关系,避免模型在 5 个相似入口间选错。可调用性修复:`observeLink` 补上 4 个可选参数 schema(dagRunId/taskId/featureId/workerRunId,原空 schema + additionalProperties:false 导致模型传参必被拒、工具名存实亡);Pi 工具参数 schema 现在携带注册表里的参数描述(Type.String/Boolean/Number/Array 注入 `description`,原实现丢弃参数描述、模型只能看到参数名)。
|
|
33
34
|
|
|
34
35
|
- Operator Chat 对齐 pi-web:建会话不再传封闭 `tools` 白名单(避免 SDK 把扩展 MCP 工具滤出 registry),创建后 `bindExtensions` 发 `session_start`,再钉激活集。扩展注册的 MCP 工具可被模型调用;`apply_patch` / `full-tools` / `shell` / `coding-chat` 仍排除。
|
|
35
36
|
- 对话侧栏 Plugins 右侧新增只读 MCP 弹窗:展示 `mcp.json` 配置的服务,以及当前会话真正注册/激活的 MCP 工具;没有配置也没有工具时保持真实空态。
|
package/dist/build-stamp.json
CHANGED
|
@@ -13,13 +13,45 @@ const CONTROLLER_PROTOCOL_CAPABILITIES = [
|
|
|
13
13
|
"worker-attempt-revision-v1",
|
|
14
14
|
"recovery-decision-v2",
|
|
15
15
|
];
|
|
16
|
-
function officialModelCallable(coverage,
|
|
16
|
+
function officialModelCallable(coverage, _kind) {
|
|
17
17
|
if (coverage === "human-gated-required")
|
|
18
18
|
return "prepare-only";
|
|
19
|
-
|
|
19
|
+
// 2026-08-18: advanced actions (read or mutation) stay OUT of the model
|
|
20
|
+
// tool surface — low-frequency/forensic commands with generic args[] params
|
|
21
|
+
// diluted model attention. They remain dispatchable via UI capabilities.
|
|
22
|
+
if (coverage === "advanced")
|
|
20
23
|
return "never";
|
|
21
24
|
return "always";
|
|
22
25
|
}
|
|
26
|
+
const OFFICIAL_ACTION_DESCRIPTIONS = {
|
|
27
|
+
dagDecisionInspect: "Inspect a pending DAG decision envelope (inputs, options, chosen branch). Use before advising the operator on approve/reject; read-only.",
|
|
28
|
+
dagDecisionValidate: "Validate a DAG decision envelope against its schema. Use when a decision payload looks malformed or a writer emitted a suspect envelope; read-only.",
|
|
29
|
+
dagCloseoutDraft: "Draft the closeout handoff document for a finished DAG run. Use when the run is FINISHED and you need the handoff text; read-only.",
|
|
30
|
+
planList: "List execution plans in the repository. Use to discover plan ids before plan create/complete/check.",
|
|
31
|
+
planCreate: "Create an execution plan from a summary. Use to record the next work block before starting it.",
|
|
32
|
+
planComplete: "Mark an execution plan complete with a summary of what was delivered. Use after a work block is done and verified.",
|
|
33
|
+
planCheck: "Check execution-plan health and drift. Use to audit plan state without mutating anything.",
|
|
34
|
+
docsAudit: "Audit docs freshness and links (document catalog policy). Use when asked whether docs are stale or need review.",
|
|
35
|
+
handoffCheck: "Check handoff document completeness against the verification matrix. Use before claiming a task is fully handed off.",
|
|
36
|
+
handoffCoverage: "Show verification coverage across tests/docs/links for the repo. Use when asked what is verified and what is not.",
|
|
37
|
+
coverageReport: "Produce the verification coverage report. Use for a structured view of tests vs requirements.",
|
|
38
|
+
stats: "Repository workflow statistics (tasks, runs, durations). Use for quantitative status questions.",
|
|
39
|
+
promoteRun: "Task advance alias; passes a task id and flags through to task advance to promote a run. Does not pre-verify run state here — confirm with dagReport that the run is FINISHED before calling.",
|
|
40
|
+
closeoutTask: "Task advance alias; passes a task id and flags through to task advance to close out a task. Confirm the task's work is delivered and verified before calling.",
|
|
41
|
+
knowledgeCurate: "Generate knowledge-base curation proposals (may write a proposal file when --output is passed). Write-capable; use via the operator CLI, not as a model tool.",
|
|
42
|
+
knowledgeQuery: "Query the repository knowledge base. Use instead of re-reading files when a curated answer may exist.",
|
|
43
|
+
workerFeatureReview: "Review worker feature status and checkpoints (agent-worker). Use to see where a feature line stands.",
|
|
44
|
+
workerFeatureDoctor: "Diagnose worker feature health (agent-worker). Use when a feature line looks stuck or inconsistent.",
|
|
45
|
+
workerTaskValidate: "Validate a worker task spec (agent-worker). Use before queuing or when a task looks malformed.",
|
|
46
|
+
workerBatchPlanReady: "Show which batch tasks are ready to run (agent-worker). Use for queue triage before workerBatchRunReady.",
|
|
47
|
+
workerReportMorning: "Morning report for overnight worker activity (agent-worker). Use at the start of a session to catch overnight failures.",
|
|
48
|
+
workerReportMetrics: "Worker throughput and failure metrics (agent-worker). Use for quantitative worker questions.",
|
|
49
|
+
workerAdmissionShow: "Show night admission queue state (agent-worker). Use before night-scheduler mutations.",
|
|
50
|
+
workerSchedulerList: "List night-scheduler schedules (agent-worker). Use to discover schedule ids.",
|
|
51
|
+
workerSchedulerStatus: "Night-scheduler status overview (agent-worker). Use to check whether overnight jobs are healthy.",
|
|
52
|
+
workerSchedulerLedger: "Night-scheduler harvest ledger (agent-worker). Use to audit what overnight runs produced.",
|
|
53
|
+
workerSchedulerDoctor: "Diagnose night-scheduler health (agent-worker). Use when overnight jobs fail to fire or harvest.",
|
|
54
|
+
};
|
|
23
55
|
const officialAction = (action, cli, kind, coverage) => ({
|
|
24
56
|
action,
|
|
25
57
|
cli,
|
|
@@ -38,7 +70,8 @@ const officialAction = (action, cli, kind, coverage) => ({
|
|
|
38
70
|
"TRANSACTION_INCOMPLETE",
|
|
39
71
|
"NOT_FOUND",
|
|
40
72
|
],
|
|
41
|
-
description:
|
|
73
|
+
description: OFFICIAL_ACTION_DESCRIPTIONS[action] ??
|
|
74
|
+
`Official CLI action coverage for ${cli}.`,
|
|
42
75
|
inputParams: [
|
|
43
76
|
{
|
|
44
77
|
name: "args",
|
|
@@ -158,8 +191,8 @@ const OFFICIAL_ACTIONS = [
|
|
|
158
191
|
[
|
|
159
192
|
"knowledgeCurate",
|
|
160
193
|
"loop-agent knowledge curate",
|
|
161
|
-
"
|
|
162
|
-
"
|
|
194
|
+
"mutation",
|
|
195
|
+
"advanced",
|
|
163
196
|
],
|
|
164
197
|
["knowledgeQuery", "loop-agent knowledge query", "read", "model-callable"],
|
|
165
198
|
[
|
|
@@ -334,6 +367,12 @@ const OFFICIAL_ACTIONS = [
|
|
|
334
367
|
],
|
|
335
368
|
],
|
|
336
369
|
].map(([action, cli, kind, coverage]) => officialAction(action, cli, kind, coverage));
|
|
370
|
+
/**
|
|
371
|
+
* Action ids produced by the officialAction() factory (the generic CLI
|
|
372
|
+
* coverage tail). Derived from the same tuple table so dispatcher / gate
|
|
373
|
+
* checks do not string-match descriptions.
|
|
374
|
+
*/
|
|
375
|
+
export const OFFICIAL_TAIL_ACTION_IDS = new Set(OFFICIAL_ACTIONS.map((entry) => entry.action));
|
|
337
376
|
/** Shared constants so dag + dagSpecVersions cannot diverge. */
|
|
338
377
|
const DAG_SPEC_SUPPORTED_PARSE = [1, 2, 3, 4];
|
|
339
378
|
const DAG_SPEC_NEW_WRITER_DEFAULT = 4;
|
|
@@ -609,7 +648,7 @@ export function buildOperatorCapabilitiesDocument() {
|
|
|
609
648
|
resultSchemaVersion: 1,
|
|
610
649
|
envelopeSchemaVersion: 1,
|
|
611
650
|
requiredErrorCodes: [...COMMON_MUTATION_ERRORS],
|
|
612
|
-
description: "Create
|
|
651
|
+
description: "Create a new task (lifecycle entry). Prefer taskAdvance for the standard flow (PRD import, taskKind, boundaries, DAG generation); newTask only bootstraps a task id + title.",
|
|
613
652
|
inputParams: [
|
|
614
653
|
{
|
|
615
654
|
name: "taskId",
|
|
@@ -685,7 +724,7 @@ export function buildOperatorCapabilitiesDocument() {
|
|
|
685
724
|
resultSchemaVersion: 1,
|
|
686
725
|
envelopeSchemaVersion: 1,
|
|
687
726
|
requiredErrorCodes: ["NOT_FOUND", "INVALID_INPUT"],
|
|
688
|
-
description: "Read source instruction contract
|
|
727
|
+
description: "Read the task's source instruction contract (需求.md/执行约束.md projection: requirements, constraints, allowed/forbidden paths). Use before drafting or revising a contract to stay aligned with the source.",
|
|
689
728
|
inputParams: [
|
|
690
729
|
{
|
|
691
730
|
name: "taskId",
|
|
@@ -835,8 +874,33 @@ export function buildOperatorCapabilitiesDocument() {
|
|
|
835
874
|
resultSchemaVersion: 1,
|
|
836
875
|
envelopeSchemaVersion: 1,
|
|
837
876
|
requiredErrorCodes: ["INVALID_INPUT"],
|
|
838
|
-
description: "Build Observe deep link from stable object identity.",
|
|
839
|
-
inputParams: [
|
|
877
|
+
description: "Build Observe deep link from stable object identity. Pass exactly one of dagRunId (preferred), taskId (resolves to latest run), featureId, or workerRunId; omit all for the Console home link.",
|
|
878
|
+
inputParams: [
|
|
879
|
+
{
|
|
880
|
+
name: "dagRunId",
|
|
881
|
+
type: "string",
|
|
882
|
+
required: false,
|
|
883
|
+
description: "dag run id; deep-links to #/dag/<runId> (preferred when known)",
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
name: "taskId",
|
|
887
|
+
type: "string",
|
|
888
|
+
required: false,
|
|
889
|
+
description: "task id; resolves to the latest dag run when one exists, else #/task/<taskId>",
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
name: "featureId",
|
|
893
|
+
type: "string",
|
|
894
|
+
required: false,
|
|
895
|
+
description: "feature line id; deep-links to the feature view",
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
name: "workerRunId",
|
|
899
|
+
type: "string",
|
|
900
|
+
required: false,
|
|
901
|
+
description: "worker run id; deep-links to the worker run view",
|
|
902
|
+
},
|
|
903
|
+
],
|
|
840
904
|
modelCallable: "always",
|
|
841
905
|
humanConfirmation: "none",
|
|
842
906
|
},
|
|
@@ -848,7 +912,7 @@ export function buildOperatorCapabilitiesDocument() {
|
|
|
848
912
|
resultSchemaVersion: 1,
|
|
849
913
|
envelopeSchemaVersion: 1,
|
|
850
914
|
requiredErrorCodes: ["INVALID_INPUT"],
|
|
851
|
-
description: "
|
|
915
|
+
description: "Preflight a repository for loop-agent: checks harness presence, task-pool layout, and reports what the Console can operate on. Use at session start on an unfamiliar repo, before init/upgrade decisions.",
|
|
852
916
|
inputParams: [],
|
|
853
917
|
modelCallable: "always",
|
|
854
918
|
humanConfirmation: "none",
|
|
@@ -907,7 +971,7 @@ export function buildOperatorCapabilitiesDocument() {
|
|
|
907
971
|
resultSchemaVersion: 1,
|
|
908
972
|
envelopeSchemaVersion: 1,
|
|
909
973
|
requiredErrorCodes: ["NOT_FOUND", "INVALID_INPUT"],
|
|
910
|
-
description: "
|
|
974
|
+
description: "Read one task's lifecycle status: state, blockers, gates, contract revision, run associations. Use for task-level questions; use dagStatus for a specific DAG run's live node/liveness.",
|
|
911
975
|
inputParams: [
|
|
912
976
|
{
|
|
913
977
|
name: "taskId",
|
|
@@ -927,7 +991,7 @@ export function buildOperatorCapabilitiesDocument() {
|
|
|
927
991
|
resultSchemaVersion: 1,
|
|
928
992
|
envelopeSchemaVersion: 1,
|
|
929
993
|
requiredErrorCodes: ["NOT_FOUND", "INVALID_INPUT"],
|
|
930
|
-
description: "
|
|
994
|
+
description: "Audit a task's minimal spec spine: source docs, path ownership, requirement ids, final verification coverage. Use before closing out a task to confirm every AC is verified.",
|
|
931
995
|
inputParams: [
|
|
932
996
|
{
|
|
933
997
|
name: "taskId",
|
|
@@ -1020,7 +1084,7 @@ export function buildOperatorCapabilitiesDocument() {
|
|
|
1020
1084
|
"EXTERNALLY_MODIFIED",
|
|
1021
1085
|
"INVALID_INPUT",
|
|
1022
1086
|
],
|
|
1023
|
-
description: "Generate + strict-validate DAG via task advance
|
|
1087
|
+
description: "Generate + strict-validate a task's DAG (via task advance, stops at the writeSet gate). Legacy entry; the standard flow is taskAdvance then prepareDagExecution + runDag.",
|
|
1024
1088
|
inputParams: [
|
|
1025
1089
|
{
|
|
1026
1090
|
name: "taskId",
|
|
@@ -2004,12 +2068,12 @@ export const OPERATOR_COMMAND_COVERAGE = Object.freeze([
|
|
|
2004
2068
|
},
|
|
2005
2069
|
{
|
|
2006
2070
|
command: "loop-agent knowledge curate",
|
|
2007
|
-
coverage: "
|
|
2071
|
+
coverage: "advanced",
|
|
2008
2072
|
action: "knowledgeCurate",
|
|
2009
2073
|
source: "loop-agent",
|
|
2074
|
+
note: "Writes knowledge proposals (conditional on --output); not model-callable.",
|
|
2010
2075
|
},
|
|
2011
|
-
{
|
|
2012
|
-
command: "loop-agent knowledge query",
|
|
2076
|
+
{ command: "loop-agent knowledge query",
|
|
2013
2077
|
coverage: "model-callable",
|
|
2014
2078
|
action: "knowledgeQuery",
|
|
2015
2079
|
source: "loop-agent",
|
|
@@ -2584,9 +2648,10 @@ export function assertCoverageManifestConsistent() {
|
|
|
2584
2648
|
capability.humanConfirmation !== "required"))
|
|
2585
2649
|
throw new Error(`invalid required gate classification: ${entry.action}`);
|
|
2586
2650
|
if (entry.coverage === "advanced") {
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2651
|
+
// 2026-08-18: advanced actions are never model-callable (read or
|
|
2652
|
+
// mutation) — see officialModelCallable. UI dispatch stays available.
|
|
2653
|
+
if (capability.modelCallable !== "never") {
|
|
2654
|
+
throw new Error(`invalid advanced classification: ${entry.action} (expected modelCallable=never)`);
|
|
2590
2655
|
}
|
|
2591
2656
|
}
|
|
2592
2657
|
}
|
|
@@ -228,19 +228,24 @@ async function buildCustomOperatorTools(options) {
|
|
|
228
228
|
// TypeBox schema is built dynamically; cast through unknown to the builder
|
|
229
229
|
// since Static<TParams> is structural and cannot be statically inferred here.
|
|
230
230
|
const parameters = Type.Object(schema.inputParams.reduce((acc, param) => {
|
|
231
|
+
// Carry the registry's param description into the tool schema so
|
|
232
|
+
// the model sees parameter semantics, not just names/types.
|
|
233
|
+
const desc = param.description?.trim()
|
|
234
|
+
? { description: param.description }
|
|
235
|
+
: {};
|
|
231
236
|
let t;
|
|
232
237
|
switch (param.type) {
|
|
233
238
|
case "string":
|
|
234
|
-
t = Type.String();
|
|
239
|
+
t = Type.String(desc);
|
|
235
240
|
break;
|
|
236
241
|
case "boolean":
|
|
237
|
-
t = Type.Boolean();
|
|
242
|
+
t = Type.Boolean(desc);
|
|
238
243
|
break;
|
|
239
244
|
case "number":
|
|
240
|
-
t = Type.Number();
|
|
245
|
+
t = Type.Number(desc);
|
|
241
246
|
break;
|
|
242
247
|
case "array":
|
|
243
|
-
t = Type.Array(Type.String());
|
|
248
|
+
t = Type.Array(Type.String({}), Object.keys(desc).length ? desc : {});
|
|
244
249
|
break;
|
|
245
250
|
default:
|
|
246
251
|
t = Type.Object({}, { additionalProperties: true });
|
|
@@ -252,7 +257,7 @@ async function buildCustomOperatorTools(options) {
|
|
|
252
257
|
name: schema.toolId,
|
|
253
258
|
label: schema.toolId,
|
|
254
259
|
description: `${schema.description} (kind=${schema.kind}; cli: ${schema.cli})`,
|
|
255
|
-
promptSnippet:
|
|
260
|
+
promptSnippet: schema.description,
|
|
256
261
|
parameters: parameters,
|
|
257
262
|
async execute(toolCallId, params) {
|
|
258
263
|
const decision = authorizeOperatorChatTool(schema.toolId);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { access, readFile } from "node:fs/promises";
|
|
2
|
-
import { buildOperatorCapabilitiesDocument } from "../../shared/operator/capabilities.js";
|
|
2
|
+
import { buildOperatorCapabilitiesDocument, OFFICIAL_TAIL_ACTION_IDS, } from "../../shared/operator/capabilities.js";
|
|
3
3
|
import { buildOperatorResult, operatorFailed, operatorSucceeded, } from "../../shared/operator/envelope.js";
|
|
4
4
|
import { CANONICAL_TASK_ID_PATTERN, formatLocalBusinessDate, getTaskPaths, loadTaskConfig, } from "../../task/runtime.js";
|
|
5
5
|
import { diffTaskContract, validateDraftForTask, } from "../../task/contract/index.js";
|
|
@@ -1060,7 +1060,7 @@ export async function dispatchOperatorAction(ctx, req) {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
if (operatorAction) {
|
|
1062
1062
|
const target = buildOperatorCapabilitiesDocument().actions.find((entry) => entry.action === operatorAction &&
|
|
1063
|
-
entry.
|
|
1063
|
+
OFFICIAL_TAIL_ACTION_IDS.has(entry.action) &&
|
|
1064
1064
|
entry.humanConfirmation === "required");
|
|
1065
1065
|
if (!target)
|
|
1066
1066
|
return invalid(action, "operatorAction must name a required official action");
|
|
@@ -2610,8 +2610,9 @@ export async function dispatchOperatorAction(ctx, req) {
|
|
|
2610
2610
|
// M5 official-command coverage uses one generic tail for newly registered
|
|
2611
2611
|
// CLI actions. It remains inside dispatchOperatorAction (the sole dispatch
|
|
2612
2612
|
// surface) and only accepts argv arrays declared by the capability schema.
|
|
2613
|
-
|
|
2614
|
-
|
|
2613
|
+
// 2026-08-18: high-frequency entries got real descriptions; membership is
|
|
2614
|
+
// now derived from OFFICIAL_TAIL_ACTION_IDS, not description prefixes.
|
|
2615
|
+
const capability = buildOperatorCapabilitiesDocument().actions.find((entry) => entry.action === action && OFFICIAL_TAIL_ACTION_IDS.has(entry.action));
|
|
2615
2616
|
if (capability) {
|
|
2616
2617
|
const rawArgs = p.args;
|
|
2617
2618
|
if (rawArgs !== undefined &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,r as u,d as a}from"./chunk-6Q2QTUOP-
|
|
1
|
+
import{g as p,r as u,d as a}from"./chunk-6Q2QTUOP-D_A5_5QL.js";import{p as f}from"./chunk-JWPE2WC7-UYGvEP4l.js";import{_ as n,l as o}from"./mermaid.core-BjuFPRqa.js";import{M as c,b as d}from"./cynefin-VYW2F7L2--PcyL34A.js";import"./index-DkCrqaYg.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as ln,$ as an,a0 as F,a1 as q,a2 as j,a3 as un,a4 as y,a5 as tn,a6 as J,a7 as _,a8 as rn,a9 as o,aa as on,ab as sn,ac as fn}from"./mermaid.core-
|
|
1
|
+
import{Y as ln,$ as an,a0 as F,a1 as q,a2 as j,a3 as un,a4 as y,a5 as tn,a6 as J,a7 as _,a8 as rn,a9 as o,aa as on,ab as sn,ac as fn}from"./mermaid.core-BjuFPRqa.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,z,a){var O=I-l,i=D-h,n=z-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function U(l,h,I,D,v,A,z){var a=l-I,O=h-D,i=(z?A:-A)/J(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,B=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*J(on(0,T*T*R-P*P)),Y=(P*g-m*S)/R,$=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=Y-B,e=$-t,r=w-B,C=p-t;return x*x+e*e>r*r+C*C&&(Y=w,$=p),{cx:Y,cy:$,x01:-n,y01:-d,x11:Y*(v/T-1),y11:$*(v/T-1)}}function hn(){var l=cn,h=yn,I=j(0),D=null,v=gn,A=dn,z=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,B=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(B>tn-y)a.moveTo(s*F(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*F(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=B,S=B,Y=z.apply(this,arguments)/2,$=Y>y&&(D?+D.apply(this,arguments):J(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if($>y){var C=sn($/u*q(Y)),K=sn($/s*q(Y));(P-=C*2)>y?(C*=t?1:-1,R+=C,T-=C):(P=0,R=T=(f+c)/2),(S-=K*2)>y?(K*=t?1:-1,m+=K,g-=K):(S=0,m=g=(f+c)/2)}var G=s*F(m),H=s*q(m),L=u*F(T),M=u*q(T);if(w>y){var N=s*F(g),Q=s*q(g),V=u*F(R),W=u*q(R),E;if(B<an)if(E=pn(G,H,V,W,N,Q,L,M)){var X=G-E[0],Z=H-E[1],b=N-E[0],k=Q-E[1],nn=1/q(fn((X*b+Z*k)/(J(X*X+Z*Z)*J(b*b+k*k)))/2),en=J(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=U(V,W,G,H,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(G,H),a.arc(0,0,s,m,g,!t)):a.moveTo(G,H),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(G,H,V,W,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[F(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:j(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:j(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:j(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:j(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:j(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:j(+n),i):A},i.padAngle=function(n){return arguments.length?(z=typeof n=="function"?n:j(+n),i):z},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|