wingfoil 0.2.1 → 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 +88 -42
- 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 +2 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +3 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init-command.d.ts.map +1 -1
- package/dist/cli/init-command.js +6 -3
- 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 +270 -60
- package/dist/cli/program.js.map +1 -1
- package/dist/cli/registrar.d.ts +16 -7
- package/dist/cli/registrar.d.ts.map +1 -1
- package/dist/cli/registrar.js +71 -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.js +6 -6
- 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 +189 -14
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1241 -238
- package/dist/core/index.js.map +1 -1
- package/dist/core/init.d.ts +50 -8
- package/dist/core/init.d.ts.map +1 -1
- package/dist/core/init.js +139 -27
- 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 +147 -23
- 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 +35 -30
- package/dist/directives/schema.d.ts.map +1 -1
- package/dist/directives/schema.js +36 -30
- 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 +9 -5
- 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 +160 -17
- package/dist/memory/add.d.ts.map +1 -1
- package/dist/memory/add.js +361 -51
- package/dist/memory/add.js.map +1 -1
- package/dist/memory/audit.d.ts +165 -32
- package/dist/memory/audit.d.ts.map +1 -1
- package/dist/memory/audit.js +267 -97
- 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 +74 -13
- package/dist/memory/history.d.ts.map +1 -1
- package/dist/memory/history.js +129 -45
- 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 +38 -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 +136 -48
- 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 +182 -17
- 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 +40 -0
- package/dist/validation/id.d.ts.map +1 -1
- package/dist/validation/id.js +99 -12
- 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 +33 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/secret-scan.d.ts +10 -7
- package/dist/validation/secret-scan.d.ts.map +1 -1
- package/dist/validation/secret-scan.js +39 -16
- 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 +190 -16
- package/dist/workflow/schema.js.map +1 -1
- package/package.json +37 -13
package/dist/core/relevance.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NO_RELEVANT_MEMORY_NOTE = exports.DEFAULT_CONTEXT_LIMITS = void 0;
|
|
4
4
|
exports.filterRelevantMemoryDocuments = filterRelevantMemoryDocuments;
|
|
5
|
+
exports.selectRelevantMemoryDocuments = selectRelevantMemoryDocuments;
|
|
5
6
|
/**
|
|
6
7
|
* `relevance-filter` (task-035-bounded-context-relevance, REQ-PERF-05) —
|
|
7
8
|
* spec-012-context-loader-relevance-filtering §6's deterministic Memory-document selection unit:
|
|
@@ -12,8 +13,8 @@ exports.filterRelevantMemoryDocuments = filterRelevantMemoryDocuments;
|
|
|
12
13
|
*
|
|
13
14
|
* This module implements ONLY spec-012 §6 (`relevance-filter`), one of the four cooperating units
|
|
14
15
|
* spec-012 defines (`dna-loader`, `directive-loader`, `relevance-filter`, `context-builder`) — the
|
|
15
|
-
* other three, and the canonical serialized envelope (§7),
|
|
16
|
-
* task-
|
|
16
|
+
* other three, and the canonical serialized envelope (§7), live in `./context.ts`
|
|
17
|
+
* (`assembleExecutionContext`, task-176), which calls this unit at its `stateRef`. For the
|
|
17
18
|
* document scan itself it wraps, not reimplements, `src/memory/query.ts`'s scan primitives
|
|
18
19
|
* (task-008) — no second directory walk or frontmatter parser — and is placed in `src/core` per
|
|
19
20
|
* spec-012 §1 ("folded into the `core` module"). It is re-exported from `src/core`'s barrel, so
|
|
@@ -30,12 +31,13 @@ exports.filterRelevantMemoryDocuments = filterRelevantMemoryDocuments;
|
|
|
30
31
|
* `spec-001-memory-yaml-schema` removed from every type's machine.
|
|
31
32
|
*
|
|
32
33
|
* Determinism (REQ-SYS-07): no wall-clock, no randomness, no unordered map/set iteration in any
|
|
33
|
-
* output-affecting path.
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* {@link
|
|
34
|
+
* output-affecting path. The ranking itself, {@link selectRelevantMemoryDocuments}, is a pure function
|
|
35
|
+
* of `(documents, element, limits)` and reads nothing. Where the documents come from is the caller's
|
|
36
|
+
* choice: the execution-context builder (`./context.ts`, task-176) feeds it the snapshot
|
|
37
|
+
* `loadMemoryDocumentsAtRev` reads at `spec-012` §2's `stateRef`, so a context is pinned to one commit;
|
|
38
|
+
* {@link filterRelevantMemoryDocuments} feeds it the live working tree under `root`, whose content is
|
|
39
|
+
* then part of its input. See {@link selectRelevantMemoryDocuments} for the exact ordering/bounding
|
|
40
|
+
* contract.
|
|
39
41
|
*/
|
|
40
42
|
const query_1 = require("../memory/query");
|
|
41
43
|
const state_machine_1 = require("../memory/state-machine");
|
|
@@ -176,40 +178,56 @@ function isSameReleaseScope(elementRelease, documentPath, documentFrontmatter) {
|
|
|
176
178
|
return documentPath.includes(`/${elementRelease}/`) || asString(documentFrontmatter.release) === elementRelease;
|
|
177
179
|
}
|
|
178
180
|
/**
|
|
179
|
-
* Rank and bound the Memory documents relevant to `element` (spec-012 §6, REQ-PERF-05)
|
|
180
|
-
*
|
|
181
|
+
* Rank and bound the Memory documents relevant to `element` (spec-012 §6, REQ-PERF-05), scanning the
|
|
182
|
+
* **working tree** under `root`: every document `memoryYaml` declares, in sorted path order
|
|
183
|
+
* (`loadMemoryDocuments`, task-008), handed to {@link selectRelevantMemoryDocuments}. An execution
|
|
184
|
+
* context does not use this reader: it ranks the snapshot read at its `stateRef` (`./context.ts`).
|
|
181
185
|
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
186
|
+
* The read is tolerant like every other Memory scan (task-171; task-253, `bug-230`; `spec-017` §1.4):
|
|
187
|
+
* a document whose frontmatter does not parse, and a symbolic link, are left out of the ranking and
|
|
188
|
+
* reported in the result's `diagnostics` as `W_MEMORY_UNREADABLE`, so one malformed document never
|
|
189
|
+
* fails the filter for every element.
|
|
190
|
+
*/
|
|
191
|
+
function filterRelevantMemoryDocuments(root, memoryYaml, element, limits = exports.DEFAULT_CONTEXT_LIMITS) {
|
|
192
|
+
const diagnostics = [];
|
|
193
|
+
const documents = (0, query_1.loadMemoryDocuments)(root, memoryYaml, { onDiagnostic: (diagnostic) => diagnostics.push(diagnostic) });
|
|
194
|
+
return { ...selectRelevantMemoryDocuments(documents, element, limits), diagnostics };
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Rank and bound `documents` by their relevance to `element` (spec-012 §6, REQ-PERF-05). A pure
|
|
198
|
+
* function of its arguments: it reads nothing, so the caller decides which state is ranked — the
|
|
199
|
+
* working tree ({@link filterRelevantMemoryDocuments}) or one commit (`./context.ts`, `stateRef`).
|
|
200
|
+
* Deterministic end to end (REQ-SYS-07):
|
|
201
|
+
*
|
|
202
|
+
* 1. **Exclude** the element's own document (never relevant to itself) and any document
|
|
185
203
|
* {@link isExcludedFromContext} bars — `draft` plus the shared archived set `{deprecated,
|
|
186
204
|
* superseded}` (`dl-028`; the archived half is the same predicate REQ-STATE-06 applies to default
|
|
187
205
|
* `memory search`, the `draft` half is context-only).
|
|
188
|
-
*
|
|
206
|
+
* 2. **Score** each remaining document: `1000*T1 + 100*T2 + 10*T3 + overlapCount(T4)` — T1 explicit
|
|
189
207
|
* link, T2 same release scope, T3 shared traceability key, T4 keyword/tag overlap count
|
|
190
208
|
* (spec-012 §6's exact formula). A document scoring `0` (no tier hit at all) is **not relevant**
|
|
191
209
|
* and is dropped — this is the relevance threshold P5.3.3-relevance-filtering.feature's "Edge - no
|
|
192
210
|
* documents pass the relevance threshold" scenario exercises.
|
|
193
|
-
*
|
|
194
|
-
* no `id`) — a total, deterministic tie-break (spec-012 §6/REQ-SYS-07).
|
|
195
|
-
*
|
|
211
|
+
* 3. **Order**: score DESC, then `type` ASC, then `id` ASC (falling back to `path` when a document has
|
|
212
|
+
* no `id`) — a total, deterministic tie-break (spec-012 §6/REQ-SYS-07). The input order therefore
|
|
213
|
+
* never reaches the output.
|
|
214
|
+
* 4. **Bound**: walk in that order, including documents until either `limits.maxDocs` or
|
|
196
215
|
* `limits.maxBytes` (summed UTF-8 body bytes) would be exceeded, then **stop** — never skip a
|
|
197
216
|
* lower-ranked document to fit under a cap while a higher-ranked one was excluded, and never
|
|
198
217
|
* partially include a document (spec-012 §6's "deterministic truncation").
|
|
199
218
|
*
|
|
200
|
-
* Returns {@link NO_RELEVANT_MEMORY_NOTE} in `note` only when **step
|
|
219
|
+
* Returns {@link NO_RELEVANT_MEMORY_NOTE} in `note` only when **step 2 left nothing** — i.e. no
|
|
201
220
|
* document passed the relevance threshold at all (P5.3.3's edge-case scenario, verbatim wording).
|
|
202
|
-
* When documents scored as relevant but step
|
|
221
|
+
* When documents scored as relevant but step 4's caps admitted none of them, `documents` is empty and
|
|
203
222
|
* `note` is omitted: relevant Memory *was* found, so the note would assert something false.
|
|
204
223
|
*/
|
|
205
|
-
function
|
|
224
|
+
function selectRelevantMemoryDocuments(documents, element, limits) {
|
|
206
225
|
const linkedIds = collectLinkedIds(element.frontmatter);
|
|
207
226
|
const elementRelease = asString(element.frontmatter.release);
|
|
208
227
|
const elementTraceability = collectTraceabilityKeys(element.frontmatter);
|
|
209
228
|
const elementKeywords = collectKeywords(element.frontmatter);
|
|
210
229
|
const scored = [];
|
|
211
|
-
for (const path
|
|
212
|
-
const { frontmatter, body } = (0, query_1.loadMemoryDocumentSummary)(root, path);
|
|
230
|
+
for (const { path, frontmatter, body } of documents) {
|
|
213
231
|
const type = asString(frontmatter.type);
|
|
214
232
|
const id = asString(frontmatter.id);
|
|
215
233
|
const status = asString(frontmatter.status);
|
|
@@ -240,19 +258,19 @@ function filterRelevantMemoryDocuments(root, memoryYaml, element, limits = expor
|
|
|
240
258
|
const idB = b.id ?? b.path;
|
|
241
259
|
return idA < idB ? -1 : idA > idB ? 1 : 0;
|
|
242
260
|
});
|
|
243
|
-
const
|
|
261
|
+
const included = [];
|
|
244
262
|
let totalBytes = 0;
|
|
245
263
|
for (const doc of scored) {
|
|
246
|
-
if (
|
|
264
|
+
if (included.length >= limits.maxDocs)
|
|
247
265
|
break;
|
|
248
266
|
const docBytes = Buffer.byteLength(doc.body, 'utf-8');
|
|
249
267
|
if (totalBytes + docBytes > limits.maxBytes)
|
|
250
268
|
break;
|
|
251
|
-
|
|
269
|
+
included.push(doc);
|
|
252
270
|
totalBytes += docBytes;
|
|
253
271
|
}
|
|
254
|
-
// The note is keyed to `scored`, NOT to `
|
|
272
|
+
// The note is keyed to `scored`, NOT to `included`: an empty `included` with a non-empty `scored`
|
|
255
273
|
// means relevant Memory existed and was bounded out, which the note must not claim away.
|
|
256
|
-
return scored.length === 0 ? { documents, note: exports.NO_RELEVANT_MEMORY_NOTE } : { documents };
|
|
274
|
+
return scored.length === 0 ? { documents: included, note: exports.NO_RELEVANT_MEMORY_NOTE } : { documents: included };
|
|
257
275
|
}
|
|
258
276
|
//# sourceMappingURL=relevance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relevance.js","sourceRoot":"","sources":["../../src/core/relevance.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"relevance.js","sourceRoot":"","sources":["../../src/core/relevance.ts"],"names":[],"mappings":";;;AAgQA,sEASC;AA8BD,sEAyDC;AAhWD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,2CAAkF;AAElF,2DAA2D;AAc3D,iGAAiG;AACpF,QAAA,sBAAsB,GAAkB,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AA+BvF;2EAC2E;AAC9D,QAAA,uBAAuB,GAAG,mCAAmC,CAAC;AA6B3E;;;;;GAKG;AACH,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAClC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,sFAAsF;AAEtF;+EAC+E;AAC/E,MAA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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,MAAM,QAAQ,GAA6B,EAAE,CAAC;IAC9C,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,IAAI,QAAQ,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO;YAAE,MAAM;QAC7C,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACtD,IAAI,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC,QAAQ;YAAE,MAAM;QACnD,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,UAAU,IAAI,QAAQ,CAAC;IACzB,CAAC;IAED,kGAAkG;IAClG,yFAAyF;IACzF,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,+BAAuB,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;AAChH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-reason.d.ts","sourceRoot":"","sources":["../../src/core/require-reason.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"require-reason.d.ts","sourceRoot":"","sources":["../../src/core/require-reason.ts"],"names":[],"mappings":"AA4DA;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,GAAG,MAAM,CAM3F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGxG"}
|
|
@@ -42,8 +42,9 @@ const usage_error_1 = require("./usage-error");
|
|
|
42
42
|
const MISSING_REASON_ERROR = 'missing required argument: --reason';
|
|
43
43
|
/**
|
|
44
44
|
* The given reason in its declared normal form, or a `UsageError` (exit 2) naming the defect that
|
|
45
|
-
* makes it unrecordable — blank, carrying a
|
|
46
|
-
* (`
|
|
45
|
+
* makes it unrecordable — blank, carrying a control character other than tab or newline, carrying a
|
|
46
|
+
* reserved trailer line, or ending in a paragraph shaped like one (`reasonRefusalMessage`,
|
|
47
|
+
* `src/memory/commit-message.ts`).
|
|
47
48
|
*
|
|
48
49
|
* The message is deliberately NOT {@link MISSING_REASON_ERROR}: that string answers the *omitted*
|
|
49
50
|
* case, and `spec-008-cli-grammar` §2 plus the `P1.7`/`P1.8` BDD features quote it verbatim for that
|
|
@@ -51,9 +52,9 @@ const MISSING_REASON_ERROR = 'missing required argument: --reason';
|
|
|
51
52
|
* (dl-067 S1).
|
|
52
53
|
*/
|
|
53
54
|
function recordableReason(reason) {
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
throw new usage_error_1.UsageError(
|
|
55
|
+
const refusal = (0, commit_message_1.reasonRefusalMessage)(reason);
|
|
56
|
+
if (refusal !== null) {
|
|
57
|
+
throw new usage_error_1.UsageError(refusal);
|
|
57
58
|
}
|
|
58
59
|
return (0, commit_message_1.normalizeReason)(reason);
|
|
59
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-reason.js","sourceRoot":"","sources":["../../src/core/require-reason.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"require-reason.js","sourceRoot":"","sources":["../../src/core/require-reason.ts"],"names":[],"mappings":";;AAwEA,sCAMC;AAcD,wCAGC;AA/FD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,6DAAiF;AAEjF,+CAA2C;AAE3C,qIAAqI;AACrI,MAAM,oBAAoB,GAAG,qCAAqC,CAAC;AAEnE;;;;;;;;;;GAUG;AACH,SAAS,gBAAgB,CAAC,MAAc;IACtC,MAAM,OAAO,GAAG,IAAA,qCAAoB,EAAC,MAAM,CAAC,CAAC;IAC7C,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,wBAAU,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,IAAA,gCAAe,EAAC,MAAM,CAAC,CAAC;AACjC,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,aAAa,CAAC,OAAqD;IACjF,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAC/B,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,wBAAU,CAAC,oBAAoB,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAClC,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,cAAc,CAAC,OAAqD;IAClF,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;IAC/B,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -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-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AC,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IACpF,MAAM,OAAO,GAAG,IAAA,8BAAqB,EAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,sBAAsB,IAAI,EAAE,CAAC,CAAC;IACrG,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,6BAA6B,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjG,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,2BAA2B,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1H,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAA,cAAM,EAAC,SAAS,CAAC,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
|
+
//# sourceMappingURL=revision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revision.js","sourceRoot":"","sources":["../../src/core/revision.ts"],"names":[],"mappings":";;;AA8DA,oDAGC;AAYD,0CAKC;AAWD,8CAMC;AASD,0DAMC;AAmBD,4BAQC;AA7ID;;;;;;;;;GASG;AACH,2BAAgC;AAChC,+BAA4B;AAE5B,wCAAuI;AAIvI;;;;;;;;;;GAUG;AACH,MAAa,aAAc,SAAQ,KAAK;IAC7B,IAAI,CAAgB;IACpB,OAAO,CAA2B;IAE3C,YAAY,IAAgC,EAAE,GAAW;QACvD,KAAK,CACH,IAAI,KAAK,YAAY;YACnB,CAAC,CAAC,sBAAsB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,8GAA8G;YACzJ,CAAC,CAAC,YAAY,IAAI,CAAC,SAA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
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.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,sEAAsE;AACtE,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,oBAAoB,GAAG,YAAY,GAAG,UAAU,GAAG,IAAI,CAAC;AAElG;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,sEAAsE;AACtE,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,oBAAoB,GAAG,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