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
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The required-field check two verbs share (`spec-010` § Validation rules): `memory submit` before
|
|
3
|
+
* leaving the initial state, and `memory amend` on a document already past it (task-127 review F1).
|
|
4
|
+
* One function, so the two can never disagree about what "filled" means.
|
|
5
|
+
*
|
|
6
|
+
* A field is refused when it is missing — absent, `null`, blank, a mapping, or a list on a field the
|
|
7
|
+
* type does not declare in `template.frontmatter.lists` (`bug-147`, task-168 re-review rulings) — or
|
|
8
|
+
* when it holds a
|
|
9
|
+
* not-applicable value that may not stand (`dl-124`, task-168): the type does not list the field in
|
|
10
|
+
* `template.frontmatter.not_applicable_allowed`, or the value is not `"n/a — <reason>"`. A required
|
|
11
|
+
* field the type does not list — `task.kind` in this repository — therefore cannot be skipped by
|
|
12
|
+
* writing `n/a` in it.
|
|
13
|
+
*
|
|
14
|
+
* A field the type's `template.frontmatter.exempt` lists for this document's `id` is not required of
|
|
15
|
+
* it at all (`bug-342`, task-279): neither checked nor named in the refusal. The declaration in
|
|
16
|
+
* `memory.yaml` is the only source of the exemption — this repository's releases added before
|
|
17
|
+
* `dl-092` carry no `kind`; no id is written here.
|
|
18
|
+
*/
|
|
19
|
+
import { type MemoryYaml } from '../memory';
|
|
20
|
+
import { type CoreResult } from './types';
|
|
21
|
+
/**
|
|
22
|
+
* `VALIDATION` (exit 1) naming every refused field, or `ok`. A list is a value only on the fields the
|
|
23
|
+
* type declares in `template.frontmatter.lists`. The message is
|
|
24
|
+
* `missing required field on <verb>: a, b`, then — joined by `; ` when both apply —
|
|
25
|
+
* `not-applicable value on <verb>: <field> …`, each clause in declared field order.
|
|
26
|
+
*/
|
|
27
|
+
export declare function requireRequiredFields(memoryYaml: MemoryYaml, type: string, frontmatter: Readonly<Record<string, unknown>>, verb: 'submit' | 'amend'): CoreResult<undefined>;
|
|
28
|
+
//# sourceMappingURL=required-fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-fields.d.ts","sourceRoot":"","sources":["../../src/core/required-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAgD,KAAK,UAAU,EAA6B,MAAM,WAAW,CAAC;AAErH,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAa3D;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC9C,IAAI,EAAE,QAAQ,GAAG,OAAO,GACvB,UAAU,CAAC,SAAS,CAAC,CAiBvB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.requireRequiredFields = requireRequiredFields;
|
|
4
|
+
/**
|
|
5
|
+
* The required-field check two verbs share (`spec-010` § Validation rules): `memory submit` before
|
|
6
|
+
* leaving the initial state, and `memory amend` on a document already past it (task-127 review F1).
|
|
7
|
+
* One function, so the two can never disagree about what "filled" means.
|
|
8
|
+
*
|
|
9
|
+
* A field is refused when it is missing — absent, `null`, blank, a mapping, or a list on a field the
|
|
10
|
+
* type does not declare in `template.frontmatter.lists` (`bug-147`, task-168 re-review rulings) — or
|
|
11
|
+
* when it holds a
|
|
12
|
+
* not-applicable value that may not stand (`dl-124`, task-168): the type does not list the field in
|
|
13
|
+
* `template.frontmatter.not_applicable_allowed`, or the value is not `"n/a — <reason>"`. A required
|
|
14
|
+
* field the type does not list — `task.kind` in this repository — therefore cannot be skipped by
|
|
15
|
+
* writing `n/a` in it.
|
|
16
|
+
*
|
|
17
|
+
* A field the type's `template.frontmatter.exempt` lists for this document's `id` is not required of
|
|
18
|
+
* it at all (`bug-342`, task-279): neither checked nor named in the refusal. The declaration in
|
|
19
|
+
* `memory.yaml` is the only source of the exemption — this repository's releases added before
|
|
20
|
+
* `dl-092` carry no `kind`; no id is written here.
|
|
21
|
+
*/
|
|
22
|
+
const memory_1 = require("../memory");
|
|
23
|
+
const types_1 = require("./types");
|
|
24
|
+
function describeRefusal(type, refusal) {
|
|
25
|
+
switch (refusal.problem) {
|
|
26
|
+
case 'no-reason':
|
|
27
|
+
return `${refusal.field} needs a reason, written "n/a — <reason>"`;
|
|
28
|
+
case 'bad-form':
|
|
29
|
+
return `${refusal.field} must be written "n/a — <reason>", with an em dash before the reason`;
|
|
30
|
+
default:
|
|
31
|
+
return `${refusal.field} does not accept one (type '${type}' does not list it in template.frontmatter.not_applicable_allowed)`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* `VALIDATION` (exit 1) naming every refused field, or `ok`. A list is a value only on the fields the
|
|
36
|
+
* type declares in `template.frontmatter.lists`. The message is
|
|
37
|
+
* `missing required field on <verb>: a, b`, then — joined by `; ` when both apply —
|
|
38
|
+
* `not-applicable value on <verb>: <field> …`, each clause in declared field order.
|
|
39
|
+
*/
|
|
40
|
+
function requireRequiredFields(memoryYaml, type, frontmatter, verb) {
|
|
41
|
+
const template = memoryYaml.types[type]?.template?.frontmatter;
|
|
42
|
+
const id = frontmatter['id'];
|
|
43
|
+
const exempt = template?.exempt ?? {};
|
|
44
|
+
// Own properties only: a field named like an Object.prototype member (`constructor`, `toString`) is
|
|
45
|
+
// an ordinary required field, never the prototype's function (task-279 review F1).
|
|
46
|
+
const exemptIds = (field) => (Object.hasOwn(exempt, field) ? (exempt[field] ?? []) : []);
|
|
47
|
+
const required = (template?.required ?? []).filter((field) => !(typeof id === 'string' && exemptIds(field).includes(id)));
|
|
48
|
+
const missing = (0, memory_1.missingRequiredFields)(frontmatter, required, template?.lists ?? []);
|
|
49
|
+
const refused = (0, memory_1.notApplicableRefusals)(frontmatter, required, template?.not_applicable_allowed ?? []);
|
|
50
|
+
const clauses = [];
|
|
51
|
+
if (missing.length > 0)
|
|
52
|
+
clauses.push(`missing required field on ${verb}: ${missing.join(', ')}`);
|
|
53
|
+
if (refused.length > 0) {
|
|
54
|
+
clauses.push(`not-applicable value on ${verb}: ${refused.map((refusal) => describeRefusal(type, refusal)).join(', ')}`);
|
|
55
|
+
}
|
|
56
|
+
if (clauses.length === 0)
|
|
57
|
+
return (0, types_1.coreOk)(undefined);
|
|
58
|
+
return (0, types_1.coreErr)({ code: 'VALIDATION', message: clauses.join('; ') });
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=required-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"required-fields.js","sourceRoot":"","sources":["../../src/core/required-fields.ts"],"names":[],"mappings":";;AAuCA,sDAsBC;AA7DD;;;;;;;;;;;;;;;;;GAiBG;AACH,sCAAqH;AAErH,mCAA2D;AAE3D,SAAS,eAAe,CAAC,IAAY,EAAE,OAA6B;IAClE,QAAQ,OAAO,CAAC,OAAO,EAAE,CAAC;QACxB,KAAK,WAAW;YACd,OAAO,GAAG,OAAO,CAAC,KAAK,2CAA2C,CAAC;QACrE,KAAK,UAAU;YACb,OAAO,GAAG,OAAO,CAAC,KAAK,sEAAsE,CAAC;QAChG;YACE,OAAO,GAAG,OAAO,CAAC,KAAK,+BAA+B,IAAI,oEAAoE,CAAC;IACnI,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CACnC,UAAsB,EACtB,IAAY,EACZ,WAA8C,EAC9C,IAAwB;IAExB,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC;IAC/D,MAAM,EAAE,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAC7B,MAAM,MAAM,GAAG,QAAQ,EAAE,MAAM,IAAI,EAAE,CAAC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AC,CAAC;IACnD,OAAO,IAAA,eAAO,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type BlobEntry } from '../storage';
|
|
2
|
+
import type { CoreError, CoreErrorCode } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A revision a `…AtRev` reader cannot read at. It is thrown, like the loaders' `ValidationError`, and
|
|
5
|
+
* it **is** a {@link CoreError} — `code`, `message`, `details: { rev }` — so a core function hands it
|
|
6
|
+
* on with `coreErr(error.toCoreError())`.
|
|
7
|
+
*
|
|
8
|
+
* - `VALIDATION`: the rev is malformed ({@link isWellFormedRevision}) and was never shown to git.
|
|
9
|
+
* - `NOT_FOUND`: the rev is well formed and names no commit — an unknown name, an unborn `HEAD`, a
|
|
10
|
+
* tree or a blob.
|
|
11
|
+
*
|
|
12
|
+
* Both messages name the rev JSON-quoted, so an empty or whitespace rev is visible.
|
|
13
|
+
*/
|
|
14
|
+
export declare class RevisionError extends Error implements CoreError {
|
|
15
|
+
readonly code: CoreErrorCode;
|
|
16
|
+
readonly details: {
|
|
17
|
+
readonly rev: string;
|
|
18
|
+
};
|
|
19
|
+
constructor(code: 'VALIDATION' | 'NOT_FOUND', rev: string);
|
|
20
|
+
/** The plain {@link CoreError} value, for a `CoreResult` (spec-006 §2). */
|
|
21
|
+
toCoreError(): CoreError;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Whether `rev` has the shape a single-commit revision may have here. Refused: the empty string; a
|
|
25
|
+
* leading `-` (git would read it as an option); whitespace and control bytes (no ref name holds them,
|
|
26
|
+
* and a newline would split a batch request); `:` (that is `<rev>:<path>`, a blob, never a commit);
|
|
27
|
+
* `..` (a range, two commits). Everything else — `HEAD`, `HEAD~2`, a sha or its prefix, a branch, a tag,
|
|
28
|
+
* `main@{1}` — is left for git to resolve.
|
|
29
|
+
*
|
|
30
|
+
* The whitespace rule also refuses the revision forms that spell a phrase with spaces —
|
|
31
|
+
* `master@{1 day ago}`, `HEAD^{/fix bug}` — as `VALIDATION`. git's dotted spelling of an approxidate
|
|
32
|
+
* (`HEAD@{1.day.ago}`) has no space and resolves.
|
|
33
|
+
*/
|
|
34
|
+
export declare function isWellFormedRevision(rev: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Resolve `rev` to the full sha of the commit it names (task-137).
|
|
37
|
+
*
|
|
38
|
+
* @param root - Project root (the git repository).
|
|
39
|
+
* @param rev - A revision naming one commit: `HEAD`, a sha, a branch, a tag.
|
|
40
|
+
* @returns The commit's full sha.
|
|
41
|
+
* @throws {@link RevisionError} `VALIDATION` for a malformed rev, `NOT_FOUND` for one naming no commit;
|
|
42
|
+
* `StorageError` `E_GIT_READ_FAILED` when git cannot answer at all (a `root` that is not a
|
|
43
|
+
* repository, a `git` that cannot run) — a broken environment is not a missing revision.
|
|
44
|
+
*/
|
|
45
|
+
export declare function resolveRevision(root: string, rev: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Every file commit `sha` holds under `prefix` (`storage.listPathsAtRev`), for a sha
|
|
48
|
+
* {@link resolveRevision} has just resolved. `listPathsAtRev` answers `null` only for a revision that
|
|
49
|
+
* does not resolve, so a `null` here means git could not list a commit it had just resolved; that is a
|
|
50
|
+
* failed read, and it throws rather than passing for "the commit holds nothing" (the empty answer this
|
|
51
|
+
* module exists to keep away from an agent's context).
|
|
52
|
+
*
|
|
53
|
+
* @throws `StorageError` `E_GIT_READ_FAILED` when the listing fails.
|
|
54
|
+
*/
|
|
55
|
+
export declare function listPathsAtCommit(root: string, sha: string, prefix: string): string[];
|
|
56
|
+
/**
|
|
57
|
+
* {@link listPathsAtCommit} with each blob's kind (`storage.listBlobEntriesAtRev`): the Memory scan
|
|
58
|
+
* reads at a commit through this, so that a symbolic link is known as one rather than read as a
|
|
59
|
+
* document whose text is the link's target (task-171, `bug-189`).
|
|
60
|
+
*
|
|
61
|
+
* @throws `StorageError` `E_GIT_READ_FAILED` when the listing fails.
|
|
62
|
+
*/
|
|
63
|
+
export declare function listBlobEntriesAtCommit(root: string, sha: string, prefix: string): BlobEntry[];
|
|
64
|
+
/**
|
|
65
|
+
* Run a `…AtRev(root, 'HEAD')` read with the answer the `…AtHead` readers have always given when there
|
|
66
|
+
* is no `HEAD` to read — `fallback` (`null`, or `[]` for a directory) — rather than an error. Two
|
|
67
|
+
* conditions mean that, and only two (task-171, `bug-201`):
|
|
68
|
+
*
|
|
69
|
+
* - {@link RevisionError} `NOT_FOUND`: a repository with no commit yet (`HEAD` is a constant, so
|
|
70
|
+
* `VALIDATION` cannot occur);
|
|
71
|
+
* - `StorageError` `E_GIT_READ_FAILED` when `root` holds no `.git`: it is not a repository, so nothing
|
|
72
|
+
* is committed there.
|
|
73
|
+
*
|
|
74
|
+
* Their callers treat the fallback as "nothing committed" (task-090, task-091, task-096). Any other
|
|
75
|
+
* failure is thrown, and the caller refuses it by name: a `git` that cannot be spawned, an answer past
|
|
76
|
+
* the read buffer, a tree git cannot read. Until task-171 every `E_GIT_READ_FAILED` gave the fallback,
|
|
77
|
+
* so a failed read inside a repository passed for an empty baseline.
|
|
78
|
+
*
|
|
79
|
+
* @param root - The project root the read is against; asked only whether it holds `.git`.
|
|
80
|
+
*/
|
|
81
|
+
export declare function atHeadOr<T, F>(root: string, read: () => T, fallback: F): T | F;
|
|
82
|
+
//# sourceMappingURL=revision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revision.d.ts","sourceRoot":"","sources":["../../src/core/revision.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,SAAS,EAA6F,MAAM,YAAY,CAAC;AAEvI,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExD;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,SAAQ,KAAM,YAAW,SAAS;IAC3D,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;gBAE/B,IAAI,EAAE,YAAY,GAAG,WAAW,EAAE,GAAG,EAAE,MAAM;IAazD,2EAA2E;IAC3E,WAAW,IAAI,SAAS;CAGzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAKjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAMrF;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,CAM9F;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAQ9E"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RevisionError = void 0;
|
|
4
|
+
exports.isWellFormedRevision = isWellFormedRevision;
|
|
5
|
+
exports.resolveRevision = resolveRevision;
|
|
6
|
+
exports.listPathsAtCommit = listPathsAtCommit;
|
|
7
|
+
exports.listBlobEntriesAtCommit = listBlobEntriesAtCommit;
|
|
8
|
+
exports.atHeadOr = atHeadOr;
|
|
9
|
+
/**
|
|
10
|
+
* Resolving the revision a read is pinned to (task-137, `spec-012` §2 `stateRef`, `spec-016` §3.3
|
|
11
|
+
* step 7, `spec-017` §1.1).
|
|
12
|
+
*
|
|
13
|
+
* Every `…AtRev(root, rev)` reader — the pillar loaders (`./loaders.ts`) and the Memory scan
|
|
14
|
+
* (`../memory/query.ts`) — resolves its `rev` here, once, to the full sha of a commit, and reads every
|
|
15
|
+
* byte at that sha. A rev that resolves to nothing is a refusal, never an empty answer: an empty
|
|
16
|
+
* directive list or Memory scan is a legitimate answer for a commit that holds nothing, so handing it
|
|
17
|
+
* back for a mistyped rev would build an agent a wrong context that looks right.
|
|
18
|
+
*/
|
|
19
|
+
const fs_1 = require("fs");
|
|
20
|
+
const path_1 = require("path");
|
|
21
|
+
const storage_1 = require("../storage");
|
|
22
|
+
/**
|
|
23
|
+
* A revision a `…AtRev` reader cannot read at. It is thrown, like the loaders' `ValidationError`, and
|
|
24
|
+
* it **is** a {@link CoreError} — `code`, `message`, `details: { rev }` — so a core function hands it
|
|
25
|
+
* on with `coreErr(error.toCoreError())`.
|
|
26
|
+
*
|
|
27
|
+
* - `VALIDATION`: the rev is malformed ({@link isWellFormedRevision}) and was never shown to git.
|
|
28
|
+
* - `NOT_FOUND`: the rev is well formed and names no commit — an unknown name, an unborn `HEAD`, a
|
|
29
|
+
* tree or a blob.
|
|
30
|
+
*
|
|
31
|
+
* Both messages name the rev JSON-quoted, so an empty or whitespace rev is visible.
|
|
32
|
+
*/
|
|
33
|
+
class RevisionError extends Error {
|
|
34
|
+
code;
|
|
35
|
+
details;
|
|
36
|
+
constructor(code, rev) {
|
|
37
|
+
super(code === 'VALIDATION'
|
|
38
|
+
? `malformed revision ${JSON.stringify(rev)}: a revision is a non-empty name with no leading '-', no whitespace or control character, no ':' and no '..'`
|
|
39
|
+
: `revision ${JSON.stringify(rev)} does not name a commit`);
|
|
40
|
+
this.name = 'RevisionError';
|
|
41
|
+
this.code = code;
|
|
42
|
+
this.details = { rev };
|
|
43
|
+
// Restore the prototype chain so `instanceof RevisionError` holds after transpilation.
|
|
44
|
+
Object.setPrototypeOf(this, RevisionError.prototype);
|
|
45
|
+
}
|
|
46
|
+
/** The plain {@link CoreError} value, for a `CoreResult` (spec-006 §2). */
|
|
47
|
+
toCoreError() {
|
|
48
|
+
return { code: this.code, message: this.message, details: { rev: this.details.rev } };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.RevisionError = RevisionError;
|
|
52
|
+
/**
|
|
53
|
+
* Whether `rev` has the shape a single-commit revision may have here. Refused: the empty string; a
|
|
54
|
+
* leading `-` (git would read it as an option); whitespace and control bytes (no ref name holds them,
|
|
55
|
+
* and a newline would split a batch request); `:` (that is `<rev>:<path>`, a blob, never a commit);
|
|
56
|
+
* `..` (a range, two commits). Everything else — `HEAD`, `HEAD~2`, a sha or its prefix, a branch, a tag,
|
|
57
|
+
* `main@{1}` — is left for git to resolve.
|
|
58
|
+
*
|
|
59
|
+
* The whitespace rule also refuses the revision forms that spell a phrase with spaces —
|
|
60
|
+
* `master@{1 day ago}`, `HEAD^{/fix bug}` — as `VALIDATION`. git's dotted spelling of an approxidate
|
|
61
|
+
* (`HEAD@{1.day.ago}`) has no space and resolves.
|
|
62
|
+
*/
|
|
63
|
+
function isWellFormedRevision(rev) {
|
|
64
|
+
// eslint-disable-next-line no-control-regex
|
|
65
|
+
return rev.length > 0 && !rev.startsWith('-') && !/[\s\u0000-\u001f\u007f:]/.test(rev) && !rev.includes('..');
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Resolve `rev` to the full sha of the commit it names (task-137).
|
|
69
|
+
*
|
|
70
|
+
* @param root - Project root (the git repository).
|
|
71
|
+
* @param rev - A revision naming one commit: `HEAD`, a sha, a branch, a tag.
|
|
72
|
+
* @returns The commit's full sha.
|
|
73
|
+
* @throws {@link RevisionError} `VALIDATION` for a malformed rev, `NOT_FOUND` for one naming no commit;
|
|
74
|
+
* `StorageError` `E_GIT_READ_FAILED` when git cannot answer at all (a `root` that is not a
|
|
75
|
+
* repository, a `git` that cannot run) — a broken environment is not a missing revision.
|
|
76
|
+
*/
|
|
77
|
+
function resolveRevision(root, rev) {
|
|
78
|
+
if (!isWellFormedRevision(rev))
|
|
79
|
+
throw new RevisionError('VALIDATION', rev);
|
|
80
|
+
const sha = (0, storage_1.resolveCommitAtRev)(root, rev);
|
|
81
|
+
if (sha === null)
|
|
82
|
+
throw new RevisionError('NOT_FOUND', rev);
|
|
83
|
+
return sha;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Every file commit `sha` holds under `prefix` (`storage.listPathsAtRev`), for a sha
|
|
87
|
+
* {@link resolveRevision} has just resolved. `listPathsAtRev` answers `null` only for a revision that
|
|
88
|
+
* does not resolve, so a `null` here means git could not list a commit it had just resolved; that is a
|
|
89
|
+
* failed read, and it throws rather than passing for "the commit holds nothing" (the empty answer this
|
|
90
|
+
* module exists to keep away from an agent's context).
|
|
91
|
+
*
|
|
92
|
+
* @throws `StorageError` `E_GIT_READ_FAILED` when the listing fails.
|
|
93
|
+
*/
|
|
94
|
+
function listPathsAtCommit(root, sha, prefix) {
|
|
95
|
+
const listed = (0, storage_1.listPathsAtRev)(root, sha, prefix);
|
|
96
|
+
if (listed === null) {
|
|
97
|
+
throw new storage_1.StorageError(storage_1.E_GIT_READ_FAILED, `git ls-tree ${sha} -- ${prefix} failed in ${root}: the commit could not be listed`);
|
|
98
|
+
}
|
|
99
|
+
return listed;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* {@link listPathsAtCommit} with each blob's kind (`storage.listBlobEntriesAtRev`): the Memory scan
|
|
103
|
+
* reads at a commit through this, so that a symbolic link is known as one rather than read as a
|
|
104
|
+
* document whose text is the link's target (task-171, `bug-189`).
|
|
105
|
+
*
|
|
106
|
+
* @throws `StorageError` `E_GIT_READ_FAILED` when the listing fails.
|
|
107
|
+
*/
|
|
108
|
+
function listBlobEntriesAtCommit(root, sha, prefix) {
|
|
109
|
+
const listed = (0, storage_1.listBlobEntriesAtRev)(root, sha, prefix);
|
|
110
|
+
if (listed === null) {
|
|
111
|
+
throw new storage_1.StorageError(storage_1.E_GIT_READ_FAILED, `git ls-tree ${sha} -- ${prefix} failed in ${root}: the commit could not be listed`);
|
|
112
|
+
}
|
|
113
|
+
return listed;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Run a `…AtRev(root, 'HEAD')` read with the answer the `…AtHead` readers have always given when there
|
|
117
|
+
* is no `HEAD` to read — `fallback` (`null`, or `[]` for a directory) — rather than an error. Two
|
|
118
|
+
* conditions mean that, and only two (task-171, `bug-201`):
|
|
119
|
+
*
|
|
120
|
+
* - {@link RevisionError} `NOT_FOUND`: a repository with no commit yet (`HEAD` is a constant, so
|
|
121
|
+
* `VALIDATION` cannot occur);
|
|
122
|
+
* - `StorageError` `E_GIT_READ_FAILED` when `root` holds no `.git`: it is not a repository, so nothing
|
|
123
|
+
* is committed there.
|
|
124
|
+
*
|
|
125
|
+
* Their callers treat the fallback as "nothing committed" (task-090, task-091, task-096). Any other
|
|
126
|
+
* failure is thrown, and the caller refuses it by name: a `git` that cannot be spawned, an answer past
|
|
127
|
+
* the read buffer, a tree git cannot read. Until task-171 every `E_GIT_READ_FAILED` gave the fallback,
|
|
128
|
+
* so a failed read inside a repository passed for an empty baseline.
|
|
129
|
+
*
|
|
130
|
+
* @param root - The project root the read is against; asked only whether it holds `.git`.
|
|
131
|
+
*/
|
|
132
|
+
function atHeadOr(root, read, fallback) {
|
|
133
|
+
try {
|
|
134
|
+
return read();
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
if (error instanceof RevisionError && error.code === 'NOT_FOUND')
|
|
138
|
+
return fallback;
|
|
139
|
+
if (error instanceof storage_1.StorageError && error.code === storage_1.E_GIT_READ_FAILED && !(0, fs_1.existsSync)((0, path_1.join)(root, '.git')))
|
|
140
|
+
return fallback;
|
|
141
|
+
throw error;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
//# sourceMapping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rE,IAAI,CAAC;QACH,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW;YAAE,OAAO,QAAQ,CAAC;QAClF,IAAI,KAAK,YAAY,sBAAY,IAAI,KAAK,CAAC,IAAI,KAAK,2BAAiB,IAAI,CAAC,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAAE,OAAO,QAAQ,CAAC;QAC1H,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/core/types.d.ts
CHANGED
|
@@ -18,28 +18,54 @@ export interface CoreError {
|
|
|
18
18
|
readonly code: CoreErrorCode;
|
|
19
19
|
readonly message: string;
|
|
20
20
|
readonly details?: Record<string, unknown>;
|
|
21
|
+
/**
|
|
22
|
+
* One sentence suggesting what to do next, which the CLI prints as `spec-005` §3.1's `hint:` line
|
|
23
|
+
* (the `hint` field under `json`/`yaml`). It never changes the refusal or its code: `agent show`
|
|
24
|
+
* says through it that only the working tree holds the run it refused (task-220, `spec-016` §6,
|
|
25
|
+
* the `command-baseline` directive: the working tree may explain a refusal, never decide it).
|
|
26
|
+
* Absent when there is nothing to suggest.
|
|
27
|
+
*/
|
|
28
|
+
readonly hint?: string;
|
|
21
29
|
}
|
|
22
30
|
/**
|
|
23
31
|
* The discriminated-union return of every {@link CoreFn} (spec-006 §2): `ok: true` with the operation's
|
|
24
32
|
* `value` (and, for a mutation, the `commit` it produced), or `ok: false` with a {@link CoreError}.
|
|
25
33
|
* Expected domain failures travel here, never as a thrown exception.
|
|
34
|
+
*
|
|
35
|
+
* `warnings` (task-169, `dl-062` Q1 option 3) is the **success-warning channel**: what a successful
|
|
36
|
+
* operation wants the operator told — e.g. that `directive assign --force` rewrote `roles.yaml` as a
|
|
37
|
+
* whole file and what that normalized — kept apart from `value` so it never becomes part of the
|
|
38
|
+
* payload a script parses. Each entry is one operator-facing sentence, in the order core recorded it
|
|
39
|
+
* (REQ-SYS-07). The key is absent when there is nothing to say, never an empty list. Each surface
|
|
40
|
+
* renders it in one place: the CLI on stderr (`src/cli/warning.ts`), the MCP Tool result in
|
|
41
|
+
* `structuredContent` (`src/mcp/registrar.ts`).
|
|
26
42
|
*/
|
|
27
43
|
export type CoreResult<T> = {
|
|
28
44
|
readonly ok: true;
|
|
29
45
|
readonly value: T;
|
|
46
|
+
/**
|
|
47
|
+
* The commit the operation produced. `message` is the operation's message, not the stored body:
|
|
48
|
+
* `commitPaths` appends the `WingFoil-Version:` trailer paragraph to what it records (task-192,
|
|
49
|
+
* `dl-111`), and `git log --format=%B <sha>` reads the stored body.
|
|
50
|
+
*/
|
|
30
51
|
readonly commit?: {
|
|
31
52
|
readonly sha: string;
|
|
32
53
|
readonly message: string;
|
|
33
54
|
};
|
|
55
|
+
readonly warnings?: readonly string[];
|
|
34
56
|
} | {
|
|
35
57
|
readonly ok: false;
|
|
36
58
|
readonly error: CoreError;
|
|
37
59
|
};
|
|
38
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Build a success {@link CoreResult}, optionally carrying the git commit the operation produced and
|
|
62
|
+
* the warnings to show the operator (task-169). An empty `warnings` list is the same as none: the
|
|
63
|
+
* result then has no `warnings` key, the shape every success had before the channel existed.
|
|
64
|
+
*/
|
|
39
65
|
export declare function coreOk<T>(value: T, commit?: {
|
|
40
66
|
sha: string;
|
|
41
67
|
message: string;
|
|
42
|
-
}): CoreResult<T>;
|
|
68
|
+
}, warnings?: readonly string[]): CoreResult<T>;
|
|
43
69
|
/** Build a failure {@link CoreResult} from a {@link CoreError}. */
|
|
44
70
|
export declare function coreErr<T = never>(error: CoreError): CoreResult<T>;
|
|
45
71
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.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,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,CAAC,EACtB,KAAK,EAAE,CAAC,EACR,MAAM,CAAC,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EACzC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,GAC3B,UAAU,CAAC,CAAC,CAAC,CAOf;AAED,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,CAAC,GAAG,KAAK,EAAE,KAAK,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,CAElE"}
|
package/dist/core/types.js
CHANGED
|
@@ -11,9 +11,18 @@
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.coreOk = coreOk;
|
|
13
13
|
exports.coreErr = coreErr;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Build a success {@link CoreResult}, optionally carrying the git commit the operation produced and
|
|
16
|
+
* the warnings to show the operator (task-169). An empty `warnings` list is the same as none: the
|
|
17
|
+
* result then has no `warnings` key, the shape every success had before the channel existed.
|
|
18
|
+
*/
|
|
19
|
+
function coreOk(value, commit, warnings) {
|
|
20
|
+
return {
|
|
21
|
+
ok: true,
|
|
22
|
+
value,
|
|
23
|
+
...(commit ? { commit } : {}),
|
|
24
|
+
...(warnings !== undefined && warnings.length > 0 ? { warnings: [...warnings] } : {}),
|
|
25
|
+
};
|
|
17
26
|
}
|
|
18
27
|
/** Build a failure {@link CoreResult} from a {@link CoreError}. */
|
|
19
28
|
function coreErr(error) {
|
package/dist/core/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAwDH,wBAWC;AAGD,0BAEC;AArBD;;;;GAIG;AACH,SAAgB,MAAM,CACpB,KAAQ,EACR,MAAyC,EACzC,QAA4B;IAE5B,OAAO;QACL,EAAE,EAAE,IAAI;QACR,KAAK;QACL,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,GAAG,CAAC,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtF,CAAC;AACJ,CAAC;AAED,mEAAmE;AACnE,SAAgB,OAAO,CAAY,KAAgB;IACjD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { DnaYaml } from '../dna/schema';
|
|
2
|
+
import type { MemoryYaml } from '../memory/schema';
|
|
3
|
+
import type { Diagnostic } from '../validation';
|
|
4
|
+
import { type BindingsYaml } from '../workflow/bindings';
|
|
5
|
+
import { type Workflow } from '../workflow/schema';
|
|
6
|
+
/** What the core checks read besides the workflow files: the other pillars, from one baseline. */
|
|
7
|
+
export interface WorkflowCoreInputs {
|
|
8
|
+
/** `memory.yaml`, or `null` when the project has none. */
|
|
9
|
+
readonly memoryYaml: MemoryYaml | null;
|
|
10
|
+
/** `dna.yaml`, or `null` when the project has none. */
|
|
11
|
+
readonly dnaYaml: DnaYaml | null;
|
|
12
|
+
/**
|
|
13
|
+
* The frontmatter fields the template of `type` declares, or `null` when the type has no template or
|
|
14
|
+
* it cannot be read (the field half of `W_PHASE_TOKEN_OUT_OF_SCOPE` is then not decided).
|
|
15
|
+
*/
|
|
16
|
+
readonly templateFields: (type: string) => ReadonlySet<string> | null;
|
|
17
|
+
}
|
|
18
|
+
/** The registry the checks run on: the loader's accepted result. */
|
|
19
|
+
export interface CheckedRegistry {
|
|
20
|
+
/** The manifest's `include` list — the diagnostics' `file`, one per workflow. */
|
|
21
|
+
readonly include: readonly string[];
|
|
22
|
+
/** The workflows, in `include` order. */
|
|
23
|
+
readonly workflows: readonly Workflow[];
|
|
24
|
+
/** `workflows/bindings.yaml`, or `null` when the project has none. */
|
|
25
|
+
readonly bindings: BindingsYaml | null;
|
|
26
|
+
}
|
|
27
|
+
/** `W_WORKFLOW_CHECKS_NOT_RUN` (`bug-281`, spec-003 "Where each check runs"): a core check skipped for want of its input. */
|
|
28
|
+
export declare const W_WORKFLOW_CHECKS_NOT_RUN = "W_WORKFLOW_CHECKS_NOT_RUN";
|
|
29
|
+
/**
|
|
30
|
+
* Every core diagnostic of `registry` (spec-003 § "Diagnostics", `core` rows), in spec-003's order.
|
|
31
|
+
* Pure: it reads only its arguments.
|
|
32
|
+
*/
|
|
33
|
+
export declare function workflowCoreDiagnostics(registry: CheckedRegistry, inputs: WorkflowCoreInputs): Diagnostic[];
|
|
34
|
+
//# sourceMappingURL=workflow-core-checks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-core-checks.d.ts","sourceRoot":"","sources":["../../src/core/workflow-core-checks.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAiE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxH,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAIlE,kGAAkG;AAClG,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IACvC,uDAAuD;IACvD,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CACvE;AAED,oEAAoE;AACpE,MAAM,WAAW,eAAe;IAC9B,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,yCAAyC;IACzC,QAAQ,CAAC,SAAS,EAAE,SAAS,QAAQ,EAAE,CAAC;IACxC,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC;CACxC;AA6DD,6HAA6H;AAC7H,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAErE;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,eAAe,EAAE,MAAM,EAAE,kBAAkB,GAAG,UAAU,EAAE,CAK3G"}
|