wingfoil 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -43
- package/dist/agent/discovery.d.ts +72 -0
- package/dist/agent/discovery.d.ts.map +1 -0
- package/dist/agent/discovery.js +210 -0
- package/dist/agent/discovery.js.map +1 -0
- package/dist/agent/execute.d.ts +206 -0
- package/dist/agent/execute.d.ts.map +1 -0
- package/dist/agent/execute.js +581 -0
- package/dist/agent/execute.js.map +1 -0
- package/dist/agent/index.d.ts +23 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +85 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/launch.d.ts +133 -0
- package/dist/agent/launch.d.ts.map +1 -0
- package/dist/agent/launch.js +380 -0
- package/dist/agent/launch.js.map +1 -0
- package/dist/agent/manifest.d.ts +30 -0
- package/dist/agent/manifest.d.ts.map +1 -0
- package/dist/agent/manifest.js +93 -0
- package/dist/agent/manifest.js.map +1 -0
- package/dist/agent/placeholders.d.ts +49 -0
- package/dist/agent/placeholders.d.ts.map +1 -0
- package/dist/agent/placeholders.js +177 -0
- package/dist/agent/placeholders.js.map +1 -0
- package/dist/agent/run-log.d.ts +254 -0
- package/dist/agent/run-log.d.ts.map +1 -0
- package/dist/agent/run-log.js +612 -0
- package/dist/agent/run-log.js.map +1 -0
- package/dist/agent/schema.d.ts +100 -0
- package/dist/agent/schema.d.ts.map +1 -0
- package/dist/agent/schema.js +89 -0
- package/dist/agent/schema.js.map +1 -0
- package/dist/agent/step.d.ts +41 -0
- package/dist/agent/step.d.ts.map +1 -0
- package/dist/agent/step.js +95 -0
- package/dist/agent/step.js.map +1 -0
- package/dist/build-info.json +4 -0
- package/dist/cli/error.d.ts +11 -2
- package/dist/cli/error.d.ts.map +1 -1
- package/dist/cli/error.js +27 -6
- package/dist/cli/error.js.map +1 -1
- package/dist/cli/exit.d.ts +33 -3
- package/dist/cli/exit.d.ts.map +1 -1
- package/dist/cli/exit.js +54 -3
- package/dist/cli/exit.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init-command.d.ts.map +1 -1
- package/dist/cli/init-command.js +4 -2
- package/dist/cli/init-command.js.map +1 -1
- package/dist/cli/mcp-command.d.ts +13 -4
- package/dist/cli/mcp-command.d.ts.map +1 -1
- package/dist/cli/mcp-command.js +25 -8
- package/dist/cli/mcp-command.js.map +1 -1
- package/dist/cli/output.d.ts +12 -4
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +15 -4
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/program.d.ts +1 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +162 -40
- package/dist/cli/program.js.map +1 -1
- package/dist/cli/registrar.d.ts +1 -1
- package/dist/cli/registrar.d.ts.map +1 -1
- package/dist/cli/registrar.js +67 -6
- package/dist/cli/registrar.js.map +1 -1
- package/dist/cli/suggest.d.ts +20 -0
- package/dist/cli/suggest.d.ts.map +1 -0
- package/dist/cli/suggest.js +49 -0
- package/dist/cli/suggest.js.map +1 -0
- package/dist/cli/warning.d.ts +26 -0
- package/dist/cli/warning.d.ts.map +1 -0
- package/dist/cli/warning.js +66 -0
- package/dist/cli/warning.js.map +1 -0
- package/dist/cli.js +11 -2
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-execute.d.ts +44 -0
- package/dist/core/agent-execute.d.ts.map +1 -0
- package/dist/core/agent-execute.js +71 -0
- package/dist/core/agent-execute.js.map +1 -0
- package/dist/core/agent-list.d.ts +95 -0
- package/dist/core/agent-list.d.ts.map +1 -0
- package/dist/core/agent-list.js +207 -0
- package/dist/core/agent-list.js.map +1 -0
- package/dist/core/agent-show.d.ts +44 -0
- package/dist/core/agent-show.d.ts.map +1 -0
- package/dist/core/agent-show.js +188 -0
- package/dist/core/agent-show.js.map +1 -0
- package/dist/core/approval-authority.d.ts +17 -14
- package/dist/core/approval-authority.d.ts.map +1 -1
- package/dist/core/approval-authority.js +9 -9
- package/dist/core/approval-authority.js.map +1 -1
- package/dist/core/builtin-asset.d.ts +18 -15
- package/dist/core/builtin-asset.d.ts.map +1 -1
- package/dist/core/builtin-asset.js +17 -14
- package/dist/core/builtin-asset.js.map +1 -1
- package/dist/core/builtin-integrity.d.ts +12 -2
- package/dist/core/builtin-integrity.d.ts.map +1 -1
- package/dist/core/builtin-integrity.js +85 -9
- package/dist/core/builtin-integrity.js.map +1 -1
- package/dist/core/confinement.d.ts +3 -1
- package/dist/core/confinement.d.ts.map +1 -1
- package/dist/core/confinement.js +7 -4
- package/dist/core/confinement.js.map +1 -1
- package/dist/core/context.d.ts +150 -98
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/context.js +602 -66
- package/dist/core/context.js.map +1 -1
- package/dist/core/directive-assign.d.ts +33 -7
- package/dist/core/directive-assign.d.ts.map +1 -1
- package/dist/core/directive-assign.js +67 -27
- package/dist/core/directive-assign.js.map +1 -1
- package/dist/core/directive-scope.d.ts +36 -0
- package/dist/core/directive-scope.d.ts.map +1 -0
- package/dist/core/directive-scope.js +34 -0
- package/dist/core/directive-scope.js.map +1 -0
- package/dist/core/directives-list.d.ts +13 -3
- package/dist/core/directives-list.d.ts.map +1 -1
- package/dist/core/directives-list.js +18 -6
- package/dist/core/directives-list.js.map +1 -1
- package/dist/core/dry-run.d.ts +33 -0
- package/dist/core/dry-run.d.ts.map +1 -0
- package/dist/core/dry-run.js +45 -0
- package/dist/core/dry-run.js.map +1 -0
- package/dist/core/element-ref.d.ts +23 -0
- package/dist/core/element-ref.d.ts.map +1 -0
- package/dist/core/element-ref.js +24 -0
- package/dist/core/element-ref.js.map +1 -0
- package/dist/core/error-details.d.ts +20 -0
- package/dist/core/error-details.d.ts.map +1 -0
- package/dist/core/error-details.js +65 -0
- package/dist/core/error-details.js.map +1 -0
- package/dist/core/exit-code.d.ts.map +1 -1
- package/dist/core/exit-code.js +6 -7
- package/dist/core/exit-code.js.map +1 -1
- package/dist/core/git-identity.d.ts +46 -11
- package/dist/core/git-identity.d.ts.map +1 -1
- package/dist/core/git-identity.js +140 -27
- package/dist/core/git-identity.js.map +1 -1
- package/dist/core/index.d.ts +184 -10
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1045 -185
- package/dist/core/index.js.map +1 -1
- package/dist/core/init.d.ts +45 -5
- package/dist/core/init.d.ts.map +1 -1
- package/dist/core/init.js +134 -24
- package/dist/core/init.js.map +1 -1
- package/dist/core/loaders.d.ts +170 -14
- package/dist/core/loaders.d.ts.map +1 -1
- package/dist/core/loaders.js +570 -89
- package/dist/core/loaders.js.map +1 -1
- package/dist/core/memory-add-link.d.ts +28 -0
- package/dist/core/memory-add-link.d.ts.map +1 -0
- package/dist/core/memory-add-link.js +67 -0
- package/dist/core/memory-add-link.js.map +1 -0
- package/dist/core/memory-add-type.d.ts +25 -1
- package/dist/core/memory-add-type.d.ts.map +1 -1
- package/dist/core/memory-add-type.js +59 -1
- package/dist/core/memory-add-type.js.map +1 -1
- package/dist/core/memory-amend.d.ts +80 -0
- package/dist/core/memory-amend.d.ts.map +1 -0
- package/dist/core/memory-amend.js +160 -0
- package/dist/core/memory-amend.js.map +1 -0
- package/dist/core/memory-supersede.d.ts +28 -0
- package/dist/core/memory-supersede.d.ts.map +1 -0
- package/dist/core/memory-supersede.js +79 -0
- package/dist/core/memory-supersede.js.map +1 -0
- package/dist/core/memory-transition.d.ts +190 -30
- package/dist/core/memory-transition.d.ts.map +1 -1
- package/dist/core/memory-transition.js +480 -59
- package/dist/core/memory-transition.js.map +1 -1
- package/dist/core/registry.d.ts +82 -10
- package/dist/core/registry.d.ts.map +1 -1
- package/dist/core/registry.js +50 -0
- package/dist/core/registry.js.map +1 -1
- package/dist/core/relevance.d.ts +74 -12
- package/dist/core/relevance.d.ts.map +1 -1
- package/dist/core/relevance.js +45 -27
- package/dist/core/relevance.js.map +1 -1
- package/dist/core/require-reason.d.ts.map +1 -1
- package/dist/core/require-reason.js +6 -5
- package/dist/core/require-reason.js.map +1 -1
- package/dist/core/required-fields.d.ts +28 -0
- package/dist/core/required-fields.d.ts.map +1 -0
- package/dist/core/required-fields.js +60 -0
- package/dist/core/required-fields.js.map +1 -0
- package/dist/core/revision.d.ts +82 -0
- package/dist/core/revision.d.ts.map +1 -0
- package/dist/core/revision.js +144 -0
- package/dist/core/revision.js.map +1 -0
- package/dist/core/types.d.ts +28 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +12 -3
- package/dist/core/types.js.map +1 -1
- package/dist/core/workflow-core-checks.d.ts +34 -0
- package/dist/core/workflow-core-checks.d.ts.map +1 -0
- package/dist/core/workflow-core-checks.js +403 -0
- package/dist/core/workflow-core-checks.js.map +1 -0
- package/dist/core/workflow-create-remove.d.ts +65 -0
- package/dist/core/workflow-create-remove.d.ts.map +1 -0
- package/dist/core/workflow-create-remove.js +277 -0
- package/dist/core/workflow-create-remove.js.map +1 -0
- package/dist/core/workflow-deduction.d.ts +48 -0
- package/dist/core/workflow-deduction.d.ts.map +1 -0
- package/dist/core/workflow-deduction.js +523 -0
- package/dist/core/workflow-deduction.js.map +1 -0
- package/dist/core/workflow-diagnostics.d.ts +83 -0
- package/dist/core/workflow-diagnostics.d.ts.map +1 -0
- package/dist/core/workflow-diagnostics.js +375 -0
- package/dist/core/workflow-diagnostics.js.map +1 -0
- package/dist/core/workflow-exit-state.d.ts +125 -0
- package/dist/core/workflow-exit-state.d.ts.map +1 -0
- package/dist/core/workflow-exit-state.js +243 -0
- package/dist/core/workflow-exit-state.js.map +1 -0
- package/dist/core/workflow-finalize.d.ts +37 -0
- package/dist/core/workflow-finalize.d.ts.map +1 -0
- package/dist/core/workflow-finalize.js +153 -0
- package/dist/core/workflow-finalize.js.map +1 -0
- package/dist/core/workflow-list-show.d.ts +176 -0
- package/dist/core/workflow-list-show.d.ts.map +1 -0
- package/dist/core/workflow-list-show.js +268 -0
- package/dist/core/workflow-list-show.js.map +1 -0
- package/dist/core/workflow-next.d.ts +268 -0
- package/dist/core/workflow-next.d.ts.map +1 -0
- package/dist/core/workflow-next.js +503 -0
- package/dist/core/workflow-next.js.map +1 -0
- package/dist/core/workflow-registry.d.ts +52 -0
- package/dist/core/workflow-registry.d.ts.map +1 -0
- package/dist/core/workflow-registry.js +158 -0
- package/dist/core/workflow-registry.js.map +1 -0
- package/dist/core/workflow-start-end.d.ts +71 -0
- package/dist/core/workflow-start-end.d.ts.map +1 -0
- package/dist/core/workflow-start-end.js +298 -0
- package/dist/core/workflow-start-end.js.map +1 -0
- package/dist/core/workflow-status.d.ts +83 -0
- package/dist/core/workflow-status.d.ts.map +1 -0
- package/dist/core/workflow-status.js +125 -0
- package/dist/core/workflow-status.js.map +1 -0
- package/dist/core/write-guard.d.ts +51 -8
- package/dist/core/write-guard.d.ts.map +1 -1
- package/dist/core/write-guard.js +139 -9
- package/dist/core/write-guard.js.map +1 -1
- package/dist/directives/index.d.ts +3 -2
- package/dist/directives/index.d.ts.map +1 -1
- package/dist/directives/index.js +5 -3
- package/dist/directives/index.js.map +1 -1
- package/dist/directives/schema.d.ts +34 -29
- package/dist/directives/schema.d.ts.map +1 -1
- package/dist/directives/schema.js +35 -29
- package/dist/directives/schema.js.map +1 -1
- package/dist/directives/version.d.ts +28 -0
- package/dist/directives/version.d.ts.map +1 -0
- package/dist/directives/version.js +51 -0
- package/dist/directives/version.js.map +1 -0
- package/dist/dna/edit.d.ts +7 -6
- package/dist/dna/edit.d.ts.map +1 -1
- package/dist/dna/edit.js +96 -41
- package/dist/dna/edit.js.map +1 -1
- package/dist/dna/mutate.js +18 -3
- package/dist/dna/mutate.js.map +1 -1
- package/dist/dna/path.d.ts +2 -2
- package/dist/dna/roles.d.ts +1 -1
- package/dist/dna/schema.d.ts +61 -3
- package/dist/dna/schema.d.ts.map +1 -1
- package/dist/dna/schema.js +121 -6
- package/dist/dna/schema.js.map +1 -1
- package/dist/mcp/dna-resource.d.ts.map +1 -1
- package/dist/mcp/dna-resource.js +4 -4
- package/dist/mcp/dna-resource.js.map +1 -1
- package/dist/mcp/index.d.ts +8 -4
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +13 -2
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/memory-resource.d.ts.map +1 -1
- package/dist/mcp/memory-resource.js +30 -19
- package/dist/mcp/memory-resource.js.map +1 -1
- package/dist/mcp/prompt.d.ts +61 -24
- package/dist/mcp/prompt.d.ts.map +1 -1
- package/dist/mcp/prompt.js +176 -47
- package/dist/mcp/prompt.js.map +1 -1
- package/dist/mcp/read-only.d.ts +39 -0
- package/dist/mcp/read-only.d.ts.map +1 -1
- package/dist/mcp/read-only.js +61 -0
- package/dist/mcp/read-only.js.map +1 -1
- package/dist/mcp/registrar.d.ts +10 -0
- package/dist/mcp/registrar.d.ts.map +1 -1
- package/dist/mcp/registrar.js +48 -12
- package/dist/mcp/registrar.js.map +1 -1
- package/dist/mcp/server.d.ts +21 -14
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +41 -15
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/session-resource.d.ts +13 -0
- package/dist/mcp/session-resource.d.ts.map +1 -0
- package/dist/mcp/session-resource.js +65 -0
- package/dist/mcp/session-resource.js.map +1 -0
- package/dist/mcp/workflow-resource.d.ts +18 -0
- package/dist/mcp/workflow-resource.d.ts.map +1 -1
- package/dist/mcp/workflow-resource.js +37 -8
- package/dist/mcp/workflow-resource.js.map +1 -1
- package/dist/memory/add.d.ts +110 -24
- package/dist/memory/add.d.ts.map +1 -1
- package/dist/memory/add.js +251 -64
- package/dist/memory/add.js.map +1 -1
- package/dist/memory/audit.d.ts +152 -39
- package/dist/memory/audit.d.ts.map +1 -1
- package/dist/memory/audit.js +257 -103
- package/dist/memory/audit.js.map +1 -1
- package/dist/memory/commit-message.d.ts +60 -38
- package/dist/memory/commit-message.d.ts.map +1 -1
- package/dist/memory/commit-message.js +167 -21
- package/dist/memory/commit-message.js.map +1 -1
- package/dist/memory/entry.d.ts.map +1 -1
- package/dist/memory/entry.js +1 -2
- package/dist/memory/entry.js.map +1 -1
- package/dist/memory/frontmatter-edit.d.ts +16 -4
- package/dist/memory/frontmatter-edit.d.ts.map +1 -1
- package/dist/memory/frontmatter-edit.js +13 -1
- package/dist/memory/frontmatter-edit.js.map +1 -1
- package/dist/memory/git-log.d.ts +18 -6
- package/dist/memory/git-log.d.ts.map +1 -1
- package/dist/memory/git-log.js +40 -13
- package/dist/memory/git-log.js.map +1 -1
- package/dist/memory/history.d.ts +73 -12
- package/dist/memory/history.d.ts.map +1 -1
- package/dist/memory/history.js +128 -44
- package/dist/memory/history.js.map +1 -1
- package/dist/memory/index.d.ts +13 -11
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/index.js +34 -3
- package/dist/memory/index.js.map +1 -1
- package/dist/memory/query.d.ts +161 -19
- package/dist/memory/query.d.ts.map +1 -1
- package/dist/memory/query.js +435 -55
- package/dist/memory/query.js.map +1 -1
- package/dist/memory/schema.d.ts +52 -3
- package/dist/memory/schema.d.ts.map +1 -1
- package/dist/memory/schema.js +132 -8
- package/dist/memory/schema.js.map +1 -1
- package/dist/memory/state-machine.d.ts +65 -10
- package/dist/memory/state-machine.d.ts.map +1 -1
- package/dist/memory/state-machine.js +134 -46
- package/dist/memory/state-machine.js.map +1 -1
- package/dist/memory/submit.d.ts +52 -3
- package/dist/memory/submit.d.ts.map +1 -1
- package/dist/memory/submit.js +118 -11
- package/dist/memory/submit.js.map +1 -1
- package/dist/storage/build-stamp.d.ts +18 -0
- package/dist/storage/build-stamp.d.ts.map +1 -0
- package/dist/storage/build-stamp.js +68 -0
- package/dist/storage/build-stamp.js.map +1 -0
- package/dist/storage/builtin-adapters.d.ts +32 -0
- package/dist/storage/builtin-adapters.d.ts.map +1 -0
- package/dist/storage/builtin-adapters.js +100 -0
- package/dist/storage/builtin-adapters.js.map +1 -0
- package/dist/storage/builtin-directives.d.ts +0 -29
- package/dist/storage/builtin-directives.d.ts.map +1 -1
- package/dist/storage/builtin-directives.js +9 -4
- package/dist/storage/builtin-directives.js.map +1 -1
- package/dist/storage/commit.d.ts +310 -3
- package/dist/storage/commit.d.ts.map +1 -1
- package/dist/storage/commit.js +807 -33
- package/dist/storage/commit.js.map +1 -1
- package/dist/storage/document.d.ts +6 -0
- package/dist/storage/document.d.ts.map +1 -1
- package/dist/storage/document.js +10 -1
- package/dist/storage/document.js.map +1 -1
- package/dist/storage/dry-run.d.ts +65 -0
- package/dist/storage/dry-run.d.ts.map +1 -0
- package/dist/storage/dry-run.js +150 -0
- package/dist/storage/dry-run.js.map +1 -0
- package/dist/storage/errors.d.ts +26 -0
- package/dist/storage/errors.d.ts.map +1 -1
- package/dist/storage/errors.js +27 -1
- package/dist/storage/errors.js.map +1 -1
- package/dist/storage/frontmatter.d.ts +1 -1
- package/dist/storage/frontmatter.js +1 -1
- package/dist/storage/git-read.d.ts +64 -0
- package/dist/storage/git-read.d.ts.map +1 -0
- package/dist/storage/git-read.js +107 -0
- package/dist/storage/git-read.js.map +1 -0
- package/dist/storage/index.d.ts +13 -5
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +39 -2
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/layout.d.ts +2 -2
- package/dist/storage/layout.d.ts.map +1 -1
- package/dist/storage/layout.js +2 -7
- package/dist/storage/layout.js.map +1 -1
- package/dist/storage/memory-path.d.ts +18 -5
- package/dist/storage/memory-path.d.ts.map +1 -1
- package/dist/storage/memory-path.js +41 -5
- package/dist/storage/memory-path.js.map +1 -1
- package/dist/storage/snapshot.js +1 -1
- package/dist/storage/templates.d.ts +33 -6
- package/dist/storage/templates.d.ts.map +1 -1
- package/dist/storage/templates.js +170 -16
- package/dist/storage/templates.js.map +1 -1
- package/dist/validation/config-version.d.ts +19 -0
- package/dist/validation/config-version.d.ts.map +1 -0
- package/dist/validation/config-version.js +53 -0
- package/dist/validation/config-version.js.map +1 -0
- package/dist/validation/diagnostic.d.ts +40 -0
- package/dist/validation/diagnostic.d.ts.map +1 -0
- package/dist/validation/diagnostic.js +41 -0
- package/dist/validation/diagnostic.js.map +1 -0
- package/dist/validation/format.d.ts +74 -0
- package/dist/validation/format.d.ts.map +1 -0
- package/dist/validation/format.js +104 -0
- package/dist/validation/format.js.map +1 -0
- package/dist/validation/id.d.ts +14 -0
- package/dist/validation/id.d.ts.map +1 -1
- package/dist/validation/id.js +35 -11
- package/dist/validation/id.js.map +1 -1
- package/dist/validation/identity.d.ts +40 -0
- package/dist/validation/identity.d.ts.map +1 -0
- package/dist/validation/identity.js +78 -0
- package/dist/validation/identity.js.map +1 -0
- package/dist/validation/index.d.ts +9 -3
- package/dist/validation/index.d.ts.map +1 -1
- package/dist/validation/index.js +30 -1
- package/dist/validation/index.js.map +1 -1
- package/dist/validation/secret-scan.d.ts +3 -2
- package/dist/validation/secret-scan.d.ts.map +1 -1
- package/dist/validation/secret-scan.js +32 -11
- package/dist/validation/secret-scan.js.map +1 -1
- package/dist/validation/warning.d.ts +30 -16
- package/dist/validation/warning.d.ts.map +1 -1
- package/dist/validation/warning.js +74 -7
- package/dist/validation/warning.js.map +1 -1
- package/dist/workflow/bindings.d.ts +152 -0
- package/dist/workflow/bindings.d.ts.map +1 -0
- package/dist/workflow/bindings.js +249 -0
- package/dist/workflow/bindings.js.map +1 -0
- package/dist/workflow/create.d.ts +13 -0
- package/dist/workflow/create.d.ts.map +1 -0
- package/dist/workflow/create.js +41 -0
- package/dist/workflow/create.js.map +1 -0
- package/dist/workflow/deduce.d.ts +400 -0
- package/dist/workflow/deduce.d.ts.map +1 -0
- package/dist/workflow/deduce.js +1109 -0
- package/dist/workflow/deduce.js.map +1 -0
- package/dist/workflow/manifest-edit.d.ts +19 -0
- package/dist/workflow/manifest-edit.d.ts.map +1 -0
- package/dist/workflow/manifest-edit.js +124 -0
- package/dist/workflow/manifest-edit.js.map +1 -0
- package/dist/workflow/schema.d.ts +158 -19
- package/dist/workflow/schema.d.ts.map +1 -1
- package/dist/workflow/schema.js +163 -15
- package/dist/workflow/schema.js.map +1 -1
- package/package.json +18 -8
package/dist/memory/audit.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CONFIGURATION_SCOPES = exports.MEMORY_OPERATIONS = void 0;
|
|
3
4
|
exports.isValidAttribution = isValidAttribution;
|
|
4
5
|
exports.auditAttribution = auditAttribution;
|
|
5
6
|
exports.parseCommitReason = parseCommitReason;
|
|
6
7
|
exports.parseApprovalMetadata = parseApprovalMetadata;
|
|
8
|
+
exports.parseMemoryOperation = parseMemoryOperation;
|
|
7
9
|
exports.reconstructMemoryTransitions = reconstructMemoryTransitions;
|
|
10
|
+
exports.parseBracketHops = parseBracketHops;
|
|
8
11
|
exports.verifyTransitionConsistency = verifyTransitionConsistency;
|
|
9
12
|
/**
|
|
10
13
|
* Audit-trail verification & reconstruction (task-015-complete-audit-trail, REQ-SEC-02) — the
|
|
@@ -37,36 +40,43 @@ exports.verifyTransitionConsistency = verifyTransitionConsistency;
|
|
|
37
40
|
* - "Recomputing an element's state at any historical commit ... agrees with the transition history
|
|
38
41
|
* derived from git log ... no drift" -> {@link verifyTransitionConsistency}.
|
|
39
42
|
*/
|
|
40
|
-
const child_process_1 = require("child_process");
|
|
41
43
|
const core_1 = require("../core");
|
|
42
44
|
const validation_1 = require("../validation");
|
|
43
45
|
const commit_message_1 = require("./commit-message");
|
|
44
46
|
const history_1 = require("./history");
|
|
47
|
+
const schema_1 = require("./schema");
|
|
48
|
+
const state_machine_1 = require("./state-machine");
|
|
45
49
|
const git_log_1 = require("./git-log");
|
|
46
50
|
const storage_1 = require("../storage");
|
|
47
|
-
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@()]+$/;
|
|
48
|
-
// The literal marker git itself appends to an author email when it falls back to a guessed identity
|
|
49
|
-
// (user@hostname) and cannot determine a real domain — e.g. "root@buildhost.(none)". A commit
|
|
50
|
-
// carrying this is not a deliberately-configured identity, so it counts as "unknown author".
|
|
51
|
-
const GIT_GUESSED_DOMAIN_MARKER = '.(none)';
|
|
52
51
|
/**
|
|
53
52
|
* Whether `name`/`email` look like a real, deliberately-configured git identity rather than an
|
|
54
53
|
* empty or git-guessed placeholder, as recorded on a *historical* commit. The base check — non-empty
|
|
55
54
|
* `name` AND non-empty `email` — is NOT re-derived here: it delegates to
|
|
56
55
|
* {@link isConfiguredIdentity} from `src/core/git-identity.ts`, the single source of truth also used
|
|
57
56
|
* by `requireGitIdentity`'s write-time precondition (REQ-SEC-01). On top of that shared base, this
|
|
58
|
-
* audit (REQ-SEC-02) layers
|
|
57
|
+
* audit (REQ-SEC-02) layers three read-only augmentations that only make sense when inspecting
|
|
59
58
|
* *historical* commits rather than live config — `requireGitIdentity` has no need for either, because
|
|
60
59
|
* it only ever looks at the identity a caller is about to write with:
|
|
61
60
|
*
|
|
62
|
-
* - Rejects
|
|
61
|
+
* - Rejects git's guessed-domain marker (`.(none)`): git appends this to an author email when it
|
|
63
62
|
* fell back to a guessed identity at commit time. `requireGitIdentity` now PREVENTS this going
|
|
64
63
|
* forward (task-014), but older history predating that guard can still carry it, so the read audit
|
|
65
64
|
* must flag it — it is a legacy-history concern, not part of the live write-time rule.
|
|
66
|
-
* - Rejects a non-empty-but-malformed email (
|
|
65
|
+
* - Rejects a non-empty-but-malformed email (one `@`, a dotted domain, no whitespace, no parenthesis in
|
|
66
|
+
* the top-level label): `requireGitIdentity` never needs this check
|
|
67
67
|
* because it only reads a git config value (itself always syntactically well-formed or absent);
|
|
68
68
|
* historical commit authors, however, can carry hand-edited or otherwise malformed values, so the
|
|
69
69
|
* audit validates the shape too.
|
|
70
|
+
* - Rejects an email on an RFC 2606 reserved top-level domain (`.invalid`, `.example`, `.test`,
|
|
71
|
+
* `.localhost`; task-132, `bug-153`): such an address names no mailbox, so a commit carrying it is
|
|
72
|
+
* as unattributed as one carrying `.(none)`. Only the top-level label counts — `test.example.com`
|
|
73
|
+
* is an ordinary domain. The write-time check does not apply this rule: test fixtures and scratch
|
|
74
|
+
* repositories commit under these domains on purpose, and the audit is where they must show up.
|
|
75
|
+
*
|
|
76
|
+
* The three augmentations, with a blank-name check the base already covers, are
|
|
77
|
+
* {@link isAttributableIdentity} (`src/validation/identity.ts`, task-260, `bug-261`), the rule the
|
|
78
|
+
* `team.agents` schema applies too: after the base check this function adds nothing else, so an agent
|
|
79
|
+
* identity `dna.yaml` accepts is one this audit accepts.
|
|
70
80
|
*
|
|
71
81
|
* Pure predicate — no filesystem/git access.
|
|
72
82
|
*/
|
|
@@ -75,9 +85,7 @@ function isValidAttribution(name, email) {
|
|
|
75
85
|
const trimmedEmail = email.trim();
|
|
76
86
|
if (!(0, core_1.isConfiguredIdentity)(trimmedName, trimmedEmail))
|
|
77
87
|
return false;
|
|
78
|
-
|
|
79
|
-
return false;
|
|
80
|
-
return EMAIL_RE.test(trimmedEmail);
|
|
88
|
+
return (0, validation_1.isAttributableIdentity)(trimmedName, trimmedEmail);
|
|
81
89
|
}
|
|
82
90
|
const AUDIT_LOG_FIELDS = ['%H', '%an', '%ae', '%aI', '%s'];
|
|
83
91
|
/**
|
|
@@ -86,20 +94,26 @@ const AUDIT_LOG_FIELDS = ['%H', '%an', '%ae', '%aI', '%s'];
|
|
|
86
94
|
* REQ-SEC-02's "0 'unknown author'" fit criterion. `pathspecs` is sorted before being passed to git
|
|
87
95
|
* so the invocation itself is deterministic regardless of caller-supplied order (REQ-SYS-07); a
|
|
88
96
|
* commit touching more than one of the given pathspecs still appears exactly once (git's own log
|
|
89
|
-
* de-duplicates by commit, not by path). Returns `[]`
|
|
90
|
-
*
|
|
97
|
+
* de-duplicates by commit, not by path). Returns `[]` when none of `pathspecs` has any history,
|
|
98
|
+
* mirroring {@link getMemoryHistory}; a git read that fails throws `StorageError`
|
|
99
|
+
* `E_GIT_READ_FAILED` rather than passing for a clean, empty audit (task-142, `bug-072`).
|
|
91
100
|
*/
|
|
92
101
|
function auditAttribution(root, pathspecs) {
|
|
93
102
|
const sortedPathspecs = [...pathspecs].sort();
|
|
94
103
|
const records = (0, git_log_1.walkGitLogFields)(root, AUDIT_LOG_FIELDS, sortedPathspecs);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
authorName
|
|
98
|
-
authorEmail
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
// `walkGitLogFields` returns records of exactly `AUDIT_LOG_FIELDS.length` entries, never fewer.
|
|
105
|
+
return records.map((record) => {
|
|
106
|
+
const authorName = record[1];
|
|
107
|
+
const authorEmail = record[2];
|
|
108
|
+
return {
|
|
109
|
+
sha: record[0],
|
|
110
|
+
authorName,
|
|
111
|
+
authorEmail,
|
|
112
|
+
date: record[3],
|
|
113
|
+
subject: record[4],
|
|
114
|
+
valid: isValidAttribution(authorName, authorEmail),
|
|
115
|
+
};
|
|
116
|
+
});
|
|
103
117
|
}
|
|
104
118
|
/**
|
|
105
119
|
* The identity on an `Approver:` trailer line. Applied to that ONE line — located by
|
|
@@ -113,7 +127,7 @@ const APPROVER_LINE_RE = /^Approver:\s*(.+?)\s*<([^>]+)>\s*\(([^)]+)\)\s*$/;
|
|
|
113
127
|
* `add`/`submit` body, which carries no trailer by convention), or carries a bare `Reason:` with no
|
|
114
128
|
* value. Split out of {@link parseApprovalMetadata} by `task-049-memory-history` (P1.10) because the
|
|
115
129
|
* two trailers do not always travel together: an APPROVAL-gate commit (`approve`/`reject`) must carry
|
|
116
|
-
* both `Approver:` and `Reason:` (
|
|
130
|
+
* both `Approver:` and `Reason:` (AGENTS.md §5.1, P1.7), but a `deprecate` commit records a `Reason:`
|
|
117
131
|
* with **no** `Approver:` line at all — deprecate is explicitly not an approval gate. Reading the
|
|
118
132
|
* reason through `parseApprovalMetadata` would therefore drop every deprecate reason from the audit
|
|
119
133
|
* trail it exists to surface.
|
|
@@ -134,7 +148,7 @@ function parseCommitReason(body) {
|
|
|
134
148
|
}
|
|
135
149
|
/**
|
|
136
150
|
* Parse a commit body for the `Approver: Name <email> (role)` and `Reason: ...` trailers
|
|
137
|
-
* (
|
|
151
|
+
* (AGENTS.md §5.1; REQ-SEC-02/REQ-SEC-04). Returns `null` when there is no `Approver:` trailer line —
|
|
138
152
|
* e.g. for a plain `add`/`submit` body, or a `deprecate` one (not an approval gate), neither of which
|
|
139
153
|
* records an approval at all. A caller that wants such a commit's reason wants
|
|
140
154
|
* {@link parseCommitReason} instead.
|
|
@@ -153,70 +167,153 @@ function parseApprovalMetadata(body) {
|
|
|
153
167
|
const approverMatch = approverLine === null ? null : APPROVER_LINE_RE.exec(approverLine);
|
|
154
168
|
if (!approverMatch)
|
|
155
169
|
return null;
|
|
156
|
-
|
|
157
|
-
return {
|
|
170
|
+
// The three groups of APPROVER_LINE_RE are not optional: a match always defines all of them.
|
|
171
|
+
return {
|
|
172
|
+
approverName: approverMatch[1],
|
|
173
|
+
approverEmail: approverMatch[2],
|
|
174
|
+
approverRole: approverMatch[3],
|
|
175
|
+
reason: parseCommitReason(body),
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
// --- Full transition reconstruction (`memory history`, P1.10) --------------------------------
|
|
179
|
+
/**
|
|
180
|
+
* The closed, declared list of Memory operation verbs a `wf({type}): {verb} …` subject may carry
|
|
181
|
+
* (`dl-079` (A), `spec-008-cli-grammar` §2, `spec-003` verb table): the five CLI verbs, the three
|
|
182
|
+
* workflow verbs of practice (`start`, `finalize`, `sync`), `amend` (`dl-108`), `park` (`dl-110`),
|
|
183
|
+
* and `assign` (`element.set_release`, approver ruling 2026-10-01). No other verb is a Memory
|
|
184
|
+
* operation. Ordered as `spec-008` §2 lists them (REQ-SYS-07).
|
|
185
|
+
*/
|
|
186
|
+
exports.MEMORY_OPERATIONS = [
|
|
187
|
+
'add',
|
|
188
|
+
'submit',
|
|
189
|
+
'approve',
|
|
190
|
+
'reject',
|
|
191
|
+
'deprecate',
|
|
192
|
+
'start',
|
|
193
|
+
'finalize',
|
|
194
|
+
'sync',
|
|
195
|
+
'amend',
|
|
196
|
+
'park',
|
|
197
|
+
'assign',
|
|
198
|
+
];
|
|
199
|
+
/**
|
|
200
|
+
* The `wf({scope})` scopes that record a change to **configuration**, not to a Memory element
|
|
201
|
+
* (`spec-008` §2): `wf(dna): set|add|update|remove …` (`dna` mutations), `wf(directive):
|
|
202
|
+
* create|assign|remove …` and `wf(workflow): create|remove …` (`spec-017` §7.7–7.8). Their verbs are
|
|
203
|
+
* not Memory operations even where the token coincides with one (`wf(dna): add <field>`), and their
|
|
204
|
+
* subjects carry no transition. No `memory.yaml` type may take one of these names: this list is the
|
|
205
|
+
* schema's {@link RESERVED_TYPE_NAMES} (`spec-001`, `bug-177`), which `MemoryYaml` refuses at load time,
|
|
206
|
+
* because a type that took one would have every commit of its own read as configuration.
|
|
207
|
+
*/
|
|
208
|
+
exports.CONFIGURATION_SCOPES = schema_1.RESERVED_TYPE_NAMES;
|
|
209
|
+
/**
|
|
210
|
+
* A `wf({scope}): {token}` subject: the scope, and the verb token — everything after `: ` up to the
|
|
211
|
+
* first whitespace. Taking the whole token, rather than a declared verb followed by a word boundary,
|
|
212
|
+
* is what keeps a practised compound verb such as `start-fix` from reading as `start`.
|
|
213
|
+
*/
|
|
214
|
+
const WF_SUBJECT_RE = /^wf\(([^)]*)\):\s*(\S+)/;
|
|
215
|
+
/**
|
|
216
|
+
* `assign`'s one canonical subject (`spec-008` §2): `wf({type}): assign release {version} to {id1},
|
|
217
|
+
* {id2}…`, with no bracket — the form the four practised `assign` commits already have. `assign` writes
|
|
218
|
+
* only the `release` field, so a subject that names anything else, or carries a bracket, is not one.
|
|
219
|
+
*/
|
|
220
|
+
const ASSIGN_SUBJECT_RE = /^wf\([^)]*\):\s*assign release \S+ to [^[\]\s][^[\]]*$/;
|
|
221
|
+
/**
|
|
222
|
+
* The Memory operation a commit subject declares, or `null` — for a subject outside the `wf()`
|
|
223
|
+
* grammar (`workflow: finalize …`, `agent: record …`, `docs(…): …`), a configuration scope
|
|
224
|
+
* ({@link CONFIGURATION_SCOPES}), or a verb outside {@link MEMORY_OPERATIONS}. The practised verbs the
|
|
225
|
+
* declared list leaves out (`start-fix`, `schedule`, `plan`, `enter-releasing`, `mark-released`,
|
|
226
|
+
* `deferred`, and the early verbless `wf(task): {id} [a → b]`), and an `assign` subject outside its
|
|
227
|
+
* canonical form, keep reading as `null`: the
|
|
228
|
+
* history is not rewritten, and the reader does not guess (`dl-035`, `dl-079`).
|
|
229
|
+
*/
|
|
230
|
+
function parseMemoryOperation(subject) {
|
|
231
|
+
const match = WF_SUBJECT_RE.exec(subject);
|
|
232
|
+
if (!match)
|
|
233
|
+
return null;
|
|
234
|
+
// Both groups always participate in a match of WF_SUBJECT_RE.
|
|
235
|
+
const scope = match[1];
|
|
236
|
+
const verb = match[2];
|
|
237
|
+
if (exports.CONFIGURATION_SCOPES.includes(scope))
|
|
238
|
+
return null;
|
|
239
|
+
if (verb === 'assign' && !ASSIGN_SUBJECT_RE.test(subject))
|
|
240
|
+
return null;
|
|
241
|
+
return exports.MEMORY_OPERATIONS.includes(verb) ? verb : null;
|
|
158
242
|
}
|
|
159
|
-
const OPERATION_RE = /^wf\([^)]+\):\s*(add|submit|approve|reject|deprecate)\b/;
|
|
160
243
|
/**
|
|
161
|
-
*
|
|
162
|
-
* without validating it against any type's Zod
|
|
163
|
-
*
|
|
164
|
-
*
|
|
244
|
+
* Parse a document's frontmatter `status:` field out of `raw` — its bytes at one revision, from
|
|
245
|
+
* {@link reconstructMemoryTransitions}' batched read — without validating it against any type's Zod
|
|
246
|
+
* schema: this is a historical-snapshot read, not a live document validation. Its `status` is `null`
|
|
247
|
+
* if the revision does not hold the path (`raw` is `null`), has no frontmatter block, or the
|
|
248
|
+
* frontmatter has no string `status` field. A frontmatter that does not parse is returned as
|
|
249
|
+
* `unreadable`, never thrown here (task-171, `bug-188`): one bad revision used to make the whole
|
|
250
|
+
* history unreadable.
|
|
165
251
|
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* every commit older than a
|
|
170
|
-
*
|
|
171
|
-
* `
|
|
172
|
-
* commits.
|
|
252
|
+
* The path read is the one the element occupied **at that revision** — `MemoryHistoryEntry.path` for
|
|
253
|
+
* the commit, `MemoryHistoryEntry.parentPath` for its first parent, both produced by the same
|
|
254
|
+
* `--follow` walk that selected the commit — never the caller's current path. Passing the current one
|
|
255
|
+
* was `bug-080-read-status-at-reads-the-current-path-at-pre-rename-commits`: every commit older than a
|
|
256
|
+
* rename asked git for a path that tree does not contain, the read failed, and the transition reported
|
|
257
|
+
* `null` states. `dl-080` — a read that gates an operation resolves at `HEAD` — does not reach here:
|
|
258
|
+
* this read gates nothing, and its subject is by construction *other* commits.
|
|
173
259
|
*
|
|
174
|
-
* The
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
260
|
+
* The bytes come from `readRevisionPaths` (`src/storage`, one `git cat-file --batch` for the whole
|
|
261
|
+
* history, `task-278`), so git's stderr lands in a pipe this process owns rather than on the
|
|
262
|
+
* operator's terminal (`bug-071-read-status-at-leaks-git-stderr`). A revision that does not hold the
|
|
263
|
+
* path answers `null`: that is the legitimate case — a commit before the element's creation or after a
|
|
264
|
+
* deletion, the parent of a root commit — and git answers `missing` for it as for an object it cannot
|
|
265
|
+
* read, so this read cannot tell the two apart, and does not try (`bug-097`). What catches a broken
|
|
266
|
+
* walk is the walk itself: `getMemoryHistory` throws when its own `git log` fails, and
|
|
267
|
+
* `dropPreCreationAncestry` when the creation probe and the walk disagree (`task-089`). A batch that
|
|
268
|
+
* cannot run throws `StorageError` `E_GIT_READ_FAILED`.
|
|
182
269
|
*/
|
|
183
|
-
function
|
|
184
|
-
|
|
270
|
+
function parseStatus(raw, label) {
|
|
271
|
+
if (raw === null)
|
|
272
|
+
return { status: null };
|
|
273
|
+
const { frontmatter } = (0, storage_1.splitFrontmatter)(raw);
|
|
274
|
+
if (!frontmatter)
|
|
275
|
+
return { status: null };
|
|
276
|
+
let parsed;
|
|
185
277
|
try {
|
|
186
|
-
|
|
187
|
-
encoding: 'utf-8',
|
|
188
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
189
|
-
});
|
|
278
|
+
parsed = (0, validation_1.parseYaml)(frontmatter, label);
|
|
190
279
|
}
|
|
191
|
-
catch {
|
|
192
|
-
|
|
280
|
+
catch (error) {
|
|
281
|
+
// task-171 (`bug-188`): the caller decides what an unreadable revision means — a history entry
|
|
282
|
+
// with no state, or (for the consistency check) a refusal. `parseYaml` throws only
|
|
283
|
+
// `ValidationError.yamlParse`.
|
|
284
|
+
return { status: null, unreadable: error };
|
|
193
285
|
}
|
|
194
|
-
const { frontmatter } = (0, storage_1.splitFrontmatter)(raw);
|
|
195
|
-
if (!frontmatter)
|
|
196
|
-
return null;
|
|
197
|
-
const parsed = (0, validation_1.parseYaml)(frontmatter, `${historicalPath}@${sha}`);
|
|
198
286
|
if (parsed === null || typeof parsed !== 'object')
|
|
199
|
-
return null;
|
|
287
|
+
return { status: null };
|
|
200
288
|
const status = parsed.status;
|
|
201
|
-
return typeof status === 'string' ? status : null;
|
|
289
|
+
return { status: typeof status === 'string' ? status : null };
|
|
202
290
|
}
|
|
203
291
|
/**
|
|
204
292
|
* Reconstruct every transition `relativePath` went through, oldest first, entirely from git log
|
|
205
|
-
* (`getMemoryHistory`) plus a frontmatter read at each commit
|
|
206
|
-
* (ADR-007). This is the derivation `wingfoil memory history` (P1.10) renders — `src/core`'s
|
|
293
|
+
* (`getMemoryHistory`) plus a frontmatter read at each commit and at its first parent (one `git
|
|
294
|
+
* cat-file --batch`) — no separate log file (ADR-007). This is the derivation `wingfoil memory history` (P1.10) renders — `src/core`'s
|
|
207
295
|
* `memoryHistory` operation (`task-049-memory-history`) renames and string-formats these fields into
|
|
208
296
|
* its own entry shape, deriving no further state of its own; this function is the reconstruction
|
|
209
297
|
* itself, not that command's output formatting.
|
|
210
298
|
*
|
|
211
299
|
* **Renames are followed on both halves of the derivation**, which is the correction
|
|
212
300
|
* `task-097-memory-history-reads-each-commit-at-its-historical-path` made. `getMemoryHistory` always
|
|
213
|
-
* walked with `git log --follow`, so it *found* the commits preceding a rename;
|
|
214
|
-
*
|
|
215
|
-
*
|
|
301
|
+
* walked with `git log --follow`, so it *found* the commits preceding a rename; the read then read
|
|
302
|
+
* each of them at the CURRENT path, which those trees do not contain, so all of them reported `null`
|
|
303
|
+
* states (`bug-080-…`). The walk now carries the path each commit actually used
|
|
216
304
|
* (`MemoryHistoryEntry.path`, from `--follow --name-status`) and this function reads at that path —
|
|
217
305
|
* the walk is the source of truth for "where was this file at this commit", and the read no longer
|
|
218
306
|
* guesses.
|
|
219
307
|
*
|
|
308
|
+
* **`fromState` is read in the commit's first parent** (`task-278`, `bug-308`), at the path that parent
|
|
309
|
+
* used (`MemoryHistoryEntry.parentPath`: a rename's source; `null` for a creation, which reads no
|
|
310
|
+
* parent), never taken from the walk's previous entry. The walk is ordered by commit date, not by
|
|
311
|
+
* ancestry: an `amend` on `main` made while the same element was started on a task branch is walked
|
|
312
|
+
* after the branch's `start`, so the previous entry made it read `in-progress → backlog` although its
|
|
313
|
+
* parent and its own revision both hold `backlog` — and the governance check failed it (`d818c0dd`).
|
|
314
|
+
* A merge commit, which `git log --follow` does not list in that shape, would be judged against its
|
|
315
|
+
* first parent too. On a linear history the two readings agree.
|
|
316
|
+
*
|
|
220
317
|
* This was never the hypothetical the TSDoc here used to call "a documented edge case, not a live
|
|
221
318
|
* defect": the Memory folder's `planning/v1/*` became `planning/rl-v1/*` in a single commit,
|
|
222
319
|
* moving five `release` elements at once, precisely BECAUSE the `release` type's `path` pattern
|
|
@@ -226,77 +323,134 @@ function readStatusAt(root, sha, historicalPath) {
|
|
|
226
323
|
* `toState` is still `null` where a commit in the walk genuinely has no document to read — before
|
|
227
324
|
* the element's creation, or after a deletion. That is a legitimate answer, distinct from the defect
|
|
228
325
|
* above, and it no longer arrives with a `fatal:` on the operator's stderr (`bug-071`; see
|
|
229
|
-
* {@link
|
|
326
|
+
* {@link parseStatus}).
|
|
230
327
|
*/
|
|
231
|
-
function reconstructMemoryTransitions(root, relativePath) {
|
|
328
|
+
function reconstructMemoryTransitions(root, relativePath, options = {}) {
|
|
329
|
+
const strict = options.strict === true;
|
|
232
330
|
const history = (0, history_1.getMemoryHistory)(root, relativePath); // oldest first already
|
|
331
|
+
// Each commit is read twice — at itself, and at its first parent where the document was before it
|
|
332
|
+
// (`task-278`, `bug-308`) — all in one batch. A creation has no parent read: its `fromState` is null.
|
|
333
|
+
const requests = [];
|
|
334
|
+
for (const entry of history) {
|
|
335
|
+
requests.push({ rev: entry.sha, path: entry.path });
|
|
336
|
+
if (entry.parentPath !== null)
|
|
337
|
+
requests.push({ rev: `${entry.sha}^1`, path: entry.parentPath });
|
|
338
|
+
}
|
|
339
|
+
// One answer per request, in request order (`readRevisionPaths`).
|
|
340
|
+
const raws = (0, storage_1.readRevisionPaths)(root, requests);
|
|
233
341
|
const transitions = [];
|
|
234
|
-
let
|
|
342
|
+
let next = 0;
|
|
235
343
|
for (const entry of history) {
|
|
236
|
-
const
|
|
237
|
-
const
|
|
344
|
+
const read = parseStatus(raws[next++], `${entry.path}@${entry.sha}`);
|
|
345
|
+
const before = entry.parentPath === null ? { status: null } : parseStatus(raws[next++], `${entry.parentPath}@${entry.sha}^1`);
|
|
346
|
+
// Strict: neither the commit's revision nor its parent's may go unread (task-171, `bug-188`).
|
|
347
|
+
const strictFailure = read.unreadable ?? before.unreadable;
|
|
348
|
+
if (strict && strictFailure !== undefined)
|
|
349
|
+
throw strictFailure;
|
|
350
|
+
const unreadable = read.unreadable?.issues[0]?.message ?? read.unreadable?.message;
|
|
238
351
|
transitions.push({
|
|
239
352
|
sha: entry.sha,
|
|
240
353
|
authorName: entry.authorName,
|
|
241
354
|
authorEmail: entry.authorEmail,
|
|
242
355
|
date: entry.date,
|
|
243
356
|
subject: entry.subject,
|
|
244
|
-
operation:
|
|
245
|
-
fromState:
|
|
246
|
-
toState,
|
|
357
|
+
operation: parseMemoryOperation(entry.subject),
|
|
358
|
+
fromState: before.status,
|
|
359
|
+
toState: read.status,
|
|
247
360
|
approval: parseApprovalMetadata(entry.body),
|
|
248
361
|
reason: parseCommitReason(entry.body),
|
|
362
|
+
wingfoil: (0, commit_message_1.parseVersionTrailer)(entry.body),
|
|
363
|
+
...(unreadable !== undefined ? { unreadable: unreadable.split('\n')[0].trim() } : {}),
|
|
249
364
|
});
|
|
250
|
-
previousState = toState;
|
|
251
365
|
}
|
|
252
366
|
return transitions;
|
|
253
367
|
}
|
|
254
|
-
//
|
|
255
|
-
//
|
|
256
|
-
|
|
257
|
-
//
|
|
258
|
-
//
|
|
259
|
-
|
|
368
|
+
// The trailing `[…]` bracket of a subject — the transition bracket `spec-008` §2 declares, written at
|
|
369
|
+
// the end of the subject. Its content is split into states by {@link BRACKET_ARROW_RE}.
|
|
370
|
+
const TRAILING_BRACKET_RE = /\[([^[\]]*)\]\s*$/;
|
|
371
|
+
// The arrows a bracket's states are separated by: the canonical U+2192, which `./commit-message.ts`
|
|
372
|
+
// writes, and the ASCII `->`, read as its equivalent because hand-written history carries it
|
|
373
|
+
// (`bug-137`). Surrounding whitespace belongs to the arrow.
|
|
374
|
+
const BRACKET_ARROW_RE = /\s*(?:→|->)\s*/;
|
|
260
375
|
// A subject in the Memory commit grammar (`wf({type}): …`) that contains any bracket character — the
|
|
261
|
-
// set of subjects
|
|
376
|
+
// set of subjects whose trailing bracket must either parse as a transition or be reported as
|
|
377
|
+
// unparseable.
|
|
262
378
|
const WF_SUBJECT_WITH_BRACKET_RE = /^wf\([^)]*\):.*[[\]]/;
|
|
263
379
|
/**
|
|
264
|
-
*
|
|
265
|
-
* `
|
|
266
|
-
*
|
|
267
|
-
*
|
|
380
|
+
* The hops a subject's trailing bracket names, in order — one for `[a → b]`, more for a chain
|
|
381
|
+
* (`[a → b → c]`, `spec-008` §2: `sync` may chain) — or `null` when there is no trailing bracket, or
|
|
382
|
+
* it is not a transition: fewer than two states, or an empty one anywhere. Never an empty array.
|
|
383
|
+
* Exported for the governance check (`scripts/check-governance.cjs`, `task-167`), which judges a
|
|
384
|
+
* single hop against the machine where {@link verifyTransitionConsistency} judges only a chain's.
|
|
385
|
+
*/
|
|
386
|
+
function parseBracketHops(subject) {
|
|
387
|
+
const match = TRAILING_BRACKET_RE.exec(subject);
|
|
388
|
+
if (!match)
|
|
389
|
+
return null;
|
|
390
|
+
// The group always participates in a match of TRAILING_BRACKET_RE.
|
|
391
|
+
const states = match[1].split(BRACKET_ARROW_RE).map((state) => state.trim());
|
|
392
|
+
if (states.length < 2 || states.some((state) => state === ''))
|
|
393
|
+
return null;
|
|
394
|
+
return states.slice(1).map((to, index) => ({ from: states[index], to }));
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Cross-check, for every transition that carries a `[old → new]` bracket in its subject, that the
|
|
398
|
+
* bracket's declared states agree with the states independently derived from the document's own
|
|
399
|
+
* frontmatter at that commit ({@link reconstructMemoryTransitions}). A plain `add`/`submit` subject has
|
|
400
|
+
* no bracket and is skipped; so is every subject of a configuration scope
|
|
401
|
+
* ({@link CONFIGURATION_SCOPES}), which records no Memory transition.
|
|
268
402
|
*
|
|
269
|
-
* The bracket is read in either arrow form, `→` or `->`, with the same result
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
403
|
+
* The bracket is read in either arrow form, `→` or `->`, with the same result, and may **chain**
|
|
404
|
+
* states (`spec-008` §2, `dl-079` (A)): `[a → b → c]` is declared from `a`, to `c` — the only two states
|
|
405
|
+
* the frontmatter can confirm — and, when `machine` (the element type's state machine, resolved by the
|
|
406
|
+
* caller from `memory.yaml`, REQ-STATE-08) is given, every hop of the chain must be an edge of it
|
|
407
|
+
* ({@link isMachineEdge}), or it is an {@link IllegalHop}. Without `machine` the hops cannot be judged
|
|
408
|
+
* and are not: the endpoints are still checked. A single-hop bracket's edge is not re-judged here — it
|
|
409
|
+
* is the write-time engine's to refuse (REQ-STATE-01), and `amend`'s `[s → s]` is a declared self-loop
|
|
410
|
+
* no machine contains.
|
|
411
|
+
*
|
|
412
|
+
* A `wf(…)` subject that carries a bracket readable in neither form is reported as an
|
|
413
|
+
* {@link UnparseableTransition} instead of being passed over; a subject outside the `wf(…)` grammar
|
|
414
|
+
* that merely quotes a bracket in prose is not. Returns `[]` when every bracketed transition was parsed
|
|
415
|
+
* and agrees — REQ-SEC-02/REQ-STATE-02's "no drift between the two views"; any entry is either a
|
|
416
|
+
* genuine inconsistency (e.g. a hand-edited commit message that doesn't match what was actually written
|
|
417
|
+
* to disk), a chain through a non-edge, or a bracket the check could not read.
|
|
276
418
|
*/
|
|
277
|
-
function verifyTransitionConsistency(root, relativePath) {
|
|
278
|
-
|
|
419
|
+
function verifyTransitionConsistency(root, relativePath, machine) {
|
|
420
|
+
// Strict: a revision whose frontmatter does not parse is thrown, never passed (task-171, `bug-188`).
|
|
421
|
+
const transitions = reconstructMemoryTransitions(root, relativePath, { strict: true });
|
|
279
422
|
const findings = [];
|
|
280
423
|
for (const transition of transitions) {
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
424
|
+
const { sha, subject } = transition;
|
|
425
|
+
const scope = WF_SUBJECT_RE.exec(subject)?.[1];
|
|
426
|
+
if (scope !== undefined && exports.CONFIGURATION_SCOPES.includes(scope))
|
|
427
|
+
continue;
|
|
428
|
+
const hops = parseBracketHops(subject);
|
|
429
|
+
if (!hops) {
|
|
430
|
+
if (WF_SUBJECT_WITH_BRACKET_RE.test(subject)) {
|
|
431
|
+
findings.push({ kind: 'unparseable', sha, subject });
|
|
285
432
|
}
|
|
286
433
|
continue;
|
|
287
434
|
}
|
|
288
|
-
|
|
289
|
-
const declaredFrom =
|
|
290
|
-
const declaredTo =
|
|
435
|
+
// parseBracketHops never returns an empty array.
|
|
436
|
+
const declaredFrom = hops[0].from;
|
|
437
|
+
const declaredTo = hops[hops.length - 1].to;
|
|
291
438
|
if (declaredFrom !== transition.fromState || declaredTo !== transition.toState) {
|
|
292
439
|
findings.push({
|
|
293
440
|
kind: 'mismatch',
|
|
294
|
-
sha
|
|
295
|
-
subject
|
|
441
|
+
sha,
|
|
442
|
+
subject,
|
|
296
443
|
declared: { from: declaredFrom, to: declaredTo },
|
|
297
444
|
derived: { from: transition.fromState, to: transition.toState },
|
|
298
445
|
});
|
|
299
446
|
}
|
|
447
|
+
if (machine && hops.length > 1) {
|
|
448
|
+
for (const hop of hops) {
|
|
449
|
+
if (!(0, state_machine_1.isMachineEdge)(machine, hop.from, hop.to)) {
|
|
450
|
+
findings.push({ kind: 'illegal-hop', sha, subject, hop: { from: hop.from, to: hop.to } });
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
300
454
|
}
|
|
301
455
|
return findings;
|
|
302
456
|
}
|
package/dist/memory/audit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/memory/audit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/memory/audit.ts"],"names":[],"mappings":";;;AAuFA,gDAKC;AAcD,4CAiBC;AA+CD,8CAEC;AAkBD,sDAYC;AA8DD,oDASC;AAkJD,oEA2CC;AAuED,4CAOC;AAyBD,kEA6CC;AAlmBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,kCAA+C;AAC/C,8CAAmF;AAEnF,qDAAmG;AACnG,uCAA6C;AAC7C,qCAAkE;AAClE,mDAAgD;AAChD,uCAA6C;AAC7C,wCAAoF;AAgBpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,kBAAkB,CAAC,IAAY,EAAE,KAAa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