@agledger/cli 2.0.0 → 2.2.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.
Files changed (48) hide show
  1. package/README.md +77 -25
  2. package/SKILL.md +15 -14
  3. package/bin/run.js +2 -2
  4. package/dist/api-client.d.ts +7 -0
  5. package/dist/api-client.js +44 -8
  6. package/dist/base.d.ts +97 -12
  7. package/dist/base.js +90 -37
  8. package/dist/cli/command.d.ts +58 -0
  9. package/dist/cli/command.js +44 -0
  10. package/dist/cli/flags.d.ts +76 -0
  11. package/dist/cli/flags.js +12 -0
  12. package/dist/cli/help.d.ts +6 -0
  13. package/dist/cli/help.js +107 -0
  14. package/dist/cli/index.d.ts +3 -0
  15. package/dist/cli/index.js +3 -0
  16. package/dist/cli/main.d.ts +22 -0
  17. package/dist/cli/main.js +223 -0
  18. package/dist/cli/parse.d.ts +20 -0
  19. package/dist/cli/parse.js +138 -0
  20. package/dist/commands/api.d.ts +106 -18
  21. package/dist/commands/api.js +103 -12
  22. package/dist/commands/auth.d.ts +35 -6
  23. package/dist/commands/auth.js +1 -1
  24. package/dist/commands/config.d.ts +43 -8
  25. package/dist/commands/config.js +9 -8
  26. package/dist/commands/discover.d.ts +35 -6
  27. package/dist/commands/docs.d.ts +41 -7
  28. package/dist/commands/docs.js +4 -4
  29. package/dist/commands/help-json.d.ts +39 -7
  30. package/dist/commands/help-json.js +27 -45
  31. package/dist/commands/list-commands.d.ts +36 -7
  32. package/dist/commands/list-commands.js +2 -2
  33. package/dist/commands/login.d.ts +66 -10
  34. package/dist/commands/login.js +30 -9
  35. package/dist/commands/logout.d.ts +41 -7
  36. package/dist/commands/logout.js +8 -8
  37. package/dist/commands/verify.d.ts +131 -11
  38. package/dist/commands/verify.js +214 -25
  39. package/dist/oidc.d.ts +47 -0
  40. package/dist/oidc.js +162 -3
  41. package/dist/util/config.d.ts +16 -1
  42. package/dist/util/config.js +50 -14
  43. package/dist/util/field-parser.d.ts +3 -1
  44. package/dist/util/field-parser.js +11 -5
  45. package/package.json +9 -21
  46. package/dist/hooks/command-not-found.d.ts +0 -3
  47. package/dist/hooks/command-not-found.js +0 -63
  48. package/oclif.manifest.json +0 -857
@@ -1,857 +0,0 @@
1
- {
2
- "commands": {
3
- "api": {
4
- "aliases": [],
5
- "args": {
6
- "method": {
7
- "description": "HTTP method (GET, POST, PUT, PATCH, DELETE)",
8
- "name": "method",
9
- "required": true
10
- },
11
- "path": {
12
- "description": "Full API path including version prefix (e.g. /v1/records, /health, /federation/v1/peer)",
13
- "name": "path",
14
- "required": true
15
- }
16
- },
17
- "description": "Call any AGLedger API endpoint. Pass-through with zero flag translation: use the exact path and body shape documented in the API (see `agledger discover` or GET /openapi.json).",
18
- "examples": [
19
- "agledger api GET /health",
20
- "agledger api GET /v1/records -F status=ACTIVE -F limit=50",
21
- "agledger api POST /v1/records --data '{\"type\":\"notarize-generic-v1\",\"criteria\":{\"summary\":\"...\"}}'",
22
- "agledger api POST /v1/records -F type=notarize-generic-v1 -F criteria.summary=\"summarize Q3 filings\"",
23
- "agledger api POST /v1/records -F type=notarize-generic-v1 -F criteria.summary=\"file Q3 report\" -f externalTaskId=4821 # -f keeps a digit-only id a string",
24
- "agledger api POST /v1/records --input payload.json",
25
- "cat payload.json | agledger api POST /v1/records --input -",
26
- "agledger api GET /v1/records --paginate # streams all pages as NDJSON"
27
- ],
28
- "flags": {
29
- "json": {
30
- "description": "Force JSON output (default when stdout is piped)",
31
- "name": "json",
32
- "allowNo": false,
33
- "type": "boolean"
34
- },
35
- "quiet": {
36
- "description": "Suppress output (exit code only)",
37
- "name": "quiet",
38
- "allowNo": false,
39
- "type": "boolean"
40
- },
41
- "api-key": {
42
- "description": "AGLedger API key",
43
- "env": "AGLEDGER_API_KEY",
44
- "name": "api-key",
45
- "hasDynamicHelp": false,
46
- "multiple": false,
47
- "type": "option"
48
- },
49
- "api-url": {
50
- "description": "AGLedger API base URL",
51
- "env": "AGLEDGER_API_URL",
52
- "name": "api-url",
53
- "hasDynamicHelp": false,
54
- "multiple": false,
55
- "type": "option"
56
- },
57
- "profile": {
58
- "description": "Stored profile to use for credentials (falls back to the active profile)",
59
- "name": "profile",
60
- "hasDynamicHelp": false,
61
- "multiple": false,
62
- "type": "option"
63
- },
64
- "verbose": {
65
- "description": "Report which credential was used, and each OIDC cert exchange, as JSON lines on stderr. Never prints a key, token or cert.",
66
- "name": "verbose",
67
- "allowNo": false,
68
- "type": "boolean"
69
- },
70
- "data": {
71
- "description": "Request body as a JSON string. For GET/DELETE, used as query parameters.",
72
- "name": "data",
73
- "hasDynamicHelp": false,
74
- "multiple": false,
75
- "type": "option"
76
- },
77
- "input": {
78
- "description": "Read body JSON from file (or \"-\" for stdin). Shape matches --data.",
79
- "name": "input",
80
- "hasDynamicHelp": false,
81
- "multiple": false,
82
- "type": "option"
83
- },
84
- "field": {
85
- "char": "F",
86
- "description": "Set a typed field as key=value: true/false/null, numbers, or JSON for {...}/[...]. Anything else is a string. Use -f for a value that must stay a string, such as an all-digit identifier. Supports nested (a.b.c=v) and array append (arr[]=v). Repeatable.",
87
- "name": "field",
88
- "hasDynamicHelp": false,
89
- "multiple": true,
90
- "type": "option"
91
- },
92
- "raw-field": {
93
- "char": "f",
94
- "description": "Set a field as key=value, taking the value verbatim as a string. Use this for identifiers that look numeric (externalTaskId, correlationId, platformRef): the Server does not coerce a JSON body, so -F id=4821 sends a number and is refused. Same path syntax as -F. Repeatable.",
95
- "name": "raw-field",
96
- "hasDynamicHelp": false,
97
- "multiple": true,
98
- "type": "option"
99
- },
100
- "query": {
101
- "description": "Extra query parameters as JSON. Merges over -F fields and --data for GET/DELETE routing.",
102
- "name": "query",
103
- "hasDynamicHelp": false,
104
- "multiple": false,
105
- "type": "option"
106
- },
107
- "paginate": {
108
- "description": "Follow cursor pagination, stream all results as NDJSON. Requires GET on a paginated route.",
109
- "name": "paginate",
110
- "allowNo": false,
111
- "type": "boolean"
112
- },
113
- "idempotency-key": {
114
- "description": "Dedup key for POST, max 256 chars. One is generated per call and shown by --verbose, and a TIMEOUT or dropped-connection error carries it as `idempotencyKey`. Pass this only when retrying a call that may already have reached the Server: reuse the first attempt's key and it replays the original result instead of creating a second record, where a rerun without it can create a duplicate. Bound to method, route and body, so a retry with a changed body is rejected.",
115
- "name": "idempotency-key",
116
- "hasDynamicHelp": false,
117
- "multiple": false,
118
- "type": "option"
119
- },
120
- "dry-run": {
121
- "description": "Show the request that would be sent without calling the API.",
122
- "name": "dry-run",
123
- "allowNo": false,
124
- "type": "boolean"
125
- }
126
- },
127
- "hasDynamicHelp": false,
128
- "hiddenAliases": [],
129
- "id": "api",
130
- "pluginAlias": "@agledger/cli",
131
- "pluginName": "@agledger/cli",
132
- "pluginType": "core",
133
- "strict": true,
134
- "enableJsonFlag": false,
135
- "isESM": true,
136
- "relativePath": [
137
- "dist",
138
- "commands",
139
- "api.js"
140
- ]
141
- },
142
- "auth": {
143
- "aliases": [],
144
- "args": {},
145
- "description": "Check current authentication status, including the OIDC cert identity when a token source is configured. Returns `authenticated: false` when no credential is configured (exit 0).",
146
- "flags": {
147
- "json": {
148
- "description": "Force JSON output (default when stdout is piped)",
149
- "name": "json",
150
- "allowNo": false,
151
- "type": "boolean"
152
- },
153
- "quiet": {
154
- "description": "Suppress output (exit code only)",
155
- "name": "quiet",
156
- "allowNo": false,
157
- "type": "boolean"
158
- },
159
- "api-key": {
160
- "description": "AGLedger API key",
161
- "env": "AGLEDGER_API_KEY",
162
- "name": "api-key",
163
- "hasDynamicHelp": false,
164
- "multiple": false,
165
- "type": "option"
166
- },
167
- "api-url": {
168
- "description": "AGLedger API base URL",
169
- "env": "AGLEDGER_API_URL",
170
- "name": "api-url",
171
- "hasDynamicHelp": false,
172
- "multiple": false,
173
- "type": "option"
174
- },
175
- "profile": {
176
- "description": "Stored profile to use for credentials (falls back to the active profile)",
177
- "name": "profile",
178
- "hasDynamicHelp": false,
179
- "multiple": false,
180
- "type": "option"
181
- },
182
- "verbose": {
183
- "description": "Report which credential was used, and each OIDC cert exchange, as JSON lines on stderr. Never prints a key, token or cert.",
184
- "name": "verbose",
185
- "allowNo": false,
186
- "type": "boolean"
187
- }
188
- },
189
- "hasDynamicHelp": false,
190
- "hiddenAliases": [],
191
- "id": "auth",
192
- "pluginAlias": "@agledger/cli",
193
- "pluginName": "@agledger/cli",
194
- "pluginType": "core",
195
- "strict": true,
196
- "enableJsonFlag": false,
197
- "isESM": true,
198
- "relativePath": [
199
- "dist",
200
- "commands",
201
- "auth.js"
202
- ]
203
- },
204
- "config": {
205
- "aliases": [],
206
- "args": {
207
- "action": {
208
- "description": "Action: list, get, use, path",
209
- "name": "action",
210
- "options": [
211
- "list",
212
- "get",
213
- "use",
214
- "path"
215
- ],
216
- "required": true
217
- },
218
- "profile": {
219
- "description": "Profile name (for `use`)",
220
- "name": "profile"
221
- }
222
- },
223
- "description": "Inspect or switch between stored profiles in ~/.agledger/config.json",
224
- "examples": [
225
- "agledger config list # list all profiles",
226
- "agledger config get # show active profile",
227
- "agledger config get --profile prod # show a specific profile",
228
- "agledger config use prod # set prod as the active profile",
229
- "agledger config path # print the config file path"
230
- ],
231
- "flags": {
232
- "json": {
233
- "description": "Force JSON output (default when stdout is piped)",
234
- "name": "json",
235
- "allowNo": false,
236
- "type": "boolean"
237
- },
238
- "quiet": {
239
- "description": "Suppress output (exit code only)",
240
- "name": "quiet",
241
- "allowNo": false,
242
- "type": "boolean"
243
- },
244
- "api-key": {
245
- "description": "AGLedger API key",
246
- "env": "AGLEDGER_API_KEY",
247
- "name": "api-key",
248
- "hasDynamicHelp": false,
249
- "multiple": false,
250
- "type": "option"
251
- },
252
- "api-url": {
253
- "description": "AGLedger API base URL",
254
- "env": "AGLEDGER_API_URL",
255
- "name": "api-url",
256
- "hasDynamicHelp": false,
257
- "multiple": false,
258
- "type": "option"
259
- },
260
- "profile": {
261
- "description": "Profile name to inspect (for `get`)",
262
- "name": "profile",
263
- "hasDynamicHelp": false,
264
- "multiple": false,
265
- "type": "option"
266
- },
267
- "verbose": {
268
- "description": "Report which credential was used, and each OIDC cert exchange, as JSON lines on stderr. Never prints a key, token or cert.",
269
- "name": "verbose",
270
- "allowNo": false,
271
- "type": "boolean"
272
- }
273
- },
274
- "hasDynamicHelp": false,
275
- "hiddenAliases": [],
276
- "id": "config",
277
- "pluginAlias": "@agledger/cli",
278
- "pluginName": "@agledger/cli",
279
- "pluginType": "core",
280
- "strict": true,
281
- "enableJsonFlag": false,
282
- "isESM": true,
283
- "relativePath": [
284
- "dist",
285
- "commands",
286
- "config.js"
287
- ]
288
- },
289
- "discover": {
290
- "aliases": [],
291
- "args": {},
292
- "description": "Check API health and current identity, and return the quickstart workflow. Call this first.",
293
- "flags": {
294
- "json": {
295
- "description": "Force JSON output (default when stdout is piped)",
296
- "name": "json",
297
- "allowNo": false,
298
- "type": "boolean"
299
- },
300
- "quiet": {
301
- "description": "Suppress output (exit code only)",
302
- "name": "quiet",
303
- "allowNo": false,
304
- "type": "boolean"
305
- },
306
- "api-key": {
307
- "description": "AGLedger API key",
308
- "env": "AGLEDGER_API_KEY",
309
- "name": "api-key",
310
- "hasDynamicHelp": false,
311
- "multiple": false,
312
- "type": "option"
313
- },
314
- "api-url": {
315
- "description": "AGLedger API base URL",
316
- "env": "AGLEDGER_API_URL",
317
- "name": "api-url",
318
- "hasDynamicHelp": false,
319
- "multiple": false,
320
- "type": "option"
321
- },
322
- "profile": {
323
- "description": "Stored profile to use for credentials (falls back to the active profile)",
324
- "name": "profile",
325
- "hasDynamicHelp": false,
326
- "multiple": false,
327
- "type": "option"
328
- },
329
- "verbose": {
330
- "description": "Report which credential was used, and each OIDC cert exchange, as JSON lines on stderr. Never prints a key, token or cert.",
331
- "name": "verbose",
332
- "allowNo": false,
333
- "type": "boolean"
334
- }
335
- },
336
- "hasDynamicHelp": false,
337
- "hiddenAliases": [],
338
- "id": "discover",
339
- "pluginAlias": "@agledger/cli",
340
- "pluginName": "@agledger/cli",
341
- "pluginType": "core",
342
- "strict": true,
343
- "enableJsonFlag": false,
344
- "isESM": true,
345
- "relativePath": [
346
- "dist",
347
- "commands",
348
- "discover.js"
349
- ]
350
- },
351
- "docs": {
352
- "aliases": [],
353
- "args": {},
354
- "description": "Fetch the API's agent-oriented documentation narrative (llms.txt / llms-full.txt).",
355
- "examples": [
356
- "<%= config.bin %> docs",
357
- "<%= config.bin %> docs --full",
358
- "<%= config.bin %> docs --full > agledger-llms.txt"
359
- ],
360
- "flags": {
361
- "json": {
362
- "description": "Force JSON output (default when stdout is piped)",
363
- "name": "json",
364
- "allowNo": false,
365
- "type": "boolean"
366
- },
367
- "quiet": {
368
- "description": "Suppress output (exit code only)",
369
- "name": "quiet",
370
- "allowNo": false,
371
- "type": "boolean"
372
- },
373
- "api-key": {
374
- "description": "AGLedger API key",
375
- "env": "AGLEDGER_API_KEY",
376
- "name": "api-key",
377
- "hasDynamicHelp": false,
378
- "multiple": false,
379
- "type": "option"
380
- },
381
- "api-url": {
382
- "description": "AGLedger API base URL",
383
- "env": "AGLEDGER_API_URL",
384
- "name": "api-url",
385
- "hasDynamicHelp": false,
386
- "multiple": false,
387
- "type": "option"
388
- },
389
- "profile": {
390
- "description": "Stored profile to use for credentials (falls back to the active profile)",
391
- "name": "profile",
392
- "hasDynamicHelp": false,
393
- "multiple": false,
394
- "type": "option"
395
- },
396
- "verbose": {
397
- "description": "Report which credential was used, and each OIDC cert exchange, as JSON lines on stderr. Never prints a key, token or cert.",
398
- "name": "verbose",
399
- "allowNo": false,
400
- "type": "boolean"
401
- },
402
- "full": {
403
- "description": "Fetch the expanded llms-full.txt narrative instead of the concise llms.txt.",
404
- "name": "full",
405
- "allowNo": false,
406
- "type": "boolean"
407
- }
408
- },
409
- "hasDynamicHelp": false,
410
- "hiddenAliases": [],
411
- "id": "docs",
412
- "pluginAlias": "@agledger/cli",
413
- "pluginName": "@agledger/cli",
414
- "pluginType": "core",
415
- "strict": true,
416
- "enableJsonFlag": false,
417
- "isESM": true,
418
- "relativePath": [
419
- "dist",
420
- "commands",
421
- "docs.js"
422
- ]
423
- },
424
- "help-json": {
425
- "aliases": [],
426
- "args": {
427
- "command": {
428
- "description": "CLI command name (e.g., \"api\", \"discover\", \"login\")",
429
- "name": "command",
430
- "required": true
431
- }
432
- },
433
- "description": "Get JSON schema for a specific command (agent discovery)",
434
- "flags": {
435
- "json": {
436
- "description": "Force JSON output (default when stdout is piped)",
437
- "name": "json",
438
- "allowNo": false,
439
- "type": "boolean"
440
- },
441
- "quiet": {
442
- "description": "Suppress output (exit code only)",
443
- "name": "quiet",
444
- "allowNo": false,
445
- "type": "boolean"
446
- },
447
- "api-key": {
448
- "description": "AGLedger API key",
449
- "env": "AGLEDGER_API_KEY",
450
- "name": "api-key",
451
- "hasDynamicHelp": false,
452
- "multiple": false,
453
- "type": "option"
454
- },
455
- "api-url": {
456
- "description": "AGLedger API base URL",
457
- "env": "AGLEDGER_API_URL",
458
- "name": "api-url",
459
- "hasDynamicHelp": false,
460
- "multiple": false,
461
- "type": "option"
462
- },
463
- "profile": {
464
- "description": "Stored profile to use for credentials (falls back to the active profile)",
465
- "name": "profile",
466
- "hasDynamicHelp": false,
467
- "multiple": false,
468
- "type": "option"
469
- },
470
- "verbose": {
471
- "description": "Report which credential was used, and each OIDC cert exchange, as JSON lines on stderr. Never prints a key, token or cert.",
472
- "name": "verbose",
473
- "allowNo": false,
474
- "type": "boolean"
475
- }
476
- },
477
- "hasDynamicHelp": false,
478
- "hiddenAliases": [],
479
- "id": "help-json",
480
- "pluginAlias": "@agledger/cli",
481
- "pluginName": "@agledger/cli",
482
- "pluginType": "core",
483
- "strict": true,
484
- "enableJsonFlag": false,
485
- "isESM": true,
486
- "relativePath": [
487
- "dist",
488
- "commands",
489
- "help-json.js"
490
- ]
491
- },
492
- "list-commands": {
493
- "aliases": [],
494
- "args": {},
495
- "description": "List all CLI commands (for agent discovery). Most API work goes through `agledger api`.",
496
- "flags": {
497
- "json": {
498
- "description": "Force JSON output (default when stdout is piped)",
499
- "name": "json",
500
- "allowNo": false,
501
- "type": "boolean"
502
- },
503
- "quiet": {
504
- "description": "Suppress output (exit code only)",
505
- "name": "quiet",
506
- "allowNo": false,
507
- "type": "boolean"
508
- },
509
- "api-key": {
510
- "description": "AGLedger API key",
511
- "env": "AGLEDGER_API_KEY",
512
- "name": "api-key",
513
- "hasDynamicHelp": false,
514
- "multiple": false,
515
- "type": "option"
516
- },
517
- "api-url": {
518
- "description": "AGLedger API base URL",
519
- "env": "AGLEDGER_API_URL",
520
- "name": "api-url",
521
- "hasDynamicHelp": false,
522
- "multiple": false,
523
- "type": "option"
524
- },
525
- "profile": {
526
- "description": "Stored profile to use for credentials (falls back to the active profile)",
527
- "name": "profile",
528
- "hasDynamicHelp": false,
529
- "multiple": false,
530
- "type": "option"
531
- },
532
- "verbose": {
533
- "description": "Report which credential was used, and each OIDC cert exchange, as JSON lines on stderr. Never prints a key, token or cert.",
534
- "name": "verbose",
535
- "allowNo": false,
536
- "type": "boolean"
537
- }
538
- },
539
- "hasDynamicHelp": false,
540
- "hiddenAliases": [],
541
- "id": "list-commands",
542
- "pluginAlias": "@agledger/cli",
543
- "pluginName": "@agledger/cli",
544
- "pluginType": "core",
545
- "strict": true,
546
- "enableJsonFlag": false,
547
- "isESM": true,
548
- "relativePath": [
549
- "dist",
550
- "commands",
551
- "list-commands.js"
552
- ]
553
- },
554
- "login": {
555
- "aliases": [],
556
- "args": {},
557
- "description": "Verify an API key, or an OIDC token source with --oidc, and store it in ~/.agledger/config.json (0600)",
558
- "examples": [
559
- "<%= config.bin %> login --api-url https://agledger.internal --api-key agl_agt_... --profile prod",
560
- "<%= config.bin %> login --oidc --api-url https://agledger.internal --oidc-token-cmd 'gcloud auth print-identity-token --audiences=agledger'",
561
- "<%= config.bin %> login --oidc --api-url https://agledger.internal --oidc-token-file /var/run/secrets/tokens/agledger"
562
- ],
563
- "flags": {
564
- "json": {
565
- "description": "Force JSON output (default when stdout is piped)",
566
- "name": "json",
567
- "allowNo": false,
568
- "type": "boolean"
569
- },
570
- "quiet": {
571
- "description": "Suppress output (exit code only)",
572
- "name": "quiet",
573
- "allowNo": false,
574
- "type": "boolean"
575
- },
576
- "api-key": {
577
- "description": "AGLedger API key",
578
- "env": "AGLEDGER_API_KEY",
579
- "name": "api-key",
580
- "hasDynamicHelp": false,
581
- "multiple": false,
582
- "type": "option"
583
- },
584
- "api-url": {
585
- "description": "AGLedger API base URL",
586
- "env": "AGLEDGER_API_URL",
587
- "name": "api-url",
588
- "hasDynamicHelp": false,
589
- "multiple": false,
590
- "type": "option"
591
- },
592
- "profile": {
593
- "description": "Profile name",
594
- "name": "profile",
595
- "default": "default",
596
- "hasDynamicHelp": false,
597
- "multiple": false,
598
- "type": "option"
599
- },
600
- "verbose": {
601
- "description": "Report which credential was used, and each OIDC cert exchange, as JSON lines on stderr. Never prints a key, token or cert.",
602
- "name": "verbose",
603
- "allowNo": false,
604
- "type": "boolean"
605
- },
606
- "oidc": {
607
- "description": "Store an OIDC token source instead of an API key. A token command is verified by one cert exchange and a GET /v1/auth/me before it is saved. A token file is only checked to hold a JWT: the Server exchanges each token once, so exchanging it here would leave the next command a spent token until the file rotates.",
608
- "name": "oidc",
609
- "allowNo": false,
610
- "type": "boolean"
611
- },
612
- "oidc-token-cmd": {
613
- "description": "With --oidc: a shell command whose stdout is an OIDC JWT, run on every cert exchange.",
614
- "env": "AGLEDGER_OIDC_TOKEN_CMD",
615
- "name": "oidc-token-cmd",
616
- "hasDynamicHelp": false,
617
- "multiple": false,
618
- "type": "option"
619
- },
620
- "oidc-token-file": {
621
- "description": "With --oidc: a file holding an OIDC JWT, read on every cert exchange (a projected token in a pod).",
622
- "env": "AGLEDGER_OIDC_TOKEN_FILE",
623
- "name": "oidc-token-file",
624
- "hasDynamicHelp": false,
625
- "multiple": false,
626
- "type": "option"
627
- },
628
- "oidc-agent-id": {
629
- "description": "With --oidc: an optional assertion of the agent id the token binds to. The token decides the agent, never this value: when it names a different agent, or the token binds none, the exchange fails 403 CERT_AGENT_BINDING_MISMATCH instead of issuing a cert. To bind an agent, an administrator sets oidcIss/oidcSub on it (PATCH /v1/agents/{id}) or maps an agent_id claim on the trusted issuer (claimMapping.agent_id).",
630
- "env": "AGLEDGER_OIDC_AGENT_ID",
631
- "name": "oidc-agent-id",
632
- "hasDynamicHelp": false,
633
- "multiple": false,
634
- "type": "option"
635
- }
636
- },
637
- "hasDynamicHelp": false,
638
- "hiddenAliases": [],
639
- "id": "login",
640
- "pluginAlias": "@agledger/cli",
641
- "pluginName": "@agledger/cli",
642
- "pluginType": "core",
643
- "strict": true,
644
- "enableJsonFlag": false,
645
- "isESM": true,
646
- "relativePath": [
647
- "dist",
648
- "commands",
649
- "login.js"
650
- ]
651
- },
652
- "logout": {
653
- "aliases": [],
654
- "args": {},
655
- "description": "Remove a stored profile from ~/.agledger/config.json: the active profile, the one named by --profile, or every profile with --all. Exits 2 when there is no such profile to remove. Removing the active profile leaves none active: pick another with `config use`.",
656
- "examples": [
657
- "<%= config.bin %> logout",
658
- "<%= config.bin %> logout --profile prod",
659
- "<%= config.bin %> logout --all"
660
- ],
661
- "flags": {
662
- "json": {
663
- "description": "Force JSON output (default when stdout is piped)",
664
- "name": "json",
665
- "allowNo": false,
666
- "type": "boolean"
667
- },
668
- "quiet": {
669
- "description": "Suppress output (exit code only)",
670
- "name": "quiet",
671
- "allowNo": false,
672
- "type": "boolean"
673
- },
674
- "api-key": {
675
- "description": "AGLedger API key",
676
- "env": "AGLEDGER_API_KEY",
677
- "name": "api-key",
678
- "hasDynamicHelp": false,
679
- "multiple": false,
680
- "type": "option"
681
- },
682
- "api-url": {
683
- "description": "AGLedger API base URL",
684
- "env": "AGLEDGER_API_URL",
685
- "name": "api-url",
686
- "hasDynamicHelp": false,
687
- "multiple": false,
688
- "type": "option"
689
- },
690
- "profile": {
691
- "description": "Profile name to remove (default: the active profile)",
692
- "name": "profile",
693
- "hasDynamicHelp": false,
694
- "multiple": false,
695
- "type": "option"
696
- },
697
- "verbose": {
698
- "description": "Report which credential was used, and each OIDC cert exchange, as JSON lines on stderr. Never prints a key, token or cert.",
699
- "name": "verbose",
700
- "allowNo": false,
701
- "type": "boolean"
702
- },
703
- "all": {
704
- "description": "Remove all profiles",
705
- "name": "all",
706
- "allowNo": false,
707
- "type": "boolean"
708
- }
709
- },
710
- "hasDynamicHelp": false,
711
- "hiddenAliases": [],
712
- "id": "logout",
713
- "pluginAlias": "@agledger/cli",
714
- "pluginName": "@agledger/cli",
715
- "pluginType": "core",
716
- "strict": true,
717
- "enableJsonFlag": false,
718
- "isESM": true,
719
- "relativePath": [
720
- "dist",
721
- "commands",
722
- "logout.js"
723
- ]
724
- },
725
- "verify": {
726
- "aliases": [],
727
- "args": {
728
- "file": {
729
- "description": "Path to the audit export JSON file (or \"-\" for stdin).",
730
- "name": "file"
731
- }
732
- },
733
- "description": "Verify a record audit export offline (COSE_Sign1 envelope, RFC 9052; Ed25519 or ES256).",
734
- "examples": [
735
- "<%= config.bin %> verify audit-export.json --trust-anchor sha256:<64 hex>",
736
- "<%= config.bin %> verify audit-export.json",
737
- "<%= config.bin %> verify audit-export.json --keys vault-keys.json",
738
- "<%= config.bin %> verify audit-export.json --agent-keys agent-jwks.json",
739
- "<%= config.bin %> verify audit-export.json --json",
740
- "cat audit-export.json | <%= config.bin %> verify -"
741
- ],
742
- "flags": {
743
- "json": {
744
- "description": "Force JSON output (default when stdout is piped)",
745
- "name": "json",
746
- "allowNo": false,
747
- "type": "boolean"
748
- },
749
- "quiet": {
750
- "description": "Suppress output (exit code only)",
751
- "name": "quiet",
752
- "allowNo": false,
753
- "type": "boolean"
754
- },
755
- "api-key": {
756
- "description": "AGLedger API key",
757
- "env": "AGLEDGER_API_KEY",
758
- "name": "api-key",
759
- "hasDynamicHelp": false,
760
- "multiple": false,
761
- "type": "option"
762
- },
763
- "api-url": {
764
- "description": "AGLedger API base URL",
765
- "env": "AGLEDGER_API_URL",
766
- "name": "api-url",
767
- "hasDynamicHelp": false,
768
- "multiple": false,
769
- "type": "option"
770
- },
771
- "profile": {
772
- "description": "Stored profile to use for credentials (falls back to the active profile)",
773
- "name": "profile",
774
- "hasDynamicHelp": false,
775
- "multiple": false,
776
- "type": "option"
777
- },
778
- "verbose": {
779
- "description": "Report which credential was used, and each OIDC cert exchange, as JSON lines on stderr. Never prints a key, token or cert.",
780
- "name": "verbose",
781
- "allowNo": false,
782
- "type": "boolean"
783
- },
784
- "keys": {
785
- "description": "Path to a JSON file holding public keys you supply. Accepts a {keyId: SPKI-DER-base64} map, a [{keyId, publicKey, ...}] list, or the raw GET /v1/verification-keys response envelope ({data:[...], ...}, the .data array is unwrapped automatically, and each key's signed statements are walked with --trust-anchor). Merged over any keys embedded in the export. Where a key came from is not whether it is trusted: that is --trust-anchor.",
786
- "name": "keys",
787
- "hasDynamicHelp": false,
788
- "multiple": false,
789
- "type": "option"
790
- },
791
- "trust-anchor": {
792
- "description": "sha256:<64 hex> SPKI digest of a vault key you took out of band (the installer prints the first vault key's; the Server's signing-key-digest.js derives one from any key you hold). The signed key statements the export carries are walked from it: an entry signed by a key the walk does not reach fails CHAIN_SIGNING_KEY_UNANCHORED, and a statement that does not hold fails KEY_STATEMENT_INVALID, KEY_CLOSURE_INVALID or CHAIN_KEY_WINDOW_DRIFT. Without one, a pass rests on keys nobody pinned. Repeatable.",
793
- "name": "trust-anchor",
794
- "hasDynamicHelp": false,
795
- "multiple": true,
796
- "type": "option"
797
- },
798
- "distrusted-key": {
799
- "description": "sha256:<64 hex>, optionally @<RFC 3339 instant>: a key the operator distrusts, as in the Server's VAULT_DISTRUSTED_KEYS. What it signed from that instant (with none, from its retirement) counts for nothing in the walk. Requires --trust-anchor. A dated entry may name a key also given to --trust-anchor, which then vouches for what it signed before the instant. Where an export lists a key retired at the instant the Server distrusts it from (distrustedFrom), earlier than its signed retirement, a run without the same entry fails on that window, and the finding names the --distrusted-key to confirm with the Server's operator. Repeatable.",
800
- "name": "distrusted-key",
801
- "hasDynamicHelp": false,
802
- "multiple": true,
803
- "type": "option"
804
- },
805
- "agent-keys": {
806
- "description": "Path to a JSON file holding Ed25519 public keys of agent certs: a JWK, a list of JWKs, or a {keys:[...]} JWK Set (an entry may wrap its key as {publicKeyJwk:{...}}). Each is the publicKeyJwk an agent sent at cert exchange (also the cnf.jwk claim in its certJws). An entry whose sealed agent signature names one of them by thumbprint has that signature re-verified offline, and fails CHAIN_AGENT_SIGNATURE_INVALID if it does not verify.",
807
- "name": "agent-keys",
808
- "hasDynamicHelp": false,
809
- "multiple": false,
810
- "type": "option"
811
- },
812
- "require-key-id": {
813
- "description": "Require every entry to reference this keyId. Rejects otherwise-valid exports signed by a retired or unexpected key.",
814
- "name": "require-key-id",
815
- "hasDynamicHelp": false,
816
- "multiple": false,
817
- "type": "option"
818
- },
819
- "distrusted-keys": {
820
- "hidden": true,
821
- "name": "distrusted-keys",
822
- "hasDynamicHelp": false,
823
- "multiple": false,
824
- "type": "option"
825
- },
826
- "require-out-of-band-keys": {
827
- "hidden": true,
828
- "name": "require-out-of-band-keys",
829
- "allowNo": false,
830
- "type": "boolean"
831
- },
832
- "require-supplied-keys": {
833
- "description": "Refuse keys embedded in the export: an entry whose only key is export-embedded fails CHAIN_KEY_POLICY_VIOLATION, so every signature is checked against a key from --keys.",
834
- "name": "require-supplied-keys",
835
- "allowNo": false,
836
- "type": "boolean"
837
- }
838
- },
839
- "hasDynamicHelp": false,
840
- "hiddenAliases": [],
841
- "id": "verify",
842
- "pluginAlias": "@agledger/cli",
843
- "pluginName": "@agledger/cli",
844
- "pluginType": "core",
845
- "strict": true,
846
- "usage": "verify FILE [--trust-anchor <value>...] [--distrusted-key <value>...] [--keys <value>] [--agent-keys <value>] [--require-key-id <value>] [--require-supplied-keys] [--json] [--quiet]",
847
- "enableJsonFlag": false,
848
- "isESM": true,
849
- "relativePath": [
850
- "dist",
851
- "commands",
852
- "verify.js"
853
- ]
854
- }
855
- },
856
- "version": "2.0.0"
857
- }