wingfoil 0.2.2 → 0.3.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/README.md +83 -43
- package/dist/agent/discovery.d.ts +72 -0
- package/dist/agent/discovery.d.ts.map +1 -0
- package/dist/agent/discovery.js +210 -0
- package/dist/agent/discovery.js.map +1 -0
- package/dist/agent/execute.d.ts +206 -0
- package/dist/agent/execute.d.ts.map +1 -0
- package/dist/agent/execute.js +581 -0
- package/dist/agent/execute.js.map +1 -0
- package/dist/agent/index.d.ts +23 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +85 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/launch.d.ts +133 -0
- package/dist/agent/launch.d.ts.map +1 -0
- package/dist/agent/launch.js +380 -0
- package/dist/agent/launch.js.map +1 -0
- package/dist/agent/manifest.d.ts +30 -0
- package/dist/agent/manifest.d.ts.map +1 -0
- package/dist/agent/manifest.js +93 -0
- package/dist/agent/manifest.js.map +1 -0
- package/dist/agent/placeholders.d.ts +49 -0
- package/dist/agent/placeholders.d.ts.map +1 -0
- package/dist/agent/placeholders.js +177 -0
- package/dist/agent/placeholders.js.map +1 -0
- package/dist/agent/run-log.d.ts +254 -0
- package/dist/agent/run-log.d.ts.map +1 -0
- package/dist/agent/run-log.js +612 -0
- package/dist/agent/run-log.js.map +1 -0
- package/dist/agent/schema.d.ts +100 -0
- package/dist/agent/schema.d.ts.map +1 -0
- package/dist/agent/schema.js +89 -0
- package/dist/agent/schema.js.map +1 -0
- package/dist/agent/step.d.ts +41 -0
- package/dist/agent/step.d.ts.map +1 -0
- package/dist/agent/step.js +95 -0
- package/dist/agent/step.js.map +1 -0
- package/dist/build-info.json +4 -0
- package/dist/cli/error.d.ts +11 -2
- package/dist/cli/error.d.ts.map +1 -1
- package/dist/cli/error.js +27 -6
- package/dist/cli/error.js.map +1 -1
- package/dist/cli/exit.d.ts +33 -3
- package/dist/cli/exit.d.ts.map +1 -1
- package/dist/cli/exit.js +54 -3
- package/dist/cli/exit.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init-command.d.ts.map +1 -1
- package/dist/cli/init-command.js +4 -2
- package/dist/cli/init-command.js.map +1 -1
- package/dist/cli/mcp-command.d.ts +13 -4
- package/dist/cli/mcp-command.d.ts.map +1 -1
- package/dist/cli/mcp-command.js +25 -8
- package/dist/cli/mcp-command.js.map +1 -1
- package/dist/cli/output.d.ts +12 -4
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +15 -4
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/program.d.ts +1 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +162 -40
- package/dist/cli/program.js.map +1 -1
- package/dist/cli/registrar.d.ts +1 -1
- package/dist/cli/registrar.d.ts.map +1 -1
- package/dist/cli/registrar.js +67 -6
- package/dist/cli/registrar.js.map +1 -1
- package/dist/cli/suggest.d.ts +20 -0
- package/dist/cli/suggest.d.ts.map +1 -0
- package/dist/cli/suggest.js +49 -0
- package/dist/cli/suggest.js.map +1 -0
- package/dist/cli/warning.d.ts +26 -0
- package/dist/cli/warning.d.ts.map +1 -0
- package/dist/cli/warning.js +66 -0
- package/dist/cli/warning.js.map +1 -0
- package/dist/cli.js +11 -2
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-execute.d.ts +44 -0
- package/dist/core/agent-execute.d.ts.map +1 -0
- package/dist/core/agent-execute.js +71 -0
- package/dist/core/agent-execute.js.map +1 -0
- package/dist/core/agent-list.d.ts +95 -0
- package/dist/core/agent-list.d.ts.map +1 -0
- package/dist/core/agent-list.js +207 -0
- package/dist/core/agent-list.js.map +1 -0
- package/dist/core/agent-show.d.ts +44 -0
- package/dist/core/agent-show.d.ts.map +1 -0
- package/dist/core/agent-show.js +188 -0
- package/dist/core/agent-show.js.map +1 -0
- package/dist/core/approval-authority.d.ts +17 -14
- package/dist/core/approval-authority.d.ts.map +1 -1
- package/dist/core/approval-authority.js +9 -9
- package/dist/core/approval-authority.js.map +1 -1
- package/dist/core/builtin-asset.d.ts +18 -15
- package/dist/core/builtin-asset.d.ts.map +1 -1
- package/dist/core/builtin-asset.js +17 -14
- package/dist/core/builtin-asset.js.map +1 -1
- package/dist/core/builtin-integrity.d.ts +12 -2
- package/dist/core/builtin-integrity.d.ts.map +1 -1
- package/dist/core/builtin-integrity.js +85 -9
- package/dist/core/builtin-integrity.js.map +1 -1
- package/dist/core/confinement.d.ts +3 -1
- package/dist/core/confinement.d.ts.map +1 -1
- package/dist/core/confinement.js +7 -4
- package/dist/core/confinement.js.map +1 -1
- package/dist/core/context.d.ts +150 -98
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/context.js +602 -66
- package/dist/core/context.js.map +1 -1
- package/dist/core/directive-assign.d.ts +33 -7
- package/dist/core/directive-assign.d.ts.map +1 -1
- package/dist/core/directive-assign.js +67 -27
- package/dist/core/directive-assign.js.map +1 -1
- package/dist/core/directive-scope.d.ts +36 -0
- package/dist/core/directive-scope.d.ts.map +1 -0
- package/dist/core/directive-scope.js +34 -0
- package/dist/core/directive-scope.js.map +1 -0
- package/dist/core/directives-list.d.ts +13 -3
- package/dist/core/directives-list.d.ts.map +1 -1
- package/dist/core/directives-list.js +18 -6
- package/dist/core/directives-list.js.map +1 -1
- package/dist/core/dry-run.d.ts +33 -0
- package/dist/core/dry-run.d.ts.map +1 -0
- package/dist/core/dry-run.js +45 -0
- package/dist/core/dry-run.js.map +1 -0
- package/dist/core/element-ref.d.ts +23 -0
- package/dist/core/element-ref.d.ts.map +1 -0
- package/dist/core/element-ref.js +24 -0
- package/dist/core/element-ref.js.map +1 -0
- package/dist/core/error-details.d.ts +20 -0
- package/dist/core/error-details.d.ts.map +1 -0
- package/dist/core/error-details.js +65 -0
- package/dist/core/error-details.js.map +1 -0
- package/dist/core/exit-code.d.ts.map +1 -1
- package/dist/core/exit-code.js +6 -7
- package/dist/core/exit-code.js.map +1 -1
- package/dist/core/git-identity.d.ts +46 -11
- package/dist/core/git-identity.d.ts.map +1 -1
- package/dist/core/git-identity.js +140 -27
- package/dist/core/git-identity.js.map +1 -1
- package/dist/core/index.d.ts +184 -10
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1045 -185
- package/dist/core/index.js.map +1 -1
- package/dist/core/init.d.ts +45 -5
- package/dist/core/init.d.ts.map +1 -1
- package/dist/core/init.js +134 -24
- package/dist/core/init.js.map +1 -1
- package/dist/core/loaders.d.ts +170 -14
- package/dist/core/loaders.d.ts.map +1 -1
- package/dist/core/loaders.js +570 -89
- package/dist/core/loaders.js.map +1 -1
- package/dist/core/memory-add-link.d.ts +28 -0
- package/dist/core/memory-add-link.d.ts.map +1 -0
- package/dist/core/memory-add-link.js +67 -0
- package/dist/core/memory-add-link.js.map +1 -0
- package/dist/core/memory-add-type.d.ts +25 -1
- package/dist/core/memory-add-type.d.ts.map +1 -1
- package/dist/core/memory-add-type.js +59 -1
- package/dist/core/memory-add-type.js.map +1 -1
- package/dist/core/memory-amend.d.ts +80 -0
- package/dist/core/memory-amend.d.ts.map +1 -0
- package/dist/core/memory-amend.js +160 -0
- package/dist/core/memory-amend.js.map +1 -0
- package/dist/core/memory-supersede.d.ts +28 -0
- package/dist/core/memory-supersede.d.ts.map +1 -0
- package/dist/core/memory-supersede.js +79 -0
- package/dist/core/memory-supersede.js.map +1 -0
- package/dist/core/memory-transition.d.ts +190 -30
- package/dist/core/memory-transition.d.ts.map +1 -1
- package/dist/core/memory-transition.js +480 -59
- package/dist/core/memory-transition.js.map +1 -1
- package/dist/core/registry.d.ts +82 -10
- package/dist/core/registry.d.ts.map +1 -1
- package/dist/core/registry.js +50 -0
- package/dist/core/registry.js.map +1 -1
- package/dist/core/relevance.d.ts +74 -12
- package/dist/core/relevance.d.ts.map +1 -1
- package/dist/core/relevance.js +45 -27
- package/dist/core/relevance.js.map +1 -1
- package/dist/core/require-reason.d.ts.map +1 -1
- package/dist/core/require-reason.js +6 -5
- package/dist/core/require-reason.js.map +1 -1
- package/dist/core/required-fields.d.ts +28 -0
- package/dist/core/required-fields.d.ts.map +1 -0
- package/dist/core/required-fields.js +60 -0
- package/dist/core/required-fields.js.map +1 -0
- package/dist/core/revision.d.ts +82 -0
- package/dist/core/revision.d.ts.map +1 -0
- package/dist/core/revision.js +144 -0
- package/dist/core/revision.js.map +1 -0
- package/dist/core/types.d.ts +28 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +12 -3
- package/dist/core/types.js.map +1 -1
- package/dist/core/workflow-core-checks.d.ts +34 -0
- package/dist/core/workflow-core-checks.d.ts.map +1 -0
- package/dist/core/workflow-core-checks.js +403 -0
- package/dist/core/workflow-core-checks.js.map +1 -0
- package/dist/core/workflow-create-remove.d.ts +65 -0
- package/dist/core/workflow-create-remove.d.ts.map +1 -0
- package/dist/core/workflow-create-remove.js +277 -0
- package/dist/core/workflow-create-remove.js.map +1 -0
- package/dist/core/workflow-deduction.d.ts +48 -0
- package/dist/core/workflow-deduction.d.ts.map +1 -0
- package/dist/core/workflow-deduction.js +523 -0
- package/dist/core/workflow-deduction.js.map +1 -0
- package/dist/core/workflow-diagnostics.d.ts +83 -0
- package/dist/core/workflow-diagnostics.d.ts.map +1 -0
- package/dist/core/workflow-diagnostics.js +375 -0
- package/dist/core/workflow-diagnostics.js.map +1 -0
- package/dist/core/workflow-exit-state.d.ts +125 -0
- package/dist/core/workflow-exit-state.d.ts.map +1 -0
- package/dist/core/workflow-exit-state.js +243 -0
- package/dist/core/workflow-exit-state.js.map +1 -0
- package/dist/core/workflow-finalize.d.ts +37 -0
- package/dist/core/workflow-finalize.d.ts.map +1 -0
- package/dist/core/workflow-finalize.js +153 -0
- package/dist/core/workflow-finalize.js.map +1 -0
- package/dist/core/workflow-list-show.d.ts +176 -0
- package/dist/core/workflow-list-show.d.ts.map +1 -0
- package/dist/core/workflow-list-show.js +268 -0
- package/dist/core/workflow-list-show.js.map +1 -0
- package/dist/core/workflow-next.d.ts +268 -0
- package/dist/core/workflow-next.d.ts.map +1 -0
- package/dist/core/workflow-next.js +503 -0
- package/dist/core/workflow-next.js.map +1 -0
- package/dist/core/workflow-registry.d.ts +52 -0
- package/dist/core/workflow-registry.d.ts.map +1 -0
- package/dist/core/workflow-registry.js +158 -0
- package/dist/core/workflow-registry.js.map +1 -0
- package/dist/core/workflow-start-end.d.ts +71 -0
- package/dist/core/workflow-start-end.d.ts.map +1 -0
- package/dist/core/workflow-start-end.js +298 -0
- package/dist/core/workflow-start-end.js.map +1 -0
- package/dist/core/workflow-status.d.ts +83 -0
- package/dist/core/workflow-status.d.ts.map +1 -0
- package/dist/core/workflow-status.js +125 -0
- package/dist/core/workflow-status.js.map +1 -0
- package/dist/core/write-guard.d.ts +51 -8
- package/dist/core/write-guard.d.ts.map +1 -1
- package/dist/core/write-guard.js +139 -9
- package/dist/core/write-guard.js.map +1 -1
- package/dist/directives/index.d.ts +3 -2
- package/dist/directives/index.d.ts.map +1 -1
- package/dist/directives/index.js +5 -3
- package/dist/directives/index.js.map +1 -1
- package/dist/directives/schema.d.ts +34 -29
- package/dist/directives/schema.d.ts.map +1 -1
- package/dist/directives/schema.js +35 -29
- package/dist/directives/schema.js.map +1 -1
- package/dist/directives/version.d.ts +28 -0
- package/dist/directives/version.d.ts.map +1 -0
- package/dist/directives/version.js +51 -0
- package/dist/directives/version.js.map +1 -0
- package/dist/dna/edit.d.ts +7 -6
- package/dist/dna/edit.d.ts.map +1 -1
- package/dist/dna/edit.js +96 -41
- package/dist/dna/edit.js.map +1 -1
- package/dist/dna/mutate.js +18 -3
- package/dist/dna/mutate.js.map +1 -1
- package/dist/dna/path.d.ts +2 -2
- package/dist/dna/roles.d.ts +1 -1
- package/dist/dna/schema.d.ts +61 -3
- package/dist/dna/schema.d.ts.map +1 -1
- package/dist/dna/schema.js +121 -6
- package/dist/dna/schema.js.map +1 -1
- package/dist/mcp/dna-resource.d.ts.map +1 -1
- package/dist/mcp/dna-resource.js +4 -4
- package/dist/mcp/dna-resource.js.map +1 -1
- package/dist/mcp/index.d.ts +8 -4
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +13 -2
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/memory-resource.d.ts.map +1 -1
- package/dist/mcp/memory-resource.js +30 -19
- package/dist/mcp/memory-resource.js.map +1 -1
- package/dist/mcp/prompt.d.ts +61 -24
- package/dist/mcp/prompt.d.ts.map +1 -1
- package/dist/mcp/prompt.js +176 -47
- package/dist/mcp/prompt.js.map +1 -1
- package/dist/mcp/read-only.d.ts +39 -0
- package/dist/mcp/read-only.d.ts.map +1 -1
- package/dist/mcp/read-only.js +61 -0
- package/dist/mcp/read-only.js.map +1 -1
- package/dist/mcp/registrar.d.ts +10 -0
- package/dist/mcp/registrar.d.ts.map +1 -1
- package/dist/mcp/registrar.js +48 -12
- package/dist/mcp/registrar.js.map +1 -1
- package/dist/mcp/server.d.ts +21 -14
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +41 -15
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/session-resource.d.ts +13 -0
- package/dist/mcp/session-resource.d.ts.map +1 -0
- package/dist/mcp/session-resource.js +65 -0
- package/dist/mcp/session-resource.js.map +1 -0
- package/dist/mcp/workflow-resource.d.ts +18 -0
- package/dist/mcp/workflow-resource.d.ts.map +1 -1
- package/dist/mcp/workflow-resource.js +37 -8
- package/dist/mcp/workflow-resource.js.map +1 -1
- package/dist/memory/add.d.ts +110 -24
- package/dist/memory/add.d.ts.map +1 -1
- package/dist/memory/add.js +251 -64
- package/dist/memory/add.js.map +1 -1
- package/dist/memory/audit.d.ts +152 -39
- package/dist/memory/audit.d.ts.map +1 -1
- package/dist/memory/audit.js +257 -103
- package/dist/memory/audit.js.map +1 -1
- package/dist/memory/commit-message.d.ts +60 -38
- package/dist/memory/commit-message.d.ts.map +1 -1
- package/dist/memory/commit-message.js +167 -21
- package/dist/memory/commit-message.js.map +1 -1
- package/dist/memory/entry.d.ts.map +1 -1
- package/dist/memory/entry.js +1 -2
- package/dist/memory/entry.js.map +1 -1
- package/dist/memory/frontmatter-edit.d.ts +16 -4
- package/dist/memory/frontmatter-edit.d.ts.map +1 -1
- package/dist/memory/frontmatter-edit.js +13 -1
- package/dist/memory/frontmatter-edit.js.map +1 -1
- package/dist/memory/git-log.d.ts +18 -6
- package/dist/memory/git-log.d.ts.map +1 -1
- package/dist/memory/git-log.js +40 -13
- package/dist/memory/git-log.js.map +1 -1
- package/dist/memory/history.d.ts +73 -12
- package/dist/memory/history.d.ts.map +1 -1
- package/dist/memory/history.js +128 -44
- package/dist/memory/history.js.map +1 -1
- package/dist/memory/index.d.ts +13 -11
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +34 -3
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/query.d.ts +161 -19
- package/dist/memory/query.d.ts.map +1 -1
- package/dist/memory/query.js +435 -55
- package/dist/memory/query.js.map +1 -1
- package/dist/memory/schema.d.ts +52 -3
- package/dist/memory/schema.d.ts.map +1 -1
- package/dist/memory/schema.js +132 -8
- package/dist/memory/schema.js.map +1 -1
- package/dist/memory/state-machine.d.ts +65 -10
- package/dist/memory/state-machine.d.ts.map +1 -1
- package/dist/memory/state-machine.js +134 -46
- package/dist/memory/state-machine.js.map +1 -1
- package/dist/memory/submit.d.ts +52 -3
- package/dist/memory/submit.d.ts.map +1 -1
- package/dist/memory/submit.js +118 -11
- package/dist/memory/submit.js.map +1 -1
- package/dist/storage/build-stamp.d.ts +18 -0
- package/dist/storage/build-stamp.d.ts.map +1 -0
- package/dist/storage/build-stamp.js +68 -0
- package/dist/storage/build-stamp.js.map +1 -0
- package/dist/storage/builtin-adapters.d.ts +32 -0
- package/dist/storage/builtin-adapters.d.ts.map +1 -0
- package/dist/storage/builtin-adapters.js +100 -0
- package/dist/storage/builtin-adapters.js.map +1 -0
- package/dist/storage/builtin-directives.d.ts +0 -29
- package/dist/storage/builtin-directives.d.ts.map +1 -1
- package/dist/storage/builtin-directives.js +9 -4
- package/dist/storage/builtin-directives.js.map +1 -1
- package/dist/storage/commit.d.ts +310 -3
- package/dist/storage/commit.d.ts.map +1 -1
- package/dist/storage/commit.js +807 -33
- package/dist/storage/commit.js.map +1 -1
- package/dist/storage/document.d.ts +6 -0
- package/dist/storage/document.d.ts.map +1 -1
- package/dist/storage/document.js +10 -1
- package/dist/storage/document.js.map +1 -1
- package/dist/storage/dry-run.d.ts +65 -0
- package/dist/storage/dry-run.d.ts.map +1 -0
- package/dist/storage/dry-run.js +150 -0
- package/dist/storage/dry-run.js.map +1 -0
- package/dist/storage/errors.d.ts +26 -0
- package/dist/storage/errors.d.ts.map +1 -1
- package/dist/storage/errors.js +27 -1
- package/dist/storage/errors.js.map +1 -1
- package/dist/storage/frontmatter.d.ts +1 -1
- package/dist/storage/frontmatter.js +1 -1
- package/dist/storage/git-read.d.ts +64 -0
- package/dist/storage/git-read.d.ts.map +1 -0
- package/dist/storage/git-read.js +107 -0
- package/dist/storage/git-read.js.map +1 -0
- package/dist/storage/index.d.ts +13 -5
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +39 -2
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/layout.d.ts +2 -2
- package/dist/storage/layout.d.ts.map +1 -1
- package/dist/storage/layout.js +2 -7
- package/dist/storage/layout.js.map +1 -1
- package/dist/storage/memory-path.d.ts +18 -5
- package/dist/storage/memory-path.d.ts.map +1 -1
- package/dist/storage/memory-path.js +41 -5
- package/dist/storage/memory-path.js.map +1 -1
- package/dist/storage/snapshot.js +1 -1
- package/dist/storage/templates.d.ts +33 -6
- package/dist/storage/templates.d.ts.map +1 -1
- package/dist/storage/templates.js +170 -16
- package/dist/storage/templates.js.map +1 -1
- package/dist/validation/config-version.d.ts +19 -0
- package/dist/validation/config-version.d.ts.map +1 -0
- package/dist/validation/config-version.js +53 -0
- package/dist/validation/config-version.js.map +1 -0
- package/dist/validation/diagnostic.d.ts +40 -0
- package/dist/validation/diagnostic.d.ts.map +1 -0
- package/dist/validation/diagnostic.js +41 -0
- package/dist/validation/diagnostic.js.map +1 -0
- package/dist/validation/format.d.ts +74 -0
- package/dist/validation/format.d.ts.map +1 -0
- package/dist/validation/format.js +104 -0
- package/dist/validation/format.js.map +1 -0
- package/dist/validation/id.d.ts +14 -0
- package/dist/validation/id.d.ts.map +1 -1
- package/dist/validation/id.js +35 -11
- package/dist/validation/id.js.map +1 -1
- package/dist/validation/identity.d.ts +40 -0
- package/dist/validation/identity.d.ts.map +1 -0
- package/dist/validation/identity.js +78 -0
- package/dist/validation/identity.js.map +1 -0
- package/dist/validation/index.d.ts +9 -3
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +30 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/secret-scan.d.ts +3 -2
- package/dist/validation/secret-scan.d.ts.map +1 -1
- package/dist/validation/secret-scan.js +32 -11
- package/dist/validation/secret-scan.js.map +1 -1
- package/dist/validation/warning.d.ts +30 -16
- package/dist/validation/warning.d.ts.map +1 -1
- package/dist/validation/warning.js +74 -7
- package/dist/validation/warning.js.map +1 -1
- package/dist/workflow/bindings.d.ts +152 -0
- package/dist/workflow/bindings.d.ts.map +1 -0
- package/dist/workflow/bindings.js +249 -0
- package/dist/workflow/bindings.js.map +1 -0
- package/dist/workflow/create.d.ts +13 -0
- package/dist/workflow/create.d.ts.map +1 -0
- package/dist/workflow/create.js +41 -0
- package/dist/workflow/create.js.map +1 -0
- package/dist/workflow/deduce.d.ts +400 -0
- package/dist/workflow/deduce.d.ts.map +1 -0
- package/dist/workflow/deduce.js +1109 -0
- package/dist/workflow/deduce.js.map +1 -0
- package/dist/workflow/manifest-edit.d.ts +19 -0
- package/dist/workflow/manifest-edit.d.ts.map +1 -0
- package/dist/workflow/manifest-edit.js +124 -0
- package/dist/workflow/manifest-edit.js.map +1 -0
- package/dist/workflow/schema.d.ts +158 -19
- package/dist/workflow/schema.d.ts.map +1 -1
- package/dist/workflow/schema.js +163 -15
- package/dist/workflow/schema.js.map +1 -1
- package/package.json +18 -8
package/dist/cli/registrar.js
CHANGED
|
@@ -4,9 +4,13 @@ exports.buildCliCommands = buildCliCommands;
|
|
|
4
4
|
exports.listRegisteredCliCommands = listRegisteredCliCommands;
|
|
5
5
|
const registry_1 = require("../core/registry");
|
|
6
6
|
const exit_code_1 = require("../core/exit-code");
|
|
7
|
+
const error_details_1 = require("../core/error-details");
|
|
8
|
+
const dry_run_1 = require("../core/dry-run");
|
|
9
|
+
const warning_1 = require("../validation/warning");
|
|
7
10
|
const error_1 = require("./error");
|
|
8
11
|
const exit_1 = require("./exit");
|
|
9
12
|
const output_1 = require("./output");
|
|
13
|
+
const warning_2 = require("./warning");
|
|
10
14
|
/**
|
|
11
15
|
* Derive one `CliCommand` per operation in `modules`, in `enumerateOperations`'s deterministic
|
|
12
16
|
* order (REQ-SYS-07). The verb is derived via `deriveVerb` (spec-006 §5).
|
|
@@ -22,14 +26,41 @@ function buildCliCommands(modules, options) {
|
|
|
22
26
|
description: operation.description,
|
|
23
27
|
positional: operation.positional,
|
|
24
28
|
example: operation.example,
|
|
25
|
-
|
|
29
|
+
// `--dry-run` (task-210, `dl-106` W2, spec-008 §2): every operation that mutates takes it, and
|
|
30
|
+
// none declares it — it is derived here from `mutates`, so an operation added later inherits it.
|
|
31
|
+
flags: operation.mutates ? [...(operation.flags ?? []), dry_run_1.DRY_RUN_FLAG] : operation.flags,
|
|
26
32
|
options: operation.options,
|
|
27
33
|
run: async (formatValue, positionals, flags, optionValues) => {
|
|
28
34
|
if (!(0, output_1.isValidFormat)(formatValue)) {
|
|
29
|
-
(0, exit_1.exitWith)(2, `error:
|
|
35
|
+
(0, exit_1.exitWith)(2, `error: ${(0, output_1.invalidFormatReason)(formatValue)}`);
|
|
30
36
|
return;
|
|
31
37
|
}
|
|
32
38
|
const format = formatValue;
|
|
39
|
+
// The operand count, checked HERE for every derived command, present and future, before
|
|
40
|
+
// `resolveRoot()`: so before anything is read or written, and before any check the operation
|
|
41
|
+
// runs, the git-identity pre-flight included (task-129, `bug-171`, `bug-131`). Both are exit `2`
|
|
42
|
+
// (spec-005 §1), and the global `--format` above is checked first, for every command (`bug-226`).
|
|
43
|
+
// - An operand beyond the one the command declares (`dl-082-cli-parameter-shape`: at most one
|
|
44
|
+
// positional per command), with the declared `surplusHint` appended — the DNA path verbs'
|
|
45
|
+
// `the value travels in --value` (task-179, `bug-180`: they no longer refuse it themselves).
|
|
46
|
+
// - A required operand that is missing: `missing required argument: <name>`, with the command's
|
|
47
|
+
// usage as the `hint:` line (task-179, `bug-168`, spec-008 §4).
|
|
48
|
+
const given = positionals?.length ?? 0;
|
|
49
|
+
const declared = operation.positional === undefined ? 0 : 1;
|
|
50
|
+
const commandName = verb ? `${module.name} ${verb}` : module.name;
|
|
51
|
+
if (given > declared) {
|
|
52
|
+
(0, error_1.emitError)((0, registry_1.extraOperandsReason)(commandName, operation.positional?.name, given, operation.positional?.surplusHint), { format });
|
|
53
|
+
(0, exit_1.exitWith)(2);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (given === 0 && operation.positional?.required === true) {
|
|
57
|
+
(0, error_1.emitError)((0, registry_1.missingOperandReason)(operation.positional.name), { format, hint: `usage: ${(0, registry_1.commandUsage)(commandName, operation)}` });
|
|
58
|
+
(0, exit_1.exitWith)(2);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
// The operation's own flags reach `buildParams`; `--dry-run` is the registrar's, not the operation's.
|
|
62
|
+
const dryRun = operation.mutates && flags?.[dry_run_1.DRY_RUN_FLAG.name] === true;
|
|
63
|
+
const operationFlags = operation.mutates && flags !== undefined ? withoutDryRun(flags) : flags;
|
|
33
64
|
let result;
|
|
34
65
|
try {
|
|
35
66
|
// `resolveRoot()` / `buildParams()` run INSIDE the try so an ambient failure — e.g. a
|
|
@@ -44,12 +75,17 @@ function buildCliCommands(modules, options) {
|
|
|
44
75
|
// is the full list a multi-input op (`dnaSet`) reads (task-025-implement-dna-set).
|
|
45
76
|
positional: positionals?.[0],
|
|
46
77
|
positionals,
|
|
47
|
-
flags,
|
|
78
|
+
flags: operationFlags,
|
|
48
79
|
// Value-bearing `--{name} <value>` options a data-mutating op reads (task-020's `memoryAdd`
|
|
49
80
|
// reads `type`/`title`/`tags`). Undefined for every op declaring none.
|
|
50
81
|
options: optionValues,
|
|
51
82
|
});
|
|
52
|
-
|
|
83
|
+
// Every warning raised while the operation runs — a loader's unknown-field warning (`bug-202`),
|
|
84
|
+
// `agent execute`'s context warnings (task-218) — is rendered here, in the active format, the
|
|
85
|
+
// moment it is raised: before the payload or the error that follows it.
|
|
86
|
+
const call = () => operation.fn(params);
|
|
87
|
+
// A notice (`agent execute`'s launch banner, task-228) is rendered the same way, on stderr.
|
|
88
|
+
result = await (0, warning_1.withNoticeSink)((text) => (0, warning_2.emitNotice)(text, { format }), () => (0, warning_1.withWarningSink)((text) => (0, warning_2.emitWarning)(text, { format }), () => (dryRun ? (0, dry_run_1.runAsDryRun)(call) : call())));
|
|
53
89
|
}
|
|
54
90
|
catch (error) {
|
|
55
91
|
// Core owns exit-code selection for a thrown error too (spec-008 Consequences): a UsageError
|
|
@@ -64,10 +100,27 @@ function buildCliCommands(modules, options) {
|
|
|
64
100
|
// selects for this result (`0` success / `1` logic error) — the CLI does not re-decide the
|
|
65
101
|
// `0`/`1` mapping (task-012, spec-005 §1). `2` (usage error) is handled above, pre-core.
|
|
66
102
|
if (result.ok) {
|
|
67
|
-
|
|
103
|
+
// The success-warning channel (task-169, `dl-062`): stderr only, before the payload, so stdout
|
|
104
|
+
// is the same bytes with and without warnings under every `--format`.
|
|
105
|
+
(0, warning_2.emitWarnings)(result.warnings, { format });
|
|
106
|
+
// A command that hands its stdout to a child (`agent execute`, spec-016 §3.4, task-228) reports
|
|
107
|
+
// on stderr and writes nothing on stdout (spec-005 §2).
|
|
108
|
+
const report = operation.renderToStderr?.(result.value);
|
|
109
|
+
if (report !== undefined) {
|
|
110
|
+
(0, warning_2.emitStderrDocument)(report.document, report.console, { format });
|
|
111
|
+
(0, exit_1.exitWith)((0, exit_code_1.exitCodeForResult)(result));
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
// A command whose spec defines a console rendering (task-220, `agent show`) supplies it;
|
|
115
|
+
// every other command keeps `renderSuccess`'s indented JSON (spec-008 §2).
|
|
116
|
+
process.stdout.write(format === 'console' && operation.renderConsole !== undefined
|
|
117
|
+
? operation.renderConsole(result.value)
|
|
118
|
+
: (0, output_1.renderSuccess)(result.value, format));
|
|
68
119
|
}
|
|
69
120
|
else {
|
|
70
|
-
(
|
|
121
|
+
// `details` too (task-130, `dl-055` option 1): the file and the explanation core recorded;
|
|
122
|
+
// and the `hint:` line core suggested, if any (task-220, spec-005 §3.1).
|
|
123
|
+
(0, error_1.emitError)(result.error.message, { format, hint: result.error.hint, details: (0, error_details_1.errorDetails)(result.error) });
|
|
71
124
|
}
|
|
72
125
|
(0, exit_1.exitWith)((0, exit_code_1.exitCodeForResult)(result));
|
|
73
126
|
},
|
|
@@ -83,4 +136,12 @@ function buildCliCommands(modules, options) {
|
|
|
83
136
|
function listRegisteredCliCommands(commands) {
|
|
84
137
|
return commands.map((command) => (command.verb ? `${command.noun} ${command.verb}` : command.noun)).sort();
|
|
85
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* `flags` without the registrar's `--dry-run`, or `undefined` when nothing else is left — the shape an
|
|
141
|
+
* operation that declares no flags of its own was always called with.
|
|
142
|
+
*/
|
|
143
|
+
function withoutDryRun(flags) {
|
|
144
|
+
const rest = Object.fromEntries(Object.entries(flags).filter(([name]) => name !== dry_run_1.DRY_RUN_FLAG.name));
|
|
145
|
+
return Object.keys(rest).length > 0 ? rest : undefined;
|
|
146
|
+
}
|
|
86
147
|
//# sourceMappingURL=registrar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registrar.js","sourceRoot":"","sources":["../../src/cli/registrar.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"registrar.js","sourceRoot":"","sources":["../../src/cli/registrar.ts"],"names":[],"mappings":";;AAwFA,4CA2HC;AAQD,8DAEC;AA3MD,+CAA4H;AAE5H,iDAAwE;AACxE,yDAAqD;AACrD,6CAA4D;AAC5D,mDAAwE;AAExE,mCAAoC;AACpC,iCAAkC;AAClC,qCAA6E;AAC7E,uCAAsF;AAwDtF;;;GAGG;AACH,SAAgB,gBAAgB,CAAC,OAA8B,EAAE,OAA6B;IAC5F,OAAO,IAAA,8BAAmB,EAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE;QAChE,MAAM,IAAI,GAAG,IAAA,qBAAU,EAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QACrD,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI;YACJ,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,eAAe,EAAE,MAAM,CAAC,WAAW;YACnC,WAAW,EAAE,SAAS,CAAC,WAAW;YAClC,UAAU,EAAE,SAAS,CAAC,UAAU;YAChC,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,+FAA+F;YAC/F,iGAAiG;YACjG,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,sBAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK;YACvF,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,GAAG,EAAE,KAAK,EACR,WAAmB,EACnB,WAA+B,EAC/B,KAAyC,EACzC,YAAmE,EACnE,EAAE;gBACF,IAAI,CAAC,IAAA,sBAAa,EAAC,WAAW,CAAC,EAAE,CAAC;oBAChC,IAAA,eAAQ,EAAC,CAAC,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;gBACJ,CAAC;qBAAM,CAAC;oBACN,2FAA2F;oBAC3F,yEAAyE;oBACzE,IAAA,iBAAS,EAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,IAAA,4BAAY,EAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBAC5G,CAAC;gBACD,IAAA,eAAQ,EAAC,IAAA,6BAAiB,EAAC,MAAM,CAAC,CAAC,CAAC;YACtC,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAgB,yBAAyB,CAAC,QAA+B;IACvE,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7G,CAAC;AAED;;;GAGG;AACH,SAAS,aAAa,CAAC,KAAwC;IAC7D,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,sBAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IACtG,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The closest-match suggestion for an unknown command (`spec-008-cli-grammar` §1, `spec-005-cli-command-contract`
|
|
3
|
+
* §3.1; task-179, `bug-104`). WingFoil computes it rather than relaying Commander's own
|
|
4
|
+
* `(Did you mean …?)`: `spec-008` §1 names Levenshtein distance ≤ 2, Commander's matcher is
|
|
5
|
+
* Damerau–Levenshtein with distance ≤ 3, and its wording is not the `hint:` line `spec-005` §3.1
|
|
6
|
+
* declares. Pure and deterministic (REQ-SYS-07): the result depends on the token and the SET of
|
|
7
|
+
* candidates, never on their order.
|
|
8
|
+
*/
|
|
9
|
+
/** The largest edit distance at which a command is still suggested (`spec-008` §1). */
|
|
10
|
+
export declare const SUGGESTION_MAX_DISTANCE = 2;
|
|
11
|
+
/** Levenshtein distance between `a` and `b`: insertions, deletions and substitutions, each costing 1. */
|
|
12
|
+
export declare function levenshtein(a: string, b: string): number;
|
|
13
|
+
/**
|
|
14
|
+
* The candidate nearest to `token` within {@link SUGGESTION_MAX_DISTANCE}, or `undefined` when none is
|
|
15
|
+
* that close. A tie goes to the candidate first in code-unit order; the token itself is never suggested.
|
|
16
|
+
*/
|
|
17
|
+
export declare function closestCommand(token: string, candidates: readonly string[]): string | undefined;
|
|
18
|
+
/** The `hint:` text for a suggested command, in `spec-005` §3.1's words: `did you mean "<name>"?`. */
|
|
19
|
+
export declare function unknownCommandHint(name: string): string;
|
|
20
|
+
//# sourceMappingURL=suggest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggest.d.ts","sourceRoot":"","sources":["../../src/cli/suggest.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,uFAAuF;AACvF,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,yGAAyG;AACzG,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAWxD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAQ/F;AAED,sGAAsG;AACtG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The closest-match suggestion for an unknown command (`spec-008-cli-grammar` §1, `spec-005-cli-command-contract`
|
|
4
|
+
* §3.1; task-179, `bug-104`). WingFoil computes it rather than relaying Commander's own
|
|
5
|
+
* `(Did you mean …?)`: `spec-008` §1 names Levenshtein distance ≤ 2, Commander's matcher is
|
|
6
|
+
* Damerau–Levenshtein with distance ≤ 3, and its wording is not the `hint:` line `spec-005` §3.1
|
|
7
|
+
* declares. Pure and deterministic (REQ-SYS-07): the result depends on the token and the SET of
|
|
8
|
+
* candidates, never on their order.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.SUGGESTION_MAX_DISTANCE = void 0;
|
|
12
|
+
exports.levenshtein = levenshtein;
|
|
13
|
+
exports.closestCommand = closestCommand;
|
|
14
|
+
exports.unknownCommandHint = unknownCommandHint;
|
|
15
|
+
/** The largest edit distance at which a command is still suggested (`spec-008` §1). */
|
|
16
|
+
exports.SUGGESTION_MAX_DISTANCE = 2;
|
|
17
|
+
/** Levenshtein distance between `a` and `b`: insertions, deletions and substitutions, each costing 1. */
|
|
18
|
+
function levenshtein(a, b) {
|
|
19
|
+
let previous = Array.from({ length: b.length + 1 }, (_, index) => index);
|
|
20
|
+
for (let i = 1; i <= a.length; i += 1) {
|
|
21
|
+
const current = [i];
|
|
22
|
+
for (let j = 1; j <= b.length; j += 1) {
|
|
23
|
+
const substitution = previous[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1);
|
|
24
|
+
current.push(Math.min(previous[j] + 1, current[j - 1] + 1, substitution));
|
|
25
|
+
}
|
|
26
|
+
previous = current;
|
|
27
|
+
}
|
|
28
|
+
return previous[b.length];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The candidate nearest to `token` within {@link SUGGESTION_MAX_DISTANCE}, or `undefined` when none is
|
|
32
|
+
* that close. A tie goes to the candidate first in code-unit order; the token itself is never suggested.
|
|
33
|
+
*/
|
|
34
|
+
function closestCommand(token, candidates) {
|
|
35
|
+
let best;
|
|
36
|
+
for (const name of [...new Set(candidates)].sort()) {
|
|
37
|
+
if (name === token)
|
|
38
|
+
continue;
|
|
39
|
+
const distance = levenshtein(token, name);
|
|
40
|
+
if (distance <= exports.SUGGESTION_MAX_DISTANCE && (best === undefined || distance < best.distance))
|
|
41
|
+
best = { name, distance };
|
|
42
|
+
}
|
|
43
|
+
return best?.name;
|
|
44
|
+
}
|
|
45
|
+
/** The `hint:` text for a suggested command, in `spec-005` §3.1's words: `did you mean "<name>"?`. */
|
|
46
|
+
function unknownCommandHint(name) {
|
|
47
|
+
return `did you mean "${name}"?`;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=suggest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggest.js","sourceRoot":"","sources":["../../src/cli/suggest.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAMH,kCAWC;AAMD,wCAQC;AAGD,gDAEC;AAlCD,uFAAuF;AAC1E,QAAA,uBAAuB,GAAG,CAAC,CAAC;AAEzC,yGAAyG;AACzG,SAAgB,WAAW,CAAC,CAAS,EAAE,CAAS;IAC9C,IAAI,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;IACzE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;QACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE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
+
/** Write one warning to stderr in the active `--format`'s shape (see the module doc). Writes only. */
|
|
3
|
+
export declare function emitWarning(text: string, opts: {
|
|
4
|
+
format: OutputFormat;
|
|
5
|
+
}): void;
|
|
6
|
+
/** Write each of `warnings` to stderr, in order, through {@link emitWarning}. Writes nothing for none. */
|
|
7
|
+
export declare function emitWarnings(warnings: readonly string[] | undefined, opts: {
|
|
8
|
+
format: OutputFormat;
|
|
9
|
+
}): void;
|
|
10
|
+
/**
|
|
11
|
+
* Write one notice (task-228, `reportNotice`: `agent execute`'s launch banner, `spec-016` §3.3 step 13) to
|
|
12
|
+
* stderr in the active `--format`'s shape: the bare line for `console`, `{"notice": "<text>"}` for
|
|
13
|
+
* `json`, one self-delimiting YAML document for `yaml` — the shapes {@link emitWarning} uses.
|
|
14
|
+
*/
|
|
15
|
+
export declare function emitNotice(text: string, opts: {
|
|
16
|
+
format: OutputFormat;
|
|
17
|
+
}): void;
|
|
18
|
+
/**
|
|
19
|
+
* Write one stderr message: `document` as one JSON line (`json`) or one `---`/`...` YAML document
|
|
20
|
+
* (`yaml`), `consoleLine` as is (`console`). The success report of a command that writes nothing on
|
|
21
|
+
* stdout (`CoreOperation.renderToStderr`, `spec-016` §3.4) goes through here too.
|
|
22
|
+
*/
|
|
23
|
+
export declare function emitStderrDocument(document: Readonly<Record<string, unknown>>, consoleLine: string, opts: {
|
|
24
|
+
format: OutputFormat;
|
|
25
|
+
}): void;
|
|
26
|
+
//# sourceMappingURL=warning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.d.ts","sourceRoot":"","sources":["../../src/cli/warning.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,sGAAsG;AACtG,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,IAAI,CAQ9E;AAED,0GAA0G;AAC1G,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAAE,IAAI,EAAE;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,IAAI,CAE1G;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,IAAI,CAE7E;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,IAAI,CAIzI"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.emitWarning = emitWarning;
|
|
4
|
+
exports.emitWarnings = emitWarnings;
|
|
5
|
+
exports.emitNotice = emitNotice;
|
|
6
|
+
exports.emitStderrDocument = emitStderrDocument;
|
|
7
|
+
/**
|
|
8
|
+
* The one CLI renderer for warnings (task-169, `dl-062` Q1 option 3; the shape is `spec-016` §3.4's,
|
|
9
|
+
* pinned for every command in `spec-008` §6).
|
|
10
|
+
*
|
|
11
|
+
* A warning is **stderr only**, under every `--format`, so the payload on stdout is the same with and
|
|
12
|
+
* without it (`spec-005` §2: stdout carries only the payload). Its shape follows the format, as an
|
|
13
|
+
* error's does (`./error.ts`):
|
|
14
|
+
*
|
|
15
|
+
* - `console`: `warning: <text>`, beside the `error: ` prefix. A continuation line of a multi-line
|
|
16
|
+
* warning is indented, so no line of it can begin with the greppable `warning: ` or `error: `.
|
|
17
|
+
* - `json`: one `{"warning": "<text>"}` document per line.
|
|
18
|
+
* - `yaml`: one `warning: <text>` YAML document per warning, opened by `---` and closed by `...`, so
|
|
19
|
+
* every warning is a self-delimiting document: several warnings, or warnings followed by an error
|
|
20
|
+
* (`./error.ts`, whose bytes are unchanged), read as separate documents of one stream and never
|
|
21
|
+
* merge into a single mapping (task-169 review).
|
|
22
|
+
*
|
|
23
|
+
* Every warning on the CLI goes through here: the success-warning channel the registrar renders
|
|
24
|
+
* (`CoreResult.warnings`), and any warning a command prints while it runs (`spec-016` §3.4's
|
|
25
|
+
* `ExecutionContext.warnings`, task-218).
|
|
26
|
+
*/
|
|
27
|
+
const js_yaml_1 = require("js-yaml");
|
|
28
|
+
/** Write one warning to stderr in the active `--format`'s shape (see the module doc). Writes only. */
|
|
29
|
+
function emitWarning(text, opts) {
|
|
30
|
+
if (opts.format === 'json') {
|
|
31
|
+
process.stderr.write(JSON.stringify({ warning: text }) + '\n');
|
|
32
|
+
}
|
|
33
|
+
else if (opts.format === 'yaml') {
|
|
34
|
+
process.stderr.write('---\n' + (0, js_yaml_1.dump)({ warning: text }) + '...\n');
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
process.stderr.write(`warning: ${text.replace(/\n/g, '\n ')}\n`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** Write each of `warnings` to stderr, in order, through {@link emitWarning}. Writes nothing for none. */
|
|
41
|
+
function emitWarnings(warnings, opts) {
|
|
42
|
+
for (const warning of warnings ?? [])
|
|
43
|
+
emitWarning(warning, opts);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Write one notice (task-228, `reportNotice`: `agent execute`'s launch banner, `spec-016` §3.3 step 13) to
|
|
47
|
+
* stderr in the active `--format`'s shape: the bare line for `console`, `{"notice": "<text>"}` for
|
|
48
|
+
* `json`, one self-delimiting YAML document for `yaml` — the shapes {@link emitWarning} uses.
|
|
49
|
+
*/
|
|
50
|
+
function emitNotice(text, opts) {
|
|
51
|
+
emitStderrDocument({ notice: text }, text, opts);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Write one stderr message: `document` as one JSON line (`json`) or one `---`/`...` YAML document
|
|
55
|
+
* (`yaml`), `consoleLine` as is (`console`). The success report of a command that writes nothing on
|
|
56
|
+
* stdout (`CoreOperation.renderToStderr`, `spec-016` §3.4) goes through here too.
|
|
57
|
+
*/
|
|
58
|
+
function emitStderrDocument(document, consoleLine, opts) {
|
|
59
|
+
if (opts.format === 'json')
|
|
60
|
+
process.stderr.write(JSON.stringify(document) + '\n');
|
|
61
|
+
else if (opts.format === 'yaml')
|
|
62
|
+
process.stderr.write('---\n' + (0, js_yaml_1.dump)(document) + '...\n');
|
|
63
|
+
else
|
|
64
|
+
process.stderr.write(`${consoleLine}\n`);
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=warning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warning.js","sourceRoot":"","sources":["../../src/cli/warning.ts"],"names":[],"mappings":";;AAyBA,kCAQC;AAGD,oCAEC;AAOD,gCAEC;AAOD,gDAIC;AA1DD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qCAA2C;AAI3C,sGAAsG;AACtG,SAAgB,WAAW,CAAC,IAAY,EAAE,IAA8B;IACtE,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;IACjE,CAAC;SAAM,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,IAAA,cAAQ,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC;IACxE,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IACpE,CAAC;AACH,CAAC;AAED,0GAA0G;AAC1G,SAAgB,YAAY,CAAC,QAAuC,EAAE,IAA8B;IAClG,KAAK,MAAM,OAAO,IAAI,QAAQ,IAAI,EAAE;QAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AACnE,CAAC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,IAAY,EAAE,IAA8B;IACrE,kBAAkB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACnD,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,QAA2C,EAAE,WAAmB,EAAE,IAA8B;IACjI,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM;QAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;SAC7E,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM;QAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,IAAA,cAAQ,EAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,CAAC;;QACzF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;AAChD,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -20,6 +20,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
* (spec-005-cli-command-contract §1, spec-008-cli-grammar §1) even outside a git repository; only an
|
|
21
21
|
* actual `<noun> <verb>` invocation needs a resolvable git root.
|
|
22
22
|
*/
|
|
23
|
+
const exit_1 = require("./cli/exit");
|
|
23
24
|
const program_1 = require("./cli/program");
|
|
24
25
|
const core_1 = require("./core");
|
|
25
26
|
const git_root_1 = require("./storage/git-root");
|
|
@@ -34,12 +35,20 @@ const git_root_1 = require("./storage/git-root");
|
|
|
34
35
|
})
|
|
35
36
|
.then((program) => program.parseAsync(process.argv))
|
|
36
37
|
.catch((error) => {
|
|
38
|
+
// Not an error: an exit already chosen through `exitWith` is waiting for queued output to drain
|
|
39
|
+
// (task-249, `bug-222`), and the process ends with that code once it has. Matched by name, as the
|
|
40
|
+
// compiled test harness does, so a second copy of `./cli/exit` cannot make it read as a failure —
|
|
41
|
+
// and only when `exitWith` has really chosen a code (`process.exitCode` is set), so an unrelated
|
|
42
|
+
// error that happens to carry the name is still reported below rather than swallowed.
|
|
43
|
+
if (error instanceof Error && error.name === 'DeferredExit' && process.exitCode !== undefined)
|
|
44
|
+
return;
|
|
37
45
|
// Last-resort handler for anything that escapes the per-command spec-005 exit path. Emit only the
|
|
38
46
|
// message as a single `error:` line — never `error.stack`, which would leak a stack trace and
|
|
39
47
|
// absolute internal paths from a published CLI (bug-002-cli-error-stack-dump). The normal
|
|
40
48
|
// no-git-root path is already handled cleanly inside the registrar; this guards the unexpected.
|
|
49
|
+
// It ends through `exitWith` like every other outcome (spec-005 §1), so output a command queued
|
|
50
|
+
// before the escape still drains (task-249 review).
|
|
41
51
|
const message = error instanceof Error ? error.message : String(error);
|
|
42
|
-
|
|
43
|
-
process.exit(1);
|
|
52
|
+
(0, exit_1.exitWith)(1, `error: ${message}`);
|
|
44
53
|
});
|
|
45
54
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AACA;;;;;;;;;;;;;;;;;;GAkBG;AACH,2CAA6C;AAC7C,iCAAsC;AACtC,iDAAwD;AAExD,IAAA,sBAAY,EAAC,mBAAY,EAAE;IACzB,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAkB,EAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IACpD,0FAA0F;IAC1F,iGAAiG;IACjG,gGAAgG;IAChG,qGAAqG;IACrG,0CAA0C;IAC1C,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,IA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E,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACnD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACxB,gGAAgG;IAChG,kGAAkG;IAClG,kGAAkG;IAClG,iGAAiG;IACjG,sFAAsF;IACtF,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS;QAAE,OAAO;IACtG,kGAAkG;IAClG,8FAA8F;IAC9F,0FAA0F;IAC1F,gGAAgG;IAChG,gGAAgG;IAChG,oDAAoD;IACpD,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,IAAA,eAAQ,EAAC,CAAC,EAAE,UAAU,OAAO,EAAE,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `wingfoil agent execute` `CoreOperation.fn` (task-218, task-228, task-235, `spec-016` §3; P5.3.1, P5.3.2,
|
|
3
|
+
* P5.4.2–P5.4.4): the stepless form, `--element <type>:<id>` with an optional `--role` and `--agent`, and the
|
|
4
|
+
* step forms `--next`, `--workflow <ref>`, `--step <key>` (§3.1; either option implies `--next`), which take
|
|
5
|
+
* the workflow, phase, element and role from a frontier step (`src/agent/step.ts`). It parses the request
|
|
6
|
+
* (§3.3 step 1), runs `src/agent/execute.ts`'s pipeline up to the spawn (steps 2–12), and then:
|
|
7
|
+
* - under `--dry-run` (`spec-008` §2) returns the launch it would make — the record commit's subject and
|
|
8
|
+
* run-log path, the run's fields known before the spawn, and the §2.4 bootstrap — having written
|
|
9
|
+
* nothing;
|
|
10
|
+
* - otherwise launches the agent (`src/agent/launch.ts`, steps 13–18) and returns the recorded run,
|
|
11
|
+
* which the CLI prints on stderr only ({@link renderAgentExecuteStderr}, §3.4).
|
|
12
|
+
*
|
|
13
|
+
* v0.4's `--resume` and `--ref` are not registered, so Commander refuses them as unknown options (exit `2`).
|
|
14
|
+
*/
|
|
15
|
+
import { type AgentExecuteHost, type AgentLaunchPlan } from '../agent/execute';
|
|
16
|
+
import { type RecordedLaunch } from '../agent/launch';
|
|
17
|
+
import type { CoreFn, StderrReport } from './registry';
|
|
18
|
+
/** `agent execute` params: the value options (`spec-008` §1) ride `options`, the `--next` flag `next`. */
|
|
19
|
+
export interface AgentExecuteParams {
|
|
20
|
+
readonly root: string;
|
|
21
|
+
/** `--next` (task-235): take the step from the active instance, or from the one `--workflow` selects. */
|
|
22
|
+
readonly next?: boolean;
|
|
23
|
+
readonly options?: Readonly<Record<string, string | readonly string[] | undefined>>;
|
|
24
|
+
/**
|
|
25
|
+
* The host facts the pipeline reads (the MCP server to pre-flight, the terminal test, `PATH`), for an
|
|
26
|
+
* in-process caller only: no surface builds it from user input, so the CLI always runs with the
|
|
27
|
+
* process's own (`src/cli.ts`'s `buildParams` sets no such key).
|
|
28
|
+
*/
|
|
29
|
+
readonly host?: AgentExecuteHost;
|
|
30
|
+
}
|
|
31
|
+
/** §3.1: none of `--next`, `--workflow`, `--step`, `--element` → exit `2` with this reason. */
|
|
32
|
+
export declare const AGENT_EXECUTE_MISSING_TARGET = "missing required argument: --next or --element";
|
|
33
|
+
/**
|
|
34
|
+
* Parse, check the project is initialized, run the pipeline, then plan (dry run) or launch. A usage
|
|
35
|
+
* error (none of `--next`, `--workflow`, `--step`, `--element`; a malformed element-ref, `spec-008` §7) is
|
|
36
|
+
* thrown as `UsageError` before the project is read.
|
|
37
|
+
*/
|
|
38
|
+
export declare const agentExecuteFn: CoreFn<unknown, AgentLaunchPlan | RecordedLaunch>;
|
|
39
|
+
/**
|
|
40
|
+
* §3.4: a recorded run is reported on stderr — the summary line (`console`), `{ "run": <record> }`
|
|
41
|
+
* (`json`/`yaml`) — and stdout is left to the agent. The dry-run plan is an ordinary stdout payload.
|
|
42
|
+
*/
|
|
43
|
+
export declare function renderAgentExecuteStderr(value: AgentLaunchPlan | RecordedLaunch): StderrReport | undefined;
|
|
44
|
+
//# sourceMappingURL=agent-execute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-execute.d.ts","sourceRoot":"","sources":["../../src/core/agent-execute.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAoC,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACjH,OAAO,EAA+B,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAInF,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAIvD,0GAA0G;AAC1G,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yGAAyG;IACzG,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC;IACpF;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC;CAClC;AAED,+FAA+F;AAC/F,eAAO,MAAM,4BAA4B,mDAAmD,CAAC;AAO7F;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,cAAc,CA2B5E,CAAC;AAEF;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,eAAe,GAAG,cAAc,GAAG,YAAY,GAAG,SAAS,CAG1G"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.agentExecuteFn = exports.AGENT_EXECUTE_MISSING_TARGET = void 0;
|
|
4
|
+
exports.renderAgentExecuteStderr = renderAgentExecuteStderr;
|
|
5
|
+
/**
|
|
6
|
+
* `wingfoil agent execute` `CoreOperation.fn` (task-218, task-228, task-235, `spec-016` §3; P5.3.1, P5.3.2,
|
|
7
|
+
* P5.4.2–P5.4.4): the stepless form, `--element <type>:<id>` with an optional `--role` and `--agent`, and the
|
|
8
|
+
* step forms `--next`, `--workflow <ref>`, `--step <key>` (§3.1; either option implies `--next`), which take
|
|
9
|
+
* the workflow, phase, element and role from a frontier step (`src/agent/step.ts`). It parses the request
|
|
10
|
+
* (§3.3 step 1), runs `src/agent/execute.ts`'s pipeline up to the spawn (steps 2–12), and then:
|
|
11
|
+
* - under `--dry-run` (`spec-008` §2) returns the launch it would make — the record commit's subject and
|
|
12
|
+
* run-log path, the run's fields known before the spawn, and the §2.4 bootstrap — having written
|
|
13
|
+
* nothing;
|
|
14
|
+
* - otherwise launches the agent (`src/agent/launch.ts`, steps 13–18) and returns the recorded run,
|
|
15
|
+
* which the CLI prints on stderr only ({@link renderAgentExecuteStderr}, §3.4).
|
|
16
|
+
*
|
|
17
|
+
* v0.4's `--resume` and `--ref` are not registered, so Commander refuses them as unknown options (exit `2`).
|
|
18
|
+
*/
|
|
19
|
+
const execute_1 = require("../agent/execute");
|
|
20
|
+
const launch_1 = require("../agent/launch");
|
|
21
|
+
const storage_1 = require("../storage");
|
|
22
|
+
const element_ref_1 = require("./element-ref");
|
|
23
|
+
const init_1 = require("./init");
|
|
24
|
+
const types_1 = require("./types");
|
|
25
|
+
const usage_error_1 = require("./usage-error");
|
|
26
|
+
/** §3.1: none of `--next`, `--workflow`, `--step`, `--element` → exit `2` with this reason. */
|
|
27
|
+
exports.AGENT_EXECUTE_MISSING_TARGET = 'missing required argument: --next or --element';
|
|
28
|
+
/** A single option value: the last occurrence, as Commander gives a non-repeatable option. */
|
|
29
|
+
function single(value) {
|
|
30
|
+
return typeof value === 'string' ? value : value?.[value.length - 1];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Parse, check the project is initialized, run the pipeline, then plan (dry run) or launch. A usage
|
|
34
|
+
* error (none of `--next`, `--workflow`, `--step`, `--element`; a malformed element-ref, `spec-008` §7) is
|
|
35
|
+
* thrown as `UsageError` before the project is read.
|
|
36
|
+
*/
|
|
37
|
+
const agentExecuteFn = async (params) => {
|
|
38
|
+
const { root, options, host, next } = params;
|
|
39
|
+
const elementOption = single(options?.element);
|
|
40
|
+
const workflow = single(options?.workflow);
|
|
41
|
+
const key = single(options?.step);
|
|
42
|
+
// `--workflow` and `--step` imply `--next` (§3.1); giving `--next` as well changes nothing.
|
|
43
|
+
const stepForm = next === true || workflow !== undefined || key !== undefined;
|
|
44
|
+
if (elementOption === undefined && !stepForm)
|
|
45
|
+
throw new usage_error_1.UsageError(exports.AGENT_EXECUTE_MISSING_TARGET);
|
|
46
|
+
const element = elementOption === undefined ? undefined : (0, element_ref_1.parseElementRef)(elementOption);
|
|
47
|
+
if (element !== undefined && !element.ok)
|
|
48
|
+
throw new usage_error_1.UsageError(element.error.message);
|
|
49
|
+
const initialized = (0, init_1.requireInitializedProject)(root);
|
|
50
|
+
if (!initialized.ok)
|
|
51
|
+
return initialized;
|
|
52
|
+
const dryRun = (0, storage_1.isDryRunActive)();
|
|
53
|
+
const launchHost = host ?? {};
|
|
54
|
+
return (0, execute_1.agentExecutePipeline)(root, {
|
|
55
|
+
...(element === undefined ? {} : { element: element.value }),
|
|
56
|
+
...(stepForm ? { step: { ...(workflow === undefined ? {} : { workflow }), ...(key === undefined ? {} : { key }) } } : {}),
|
|
57
|
+
role: single(options?.role),
|
|
58
|
+
agent: single(options?.agent),
|
|
59
|
+
}, launchHost, async (prepared, releaseSignals) => (dryRun ? (0, types_1.coreOk)((0, execute_1.launchPlan)(prepared)) : (0, launch_1.launchAgent)(root, prepared, launchHost, releaseSignals)));
|
|
60
|
+
};
|
|
61
|
+
exports.agentExecuteFn = agentExecuteFn;
|
|
62
|
+
/**
|
|
63
|
+
* §3.4: a recorded run is reported on stderr — the summary line (`console`), `{ "run": <record> }`
|
|
64
|
+
* (`json`/`yaml`) — and stdout is left to the agent. The dry-run plan is an ordinary stdout payload.
|
|
65
|
+
*/
|
|
66
|
+
function renderAgentExecuteStderr(value) {
|
|
67
|
+
if ('dryRun' in value)
|
|
68
|
+
return undefined;
|
|
69
|
+
return { document: { run: value.run }, console: (0, launch_1.runSummaryLine)(value.run, value.sha) };
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=agent-execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-execute.js","sourceRoot":"","sources":["../../src/core/agent-execute.ts"],"names":[],"mappings":";;;AAmFA,4DAGC;AAtFD;;;;;;;;;;;;;GAaG;AACH,8CAAiH;AACjH,4CAAmF;AACnF,wCAA4C;AAC5C,+CAAgD;AAChD,iCAAmD;AAEnD,mCAAiC;AACjC,+CAA2C;AAgB3C,+FAA+F;AAClF,QAAA,4BAA4B,GAAG,gDAAgD,CAAC;AAE7F,8FAA8F;AAC9F,SAAS,MAAM,CAAC,KAA6C;IAC3D,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AACvE,CAAC;AAED;;;;GAIG;AACI,MAAM,cAAc,GAAsD,KAAK,EAAE,MAAM,EAAE,EAAE;IAChG,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,MAA4B,CAAC;IACnE,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC3C,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClC,4FAA4F;IAC5F,MAAM,QAAQ,GAAG,IAA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K,CAAC;KAC9B,EACD,UAAU,EACV,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,cAAM,EAAC,IAAA,oBAAU,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,oBAAW,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC,CACtI,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,cAAc,kBA2BzB;AAEF;;;GAGG;AACH,SAAgB,wBAAwB,CAAC,KAAuC;IAC9E,IAAI,QAAQ,IAAI,KAAK;QAAE,OAAO,SAAS,CAAC;IACxC,OAAO,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,IAAA,uBAAc,EAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `wingfoil agent list [--past] [--waiting] [--element <type>:<id>] [--phase <name>]` (task-240,
|
|
3
|
+
* `spec-016` §5; P5.3.4): the recorded agent runs, and the workflow steps waiting for an agent.
|
|
4
|
+
*
|
|
5
|
+
* **Two sources, one baseline** (`dl-135` point 1; `spec-016` §5.1, approver ruling R15; `spec-006` §6
|
|
6
|
+
* item 6):
|
|
7
|
+
* - **past** = the run log (task-206's `src/agent/run-log.ts`, read strictly, §4.5) at `HEAD`;
|
|
8
|
+
* - **waiting** = every frontier step of every open instance whose role an agent executes (`Step.agentRole`,
|
|
9
|
+
* `spec-017` §6.3), in `spec-017` §1.3's frontier order — the steps `workflow status` reports
|
|
10
|
+
* (`StatusResult.open[].frontier`), built by the same `readNextInputs` + `buildStep` (task-225).
|
|
11
|
+
*
|
|
12
|
+
* When the waiting section is selected, the deduction snapshot is read first and its commit is the one the
|
|
13
|
+
* run logs are read at too, so both sections answer from the one `HEAD` the payload's `baseline` names.
|
|
14
|
+
* The working tree only explains: a run log that differs from `HEAD` is a `W_UNCOMMITTED_INPUTS` diagnostic
|
|
15
|
+
* (`spec-017` §1.2), one per dirty path — the deduction's own when it runs, this module's (through the same
|
|
16
|
+
* builder) when `--past` alone runs none.
|
|
17
|
+
*
|
|
18
|
+
* v0.3 limit (§5): with no active registry, a step an agent is running on right now is still listed as
|
|
19
|
+
* waiting; `--active` is v0.4 and refused as an unknown option.
|
|
20
|
+
*/
|
|
21
|
+
import { type RunRecord } from '../agent/run-log';
|
|
22
|
+
import { type Diagnostic } from '../validation';
|
|
23
|
+
import { type Baseline } from '../workflow/deduce';
|
|
24
|
+
import type { PhaseMode } from '../workflow/schema';
|
|
25
|
+
import type { CoreFn } from './registry';
|
|
26
|
+
import { type CoreResult } from './types';
|
|
27
|
+
/** The warning of a project whose `dna.yaml` declares no run log (§5: not an error for `list`). */
|
|
28
|
+
export declare const NO_RUN_LOG_WARNING = "dna.yaml declares no run log (paths.runs)";
|
|
29
|
+
/** `agent list` params: the two section flags, and the two filters as value options (`spec-008` §12). */
|
|
30
|
+
export interface AgentListParams {
|
|
31
|
+
readonly root: string;
|
|
32
|
+
readonly past?: boolean;
|
|
33
|
+
readonly waiting?: boolean;
|
|
34
|
+
readonly options?: Readonly<Record<string, string | readonly string[] | undefined>>;
|
|
35
|
+
}
|
|
36
|
+
/** One step waiting for an agent (`spec-016` §5's `waiting[]` item). */
|
|
37
|
+
export interface WaitingStep {
|
|
38
|
+
/** The open instance the step belongs to. */
|
|
39
|
+
readonly instance: string;
|
|
40
|
+
/** The step key (`spec-017` §4.9). */
|
|
41
|
+
readonly key: string;
|
|
42
|
+
readonly workflow: string;
|
|
43
|
+
readonly phase: string;
|
|
44
|
+
/** `<type>:<id>`: the step's scope element, else its instance's bound element; `null` when it has neither. */
|
|
45
|
+
readonly element: string | null;
|
|
46
|
+
readonly role: string;
|
|
47
|
+
readonly allowedModes: readonly PhaseMode[];
|
|
48
|
+
/** The `team.agents[]` names, in DNA order, that execute the role and declare an adapter. */
|
|
49
|
+
readonly agents: readonly string[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* `agent list`'s payload (`spec-016` §5): `baseline` and `diagnostics` always, and only the selected source
|
|
53
|
+
* keys, in that order.
|
|
54
|
+
*/
|
|
55
|
+
export interface AgentListResult {
|
|
56
|
+
readonly baseline: Baseline;
|
|
57
|
+
readonly past?: readonly RunRecord[];
|
|
58
|
+
readonly waiting?: readonly WaitingStep[];
|
|
59
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
60
|
+
}
|
|
61
|
+
/** A diagnostic as the console's `warning:` line: `<code> (<file>): <message>` (`spec-008` §6's form). */
|
|
62
|
+
export declare function diagnosticWarning(diagnostic: Diagnostic): string;
|
|
63
|
+
/** What the request selects, parsed before the project is read. */
|
|
64
|
+
interface Selection {
|
|
65
|
+
readonly past: boolean;
|
|
66
|
+
readonly waiting: boolean;
|
|
67
|
+
readonly element?: string;
|
|
68
|
+
readonly phase?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* `agent list` at `HEAD` (`spec-016` §5, §5.1).
|
|
72
|
+
*
|
|
73
|
+
* @returns the payload and its success warnings (each diagnostic, and the missing-run-log warning); a §4.5
|
|
74
|
+
* violation of a committed run log is `VALIDATION` (exit `1`); `dna.yaml` not committed when the past
|
|
75
|
+
* section is selected is `NOT_FOUND`, as `agent show`.
|
|
76
|
+
* @throws `DiagnosticsError` / `ValidationError` from the deduction (mapped by {@link agentListFn}).
|
|
77
|
+
*/
|
|
78
|
+
export declare function agentListAtHead(root: string, selection: Selection): CoreResult<AgentListResult>;
|
|
79
|
+
/**
|
|
80
|
+
* `agent list` `CoreOperation.fn` (`mutates: false`; `spec-006` §3, `spec-016` §8).
|
|
81
|
+
*
|
|
82
|
+
* 1. The selection: `--past`, `--waiting`; neither or both select both sections. A malformed `--element`
|
|
83
|
+
* (`spec-008` §7) is a usage error (exit `2`), refused before the project is read.
|
|
84
|
+
* 2. {@link agentListAtHead}; a `spec-003` error in the registry at `HEAD` is `VALIDATION` with every
|
|
85
|
+
* diagnostic in `details`, an invalid committed file `VALIDATION` with its issues, as `workflow status`.
|
|
86
|
+
*/
|
|
87
|
+
export declare const agentListFn: CoreFn<unknown, AgentListResult>;
|
|
88
|
+
/**
|
|
89
|
+
* `agent list`'s `--format console` (`spec-016` §5): one section per selected source, past first — a
|
|
90
|
+
* heading with the count, then one line per item, or `no past runs` / `no waiting steps` for an empty one.
|
|
91
|
+
* Diagnostics are not here: they print on stderr as `warning:` lines (the success warnings).
|
|
92
|
+
*/
|
|
93
|
+
export declare function renderAgentListConsole(value: unknown): string;
|
|
94
|
+
export {};
|
|
95
|
+
//# sourceMappingURL=agent-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-list.d.ts","sourceRoot":"","sources":["../../src/core/agent-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAqC,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAmD,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACpG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAK3D,mGAAmG;AACnG,eAAO,MAAM,kBAAkB,8CAA8C,CAAC;AAE9E,yGAAyG;AACzG,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,OAA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