create-agdf 0.30.0 → 0.32.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 +436 -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 +119 -0
- package/generated/plugins/agdf/companion/figure.mjs +242 -111
- package/generated/plugins/agdf/companion/gate-bar.mjs +10 -28
- package/generated/plugins/agdf/companion/localization.mjs +15 -32
- package/generated/plugins/agdf/companion/notice.mjs +20 -10
- package/generated/plugins/agdf/companion/register.mjs +310 -66
- package/generated/plugins/agdf/companion/run-state.mjs +89 -90
- package/generated/plugins/agdf/companion/state.mjs +6 -32
- package/generated/plugins/agdf/companion/view.mjs +199 -24
- 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 +14 -3
- package/generated/plugins/agdf/mcp/server/src/generation.js +8 -2
- package/generated/plugins/agdf/mcp/server/src/main.js +5 -1
- 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 +155 -37
- package/generated/plugins/agdf/mcp/server/ui/cockpit.html +130 -33
- package/generated/plugins/agdf/mcp/server/ui/decision-manifest.json +3 -3
- package/generated/plugins/agdf/mcp/server/ui/decision.html +3 -3
- package/generated/plugins/agdf/mcp/server/ui/manifest.json +3 -3
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +436 -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 +14 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +436 -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 +36 -7
- 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 +157 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +38 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +186 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +227 -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/decision-content-placeholder.js +4 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +49 -7
- 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-list.js +10 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-session.js +11 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-work.js +4 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit.js +47 -33
- 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-inspect/work-situation.js +25 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-worker.js +1 -0
- 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-create-command.js +6 -1
- 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 +54 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory.js +12 -27
- 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 +113 -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/control-state/run-title.js +43 -0
- 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 +7 -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 +31 -10
- 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 +5 -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 +358 -203
- 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 +14 -3
- package/generated/plugins/copilot/agdf/mcp/server/src/generation.js +8 -2
- package/generated/plugins/copilot/agdf/mcp/server/src/main.js +5 -1
- 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 +155 -37
- package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +14 -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 +436 -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 +36 -7
- 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 +157 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +38 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +186 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +227 -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/decision-content-placeholder.js +4 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +49 -7
- 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-inspect/work-situation.js +25 -0
- 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-create-command.js +6 -1
- 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 +54 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory.js +12 -27
- 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 +113 -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/control-state/run-title.js +43 -0
- 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 +7 -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 +31 -10
- 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 +436 -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 +14 -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 +5 -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 +36 -7
- 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 +157 -0
- package/runtime/core/lib/companion/figure-state.js +38 -0
- package/runtime/core/lib/companion/journal.js +186 -0
- package/runtime/core/lib/companion/run-view.js +227 -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/decision-content-placeholder.js +4 -1
- package/runtime/core/lib/control-evaluation/gate-check.js +49 -7
- 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-list.js +10 -8
- package/runtime/core/lib/control-inspect/cockpit-session.js +11 -3
- package/runtime/core/lib/control-inspect/cockpit-work.js +4 -2
- package/runtime/core/lib/control-inspect/cockpit.js +47 -33
- 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-inspect/work-situation.js +25 -0
- package/runtime/core/lib/control-read/cockpit-worker.js +1 -0
- 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-create-command.js +6 -1
- package/runtime/core/lib/control-state/run-identity.js +2 -0
- package/runtime/core/lib/control-state/run-inventory-reader.js +54 -5
- package/runtime/core/lib/control-state/run-inventory.js +12 -27
- package/runtime/core/lib/control-state/run-material.js +25 -7
- package/runtime/core/lib/control-state/run-presentation-render.js +113 -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/control-state/run-title.js +43 -0
- package/runtime/core/lib/index.js +3 -1
- package/runtime/core/lib/interaction-catalog-validation.js +7 -1
- package/runtime/core/lib/interaction-catalog.js +8 -0
- package/runtime/core/lib/interaction-presentation.js +31 -10
- 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
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { normalizeTaskTargetSource, TASK_TARGET_SOURCES } from "../task-target-resolution.js";
|
|
12
12
|
import { SKILL_DISPATCH_MAX_OUTPUT_BYTES, SkillDispatchInputError, emptySkillDispatchTiming } from "../skill-dispatch/contract.js";
|
|
13
13
|
import { ARTIFACT_READINESS_GATES, ALL_ACTIVE_OPERATIONS, VARIANT_OPERATION, MODULE_OPERATION, CONTROL_INSPECT_OPERATIONS, GATE_CHECK_VARIANTS, ReadSelectionError, validateReadSelection } from "./selection.js";
|
|
14
|
+
import { CLOSEOUT_AUTHORING_SCOPE } from './selection.js';
|
|
14
15
|
|
|
15
16
|
export const CONTROL_INSPECT_SCHEMA_VERSION = "1";
|
|
16
17
|
export const CONTROL_INSPECT_CONTRACT_VERSION = 1;
|
|
@@ -29,6 +30,7 @@ function deepFreeze(value) {
|
|
|
29
30
|
export const PRESENTATION_OPERATIONS = Object.freeze(['presentation-document', 'presentation-preview']);
|
|
30
31
|
export const BOUND_INSPECT_OPERATIONS = Object.freeze(['artifact-readiness', 'authoring-inputs', 'operation-contract', 'operation-status', 'native-qualification', ...PRESENTATION_OPERATIONS, 'runtime-generations']);
|
|
31
32
|
export const PRESENTATION_CATALOG_MODULE = 'agdf_prepare/presentation.prepare';
|
|
33
|
+
const CLI_MODULE_HINTS = Object.freeze({ 'agdf_approve/run-approve': 'agdf_approve/approval.record' });
|
|
32
34
|
const uuidSchema = { type: 'string', pattern: REVISION_ID_PATTERN.source };
|
|
33
35
|
const cursorSchema = { type: 'string', maxLength: 80, pattern: '^[0-9a-f]{64}:(?:0|[1-9][0-9]{0,6})$' };
|
|
34
36
|
const fieldModel = {
|
|
@@ -43,36 +45,46 @@ const fieldModel = {
|
|
|
43
45
|
expected_revision_id: { help: 'Bound inspections use current gate-check revision. Document/preview reads preserve the original selected catalog or conversation revision.', schema: { $ref: '#/$defs/i' }, description: 'gate-check revision; original for reads.', operations: BOUND_INSPECT_OPERATIONS },
|
|
44
46
|
presentation_id: { help: 'Exact prepared ID from validated catalog or conversation. Never guess, select by timestamp, or prepare a replacement to read.', schema: { $ref: '#/$defs/i' }, description: 'ID from catalog/conversation.', operations: PRESENTATION_OPERATIONS },
|
|
45
47
|
target_id: { help: 'Optional confirmed target hash on target-bound reads; when supplied it must match. Required for presentation reads; never grants authority.', schema: { type: 'string', pattern: '^sha256:[0-9a-f]{64}$' }, description: 'Optional verified target hash.' },
|
|
48
|
+
bundle: { help: 'authoring-inputs only: bounded multi-document pages with exact source bytes.', schema: { type: 'boolean' }, operations: ['authoring-inputs'] },
|
|
49
|
+
authoring_scope: { help: 'Bundled authoring-inputs for a completed structured Run: read only its current OR and QA.', schema: { type: 'string', const: CLOSEOUT_AUTHORING_SCOPE }, operations: ['authoring-inputs'] },
|
|
46
50
|
cursor: { help: 'Omit initially; copy next_cursor. doctor requires all_active; catalog requires its declared module. Never exchange cursor types.', schema: cursorSchema, description: 'Copy next_cursor.', operations: [...PRESENTATION_OPERATIONS, 'operation-contract', 'authoring-inputs', 'doctor'] },
|
|
47
51
|
variant: { help: 'gate-check view only; never records approval.', schema: { enum: [...GATE_CHECK_VARIANTS] }, description: 'gate-check view.', operations: [VARIANT_OPERATION] },
|
|
48
52
|
module: { help: 'contract: advertised module; operation-contract: group/kind; operation-status: original operation UUID from saved receipt, never a new UUID. Setup uses project.initialize/ORIGINAL_UUID without Run/revision; Run operations require Run/revision.', schema: { type: 'string', minLength: 1, maxLength: 64 }, description: 'Contract, group/kind or receipt UUID.', operations: [MODULE_OPERATION, 'operation-contract', 'operation-status'] },
|
|
49
53
|
all_active: { help: 'true: doctor/delivery-map only; false: selected Run.', schema: { type: 'boolean' }, description: 'doctor/delivery-map only.' },
|
|
50
54
|
};
|
|
51
|
-
const selectorKeys = { gate: 'gate', expected_revision_id: 'expectedRevisionId', presentation_id: 'presentationId', target_id: 'targetId', cursor: 'cursor', variant: 'variant', module: 'contractModule', planning: 'planning' };
|
|
55
|
+
const selectorKeys = { gate: 'gate', expected_revision_id: 'expectedRevisionId', presentation_id: 'presentationId', target_id: 'targetId', cursor: 'cursor', variant: 'variant', module: 'contractModule', planning: 'planning', bundle: 'bundle', authoring_scope: 'authoringScope' };
|
|
52
56
|
const moduleOperations = [MODULE_OPERATION, 'operation-contract', 'operation-status'];
|
|
53
57
|
const inputSchema = {
|
|
54
58
|
type: 'object', additionalProperties: false,
|
|
55
59
|
required: ['operation', 'presentation_language', 'working_directory'],
|
|
56
|
-
$defs: {
|
|
60
|
+
$defs: {
|
|
61
|
+
i: uuidSchema,
|
|
62
|
+
b: { not: { enum: CONTROL_INSPECT_OPERATIONS.filter(op => !BOUND_INSPECT_OPERATIONS.includes(op)) } },
|
|
63
|
+
d: { enum: PRESENTATION_OPERATIONS },
|
|
64
|
+
m: { enum: ['operation-contract', 'operation-status'] },
|
|
65
|
+
u: { not: { anyOf: [{ required: ['run_id'] }, { required: ['expected_revision_id'] }] } },
|
|
66
|
+
},
|
|
57
67
|
properties: Object.fromEntries(Object.entries(fieldModel).map(([name, field]) => [name, { ...field.schema, description: field.description }])),
|
|
58
68
|
dependentRequired: { target_source: ['primary_target'], primary_target: ['target_source'], target_id: ['primary_target', 'target_source'] },
|
|
59
69
|
dependentSchemas: Object.fromEntries(Object.entries(fieldModel).filter(([, f]) => f.operations).map(([name, field]) => [name,
|
|
60
|
-
|
|
70
|
+
// Bundle selects authoring-inputs, whose Run binding requires an expected revision.
|
|
71
|
+
name === 'authoring_scope' ? { properties: { bundle: { const: true } }, required: ['bundle', 'run_id'] }
|
|
72
|
+
: name === 'cursor' ? { anyOf: [ { properties: { operation: { enum: [...PRESENTATION_OPERATIONS, 'authoring-inputs'] } } },
|
|
61
73
|
{ properties: { operation: { const: 'doctor' }, all_active: { const: true } }, required: ['all_active'] },
|
|
62
74
|
{ properties: { operation: { const: 'operation-contract' }, module: { const: PRESENTATION_CATALOG_MODULE } } } ] }
|
|
63
75
|
: { properties: { operation: field.operations === BOUND_INSPECT_OPERATIONS ? { $ref: '#/$defs/b' }
|
|
64
76
|
: field.operations === PRESENTATION_OPERATIONS ? { $ref: '#/$defs/d' } : name === 'module' ? { enum: moduleOperations } : { enum: field.operations } } },
|
|
65
77
|
])),
|
|
66
78
|
allOf: [
|
|
67
|
-
{ if: { properties: { operation: { enum: ['project-state', 'planned-inventory', 'planned-entry'] } } }, then: { required: ['target_source', 'primary_target'],
|
|
79
|
+
{ if: { properties: { operation: { enum: ['project-state', 'planned-inventory', 'planned-entry'] } } }, then: { required: ['target_source', 'primary_target'], $ref: '#/$defs/u' } },
|
|
68
80
|
{ if: { properties: { operation: { const: 'planned-entry' } } }, then: { required: ['planning'] } },
|
|
69
|
-
{ if: { required: ['planning'] }, then: { required: ['target_source', 'primary_target'],
|
|
81
|
+
{ if: { required: ['planning'] }, then: { required: ['target_source', 'primary_target'], $ref: '#/$defs/u' } },
|
|
70
82
|
{ not: { properties: { all_active: { const: true } }, required: ['all_active', 'run_id'] } },
|
|
71
83
|
{ anyOf: [{ properties: { all_active: { const: false } } }, { properties: { operation: { enum: [...ALL_ACTIVE_OPERATIONS] } } }] },
|
|
72
84
|
{ if: { properties: { operation: { $ref: '#/$defs/m' } } }, then: { required: ['module'] } },
|
|
73
85
|
{ if: { properties: { operation: { $ref: '#/$defs/b' } } }, then: { required: ['target_source'], anyOf: [
|
|
74
86
|
{ required: ['run_id', 'expected_revision_id'] },
|
|
75
|
-
{
|
|
87
|
+
{ $ref: '#/$defs/u', oneOf: [
|
|
76
88
|
{ properties: { operation: { const: 'operation-status' } } },
|
|
77
89
|
{ properties: { operation: { const: 'operation-contract' }, module: { anyOf: [{ enum: ['agdf_run/run.create', 'agdf_project/project.initialize'] }, { pattern: '/(?:planned_|run\\.create_from_planned)' }] } }, required: ['module'] },
|
|
78
90
|
{ properties: { operation: { const: 'authoring-inputs' } }, required: ['planning'] },
|
|
@@ -85,21 +97,17 @@ const inputSchema = {
|
|
|
85
97
|
|
|
86
98
|
inputSchema.dependentSchemas.operation = { allOf: inputSchema.allOf };
|
|
87
99
|
delete inputSchema.allOf;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
for (const [key, field] of Object.entries(inputSchema.properties)) {
|
|
96
|
-
delete field.description;
|
|
97
|
-
if (conciseHelp[key]) field.description = conciseHelp[key];
|
|
98
|
-
}
|
|
100
|
+
// Full selector help is available on demand; discovery keeps the exact guards.
|
|
101
|
+
for (const field of Object.values(inputSchema.properties)) delete field.description;
|
|
102
|
+
Object.assign(inputSchema.properties.target_source, { description: 'Pair primary_target.' });
|
|
103
|
+
Object.assign(inputSchema.properties.primary_target, { description: 'Confirmed target.' });
|
|
104
|
+
Object.assign(inputSchema.properties.module, { description: 'Contract, group/kind or receipt UUID.' });
|
|
105
|
+
Object.assign(inputSchema.properties.gate, { description: 'Not for gate-check.' });
|
|
106
|
+
Object.assign(inputSchema.properties.target_id, { description: 'Required for docs; gate-check.' });
|
|
99
107
|
|
|
100
108
|
const inspectContract = {
|
|
101
109
|
name: "agdf_inspect",
|
|
102
|
-
description: 'Read
|
|
110
|
+
description: 'Read only. Use next_action.call. Raw bound reads need working_directory,presentation_language,primary_target,target_source. Run status needs run_id+expected_revision_id. Setup omits both.',
|
|
103
111
|
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
104
112
|
inputSchema: projectMcpInputSchema(inputSchema),
|
|
105
113
|
outputSchema: {
|
|
@@ -175,14 +183,42 @@ export function inspectContractHelp() {
|
|
|
175
183
|
});
|
|
176
184
|
}
|
|
177
185
|
|
|
186
|
+
function correctedOperationModule(module) {
|
|
187
|
+
if (typeof module !== 'string' || module.length > 64 || OPERATION_CONTRACT_MODULES.includes(module)) return null;
|
|
188
|
+
const exact = CLI_MODULE_HINTS[module];
|
|
189
|
+
if (exact && OPERATION_CONTRACT_MODULES.includes(exact)) return exact;
|
|
190
|
+
const kind = module.split('/').at(-1);
|
|
191
|
+
const matches = OPERATION_CONTRACT_MODULES.filter(value => value.split('/').at(-1) === kind);
|
|
192
|
+
return matches.length === 1 ? matches[0] : null;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// A new read-only schema lookup for one unambiguous registered owner. This
|
|
196
|
+
// preserves explicit bindings; it never executes or repairs the invalid request.
|
|
197
|
+
export function inspectModuleRecoveryCall(input) {
|
|
198
|
+
if (!input || input.operation !== 'operation-contract') return null;
|
|
199
|
+
const module = correctedOperationModule(input.module);
|
|
200
|
+
const allowed = new Set(['operation', 'module', 'working_directory', 'primary_target', 'target_source',
|
|
201
|
+
'presentation_language', 'run_id', 'expected_revision_id', 'gate', 'target_id']);
|
|
202
|
+
if (!module || Object.keys(input).some(key => !allowed.has(key))) return null;
|
|
203
|
+
for (const key of ['working_directory', 'primary_target', 'target_source', 'run_id'])
|
|
204
|
+
if (!Object.hasOwn(input, key) || schemaDiagnostics(input[key], fieldModel[key].schema).length) return null;
|
|
205
|
+
if (!isAbsolute(input.working_directory) || !isAbsolute(input.primary_target)
|
|
206
|
+
|| typeof input.expected_revision_id !== 'string' || !REVISION_ID_PATTERN.test(input.expected_revision_id)
|
|
207
|
+
|| input.presentation_language !== undefined && schemaDiagnostics(input.presentation_language, fieldModel.presentation_language.schema).length
|
|
208
|
+
|| input.gate !== undefined && !APPROVAL_GATES.includes(input.gate)
|
|
209
|
+
|| input.target_id !== undefined && (typeof input.target_id !== 'string' || !/^sha256:[0-9a-f]{64}$/u.test(input.target_id))) return null;
|
|
210
|
+
return { tool: 'agdf_inspect', arguments: { ...input, module } };
|
|
211
|
+
}
|
|
212
|
+
|
|
178
213
|
export function inspectInputValidationHint(input) {
|
|
179
214
|
if (!input || typeof input !== 'object' || !CONTROL_INSPECT_OPERATIONS.includes(input.operation)) return '';
|
|
180
215
|
const operation = input.operation, messages = [];
|
|
216
|
+
let diagnosedModule = input.module;
|
|
181
217
|
if (operation === 'operation-contract' && typeof input.module === 'string' && input.module.length <= 64
|
|
182
218
|
&& !OPERATION_CONTRACT_MODULES.includes(input.module)) {
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
messages.push(
|
|
219
|
+
const correction = correctedOperationModule(input.module);
|
|
220
|
+
if (correction) diagnosedModule = correction; // Help only; the original invalid request remains rejected.
|
|
221
|
+
messages.push(correction ? `Use module ${correction}; the original module is invalid and was not executed.`
|
|
186
222
|
: 'Read contract without module for the registered operation_modules; do not guess a group/kind.');
|
|
187
223
|
}
|
|
188
224
|
for (const [name, field] of Object.entries(fieldModel)) {
|
|
@@ -194,8 +230,8 @@ export function inspectInputValidationHint(input) {
|
|
|
194
230
|
// Diagnose the selected operation, rather than making the model interpret
|
|
195
231
|
// errors from every alternative of the discovery schema's oneOf branches.
|
|
196
232
|
const unboundContract = operation === 'operation-contract' &&
|
|
197
|
-
(['agdf_run/run.create', 'agdf_project/project.initialize'].includes(
|
|
198
|
-
|| OPERATION_CONTRACT_MODULES.includes(
|
|
233
|
+
(['agdf_run/run.create', 'agdf_project/project.initialize'].includes(diagnosedModule)
|
|
234
|
+
|| OPERATION_CONTRACT_MODULES.includes(diagnosedModule) && /\/(?:planned_|run\.create_from_planned)/u.test(diagnosedModule));
|
|
199
235
|
const bound = BOUND_INSPECT_OPERATIONS.includes(operation) && !unboundContract
|
|
200
236
|
&& !(operation === 'operation-status' && !input.run_id && !input.expected_revision_id)
|
|
201
237
|
&& !(operation === 'authoring-inputs' && input.planning);
|
|
@@ -254,6 +290,7 @@ export function parseControlInspectFunctionArguments(argumentsValue, trustedCont
|
|
|
254
290
|
|
|
255
291
|
// Shared language, target and read-selection rules; errors carry the invalid field.
|
|
256
292
|
export function normalizeControlInspectInput(input) {
|
|
293
|
+
if (input.bundle !== undefined && typeof input.bundle !== 'boolean') throw new SkillDispatchInputError('bundle', 'bundle must be boolean');
|
|
257
294
|
const operation = requireText(input.operation, "operation", 64);
|
|
258
295
|
if (!CONTROL_INSPECT_OPERATIONS.includes(operation)) throw new SkillDispatchInputError("operation", `Unsupported inspect operation: ${operation}`);
|
|
259
296
|
let requestedPresentationLanguage;
|
|
@@ -276,6 +313,9 @@ export function normalizeControlInspectInput(input) {
|
|
|
276
313
|
throw new SkillDispatchInputError('target_id', 'A valid target hash requires a confirmed target');
|
|
277
314
|
const runId = input.runId || null;
|
|
278
315
|
const planning = input.planning;
|
|
316
|
+
if (input.authoringScope !== undefined && (input.authoringScope !== CLOSEOUT_AUTHORING_SCOPE
|
|
317
|
+
|| input.bundle !== true || !runId || planning !== undefined))
|
|
318
|
+
throw new SkillDispatchInputError('authoring_scope', 'Closeout scope requires a bundled Run read');
|
|
279
319
|
if (planning !== undefined && (schemaDiagnostics(planning, PLANNING_SCOPE_SCHEMA).length || runId || input.expectedRevisionId !== undefined || input.gate !== undefined
|
|
280
320
|
|| !primaryTarget || !fieldModel.planning.operations.includes(operation))) throw new SkillDispatchInputError('planning', 'Planning requires one exact pre-Run source scope and confirmed target; no Run/revision/gate');
|
|
281
321
|
if (operation === 'operation-status' && Boolean(planning) !== /^(?:planned_ur\.|run\.create_from_planned\/)/u.test(input.contractModule ?? ''))
|
|
@@ -336,7 +376,7 @@ export function normalizeControlInspectInput(input) {
|
|
|
336
376
|
target_source: targetSource,
|
|
337
377
|
primary_target: primaryTarget,
|
|
338
378
|
run_id: runId,
|
|
339
|
-
planning,
|
|
379
|
+
planning, bundle: input.bundle, authoring_scope: input.authoringScope,
|
|
340
380
|
gate: input.gate,
|
|
341
381
|
expected_revision_id: input.expectedRevisionId,
|
|
342
382
|
presentation_id: input.presentationId, target_id: input.targetId, cursor: input.cursor,
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { resolveTaskTarget } from '../task-target-resolution.js';
|
|
2
|
+
import { preparedCommandCall } from '../control-state/prepared-control-calls.js';
|
|
3
|
+
import { inspectUxIntentDecision, UX_DECISION_FORMAT } from '../control-evaluation/definition-sources.js';
|
|
4
|
+
import { validateRunCommand } from '../control-state/run-command-schema.js';
|
|
5
|
+
import { inspectAuthoringInputs } from './authoring-inputs.js';
|
|
6
|
+
|
|
7
|
+
// Mirrors an explicit author declaration; never chooses a judgement or review.
|
|
8
|
+
export function withUxSourceDecision(form, content) {
|
|
9
|
+
const observed = inspectUxIntentDecision(content);
|
|
10
|
+
const source_validation = { ...observed, format: UX_DECISION_FORMAT, authorizes: false };
|
|
11
|
+
if (!observed.well_formed || !observed.supported || observed.decision === 'not_applicable') return {
|
|
12
|
+
source_validation: { ...source_validation, recordable: false,
|
|
13
|
+
reason: !observed.well_formed ? 'ux_decision_malformed' : 'ux_decision_not_supported_for_required_analysis',
|
|
14
|
+
instruction: 'Correct the explicit - decision: field in the authored report, then stage the corrected bytes with the new material_call. No canonical record was attempted; choose ready or blocked from actual analysis, never from this diagnostic.' } };
|
|
15
|
+
const filled = structuredClone(form);
|
|
16
|
+
filled.call.arguments.command.payload.decision = observed.decision;
|
|
17
|
+
filled.required_inputs = filled.required_inputs.filter(p => p !== '/command/payload/decision');
|
|
18
|
+
filled.state = validateRunCommand(filled.call.tool, filled.call.arguments).length ? 'requires_author_input' : 'ready';
|
|
19
|
+
return { form: filled, source_validation: { ...source_validation, recordable: true,
|
|
20
|
+
decision_origin: 'exact explicit author declaration in staged source; not generated judgement' } };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Reuse the canonical author/source selection, including analytical prerequisites
|
|
24
|
+
// at an outer gate. Transport itself cannot choose a future/protected writer.
|
|
25
|
+
export function withMaterialRecordingCalls(input, result) {
|
|
26
|
+
if (result.outcome !== 'accepted' || input.planning || !['put', 'seal'].includes(input.command.payload.action)) return result;
|
|
27
|
+
try {
|
|
28
|
+
const target = resolveTaskTarget({ workingDirectory: input.working_directory, primaryTarget: input.primary_target, targetSource: input.target_source });
|
|
29
|
+
if (target.resolution_state !== 'resolved') return result;
|
|
30
|
+
const authoring = inspectAuthoringInputs(target.governance_target, input);
|
|
31
|
+
if (!authoring.available || authoring.revision_id !== input.expected_revision_id) return result;
|
|
32
|
+
const slot = authoring.material_call?.call.arguments.command.payload.files[0].slot;
|
|
33
|
+
const files = (result.family_result.files ?? []).filter(file => file.reference && file.slot === slot);
|
|
34
|
+
if (files.length !== 1 || !authoring.formats?.available) return result;
|
|
35
|
+
const { group, kind } = authoring.formats;
|
|
36
|
+
if (kind === 'closeout.record') {
|
|
37
|
+
if (!['structured_delivery', 'structured_slice'].includes(authoring.mode)
|
|
38
|
+
|| authoring.next_operation?.type !== 'record_closeout' || authoring.authoring_owner !== 'OR' || slot !== 'OR') return result;
|
|
39
|
+
} else if (!['step.record', 'artefact.record', 'ur_draft.replace'].includes(kind)) return result;
|
|
40
|
+
const form = preparedCommandCall(group, kind, input,
|
|
41
|
+
{ gate: authoring.authoring_owner, material: files[0].reference, recording: authoring.recording });
|
|
42
|
+
if (kind === 'closeout.record' && form?.state !== 'ready') return result;
|
|
43
|
+
if (form && authoring.authoring_owner === 'UX Intent Definition' && input.command.payload.action === 'put') {
|
|
44
|
+
const text = input.command.payload.files.find(file => file.slot === slot)?.content;
|
|
45
|
+
if (typeof text === 'string') {
|
|
46
|
+
const checked = withUxSourceDecision(form, text);
|
|
47
|
+
return { ...result, source_validation: checked.source_validation,
|
|
48
|
+
...(checked.form ? { recording_calls: [{ slot, ...checked.form }] }
|
|
49
|
+
: { recording_calls: [], material_call: authoring.material_call }) };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return form && !form.required_inputs.includes('/command/payload') ? { ...result, recording_calls: [{ slot, ...form }] } : result;
|
|
53
|
+
} catch { return result; } // Guidance cannot conceal an accepted private transfer.
|
|
54
|
+
}
|
|
@@ -37,7 +37,8 @@ export function inspectProjectState(root, input, gitObservation) {
|
|
|
37
37
|
? projectOperationStatusCall({ ...input, operation_id: original }) : null;
|
|
38
38
|
const report = { available: true, target_id, repository, plan: inspectCanonicalInitializationPlan(), ...state,
|
|
39
39
|
setup: { tool: 'agdf_project', kind: 'project.initialize', binding: { schema_version: '1', assurance: 'cooperative_local', ...common, target_id },
|
|
40
|
-
required_agent_fields: ['operation_id'], requires_explicit_intent: true }, next_calls:
|
|
40
|
+
required_agent_fields: ['operation_id'], requires_explicit_intent: true }, next_calls: next ? [next] : [],
|
|
41
|
+
...(statusCall ? { recovery_only: { status_call: statusCall, authorizes: false } } : {}),
|
|
41
42
|
...(input.operation === 'operation-status' ? { operation_id: input.operation_id, status: state.operation_status, current_setup: state.status } : {}),
|
|
42
43
|
...(state.status === 'pending' ? { recovery: { action: 'replay_original', operation_id: state.operation.operation_id,
|
|
43
44
|
request_digest: state.operation.request_digest, instruction: 'Replay only the saved original project.initialize UUID/payload. Owned stage, target, plan and producer are revalidated before any effect.', authorizes: false } } : {}),
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Read-only run classification shared by the Codex cockpit and the companion run view (companion core
|
|
2
|
+
// SDD-001, SDD-003). It lives apart from the cockpit so every runtime profile carries it, Copilot
|
|
3
|
+
// included, whose projection leaves the private cockpit out. Nothing here evaluates a gate rule.
|
|
4
|
+
import { ENDED_LIFECYCLES } from '../control-state/run-operations.js';
|
|
5
|
+
|
|
6
|
+
// The read-failure codes passed through unchanged, and every code `boundedCode` can return.
|
|
7
|
+
const READ_FAILURE_CODES = Object.freeze(['resource_denied', 'source_changed', 'timeout', 'resource_limit', 'read_failed']);
|
|
8
|
+
export const BOUNDED_READ_CODES = Object.freeze(['control_layout_unsupported', 'run_version_unsupported', 'control_invalid', ...READ_FAILURE_CODES]);
|
|
9
|
+
|
|
10
|
+
// Bounded reason code of a read failure.
|
|
11
|
+
export function boundedCode(error) {
|
|
12
|
+
const code = error.code ?? error.message;
|
|
13
|
+
if (code === 'AGDF_CONTROL_LAYOUT_UNSUPPORTED' || code === 'control_layout_unsupported') return 'control_layout_unsupported';
|
|
14
|
+
if (code === 'AGDF_RUN_VERSION_UNSUPPORTED') return 'run_version_unsupported';
|
|
15
|
+
// The configuration owner's codes (resources/configuration.js configurationError).
|
|
16
|
+
if (code === 'AGDF_CONTROL_LAYOUT_INVALID' || code === 'configuration_invalid') return 'control_invalid';
|
|
17
|
+
return READ_FAILURE_CODES.includes(error.code) ? error.code : 'read_failed';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Read-only projection of the evaluated decision, never a second gate evaluator.
|
|
21
|
+
// Doctor warnings are already considered by evaluateGateCheck; they are not a UI veto.
|
|
22
|
+
export function projectCockpitAssessment(report, lifecycle) {
|
|
23
|
+
const state = ENDED_LIFECYCLES.includes(lifecycle) ? 'ended'
|
|
24
|
+
: lifecycle === 'completed' ? report.completion?.fulfilled === true ? 'completed' : 'unconfirmed'
|
|
25
|
+
: lifecycle !== 'active' ? 'unconfirmed'
|
|
26
|
+
: report.status === 'blocked' || (report.blocking_reason && report.blocking_reason !== 'none')
|
|
27
|
+
|| (report.missing_approval && report.missing_approval !== 'none') ? 'blocked'
|
|
28
|
+
: report.status === 'open' && report.blocking_reason === 'none' && report.missing_approval === 'none' ? 'open'
|
|
29
|
+
: 'unconfirmed';
|
|
30
|
+
return { state, authorizes: false };
|
|
31
|
+
}
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
export const ARTIFACT_READINESS_GATES = Object.freeze(['UR', 'PRD', 'SD', 'TP']);
|
|
4
4
|
export const CONTROL_INSPECT_OPERATIONS = Object.freeze(["doctor", "gate-check", "delivery-map", "contract", "artifact-readiness", "authoring-inputs", "operation-contract", "operation-status", "native-qualification", "presentation-document", "presentation-preview", "runtime-generations", "project-state", "inventory", "planned-inventory", "planned-entry"]);
|
|
5
|
+
export const CLOSEOUT_AUTHORING_SCOPE = 'delivery-closeout';
|
|
6
|
+
|
|
7
|
+
export function isCompletedStructuredCloseout(control, mode) {
|
|
8
|
+
return control.current_gate === 'OR' && control.completion?.fulfilled === true
|
|
9
|
+
&& ['structured_delivery', 'structured_slice'].includes(mode);
|
|
10
|
+
}
|
|
5
11
|
export const ALL_ACTIVE_OPERATIONS = Object.freeze(["doctor", "delivery-map"]);
|
|
6
12
|
export const VARIANT_OPERATION = "gate-check";
|
|
7
13
|
export const MODULE_OPERATION = "contract";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { baseResult, bindHostAction } from "./result.js";
|
|
2
2
|
import { inspectArtefactRecordingMode } from '../control-state/run-artefact-recording.js';
|
|
3
|
+
import { preparedCommandCall } from '../control-state/prepared-control-calls.js';
|
|
3
4
|
import { inspectProjectState } from './project-state.js';
|
|
4
5
|
import process from "node:process";
|
|
5
6
|
import { DISPATCH_RECOVERY } from "../interaction-catalog.js";
|
|
@@ -10,8 +11,9 @@ import { readRuntimeContract, runtimeContractModules } from "../resources/contra
|
|
|
10
11
|
import { renderSkillDispatchInputRecovery, renderSkillDispatchRecovery, renderTaskTargetOrientation, renderActiveRunInventory, renderRunInventory } from "../interaction-presentation.js";
|
|
11
12
|
import { resolveTaskTarget, TaskTargetInputError } from "../task-target-resolution.js";
|
|
12
13
|
import { SKILL_DISPATCH_PRESENTATION_LANGUAGE_RECOVERY, SkillDispatchInputError, emptySkillDispatchTiming } from "../skill-dispatch/contract.js";
|
|
13
|
-
import { CONTROL_INSPECT_CONTRACT_VERSION, CONTROL_INSPECT_SCHEMA_VERSION, ReadSelectionError, normalizeControlInspectInput, inspectContractHelp, OPERATION_CONTRACT_MODULES, PRESENTATION_CATALOG_MODULE } from "./contract.js";
|
|
14
|
+
import { CONTROL_INSPECT_CONTRACT_VERSION, CONTROL_INSPECT_SCHEMA_VERSION, ReadSelectionError, normalizeControlInspectInput, inspectContractHelp, inspectModuleRecoveryCall, OPERATION_CONTRACT_MODULES, PRESENTATION_CATALOG_MODULE } from "./contract.js";
|
|
14
15
|
import { RUN_COMMAND_DESCRIPTORS, operationContract } from '../control-state/run-command-contract.js';
|
|
16
|
+
import { PROPOSAL_COMMAND_KINDS, PROPOSAL_MATERIAL_SLOT } from '../control-state/run-command-schema.js';
|
|
15
17
|
import { inspectRunOperation } from '../control-state/run-operation-status.js';
|
|
16
18
|
import { resolveControlCommandTarget } from '../control-state/approval-command-contract.js';
|
|
17
19
|
import { readRunState } from '../control-evaluation/run-state.js';
|
|
@@ -132,6 +134,19 @@ export function createControlInspectService(dependencies = {}) {
|
|
|
132
134
|
result.diagnostics = [{ code: "inspect_input_invalid", field,
|
|
133
135
|
...(inputError?.allowedValues?.length ? { allowed_values: [...inputError.allowedValues] } : {}),
|
|
134
136
|
}];
|
|
137
|
+
if (field === 'module') {
|
|
138
|
+
const supplied = { operation: rawInput.operation,
|
|
139
|
+
...Object.fromEntries([['module', 'contractModule'], ['working_directory', 'workingDirectory'],
|
|
140
|
+
['primary_target', 'primaryTarget'], ['target_source', 'targetSource'], ['presentation_language', 'presentationLanguage'],
|
|
141
|
+
['run_id', 'runId'], ['expected_revision_id', 'expectedRevisionId'], ['gate', 'gate'], ['target_id', 'targetId']]
|
|
142
|
+
.filter(([, key]) => rawInput[key] !== undefined).map(([field, key]) => [field, rawInput[key]])) };
|
|
143
|
+
// Preserve unsupported selectors too, so they prevent a misleading
|
|
144
|
+
// executable suggestion rather than disappearing from the new lookup.
|
|
145
|
+
for (const [field, key] of [['presentation_id', 'presentationId'], ['cursor', 'cursor'], ['planning', 'planning'], ['all_active', 'allActive']])
|
|
146
|
+
if (rawInput[key] !== undefined) supplied[field] = rawInput[key];
|
|
147
|
+
const next = inspectModuleRecoveryCall(supplied);
|
|
148
|
+
if (next) result.recovery.next_calls = [next];
|
|
149
|
+
}
|
|
135
150
|
return bindHostAction(result);
|
|
136
151
|
}
|
|
137
152
|
timing.input_ms = round(milliseconds(started, now()));
|
|
@@ -208,7 +223,7 @@ export function createControlInspectService(dependencies = {}) {
|
|
|
208
223
|
if (!valid) return { report: { available: false, reason: 'operation_binding_stale_or_invalid', authorizes: false }, presentation: null };
|
|
209
224
|
if (input.operation === 'runtime-generations') return { report: dependencies.runtimeControl?.status()
|
|
210
225
|
?? { available: false, reason: 'connection_control_unavailable', authorizes: false }, presentation: null };
|
|
211
|
-
const decision = gateCheck(target.governance_target, { runId: input.run_id, presentationLanguage: input.
|
|
226
|
+
const decision = gateCheck(target.governance_target, { runId: input.run_id, presentationLanguage: input.presentation_language });
|
|
212
227
|
return { report: { available: true, run_id: input.run_id, revision_id: state.meta.revision_id,
|
|
213
228
|
ui_rendering_support: 'unknown', action_qualification: { qualified: false, reason: 'host_context_unavailable', authorizes: false },
|
|
214
229
|
business_readiness: { current_gate: decision.current_gate, status: decision.status,
|
|
@@ -221,15 +236,27 @@ export function createControlInspectService(dependencies = {}) {
|
|
|
221
236
|
next_calls: [{ tool: input.group, kind: input.kind, instruction: contract.planning_capture?.instructions
|
|
222
237
|
?? 'Use the confirmed planning scope and original UUID; no Run/revision. Planning never approves a gate. Start a Run only from a deliberately selected complete source.' }] }, presentation: null };
|
|
223
238
|
}
|
|
224
|
-
if (['agdf_run', 'agdf_project'].includes(input.group) && !input.run_id)
|
|
239
|
+
if (['agdf_run', 'agdf_project'].includes(input.group) && !input.run_id) {
|
|
240
|
+
const prepared = preparedCommandCall(input.group, input.kind, { ...input, presentation_language: input.presentation_language,
|
|
241
|
+
target_id: resolveControlCommandTarget(target.governance_target).target_id });
|
|
242
|
+
return { report: { ...operationContract(input.group, input.kind),
|
|
225
243
|
binding: { target_id: resolveControlCommandTarget(target.governance_target).target_id },
|
|
226
|
-
|
|
244
|
+
prepared_call: prepared, next_calls: prepared?.state === 'ready' ? [prepared.call] : [],
|
|
245
|
+
next_action: input.group === 'agdf_project' ? 'Explicit fixed setup only. No Run, repair, installation or approval.'
|
|
246
|
+
: 'Fill the prepared title from the authorized original request, preserving its UUID and target. No prior Run/revision.' }, presentation: null };
|
|
247
|
+
}
|
|
227
248
|
const state = readRunState(target.governance_target, { runId: input.run_id });
|
|
228
249
|
const targetId = resolveControlCommandTarget(target.governance_target).target_id;
|
|
229
250
|
const valid = parseRunState(state.content, input.run_id).valid && state.meta?.revision_id === input.expected_revision_id
|
|
230
251
|
&& runSealState(target.governance_target, state.content).status === 'valid';
|
|
231
252
|
return { report: valid ? { ...operationContract(input.group, input.kind, { gate: input.gate ?? state.current_gate }),
|
|
253
|
+
prepared_call: preparedCommandCall(input.group, input.kind, { ...input, presentation_language: input.presentation_language, target_id: targetId },
|
|
254
|
+
{ gate: input.gate ?? state.current_gate, recording: inspectArtefactRecordingMode(state, input.gate ?? state.current_gate) }),
|
|
232
255
|
...(input.kind === 'artefact.record' ? { recording: inspectArtefactRecordingMode(state, input.gate ?? state.current_gate) } : {}),
|
|
256
|
+
// Revision proposals are staged in their own slot. Offer that staging form with the
|
|
257
|
+
// revision commands and beside a material.stage form, whose prepared_call uses the gate's slot.
|
|
258
|
+
...(PROPOSAL_COMMAND_KINDS.includes(input.kind) || input.kind === 'material.stage' ? { material_call: preparedCommandCall('agdf_record', 'material.stage',
|
|
259
|
+
{ ...input, presentation_language: input.presentation_language, target_id: targetId }, { gate: PROPOSAL_MATERIAL_SLOT }) } : {}),
|
|
233
260
|
...(input.contract_module === PRESENTATION_CATALOG_MODULE ? {
|
|
234
261
|
inspect_contract: inspectContractHelp(),
|
|
235
262
|
presentation_catalog: readPresentationCatalog(target.governance_target, { runId: input.run_id,
|
|
@@ -243,7 +270,7 @@ export function createControlInspectService(dependencies = {}) {
|
|
|
243
270
|
quality_records: sourceRevisionQualityFacts(state, path => { try { return readHistoryBytes(target.governance_target, path).toString('utf8'); } catch { return undefined; } }),
|
|
244
271
|
} } : {}),
|
|
245
272
|
binding: { target_id: targetId, run_id: input.run_id, expected_revision_id: input.expected_revision_id },
|
|
246
|
-
current: (() => { const decision = gateCheck(target.governance_target, { runId: input.run_id, presentationLanguage: input.
|
|
273
|
+
current: (() => { const decision = gateCheck(target.governance_target, { runId: input.run_id, presentationLanguage: input.presentation_language });
|
|
247
274
|
return { current_gate: decision.current_gate, lifecycle: state.meta.lifecycle, status: decision.status, missing_approval: decision.missing_approval,
|
|
248
275
|
next_operation: decision.next_operation, completion: decision.completion,
|
|
249
276
|
artefacts: [...state.artefacts].filter(([type]) => ['UR', 'PRD', 'SD', 'TP', 'Brownfield Review', 'UX Intent Definition', 'Brownfield Analysis', 'CD+Tests', 'TP Review', 'Clean Implementation Review', 'CR', 'QA', 'OR'].includes(type))
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Presentation of one canonical control assessment. This module never evaluates or authorizes work.
|
|
2
|
+
export function projectWorkSituation({ assessment, gate, blockingReason, missingApproval, closureOutcome, persistedGate, persistedNext, nextAllowedAction } = {}) {
|
|
3
|
+
if (persistedGate !== undefined && (persistedGate !== gate || !(assessment === 'ended' && closureOutcome) && persistedNext !== nextAllowedAction)) assessment = 'unconfirmed';
|
|
4
|
+
let kind = 'unconfirmed';
|
|
5
|
+
if (assessment === 'open') kind = gate === 'CD+Tests' ? 'in_progress' : 'open';
|
|
6
|
+
else if (assessment === 'blocked') {
|
|
7
|
+
kind = blockingReason === 'presentation_version_decided' ? 'revision_required'
|
|
8
|
+
: blockingReason === 'none' && missingApproval === `Approval: ${gate}` ? 'approval_required'
|
|
9
|
+
: gate === 'UR' && blockingReason === 'AGDF_UR_REQUIREMENTS_INCOMPLETE' ? 'clarification_required' : 'blocked';
|
|
10
|
+
} else if (assessment === 'completed') kind = 'completed';
|
|
11
|
+
else if (assessment === 'ended' && closureOutcome) kind = 'ended';
|
|
12
|
+
const values = {
|
|
13
|
+
revision_required: ['clarification_required', 'Revision required', 'Überarbeitung nötig'],
|
|
14
|
+
approval_required: ['decision_required', 'Approval required', 'Freigabe erforderlich'],
|
|
15
|
+
clarification_required: ['clarification_required', 'Clarification required', 'Klärung erforderlich'],
|
|
16
|
+
in_progress: ['in_progress', 'In implementation', 'In Umsetzung'],
|
|
17
|
+
open: ['in_progress', 'Work may continue', 'Weiterarbeit offen'],
|
|
18
|
+
blocked: ['blocked', 'Blocked', 'Blockiert'],
|
|
19
|
+
completed: ['none', 'Completed', 'Vorhaben abgeschlossen'],
|
|
20
|
+
ended: ['none', 'Ended', 'Vorhaben beendet'],
|
|
21
|
+
unconfirmed: ['unclear', 'Current conditions unconfirmed', 'Aktuelle Voraussetzungen nicht bestätigt'],
|
|
22
|
+
};
|
|
23
|
+
const [code, en, de] = values[kind];
|
|
24
|
+
return { kind, code, en, de };
|
|
25
|
+
}
|
|
@@ -18,6 +18,7 @@ parentPort.on('message', ({ id, operation, selector, snapshot, input }) => {
|
|
|
18
18
|
: operation === 'planned' ? reader.planned(selector, snapshot)
|
|
19
19
|
: operation === 'artifact_readiness' ? reader.artifactReadiness(input.run_id, snapshot, input.gate, input.expected_revision_id)
|
|
20
20
|
: operation === 'document' ? reader.document(selector, snapshot, input?.run_id)
|
|
21
|
+
: operation === 'preview' ? reader.preview(selector, snapshot, input?.run_id)
|
|
21
22
|
: operation === 'freshness' ? reader.freshness(snapshot)
|
|
22
23
|
: operation === 'context' ? reader.context(selector, snapshot)
|
|
23
24
|
: operation === 'prepare_context' ? reader.prepareContext(input)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Shared guidance for passing authored bytes; never an additional file reader,
|
|
2
|
+
// an authoring result or authority to record an artefact.
|
|
3
|
+
export const AUTHORING_TEXT_HANDOFF = 'Pass Markdown as UTF-8 string data, never executable code. Prefer structured tool input. If the host uses JavaScript, author with its file-editing tool and pass a UTF-8 file read as content; never embed the document in backtick literals.';
|
|
@@ -2,7 +2,7 @@ import { CURRENT_LAYOUT } from './run-identity.js';
|
|
|
2
2
|
// Shared representation, not a file owner or replay ledger. Existing operation
|
|
3
3
|
// families alone validate, persist and recover their versioned records.
|
|
4
4
|
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
5
|
-
import { isAbsolute } from 'node:path';
|
|
5
|
+
import { isAbsolute, posix, win32 } from 'node:path';
|
|
6
6
|
import { canonicalJson, exactObject, DIGEST_PATTERN } from './approval-command-contract.js';
|
|
7
7
|
import { runCommandRequestDigest } from './run-command-schema.js';
|
|
8
8
|
import { canonicalizeLanguageTag } from '../interaction-presentation.js';
|
|
@@ -28,7 +28,9 @@ export function createInputResolution(original, effective, configuration) {
|
|
|
28
28
|
operation_id: original.operation_id ?? null, kind: original.command?.kind ?? null,
|
|
29
29
|
fields: Object.fromEntries(paths.filter(path => get(original, path) === undefined && get(effective, path) !== undefined).map(path => [path, get(effective, path)])), configuration };
|
|
30
30
|
}
|
|
31
|
-
export function validInputResolution(value) {
|
|
31
|
+
export function validInputResolution(value, { persisted = false } = {}) {
|
|
32
|
+
// Stored paths describe the writer's host. Live requests still use the serving host's paths.
|
|
33
|
+
const absolutePath = persisted ? path => posix.isAbsolute(path) || win32.isAbsolute(path) : isAbsolute;
|
|
32
34
|
if (!exactObject(value, ['schema_version', 'logical_digest', 'effective_digest', 'operation_id', 'kind', 'fields', 'configuration']) || value.schema_version !== 1
|
|
33
35
|
|| !(value.operation_id === null || typeof value.operation_id === 'string' && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u.test(value.operation_id))
|
|
34
36
|
|| !(value.kind === null || typeof value.kind === 'string' && /^[a-z_]+\.[a-z_]+$/u.test(value.kind) && value.kind.length <= 64)
|
|
@@ -36,14 +38,14 @@ export function validInputResolution(value) {
|
|
|
36
38
|
|| Buffer.byteLength(canonicalJson(value)) > 8192 || Object.keys(value.fields).some(key => !paths.includes(key))) return false;
|
|
37
39
|
const f = value.fields, c = value.configuration;
|
|
38
40
|
if (Object.hasOwn(f, 'presentation_language') && !tag(f.presentation_language)
|
|
39
|
-
|| Object.hasOwn(f, 'working_directory') && (typeof f.working_directory !== 'string' || !
|
|
41
|
+
|| Object.hasOwn(f, 'working_directory') && (typeof f.working_directory !== 'string' || !absolutePath(f.working_directory) || f.working_directory.length > 4096)
|
|
40
42
|
|| Object.hasOwn(f, 'schema_version') && f.schema_version !== '1'
|
|
41
43
|
|| Object.hasOwn(f, 'assurance') && f.assurance !== 'cooperative_local'
|
|
42
44
|
|| Object.hasOwn(f, 'variant') && !['status-card', 'approval-envelope'].includes(f.variant)
|
|
43
45
|
|| Object.hasOwn(f, 'command.payload.route') && !['markdown', 'automatic', 'fallback'].includes(f['command.payload.route'])) return false;
|
|
44
46
|
if (!exactObject(c, ['root', 'control', 'config_digest', 'values', 'sources', 'defaults_digest', 'control_layout'])
|
|
45
47
|
|| (c.control === 'active' ? c.control_layout !== CURRENT_LAYOUT : c.control_layout !== null)
|
|
46
|
-
|| !(c.root === null || typeof c.root === 'string' &&
|
|
48
|
+
|| !(c.root === null || typeof c.root === 'string' && absolutePath(c.root) && c.root.length <= 4096) || !['inactive', 'active'].includes(c.control)
|
|
47
49
|
|| !(c.config_digest === null || hash(c.config_digest)) || !hash(c.defaults_digest)
|
|
48
50
|
|| !exactObject(c.values, preferenceKeys) || !exactObject(c.sources, preferenceKeys)
|
|
49
51
|
|| !tag(c.values.chat_language) || !tag(c.values.artifact_language)
|
|
@@ -82,7 +84,7 @@ export function resolutionRecord(record) {
|
|
|
82
84
|
const { input_resolution: extension, ...body } = record;
|
|
83
85
|
if (!plain(extension)) return null;
|
|
84
86
|
const { record_version, ...resolution } = extension;
|
|
85
|
-
if (!['string', 'number'].includes(typeof record_version) || !validInputResolution(resolution)) return null;
|
|
87
|
+
if (!['string', 'number'].includes(typeof record_version) || !validInputResolution(resolution, { persisted: true })) return null;
|
|
86
88
|
// Pending journals retain the owning family's digest (approval/revision have
|
|
87
89
|
// their own domain digest). The committed receipt binds the full command and
|
|
88
90
|
// journal recovery cross-checks both retained resolutions below that owner.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Private transfer limits; direct text is bounded independently from a multipart piece.
|
|
2
|
+
// The existing 64 KiB canonical command budget additionally bounds every JSON request.
|
|
3
|
+
export const MATERIAL_LIMITS = Object.freeze({ inline: 49152, part: 16384, file: 131072, set: 524288, sets: 4, total: 2097152,
|
|
4
|
+
lifetime: 600000, idle: 120000 });
|