wingfoil 0.2.1
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/LICENSE +21 -0
- package/README.md +334 -0
- package/dist/cli/error.d.ts +11 -0
- package/dist/cli/error.d.ts.map +1 -0
- package/dist/cli/error.js +27 -0
- package/dist/cli/error.js.map +1 -0
- package/dist/cli/exit.d.ts +19 -0
- package/dist/cli/exit.d.ts.map +1 -0
- package/dist/cli/exit.js +14 -0
- package/dist/cli/exit.js.map +1 -0
- package/dist/cli/index.d.ts +28 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +36 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init-command.d.ts +34 -0
- package/dist/cli/init-command.d.ts.map +1 -0
- package/dist/cli/init-command.js +100 -0
- package/dist/cli/init-command.js.map +1 -0
- package/dist/cli/mcp-command.d.ts +24 -0
- package/dist/cli/mcp-command.d.ts.map +1 -0
- package/dist/cli/mcp-command.js +42 -0
- package/dist/cli/mcp-command.js.map +1 -0
- package/dist/cli/output.d.ts +13 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +28 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/program.d.ts +12 -0
- package/dist/cli/program.d.ts.map +1 -0
- package/dist/cli/program.js +279 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/cli/registrar.d.ts +69 -0
- package/dist/cli/registrar.d.ts.map +1 -0
- package/dist/cli/registrar.js +82 -0
- package/dist/cli/registrar.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +45 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/approval-authority.d.ts +83 -0
- package/dist/core/approval-authority.d.ts.map +1 -0
- package/dist/core/approval-authority.js +112 -0
- package/dist/core/approval-authority.js.map +1 -0
- package/dist/core/builtin-asset.d.ts +71 -0
- package/dist/core/builtin-asset.d.ts.map +1 -0
- package/dist/core/builtin-asset.js +137 -0
- package/dist/core/builtin-asset.js.map +1 -0
- package/dist/core/builtin-integrity.d.ts +32 -0
- package/dist/core/builtin-integrity.d.ts.map +1 -0
- package/dist/core/builtin-integrity.js +148 -0
- package/dist/core/builtin-integrity.js.map +1 -0
- package/dist/core/confinement.d.ts +57 -0
- package/dist/core/confinement.d.ts.map +1 -0
- package/dist/core/confinement.js +108 -0
- package/dist/core/confinement.js.map +1 -0
- package/dist/core/context.d.ts +187 -0
- package/dist/core/context.d.ts.map +1 -0
- package/dist/core/context.js +192 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/directive-assign.d.ts +131 -0
- package/dist/core/directive-assign.d.ts.map +1 -0
- package/dist/core/directive-assign.js +352 -0
- package/dist/core/directive-assign.js.map +1 -0
- package/dist/core/directives-list.d.ts +80 -0
- package/dist/core/directives-list.d.ts.map +1 -0
- package/dist/core/directives-list.js +148 -0
- package/dist/core/directives-list.js.map +1 -0
- package/dist/core/exit-code.d.ts +85 -0
- package/dist/core/exit-code.d.ts.map +1 -0
- package/dist/core/exit-code.js +163 -0
- package/dist/core/exit-code.js.map +1 -0
- package/dist/core/git-identity.d.ts +32 -0
- package/dist/core/git-identity.d.ts.map +1 -0
- package/dist/core/git-identity.js +72 -0
- package/dist/core/git-identity.js.map +1 -0
- package/dist/core/index.d.ts +388 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +1331 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/init.d.ts +78 -0
- package/dist/core/init.d.ts.map +1 -0
- package/dist/core/init.js +167 -0
- package/dist/core/init.js.map +1 -0
- package/dist/core/loaders.d.ts +174 -0
- package/dist/core/loaders.d.ts.map +1 -0
- package/dist/core/loaders.js +364 -0
- package/dist/core/loaders.js.map +1 -0
- package/dist/core/memory-add-type.d.ts +43 -0
- package/dist/core/memory-add-type.d.ts.map +1 -0
- package/dist/core/memory-add-type.js +151 -0
- package/dist/core/memory-add-type.js.map +1 -0
- package/dist/core/memory-transition.d.ts +111 -0
- package/dist/core/memory-transition.d.ts.map +1 -0
- package/dist/core/memory-transition.js +269 -0
- package/dist/core/memory-transition.js.map +1 -0
- package/dist/core/registry.d.ts +189 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +66 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/relevance.d.ts +86 -0
- package/dist/core/relevance.d.ts.map +1 -0
- package/dist/core/relevance.js +258 -0
- package/dist/core/relevance.js.map +1 -0
- package/dist/core/require-reason.d.ts +27 -0
- package/dist/core/require-reason.d.ts.map +1 -0
- package/dist/core/require-reason.js +95 -0
- package/dist/core/require-reason.js.map +1 -0
- package/dist/core/types.d.ts +45 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +22 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/usage-error.d.ts +20 -0
- package/dist/core/usage-error.d.ts.map +1 -0
- package/dist/core/usage-error.js +29 -0
- package/dist/core/usage-error.js.map +1 -0
- package/dist/core/write-guard.d.ts +99 -0
- package/dist/core/write-guard.d.ts.map +1 -0
- package/dist/core/write-guard.js +247 -0
- package/dist/core/write-guard.js.map +1 -0
- package/dist/directives/create.d.ts +47 -0
- package/dist/directives/create.d.ts.map +1 -0
- package/dist/directives/create.js +82 -0
- package/dist/directives/create.js.map +1 -0
- package/dist/directives/index.d.ts +20 -0
- package/dist/directives/index.d.ts.map +1 -0
- package/dist/directives/index.js +32 -0
- package/dist/directives/index.js.map +1 -0
- package/dist/directives/roles-edit.d.ts +53 -0
- package/dist/directives/roles-edit.d.ts.map +1 -0
- package/dist/directives/roles-edit.js +286 -0
- package/dist/directives/roles-edit.js.map +1 -0
- package/dist/directives/schema.d.ts +65 -0
- package/dist/directives/schema.d.ts.map +1 -0
- package/dist/directives/schema.js +68 -0
- package/dist/directives/schema.js.map +1 -0
- package/dist/dna/edit.d.ts +61 -0
- package/dist/dna/edit.d.ts.map +1 -0
- package/dist/dna/edit.js +429 -0
- package/dist/dna/edit.js.map +1 -0
- package/dist/dna/index.d.ts +24 -0
- package/dist/dna/index.d.ts.map +1 -0
- package/dist/dna/index.js +59 -0
- package/dist/dna/index.js.map +1 -0
- package/dist/dna/mutate.d.ts +74 -0
- package/dist/dna/mutate.d.ts.map +1 -0
- package/dist/dna/mutate.js +318 -0
- package/dist/dna/mutate.js.map +1 -0
- package/dist/dna/path.d.ts +175 -0
- package/dist/dna/path.d.ts.map +1 -0
- package/dist/dna/path.js +289 -0
- package/dist/dna/path.js.map +1 -0
- package/dist/dna/roles.d.ts +57 -0
- package/dist/dna/roles.d.ts.map +1 -0
- package/dist/dna/roles.js +50 -0
- package/dist/dna/roles.js.map +1 -0
- package/dist/dna/schema.d.ts +172 -0
- package/dist/dna/schema.d.ts.map +1 -0
- package/dist/dna/schema.js +182 -0
- package/dist/dna/schema.js.map +1 -0
- package/dist/dna/set.d.ts +145 -0
- package/dist/dna/set.d.ts.map +1 -0
- package/dist/dna/set.js +428 -0
- package/dist/dna/set.js.map +1 -0
- package/dist/mcp/dna-resource.d.ts +16 -0
- package/dist/mcp/dna-resource.d.ts.map +1 -0
- package/dist/mcp/dna-resource.js +56 -0
- package/dist/mcp/dna-resource.js.map +1 -0
- package/dist/mcp/index.d.ts +49 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +60 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/memory-resource.d.ts +17 -0
- package/dist/mcp/memory-resource.d.ts.map +1 -0
- package/dist/mcp/memory-resource.js +133 -0
- package/dist/mcp/memory-resource.js.map +1 -0
- package/dist/mcp/prompt.d.ts +48 -0
- package/dist/mcp/prompt.d.ts.map +1 -0
- package/dist/mcp/prompt.js +176 -0
- package/dist/mcp/prompt.js.map +1 -0
- package/dist/mcp/read-only.d.ts +42 -0
- package/dist/mcp/read-only.d.ts.map +1 -0
- package/dist/mcp/read-only.js +93 -0
- package/dist/mcp/read-only.js.map +1 -0
- package/dist/mcp/registrar.d.ts +54 -0
- package/dist/mcp/registrar.d.ts.map +1 -0
- package/dist/mcp/registrar.js +72 -0
- package/dist/mcp/registrar.js.map +1 -0
- package/dist/mcp/server.d.ts +58 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +64 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/workflow-resource.d.ts +17 -0
- package/dist/mcp/workflow-resource.d.ts.map +1 -0
- package/dist/mcp/workflow-resource.js +63 -0
- package/dist/mcp/workflow-resource.js.map +1 -0
- package/dist/memory/add.d.ts +50 -0
- package/dist/memory/add.d.ts.map +1 -0
- package/dist/memory/add.js +131 -0
- package/dist/memory/add.js.map +1 -0
- package/dist/memory/audit.d.ts +177 -0
- package/dist/memory/audit.d.ts.map +1 -0
- package/dist/memory/audit.js +287 -0
- package/dist/memory/audit.js.map +1 -0
- package/dist/memory/commit-message.d.ts +146 -0
- package/dist/memory/commit-message.d.ts.map +1 -0
- package/dist/memory/commit-message.js +203 -0
- package/dist/memory/commit-message.js.map +1 -0
- package/dist/memory/entry.d.ts +56 -0
- package/dist/memory/entry.d.ts.map +1 -0
- package/dist/memory/entry.js +28 -0
- package/dist/memory/entry.js.map +1 -0
- package/dist/memory/frontmatter-edit.d.ts +68 -0
- package/dist/memory/frontmatter-edit.d.ts.map +1 -0
- package/dist/memory/frontmatter-edit.js +333 -0
- package/dist/memory/frontmatter-edit.js.map +1 -0
- package/dist/memory/git-log.d.ts +32 -0
- package/dist/memory/git-log.d.ts.map +1 -0
- package/dist/memory/git-log.js +100 -0
- package/dist/memory/git-log.js.map +1 -0
- package/dist/memory/history.d.ts +142 -0
- package/dist/memory/history.d.ts.map +1 -0
- package/dist/memory/history.js +250 -0
- package/dist/memory/history.js.map +1 -0
- package/dist/memory/index.d.ts +58 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +107 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/query.d.ts +150 -0
- package/dist/memory/query.d.ts.map +1 -0
- package/dist/memory/query.js +307 -0
- package/dist/memory/query.js.map +1 -0
- package/dist/memory/reject.d.ts +11 -0
- package/dist/memory/reject.d.ts.map +1 -0
- package/dist/memory/reject.js +32 -0
- package/dist/memory/reject.js.map +1 -0
- package/dist/memory/schema.d.ts +104 -0
- package/dist/memory/schema.d.ts.map +1 -0
- package/dist/memory/schema.js +161 -0
- package/dist/memory/schema.js.map +1 -0
- package/dist/memory/state-machine.d.ts +166 -0
- package/dist/memory/state-machine.d.ts.map +1 -0
- package/dist/memory/state-machine.js +431 -0
- package/dist/memory/state-machine.js.map +1 -0
- package/dist/memory/submit.d.ts +11 -0
- package/dist/memory/submit.d.ts.map +1 -0
- package/dist/memory/submit.js +44 -0
- package/dist/memory/submit.js.map +1 -0
- package/dist/storage/builtin-directives.d.ts +54 -0
- package/dist/storage/builtin-directives.d.ts.map +1 -0
- package/dist/storage/builtin-directives.js +152 -0
- package/dist/storage/builtin-directives.js.map +1 -0
- package/dist/storage/commit.d.ts +92 -0
- package/dist/storage/commit.d.ts.map +1 -0
- package/dist/storage/commit.js +201 -0
- package/dist/storage/commit.js.map +1 -0
- package/dist/storage/confinement.d.ts +93 -0
- package/dist/storage/confinement.d.ts.map +1 -0
- package/dist/storage/confinement.js +164 -0
- package/dist/storage/confinement.js.map +1 -0
- package/dist/storage/document.d.ts +27 -0
- package/dist/storage/document.d.ts.map +1 -0
- package/dist/storage/document.js +52 -0
- package/dist/storage/document.js.map +1 -0
- package/dist/storage/errors.d.ts +36 -0
- package/dist/storage/errors.d.ts.map +1 -0
- package/dist/storage/errors.js +46 -0
- package/dist/storage/errors.js.map +1 -0
- package/dist/storage/frontmatter.d.ts +27 -0
- package/dist/storage/frontmatter.d.ts.map +1 -0
- package/dist/storage/frontmatter.js +37 -0
- package/dist/storage/frontmatter.js.map +1 -0
- package/dist/storage/git-root.d.ts +17 -0
- package/dist/storage/git-root.d.ts.map +1 -0
- package/dist/storage/git-root.js +49 -0
- package/dist/storage/git-root.js.map +1 -0
- package/dist/storage/index.d.ts +29 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +66 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/init-state.d.ts +9 -0
- package/dist/storage/init-state.d.ts.map +1 -0
- package/dist/storage/init-state.js +24 -0
- package/dist/storage/init-state.js.map +1 -0
- package/dist/storage/layout.d.ts +51 -0
- package/dist/storage/layout.d.ts.map +1 -0
- package/dist/storage/layout.js +88 -0
- package/dist/storage/layout.js.map +1 -0
- package/dist/storage/memory-path.d.ts +72 -0
- package/dist/storage/memory-path.d.ts.map +1 -0
- package/dist/storage/memory-path.js +127 -0
- package/dist/storage/memory-path.js.map +1 -0
- package/dist/storage/snapshot.d.ts +16 -0
- package/dist/storage/snapshot.d.ts.map +1 -0
- package/dist/storage/snapshot.js +72 -0
- package/dist/storage/snapshot.js.map +1 -0
- package/dist/storage/templates.d.ts +88 -0
- package/dist/storage/templates.d.ts.map +1 -0
- package/dist/storage/templates.js +422 -0
- package/dist/storage/templates.js.map +1 -0
- package/dist/validation/error-mapper.d.ts +16 -0
- package/dist/validation/error-mapper.d.ts.map +1 -0
- package/dist/validation/error-mapper.js +18 -0
- package/dist/validation/error-mapper.js.map +1 -0
- package/dist/validation/errors.d.ts +69 -0
- package/dist/validation/errors.d.ts.map +1 -0
- package/dist/validation/errors.js +69 -0
- package/dist/validation/errors.js.map +1 -0
- package/dist/validation/id.d.ts +16 -0
- package/dist/validation/id.d.ts.map +1 -0
- package/dist/validation/id.js +177 -0
- package/dist/validation/id.js.map +1 -0
- package/dist/validation/index.d.ts +18 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +37 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/secret-scan.d.ts +129 -0
- package/dist/validation/secret-scan.d.ts.map +1 -0
- package/dist/validation/secret-scan.js +367 -0
- package/dist/validation/secret-scan.js.map +1 -0
- package/dist/validation/two-pass.d.ts +24 -0
- package/dist/validation/two-pass.d.ts.map +1 -0
- package/dist/validation/two-pass.js +24 -0
- package/dist/validation/two-pass.js.map +1 -0
- package/dist/validation/warning.d.ts +31 -0
- package/dist/validation/warning.d.ts.map +1 -0
- package/dist/validation/warning.js +81 -0
- package/dist/validation/warning.js.map +1 -0
- package/dist/validation/yaml.d.ts +9 -0
- package/dist/validation/yaml.d.ts.map +1 -0
- package/dist/validation/yaml.js +30 -0
- package/dist/validation/yaml.js.map +1 -0
- package/dist/workflow/index.d.ts +10 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +16 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/schema.d.ts +89 -0
- package/dist/workflow/schema.d.ts.map +1 -0
- package/dist/workflow/schema.js +73 -0
- package/dist/workflow/schema.js.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;GAYG;AACH,+BAA2C;AAE3C,qCAA+B;AAE/B,8CAA0F;AAE1F,0CAAwC;AACxC,sCAAiD;AACjD,0CAAgG;AAChG,sCAMqB;AACrB,oCAA2D;AAC3D,iDAI8B;AAC9B,yDAAqF;AACrF,wCAAoH;AACpH,iGAAiG;AACjG,oGAAoG;AACpG,sCAAsC;AACtC,wDAAmE;AACnE,sCAmBmB;AAEnB,uCAOmB;AACnB,uDAAgF;AAChF,uCAAiD;AACjD,yDAA+F;AAE/F,iDAAqE;AACrE,mDAAqD;AACrD,+CAAsD;AACtD,6DAA+E;AAC/E,qDAAiE;AACjE,2DAAsF;AACtF,uDAAmD;AACnD,+CAAkG;AAClG,+CAA2C;AAE3C,mCAA0C;AAG1C,mGAAmG;AACtF,QAAA,WAAW,GAAG,MAAe,CAAC;AAE3C,qCAiBmB;AAhBjB,8GAAA,mBAAmB,OAAA;AACnB,wGAAA,aAAa,OAAA;AACb,2GAAA,gBAAgB,OAAA;AAChB,0GAAA,eAAe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I,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE;oBACrC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;iBACjC;gBACD,EAAE,EAAE,iBAAiB;aACtB;YACD,2FAA2F;YAC3F,gGAAgG;YAChG,+FAA+F;YAC/F,uFAAuF;YACvF,iFAAiF;YACjF,eAAe,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,iBAAiB,EAAE;SACnF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type BuiltinTemplateSource } from '../storage';
|
|
2
|
+
import { type CoreResult } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Exact message required by P5.1.1-init.feature scenario "Error - initializing an already-initialized
|
|
5
|
+
* project" — do not reword. Rendered by the CLI as `error: <message>` (spec-005 §3) and mapped to exit
|
|
6
|
+
* 1 (a well-formed invocation that failed on business logic, spec-005 §1) by `exitCodeForError`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const WINGFOIL_ALREADY_INITIALIZED = "WingFoil already initialized (use a migration command to change config)";
|
|
9
|
+
/** What a successful init reports: the resolved root and the root-relative paths it created. */
|
|
10
|
+
export interface InitStorageValue {
|
|
11
|
+
readonly root: string;
|
|
12
|
+
readonly files: readonly string[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Initialize the `.wingfoil/` storage structure at `root` and stage it as a single commit authored
|
|
16
|
+
* by the current git user.
|
|
17
|
+
*
|
|
18
|
+
* Guards, in the order their message must win: git repository → git identity (REQ-SEC-01) → built-in
|
|
19
|
+
* template integrity (REQ-SEC-10) — the same three, in the same order, as {@link initWingfoilProject}.
|
|
20
|
+
*
|
|
21
|
+
* The third one arrived with `task-054-project-directives` / `bug-018-init-storage-bypasses-integrity-guard`.
|
|
22
|
+
* `scaffoldFiles()` now reserves `.wingfoil/directives/built-in/` (P3.5), which makes this a write path
|
|
23
|
+
* that installs into a built-in ASSET directory; before that it was the one `initStorage` caller with
|
|
24
|
+
* no check, safe only because the skeleton happened to contain nothing but dotfiles. Deriving the
|
|
25
|
+
* checked set from `files` — the exact array handed to `initStorage` below, bound once and not
|
|
26
|
+
* recomputed — is what makes "installed but unchecked" unrepresentable here too, rather than a
|
|
27
|
+
* property of today's scaffold content. `verifyBuiltinTemplates` is pure and touches no disk, so
|
|
28
|
+
* running it here satisfies REQ-SEC-10's "abort before writing partial assets" ordering.
|
|
29
|
+
*
|
|
30
|
+
* Per `dl-031-req-sec-10-integrity-depth` (`ready`), that check is schema validation: no digest, no
|
|
31
|
+
* manifest, no checksum.
|
|
32
|
+
*
|
|
33
|
+
* @param builtinTemplates - test-only override for the REQ-SEC-10 source list, mirroring
|
|
34
|
+
* {@link initWingfoilProject}'s parameter of the same name; it lets one shared test table drive the
|
|
35
|
+
* guard through BOTH write paths (`test/core/project-directives.test.ts`). Omit it in production:
|
|
36
|
+
* the derived set is the contract.
|
|
37
|
+
* @returns `ok` carrying the created paths and the produced `{sha, message}` commit; or a
|
|
38
|
+
* `CoreResult.error` (code `VALIDATION` → exit 1) when `root` is not a git repository, when git
|
|
39
|
+
* identity is unconfigured (REQ-SEC-01), when a built-in template fails its schema check
|
|
40
|
+
* (REQ-SEC-10), or (code `IO`) when the git commit itself fails.
|
|
41
|
+
*/
|
|
42
|
+
export declare function initWingfoilStorage(root: string, builtinTemplates?: readonly BuiltinTemplateSource[]): CoreResult<InitStorageValue>;
|
|
43
|
+
/** What a successful `wingfoil init` reports: the root, the chosen template, and the created paths. */
|
|
44
|
+
export interface InitProjectValue {
|
|
45
|
+
readonly root: string;
|
|
46
|
+
readonly template: string;
|
|
47
|
+
readonly files: readonly string[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* `wingfoil init` (task-029, P5.1.1): scaffold the COMPLETE spec-011 `.wingfoil/` layout for the
|
|
51
|
+
* `templateName` methodology template and stage it as a single commit — the CoreResult flow both the
|
|
52
|
+
* CLI wizard and the MCP surface drive (REQ-SYS-05). Config pillars ONLY (DNA/Directives/Workflow) —
|
|
53
|
+
* never Memory content (the `sw-life-cycle` workflow's `init`→`wingfoil-init` phase populates config
|
|
54
|
+
* pillars only, REQ-SYS-02); Memory documents are seeded later by `seed-first-release-line`.
|
|
55
|
+
*
|
|
56
|
+
* Guards, in the order their message must win:
|
|
57
|
+
* 1. `root` is a git repository (same exact message + no-write guarantee as {@link initWingfoilStorage}).
|
|
58
|
+
* 2. NOT already initialized (spec-011 `detectInitState` === 'initialized') → returns
|
|
59
|
+
* {@link WINGFOIL_ALREADY_INITIALIZED} and overwrites NOTHING (returns before any write) — P5.1.1
|
|
60
|
+
* scenario "Error - initializing an already-initialized project", exit 1.
|
|
61
|
+
* 3. `templateName` resolves to a known template (defense-in-depth; the CLI rejects an unknown
|
|
62
|
+
* `--template` value as a usage error / exit 2 before reaching here).
|
|
63
|
+
* 4. git identity is configured (REQ-SEC-01, {@link requireGitIdentity}) — refuse an unattributable commit.
|
|
64
|
+
* 5. every built-in template source passes {@link verifyBuiltinTemplates} (REQ-SEC-10,
|
|
65
|
+
* task-044-builtin-template-integrity) — a corrupted/schema-invalid built-in directive or
|
|
66
|
+
* workflow template aborts before the scaffold write, naming the failing template (P3.8/P4.17
|
|
67
|
+
* BDD "Error - a built-in template fails its integrity check" / "... is structurally invalid").
|
|
68
|
+
* The sources are DERIVED from this very run's `templateScaffold(template)` output via
|
|
69
|
+
* {@link builtinTemplateSources}, so the checked set and the written set cannot drift apart
|
|
70
|
+
* (there is no separate registry to forget to update). `templateScaffold` is pure and writes
|
|
71
|
+
* nothing, so computing it before the guard preserves the "before writing partial assets"
|
|
72
|
+
* ordering the fit criterion demands.
|
|
73
|
+
*
|
|
74
|
+
* @param builtinTemplates - test-only override for guard 5's source list, exercising the abort path
|
|
75
|
+
* without real built-in content on disk. Omit it in production: the derived set is the contract.
|
|
76
|
+
*/
|
|
77
|
+
export declare function initWingfoilProject(root: string, templateName: string, builtinTemplates?: readonly BuiltinTemplateSource[]): CoreResult<InitProjectValue>;
|
|
78
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/core/init.ts"],"names":[],"mappings":"AA2BA,OAAO,EASL,KAAK,qBAAqB,EAC3B,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAM3D;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,4EACkC,CAAC;AAE5E,gGAAgG;AAChG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,gBAAgB,CAAC,EAAE,SAAS,qBAAqB,EAAE,GAClD,UAAU,CAAC,gBAAgB,CAAC,CAsC9B;AAED,uGAAuG;AACvG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,gBAAgB,CAAC,EAAE,SAAS,qBAAqB,EAAE,GAClD,UAAU,CAAC,gBAAgB,CAAC,CAkC9B"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WINGFOIL_ALREADY_INITIALIZED = void 0;
|
|
4
|
+
exports.initWingfoilStorage = initWingfoilStorage;
|
|
5
|
+
exports.initWingfoilProject = initWingfoilProject;
|
|
6
|
+
/**
|
|
7
|
+
* `.wingfoil/` initialization as a shared-core domain operation (task-018-implement-git-backed-storage,
|
|
8
|
+
* P1.1, US-0A-01, REQ-SYS-01/REQ-SYS-02; spec-006-core-domain-api §2 `CoreResult` shape).
|
|
9
|
+
*
|
|
10
|
+
* The storage layer (`src/storage/layout.ts`'s `initStorage`) is a pure write+commit mechanism; this
|
|
11
|
+
* is the thin `CoreResult`-returning wrapper that both surfaces (CLI, MCP — REQ-SYS-05) drive, so the
|
|
12
|
+
* two guard rails the P1.1 acceptance contract states are enforced once, identically:
|
|
13
|
+
* 1. "target directory is not a git repository" → a `VALIDATION` error carrying the exact message
|
|
14
|
+
* `not a git repository: run 'git init' first`, mapped to exit 1 by `exitCodeForError`
|
|
15
|
+
* (spec-005 §1) — and, critically, NOTHING is written (no `.wingfoil/`).
|
|
16
|
+
* 2. the REQ-SEC-01 git-identity pre-flight (`requireGitIdentity`, task-014) — a WingFoil commit
|
|
17
|
+
* with no attributable author is refused before any file is written.
|
|
18
|
+
*
|
|
19
|
+
* Both write paths below — {@link initWingfoilStorage} and {@link initWingfoilProject} — additionally
|
|
20
|
+
* run the REQ-SEC-10 built-in template schema check over the very `ScaffoldFile[]` they are about to
|
|
21
|
+
* write, before writing it. The symmetry is deliberate and is pinned by a shared test table
|
|
22
|
+
* (`test/core/project-directives.test.ts`); it closed
|
|
23
|
+
* `bug-018-init-storage-bypasses-integrity-guard`, the last asymmetry `task-044` left behind.
|
|
24
|
+
*
|
|
25
|
+
* The user-facing `wingfoil init` CLI command and its interactive wizard are task-029's scope; this
|
|
26
|
+
* function is the library entry point that command will call. It is intentionally NOT registered in
|
|
27
|
+
* `CORE_MODULES` yet — there is no distinct verb beyond `init`, and wiring the surface belongs with
|
|
28
|
+
* task-029 (keeping the REQ-SYS-05 parity test's "0 mutating ops" invariant until a surface exists).
|
|
29
|
+
*/
|
|
30
|
+
const node_fs_1 = require("node:fs");
|
|
31
|
+
const node_path_1 = require("node:path");
|
|
32
|
+
const storage_1 = require("../storage");
|
|
33
|
+
const builtin_integrity_1 = require("./builtin-integrity");
|
|
34
|
+
const git_identity_1 = require("./git-identity");
|
|
35
|
+
const types_1 = require("./types");
|
|
36
|
+
const write_guard_1 = require("./write-guard");
|
|
37
|
+
/** Exact refusal message required by P1.1-git-backed-storage.feature scenario 3 — do not reword. */
|
|
38
|
+
const NOT_A_GIT_REPO = "not a git repository: run 'git init' first";
|
|
39
|
+
/**
|
|
40
|
+
* Exact message required by P5.1.1-init.feature scenario "Error - initializing an already-initialized
|
|
41
|
+
* project" — do not reword. Rendered by the CLI as `error: <message>` (spec-005 §3) and mapped to exit
|
|
42
|
+
* 1 (a well-formed invocation that failed on business logic, spec-005 §1) by `exitCodeForError`.
|
|
43
|
+
*/
|
|
44
|
+
exports.WINGFOIL_ALREADY_INITIALIZED = 'WingFoil already initialized (use a migration command to change config)';
|
|
45
|
+
/**
|
|
46
|
+
* Initialize the `.wingfoil/` storage structure at `root` and stage it as a single commit authored
|
|
47
|
+
* by the current git user.
|
|
48
|
+
*
|
|
49
|
+
* Guards, in the order their message must win: git repository → git identity (REQ-SEC-01) → built-in
|
|
50
|
+
* template integrity (REQ-SEC-10) — the same three, in the same order, as {@link initWingfoilProject}.
|
|
51
|
+
*
|
|
52
|
+
* The third one arrived with `task-054-project-directives` / `bug-018-init-storage-bypasses-integrity-guard`.
|
|
53
|
+
* `scaffoldFiles()` now reserves `.wingfoil/directives/built-in/` (P3.5), which makes this a write path
|
|
54
|
+
* that installs into a built-in ASSET directory; before that it was the one `initStorage` caller with
|
|
55
|
+
* no check, safe only because the skeleton happened to contain nothing but dotfiles. Deriving the
|
|
56
|
+
* checked set from `files` — the exact array handed to `initStorage` below, bound once and not
|
|
57
|
+
* recomputed — is what makes "installed but unchecked" unrepresentable here too, rather than a
|
|
58
|
+
* property of today's scaffold content. `verifyBuiltinTemplates` is pure and touches no disk, so
|
|
59
|
+
* running it here satisfies REQ-SEC-10's "abort before writing partial assets" ordering.
|
|
60
|
+
*
|
|
61
|
+
* Per `dl-031-req-sec-10-integrity-depth` (`ready`), that check is schema validation: no digest, no
|
|
62
|
+
* manifest, no checksum.
|
|
63
|
+
*
|
|
64
|
+
* @param builtinTemplates - test-only override for the REQ-SEC-10 source list, mirroring
|
|
65
|
+
* {@link initWingfoilProject}'s parameter of the same name; it lets one shared test table drive the
|
|
66
|
+
* guard through BOTH write paths (`test/core/project-directives.test.ts`). Omit it in production:
|
|
67
|
+
* the derived set is the contract.
|
|
68
|
+
* @returns `ok` carrying the created paths and the produced `{sha, message}` commit; or a
|
|
69
|
+
* `CoreResult.error` (code `VALIDATION` → exit 1) when `root` is not a git repository, when git
|
|
70
|
+
* identity is unconfigured (REQ-SEC-01), when a built-in template fails its schema check
|
|
71
|
+
* (REQ-SEC-10), or (code `IO`) when the git commit itself fails.
|
|
72
|
+
*/
|
|
73
|
+
function initWingfoilStorage(root, builtinTemplates) {
|
|
74
|
+
// Guard 1 — `root` must itself be a git repository (a `.git` dir or worktree file at the root).
|
|
75
|
+
// Checked first so its precise message wins over the identity pre-flight below.
|
|
76
|
+
if (!(0, node_fs_1.existsSync)((0, node_path_1.join)(root, '.git'))) {
|
|
77
|
+
return (0, types_1.coreErr)({ code: 'VALIDATION', message: NOT_A_GIT_REPO });
|
|
78
|
+
}
|
|
79
|
+
// Guard 2 — refuse an unattributable commit (REQ-SEC-01). Returns its VALIDATION error unchanged.
|
|
80
|
+
const identity = (0, git_identity_1.requireGitIdentity)(root);
|
|
81
|
+
if (!identity.ok)
|
|
82
|
+
return identity;
|
|
83
|
+
// Guard 3 — REQ-SEC-10, over the very list this call is about to write.
|
|
84
|
+
const files = (0, storage_1.scaffoldFiles)();
|
|
85
|
+
const integrityFailure = (0, builtin_integrity_1.verifyBuiltinTemplates)(builtinTemplates ?? (0, storage_1.builtinTemplateSources)(files));
|
|
86
|
+
if (integrityFailure) {
|
|
87
|
+
return (0, types_1.coreErr)({ code: 'VALIDATION', message: integrityFailure.message });
|
|
88
|
+
}
|
|
89
|
+
// Guard 4 — dl-080 (B) / bug-078 / task-092. This is the ONE `initStorage` caller with no
|
|
90
|
+
// already-initialized check: {@link initWingfoilProject} refuses before any write when `.wingfoil/`
|
|
91
|
+
// holds any entry at all (`detectInitState`), and every path it writes is under `.wingfoil/`, so no
|
|
92
|
+
// target of that flow can pre-exist and a guard there would be unreachable code. Here a target CAN
|
|
93
|
+
// pre-exist, and its uncommitted content would be overwritten and the diff committed under a
|
|
94
|
+
// subject saying "initialize". What this does NOT repair is the asymmetry itself — a CLEAN,
|
|
95
|
+
// committed `.wingfoil/dna.yaml` is still overwritten, because the target is clean; that is the
|
|
96
|
+
// missing already-initialized check, a distinct defect, raised rather than fixed here.
|
|
97
|
+
const unmodified = (0, write_guard_1.requireUnmodifiedTargets)(root, files.map((file) => file.path));
|
|
98
|
+
if (!unmodified.ok)
|
|
99
|
+
return unmodified;
|
|
100
|
+
try {
|
|
101
|
+
const sha = (0, storage_1.initStorage)(root, files);
|
|
102
|
+
return (0, types_1.coreOk)({ root, files: files.map((file) => file.path) }, { sha, message: storage_1.INIT_COMMIT_MESSAGE });
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
return (0, types_1.coreErr)({ code: 'IO', message: error.message });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* `wingfoil init` (task-029, P5.1.1): scaffold the COMPLETE spec-011 `.wingfoil/` layout for the
|
|
110
|
+
* `templateName` methodology template and stage it as a single commit — the CoreResult flow both the
|
|
111
|
+
* CLI wizard and the MCP surface drive (REQ-SYS-05). Config pillars ONLY (DNA/Directives/Workflow) —
|
|
112
|
+
* never Memory content (the `sw-life-cycle` workflow's `init`→`wingfoil-init` phase populates config
|
|
113
|
+
* pillars only, REQ-SYS-02); Memory documents are seeded later by `seed-first-release-line`.
|
|
114
|
+
*
|
|
115
|
+
* Guards, in the order their message must win:
|
|
116
|
+
* 1. `root` is a git repository (same exact message + no-write guarantee as {@link initWingfoilStorage}).
|
|
117
|
+
* 2. NOT already initialized (spec-011 `detectInitState` === 'initialized') → returns
|
|
118
|
+
* {@link WINGFOIL_ALREADY_INITIALIZED} and overwrites NOTHING (returns before any write) — P5.1.1
|
|
119
|
+
* scenario "Error - initializing an already-initialized project", exit 1.
|
|
120
|
+
* 3. `templateName` resolves to a known template (defense-in-depth; the CLI rejects an unknown
|
|
121
|
+
* `--template` value as a usage error / exit 2 before reaching here).
|
|
122
|
+
* 4. git identity is configured (REQ-SEC-01, {@link requireGitIdentity}) — refuse an unattributable commit.
|
|
123
|
+
* 5. every built-in template source passes {@link verifyBuiltinTemplates} (REQ-SEC-10,
|
|
124
|
+
* task-044-builtin-template-integrity) — a corrupted/schema-invalid built-in directive or
|
|
125
|
+
* workflow template aborts before the scaffold write, naming the failing template (P3.8/P4.17
|
|
126
|
+
* BDD "Error - a built-in template fails its integrity check" / "... is structurally invalid").
|
|
127
|
+
* The sources are DERIVED from this very run's `templateScaffold(template)` output via
|
|
128
|
+
* {@link builtinTemplateSources}, so the checked set and the written set cannot drift apart
|
|
129
|
+
* (there is no separate registry to forget to update). `templateScaffold` is pure and writes
|
|
130
|
+
* nothing, so computing it before the guard preserves the "before writing partial assets"
|
|
131
|
+
* ordering the fit criterion demands.
|
|
132
|
+
*
|
|
133
|
+
* @param builtinTemplates - test-only override for guard 5's source list, exercising the abort path
|
|
134
|
+
* without real built-in content on disk. Omit it in production: the derived set is the contract.
|
|
135
|
+
*/
|
|
136
|
+
function initWingfoilProject(root, templateName, builtinTemplates) {
|
|
137
|
+
if (!(0, node_fs_1.existsSync)((0, node_path_1.join)(root, '.git'))) {
|
|
138
|
+
return (0, types_1.coreErr)({ code: 'VALIDATION', message: NOT_A_GIT_REPO });
|
|
139
|
+
}
|
|
140
|
+
if ((0, storage_1.detectInitState)(root) === 'initialized') {
|
|
141
|
+
return (0, types_1.coreErr)({ code: 'VALIDATION', message: exports.WINGFOIL_ALREADY_INITIALIZED });
|
|
142
|
+
}
|
|
143
|
+
const template = (0, storage_1.resolveTemplate)(templateName);
|
|
144
|
+
if (!template) {
|
|
145
|
+
return (0, types_1.coreErr)({ code: 'VALIDATION', message: `unknown template "${templateName}"` });
|
|
146
|
+
}
|
|
147
|
+
const identity = (0, git_identity_1.requireGitIdentity)(root);
|
|
148
|
+
if (!identity.ok)
|
|
149
|
+
return identity;
|
|
150
|
+
// Guard 5 — REQ-SEC-10. `templateScaffold` is pure (no I/O), so the exact file list about to be
|
|
151
|
+
// written is available to check BEFORE anything is written; deriving the sources from it is what
|
|
152
|
+
// keeps "installed" and "checked" the same set.
|
|
153
|
+
const files = (0, storage_1.templateScaffold)(template);
|
|
154
|
+
const integrityFailure = (0, builtin_integrity_1.verifyBuiltinTemplates)(builtinTemplates ?? (0, storage_1.builtinTemplateSources)(files));
|
|
155
|
+
if (integrityFailure) {
|
|
156
|
+
return (0, types_1.coreErr)({ code: 'VALIDATION', message: integrityFailure.message });
|
|
157
|
+
}
|
|
158
|
+
try {
|
|
159
|
+
const message = (0, storage_1.initProjectCommitMessage)(template);
|
|
160
|
+
const sha = (0, storage_1.initStorage)(root, files, message);
|
|
161
|
+
return (0, types_1.coreOk)({ root, template: template.name, files: files.map((file) => file.path) }, { sha, message });
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
return (0, types_1.coreErr)({ code: 'IO', message: error.message });
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/core/init.ts"],"names":[],"mappings":";;;AAyFA,kDAyCC;AAqCD,kDAsCC;AA7MD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qCAAqC;AACrC,yCAAiC;AAEjC,wCAUoB;AAEpB,2DAA6D;AAC7D,iDAAoD;AACpD,mCAA2D;AAC3D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,EAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,CAAC,QAAQ,CAAC,EAAE;QAAE,OAAO,QAAwC,CAAC;IAElE,gGAAgG;IAChG,iGAAiG;IACjG,gDAAgD;IAChD,MAAM,KAAK,GAAG,IAAA,0BAAgB,EAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,gBAAgB,GAAG,IAAA,0CAAsB,EAAC,gBAAgB,IAAI,IAAA,gCAAsB,EAAC,KAAK,CAAC,CAAC,CAAC;IACnG,IAAI,gBAAgB,EAAE,CAAC;QACrB,OAAO,IAAA,eAAO,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAA,kCAAwB,EAAC,QAAQ,CAAC,CAAC;QACnD,MAAM,GAAG,GAAG,IAAA,qBAAW,EAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC9C,OAAO,IAAA,cAAM,EACX,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EACxE,EAAE,GAAG,EAAE,OAAO,EAAE,CACjB,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,IAAA,eAAO,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAG,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { DirectiveFrontmatter, RolesYaml } from '../directives/schema';
|
|
2
|
+
import { DnaYaml } from '../dna/schema';
|
|
3
|
+
import { MemoryYaml } from '../memory/schema';
|
|
4
|
+
import { Workflow, WorkflowsYaml } from '../workflow/schema';
|
|
5
|
+
/** Load and validate `.wingfoil/memory.yaml` in isolation (spec-001-memory-yaml-schema). */
|
|
6
|
+
export declare function loadMemoryYaml(root: string): MemoryYaml;
|
|
7
|
+
/**
|
|
8
|
+
* Root-relative POSIX path of `memory.yaml` — the form git wants for a revision read
|
|
9
|
+
* (`<rev>:<path>`), as opposed to the platform `join` every on-disk read uses. Counterpart of
|
|
10
|
+
* {@link DNA_YAML_PATH} (task-091).
|
|
11
|
+
*/
|
|
12
|
+
export declare const MEMORY_YAML_PATH: ".wingfoil/memory.yaml";
|
|
13
|
+
/**
|
|
14
|
+
* Load and validate `.wingfoil/memory.yaml` **as the repository has committed it** — the version at
|
|
15
|
+
* `HEAD` — returning `null` when no commit of the repository contains that path (an untracked
|
|
16
|
+
* `memory.yaml`, or a repository with no commits at all). Same schema and same error shapes as
|
|
17
|
+
* {@link loadMemoryYaml}; only the source of the bytes differs.
|
|
18
|
+
*
|
|
19
|
+
* This is the baseline every Memory **state transition** resolves against
|
|
20
|
+
* (`prepareMemoryTransition`, `./memory-transition.ts`), per
|
|
21
|
+
* `dl-080-which-baseline-each-command-reads` option (B) — *a read that gates an operation resolves
|
|
22
|
+
* against the repository as committed at `HEAD`* — closing
|
|
23
|
+
* `bug-081-memory-yaml-read-from-worktree-fabricates-states`: an uncommitted edit to a type's
|
|
24
|
+
* `sequence` used to decide what transition a verb performed and what `status` it committed, through
|
|
25
|
+
* `memory submit`, which needs no authority at all, and left the element in a status the committed
|
|
26
|
+
* machine rejects, movable by no verb at all.
|
|
27
|
+
*
|
|
28
|
+
* `HEAD` rather than the commit being produced: a transition commit changes only the element path
|
|
29
|
+
* (`verifyCommittedScope`, task-088), so `memory.yaml` at `HEAD` and at the new commit are
|
|
30
|
+
* byte-identical, and `HEAD` is the one available before that commit exists.
|
|
31
|
+
*/
|
|
32
|
+
export declare function loadMemoryYamlAtHead(root: string): MemoryYaml | null;
|
|
33
|
+
/**
|
|
34
|
+
* Load and validate `.wingfoil/dna.yaml` in isolation (spec-002-dna-yaml-schema). On top of the
|
|
35
|
+
* shared two-pass pipeline every pillar loader uses, this re-wraps a YAML-syntax failure into P2.4's
|
|
36
|
+
* own fit criterion (BDD `P2.4-project-dna-config.feature` "Error - malformed YAML in the DNA file"):
|
|
37
|
+
* `invalid DNA: YAML parse error at line <n>`, rather than surfacing the generic `E_YAML_PARSE_ERROR`
|
|
38
|
+
* message every other pillar loader still uses as-is. DNA-scoped only — this does not change
|
|
39
|
+
* `parseYaml`/`ValidationError`'s shared behavior for `memory.yaml`/`workflows.yaml`/directives.
|
|
40
|
+
*/
|
|
41
|
+
export declare function loadDnaYaml(root: string): DnaYaml;
|
|
42
|
+
/**
|
|
43
|
+
* Root-relative POSIX path of `dna.yaml` — the form git wants for a revision read
|
|
44
|
+
* (`<rev>:<path>`), as opposed to the platform `join` every on-disk read uses (task-090).
|
|
45
|
+
*/
|
|
46
|
+
export declare const DNA_YAML_PATH: ".wingfoil/dna.yaml";
|
|
47
|
+
/**
|
|
48
|
+
* Load and validate `.wingfoil/dna.yaml` **as the repository has committed it** — the version at
|
|
49
|
+
* `HEAD` — returning `null` when no commit of the repository contains that path (an untracked
|
|
50
|
+
* `dna.yaml`, or a repository with no commits at all). Same schema and same error shapes as
|
|
51
|
+
* {@link loadDnaYaml}; only the source of the bytes differs.
|
|
52
|
+
*
|
|
53
|
+
* Its caller is `requireApprovalAuthority` (`./approval-authority.ts`, task-090 / `bug-079`) —
|
|
54
|
+
* joined by `checkAssignable` (`./directive-assign.ts`, task-091 / `bug-082`), which validates
|
|
55
|
+
* `directive assign`'s `--role` against the same committed catalogue: approval authority is a property of the
|
|
56
|
+
* repository, not of a working tree, so the roles it reads must be roles someone committed.
|
|
57
|
+
* `adr-006-git-identity-role-based-authz`'s own Positive consequence — a fresh clone "reproduces the
|
|
58
|
+
* full audit trail with zero extra infrastructure" — is what fixes the baseline: a clone carries
|
|
59
|
+
* committed state and nothing else, so an `Approver:` line resting on an uncommitted grant is
|
|
60
|
+
* evidence no clone can re-derive.
|
|
61
|
+
*
|
|
62
|
+
* `HEAD` rather than the produced commit: an approval commit changes only the element path
|
|
63
|
+
* (`verifyCommittedScope`, task-088), so `dna.yaml` at `HEAD` and at the commit being produced are
|
|
64
|
+
* byte-identical — the two shapes `bug-079`'s Expected Behavior offers cannot diverge, and `HEAD` is
|
|
65
|
+
* the one available before the commit exists.
|
|
66
|
+
*
|
|
67
|
+
* Deliberately NOT how the working-tree loaders behave — but no longer an exception argued for one
|
|
68
|
+
* read: `dl-080-which-baseline-each-command-reads` is `ready`, ratified as option (B), and **a read
|
|
69
|
+
* that gates an operation resolves at `HEAD`** is now the rule this and {@link loadMemoryYamlAtHead}
|
|
70
|
+
* implement. A read that gates nothing — `dna show`, `paths`, `directives list`, the MCP Resources —
|
|
71
|
+
* still reports the working tree, which is what those exist to do. (`bug-078` is (B)'s write half:
|
|
72
|
+
* a write refuses while its target carries modifications it does not own.)
|
|
73
|
+
*/
|
|
74
|
+
export declare function loadDnaYamlAtHead(root: string): DnaYaml | null;
|
|
75
|
+
/** The result of loading the Workflow pillar: the Layer-1 manifest plus every Layer-2 file it includes. */
|
|
76
|
+
export interface WorkflowsLoadResult {
|
|
77
|
+
readonly manifest: WorkflowsYaml;
|
|
78
|
+
readonly workflows: readonly Workflow[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Load and validate the Workflow pillar in isolation (spec-003-workflows-yaml-schema): Layer 1
|
|
82
|
+
* (`.wingfoil/workflows.yaml`), then every file its `include` list names (Layer 2), resolved
|
|
83
|
+
* relative to `.wingfoil/` per spec-003. Two cross-file Pass-2 checks that need the loaded files
|
|
84
|
+
* themselves (spec-009 §1 "Cross-file" category) run here, not in the schema module:
|
|
85
|
+
*
|
|
86
|
+
* - every `include` path must resolve to a file that actually exists
|
|
87
|
+
* (`E_WORKFLOW_FILE_NOT_FOUND`, spec-003);
|
|
88
|
+
* - at least one loaded workflow must be `kind: main` (REQ-STATE-03 / spec-003 Layer 1 step 3).
|
|
89
|
+
*/
|
|
90
|
+
export declare function loadWorkflowsYaml(root: string): WorkflowsLoadResult;
|
|
91
|
+
/** One Directives pillar file: its root-relative path and its validated frontmatter. */
|
|
92
|
+
export interface DirectiveFile {
|
|
93
|
+
readonly path: string;
|
|
94
|
+
readonly frontmatter: DirectiveFrontmatter;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Root-relative POSIX path of the Directives tree — the form git wants for a revision listing, as
|
|
98
|
+
* opposed to the platform `join` every on-disk read uses. Counterpart of {@link DNA_YAML_PATH} /
|
|
99
|
+
* {@link MEMORY_YAML_PATH} for the one pillar whose baseline is a **directory** (task-096).
|
|
100
|
+
*/
|
|
101
|
+
export declare const DIRECTIVES_DIR_PATH: ".wingfoil/directives";
|
|
102
|
+
/**
|
|
103
|
+
* Load and validate every Directives file in isolation (task-004-decoupled-pillars — see
|
|
104
|
+
* `src/directives/schema.ts` for why this pillar has no dedicated approved tech-spec yet). Reads
|
|
105
|
+
* every `.md` file under `.wingfoil/directives/**` (built-in + custom) **in the working tree**,
|
|
106
|
+
* sorted deterministically (REQ-SYS-07: no unordered iteration in a context-building path), extracts
|
|
107
|
+
* its frontmatter (`storage.extractFrontmatter`), and validates it against `DirectiveFrontmatter`.
|
|
108
|
+
*
|
|
109
|
+
* This is the *report* baseline — what the user has now — and it is what `directives list`, context
|
|
110
|
+
* assembly and the MCP Resources read. A read that **gates** a mutation reads
|
|
111
|
+
* {@link loadDirectivesAtHead} instead (`dl-080` (B)).
|
|
112
|
+
*/
|
|
113
|
+
export declare function loadDirectives(root: string): DirectiveFile[];
|
|
114
|
+
/**
|
|
115
|
+
* Load and validate every Directives file **as the repository has committed it** — the tree at
|
|
116
|
+
* `HEAD`.
|
|
117
|
+
*
|
|
118
|
+
* This is the inventory a read that gates a mutation resolves against
|
|
119
|
+
* (`checkAssignable`, `./directive-assign.ts`), per `dl-080-which-baseline-each-command-reads` option
|
|
120
|
+
* (B), closing the `assign` half of `bug-086-directive-inventory-read-from-the-worktree`: an
|
|
121
|
+
* untracked directive file used to be bindable, and the committed `roles.yaml` then named a directive
|
|
122
|
+
* present in no commit — a dangling reference by construction, since every other clone gets the
|
|
123
|
+
* binding without the file (REQ-SYS-08's referential integrity, the same way `bug-082` broke it for
|
|
124
|
+
* `--role`).
|
|
125
|
+
*
|
|
126
|
+
* Unlike every other committed-baseline loader, this one needs a **directory listing at a revision**
|
|
127
|
+
* (`storage.listPathsAtRev`, task-096) rather than one `readPathAtRev`: the pillar's members are
|
|
128
|
+
* discovered, not named in advance. That missing primitive is why `task-091` deferred this half.
|
|
129
|
+
*
|
|
130
|
+
* Same schema and same error shapes as {@link loadDirectives}; only the source of the bytes differs.
|
|
131
|
+
*
|
|
132
|
+
* Returns an **array, never `null`**, unlike its three sibling committed-baseline loaders. They read
|
|
133
|
+
* one named file, where "not committed" and "committed but empty" are different facts a caller may
|
|
134
|
+
* need to tell apart; here the two collapse — a `HEAD` that does not resolve (no commits at all) and
|
|
135
|
+
* a `HEAD` that commits no directive file both mean *the repository records no directive*, and both
|
|
136
|
+
* produce the same refusal from the only gate that consults this (`checkAssignable`: every id is
|
|
137
|
+
* unknown). `listPathsAtRev` keeps the distinction for callers that do need it.
|
|
138
|
+
*/
|
|
139
|
+
export declare function loadDirectivesAtHead(root: string): DirectiveFile[];
|
|
140
|
+
/**
|
|
141
|
+
* Root-relative POSIX path of `roles.yaml` — the form git wants for a revision read (`<rev>:<path>`),
|
|
142
|
+
* as opposed to the platform `join` every on-disk read uses. It lived in `./directive-assign.ts` until
|
|
143
|
+
* task-096 moved it here, beside {@link DNA_YAML_PATH} / {@link MEMORY_YAML_PATH} and beside the
|
|
144
|
+
* committed-baseline reader that uses it; `./directive-assign.ts` now **imports** it like any other
|
|
145
|
+
* caller, and `src/core`'s barrel exports it from here.
|
|
146
|
+
*/
|
|
147
|
+
export declare const ROLES_YAML_PATH: ".wingfoil/roles.yaml";
|
|
148
|
+
/**
|
|
149
|
+
* Load and validate `.wingfoil/roles.yaml` in isolation (task-037-role-task-scoped-context,
|
|
150
|
+
* REQ-STATE-05's `directive-loader`, P3.2/P3.7 role → directive bindings) — the same shared two-pass
|
|
151
|
+
* pipeline (`readDocument` + `parseYaml` + `runValidation`) every other pillar loader uses, so this
|
|
152
|
+
* pillar's own validation never depends on another pillar's schema (REQ-SYS-02). Consumed by
|
|
153
|
+
* `resolveRoleDirectives`/`assembleExecutionContext` (`./context.ts`) to resolve a role's assigned
|
|
154
|
+
* directives.
|
|
155
|
+
*/
|
|
156
|
+
export declare function loadRolesYaml(root: string): RolesYaml;
|
|
157
|
+
/**
|
|
158
|
+
* Load and validate `.wingfoil/roles.yaml` **as the repository has committed it** — the version at
|
|
159
|
+
* `HEAD` — returning `null` when no commit contains that path (an untracked `roles.yaml`, a committed
|
|
160
|
+
* deletion of it, or a repository with no commits).
|
|
161
|
+
*
|
|
162
|
+
* This is the baseline REQ-SEC-07 clause (b) is answered from (`checkUnreferenced`,
|
|
163
|
+
* `./directive-assign.ts`), per `dl-080-which-baseline-each-command-reads` option (B), closing the
|
|
164
|
+
* `remove` half of `bug-086-directive-inventory-read-from-the-worktree`: an **uncommitted** deletion
|
|
165
|
+
* of the two `- <id>` lines was enough to delete a directive file the committed `roles.yaml` still
|
|
166
|
+
* bound — on the only verb in the system that destroys an artefact.
|
|
167
|
+
*
|
|
168
|
+
* `null` is not an error and does not fail closed there, unlike `loadDnaYamlAtHead`'s: "is anything
|
|
169
|
+
* still referencing this asset" is a question a missing record *answers*, with "nothing" (which is
|
|
170
|
+
* also how an absent `roles.yaml` has always been read — "no bindings yet", task-051/task-053). A
|
|
171
|
+
* committed `roles.yaml` that does not **validate** is the different case, and that one does refuse.
|
|
172
|
+
*/
|
|
173
|
+
export declare function loadRolesYamlAtHead(root: string): RolesYaml | null;
|
|
174
|
+
//# sourceMappingURL=loaders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loaders.d.ts","sourceRoot":"","sources":["../../src/core/loaders.ts"],"names":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