create-agdf 0.30.0 → 0.31.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/generated/.agdf/control/README.md +5 -0
- package/generated/.agdf/control/templates/BRAND.md +28 -0
- package/generated/.agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/.agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/.agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/.opencode/agdf-interaction-locales.json +292 -2
- package/generated/.opencode/contracts/gate-artifact-preparation.md +9 -3
- package/generated/.opencode/contracts/interaction.md +10 -4
- package/generated/.opencode/contracts/modes.md +5 -0
- package/generated/.opencode/contracts/prd-definition.md +40 -1
- package/generated/.opencode/contracts/quality.md +35 -0
- package/generated/.opencode/contracts/request-activation.md +6 -3
- package/generated/.opencode/contracts/sd-definition.md +46 -0
- package/generated/.opencode/contracts/tp-definition.md +8 -0
- package/generated/.opencode/contracts/ur-definition.md +9 -5
- package/generated/.opencode/skills/agdf-ux-intent-definition/SKILL.md +31 -2
- package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/companion/events.mjs +117 -0
- package/generated/plugins/agdf/companion/figure.mjs +6 -6
- package/generated/plugins/agdf/companion/gate-bar.mjs +10 -28
- package/generated/plugins/agdf/companion/localization.mjs +10 -32
- package/generated/plugins/agdf/companion/notice.mjs +10 -8
- package/generated/plugins/agdf/companion/register.mjs +229 -43
- package/generated/plugins/agdf/companion/run-state.mjs +77 -90
- package/generated/plugins/agdf/companion/state.mjs +6 -32
- package/generated/plugins/agdf/companion/view.mjs +57 -12
- package/generated/plugins/agdf/control/README.md +5 -0
- package/generated/plugins/agdf/control/templates/BRAND.md +28 -0
- package/generated/plugins/agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/plugins/agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/plugins/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/plugins/agdf/mcp/server/README.md +26 -2
- package/generated/plugins/agdf/mcp/server/package.json +3 -3
- package/generated/plugins/agdf/mcp/server/src/generation-runtime.js +11 -2
- package/generated/plugins/agdf/mcp/server/src/main.js +1 -0
- package/generated/plugins/agdf/mcp/server/src/next-action.js +227 -0
- package/generated/plugins/agdf/mcp/server/src/prepared-call-transport.js +306 -0
- package/generated/plugins/agdf/mcp/server/src/safe-read-continuation.js +62 -0
- package/generated/plugins/agdf/mcp/server/src/server.js +139 -35
- package/generated/plugins/agdf/mcp/server/ui/cockpit.html +2 -2
- package/generated/plugins/agdf/mcp/server/ui/decision-manifest.json +3 -3
- package/generated/plugins/agdf/mcp/server/ui/decision.html +2 -2
- package/generated/plugins/agdf/mcp/server/ui/manifest.json +3 -3
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +292 -2
- package/generated/plugins/agdf/meta/agdf-mcp-capability.json +1 -1
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
- package/generated/plugins/agdf/meta/contracts/interaction.md +10 -4
- package/generated/plugins/agdf/meta/contracts/modes.md +5 -0
- package/generated/plugins/agdf/meta/contracts/prd-definition.md +40 -1
- package/generated/plugins/agdf/meta/contracts/quality.md +35 -0
- package/generated/plugins/agdf/meta/contracts/request-activation.md +6 -3
- package/generated/plugins/agdf/meta/contracts/sd-definition.md +46 -0
- package/generated/plugins/agdf/meta/contracts/tp-definition.md +8 -0
- package/generated/plugins/agdf/meta/contracts/ur-definition.md +9 -5
- package/generated/plugins/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/plugins/agdf/meta/distribution-profile-history.json +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +292 -2
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +10 -4
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +5 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +40 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +35 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +6 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +46 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +8 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +9 -5
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/parse-args.js +7 -4
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/project-read-command.js +29 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +32 -6
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +34 -6
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +86 -83
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +154 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +36 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +180 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +184 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +24 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +44 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +7 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +15 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +107 -22
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit.js +4 -20
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +64 -24
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +6 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +32 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +7 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/material-limits.js +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +4 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +10 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +9 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +35 -11
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +5 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +25 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +84 -28
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +38 -20
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +37 -17
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +10 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +8 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/index.js +3 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +8 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +26 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +30 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +5 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +9 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +6 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +3 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +25 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +4 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +17 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +4 -2
- package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +4 -3
- package/generated/plugins/agdf/skills/ux-intent-definition/SKILL.md +31 -2
- package/generated/plugins/agdf/skills/ux-intent-definition/help.md +8 -1
- package/generated/plugins/agdf/submission/openai/availability.md +1 -1
- package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/plugins/agdf/submission/openai/release-notes.md +8 -8
- package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
- package/generated/plugins/agdf-planning/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf-planning/plugin.json +1 -1
- package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +332 -195
- package/generated/plugins/copilot/agdf/control/README.md +5 -0
- package/generated/plugins/copilot/agdf/control/templates/BRAND.md +28 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/plugins/copilot/agdf/mcp/server/README.md +26 -2
- package/generated/plugins/copilot/agdf/mcp/server/package.json +3 -3
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-runtime.js +11 -2
- package/generated/plugins/copilot/agdf/mcp/server/src/main.js +1 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/next-action.js +227 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/prepared-call-transport.js +306 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/safe-read-continuation.js +62 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/server.js +139 -35
- package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +7 -0
- package/generated/plugins/copilot/agdf/plugin.json +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +292 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +10 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +5 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +40 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +35 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +6 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +46 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +8 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +9 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +7 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/project-read-command.js +29 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +32 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +34 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +81 -78
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +154 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +36 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +180 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +184 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +24 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +44 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +7 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +15 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +107 -22
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +64 -24
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +6 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +32 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +7 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/material-limits.js +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +4 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +10 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +9 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +35 -11
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +5 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +25 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +84 -28
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +38 -20
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +37 -17
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +10 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +8 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/index.js +3 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +8 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +26 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +30 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +5 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +9 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +6 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +3 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +25 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +4 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +17 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +4 -2
- package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/copilot/agdf/skills/agdf-interaction-locales.json +1 -1
- package/generated/plugins/copilot/agdf/skills/agdf-ux-intent-definition/SKILL.md +31 -2
- package/generated/plugins/copilot/agdf/skills/contracts/gate-artifact-preparation.md +9 -3
- package/generated/plugins/copilot/agdf/skills/contracts/interaction.md +10 -4
- package/generated/plugins/copilot/agdf/skills/contracts/modes.md +5 -0
- package/generated/plugins/copilot/agdf/skills/contracts/prd-definition.md +40 -1
- package/generated/plugins/copilot/agdf/skills/contracts/quality.md +35 -0
- package/generated/plugins/copilot/agdf/skills/contracts/request-activation.md +6 -3
- package/generated/plugins/copilot/agdf/skills/contracts/sd-definition.md +46 -0
- package/generated/plugins/copilot/agdf/skills/contracts/tp-definition.md +8 -0
- package/generated/plugins/copilot/agdf/skills/contracts/ur-definition.md +9 -5
- package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/submissions/openai/agdf/meta/agdf-interaction-locales.json +292 -2
- package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/submissions/openai/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
- package/generated/submissions/openai/agdf/meta/contracts/interaction.md +10 -4
- package/generated/submissions/openai/agdf/meta/contracts/modes.md +5 -0
- package/generated/submissions/openai/agdf/meta/contracts/prd-definition.md +40 -1
- package/generated/submissions/openai/agdf/meta/contracts/quality.md +35 -0
- package/generated/submissions/openai/agdf/meta/contracts/request-activation.md +6 -3
- package/generated/submissions/openai/agdf/meta/contracts/sd-definition.md +46 -0
- package/generated/submissions/openai/agdf/meta/contracts/tp-definition.md +8 -0
- package/generated/submissions/openai/agdf/meta/contracts/ur-definition.md +9 -5
- package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +7 -0
- package/generated/submissions/openai/agdf/plugin.json +1 -1
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/SKILL.md +31 -2
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/help.md +8 -1
- package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
- package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/inventory.json +24 -24
- package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
- package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
- package/generated/submissions/openai/agdf/submission/openai/release-notes.md +8 -8
- package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
- package/lib/cli/command-registry.js +2 -1
- package/lib/cli/parse-args.js +7 -4
- package/lib/cli/project-read-command.js +29 -0
- package/lib/cli/validation-handlers.js +2 -1
- package/lib/mcp-dispatch-runtime.js +32 -6
- package/lib/mcp-lifecycle/package.js +7 -0
- package/lib/mcp-lifecycle/plugin-runtime.js +34 -6
- package/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/lib/mcp-worker-runtime.js +86 -83
- package/lib/runtime/validator-application.js +2 -2
- package/lib/scaffold/plan.js +2 -0
- package/package.json +1 -1
- package/runtime/core/lib/companion/events.js +154 -0
- package/runtime/core/lib/companion/figure-state.js +36 -0
- package/runtime/core/lib/companion/journal.js +180 -0
- package/runtime/core/lib/companion/run-view.js +184 -0
- package/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/runtime/core/lib/control-evaluation/closeout-readiness.js +24 -6
- package/runtime/core/lib/control-evaluation/gate-check.js +44 -6
- package/runtime/core/lib/control-evaluation/gate-policy-inputs.js +2 -0
- package/runtime/core/lib/control-evaluation/gate-policy-pure.js +7 -3
- package/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/runtime/core/lib/control-evaluation/ur-readiness.js +15 -2
- package/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
- package/runtime/core/lib/control-inspect/authoring-inputs.js +107 -22
- package/runtime/core/lib/control-inspect/cockpit.js +4 -20
- package/runtime/core/lib/control-inspect/contract.js +64 -24
- package/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/runtime/core/lib/control-inspect/project-state.js +2 -1
- package/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/runtime/core/lib/control-inspect/selection.js +6 -0
- package/runtime/core/lib/control-inspect/service.js +32 -5
- package/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/runtime/core/lib/control-state/input-resolution.js +7 -5
- package/runtime/core/lib/control-state/material-limits.js +4 -0
- package/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/runtime/core/lib/control-state/presentation-delivery.js +4 -1
- package/runtime/core/lib/control-state/run-command-contract.js +10 -4
- package/runtime/core/lib/control-state/run-command-schema.js +9 -3
- package/runtime/core/lib/control-state/run-command-service.js +35 -11
- package/runtime/core/lib/control-state/run-identity.js +2 -0
- package/runtime/core/lib/control-state/run-inventory-reader.js +5 -3
- package/runtime/core/lib/control-state/run-material.js +25 -7
- package/runtime/core/lib/control-state/run-presentation-render.js +84 -28
- package/runtime/core/lib/control-state/run-revision.js +38 -20
- package/runtime/core/lib/control-state/run-source-revisions.js +37 -17
- package/runtime/core/lib/control-state/run-state-reader.js +10 -3
- package/runtime/core/lib/control-state/run-steps.js +8 -5
- package/runtime/core/lib/index.js +3 -1
- package/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/runtime/core/lib/interaction-catalog.js +8 -0
- package/runtime/core/lib/interaction-presentation.js +26 -1
- package/runtime/core/lib/mcp-input-hints.js +30 -1
- package/runtime/core/lib/mcp-tool-errors.js +5 -3
- package/runtime/core/lib/resources/canonical-init-plan.js +1 -1
- package/runtime/core/lib/runtime/plugin-provenance.js +9 -2
- package/runtime/core/lib/skill-dispatch/contract.js +6 -4
- package/runtime/core/lib/skill-dispatch/delivery-intake.js +3 -1
- package/runtime/core/lib/skill-dispatch/mcp-continuation.js +25 -2
- package/runtime/core/lib/skill-dispatch/prd-definition.js +3 -2
- package/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/runtime/core/lib/skill-dispatch/sd-definition.js +4 -2
- package/runtime/core/lib/skill-dispatch/service.js +17 -4
- package/runtime/core/lib/skill-dispatch/tp-definition.js +4 -2
- package/generated/plugins/agdf/companion/core.mjs +0 -16
- package/generated/plugins/agdf/companion/locales.json +0 -200
|
@@ -1,106 +1,93 @@
|
|
|
1
|
-
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
1
|
+
// Run view reader (SD SDD-010): obtains the Core run view through the plugin runtime's read-only
|
|
2
|
+
// `run-view` command and maps it to the companion's runs. The companion derives no run semantics of
|
|
3
|
+
// its own: status, gate path, missing approval, next step and figure come from the status card's
|
|
4
|
+
// evaluator. Process access is injected by the host ({ run(argv, init) }, as `$.process` provides).
|
|
5
5
|
|
|
6
|
-
export const
|
|
7
|
-
|
|
6
|
+
export const RUN_VIEW_SCHEMA = 'run-view/1';
|
|
7
|
+
export const RUN_VIEW_TIMEOUT_MS = 10_000;
|
|
8
|
+
// Why a run-view read failed; each has a catalog text under `unreadable` (shown with the failure).
|
|
9
|
+
export const READ_FAILURE_REASONS = Object.freeze(['timeout', 'unavailable', 'exit', 'malformed', 'source_changed']);
|
|
10
|
+
// Store reasons of a read that may succeed on the next attempt (a write during the read, the read
|
|
11
|
+
// budget); they keep the last good view, marked stale, like a failed read (CR delta review RV-1).
|
|
12
|
+
export const TRANSIENT_STORE_REASONS = Object.freeze(['source_changed', 'timeout']);
|
|
13
|
+
// The internal steps between an approved TP and QA, shown as the build phase in the gate bar.
|
|
8
14
|
export const BUILD_GATES = Object.freeze(['Brownfield Analysis', 'CD+Tests', 'CR']);
|
|
9
15
|
export const isStructured = route => route === 'structured_delivery' || route === 'structured_slice';
|
|
10
|
-
// The host rejects reads over 4 MiB; the largest observed run state is about 280 KB.
|
|
11
|
-
export const MAX_RUN_STATE_BYTES = 1024 * 1024;
|
|
12
16
|
const TEXT_LIMIT = 240;
|
|
17
|
+
const clip = text => { const value = String(text ?? ''); return value.length > TEXT_LIMIT ? `${value.slice(0, TEXT_LIMIT - 1)}…` : value; };
|
|
13
18
|
|
|
14
|
-
// The
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const plain = value => String(value ?? '').replace(/`/gu, '').trim();
|
|
19
|
-
const clip = text => (text.length > TEXT_LIMIT ? `${text.slice(0, TEXT_LIMIT - 1)}…` : text);
|
|
20
|
-
|
|
21
|
-
// Body of a level-two section, without its heading; '' when absent.
|
|
22
|
-
export function section(text, heading) {
|
|
23
|
-
const lines = text.split('\n');
|
|
24
|
-
const start = lines.findIndex(line => line.trimEnd() === `## ${heading}`);
|
|
25
|
-
if (start < 0) return '';
|
|
26
|
-
const rest = lines.slice(start + 1);
|
|
27
|
-
const end = rest.findIndex(line => line.startsWith('## '));
|
|
28
|
-
return (end < 0 ? rest : rest.slice(0, end)).join('\n');
|
|
19
|
+
// The only command the companion runs: the read-only run view of one project root.
|
|
20
|
+
export function runViewArgv({ pluginRoot, root, language, runIds = [] }) {
|
|
21
|
+
return ['node', `${pluginRoot}/runtime/agdf-local.js`, 'run-view', '--dir', root, '--json', '--language', language,
|
|
22
|
+
...runIds.flatMap(runId => ['--run', runId])];
|
|
29
23
|
}
|
|
30
24
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
25
|
+
// One run-view entry as the companion's run.
|
|
26
|
+
export function companionRun(entry) {
|
|
27
|
+
return Object.freeze({
|
|
28
|
+
id: entry.run_id,
|
|
29
|
+
lifecycle: entry.lifecycle,
|
|
30
|
+
evaluated: entry.evaluated === true,
|
|
31
|
+
gate: entry.current_gate ?? null,
|
|
32
|
+
route: entry.mode ?? null,
|
|
33
|
+
updatedAt: entry.last_activity ?? '',
|
|
34
|
+
missing: entry.missing_approval ?? 'none',
|
|
35
|
+
next: entry.next_step ?? '',
|
|
36
|
+
nextText: entry.next_step_text ?? '',
|
|
37
|
+
blockingText: entry.blocking_text ?? '',
|
|
38
|
+
path: Object.freeze((entry.path ?? []).map(({ gate, status }) => Object.freeze({ gate, status }))),
|
|
39
|
+
figure: entry.figure,
|
|
40
|
+
// Bound documents changed after recording (SDD-008), as the run view reports them.
|
|
41
|
+
drift: Object.freeze((entry.drift ?? []).map(item => Object.freeze({ ...item }))),
|
|
42
|
+
// The authored objective, never the status card's run title or a template text.
|
|
43
|
+
objective: clip(entry.objective ?? ''),
|
|
44
|
+
});
|
|
47
45
|
}
|
|
48
46
|
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
export function
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
missing: clip(projection.facts.artefacts.get(gate)?.path || gate === 'UAT' ? control.missing_approval ?? '' : 'none'),
|
|
77
|
-
next: clip(control.next_allowed_action ?? ''),
|
|
78
|
-
approved: Object.freeze([...projection.facts.approvals].filter(([, row]) => row.status === 'approved').map(([name]) => name)),
|
|
79
|
-
objective: isPlaceholderText(objective) ? '' : clip(objective),
|
|
80
|
-
}) };
|
|
47
|
+
// stdout of the command as a snapshot: { status, root, runs, unreadable, diagnosis, readAt }.
|
|
48
|
+
// status is ok, no_control, unavailable (store diagnosis with reason) or failed (no usable view).
|
|
49
|
+
export function snapshotFromRunView(stdout, { now }) {
|
|
50
|
+
let view;
|
|
51
|
+
try { view = JSON.parse(stdout); } catch { return { status: 'failed', runs: [], unreadable: [], readAt: now, error: 'malformed' }; }
|
|
52
|
+
if (view?.schema_version !== RUN_VIEW_SCHEMA || !Array.isArray(view.runs) || !view.store) {
|
|
53
|
+
return { status: 'failed', runs: [], unreadable: [], readAt: now, error: 'malformed' };
|
|
54
|
+
}
|
|
55
|
+
if (view.store.status === 'unavailable' && TRANSIENT_STORE_REASONS.includes(view.store.reason)) {
|
|
56
|
+
return { status: 'failed', runs: [], unreadable: [], readAt: now, error: view.store.reason };
|
|
57
|
+
}
|
|
58
|
+
// A run read while its files changed (after the run view's bounded retries) makes the view incomplete;
|
|
59
|
+
// like a transient store failure it keeps the last good view instead of showing that run as blocked.
|
|
60
|
+
const changedRun = view.runs.find(run => TRANSIENT_STORE_REASONS.includes(run?.evaluation_error));
|
|
61
|
+
if (changedRun) return { status: 'failed', runs: [], unreadable: [], readAt: now, error: changedRun.evaluation_error };
|
|
62
|
+
const status = view.store.status === 'ok' ? 'ok' : view.store.status === 'no_control' ? 'no_control' : 'unavailable';
|
|
63
|
+
return {
|
|
64
|
+
status,
|
|
65
|
+
root: view.root,
|
|
66
|
+
reason: view.store.reason ?? null,
|
|
67
|
+
// The run folders of an unsupported store, which the run view counts without reading them (AC-002).
|
|
68
|
+
runFolders: Number.isSafeInteger(view.store.run_folders) && view.store.run_folders > 0 ? view.store.run_folders : null,
|
|
69
|
+
runs: view.runs.filter(entry => entry.valid !== false && entry.listed !== false).map(companionRun),
|
|
70
|
+
unreadable: (view.diagnosis?.unreadable ?? []).map(({ run_id, reason }) => ({ id: run_id, reason })),
|
|
71
|
+
diagnosis: view.diagnosis ?? null,
|
|
72
|
+
readAt: now,
|
|
73
|
+
};
|
|
81
74
|
}
|
|
82
75
|
|
|
83
|
-
//
|
|
84
|
-
//
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const runsDir = `${projectRoot}/.agdf/control/runs`;
|
|
76
|
+
// Runs the command through the host and never throws: a process failure, a timeout or malformed
|
|
77
|
+
// output is a failed snapshot with its cause, which the adapter settles as stale.
|
|
78
|
+
export async function readSnapshot(processes, { pluginRoot, root, language, runIds = [], now, clock = () => Date.now() }) {
|
|
79
|
+
let ran;
|
|
80
|
+
const started = await clock();
|
|
89
81
|
try {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
status: 'ok',
|
|
97
|
-
runs: results.filter(result => result.ok).map(result => result.run),
|
|
98
|
-
unreadable: results.filter(result => !result.ok).map(({ id, reason }) => ({ id, reason })),
|
|
99
|
-
readAt: now,
|
|
100
|
-
};
|
|
101
|
-
} catch (error) {
|
|
102
|
-
return { status: 'failed', runs: [], unreadable: [], readAt: now, error: String(error?.message ?? error).slice(0, TEXT_LIMIT) };
|
|
82
|
+
ran = await processes.run(runViewArgv({ pluginRoot, root, language, runIds }), { timeoutMs: RUN_VIEW_TIMEOUT_MS });
|
|
83
|
+
} catch {
|
|
84
|
+
// `$.process.run` rejects when the command cannot start or is still running at the timeout; its
|
|
85
|
+
// message format is not specified, so the elapsed time tells the two apart (CR finding CIR-06).
|
|
86
|
+
const elapsed = (await clock()) - started;
|
|
87
|
+
return { status: 'failed', runs: [], unreadable: [], readAt: now, error: elapsed >= RUN_VIEW_TIMEOUT_MS ? 'timeout' : 'unavailable' };
|
|
103
88
|
}
|
|
89
|
+
if (ran.exitCode !== 0 && ran.exitCode !== 2) return { status: 'failed', runs: [], unreadable: [], readAt: now, error: 'exit' };
|
|
90
|
+
return snapshotFromRunView(ran.stdout, { now });
|
|
104
91
|
}
|
|
105
92
|
|
|
106
93
|
// A transient failure keeps the last good snapshot, marked stale with the failed read time (AC-006).
|
|
@@ -1,37 +1,11 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// guessed (SDD-04).
|
|
1
|
+
// Figure state of a run (SD SDD-004): the Core run view carries the derived mood and reason, so the
|
|
2
|
+
// companion only overlays its own turn activity. It derives no run semantics itself.
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
export const MOODS = Object.freeze(['laeuft', 'baut', 'wartet', 'blockiert', 'fertig', 'bereit']);
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
const BLOCKING = new Set(['revise', 'block', 'blocked', 'decline']);
|
|
9
|
-
const AWAITING = new Set(['pending', 'awaiting_uat']);
|
|
10
|
-
const WORKING = new Set(['in_progress', 'pass', 'qa_approved', 'completed']);
|
|
11
|
-
|
|
12
|
-
// The gate a pending approval names, as in "Exact Approval: QA." or "Exact Approval: PRD for the new revision."
|
|
13
|
-
export const pendingApproval = missing => String(missing ?? '').match(/\bApproval: (UR|PRD|SD|TP|QA|UAT|OR)\b/u)?.[1] ?? null;
|
|
14
|
-
|
|
15
|
-
// The blocking outcome of a run: a legacy Run Meta decision, the current gate's recorded result
|
|
16
|
-
// (`revise`, `block`, `blocked`) or a deliberate decision on its presented material.
|
|
17
|
-
function blockingOutcome(run) {
|
|
18
|
-
if (BLOCKING.has(run.decision)) return run.decision;
|
|
19
|
-
if (run.gateResult) return run.gateResult;
|
|
20
|
-
return { reject: 'decline', request_change: 'revise' }[run.gateDecision] ?? null;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// { mood, reason: { key, gate?, decision? } } or { mood: null, reason: { key: 'unknownState' } }.
|
|
24
|
-
// A structured run between an approved TP and QA (Brownfield Analysis, CD+Tests, CR) is being built.
|
|
6
|
+
// { mood, reason: { key, gate?, decision?, reason? } } as the run view derived it.
|
|
25
7
|
export function runState(run) {
|
|
26
|
-
|
|
27
|
-
const outcome = blockingOutcome(run);
|
|
28
|
-
if (outcome) return { mood: 'blockiert', reason: { key: 'blocked', gate: run.gate, decision: outcome } };
|
|
29
|
-
const approval = pendingApproval(run.missing);
|
|
30
|
-
if (approval) return { mood: 'wartet', reason: { key: 'waitingApproval', gate: approval } };
|
|
31
|
-
if (AWAITING.has(run.decision)) return { mood: 'wartet', reason: { key: 'waitingDecision', gate: run.gate } };
|
|
32
|
-
if (WORKING.has(run.decision) && isStructured(run.route) && BUILD_GATES.includes(run.gate)) return { mood: 'baut', reason: { key: 'building', gate: run.gate } };
|
|
33
|
-
if (WORKING.has(run.decision)) return { mood: 'laeuft', reason: { key: 'working', gate: run.gate } };
|
|
34
|
-
return { mood: null, reason: { key: 'unknownState' } };
|
|
8
|
+
return run?.figure ?? { mood: 'bereit', reason: { key: 'idle' } };
|
|
35
9
|
}
|
|
36
10
|
|
|
37
11
|
// Moods a main-loop turn does not cover: a run being built stays baut, and a run waiting for an
|
|
@@ -43,6 +17,6 @@ const THROUGH_TURN = new Set(['baut', 'wartet']);
|
|
|
43
17
|
// the turn.
|
|
44
18
|
export function displayState(run, { isTurnActive = false } = {}) {
|
|
45
19
|
const derived = runState(run);
|
|
46
|
-
if (isTurnActive &&
|
|
20
|
+
if (isTurnActive && !THROUGH_TURN.has(derived.mood)) return { mood: 'laeuft', reason: { key: 'turnActive' } };
|
|
47
21
|
return derived;
|
|
48
22
|
}
|
|
@@ -5,53 +5,73 @@
|
|
|
5
5
|
import { assignRun } from './assignment.mjs';
|
|
6
6
|
import { FIGURE_TEXT } from './figure.mjs';
|
|
7
7
|
import { condensedGateBar, gateBar, gateMarks } from './gate-bar.mjs';
|
|
8
|
-
import { gateTitle, label
|
|
8
|
+
import { gateTitle, label } from './localization.mjs';
|
|
9
9
|
import { displayState } from './state.mjs';
|
|
10
|
+
import { READ_FAILURE_REASONS } from './run-state.mjs';
|
|
11
|
+
import { eventText, latestReview, PANE_EVENTS, shortDigest } from './events.mjs';
|
|
10
12
|
|
|
11
13
|
const two = value => String(value).padStart(2, '0');
|
|
14
|
+
// Preview lines the terminal text shows beneath the material line.
|
|
15
|
+
export const TERMINAL_PREVIEW_LINES = 3;
|
|
12
16
|
// Last part of a project root in either path form ("C:\Work\app\" → "app").
|
|
13
17
|
const folderName = root => String(root ?? '').replace(/[\\/]+$/u, '').split(/[\\/]/u).pop() || String(root ?? '');
|
|
14
18
|
// Host-local wall-clock time, HH:MM.
|
|
15
19
|
export const clockText = ms => { const at = new Date(ms); return `${two(at.getHours())}:${two(at.getMinutes())}`; };
|
|
16
20
|
|
|
17
21
|
// input: { snapshot, sessionStartedAt, selection, mention, isBrowsing, isTurnActive, registry, labels,
|
|
18
|
-
// locale, columns, isObjectiveExpanded }. Display only: the adapter persists
|
|
22
|
+
// locale, columns, isObjectiveExpanded, events, eventsAvailable }. Display only: the adapter persists
|
|
23
|
+
// selection changes. `events` are this root's journal events since the last main-loop turn, newest first.
|
|
19
24
|
export function buildPanelView(input) {
|
|
20
25
|
const { snapshot, registry, labels, locale } = input;
|
|
21
26
|
const t = (path, params) => label(labels, locale, path, params);
|
|
22
|
-
const base = { title: t('title'), locale, mood: '
|
|
27
|
+
const base = { title: t('title'), locale, mood: 'bereit', stateLabel: t('states.bereit'),
|
|
23
28
|
readAt: snapshot ? t('fields.lastRead', { time: clockText(snapshot.readAt) }) : null,
|
|
24
29
|
stale: snapshot?.stale ? t('messages.stale', { time: clockText(snapshot.stale.failedAt), readAt: clockText(snapshot.readAt) }) : null,
|
|
25
30
|
canRetry: true, openRuns: [] };
|
|
26
|
-
|
|
31
|
+
// Event lines name only runs other than the shown one (owner request of 2026-11-06, T-013).
|
|
32
|
+
const events = shownRunId => eventFields(input, t, { shownRunId, runs: snapshot?.runs ?? [] });
|
|
33
|
+
const neutral = (message, extra = {}) => ({ ...base, ...events(null), message, ...extra });
|
|
27
34
|
const unreadable = reason => neutral(t('messages.unreadable', { reason: t(`unreadable.${reason}`) }));
|
|
28
35
|
|
|
29
36
|
if (!snapshot) return neutral(t('messages.reading'), { readAt: null });
|
|
30
|
-
if (snapshot.status === 'failed')
|
|
37
|
+
if (snapshot.status === 'failed') {
|
|
38
|
+
const reason = READ_FAILURE_REASONS.includes(snapshot.error) ? snapshot.error : 'unavailable';
|
|
39
|
+
return neutral(t('messages.runViewUnavailable', { reason: t(`unreadable.${reason}`) }));
|
|
40
|
+
}
|
|
41
|
+
if (snapshot.status === 'unavailable') {
|
|
42
|
+
// An unsupported store names how many run folders it holds and why none is readable (AC-002).
|
|
43
|
+
const reason = snapshot.reason ?? 'read_failed';
|
|
44
|
+
return snapshot.runFolders
|
|
45
|
+
? neutral(t('messages.unreadableRuns', { count: snapshot.runFolders, reasons: t(`unreadable.${reason}`) }))
|
|
46
|
+
: unreadable(reason);
|
|
47
|
+
}
|
|
31
48
|
if (snapshot.status === 'no_control') {
|
|
32
49
|
return neutral(t('messages.noControl', { folder: folderName(snapshot.root) }), { hint: t('messages.noControlHint', { path: snapshot.root ?? '' }) });
|
|
33
50
|
}
|
|
34
51
|
|
|
35
52
|
const { run, origin, open, chatRunId } = assignRun({ runs: snapshot.runs, sessionStartedAt: input.sessionStartedAt, selection: input.selection,
|
|
36
53
|
mention: input.mention ?? null, isBrowsing: Boolean(input.isBrowsing) });
|
|
54
|
+
// Unreadable runs stay visible as a count with their reasons beside the readable ones (AC-002, AC-003).
|
|
55
|
+
const reasons = [...new Set(snapshot.unreadable.map(item => t(`unreadable.${item.reason}`)))].join(', ');
|
|
56
|
+
const unreadableHint = snapshot.unreadable.length ? t('messages.unreadableRuns', { count: snapshot.unreadable.length, reasons }) : null;
|
|
37
57
|
// Each open run carries its condensed gate bar for the list (owner request of 2026-10-28).
|
|
38
58
|
const openRuns = open.map(item => ({ id: item.id, objective: item.objective, bar: condensedGateBar(gateMarks(item)) }));
|
|
39
59
|
if (!run) {
|
|
40
60
|
const broken = input.selection && snapshot.unreadable.find(item => item.id === input.selection);
|
|
41
|
-
if (broken) return { ...unreadable(broken.reason), openRuns, chatRunId };
|
|
42
|
-
if (!open.length) return neutral(t('messages.noOpenRuns'));
|
|
43
|
-
return neutral(t('messages.noRunAssigned'), { hint: t('messages.noRunAssignedHint'), openRuns, chatRunId,
|
|
61
|
+
if (broken) return { ...unreadable(broken.reason), openRuns, chatRunId, unreadableHint };
|
|
62
|
+
if (!open.length) return neutral(unreadableHint ?? t('messages.noOpenRuns'));
|
|
63
|
+
return neutral(t('messages.noRunAssigned'), { hint: t('messages.noRunAssignedHint'), openRuns, chatRunId, unreadableHint,
|
|
44
64
|
openCount: t('fields.openRuns', { count: open.length }) });
|
|
45
65
|
}
|
|
46
66
|
|
|
47
67
|
const position = open.findIndex(item => item.id === run.id);
|
|
48
68
|
const openCount = position >= 0 ? t('fields.position', { position: position + 1, count: open.length }) : t('fields.openRuns', { count: open.length });
|
|
49
69
|
const state = displayState(run, { isTurnActive: input.isTurnActive });
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const reasonParams = { gate: gateTitle(registry, locale, state.reason.gate), decision: t(`decisions.${state.reason.decision}`) };
|
|
70
|
+
const reasonParams = { gate: gateTitle(registry, locale, state.reason.gate), decision: run.blockingText || state.reason.decision,
|
|
71
|
+
reason: state.reason.reason ? t(`unreadable.${state.reason.reason}`) : '' };
|
|
53
72
|
return {
|
|
54
73
|
...base,
|
|
74
|
+
...events(run.id),
|
|
55
75
|
mood: state.mood,
|
|
56
76
|
stateLabel: t(`states.${state.mood}`),
|
|
57
77
|
reason: t(`reasons.${state.reason.key}`, reasonParams),
|
|
@@ -59,12 +79,28 @@ export function buildPanelView(input) {
|
|
|
59
79
|
runId: run.id,
|
|
60
80
|
objective: run.objective,
|
|
61
81
|
isObjectiveExpanded: Boolean(input.isObjectiveExpanded),
|
|
62
|
-
nextStep: run.lifecycle === 'completed' ? null :
|
|
82
|
+
nextStep: run.lifecycle === 'completed' ? null : run.nextText || null,
|
|
83
|
+
unreadableHint,
|
|
63
84
|
origin: t(`origin.${origin}`),
|
|
64
85
|
originKind: origin,
|
|
65
86
|
chatRunId,
|
|
66
87
|
openRuns,
|
|
67
88
|
openCount,
|
|
89
|
+
drift: run.drift?.length ? run.drift.map(item => t('messages.drift', { document: item.document,
|
|
90
|
+
recorded: shortDigest(item.recorded_digest), current: shortDigest(item.current_digest) })) : null,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Pane entries of the journal (decision P1) and the review facts of the newest staging or recording
|
|
95
|
+
// (decision P2); without a readable journal the pane says so and invents nothing. `naming` is
|
|
96
|
+
// { shownRunId, runs }: the shown run's events name no run.
|
|
97
|
+
function eventFields(input, t, naming) {
|
|
98
|
+
const events = (input.events ?? []).slice(0, PANE_EVENTS);
|
|
99
|
+
const gate = value => gateTitle(input.registry, input.locale, value);
|
|
100
|
+
return {
|
|
101
|
+
events: events.length ? events.map(event => `${clockText(Date.parse(event.at))} ${eventText(event, t, { gateTitle: gate, ...naming })}`) : null,
|
|
102
|
+
review: latestReview(events, t),
|
|
103
|
+
eventsHint: input.eventsAvailable === false ? t('messages.eventsUnavailable') : null,
|
|
68
104
|
};
|
|
69
105
|
}
|
|
70
106
|
|
|
@@ -74,10 +110,19 @@ export function terminalText(view, { labels, locale }) {
|
|
|
74
110
|
const lines = [view.title, `${FIGURE_TEXT[view.mood]} ${view.stateLabel}${view.reason ? ` · ${view.reason}` : ''}`];
|
|
75
111
|
if (view.message) lines.push(view.message);
|
|
76
112
|
if (view.hint) lines.push(view.hint);
|
|
113
|
+
if (view.unreadableHint && view.unreadableHint !== view.message) lines.push(view.unreadableHint);
|
|
77
114
|
if (view.gateBar) lines.push(view.gateBar);
|
|
78
115
|
if (view.runId) lines.push(view.origin ? `${view.runId} · ${view.origin}` : view.runId);
|
|
79
116
|
if (view.objective) lines.push(`${t('fields.objective')}: ${view.objective}`);
|
|
80
117
|
if (view.nextStep) lines.push(`${t('fields.nextStep')}: ${view.nextStep}`);
|
|
118
|
+
for (const warning of view.drift ?? []) lines.push(warning);
|
|
119
|
+
if (view.events) lines.push(`${t('fields.events')}:`, ...view.events);
|
|
120
|
+
if (view.review) {
|
|
121
|
+
lines.push(`${t('fields.material')}: ${view.review.summary} · ${view.review.match}${view.review.truncated ? ` · ${view.review.truncated}` : ''}`);
|
|
122
|
+
// The terminal shows the start of the preview too (PRD M1, AC-007; CR finding B10).
|
|
123
|
+
if (view.review.preview) lines.push(...view.review.preview.split('\n').slice(0, TERMINAL_PREVIEW_LINES).map(line => ` ${line}`));
|
|
124
|
+
}
|
|
125
|
+
if (view.eventsHint) lines.push(view.eventsHint);
|
|
81
126
|
if (view.stale) lines.push(view.stale);
|
|
82
127
|
if (view.readAt) lines.push(view.readAt);
|
|
83
128
|
return lines.join('\n');
|
|
@@ -11,6 +11,7 @@ Explicit initialization creates `control_layout: "run-folders-v1"`. This is the
|
|
|
11
11
|
SOT_REGISTRY.md
|
|
12
12
|
CONTEXT_GRAPH.md
|
|
13
13
|
AGENT_QUALITY_CONTRACTS.json
|
|
14
|
+
BRAND.md
|
|
14
15
|
templates/
|
|
15
16
|
planned/<plan_id>/UR.md
|
|
16
17
|
runs/<run_id>/
|
|
@@ -28,6 +29,10 @@ Explicit initialization creates `control_layout: "run-folders-v1"`. This is the
|
|
|
28
29
|
|
|
29
30
|
Configuration, templates and curated project context stay project-wide. A multi-Run closure preview is a target-wide decision proposal under `closure-previews/`; it changes no Run until deliberately applied. Run-owned outputs never use a separate top-level artefacts directory.
|
|
30
31
|
|
|
32
|
+
`BRAND.md` starts as a neutral English worksheet. Complete it with the project's
|
|
33
|
+
own design intent and declare the finished source in `SOT_REGISTRY.md` when it is
|
|
34
|
+
authoritative for design work.
|
|
35
|
+
|
|
31
36
|
`RUN_STATE.md` keeps identity, objective, mode and typed decisions, source bindings and operations. Approval status, current gate, current document references, relationship chains, evidence summaries and inventory are derived when read. They are not separately writable tables or a second state file. A binding embeds its reviewer attestation; no separate RECORD/REVIEW JSON repeats its mapping. A planned handoff records its source in the creation receipt and immutable planning snapshot, without an origin JSON copy.
|
|
32
37
|
|
|
33
38
|
Create a fresh scaffold in an explicitly confirmed existing Git repository:
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Brand and Design Intent
|
|
2
|
+
|
|
3
|
+
Complete this worksheet with confirmed project decisions. Declare the completed
|
|
4
|
+
profile in `SOT_REGISTRY.md` when it is the project's authoritative design source.
|
|
5
|
+
|
|
6
|
+
## Owner and scope
|
|
7
|
+
|
|
8
|
+
Name the accountable owner, the product, and the surfaces and audiences covered.
|
|
9
|
+
|
|
10
|
+
## Design intent
|
|
11
|
+
|
|
12
|
+
Describe what people should understand, feel, or be able to do when using the
|
|
13
|
+
product. Tie each priority to a concrete user task or situation.
|
|
14
|
+
|
|
15
|
+
## Information and visual priorities
|
|
16
|
+
|
|
17
|
+
Explain what deserves emphasis in relevant states and how the project balances
|
|
18
|
+
competing priorities. Record any confirmed constraints and their sources.
|
|
19
|
+
|
|
20
|
+
## Observable checks
|
|
21
|
+
|
|
22
|
+
For each applicable priority, name the scenario, the expected observable outcome,
|
|
23
|
+
and the evidence that would verify it. Record open decisions with their owners.
|
|
24
|
+
|
|
25
|
+
## Related sources
|
|
26
|
+
|
|
27
|
+
Link the project's design system, implementation values, and brand usage policy
|
|
28
|
+
where applicable.
|
|
@@ -69,6 +69,17 @@ visible feedback, blocker/failure behavior, recovery/next action, observable suc
|
|
|
69
69
|
evidence. Specify observable behavior, not implementation. Do not leave the section empty or retain
|
|
70
70
|
placeholders when requesting approval.
|
|
71
71
|
|
|
72
|
+
Use separate field names; never combine them (for example,
|
|
73
|
+
`observable_success_required_evidence` is not `observable_success`). For same-language approval,
|
|
74
|
+
each criterion needs at least one nonempty `observable_success`, `visible_feedback` or
|
|
75
|
+
`expected_effective_state`. Keep applicable UX fields separate as well. Example:
|
|
76
|
+
|
|
77
|
+
```markdown
|
|
78
|
+
- criterion_id: AC-001
|
|
79
|
+
- observable_success: A later list command shows the saved task unchanged.
|
|
80
|
+
- required_evidence: A real CLI test across separate processes.
|
|
81
|
+
```
|
|
82
|
+
|
|
72
83
|
## 6. Non-Goals
|
|
73
84
|
|
|
74
85
|
What remains out of scope?
|
|
@@ -25,6 +25,10 @@ Use stable IDs. If no binding design decision is needed, record one reasoned bul
|
|
|
25
25
|
When a decision selects or changes external technology (framework, library, API, protocol,
|
|
26
26
|
service or major version), name the checked authoritative source, version and check date in its
|
|
27
27
|
rationale.
|
|
28
|
+
Quoted CLI arguments such as `done <id>` are literal syntax. In a decision clause, a labelled
|
|
29
|
+
inline JSON schema/example may use quoted type metavariables such as `"<uuid>"` and
|
|
30
|
+
`"<non-empty string>"`; keep actual choices, rationale and consequence concrete. The complete
|
|
31
|
+
notation and unresolved-prompt boundary are defined in `meta/contracts/sd-definition.md`.
|
|
28
32
|
|
|
29
33
|
## 4. Integration Points
|
|
30
34
|
|
|
@@ -85,8 +85,18 @@ Unknown/unowned partial states remain blocked. Successful setup returns creation
|
|
|
85
85
|
`agdf_run/run.create` creates an unapproved Run from a semantic title and original operation UUID;
|
|
86
86
|
pre-Run `operation-status` resolves a lost response without inventing a second Run.
|
|
87
87
|
`authoring-inputs` returns versioned templates and exact sources with bounded cursors.
|
|
88
|
-
`
|
|
89
|
-
|
|
88
|
+
`authoring-inputs.material_call` supplies a bound form: fill its UTF-8 content and use
|
|
89
|
+
`agdf_record/material.stage` action `put` to seal files of at most 48 KiB each within the 64 KiB whole JSON request bound in one call.
|
|
90
|
+
The Core computes byte counts, material identities and digests. Larger files retain the bounded
|
|
91
|
+
multipart path (16 KiB per part, 128 KiB per file). Each multipart action has its own operation UUID;
|
|
92
|
+
only an identical retry reuses a UUID. Returned `recording_calls` provide the binding and material
|
|
93
|
+
reference; fill only the listed author/review fields. Ready `next_calls` are executable as supplied;
|
|
94
|
+
do not add intake/revision fields to a supplied `continue_delivery` dispatch.
|
|
95
|
+
Pass authored Markdown as UTF-8 string data through structured input. If a host uses JavaScript,
|
|
96
|
+
author with its file-editing tool and pass the UTF-8 file read as the content value; embedding
|
|
97
|
+
the whole document in a backtick literal makes Markdown syntax executable JavaScript syntax.
|
|
98
|
+
This guidance adds no server-side file reader and changes no byte or input limit.
|
|
99
|
+
These Core-owned references feed existing typed writers, including reviewed formal artefacts, unapproved
|
|
90
100
|
UR replacement, Verified Change and closeout. Code edits, actual tests and Git execution remain
|
|
91
101
|
external work; none of these operations grants approval.
|
|
92
102
|
|
|
@@ -246,3 +256,17 @@ They do not qualify an installed host or another OS. The fixed performance test
|
|
|
246
256
|
the actual owned plugin launcher with 20/20 samples and p95 limits of 2500 ms cold /
|
|
247
257
|
1000 ms warm. Performance acceptance and native qualification are separate
|
|
248
258
|
required evidence, not consequences of the topology declaration.
|
|
259
|
+
|
|
260
|
+
The normal MCP path is `next_action.call`: either a ready call forwarded unchanged or a form with named `required_inputs` such as `content`, `title`, `reviewer`, `reviewed` or `response`. The adapter maps those names to the stored canonical payload fields. It retains the original target, Run, revision, permission group and operation UUID; it never fills authored content, review attestations or approval replies. The former competing `submit` form is absent. Raw requests remain accepted for compatibility, but the full original request is exposed only under the explicit `recovery_only` branch, with the exact field map and original UUID. Retain that branch and the actual submitted inputs for uncertain-outcome recovery; do not generate a replacement identity.
|
|
261
|
+
|
|
262
|
+
Verified owned plugin launchers retain offered templates in a private bounded journal under their existing MCP data root. The namespace includes the serving surface, version and server/dispatcher/SDK identity. A reconnect at that same identity can resolve the original reference without a new UUID or refreshed revision. The original 30-minute lifetime is never renewed. No submitted author/review/reply inputs or execution receipts are added to this journal; it is transport storage, not canonical Run State or authority. Direct transports without this verified owner remain connection-local. Private material buffers have their separate existing generation lifetime and still require exact semantic-byte recovery after generation loss.
|
|
263
|
+
|
|
264
|
+
Empty, malformed, unknown and known-expired references remain distinct. An unavailable live reference returns `prepared_call_unknown`, rather than blaming the authored command schema. Store failures are distinguished from missing references. A failed publication of a future reference never discards an already successful operation receipt; its exact original request remains in recovery. Every restored call still passes the current SDK, permission-group, Core and revision checks.
|
|
265
|
+
|
|
266
|
+
For a unique Core-supplied normal next step, the adapter may execute one exact `agdf_inspect` call for `authoring-inputs`, `gate-check` or `operation-contract` and include it as `next_read.result`. `next_action.context_path` names that already-loaded context. The original operation outcome and receipt remain intact if this separate read fails. No dispatch, write, presentation or approval is chained automatically; `agdf_dispatch` is not read-only. Source pagination remains explicit. Internal read attempts/failures are accounted separately from outer MCP invocations in native observations.
|
|
267
|
+
|
|
268
|
+
`authoring-inputs` supports `bundle:true` for bounded multi-document pages. Read every chunk and cursor without a duplicate writer-contract lookup. A retained first-page form is reusable only for the same exact manifest and an available connection reference; otherwise use the supplied first-page read. Page transport does not prove source review.
|
|
269
|
+
|
|
270
|
+
Prepared references also retain explicitly offered `agdf_inspect` reads, including source pages, contract help and original-operation status. Read inputs stay `{}`; the original SDK schema validates the complete supplied request before registration. Target, Run, revision, cursor and original status selection are never inferred or refreshed. The actual `next_read.tool/arguments` remain the record of an already executed read; its separate `next_read.call` is the exact prepared retry. Explicit recovery reads remain Raw for reconnect, and dispatch retains its original schema. No reference changes permission or bypasses canonical validation.
|
|
271
|
+
|
|
272
|
+
Bundled authoring reports use `document_bundle_v2`: `documents` contains complete text, `document_manifest` is metadata only, and `fragments` must be joined by identity and byte offsets across all cursors before editing. Missing content must never be coerced into a replacement string.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agdf/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Local MCP adapter for version-matched AGDF dispatch and control inspection.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"test:contract": "node ./test/worker-build.test.js && node ./test/contract.test.js",
|
|
24
24
|
"test:continuation": "node ./test/continuation.test.js",
|
|
25
|
-
"test:protocol": "node ./test/defaulted-inputs.test.js && node ./test/protocol.test.js && node ./test/ergonomics.test.js && node ./test/skill-names.test.js && node ./test/tool-errors.test.js && node ./test/doctor-observation.test.js",
|
|
25
|
+
"test:protocol": "node ./test/defaulted-inputs.test.js && node ./test/protocol.test.js && node ./test/ergonomics.test.js && node ./test/skill-names.test.js && node ./test/tool-errors.test.js && node ./test/pre-dispatch-failure.test.js && node ./test/companion-journal.test.js && node ./test/doctor-observation.test.js && node ./test/prepared-call-transport.test.js && node ./test/prepared-call-journal.test.js && node --test ./test/next-action.test.js && node ./test/safe-read-continuation.test.js && node ./test/prepared-submission.test.js && node ./test/prepared-reads.test.js && node ./test/prepared-reconnect.test.js",
|
|
26
26
|
"test:safety": "node ./test/safety.test.js && node ./test/worker-lock-release.test.js && node ./test/worker-deadline.test.js",
|
|
27
27
|
"test:cockpit-gating": "node ./test/cockpit-gating.test.js",
|
|
28
28
|
"test:provenance": "node ./test/provenance.test.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@modelcontextprotocol/server": "2.0.0",
|
|
39
|
-
"create-agdf": "0.
|
|
39
|
+
"create-agdf": "0.31.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@modelcontextprotocol/client": "2.0.0"
|
|
@@ -12,6 +12,11 @@ export function startGenerationRuntime({ epoch, generation, channel }) {
|
|
|
12
12
|
return { ...owned, inflight: inflight + (starting ? 1 : 0) + (owned.inflight ?? 0),
|
|
13
13
|
executor: executor?.active ? 1 : 0, uncertain: unknown.size + (owned.uncertain ?? 0), closing };
|
|
14
14
|
}
|
|
15
|
+
// Companion events (SD SDD-006): this generation executed the call, so it journals the final result
|
|
16
|
+
// once, before the result leaves; a failing journal never changes or delays the result.
|
|
17
|
+
function journal(name, args, projected) {
|
|
18
|
+
try { runtime.observeOutcome?.(name, args, projected); } catch { /* notification only */ }
|
|
19
|
+
}
|
|
15
20
|
function send(input, kind, payload) {
|
|
16
21
|
const reply = generationMessage(epoch, generation, kind, payload, {}, input.original_operation_id, input.request_id);
|
|
17
22
|
if (validGenerationMessage(reply, { epoch, generation, reply: true })) channel.send(reply);
|
|
@@ -76,11 +81,15 @@ export function startGenerationRuntime({ epoch, generation, channel }) {
|
|
|
76
81
|
if (input.original_operation_id && result.outcome === 'effect_unknown') unknown.add(input.original_operation_id);
|
|
77
82
|
if (name === 'agdf_inspect' && args.operation === 'operation-status' && result.report?.status === 'recorded'
|
|
78
83
|
&& (result.report.receipt?.operation_id ?? result.report.receipt?.operation?.operation_id) === args.module.split('/').at(-1)) unknown.delete(args.module.split('/').at(-1));
|
|
79
|
-
|
|
84
|
+
const projected = runtime.projectToolResult(name, args, result);
|
|
85
|
+
journal(name, args, projected);
|
|
86
|
+
send(input, 'result', projected);
|
|
80
87
|
} catch (error) {
|
|
81
88
|
const facts = runtime.normalizeFailure(error, { phase });
|
|
82
89
|
if (input.original_operation_id && facts.dispatch !== 'not_dispatched') unknown.add(input.original_operation_id);
|
|
83
|
-
|
|
90
|
+
const projected = runtime.projectToolResult(name, args, runtime.failure(facts.code, name, args, { ...facts, elapsed_ms: performance.now() - started }), facts);
|
|
91
|
+
journal(name, args, projected);
|
|
92
|
+
send(input, 'result', projected);
|
|
84
93
|
} finally { --inflight; }
|
|
85
94
|
}
|
|
86
95
|
} catch (error) { if (input.kind === 'qualify') starting = false; send(input, 'failure', { reason: generationFailureReason(error) }); }
|
|
@@ -73,6 +73,7 @@ export async function runMcpServer({ surface, cockpitDir, cockpitMode, runtime,
|
|
|
73
73
|
const handle = serveAgdfStdio({
|
|
74
74
|
runtime,
|
|
75
75
|
executor: dispatchExecutor,
|
|
76
|
+
preparedCallStore: ownedPublication ? ownedPublisher?.preparedCallStore?.({ surface }) : undefined,
|
|
76
77
|
onerror(code) {
|
|
77
78
|
process.stderr.write(`${code}\n`);
|
|
78
79
|
},
|