@shrkcrft/cli 0.1.0-alpha.16 → 0.1.0-alpha.17
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/dist/command-registry.d.ts +18 -0
- package/dist/command-registry.d.ts.map +1 -1
- package/dist/command-registry.js +84 -0
- package/dist/commands/apply.command.d.ts.map +1 -1
- package/dist/commands/apply.command.js +10 -2
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +2 -0
- package/dist/commands/compress.command.d.ts.map +1 -1
- package/dist/commands/compress.command.js +28 -13
- package/dist/commands/deps-audit.command.js +4 -0
- package/dist/commands/dev.command.d.ts.map +1 -1
- package/dist/commands/dev.command.js +5 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +18 -2
- package/dist/output/ccr-store-config.d.ts +18 -0
- package/dist/output/ccr-store-config.d.ts.map +1 -0
- package/dist/output/ccr-store-config.js +22 -0
- package/dist/output/output-compression.d.ts +15 -0
- package/dist/output/output-compression.d.ts.map +1 -0
- package/dist/output/output-compression.js +60 -0
- package/dist/output/resolve-compress-type.d.ts +22 -0
- package/dist/output/resolve-compress-type.d.ts.map +1 -0
- package/dist/output/resolve-compress-type.js +21 -0
- package/dist/validation/run-validation-loop.d.ts.map +1 -1
- package/dist/validation/run-validation-loop.js +5 -1
- package/package.json +33 -33
|
@@ -111,6 +111,24 @@ export declare function extractGlobalCwd(argv: readonly string[]): {
|
|
|
111
111
|
cwd?: string;
|
|
112
112
|
rest: string[];
|
|
113
113
|
};
|
|
114
|
+
/** A request to compress a command's stdout, parsed from the global flags. */
|
|
115
|
+
export interface IGlobalCompressDirective {
|
|
116
|
+
/** Force a content type for the compressor (else auto-detect). */
|
|
117
|
+
type?: string;
|
|
118
|
+
/** Query text that biases which lines/matches the compressor keeps. */
|
|
119
|
+
query?: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Extracts the global output-compression flags from anywhere in argv:
|
|
123
|
+
* `--compress` / `--ccr` (synonyms; turn it on) plus optional
|
|
124
|
+
* `--compress-type <t>` and `--compress-query <q>`. Returns the directive (when
|
|
125
|
+
* any was present) and the remaining argv with those flags removed — so the
|
|
126
|
+
* underlying command can be re-run cleanly without them (and never recurses).
|
|
127
|
+
*/
|
|
128
|
+
export declare function extractGlobalCompress(argv: readonly string[]): {
|
|
129
|
+
directive?: IGlobalCompressDirective;
|
|
130
|
+
rest: string[];
|
|
131
|
+
};
|
|
114
132
|
/**
|
|
115
133
|
* Returns the absolute cwd for the current command:
|
|
116
134
|
* 1. Command-level --cwd flag (if passed after the command)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-registry.d.ts","sourceRoot":"","sources":["../src/command-registry.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;IACrC,0EAA0E;IAC1E,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;CACjD;AAED;;;;;GAKG;AACH,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACjD,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAMD,mDAAmD;AACnD,MAAM,WAAW,kBAAkB;IACjC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AAE,SAAS,MAAM,EAAE,CAAC;IAC1B;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;CACrC;AAED,wBAAgB,QAAQ,CACtB,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,gBAAqB,GAC7B,MAAM,EAAE,CAkCV;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQjE"}
|
package/dist/command-registry.js
CHANGED
|
@@ -256,6 +256,13 @@ export function extractGlobalCwd(argv) {
|
|
|
256
256
|
let cwd;
|
|
257
257
|
for (let i = 0; i < argv.length; i += 1) {
|
|
258
258
|
const t = argv[i];
|
|
259
|
+
// Honor the POSIX `--` end-of-options separator (as parseArgs does):
|
|
260
|
+
// everything after it is a literal positional, so a `--cwd` there must not
|
|
261
|
+
// be intercepted. Preserve `--` and the remainder verbatim.
|
|
262
|
+
if (t === '--') {
|
|
263
|
+
rest.push(...argv.slice(i));
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
259
266
|
if (t === '--cwd') {
|
|
260
267
|
const next = argv[i + 1];
|
|
261
268
|
if (next !== undefined && !next.startsWith('-')) {
|
|
@@ -277,6 +284,83 @@ export function extractGlobalCwd(argv) {
|
|
|
277
284
|
cwd = nodePath.resolve(process.cwd(), cwd);
|
|
278
285
|
return cwd === undefined ? { rest } : { cwd, rest };
|
|
279
286
|
}
|
|
287
|
+
/**
|
|
288
|
+
* Extracts the global output-compression flags from anywhere in argv:
|
|
289
|
+
* `--compress` / `--ccr` (synonyms; turn it on) plus optional
|
|
290
|
+
* `--compress-type <t>` and `--compress-query <q>`. Returns the directive (when
|
|
291
|
+
* any was present) and the remaining argv with those flags removed — so the
|
|
292
|
+
* underlying command can be re-run cleanly without them (and never recurses).
|
|
293
|
+
*/
|
|
294
|
+
export function extractGlobalCompress(argv) {
|
|
295
|
+
const rest = [];
|
|
296
|
+
let active = false;
|
|
297
|
+
let type;
|
|
298
|
+
let query;
|
|
299
|
+
const valued = (token, flag, set, i) => {
|
|
300
|
+
if (token === flag) {
|
|
301
|
+
const next = argv[i + 1];
|
|
302
|
+
if (next !== undefined && !next.startsWith('-')) {
|
|
303
|
+
set(next);
|
|
304
|
+
return true; // caller skips next
|
|
305
|
+
}
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
return false;
|
|
309
|
+
};
|
|
310
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
311
|
+
const t = argv[i];
|
|
312
|
+
// Honor the POSIX `--` end-of-options separator exactly as parseArgs does:
|
|
313
|
+
// everything after it is a literal positional, so a compress-flag-shaped
|
|
314
|
+
// token there must NOT be intercepted (and the next token must not be
|
|
315
|
+
// swallowed as a value). Preserve `--` and the remainder verbatim for the
|
|
316
|
+
// child to re-parse.
|
|
317
|
+
if (t === '--') {
|
|
318
|
+
rest.push(...argv.slice(i));
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
if (t === '--compress' || t === '--ccr') {
|
|
322
|
+
active = true;
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
if (t.startsWith('--compress-type=')) {
|
|
326
|
+
type = t.slice('--compress-type='.length);
|
|
327
|
+
active = true;
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
if (t.startsWith('--compress-query=')) {
|
|
331
|
+
query = t.slice('--compress-query='.length);
|
|
332
|
+
active = true;
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
if (t === '--compress-type') {
|
|
336
|
+
if (valued(t, '--compress-type', (v) => (type = v), i)) {
|
|
337
|
+
active = true;
|
|
338
|
+
i += 1;
|
|
339
|
+
continue;
|
|
340
|
+
}
|
|
341
|
+
active = true;
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
if (t === '--compress-query') {
|
|
345
|
+
if (valued(t, '--compress-query', (v) => (query = v), i)) {
|
|
346
|
+
active = true;
|
|
347
|
+
i += 1;
|
|
348
|
+
continue;
|
|
349
|
+
}
|
|
350
|
+
active = true;
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
rest.push(t);
|
|
354
|
+
}
|
|
355
|
+
if (!active)
|
|
356
|
+
return { rest };
|
|
357
|
+
const directive = {};
|
|
358
|
+
if (type !== undefined)
|
|
359
|
+
directive.type = type;
|
|
360
|
+
if (query !== undefined)
|
|
361
|
+
directive.query = query;
|
|
362
|
+
return { directive, rest };
|
|
363
|
+
}
|
|
280
364
|
/**
|
|
281
365
|
* Returns the absolute cwd for the current command:
|
|
282
366
|
* 1. Command-level --cwd flag (if passed after the command)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.command.d.ts","sourceRoot":"","sources":["../../src/commands/apply.command.ts"],"names":[],"mappings":"AAqDA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAyLhC,eAAO,MAAM,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"apply.command.d.ts","sourceRoot":"","sources":["../../src/commands/apply.command.ts"],"names":[],"mappings":"AAqDA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAyLhC,eAAO,MAAM,YAAY,EAAE,eAisB1B,CAAC"}
|
|
@@ -179,7 +179,7 @@ async function runApplyBatchFromCli(args, batchPath) {
|
|
|
179
179
|
export const applyCommand = {
|
|
180
180
|
name: 'apply',
|
|
181
181
|
description: 'Apply a previously-saved generation plan (sharkcraft.plan/v1 JSON). The CLI is the only write path; MCP never writes. Plans that live under .sharkcraft/sessions/<id>/plans/ automatically update the session metadata (signature + divergence + applied + validation).',
|
|
182
|
-
usage: 'shrk [--cwd <dir>] apply <plan.json> [--session <id>] [--force] [--allow-divergent] [--verify-signature] [--require-signature] [--dry-run] [--validate] [--report] [--json] [--trace] [--explain-dispatch] | shrk apply --asset-preview <draft.ts> --target <file> [--write] [--allow-unknown-target] [--reason <text>] | shrk apply --batch <plan.json> [--allow-divergent] [--dry-run] [--json]',
|
|
182
|
+
usage: 'shrk [--cwd <dir>] apply <plan.json> [--session <id>] [--force] [--allow-divergent] [--verify-signature] [--require-signature] [--no-verify-signature] [--dry-run] [--validate] [--report] [--json] [--trace] [--explain-dispatch] | shrk apply --asset-preview <draft.ts> --target <file> [--write] [--allow-unknown-target] [--reason <text>] | shrk apply --batch <plan.json> [--allow-divergent] [--dry-run] [--json]',
|
|
183
183
|
async run(args) {
|
|
184
184
|
// Asset-preview flow: paste-with-review for authoring drafts.
|
|
185
185
|
// Distinct from the plan-based apply path: takes a TS draft and a
|
|
@@ -222,7 +222,15 @@ export const applyCommand = {
|
|
|
222
222
|
const explainOnly = flagBool(args, 'explain-dispatch');
|
|
223
223
|
let signatureStatus = DevSessionSignatureStatus.NotChecked;
|
|
224
224
|
let signatureMessage;
|
|
225
|
-
|
|
225
|
+
// A plan that CARRIES a signature self-enforces verification: the signature
|
|
226
|
+
// is the producer's tamper-evidence declaration, so a signed plan must not
|
|
227
|
+
// apply unverified just because the caller forgot --verify-signature
|
|
228
|
+
// (contract: "Apply requires --verify-signature for signed plans"). A
|
|
229
|
+
// tampered/invalid signature then refuses below. `--no-verify-signature` is
|
|
230
|
+
// the explicit escape hatch for sign-here / apply-there-without-the-secret.
|
|
231
|
+
const isSigned = Boolean(saved.signature);
|
|
232
|
+
const skipSig = flagBool(args, 'no-verify-signature') && !verifySig;
|
|
233
|
+
if (verifySig || (isSigned && !skipSig)) {
|
|
226
234
|
const result = verifyPlan(saved);
|
|
227
235
|
if (result.ok === true) {
|
|
228
236
|
signatureStatus = DevSessionSignatureStatus.Verified;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/command-catalog.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,QAAQ,cAAc;IACtB,iBAAiB,mBAAmB;IACpC,gBAAgB,kBAAkB;IAClC,YAAY,kBAAkB;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,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAExE;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,oBAAoB,GAAG,cAAc,CAItE;AAED,+DAA+D;AAC/D,wBAAgB,eAAe,CAAC,CAAC,EAAE,oBAAoB,GAAG,SAAS,eAAe,EAAE,CAKnF;AAED,sDAAsD;AACtD,wBAAgB,eAAe,CAAC,CAAC,EAAE,oBAAoB,GAAG,eAAe,GAAG,SAAS,CAEpF;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,oBAAoB,GAAG,gBAAgB,CAQ1E;
|
|
1
|
+
{"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/command-catalog.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,QAAQ,cAAc;IACtB,iBAAiB,mBAAmB;IACpC,gBAAgB,kBAAkB;IAClC,YAAY,kBAAkB;IAC9B,SAAS,eAAe;IACxB,cAAc,oBAAoB;CACnC;AAED;;;;;;GAMG;AACH,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,8BAA8B;AAC9B,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,EAAE,OAAO;IACT,UAAU,gBAAgB;IAC1B,UAAU,eAAe;CAC1B;AAED;;;;;;GAMG;AACH,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED;;;;;;GAMG;AACH,oBAAY,gBAAgB;IAC1B,MAAM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AAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,wBAAwB,IAAI,SAAS,uBAAuB,EAAE,CAsB7E;AAED,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,SAAS,uBAAuB,EAAE,GACvC,MAAM,CAaR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compress.command.d.ts","sourceRoot":"","sources":["../../src/commands/compress.command.ts"],"names":[],"mappings":"AAQA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"compress.command.d.ts","sourceRoot":"","sources":["../../src/commands/compress.command.ts"],"names":[],"mappings":"AAQA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAahC;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,eA+E7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,eA4B3B,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
|
-
import
|
|
3
|
-
import { compressContent,
|
|
2
|
+
import { Buffer } from 'node:buffer';
|
|
3
|
+
import { compressContent, ECompressionStrategy, EContentType, } from '@shrkcrft/compress';
|
|
4
4
|
import { flagBool, flagNumber, flagString, resolveCwd, } from "../command-registry.js";
|
|
5
5
|
import { asJson } from "../output/format-output.js";
|
|
6
|
+
import { ccrDir, openCcrStore } from "../output/ccr-store-config.js";
|
|
6
7
|
const CONTENT_TYPES = new Set(Object.values(EContentType));
|
|
7
|
-
function ccrDir(cwd) {
|
|
8
|
-
return nodePath.join(cwd, '.sharkcraft', 'ccr');
|
|
9
|
-
}
|
|
10
8
|
function readInput(args) {
|
|
11
9
|
const positional = args.positional[0];
|
|
12
10
|
const useStdin = flagBool(args, 'stdin') || positional === undefined || positional === '-';
|
|
@@ -24,7 +22,7 @@ function readInput(args) {
|
|
|
24
22
|
export const compressCommand = {
|
|
25
23
|
name: 'compress',
|
|
26
24
|
description: 'Compress a blob (file or stdin) deterministically to cut tokens — JSON→table, logs/search/diffs→signal. Reversible via `shrk expand`.',
|
|
27
|
-
usage: 'shrk [--cwd <dir>] compress [<file>|-] [--stdin] [--type <content-type>] [--query <text>] [--max <n>] [--no-cache] [--json]',
|
|
25
|
+
usage: 'shrk [--cwd <dir>] compress [<file>|-] [--stdin] [--type <content-type>] [--query <text>] [--max <n>] [--lossless] [--no-cache] [--json]',
|
|
28
26
|
run(args) {
|
|
29
27
|
const cwd = resolveCwd(args);
|
|
30
28
|
let content;
|
|
@@ -41,13 +39,15 @@ export const compressCommand = {
|
|
|
41
39
|
}
|
|
42
40
|
const opts = {};
|
|
43
41
|
if (!flagBool(args, 'no-cache'))
|
|
44
|
-
opts.store =
|
|
42
|
+
opts.store = openCcrStore(cwd);
|
|
45
43
|
const query = flagString(args, 'query');
|
|
46
44
|
if (query)
|
|
47
45
|
opts.query = query;
|
|
48
46
|
const max = flagNumber(args, 'max');
|
|
49
47
|
if (max !== undefined && max > 0)
|
|
50
48
|
opts.maxItems = Math.floor(max);
|
|
49
|
+
if (flagBool(args, 'lossless'))
|
|
50
|
+
opts.lossless = true;
|
|
51
51
|
const type = flagString(args, 'type');
|
|
52
52
|
if (type && CONTENT_TYPES.has(type))
|
|
53
53
|
opts.contentType = type;
|
|
@@ -59,8 +59,11 @@ export const compressCommand = {
|
|
|
59
59
|
process.stderr.write('warning: compressed lossily but the original was NOT cached (--no-cache) — ' +
|
|
60
60
|
'detail is unrecoverable; omit --no-cache to keep it retrievable via `shrk expand`.\n');
|
|
61
61
|
}
|
|
62
|
+
const queryApplied = query !== undefined && query.length > 0;
|
|
62
63
|
if (flagBool(args, 'json')) {
|
|
63
|
-
|
|
64
|
+
// tokens are a deterministic ESTIMATE (chars/divisor heuristic), not a
|
|
65
|
+
// real BPE count — flagged so callers don't treat savedRatio as exact.
|
|
66
|
+
const base = {
|
|
64
67
|
contentType: result.contentType,
|
|
65
68
|
strategy: result.strategy,
|
|
66
69
|
lossy: result.lossy,
|
|
@@ -68,15 +71,25 @@ export const compressCommand = {
|
|
|
68
71
|
tokensAfter: result.savings.after,
|
|
69
72
|
tokensSaved: result.savings.saved,
|
|
70
73
|
savedRatio: result.savings.ratio,
|
|
74
|
+
tokensAreEstimated: true,
|
|
75
|
+
queryApplied,
|
|
71
76
|
ccrKey: result.ccrKey ?? null,
|
|
72
77
|
note: result.note,
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
};
|
|
79
|
+
// Net-loss guard: on a passthrough/no-win blob the engine returns the
|
|
80
|
+
// VERBATIM original as `compressed`. Echoing it back inside the JSON
|
|
81
|
+
// envelope (plus scaffold) costs more tokens than the input. Signal
|
|
82
|
+
// passthrough and omit the duplicated content — the caller still has it.
|
|
83
|
+
const noWin = result.strategy === ECompressionStrategy.Passthrough || result.savings.saved <= 0;
|
|
84
|
+
const payload = noWin
|
|
85
|
+
? { ...base, passthrough: true, inputBytes: Buffer.byteLength(content, 'utf8') }
|
|
86
|
+
: { ...base, compressed: result.compressed };
|
|
87
|
+
process.stdout.write(asJson(payload) + '\n');
|
|
75
88
|
return 0;
|
|
76
89
|
}
|
|
77
90
|
process.stdout.write(result.compressed + '\n');
|
|
78
91
|
const cached = result.ccrKey ? ` · original cached as ${result.ccrKey} (shrk expand ${result.ccrKey})` : '';
|
|
79
|
-
process.stderr.write(`${result.strategy}:
|
|
92
|
+
process.stderr.write(`${result.strategy}: ~${result.savings.before} → ~${result.savings.after} tokens (−${pct}%, est.)${cached}\n`);
|
|
80
93
|
return 0;
|
|
81
94
|
},
|
|
82
95
|
};
|
|
@@ -95,7 +108,7 @@ export const expandCommand = {
|
|
|
95
108
|
process.stderr.write('expand: a CCR key is required (e.g. `shrk expand a1b2c3d4e5f60718`).\n');
|
|
96
109
|
return 1;
|
|
97
110
|
}
|
|
98
|
-
const store =
|
|
111
|
+
const store = openCcrStore(cwd);
|
|
99
112
|
const entry = store.get(key);
|
|
100
113
|
if (!entry) {
|
|
101
114
|
process.stderr.write(`expand: no cached original for key "${key}" under ${ccrDir(cwd)}.\n`);
|
|
@@ -105,7 +118,9 @@ export const expandCommand = {
|
|
|
105
118
|
process.stdout.write(asJson({ key: entry.key, bytes: entry.bytes, content: entry.content }) + '\n');
|
|
106
119
|
return 0;
|
|
107
120
|
}
|
|
108
|
-
|
|
121
|
+
// Write the cached original VERBATIM — appending a newline broke byte-for-byte
|
|
122
|
+
// round-trip (`compress … ; expand` must reproduce the input exactly).
|
|
123
|
+
process.stdout.write(entry.content);
|
|
109
124
|
return 0;
|
|
110
125
|
},
|
|
111
126
|
};
|
|
@@ -256,6 +256,10 @@ function rootOfSpecifier(spec) {
|
|
|
256
256
|
function isBuiltinModule(spec) {
|
|
257
257
|
if (spec.startsWith('node:'))
|
|
258
258
|
return true;
|
|
259
|
+
// Bun runtime builtins (`bun:test`, `bun:sqlite`, `bun:ffi`, …) are provided by
|
|
260
|
+
// the runtime, never an npm dependency — so they are not "missing".
|
|
261
|
+
if (spec.startsWith('bun:'))
|
|
262
|
+
return true;
|
|
259
263
|
// Common bare-name builtins.
|
|
260
264
|
return new Set([
|
|
261
265
|
'fs', 'path', 'os', 'crypto', 'http', 'https', 'url', 'util', 'stream',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.command.d.ts","sourceRoot":"","sources":["../../src/commands/dev.command.ts"],"names":[],"mappings":"AA6CA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"dev.command.d.ts","sourceRoot":"","sources":["../../src/commands/dev.command.ts"],"names":[],"mappings":"AA6CA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAi8ChC,eAAO,MAAM,UAAU,EAAE,eAkExB,CAAC"}
|
|
@@ -672,7 +672,11 @@ async function validateSession(args) {
|
|
|
672
672
|
const allVerifications = flagBool(args, 'all-verifications');
|
|
673
673
|
const allowPackCommands = flagBool(args, 'allow-pack-commands');
|
|
674
674
|
const wantStrict = flagBool(args, 'strict');
|
|
675
|
-
|
|
675
|
+
// flagBool is two-valued (absent → false), so `flagBool(...) !== false` is
|
|
676
|
+
// false when the flag is absent — the opposite of the intended default. Read
|
|
677
|
+
// the raw value: write the report by default, opt out only via --report=false.
|
|
678
|
+
const reportFlag = args.flags.get('report');
|
|
679
|
+
const wantReport = reportFlag !== false && reportFlag !== 'false';
|
|
676
680
|
const wantJson = flagBool(args, 'json');
|
|
677
681
|
const startedAt = new Date().toISOString();
|
|
678
682
|
const reportFileName = `validate-${startedAt.replace(/[:.]/g, '-')}.json`;
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAEA,OAAO,EACL,eAAe,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAEA,OAAO,EACL,eAAe,EAKhB,MAAM,uBAAuB,CAAC;AAuX/B,wBAAgB,aAAa,IAAI,eAAe,CA2X/C;AAED,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BrE;AAoHD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CA4CxE"}
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { loadDotenv } from "./env/load-dotenv.js";
|
|
3
|
-
import { CommandRegistry, extractGlobalCwd, parseArgs, } from "./command-registry.js";
|
|
3
|
+
import { CommandRegistry, extractGlobalCompress, extractGlobalCwd, parseArgs, } from "./command-registry.js";
|
|
4
|
+
import { runCommandWithCompression } from "./output/output-compression.js";
|
|
4
5
|
import { initCommand } from "./commands/init.command.js";
|
|
5
6
|
import { inspectCommand } from "./commands/inspect.command.js";
|
|
6
7
|
import { doctorAcknowledgeCommand, doctorAcknowledgementsCommand, doctorCommand, doctorSuppressCommand, doctorSuppressionsCommand, } from "./commands/doctor.command.js";
|
|
@@ -545,8 +546,23 @@ async function isUsageEnabled(cwd) {
|
|
|
545
546
|
async function runCliInner(argv) {
|
|
546
547
|
const registry = buildRegistry();
|
|
547
548
|
// Pre-parse the global --cwd so it can appear anywhere (incl. before the command).
|
|
548
|
-
const { cwd: globalCwd, rest:
|
|
549
|
+
const { cwd: globalCwd, rest: cwdCleanArgv } = extractGlobalCwd(argv);
|
|
550
|
+
// Pre-parse the global --compress / --ccr output-compression flags.
|
|
551
|
+
const { directive: compressDirective, rest: cleanArgv } = extractGlobalCompress(cwdCleanArgv);
|
|
549
552
|
const [first] = cleanArgv;
|
|
553
|
+
// `--compress` / `--ccr` on a real command: re-run it and compress its stdout.
|
|
554
|
+
// (Meta verbs like --help/--version and bare invocations are left untouched.)
|
|
555
|
+
if (compressDirective &&
|
|
556
|
+
first &&
|
|
557
|
+
first !== '--help' &&
|
|
558
|
+
first !== '-h' &&
|
|
559
|
+
first !== '--full-help' &&
|
|
560
|
+
first !== '--version' &&
|
|
561
|
+
first !== '-v' &&
|
|
562
|
+
first !== '--about') {
|
|
563
|
+
const childArgv = globalCwd ? ['--cwd', globalCwd, ...cleanArgv] : [...cleanArgv];
|
|
564
|
+
return runCommandWithCompression(childArgv, compressDirective, globalCwd ?? process.cwd());
|
|
565
|
+
}
|
|
550
566
|
// bare invocation lands on the curated tiered view.
|
|
551
567
|
if (!first) {
|
|
552
568
|
const landing = await renderNoArgsLanding(globalCwd ?? process.cwd());
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TtlFileCcrStore } from '@shrkcrft/compress';
|
|
2
|
+
/**
|
|
3
|
+
* Upper bound on cached CCR originals under `.sharkcraft/ccr/`. The store evicts
|
|
4
|
+
* the oldest entries past this on every `put`, so the compress cache stays
|
|
5
|
+
* bounded instead of growing without limit (the old `FileCcrStore` had no cap).
|
|
6
|
+
* Count-based (not time-based) so a previously-cached key never silently
|
|
7
|
+
* expires out from under a `shrk expand` until it is genuinely the oldest and
|
|
8
|
+
* the cap is exceeded.
|
|
9
|
+
*/
|
|
10
|
+
export declare const CCR_MAX_ENTRIES = 1000;
|
|
11
|
+
/** Absolute path to the per-workspace CCR cache directory. */
|
|
12
|
+
export declare function ccrDir(cwd: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Open the bounded, cross-process CCR store the CLI write/read paths share.
|
|
15
|
+
* `ttlMs: 0` means no time expiry; `maxEntries` is the only bound.
|
|
16
|
+
*/
|
|
17
|
+
export declare function openCcrStore(cwd: string): TtlFileCcrStore;
|
|
18
|
+
//# sourceMappingURL=ccr-store-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ccr-store-config.d.ts","sourceRoot":"","sources":["../../src/output/ccr-store-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,8DAA8D;AAC9D,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAEzD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as nodePath from 'node:path';
|
|
2
|
+
import { TtlFileCcrStore } from '@shrkcrft/compress';
|
|
3
|
+
/**
|
|
4
|
+
* Upper bound on cached CCR originals under `.sharkcraft/ccr/`. The store evicts
|
|
5
|
+
* the oldest entries past this on every `put`, so the compress cache stays
|
|
6
|
+
* bounded instead of growing without limit (the old `FileCcrStore` had no cap).
|
|
7
|
+
* Count-based (not time-based) so a previously-cached key never silently
|
|
8
|
+
* expires out from under a `shrk expand` until it is genuinely the oldest and
|
|
9
|
+
* the cap is exceeded.
|
|
10
|
+
*/
|
|
11
|
+
export const CCR_MAX_ENTRIES = 1000;
|
|
12
|
+
/** Absolute path to the per-workspace CCR cache directory. */
|
|
13
|
+
export function ccrDir(cwd) {
|
|
14
|
+
return nodePath.join(cwd, '.sharkcraft', 'ccr');
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Open the bounded, cross-process CCR store the CLI write/read paths share.
|
|
18
|
+
* `ttlMs: 0` means no time expiry; `maxEntries` is the only bound.
|
|
19
|
+
*/
|
|
20
|
+
export function openCcrStore(cwd) {
|
|
21
|
+
return new TtlFileCcrStore(ccrDir(cwd), { maxEntries: CCR_MAX_ENTRIES });
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IGlobalCompressDirective } from '../command-registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Implements the global `--compress` / `--ccr` flag: run a `shrk` command in a
|
|
4
|
+
* child process, capture its stdout, and emit a deterministically-compressed
|
|
5
|
+
* version (with the original cached for `shrk expand`). The command's own
|
|
6
|
+
* stderr is forwarded verbatim and its exit code is preserved.
|
|
7
|
+
*
|
|
8
|
+
* A SUBPROCESS (not in-process `process.stdout` capture) on purpose: some
|
|
9
|
+
* commands call `process.exit`, which would discard a buffered in-process
|
|
10
|
+
* capture mid-write; re-running the command isolates that and still yields the
|
|
11
|
+
* full output + real exit status. `childArgv` has already had the compress
|
|
12
|
+
* flags stripped, so the child never recurses.
|
|
13
|
+
*/
|
|
14
|
+
export declare function runCommandWithCompression(childArgv: readonly string[], directive: IGlobalCompressDirective, cwd: string): number;
|
|
15
|
+
//# sourceMappingURL=output-compression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-compression.d.ts","sourceRoot":"","sources":["../../src/output/output-compression.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAQvE;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,SAAS,EAAE,wBAAwB,EACnC,GAAG,EAAE,MAAM,GACV,MAAM,CAgDR"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
import { compressContent } from '@shrkcrft/compress';
|
|
3
|
+
import { openCcrStore } from "./ccr-store-config.js";
|
|
4
|
+
import { resolveCompressType } from "./resolve-compress-type.js";
|
|
5
|
+
// Command output can be large (a full knowledge dump, a wide graph). Allow up to
|
|
6
|
+
// 64 MiB of captured stdout before spawnSync gives up.
|
|
7
|
+
const MAX_BUFFER = 64 * 1024 * 1024;
|
|
8
|
+
/**
|
|
9
|
+
* Implements the global `--compress` / `--ccr` flag: run a `shrk` command in a
|
|
10
|
+
* child process, capture its stdout, and emit a deterministically-compressed
|
|
11
|
+
* version (with the original cached for `shrk expand`). The command's own
|
|
12
|
+
* stderr is forwarded verbatim and its exit code is preserved.
|
|
13
|
+
*
|
|
14
|
+
* A SUBPROCESS (not in-process `process.stdout` capture) on purpose: some
|
|
15
|
+
* commands call `process.exit`, which would discard a buffered in-process
|
|
16
|
+
* capture mid-write; re-running the command isolates that and still yields the
|
|
17
|
+
* full output + real exit status. `childArgv` has already had the compress
|
|
18
|
+
* flags stripped, so the child never recurses.
|
|
19
|
+
*/
|
|
20
|
+
export function runCommandWithCompression(childArgv, directive, cwd) {
|
|
21
|
+
const runtime = process.argv[0];
|
|
22
|
+
const entry = process.argv[1];
|
|
23
|
+
if (!runtime || !entry) {
|
|
24
|
+
process.stderr.write('--compress: cannot determine the shrk entry point to re-run; emitting uncompressed.\n');
|
|
25
|
+
return 1;
|
|
26
|
+
}
|
|
27
|
+
// Resolve an explicit --compress-type up front so a typo is reported loudly
|
|
28
|
+
// (not silently auto-detected), even if the command ends up printing nothing.
|
|
29
|
+
const resolvedType = resolveCompressType(directive.type);
|
|
30
|
+
if (resolvedType.warning)
|
|
31
|
+
process.stderr.write(`${resolvedType.warning}\n`);
|
|
32
|
+
const res = spawnSync(runtime, [entry, ...childArgv], {
|
|
33
|
+
encoding: 'utf8',
|
|
34
|
+
maxBuffer: MAX_BUFFER,
|
|
35
|
+
env: process.env,
|
|
36
|
+
});
|
|
37
|
+
if (res.error) {
|
|
38
|
+
process.stderr.write(`--compress: failed to run the command (${res.error.message}); emitting nothing.\n`);
|
|
39
|
+
return 1;
|
|
40
|
+
}
|
|
41
|
+
// Forward the command's own stderr (warnings, summaries, errors) untouched.
|
|
42
|
+
if (res.stderr)
|
|
43
|
+
process.stderr.write(res.stderr);
|
|
44
|
+
const captured = res.stdout ?? '';
|
|
45
|
+
const code = res.status ?? (res.signal ? 1 : 0);
|
|
46
|
+
// Nothing on stdout (or the command failed) → don't fabricate output.
|
|
47
|
+
if (captured.length === 0)
|
|
48
|
+
return code;
|
|
49
|
+
const opts = { store: openCcrStore(cwd) };
|
|
50
|
+
if (directive.query)
|
|
51
|
+
opts.query = directive.query;
|
|
52
|
+
if (resolvedType.type)
|
|
53
|
+
opts.contentType = resolvedType.type;
|
|
54
|
+
const result = compressContent(captured, opts);
|
|
55
|
+
process.stdout.write(result.compressed.endsWith('\n') ? result.compressed : `${result.compressed}\n`);
|
|
56
|
+
const pct = Math.round(result.savings.ratio * 100);
|
|
57
|
+
const cached = result.ccrKey ? ` · original cached (shrk expand ${result.ccrKey})` : '';
|
|
58
|
+
process.stderr.write(`[--compress] ${result.strategy}: ~${result.savings.before} → ~${result.savings.after} tokens (−${pct}%, est.)${cached}\n`);
|
|
59
|
+
return code;
|
|
60
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EContentType } from '@shrkcrft/compress';
|
|
2
|
+
/** Outcome of resolving a raw `--compress-type` string. */
|
|
3
|
+
export interface IResolvedCompressType {
|
|
4
|
+
/** The forced content type — set only when the raw value named a valid one. */
|
|
5
|
+
type?: EContentType;
|
|
6
|
+
/**
|
|
7
|
+
* A user-facing warning, set when the raw value was non-empty but
|
|
8
|
+
* unrecognized. The caller surfaces it (on stderr) so an explicit-but-typo'd
|
|
9
|
+
* `--compress-type` is reported rather than silently dropped.
|
|
10
|
+
*/
|
|
11
|
+
warning?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Resolve a raw `--compress-type` flag value into a forced {@link EContentType}.
|
|
15
|
+
*
|
|
16
|
+
* An unrecognized, non-empty value is NOT silently ignored (the old behavior):
|
|
17
|
+
* it yields a `warning` listing the valid types, so the caller can tell the
|
|
18
|
+
* user their explicit choice was dropped before falling back to auto-detection.
|
|
19
|
+
* A missing or empty value is a no-op (auto-detect, no warning).
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveCompressType(raw: string | undefined): IResolvedCompressType;
|
|
22
|
+
//# sourceMappingURL=resolve-compress-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-compress-type.d.ts","sourceRoot":"","sources":["../../src/output/resolve-compress-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKlD,2DAA2D;AAC3D,MAAM,WAAW,qBAAqB;IACpC,+EAA+E;IAC/E,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,qBAAqB,CAOlF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EContentType } from '@shrkcrft/compress';
|
|
2
|
+
/** The valid `--compress-type` values: the EContentType wire strings. */
|
|
3
|
+
const VALID_TYPES = new Set(Object.values(EContentType));
|
|
4
|
+
/**
|
|
5
|
+
* Resolve a raw `--compress-type` flag value into a forced {@link EContentType}.
|
|
6
|
+
*
|
|
7
|
+
* An unrecognized, non-empty value is NOT silently ignored (the old behavior):
|
|
8
|
+
* it yields a `warning` listing the valid types, so the caller can tell the
|
|
9
|
+
* user their explicit choice was dropped before falling back to auto-detection.
|
|
10
|
+
* A missing or empty value is a no-op (auto-detect, no warning).
|
|
11
|
+
*/
|
|
12
|
+
export function resolveCompressType(raw) {
|
|
13
|
+
if (raw === undefined || raw === '')
|
|
14
|
+
return {};
|
|
15
|
+
if (VALID_TYPES.has(raw))
|
|
16
|
+
return { type: raw };
|
|
17
|
+
const valid = [...VALID_TYPES].sort().join(', ');
|
|
18
|
+
return {
|
|
19
|
+
warning: `--compress: unknown --compress-type "${raw}"; auto-detecting instead. Valid types: ${valid}.`,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-validation-loop.d.ts","sourceRoot":"","sources":["../../src/validation/run-validation-loop.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mEAAmE;IACnE,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,2EAA2E;IAC3E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,6EAA6E;IAC7E,iBAAiB,EAAE,OAAO,CAAC;IAC3B,2DAA2D;IAC3D,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,wBAAwB,CAAC,
|
|
1
|
+
{"version":3,"file":"run-validation-loop.d.ts","sourceRoot":"","sources":["../../src/validation/run-validation-loop.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mEAAmE;IACnE,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,2EAA2E;IAC3E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,6EAA6E;IAC7E,iBAAiB,EAAE,OAAO,CAAC;IAC3B,2DAA2D;IAC3D,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,wBAAwB,CAAC,CAyGnC"}
|
|
@@ -25,7 +25,11 @@ export async function runValidationLoop(options) {
|
|
|
25
25
|
const ver = cfg?.verificationCommands ?? [];
|
|
26
26
|
const wantIds = new Set(options.verificationIds);
|
|
27
27
|
for (const v of ver) {
|
|
28
|
-
|
|
28
|
+
// `--all-verifications` auto-runs commands, so it must respect the
|
|
29
|
+
// explicit `trusted: false` opt-out (a command the project marked
|
|
30
|
+
// untrusted must not be executed en masse). An explicit `--verification
|
|
31
|
+
// <id>` still runs it — naming it by id IS the opt-in.
|
|
32
|
+
const shouldRun = (options.allVerifications && v.trusted !== false) || wantIds.has(v.id);
|
|
29
33
|
if (!shouldRun)
|
|
30
34
|
continue;
|
|
31
35
|
commands.push({ id: v.id, command: v.command, trusted: v.trusted !== false });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shrkcrft/cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.17",
|
|
4
4
|
"description": "SharkCraft CLI (`shrk`): structured project intelligence for AI coding agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SharkCraft contributors",
|
|
@@ -47,38 +47,38 @@
|
|
|
47
47
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@shrkcrft/core": "^0.1.0-alpha.
|
|
51
|
-
"@shrkcrft/compress": "^0.1.0-alpha.
|
|
52
|
-
"@shrkcrft/config": "^0.1.0-alpha.
|
|
53
|
-
"@shrkcrft/workspace": "^0.1.0-alpha.
|
|
54
|
-
"@shrkcrft/knowledge": "^0.1.0-alpha.
|
|
55
|
-
"@shrkcrft/context": "^0.1.0-alpha.
|
|
56
|
-
"@shrkcrft/rules": "^0.1.0-alpha.
|
|
57
|
-
"@shrkcrft/paths": "^0.1.0-alpha.
|
|
58
|
-
"@shrkcrft/templates": "^0.1.0-alpha.
|
|
59
|
-
"@shrkcrft/plugin-api": "^0.1.0-alpha.
|
|
60
|
-
"@shrkcrft/dashboard": "^0.1.0-alpha.
|
|
61
|
-
"@shrkcrft/dashboard-api": "^0.1.0-alpha.
|
|
62
|
-
"@shrkcrft/pipelines": "^0.1.0-alpha.
|
|
63
|
-
"@shrkcrft/presets": "^0.1.0-alpha.
|
|
64
|
-
"@shrkcrft/boundaries": "^0.1.0-alpha.
|
|
65
|
-
"@shrkcrft/graph": "^0.1.0-alpha.
|
|
66
|
-
"@shrkcrft/rule-graph": "^0.1.0-alpha.
|
|
67
|
-
"@shrkcrft/structural-search": "^0.1.0-alpha.
|
|
68
|
-
"@shrkcrft/impact-engine": "^0.1.0-alpha.
|
|
69
|
-
"@shrkcrft/context-planner": "^0.1.0-alpha.
|
|
70
|
-
"@shrkcrft/architecture-guard": "^0.1.0-alpha.
|
|
71
|
-
"@shrkcrft/framework-scanners": "^0.1.0-alpha.
|
|
72
|
-
"@shrkcrft/api-surface-diff": "^0.1.0-alpha.
|
|
73
|
-
"@shrkcrft/quality-gates": "^0.1.0-alpha.
|
|
74
|
-
"@shrkcrft/migrate": "^0.1.0-alpha.
|
|
75
|
-
"@shrkcrft/generator": "^0.1.0-alpha.
|
|
76
|
-
"@shrkcrft/importer": "^0.1.0-alpha.
|
|
77
|
-
"@shrkcrft/inspector": "^0.1.0-alpha.
|
|
78
|
-
"@shrkcrft/ai": "^0.1.0-alpha.
|
|
79
|
-
"@shrkcrft/embeddings": "^0.1.0-alpha.
|
|
80
|
-
"@shrkcrft/shared": "^0.1.0-alpha.
|
|
81
|
-
"@shrkcrft/mcp-server": "^0.1.0-alpha.
|
|
50
|
+
"@shrkcrft/core": "^0.1.0-alpha.17",
|
|
51
|
+
"@shrkcrft/compress": "^0.1.0-alpha.17",
|
|
52
|
+
"@shrkcrft/config": "^0.1.0-alpha.17",
|
|
53
|
+
"@shrkcrft/workspace": "^0.1.0-alpha.17",
|
|
54
|
+
"@shrkcrft/knowledge": "^0.1.0-alpha.17",
|
|
55
|
+
"@shrkcrft/context": "^0.1.0-alpha.17",
|
|
56
|
+
"@shrkcrft/rules": "^0.1.0-alpha.17",
|
|
57
|
+
"@shrkcrft/paths": "^0.1.0-alpha.17",
|
|
58
|
+
"@shrkcrft/templates": "^0.1.0-alpha.17",
|
|
59
|
+
"@shrkcrft/plugin-api": "^0.1.0-alpha.17",
|
|
60
|
+
"@shrkcrft/dashboard": "^0.1.0-alpha.17",
|
|
61
|
+
"@shrkcrft/dashboard-api": "^0.1.0-alpha.17",
|
|
62
|
+
"@shrkcrft/pipelines": "^0.1.0-alpha.17",
|
|
63
|
+
"@shrkcrft/presets": "^0.1.0-alpha.17",
|
|
64
|
+
"@shrkcrft/boundaries": "^0.1.0-alpha.17",
|
|
65
|
+
"@shrkcrft/graph": "^0.1.0-alpha.17",
|
|
66
|
+
"@shrkcrft/rule-graph": "^0.1.0-alpha.17",
|
|
67
|
+
"@shrkcrft/structural-search": "^0.1.0-alpha.17",
|
|
68
|
+
"@shrkcrft/impact-engine": "^0.1.0-alpha.17",
|
|
69
|
+
"@shrkcrft/context-planner": "^0.1.0-alpha.17",
|
|
70
|
+
"@shrkcrft/architecture-guard": "^0.1.0-alpha.17",
|
|
71
|
+
"@shrkcrft/framework-scanners": "^0.1.0-alpha.17",
|
|
72
|
+
"@shrkcrft/api-surface-diff": "^0.1.0-alpha.17",
|
|
73
|
+
"@shrkcrft/quality-gates": "^0.1.0-alpha.17",
|
|
74
|
+
"@shrkcrft/migrate": "^0.1.0-alpha.17",
|
|
75
|
+
"@shrkcrft/generator": "^0.1.0-alpha.17",
|
|
76
|
+
"@shrkcrft/importer": "^0.1.0-alpha.17",
|
|
77
|
+
"@shrkcrft/inspector": "^0.1.0-alpha.17",
|
|
78
|
+
"@shrkcrft/ai": "^0.1.0-alpha.17",
|
|
79
|
+
"@shrkcrft/embeddings": "^0.1.0-alpha.17",
|
|
80
|
+
"@shrkcrft/shared": "^0.1.0-alpha.17",
|
|
81
|
+
"@shrkcrft/mcp-server": "^0.1.0-alpha.17",
|
|
82
82
|
"@huggingface/transformers": "^3.7.5"
|
|
83
83
|
},
|
|
84
84
|
"publishConfig": {
|