@peac/cli 0.10.0 → 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.
Files changed (52) hide show
  1. package/README.md +78 -5
  2. package/dist/commands/conformance.d.ts +16 -0
  3. package/dist/commands/conformance.d.ts.map +1 -0
  4. package/dist/commands/conformance.js +301 -0
  5. package/dist/commands/conformance.js.map +1 -0
  6. package/dist/commands/samples.d.ts +17 -0
  7. package/dist/commands/samples.d.ts.map +1 -0
  8. package/dist/commands/samples.js +360 -0
  9. package/dist/commands/samples.js.map +1 -0
  10. package/dist/commands/workflow.d.ts +11 -0
  11. package/dist/commands/workflow.d.ts.map +1 -0
  12. package/dist/commands/workflow.js +214 -0
  13. package/dist/commands/workflow.js.map +1 -0
  14. package/dist/index.js +34 -11
  15. package/dist/index.js.map +1 -1
  16. package/dist/lib/conformance/digest.d.ts +64 -0
  17. package/dist/lib/conformance/digest.d.ts.map +1 -0
  18. package/dist/lib/conformance/digest.js +202 -0
  19. package/dist/lib/conformance/digest.js.map +1 -0
  20. package/dist/lib/conformance/index.d.ts +11 -0
  21. package/dist/lib/conformance/index.d.ts.map +1 -0
  22. package/dist/lib/conformance/index.js +30 -0
  23. package/dist/lib/conformance/index.js.map +1 -0
  24. package/dist/lib/conformance/manifest.d.ts +15 -0
  25. package/dist/lib/conformance/manifest.d.ts.map +1 -0
  26. package/dist/lib/conformance/manifest.js +66 -0
  27. package/dist/lib/conformance/manifest.js.map +1 -0
  28. package/dist/lib/conformance/profiles.d.ts +33 -0
  29. package/dist/lib/conformance/profiles.d.ts.map +1 -0
  30. package/dist/lib/conformance/profiles.js +138 -0
  31. package/dist/lib/conformance/profiles.js.map +1 -0
  32. package/dist/lib/conformance/types.d.ts +186 -0
  33. package/dist/lib/conformance/types.d.ts.map +1 -0
  34. package/dist/lib/conformance/types.js +8 -0
  35. package/dist/lib/conformance/types.js.map +1 -0
  36. package/dist/lib/conformance/validators.d.ts +27 -0
  37. package/dist/lib/conformance/validators.d.ts.map +1 -0
  38. package/dist/lib/conformance/validators.js +415 -0
  39. package/dist/lib/conformance/validators.js.map +1 -0
  40. package/dist/lib/conformance-runner.d.ts +29 -0
  41. package/dist/lib/conformance-runner.d.ts.map +1 -0
  42. package/dist/lib/conformance-runner.js +433 -0
  43. package/dist/lib/conformance-runner.js.map +1 -0
  44. package/dist/lib/samples-loader.d.ts +44 -0
  45. package/dist/lib/samples-loader.d.ts.map +1 -0
  46. package/dist/lib/samples-loader.js +311 -0
  47. package/dist/lib/samples-loader.js.map +1 -0
  48. package/dist/lib/version.d.ts +22 -0
  49. package/dist/lib/version.d.ts.map +1 -0
  50. package/dist/lib/version.js +61 -0
  51. package/dist/lib/version.js.map +1 -0
  52. package/package.json +17 -8
package/README.md CHANGED
@@ -1,16 +1,89 @@
1
1
  # @peac/cli
2
2
 
3
- PEAC protocol command-line tools
3
+ PEAC protocol command-line tools.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- pnpm add @peac/cli
8
+ pnpm add -g @peac/cli
9
+ # or
10
+ npx @peac/cli
9
11
  ```
10
12
 
11
- ## Documentation
13
+ ## Commands
12
14
 
13
- See [peacprotocol.org](https://peacprotocol.org) for full documentation.
15
+ ### `peac verify <receipt>`
16
+
17
+ Verify a PEAC receipt (JWS compact serialization).
18
+
19
+ ```bash
20
+ peac verify eyJhbGciOiJFZERTQSIs...
21
+ ```
22
+
23
+ ### `peac conformance run`
24
+
25
+ Run conformance tests against PEAC schema validators.
26
+
27
+ ```bash
28
+ peac conformance run # Standard level, text output
29
+ peac conformance run --level full # Full level
30
+ peac conformance run --output json # JSON output
31
+ peac conformance run --output markdown # Markdown report
32
+ peac conformance run --category claims # Filter by category
33
+ peac conformance run --fixtures ./my-vectors # Custom fixtures path
34
+ ```
35
+
36
+ **Options:**
37
+
38
+ | Option | Default | Description |
39
+ | ------------ | ---------- | -------------------------------------------------------- |
40
+ | `--level` | `standard` | Conformance level: `basic`, `standard`, `full` |
41
+ | `--output` | `text` | Output format: `text`, `json`, `markdown` |
42
+ | `--category` | all | Filter by category (e.g., `claims`, `signature`, `time`) |
43
+ | `--fixtures` | built-in | Path to custom conformance fixtures |
44
+ | `--verbose` | `false` | Show detailed test output |
45
+
46
+ ### `peac conformance list`
47
+
48
+ List available conformance test fixtures.
49
+
50
+ ```bash
51
+ peac conformance list
52
+ peac conformance list --category claims
53
+ ```
54
+
55
+ ### `peac samples list`
56
+
57
+ List available sample receipts.
58
+
59
+ ```bash
60
+ peac samples list
61
+ peac samples list --category valid
62
+ ```
63
+
64
+ ### `peac samples show <id>`
65
+
66
+ Display details of a specific sample receipt.
67
+
68
+ ```bash
69
+ peac samples show basic-receipt
70
+ ```
71
+
72
+ ### `peac samples generate`
73
+
74
+ Generate sample receipt files.
75
+
76
+ ```bash
77
+ peac samples generate --output ./samples
78
+ peac samples generate --format json
79
+ ```
80
+
81
+ **Options:**
82
+
83
+ | Option | Default | Description |
84
+ | ---------- | -------- | ------------------------------------ |
85
+ | `--output` | `stdout` | Output directory for generated files |
86
+ | `--format` | `jws` | Format: `jws`, `json` |
14
87
 
15
88
  ## License
16
89
 
@@ -20,4 +93,4 @@ Apache-2.0
20
93
 
21
94
  PEAC Protocol is an open source project stewarded by Originary and community contributors.
22
95
 
23
- [Originary](https://www.originary.xyz) | [Docs](https://peacprotocol.org) | [GitHub](https://github.com/peacprotocol/peac)
96
+ [Docs](https://www.peacprotocol.org) | [GitHub](https://github.com/peacprotocol/peac) | [Originary](https://www.originary.xyz)
@@ -0,0 +1,16 @@
1
+ /**
2
+ * PEAC Conformance CLI Commands (v0.10.8+)
3
+ *
4
+ * Commands for running conformance tests:
5
+ * - run: Run conformance tests against fixtures
6
+ * - list: List available conformance test fixtures
7
+ *
8
+ * Uses real validators from @peac/schema and generates reports
9
+ * conforming to peac-conformance-report/0.1.
10
+ *
11
+ * @packageDocumentation
12
+ */
13
+ import { Command } from 'commander';
14
+ declare const conformance: Command;
15
+ export { conformance };
16
+ //# sourceMappingURL=conformance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conformance.d.ts","sourceRoot":"","sources":["../../src/commands/conformance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoGpC,QAAA,MAAM,WAAW,SAE2B,CAAC;AA+M7C,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,301 @@
1
+ "use strict";
2
+ /**
3
+ * PEAC Conformance CLI Commands (v0.10.8+)
4
+ *
5
+ * Commands for running conformance tests:
6
+ * - run: Run conformance tests against fixtures
7
+ * - list: List available conformance test fixtures
8
+ *
9
+ * Uses real validators from @peac/schema and generates reports
10
+ * conforming to peac-conformance-report/0.1.
11
+ *
12
+ * @packageDocumentation
13
+ */
14
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
15
+ if (k2 === undefined) k2 = k;
16
+ var desc = Object.getOwnPropertyDescriptor(m, k);
17
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
18
+ desc = { enumerable: true, get: function() { return m[k]; } };
19
+ }
20
+ Object.defineProperty(o, k2, desc);
21
+ }) : (function(o, m, k, k2) {
22
+ if (k2 === undefined) k2 = k;
23
+ o[k2] = m[k];
24
+ }));
25
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
26
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
27
+ }) : function(o, v) {
28
+ o["default"] = v;
29
+ });
30
+ var __importStar = (this && this.__importStar) || (function () {
31
+ var ownKeys = function(o) {
32
+ ownKeys = Object.getOwnPropertyNames || function (o) {
33
+ var ar = [];
34
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
35
+ return ar;
36
+ };
37
+ return ownKeys(o);
38
+ };
39
+ return function (mod) {
40
+ if (mod && mod.__esModule) return mod;
41
+ var result = {};
42
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
43
+ __setModuleDefault(result, mod);
44
+ return result;
45
+ };
46
+ })();
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.conformance = void 0;
49
+ const commander_1 = require("commander");
50
+ const fs = __importStar(require("fs"));
51
+ const path = __importStar(require("path"));
52
+ const conformance_runner_js_1 = require("../lib/conformance-runner.js");
53
+ const version_js_1 = require("../lib/version.js");
54
+ /**
55
+ * Get global options from parent command
56
+ */
57
+ function getGlobalOptions(cmd) {
58
+ const parent = cmd.parent;
59
+ if (!parent)
60
+ return {};
61
+ return parent.opts();
62
+ }
63
+ /**
64
+ * Output error - handles JSON vs human-readable format
65
+ */
66
+ function outputError(error, details, opts) {
67
+ if (opts.json) {
68
+ console.log(JSON.stringify({ success: false, error, ...details }, null, 2));
69
+ }
70
+ else {
71
+ console.error(`Error: ${error}`);
72
+ if (details.code) {
73
+ console.error(`Code: ${details.code}`);
74
+ }
75
+ if (details.hint) {
76
+ console.error(`Hint: ${details.hint}`);
77
+ }
78
+ }
79
+ }
80
+ /**
81
+ * Find fixtures directory (relative to CLI package or repo root)
82
+ */
83
+ function findFixturesDir(customPath) {
84
+ // Use custom path if provided
85
+ if (customPath) {
86
+ if (fs.existsSync(customPath)) {
87
+ return customPath;
88
+ }
89
+ return null;
90
+ }
91
+ // Try relative to CLI package (when installed)
92
+ const cliPath = path.resolve(__dirname, '../../../../specs/conformance/fixtures');
93
+ if (fs.existsSync(cliPath)) {
94
+ return cliPath;
95
+ }
96
+ // Try relative to repo root (when running from source)
97
+ const repoPath = path.resolve(process.cwd(), 'specs/conformance/fixtures');
98
+ if (fs.existsSync(repoPath)) {
99
+ return repoPath;
100
+ }
101
+ // Try one level up (when running from packages/cli)
102
+ const upPath = path.resolve(process.cwd(), '../../specs/conformance/fixtures');
103
+ if (fs.existsSync(upPath)) {
104
+ return upPath;
105
+ }
106
+ return null;
107
+ }
108
+ /**
109
+ * List available fixture categories
110
+ */
111
+ function listCategories(fixturesDir) {
112
+ const entries = fs.readdirSync(fixturesDir, { withFileTypes: true });
113
+ return entries.filter((e) => e.isDirectory() && !e.name.startsWith('.')).map((e) => e.name);
114
+ }
115
+ /**
116
+ * Count fixtures in a category
117
+ */
118
+ function countFixtures(categoryPath) {
119
+ if (!fs.existsSync(categoryPath))
120
+ return 0;
121
+ const files = fs.readdirSync(categoryPath);
122
+ return files.filter((f) => f.endsWith('.json')).length;
123
+ }
124
+ const conformance = new commander_1.Command('conformance')
125
+ .description('PEAC conformance testing (v0.10.8+)')
126
+ .option('--json', 'Output in JSON format');
127
+ exports.conformance = conformance;
128
+ /**
129
+ * peac conformance run [options]
130
+ */
131
+ conformance
132
+ .command('run')
133
+ .description('Run conformance tests')
134
+ .option('-l, --level <level>', 'Conformance level: basic, standard, full', 'standard')
135
+ .option('-c, --category <category>', 'Test specific category only')
136
+ .option('-o, --output <format>', 'Output format: json, text, markdown', 'text')
137
+ .option('-v, --verbose', 'Show detailed test output')
138
+ .option('--fixtures <path>', 'Path to fixtures directory')
139
+ .option('--implementation <name>', 'Implementation name for report', '@peac/cli')
140
+ .action(async (options, cmd) => {
141
+ const globalOpts = getGlobalOptions(cmd);
142
+ const startTime = Date.now();
143
+ try {
144
+ // Find fixtures directory
145
+ const fixturesDir = findFixturesDir(options.fixtures);
146
+ if (!fixturesDir) {
147
+ outputError('Fixtures directory not found', {
148
+ hint: options.fixtures
149
+ ? `Specified path does not exist: ${options.fixtures}`
150
+ : 'Run from repo root, specify --fixtures <path>, or ensure specs/conformance/fixtures is available',
151
+ }, globalOpts);
152
+ process.exitCode = 1;
153
+ return;
154
+ }
155
+ // Validate level
156
+ const validLevels = ['basic', 'standard', 'full'];
157
+ if (!validLevels.includes(options.level)) {
158
+ outputError('Invalid conformance level', {
159
+ level: options.level,
160
+ valid: validLevels,
161
+ }, globalOpts);
162
+ process.exitCode = 1;
163
+ return;
164
+ }
165
+ // Set up callbacks for verbose output
166
+ const callbacks = options.verbose
167
+ ? {
168
+ onTestStart: (testId) => {
169
+ console.log(`Running: ${testId}`);
170
+ },
171
+ onTestComplete: (result) => {
172
+ const status = result.status === 'pass' ? 'PASS' : result.status === 'fail' ? 'FAIL' : 'SKIP';
173
+ console.log(` ${status}: ${result.id}`);
174
+ },
175
+ }
176
+ : undefined;
177
+ // Run conformance tests
178
+ const report = (0, conformance_runner_js_1.runConformance)({
179
+ fixturesDir,
180
+ level: options.level,
181
+ category: options.category,
182
+ implementationName: options.implementation,
183
+ implementationVersion: (0, version_js_1.getVersion)(),
184
+ }, callbacks);
185
+ // Add runtime metadata
186
+ report.implementation.runtime = (0, version_js_1.getRuntime)();
187
+ const commit = (0, version_js_1.getCommit)();
188
+ if (commit) {
189
+ report.implementation.commit = commit;
190
+ }
191
+ // Add meta section
192
+ report.meta = {
193
+ generated_at: new Date().toISOString(),
194
+ runner: {
195
+ name: 'peac-cli',
196
+ version: (0, version_js_1.getVersion)(),
197
+ },
198
+ duration_ms: Date.now() - startTime,
199
+ };
200
+ // Output based on format
201
+ if (options.output === 'json' || globalOpts.json) {
202
+ console.log(JSON.stringify(report, null, 2));
203
+ }
204
+ else if (options.output === 'markdown') {
205
+ console.log((0, conformance_runner_js_1.formatReportMarkdown)(report));
206
+ }
207
+ else {
208
+ console.log((0, conformance_runner_js_1.formatReportText)(report));
209
+ }
210
+ process.exitCode = report.summary.failed === 0 ? 0 : 1;
211
+ }
212
+ catch (err) {
213
+ outputError(err.message, {}, globalOpts);
214
+ process.exitCode = 1;
215
+ }
216
+ });
217
+ /**
218
+ * peac conformance list [--category <cat>]
219
+ */
220
+ conformance
221
+ .command('list')
222
+ .description('List available conformance test fixtures')
223
+ .option('-c, --category <category>', 'List fixtures in specific category')
224
+ .option('--fixtures <path>', 'Path to fixtures directory')
225
+ .action((options, cmd) => {
226
+ const globalOpts = getGlobalOptions(cmd);
227
+ try {
228
+ // Find fixtures directory
229
+ const fixturesDir = findFixturesDir(options.fixtures);
230
+ if (!fixturesDir) {
231
+ outputError('Fixtures directory not found', {
232
+ hint: options.fixtures
233
+ ? `Specified path does not exist: ${options.fixtures}`
234
+ : 'Run from repo root, specify --fixtures <path>, or ensure specs/conformance/fixtures is available',
235
+ }, globalOpts);
236
+ process.exitCode = 1;
237
+ return;
238
+ }
239
+ // Load manifest
240
+ const manifestPath = path.join(fixturesDir, 'manifest.json');
241
+ const manifest = fs.existsSync(manifestPath)
242
+ ? JSON.parse(fs.readFileSync(manifestPath, 'utf8'))
243
+ : {};
244
+ // List categories
245
+ const categories = listCategories(fixturesDir);
246
+ if (options.category) {
247
+ // List fixtures in specific category
248
+ if (!categories.includes(options.category)) {
249
+ outputError('Category not found', {
250
+ category: options.category,
251
+ available: categories,
252
+ }, globalOpts);
253
+ process.exitCode = 1;
254
+ return;
255
+ }
256
+ const categoryPath = path.join(fixturesDir, options.category);
257
+ const files = fs.readdirSync(categoryPath).filter((f) => f.endsWith('.json'));
258
+ const categoryManifest = manifest[options.category];
259
+ if (globalOpts.json) {
260
+ const fixtures = files.map((f) => ({
261
+ file: f,
262
+ description: categoryManifest?.[f]?.description || 'No description',
263
+ }));
264
+ console.log(JSON.stringify({ category: options.category, fixtures }, null, 2));
265
+ }
266
+ else {
267
+ console.log(`Fixtures in ${options.category}:\n`);
268
+ for (const file of files) {
269
+ const info = categoryManifest?.[file] || {};
270
+ const desc = info.description || 'No description';
271
+ console.log(` ${file}`);
272
+ console.log(` ${desc}\n`);
273
+ }
274
+ }
275
+ }
276
+ else {
277
+ // List all categories
278
+ if (globalOpts.json) {
279
+ const categorySummary = categories.map((cat) => ({
280
+ name: cat,
281
+ fixture_count: countFixtures(path.join(fixturesDir, cat)),
282
+ }));
283
+ console.log(JSON.stringify({ categories: categorySummary }, null, 2));
284
+ }
285
+ else {
286
+ console.log(`Available conformance test categories:\n`);
287
+ for (const cat of categories) {
288
+ const count = countFixtures(path.join(fixturesDir, cat));
289
+ console.log(` ${cat} (${count} fixtures)`);
290
+ }
291
+ console.log(`\nUse 'peac conformance list -c <category>' to see fixtures in a category.`);
292
+ }
293
+ }
294
+ process.exitCode = 0;
295
+ }
296
+ catch (err) {
297
+ outputError(err.message, {}, globalOpts);
298
+ process.exitCode = 1;
299
+ }
300
+ });
301
+ //# sourceMappingURL=conformance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conformance.js","sourceRoot":"","sources":["../../src/commands/conformance.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yCAAoC;AACpC,uCAAyB;AACzB,2CAA6B;AAC7B,wEAOsC;AACtC,kDAAsE;AAStE;;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,EAA8B,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAClB,KAAa,EACb,OAAgC,EAChC,IAA8B;IAE9B,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9E,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC;QACjC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,OAAO,CAAC,KAAK,CAAC,SAAS,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,OAAO,CAAC,KAAK,CAAC,SAAS,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;AACH,CAAC;AAED;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AAC,CAAC;IACvB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * PEAC Samples CLI Commands (v0.10.8+)
3
+ *
4
+ * Commands for working with sample receipts:
5
+ * - list: List available sample receipts
6
+ * - generate: Generate sample receipts for testing
7
+ * - show: Show details of a specific sample
8
+ *
9
+ * Uses specs/conformance/samples/ as canonical source when available,
10
+ * falls back to embedded samples when running outside the repo.
11
+ *
12
+ * @packageDocumentation
13
+ */
14
+ import { Command } from 'commander';
15
+ declare const samples: Command;
16
+ export { samples };
17
+ //# sourceMappingURL=samples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"samples.d.ts","sourceRoot":"","sources":["../../src/commands/samples.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoFpC,QAAA,MAAM,OAAO,SAE+B,CAAC;AAmR7C,OAAO,EAAE,OAAO,EAAE,CAAC"}