@tea-agent/loop-agent 0.41.1-beta.0 → 0.41.2
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 +61 -267
- package/dist/application/dag/generate-task-dag.js +19 -75
- package/dist/application/task-lifecycle/advance.js +5 -24
- package/dist/application/task-lifecycle/observe.js +17 -171
- package/dist/application/task-lifecycle/plan-transitions.js +7 -42
- package/dist/application/task-lifecycle/recommendations.js +2 -13
- package/dist/build-stamp.json +3 -3
- package/dist/cli/command-definitions.js +0 -7
- package/dist/cli/program.js +0 -5
- package/dist/commands/client-recovery.js +0 -3
- package/dist/commands/init.js +1 -27
- package/dist/commands/task-advance.js +0 -19
- package/dist/executors/dag-pi-executor.js +231 -3784
- package/dist/executors/pi-executor.js +4 -15
- package/dist/executors/pi-extension-resolver.js +14 -2
- package/dist/executors/shell-executor.js +217 -945
- package/dist/executors/shell-write-guard.js +0 -7
- package/dist/shared/dag-failure-category.js +0 -12
- package/dist/shared/openspec-spec.js +4 -70
- package/dist/shared/operator/capabilities.js +0 -7
- package/dist/task/config-types.js +7 -34
- package/dist/task/contract/adopt.js +0 -4
- package/dist/task/contract/import-revision.js +0 -4
- package/dist/task/contract/project.js +0 -3
- package/dist/task/contract/schema.js +1 -2
- package/dist/task/frontend-project-capability.js +20 -203
- package/dist/task/runtime.js +2 -5
- package/dist/task/source-prepare/build-draft.js +3 -3
- package/dist/task/source-prepare/fragment-inventory.js +9 -15
- package/dist/task/source-prepare/prepare.js +1 -89
- package/dist/task/source-prepare/semantic-intake.js +2 -6
- package/dist/task/source-references.js +1 -22
- package/dist/worker/console/chat/chat-ui-policy.js +4 -2
- package/dist/worker/console/chat/pi-runtime.js +235 -13
- package/dist/worker/console/chat/repo-browser.js +10 -3
- package/dist/worker/console/chat/routes.js +86 -44
- package/dist/worker/console/chat/semantic-activity.js +12 -11
- package/dist/worker/console/chat/session-stats.js +96 -0
- package/dist/worker/console/chat/session-store.js +133 -70
- package/dist/worker/console/chat/shortcuts.js +1 -1
- package/dist/worker/console/chat/turn-process.js +139 -60
- package/dist/worker/console/index.js +0 -3
- package/dist/worker/console/operation-store.js +6 -226
- package/dist/worker/console/operator-actions.js +7 -169
- package/dist/worker/console/pi-plugins.js +3 -1
- package/dist/worker/console/server.js +19 -4
- package/dist/worker/console/static/assets/{abnfDiagram-N423BO3Z-Bho4we4c.js → abnfDiagram-N423BO3Z-DQ5jlYVU.js} +1 -1
- package/dist/worker/console/static/assets/{arc-TBDkTeK0.js → arc-BeTVCzH9.js} +1 -1
- package/dist/worker/console/static/assets/{architectureDiagram-T3A2C74G-BF_fZrn2.js → architectureDiagram-T3A2C74G-DassREBi.js} +1 -1
- package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-CCnPgUe2.js → blockDiagram-VBNYF7ZC-DyeNX8Ek.js} +1 -1
- package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-BCYZJLAT.js → c4Diagram-5PPSVZJV-BXb_zxGx.js} +1 -1
- package/dist/worker/console/static/assets/channel-B_lofstT.js +1 -0
- package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-D8K6adhU.js → chunk-2GRJ4B5K-B9F9gxGC.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-DkT1Q78b.js → chunk-2Q5K7J3B-Byd5zHEQ.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5RXB4S5H-DuhvpIr7.js → chunk-5RXB4S5H-BqoxMJk9.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5VM5RSS4-BnK6dC49.js → chunk-5VM5RSS4-CT7d6YZw.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-DPz__z7r.js → chunk-6Q2QTUOP-CdiNyN0N.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-GF5L2VYU-0kkppM2j.js → chunk-GF5L2VYU-BGw9bpVc.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-JWPE2WC7-BB41iK5t.js → chunk-JWPE2WC7-DiDVlVB1.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-KBJHAD2P-CiVrxKHU.js → chunk-KBJHAD2P-BhHf-4yK.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-RYQCIY6F-C2h9Xje1.js → chunk-RYQCIY6F-B79pEgwv.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-XXDRQBXY-3iOSHdbM.js → chunk-XXDRQBXY-Cb70EcUV.js} +1 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-ieUI0-eY.js +1 -0
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-ieUI0-eY.js +1 -0
- package/dist/worker/console/static/assets/{cose-bilkent-JH36ORCC-BN3A7tkk.js → cose-bilkent-JH36ORCC-DBHLnAf1.js} +1 -1
- package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-CTuBy0Or.js → cynefin-VYW2F7L2-BT_JRsOH.js} +1 -1
- package/dist/worker/console/static/assets/{cynefinDiagram-MW4NZA55-wb6tUlMN.js → cynefinDiagram-MW4NZA55-Bss-msa3.js} +1 -1
- package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-GP1Ivx8B.js → dagre-VZM6K2ZE-B8Gr24pt.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-7IWD3JNH-ejrcK6L0.js → diagram-7IWD3JNH-BrjU70Jw.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-YFkCCvUU.js → diagram-B4RE2ZJO-Cp_JpPGd.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-LBJQPF4R-B4rrvIaL.js → diagram-LBJQPF4R-BWKICEP-.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-Q27KOJAE-C-YIZcUf.js → diagram-Q27KOJAE-D3z_UNR_.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-UB23O5K3-BPF5wcL1.js → diagram-UB23O5K3-_Ywm390x.js} +1 -1
- package/dist/worker/console/static/assets/{ebnfDiagram-BXEA7PRR-CU5SzXjO.js → ebnfDiagram-BXEA7PRR-D9QYQQMB.js} +1 -1
- package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-CpL414DE.js → erDiagram-JOGREHBK-BNgXNKAr.js} +1 -1
- package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-MrhLzNau.js → flowDiagram-UKHOOZJN-QRLnkPCg.js} +1 -1
- package/dist/worker/console/static/assets/{ganttDiagram-PKOTCBZU-Bg4qFuUo.js → ganttDiagram-PKOTCBZU-B9fOduNi.js} +1 -1
- package/dist/worker/console/static/assets/{gitGraphDiagram-DS77QQ5N-ColxSXLR.js → gitGraphDiagram-DS77QQ5N-FSEdtPN2.js} +1 -1
- package/dist/worker/console/static/assets/index-Cs9JUSPs.css +1 -0
- package/dist/worker/console/static/assets/index-DtPrwu7M.js +451 -0
- package/dist/worker/console/static/assets/{infoDiagram-6WML65LV-Czvtm6gc.js → infoDiagram-6WML65LV-D5Bjg9dm.js} +1 -1
- package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-B7Xp8HyJ.js → ishikawaDiagram-WSZJBQD7-BlNRkWvf.js} +1 -1
- package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-DWYZcvph.js → journeyDiagram-NVQOT4AX-BdJiw3SL.js} +1 -1
- package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-KTLZRUjx.js → kanban-definition-27J2QSJJ-CsDNlYht.js} +1 -1
- package/dist/worker/console/static/assets/{linear-_Exn7bfl.js → linear-8g9dbEmX.js} +1 -1
- package/dist/worker/console/static/assets/{mermaid.core-Cxg8kX8V.js → mermaid.core-ChyQH_ut.js} +5 -5
- package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-oKrlo2Bt.js → mindmap-definition-FAOFIHXS-DwYoCTYt.js} +1 -1
- package/dist/worker/console/static/assets/{pegDiagram-VL7TDLO6-XAeteiNd.js → pegDiagram-VL7TDLO6-T_b2rS17.js} +1 -1
- package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-BTf1K-lp.js → pieDiagram-7S7Q4E2Y-1Cr7WMhH.js} +1 -1
- package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-C0IlY0Jf.js → quadrantDiagram-CIZ2JOQS-Bq4qM59o.js} +1 -1
- package/dist/worker/console/static/assets/{railroadDiagram-AXF67PYL-BVbKtZhW.js → railroadDiagram-AXF67PYL-ytFgR1RL.js} +1 -1
- package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-C5e4JFcr.js → requirementDiagram-LRYGKXZP-CnUdUVYX.js} +1 -1
- package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-Cz30hc29.js → sankeyDiagram-W5VNT64P-_5rJqG6R.js} +1 -1
- package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-DS33n6d0.js → sequenceDiagram-SI44F4Z6-D5imyGbt.js} +1 -1
- package/dist/worker/console/static/assets/{sizeCapture-X5ZJPWSS-46w7v-9T.js → sizeCapture-X5ZJPWSS-DvgDn3wL.js} +1 -1
- package/dist/worker/console/static/assets/{stateDiagram-OKZ733FA-pbcD5SsZ.js → stateDiagram-OKZ733FA-BViu7duc.js} +1 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-kNxnG4_w.js +1 -0
- package/dist/worker/console/static/assets/{swimlanes-SLNWSIFB-DuivYBSj.js → swimlanes-SLNWSIFB-BcULKg2P.js} +2 -2
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-DyTzlcWH.js +8 -0
- package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-Cb9VZVIl.js → timeline-definition-Z64GVDOM-DmPveIjt.js} +1 -1
- package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-D2-mfOgR.js → vennDiagram-T6HMQDX7-9r-iFy0R.js} +1 -1
- package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-DeS2aC76.js → wardleyDiagram-T6FBY63Y-D3fIXdvM.js} +1 -1
- package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-WGsrFjxH.js → xychartDiagram-ELKLHX3M-BCSS9SBg.js} +1 -1
- package/dist/worker/console/static/index.html +2 -2
- package/dist/worker/console/static-src/app/useRunProgress.js +9 -2
- package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +19 -8
- package/dist/worker/console/static-src/operator-chat/dag-progress-link.js +22 -0
- package/dist/worker/console/static-src/operator-chat/open-preview-in-browser.js +15 -7
- package/dist/worker/console/static-src/operator-chat/useChatSessions.js +2 -0
- package/dist/worker/console/static-src/operator-chat/useChatThread.js +6 -0
- package/dist/worker/console/static-src/operator-chat/useRuntimeControls.js +28 -3
- package/dist/worker/console/static-src/pages/tasks/run-panel-progress.js +106 -0
- package/dist/worker/console/static-src/shell/workspace-route.js +4 -0
- package/dist/worker/console/workspace-context.js +1 -111
- package/dist/worker/observability/read-model.js +4 -0
- package/dist/worker/observe/routes.js +4 -0
- package/dist/worker/observe/static/dag-node-purpose.js +0 -5
- package/dist/worker/observe/static/views/dag-inspector.js +2 -7
- package/dist/worker/observe/static/views/session-timeline.js +46 -15
- package/dist/workflows/dag/backend-test-result-contract.js +1 -1
- package/dist/workflows/dag/contract-validator-registrations.js +2 -1
- package/dist/workflows/dag/frontend-implementation-contract.js +162 -932
- package/dist/workflows/dag/frontend-plan-render.js +1 -2
- package/dist/workflows/dag/frontend-prewrite-gate.js +349 -255
- package/dist/workflows/dag/frontend-recovery-plan.js +10 -17
- package/dist/workflows/dag/frontend-recovery-run.js +20 -33
- package/dist/workflows/dag/frontend-repair.js +432 -1
- package/dist/workflows/dag/frontend-review-context.js +15 -261
- package/dist/workflows/dag/frontend-verification-trace.js +24 -249
- package/dist/workflows/dag/frontend-worktree-diff.js +17 -250
- package/dist/workflows/dag/init-hybrid.js +494 -685
- package/dist/workflows/dag/interrupt-request.js +0 -7
- package/dist/workflows/dag/node-execution.js +4 -732
- package/dist/workflows/dag/prompt.js +1 -34
- package/dist/workflows/dag/report.js +1 -37
- package/dist/workflows/dag/rerun-feedback.js +1 -256
- package/dist/workflows/dag/rerun-plan.js +2 -10
- package/dist/workflows/dag/rerun-run.js +0 -23
- package/dist/workflows/dag/rerun-task.js +0 -29
- package/dist/workflows/dag/retry-policy.js +104 -214
- package/dist/workflows/dag/runner.js +122 -429
- package/dist/workflows/dag/scheduler.js +16 -114
- package/dist/workflows/dag/types.js +12 -239
- package/dist/workflows/dag/validate.js +12 -28
- package/docs/init-surface.manifest.json +12 -30
- package/docs/skills/vetted-skill-registry.md +2 -4
- package/docs/templates/README.md +0 -2
- package/docs/templates/agent-dag-report.schema.json +2 -8
- package/docs/templates/agent-dag.schema.json +1 -1
- package/docs/templates/frontend-implementation-contract.schema.json +1 -4
- package/harness.json +3 -3
- package/package.json +1 -1
- package/skills/frontend-bounded-implement/SKILL.md +14 -15
- package/skills/frontend-design-review/SKILL.md +41 -22
- package/skills/frontend-implementation/SKILL.md +52 -0
- package/skills/frontend-implementation/references/code-standards.md +33 -0
- package/skills/frontend-implementation/references/design-spec.md +56 -0
- package/skills/frontend-implementation/references/node-contracts.md +31 -0
- package/skills/frontend-review/SKILL.md +15 -20
- package/skills/frontend-review/references/review-findings.md +7 -6
- package/skills/frontend-verification/SKILL.md +1 -1
- package/skills/loop-agent/references/command-reference.md +0 -1
- package/skills/loop-agent/references/hybrid-dag.md +2 -2
- package/dist/commands/dag-follow-up.js +0 -138
- package/dist/executors/pi-read-budget-policy.js +0 -239
- package/dist/worker/console/frontend-human-decision-adapter.js +0 -19
- package/dist/worker/console/frontend-split-operation-adapter.js +0 -20
- package/dist/worker/console/static/assets/channel-bnXW0U3C.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-rZpq_twR.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-rZpq_twR.js +0 -1
- package/dist/worker/console/static/assets/index-D3CC4eUz.css +0 -1
- package/dist/worker/console/static/assets/index-DLt4ZFvD.js +0 -437
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-zBMYiUyi.js +0 -1
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-d_rms-5i.js +0 -8
- package/dist/worker/console/static-src/active-run-badge.js +0 -17
- package/dist/worker/materialize/frontend-split-task-materializer.js +0 -72
- package/dist/workflows/dag/dag-retry-schema.js +0 -138
- package/dist/workflows/dag/frontend-closeout.js +0 -221
- package/dist/workflows/dag/frontend-design-policy.js +0 -400
- package/dist/workflows/dag/frontend-human-decision.js +0 -182
- package/dist/workflows/dag/frontend-provider-capability-matrix.js +0 -159
- package/dist/workflows/dag/frontend-read-budgets.js +0 -12
- package/dist/workflows/dag/frontend-recovery-capsule.js +0 -455
- package/dist/workflows/dag/frontend-recovery-controller.js +0 -202
- package/dist/workflows/dag/frontend-recovery-lineage.js +0 -178
- package/dist/workflows/dag/frontend-review-findings.js +0 -270
- package/dist/workflows/dag/frontend-shadow-dual-write.js +0 -914
- package/dist/workflows/dag/frontend-shape-capsule-store.js +0 -191
- package/dist/workflows/dag/frontend-shape-facts.js +0 -409
- package/dist/workflows/dag/frontend-shape.js +0 -427
- package/dist/workflows/dag/frontend-source-fidelity-ledger.js +0 -108
- package/dist/workflows/dag/frontend-split-application-service.js +0 -203
- package/dist/workflows/dag/frontend-split-orchestrator.js +0 -899
- package/dist/workflows/dag/frontend-typed-event-store.js +0 -452
- package/dist/workflows/dag/frontend-typed-event-transaction.js +0 -180
- package/dist/workflows/dag/frontend-writer-admission.js +0 -285
- package/dist/workflows/dag/frontend-writer-status.js +0 -256
- package/dist/workflows/dag/recovery-lease.js +0 -80
- package/docs/templates/frontend-implementation-dag.json +0 -89
- package/docs/templates/spec-registry.schema.json +0 -45
- package/skills/frontend-bounded-implement/references/code-standards.md +0 -19
- package/skills/frontend-contract/SKILL.md +0 -23
- package/skills/frontend-contract/references/contract-protocol.md +0 -34
- package/skills/frontend-plan/SKILL.md +0 -26
- package/skills/frontend-plan/references/decision-contract.md +0 -37
- package/skills/frontend-plan/references/design-decisions.md +0 -17
- package/skills/frontend-scout/SKILL.md +0 -25
- package/skills/frontend-scout/references/design-evidence.md +0 -16
- package/skills/frontend-scout/references/scout-evidence.md +0 -23
|
@@ -64,10 +64,6 @@ function paramsOf(req) {
|
|
|
64
64
|
function str(v) {
|
|
65
65
|
return typeof v === "string" && v.trim() ? v.trim() : undefined;
|
|
66
66
|
}
|
|
67
|
-
function appendExplicitTaskKindArg(args, taskKind, taskKindExplicit) {
|
|
68
|
-
if (taskKindExplicit)
|
|
69
|
-
args.push("--task-kind", taskKind);
|
|
70
|
-
}
|
|
71
67
|
const TASK_ID_PLACEHOLDER_RE = /[<>]|^(?:id|task-?id|your-task-id|todo|tbd)$/i;
|
|
72
68
|
/** Mirror of runtime GENERIC_TASK_SLUGS (not exported there); keep in sync. */
|
|
73
69
|
const GENERIC_SLUG_SET = new Set(["test", "fix", "tmp", "new-task"]);
|
|
@@ -540,84 +536,6 @@ async function acceptOperation(ctx, input) {
|
|
|
540
536
|
},
|
|
541
537
|
};
|
|
542
538
|
}
|
|
543
|
-
function splitRuntimeMissing(action) {
|
|
544
|
-
return {
|
|
545
|
-
kind: "error",
|
|
546
|
-
status: 503,
|
|
547
|
-
body: operatorFailed({
|
|
548
|
-
command: action,
|
|
549
|
-
outcome: "blocked",
|
|
550
|
-
code: "INTERNAL_ERROR",
|
|
551
|
-
message: `${action} is unavailable: frontend split runtime is not wired`,
|
|
552
|
-
}),
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
function numOf(v) {
|
|
556
|
-
return typeof v === "number" ? v : Number(v);
|
|
557
|
-
}
|
|
558
|
-
function splitCommandBase(p) {
|
|
559
|
-
return {
|
|
560
|
-
operationId: str(p.operationId) ?? "",
|
|
561
|
-
expectedRevision: numOf(p.expectedRevision),
|
|
562
|
-
expectedParentDigest: str(p.expectedParentDigest) ?? "",
|
|
563
|
-
expectedManifestDigest: str(p.expectedManifestDigest) ?? "",
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
function splitCommandDispatch(action, result) {
|
|
567
|
-
if (result.outcome === "conflict") {
|
|
568
|
-
return {
|
|
569
|
-
kind: "error",
|
|
570
|
-
status: 409,
|
|
571
|
-
body: operatorFailed({
|
|
572
|
-
command: action,
|
|
573
|
-
outcome: "conflict",
|
|
574
|
-
code: "CONFLICT",
|
|
575
|
-
message: "frontend split CAS conflict (stale revision or binding)",
|
|
576
|
-
}),
|
|
577
|
-
};
|
|
578
|
-
}
|
|
579
|
-
return { kind: "sync", status: 200, body: operatorSucceeded(action, result) };
|
|
580
|
-
}
|
|
581
|
-
async function runSplitAction(action, run) {
|
|
582
|
-
try {
|
|
583
|
-
const result = await run();
|
|
584
|
-
if (result && typeof result === "object" && "outcome" in result) {
|
|
585
|
-
return splitCommandDispatch(action, result);
|
|
586
|
-
}
|
|
587
|
-
return {
|
|
588
|
-
kind: "sync",
|
|
589
|
-
status: 200,
|
|
590
|
-
body: operatorSucceeded(action, result),
|
|
591
|
-
};
|
|
592
|
-
}
|
|
593
|
-
catch (error) {
|
|
594
|
-
return invalid(action, error instanceof Error ? error.message : String(error));
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
function humanDecisionDispatch(action, result) {
|
|
598
|
-
if (result.outcome === "rejected") {
|
|
599
|
-
return {
|
|
600
|
-
kind: "error",
|
|
601
|
-
status: 409,
|
|
602
|
-
body: operatorFailed({
|
|
603
|
-
command: action,
|
|
604
|
-
outcome: "conflict",
|
|
605
|
-
code: "CONFLICT",
|
|
606
|
-
message: result.reason,
|
|
607
|
-
details: { projection: result.projection },
|
|
608
|
-
}),
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
return { kind: "sync", status: 200, body: operatorSucceeded(action, result) };
|
|
612
|
-
}
|
|
613
|
-
async function runHumanDecisionAction(action, run) {
|
|
614
|
-
try {
|
|
615
|
-
return humanDecisionDispatch(action, await run());
|
|
616
|
-
}
|
|
617
|
-
catch (error) {
|
|
618
|
-
return invalid(action, error instanceof Error ? error.message : String(error));
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
539
|
async function acceptConsoleUpdateAndInit(ctx, clientRequestId, channel) {
|
|
622
540
|
if (!ctx.consoleUpdateExecutor) {
|
|
623
541
|
return {
|
|
@@ -1959,7 +1877,7 @@ export async function dispatchOperatorAction(ctx, req) {
|
|
|
1959
1877
|
const staged = await stageUtf8Text(ctx.appData, content, {
|
|
1960
1878
|
extension: ".md",
|
|
1961
1879
|
});
|
|
1962
|
-
const
|
|
1880
|
+
const imported = await run([
|
|
1963
1881
|
"task",
|
|
1964
1882
|
"advance",
|
|
1965
1883
|
taskId,
|
|
@@ -1968,10 +1886,8 @@ export async function dispatchOperatorAction(ctx, req) {
|
|
|
1968
1886
|
staged.path,
|
|
1969
1887
|
"--role",
|
|
1970
1888
|
"requirement",
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
importArgs.push("--json");
|
|
1974
|
-
const imported = await run(importArgs, {
|
|
1889
|
+
"--json",
|
|
1890
|
+
], {
|
|
1975
1891
|
cwd: ctx.repoRoot,
|
|
1976
1892
|
artifactName: "import-prd-task-advance",
|
|
1977
1893
|
expectJson: true,
|
|
@@ -2946,75 +2862,6 @@ export async function dispatchOperatorAction(ctx, req) {
|
|
|
2946
2862
|
}),
|
|
2947
2863
|
};
|
|
2948
2864
|
}
|
|
2949
|
-
case "frontendSplitWakeup": {
|
|
2950
|
-
if (!ctx.splitOrchestrator)
|
|
2951
|
-
return splitRuntimeMissing(action);
|
|
2952
|
-
return runSplitAction(action, () => ctx.splitOrchestrator.wakeupChildren(splitCommandBase(p)));
|
|
2953
|
-
}
|
|
2954
|
-
case "frontendSplitChildCallback": {
|
|
2955
|
-
if (!ctx.splitOrchestrator)
|
|
2956
|
-
return splitRuntimeMissing(action);
|
|
2957
|
-
return runSplitAction(action, () => ctx.splitOrchestrator.childCallback({
|
|
2958
|
-
...splitCommandBase(p),
|
|
2959
|
-
observation: p.observation,
|
|
2960
|
-
}));
|
|
2961
|
-
}
|
|
2962
|
-
case "frontendSplitWakeupIntegration": {
|
|
2963
|
-
if (!ctx.splitOrchestrator)
|
|
2964
|
-
return splitRuntimeMissing(action);
|
|
2965
|
-
return runSplitAction(action, () => ctx.splitOrchestrator.wakeupIntegration(splitCommandBase(p)));
|
|
2966
|
-
}
|
|
2967
|
-
case "frontendSplitIntegrationCallback": {
|
|
2968
|
-
if (!ctx.splitOrchestrator)
|
|
2969
|
-
return splitRuntimeMissing(action);
|
|
2970
|
-
return runSplitAction(action, () => ctx.splitOrchestrator.integrationCallback({
|
|
2971
|
-
...splitCommandBase(p),
|
|
2972
|
-
completion: p.completion,
|
|
2973
|
-
}));
|
|
2974
|
-
}
|
|
2975
|
-
case "frontendSplitFinalize": {
|
|
2976
|
-
if (!ctx.splitOrchestrator)
|
|
2977
|
-
return splitRuntimeMissing(action);
|
|
2978
|
-
return runSplitAction(action, () => ctx.splitOrchestrator.finalize(splitCommandBase(p)));
|
|
2979
|
-
}
|
|
2980
|
-
case "frontendHumanDecisionMaterialize": {
|
|
2981
|
-
if (!ctx.humanDecisionAdapter)
|
|
2982
|
-
return splitRuntimeMissing(action);
|
|
2983
|
-
return runHumanDecisionAction(action, () => ctx.humanDecisionAdapter.materialize({
|
|
2984
|
-
operationId: str(p.operationId) ?? "",
|
|
2985
|
-
expectedRecordRevision: numOf(p.expectedRecordRevision),
|
|
2986
|
-
expectedProjectionDigest: str(p.expectedProjectionDigest) ?? "",
|
|
2987
|
-
envelope: p.envelope,
|
|
2988
|
-
}));
|
|
2989
|
-
}
|
|
2990
|
-
case "frontendHumanDecisionApprove": {
|
|
2991
|
-
if (!ctx.humanDecisionAdapter)
|
|
2992
|
-
return splitRuntimeMissing(action);
|
|
2993
|
-
return runHumanDecisionAction(action, () => ctx.humanDecisionAdapter.consume({
|
|
2994
|
-
operationId: str(p.operationId) ?? "",
|
|
2995
|
-
expectedRecordRevision: numOf(p.expectedRecordRevision),
|
|
2996
|
-
expectedProjectionDigest: str(p.expectedProjectionDigest) ?? "",
|
|
2997
|
-
receipt: p.receipt,
|
|
2998
|
-
currentTargetDigest: str(p.currentTargetDigest) ?? "",
|
|
2999
|
-
now: str(p.now) ?? new Date().toISOString(),
|
|
3000
|
-
}));
|
|
3001
|
-
}
|
|
3002
|
-
case "frontendSplitInitialize": {
|
|
3003
|
-
if (!ctx.humanDecisionAdapter)
|
|
3004
|
-
return splitRuntimeMissing(action);
|
|
3005
|
-
return runHumanDecisionAction(action, () => ctx.humanDecisionAdapter.initializeSplit({
|
|
3006
|
-
operationId: str(p.operationId) ?? "",
|
|
3007
|
-
expectedRecordRevision: numOf(p.expectedRecordRevision),
|
|
3008
|
-
expectedProjectionDigest: str(p.expectedProjectionDigest) ?? "",
|
|
3009
|
-
execution: p.execution,
|
|
3010
|
-
manifest: p.manifest,
|
|
3011
|
-
receipt: p.receipt,
|
|
3012
|
-
currentTargetDigest: str(p.currentTargetDigest) ?? "",
|
|
3013
|
-
now: str(p.now) ?? new Date().toISOString(),
|
|
3014
|
-
activeWriterOperationId: str(p.activeWriterOperationId) ?? null,
|
|
3015
|
-
activeProviderOperationId: str(p.activeProviderOperationId) ?? null,
|
|
3016
|
-
}));
|
|
3017
|
-
}
|
|
3018
2865
|
default: {
|
|
3019
2866
|
// M5 official-command coverage uses one generic tail for newly registered
|
|
3020
2867
|
// CLI actions. It remains inside dispatchOperatorAction (the sole dispatch
|
|
@@ -3399,14 +3246,7 @@ async function dispatchBootstrapFromPrd(ctx, p) {
|
|
|
3399
3246
|
const title = identity.title;
|
|
3400
3247
|
const run = ctx.runCommand ?? ((a, o) => ctx.client.run(a, o));
|
|
3401
3248
|
// Standard lifecycle entry: task advance create + PRD import(s).
|
|
3402
|
-
|
|
3403
|
-
// task.json write. The task lifecycle otherwise defaults new tasks to
|
|
3404
|
-
// standard, which caused frontend tasks to be promoted only during the
|
|
3405
|
-
// final intake pass.
|
|
3406
|
-
const createArgs = ["task", "advance", taskId, title];
|
|
3407
|
-
appendExplicitTaskKindArg(createArgs, taskKind, taskKindExplicit);
|
|
3408
|
-
createArgs.push("--json");
|
|
3409
|
-
const advanceCreate = await run(createArgs, {
|
|
3249
|
+
const advanceCreate = await run(["task", "advance", taskId, title, "--json"], {
|
|
3410
3250
|
cwd: ctx.repoRoot,
|
|
3411
3251
|
artifactName: "bootstrap-task-advance-create",
|
|
3412
3252
|
expectJson: true,
|
|
@@ -3440,7 +3280,7 @@ async function dispatchBootstrapFromPrd(ctx, p) {
|
|
|
3440
3280
|
const staged = await stageUtf8Text(ctx.appData, text, {
|
|
3441
3281
|
extension: ".md",
|
|
3442
3282
|
});
|
|
3443
|
-
const
|
|
3283
|
+
const imported = await run([
|
|
3444
3284
|
"task",
|
|
3445
3285
|
"advance",
|
|
3446
3286
|
taskId,
|
|
@@ -3448,10 +3288,8 @@ async function dispatchBootstrapFromPrd(ctx, p) {
|
|
|
3448
3288
|
staged.path,
|
|
3449
3289
|
"--role",
|
|
3450
3290
|
role,
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
importArgs.push("--json");
|
|
3454
|
-
const imported = await run(importArgs, {
|
|
3291
|
+
"--json",
|
|
3292
|
+
], {
|
|
3455
3293
|
cwd: ctx.repoRoot,
|
|
3456
3294
|
artifactName: `bootstrap-task-advance-prd-${label}`,
|
|
3457
3295
|
expectJson: true,
|
|
@@ -98,7 +98,9 @@ function getNpmRegistry() {
|
|
|
98
98
|
/** 从 npm 配置的仓库拉取某包的全部已发布版本 + latest。 */
|
|
99
99
|
export async function listPiPluginVersions(name) {
|
|
100
100
|
const registry = (await getNpmRegistry()).replace(/\/+$/, "");
|
|
101
|
-
|
|
101
|
+
// scoped 包名整段编码(@scope/name → %40scope%2Fname):与 npm 客户端请求
|
|
102
|
+
// packument 的形式一致,npmjs.org 与内网 Nexus(要求 %2F 不还原)都接受。
|
|
103
|
+
const url = `${registry}/${encodeURIComponent(name)}`;
|
|
102
104
|
try {
|
|
103
105
|
const res = await fetch(url, {
|
|
104
106
|
headers: { accept: "application/json", "user-agent": "loop-agent/1.0" },
|
|
@@ -566,8 +566,26 @@ export async function createConsoleServer(options) {
|
|
|
566
566
|
const stored = await context.chatRouteDeps.store.get(sessionId);
|
|
567
567
|
if (stored)
|
|
568
568
|
owner = context;
|
|
569
|
+
else if (!catalogEntry) {
|
|
570
|
+
// Catalog and store both miss: the session was deleted, not
|
|
571
|
+
// retargeted. Do not scan other workspaces or leak existence.
|
|
572
|
+
sendJson(res, 404, {
|
|
573
|
+
ok: false,
|
|
574
|
+
error: {
|
|
575
|
+
code: "PI_SESSION_NOT_FOUND",
|
|
576
|
+
message: `chat session not found: ${sessionId}`,
|
|
577
|
+
},
|
|
578
|
+
});
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
569
581
|
else {
|
|
570
|
-
|
|
582
|
+
chatSessionCatalog.remove(sessionId);
|
|
583
|
+
await registry
|
|
584
|
+
.detachSession(ownerRecord.workspaceId, sessionId)
|
|
585
|
+
.catch(() => undefined);
|
|
586
|
+
// Catalog had the id, but this workspace store does not.
|
|
587
|
+
// Keep the conflict code so a mismatched selection cannot
|
|
588
|
+
// discover whether the session lives elsewhere.
|
|
571
589
|
sendJson(res, 403, {
|
|
572
590
|
ok: false,
|
|
573
591
|
error: {
|
|
@@ -778,9 +796,6 @@ export async function createConsoleServer(options) {
|
|
|
778
796
|
appData: startup.appData,
|
|
779
797
|
operations: startup.operations,
|
|
780
798
|
events: startup.events,
|
|
781
|
-
splitOrchestrator: startup.splitOrchestrator,
|
|
782
|
-
humanDecisionAdapter: startup.humanDecisionAdapter,
|
|
783
|
-
materializer: startup.materializer,
|
|
784
799
|
getReadiness,
|
|
785
800
|
operatorSessionId,
|
|
786
801
|
registry,
|
|
@@ -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-CdiNyN0N.js";import{p as f}from"./chunk-JWPE2WC7-DiDVlVB1.js";import{_ as n,l as o}from"./mermaid.core-ChyQH_ut.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-BT_JRsOH.js";import"./index-DtPrwu7M.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-ChyQH_ut.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};
|