@tea-agent/loop-agent 0.43.0-next.8 → 0.43.0
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/AGENTS.md +1 -1
- package/CHANGELOG.md +41 -2312
- package/README.md +7 -0
- package/dist/application/dag/args.js +8 -0
- package/dist/application/task-lifecycle/advance.js +38 -7
- package/dist/build-stamp.json +3 -3
- package/dist/cli/command-definitions.js +2 -0
- package/dist/cli/program.js +3 -1
- package/dist/cli/update/init-surface-notifier.js +2 -0
- package/dist/cli/update/policy.js +2 -0
- package/dist/commands/client-recovery.js +20 -55
- package/dist/commands/cursor-prompt.js +2 -0
- package/dist/commands/dag-approve.js +2 -0
- package/dist/commands/dag-final-verification.js +2 -0
- package/dist/commands/dag-init-hybrid.js +2 -0
- package/dist/commands/dag-reconcile-tasks.js +2 -0
- package/dist/commands/dag-reject.js +2 -0
- package/dist/commands/dag-report.js +2 -0
- package/dist/commands/dag-rerun.js +2 -0
- package/dist/commands/dag-resume.js +2 -0
- package/dist/commands/dag-workflow-compile.js +2 -0
- package/dist/commands/dag-workflow-plan.js +2 -0
- package/dist/commands/dag-workflow-validate.js +2 -0
- package/dist/commands/delegate.js +2 -0
- package/dist/commands/examples.js +2 -0
- package/dist/commands/import-prd.js +2 -0
- package/dist/commands/init-model-catalog.js +2 -0
- package/dist/commands/init.js +19 -13
- package/dist/commands/instructions.js +2 -0
- package/dist/commands/knowledge.js +2 -0
- package/dist/commands/loop-benchmark.js +2 -0
- package/dist/commands/pi-prompt.js +2 -0
- package/dist/commands/pi-reuse-benchmark.js +2 -0
- package/dist/commands/promote-run.js +2 -0
- package/dist/commands/stats.js +1 -1
- package/dist/commands/study-init.js +2 -0
- package/dist/commands/task-advance.js +34 -0
- package/dist/commands/task-source-prepare.js +2 -0
- package/dist/commands/worktree-create.js +2 -0
- package/dist/commands/worktree-remove.js +2 -0
- package/dist/executors/dag-pi-executor.js +1650 -198
- package/dist/executors/pi-executor.js +85 -3
- package/dist/executors/pi-sdk-executor.js +18 -0
- package/dist/executors/shell-executor.js +93 -7
- package/dist/executors/shell-verification.js +3 -0
- package/dist/executors/shell-write-guard.js +27 -32
- package/dist/governance/exec-plans.js +6 -3
- package/dist/infrastructure/console/app-data.js +6 -0
- package/dist/shared/artifacts-core.js +2 -0
- package/dist/shared/backend-dogfood-preflight.js +47 -0
- package/dist/shared/dag-failure-category.js +3 -0
- package/dist/shared/git-progress.js +2 -0
- package/dist/shared/one-shot-prompt-args.js +2 -0
- package/dist/shared/operator/capabilities.js +180 -0
- package/dist/shared/package-metadata.js +6 -4
- package/dist/shared/pi-context-pressure/extension.js +26 -16
- package/dist/shared/pi-context-pressure/sift-bridge.js +1 -1
- package/dist/shared/pi-provider-recovery.js +182 -0
- package/dist/shared/pi-retry-settings.js +40 -0
- package/dist/shared/reference-context.js +2 -0
- package/dist/task/config-types.js +29 -0
- package/dist/task/contract/project.js +9 -0
- package/dist/task/contract/recover.js +6 -0
- package/dist/task/contract/schema.js +17 -0
- package/dist/task/source-prepare/artifact-meta.js +9 -2
- package/dist/task/source-prepare/build-draft.js +60 -0
- package/dist/task/source-prepare/fragment-inventory.js +4 -1
- package/dist/task/source-prepare/parse-intent.js +36 -11
- package/dist/task/task-demand-routing.js +5 -2
- package/dist/worker/console/chat/browser-automation.js +523 -0
- package/dist/worker/console/chat/browser-policy.js +6 -36
- package/dist/worker/console/chat/browser-routes.js +188 -56
- package/dist/worker/console/chat/explore-tools.js +5 -2
- package/dist/worker/console/chat/pi-mode-loop-isolation.js +155 -0
- package/dist/worker/console/chat/pi-runtime/custom-tools/ask-user-question.js +44 -0
- package/dist/worker/console/chat/pi-runtime/custom-tools/browser-tools.js +184 -0
- package/dist/worker/console/chat/pi-runtime/custom-tools/explore-tools.js +202 -0
- package/dist/worker/console/chat/pi-runtime/custom-tools/goal-tools.js +79 -0
- package/dist/worker/console/chat/pi-runtime/custom-tools/operator-tools.js +94 -0
- package/dist/worker/console/chat/pi-runtime/custom-tools/scheduled-goal-tools.js +22 -0
- package/dist/worker/console/chat/pi-runtime/custom-tools/todo-write.js +38 -0
- package/dist/worker/console/chat/pi-runtime/inspection-types.js +28 -0
- package/dist/worker/console/chat/pi-runtime/inspection.js +439 -0
- package/dist/worker/console/chat/pi-runtime/progressive-tools.js +195 -0
- package/dist/worker/console/chat/pi-runtime/sdk-bindings.js +153 -0
- package/dist/worker/console/chat/pi-runtime/sdk-session.js +5 -0
- package/dist/worker/console/chat/pi-runtime.js +208 -1138
- package/dist/worker/console/chat/routes.js +59 -24
- package/dist/worker/console/chat/scheduled-goal-booking.js +59 -0
- package/dist/worker/console/chat/scheduled-goal-delivery.js +27 -0
- package/dist/worker/console/chat/scheduled-goal-request.js +190 -0
- package/dist/worker/console/chat/sdd-data-alignment.js +1 -1
- package/dist/worker/console/chat/session-mode-view.js +5 -4
- package/dist/worker/console/chat/session-mode.js +18 -12
- package/dist/worker/console/chat/session-store.js +42 -9
- package/dist/worker/console/chat/terminal-sessions.js +65 -1
- package/dist/worker/console/chat/terminal-tools.js +17 -5
- package/dist/worker/console/chat/tool-preview.js +115 -0
- package/dist/worker/console/chat/tools.js +10 -0
- package/dist/worker/console/chat/turn-order.js +13 -0
- package/dist/worker/console/chat/turn-process.js +32 -30
- package/dist/worker/console/console-update-and-init.js +1 -19
- package/dist/worker/console/console-update-runtime.js +5 -20
- package/dist/worker/console/operator-actions.js +63 -1
- package/dist/worker/console/prd-intake-bridge.js +54 -1
- package/dist/worker/console/routes.js +8 -0
- package/dist/worker/console/scheduled-goal-host.js +98 -0
- package/dist/worker/console/scheduled-goal-operation-adapter.js +127 -0
- package/dist/worker/console/server.js +24 -1
- package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-CwAxHSAM.js → abnfDiagram-N423BO3Z-8-j6y-sd.js} +1 -1
- package/dist/worker/console/static/assets/{arc-Bozf-oeF.js → arc-eoQiMvuk.js} +1 -1
- package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-DEypbEQv.js → architectureDiagram-T3A2C74G-C4A3uMcI.js} +1 -1
- package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-B1BQWCbE.js → blockDiagram-VBNYF7ZC-D4zD2F-Q.js} +1 -1
- package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-B3u5-yZz.js → c4Diagram-5PPSVZJV-j1RkJziL.js} +1 -1
- package/dist/worker/console/static/assets/channel-ChE7y-cx.js +1 -0
- package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-DSUc2NTh.js → chunk-2GRJ4B5K-YBHmhik1.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-DZouMIvT.js → chunk-2Q5K7J3B-COfWyo9P.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5RXB4S5H-B3bhB5hh.js → chunk-5RXB4S5H-I99OUkHY.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5VM5RSS4-CZFP_BOz.js → chunk-5VM5RSS4-XKxoJNJ4.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-DnE_wb-X.js → chunk-6Q2QTUOP-DLT_cYx1.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-GF5L2VYU-C2OfoiWm.js → chunk-GF5L2VYU-CxcKZ9mV.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-JWPE2WC7-BKUTL8mm.js → chunk-JWPE2WC7-V1EqXdjY.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-KBJHAD2P-BT5oz0tg.js → chunk-KBJHAD2P-DebTtdFp.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-RYQCIY6F-D8vk-GJi.js → chunk-RYQCIY6F-B-ivNRDf.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-XXDRQBXY-CkUIm3zu.js → chunk-XXDRQBXY-DC_Ds11b.js} +1 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-C01TCf2X.js +1 -0
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-C01TCf2X.js +1 -0
- package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-CO9QNHmR.js → cose-bilkent-JH36ORCC-sWEqKwIb.js} +1 -1
- package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-s52EPl2Z.js → cynefin-VYW2F7L2-BXa_dcu4.js} +1 -1
- package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-BHaseJfW.js → cynefinDiagram-MW4NZA55-C-Mle84F.js} +1 -1
- package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-CTVhRG_R.js → dagre-VZM6K2ZE-CXPDBITe.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-7IWD3JNH-B6pYeOMR.js → diagram-7IWD3JNH-CC-WJQfa.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-CXXRzw5j.js → diagram-B4RE2ZJO-CDAV5Vs4.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-LBJQPF4R-BOeJHiLA.js → diagram-LBJQPF4R-CmFiAcNz.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-Q27KOJAE-DbEg6h_l.js → diagram-Q27KOJAE-DPBZHuyn.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-UB23O5K3-CjlEcbX6.js → diagram-UB23O5K3-jUlm_Ds3.js} +1 -1
- package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-BcqMPbD_.js → ebnfDiagram-BXEA7PRR-DWhQ3mfY.js} +1 -1
- package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-DWfRyHe5.js → erDiagram-JOGREHBK-Tr2gMqet.js} +1 -1
- package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-Bz7TeIc8.js → flowDiagram-UKHOOZJN-DJjVQHPA.js} +1 -1
- package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-BD-JxYjU.js → ganttDiagram-PKOTCBZU-D74dQ4u0.js} +1 -1
- package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-Cv16vMHK.js → gitGraphDiagram-DS77QQ5N-DwW0tZ0X.js} +1 -1
- package/dist/worker/console/static/assets/index-BWkIfcrK.css +1 -0
- package/dist/worker/console/static/assets/index-Cdkvw_H6.js +469 -0
- package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-BlWO0HQQ.js → infoDiagram-6WML65LV-ILCbxJyb.js} +1 -1
- package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-C4mbsn97.js → ishikawaDiagram-WSZJBQD7-DeuWBQ89.js} +1 -1
- package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-CBPvVKjw.js → journeyDiagram-NVQOT4AX-CF5ih8Fk.js} +1 -1
- package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-DPHLp54K.js → kanban-definition-27J2QSJJ-C7yOSuRO.js} +1 -1
- package/dist/worker/console/static/assets/{linear-CXx_9o6k.js → linear-BDZ9riWi.js} +1 -1
- package/dist/worker/console/static/assets/{mermaid.core-DU3IxMq9.js → mermaid.core-7pKqYtpZ.js} +5 -5
- package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-COm4a2ud.js → mindmap-definition-FAOFIHXS-LeJDybSU.js} +1 -1
- package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-Cbt7OA5d.js → pegDiagram-VL7TDLO6-BJvT3pMD.js} +1 -1
- package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-BiYV_4Wl.js → pieDiagram-7S7Q4E2Y-_rGqpMan.js} +1 -1
- package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-lg2zhvbp.js → quadrantDiagram-CIZ2JOQS-DPcSv5aA.js} +1 -1
- package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-cBLvtf0p.js → railroadDiagram-AXF67PYL-Drxx4hkJ.js} +1 -1
- package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-BoekU3Bg.js → requirementDiagram-LRYGKXZP-BCTUdU4z.js} +1 -1
- package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-D_DMZYga.js → sankeyDiagram-W5VNT64P-B6wzbZmB.js} +1 -1
- package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-Lzmzn8lz.js → sequenceDiagram-SI44F4Z6-BGt8d3QQ.js} +1 -1
- package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-Cos3HpIe.js → sizeCapture-X5ZJPWSS-7nlhJKo7.js} +1 -1
- package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-D-hFBGsx.js → stateDiagram-OKZ733FA-Cv2stqMA.js} +1 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-DC7V5vcq.js +1 -0
- package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-BY95sCVI.js → swimlanes-SLNWSIFB-qDAo4Yc1.js} +2 -2
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-Bwy4QUTO.js +8 -0
- package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-D1iCgWHS.js → timeline-definition-Z64GVDOM-CKbDNKTr.js} +1 -1
- package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-D9IYy4WK.js → vennDiagram-T6HMQDX7-DI-9EHic.js} +1 -1
- package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-C9yJwO-R.js → wardleyDiagram-T6FBY63Y-BrzzRDpX.js} +1 -1
- package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-CC2llyou.js → xychartDiagram-ELKLHX3M-BclH5hGh.js} +1 -1
- package/dist/worker/console/static/index.html +2 -2
- package/dist/worker/console/static-src/operator-chat/active-turn-tail.js +10 -0
- package/dist/worker/console/static-src/operator-chat/chat-scroll-position.js +24 -0
- package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +41 -11
- package/dist/worker/console/static-src/operator-chat/compaction-message.js +10 -17
- package/dist/worker/console/static-src/operator-chat/composer-session-ledger.js +192 -0
- package/dist/worker/console/static-src/operator-chat/pending-user-message.js +9 -1
- package/dist/worker/console/static-src/operator-chat/slash-palette-nav.js +15 -5
- package/dist/worker/console/static-src/operator-chat/timeline-merge.js +29 -0
- package/dist/worker/console/static-src/operator-chat/turn-process-disclosure.js +10 -0
- package/dist/worker/console/static-src/operator-chat/useChatSessions.js +105 -44
- package/dist/worker/console/static-src/operator-chat/useChatStream.js +145 -70
- package/dist/worker/console/static-src/operator-chat/useChatThread.js +38 -57
- package/dist/worker/console/static-src/operator-chat/useComposer.js +195 -73
- package/dist/worker/console/static-src/operator-chat/useRepoBrowser.js +2 -0
- package/dist/worker/console/static-src/prd-file-import.js +3 -1
- package/dist/worker/console/workspace-context.js +22 -0
- package/dist/worker/console/workspace-initialization.js +209 -0
- package/dist/worker/delivery/git-transaction.js +2 -0
- package/dist/worker/feature/fullstack-validate.js +2 -0
- package/dist/worker/loop-agent/loop-agent-client.js +8 -2
- package/dist/worker/materialize/harness-task-materializer.js +4 -1
- package/dist/worker/metrics/projector.js +1 -1
- package/dist/worker/observability/event-store.js +4 -1
- package/dist/worker/observability/read-model.js +4 -1
- package/dist/worker/observe/node-transparency.js +23 -1
- package/dist/worker/observe/routes.js +4 -0
- package/dist/worker/observe/static/operator-chrome.js +3 -1
- package/dist/worker/observe/static/styles.css +7 -4
- package/dist/worker/observe/static/views/dag-inspector.js +5 -19
- package/dist/worker/outcomes/declared-artifacts.js +2 -0
- package/dist/worker/preflight.js +3 -0
- package/dist/worker/scheduler/scheduled-goal-dispatch.js +117 -0
- package/dist/worker/scheduler/scheduled-goal-evidence.js +167 -0
- package/dist/worker/scheduler/scheduled-goal-recovery.js +62 -0
- package/dist/worker/scheduler/scheduled-goal-store.js +699 -0
- package/dist/worker/scheduler/scheduled-goal-supervisor.js +132 -0
- package/dist/worker/scheduler/scheduled-goal-time.js +102 -0
- package/dist/worker/scheduler/scheduled-goal-types.js +95 -0
- package/dist/worker/task-spec/validate.js +4 -1
- package/dist/workflows/dag/backend-test-markdown-workflow.js +6 -24
- package/dist/workflows/dag/backend-test-plan-protocol.js +82 -5
- package/dist/workflows/dag/dag-retry-schema.js +11 -0
- package/dist/workflows/dag/decision-envelope.js +2 -0
- package/dist/workflows/dag/dynamic-runtime/shared.js +2 -2
- package/dist/workflows/dag/frontend-closeout.js +3 -1
- package/dist/workflows/dag/frontend-committed-facts.js +461 -0
- package/dist/workflows/dag/frontend-durable-tools.js +15 -3
- package/dist/workflows/dag/frontend-implementation-contract.js +369 -12
- package/dist/workflows/dag/frontend-plan-canary.js +53 -0
- package/dist/workflows/dag/frontend-plan-decision-contract.js +803 -0
- package/dist/workflows/dag/frontend-plan-render.js +0 -2
- package/dist/workflows/dag/frontend-provider-capability-matrix.js +8 -61
- package/dist/workflows/dag/frontend-recovery-run.js +57 -0
- package/dist/workflows/dag/frontend-repair.js +55 -76
- package/dist/workflows/dag/frontend-review-context.js +42 -68
- package/dist/workflows/dag/frontend-review-scopes.js +2 -2
- package/dist/workflows/dag/frontend-risk.js +92 -10
- package/dist/workflows/dag/frontend-session-budget.js +117 -3
- package/dist/workflows/dag/frontend-shape.js +11 -55
- package/dist/workflows/dag/frontend-test-execution-evidence.js +35 -10
- package/dist/workflows/dag/frontend-typed-event-store.js +32 -25
- package/dist/workflows/dag/frontend-verification-trace.js +33 -54
- package/dist/workflows/dag/frontend-writer-admission.js +3 -47
- package/dist/workflows/dag/frontend-writer-status.js +0 -23
- package/dist/workflows/dag/init-hybrid.js +47 -19
- package/dist/workflows/dag/interrupt-request.js +2 -0
- package/dist/workflows/dag/lifecycle.js +11 -2
- package/dist/workflows/dag/node-execution.js +50 -13
- package/dist/workflows/dag/reconcile-run.js +2 -0
- package/dist/workflows/dag/repair-artifact.js +3 -1
- package/dist/workflows/dag/report.js +2 -0
- package/dist/workflows/dag/rerun-plan.js +10 -0
- package/dist/workflows/dag/rerun-task.js +79 -1
- package/dist/workflows/dag/retry-policy.js +18 -0
- package/dist/workflows/dag/scheduler.js +2 -4
- package/dist/workflows/dag/types.js +44 -6
- package/dist/workflows/dag/validate.js +4 -0
- package/docs/README.md +1 -0
- package/docs/architecture/runtime-boundaries.md +3 -3
- package/docs/governance/README.md +1 -0
- package/docs/init-surface.manifest.json +1 -0
- package/docs/operations/README.md +2 -0
- package/docs/templates/README.md +1 -1
- package/docs/templates/agent-dag.schema.json +2 -2
- package/docs/templates/backend-test-dag.json +14 -10
- package/docs/templates/frontend-implementation-contract.schema.json +0 -7
- package/package.json +9 -3
- package/skills/frontend-bounded-implement/references/code-standards.md +3 -3
- package/skills/frontend-contract/references/contract-protocol.md +3 -1
- package/skills/frontend-plan/SKILL.md +8 -6
- package/skills/frontend-plan/references/decision-contract.md +3 -3
- package/skills/frontend-review/SKILL.md +18 -28
- package/skills/frontend-review/references/review-findings.md +8 -3
- package/dist/commands/new-task.js +0 -5
- package/dist/commands/status.js +0 -57
- package/dist/commands/task-contract.js +0 -269
- package/dist/shared/prompts.js +0 -26
- package/dist/task/config.js +0 -2
- package/dist/task/contract/validate-draft.js +0 -106
- package/dist/task/goal.js +0 -3
- package/dist/task/index.js +0 -12
- package/dist/task/lifecycle.js +0 -1
- package/dist/task/operator/capabilities.js +0 -6
- package/dist/task/operator/envelope.js +0 -2
- package/dist/task/operator/index.js +0 -5
- package/dist/task/operator/registry.js +0 -2
- package/dist/task/operator/types.js +0 -1
- package/dist/task/paths.js +0 -1
- package/dist/task/source-state.js +0 -1
- package/dist/task/subagent-guidance.js +0 -1
- package/dist/worker/console/chat/sift-bridge.js +0 -1
- package/dist/worker/console/index.js +0 -20
- package/dist/worker/console/static/assets/channel-JM-I_b0s.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-DuQQAYEg.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-DuQQAYEg.js +0 -1
- package/dist/worker/console/static/assets/index-B5H-giS2.js +0 -468
- package/dist/worker/console/static/assets/index-Bf7dxfm-.css +0 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-img0hVJ4.js +0 -1
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-B4acZJvk.js +0 -8
- package/dist/worker/scheduler/index.js +0 -25
- package/dist/workflows/dag/facts.js +0 -4
- package/dist/workflows/dag/frontend-shadow-dual-write.js +0 -975
- package/dist/workflows/dag/index.js +0 -6
- package/dist/workflows/dynamic/index.js +0 -7
package/README.md
CHANGED
|
@@ -126,6 +126,13 @@ agent-worker console doctor --repo .
|
|
|
126
126
|
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
Console Chat 支持直接用自然语言预约工作流,例如:“请预约3分钟后检查当前项目的Git状态,汇总修改文件,不修改业务文件,结果发回当前对话。”服务在当前项目目录准备任务,生成真实预约卡;核对时间、范围和验收后点击“确认预约”,后台执行并把结果关联回原对话。相对延时从准备完成起算,以卡片显示的准确时间为准。预约要求当前目录与已提交 HEAD 一致,确认后若基线或文件变化则停止启动;执行产生的改动留在当前目录,无需另行合并。测试类报告交付可以包含业务失败,不等同于全部用例通过。取消停止后续启动,已执行事实与报告保留。
|
|
130
|
+
|
|
131
|
+
预约任务的完整列表与验收详情位于 **Console → 观测 → 定时任务**;Chat保留简洁确认卡和「查看执行」入口。
|
|
132
|
+
|
|
133
|
+
预约由 Console 进程持有,关闭浏览器不停止后台工作;退出 Console、系统休眠或断电不能保证准点执行。需要夜间运行时,由当前用户的 OS 服务管理器保持 Console 可用,使用固定版本和明确的工作目录/环境,避免运行期间升级。恢复后按冻结的最晚启动、授权到期和错过时间策略处理;未知运行不会自动重发。目标项目 `init` 不安装服务,也不复制凭据。
|
|
134
|
+
|
|
135
|
+
|
|
129
136
|
裸 `agent-worker console` 不在终端询问升级。操作 → 设置提供非阻塞的「更新并初始化」入口,默认选择 npm `latest` 稳定版,也可由操作者显式选择 `next` 预发布版;更新前会先检查活跃运行和全局安装来源。`console doctor`、帮助和版本命令均不触发更新检查。
|
|
130
137
|
|
|
131
138
|
访问 Console <http://127.0.0.1:8790/>;**Operator Chat Official** 是 Console 内的主引导交互,默认打开「对话」工作区。构建时设置 `VITE_OPERATOR_CHAT_DEFAULT_LANDING=tasks` 可改回 Tasks;URL hash(`#/tasks`)与 localStorage 仍优先于默认值。顶部「检视」以及 `/inspect/` 提供只读 Dashboard、DAG、时间线与 artifacts;`loop-agent …` / `agent-worker …` CLI direct path 仍是受治理 fallback。当前状态为 **code ready, dogfood pending/unmet**,不宣称已替代 openCode 或其他外部主会话。
|
|
@@ -34,6 +34,8 @@ export function parseDagRunTaskArgs(args, defaultCwd) {
|
|
|
34
34
|
let profileExplicit = false;
|
|
35
35
|
for (let i = 0; i < args.length; i += 1) {
|
|
36
36
|
const arg = args[i];
|
|
37
|
+
if (arg === undefined)
|
|
38
|
+
break;
|
|
37
39
|
if (arg === "--output" || arg === "-o") {
|
|
38
40
|
outputPath = args[++i];
|
|
39
41
|
if (!outputPath) {
|
|
@@ -165,6 +167,8 @@ export function parseDagValidateArgs(args) {
|
|
|
165
167
|
let spineTaskId;
|
|
166
168
|
for (let i = 0; i < args.length; i += 1) {
|
|
167
169
|
const arg = args[i];
|
|
170
|
+
if (arg === undefined)
|
|
171
|
+
break;
|
|
168
172
|
if (arg === "--dag") {
|
|
169
173
|
dagPath = args[++i];
|
|
170
174
|
if (!dagPath) {
|
|
@@ -264,6 +268,8 @@ export function parseRunDagArgs(args, defaultCwd) {
|
|
|
264
268
|
let workerAssociation;
|
|
265
269
|
for (let i = 0; i < args.length; i += 1) {
|
|
266
270
|
const arg = args[i];
|
|
271
|
+
if (arg === undefined)
|
|
272
|
+
break;
|
|
267
273
|
if (arg === "--dag") {
|
|
268
274
|
dagPath = args[++i];
|
|
269
275
|
}
|
|
@@ -398,6 +404,8 @@ export function parseDagReportArgs(args) {
|
|
|
398
404
|
let action;
|
|
399
405
|
for (let i = 0; i < args.length; i += 1) {
|
|
400
406
|
const arg = args[i];
|
|
407
|
+
if (arg === undefined)
|
|
408
|
+
break;
|
|
401
409
|
if (arg === "--run-id") {
|
|
402
410
|
runId = args[++i];
|
|
403
411
|
continue;
|
|
@@ -271,6 +271,17 @@ function nextMutationAction(actions) {
|
|
|
271
271
|
}
|
|
272
272
|
return actions[0] ?? null;
|
|
273
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* True when a create-task step lost a create race: `createTask` refuses an id
|
|
276
|
+
* that another writer created between our lifecycle snapshot and the create
|
|
277
|
+
* call. That is not a failure of intent (the id exists), so the advance
|
|
278
|
+
* re-observes instead of aborting — Console issues `newTask` and `importPrd`
|
|
279
|
+
* back to back and used to lose the whole intake when newTask landed first.
|
|
280
|
+
*/
|
|
281
|
+
export function isConcurrentTaskCreateError(taskId, error) {
|
|
282
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
283
|
+
return message.startsWith(`task already exists: ${taskId}`);
|
|
284
|
+
}
|
|
274
285
|
export async function advanceTaskLifecycle(input) {
|
|
275
286
|
const completed = [];
|
|
276
287
|
const blockers = [];
|
|
@@ -507,13 +518,24 @@ export async function advanceTaskLifecycle(input) {
|
|
|
507
518
|
}
|
|
508
519
|
if (action.type === "create-task") {
|
|
509
520
|
if (!snapshot.exists) {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
521
|
+
try {
|
|
522
|
+
await createTask(input.repoRoot, input.taskId, input.title, {
|
|
523
|
+
taskKind: input.taskKind,
|
|
524
|
+
taskKindExplicit: input.taskKindExplicit,
|
|
525
|
+
});
|
|
526
|
+
record = appendTransition(record, "task-created");
|
|
527
|
+
completed.push("task-created");
|
|
528
|
+
await saveLifecycleRecord(input.repoRoot, record);
|
|
529
|
+
}
|
|
530
|
+
catch (error) {
|
|
531
|
+
// Lost create race: a concurrent writer (Console `newTask`
|
|
532
|
+
// issued alongside `importPrd`) created the same id between
|
|
533
|
+
// our snapshot and this call. The intent — this id exists and
|
|
534
|
+
// carries this PRD — is already satisfied, so fall through to
|
|
535
|
+
// the re-observe below instead of failing the advance.
|
|
536
|
+
if (!isConcurrentTaskCreateError(input.taskId, error))
|
|
537
|
+
throw error;
|
|
538
|
+
}
|
|
517
539
|
}
|
|
518
540
|
snapshot = await observeTaskLifecycle(input.repoRoot, input.taskId);
|
|
519
541
|
continue;
|
|
@@ -663,6 +685,9 @@ export async function advanceTaskLifecycle(input) {
|
|
|
663
685
|
allowedPaths: effectiveInput.allowedPaths,
|
|
664
686
|
forbiddenPaths: input.forbiddenPaths,
|
|
665
687
|
verifyCommands: effectiveInput.verifyCommands,
|
|
688
|
+
requirementOwnership: effectiveInput.requirementOwnership,
|
|
689
|
+
capabilityBoundary: effectiveInput.capabilityBoundary,
|
|
690
|
+
interactionIds: effectiveInput.interactionIds,
|
|
666
691
|
backendTest: input.backendTest,
|
|
667
692
|
},
|
|
668
693
|
...(sourceFidelity ? { sourceFidelity } : {}),
|
|
@@ -720,6 +745,9 @@ export async function advanceTaskLifecycle(input) {
|
|
|
720
745
|
allowedPaths: effectiveInput.allowedPaths,
|
|
721
746
|
forbiddenPaths: input.forbiddenPaths,
|
|
722
747
|
verifyCommands: effectiveInput.verifyCommands,
|
|
748
|
+
requirementOwnership: effectiveInput.requirementOwnership,
|
|
749
|
+
capabilityBoundary: effectiveInput.capabilityBoundary,
|
|
750
|
+
interactionIds: effectiveInput.interactionIds,
|
|
723
751
|
backendTest: input.backendTest,
|
|
724
752
|
},
|
|
725
753
|
});
|
|
@@ -741,6 +769,9 @@ export async function advanceTaskLifecycle(input) {
|
|
|
741
769
|
allowedPaths: effectiveInput.allowedPaths,
|
|
742
770
|
forbiddenPaths: input.forbiddenPaths,
|
|
743
771
|
verifyCommands: effectiveInput.verifyCommands,
|
|
772
|
+
requirementOwnership: effectiveInput.requirementOwnership,
|
|
773
|
+
capabilityBoundary: effectiveInput.capabilityBoundary,
|
|
774
|
+
interactionIds: effectiveInput.interactionIds,
|
|
744
775
|
backendTest: input.backendTest,
|
|
745
776
|
},
|
|
746
777
|
...(sourceFidelity ? { sourceFidelity } : {}),
|
package/dist/build-stamp.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "0.43.0
|
|
4
|
-
"gitSha": "
|
|
5
|
-
"builtAt": "2026-09-
|
|
3
|
+
"version": "0.43.0",
|
|
4
|
+
"gitSha": "0765d0a560eacc5719265999838fc71826f233a0",
|
|
5
|
+
"builtAt": "2026-09-14T01:41:52.345Z"
|
|
6
6
|
}
|
|
@@ -67,6 +67,8 @@ export function formatSubcommandUsageError(name, subcommands) {
|
|
|
67
67
|
export function parseSummaryFlag(tokens) {
|
|
68
68
|
for (let i = 0; i < tokens.length; i += 1) {
|
|
69
69
|
const token = tokens[i];
|
|
70
|
+
if (token === undefined)
|
|
71
|
+
continue;
|
|
70
72
|
if (token === "--summary") {
|
|
71
73
|
return tokens[i + 1];
|
|
72
74
|
}
|
package/dist/cli/program.js
CHANGED
|
@@ -96,7 +96,7 @@ function commandChain(command) {
|
|
|
96
96
|
async function dispatchRegisteredCommand(commandObject, defaultRepoRoot, rawArgs) {
|
|
97
97
|
const chain = commandChain(commandObject);
|
|
98
98
|
const command = chain[0] ?? "";
|
|
99
|
-
const [subcommand, ...rest] = chain.length <= 1 ? rawArgs : [chain[1], ...chain.slice(2), ...rawArgs];
|
|
99
|
+
const [subcommand, ...rest] = chain.length <= 1 ? rawArgs : [chain[1] ?? "", ...chain.slice(2), ...rawArgs];
|
|
100
100
|
const options = collectGlobalOptions(commandObject);
|
|
101
101
|
const quiet = (command === "doctor" &&
|
|
102
102
|
[...rest, ...rawArgs].some((token) => token === "--json")) ||
|
|
@@ -397,6 +397,8 @@ function compactArgs(args) {
|
|
|
397
397
|
function parsePlanSummaryFlag(tokens) {
|
|
398
398
|
for (let i = 0; i < tokens.length; i += 1) {
|
|
399
399
|
const token = tokens[i];
|
|
400
|
+
if (token === undefined)
|
|
401
|
+
continue;
|
|
400
402
|
if (token === "--summary") {
|
|
401
403
|
return tokens[i + 1];
|
|
402
404
|
}
|
|
@@ -136,6 +136,8 @@ export function resolveInitSurfaceRepoRoot(argv, defaultRepoRoot) {
|
|
|
136
136
|
let selected = defaultRepoRoot;
|
|
137
137
|
for (let index = 0; index < argv.length; index += 1) {
|
|
138
138
|
const arg = argv[index];
|
|
139
|
+
if (arg === undefined)
|
|
140
|
+
break;
|
|
139
141
|
if (arg === "--repo-root") {
|
|
140
142
|
const value = argv[index + 1];
|
|
141
143
|
if (value && !value.startsWith("-"))
|
|
@@ -81,6 +81,8 @@ export function evaluateLatestVersion(input) {
|
|
|
81
81
|
function firstCommand(argv) {
|
|
82
82
|
for (let index = 0; index < argv.length; index += 1) {
|
|
83
83
|
const arg = argv[index];
|
|
84
|
+
if (arg === undefined)
|
|
85
|
+
break;
|
|
84
86
|
if (GLOBAL_VALUE_FLAGS.has(arg)) {
|
|
85
87
|
index += 1;
|
|
86
88
|
continue;
|
|
@@ -18,6 +18,7 @@ export const BACKOFF_MS = [2000, 4000, 8000, 16000, 30000];
|
|
|
18
18
|
export const MAX_SESSION_RETRIES = 5;
|
|
19
19
|
/** Hard cap for OpenCode overflow compact+resume recoveries (≤ 2). */
|
|
20
20
|
export const MAX_OVERFLOW_RECOVERIES = 1;
|
|
21
|
+
import { buildGeneratedTransientProviderClassifierSource, classifyTransientProviderError, } from "../shared/pi-provider-recovery.js";
|
|
21
22
|
import { PI_RECOMMENDED_COMPACTION, PI_RECOMMENDED_RETRY, } from "../shared/pi-retry-settings.js";
|
|
22
23
|
import { CONTEXT_OVERFLOW_PHRASES, buildGeneratedOverflowClassifierSource, isContextOverflow as classifySharedOverflow, } from "../shared/pi-context-pressure/overflow.js";
|
|
23
24
|
export { PI_RECOMMENDED_COMPACTION, PI_RECOMMENDED_RETRY };
|
|
@@ -51,17 +52,6 @@ const PERMANENT_MESSAGE_PATTERNS = [
|
|
|
51
52
|
pattern: /\b(business validation|invalid task|schema validation)\b/i,
|
|
52
53
|
},
|
|
53
54
|
];
|
|
54
|
-
const TRANSIENT_MESSAGE_PATTERNS = [
|
|
55
|
-
/\bcode[:\s]*502\b/i,
|
|
56
|
-
/\b502\b/,
|
|
57
|
-
/\bLLMRequestError\b/i,
|
|
58
|
-
/\bnetwork fluctuation\b/i,
|
|
59
|
-
/\btimeout\b/i,
|
|
60
|
-
/\btransient provider failure\b/i,
|
|
61
|
-
/\bnon-standard (payload|response)\b/i,
|
|
62
|
-
/\bupstream returned\b/i,
|
|
63
|
-
/\bmodel processing timeout\b/i,
|
|
64
|
-
];
|
|
65
55
|
export function isClientRecoveryMode(value) {
|
|
66
56
|
return (typeof value === "string" &&
|
|
67
57
|
CLIENT_RECOVERY_MODES.includes(value));
|
|
@@ -172,30 +162,16 @@ export function isContextOverflow(error) {
|
|
|
172
162
|
return classifySharedOverflow(error);
|
|
173
163
|
}
|
|
174
164
|
function looksTransient(error) {
|
|
175
|
-
|
|
176
|
-
if (TRANSIENT_MESSAGE_PATTERNS.some((pattern) => pattern.test(text)))
|
|
177
|
-
return true;
|
|
178
|
-
if (error && typeof error === "object") {
|
|
179
|
-
const record = error;
|
|
180
|
-
if (record.code === 502 || record.status === 502)
|
|
181
|
-
return true;
|
|
182
|
-
if (record.data && typeof record.data === "object") {
|
|
183
|
-
const data = record.data;
|
|
184
|
-
if (data.code === 502 || data.status === 502)
|
|
185
|
-
return true;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
return false;
|
|
165
|
+
return classifyTransientProviderError(error).retryable;
|
|
189
166
|
}
|
|
190
167
|
/**
|
|
191
168
|
* Decide whether an OpenCode error should be resumed by the project plugin.
|
|
192
|
-
*
|
|
169
|
+
* Compensates wrapped UnknownError / TypeValidation failures and known stripped
|
|
170
|
+
* internal-provider fluctuation messages that built-in APIError retry misses.
|
|
193
171
|
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
* signal (502 / LLMRequestError / timeout / etc.). A pure schema mismatch
|
|
198
|
-
* without a transient signal is still rejected (resumable: false).
|
|
172
|
+
* The historical success reason remains `transient-unknown-error` for report
|
|
173
|
+
* compatibility. A pure schema mismatch without a transient signal is still
|
|
174
|
+
* rejected (resumable: false).
|
|
199
175
|
*/
|
|
200
176
|
export function classifyTransientUnknownError(error) {
|
|
201
177
|
const permanent = permanentReason(error);
|
|
@@ -208,6 +184,9 @@ export function classifyTransientUnknownError(error) {
|
|
|
208
184
|
}
|
|
209
185
|
const isUnknownShape = hasUnknownErrorShape(error);
|
|
210
186
|
const isTypeValidationShape = hasTypeValidationShape(error);
|
|
187
|
+
if (looksTransient(error)) {
|
|
188
|
+
return { resumable: true, reason: "transient-unknown-error" };
|
|
189
|
+
}
|
|
211
190
|
if (!isUnknownShape && !isTypeValidationShape) {
|
|
212
191
|
return {
|
|
213
192
|
resumable: false,
|
|
@@ -215,14 +194,11 @@ export function classifyTransientUnknownError(error) {
|
|
|
215
194
|
interaction: PERMANENT_ERROR_INTERACTION,
|
|
216
195
|
};
|
|
217
196
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
return { resumable: true, reason: "transient-unknown-error" };
|
|
197
|
+
return {
|
|
198
|
+
resumable: false,
|
|
199
|
+
reason: "unknown-non-transient",
|
|
200
|
+
interaction: PERMANENT_ERROR_INTERACTION,
|
|
201
|
+
};
|
|
226
202
|
}
|
|
227
203
|
export function nextBackoffMs(attempt) {
|
|
228
204
|
if (!Number.isInteger(attempt) ||
|
|
@@ -478,8 +454,9 @@ export function buildOpenCodeTransientRetryPluginSource() {
|
|
|
478
454
|
* loop-agent OpenCode transient recovery plugin
|
|
479
455
|
* Path: ${OPENCODE_TRANSIENT_RETRY_PLUGIN_PATH}
|
|
480
456
|
*
|
|
481
|
-
* Compensates
|
|
482
|
-
*
|
|
457
|
+
* Compensates wrapped UnknownError / TypeValidation failures and known
|
|
458
|
+
* stripped internal-provider fluctuation messages that OpenCode built-in
|
|
459
|
+
* APIError retry does not cover. Never runs concurrently with session.status === "retry".
|
|
483
460
|
* Permanent failures use interaction "${PERMANENT_ERROR_INTERACTION}".
|
|
484
461
|
* User aborts (MessageAbortedError / cancel words) are silently cleared.
|
|
485
462
|
* Best-effort file log: ${OPENCODE_TRANSIENT_RETRY_LOG_PATH}.
|
|
@@ -502,7 +479,7 @@ const LOG_PATH = (() => {
|
|
|
502
479
|
const PERMANENT_INTERACTION = ${JSON.stringify(PERMANENT_ERROR_INTERACTION)};
|
|
503
480
|
const BACKOFF_MS = ${JSON.stringify([...BACKOFF_MS])};
|
|
504
481
|
const MAX_RETRIES = ${MAX_SESSION_RETRIES};
|
|
505
|
-
${
|
|
482
|
+
${buildGeneratedTransientProviderClassifierSource()}
|
|
506
483
|
void logToFile("load ok");
|
|
507
484
|
|
|
508
485
|
const sessionState = new Map();
|
|
@@ -563,19 +540,7 @@ function isPermanent(error) {
|
|
|
563
540
|
|
|
564
541
|
function isTransientUnknown(error) {
|
|
565
542
|
if (isPermanent(error)) return false;
|
|
566
|
-
|
|
567
|
-
const hasUnknown = /UnknownError/i.test(text) || (error && /UnknownError/i.test(String(error.name || "")));
|
|
568
|
-
const hasTypeValidation =
|
|
569
|
-
/\\bTypeValidationError\\b/i.test(text) ||
|
|
570
|
-
/Type validation failed/i.test(text) ||
|
|
571
|
-
(error && /TypeValidationError/i.test(String(error.name || "")));
|
|
572
|
-
if (!hasUnknown && !hasTypeValidation) return false;
|
|
573
|
-
return (
|
|
574
|
-
/\\b(code[:\\s]*502|502|LLMRequestError|network fluctuation|timeout|transient provider failure|non-standard)\\b/i.test(
|
|
575
|
-
text,
|
|
576
|
-
) ||
|
|
577
|
-
(error && (error.code === 502 || error.status === 502))
|
|
578
|
-
);
|
|
543
|
+
return isKnownTransientProviderError(error);
|
|
579
544
|
}
|
|
580
545
|
|
|
581
546
|
function buildResumePrompt(sessionId, error, attempt) {
|
|
@@ -10,6 +10,8 @@ export function parseDagFinalVerificationArgs(args) {
|
|
|
10
10
|
let closeoutPath;
|
|
11
11
|
for (let i = 0; i < args.length; i += 1) {
|
|
12
12
|
const arg = args[i];
|
|
13
|
+
if (arg === undefined)
|
|
14
|
+
break;
|
|
13
15
|
if (arg === '--output' || arg === '-o') {
|
|
14
16
|
outputPath = requiredValue(args[++i], '--output');
|
|
15
17
|
}
|
|
@@ -9,6 +9,8 @@ export function parseDagInitHybridArgs(args) {
|
|
|
9
9
|
let outputPath;
|
|
10
10
|
for (let i = 0; i < args.length; i += 1) {
|
|
11
11
|
const arg = args[i];
|
|
12
|
+
if (arg === undefined)
|
|
13
|
+
break;
|
|
12
14
|
if (arg === "--output" || arg === "-o") {
|
|
13
15
|
outputPath = args[++i];
|
|
14
16
|
if (!outputPath) {
|
|
@@ -29,6 +29,8 @@ export function parseDagCloseoutDraftArgs(args) {
|
|
|
29
29
|
let outputPath;
|
|
30
30
|
for (let i = 0; i < args.length; i += 1) {
|
|
31
31
|
const arg = args[i];
|
|
32
|
+
if (arg === undefined)
|
|
33
|
+
break;
|
|
32
34
|
const requireValue = (flag) => {
|
|
33
35
|
const value = args[++i];
|
|
34
36
|
if (!value || value.startsWith("-")) {
|
|
@@ -22,6 +22,8 @@ export function parseDagRerunArgs(args) {
|
|
|
22
22
|
const promptOverrideAppendSpecs = [];
|
|
23
23
|
for (let index = 0; index < args.length; index += 1) {
|
|
24
24
|
const arg = args[index];
|
|
25
|
+
if (arg === undefined)
|
|
26
|
+
break;
|
|
25
27
|
if (arg === "--run-id")
|
|
26
28
|
parentRunId = args[++index];
|
|
27
29
|
else if (arg.startsWith("--run-id="))
|
|
@@ -12,6 +12,8 @@ export function parseDagWorkflowCompileArgs(args) {
|
|
|
12
12
|
let manifestPath;
|
|
13
13
|
for (let i = 0; i < args.length; i += 1) {
|
|
14
14
|
const arg = args[i];
|
|
15
|
+
if (arg === undefined)
|
|
16
|
+
break;
|
|
15
17
|
if (arg === "--workflow") {
|
|
16
18
|
workflowPath = args[++i];
|
|
17
19
|
if (!workflowPath) {
|
|
@@ -11,6 +11,8 @@ export function parseDagWorkflowValidateArgs(args) {
|
|
|
11
11
|
let strictGovernance = false;
|
|
12
12
|
for (let i = 0; i < args.length; i += 1) {
|
|
13
13
|
const arg = args[i];
|
|
14
|
+
if (arg === undefined)
|
|
15
|
+
break;
|
|
14
16
|
if (arg === "--workflow") {
|
|
15
17
|
workflowPath = args[++i];
|
|
16
18
|
if (!workflowPath) {
|
|
@@ -5,6 +5,8 @@ export function parseImportPrdArgs(args) {
|
|
|
5
5
|
const positional = [];
|
|
6
6
|
for (let index = 0; index < args.length; index += 1) {
|
|
7
7
|
const token = args[index];
|
|
8
|
+
if (token === undefined)
|
|
9
|
+
continue;
|
|
8
10
|
if (token === "--file" || token === "-f") {
|
|
9
11
|
options.file = args[index + 1];
|
|
10
12
|
index += 1;
|
|
@@ -252,6 +252,8 @@ export function parseOpenCodeModelReferences(value, credentialProviders = new Se
|
|
|
252
252
|
if (!match)
|
|
253
253
|
continue;
|
|
254
254
|
const [, provider, modelId] = match;
|
|
255
|
+
if (provider === undefined || modelId === undefined)
|
|
256
|
+
continue;
|
|
255
257
|
const model = createCatalogEntry({
|
|
256
258
|
source: "opencode",
|
|
257
259
|
provider,
|
package/dist/commands/init.js
CHANGED
|
@@ -861,19 +861,23 @@ function mergeGitignoreManagedBlock(existing, block) {
|
|
|
861
861
|
return `${existing.trimEnd()}\n\n${block}\n`;
|
|
862
862
|
}
|
|
863
863
|
/**
|
|
864
|
-
* Shared ignore rules for loop-agent
|
|
865
|
-
* local
|
|
866
|
-
*
|
|
867
|
-
*
|
|
864
|
+
* Shared ignore rules for loop-agent init surface: everything init regenerates
|
|
865
|
+
* in the target project is local and rebuildable, so none of it is
|
|
866
|
+
* team-shareable by default. `AGENTS.md` and `README.md` stay on the shared
|
|
867
|
+
* commit surface (they carry the governance handoff and are not ignored);
|
|
868
|
+
* `.opencode/` and `.pi/` project adapters are left to the user's discretion.
|
|
868
869
|
*/
|
|
869
|
-
export function buildManagedGitignoreBlock() {
|
|
870
|
+
export function buildManagedGitignoreBlock(governanceRoot = DEFAULT_GOVERNANCE_ROOT) {
|
|
870
871
|
return [
|
|
871
872
|
GITIGNORE_BLOCK_START,
|
|
872
|
-
"# loop-agent
|
|
873
|
+
"# loop-agent init surface: rebuildable outputs; AGENTS.md and README.md stay shared",
|
|
873
874
|
".harness/",
|
|
874
875
|
".agents/",
|
|
875
876
|
".task-pool/",
|
|
876
877
|
".worktrees/",
|
|
878
|
+
`${governanceRoot}/`,
|
|
879
|
+
"scripts/",
|
|
880
|
+
"harness.json",
|
|
877
881
|
GITIGNORE_BLOCK_END,
|
|
878
882
|
].join("\n");
|
|
879
883
|
}
|
|
@@ -1312,7 +1316,7 @@ async function buildDesiredSurfaceContent(input) {
|
|
|
1312
1316
|
};
|
|
1313
1317
|
}
|
|
1314
1318
|
if (manifestPath === ".gitignore") {
|
|
1315
|
-
return { content: buildManagedGitignoreBlock() };
|
|
1319
|
+
return { content: buildManagedGitignoreBlock(input.governanceRoot) };
|
|
1316
1320
|
}
|
|
1317
1321
|
if (manifestPath === "harness.json") {
|
|
1318
1322
|
const template = await readJsonIfExists(path.join(input.assetRoot, "harness.json"));
|
|
@@ -2554,7 +2558,7 @@ export function buildInitInstructions(input) {
|
|
|
2554
2558
|
"- Enrich the root `README.md`: keep the deterministic project title and the loop-agent managed block intact, and fill the human-authored sections (项目概览, 技术栈与目录结构, 开发与验证) from the target project's actual files. The root README must serve both as a human-first project entry and as an agent work entry; replace the initialization-model supplement comments when the project files provide the information.",
|
|
2555
2559
|
`- Populate \`${governanceRoot}/verification-matrix.md\` with the target project's actual quick, standard, and full verification commands derived from its real language and toolchain, keeping the governance rows intact.`,
|
|
2556
2560
|
"- Project repo-local skills live in `.agents/skills/`. Do not create a root `skills/` directory in the target project; the package's bundled `skills/` remains the built-in fallback.",
|
|
2557
|
-
"- Merge a loop-agent managed block into `.gitignore` that ignores
|
|
2561
|
+
"- Merge a loop-agent managed block into `.gitignore` that ignores the full rebuildable init surface (`.harness/`, `.agents/`, `.task-pool/`, `.worktrees/`, `ai_workspace/loop-agent/`, `scripts/`, `harness.json`); keep `AGENTS.md` and `README.md` on the shared commit surface and keep all user rules outside the block untouched.",
|
|
2558
2562
|
"- Do not copy examples by default; examples stay bundled in the tool and are available through `loop-agent examples`.",
|
|
2559
2563
|
"- Add or update a loop-agent managed block in AGENTS.md.",
|
|
2560
2564
|
"- The generated AGENTS.md must include documentation convergence and structured DAG write-boundary rules so target projects keep the same working discipline as this repository.",
|
|
@@ -2676,7 +2680,7 @@ export async function initializeLoopAgentProject(options) {
|
|
|
2676
2680
|
await writeText({
|
|
2677
2681
|
repoRoot,
|
|
2678
2682
|
relativePath: ".gitignore",
|
|
2679
|
-
content: mergeGitignoreManagedBlock(existingGitignore, buildManagedGitignoreBlock()),
|
|
2683
|
+
content: mergeGitignoreManagedBlock(existingGitignore, buildManagedGitignoreBlock(governanceRoot)),
|
|
2680
2684
|
merge: true,
|
|
2681
2685
|
written,
|
|
2682
2686
|
skipped,
|
|
@@ -2842,7 +2846,7 @@ function modelMergeTaskFor(pathName, state, allPaths, recordedState) {
|
|
|
2842
2846
|
taskId: `init-merge-${sha256Text(pathName).slice(0, 12)}`,
|
|
2843
2847
|
path: pathName,
|
|
2844
2848
|
reason: "target file exists but does not match the current loop-agent initialization surface",
|
|
2845
|
-
sourcePath: state
|
|
2849
|
+
sourcePath: state?.sourcePath,
|
|
2846
2850
|
allowedPaths: [pathName],
|
|
2847
2851
|
forbiddenPaths: [
|
|
2848
2852
|
...allPaths.filter((candidate) => candidate !== pathName),
|
|
@@ -2861,9 +2865,9 @@ function modelMergeTaskFor(pathName, state, allPaths, recordedState) {
|
|
|
2861
2865
|
],
|
|
2862
2866
|
evidence: {
|
|
2863
2867
|
baseSha256: recordedState?.files[pathName]?.currentSha256,
|
|
2864
|
-
currentSha256: state
|
|
2865
|
-
desiredSha256: state
|
|
2866
|
-
sourceAnchorSha256: state
|
|
2868
|
+
currentSha256: state?.currentSha256,
|
|
2869
|
+
desiredSha256: state?.sourceSha256,
|
|
2870
|
+
sourceAnchorSha256: state?.sourceAnchorSha256,
|
|
2867
2871
|
},
|
|
2868
2872
|
};
|
|
2869
2873
|
}
|
|
@@ -3743,6 +3747,8 @@ function parseInitArgs(repoRoot, args) {
|
|
|
3743
3747
|
let versionChoice;
|
|
3744
3748
|
for (let i = 0; i < args.length; i += 1) {
|
|
3745
3749
|
const arg = args[i];
|
|
3750
|
+
if (arg === undefined)
|
|
3751
|
+
break;
|
|
3746
3752
|
if ((arg === "instructions" ||
|
|
3747
3753
|
arg === "doctor" ||
|
|
3748
3754
|
arg === "model-catalog" ||
|