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,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared validation error types and exit codes (spec-009-validation-strategy §3).
|
|
4
|
+
*
|
|
5
|
+
* A single {@link ValidationError} carries the full list of mapped issues from one validation run
|
|
6
|
+
* so no failure is ever silently dropped. Its {@link ValidationError.exitCode} follows spec-009 §3,
|
|
7
|
+
* which keys the code on the **nature** of the failure, not on the pass that detects it: parse and
|
|
8
|
+
* system-integrity failures exit `2`; every other validation failure — field-level, mapped, generic,
|
|
9
|
+
* and business-rule failures detected in Pass 2 (e.g. `E_INVALID_TRANSITION`, `E_INVALID_STATE`) —
|
|
10
|
+
* exits `1`, matching spec-008's exit-code table.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.ValidationError = exports.E_VALIDATION = exports.E_YAML_PARSE_ERROR = exports.EXIT_INTEGRITY = exports.EXIT_VALIDATION = void 0;
|
|
14
|
+
/**
|
|
15
|
+
* Process exit code for a validation failure whose worst issue is a mapped `E_INVALID_*` /
|
|
16
|
+
* `E_INVALID_*_SCHEMA` or the generic `E_VALIDATION` fallback (spec-009 §3, spec-008 exit table).
|
|
17
|
+
*/
|
|
18
|
+
exports.EXIT_VALIDATION = 1;
|
|
19
|
+
/**
|
|
20
|
+
* Process exit code for a parse or system-integrity failure — `E_YAML_PARSE_ERROR`, and the
|
|
21
|
+
* cross-file integrity checks that presuppose a parseable tree: the input could not be understood,
|
|
22
|
+
* or the installation is inconsistent (spec-009 §3, spec-008 exit table). **Not** every Pass-2
|
|
23
|
+
* failure: spec-009 §3 keys exit codes on the nature of the failure, not the pass, so a business-rule
|
|
24
|
+
* failure found in Pass 2 (an illegal transition, an invalid state) exits {@link EXIT_VALIDATION}.
|
|
25
|
+
*/
|
|
26
|
+
exports.EXIT_INTEGRITY = 2;
|
|
27
|
+
/** `E_*` code emitted when a file cannot be parsed as YAML at all, before Zod runs (spec-009 §3). */
|
|
28
|
+
exports.E_YAML_PARSE_ERROR = 'E_YAML_PARSE_ERROR';
|
|
29
|
+
/** Generic fallback code for any issue with no explicit `ErrorMap` entry (spec-009 §3). */
|
|
30
|
+
exports.E_VALIDATION = 'E_VALIDATION';
|
|
31
|
+
/**
|
|
32
|
+
* The single error type thrown by every validation path. Extends {@link Error} so it integrates
|
|
33
|
+
* with normal throw/catch, but always carries the structured {@link issues} list and the process
|
|
34
|
+
* {@link exitCode} the CLI/MCP surface should exit with.
|
|
35
|
+
*/
|
|
36
|
+
class ValidationError extends Error {
|
|
37
|
+
issues;
|
|
38
|
+
exitCode;
|
|
39
|
+
constructor(issues, exitCode = exports.EXIT_VALIDATION) {
|
|
40
|
+
super(issues.length > 0
|
|
41
|
+
? issues.map((i) => `${i.code} ${i.path ? `${i.path} ` : ''}(${i.file}): ${i.message}`).join('; ')
|
|
42
|
+
: 'validation failed');
|
|
43
|
+
this.name = 'ValidationError';
|
|
44
|
+
this.issues = issues;
|
|
45
|
+
this.exitCode = exitCode;
|
|
46
|
+
// Restore the prototype chain so `instanceof ValidationError` holds after transpilation.
|
|
47
|
+
Object.setPrototypeOf(this, ValidationError.prototype);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Build a pre-parse YAML failure. Exits `2` (integrity) because it means the file could not even
|
|
51
|
+
* be turned into a data structure — Zod never ran.
|
|
52
|
+
*/
|
|
53
|
+
static yamlParse(filePath, message) {
|
|
54
|
+
return new ValidationError([{ code: exports.E_YAML_PARSE_ERROR, path: '', file: filePath, message }], exports.EXIT_INTEGRITY);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Build a **system-integrity** failure detected after parsing. Exits `2` ({@link EXIT_INTEGRITY}).
|
|
58
|
+
* Use it only when the input could not be understood or the installation is inconsistent (e.g. a
|
|
59
|
+
* loader's cross-file check, a malformed `id_pattern`). It is **not** the constructor for every
|
|
60
|
+
* Pass-2 check: spec-009 §3 keys exit codes on the nature of the failure, not the detecting pass,
|
|
61
|
+
* so a business-rule failure found in Pass 2 (`E_INVALID_TRANSITION`, `E_INVALID_STATE`) is built
|
|
62
|
+
* with the plain constructor and exits `1`.
|
|
63
|
+
*/
|
|
64
|
+
static semantic(issues) {
|
|
65
|
+
return new ValidationError(issues, exports.EXIT_INTEGRITY);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
exports.ValidationError = ValidationError;
|
|
69
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/validation/errors.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAoBH;;;GAGG;AACU,QAAA,eAAe,GAAG,CAAC,CAAC;AAEjC;;;;;;GAMG;AACU,QAAA,cAAc,GAAG,CAAC,CAAC;AAEhC,qGAAqG;AACxF,QAAA,kBAAkB,GAAG,oBAAoB,CAAC;AAEvD,2FAA2F;AAC9E,QAAA,YAAY,GAAG,cAAc,CAAC;AAE3C;;;;GAIG;AACH,MAAa,eAAgB,SAAQ,KAAK;IAC/B,MAAM,CAA6B;IACnC,QAAQ,CAAS;IAE1B,YAAY,MAAyB,EAAE,WAAmB,uBAAe;QACvE,KAAK,CACH,MAAM,CAAC,MAAM,GAAG,CAAC;YACf,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YAClG,CAAC,CAAC,mBAAmB,CACxB,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,yFAAyF;QACzF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,SAAS,CAAC,QAAgB,EAAE,OAAe;QAChD,OAAO,IAAI,eAAe,CACxB,CAAC,EAAE,IAAI,EAAE,0BAAkB,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EACjE,sBAAc,CACf,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,CAAC,MAAyB;QACvC,OAAO,IAAI,eAAe,CAAC,MAAM,EAAE,sBAAc,CAAC,CAAC;IACrD,CAAC;CACF;AAvCD,0CAuCC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** The shared ID character class (spec-009 §1): lowercase alphanumerics, `-`, and `.`. */
|
|
2
|
+
export declare const ID_CHAR_CLASS = "a-z0-9-.";
|
|
3
|
+
/**
|
|
4
|
+
* Build the RegExp an ID produced from `pattern` must match: literals are matched verbatim, numeric
|
|
5
|
+
* tokens as `[0-9]+`, and every other token as a hyphen-separated `[a-z0-9.]` slug.
|
|
6
|
+
*/
|
|
7
|
+
export declare function patternToRegExp(pattern: string): RegExp;
|
|
8
|
+
/**
|
|
9
|
+
* Generate a concrete ID from `pattern` and `values`.
|
|
10
|
+
*
|
|
11
|
+
* @throws {@link ValidationError} `E_INVALID_ID_PATTERN_CHARS` (exit 2) if the pattern's literals
|
|
12
|
+
* leave the ID character class, or `E_INVALID_ID` (exit 1) if a value is missing, mistyped, or
|
|
13
|
+
* would produce an ID outside `[a-z0-9-.]`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function generateId(pattern: string, values: Record<string, string | number>): string;
|
|
16
|
+
//# sourceMappingURL=id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/validation/id.ts"],"names":[],"mappings":"AAoBA,0FAA0F;AAC1F,eAAO,MAAM,aAAa,aAAa,CAAC;AAkDxC;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAYvD;AAeD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CA2D3F"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ID_CHAR_CLASS = void 0;
|
|
4
|
+
exports.patternToRegExp = patternToRegExp;
|
|
5
|
+
exports.generateId = generateId;
|
|
6
|
+
/**
|
|
7
|
+
* ID-generation engine (task-002-validation-id-engine, acceptance criteria 5).
|
|
8
|
+
*
|
|
9
|
+
* Generates a concrete Memory-element ID from a type's `id_pattern` (declared in
|
|
10
|
+
* `docs/self/.wingfoil/memory.yaml`, e.g. `task-{n}-{slug}`) plus values for its `{placeholder}`
|
|
11
|
+
* tokens. It enforces the shared ID character class `[a-z0-9-.]` that spec-009-validation-strategy
|
|
12
|
+
* §1 frames as a Pass-2 rule owned by "the shared ID constants":
|
|
13
|
+
*
|
|
14
|
+
* - Every literal character of the pattern (outside `{...}` tokens) must be in `[a-z0-9-.]`;
|
|
15
|
+
* otherwise `E_INVALID_ID_PATTERN_CHARS` (integrity failure, exit 2 — the pattern itself is
|
|
16
|
+
* malformed).
|
|
17
|
+
* - Every rendered value must keep the produced ID inside `[a-z0-9-.]`; otherwise `E_INVALID_ID`
|
|
18
|
+
* (field-level failure, exit 1).
|
|
19
|
+
*
|
|
20
|
+
* It lives under `src/validation` (not `src/core`) because spec-009 §1 co-locates the id-character
|
|
21
|
+
* rule with the validation module, and `runValidation`'s Pass-2 id-pattern check consumes the same
|
|
22
|
+
* character class exported here — keeping one source of truth for what a legal ID looks like.
|
|
23
|
+
*/
|
|
24
|
+
const errors_1 = require("./errors");
|
|
25
|
+
/** The shared ID character class (spec-009 §1): lowercase alphanumerics, `-`, and `.`. */
|
|
26
|
+
exports.ID_CHAR_CLASS = 'a-z0-9-.';
|
|
27
|
+
/** A rendered ID (or ID piece) must match this end-to-end. `-` is placed last to avoid a range. */
|
|
28
|
+
const ID_PIECE_RE = /^[a-z0-9.-]+$/;
|
|
29
|
+
/** A literal pattern segment: every character must be a member of the ID character class. */
|
|
30
|
+
const LITERAL_RE = /^[a-z0-9.-]+$/;
|
|
31
|
+
/** A numeric token is one written purely as `n` (e.g. `{n}`, `{nn}`, `{nnn}`). */
|
|
32
|
+
const NUMERIC_TOKEN_RE = /^n+$/;
|
|
33
|
+
/** Minimum zero-pad width for numeric tokens (observed convention: task-001, adr-005, spec-009). */
|
|
34
|
+
const DEFAULT_PAD_WIDTH = 3;
|
|
35
|
+
const TOKEN_RE = /\{([^{}]+)\}/g;
|
|
36
|
+
/** Split a pattern into ordered literal / token segments. */
|
|
37
|
+
function parsePattern(pattern) {
|
|
38
|
+
const segments = [];
|
|
39
|
+
let lastIndex = 0;
|
|
40
|
+
TOKEN_RE.lastIndex = 0;
|
|
41
|
+
let match;
|
|
42
|
+
while ((match = TOKEN_RE.exec(pattern)) !== null) {
|
|
43
|
+
if (match.index > lastIndex) {
|
|
44
|
+
segments.push({ kind: 'literal', value: pattern.slice(lastIndex, match.index) });
|
|
45
|
+
}
|
|
46
|
+
segments.push({ kind: 'token', value: match[1] ?? '' });
|
|
47
|
+
lastIndex = match.index + match[0].length;
|
|
48
|
+
}
|
|
49
|
+
if (lastIndex < pattern.length) {
|
|
50
|
+
segments.push({ kind: 'literal', value: pattern.slice(lastIndex) });
|
|
51
|
+
}
|
|
52
|
+
return segments;
|
|
53
|
+
}
|
|
54
|
+
function isNumericToken(token) {
|
|
55
|
+
return NUMERIC_TOKEN_RE.test(token);
|
|
56
|
+
}
|
|
57
|
+
/** Escape a literal segment for safe insertion into a RegExp source. */
|
|
58
|
+
function escapeLiteral(literal) {
|
|
59
|
+
return literal.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Build the RegExp an ID produced from `pattern` must match: literals are matched verbatim, numeric
|
|
63
|
+
* tokens as `[0-9]+`, and every other token as a hyphen-separated `[a-z0-9.]` slug.
|
|
64
|
+
*/
|
|
65
|
+
function patternToRegExp(pattern) {
|
|
66
|
+
const segments = parsePattern(pattern);
|
|
67
|
+
let source = '^';
|
|
68
|
+
for (const segment of segments) {
|
|
69
|
+
if (segment.kind === 'literal') {
|
|
70
|
+
source += escapeLiteral(segment.value);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
source += isNumericToken(segment.value) ? '[0-9]+' : '[a-z0-9.]+(?:-[a-z0-9.]+)*';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
source += '$';
|
|
77
|
+
return new RegExp(source);
|
|
78
|
+
}
|
|
79
|
+
/** Collect, in order of first appearance, the characters of `literal` outside the ID class. */
|
|
80
|
+
function offendingChars(literal) {
|
|
81
|
+
const seen = new Set();
|
|
82
|
+
const out = [];
|
|
83
|
+
for (const ch of literal) {
|
|
84
|
+
if (!LITERAL_RE.test(ch) && !seen.has(ch)) {
|
|
85
|
+
seen.add(ch);
|
|
86
|
+
out.push(ch);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Generate a concrete ID from `pattern` and `values`.
|
|
93
|
+
*
|
|
94
|
+
* @throws {@link ValidationError} `E_INVALID_ID_PATTERN_CHARS` (exit 2) if the pattern's literals
|
|
95
|
+
* leave the ID character class, or `E_INVALID_ID` (exit 1) if a value is missing, mistyped, or
|
|
96
|
+
* would produce an ID outside `[a-z0-9-.]`.
|
|
97
|
+
*/
|
|
98
|
+
function generateId(pattern, values) {
|
|
99
|
+
const segments = parsePattern(pattern);
|
|
100
|
+
// Pass A — pattern literals must all be inside the ID character class (integrity failure).
|
|
101
|
+
const badChars = new Set();
|
|
102
|
+
for (const segment of segments) {
|
|
103
|
+
if (segment.kind === 'literal') {
|
|
104
|
+
for (const ch of offendingChars(segment.value))
|
|
105
|
+
badChars.add(ch);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (badChars.size > 0) {
|
|
109
|
+
throw errors_1.ValidationError.semantic([
|
|
110
|
+
{
|
|
111
|
+
code: 'E_INVALID_ID_PATTERN_CHARS',
|
|
112
|
+
path: 'id_pattern',
|
|
113
|
+
file: pattern,
|
|
114
|
+
message: `pattern contains character(s) outside [${exports.ID_CHAR_CLASS}]: ${[...badChars].join(', ')}`,
|
|
115
|
+
},
|
|
116
|
+
]);
|
|
117
|
+
}
|
|
118
|
+
// Pass B — render each token, collecting value-level failures.
|
|
119
|
+
const issues = [];
|
|
120
|
+
let id = '';
|
|
121
|
+
for (const segment of segments) {
|
|
122
|
+
if (segment.kind === 'literal') {
|
|
123
|
+
id += segment.value;
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
const token = segment.value;
|
|
127
|
+
const value = values[token];
|
|
128
|
+
if (value === undefined) {
|
|
129
|
+
issues.push(invalidId(pattern, `missing value for token {${token}}`));
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
if (isNumericToken(token)) {
|
|
133
|
+
const rendered = renderNumeric(token, value);
|
|
134
|
+
if (rendered === null) {
|
|
135
|
+
issues.push(invalidId(pattern, `token {${token}} expects a non-negative integer, got "${String(value)}"`));
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
id += rendered;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
if (typeof value !== 'string' || !ID_PIECE_RE.test(value)) {
|
|
142
|
+
issues.push(invalidId(pattern, `value for token {${token}} is not a valid [${exports.ID_CHAR_CLASS}] piece: "${String(value)}"`));
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
id += value;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (issues.length > 0) {
|
|
149
|
+
throw new errors_1.ValidationError(issues);
|
|
150
|
+
}
|
|
151
|
+
// Pass C — final safety net: the assembled ID must match the pattern and the ID character class.
|
|
152
|
+
if (!ID_PIECE_RE.test(id) || !patternToRegExp(pattern).test(id)) {
|
|
153
|
+
throw new errors_1.ValidationError([invalidId(pattern, `generated id "${id}" does not conform to pattern`)]);
|
|
154
|
+
}
|
|
155
|
+
return id;
|
|
156
|
+
}
|
|
157
|
+
function invalidId(pattern, message) {
|
|
158
|
+
return { code: 'E_INVALID_ID', path: 'id', file: pattern, message };
|
|
159
|
+
}
|
|
160
|
+
/** Render a numeric token, zero-padded to at least the token width (min 3). `null` if not numeric. */
|
|
161
|
+
function renderNumeric(token, value) {
|
|
162
|
+
let n;
|
|
163
|
+
if (typeof value === 'number') {
|
|
164
|
+
n = value;
|
|
165
|
+
}
|
|
166
|
+
else if (/^\d+$/.test(value)) {
|
|
167
|
+
n = Number(value);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
if (!Number.isInteger(n) || n < 0)
|
|
173
|
+
return null;
|
|
174
|
+
const width = Math.max(DEFAULT_PAD_WIDTH, token.length);
|
|
175
|
+
return String(n).padStart(width, '0');
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../src/validation/id.ts"],"names":[],"mappings":";;;AA2EA,0CAYC;AAsBD,gCA2DC;AAxKD;;;;;;;;;;;;;;;;;GAiBG;AACH,qCAA4D;AAE5D,0FAA0F;AAC7E,QAAA,aAAa,GAAG,UAAU,CAAC;AAExC,mGAAmG;AACnG,MAAM,WAAW,GAAG,eAAe,CAAC;AAEpC,6FAA6F;AAC7F,MAAM,UAAU,GAAG,eAAe,CAAC;AAEnC,kFAAkF;AAClF,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEhC,oGAAoG;AACpG,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAQ5B,MAAM,QAAQ,GAAG,eAAe,CAAC;AAEjC,6DAA6D;AAC7D,SAAS,YAAY,CAAC,OAAe;IACnC,MAAM,QAAQ,GAAc,EAAE,CAAC;IAC/B,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,QAAQ,CAAC,SAAS,GAAG,CAAC,CAAC;IACvB,IAAI,KAA6B,CAAC;IAClC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACjD,IAAI,KAAK,CAAC,KAAK,GAAG,SAAS,EAAE,CAAC;YAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,E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e,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,wBAAe,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,iBAAiB,EAAE,+BAA+B,CAAC,CAAC,CAAC,CAAC;IACtG,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,SAAS,CAAC,OAAe,EAAE,OAAe;IACjD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACtE,CAAC;AAED,sGAAsG;AACtG,SAAS,aAAa,CAAC,KAAa,EAAE,KAAsB;IAC1D,IAAI,CAAS,CAAC;IACd,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,CAAC,GAAG,KAAK,CAAC;IACZ,CAAC;SAAM,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/B,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxD,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `src/validation` — the shared validation & ID module (spec-009-validation-strategy,
|
|
3
|
+
* task-002-validation-id-engine). Single entry point every schema (spec-001/002/003 and the
|
|
4
|
+
* frontmatter schema) and CLI/MCP surface (spec-008) calls, so parsing, unknown-field handling,
|
|
5
|
+
* error-code naming, and ID generation stay uniform project-wide.
|
|
6
|
+
*/
|
|
7
|
+
export { E_VALIDATION, E_YAML_PARSE_ERROR, EXIT_INTEGRITY, EXIT_VALIDATION, ValidationError, } from './errors';
|
|
8
|
+
export type { ValidationIssue } from './errors';
|
|
9
|
+
export { toValidationError } from './error-mapper';
|
|
10
|
+
export { emitUnknownFieldWarning } from './warning';
|
|
11
|
+
export type { HasShape } from './warning';
|
|
12
|
+
export { runValidation } from './two-pass';
|
|
13
|
+
export type { RunValidationOptions, SemanticCheck } from './two-pass';
|
|
14
|
+
export { generateId, patternToRegExp, ID_CHAR_CLASS } from './id';
|
|
15
|
+
export { parseYaml } from './yaml';
|
|
16
|
+
export { SECRET_PATTERNS, SCAN_SURFACE_ROOTS, DEFAULT_IGNORE_FILE, scanText, scanProjectSurface, isBinaryContent, loadIgnoreGlobs, matchesIgnoreGlob, } from './secret-scan';
|
|
17
|
+
export type { SecretSeverity, SecretPattern, ExemptReason, SecretFinding, ExemptFinding, ScanResult, ScanTextOptions, ScanProjectOptions, } from './secret-scan';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AACpD,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,YAAY,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,cAAc,EACd,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,UAAU,EACV,eAAe,EACf,kBAAkB,GACnB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.matchesIgnoreGlob = exports.loadIgnoreGlobs = exports.isBinaryContent = exports.scanProjectSurface = exports.scanText = exports.DEFAULT_IGNORE_FILE = exports.SCAN_SURFACE_ROOTS = exports.SECRET_PATTERNS = exports.parseYaml = exports.ID_CHAR_CLASS = exports.patternToRegExp = exports.generateId = exports.runValidation = exports.emitUnknownFieldWarning = exports.toValidationError = exports.ValidationError = exports.EXIT_VALIDATION = exports.EXIT_INTEGRITY = exports.E_YAML_PARSE_ERROR = exports.E_VALIDATION = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* `src/validation` — the shared validation & ID module (spec-009-validation-strategy,
|
|
6
|
+
* task-002-validation-id-engine). Single entry point every schema (spec-001/002/003 and the
|
|
7
|
+
* frontmatter schema) and CLI/MCP surface (spec-008) calls, so parsing, unknown-field handling,
|
|
8
|
+
* error-code naming, and ID generation stay uniform project-wide.
|
|
9
|
+
*/
|
|
10
|
+
var errors_1 = require("./errors");
|
|
11
|
+
Object.defineProperty(exports, "E_VALIDATION", { enumerable: true, get: function () { return errors_1.E_VALIDATION; } });
|
|
12
|
+
Object.defineProperty(exports, "E_YAML_PARSE_ERROR", { enumerable: true, get: function () { return errors_1.E_YAML_PARSE_ERROR; } });
|
|
13
|
+
Object.defineProperty(exports, "EXIT_INTEGRITY", { enumerable: true, get: function () { return errors_1.EXIT_INTEGRITY; } });
|
|
14
|
+
Object.defineProperty(exports, "EXIT_VALIDATION", { enumerable: true, get: function () { return errors_1.EXIT_VALIDATION; } });
|
|
15
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return errors_1.ValidationError; } });
|
|
16
|
+
var error_mapper_1 = require("./error-mapper");
|
|
17
|
+
Object.defineProperty(exports, "toValidationError", { enumerable: true, get: function () { return error_mapper_1.toValidationError; } });
|
|
18
|
+
var warning_1 = require("./warning");
|
|
19
|
+
Object.defineProperty(exports, "emitUnknownFieldWarning", { enumerable: true, get: function () { return warning_1.emitUnknownFieldWarning; } });
|
|
20
|
+
var two_pass_1 = require("./two-pass");
|
|
21
|
+
Object.defineProperty(exports, "runValidation", { enumerable: true, get: function () { return two_pass_1.runValidation; } });
|
|
22
|
+
var id_1 = require("./id");
|
|
23
|
+
Object.defineProperty(exports, "generateId", { enumerable: true, get: function () { return id_1.generateId; } });
|
|
24
|
+
Object.defineProperty(exports, "patternToRegExp", { enumerable: true, get: function () { return id_1.patternToRegExp; } });
|
|
25
|
+
Object.defineProperty(exports, "ID_CHAR_CLASS", { enumerable: true, get: function () { return id_1.ID_CHAR_CLASS; } });
|
|
26
|
+
var yaml_1 = require("./yaml");
|
|
27
|
+
Object.defineProperty(exports, "parseYaml", { enumerable: true, get: function () { return yaml_1.parseYaml; } });
|
|
28
|
+
var secret_scan_1 = require("./secret-scan");
|
|
29
|
+
Object.defineProperty(exports, "SECRET_PATTERNS", { enumerable: true, get: function () { return secret_scan_1.SECRET_PATTERNS; } });
|
|
30
|
+
Object.defineProperty(exports, "SCAN_SURFACE_ROOTS", { enumerable: true, get: function () { return secret_scan_1.SCAN_SURFACE_ROOTS; } });
|
|
31
|
+
Object.defineProperty(exports, "DEFAULT_IGNORE_FILE", { enumerable: true, get: function () { return secret_scan_1.DEFAULT_IGNORE_FILE; } });
|
|
32
|
+
Object.defineProperty(exports, "scanText", { enumerable: true, get: function () { return secret_scan_1.scanText; } });
|
|
33
|
+
Object.defineProperty(exports, "scanProjectSurface", { enumerable: true, get: function () { return secret_scan_1.scanProjectSurface; } });
|
|
34
|
+
Object.defineProperty(exports, "isBinaryContent", { enumerable: true, get: function () { return secret_scan_1.isBinaryContent; } });
|
|
35
|
+
Object.defineProperty(exports, "loadIgnoreGlobs", { enumerable: true, get: function () { return secret_scan_1.loadIgnoreGlobs; } });
|
|
36
|
+
Object.defineProperty(exports, "matchesIgnoreGlob", { enumerable: true, get: function () { return secret_scan_1.matchesIgnoreGlob; } });
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,mCAMkB;AALhB,sGAAA,YAAY,OAAA;AACZ,4GAAA,kBAAkB,OAAA;AAClB,wGAAA,cAAc,OAAA;AACd,yGAAA,eAAe,OAAA;AACf,yGAAA,eAAe,OAAA;AAGjB,+CAAmD;AAA1C,iHAAA,iBAAiB,OAAA;AAC1B,qCAAoD;AAA3C,kHAAA,uBAAuB,OAAA;AAEhC,uCAA2C;AAAlC,yGAAA,aAAa,OAAA;AAEtB,2BAAkE;AAAzD,gGAAA,UAAU,OAAA;AAAE,qGAAA,eAAe,OAAA;AAAE,mGAAA,aAAa,OAAA;AACnD,+BAAmC;AAA1B,iGAAA,SAAS,OAAA;AAClB,6CASuB;AARrB,8GAAA,eAAe,OAAA;AACf,iHAAA,kBAAkB,OAAA;AAClB,kHAAA,mBAAmB,OAAA;AACnB,uGAAA,QAAQ,OAAA;AACR,iHAAA,kBAAkB,OAAA;AAClB,8GAAA,eAAe,OAAA;AACf,8GAAA,eAAe,OAAA;AACf,gHAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/** A finding's severity (spec-007 §2): `block` fails the scan, `warn` is reported only. */
|
|
2
|
+
export type SecretSeverity = 'block' | 'warn';
|
|
3
|
+
/** One canonical secret-hygiene rule (spec-007 §2): `{id, regex, description, severity}`. */
|
|
4
|
+
export interface SecretPattern {
|
|
5
|
+
/** Stable rule name, e.g. `private-key-pem` — also {@link SecretFinding.patternId}. */
|
|
6
|
+
readonly id: string;
|
|
7
|
+
/** Human-readable description of what the pattern targets. */
|
|
8
|
+
readonly description: string;
|
|
9
|
+
/** `block` fails the scan; `warn` is reported for human review only (spec-007 §2). */
|
|
10
|
+
readonly severity: SecretSeverity;
|
|
11
|
+
/** The compiled detection regex (case sensitivity mirrors spec-007's per-pattern `(?i)` marker). */
|
|
12
|
+
readonly regex: RegExp;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The canonical secret-hygiene pattern set (spec-007 §2), in the fixed declaration order every scan
|
|
16
|
+
* must evaluate patterns in (determinism, REQ-SYS-07, spec-007 §4 step 3). Adding, removing, or
|
|
17
|
+
* re-classifying a pattern is a revision to spec-007's §2 table, not a call-site code change.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SECRET_PATTERNS: readonly SecretPattern[];
|
|
20
|
+
/** Why a would-be finding was downgraded to {@link ScanResult.info} instead of failing the scan. */
|
|
21
|
+
export type ExemptReason = 'fenced-example' | 'placeholder-value' | 'ignore-path';
|
|
22
|
+
/** One pattern match (spec-007 §4): `{pattern_id, severity, file, line, column, excerpt}`. */
|
|
23
|
+
export interface SecretFinding {
|
|
24
|
+
/** {@link SecretPattern.id} of the rule that matched. */
|
|
25
|
+
readonly patternId: string;
|
|
26
|
+
/** The matching pattern's severity at declaration time (before any exclusion is applied). */
|
|
27
|
+
readonly severity: SecretSeverity;
|
|
28
|
+
/** Path of the file the finding was found in, as given to the scan call. */
|
|
29
|
+
readonly file: string;
|
|
30
|
+
/** 1-based line number. */
|
|
31
|
+
readonly line: number;
|
|
32
|
+
/** 1-based column of the match start. */
|
|
33
|
+
readonly column: number;
|
|
34
|
+
/** The matched substring. */
|
|
35
|
+
readonly excerpt: string;
|
|
36
|
+
}
|
|
37
|
+
/** A {@link SecretFinding} downgraded by one of spec-007 §3's exclusions — still reported, not failed. */
|
|
38
|
+
export interface ExemptFinding extends SecretFinding {
|
|
39
|
+
/** Which §3 exclusion downgraded this finding. */
|
|
40
|
+
readonly exemptReason: ExemptReason;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The outcome of a scan (spec-007 §4): `blocking.length === 0` is required for a caller to proceed;
|
|
44
|
+
* `warnings` and `info` are always returned for display regardless of outcome (spec-007 §4 step 6).
|
|
45
|
+
*/
|
|
46
|
+
export interface ScanResult {
|
|
47
|
+
/** `block`-severity findings that survived exclusion — fail the scan. */
|
|
48
|
+
readonly blocking: readonly SecretFinding[];
|
|
49
|
+
/** `warn`-severity findings that survived exclusion — reported, do not fail the scan. */
|
|
50
|
+
readonly warnings: readonly SecretFinding[];
|
|
51
|
+
/** Findings downgraded by a spec-007 §3 exclusion — still listed, never fail the scan. */
|
|
52
|
+
readonly info: readonly ExemptFinding[];
|
|
53
|
+
/**
|
|
54
|
+
* How many files' text this result covers — `1` from {@link scanText}, the number of non-binary
|
|
55
|
+
* indexed files actually read from {@link scanProjectSurface} (binaries skipped per spec-007 §1
|
|
56
|
+
* are not counted, because their content was never examined).
|
|
57
|
+
*
|
|
58
|
+
* Without it an empty `blocking` list is ambiguous: a caller — or an assertion — cannot tell
|
|
59
|
+
* "every file was read and all were clean" from "no file was read at all" (a missing surface
|
|
60
|
+
* root, an empty index, a wrong `root`). Callers gating on `blocking.length === 0` should check
|
|
61
|
+
* that this is non-zero before trusting a clean verdict.
|
|
62
|
+
*/
|
|
63
|
+
readonly filesScanned: number;
|
|
64
|
+
}
|
|
65
|
+
/** Options for {@link scanText}. */
|
|
66
|
+
export interface ScanTextOptions {
|
|
67
|
+
/**
|
|
68
|
+
* When `true`, every finding in this file is downgraded to `info` with `exemptReason:
|
|
69
|
+
* 'ignore-path'` (spec-007 §3's `security-ignore` glob exclusion) — the file itself still gets
|
|
70
|
+
* scanned so the exemption is auditable rather than a silent skip.
|
|
71
|
+
*/
|
|
72
|
+
readonly pathIgnored?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Scan one file's already-decoded text content (spec-007 §4): evaluate {@link SECRET_PATTERNS} in
|
|
76
|
+
* declared order against every line, apply the §3 exclusions, and classify each surviving finding by
|
|
77
|
+
* severity. This is the seam a future commit-time gate or `task-044`'s `init` integrity check calls
|
|
78
|
+
* per file-about-to-be-written/committed (spec-007 §4 step 5).
|
|
79
|
+
*/
|
|
80
|
+
export declare function scanText(content: string, filePath: string, options?: ScanTextOptions): ScanResult;
|
|
81
|
+
/** Null-byte sniff on the first 8KB (spec-007 §1) — binary files are out of scan scope. */
|
|
82
|
+
export declare function isBinaryContent(buf: Buffer): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Default scan-surface roots (spec-007 §1): `.wingfoil/` once `init` exists, plus the current
|
|
85
|
+
* self-hosted analog (`docs/self/.wingfoil/`, `docs/self/docs/04_memory/`) "applied by analogy until
|
|
86
|
+
* the tool-managed root exists". A root with no indexed files contributes nothing, so
|
|
87
|
+
* {@link scanProjectSurface} is safe to call before `init` has ever run.
|
|
88
|
+
*/
|
|
89
|
+
export declare const SCAN_SURFACE_ROOTS: readonly [".wingfoil", "docs/self/.wingfoil", "docs/self/docs/04_memory"];
|
|
90
|
+
/** Default path (root-relative) of the `security-ignore` glob list (spec-007 §3). */
|
|
91
|
+
export declare const DEFAULT_IGNORE_FILE = ".wingfoil/security-ignore";
|
|
92
|
+
/**
|
|
93
|
+
* Parse a `security-ignore` file (spec-007 §3): one glob per line, git-attribute-style — blank lines
|
|
94
|
+
* and lines starting with `#` are ignored. Returns `[]` when `ignoreFilePath` does not exist (no
|
|
95
|
+
* ignore list configured is not an error).
|
|
96
|
+
*/
|
|
97
|
+
export declare function loadIgnoreGlobs(ignoreFilePath: string): string[];
|
|
98
|
+
/** True when root-relative `filePath` matches any glob in `globs` (spec-007 §3 ignore-path exclusion). */
|
|
99
|
+
export declare function matchesIgnoreGlob(filePath: string, globs: readonly string[]): boolean;
|
|
100
|
+
/** Options for {@link scanProjectSurface}. */
|
|
101
|
+
export interface ScanProjectOptions {
|
|
102
|
+
/** Override the default scan-surface roots ({@link SCAN_SURFACE_ROOTS}). */
|
|
103
|
+
readonly surfaceRoots?: readonly string[];
|
|
104
|
+
/** Root-relative path to the `security-ignore` glob list (default {@link DEFAULT_IGNORE_FILE}). */
|
|
105
|
+
readonly ignoreFilePath?: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Run the full scan procedure (spec-007 §4) over `root`'s tracked/staged content under the scan
|
|
109
|
+
* surface (§1): list the indexed blobs via `git ls-files -s`, read them from the object store, skip
|
|
110
|
+
* binaries (§1), apply the `security-ignore` list (§3) as a per-file `pathIgnored` flag, and scan every
|
|
111
|
+
* remaining file's text with {@link scanText}.
|
|
112
|
+
*
|
|
113
|
+
* **Contract — the git index, not the working tree (`bug-015`).** Both the file list and the content
|
|
114
|
+
* come from the index: the scan judges exactly what the next commit would contain, which is what the
|
|
115
|
+
* pre-commit / pre-publish gate of spec-007 §4 step 5 must judge. So a file deleted on disk but still
|
|
116
|
+
* indexed is scanned from its staged blob; a staged deletion is not listed; an unstaged edit — clean or
|
|
117
|
+
* leaky — is not seen until it is staged. (Before `bug-015` the list came from the index but the bytes
|
|
118
|
+
* from disk, so an unstaged deletion threw `ENOENT` and took the whole scan down.) The
|
|
119
|
+
* `security-ignore` file itself is read from disk: it configures the scan, it is not scanned content.
|
|
120
|
+
* `root` must be a git work tree.
|
|
121
|
+
*
|
|
122
|
+
* This is the concrete entry point the REQ-SEC-08 Fit Criterion ("a scan of committed `.wingfoil/`
|
|
123
|
+
* content matches 0 known secret patterns") is checkable against: `scanProjectSurface(root).blocking`
|
|
124
|
+
* must be empty for a hygienic project. Pair that with {@link ScanResult.filesScanned} — an empty
|
|
125
|
+
* `blocking` list only means "clean" once it is known that files were actually read; `filesScanned`
|
|
126
|
+
* is `0` when no surface root exists or the index is empty under it.
|
|
127
|
+
*/
|
|
128
|
+
export declare function scanProjectSurface(root: string, options?: ScanProjectOptions): ScanResult;
|
|
129
|
+
//# sourceMappingURL=secret-scan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-scan.d.ts","sourceRoot":"","sources":["../../src/validation/secret-scan.ts"],"names":[],"mappings":"AAmBA,2FAA2F;AAC3F,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C,6FAA6F;AAC7F,MAAM,WAAW,aAAa;IAC5B,uFAAuF;IACvF,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,sFAAsF;IACtF,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,oGAAoG;IACpG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EA8EnD,CAAC;AAEF,oGAAoG;AACpG,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,aAAa,CAAC;AAElF,8FAA8F;AAC9F,MAAM,WAAW,aAAa;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,6FAA6F;IAC7F,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,2BAA2B;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6BAA6B;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,0GAA0G;AAC1G,MAA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