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/memory/index.d.ts
CHANGED
|
@@ -36,23 +36,25 @@
|
|
|
36
36
|
* `./frontmatter-edit` (byte-preserving field edits) — plus `./submit`, the submit-specific rules.
|
|
37
37
|
*/
|
|
38
38
|
export declare const MODULE_NAME: "memory";
|
|
39
|
-
export { MemoryYaml, MemoryTypeEntry, StateMachine, TemplateConfig } from './schema';
|
|
40
|
-
export { ARCHIVED_STATUSES, DEFAULT_STATE_MACHINE, DEPRECATED_STATE, E_INVALID_STATE, E_INVALID_TRANSITION, isArchivedStatus, resolveStateMachine, resolveTransitionTarget, resolveTypeTransition, SUPERSEDED_STATE, validateFrontmatterState, } from './state-machine';
|
|
39
|
+
export { MemoryTemplateFrontmatter, MemoryYaml, MemoryTypeEntry, RESERVED_TYPE_NAMES, StateMachine, TemplateConfig } from './schema';
|
|
40
|
+
export { ARCHIVED_STATUSES, DEFAULT_STATE_MACHINE, DEPRECATED_STATE, E_INVALID_STATE, E_INVALID_TRANSITION, isArchivedStatus, isMachineEdge, resolveStateMachine, resolveSupersedeTarget, resolveTransitionTarget, resolveTypeTransition, resolveWaitingTarget, SUPERSEDED_STATE, supersedesEdgeFrom, validateFrontmatterState, } from './state-machine';
|
|
41
41
|
export type { TransitionOp } from './state-machine';
|
|
42
|
-
export { computeMemoryContentRoots, E_EMPTY_SEARCH_QUERY, findMemoryDocumentById, findMemoryDocumentByTypeAndId, listMemoryDocumentPaths, listMemoryDocumentsByType, loadMemoryDocumentSummary, searchMemoryDocuments, validateSearchQuery, } from './query';
|
|
43
|
-
export type {
|
|
42
|
+
export { computeMemoryContentRoots, E_EMPTY_SEARCH_QUERY, findMemoryDocumentById, findMemoryDocumentByIdAtRev, findMemoryDocumentByTypeAndId, findMemoryDocumentByTypeAndIdAtRev, firstLineOf, listMemoryDocumentPaths, listMemoryDocumentPathsAtRev, listMemoryDocumentsByType, loadMemoryDocuments, loadMemoryDocumentsAtRev, loadTypeDocumentCopiesAtRevs, loadMemoryDocumentSummary, loadMemoryDocumentSummaryAtRev, memoryUnreadableDiagnostic, searchMemoryDocuments, validateSearchQuery, W_MEMORY_UNREADABLE, } from './query';
|
|
43
|
+
export type { TypeDocumentCopy } from './query';
|
|
44
|
+
export type { MemoryDocumentFrontmatterSummary, MemoryDocumentSummary, MemoryIdLookupOptions, MemoryScanOptions, MemorySearchMatch, MemorySearchOptions, MemoryTypeScanOptions, } from './query';
|
|
44
45
|
export { getMemoryHistory } from './history';
|
|
45
|
-
export type { MemoryHistoryEntry } from './history';
|
|
46
|
+
export type { MemoryHistoryEntry, WalkedHistoryEntry } from './history';
|
|
46
47
|
export { writeMemoryEntry } from './entry';
|
|
47
48
|
export type { MemoryEntryWrite } from './entry';
|
|
48
|
-
export { hasNumericToken, nextSequenceNumber, parseTags,
|
|
49
|
-
export type { AddDocumentFields } from './add';
|
|
50
|
-
export { formatMemoryCommitMessage, normalizeReason, parseApproverTrailerLine, parseReasonBlock, reasonDefect, reasonDefectMessage, } from './commit-message';
|
|
49
|
+
export { expandFieldTokens, formatIdDate, hasNumericToken, highestSequenceNumber, identDate, idOccupancy, nextSequenceNumber, parseSetOptions, parseTags, readAuthorDate, refBaselineCommits, renderAddDocument, slugifyTitle, unknownSetNames, writtenFields, } from './add';
|
|
50
|
+
export type { AddDocumentFields, IdTokenSources, ParsedSetOptions } from './add';
|
|
51
|
+
export { formatMemoryCommitMessage, normalizeReason, parseApproverTrailerLine, parseReasonBlock, parseVersionTrailer, reasonDefect, reasonDefectMessage, reasonRefusalMessage, } from './commit-message';
|
|
51
52
|
export type { CommitApprover, MemoryCommitMessageInput, ReasonDefect } from './commit-message';
|
|
52
53
|
export { describeDocumentChanges, removeFrontmatterField, setFrontmatterField, verifyDocumentEdit, verifyFrontmatterEdit, } from './frontmatter-edit';
|
|
53
54
|
export type { DocumentScope } from './frontmatter-edit';
|
|
54
|
-
export { missingRequiredFields, REJECTION_REASON_FIELD, renderSubmitDocument } from './submit';
|
|
55
|
+
export { describeSubmitContent, LINE_ENDINGS_ITEM, missingRequiredFields, notApplicableRefusals, REJECTION_REASON_FIELD, renderSubmitDocument, withLineEndingsOf } from './submit';
|
|
56
|
+
export type { NotApplicableProblem, NotApplicableRefusal } from './submit';
|
|
55
57
|
export { renderRejectDocument } from './reject';
|
|
56
|
-
export { auditAttribution, isValidAttribution, parseApprovalMetadata, parseCommitReason, reconstructMemoryTransitions, verifyTransitionConsistency, } from './audit';
|
|
57
|
-
export type { AttributionEntry, ApprovalMetadata, MemoryTransition, ConsistencyMismatch } from './audit';
|
|
58
|
+
export { auditAttribution, CONFIGURATION_SCOPES, isValidAttribution, MEMORY_OPERATIONS, parseApprovalMetadata, parseCommitReason, parseBracketHops, parseMemoryOperation, reconstructMemoryTransitions, verifyTransitionConsistency, } from './audit';
|
|
59
|
+
export type { AttributionEntry, ApprovalMetadata, BracketHop, MemoryTransition, ConsistencyMismatch, IllegalHop, MemoryOperation, ReconstructOptions, TransitionFinding, UnparseableTransition, } from './audit';
|
|
58
60
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,WAAW,EAAG,QAAiB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,WAAW,EAAG,QAAiB,CAAC;AAE7C,OAAO,EAAE,yBAAyB,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,cAAc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Aa,GACd,MAAM,OAAO,CAAC;AACf,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,cAAc,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACnL,YAAY,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
package/dist/memory/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.verifyTransitionConsistency = exports.reconstructMemoryTransitions = exports.parseCommitReason = exports.parseApprovalMetadata = void 0;
|
|
3
|
+
exports.nextSequenceNumber = exports.idOccupancy = exports.identDate = exports.highestSequenceNumber = exports.hasNumericToken = exports.formatIdDate = exports.expandFieldTokens = exports.writeMemoryEntry = exports.getMemoryHistory = exports.W_MEMORY_UNREADABLE = exports.validateSearchQuery = exports.searchMemoryDocuments = exports.memoryUnreadableDiagnostic = exports.loadMemoryDocumentSummaryAtRev = exports.loadMemoryDocumentSummary = exports.loadTypeDocumentCopiesAtRevs = exports.loadMemoryDocumentsAtRev = exports.loadMemoryDocuments = exports.listMemoryDocumentsByType = exports.listMemoryDocumentPathsAtRev = exports.listMemoryDocumentPaths = exports.firstLineOf = exports.findMemoryDocumentByTypeAndIdAtRev = exports.findMemoryDocumentByTypeAndId = exports.findMemoryDocumentByIdAtRev = exports.findMemoryDocumentById = exports.E_EMPTY_SEARCH_QUERY = exports.computeMemoryContentRoots = exports.validateFrontmatterState = exports.supersedesEdgeFrom = exports.SUPERSEDED_STATE = exports.resolveWaitingTarget = exports.resolveTypeTransition = exports.resolveTransitionTarget = exports.resolveSupersedeTarget = exports.resolveStateMachine = exports.isMachineEdge = exports.isArchivedStatus = exports.E_INVALID_TRANSITION = exports.E_INVALID_STATE = exports.DEPRECATED_STATE = exports.DEFAULT_STATE_MACHINE = exports.ARCHIVED_STATUSES = exports.TemplateConfig = exports.StateMachine = exports.RESERVED_TYPE_NAMES = exports.MemoryTypeEntry = exports.MemoryYaml = exports.MemoryTemplateFrontmatter = exports.MODULE_NAME = void 0;
|
|
4
|
+
exports.verifyTransitionConsistency = exports.reconstructMemoryTransitions = exports.parseMemoryOperation = exports.parseBracketHops = exports.parseCommitReason = exports.parseApprovalMetadata = exports.MEMORY_OPERATIONS = exports.isValidAttribution = exports.CONFIGURATION_SCOPES = exports.auditAttribution = exports.renderRejectDocument = exports.withLineEndingsOf = exports.renderSubmitDocument = exports.REJECTION_REASON_FIELD = exports.notApplicableRefusals = exports.missingRequiredFields = exports.LINE_ENDINGS_ITEM = exports.describeSubmitContent = exports.verifyFrontmatterEdit = exports.verifyDocumentEdit = exports.setFrontmatterField = exports.removeFrontmatterField = exports.describeDocumentChanges = exports.reasonRefusalMessage = exports.reasonDefectMessage = exports.reasonDefect = exports.parseVersionTrailer = exports.parseReasonBlock = exports.parseApproverTrailerLine = exports.normalizeReason = exports.formatMemoryCommitMessage = exports.writtenFields = exports.unknownSetNames = exports.slugifyTitle = exports.renderAddDocument = exports.refBaselineCommits = exports.readAuthorDate = exports.parseTags = exports.parseSetOptions = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* `memory` module — Project Memory pillar; git-backed documents with per-type state machines
|
|
7
7
|
* (P1.13). `memory.yaml`'s schema (spec-001-memory-yaml-schema) lives here — the pillar owns its own
|
|
@@ -41,8 +41,10 @@ exports.verifyTransitionConsistency = exports.reconstructMemoryTransitions = exp
|
|
|
41
41
|
*/
|
|
42
42
|
exports.MODULE_NAME = 'memory';
|
|
43
43
|
var schema_1 = require("./schema");
|
|
44
|
+
Object.defineProperty(exports, "MemoryTemplateFrontmatter", { enumerable: true, get: function () { return schema_1.MemoryTemplateFrontmatter; } });
|
|
44
45
|
Object.defineProperty(exports, "MemoryYaml", { enumerable: true, get: function () { return schema_1.MemoryYaml; } });
|
|
45
46
|
Object.defineProperty(exports, "MemoryTypeEntry", { enumerable: true, get: function () { return schema_1.MemoryTypeEntry; } });
|
|
47
|
+
Object.defineProperty(exports, "RESERVED_TYPE_NAMES", { enumerable: true, get: function () { return schema_1.RESERVED_TYPE_NAMES; } });
|
|
46
48
|
Object.defineProperty(exports, "StateMachine", { enumerable: true, get: function () { return schema_1.StateMachine; } });
|
|
47
49
|
Object.defineProperty(exports, "TemplateConfig", { enumerable: true, get: function () { return schema_1.TemplateConfig; } });
|
|
48
50
|
var state_machine_1 = require("./state-machine");
|
|
@@ -52,39 +54,64 @@ Object.defineProperty(exports, "DEPRECATED_STATE", { enumerable: true, get: func
|
|
|
52
54
|
Object.defineProperty(exports, "E_INVALID_STATE", { enumerable: true, get: function () { return state_machine_1.E_INVALID_STATE; } });
|
|
53
55
|
Object.defineProperty(exports, "E_INVALID_TRANSITION", { enumerable: true, get: function () { return state_machine_1.E_INVALID_TRANSITION; } });
|
|
54
56
|
Object.defineProperty(exports, "isArchivedStatus", { enumerable: true, get: function () { return state_machine_1.isArchivedStatus; } });
|
|
57
|
+
Object.defineProperty(exports, "isMachineEdge", { enumerable: true, get: function () { return state_machine_1.isMachineEdge; } });
|
|
55
58
|
Object.defineProperty(exports, "resolveStateMachine", { enumerable: true, get: function () { return state_machine_1.resolveStateMachine; } });
|
|
59
|
+
Object.defineProperty(exports, "resolveSupersedeTarget", { enumerable: true, get: function () { return state_machine_1.resolveSupersedeTarget; } });
|
|
56
60
|
Object.defineProperty(exports, "resolveTransitionTarget", { enumerable: true, get: function () { return state_machine_1.resolveTransitionTarget; } });
|
|
57
61
|
Object.defineProperty(exports, "resolveTypeTransition", { enumerable: true, get: function () { return state_machine_1.resolveTypeTransition; } });
|
|
62
|
+
Object.defineProperty(exports, "resolveWaitingTarget", { enumerable: true, get: function () { return state_machine_1.resolveWaitingTarget; } });
|
|
58
63
|
Object.defineProperty(exports, "SUPERSEDED_STATE", { enumerable: true, get: function () { return state_machine_1.SUPERSEDED_STATE; } });
|
|
64
|
+
Object.defineProperty(exports, "supersedesEdgeFrom", { enumerable: true, get: function () { return state_machine_1.supersedesEdgeFrom; } });
|
|
59
65
|
Object.defineProperty(exports, "validateFrontmatterState", { enumerable: true, get: function () { return state_machine_1.validateFrontmatterState; } });
|
|
60
66
|
var query_1 = require("./query");
|
|
61
67
|
Object.defineProperty(exports, "computeMemoryContentRoots", { enumerable: true, get: function () { return query_1.computeMemoryContentRoots; } });
|
|
62
68
|
Object.defineProperty(exports, "E_EMPTY_SEARCH_QUERY", { enumerable: true, get: function () { return query_1.E_EMPTY_SEARCH_QUERY; } });
|
|
63
69
|
Object.defineProperty(exports, "findMemoryDocumentById", { enumerable: true, get: function () { return query_1.findMemoryDocumentById; } });
|
|
70
|
+
Object.defineProperty(exports, "findMemoryDocumentByIdAtRev", { enumerable: true, get: function () { return query_1.findMemoryDocumentByIdAtRev; } });
|
|
64
71
|
Object.defineProperty(exports, "findMemoryDocumentByTypeAndId", { enumerable: true, get: function () { return query_1.findMemoryDocumentByTypeAndId; } });
|
|
72
|
+
Object.defineProperty(exports, "findMemoryDocumentByTypeAndIdAtRev", { enumerable: true, get: function () { return query_1.findMemoryDocumentByTypeAndIdAtRev; } });
|
|
73
|
+
Object.defineProperty(exports, "firstLineOf", { enumerable: true, get: function () { return query_1.firstLineOf; } });
|
|
65
74
|
Object.defineProperty(exports, "listMemoryDocumentPaths", { enumerable: true, get: function () { return query_1.listMemoryDocumentPaths; } });
|
|
75
|
+
Object.defineProperty(exports, "listMemoryDocumentPathsAtRev", { enumerable: true, get: function () { return query_1.listMemoryDocumentPathsAtRev; } });
|
|
66
76
|
Object.defineProperty(exports, "listMemoryDocumentsByType", { enumerable: true, get: function () { return query_1.listMemoryDocumentsByType; } });
|
|
77
|
+
Object.defineProperty(exports, "loadMemoryDocuments", { enumerable: true, get: function () { return query_1.loadMemoryDocuments; } });
|
|
78
|
+
Object.defineProperty(exports, "loadMemoryDocumentsAtRev", { enumerable: true, get: function () { return query_1.loadMemoryDocumentsAtRev; } });
|
|
79
|
+
Object.defineProperty(exports, "loadTypeDocumentCopiesAtRevs", { enumerable: true, get: function () { return query_1.loadTypeDocumentCopiesAtRevs; } });
|
|
67
80
|
Object.defineProperty(exports, "loadMemoryDocumentSummary", { enumerable: true, get: function () { return query_1.loadMemoryDocumentSummary; } });
|
|
81
|
+
Object.defineProperty(exports, "loadMemoryDocumentSummaryAtRev", { enumerable: true, get: function () { return query_1.loadMemoryDocumentSummaryAtRev; } });
|
|
82
|
+
Object.defineProperty(exports, "memoryUnreadableDiagnostic", { enumerable: true, get: function () { return query_1.memoryUnreadableDiagnostic; } });
|
|
68
83
|
Object.defineProperty(exports, "searchMemoryDocuments", { enumerable: true, get: function () { return query_1.searchMemoryDocuments; } });
|
|
69
84
|
Object.defineProperty(exports, "validateSearchQuery", { enumerable: true, get: function () { return query_1.validateSearchQuery; } });
|
|
85
|
+
Object.defineProperty(exports, "W_MEMORY_UNREADABLE", { enumerable: true, get: function () { return query_1.W_MEMORY_UNREADABLE; } });
|
|
70
86
|
var history_1 = require("./history");
|
|
71
87
|
Object.defineProperty(exports, "getMemoryHistory", { enumerable: true, get: function () { return history_1.getMemoryHistory; } });
|
|
72
88
|
var entry_1 = require("./entry");
|
|
73
89
|
Object.defineProperty(exports, "writeMemoryEntry", { enumerable: true, get: function () { return entry_1.writeMemoryEntry; } });
|
|
74
90
|
var add_1 = require("./add");
|
|
91
|
+
Object.defineProperty(exports, "expandFieldTokens", { enumerable: true, get: function () { return add_1.expandFieldTokens; } });
|
|
92
|
+
Object.defineProperty(exports, "formatIdDate", { enumerable: true, get: function () { return add_1.formatIdDate; } });
|
|
75
93
|
Object.defineProperty(exports, "hasNumericToken", { enumerable: true, get: function () { return add_1.hasNumericToken; } });
|
|
94
|
+
Object.defineProperty(exports, "highestSequenceNumber", { enumerable: true, get: function () { return add_1.highestSequenceNumber; } });
|
|
95
|
+
Object.defineProperty(exports, "identDate", { enumerable: true, get: function () { return add_1.identDate; } });
|
|
96
|
+
Object.defineProperty(exports, "idOccupancy", { enumerable: true, get: function () { return add_1.idOccupancy; } });
|
|
76
97
|
Object.defineProperty(exports, "nextSequenceNumber", { enumerable: true, get: function () { return add_1.nextSequenceNumber; } });
|
|
98
|
+
Object.defineProperty(exports, "parseSetOptions", { enumerable: true, get: function () { return add_1.parseSetOptions; } });
|
|
77
99
|
Object.defineProperty(exports, "parseTags", { enumerable: true, get: function () { return add_1.parseTags; } });
|
|
100
|
+
Object.defineProperty(exports, "readAuthorDate", { enumerable: true, get: function () { return add_1.readAuthorDate; } });
|
|
101
|
+
Object.defineProperty(exports, "refBaselineCommits", { enumerable: true, get: function () { return add_1.refBaselineCommits; } });
|
|
78
102
|
Object.defineProperty(exports, "renderAddDocument", { enumerable: true, get: function () { return add_1.renderAddDocument; } });
|
|
79
|
-
Object.defineProperty(exports, "resolveTypeDirectory", { enumerable: true, get: function () { return add_1.resolveTypeDirectory; } });
|
|
80
103
|
Object.defineProperty(exports, "slugifyTitle", { enumerable: true, get: function () { return add_1.slugifyTitle; } });
|
|
104
|
+
Object.defineProperty(exports, "unknownSetNames", { enumerable: true, get: function () { return add_1.unknownSetNames; } });
|
|
105
|
+
Object.defineProperty(exports, "writtenFields", { enumerable: true, get: function () { return add_1.writtenFields; } });
|
|
81
106
|
var commit_message_1 = require("./commit-message");
|
|
82
107
|
Object.defineProperty(exports, "formatMemoryCommitMessage", { enumerable: true, get: function () { return commit_message_1.formatMemoryCommitMessage; } });
|
|
83
108
|
Object.defineProperty(exports, "normalizeReason", { enumerable: true, get: function () { return commit_message_1.normalizeReason; } });
|
|
84
109
|
Object.defineProperty(exports, "parseApproverTrailerLine", { enumerable: true, get: function () { return commit_message_1.parseApproverTrailerLine; } });
|
|
85
110
|
Object.defineProperty(exports, "parseReasonBlock", { enumerable: true, get: function () { return commit_message_1.parseReasonBlock; } });
|
|
111
|
+
Object.defineProperty(exports, "parseVersionTrailer", { enumerable: true, get: function () { return commit_message_1.parseVersionTrailer; } });
|
|
86
112
|
Object.defineProperty(exports, "reasonDefect", { enumerable: true, get: function () { return commit_message_1.reasonDefect; } });
|
|
87
113
|
Object.defineProperty(exports, "reasonDefectMessage", { enumerable: true, get: function () { return commit_message_1.reasonDefectMessage; } });
|
|
114
|
+
Object.defineProperty(exports, "reasonRefusalMessage", { enumerable: true, get: function () { return commit_message_1.reasonRefusalMessage; } });
|
|
88
115
|
var frontmatter_edit_1 = require("./frontmatter-edit");
|
|
89
116
|
Object.defineProperty(exports, "describeDocumentChanges", { enumerable: true, get: function () { return frontmatter_edit_1.describeDocumentChanges; } });
|
|
90
117
|
Object.defineProperty(exports, "removeFrontmatterField", { enumerable: true, get: function () { return frontmatter_edit_1.removeFrontmatterField; } });
|
|
@@ -92,16 +119,24 @@ Object.defineProperty(exports, "setFrontmatterField", { enumerable: true, get: f
|
|
|
92
119
|
Object.defineProperty(exports, "verifyDocumentEdit", { enumerable: true, get: function () { return frontmatter_edit_1.verifyDocumentEdit; } });
|
|
93
120
|
Object.defineProperty(exports, "verifyFrontmatterEdit", { enumerable: true, get: function () { return frontmatter_edit_1.verifyFrontmatterEdit; } });
|
|
94
121
|
var submit_1 = require("./submit");
|
|
122
|
+
Object.defineProperty(exports, "describeSubmitContent", { enumerable: true, get: function () { return submit_1.describeSubmitContent; } });
|
|
123
|
+
Object.defineProperty(exports, "LINE_ENDINGS_ITEM", { enumerable: true, get: function () { return submit_1.LINE_ENDINGS_ITEM; } });
|
|
95
124
|
Object.defineProperty(exports, "missingRequiredFields", { enumerable: true, get: function () { return submit_1.missingRequiredFields; } });
|
|
125
|
+
Object.defineProperty(exports, "notApplicableRefusals", { enumerable: true, get: function () { return submit_1.notApplicableRefusals; } });
|
|
96
126
|
Object.defineProperty(exports, "REJECTION_REASON_FIELD", { enumerable: true, get: function () { return submit_1.REJECTION_REASON_FIELD; } });
|
|
97
127
|
Object.defineProperty(exports, "renderSubmitDocument", { enumerable: true, get: function () { return submit_1.renderSubmitDocument; } });
|
|
128
|
+
Object.defineProperty(exports, "withLineEndingsOf", { enumerable: true, get: function () { return submit_1.withLineEndingsOf; } });
|
|
98
129
|
var reject_1 = require("./reject");
|
|
99
130
|
Object.defineProperty(exports, "renderRejectDocument", { enumerable: true, get: function () { return reject_1.renderRejectDocument; } });
|
|
100
131
|
var audit_1 = require("./audit");
|
|
101
132
|
Object.defineProperty(exports, "auditAttribution", { enumerable: true, get: function () { return audit_1.auditAttribution; } });
|
|
133
|
+
Object.defineProperty(exports, "CONFIGURATION_SCOPES", { enumerable: true, get: function () { return audit_1.CONFIGURATION_SCOPES; } });
|
|
102
134
|
Object.defineProperty(exports, "isValidAttribution", { enumerable: true, get: function () { return audit_1.isValidAttribution; } });
|
|
135
|
+
Object.defineProperty(exports, "MEMORY_OPERATIONS", { enumerable: true, get: function () { return audit_1.MEMORY_OPERATIONS; } });
|
|
103
136
|
Object.defineProperty(exports, "parseApprovalMetadata", { enumerable: true, get: function () { return audit_1.parseApprovalMetadata; } });
|
|
104
137
|
Object.defineProperty(exports, "parseCommitReason", { enumerable: true, get: function () { return audit_1.parseCommitReason; } });
|
|
138
|
+
Object.defineProperty(exports, "parseBracketHops", { enumerable: true, get: function () { return audit_1.parseBracketHops; } });
|
|
139
|
+
Object.defineProperty(exports, "parseMemoryOperation", { enumerable: true, get: function () { return audit_1.parseMemoryOperation; } });
|
|
105
140
|
Object.defineProperty(exports, "reconstructMemoryTransitions", { enumerable: true, get: function () { return audit_1.reconstructMemoryTransitions; } });
|
|
106
141
|
Object.defineProperty(exports, "verifyTransitionConsistency", { enumerable: true, get: function () { return audit_1.verifyTransitionConsistency; } });
|
|
107
142
|
//# sourceMappingURL=index.js.map
|
package/dist/memory/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACU,QAAA,WAAW,GAAG,QAAiB,CAAC;AAE7C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACU,QAAA,WAAW,GAAG,QAAiB,CAAC;AAE7C,mCAAqI;AAA5H,mHAAA,yBAAyB,OAAA;AAAE,oGAAA,UAAU,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,6GAAA,mBAAmB,OAAA;AAAE,sGAAA,YAAY,OAAA;AAAE,wGAAA,cAAc,OAAA;AAClH,iDAgByB;AAfvB,kHAAA,iBAAiB,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} from './schema';
|
|
2
3
|
/**
|
|
3
4
|
* Derive the minimal set of root-relative directories a scan needs to walk to see every Memory
|
|
@@ -6,10 +7,51 @@ import type { MemoryYaml } from './schema';
|
|
|
6
7
|
* result never contains redundant, nested roots.
|
|
7
8
|
*/
|
|
8
9
|
export declare function computeMemoryContentRoots(memoryYaml: MemoryYaml): string[];
|
|
10
|
+
/** `W_MEMORY_UNREADABLE` (`spec-017` §1.4, §2): a Memory file a scan left out because it cannot read it. */
|
|
11
|
+
export declare const W_MEMORY_UNREADABLE = "W_MEMORY_UNREADABLE";
|
|
12
|
+
/**
|
|
13
|
+
* The one builder of a {@link W_MEMORY_UNREADABLE} diagnostic, shared by the scan here and by
|
|
14
|
+
* `spec-017`'s deduction: `spec-003`'s shape, `file` repository-relative, `path` `''` (the whole file),
|
|
15
|
+
* and `spec-017` §1.4's message `unreadable frontmatter in <file>: <reason>`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function memoryUnreadableDiagnostic(file: string, reason: string): Diagnostic;
|
|
18
|
+
/** The first line of a parse error: js-yaml appends a multi-line excerpt a one-line warning cannot carry. */
|
|
19
|
+
export declare function firstLineOf(message: string): string;
|
|
20
|
+
/** What every tolerant scan takes (task-171). */
|
|
21
|
+
export interface MemoryScanOptions {
|
|
22
|
+
/**
|
|
23
|
+
* Told about each file the scan left out because it cannot read it ({@link W_MEMORY_UNREADABLE}), in
|
|
24
|
+
* path order. A lookup that stops at its match reports only the files it read before it. Omitted:
|
|
25
|
+
* the files are left out silently.
|
|
26
|
+
*/
|
|
27
|
+
readonly onDiagnostic?: (diagnostic: Diagnostic) => void;
|
|
28
|
+
}
|
|
29
|
+
/** {@link MemoryScanOptions} plus the archived opt-in of the type-scoped primitives (`dl-038` option 1). */
|
|
30
|
+
export interface MemoryTypeScanOptions extends MemoryScanOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Include archived documents (`deprecated`, `superseded`, `isArchivedStatus`). Defaults to `false`,
|
|
33
|
+
* so a consumer that forgets to filter fails closed (`dl-038` option 1); a consumer that must see
|
|
34
|
+
* archived content — `wingfoil://memory/{type}/{id}`, REQ-STATE-06's "remaining present" — says so.
|
|
35
|
+
*/
|
|
36
|
+
readonly includeArchived?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** {@link MemoryScanOptions} of {@link findMemoryDocumentById}, which alone may follow links. */
|
|
39
|
+
export interface MemoryIdLookupOptions extends MemoryScanOptions {
|
|
40
|
+
/**
|
|
41
|
+
* Walk the working tree the way it did before task-171: follow symbolic links and descend into a
|
|
42
|
+
* nested repository. **Explain-only**: the transition verbs use it to word a refusal already decided
|
|
43
|
+
* at `HEAD` (`command-baseline`: the working tree may explain a refusal, never decide one), so that a
|
|
44
|
+
* linked document is refused by the confinement guards by name. No read that decides anything sets
|
|
45
|
+
* it. Defaults to `false`.
|
|
46
|
+
*/
|
|
47
|
+
readonly followSymlinks?: boolean;
|
|
48
|
+
}
|
|
9
49
|
/**
|
|
10
50
|
* List every Memory document under `root`, as root-relative POSIX paths, sorted lexicographically
|
|
11
51
|
* (REQ-SYS-07 — deterministic, no unordered iteration). Scans only the directories
|
|
12
|
-
* {@link computeMemoryContentRoots} derives from `memoryYaml`, never the whole project tree.
|
|
52
|
+
* {@link computeMemoryContentRoots} derives from `memoryYaml`, never the whole project tree. A
|
|
53
|
+
* symbolic link is not a document and is not listed (task-171, `bug-189`), the same as
|
|
54
|
+
* {@link listMemoryDocumentPathsAtRev} at a commit.
|
|
13
55
|
*/
|
|
14
56
|
export declare function listMemoryDocumentPaths(root: string, memoryYaml: MemoryYaml): string[];
|
|
15
57
|
/** A Memory document's parsed frontmatter (loose — no Zod schema validation, see module doc) + body. */
|
|
@@ -22,8 +64,57 @@ export interface MemoryDocumentSummary {
|
|
|
22
64
|
* Read one Memory document and split it into its parsed frontmatter and body text, without running
|
|
23
65
|
* it through any type's Zod schema — `memory search`/`history` must handle documents of every type
|
|
24
66
|
* and any (even structurally imperfect) state, so this is a read, never a validation.
|
|
67
|
+
*
|
|
68
|
+
* This single-file read **throws** `ValidationError` (`E_YAML_PARSE_ERROR`) when the frontmatter does
|
|
69
|
+
* not parse: its caller named the file. The scans built on it are what is tolerant (task-171,
|
|
70
|
+
* `bug-031`): each one leaves such a document out and reports it as {@link W_MEMORY_UNREADABLE} to its
|
|
71
|
+
* {@link MemoryScanOptions.onDiagnostic}, so one malformed document never fails a query about another.
|
|
25
72
|
*/
|
|
26
73
|
export declare function loadMemoryDocumentSummary(root: string, relativePath: string): MemoryDocumentSummary;
|
|
74
|
+
/**
|
|
75
|
+
* Every Memory document **in the working tree** under `root`, parsed — {@link loadMemoryDocumentsAtRev}
|
|
76
|
+
* for the live files, in {@link listMemoryDocumentPaths}'s sorted order. Archived documents are
|
|
77
|
+
* included: the caller decides what to drop. A document whose frontmatter does not parse, and a
|
|
78
|
+
* symbolic link, are left out and reported to `options.onDiagnostic` as {@link W_MEMORY_UNREADABLE}
|
|
79
|
+
* (task-171, task-253 / `bug-230`), so one malformed document never fails a read of the others.
|
|
80
|
+
*/
|
|
81
|
+
export declare function loadMemoryDocuments(root: string, memoryYaml: MemoryYaml, options?: MemoryScanOptions): MemoryDocumentSummary[];
|
|
82
|
+
/**
|
|
83
|
+
* Every Memory document **commit `rev` holds**, as root-relative POSIX paths sorted the way
|
|
84
|
+
* {@link listMemoryDocumentPaths} sorts the working tree's (REQ-SYS-07). A document added after `rev`,
|
|
85
|
+
* or present only in the working tree, is not listed; nor is a symbolic link (task-171, `bug-189`).
|
|
86
|
+
*
|
|
87
|
+
* @throws `RevisionError` when `rev` is malformed or names no commit.
|
|
88
|
+
*/
|
|
89
|
+
export declare function listMemoryDocumentPathsAtRev(root: string, rev: string, memoryYaml: MemoryYaml): string[];
|
|
90
|
+
/**
|
|
91
|
+
* Every Memory document **commit `rev` holds**, parsed — the paths of
|
|
92
|
+
* {@link listMemoryDocumentPathsAtRev}, in its order, each read in one batch (`storage.readPathsAtRev`)
|
|
93
|
+
* and split as {@link loadMemoryDocumentSummary} splits a working-tree file. This is the snapshot a
|
|
94
|
+
* reader pinned to one commit builds from (`spec-012` §6 relevance, `spec-017` §4 deduction). A
|
|
95
|
+
* document whose frontmatter does not parse, and a link, are left out and reported (task-171).
|
|
96
|
+
*
|
|
97
|
+
* @throws `RevisionError` when `rev` is malformed or names no commit.
|
|
98
|
+
*/
|
|
99
|
+
export declare function loadMemoryDocumentsAtRev(root: string, rev: string, memoryYaml: MemoryYaml, options?: MemoryScanOptions): MemoryDocumentSummary[];
|
|
100
|
+
/**
|
|
101
|
+
* {@link loadMemoryDocumentsAtRev} for a `sha` already resolved to a commit (`resolveRevision`,
|
|
102
|
+
* `src/core/revision.ts`): the same scan and parse, without resolving the revision again. A reader that
|
|
103
|
+
* resolves its commit once and reads several pillars at it (the workflow deduction's snapshot, task-283,
|
|
104
|
+
* `bug-309`) uses this, so one call spends one `git rev-parse`, not one per loader.
|
|
105
|
+
*
|
|
106
|
+
* @param sha - The full sha of a commit, as `resolveRevision` returned it; labels name it.
|
|
107
|
+
*/
|
|
108
|
+
export declare function loadMemoryDocumentsAtCommit(root: string, sha: string, memoryYaml: MemoryYaml, options: MemoryScanOptions): MemoryDocumentSummary[];
|
|
109
|
+
/**
|
|
110
|
+
* One Memory document **as commit `rev` holds it** — {@link loadMemoryDocumentSummary} at a commit.
|
|
111
|
+
* `null` when that commit does not hold `relativePath` as a file. Like its working-tree counterpart,
|
|
112
|
+
* this single-file read throws when the frontmatter does not parse.
|
|
113
|
+
*
|
|
114
|
+
* @throws `RevisionError` when `rev` is malformed or names no commit; `ValidationError` when the
|
|
115
|
+
* frontmatter does not parse.
|
|
116
|
+
*/
|
|
117
|
+
export declare function loadMemoryDocumentSummaryAtRev(root: string, rev: string, relativePath: string): MemoryDocumentSummary | null;
|
|
27
118
|
/**
|
|
28
119
|
* Resolve a single Memory document by its `id` frontmatter value alone — REQ-PERF-04 /
|
|
29
120
|
* task-009-mcp-resource-fetch-latency's Acceptance Criteria, which name a `wingfoil://memory/{id}`
|
|
@@ -32,19 +123,27 @@ export declare function loadMemoryDocumentSummary(root: string, relativePath: st
|
|
|
32
123
|
* (single document) — there is no bare, single-segment `wingfoil://memory/{id}` form there, and this
|
|
33
124
|
* `{id}` segment would collide with spec-004's `{type}` segment. task-011-mcp-resources-read-only has
|
|
34
125
|
* since replaced the `wingfoil://memory/{id}` *Resource* this primitive originally backed with the
|
|
35
|
-
* conformant `wingfoil://memory/{type}/{id}` form (see {@link findMemoryDocumentByTypeAndId})
|
|
36
|
-
* bare-id primitive
|
|
37
|
-
*
|
|
38
|
-
* `src/mcp` calls it anymore.
|
|
126
|
+
* conformant `wingfoil://memory/{type}/{id}` form (see {@link findMemoryDocumentByTypeAndId}). This
|
|
127
|
+
* bare-id primitive is what `memory history` resolves its `<id>` with, and what the transition verbs
|
|
128
|
+
* use to explain a refusal; it is neutral about archived documents, since both act on them.
|
|
39
129
|
*
|
|
40
|
-
* A linear scan
|
|
41
|
-
* already-deterministic sorted order, stopping at the first document whose frontmatter `id` matches
|
|
130
|
+
* A linear scan, in sorted path order, stopping at the first document whose frontmatter `id` matches
|
|
42
131
|
* *exactly* (never a substring — that remains `searchMemoryDocuments`'/task-021's keyword-search
|
|
43
|
-
* surface, not this primitive's). Returns `undefined` — never throws — when no document matches;
|
|
44
|
-
*
|
|
45
|
-
* (spec-004 §2.2's general unresolvable-URI contract), not this primitive's.
|
|
132
|
+
* surface, not this primitive's). Returns `undefined` — never throws — when no document matches; a
|
|
133
|
+
* document it cannot read on the way is reported to `options.onDiagnostic` and skipped (task-171).
|
|
46
134
|
*/
|
|
47
|
-
export declare function findMemoryDocumentById(root: string, memoryYaml: MemoryYaml, id: string): MemoryDocumentSummary | undefined;
|
|
135
|
+
export declare function findMemoryDocumentById(root: string, memoryYaml: MemoryYaml, id: string, options?: MemoryIdLookupOptions): MemoryDocumentSummary | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* {@link findMemoryDocumentById} **at commit `rev`** (task-247, `bug-187`): the first document, in
|
|
138
|
+
* the sorted path order of {@link listMemoryDocumentPathsAtRev}, whose own frontmatter `id` matches
|
|
139
|
+
* exactly, with its frontmatter and body as `rev` holds them; `undefined` when that commit holds none.
|
|
140
|
+
* A document present only in the working tree, or added after `rev`, is never returned. This is the
|
|
141
|
+
* lookup the Memory transition verbs decide from (`spec-006-core-domain-api` §6 item 1). A document it
|
|
142
|
+
* cannot read on the way is reported to `options.onDiagnostic` and skipped (task-171).
|
|
143
|
+
*
|
|
144
|
+
* @throws `RevisionError` when `rev` is malformed or names no commit.
|
|
145
|
+
*/
|
|
146
|
+
export declare function findMemoryDocumentByIdAtRev(root: string, rev: string, memoryYaml: MemoryYaml, id: string, options?: MemoryScanOptions): MemoryDocumentSummary | undefined;
|
|
48
147
|
/** A Memory document's frontmatter-only summary — spec-004 §2.1's collection-listing shape
|
|
49
148
|
* (id, title, status, tags), deliberately omitting body content to keep listing calls cheap. */
|
|
50
149
|
export interface MemoryDocumentFrontmatterSummary {
|
|
@@ -65,8 +164,11 @@ export interface MemoryDocumentFrontmatterSummary {
|
|
|
65
164
|
* `release`/`release-line` both resolve to `docs/04_memory/planning`; `task`'s own pattern collapses
|
|
66
165
|
* all the way to `docs/04_memory` itself — see {@link computeMemoryContentRoots}'s doc comment), so a
|
|
67
166
|
* directory-only filter would wrongly fold sibling types' documents into this type's collection.
|
|
167
|
+
*
|
|
168
|
+
* Archived documents are left out unless `options.includeArchived` (task-171, `dl-038` option 1), and
|
|
169
|
+
* a document the scan cannot read is reported to `options.onDiagnostic` and skipped.
|
|
68
170
|
*/
|
|
69
|
-
export declare function listMemoryDocumentsByType(root: string, memoryYaml: MemoryYaml, type: string): MemoryDocumentFrontmatterSummary[];
|
|
171
|
+
export declare function listMemoryDocumentsByType(root: string, memoryYaml: MemoryYaml, type: string, options?: MemoryTypeScanOptions): MemoryDocumentFrontmatterSummary[];
|
|
70
172
|
/**
|
|
71
173
|
* Resolve a single Memory document by (`type`, `id`) — spec-004 §2.1's `wingfoil://memory/{type}/{id}`
|
|
72
174
|
* single-document addressing (task-011-mcp-resources-read-only, REQ-INT-01), the conformant
|
|
@@ -76,10 +178,21 @@ export declare function listMemoryDocumentsByType(root: string, memoryYaml: Memo
|
|
|
76
178
|
* because that type's path pattern happens to also resolve under the same directory. Returns
|
|
77
179
|
* `undefined` — never throws — when nothing matches; surfacing that as a protocol-level "resource not
|
|
78
180
|
* found" failure is the MCP Resource adapter's job (spec-004 §2.2), not this primitive's.
|
|
181
|
+
*
|
|
182
|
+
* An archived document matches only with `options.includeArchived` (task-171, `dl-038` option 1); the
|
|
183
|
+
* single-document Resource passes it, since REQ-STATE-06 keeps archived content retrievable.
|
|
79
184
|
*/
|
|
80
|
-
export declare function findMemoryDocumentByTypeAndId(root: string, memoryYaml: MemoryYaml, type: string, id: string): MemoryDocumentSummary | undefined;
|
|
185
|
+
export declare function findMemoryDocumentByTypeAndId(root: string, memoryYaml: MemoryYaml, type: string, id: string, options?: MemoryTypeScanOptions): MemoryDocumentSummary | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* {@link findMemoryDocumentByTypeAndId} **at commit `rev`**: the document whose own frontmatter `type`
|
|
188
|
+
* and `id` match, with its frontmatter and body as `rev` holds them; `undefined` when that commit holds
|
|
189
|
+
* none, or holds it archived without `options.includeArchived`.
|
|
190
|
+
*
|
|
191
|
+
* @throws `RevisionError` when `rev` is malformed or names no commit.
|
|
192
|
+
*/
|
|
193
|
+
export declare function findMemoryDocumentByTypeAndIdAtRev(root: string, rev: string, memoryYaml: MemoryYaml, type: string, id: string, options?: MemoryTypeScanOptions): MemoryDocumentSummary | undefined;
|
|
81
194
|
/** Optional filters/refinements for {@link searchMemoryDocuments}. */
|
|
82
|
-
export interface MemorySearchOptions {
|
|
195
|
+
export interface MemorySearchOptions extends MemoryScanOptions {
|
|
83
196
|
/** Only include documents whose `tags:` frontmatter contains this exact tag. */
|
|
84
197
|
readonly tag?: string;
|
|
85
198
|
/**
|
|
@@ -95,14 +208,16 @@ export interface MemorySearchOptions {
|
|
|
95
208
|
/** One ranked search result — enough for a future CLI/MCP surface to render without re-reading the file. */
|
|
96
209
|
export interface MemorySearchMatch {
|
|
97
210
|
readonly path: string;
|
|
98
|
-
|
|
211
|
+
/** Always present: a document with no `id` is not an element and is never a match (task-171, `bug-164`). */
|
|
212
|
+
readonly id: string;
|
|
99
213
|
readonly title?: string;
|
|
100
214
|
readonly tags: readonly string[];
|
|
101
215
|
readonly status?: string;
|
|
102
216
|
/** The document's frontmatter `type:` field (spec-010-memory-frontmatter-schema base field) —
|
|
103
217
|
* projected here (task-021-implement-memory-search) alongside `status`/`tags` so `memorySearch`'s
|
|
104
|
-
* `--type` filter can narrow an already-ranked result without a second file read per match.
|
|
105
|
-
|
|
218
|
+
* `--type` filter can narrow an already-ranked result without a second file read per match. Always
|
|
219
|
+
* present, as `id` is (task-171, `bug-164`). */
|
|
220
|
+
readonly type: string;
|
|
106
221
|
/** Query matched the title, id, or a tag (P1.12: ranks above a body-only match). */
|
|
107
222
|
readonly metadataMatch: boolean;
|
|
108
223
|
/** Query matched somewhere in the document body. */
|
|
@@ -135,8 +250,13 @@ export declare function validateSearchQuery(query: string): void;
|
|
|
135
250
|
* concern, task-021's, not this primitive's).
|
|
136
251
|
*
|
|
137
252
|
* Ordering is a total, deterministic order (REQ-SYS-07): metadata matches before body-only matches,
|
|
138
|
-
* then by `id
|
|
139
|
-
*
|
|
253
|
+
* then by `id`, then by `path` (two files may carry one `id`) ascending — so calling this twice
|
|
254
|
+
* against unchanged state always returns the exact same array.
|
|
255
|
+
*
|
|
256
|
+
* **Only elements, never a throw (task-171).** A match has an `id` and a `type` (`bug-164`); a file
|
|
257
|
+
* with neither is left out without a report. A document whose frontmatter does not parse, or a
|
|
258
|
+
* symbolic link, is left out and reported to `options.onDiagnostic` as {@link W_MEMORY_UNREADABLE}
|
|
259
|
+
* (`bug-031`), so one malformed file never fails a search.
|
|
140
260
|
*
|
|
141
261
|
* **REQ-STATE-06:** a document whose frontmatter `status` is archived — `deprecated` or `superseded`
|
|
142
262
|
* (`isArchivedStatus`, `dl-028`) — is excluded by default, so it never appears in these "default
|
|
@@ -147,4 +267,26 @@ export declare function validateSearchQuery(query: string): void;
|
|
|
147
267
|
* here — see this module's header for why the search set and the context set differ.
|
|
148
268
|
*/
|
|
149
269
|
export declare function searchMemoryDocuments(root: string, memoryYaml: MemoryYaml, query: string, options?: MemorySearchOptions): MemorySearchMatch[];
|
|
270
|
+
/** One copy of a document of a type, as one commit holds it (task-274). */
|
|
271
|
+
export interface TypeDocumentCopy {
|
|
272
|
+
readonly path: string;
|
|
273
|
+
/** The blob's object name: two commits holding the same oid hold the same bytes. */
|
|
274
|
+
readonly oid: string;
|
|
275
|
+
readonly frontmatter: Readonly<Record<string, unknown>>;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* The documents of type `type` each of `revs` holds, one sorted list per revision, in input order —
|
|
279
|
+
* the read the WIP-limit count across refs takes (`requireWipSlot`, `dl-156` Q1 (a), task-274).
|
|
280
|
+
*
|
|
281
|
+
* Narrow and batched, unlike one {@link loadMemoryDocumentsAtRev} per revision (which parses every
|
|
282
|
+
* document of every type at each commit): only the type's own static directory is listed, every
|
|
283
|
+
* revision's listing in one batched walk (`listBlobsAtRevs`), every distinct blob read in one batch and
|
|
284
|
+
* parsed **once** however many revisions hold it. A document counts when its own frontmatter `type` is
|
|
285
|
+
* `type`, as in every Memory scan. A link, an unparsable document and one written in a newer format are
|
|
286
|
+
* left out and reported through `options.onDiagnostic` as {@link W_MEMORY_UNREADABLE} (task-171,
|
|
287
|
+
* task-257), once per blob.
|
|
288
|
+
*
|
|
289
|
+
* @throws `StorageError` `E_GIT_READ_FAILED` when a revision names no commit or a batch read fails.
|
|
290
|
+
*/
|
|
291
|
+
export declare function loadTypeDocumentCopiesAtRevs(root: string, revs: readonly string[], memoryYaml: MemoryYaml, type: string, options?: MemoryScanOptions): TypeDocumentCopy[][];
|
|
150
292
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/memory/query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/memory/query.ts"],"names":[],"mappings":"AAmEA,OAAO,EACL,KAAK,UAAU,EAOhB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAqB3C;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE,CAQ1E;AAED,4GAA4G;AAC5G,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAKzD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAEnF;AAED,6GAA6G;AAC7G,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,iDAAiD;AACjD,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1D;AAED,4GAA4G;AAC5G,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,iGAAiG;AACjG,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;CACnC;AAoED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,MAAM,EAAE,CAItF;AAED,wGAAwG;AACxG,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAA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