@agledger/cli 1.0.3 → 1.0.4

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 CHANGED
@@ -1,16 +1,16 @@
1
1
  # @agledger/cli
2
2
 
3
- The official CLI for the [AGLedger](https://agledger.ai) API — accountability infrastructure for AI agents. The Layer 3 accountability layer of the agent stack.
3
+ The official CLI for the [AGLedger](https://agledger.ai) API: accountability infrastructure for AI agents. The Layer 3 accountability layer of the agent stack.
4
4
 
5
- A **thin cover** over the API. The CLI passes your request straight through to the API and forwards the response — no hand-coded per-endpoint wrappers, no flag-to-body translation, no drift. Every AGLedger API route is reachable via `agledger api <METHOD> <path>`.
5
+ A **thin cover** over the API. The CLI passes your request straight through to the API and forwards the response: no hand-coded per-endpoint wrappers, no flag-to-body translation, no drift. Every AGLedger API route is reachable via `agledger api <METHOD> <path>`.
6
6
 
7
7
  **Learn more**
8
8
 
9
- - [agledger.ai](https://agledger.ai) — what AGLedger is and why Layer 3 accountability matters
10
- - [How it works](https://agledger.ai/how-it-works) — the four-endpoint lifecycle: record, completion, verdict, fulfill
11
- - [Glossary](https://agledger.ai/glossary) — canonical definitions of Record, Completion, SCITT Receipt, Verdict, Settlement Signal
12
- - [API reference](https://agledger.ai/api) — every endpoint the CLI covers
13
- - [Documentation](https://agledger.ai/docs) — installation and integration guides
9
+ - [agledger.ai](https://agledger.ai): what AGLedger is and why Layer 3 accountability matters
10
+ - [How it works](https://agledger.ai/how-it-works): the four-endpoint lifecycle (record, completion, verdict, fulfill)
11
+ - [Glossary](https://agledger.ai/glossary): canonical definitions of Record, Completion, SCITT Receipt, Verdict, Settlement Signal
12
+ - [API reference](https://agledger.ai/api): every endpoint the CLI covers
13
+ - [Documentation](https://agledger.ai/docs): installation and integration guides
14
14
 
15
15
  ## Install
16
16
 
@@ -44,7 +44,7 @@ agledger api POST /v1/records \
44
44
  -F criteria.task_description='summarize Q3 filings'
45
45
 
46
46
  # Submit a completion. On a gated record the principal then renders a Verdict
47
- # (accept / reject) on the Completion — use the route documented in the API
47
+ # (accept / reject) on the Completion; use the route documented in the API
48
48
  # (see `agledger api GET /openapi.json`).
49
49
  agledger api POST /v1/records/<record-id>/completions \
50
50
  --data '{"evidence":{"summary":"delivered 500x copper wire","evidenceUrl":"https://orders.example.com/CW-500"}}'
@@ -52,7 +52,7 @@ agledger api POST /v1/records/<record-id>/completions \
52
52
 
53
53
  ## Why a thin cover?
54
54
 
55
- - **Zero drift.** When the API adds, renames, or removes a route, the CLI keeps working — no code change required.
55
+ - **Zero drift.** When the API adds, renames, or removes a route, the CLI keeps working, no code change required.
56
56
  - **One mental model.** The API docs are the CLI docs. What you read in the OpenAPI spec is what you type.
57
57
  - **All 250+ routes on day one.** You get full parity, not a hand-picked subset.
58
58
 
@@ -73,7 +73,7 @@ Merging order (low → high): `--data` → `--input` → `-F` → `--query`. Lat
73
73
  - `--quiet` suppresses output (exit code only)
74
74
  - `--dry-run` on `agledger api` shows the request without sending
75
75
  - `--paginate` on GET follows cursor pagination and streams NDJSON
76
- - Structured errors on stderr: `{error: true, code, message, suggestion, ...}` — API errors pass through verbatim
76
+ - Structured errors on stderr: `{error: true, code, message, suggestion, ...}`; API errors pass through verbatim
77
77
  - Semantic exit codes: 0 (OK), 2 (usage), 3 (auth), 4 (forbidden), 5 (not found), 6 (conflict), 7 (rate limit), 8 (server), 9 (network), 10 (timeout)
78
78
  - `NO_COLOR` supported per [no-color.org](https://no-color.org)
79
79
 
@@ -107,7 +107,7 @@ agledger api GET /openapi.json # Full API route catalog
107
107
  # Verifies the key against the API, then stores it under ~/.agledger/config.json (0600)
108
108
  agledger login --api-key agl_adm_... --profile prod
109
109
 
110
- # Switch the active profile — subsequent commands use its key automatically
110
+ # Switch the active profile; subsequent commands use its key automatically
111
111
  agledger config use prod
112
112
 
113
113
  # Run a one-off against a specific stored profile
@@ -117,14 +117,14 @@ agledger api GET /v1/records --profile prod
117
117
  AGLEDGER_API_KEY=... AGLEDGER_API_URL=... agledger api GET /v1/records
118
118
  ```
119
119
 
120
- **Credential precedence** (highest first) — applied per command:
120
+ **Credential precedence** (highest first), applied per command:
121
121
 
122
122
  - **API key:** `--api-key` flag → `AGLEDGER_API_KEY` env → stored profile (`--profile <name>`, else the active profile).
123
123
  - **API URL:** `--api-url` flag → `AGLEDGER_API_URL` env → stored profile URL → default.
124
124
 
125
125
  So once you `agledger login`, plain `agledger api ...` calls authenticate from the stored profile with no flags or env. `--dry-run` echoes the resolved auth (URL, source, masked key) so you can confirm which credentials a call would use without sending it.
126
126
 
127
- Agent keys (`agl_agt_*`) and admin keys (`agl_adm_*`) are both accepted — the API routes them appropriately.
127
+ Agent keys (`agl_agt_*`) and admin keys (`agl_adm_*`) are both accepted; the API routes them appropriately.
128
128
 
129
129
  ## Requirements
130
130
 
package/SKILL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AGLedger CLI
2
2
 
3
- Thin cover over the AGLedger API. The CLI passes your call through to the API and forwards the response — no flag-to-body translation, no drift.
3
+ Thin cover over the AGLedger API. The CLI passes your call through to the API and forwards the response. No flag-to-body translation, no drift.
4
4
 
5
5
  ## Setup
6
6
  Credentials resolve per command with this precedence: `--api-key` flag > `AGLEDGER_API_KEY` env > stored profile (after `agledger login`). API URL: `--api-url` flag > `AGLEDGER_API_URL` env > stored profile URL > default. Optional: `AGLEDGER_API_URL`.
@@ -13,26 +13,26 @@ agledger api <METHOD> <PATH> [--data JSON | --input FILE | -F key=value ...]
13
13
  ```
14
14
 
15
15
  ## Workflow (start here)
16
- 1. `agledger discover` — health, identity, scopes, quickstart steps.
17
- 2. `agledger api GET /v1/schemas` — list Record types.
18
- 3. `agledger api GET /v1/schemas/{type}` — required fields + examples.
19
- 4. `agledger api POST /v1/records --data '{"type":"...","criteria":{...}}'` — create a record.
20
- 5. `agledger api POST /v1/records/{id}/completions --data '{"evidence":{...}}'` — submit completion when done.
21
- 6. Every API response includes `nextSteps` — follow them.
16
+ 1. `agledger discover`: health, identity, scopes, quickstart steps.
17
+ 2. `agledger api GET /v1/schemas`: list Record types.
18
+ 3. `agledger api GET /v1/schemas/{type}`: required fields + examples.
19
+ 4. `agledger api POST /v1/records --data '{"type":"...","criteria":{...}}'`: create a record.
20
+ 5. `agledger api POST /v1/records/{id}/completions --data '{"evidence":{...}}'`: submit completion when done.
21
+ 6. Every API response includes `nextSteps`. Follow them.
22
22
 
23
23
  ## Ways to pass a body
24
- - `--data '{"k":"v"}'` — raw JSON string (agent-friendly)
25
- - `--input file.json` — read JSON from file
26
- - `--input -` — read JSON from stdin
27
- - `-F key=value` — repeatable; types parsed (`true`/`false`/`null`/numbers); nested via `a.b=v`; arrays via `arr[]=v`
24
+ - `--data '{"k":"v"}'`: raw JSON string (agent-friendly)
25
+ - `--input file.json`: read JSON from file
26
+ - `--input -`: read JSON from stdin
27
+ - `-F key=value`: repeatable; types parsed (`true`/`false`/`null`/numbers); nested via `a.b=v`; arrays via `arr[]=v`
28
28
 
29
29
  ## Discovery commands
30
- - `agledger list-commands --json` — full CLI inventory (10 commands)
31
- - `agledger help-json <command> --json` — per-command schema with args and flags
32
- - `agledger api GET /openapi.json` — full API route catalog
30
+ - `agledger list-commands --json`: full CLI inventory (10 commands)
31
+ - `agledger help-json <command> --json`: per-command schema with args and flags
32
+ - `agledger api GET /openapi.json`: full API route catalog
33
33
 
34
34
  ## Offline audit verification
35
- - `agledger verify <audit-export.json>` — verify a record audit export offline (COSE_Sign1 envelopes per RFC 9052, hash chain + Ed25519 signatures). No network, no API key. Exit 0 if valid, 1 if broken; `--json` for structured output; `--keys <file>` supplies keys out of band (merged over any embedded in the export); `--require-key-id <id>` rejects exports signed by an unexpected key; `--require-out-of-band-keys` refuses the export's own embedded keys for an independent audit.
35
+ - `agledger verify <audit-export.json>`: verify a record audit export offline (COSE_Sign1 envelopes per RFC 9052, hash chain + Ed25519 signatures). No network, no API key. Exit 0 if valid, 1 if broken; `--json` for structured output; `--keys <file>` supplies keys out of band (merged over any embedded in the export); `--require-key-id <id>` rejects exports signed by an unexpected key; `--require-out-of-band-keys` refuses the export's own embedded keys for an independent audit.
36
36
 
37
37
  **What verification proves:**
38
38
  - Every entry was signed by a key listed in the export (or supplied via `--keys`) at the moment the vault wrote it.
@@ -54,8 +54,8 @@ agledger api <METHOD> <PATH> [--data JSON | --input FILE | -F key=value ...]
54
54
  - Semantic exit codes (0-10)
55
55
 
56
56
  ## Credentials
57
- - `agledger login --api-key <key> [--profile NAME]` — verifies key, stores in `~/.agledger/config.json` (0600). After login, plain `agledger api ...` calls authenticate from the stored profile (no flag/env needed).
58
- - `agledger config use <profile>` — set the active profile; `agledger api ... --profile NAME` uses a specific one per-invocation.
57
+ - `agledger login --api-key <key> [--profile NAME]`: verifies key, stores in `~/.agledger/config.json` (0600). After login, plain `agledger api ...` calls authenticate from the stored profile (no flag/env needed).
58
+ - `agledger config use <profile>`: set the active profile; `agledger api ... --profile NAME` uses a specific one per-invocation.
59
59
  - `agledger logout [--profile NAME | --all]`
60
60
  - `agledger config list | get | use <profile> | path`
61
- - `agledger auth` — check login state (exit 0 whether logged in or not)
61
+ - `agledger auth`: check login state (exit 0 whether logged in or not)
@@ -702,5 +702,5 @@
702
702
  ]
703
703
  }
704
704
  },
705
- "version": "1.0.3"
705
+ "version": "1.0.4"
706
706
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agledger/cli",
3
- "version": "1.0.3",
4
- "description": "AGLedger CLI — Developer and agent interface for AGLedger",
3
+ "version": "1.0.4",
4
+ "description": "AGLedger CLI: developer and agent interface for AGLedger",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
7
7
  "bin": {