@uvrn/cli 1.0.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/README.md +340 -0
- package/dist/cli.d.ts +11 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +297 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/docs/CLI_GUIDE.md +618 -0
- package/jest.config.js +12 -0
- package/package.json +42 -0
- package/src/cli.ts +294 -0
- package/src/index.ts +6 -0
- package/test-bundle.json +25 -0
- package/test-receipt.json +1 -0
- package/tests/cli.test.ts +393 -0
- package/tsconfig.json +24 -0
package/README.md
ADDED
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
# @uvrn/cli
|
|
2
|
+
|
|
3
|
+
Command-line interface for the Loosechain Delta Engine. Transform data bundles into verifiable receipts using Layer-1 protocol infrastructure.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Global Installation (Recommended)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @uvrn/cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
After installation, the `delta-engine` command will be available globally:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
delta-engine --version
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Local Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @uvrn/cli
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then use with npx:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx delta-engine --version
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
1. **Create a bundle** (JSON file with your data):
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"bundleId": "example-001",
|
|
38
|
+
"claim": "Verify data consistency",
|
|
39
|
+
"thresholdPct": 0.05,
|
|
40
|
+
"dataSpecs": [
|
|
41
|
+
{
|
|
42
|
+
"id": "source-a",
|
|
43
|
+
"label": "Source A",
|
|
44
|
+
"sourceKind": "metric",
|
|
45
|
+
"originDocIds": ["doc-a"],
|
|
46
|
+
"metrics": [{ "key": "value", "value": 100 }]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "source-b",
|
|
50
|
+
"label": "Source B",
|
|
51
|
+
"sourceKind": "metric",
|
|
52
|
+
"originDocIds": ["doc-b"],
|
|
53
|
+
"metrics": [{ "key": "value", "value": 102 }]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
2. **Run the engine**:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
delta-engine run bundle.json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
3. **Get your receipt** (with deterministic hash):
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"bundleId": "example-001",
|
|
70
|
+
"deltaFinal": 0.01980198,
|
|
71
|
+
"sources": ["Source A", "Source B"],
|
|
72
|
+
"rounds": [...],
|
|
73
|
+
"outcome": "consensus",
|
|
74
|
+
"hash": "36247244c63f58e0b2908d2fad115f60677f29b59b67665579b9b6e8db727791"
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Commands
|
|
79
|
+
|
|
80
|
+
### `delta-engine run [bundle]`
|
|
81
|
+
|
|
82
|
+
Execute the delta engine on a bundle and generate a receipt.
|
|
83
|
+
|
|
84
|
+
**Input Sources:**
|
|
85
|
+
- File path: `delta-engine run bundle.json`
|
|
86
|
+
- Stdin: `cat bundle.json | delta-engine run`
|
|
87
|
+
- URL: `delta-engine run https://example.com/bundle.json`
|
|
88
|
+
|
|
89
|
+
**Options:**
|
|
90
|
+
- `-o, --output <file>` - Write output to file instead of stdout
|
|
91
|
+
- `-q, --quiet` - Suppress informational messages
|
|
92
|
+
- `-p, --pretty` - Pretty-print JSON output
|
|
93
|
+
|
|
94
|
+
**Examples:**
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Basic usage
|
|
98
|
+
delta-engine run bundle.json
|
|
99
|
+
|
|
100
|
+
# Save receipt to file with pretty formatting
|
|
101
|
+
delta-engine run bundle.json --output receipt.json --pretty
|
|
102
|
+
|
|
103
|
+
# Pipe from stdin
|
|
104
|
+
cat bundle.json | delta-engine run --pretty
|
|
105
|
+
|
|
106
|
+
# Fetch bundle from URL
|
|
107
|
+
delta-engine run https://api.example.com/bundle.json
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Exit Codes:**
|
|
111
|
+
- `0` - Success
|
|
112
|
+
- `1` - Invalid bundle
|
|
113
|
+
- `2` - Engine error
|
|
114
|
+
- `3` - I/O error
|
|
115
|
+
|
|
116
|
+
### `delta-engine validate [bundle]`
|
|
117
|
+
|
|
118
|
+
Validate bundle structure without running the engine.
|
|
119
|
+
|
|
120
|
+
**Options:**
|
|
121
|
+
- `-o, --output <file>` - Write output to file instead of stdout
|
|
122
|
+
- `-q, --quiet` - Suppress informational messages
|
|
123
|
+
- `-p, --pretty` - Pretty-print JSON output
|
|
124
|
+
|
|
125
|
+
**Examples:**
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Validate bundle structure
|
|
129
|
+
delta-engine validate bundle.json
|
|
130
|
+
|
|
131
|
+
# Quiet mode (only output JSON)
|
|
132
|
+
delta-engine validate bundle.json --quiet
|
|
133
|
+
|
|
134
|
+
# Output validation result to file
|
|
135
|
+
delta-engine validate bundle.json --output validation.json
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Output:**
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"valid": true
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Or if invalid:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"valid": false,
|
|
151
|
+
"error": "dataSpecs must be an array with at least 2 items"
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### `delta-engine verify [receipt]`
|
|
156
|
+
|
|
157
|
+
Verify receipt integrity by replaying hash computation.
|
|
158
|
+
|
|
159
|
+
**Options:**
|
|
160
|
+
- `-o, --output <file>` - Write output to file instead of stdout
|
|
161
|
+
- `-q, --quiet` - Suppress informational messages
|
|
162
|
+
- `-p, --pretty` - Pretty-print JSON output
|
|
163
|
+
|
|
164
|
+
**Examples:**
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Verify receipt integrity
|
|
168
|
+
delta-engine verify receipt.json
|
|
169
|
+
|
|
170
|
+
# Verify with pretty output
|
|
171
|
+
delta-engine verify receipt.json --pretty
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Output:**
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"verified": true,
|
|
179
|
+
"hash": "36247244c63f58e0b2908d2fad115f60677f29b59b67665579b9b6e8db727791"
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Or if verification fails:
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"verified": false,
|
|
188
|
+
"error": "Hash mismatch. Provided: abc123..., Computed: def456...",
|
|
189
|
+
"providedHash": "abc123...",
|
|
190
|
+
"recomputedHash": "def456..."
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Bundle Schema
|
|
195
|
+
|
|
196
|
+
A valid DeltaBundle must have:
|
|
197
|
+
|
|
198
|
+
- `bundleId` (string) - Unique identifier for this bundle
|
|
199
|
+
- `claim` (string) - Human-readable claim being verified
|
|
200
|
+
- `thresholdPct` (number) - Acceptable variance threshold (0.0 to 1.0)
|
|
201
|
+
- `dataSpecs` (array) - At least 2 data sources with:
|
|
202
|
+
- `id` (string) - Unique source identifier
|
|
203
|
+
- `label` (string) - Human-readable source name
|
|
204
|
+
- `sourceKind` (string) - One of: 'report', 'metric', 'chart', 'meta'
|
|
205
|
+
- `originDocIds` (array) - Source document identifiers
|
|
206
|
+
- `metrics` (array) - Metrics with:
|
|
207
|
+
- `key` (string) - Metric name
|
|
208
|
+
- `value` (number) - Metric value
|
|
209
|
+
- `unit` (string, optional) - Unit of measurement
|
|
210
|
+
- `ts` (string, optional) - ISO timestamp
|
|
211
|
+
|
|
212
|
+
**Optional:**
|
|
213
|
+
- `maxRounds` (number) - Maximum consensus rounds (default: 5)
|
|
214
|
+
|
|
215
|
+
## Receipt Schema
|
|
216
|
+
|
|
217
|
+
A DeltaReceipt includes:
|
|
218
|
+
|
|
219
|
+
- `bundleId` (string) - Original bundle identifier
|
|
220
|
+
- `deltaFinal` (number) - Final variance across all metrics
|
|
221
|
+
- `sources` (array) - Source labels in deterministic order
|
|
222
|
+
- `rounds` (array) - Round-by-round computation results
|
|
223
|
+
- `outcome` (string) - Either 'consensus' or 'indeterminate'
|
|
224
|
+
- `hash` (string) - SHA-256 hash of canonical receipt payload
|
|
225
|
+
- `suggestedFixes` (array) - Always empty in Layer-1 (future Layer-2 feature)
|
|
226
|
+
- `ts` (string, optional) - Timestamp if provided
|
|
227
|
+
|
|
228
|
+
## Environment Requirements
|
|
229
|
+
|
|
230
|
+
- Node.js >= 18.0.0
|
|
231
|
+
- npm >= 8.0.0
|
|
232
|
+
|
|
233
|
+
## Use Cases
|
|
234
|
+
|
|
235
|
+
### Data Verification Pipelines
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Validate → Run → Verify pipeline
|
|
239
|
+
delta-engine validate bundle.json && \
|
|
240
|
+
delta-engine run bundle.json --output receipt.json && \
|
|
241
|
+
delta-engine verify receipt.json
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### CI/CD Integration
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# In your CI script
|
|
248
|
+
if delta-engine run security-scan.json --output receipt.json --quiet; then
|
|
249
|
+
echo "Security scan passed consensus threshold"
|
|
250
|
+
delta-engine verify receipt.json
|
|
251
|
+
else
|
|
252
|
+
echo "Security scan failed - investigate discrepancies"
|
|
253
|
+
exit 1
|
|
254
|
+
fi
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Stream Processing
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Process multiple bundles
|
|
261
|
+
for bundle in data/*.json; do
|
|
262
|
+
echo "Processing $bundle..."
|
|
263
|
+
delta-engine run "$bundle" --output "receipts/$(basename $bundle .json)-receipt.json"
|
|
264
|
+
done
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Error Handling
|
|
268
|
+
|
|
269
|
+
The CLI uses standard exit codes and provides clear error messages:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
# Check exit code
|
|
273
|
+
delta-engine run bundle.json
|
|
274
|
+
if [ $? -eq 0 ]; then
|
|
275
|
+
echo "Success"
|
|
276
|
+
elif [ $? -eq 1 ]; then
|
|
277
|
+
echo "Invalid bundle structure"
|
|
278
|
+
elif [ $? -eq 2 ]; then
|
|
279
|
+
echo "Engine execution error"
|
|
280
|
+
elif [ $? -eq 3 ]; then
|
|
281
|
+
echo "I/O error (file not found, network issue, etc.)"
|
|
282
|
+
fi
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## Protocol Compliance
|
|
286
|
+
|
|
287
|
+
This CLI implements the Loosechain Layer-1 protocol specification:
|
|
288
|
+
|
|
289
|
+
- Deterministic hash computation (SHA-256)
|
|
290
|
+
- Canonical JSON serialization
|
|
291
|
+
- Receipt replay verification
|
|
292
|
+
- Zero external dependencies in engine logic
|
|
293
|
+
|
|
294
|
+
## Troubleshooting
|
|
295
|
+
|
|
296
|
+
### "Cannot find module" errors
|
|
297
|
+
|
|
298
|
+
Make sure dependencies are installed:
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
npm install
|
|
302
|
+
npm run build
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### "Invalid JSON" errors
|
|
306
|
+
|
|
307
|
+
Validate your JSON syntax:
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
cat bundle.json | jq .
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Permission errors on Unix/Linux
|
|
314
|
+
|
|
315
|
+
Make the CLI executable:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
chmod +x node_modules/.bin/delta-engine
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
## Contributing
|
|
322
|
+
|
|
323
|
+
This package is part of the Loosechain Delta Engine Core monorepo. See the main repository for contribution guidelines.
|
|
324
|
+
|
|
325
|
+
## License
|
|
326
|
+
|
|
327
|
+
MIT
|
|
328
|
+
|
|
329
|
+
## Related Packages
|
|
330
|
+
|
|
331
|
+
- [@uvrn/core](../uvrn-core) - Core engine library
|
|
332
|
+
- [@uvrn/api](../uvrn-api) - REST API server (coming soon)
|
|
333
|
+
- [@uvrn/mcp](../uvrn-mcp) - MCP server integration (coming soon)
|
|
334
|
+
- [@uvrn/sdk](../uvrn-sdk) - TypeScript SDK (coming soon)
|
|
335
|
+
|
|
336
|
+
## Support
|
|
337
|
+
|
|
338
|
+
- Documentation: [docs/CLI_GUIDE.md](docs/CLI_GUIDE.md)
|
|
339
|
+
- Issues: https://github.com/uvrn/lc_delta-core/issues
|
|
340
|
+
- Protocol Spec: See `admin/docs/compass/PROTOCOL.md` in the repository
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAgPH;;GAEG;AACH,iBAAS,IAAI,IAAI,IAAI,CAsCpB;AAOD,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Loosechain Delta Engine CLI
|
|
5
|
+
* Command-line interface for running delta engine operations
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
29
|
+
};
|
|
30
|
+
return ownKeys(o);
|
|
31
|
+
};
|
|
32
|
+
return function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.main = main;
|
|
42
|
+
const commander_1 = require("commander");
|
|
43
|
+
const fs = __importStar(require("fs"));
|
|
44
|
+
const path = __importStar(require("path"));
|
|
45
|
+
const core_1 = require("@uvrn/core");
|
|
46
|
+
const packageJson = require('../package.json');
|
|
47
|
+
// Exit codes
|
|
48
|
+
const EXIT_SUCCESS = 0;
|
|
49
|
+
const EXIT_INVALID_BUNDLE = 1;
|
|
50
|
+
const EXIT_ENGINE_ERROR = 2;
|
|
51
|
+
const EXIT_IO_ERROR = 3;
|
|
52
|
+
/**
|
|
53
|
+
* Read input from file, stdin, or URL
|
|
54
|
+
*/
|
|
55
|
+
async function readInput(input) {
|
|
56
|
+
try {
|
|
57
|
+
// If no input specified, read from stdin
|
|
58
|
+
if (!input || input === '-') {
|
|
59
|
+
return await readStdin();
|
|
60
|
+
}
|
|
61
|
+
// Check if it's a URL
|
|
62
|
+
if (input.startsWith('http://') || input.startsWith('https://')) {
|
|
63
|
+
return await fetchUrl(input);
|
|
64
|
+
}
|
|
65
|
+
// Otherwise, treat as file path
|
|
66
|
+
const resolvedPath = path.resolve(process.cwd(), input);
|
|
67
|
+
return fs.readFileSync(resolvedPath, 'utf-8');
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
throw new Error(`Failed to read input: ${error.message}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Read from stdin
|
|
75
|
+
*/
|
|
76
|
+
async function readStdin() {
|
|
77
|
+
return new Promise((resolve, reject) => {
|
|
78
|
+
let data = '';
|
|
79
|
+
process.stdin.setEncoding('utf-8');
|
|
80
|
+
process.stdin.on('data', chunk => {
|
|
81
|
+
data += chunk;
|
|
82
|
+
});
|
|
83
|
+
process.stdin.on('end', () => {
|
|
84
|
+
resolve(data);
|
|
85
|
+
});
|
|
86
|
+
process.stdin.on('error', error => {
|
|
87
|
+
reject(error);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Fetch from URL
|
|
93
|
+
*/
|
|
94
|
+
async function fetchUrl(url) {
|
|
95
|
+
const https = url.startsWith('https://') ? require('https') : require('http');
|
|
96
|
+
return new Promise((resolve, reject) => {
|
|
97
|
+
https.get(url, (res) => {
|
|
98
|
+
let data = '';
|
|
99
|
+
res.on('data', (chunk) => {
|
|
100
|
+
data += chunk;
|
|
101
|
+
});
|
|
102
|
+
res.on('end', () => {
|
|
103
|
+
if (res.statusCode >= 200 && res.statusCode < 300) {
|
|
104
|
+
resolve(data);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
reject(new Error(`HTTP ${res.statusCode}: ${res.statusMessage}`));
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}).on('error', (error) => {
|
|
111
|
+
reject(error);
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Parse JSON safely
|
|
117
|
+
*/
|
|
118
|
+
function parseJson(jsonString, type) {
|
|
119
|
+
try {
|
|
120
|
+
return JSON.parse(jsonString);
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
throw new Error(`Invalid JSON for ${type}: ${error.message}`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Write output to file or stdout
|
|
128
|
+
*/
|
|
129
|
+
function writeOutput(data, options) {
|
|
130
|
+
const output = options.pretty
|
|
131
|
+
? JSON.stringify(data, null, 2)
|
|
132
|
+
: JSON.stringify(data);
|
|
133
|
+
if (options.output) {
|
|
134
|
+
try {
|
|
135
|
+
const resolvedPath = path.resolve(process.cwd(), options.output);
|
|
136
|
+
fs.writeFileSync(resolvedPath, output, 'utf-8');
|
|
137
|
+
if (!options.quiet) {
|
|
138
|
+
console.error(`Output written to: ${options.output}`);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
console.error(`Failed to write output file: ${error.message}`);
|
|
143
|
+
process.exit(EXIT_IO_ERROR);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
console.log(output);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Command: run
|
|
152
|
+
* Execute the delta engine on a bundle
|
|
153
|
+
*/
|
|
154
|
+
async function runCommand(input, options) {
|
|
155
|
+
try {
|
|
156
|
+
// Read and parse bundle
|
|
157
|
+
const bundleJson = await readInput(input);
|
|
158
|
+
const bundle = parseJson(bundleJson, 'bundle');
|
|
159
|
+
// Run engine
|
|
160
|
+
const receipt = (0, core_1.runDeltaEngine)(bundle);
|
|
161
|
+
// Output receipt
|
|
162
|
+
writeOutput(receipt, options);
|
|
163
|
+
process.exit(EXIT_SUCCESS);
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
const errorMessage = error.message;
|
|
167
|
+
if (!options.quiet) {
|
|
168
|
+
console.error('Error:', errorMessage);
|
|
169
|
+
}
|
|
170
|
+
if (errorMessage.includes('Invalid DeltaBundle')) {
|
|
171
|
+
process.exit(EXIT_INVALID_BUNDLE);
|
|
172
|
+
}
|
|
173
|
+
else if (errorMessage.includes('Failed to read input')) {
|
|
174
|
+
process.exit(EXIT_IO_ERROR);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
process.exit(EXIT_ENGINE_ERROR);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Command: validate
|
|
183
|
+
* Validate bundle structure without running engine
|
|
184
|
+
*/
|
|
185
|
+
async function validateCommand(input, options) {
|
|
186
|
+
try {
|
|
187
|
+
// Read and parse bundle
|
|
188
|
+
const bundleJson = await readInput(input);
|
|
189
|
+
const bundle = parseJson(bundleJson, 'bundle');
|
|
190
|
+
// Validate
|
|
191
|
+
const result = (0, core_1.validateBundle)(bundle);
|
|
192
|
+
if (result.valid) {
|
|
193
|
+
if (!options.quiet) {
|
|
194
|
+
console.log('✓ Bundle is valid');
|
|
195
|
+
}
|
|
196
|
+
writeOutput({ valid: true }, options);
|
|
197
|
+
process.exit(EXIT_SUCCESS);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
if (!options.quiet) {
|
|
201
|
+
console.error('✗ Bundle is invalid:', result.error);
|
|
202
|
+
}
|
|
203
|
+
writeOutput({ valid: false, error: result.error }, options);
|
|
204
|
+
process.exit(EXIT_INVALID_BUNDLE);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
catch (error) {
|
|
208
|
+
if (!options.quiet) {
|
|
209
|
+
console.error('Error:', error.message);
|
|
210
|
+
}
|
|
211
|
+
process.exit(EXIT_IO_ERROR);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Command: verify
|
|
216
|
+
* Verify receipt integrity by replaying hash computation
|
|
217
|
+
*/
|
|
218
|
+
async function verifyCommand(input, options) {
|
|
219
|
+
try {
|
|
220
|
+
// Read and parse receipt
|
|
221
|
+
const receiptJson = await readInput(input);
|
|
222
|
+
const receipt = parseJson(receiptJson, 'receipt');
|
|
223
|
+
// Verify
|
|
224
|
+
const result = (0, core_1.verifyReceipt)(receipt);
|
|
225
|
+
if (result.verified) {
|
|
226
|
+
if (!options.quiet) {
|
|
227
|
+
console.log('✓ Receipt is valid');
|
|
228
|
+
console.log(' Hash:', receipt.hash);
|
|
229
|
+
}
|
|
230
|
+
writeOutput({ verified: true, hash: receipt.hash }, options);
|
|
231
|
+
process.exit(EXIT_SUCCESS);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
if (!options.quiet) {
|
|
235
|
+
console.error('✗ Receipt verification failed:', result.error);
|
|
236
|
+
if (result.recomputedHash) {
|
|
237
|
+
console.error(' Expected:', receipt.hash);
|
|
238
|
+
console.error(' Computed:', result.recomputedHash);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
writeOutput({
|
|
242
|
+
verified: false,
|
|
243
|
+
error: result.error,
|
|
244
|
+
providedHash: receipt.hash,
|
|
245
|
+
recomputedHash: result.recomputedHash
|
|
246
|
+
}, options);
|
|
247
|
+
process.exit(EXIT_ENGINE_ERROR);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
catch (error) {
|
|
251
|
+
if (!options.quiet) {
|
|
252
|
+
console.error('Error:', error.message);
|
|
253
|
+
}
|
|
254
|
+
process.exit(EXIT_IO_ERROR);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Main CLI setup
|
|
259
|
+
*/
|
|
260
|
+
function main() {
|
|
261
|
+
const program = new commander_1.Command();
|
|
262
|
+
program
|
|
263
|
+
.name('delta-engine')
|
|
264
|
+
.description('CLI for Loosechain Delta Engine - Bundle → Receipt')
|
|
265
|
+
.version(packageJson.version);
|
|
266
|
+
program
|
|
267
|
+
.command('run [bundle]')
|
|
268
|
+
.description('Execute delta engine on a bundle (file path, URL, or stdin)')
|
|
269
|
+
.option('-o, --output <file>', 'Write output to file instead of stdout')
|
|
270
|
+
.option('-q, --quiet', 'Suppress informational messages')
|
|
271
|
+
.option('-p, --pretty', 'Pretty-print JSON output')
|
|
272
|
+
.action(runCommand);
|
|
273
|
+
program
|
|
274
|
+
.command('validate [bundle]')
|
|
275
|
+
.description('Validate bundle structure without running engine')
|
|
276
|
+
.option('-o, --output <file>', 'Write output to file instead of stdout')
|
|
277
|
+
.option('-q, --quiet', 'Suppress informational messages')
|
|
278
|
+
.option('-p, --pretty', 'Pretty-print JSON output')
|
|
279
|
+
.action(validateCommand);
|
|
280
|
+
program
|
|
281
|
+
.command('verify [receipt]')
|
|
282
|
+
.description('Verify receipt integrity by replaying hash computation')
|
|
283
|
+
.option('-o, --output <file>', 'Write output to file instead of stdout')
|
|
284
|
+
.option('-q, --quiet', 'Suppress informational messages')
|
|
285
|
+
.option('-p, --pretty', 'Pretty-print JSON output')
|
|
286
|
+
.action(verifyCommand);
|
|
287
|
+
program.parse(process.argv);
|
|
288
|
+
// Show help if no command provided
|
|
289
|
+
if (!process.argv.slice(2).length) {
|
|
290
|
+
program.outputHelp();
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
// Run CLI
|
|
294
|
+
if (require.main === module) {
|
|
295
|
+
main();
|
|
296
|
+
}
|
|
297
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AAEA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgSM,oBAAI;AA9Rb,yCAAoC;AACpC,uCAAyB;AACzB,2CAA6B;AAC7B,qCAA2E;AAG3E,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE/C,aAAa;AACb,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,aAAa,GAAG,CAAC,CAAC;AAQxB;;GAEG;AACH,KAAK,UAAU,SAAS,CAAC,KAAc;IACrC,IAAI,CAAC;QACH,yCAAyC;QACzC,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;YAC5B,OAAO,MAAM,SAAS,EAAE,CAAC;QAC3B,CAAC;QAED,sBAAsB;QACtB,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAChE,OAAO,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QAED,gCAAgC;QAChC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC;QACxD,OAAO,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAA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qBAAqB,EAAE,wCAAwC,CAAC;SACvE,MAAM,CAAC,aAAa,EAAE,iCAAiC,CAAC;SACxD,MAAM,CAAC,cAAc,EAAE,0BAA0B,CAAC;SAClD,MAAM,CAAC,aAAa,CAAC,CAAC;IAEzB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B,mCAAmC;IACnC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAClC,OAAO,CAAC,UAAU,EAAE,CAAC;IACvB,CAAC;AACH,CAAC;AAED,UAAU;AACV,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,CAAC;AACT,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Loosechain Delta Engine CLI
|
|
4
|
+
* Public exports
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.main = void 0;
|
|
8
|
+
var cli_1 = require("./cli");
|
|
9
|
+
Object.defineProperty(exports, "main", { enumerable: true, get: function () { return cli_1.main; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6BAA6B;AAApB,2FAAA,IAAI,OAAA"}
|