@peac/cli 0.9.31 → 0.10.9
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 +78 -5
- package/dist/commands/conformance.d.ts +16 -0
- package/dist/commands/conformance.d.ts.map +1 -0
- package/dist/commands/conformance.js +301 -0
- package/dist/commands/conformance.js.map +1 -0
- package/dist/commands/samples.d.ts +17 -0
- package/dist/commands/samples.d.ts.map +1 -0
- package/dist/commands/samples.js +360 -0
- package/dist/commands/samples.js.map +1 -0
- package/dist/commands/workflow.d.ts +11 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +214 -0
- package/dist/commands/workflow.js.map +1 -0
- package/dist/index.js +60 -33
- package/dist/index.js.map +1 -1
- package/dist/lib/conformance/digest.d.ts +64 -0
- package/dist/lib/conformance/digest.d.ts.map +1 -0
- package/dist/lib/conformance/digest.js +202 -0
- package/dist/lib/conformance/digest.js.map +1 -0
- package/dist/lib/conformance/index.d.ts +11 -0
- package/dist/lib/conformance/index.d.ts.map +1 -0
- package/dist/lib/conformance/index.js +30 -0
- package/dist/lib/conformance/index.js.map +1 -0
- package/dist/lib/conformance/manifest.d.ts +15 -0
- package/dist/lib/conformance/manifest.d.ts.map +1 -0
- package/dist/lib/conformance/manifest.js +66 -0
- package/dist/lib/conformance/manifest.js.map +1 -0
- package/dist/lib/conformance/profiles.d.ts +33 -0
- package/dist/lib/conformance/profiles.d.ts.map +1 -0
- package/dist/lib/conformance/profiles.js +138 -0
- package/dist/lib/conformance/profiles.js.map +1 -0
- package/dist/lib/conformance/types.d.ts +186 -0
- package/dist/lib/conformance/types.d.ts.map +1 -0
- package/dist/lib/conformance/types.js +8 -0
- package/dist/lib/conformance/types.js.map +1 -0
- package/dist/lib/conformance/validators.d.ts +27 -0
- package/dist/lib/conformance/validators.d.ts.map +1 -0
- package/dist/lib/conformance/validators.js +415 -0
- package/dist/lib/conformance/validators.js.map +1 -0
- package/dist/lib/conformance-runner.d.ts +29 -0
- package/dist/lib/conformance-runner.d.ts.map +1 -0
- package/dist/lib/conformance-runner.js +433 -0
- package/dist/lib/conformance-runner.js.map +1 -0
- package/dist/lib/samples-loader.d.ts +44 -0
- package/dist/lib/samples-loader.d.ts.map +1 -0
- package/dist/lib/samples-loader.js +311 -0
- package/dist/lib/samples-loader.js.map +1 -0
- package/dist/lib/version.d.ts +22 -0
- package/dist/lib/version.d.ts.map +1 -0
- package/dist/lib/version.js +61 -0
- package/dist/lib/version.js.map +1 -0
- package/package.json +17 -8
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* PEAC Samples CLI Commands (v0.10.8+)
|
|
4
|
+
*
|
|
5
|
+
* Commands for working with sample receipts:
|
|
6
|
+
* - list: List available sample receipts
|
|
7
|
+
* - generate: Generate sample receipts for testing
|
|
8
|
+
* - show: Show details of a specific sample
|
|
9
|
+
*
|
|
10
|
+
* Uses specs/conformance/samples/ as canonical source when available,
|
|
11
|
+
* falls back to embedded samples when running outside the repo.
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.samples = void 0;
|
|
50
|
+
const commander_1 = require("commander");
|
|
51
|
+
const fs = __importStar(require("fs"));
|
|
52
|
+
const path = __importStar(require("path"));
|
|
53
|
+
const crypto_1 = require("@peac/crypto");
|
|
54
|
+
const samples_loader_js_1 = require("../lib/samples-loader.js");
|
|
55
|
+
const version_js_1 = require("../lib/version.js");
|
|
56
|
+
/**
|
|
57
|
+
* Get global options from parent command
|
|
58
|
+
*/
|
|
59
|
+
function getGlobalOptions(cmd) {
|
|
60
|
+
const parent = cmd.parent;
|
|
61
|
+
if (!parent)
|
|
62
|
+
return {};
|
|
63
|
+
return parent.opts();
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Output error - handles JSON vs human-readable format
|
|
67
|
+
*/
|
|
68
|
+
function outputError(error, details, opts) {
|
|
69
|
+
if (opts.json) {
|
|
70
|
+
console.log(JSON.stringify({ success: false, error, ...details }, null, 2));
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
console.error(`Error: ${error}`);
|
|
74
|
+
if (details.hint) {
|
|
75
|
+
console.error(`Hint: ${details.hint}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Apply time adjustments to claims based on sample type
|
|
81
|
+
*/
|
|
82
|
+
function applyTimeAdjustments(claims, sampleId, now) {
|
|
83
|
+
const adjusted = { ...claims };
|
|
84
|
+
// Standard expiry: 1 hour
|
|
85
|
+
const standardExpiry = 3600;
|
|
86
|
+
// Long expiry: 24 hours
|
|
87
|
+
const longExpiry = 86400;
|
|
88
|
+
switch (sampleId) {
|
|
89
|
+
case 'expired':
|
|
90
|
+
// Already expired: iat 2 hours ago, exp 1 hour ago
|
|
91
|
+
adjusted.iat = now - 7200;
|
|
92
|
+
adjusted.exp = now - 3600;
|
|
93
|
+
break;
|
|
94
|
+
case 'future-iat':
|
|
95
|
+
// Future iat: 1 hour in future
|
|
96
|
+
adjusted.iat = now + 3600;
|
|
97
|
+
adjusted.exp = now + 7200;
|
|
98
|
+
break;
|
|
99
|
+
case 'long-expiry':
|
|
100
|
+
adjusted.iat = now;
|
|
101
|
+
adjusted.exp = now + longExpiry;
|
|
102
|
+
break;
|
|
103
|
+
default:
|
|
104
|
+
// Standard: iat now, exp in 1 hour
|
|
105
|
+
if (adjusted.iat === 0 || !adjusted.iat) {
|
|
106
|
+
adjusted.iat = now;
|
|
107
|
+
}
|
|
108
|
+
if (adjusted.exp === 0 || !adjusted.exp) {
|
|
109
|
+
adjusted.exp = now + standardExpiry;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return adjusted;
|
|
113
|
+
}
|
|
114
|
+
const samples = new commander_1.Command('samples')
|
|
115
|
+
.description('Work with PEAC sample receipts (v0.10.8+)')
|
|
116
|
+
.option('--json', 'Output in JSON format');
|
|
117
|
+
exports.samples = samples;
|
|
118
|
+
/**
|
|
119
|
+
* peac samples list [--category <cat>]
|
|
120
|
+
*/
|
|
121
|
+
samples
|
|
122
|
+
.command('list')
|
|
123
|
+
.description('List available sample receipts')
|
|
124
|
+
.option('-c, --category <category>', 'Filter by category: valid, invalid, edge')
|
|
125
|
+
.option('--samples <path>', 'Path to samples directory')
|
|
126
|
+
.action((options, cmd) => {
|
|
127
|
+
const globalOpts = getGlobalOptions(cmd);
|
|
128
|
+
try {
|
|
129
|
+
const allSamples = (0, samples_loader_js_1.getSamples)(options.samples);
|
|
130
|
+
let filteredSamples = allSamples;
|
|
131
|
+
if (options.category) {
|
|
132
|
+
filteredSamples = allSamples.filter((s) => s.category === options.category);
|
|
133
|
+
if (filteredSamples.length === 0) {
|
|
134
|
+
outputError('No samples in category', { category: options.category }, globalOpts);
|
|
135
|
+
process.exitCode = 1;
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (globalOpts.json) {
|
|
140
|
+
const data = filteredSamples.map((s) => ({
|
|
141
|
+
id: s.id,
|
|
142
|
+
name: s.name,
|
|
143
|
+
description: s.description,
|
|
144
|
+
category: s.category,
|
|
145
|
+
}));
|
|
146
|
+
console.log(JSON.stringify({ samples: data }, null, 2));
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
console.log('Available PEAC Sample Receipts\n');
|
|
150
|
+
console.log('VALID SAMPLES:');
|
|
151
|
+
for (const s of filteredSamples.filter((x) => x.category === 'valid')) {
|
|
152
|
+
console.log(` ${s.id}`);
|
|
153
|
+
console.log(` ${s.description}\n`);
|
|
154
|
+
}
|
|
155
|
+
const invalid = filteredSamples.filter((x) => x.category === 'invalid');
|
|
156
|
+
if (invalid.length > 0) {
|
|
157
|
+
console.log('\nINVALID SAMPLES (for testing rejection):');
|
|
158
|
+
for (const s of invalid) {
|
|
159
|
+
console.log(` ${s.id}`);
|
|
160
|
+
console.log(` ${s.description}\n`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const edge = filteredSamples.filter((x) => x.category === 'edge');
|
|
164
|
+
if (edge.length > 0) {
|
|
165
|
+
console.log('\nEDGE CASE SAMPLES:');
|
|
166
|
+
for (const s of edge) {
|
|
167
|
+
console.log(` ${s.id}`);
|
|
168
|
+
console.log(` ${s.description}\n`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
console.log('\nUse "peac samples show <id>" to see sample details.');
|
|
172
|
+
console.log('Use "peac samples generate -o <dir>" to generate sample files.');
|
|
173
|
+
}
|
|
174
|
+
process.exitCode = 0;
|
|
175
|
+
}
|
|
176
|
+
catch (err) {
|
|
177
|
+
outputError(err.message, {}, globalOpts);
|
|
178
|
+
process.exitCode = 1;
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
/**
|
|
182
|
+
* peac samples show <id>
|
|
183
|
+
*/
|
|
184
|
+
samples
|
|
185
|
+
.command('show')
|
|
186
|
+
.description('Show details of a specific sample')
|
|
187
|
+
.argument('<id>', 'Sample ID')
|
|
188
|
+
.option('--samples <path>', 'Path to samples directory')
|
|
189
|
+
.action((id, options, cmd) => {
|
|
190
|
+
const globalOpts = getGlobalOptions(cmd);
|
|
191
|
+
try {
|
|
192
|
+
const sample = (0, samples_loader_js_1.getSampleById)(id, options.samples);
|
|
193
|
+
if (!sample) {
|
|
194
|
+
const allSamples = (0, samples_loader_js_1.getSamples)(options.samples);
|
|
195
|
+
const available = allSamples.map((s) => s.id);
|
|
196
|
+
outputError('Sample not found', { id, available }, globalOpts);
|
|
197
|
+
process.exitCode = 1;
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (globalOpts.json) {
|
|
201
|
+
console.log(JSON.stringify(sample, null, 2));
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
console.log(`Sample: ${sample.name}\n`);
|
|
205
|
+
console.log(`ID: ${sample.id}`);
|
|
206
|
+
console.log(`Category: ${sample.category}`);
|
|
207
|
+
console.log(`Description: ${sample.description}\n`);
|
|
208
|
+
console.log('Claims:');
|
|
209
|
+
console.log(JSON.stringify(sample.claims, null, 2));
|
|
210
|
+
if (sample.expectedError) {
|
|
211
|
+
console.log(`\nExpected Error: ${sample.expectedError}`);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
process.exitCode = 0;
|
|
215
|
+
}
|
|
216
|
+
catch (err) {
|
|
217
|
+
outputError(err.message, {}, globalOpts);
|
|
218
|
+
process.exitCode = 1;
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
/**
|
|
222
|
+
* peac samples generate -o <dir> [--format <format>] [--now <timestamp>] [--kid <kid>] [--seed <seed>]
|
|
223
|
+
*/
|
|
224
|
+
samples
|
|
225
|
+
.command('generate')
|
|
226
|
+
.description('Generate sample receipt files')
|
|
227
|
+
.requiredOption('-o, --output <dir>', 'Output directory')
|
|
228
|
+
.option('-f, --format <format>', 'Output format: jws, json, bundle', 'jws')
|
|
229
|
+
.option('--category <category>', 'Generate only specific category')
|
|
230
|
+
.option('--samples <path>', 'Path to samples directory')
|
|
231
|
+
.option('--now <timestamp>', 'Unix timestamp for iat/exp (for deterministic generation)')
|
|
232
|
+
.option('--kid <kid>', 'Key ID to use')
|
|
233
|
+
.action(async (options, cmd) => {
|
|
234
|
+
const globalOpts = getGlobalOptions(cmd);
|
|
235
|
+
try {
|
|
236
|
+
const outputDir = options.output;
|
|
237
|
+
// Create output directories
|
|
238
|
+
const validDir = path.join(outputDir, 'valid');
|
|
239
|
+
const invalidDir = path.join(outputDir, 'invalid');
|
|
240
|
+
const edgeDir = path.join(outputDir, 'edge');
|
|
241
|
+
const bundlesDir = path.join(outputDir, 'bundles');
|
|
242
|
+
fs.mkdirSync(validDir, { recursive: true });
|
|
243
|
+
fs.mkdirSync(invalidDir, { recursive: true });
|
|
244
|
+
fs.mkdirSync(edgeDir, { recursive: true });
|
|
245
|
+
fs.mkdirSync(bundlesDir, { recursive: true });
|
|
246
|
+
// Determine timestamp
|
|
247
|
+
const now = options.now ? parseInt(options.now, 10) : Math.floor(Date.now() / 1000);
|
|
248
|
+
// Generate key pair
|
|
249
|
+
// Note: --seed option is documented but full determinism requires proper seed-to-key derivation
|
|
250
|
+
const keyPair = await (0, crypto_1.generateKeypair)();
|
|
251
|
+
const publicKeyBytes = keyPair.publicKey;
|
|
252
|
+
const privateKeyBytes = keyPair.privateKey;
|
|
253
|
+
// Build KID
|
|
254
|
+
const kid = options.kid || `sandbox-${new Date(now * 1000).toISOString().slice(0, 7)}`;
|
|
255
|
+
// Build JWK for the key
|
|
256
|
+
const publicJwk = {
|
|
257
|
+
kty: 'OKP',
|
|
258
|
+
crv: 'Ed25519',
|
|
259
|
+
x: (0, crypto_1.base64urlEncode)(publicKeyBytes),
|
|
260
|
+
kid,
|
|
261
|
+
use: 'sig',
|
|
262
|
+
alg: 'EdDSA',
|
|
263
|
+
};
|
|
264
|
+
const generatedFiles = [];
|
|
265
|
+
// Get samples to generate
|
|
266
|
+
let samplesToGenerate = (0, samples_loader_js_1.getSamples)(options.samples);
|
|
267
|
+
if (options.category) {
|
|
268
|
+
samplesToGenerate = samplesToGenerate.filter((s) => s.category === options.category);
|
|
269
|
+
}
|
|
270
|
+
for (const sample of samplesToGenerate) {
|
|
271
|
+
const targetDir = sample.category === 'valid'
|
|
272
|
+
? validDir
|
|
273
|
+
: sample.category === 'edge'
|
|
274
|
+
? edgeDir
|
|
275
|
+
: invalidDir;
|
|
276
|
+
const filename = `${sample.id}.${options.format === 'json' ? 'json' : 'jws'}`;
|
|
277
|
+
const filepath = path.join(targetDir, filename);
|
|
278
|
+
// Apply time adjustments
|
|
279
|
+
const adjustedClaims = applyTimeAdjustments(sample.claims, sample.id, now);
|
|
280
|
+
if (options.format === 'json') {
|
|
281
|
+
// Write as decoded JSON
|
|
282
|
+
const output = {
|
|
283
|
+
$comment: sample.description,
|
|
284
|
+
header: {
|
|
285
|
+
alg: 'EdDSA',
|
|
286
|
+
typ: 'peac-receipt/0.1',
|
|
287
|
+
kid,
|
|
288
|
+
},
|
|
289
|
+
payload: adjustedClaims,
|
|
290
|
+
...(sample.expectedError ? { expected_error: sample.expectedError } : {}),
|
|
291
|
+
};
|
|
292
|
+
fs.writeFileSync(filepath, JSON.stringify(output, null, 2));
|
|
293
|
+
}
|
|
294
|
+
else {
|
|
295
|
+
// Create actual JWS using @peac/crypto sign function
|
|
296
|
+
const jws = await (0, crypto_1.sign)(adjustedClaims, privateKeyBytes, kid);
|
|
297
|
+
fs.writeFileSync(filepath, jws);
|
|
298
|
+
}
|
|
299
|
+
generatedFiles.push(filepath);
|
|
300
|
+
}
|
|
301
|
+
// Write JWKS file for verification
|
|
302
|
+
const jwksPath = path.join(bundlesDir, 'sandbox-jwks.json');
|
|
303
|
+
const jwks = {
|
|
304
|
+
keys: [publicJwk],
|
|
305
|
+
};
|
|
306
|
+
fs.writeFileSync(jwksPath, JSON.stringify(jwks, null, 2));
|
|
307
|
+
generatedFiles.push(jwksPath);
|
|
308
|
+
// Write offline verification bundle
|
|
309
|
+
const bundlePath = path.join(bundlesDir, 'offline-verification.json');
|
|
310
|
+
const bundle = {
|
|
311
|
+
$comment: 'Offline verification bundle with sample receipts and JWKS',
|
|
312
|
+
description: 'Bundle for offline verification testing. Contains test JWKS and sample metadata.',
|
|
313
|
+
generated_at: new Date(now * 1000).toISOString(),
|
|
314
|
+
generator: {
|
|
315
|
+
name: 'peac-cli',
|
|
316
|
+
version: (0, version_js_1.getVersion)(),
|
|
317
|
+
},
|
|
318
|
+
jwks,
|
|
319
|
+
samples: samplesToGenerate.map((s) => ({
|
|
320
|
+
id: s.id,
|
|
321
|
+
description: s.description,
|
|
322
|
+
category: s.category,
|
|
323
|
+
})),
|
|
324
|
+
notes: [
|
|
325
|
+
'Sample timestamps are based on --now parameter or generation time.',
|
|
326
|
+
'Do NOT use sandbox samples in production.',
|
|
327
|
+
],
|
|
328
|
+
};
|
|
329
|
+
fs.writeFileSync(bundlePath, JSON.stringify(bundle, null, 2));
|
|
330
|
+
generatedFiles.push(bundlePath);
|
|
331
|
+
if (globalOpts.json) {
|
|
332
|
+
console.log(JSON.stringify({
|
|
333
|
+
success: true,
|
|
334
|
+
output_dir: outputDir,
|
|
335
|
+
files_generated: generatedFiles.length,
|
|
336
|
+
files: generatedFiles,
|
|
337
|
+
timestamp: now,
|
|
338
|
+
kid,
|
|
339
|
+
}, null, 2));
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
console.log(`Sample receipts generated successfully!\n`);
|
|
343
|
+
console.log(`Output directory: ${outputDir}`);
|
|
344
|
+
console.log(`Files generated: ${generatedFiles.length}`);
|
|
345
|
+
console.log(`Timestamp: ${now} (${new Date(now * 1000).toISOString()})`);
|
|
346
|
+
console.log(`Key ID: ${kid}\n`);
|
|
347
|
+
console.log('Generated files:');
|
|
348
|
+
for (const f of generatedFiles) {
|
|
349
|
+
console.log(` ${path.relative(outputDir, f)}`);
|
|
350
|
+
}
|
|
351
|
+
console.log(`\nJWKS for verification: ${path.relative(outputDir, jwksPath)}`);
|
|
352
|
+
}
|
|
353
|
+
process.exitCode = 0;
|
|
354
|
+
}
|
|
355
|
+
catch (err) {
|
|
356
|
+
outputError(err.message, {}, globalOpts);
|
|
357
|
+
process.exitCode = 1;
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
//# sourceMappingURL=samples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samples.js","sourceRoot":"","sources":["../../src/commands/samples.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAoC;AACpC,uCAAyB;AACzB,2CAA6B;AAC7B,yCAAsE;AACtE,gEAA0F;AAC1F,kDAA+C;AAS/C;;GAEG;AACH,SAAS,gBAAgB,CAAC,GAAY;IACpC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;IAC1B,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IACvB,OAAO,MAAM,CAAC,IAAI,EAA0B,CAAC;AAC/C,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAClB,KAAa,EACb,OAAgC,EAChC,IAA0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AE,EAAE,UAAU,CAAC,CAAC;QACpD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow DAG verification CLI commands
|
|
3
|
+
*
|
|
4
|
+
* Commands:
|
|
5
|
+
* - verify: Verify workflow DAG from receipts or workflow contexts
|
|
6
|
+
*
|
|
7
|
+
* @since v0.10.1
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
export declare const workflowCommand: Command;
|
|
11
|
+
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/commands/workflow.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4MpC,eAAO,MAAM,eAAe,SAAW,CAAC"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Workflow DAG verification CLI commands
|
|
4
|
+
*
|
|
5
|
+
* Commands:
|
|
6
|
+
* - verify: Verify workflow DAG from receipts or workflow contexts
|
|
7
|
+
*
|
|
8
|
+
* @since v0.10.1
|
|
9
|
+
*/
|
|
10
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
27
|
+
var ownKeys = function(o) {
|
|
28
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
29
|
+
var ar = [];
|
|
30
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
31
|
+
return ar;
|
|
32
|
+
};
|
|
33
|
+
return ownKeys(o);
|
|
34
|
+
};
|
|
35
|
+
return function (mod) {
|
|
36
|
+
if (mod && mod.__esModule) return mod;
|
|
37
|
+
var result = {};
|
|
38
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
39
|
+
__setModuleDefault(result, mod);
|
|
40
|
+
return result;
|
|
41
|
+
};
|
|
42
|
+
})();
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.workflowCommand = void 0;
|
|
45
|
+
const commander_1 = require("commander");
|
|
46
|
+
const fs = __importStar(require("fs"));
|
|
47
|
+
const audit_1 = require("@peac/audit");
|
|
48
|
+
function getGlobalOptions(cmd) {
|
|
49
|
+
const parent = cmd.parent?.parent ?? cmd.parent;
|
|
50
|
+
return {
|
|
51
|
+
json: parent?.opts?.()?.json,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function output(data, options, text) {
|
|
55
|
+
if (options.json) {
|
|
56
|
+
console.log(JSON.stringify(data, null, 2));
|
|
57
|
+
}
|
|
58
|
+
else if (text) {
|
|
59
|
+
console.log(text);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function outputError(message, details, options) {
|
|
63
|
+
if (options.json) {
|
|
64
|
+
console.error(JSON.stringify({ error: message, ...details }, null, 2));
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
console.error(`Error: ${message}`);
|
|
68
|
+
if (Object.keys(details).length > 0) {
|
|
69
|
+
console.error(` Details: ${JSON.stringify(details)}`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// -----------------------------------------------------------------------------
|
|
74
|
+
// Workflow Command
|
|
75
|
+
// -----------------------------------------------------------------------------
|
|
76
|
+
const workflow = new commander_1.Command('workflow').description('Workflow DAG operations (v0.10.1+)');
|
|
77
|
+
/**
|
|
78
|
+
* peac workflow verify <file> [--format json|text]
|
|
79
|
+
*
|
|
80
|
+
* Verifies workflow DAG integrity from a JSON file containing WorkflowContext objects.
|
|
81
|
+
*/
|
|
82
|
+
workflow
|
|
83
|
+
.command('verify')
|
|
84
|
+
.description('Verify workflow DAG from a JSON file of workflow contexts')
|
|
85
|
+
.argument('<file>', 'Path to JSON file with WorkflowContext array')
|
|
86
|
+
.option('-f, --format <format>', 'Output format: json or text', 'text')
|
|
87
|
+
.action(async (filePath, options, cmd) => {
|
|
88
|
+
const globalOpts = getGlobalOptions(cmd);
|
|
89
|
+
try {
|
|
90
|
+
// Validate file exists
|
|
91
|
+
if (!fs.existsSync(filePath)) {
|
|
92
|
+
outputError('File not found', { path: filePath }, globalOpts);
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
// Read and parse file
|
|
96
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
97
|
+
let contexts;
|
|
98
|
+
try {
|
|
99
|
+
const parsed = JSON.parse(content);
|
|
100
|
+
// Handle both array and object with 'contexts' field
|
|
101
|
+
contexts = Array.isArray(parsed) ? parsed : parsed.contexts ?? [];
|
|
102
|
+
}
|
|
103
|
+
catch (parseErr) {
|
|
104
|
+
outputError('Invalid JSON', { error: parseErr.message }, globalOpts);
|
|
105
|
+
process.exit(1);
|
|
106
|
+
}
|
|
107
|
+
if (contexts.length === 0) {
|
|
108
|
+
outputError('No workflow contexts found', { path: filePath }, globalOpts);
|
|
109
|
+
process.exit(1);
|
|
110
|
+
}
|
|
111
|
+
// Verify DAG
|
|
112
|
+
const result = (0, audit_1.verifyWorkflowDag)(contexts);
|
|
113
|
+
// Format output
|
|
114
|
+
if (options.format === 'json' || globalOpts.json) {
|
|
115
|
+
console.log(JSON.stringify(result, null, 2));
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
// Text format
|
|
119
|
+
if (result.valid) {
|
|
120
|
+
console.log('Workflow DAG verification: VALID');
|
|
121
|
+
console.log('');
|
|
122
|
+
console.log('Statistics:');
|
|
123
|
+
console.log(` Steps: ${result.stats.stepCount}`);
|
|
124
|
+
console.log(` Root steps: ${result.stats.rootCount}`);
|
|
125
|
+
console.log(` Max depth: ${result.stats.maxDepth}`);
|
|
126
|
+
console.log(` Total edges: ${result.stats.totalEdges}`);
|
|
127
|
+
console.log(` Unique workflow IDs: ${result.stats.uniqueWorkflowIds}`);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
console.log('Workflow DAG verification: INVALID');
|
|
131
|
+
console.log('');
|
|
132
|
+
console.log(`Violations (${result.violations.length}):`);
|
|
133
|
+
for (const v of result.violations) {
|
|
134
|
+
console.log(` - [${v.code}] ${v.message}`);
|
|
135
|
+
if (v.details.step_id) {
|
|
136
|
+
console.log(` Step: ${v.details.step_id}`);
|
|
137
|
+
}
|
|
138
|
+
if (v.details.parent_step_id) {
|
|
139
|
+
console.log(` Parent: ${v.details.parent_step_id}`);
|
|
140
|
+
}
|
|
141
|
+
if (v.details.cycle_path) {
|
|
142
|
+
console.log(` Cycle: ${v.details.cycle_path.join(' -> ')}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
console.log('');
|
|
146
|
+
console.log('Statistics:');
|
|
147
|
+
console.log(` Steps: ${result.stats.stepCount}`);
|
|
148
|
+
console.log(` Root steps: ${result.stats.rootCount}`);
|
|
149
|
+
console.log(` Max depth: ${result.stats.maxDepth}`);
|
|
150
|
+
console.log(` Total edges: ${result.stats.totalEdges}`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
// Exit code based on validity
|
|
154
|
+
process.exit(result.valid ? 0 : 1);
|
|
155
|
+
}
|
|
156
|
+
catch (err) {
|
|
157
|
+
outputError(err.message, {}, globalOpts);
|
|
158
|
+
process.exit(1);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
/**
|
|
162
|
+
* peac workflow stats <file>
|
|
163
|
+
*
|
|
164
|
+
* Show statistics for a workflow DAG without full verification.
|
|
165
|
+
*/
|
|
166
|
+
workflow
|
|
167
|
+
.command('stats')
|
|
168
|
+
.description('Show workflow DAG statistics')
|
|
169
|
+
.argument('<file>', 'Path to JSON file with WorkflowContext array')
|
|
170
|
+
.action(async (filePath, options, cmd) => {
|
|
171
|
+
const globalOpts = getGlobalOptions(cmd);
|
|
172
|
+
try {
|
|
173
|
+
// Validate file exists
|
|
174
|
+
if (!fs.existsSync(filePath)) {
|
|
175
|
+
outputError('File not found', { path: filePath }, globalOpts);
|
|
176
|
+
process.exit(1);
|
|
177
|
+
}
|
|
178
|
+
// Read and parse file
|
|
179
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
180
|
+
let contexts;
|
|
181
|
+
try {
|
|
182
|
+
const parsed = JSON.parse(content);
|
|
183
|
+
contexts = Array.isArray(parsed) ? parsed : parsed.contexts ?? [];
|
|
184
|
+
}
|
|
185
|
+
catch (parseErr) {
|
|
186
|
+
outputError('Invalid JSON', { error: parseErr.message }, globalOpts);
|
|
187
|
+
process.exit(1);
|
|
188
|
+
}
|
|
189
|
+
if (contexts.length === 0) {
|
|
190
|
+
outputError('No workflow contexts found', { path: filePath }, globalOpts);
|
|
191
|
+
process.exit(1);
|
|
192
|
+
}
|
|
193
|
+
// Run verification to get stats
|
|
194
|
+
const result = (0, audit_1.verifyWorkflowDag)(contexts);
|
|
195
|
+
output({
|
|
196
|
+
file: filePath,
|
|
197
|
+
valid: result.valid,
|
|
198
|
+
stats: result.stats,
|
|
199
|
+
violation_count: result.violations.length,
|
|
200
|
+
}, globalOpts, `Workflow: ${filePath}
|
|
201
|
+
Steps: ${result.stats.stepCount}
|
|
202
|
+
Root steps: ${result.stats.rootCount}
|
|
203
|
+
Max depth: ${result.stats.maxDepth}
|
|
204
|
+
Total edges: ${result.stats.totalEdges}
|
|
205
|
+
Unique workflow IDs: ${result.stats.uniqueWorkflowIds}
|
|
206
|
+
Valid: ${result.valid}${result.violations.length > 0 ? `\n Violations: ${result.violations.length}` : ''}`);
|
|
207
|
+
}
|
|
208
|
+
catch (err) {
|
|
209
|
+
outputError(err.message, {}, globalOpts);
|
|
210
|
+
process.exit(1);
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
exports.workflowCommand = workflow;
|
|
214
|
+
//# sourceMappingURL=workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/commands/workflow.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAoC;AACpC,uCAAyB;AACzB,uCAA4E;AAW5E,SAAS,gBAAgB,CAAC,GAAY;IACpC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC;IAChD,OAAO;QACL,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI;KAC7B,CAAC;AACJ,CAAC;AAED,SAAS,MAAM,CACb,IAA6B,EAC7B,OAAsB,EACtB,IAAa;IAEb,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;SAAM,IAAI,IAAI,EAAE,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC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