@nexart/cli 0.6.0 → 0.8.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 +169 -11
- package/dist/index.d.ts +130 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +440 -126
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @nexart/cli v0.
|
|
1
|
+
# @nexart/cli v0.8.0
|
|
2
2
|
|
|
3
3
|
Command-line interface for NexArt — run, replay, and verify deterministic generative art, plus AI execution certification commands.
|
|
4
4
|
|
|
@@ -80,7 +80,7 @@ The CLI has two command groups:
|
|
|
80
80
|
|
|
81
81
|
**Code Mode commands** — render generative art sketches, create verifiable snapshots, replay and verify them.
|
|
82
82
|
|
|
83
|
-
**AI certification commands** — create, certify, and verify tamper-evident Canonical Execution Records (CERs) for AI operations via the NexArt node API.
|
|
83
|
+
**AI certification commands** — create, certify, and verify tamper-evident Canonical Execution Records (CERs) for AI operations via the NexArt node API. Also includes local verification of project bundles (`cer.project.bundle.v1`) with `nexart ai project-verify`.
|
|
84
84
|
|
|
85
85
|
## Authentication
|
|
86
86
|
|
|
@@ -287,9 +287,63 @@ attestation: present
|
|
|
287
287
|
- `0` — Certified successfully
|
|
288
288
|
- `1` — API error (e.g. 401 Unauthorized), missing input, or invalid response
|
|
289
289
|
|
|
290
|
+
### `nexart ai seal` (v0.8.0+)
|
|
291
|
+
|
|
292
|
+
Create a Certified Execution Record **locally** — no node required. Produces an integrity-only bundle suitable for offline workflows, CI, pre-certification, or piping straight into `nexart ai verify`. All snapshot construction, canonicalization, and certificate hashing is delegated to `createSnapshot()` + `sealCer()` from `@nexart/ai-execution` — the canonical source of truth.
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
# Seal from file
|
|
296
|
+
nexart ai seal execution.json
|
|
297
|
+
|
|
298
|
+
# Seal from stdin
|
|
299
|
+
cat execution.json | nexart ai seal
|
|
300
|
+
|
|
301
|
+
# Seal then verify in a pipe (--quiet keeps the pipe clean)
|
|
302
|
+
cat execution.json | nexart ai seal --quiet | nexart ai verify
|
|
303
|
+
|
|
304
|
+
# Save sealed bundle to file
|
|
305
|
+
nexart ai seal execution.json --out cer.json
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
**Default output (stdout — bundle JSON):**
|
|
309
|
+
```json
|
|
310
|
+
{
|
|
311
|
+
"bundleType": "cer.ai.execution.v1",
|
|
312
|
+
"certificateHash": "sha256:...",
|
|
313
|
+
"createdAt": "2026-04-30T12:00:00.000Z",
|
|
314
|
+
"version": "0.1",
|
|
315
|
+
"snapshot": { ... }
|
|
316
|
+
}
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**Status banner (stderr):**
|
|
320
|
+
```
|
|
321
|
+
[nexart] Local CER created
|
|
322
|
+
[nexart] State: Sealed (integrity only)
|
|
323
|
+
[nexart] No node attestation present
|
|
324
|
+
[nexart] This record is not certified — use `nexart ai certify` to attest via a node
|
|
325
|
+
[nexart] certificateHash: sha256:...
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Options:**
|
|
329
|
+
| Flag | Default | Description |
|
|
330
|
+
|------|---------|-------------|
|
|
331
|
+
| `--out` / `-o` | stdout | Save sealed CER bundle to this file |
|
|
332
|
+
| `--quiet` / `-q` | false | Suppress the stderr banner (clean pipe output) |
|
|
333
|
+
|
|
334
|
+
**Sealed vs Certified:**
|
|
335
|
+
- **Sealed** (`ai seal`): integrity only. No node receipt, no signature, no envelope. Verifies as `VERIFIED` with Receipt and Envelope reported as `SKIPPED` — that is correct, not a failure.
|
|
336
|
+
- **Certified** (`ai certify`): integrity + node attestation receipt + signature. Requires a node and an API key.
|
|
337
|
+
|
|
338
|
+
**Exit codes:**
|
|
339
|
+
- `0` — Sealed successfully
|
|
340
|
+
- `1` — Missing required fields, invalid input JSON, or stdin error
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
290
344
|
### `nexart ai verify`
|
|
291
345
|
|
|
292
|
-
Verify a CER bundle **or CER package** locally. No network call —
|
|
346
|
+
Verify a CER bundle **or CER package** locally. No network call. All verification logic — `bundleType` discriminant, package detection / inner-CER unwrap, canonicalization, hash recomputation, and 3-layer status (Integrity / Receipt / Envelope) — is delegated to `verifyAiCerBundleDetailed()` from `@nexart/ai-execution`. The CLI owns input routing and output formatting only. Fully compatible with v0.11.0+ CERs that include `context.signals`, v0.6.0+ CER packages, and v0.8.0+ locally-sealed bundles from `nexart ai seal`.
|
|
293
347
|
|
|
294
348
|
```bash
|
|
295
349
|
# Verify a raw CER bundle from file
|
|
@@ -343,9 +397,13 @@ bundleIntegrity: FAIL
|
|
|
343
397
|
"reasonCodes": [],
|
|
344
398
|
"certificateHash": "sha256:a1b2c3...",
|
|
345
399
|
"bundleType": "cer.ai.execution.v1",
|
|
346
|
-
"
|
|
347
|
-
"
|
|
348
|
-
"
|
|
400
|
+
"verifiedAt": "2026-04-30T12:00:00.000Z",
|
|
401
|
+
"verifier": "@nexart/ai-execution",
|
|
402
|
+
"cli": {
|
|
403
|
+
"version": "0.8.0",
|
|
404
|
+
"sdkVersion": "0.16.1",
|
|
405
|
+
"inputType": "bundle"
|
|
406
|
+
}
|
|
349
407
|
}
|
|
350
408
|
```
|
|
351
409
|
|
|
@@ -361,14 +419,20 @@ bundleIntegrity: FAIL
|
|
|
361
419
|
"reasonCodes": [],
|
|
362
420
|
"certificateHash": "sha256:a1b2c3...",
|
|
363
421
|
"bundleType": "cer.ai.execution.v1",
|
|
364
|
-
"
|
|
365
|
-
"
|
|
366
|
-
"
|
|
367
|
-
|
|
368
|
-
|
|
422
|
+
"verifiedAt": "2026-04-30T12:00:00.000Z",
|
|
423
|
+
"verifier": "@nexart/ai-execution",
|
|
424
|
+
"cli": {
|
|
425
|
+
"version": "0.8.0",
|
|
426
|
+
"sdkVersion": "0.16.1",
|
|
427
|
+
"inputType": "package",
|
|
428
|
+
"verifiedInnerCer": true,
|
|
429
|
+
"packageTrustLayersVerified": false
|
|
430
|
+
}
|
|
369
431
|
}
|
|
370
432
|
```
|
|
371
433
|
|
|
434
|
+
The top-level fields (`status`, `checks`, `reasonCodes`, `certificateHash`, `bundleType`, `verifiedAt`, `verifier`) are the SDK's `CerVerificationResult` verbatim. The additive `cli` envelope carries CLI-only metadata (`version`, `sdkVersion`, `inputType`, and package-specific flags when applicable).
|
|
435
|
+
|
|
372
436
|
**Options:**
|
|
373
437
|
| Flag | Default | Description |
|
|
374
438
|
|------|---------|-------------|
|
|
@@ -380,6 +444,100 @@ bundleIntegrity: FAIL
|
|
|
380
444
|
|
|
381
445
|
---
|
|
382
446
|
|
|
447
|
+
### `nexart ai project-verify` (v0.7.0+)
|
|
448
|
+
|
|
449
|
+
Verify a **project bundle** (`cer.project.bundle.v1`) locally. No network required. Delegates all verification logic to `verifyProjectBundle()` from `@nexart/ai-execution` — the canonical source of truth for project bundle semantics. The CLI provides the command surface and output formatting.
|
|
450
|
+
|
|
451
|
+
```bash
|
|
452
|
+
# From file
|
|
453
|
+
nexart ai project-verify project-bundle.json
|
|
454
|
+
|
|
455
|
+
# From stdin
|
|
456
|
+
cat project-bundle.json | nexart ai project-verify
|
|
457
|
+
|
|
458
|
+
# Machine-readable JSON output
|
|
459
|
+
nexart ai project-verify project-bundle.json --json
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
**Checks performed (in order, via `@nexart/ai-execution`):**
|
|
463
|
+
1. `bundleType` discriminant: must be `cer.project.bundle.v1`
|
|
464
|
+
2. Required fields: `version`, `protocolVersion`, `projectBundleId`, `projectTitle`, `startedAt`, `completedAt`, `integrity` block shape
|
|
465
|
+
3. `stepRegistry` is a non-empty array
|
|
466
|
+
4. `embeddedBundles` is a plain object keyed by `stepId`
|
|
467
|
+
5. `totalSteps` must equal `stepRegistry.length`
|
|
468
|
+
6. Per-step: embedded bundle exists; `executionId` and `certificateHash` match the registry entry; inner CER `certificateHash` is independently valid
|
|
469
|
+
7. `integrity.projectHash` is recomputed from all material project metadata and compared to the declared value
|
|
470
|
+
|
|
471
|
+
**Default output (PASS):**
|
|
472
|
+
```
|
|
473
|
+
Verification result: VERIFIED
|
|
474
|
+
bundleType: cer.project.bundle.v1
|
|
475
|
+
projectBundleId: proj-abc123
|
|
476
|
+
projectTitle: My Project
|
|
477
|
+
totalSteps: 3
|
|
478
|
+
passedSteps: 3
|
|
479
|
+
failedSteps: 0
|
|
480
|
+
projectHashIntegrity: PASS
|
|
481
|
+
stepIntegrity: PASS
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**Default output (FAIL):**
|
|
485
|
+
```
|
|
486
|
+
Verification result: FAILED
|
|
487
|
+
bundleType: cer.project.bundle.v1
|
|
488
|
+
projectBundleId: proj-abc123
|
|
489
|
+
projectTitle: My Project
|
|
490
|
+
totalSteps: 3
|
|
491
|
+
passedSteps: 2
|
|
492
|
+
failedSteps: 1
|
|
493
|
+
projectHashIntegrity: FAIL
|
|
494
|
+
stepIntegrity: FAIL
|
|
495
|
+
[nexart] Error: integrity.projectHash mismatch: expected sha256:..., got sha256:...
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
**JSON output** (`--json`):
|
|
499
|
+
```json
|
|
500
|
+
{
|
|
501
|
+
"status": "VERIFIED",
|
|
502
|
+
"bundleType": "cer.project.bundle.v1",
|
|
503
|
+
"projectBundleId": "proj-abc123",
|
|
504
|
+
"projectTitle": "My Project",
|
|
505
|
+
"totalSteps": 3,
|
|
506
|
+
"passedSteps": 3,
|
|
507
|
+
"failedSteps": 0,
|
|
508
|
+
"projectHashValid": true,
|
|
509
|
+
"checks": {
|
|
510
|
+
"structuralValid": true,
|
|
511
|
+
"projectHashIntegrity": "PASS",
|
|
512
|
+
"stepIntegrity": "PASS"
|
|
513
|
+
},
|
|
514
|
+
"steps": [
|
|
515
|
+
{
|
|
516
|
+
"stepId": "step-001",
|
|
517
|
+
"sequence": 0,
|
|
518
|
+
"executionId": "exec-abc",
|
|
519
|
+
"certificateHash": "sha256:...",
|
|
520
|
+
"ok": true,
|
|
521
|
+
"errors": []
|
|
522
|
+
}
|
|
523
|
+
],
|
|
524
|
+
"errors": [],
|
|
525
|
+
"verifiedAt": "2026-04-06T12:00:00.000Z",
|
|
526
|
+
"verifier": "@nexart/cli"
|
|
527
|
+
}
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
**Options:**
|
|
531
|
+
| Flag | Default | Description |
|
|
532
|
+
|------|---------|-------------|
|
|
533
|
+
| `--json` | false | Machine-readable JSON output |
|
|
534
|
+
|
|
535
|
+
**Exit codes:**
|
|
536
|
+
- `0` — VERIFIED (all checks pass)
|
|
537
|
+
- `1` — FAILED (any structural, step, or hash error)
|
|
538
|
+
|
|
539
|
+
---
|
|
540
|
+
|
|
383
541
|
## Context Signals (v0.5.0+)
|
|
384
542
|
|
|
385
543
|
Context signals attach upstream evidence — CI approvals, webhook events, human-review records — to a CER. They are included in the `context.signals` array and are **tamper-evident**: the `certificateHash` covers the full `context` block, so any post-creation modification to signals is detected by `nexart ai verify`.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,60 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @nexart/cli v0.
|
|
3
|
+
* @nexart/cli v0.8.0 — NexArt CLI
|
|
4
4
|
*
|
|
5
5
|
* Code Mode commands:
|
|
6
|
-
* - nexart run <file>
|
|
6
|
+
* - nexart run <file> — Execute via remote renderer and create snapshot
|
|
7
7
|
* - nexart replay <snapshot> — Re-execute from snapshot
|
|
8
8
|
* - nexart verify <snapshot> — Verify snapshot hash
|
|
9
9
|
*
|
|
10
10
|
* AI Certification commands:
|
|
11
|
-
* - nexart ai create <file>
|
|
12
|
-
* - nexart ai certify <file>
|
|
13
|
-
* - nexart ai
|
|
11
|
+
* - nexart ai create <file> — Create a CER bundle via node API
|
|
12
|
+
* - nexart ai certify <file> — Certify an AI execution and attest
|
|
13
|
+
* - nexart ai seal <file> — Seal a CER bundle locally (offline, no node)
|
|
14
|
+
* - nexart ai verify <file> — Verify a CER bundle or CER package locally
|
|
15
|
+
* - nexart ai project-verify <file> — Verify a cer.project.bundle.v1 artifact locally
|
|
14
16
|
*
|
|
15
|
-
*
|
|
17
|
+
* Sealed vs Certified:
|
|
18
|
+
* - Sealed = integrity only. Bundle is locally produced via SDK sealCer().
|
|
19
|
+
* No node receipt, no signature, no envelope. Use for offline
|
|
20
|
+
* workflows, CI, or pre-certification staging. `ai seal` builds
|
|
21
|
+
* these.
|
|
22
|
+
* - Certified = integrity + node attestation receipt. Bundle has been
|
|
23
|
+
* attested by a NexArt node and includes a signed receipt.
|
|
24
|
+
* `ai certify` builds these.
|
|
25
|
+
* `ai verify` works on both. For sealed bundles, the Receipt and Envelope
|
|
26
|
+
* layers report SKIPPED — that is correct, not a failure.
|
|
27
|
+
*
|
|
28
|
+
* VERIFICATION ALIGNMENT (v0.8.0):
|
|
29
|
+
* `ai verify` and `ai project-verify` both delegate ALL verification logic to
|
|
30
|
+
* @nexart/ai-execution (>=0.16.1). The CLI implements ZERO independent
|
|
31
|
+
* cryptographic logic — no canonicalization, no hash recomputation, no
|
|
32
|
+
* integrity checks. This guarantees byte-for-byte parity with:
|
|
33
|
+
* - the SDK (`verifyAiCerBundleDetailed`, `verifyProjectBundle`)
|
|
34
|
+
* - NexArt Node (`/v1/cer/verify`)
|
|
35
|
+
* - verify.nexart.io
|
|
36
|
+
*
|
|
37
|
+
* `ai verify` reports the three SDK protocol layers independently:
|
|
38
|
+
* - bundleIntegrity (Integrity: certificate hash recomputation)
|
|
39
|
+
* - nodeSignature (Receipt: node attestation signature validity)
|
|
40
|
+
* - receiptConsistency (Envelope: bundle/receipt envelope consistency)
|
|
41
|
+
* Each layer is reported as PASS / FAIL / SKIPPED with no aggregation, and
|
|
42
|
+
* the SDK reason codes are passed through unmodified.
|
|
43
|
+
*
|
|
44
|
+
* Context signals:
|
|
16
45
|
* Pass --signals-file <path> to ai create / ai certify to attach upstream
|
|
17
|
-
* context signals to the CER. Signals are evidence
|
|
18
|
-
* the certificateHash. ai verify
|
|
19
|
-
*
|
|
20
|
-
* CER packages
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
46
|
+
* context signals to the CER. Signals are evidence and are bound by the
|
|
47
|
+
* SDK into the certificateHash. ai verify validates them via the SDK.
|
|
48
|
+
*
|
|
49
|
+
* CER packages:
|
|
50
|
+
* ai verify accepts raw CER bundles and CER packages. For packages, the
|
|
51
|
+
* inner CER bundle is unwrapped and passed to the SDK verifier.
|
|
52
|
+
*
|
|
53
|
+
* Project bundles:
|
|
54
|
+
* ai project-verify delegates to verifyProjectBundle() from @nexart/ai-execution.
|
|
55
|
+
* No network required. The CLI provides command surface and output formatting only.
|
|
25
56
|
*/
|
|
57
|
+
import { hasAttestation as sdkHasAttestation } from '@nexart/ai-execution';
|
|
26
58
|
/**
|
|
27
59
|
* Read all bytes from stdin (non-TTY only).
|
|
28
60
|
*/
|
|
@@ -40,29 +72,55 @@ export declare function callNodeApi(endpoint: string, apiPath: string, body: unk
|
|
|
40
72
|
data: unknown;
|
|
41
73
|
}>;
|
|
42
74
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* ensuring signals are tamper-evident. When absent, the hash is identical to pre-v0.11.0.
|
|
55
|
-
*/
|
|
56
|
-
export declare function computeBundleHash(bundle: Record<string, unknown>): string;
|
|
57
|
-
/**
|
|
58
|
-
* Check whether a CER bundle has a valid-looking attestation.
|
|
75
|
+
* NOTE: As of v0.8.0, the CLI implements ZERO independent cryptographic logic.
|
|
76
|
+
*
|
|
77
|
+
* Removed in v0.8.0 (drift hazard — canonical CER semantics live in the SDK):
|
|
78
|
+
* - canonicalJson() → use @nexart/ai-execution canonicalization
|
|
79
|
+
* - computeBundleHash() → use verifyAiCerBundleDetailed() / verifyCer()
|
|
80
|
+
* - hasAttestation() → re-exported below from @nexart/ai-execution
|
|
81
|
+
*
|
|
82
|
+
* The CLI MUST NOT recompute certificateHash, canonicalize CER JSON, or compare
|
|
83
|
+
* hashes by hand. All such logic is owned by @nexart/ai-execution. This is what
|
|
84
|
+
* guarantees CLI verification matches the SDK, NexArt Node (`/v1/cer/verify`),
|
|
85
|
+
* and verify.nexart.io exactly.
|
|
59
86
|
*/
|
|
60
|
-
export declare
|
|
87
|
+
export declare const hasAttestation: typeof sdkHasAttestation;
|
|
61
88
|
/**
|
|
62
89
|
* Load a JSON array of context signals from a file path.
|
|
63
90
|
* Exits with an error message if the file is missing, invalid JSON, or not an array.
|
|
64
91
|
*/
|
|
65
92
|
export declare function loadSignalsFile(signalsPath: string): unknown[];
|
|
93
|
+
/**
|
|
94
|
+
* nexart ai seal — Build a Certified Execution Record locally.
|
|
95
|
+
*
|
|
96
|
+
* This command is offline-only. It performs ZERO network I/O and ZERO local
|
|
97
|
+
* cryptography: all snapshot construction, canonicalization, and certificate
|
|
98
|
+
* hashing are delegated to @nexart/ai-execution via createSnapshot() and
|
|
99
|
+
* sealCer(). The CLI's job is parsing input, calling the SDK, and formatting
|
|
100
|
+
* output.
|
|
101
|
+
*
|
|
102
|
+
* Output contract:
|
|
103
|
+
* - stdout: the CER bundle JSON (pipe-friendly into `nexart ai verify`)
|
|
104
|
+
* - stderr: a status banner (suppress with --quiet)
|
|
105
|
+
* - --out: also writes the bundle JSON to the given file
|
|
106
|
+
*
|
|
107
|
+
* The sealed bundle is integrity-only. It does NOT contain a node attestation
|
|
108
|
+
* receipt, a node signature, or an envelope. Use `nexart ai certify` (or
|
|
109
|
+
* `attest()` from the SDK) to upgrade a sealed bundle to a certified one.
|
|
110
|
+
*
|
|
111
|
+
* Compatibility guarantee: a sealed bundle from this command verifies as
|
|
112
|
+
* VERIFIED by `nexart ai verify`, by SDK `verifyAiCerBundleDetailed`, and by
|
|
113
|
+
* NexArt Node `/v1/cer/verify` (Integrity layer PASS, Receipt and Envelope
|
|
114
|
+
* layers SKIPPED — that is by design, not a failure).
|
|
115
|
+
*
|
|
116
|
+
* To merge upstream context signals into the bundle, include `signals: [...]`
|
|
117
|
+
* in the input JSON. Signals are bound by the SDK into certificateHash via
|
|
118
|
+
* context.contextHash + signalCount + contextSummary.
|
|
119
|
+
*/
|
|
120
|
+
export declare function aiSealCommand(file: string | undefined, opts: {
|
|
121
|
+
out?: string;
|
|
122
|
+
quiet?: boolean;
|
|
123
|
+
}, stdinReader?: () => Promise<string>): Promise<void>;
|
|
66
124
|
/**
|
|
67
125
|
* nexart ai create — Read execution input, call POST /v1/cer/ai/create,
|
|
68
126
|
* print CER bundle JSON to stdout, optionally save to --out file.
|
|
@@ -89,14 +147,50 @@ export declare function aiCertifyCommand(file: string | undefined, opts: {
|
|
|
89
147
|
}, fetchFn?: typeof fetch, stdinReader?: () => Promise<string>): Promise<void>;
|
|
90
148
|
/**
|
|
91
149
|
* nexart ai verify — Read a CER bundle or CER package JSON from file or stdin,
|
|
92
|
-
*
|
|
93
|
-
*
|
|
150
|
+
* delegate verification to verifyAiCerBundleDetailed() from @nexart/ai-execution,
|
|
151
|
+
* and report the protocol layer results.
|
|
152
|
+
*
|
|
153
|
+
* The CLI does ZERO crypto here. It only:
|
|
154
|
+
* 1. parses input
|
|
155
|
+
* 2. unwraps a CER package to its inner CER bundle (via SDK's isCerPackage / getCerFromPackage)
|
|
156
|
+
* 3. calls verifyAiCerBundleDetailed(bundle)
|
|
157
|
+
* 4. formats the SDK's CerVerificationResult for human / JSON output
|
|
158
|
+
*
|
|
159
|
+
* The three SDK protocol layers are reported INDEPENDENTLY (no aggregation):
|
|
160
|
+
* - bundleIntegrity (Integrity layer: certificate hash recomputation)
|
|
161
|
+
* - nodeSignature (Receipt layer: node attestation signature validity)
|
|
162
|
+
* - receiptConsistency (Envelope layer: bundle/receipt envelope consistency)
|
|
163
|
+
*
|
|
164
|
+
* Each layer is PASS / FAIL / SKIPPED. SDK reason codes are passed through
|
|
165
|
+
* unmodified. Exit code is driven by the SDK's `status` field (VERIFIED → 0,
|
|
166
|
+
* anything else → 1).
|
|
94
167
|
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
168
|
+
* --json prints the SDK's CerVerificationResult verbatim, plus a minimal
|
|
169
|
+
* `cli` envelope describing input handling. The SDK fields are never rewritten
|
|
170
|
+
* or reinterpreted.
|
|
98
171
|
*/
|
|
99
172
|
export declare function aiVerifyCommand(file: string | undefined, opts: {
|
|
100
173
|
json: boolean;
|
|
101
174
|
}, stdinReader?: () => Promise<string>): Promise<void>;
|
|
175
|
+
/**
|
|
176
|
+
* nexart ai project-verify — Read a cer.project.bundle.v1 JSON from file or stdin,
|
|
177
|
+
* delegate all verification to verifyProjectBundle() from @nexart/ai-execution,
|
|
178
|
+
* and report VERIFIED/FAILED.
|
|
179
|
+
*
|
|
180
|
+
* CLI responsibilities:
|
|
181
|
+
* - file/stdin input handling
|
|
182
|
+
* - artifact type routing (early discriminant check for clear user-facing errors)
|
|
183
|
+
* - calling verifyProjectBundle() from @nexart/ai-execution (canonical source of truth)
|
|
184
|
+
* - formatting ProjectBundleVerifyResult for human-readable terminal output
|
|
185
|
+
* - emitting the structured result in JSON mode
|
|
186
|
+
*
|
|
187
|
+
* The CLI does NOT own project bundle schema, project hash computation,
|
|
188
|
+
* per-step verification logic, or any competing implementation of those semantics.
|
|
189
|
+
*
|
|
190
|
+
* Exit code: 0 on VERIFIED, 1 on FAILED or structural error.
|
|
191
|
+
* --json outputs a machine-readable result object.
|
|
192
|
+
*/
|
|
193
|
+
export declare function aiProjectVerifyCommand(file: string | undefined, opts: {
|
|
194
|
+
json: boolean;
|
|
195
|
+
}, stdinReader?: () => Promise<string>): Promise<void>;
|
|
102
196
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAYH,OAAO,EAGL,cAAc,IAAI,iBAAiB,EAYpC,MAAM,sBAAsB,CAAC;AAulB9B;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAerD;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,WAAW,GAAE,MAAM,OAAO,CAAC,MAAM,CAAiB,GACjD,OAAO,CAAC,OAAO,CAAC,CA0BlB;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,OAAO,EACb,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,GAAE,OAAO,KAAwB,GACvC,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAoB5C;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,0BAAoB,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,EAAE,CAwB9D;AAuDD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE;IACJ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,EACD,WAAW,GAAE,MAAM,OAAO,CAAC,MAAM,CAAiB,GACjD,OAAO,CAAC,IAAI,CAAC,CAuCf;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE;IACJ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,EACD,OAAO,GAAE,OAAO,KAAwB,EACxC,WAAW,GAAE,MAAM,OAAO,CAAC,MAAM,CAAiB,GACjD,OAAO,CAAC,IAAI,CAAC,CA8Cf;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE;IACJ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,EACD,OAAO,GAAE,OAAO,KAAwB,EACxC,WAAW,GAAE,MAAM,OAAO,CAAC,MAAM,CAAiB,GACjD,OAAO,CAAC,IAAI,CAAC,CA8Df;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,EACvB,WAAW,GAAE,MAAM,OAAO,CAAC,MAAM,CAAiB,GACjD,OAAO,CAAC,IAAI,CAAC,CA0Ef;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,IAAI,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,EACvB,WAAW,GAAE,MAAM,OAAO,CAAC,MAAM,CAAiB,GACjD,OAAO,CAAC,IAAI,CAAC,CAwBf"}
|