Skip to content

Commit 6db4104

Browse files
authored
fix: align log cli API surface
1 parent 36e4d1a commit 6db4104

17 files changed

Lines changed: 1007 additions & 120 deletions

.printing-press-patches.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"schema_version": 1,
3+
"applied_at": "2026-05-29",
4+
"base_run_id": "20260517-103932",
5+
"base_printing_press_version": "4.8.0",
6+
"patches": [
7+
{
8+
"id": "log-api-parity",
9+
"summary": "Update the CLI and MCP surface for the current log-node API.",
10+
"reason": "The public log API added proof recovery, signed-note vkey publication, JSON Feed, and SSE stream endpoints after this generated CLI was first published. POST /v1/entries also now accepts a bare signed atrib record and returns a proof bundle.",
11+
"files": [
12+
"spec.yaml",
13+
"README.md",
14+
"SKILL.md",
15+
"internal/cli/promoted_entries.go",
16+
"internal/cli/promoted_feed-json.go",
17+
"internal/cli/promoted_log-pubkey.go",
18+
"internal/cli/promoted_proof.go",
19+
"internal/cli/promoted_stream.go",
20+
"internal/cli/root.go",
21+
"internal/cli/which.go",
22+
"internal/mcp/tools.go",
23+
".printing-press.json"
24+
],
25+
"validated_outcome": "Dry-run generation parsed 13 resources and 14 endpoints. Local tests and live smoke checks cover the finite endpoints and SSE ready event."
26+
},
27+
{
28+
"id": "api-promoted-endpoints",
29+
"summary": "Make api discovery list promoted endpoint commands.",
30+
"reason": "The generated api command only listed hidden resource parents, so it missed top-level promoted endpoints such as checkpoint, pubkey, recent, and stats.",
31+
"files": [
32+
"internal/cli/api_discovery.go"
33+
],
34+
"validated_outcome": "atrib-log-pp-cli api lists promoted endpoints as interfaces."
35+
}
36+
]
37+
}

.printing-press.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
"owner": "nader-helmy",
99
"printer": "creatornader",
1010
"printer_name": "Nader Helmy",
11-
"spec_path": "./atrib-log-openapi.yaml",
11+
"spec_path": "./spec.yaml",
1212
"spec_format": "openapi3",
13-
"spec_checksum": "sha256:52f791859856a9ef338a8de9f1559e96e2a0b0d9b48e735fd0fa6bdc9f0b3257",
13+
"spec_checksum": "sha256:3ed76c7644d78eb10a138a20600b28b4d466ec9a0b636abcafdb1f3075f0fc8f",
1414
"run_id": "20260517-103932",
1515
"mcp_binary": "atrib-log-pp-mcp",
16-
"mcp_tool_count": 10,
17-
"mcp_public_tool_count": 10,
16+
"mcp_tool_count": 13,
17+
"mcp_public_tool_count": 13,
1818
"mcp_ready": "full",
1919
"api_version": "1.0",
2020
"auth_type": "none"
21-
}
21+
}

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# atrib-log-pp-cli
22

3-
Developer CLI for the [atrib](https://github.com/creatornader/atrib) transparency log at `log.atrib.dev`. Wraps the public log API (signed checkpoint, recent entries, lookup by hash, by context, by creator, Merkle tile retrieval) with local SQLite mirroring, full-text search, and agent-friendly defaults.
3+
Developer CLI for the [atrib](https://github.com/creatornader/atrib) transparency log at `log.atrib.dev`. Wraps the public log API (signed checkpoint, log public keys, stats, recent entries, lookup by hash, inclusion-proof recovery, by context, by creator, JSON Feed, SSE stream, Merkle tile retrieval) with local SQLite mirroring, full-text search, and agent-friendly defaults.
44

55
Generated by [Printing Press](https://github.com/mvanhorn/cli-printing-press) from a hand-authored OpenAPI spec for `log.atrib.dev`.
66

77
## What this is and isn't
88

99
**This is** the developer-facing CLI for direct interaction with `log.atrib.dev`. Use it for batch queries, verification, debugging, dogfooding the public log API, and one-off "show me the last N entries by signer X" type questions.
1010

11-
**This is NOT** a replacement for the [`@atrib/*`](https://github.com/creatornader/atrib) MCP cognitive primitives (`emit`, `annotate`, `revise`, `recall`, `trace`, `summarize`). Those are the agent-facing surface, designed around the 6 verbs an agent reasons in. This CLI is the operator-facing surface, designed around the HTTP API endpoints. They are complementary:
11+
**This is NOT** a replacement for the [`@atrib/*`](https://github.com/creatornader/atrib) MCP cognitive primitives (`emit`, `annotate`, `revise`, `recall`, `trace`, `summarize`, `verify`). Those are the agent-facing surface, designed around the seven primitives an agent reasons in. This CLI is the operator-facing surface, designed around the HTTP API endpoints. They are complementary:
1212

1313
- Agent doing cognitive work → use the MCP primitives
1414
- Human or script interacting with the log → use this CLI
@@ -37,11 +37,15 @@ The binary lands in `$GOPATH/bin` (typically `~/go/bin/`). Ensure that's on your
3737
```sh
3838
# Live API queries
3939
atrib-log-pp-cli checkpoint # signed tree head
40+
atrib-log-pp-cli log-pubkey # C2SP signed-note vkey
4041
atrib-log-pp-cli stats # tree size + entries by event type
4142
atrib-log-pp-cli recent --limit 10 # most recent entries
4243
atrib-log-pp-cli lookup <record-hash> # entry by hash
44+
atrib-log-pp-cli proof <record-hash> # recover inclusion proof
4345
atrib-log-pp-cli by-context <context-id> # all entries in a session
4446
atrib-log-pp-cli by-creator <key> # all entries by signer
47+
atrib-log-pp-cli feed-json --limit 10 # JSON Feed 1.1
48+
atrib-log-pp-cli stream # raw Server-Sent Events
4549

4650
# Local mirror + search
4751
atrib-log-pp-cli sync # mirror to local SQLite
@@ -77,7 +81,7 @@ Configure in Claude Desktop's `claude_desktop_config.json`:
7781
}
7882
```
7983

80-
The MCP server exposes the same command surface as the CLI. Note: for *agent cognitive work* (emitting signed records, recalling past actions, etc.), the [`@atrib/*`](https://github.com/creatornader/atrib) MCP servers are the right surface, not this one.
84+
The MCP server exposes the same finite command surface as the CLI. The raw SSE stream command stays CLI-only because MCP tool calls expect a bounded response. Note: for *agent cognitive work* (emitting signed records, recalling past actions, etc.), the [`@atrib/*`](https://github.com/creatornader/atrib) MCP servers are the right surface, not this one.
8185

8286
## Configuration
8387

SKILL.md

Lines changed: 48 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: pp-atrib-log
3-
description: "Printing Press CLI for Atrib Log. atrib transparency log Sigsum-style append-only Merkle log of signed agent action records. Each entry is a..."
3+
description: "Printing Press CLI for Atrib Log. atrib transparency log - Sigsum-style append-only Merkle log of signed agent action records. Each entry is a..."
44
author: "Nader Helmy"
55
license: "Apache-2.0"
66
argument-hint: "<command> [args] | install cli|mcp"
@@ -12,7 +12,7 @@ metadata:
1212
- atrib-log-pp-cli
1313
---
1414

15-
# Atrib Log Printing Press CLI
15+
# Atrib Log - Printing Press CLI
1616

1717
## Prerequisites: Install the CLI
1818

@@ -29,48 +29,65 @@ If the `npx` install fails before this CLI has a public-library category, instal
2929

3030
If `--version` reports "command not found" after install, the install step did not put the binary on `$PATH`. Do not proceed with skill commands until verification succeeds.
3131

32-
atrib transparency log Sigsum-style append-only Merkle log of signed
32+
atrib transparency log - Sigsum-style append-only Merkle log of signed
3333
agent action records. Each entry is a cryptographically signed record
34-
of an LLM agent action (tool call, observation, annotation, revision).
34+
of an LLM agent action (tool call, transaction, observation, annotation,
35+
revision, or directory anchor).
3536

3637
## Command Reference
3738

38-
**by-context** Manage by context
39+
**by-context** - Manage by context
3940

40-
- `atrib-log-pp-cli by-context <hex>` All entries in a context (session)
41+
- `atrib-log-pp-cli by-context <hex>` - All entries in a context (session)
4142

42-
**by-creator** Manage by creator
43+
**by-creator** - Manage by creator
4344

44-
- `atrib-log-pp-cli by-creator <key>` All entries by signer (creator key)
45+
- `atrib-log-pp-cli by-creator <key>` - All entries by signer (creator key)
4546

46-
**checkpoint** Manage checkpoint
47+
**checkpoint** - Manage checkpoint
4748

48-
- `atrib-log-pp-cli checkpoint` Returns the current signed checkpoint (tree size + root hash + log signature). Use this to anchor your local view of...
49+
- `atrib-log-pp-cli checkpoint` - Returns the current signed checkpoint (tree size + root hash + log signature). Use this to anchor your local view of...
4950

50-
**entries** Manage entries
51+
**entries** - Manage entries
5152

52-
- `atrib-log-pp-cli entries` Write path. Submit a signed record for inclusion in the log. Returns the assigned index + record_hash on success.
53+
- `atrib-log-pp-cli entries` - Write path. Submit a signed record for inclusion in the log. Returns an inclusion-proof bundle on success.
5354

54-
**lookup** Manage lookup
55+
**feed-json** - Manage JSON Feed
5556

56-
- `atrib-log-pp-cli lookup <hex>` — Lookup entry by record hash
57+
- `atrib-log-pp-cli feed-json` - JSON Feed 1.1 companion for newest-first decoded log entries.
5758

58-
**pubkey** Manage pubkey
59+
**log-pubkey** - Manage C2SP log public key
5960

60-
- `atrib-log-pp-cli pubkey` Get verification public key
61+
- `atrib-log-pp-cli log-pubkey` - Get the log public key in signed-note vkey format.
6162

62-
**recent** Manage recent
63+
**lookup** - Manage lookup
6364

64-
- `atrib-log-pp-cli recent` — Most recent entries
65+
- `atrib-log-pp-cli lookup <hex>` - Lookup entry by record hash
6566

66-
**stats** Manage stats
67+
**proof** - Manage proof recovery
6768

68-
- `atrib-log-pp-cli stats` — Tree statistics
69+
- `atrib-log-pp-cli proof <hex>` - Recover an inclusion-proof bundle for a record already in the log.
6970

70-
**tile** Manage tile
71+
**pubkey** - Manage pubkey
7172

72-
- `atrib-log-pp-cli tile get` — Sigsum-style Merkle tile at level L, position N
73-
- `atrib-log-pp-cli tile get-entries` — Get entries within a tile (leaf-level)
73+
- `atrib-log-pp-cli pubkey` - Get verification public key
74+
75+
**recent** - Manage recent
76+
77+
- `atrib-log-pp-cli recent` - Most recent entries
78+
79+
**stats** - Manage stats
80+
81+
- `atrib-log-pp-cli stats` - Tree statistics
82+
83+
**stream** - Manage SSE stream
84+
85+
- `atrib-log-pp-cli stream` - Stream new decoded log entries as raw Server-Sent Events.
86+
87+
**tile** - Manage tile
88+
89+
- `atrib-log-pp-cli tile get` - Sigsum-style Merkle tile at level L, position N
90+
- `atrib-log-pp-cli tile get-entries` - Get entries within a tile (leaf-level)
7491

7592

7693
### Finding the right command
@@ -81,7 +98,7 @@ When you know what you want to do but not which command does it, ask the CLI dir
8198
atrib-log-pp-cli which "<capability in your own words>"
8299
```
83100

84-
`which` resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code `0` means at least one match; exit code `2` means no confident match fall back to `--help` or use a narrower query.
101+
`which` resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code `0` means at least one match; exit code `2` means no confident match - fall back to `--help` or use a narrower query.
85102

86103
## Auth Setup
87104

@@ -93,16 +110,16 @@ Run `atrib-log-pp-cli doctor` to verify setup.
93110

94111
Add `--agent` to any command. Expands to: `--json --compact --no-input --no-color --yes`.
95112

96-
- **Pipeable** JSON on stdout, errors on stderr
97-
- **Filterable** `--select` keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
113+
- **Pipeable** - JSON on stdout, errors on stderr
114+
- **Filterable** - `--select` keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
98115

99116
```bash
100117
atrib-log-pp-cli by-context mock-value --agent --select id,name,status
101118
```
102-
- **Previewable** `--dry-run` shows the request without sending
103-
- **Offline-friendly** sync/search commands can use the local SQLite store when available
104-
- **Non-interactive** never prompts, every input is a flag
105-
- **Explicit retries** use `--idempotent` only when an already-existing create should count as success
119+
- **Previewable** - `--dry-run` shows the request without sending
120+
- **Offline-friendly** - sync/search commands can use the local SQLite store when available
121+
- **Non-interactive** - never prompts, every input is a flag
122+
- **Explicit retries** - use `--idempotent` only when an already-existing create should count as success
106123

107124
### Response envelope
108125

@@ -115,7 +132,7 @@ Commands that read from the local store or the API wrap output in a provenance e
115132
}
116133
```
117134

118-
Parse `.results` for data and `.meta.source` to know whether it's live or local. A human-readable `N results (live)` summary is printed to stderr only when stdout is a terminal AND no machine-format flag (`--json`, `--csv`, `--compact`, `--quiet`, `--plain`, `--select`) is set piped/agent consumers and explicit-format runs get pure JSON on stdout.
135+
Parse `.results` for data and `.meta.source` to know whether it's live or local. A human-readable `N results (live)` summary is printed to stderr only when stdout is a terminal AND no machine-format flag (`--json`, `--csv`, `--compact`, `--quiet`, `--plain`, `--select`) is set - piped/agent consumers and explicit-format runs get pure JSON on stdout.
119136

120137
## Agent Feedback
121138

0 commit comments

Comments
 (0)