@peac/cli 0.12.5 → 0.12.6
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 +67 -41
- package/package.json +22 -9
package/README.md
CHANGED
|
@@ -1,28 +1,66 @@
|
|
|
1
1
|
# @peac/cli
|
|
2
2
|
|
|
3
|
-
PEAC protocol command-line tools.
|
|
3
|
+
PEAC protocol command-line tools for receipt verification, decoding, policy management, conformance testing, and evidence reconciliation.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
pnpm add -g @peac/cli
|
|
9
|
-
# or
|
|
10
|
-
npx @peac/cli
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
Or run directly without installing:
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npx @peac/cli verify <receipt.jws>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What It Does
|
|
18
|
+
|
|
19
|
+
`@peac/cli` provides the `peac` command for working with signed interaction receipts from the terminal. It supports verifying receipt signatures, decoding receipt contents, validating issuer configurations, managing policies, running conformance test suites, generating sample receipts, and reconciling evidence bundles.
|
|
20
|
+
|
|
21
|
+
## How Do I Use It?
|
|
22
|
+
|
|
23
|
+
### Verify a receipt
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
peac verify <jws>
|
|
27
|
+
peac verify receipt.jws --verbose
|
|
28
|
+
```
|
|
16
29
|
|
|
17
|
-
|
|
30
|
+
Decodes the receipt, displays claims (issuer, audience, amount, payment rail), and verifies the cryptographic signature. Exit code 0 on success, 1 on failure.
|
|
31
|
+
|
|
32
|
+
### Decode a receipt without verification
|
|
18
33
|
|
|
19
34
|
```bash
|
|
20
|
-
peac
|
|
35
|
+
peac decode <jws>
|
|
36
|
+
peac decode receipt.jws --json
|
|
21
37
|
```
|
|
22
38
|
|
|
23
|
-
|
|
39
|
+
Parses and displays the JWS header and claims payload without checking the signature. Use `--json` for machine-readable output.
|
|
24
40
|
|
|
25
|
-
|
|
41
|
+
### Validate an issuer configuration
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
peac validate-issuer path/to/peac-issuer.json
|
|
45
|
+
peac validate-issuer https://example.com
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Validates a `peac-issuer.json` file or fetches and validates one from an issuer URL. Displays issuer metadata including JWKS URI, supported algorithms, and payment rails.
|
|
49
|
+
|
|
50
|
+
### Policy management
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
peac policy init # Create a new policy file
|
|
54
|
+
peac policy validate policy.yaml # Validate policy syntax
|
|
55
|
+
peac policy explain policy.yaml # Debug rule matching
|
|
56
|
+
peac policy generate policy.yaml # Compile to deployment artifacts
|
|
57
|
+
peac policy list-profiles # List available policy profiles
|
|
58
|
+
peac policy show-profile <name> # Show profile details
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Use `--json` for machine-readable output, `--yes` to skip prompts, `--strict` to exit non-zero on warnings.
|
|
62
|
+
|
|
63
|
+
### Run conformance tests
|
|
26
64
|
|
|
27
65
|
```bash
|
|
28
66
|
peac conformance run # Standard level, text output
|
|
@@ -33,57 +71,45 @@ peac conformance run --category claims # Filter by category
|
|
|
33
71
|
peac conformance run --fixtures ./my-vectors # Custom fixtures path
|
|
34
72
|
```
|
|
35
73
|
|
|
36
|
-
|
|
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.
|
|
74
|
+
### List conformance fixtures
|
|
49
75
|
|
|
50
76
|
```bash
|
|
51
77
|
peac conformance list
|
|
52
78
|
peac conformance list --category claims
|
|
53
79
|
```
|
|
54
80
|
|
|
55
|
-
###
|
|
56
|
-
|
|
57
|
-
List available sample receipts.
|
|
81
|
+
### Reconcile evidence bundles
|
|
58
82
|
|
|
59
83
|
```bash
|
|
60
|
-
peac
|
|
61
|
-
peac samples list --category valid
|
|
84
|
+
peac reconcile <bundle-a.json> <bundle-b.json>
|
|
62
85
|
```
|
|
63
86
|
|
|
64
|
-
|
|
87
|
+
Merges two evidence bundles and detects conflicts using composite `(iss, jti)` keys with fallback resolution. Conflicts are surfaced for human decision; no auto-resolution.
|
|
65
88
|
|
|
66
|
-
|
|
89
|
+
### Generate sample receipts
|
|
67
90
|
|
|
68
91
|
```bash
|
|
69
|
-
peac samples
|
|
92
|
+
peac samples list # List available samples
|
|
93
|
+
peac samples show basic-receipt # Show a specific sample
|
|
94
|
+
peac samples generate --output ./out # Generate sample files
|
|
70
95
|
```
|
|
71
96
|
|
|
72
|
-
|
|
97
|
+
## Integrates With
|
|
73
98
|
|
|
74
|
-
|
|
99
|
+
- `@peac/protocol` (Layer 3): Receipt verification and issuance
|
|
100
|
+
- `@peac/crypto` (Layer 2): JWS decoding and signature operations
|
|
101
|
+
- `@peac/schema` (Layer 1): Receipt schema validation
|
|
102
|
+
- `@peac/audit`: Evidence bundle reading for reconciliation
|
|
103
|
+
- `@peac/disc`: Issuer discovery
|
|
104
|
+
- `@peac/policy-kit`: Policy loading, validation, and compilation
|
|
75
105
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
peac
|
|
79
|
-
```
|
|
106
|
+
## For Agent Developers
|
|
107
|
+
|
|
108
|
+
If you are building AI agents that produce or consume signed receipts, the CLI is useful for inspecting receipts during development and debugging. For programmatic integration, use `@peac/protocol` directly. For MCP-based tool integration, use [`@peac/mcp-server`](https://www.npmjs.com/package/@peac/mcp-server).
|
|
80
109
|
|
|
81
|
-
|
|
110
|
+
## For Operators
|
|
82
111
|
|
|
83
|
-
|
|
84
|
-
| ---------- | -------- | ------------------------------------ |
|
|
85
|
-
| `--output` | `stdout` | Output directory for generated files |
|
|
86
|
-
| `--format` | `jws` | Format: `jws`, `json` |
|
|
112
|
+
The CLI supports operator workflows including policy authoring (`peac policy init`), issuer configuration validation (`peac validate-issuer`), conformance testing (`peac conformance run`), and evidence reconciliation (`peac reconcile`). Use `--json` flags for integration with CI pipelines and monitoring systems.
|
|
87
113
|
|
|
88
114
|
## License
|
|
89
115
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peac/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"description": "PEAC protocol command-line tools",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://github.com/peacprotocol/peac.git",
|
|
12
|
+
"url": "git+https://github.com/peacprotocol/peac.git",
|
|
13
13
|
"directory": "packages/cli"
|
|
14
14
|
},
|
|
15
|
-
"author": "
|
|
15
|
+
"author": "PEAC Protocol Contributors",
|
|
16
16
|
"license": "Apache-2.0",
|
|
17
17
|
"bugs": {
|
|
18
18
|
"url": "https://github.com/peacprotocol/peac/issues"
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"chalk": "^4.1.2",
|
|
40
40
|
"commander": "^11.0.0",
|
|
41
|
-
"@peac/audit": "0.12.
|
|
42
|
-
"@peac/
|
|
43
|
-
"@peac/
|
|
44
|
-
"@peac/
|
|
45
|
-
"@peac/
|
|
46
|
-
"@peac/schema": "0.12.
|
|
41
|
+
"@peac/audit": "0.12.6",
|
|
42
|
+
"@peac/disc": "0.12.6",
|
|
43
|
+
"@peac/policy-kit": "0.12.6",
|
|
44
|
+
"@peac/protocol": "0.12.6",
|
|
45
|
+
"@peac/crypto": "0.12.6",
|
|
46
|
+
"@peac/schema": "0.12.6"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^22.19.11",
|
|
@@ -51,6 +51,19 @@
|
|
|
51
51
|
"vitest": "^4.0.0",
|
|
52
52
|
"tsup": "^8.0.0"
|
|
53
53
|
},
|
|
54
|
+
"keywords": [
|
|
55
|
+
"peac",
|
|
56
|
+
"peacprotocol",
|
|
57
|
+
"interaction-records",
|
|
58
|
+
"signed-records",
|
|
59
|
+
"receipts",
|
|
60
|
+
"originary",
|
|
61
|
+
"cli",
|
|
62
|
+
"command-line",
|
|
63
|
+
"verify",
|
|
64
|
+
"issue",
|
|
65
|
+
"decode"
|
|
66
|
+
],
|
|
54
67
|
"scripts": {
|
|
55
68
|
"prebuild": "rm -rf dist",
|
|
56
69
|
"build": "pnpm run build:js && pnpm run build:types",
|