@peac/cli 0.9.18 → 0.10.0

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/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2025 PEAC Protocol Contributors
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/dist/cli.js CHANGED
@@ -10,6 +10,7 @@ const discover_js_1 = require("./commands/discover.js");
10
10
  const hash_js_1 = require("./commands/hash.js");
11
11
  const verify_js_1 = require("./commands/verify.js");
12
12
  const index_js_1 = require("./commands/bridge/index.js");
13
+ const bundle_js_1 = require("./commands/bundle.js");
13
14
  const utils_js_1 = require("./utils.js");
14
15
  const program = new commander_1.Command();
15
16
  const exit = (0, utils_js_1.createExitHandler)();
@@ -72,6 +73,8 @@ program
72
73
  });
73
74
  // peac bridge {install|start|stop|status}
74
75
  program.addCommand((0, index_js_1.bridgeCommand)());
76
+ // peac bundle {create|verify|info}
77
+ program.addCommand(bundle_js_1.bundleCommand);
75
78
  // Handle unknown commands
76
79
  program.on('command:*', () => {
77
80
  console.error('Invalid command. See --help for available commands.');
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AACA;;;GAGG;;AAEH,yCAAoC;AACpC,wDAAyD;AACzD,gDAAiD;AACjD,oDAAqD;AACrD,yDAA2D;AAC3D,yCAA6D;AAE7D,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAC9B,MAAM,IAAI,GAAG,IAAA,4BAAiB,GAAE,CAAC;AAEjC,OAAO;KACJ,IAAI,CAAC,MAAM,CAAC;KACZ,WAAW,CAAC,kEAAkE,CAAC;KAC/E,OAAO,CAAC,UAAU,CAAC,CAAC;AAEvB,iBAAiB;AACjB,OAAO;KACJ,MAAM,CAAC,YAAY,EAAE,uBAAuB,CAAC;KAC7C,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC;KACzC,MAAM,CAAC,oBAAoB,EAAE,iCAAiC,EAAE,MAAM,CAAC,CAAC;AAE3E,sBAAsB;AACtB,OAAO;KACJ,OAAO,CAAC,gBAAgB,CAAC;KACzB,WAAW,CAAC,oDAAoD,CAAC;KACjE,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;IAC7B,MAAM,aAAa,GAAG,OAAO,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EAAC,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACtD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC,CAAC;AAEL,0CAA0C;AAC1C,OAAO,CAAC,UAAU,CAAC,IAAA,wBAAa,GAAE,CAAC,CAAC;AAEpC,mCAAmC;AACnC,OAAO,CAAC,UAAU,CAAC,yBAAa,CAAC,CAAC;AAElC,0BAA0B;AAC1B,OAAO,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;IAC3B,OAAO,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACrE,IAAI,CAAC,CAAC,CAAC,CAAC;AACV,CAAC,CAAC,CAAC;AAEH,+BAA+B;AAC/B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,oCAAoC;AACpC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;IACrB,IAAI,CAAC,CAAC,CAAC,CAAC;AACV,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * PEAC Bundle CLI Commands (v0.9.30+)
3
+ *
4
+ * Commands for creating and verifying dispute bundles:
5
+ * - create: Create a dispute bundle from receipts and keys
6
+ * - verify: Verify a dispute bundle (offline by default)
7
+ * - info: Show bundle manifest information
8
+ *
9
+ * Automation flags:
10
+ * - --json: Machine-readable JSON output
11
+ * - --online: Enable external key fetching (verify only, not yet implemented)
12
+ */
13
+ import { Command } from 'commander';
14
+ declare const bundle: Command;
15
+ export { bundle as bundleCommand };
16
+ //# sourceMappingURL=bundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/commands/bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+FpC,QAAA,MAAM,MAAM,SAA4E,CAAC;AA8RzF,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,CAAC"}
@@ -0,0 +1,363 @@
1
+ "use strict";
2
+ /**
3
+ * PEAC Bundle CLI Commands (v0.9.30+)
4
+ *
5
+ * Commands for creating and verifying dispute bundles:
6
+ * - create: Create a dispute bundle from receipts and keys
7
+ * - verify: Verify a dispute bundle (offline by default)
8
+ * - info: Show bundle manifest information
9
+ *
10
+ * Automation flags:
11
+ * - --json: Machine-readable JSON output
12
+ * - --online: Enable external key fetching (verify only, not yet implemented)
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.bundleCommand = void 0;
49
+ const commander_1 = require("commander");
50
+ const fs = __importStar(require("fs"));
51
+ const path = __importStar(require("path"));
52
+ const audit_1 = require("@peac/audit");
53
+ /**
54
+ * Get global options from parent command
55
+ */
56
+ function getGlobalOptions(cmd) {
57
+ const parent = cmd.parent;
58
+ if (!parent)
59
+ return {};
60
+ return parent.opts();
61
+ }
62
+ /**
63
+ * Output result - handles JSON vs human-readable format
64
+ */
65
+ function output(data, opts, humanMessage) {
66
+ if (opts.json) {
67
+ console.log(JSON.stringify(data, null, 2));
68
+ }
69
+ else if (humanMessage) {
70
+ console.log(humanMessage);
71
+ }
72
+ }
73
+ /**
74
+ * Output error - handles JSON vs human-readable format
75
+ */
76
+ function outputError(error, details, opts) {
77
+ if (opts.json) {
78
+ console.log(JSON.stringify({ success: false, error, ...details }, null, 2));
79
+ }
80
+ else {
81
+ console.error(`Error: ${error}`);
82
+ if (details.code) {
83
+ console.error(`Code: ${details.code}`);
84
+ }
85
+ }
86
+ }
87
+ /**
88
+ * Read receipts from a directory or files
89
+ */
90
+ function readReceipts(receiptsPath) {
91
+ const receipts = [];
92
+ const stat = fs.statSync(receiptsPath);
93
+ if (stat.isDirectory()) {
94
+ // Read all .jws files in directory
95
+ const files = fs.readdirSync(receiptsPath);
96
+ for (const file of files) {
97
+ if (file.endsWith('.jws')) {
98
+ const content = fs.readFileSync(path.join(receiptsPath, file), 'utf8').trim();
99
+ receipts.push(content);
100
+ }
101
+ }
102
+ }
103
+ else {
104
+ // Single file - read it
105
+ const content = fs.readFileSync(receiptsPath, 'utf8').trim();
106
+ receipts.push(content);
107
+ }
108
+ return receipts;
109
+ }
110
+ /**
111
+ * Read JWKS from file
112
+ */
113
+ function readJwks(keysPath) {
114
+ const content = fs.readFileSync(keysPath, 'utf8');
115
+ return JSON.parse(content);
116
+ }
117
+ const bundle = new commander_1.Command('bundle').description('Dispute bundle operations (v0.9.30+)');
118
+ exports.bundleCommand = bundle;
119
+ /**
120
+ * peac bundle create --dispute <ref> --receipts <path> --keys <file> [--policy <file>] -o <output>
121
+ */
122
+ bundle
123
+ .command('create')
124
+ .description('Create a dispute bundle from receipts and keys')
125
+ .requiredOption('-d, --dispute <ref>', 'Dispute reference (ULID)')
126
+ .requiredOption('-r, --receipts <path>', 'Path to receipts (directory or file)')
127
+ .requiredOption('-k, --keys <file>', 'Path to JWKS file with public keys')
128
+ .option('-p, --policy <file>', 'Path to policy YAML file')
129
+ .option('-c, --created-by <uri>', 'Creator URI (default: cli)')
130
+ .requiredOption('-o, --output <file>', 'Output bundle file path')
131
+ .option('--bundle-id <id>', 'Custom bundle ID (generated if not provided)')
132
+ .action(async (options, cmd) => {
133
+ const globalOpts = getGlobalOptions(cmd);
134
+ try {
135
+ // Validate input paths exist
136
+ if (!fs.existsSync(options.receipts)) {
137
+ outputError('Receipts path not found', { path: options.receipts }, globalOpts);
138
+ process.exit(1);
139
+ }
140
+ if (!fs.existsSync(options.keys)) {
141
+ outputError('JWKS file not found', { path: options.keys }, globalOpts);
142
+ process.exit(1);
143
+ }
144
+ // Read inputs
145
+ const receipts = readReceipts(options.receipts);
146
+ const keys = readJwks(options.keys);
147
+ if (receipts.length === 0) {
148
+ outputError('No receipts found', { path: options.receipts }, globalOpts);
149
+ process.exit(1);
150
+ }
151
+ // Read policy if provided
152
+ let policy;
153
+ if (options.policy) {
154
+ if (!fs.existsSync(options.policy)) {
155
+ outputError('Policy file not found', { path: options.policy }, globalOpts);
156
+ process.exit(1);
157
+ }
158
+ policy = fs.readFileSync(options.policy, 'utf8');
159
+ }
160
+ // Create bundle
161
+ const createOptions = {
162
+ dispute_ref: options.dispute,
163
+ created_by: options.createdBy ?? 'peac-cli',
164
+ receipts,
165
+ keys,
166
+ policy,
167
+ bundle_id: options.bundleId,
168
+ };
169
+ const result = await (0, audit_1.createDisputeBundle)(createOptions);
170
+ if (!result.ok) {
171
+ outputError(result.error.message, { code: result.error.code }, globalOpts);
172
+ process.exit(1);
173
+ }
174
+ // Write output
175
+ fs.writeFileSync(options.output, result.value);
176
+ // Read back to get manifest info
177
+ const readResult = await (0, audit_1.readDisputeBundle)(result.value);
178
+ if (readResult.ok) {
179
+ const manifest = readResult.value.manifest;
180
+ output({
181
+ success: true,
182
+ bundle_id: manifest.bundle_id,
183
+ content_hash: manifest.content_hash,
184
+ receipts_count: manifest.receipts.length,
185
+ keys_count: manifest.keys.length,
186
+ output_path: options.output,
187
+ }, globalOpts, `Bundle created successfully:
188
+ Bundle ID: ${manifest.bundle_id}
189
+ Content hash: ${manifest.content_hash}
190
+ Receipts: ${manifest.receipts.length}
191
+ Keys: ${manifest.keys.length}
192
+ Output: ${options.output}`);
193
+ }
194
+ else {
195
+ output({ success: true, output_path: options.output }, globalOpts, `Bundle created: ${options.output}`);
196
+ }
197
+ process.exit(0);
198
+ }
199
+ catch (err) {
200
+ outputError(err.message, {}, globalOpts);
201
+ process.exit(1);
202
+ }
203
+ });
204
+ /**
205
+ * peac bundle verify <bundle> [--online] [--output <file>] [--format json|text]
206
+ *
207
+ * NOTE: Verification is OFFLINE by default - uses only keys bundled in the archive.
208
+ * Use --online to enable external key fetching (not yet implemented).
209
+ */
210
+ bundle
211
+ .command('verify')
212
+ .description('Verify a dispute bundle (offline by default)')
213
+ .argument('<bundle>', 'Path to bundle ZIP file')
214
+ .option('--online', 'Allow external key fetching (not yet implemented)', false)
215
+ .option('-o, --output <file>', 'Output report to file')
216
+ .option('-f, --format <format>', 'Output format: json or text', 'text')
217
+ .action(async (bundlePath, options, cmd) => {
218
+ const globalOpts = getGlobalOptions(cmd);
219
+ try {
220
+ // Validate bundle exists
221
+ if (!fs.existsSync(bundlePath)) {
222
+ outputError('Bundle file not found', { path: bundlePath }, globalOpts);
223
+ process.exit(1);
224
+ }
225
+ // Read bundle
226
+ const zipBuffer = fs.readFileSync(bundlePath);
227
+ // Verify bundle - offline by default, online if explicitly requested
228
+ const offline = !options.online;
229
+ const result = await (0, audit_1.verifyBundle)(zipBuffer, { offline });
230
+ if (!result.ok) {
231
+ outputError(result.error.message, { code: result.error.code }, globalOpts);
232
+ process.exit(1);
233
+ }
234
+ const report = result.value;
235
+ // Format output
236
+ let outputContent;
237
+ if (options.format === 'json' || globalOpts.json) {
238
+ outputContent = (0, audit_1.serializeReport)(report, true);
239
+ }
240
+ else {
241
+ outputContent = (0, audit_1.formatReportText)(report);
242
+ }
243
+ // Write to file or stdout
244
+ if (options.output) {
245
+ fs.writeFileSync(options.output, outputContent);
246
+ output({
247
+ success: true,
248
+ report_hash: report.report_hash,
249
+ summary: report.summary,
250
+ recommendation: report.auditor_summary.recommendation,
251
+ output_path: options.output,
252
+ }, globalOpts, `Verification complete:
253
+ ${report.auditor_summary.headline}
254
+ Recommendation: ${report.auditor_summary.recommendation.toUpperCase()}
255
+ Report hash: ${report.report_hash}
256
+ Report saved to: ${options.output}`);
257
+ }
258
+ else if (globalOpts.json) {
259
+ // JSON to stdout
260
+ console.log(outputContent);
261
+ }
262
+ else {
263
+ // Text to stdout
264
+ console.log(outputContent);
265
+ }
266
+ // Exit code based on recommendation
267
+ const exitCode = report.auditor_summary.recommendation === 'valid' ? 0 : 1;
268
+ process.exit(exitCode);
269
+ }
270
+ catch (err) {
271
+ outputError(err.message, {}, globalOpts);
272
+ process.exit(1);
273
+ }
274
+ });
275
+ /**
276
+ * peac bundle info <bundle>
277
+ */
278
+ bundle
279
+ .command('info')
280
+ .description('Show bundle manifest information')
281
+ .argument('<bundle>', 'Path to bundle ZIP file')
282
+ .action(async (bundlePath, options, cmd) => {
283
+ const globalOpts = getGlobalOptions(cmd);
284
+ try {
285
+ // Validate bundle exists
286
+ if (!fs.existsSync(bundlePath)) {
287
+ outputError('Bundle file not found', { path: bundlePath }, globalOpts);
288
+ process.exit(1);
289
+ }
290
+ // Read bundle
291
+ const zipBuffer = fs.readFileSync(bundlePath);
292
+ const result = await (0, audit_1.readDisputeBundle)(zipBuffer);
293
+ if (!result.ok) {
294
+ outputError(result.error.message, { code: result.error.code }, globalOpts);
295
+ process.exit(1);
296
+ }
297
+ const { manifest, receipts, keys, policy } = result.value;
298
+ if (globalOpts.json) {
299
+ console.log(JSON.stringify({
300
+ success: true,
301
+ manifest: {
302
+ version: manifest.version,
303
+ bundle_id: manifest.bundle_id,
304
+ dispute_ref: manifest.dispute_ref,
305
+ created_by: manifest.created_by,
306
+ created_at: manifest.created_at,
307
+ time_range: manifest.time_range,
308
+ content_hash: manifest.content_hash,
309
+ receipts_count: manifest.receipts.length,
310
+ keys_count: manifest.keys.length,
311
+ has_policy: !!policy,
312
+ },
313
+ }, null, 2));
314
+ }
315
+ else {
316
+ console.log(`PEAC Dispute Bundle Info
317
+ ========================
318
+
319
+ Version: ${manifest.version}
320
+ Bundle ID: ${manifest.bundle_id}
321
+ Dispute Ref: ${manifest.dispute_ref}
322
+ Created By: ${manifest.created_by}
323
+ Created At: ${manifest.created_at}
324
+
325
+ Time Range
326
+ ----------
327
+ Start: ${manifest.time_range.start}
328
+ End: ${manifest.time_range.end}
329
+
330
+ Contents
331
+ --------
332
+ Receipts: ${manifest.receipts.length}
333
+ Keys: ${keys.keys.length}
334
+ Policy: ${policy ? 'Yes' : 'No'}
335
+
336
+ Integrity
337
+ ---------
338
+ Content Hash: ${manifest.content_hash}
339
+ `);
340
+ // List receipts
341
+ if (manifest.receipts.length > 0) {
342
+ console.log('Receipts:');
343
+ for (const receipt of manifest.receipts) {
344
+ console.log(` - ${receipt.receipt_id} (${receipt.issued_at})`);
345
+ }
346
+ console.log('');
347
+ }
348
+ // List keys
349
+ if (manifest.keys.length > 0) {
350
+ console.log('Keys:');
351
+ for (const key of manifest.keys) {
352
+ console.log(` - ${key.kid} (${key.alg})`);
353
+ }
354
+ }
355
+ }
356
+ process.exit(0);
357
+ }
358
+ catch (err) {
359
+ outputError(err.message, {}, globalOpts);
360
+ process.exit(1);
361
+ }
362
+ });
363
+ //# sourceMappingURL=bundle.js.map
@@ -0,0 +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OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;gBAC7C,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,CAAE,GAAa,CAAC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -6,6 +6,13 @@
6
6
  * - validate: Validate policy syntax and schema
7
7
  * - explain: Debug rule matching
8
8
  * - generate: Compile policy to deployment artifacts
9
+ * - list-profiles: List available policy profiles (v0.9.23+)
10
+ * - show-profile: Show profile details (v0.9.23+)
11
+ *
12
+ * Automation flags (v0.9.23+):
13
+ * - --json: Machine-readable JSON output
14
+ * - --yes: Skip confirmation prompts (auto-confirm)
15
+ * - --strict: Exit non-zero on warnings
9
16
  */
10
17
  import { Command } from 'commander';
11
18
  declare const policy: Command;
@@ -1 +1 @@
1
- {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/commands/policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyBpC,QAAA,MAAM,MAAM,SAA8D,CAAC;AAgX3E,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/commands/policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiFpC,QAAA,MAAM,MAAM,SAIsC,CAAC;AAmtBnD,OAAO,EAAE,MAAM,EAAE,CAAC"}