@dzhechkov/harness-cli 0.3.231 → 0.3.233

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dzhechkov/harness-cli",
3
- "version": "0.3.231",
3
+ "version": "0.3.233",
4
4
  "description": "The dz CLI — install AI skills for Claude Code, Codex, OpenCode, Hermes, OpenClaude, GitHub Copilot. 35 commands, 13 presets, 6 platform targets.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,7 +36,9 @@
36
36
  "dist",
37
37
  "src",
38
38
  "README.md",
39
- "keys"
39
+ "keys",
40
+ ".dz-manifest.json",
41
+ "sbom.json"
40
42
  ],
41
43
  "dependencies": {
42
44
  "@dzhechkov/harness-presets": "^0.5.0",
@@ -55,7 +57,7 @@
55
57
  "@dzhechkov/skills-reverse-engineering": "^0.1.0",
56
58
  "@dzhechkov/skills-presentation-storyteller": "^0.1.0",
57
59
  "@dzhechkov/skills-website-cloner": "^0.1.0",
58
- "@dzhechkov/harness-core": "0.3.123"
60
+ "@dzhechkov/harness-core": "0.3.125"
59
61
  },
60
62
  "devDependencies": {
61
63
  "@types/node": "^25.6.0",
package/sbom.json ADDED
@@ -0,0 +1,333 @@
1
+ {
2
+ "bomFormat": "CycloneDX",
3
+ "specVersion": "1.5",
4
+ "version": 1,
5
+ "metadata": {
6
+ "component": {
7
+ "type": "library",
8
+ "name": "harness-cli"
9
+ }
10
+ },
11
+ "components": [
12
+ {
13
+ "type": "file",
14
+ "name": ".agentic-qe/brain.rvf",
15
+ "hashes": [
16
+ {
17
+ "alg": "SHA-256",
18
+ "content": "8136cd4cc145d3dbe6ed3ae4489946bbc26e3e44172f0e5241ac45dde38bfead"
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "type": "file",
24
+ "name": ".agentic-qe/brain.rvf.lock",
25
+ "hashes": [
26
+ {
27
+ "alg": "SHA-256",
28
+ "content": "028658845c4fc1e9bd9487b575be0aee727d477fa9ad1b08c26299ce61f622c3"
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "type": "file",
34
+ "name": ".agentic-qe/memory.db",
35
+ "hashes": [
36
+ {
37
+ "alg": "SHA-256",
38
+ "content": "456372cb9a8c12f98ae6378338b8469d9be6df05cbe03a99b412d83d962b3d11"
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "type": "file",
44
+ "name": ".agentic-qe/memory.db-shm",
45
+ "hashes": [
46
+ {
47
+ "alg": "SHA-256",
48
+ "content": "23ae1f330a8fad23eabe444e89dc9d4588297cc1abca5929356eb6fec9f5079d"
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "type": "file",
54
+ "name": ".agentic-qe/memory.db-wal",
55
+ "hashes": [
56
+ {
57
+ "alg": "SHA-256",
58
+ "content": "2eade3dbce1a9fd33a0775269af13fe97c62fdf1dbf44a8569ba0e7341315433"
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "type": "file",
64
+ "name": ".agentic-qe/patterns.rvf",
65
+ "hashes": [
66
+ {
67
+ "alg": "SHA-256",
68
+ "content": "9090b2e6d339eaa183672ac0cf9f625dbd5f9fc76d64afcdb34a3f5871c31c5a"
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "type": "file",
74
+ "name": ".agentic-qe/patterns.rvf.idmap.json",
75
+ "hashes": [
76
+ {
77
+ "alg": "SHA-256",
78
+ "content": "c2693f9a7f47a2d2bffe3004188e70ce08411bf8db47d07c60551d18ff7640c4"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "type": "file",
84
+ "name": ".agentic-qe/patterns.rvf.lock",
85
+ "hashes": [
86
+ {
87
+ "alg": "SHA-256",
88
+ "content": "b28a956544f4358d57df98fc6c8df0b8f5d5cd8e8b102cee80ed3aabdf0a112b"
89
+ }
90
+ ]
91
+ },
92
+ {
93
+ "type": "file",
94
+ "name": "CHANGELOG.md",
95
+ "hashes": [
96
+ {
97
+ "alg": "SHA-256",
98
+ "content": "9555ead768fef7963e735b0c6af21a64412811531534108be3df61bc65b51021"
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ "type": "file",
104
+ "name": "README.md",
105
+ "hashes": [
106
+ {
107
+ "alg": "SHA-256",
108
+ "content": "406be5cb9294367793daed191b2418bb99669186c8ead8a3a3f994f0db36e1b6"
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "type": "file",
114
+ "name": "coverage/coverage-final.json",
115
+ "hashes": [
116
+ {
117
+ "alg": "SHA-256",
118
+ "content": "1abb00d07ab57ad413d2747baa6a68cda0876a9e0c6f75db89c205fbf4863530"
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "type": "file",
124
+ "name": "coverage/coverage-summary.json",
125
+ "hashes": [
126
+ {
127
+ "alg": "SHA-256",
128
+ "content": "42d2a98f54c2ec773b49a0a43c959a78d070c8c427724f4affbd5bafef35621d"
129
+ }
130
+ ]
131
+ },
132
+ {
133
+ "type": "file",
134
+ "name": "dist/bin.d.ts",
135
+ "hashes": [
136
+ {
137
+ "alg": "SHA-256",
138
+ "content": "58be9f04d2fe63cca2efe3957b9933068e443a0e57f9838ff9ef800cc191e03f"
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ "type": "file",
144
+ "name": "dist/bin.d.ts.map",
145
+ "hashes": [
146
+ {
147
+ "alg": "SHA-256",
148
+ "content": "b1e41c8c19fa56ae9dec2267740eb4389bc785431478861a8843867f99c1b25b"
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "type": "file",
154
+ "name": "dist/bin.js",
155
+ "hashes": [
156
+ {
157
+ "alg": "SHA-256",
158
+ "content": "ad24e06de21b036e2b5a43abc4efd6e7ceb2ae126177b218a3ee13a026641f83"
159
+ }
160
+ ]
161
+ },
162
+ {
163
+ "type": "file",
164
+ "name": "dist/bin.js.map",
165
+ "hashes": [
166
+ {
167
+ "alg": "SHA-256",
168
+ "content": "c2dd399fec3f26e48e23971b29e27c508c1a1f96376a193e72dc8042015c8e65"
169
+ }
170
+ ]
171
+ },
172
+ {
173
+ "type": "file",
174
+ "name": "dist/cli.d.ts",
175
+ "hashes": [
176
+ {
177
+ "alg": "SHA-256",
178
+ "content": "d304769099f8a7f79ba6c295e0348c2aa211527b050dbfff597f7e87c2b80505"
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "type": "file",
184
+ "name": "dist/cli.d.ts.map",
185
+ "hashes": [
186
+ {
187
+ "alg": "SHA-256",
188
+ "content": "680727bef753625ed99fd9d79ab846c9024608ef0f88d19ee2c8aec25eccf130"
189
+ }
190
+ ]
191
+ },
192
+ {
193
+ "type": "file",
194
+ "name": "dist/cli.js",
195
+ "hashes": [
196
+ {
197
+ "alg": "SHA-256",
198
+ "content": "672bc2fd640d9a92b5af7bfe2880843a770bfedd610f679ae022892fa7c8e66c"
199
+ }
200
+ ]
201
+ },
202
+ {
203
+ "type": "file",
204
+ "name": "dist/cli.js.map",
205
+ "hashes": [
206
+ {
207
+ "alg": "SHA-256",
208
+ "content": "08ec7cf51a49ec818b789cbb6f32b8fc71756e498c99d8756212d16329a8b147"
209
+ }
210
+ ]
211
+ },
212
+ {
213
+ "type": "file",
214
+ "name": "dist/index.d.ts",
215
+ "hashes": [
216
+ {
217
+ "alg": "SHA-256",
218
+ "content": "c1ddc3aa44ca13264d54a72ad8376d8321de06ab48262eb2a6c8d5023c011bb6"
219
+ }
220
+ ]
221
+ },
222
+ {
223
+ "type": "file",
224
+ "name": "dist/index.d.ts.map",
225
+ "hashes": [
226
+ {
227
+ "alg": "SHA-256",
228
+ "content": "a8697ddfabf35947e17a255fce26dfee141f2184f6789c32ba1de75dcd80e36c"
229
+ }
230
+ ]
231
+ },
232
+ {
233
+ "type": "file",
234
+ "name": "dist/index.js",
235
+ "hashes": [
236
+ {
237
+ "alg": "SHA-256",
238
+ "content": "15ff1e6b84537b91b73b6a7e2d1c45f1120b25af9d1139df8da8ad094e99cf0e"
239
+ }
240
+ ]
241
+ },
242
+ {
243
+ "type": "file",
244
+ "name": "dist/index.js.map",
245
+ "hashes": [
246
+ {
247
+ "alg": "SHA-256",
248
+ "content": "2f61a3be1af4ab9f7bbcbacb912ccbd89e3b73414f9fd24766598bfbdc1f8655"
249
+ }
250
+ ]
251
+ },
252
+ {
253
+ "type": "file",
254
+ "name": "keys/README.md",
255
+ "hashes": [
256
+ {
257
+ "alg": "SHA-256",
258
+ "content": "204deec657a7f147bf3016441082c2f868f6f11051776f4edc13ec6b44745192"
259
+ }
260
+ ]
261
+ },
262
+ {
263
+ "type": "file",
264
+ "name": "package.json",
265
+ "hashes": [
266
+ {
267
+ "alg": "SHA-256",
268
+ "content": "b48c494a4d4e2126e033c2d0019e463b9ad6cd3bae7a2aa0da296eba1ab66fcf"
269
+ }
270
+ ]
271
+ },
272
+ {
273
+ "type": "file",
274
+ "name": "src/bin.ts",
275
+ "hashes": [
276
+ {
277
+ "alg": "SHA-256",
278
+ "content": "a0d4e20fafc5cba35816f1f0c6cd03d9ce7c4434d2ca049384491079d2408fd4"
279
+ }
280
+ ]
281
+ },
282
+ {
283
+ "type": "file",
284
+ "name": "src/cli.ts",
285
+ "hashes": [
286
+ {
287
+ "alg": "SHA-256",
288
+ "content": "14ca947c27f366c1377c129b3def86cdd4577536249e44f0009f31884fff9018"
289
+ }
290
+ ]
291
+ },
292
+ {
293
+ "type": "file",
294
+ "name": "src/index.ts",
295
+ "hashes": [
296
+ {
297
+ "alg": "SHA-256",
298
+ "content": "f0aea91d07867603d177da6029f97851ced0b91b62e9db5d0bab5b464f794a91"
299
+ }
300
+ ]
301
+ },
302
+ {
303
+ "type": "file",
304
+ "name": "test/cli.test.ts",
305
+ "hashes": [
306
+ {
307
+ "alg": "SHA-256",
308
+ "content": "d9374e1cc23923c2d5c4cca1e228f31e2c3465f187d1c84cf3f50ad947401537"
309
+ }
310
+ ]
311
+ },
312
+ {
313
+ "type": "file",
314
+ "name": "tsconfig.json",
315
+ "hashes": [
316
+ {
317
+ "alg": "SHA-256",
318
+ "content": "e80ef2911c3347a713dc3dca6a5f6034d91e938e58e71345ea920dd9833bcdbb"
319
+ }
320
+ ]
321
+ },
322
+ {
323
+ "type": "file",
324
+ "name": "vitest.config.ts",
325
+ "hashes": [
326
+ {
327
+ "alg": "SHA-256",
328
+ "content": "a6ffc6172b50a3a59010f8f8c66e2204e7d298b62a7f2bc5de33cbf39c99899d"
329
+ }
330
+ ]
331
+ }
332
+ ]
333
+ }
package/src/cli.ts CHANGED
@@ -111,6 +111,7 @@ import {
111
111
  isInsideTree,
112
112
  signManifest,
113
113
  verifyManifest,
114
+ listSignablePackFiles,
114
115
  assertKeyOutsideTree,
115
116
  decidePublishGate,
116
117
  MANIFEST_NAME,
@@ -3092,21 +3093,9 @@ async function cmdAutoCanonicalize(options: Map<string, string>, cwd: string, wr
3092
3093
  /** The pinned trust root. A key inside the artifact under verification is data, not a key (ADR-001). */
3093
3094
  const TRUST_ROOT_REL = 'keys/dz.pub';
3094
3095
 
3095
- function packFiles(dir: string): string[] {
3096
- const out: string[] = [];
3097
- const walk = (d: string, rel: string): void => {
3098
- for (const e of readdirSync(d, { withFileTypes: true })) {
3099
- if (e.name === 'node_modules' || e.name === '.git') continue;
3100
- if (e.name === MANIFEST_NAME || e.name === SBOM_NAME) continue;
3101
- const abs = join(d, e.name);
3102
- const r = rel ? rel + '/' + e.name : e.name;
3103
- if (e.isDirectory()) walk(abs, r);
3104
- else if (e.isFile()) out.push(r);
3105
- }
3106
- };
3107
- walk(dir, '');
3108
- return out.sort();
3109
- }
3096
+ // One walk to rule both: the SIGN file list is core's listPackFiles — the SAME function verify uses for
3097
+ // its added-file sweep, so the two can never drift apart again (the 10-false-TAMPERED lesson, task #36).
3098
+ const packFiles = (dir: string): string[] => listSignablePackFiles(dir);
3110
3099
 
3111
3100
 
3112
3101
  /**
@@ -4782,10 +4771,21 @@ async function cmdRetro(options: Map<string, string>, flags: Set<string>, cwd: s
4782
4771
  */
4783
4772
  function cmdFeatureAdrSetup(options: Map<string, string>, flags: Set<string>, cwd: string, write: Write): number {
4784
4773
  let repoRoot = cwd;
4785
- try { repoRoot = execSync('git rev-parse --show-toplevel', { cwd, encoding: 'utf-8' }).trim() || cwd; } catch { /* not git */ }
4774
+ try { repoRoot = execSync('git rev-parse --show-toplevel', { cwd, encoding: 'utf-8', stdio: ['ignore', 'pipe', 'ignore'] }).trim() || cwd; } catch { /* not git */ }
4775
+
4776
+ // P3 (fa-improvements): --guards scaffolds the deterministic guard set (guards.config.json + the
4777
+ // zero-dependency check.mjs runner) — usable standalone (`dz feature-adr-setup --guards --apply`) or
4778
+ // together with --from-spec. --loc-cap <n> tunes the LOC cap (default 700).
4779
+ const wantGuards = flags.has('guards');
4780
+ const locCapRaw = options.get('loc-cap');
4781
+ const locCap = locCapRaw !== undefined ? Number(locCapRaw) : undefined;
4782
+ if (locCapRaw !== undefined && (!Number.isFinite(locCap) || (locCap as number) <= 0)) {
4783
+ write('dz feature-adr-setup: --loc-cap must be a positive finite number');
4784
+ return 1;
4785
+ }
4786
4786
 
4787
4787
  const specPath = options.get('from-spec');
4788
- if (specPath === undefined) {
4788
+ if (specPath === undefined && !wantGuards) {
4789
4789
  // default + --plan: the read-only "which documents, and where?" answer.
4790
4790
  const plan = buildSetupPlan(scanForSetup(repoRoot));
4791
4791
  if (flags.has('json')) { write(JSON.stringify(plan, null, 2)); return 0; }
@@ -4798,10 +4798,15 @@ function cmdFeatureAdrSetup(options: Map<string, string>, flags: Set<string>, cw
4798
4798
  return 0;
4799
4799
  }
4800
4800
 
4801
- // --from-spec: scaffold (preview, or --apply to write).
4801
+ // --from-spec and/or --guards: scaffold (preview, or --apply to write).
4802
4802
  let spec: SetupSpec;
4803
- try { spec = JSON.parse(readFileSync(resolve(cwd, specPath), 'utf-8')) as SetupSpec; }
4804
- catch (e) { write(`dz feature-adr-setup: cannot read spec ${specPath}: ${e instanceof Error ? e.message : String(e)}`); return 1; }
4803
+ if (specPath !== undefined) {
4804
+ try { spec = JSON.parse(readFileSync(resolve(cwd, specPath), 'utf-8')) as SetupSpec; }
4805
+ catch (e) { write(`dz feature-adr-setup: cannot read spec ${specPath}: ${e instanceof Error ? e.message : String(e)}`); return 1; }
4806
+ } else {
4807
+ spec = {}; // --guards standalone: scaffold just the guard set
4808
+ }
4809
+ if (wantGuards) spec = { ...spec, guards: locCap !== undefined ? { locCap } : true };
4805
4810
 
4806
4811
  const result = scaffoldFromSpec(spec, readExistingForScaffold(repoRoot));
4807
4812
  if (flags.has('json') && !flags.has('apply')) { write(JSON.stringify(result, null, 2)); return 0; }