wicked-vault 0.3.0 → 0.3.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/README.md +1 -1
- package/bin/wicked-vault.mjs +27 -2
- package/package.json +1 -1
- package/skills/wicked-vault/init/SKILL.md +8 -4
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ binaries support `--help`.
|
|
|
68
68
|
## CLI
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
wicked-vault init
|
|
71
|
+
wicked-vault init # optional — record / declare-contract / supersede create .wicked-vault/ automatically
|
|
72
72
|
# record: --criteria is MANDATORY (the bar this evidence claims to clear); --verifier is optional
|
|
73
73
|
wicked-vault record --scope S --phase build --claim tests-pass --kind test-run \
|
|
74
74
|
--source "npm test" --criteria "all unit tests pass (exit 0)" \
|
package/bin/wicked-vault.mjs
CHANGED
|
@@ -42,7 +42,8 @@ USAGE
|
|
|
42
42
|
wicked-vault <command> [options]
|
|
43
43
|
|
|
44
44
|
COMMANDS
|
|
45
|
-
init Create .wicked-vault/ in the current repo
|
|
45
|
+
init Create .wicked-vault/ in the current repo (optional —
|
|
46
|
+
record / declare-contract / supersede auto-create it)
|
|
46
47
|
record Capture evidence + the criteria it must clear
|
|
47
48
|
--scope S --phase P --claim C --kind K --source "<cmd|file>"
|
|
48
49
|
--criteria "<text|@file>" (--run | --artifact <file>) [--verifier "kind:arg"]
|
|
@@ -62,6 +63,7 @@ COMMANDS
|
|
|
62
63
|
GLOBAL
|
|
63
64
|
--cwd <dir> Operate on a vault rooted at <dir> (default: walk up from cwd)
|
|
64
65
|
--help, -h Show this help
|
|
66
|
+
--version, -v Print the wicked-vault version
|
|
65
67
|
|
|
66
68
|
OUTPUT JSON on stdout; exit code is the gate signal (0 = PASS / success).
|
|
67
69
|
ENV WICKED_VAULT_NO_BUS=1 Disable optional wicked-bus event emission
|
|
@@ -80,6 +82,14 @@ if (cmd === undefined || cmd === '--help' || cmd === '-h' || cmd === 'help') {
|
|
|
80
82
|
process.exit(0);
|
|
81
83
|
}
|
|
82
84
|
|
|
85
|
+
// Version: like --help, must work outside any repo — resolved from this
|
|
86
|
+
// package's own manifest, never from a vault.
|
|
87
|
+
if (cmd === '--version' || cmd === '-v' || cmd === 'version') {
|
|
88
|
+
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
|
|
89
|
+
process.stdout.write(pkg.version + '\n');
|
|
90
|
+
process.exit(0);
|
|
91
|
+
}
|
|
92
|
+
|
|
83
93
|
const args = parseArgs(rest);
|
|
84
94
|
const cwd = (typeof args.cwd === 'string' && args.cwd) || process.cwd();
|
|
85
95
|
|
|
@@ -94,7 +104,22 @@ try {
|
|
|
94
104
|
}
|
|
95
105
|
|
|
96
106
|
const root = findRoot(cwd, { create: cmd === 'record' || cmd === 'declare-contract' || cmd === 'supersede' });
|
|
97
|
-
if (!root)
|
|
107
|
+
if (!root) {
|
|
108
|
+
// "What evidence exists?" in a repo with no vault is a question with a
|
|
109
|
+
// truthful answer — none — not an infrastructure error.
|
|
110
|
+
if (cmd === 'list') emit([], true);
|
|
111
|
+
const notFound = {
|
|
112
|
+
error: `no .wicked-vault/ found in or above ${cwd}`,
|
|
113
|
+
code: 'VAULT_NOT_FOUND',
|
|
114
|
+
hint: 'no evidence has been recorded here — `wicked-vault record` creates the vault automatically; `wicked-vault init` is optional scaffolding',
|
|
115
|
+
};
|
|
116
|
+
// Gate consumers (wicked-loom) read `overall` from cross-check JSON:
|
|
117
|
+
// report a truthful FAIL (no evidence exists) instead of a generic error.
|
|
118
|
+
if (cmd === 'cross-check') {
|
|
119
|
+
emit({ scope: args.scope, phase: args.phase, overall: 'FAIL', ...notFound }, false);
|
|
120
|
+
}
|
|
121
|
+
emit(notFound, false);
|
|
122
|
+
}
|
|
98
123
|
|
|
99
124
|
switch (cmd) {
|
|
100
125
|
case 'record': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-vault",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Local-first evidence primitive — record evidence with its acceptance criteria, re-derive integrity deterministically, and record independent third-party judgments. Never trusts a stored verdict, never lets work self-grade its own \"done\".",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wicked-vault:init
|
|
3
|
-
description: Initialize a wicked-vault in a repository so claims can be backed by re-derivable evidence.
|
|
3
|
+
description: Initialize a wicked-vault in a repository so claims can be backed by re-derivable evidence. OPTIONAL ceremony — record/declare-contract/supersede create the vault automatically; use init only to scaffold explicitly. A read command reporting code VAULT_NOT_FOUND means no evidence exists yet, which record (not init) fixes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# wicked-vault:init
|
|
@@ -11,9 +11,13 @@ vault records claim-backing artifacts, hashes them tamper-evidently, and
|
|
|
11
11
|
|
|
12
12
|
## When to use
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
-
|
|
14
|
+
- You want the `.wicked-vault/` scaffold to exist before any evidence is
|
|
15
|
+
recorded (e.g. committing the directory layout, pre-provisioning CI).
|
|
16
|
+
- Otherwise init is **optional**: `record`, `declare-contract`, and
|
|
17
|
+
`supersede` create the vault automatically on first use.
|
|
18
|
+
- A read command failing with `code: VAULT_NOT_FOUND` means no evidence has
|
|
19
|
+
been recorded in that repo — recording evidence fixes it; bare init alone
|
|
20
|
+
does not produce evidence.
|
|
17
21
|
|
|
18
22
|
## Initialize
|
|
19
23
|
|