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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BUILTIN_WORKFLOWS_DIR = exports.BUILTIN_DIRECTIVES_DIR = exports.DEFAULT_TEMPLATE = exports.TEMPLATE_NAMES = exports.TEMPLATES = void 0;
|
|
3
|
+
exports.CUSTOM_ADAPTERS_DIR = exports.BUILTIN_ADAPTERS_DIR = exports.BUILTIN_WORKFLOWS_DIR = exports.BUILTIN_DIRECTIVES_DIR = exports.DEFAULT_TEMPLATE = exports.TEMPLATE_NAMES = exports.TEMPLATES = void 0;
|
|
4
4
|
exports.resolveTemplate = resolveTemplate;
|
|
5
5
|
exports.initProjectCommitMessage = initProjectCommitMessage;
|
|
6
6
|
exports.builtinTemplateSources = builtinTemplateSources;
|
|
@@ -22,7 +22,9 @@ exports.templateScaffold = templateScaffold;
|
|
|
22
22
|
* so `wingfoil init --template X` is byte-identical run to run (REQ-SYS-07), and the returned list is
|
|
23
23
|
* sorted by path so callers may diff the set safely.
|
|
24
24
|
*/
|
|
25
|
+
const builtin_adapters_1 = require("./builtin-adapters");
|
|
25
26
|
const builtin_directives_1 = require("./builtin-directives");
|
|
27
|
+
const format_1 = require("../validation/format");
|
|
26
28
|
const layout_1 = require("./layout");
|
|
27
29
|
const SCRUM = {
|
|
28
30
|
name: 'Scrum',
|
|
@@ -33,10 +35,11 @@ const SCRUM = {
|
|
|
33
35
|
};
|
|
34
36
|
const KANBAN = {
|
|
35
37
|
name: 'Kanban',
|
|
36
|
-
description: 'Continuous-flow delivery
|
|
38
|
+
description: 'Continuous-flow delivery; work-in-progress limits are declared per state with `limits:` in memory.yaml.',
|
|
37
39
|
methodologies: ['Kanban', 'Specification by Example (BDD)', 'TDD'],
|
|
38
40
|
slug: 'kanban',
|
|
39
|
-
cadence: 'Work flows continuously across the board
|
|
41
|
+
cadence: 'Work flows continuously across the board; there are no timeboxed iterations. A state takes a WIP limit when its ' +
|
|
42
|
+
"type's machine in .wingfoil/memory.yaml declares one with `limits:` (the commented `bug` example shows how).",
|
|
40
43
|
};
|
|
41
44
|
/** The built-in methodology templates. Order fixed for deterministic listing (REQ-SYS-07). */
|
|
42
45
|
exports.TEMPLATES = [SCRUM, KANBAN];
|
|
@@ -57,6 +60,10 @@ function initProjectCommitMessage(def) {
|
|
|
57
60
|
exports.BUILTIN_DIRECTIVES_DIR = `${layout_1.WINGFOIL_DIR}/directives/built-in`;
|
|
58
61
|
/** Scaffold directory holding the P4.17 built-in workflow templates (spec-011 storage layout). */
|
|
59
62
|
exports.BUILTIN_WORKFLOWS_DIR = `${layout_1.WINGFOIL_DIR}/workflows/built-in`;
|
|
63
|
+
/** Scaffold directory holding the built-in agent adapter manifests (`spec-016` §2.1, task-196). */
|
|
64
|
+
exports.BUILTIN_ADAPTERS_DIR = `${layout_1.WINGFOIL_DIR}/agents/built-in`;
|
|
65
|
+
/** Scaffold directory for the project's own adapter manifests, scaffolded empty (`spec-016` §2.1). */
|
|
66
|
+
exports.CUSTOM_ADAPTERS_DIR = `${layout_1.WINGFOIL_DIR}/agents/custom`;
|
|
60
67
|
/**
|
|
61
68
|
* The built-in source one scaffold file contributes, or `null` when the file is not a built-in
|
|
62
69
|
* template asset.
|
|
@@ -76,6 +83,8 @@ function builtinSourceOf(file) {
|
|
|
76
83
|
kind = 'directive';
|
|
77
84
|
else if (file.path.startsWith(`${exports.BUILTIN_WORKFLOWS_DIR}/`))
|
|
78
85
|
kind = 'workflow';
|
|
86
|
+
else if (file.path.startsWith(`${exports.BUILTIN_ADAPTERS_DIR}/`))
|
|
87
|
+
kind = 'adapter';
|
|
79
88
|
else
|
|
80
89
|
return null;
|
|
81
90
|
const dot = base.lastIndexOf('.');
|
|
@@ -108,7 +117,8 @@ function builtinSourceOf(file) {
|
|
|
108
117
|
*
|
|
109
118
|
* What it returns is a fact about the scaffold CONTENT, not a property of this function: for
|
|
110
119
|
* {@link templateScaffold} it is the six P3.8 built-in directives `task-057-builtin-directive-templates`
|
|
111
|
-
* ships (`./builtin-directives`, rendered by `builtinDirectiveMd`)
|
|
120
|
+
* ships (`./builtin-directives`, rendered by `builtinDirectiveMd`) plus one `adapter` source per shipped
|
|
121
|
+
* built-in adapter manifest (`./builtin-adapters`: `claude-code` since task-236), for `scaffoldFiles` it is `[]` (a
|
|
112
122
|
* `.gitkeep` only), and the workflows built-in directory still holds a `.gitkeep` only. Any asset added
|
|
113
123
|
* later is checked with no edit here. Each shipped built-in must satisfy its pillar schema on its own —
|
|
114
124
|
* `test/storage/builtin-directives.test.ts` runs every directive template through the real guard.
|
|
@@ -125,8 +135,12 @@ function builtinTemplateSources(files) {
|
|
|
125
135
|
// --- Content generators -----------------------------------------------------------------------
|
|
126
136
|
// Every generator is a pure function of its inputs (REQ-SYS-07): fixed strings only, no Date/random.
|
|
127
137
|
const wf = (relative) => `${layout_1.WINGFOIL_DIR}/${relative}`;
|
|
128
|
-
/**
|
|
129
|
-
|
|
138
|
+
/**
|
|
139
|
+
* The Memory element types spec-011 requires a template scaffold for, in fixed order — plus `plan`, the
|
|
140
|
+
* record of a started workflow (`spec-017` §3.1, task-217): `wingfoil workflow start` adds and submits one,
|
|
141
|
+
* so a project `init` creates can start a workflow with no edit.
|
|
142
|
+
*/
|
|
143
|
+
const MEMORY_TYPES = ['adr', 'bug', 'decision-log', 'plan', 'release', 'release-line', 'task', 'tech-spec'];
|
|
130
144
|
/**
|
|
131
145
|
* Default `id_pattern` per scaffolded type (task-002-validation-id-engine's `{n}`/`{slug}` token
|
|
132
146
|
* grammar, `src/validation/id.ts`) — required by `memoryAdd` (`src/core/index.ts`) even though
|
|
@@ -135,10 +149,31 @@ const MEMORY_TYPES = ['adr', 'bug', 'decision-log', 'release', 'release-line', '
|
|
|
135
149
|
* repository's own dogfooded `.wingfoil/memory.yaml` scheme, a sensible [AUTHORING] default
|
|
136
150
|
* a user is free to change.
|
|
137
151
|
*/
|
|
152
|
+
/**
|
|
153
|
+
* Whether `memory amend` may correct each scaffolded type (`spec-001`'s `amendable` key; `dl-108` A3;
|
|
154
|
+
* approver ruling (c) at `task-127`'s review, 2026-10-01). It follows this repository's own
|
|
155
|
+
* `.wingfoil/memory.yaml`: records whose content is routinely corrected are amendable. `adr` is too,
|
|
156
|
+
* for dated correction and Revision notes (approver ruling at `task-158`, 2026-10-02); a change to
|
|
157
|
+
* the decision itself is still a new ADR. `release` is too since the approver ruling at `task-230`
|
|
158
|
+
* (2026-10-12, D3): dated notes and corrected facts, such as its `## Scope changes` at every re-plan
|
|
159
|
+
* checkpoint. `release-line` is not, because its content is the roadmap, which the release workflow
|
|
160
|
+
* phases change.
|
|
161
|
+
*/
|
|
162
|
+
const MEMORY_AMENDABLE = {
|
|
163
|
+
adr: true,
|
|
164
|
+
bug: true,
|
|
165
|
+
'decision-log': true,
|
|
166
|
+
plan: true,
|
|
167
|
+
release: true,
|
|
168
|
+
'release-line': false,
|
|
169
|
+
task: true,
|
|
170
|
+
'tech-spec': true,
|
|
171
|
+
};
|
|
138
172
|
const MEMORY_ID_PATTERNS = {
|
|
139
173
|
adr: 'adr-{n}-{slug}',
|
|
140
174
|
bug: 'bug-{n}-{slug}',
|
|
141
175
|
'decision-log': 'dl-{n}-{slug}',
|
|
176
|
+
plan: '{workflow}-{phase}-plan',
|
|
142
177
|
release: 'release-{n}',
|
|
143
178
|
'release-line': 'rl-{n}',
|
|
144
179
|
task: 'task-{n}-{slug}',
|
|
@@ -153,7 +188,7 @@ const MEMORY_ID_PATTERNS = {
|
|
|
153
188
|
*/
|
|
154
189
|
const DIRECTIVES = [
|
|
155
190
|
{ name: 'determinism', title: 'Determinism', summary: 'No wall-clock, randomness, or unordered iteration in context-building paths; prefer declared config.' },
|
|
156
|
-
{ name: 'doc-versioning', title: 'Documentation versioning', summary: 'Bump a document version
|
|
191
|
+
{ name: 'doc-versioning', title: 'Documentation versioning', summary: 'Bump a document version once per change merged to the default branch, on its first edit since then; update its date when bumping.' },
|
|
157
192
|
{ name: 'security-secrets', title: 'Secret hygiene', summary: 'Never commit credentials or secrets; the repository is the single source of truth and is shared.' },
|
|
158
193
|
{ name: 'traceability', title: 'Traceability', summary: 'Maintain the feature -> story -> acceptance -> requirement -> task chain across every change.' },
|
|
159
194
|
];
|
|
@@ -172,7 +207,10 @@ function dnaYaml(def) {
|
|
|
172
207
|
const methodologies = def.methodologies.map((m) => ` - name: ${m}`).join('\n');
|
|
173
208
|
return `# Project DNA (P2.4) — scaffolded by \`wingfoil init\` (${def.name} template).
|
|
174
209
|
# Structural map of the project: modules, stacks, team + roles, resource paths. Customize freely.
|
|
210
|
+
# \`version\` is this file's content revision; \`format\` the file format it is written in (bumped by
|
|
211
|
+
# WingFoil only on a backward-incompatible change).
|
|
175
212
|
version: 1
|
|
213
|
+
format: ${format_1.DNA_YAML_FORMAT}
|
|
176
214
|
|
|
177
215
|
project:
|
|
178
216
|
name: "" # your project name
|
|
@@ -208,14 +246,52 @@ team:
|
|
|
208
246
|
- name: approver
|
|
209
247
|
|
|
210
248
|
# Resource paths — query categories used to navigate the project.
|
|
249
|
+
# \`runs\` holds exactly one directory: the agent run log, one <element-id>.jsonl per element.
|
|
211
250
|
paths:
|
|
212
251
|
sources: []
|
|
213
252
|
tests: []
|
|
214
253
|
docs: []
|
|
215
254
|
config: [.wingfoil]
|
|
216
255
|
governance: []
|
|
256
|
+
runs: [docs/runs/]
|
|
217
257
|
`;
|
|
218
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* The commented-out per-type machine the scaffold shows on `bug` (`dl-072` (A) + S1, task-153): the
|
|
261
|
+
* scaffold keeps one shared `defaults` machine and does not commit a new project to any lifecycle, but
|
|
262
|
+
* shows the override mechanism (`adr-008`'s per-type machines) where a user will meet it. Uncommented,
|
|
263
|
+
* it is a valid `spec-001` machine (`test/storage/templates.test.ts` loads it); its states are an
|
|
264
|
+
* example, not a recommendation. It also shows a `returns` edge and a WIP limit (task-180, `dl-110`),
|
|
265
|
+
* which is where the Kanban template's cadence points.
|
|
266
|
+
*/
|
|
267
|
+
const BUG_STATES_EXAMPLE = `
|
|
268
|
+
# Example — uncomment to give \`bug\` its own state machine instead of \`defaults\` (spec-001):
|
|
269
|
+
# states:
|
|
270
|
+
# sequence: [ draft, open, in-progress, resolved, closed ]
|
|
271
|
+
# gates:
|
|
272
|
+
# open: { reject: closed }
|
|
273
|
+
# resolved: { reject: in-progress }
|
|
274
|
+
# returns: { in-progress: open } # memory park: back to open, with a reason
|
|
275
|
+
# limits: { in-progress: 3 } # at most 3 bugs in progress at once`;
|
|
276
|
+
/**
|
|
277
|
+
* The scaffolded `plan` type (`spec-017` §3.1, task-217): the record `wingfoil workflow start` writes for a
|
|
278
|
+
* started workflow. Its `id_pattern` and `path` take the tokens `workflow start` derives (`{workflow}`,
|
|
279
|
+
* `{phase}`, `{scope}`, ruling R18); its own machine is `draft → active → done`, with `active` a `waiting`
|
|
280
|
+
* state: `workflow start` submits the plan (`draft → active`) and `workflow end` takes the `waiting` edge
|
|
281
|
+
* (`active → done`), which no verb drives.
|
|
282
|
+
*/
|
|
283
|
+
const PLAN_TYPE_YAML = ` plan:
|
|
284
|
+
path: docs/memory/plan/{scope}/{id}.md
|
|
285
|
+
id_pattern: "${MEMORY_ID_PATTERNS.plan}"
|
|
286
|
+
amendable: ${MEMORY_AMENDABLE.plan}
|
|
287
|
+
template:
|
|
288
|
+
file: memory/templates/plan.md
|
|
289
|
+
frontmatter:
|
|
290
|
+
required: [id, type, title, status, workflow, phase]
|
|
291
|
+
# A started workflow: \`wingfoil workflow start\` adds and submits it, \`wingfoil workflow end\` closes it.
|
|
292
|
+
states:
|
|
293
|
+
sequence: [ draft, active, done ]
|
|
294
|
+
waiting: [ active ]`;
|
|
219
295
|
/**
|
|
220
296
|
* The scaffolded `memory.yaml` (P1.13, `spec-001-memory-yaml-schema`) — type registry **plus** the
|
|
221
297
|
* `defaults.states` machine every scaffolded type runs on.
|
|
@@ -232,18 +308,24 @@ paths:
|
|
|
232
308
|
* be a product decision beyond this scaffold.
|
|
233
309
|
*/
|
|
234
310
|
function memoryYaml() {
|
|
235
|
-
const types = MEMORY_TYPES.map((type) =>
|
|
311
|
+
const types = MEMORY_TYPES.map((type) => type === 'plan'
|
|
312
|
+
? PLAN_TYPE_YAML
|
|
313
|
+
: ` ${type}:
|
|
236
314
|
path: docs/memory/${type}/{id}.md
|
|
237
315
|
id_pattern: "${MEMORY_ID_PATTERNS[type]}"
|
|
316
|
+
amendable: ${MEMORY_AMENDABLE[type]}
|
|
238
317
|
template:
|
|
239
318
|
file: memory/templates/${type}.md
|
|
240
319
|
frontmatter:
|
|
241
|
-
required: [id, type, title, status]`).join('\n');
|
|
320
|
+
required: [id, type, title, status]${type === 'bug' ? BUG_STATES_EXAMPLE : ''}`).join('\n');
|
|
242
321
|
return `# Memory element schema (P1.13) — scaffolded by \`wingfoil init\`.
|
|
243
322
|
# One entry per element type: its path pattern, its id pattern and its scaffold template. Every type
|
|
244
323
|
# below shares the \`defaults\` state machine; give a type its own \`states:\` block to override it for
|
|
245
|
-
# that type only (REQ-STATE-08).
|
|
324
|
+
# that type only (REQ-STATE-08) — \`bug\` carries a commented example. \`amendable\` says whether
|
|
325
|
+
# \`memory amend\` may record a correction to the type's documents without a state change; absent
|
|
326
|
+
# means false. \`version\` is this file's content revision; \`format\` the file format it is written in.
|
|
246
327
|
version: 1
|
|
328
|
+
format: ${format_1.MEMORY_YAML_FORMAT}
|
|
247
329
|
|
|
248
330
|
# Default state machine — applies to every type that declares no \`states:\` block of its own.
|
|
249
331
|
# \`sequence\` is the ordered forward chain (\`submit\` walks it); a \`gates\` state's forward edge needs
|
|
@@ -262,7 +344,9 @@ ${types}
|
|
|
262
344
|
function rolesYaml() {
|
|
263
345
|
return `# Directive role assignments (P3.2/P3.7) — scaffolded by \`wingfoil init\`.
|
|
264
346
|
# Binds directives to roles by directive ID, independent of the built-in/custom subfolder holding the file.
|
|
347
|
+
# \`version\` is this file's content revision; \`format\` the file format it is written in.
|
|
265
348
|
version: 1
|
|
349
|
+
format: ${format_1.ROLES_YAML_FORMAT}
|
|
266
350
|
|
|
267
351
|
assignments:
|
|
268
352
|
developer:
|
|
@@ -284,10 +368,12 @@ assignments:
|
|
|
284
368
|
- architecture
|
|
285
369
|
- code-review
|
|
286
370
|
|
|
287
|
-
# Global directives apply to every role.
|
|
371
|
+
# Global directives apply to every role. \`security\` is the built-in Security directive (REQ-SEC-08):
|
|
372
|
+
# bound here so every role loads it; \`security-secrets\` is this project's secret-hygiene rule.
|
|
288
373
|
global:
|
|
289
374
|
- doc-versioning
|
|
290
375
|
- documentation
|
|
376
|
+
- security
|
|
291
377
|
- security-secrets
|
|
292
378
|
`;
|
|
293
379
|
}
|
|
@@ -308,7 +394,9 @@ function workflowsYaml(def) {
|
|
|
308
394
|
return `# Project Workflow main configuration (P4.1) — scaffolded by \`wingfoil init\`.
|
|
309
395
|
# This MAIN config file does not inline workflows; it include()s the custom (and, once populated,
|
|
310
396
|
# built-in) workflow files. Startable mains + the ${def.name} delivery sub-workflow are composed below.
|
|
397
|
+
# \`version\` is this file's content revision; \`format\` the file format it is written in.
|
|
311
398
|
version: 1
|
|
399
|
+
format: ${format_1.WORKFLOWS_YAML_FORMAT}
|
|
312
400
|
|
|
313
401
|
include:
|
|
314
402
|
${includes}
|
|
@@ -329,6 +417,9 @@ ${includes}
|
|
|
329
417
|
* binds roles on, and {@link rolesYaml} lists exactly those stems in its `assignments`/`global` blocks
|
|
330
418
|
* — so any other value would leave every scaffolded role binding dangling. Keep the two in step.
|
|
331
419
|
*
|
|
420
|
+
* No `scope:` key: {@link rolesYaml}'s `global:` list alone says which directives bind every role, and
|
|
421
|
+
* an absent `scope` is never reported as a disagreement (task-144 review, R3).
|
|
422
|
+
*
|
|
332
423
|
* `kind: custom` is correct for `directives/custom/`, the only place this generator's output is written;
|
|
333
424
|
* the P3.8 built-ins carry `kind: built-in` and have their own renderer (`builtinDirectiveMd`,
|
|
334
425
|
* `./builtin-directives`).
|
|
@@ -340,6 +431,7 @@ name: ${d.name}
|
|
|
340
431
|
type: directive
|
|
341
432
|
kind: custom
|
|
342
433
|
title: "${d.title}"
|
|
434
|
+
format: ${format_1.DIRECTIVE_FORMAT}
|
|
343
435
|
---
|
|
344
436
|
|
|
345
437
|
# ${d.title}
|
|
@@ -349,22 +441,66 @@ ${d.summary}
|
|
|
349
441
|
<!-- Tailor this rule to your project's needs. Directives are auto-loaded per role (roles.yaml). -->
|
|
350
442
|
`;
|
|
351
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
* What the starter `adr`/`tech-spec` scaffolds say about the `supersedes:` trigger (task-209,
|
|
446
|
+
* `bug-219`). The starter project has neither its field nor its edge — {@link memoryTemplateMd} writes
|
|
447
|
+
* no `supersedes:` key and {@link memoryYaml} gives every type the default machine, which has no
|
|
448
|
+
* `superseded` state — so the scaffold says so, and how to add both, rather than leave a reader of the
|
|
449
|
+
* CLI reference to find out from a trigger that never fires (`src/core/memory-supersede.ts`).
|
|
450
|
+
*/
|
|
451
|
+
function supersedesNote(type) {
|
|
452
|
+
if (type !== 'adr' && type !== 'tech-spec')
|
|
453
|
+
return '';
|
|
454
|
+
return `
|
|
455
|
+
<!-- Replacing an earlier ${type}? This starter scaffold has no \`supersedes:\` field, and the starter
|
|
456
|
+
\`memory.yaml\` no \`superseded\` state, so approving this ${type} retires nothing. To use the
|
|
457
|
+
trigger, add \`supersedes: ""\` to this scaffold (it holds the full id of the replaced element, e.g.
|
|
458
|
+
"${type === 'adr' ? 'adr-2-git-backed-storage' : 'spec-2-memory-yaml-schema'}", never a short form) and give the type its own \`states:\` in
|
|
459
|
+
\`memory.yaml\` whose \`sequence\` ends in a state listed in \`gates\`, then an approved state
|
|
460
|
+
listed in \`waiting\`, then \`superseded\`: the trigger fires only when \`memory approve\` lands
|
|
461
|
+
in that \`waiting\` state, and approve moves only out of a gate. Otherwise retire the replaced element with \`wingfoil memory deprecate\`, naming
|
|
462
|
+
this one in \`--reason\`. -->
|
|
463
|
+
`;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* The fields of the scaffolded `plan` template beyond the common four (`spec-017` §3.1, task-217):
|
|
467
|
+
* `workflow` and `phase` (required, filled by `workflow start`), the `element` the instance is bound to (or
|
|
468
|
+
* its context element), and `parent`, empty for an instance — a plan whose `parent` names
|
|
469
|
+
* `<workflow>.<phase>` is a phase plan, never an instance.
|
|
470
|
+
*/
|
|
471
|
+
const PLAN_TEMPLATE_FIELDS = `workflow: ""
|
|
472
|
+
phase: ""
|
|
473
|
+
element: ""
|
|
474
|
+
parent: ""
|
|
475
|
+
`;
|
|
476
|
+
/**
|
|
477
|
+
* One scaffolded Memory template. Its body comment states what the two verbs that touch it actually
|
|
478
|
+
* do (task-209, `bug-146`): `memory add` sets `id`, `title`, `status` and any `--tags` / `--set` value
|
|
479
|
+
* (`renderAddDocument`, `src/memory/add.ts`), and `memory submit` checks the required fields, moves
|
|
480
|
+
* `status` and commits the document as the author left it (`renderSubmitDocument`,
|
|
481
|
+
* `src/memory/submit.ts`) — neither fills a field nor replaces a placeholder.
|
|
482
|
+
*/
|
|
352
483
|
function memoryTemplateMd(type) {
|
|
353
484
|
return `---
|
|
354
485
|
id: ""
|
|
355
486
|
type: ${type}
|
|
356
487
|
title: ""
|
|
357
488
|
status: draft
|
|
489
|
+
${type === 'plan' ? PLAN_TEMPLATE_FIELDS : ''}format: ${format_1.MEMORY_TEMPLATE_FORMAT}
|
|
358
490
|
---
|
|
359
491
|
|
|
360
|
-
<!-- ${type} body. \`wingfoil memory add\` copies this scaffold
|
|
361
|
-
|
|
362
|
-
|
|
492
|
+
<!-- ${type} body. \`wingfoil memory add\` copies this scaffold, setting only \`id\`, \`title\` and
|
|
493
|
+
\`status\` (and any \`--tags\` or \`--set\` value). Fill the required frontmatter fields and replace
|
|
494
|
+
these placeholder comments yourself; \`wingfoil memory submit\` then checks the required fields,
|
|
495
|
+
moves \`status\` forward and commits the document as you left it, naming in the commit body the
|
|
496
|
+
content it carries. -->
|
|
497
|
+
${supersedesNote(type)}`;
|
|
363
498
|
}
|
|
364
499
|
function mainWorkflowYaml(name, description, phasesYaml) {
|
|
365
500
|
return `# ${description}
|
|
366
501
|
name: ${name}
|
|
367
502
|
kind: main
|
|
503
|
+
format: ${format_1.WORKFLOW_FORMAT}
|
|
368
504
|
description: "${description}"
|
|
369
505
|
${phasesYaml}`;
|
|
370
506
|
}
|
|
@@ -373,6 +509,7 @@ function deliveryWorkflowYaml(def) {
|
|
|
373
509
|
# ${def.cadence}
|
|
374
510
|
name: ${def.slug}-delivery
|
|
375
511
|
kind: sub
|
|
512
|
+
format: ${format_1.WORKFLOW_FORMAT}
|
|
376
513
|
description: "${def.name} delivery loop"
|
|
377
514
|
phases:
|
|
378
515
|
- name: plan
|
|
@@ -385,18 +522,35 @@ phases:
|
|
|
385
522
|
description: "Integrate the completed work."
|
|
386
523
|
`;
|
|
387
524
|
}
|
|
525
|
+
/**
|
|
526
|
+
* The `agents/{built-in,custom}/` part of the scaffold (`spec-016` §2.1, task-196): one
|
|
527
|
+
* `built-in/<name>.yaml` per shipped adapter, written verbatim, and `custom/` reserved empty with a
|
|
528
|
+
* `.gitkeep`. Given an empty list (a test's seam), `built-in/` is reserved with a `.gitkeep` too, as
|
|
529
|
+
* `workflows/built-in/` is, so both directories exist after `init`.
|
|
530
|
+
*/
|
|
531
|
+
function adapterScaffold(adapters) {
|
|
532
|
+
const builtIn = adapters.length === 0
|
|
533
|
+
? [{ path: `${exports.BUILTIN_ADAPTERS_DIR}/.gitkeep`, content: '' }]
|
|
534
|
+
: adapters.map((adapter) => ({ path: `${exports.BUILTIN_ADAPTERS_DIR}/${adapter.name}.yaml`, content: adapter.content }));
|
|
535
|
+
return [...builtIn, { path: `${exports.CUSTOM_ADAPTERS_DIR}/.gitkeep`, content: '' }];
|
|
536
|
+
}
|
|
388
537
|
/**
|
|
389
538
|
* The COMPLETE spec-011 `.wingfoil/` layout for `def`, as a `ScaffoldFile[]` sorted by path
|
|
390
539
|
* (deterministic — REQ-SYS-07). Consumed by `initStorage(root, files, message)`; every path is under
|
|
391
540
|
* `.wingfoil/` so init never writes outside the WingFoil root.
|
|
541
|
+
*
|
|
542
|
+
* @param adapters - the built-in adapter manifests to install; {@link BUILTIN_ADAPTERS} (the shipped
|
|
543
|
+
* list) unless a test passes a fixture list, since no real built-in ships yet (task-196).
|
|
392
544
|
*/
|
|
393
|
-
function templateScaffold(def) {
|
|
545
|
+
function templateScaffold(def, adapters = builtin_adapters_1.BUILTIN_ADAPTERS) {
|
|
394
546
|
const files = [
|
|
395
547
|
// Top-level pillar config (spec-011 "Top-level config files").
|
|
396
548
|
{ path: wf('dna.yaml'), content: dnaYaml(def) },
|
|
397
549
|
{ path: wf('memory.yaml'), content: memoryYaml() },
|
|
398
550
|
{ path: wf('roles.yaml'), content: rolesYaml() },
|
|
399
551
|
{ path: wf('workflows.yaml'), content: workflowsYaml(def) },
|
|
552
|
+
// Agent adapters built-in/custom split (spec-016 §2.1, task-196).
|
|
553
|
+
...adapterScaffold(adapters),
|
|
400
554
|
// Directives built-in/custom split (spec-011): the six P3.8 built-ins (task-057) + custom starters.
|
|
401
555
|
...builtin_directives_1.BUILTIN_DIRECTIVE_TEMPLATES.map((t) => ({ path: `${exports.BUILTIN_DIRECTIVES_DIR}/${t.id}.md`, content: (0, builtin_directives_1.builtinDirectiveMd)(t) })),
|
|
402
556
|
...DIRECTIVES.map((d) => ({ path: wf(`directives/custom/${d.name}.md`), content: directiveMd(d) })),
|
|
@@ -410,7 +564,7 @@ function templateScaffold(def) {
|
|
|
410
564
|
- name: inception
|
|
411
565
|
- name: specification
|
|
412
566
|
- name: delivery
|
|
413
|
-
include:
|
|
567
|
+
include: ${def.slug}-delivery
|
|
414
568
|
- name: sunset
|
|
415
569
|
`),
|
|
416
570
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/storage/templates.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/storage/templates.ts"],"names":[],"mappings":";;;AAyEA,0CAGC;AAGD,4DAEC;AAgGD,wDAOC;AAkbD,4CAgDC;AA1pBD;;;;;;;;;;;;;;;;GAgBG;AACH,yDAAmF;AACnF,6DAAuF;AACvF,iDAQ8B;AAE9B,qCAA2D;AAgB3D,MAAM,KAAK,GAAuB;IAChC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,8DAA8D;IAC3E,aAAa,EAAE,CAAC,OAAO,EAAE,gCAAgC,EAAE,KAAK,CAAC;IACjE,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,uHAAuH;CACjI,CAAC;AAEF,MAAM,MAAM,GAAuB;IACjC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,yGAAyG;IACtH,aAAa,EAAE,CAAC,QAAQ,EAAE,gCAAgC,EAAE,KAAK,CAAC;IAClE,IAAI,EAAE,QAAQ;IACd,OAAO,EACL,kHAAkH;QAClH,8GAA8G;CACjH,CAAC;AAEF,8FAA8F;AACjF,QAAA,SAAS,GAAkC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAExE,kGAAkG;AACrF,QAAA,cAAc,GAAsB,iBAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAE9E,uGAAuG;AAC1F,QAAA,gBAAgB,GAAW,KAAK,CAAC,IAAI,CAAC;AAEnD,oGAAoG;AACpG,SAAgB,eAAe,CAAC,IAAY;IAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACzC,OAAO,iBAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC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C;AAChF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bump comparison of a versioned config file's `version:` (task-208, `bug-249`): the one rule the
|
|
3
|
+
* pending-change gate (`test/lint/helpers/version-bump.ts`, task-183) and the governance check's range
|
|
4
|
+
* rule (`scripts/check-governance.cjs`) share, so the two cannot disagree about what a bump is.
|
|
5
|
+
*
|
|
6
|
+
* `.wingfoil/dna.yaml`, `memory.yaml`, `workflows.yaml` and `roles.yaml` declare `version:` as a number
|
|
7
|
+
* (`memory.yaml`'s own annotation: "a NUMBER, compared numerically", `1.9 -> 2.0`, never `1.10`, which
|
|
8
|
+
* YAML reads as `1.1`). A bump is therefore a numeric **increase** of the value YAML reads — not any
|
|
9
|
+
* difference: a downgrade (`2.5 -> 2.4`) is no bump, nor is a re-quoting that reads as the same number
|
|
10
|
+
* (`1.0 -> "1.0"`). A dotted string with more than two parts (`"1.2.3"`) is compared part by part as
|
|
11
|
+
* integers. Pure (REQ-SYS-07).
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* True when `after` is a bump over `before`: both read as versions and `after` is strictly greater.
|
|
15
|
+
* `before` and `after` are the values YAML reads for `version:` (a number, or a string when quoted).
|
|
16
|
+
* Anything else — absent, `null`, not a version — is never a bump.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isVersionIncrease(before: unknown, after: unknown): boolean;
|
|
19
|
+
//# sourceMappingURL=config-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-version.d.ts","sourceRoot":"","sources":["../../src/validation/config-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgBH;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAa1E"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The bump comparison of a versioned config file's `version:` (task-208, `bug-249`): the one rule the
|
|
4
|
+
* pending-change gate (`test/lint/helpers/version-bump.ts`, task-183) and the governance check's range
|
|
5
|
+
* rule (`scripts/check-governance.cjs`) share, so the two cannot disagree about what a bump is.
|
|
6
|
+
*
|
|
7
|
+
* `.wingfoil/dna.yaml`, `memory.yaml`, `workflows.yaml` and `roles.yaml` declare `version:` as a number
|
|
8
|
+
* (`memory.yaml`'s own annotation: "a NUMBER, compared numerically", `1.9 -> 2.0`, never `1.10`, which
|
|
9
|
+
* YAML reads as `1.1`). A bump is therefore a numeric **increase** of the value YAML reads — not any
|
|
10
|
+
* difference: a downgrade (`2.5 -> 2.4`) is no bump, nor is a re-quoting that reads as the same number
|
|
11
|
+
* (`1.0 -> "1.0"`). A dotted string with more than two parts (`"1.2.3"`) is compared part by part as
|
|
12
|
+
* integers. Pure (REQ-SYS-07).
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.isVersionIncrease = isVersionIncrease;
|
|
16
|
+
/** A numeric reading of `value`: a finite number, or a string of digits with at most one dot. */
|
|
17
|
+
function asNumber(value) {
|
|
18
|
+
if (typeof value === 'number')
|
|
19
|
+
return Number.isFinite(value) ? value : null;
|
|
20
|
+
if (typeof value === 'string' && /^\d+(?:\.\d+)?$/.test(value.trim()))
|
|
21
|
+
return Number(value.trim());
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
/** The integer parts of a dotted version (`"1.10.0"` → `[1, 10, 0]`), or `null` when it is not one. */
|
|
25
|
+
function asParts(value) {
|
|
26
|
+
const text = typeof value === 'number' ? String(value) : typeof value === 'string' ? value.trim() : null;
|
|
27
|
+
if (text === null || !/^\d+(?:\.\d+)*$/.test(text))
|
|
28
|
+
return null;
|
|
29
|
+
return text.split('.').map(Number);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* True when `after` is a bump over `before`: both read as versions and `after` is strictly greater.
|
|
33
|
+
* `before` and `after` are the values YAML reads for `version:` (a number, or a string when quoted).
|
|
34
|
+
* Anything else — absent, `null`, not a version — is never a bump.
|
|
35
|
+
*/
|
|
36
|
+
function isVersionIncrease(before, after) {
|
|
37
|
+
const a = asNumber(before);
|
|
38
|
+
const b = asNumber(after);
|
|
39
|
+
if (a !== null && b !== null)
|
|
40
|
+
return b > a;
|
|
41
|
+
const left = asParts(before);
|
|
42
|
+
const right = asParts(after);
|
|
43
|
+
if (left === null || right === null)
|
|
44
|
+
return false;
|
|
45
|
+
for (let index = 0; index < Math.max(left.length, right.length); index += 1) {
|
|
46
|
+
const l = left[index] ?? 0;
|
|
47
|
+
const r = right[index] ?? 0;
|
|
48
|
+
if (r !== l)
|
|
49
|
+
return r > l;
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=config-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-version.js","sourceRoot":"","sources":["../../src/validation/config-version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAqBH,8CAaC;AAhCD,iGAAiG;AACjG,SAAS,QAAQ,CAAC,KAAc;IAC9B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5E,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACnG,OAAO,IAAI,CAAC;AACd,CAAC;AAED,uGAAuG;AACvG,SAAS,OAAO,CAAC,KAAc;IAC7B,MAAM,IAAI,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,KA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yaml-schema § "Diagnostics"; shared by
|
|
3
|
+
* spec-017-workflow-commands-and-state-deduction §2): `{ code, severity, file, path, message }`,
|
|
4
|
+
* carried by commands in one array named `diagnostics`.
|
|
5
|
+
*
|
|
6
|
+
* A {@link Diagnostic} is a {@link ValidationIssue} with a `severity`, so a list of them can ride a
|
|
7
|
+
* {@link ValidationError} unchanged; {@link DiagnosticsError} is the error a loader throws when the
|
|
8
|
+
* list holds at least one `error`.
|
|
9
|
+
*/
|
|
10
|
+
import { ValidationError, ValidationIssue } from './errors';
|
|
11
|
+
/** `error` makes the operation fail; `warning` is reported and the operation goes on (spec-003). */
|
|
12
|
+
export type DiagnosticSeverity = 'error' | 'warning';
|
|
13
|
+
/** One load-time or deduction diagnostic (spec-003 § "Diagnostics", "Shape"). */
|
|
14
|
+
export interface Diagnostic extends ValidationIssue {
|
|
15
|
+
/** `E_*` for an error, `W_*` for a warning. */
|
|
16
|
+
readonly code: string;
|
|
17
|
+
readonly severity: DiagnosticSeverity;
|
|
18
|
+
/** The configuration file, relative to `.wingfoil/` (e.g. `workflows/custom/dev-loop.yaml`). */
|
|
19
|
+
readonly file: string;
|
|
20
|
+
/** Locates the field inside `file`, e.g. `phases[3].include`; `''` for the whole file. */
|
|
21
|
+
readonly path: string;
|
|
22
|
+
readonly message: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* One diagnostic as a reason line: `<code> <path> (<file>): <message>` — the shape every
|
|
26
|
+
* {@link ValidationError} reason has always had, so the reason names where to look even on a surface
|
|
27
|
+
* that renders no `details`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatDiagnostic(diagnostic: Diagnostic): string;
|
|
30
|
+
/**
|
|
31
|
+
* The failure of a load whose {@link diagnostics} hold at least one error (spec-003 § "Diagnostics"):
|
|
32
|
+
* `VALIDATION`, exit `1` ({@link EXIT_VALIDATION}). Its `message` — the reason the operation reports —
|
|
33
|
+
* is the **first error** in {@link formatDiagnostic}'s form, and {@link diagnostics} is the whole
|
|
34
|
+
* ordered list, warnings included, for the caller to carry in `details` (`dl-055`).
|
|
35
|
+
*/
|
|
36
|
+
export declare class DiagnosticsError extends ValidationError {
|
|
37
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
38
|
+
constructor(diagnostics: readonly Diagnostic[]);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=diagnostic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostic.d.ts","sourceRoot":"","sources":["../../src/validation/diagnostic.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAmB,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE7E,oGAAoG;AACpG,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,CAAC;AAErD,iFAAiF;AACjF,MAAM,WAAW,UAAW,SAAQ,eAAe;IACjD,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,gGAAgG;IAChG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0FAA0F;IAC1F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM,CAE/D;AAED;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,eAAe;IACnD,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;gBAEhC,WAAW,EAAE,SAAS,UAAU,EAAE;CAQ/C"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiagnosticsError = void 0;
|
|
4
|
+
exports.formatDiagnostic = formatDiagnostic;
|
|
5
|
+
/**
|
|
6
|
+
* The configuration diagnostic shape (spec-003-workflows-yaml-schema § "Diagnostics"; shared by
|
|
7
|
+
* spec-017-workflow-commands-and-state-deduction §2): `{ code, severity, file, path, message }`,
|
|
8
|
+
* carried by commands in one array named `diagnostics`.
|
|
9
|
+
*
|
|
10
|
+
* A {@link Diagnostic} is a {@link ValidationIssue} with a `severity`, so a list of them can ride a
|
|
11
|
+
* {@link ValidationError} unchanged; {@link DiagnosticsError} is the error a loader throws when the
|
|
12
|
+
* list holds at least one `error`.
|
|
13
|
+
*/
|
|
14
|
+
const errors_1 = require("./errors");
|
|
15
|
+
/**
|
|
16
|
+
* One diagnostic as a reason line: `<code> <path> (<file>): <message>` — the shape every
|
|
17
|
+
* {@link ValidationError} reason has always had, so the reason names where to look even on a surface
|
|
18
|
+
* that renders no `details`.
|
|
19
|
+
*/
|
|
20
|
+
function formatDiagnostic(diagnostic) {
|
|
21
|
+
return `${diagnostic.code} ${diagnostic.path ? `${diagnostic.path} ` : ''}(${diagnostic.file}): ${diagnostic.message}`;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The failure of a load whose {@link diagnostics} hold at least one error (spec-003 § "Diagnostics"):
|
|
25
|
+
* `VALIDATION`, exit `1` ({@link EXIT_VALIDATION}). Its `message` — the reason the operation reports —
|
|
26
|
+
* is the **first error** in {@link formatDiagnostic}'s form, and {@link diagnostics} is the whole
|
|
27
|
+
* ordered list, warnings included, for the caller to carry in `details` (`dl-055`).
|
|
28
|
+
*/
|
|
29
|
+
class DiagnosticsError extends errors_1.ValidationError {
|
|
30
|
+
diagnostics;
|
|
31
|
+
constructor(diagnostics) {
|
|
32
|
+
super([...diagnostics], errors_1.EXIT_VALIDATION);
|
|
33
|
+
const first = diagnostics.find((d) => d.severity === 'error') ?? diagnostics[0];
|
|
34
|
+
this.message = first ? formatDiagnostic(first) : 'validation failed';
|
|
35
|
+
this.name = 'DiagnosticsError';
|
|
36
|
+
this.diagnostics = diagnostics;
|
|
37
|
+
Object.setPrototypeOf(this, DiagnosticsError.prototype);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.DiagnosticsError = DiagnosticsError;
|
|
41
|
+
//# sourceMappingURL=diagnostic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostic.js","sourceRoot":"","sources":["../../src/validation/diagnostic.ts"],"names":[],"mappings":";;;AA+BA,4CAEC;AAjCD;;;;;;;;GAQG;AACH,qCAA6E;AAiB7E;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,UAAsB;IACrD,OAAO,GAAG,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,UAAU,CAAC,IAAI,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;AACzH,CAAC;AAED;;;;;GAKG;AACH,MAAa,gBAAiB,SAAQ,wBAAe;IAC1C,WAAW,CAAwB;IAE5C,YAAY,WAAkC;QAC5C,KAAK,CAAC,CAAC,GAAG,WAAW,CAAC,EAAE,wBAAe,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;QAChF,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC;QACrE,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC;CACF;AAXD,4CAWC"}
|