You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .machine_readable/6a2/ECOSYSTEM.a2ml
+18-7Lines changed: 18 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@
4
4
# ECOSYSTEM.a2ml — Reasonably Good Token Vault ecosystem position
5
5
6
6
[metadata]
7
-
version = "0.2.0"
8
-
last-updated = "2026-04-11"
7
+
version = "0.3.0"
8
+
last-updated = "2026-04-12"
9
9
10
10
[project]
11
11
name = "Reasonably Good Token Vault (RGTV)"
@@ -22,10 +22,10 @@ category = "zero-trust"
22
22
23
23
[related-projects]
24
24
projects = [
25
-
{ name = "nesy-solver-api (proven-servers)", relationship = "consumer", notes = "First wired consumer. Uses rgtv_client.v to fetch NESY_INGEST_TOKEN via grant→redeem. Deployed as rgtv-nesy on Fly.io." },
25
+
{ name = "nesy-solver-api (proven-servers)", relationship = "consumer", notes = "First wired consumer. Fetches NESY_INGEST_TOKEN via grant→redeem protocol. Deployed as rgtv-nesy on Fly.io (spot-test only; production is CF Workers)." },
26
26
{ name = "svalinn", relationship = "sibling-security", notes = "Svalinn is a Deno container gateway; RGTV is a Rust credential broker. Different concerns, sometimes confused. Do NOT merge." },
27
27
{ name = "rokur", relationship = "sibling-security", notes = "Rokur is Svalinn's internal secrets store (Stapeln GUI). RGTV is a standalone broker. Different projects." },
28
-
{ name = "vault-core", relationship = "internal-component", notes = "Existing crypto library crate in this monorepo. vault-broker builds on it." },
28
+
{ name = "vault-core", relationship = "internal-component", notes = "Crypto library crate in this monorepo. vault-broker builds on it for Zeroizing<String> storage." },
29
29
{ name = "hypatia", relationship = "planned-consumer", notes = "CI scanning agent should use RGTV to fetch scan credentials rather than env vars." },
30
30
{ name = "gitbot-fleet", relationship = "planned-consumer", notes = "Bot agents should fetch GitHub tokens via RGTV grant→redeem." },
31
31
{ name = "007", relationship = "planned-consumer", notes = "Private language toolchain — agents must not see raw API tokens." },
@@ -35,12 +35,23 @@ projects = [
35
35
[integration-points]
36
36
points = [
37
37
{ system = "nesy-solver-api", direction = "inbound", protocol = "HTTP POST /v1/grants + /v1/grants/:id/redeem, Bearer auth" },
38
-
{ system = "Fly.io private 6PN", direction = "inbound", protocol = "flycast DNS at rgtv-nesy.flycast:9100 (not .internal — auto-wake required)" },
39
-
{ system = "vault-core", direction = "internal", protocol = "Rust crate dependency — Zeroizing<String> storage" },
38
+
{ system = "Cloudflare Workers (production)", direction = "inbound", protocol = "HTTPS on rgtv-vault.workers.dev (or custom domain); same HTTP API as vault-broker" },
39
+
{ system = "Fly.io private 6PN (spot-test only)", direction = "inbound", protocol = "flycast DNS at rgtv-nesy.flycast:9100 (not .internal — auto-wake required)" },
Copy file name to clipboardExpand all lines: .machine_readable/6a2/META.a2ml
+34-3Lines changed: 34 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3,22 +3,53 @@
3
3
#
4
4
# META.a2ml — Reasonably Good Token Vault meta-level information
5
5
[metadata]
6
-
version = "0.1.0"
7
-
last-updated = "2026-02-08"
6
+
version = "0.2.0"
7
+
last-updated = "2026-04-12"
8
8
9
9
[project-info]
10
10
license = "PMPL-1.0-or-later"
11
11
author = "Jonathan D.A. Jewell (hyperpolymath)"
12
12
13
13
[architecture-decisions]
14
14
decisions = [
15
-
# No ADRs recorded
15
+
{ id = "ADR-001", title = "Cloudflare Workers as production target (not Fly.io)", status = "accepted", date = "2026-04-12",
16
+
context = "RGTV needs a production deployment reachable by external LLM agents without VPN or private network access.",
17
+
decision = "Cloudflare Workers (vault-worker, Rust/WASM via workers-rs 0.8) is the production deployment target.",
18
+
rationale = "CF Workers: globally distributed, no cold starts, native DO support, zero-infra ops. Fly.io (vault-broker, axum) retained for internal flycast spot-testing only.",
19
+
consequences = "vault-worker must remain API-compatible with vault-broker. Both implement identical HTTP routes." },
20
+
21
+
{ id = "ADR-002", title = "Durable Objects for grant state (not KV)", status = "accepted", date = "2026-04-12",
22
+
context = "Cloudflare KV has no atomic read+delete operation. Two simultaneous redeem requests for the same grant could both succeed.",
23
+
decision = "Each outstanding grant is stored in its own GrantObject Durable Object instance, keyed by grant_id UUID.",
24
+
rationale = "DO instances are single-threaded: the Workers runtime serialises concurrent fetches to the same instance. The check-and-delete in the POST handler is therefore a true atomic operation.",
25
+
consequences = "GRANTS KV namespace removed from wrangler.toml. Durable Objects migrations block required. Each grant creates one DO instance." },
26
+
27
+
{ id = "ADR-003", title = "axum + tokio for vault-broker (local/test server)", status = "accepted", date = "2026-04-11",
28
+
context = "vault-broker serves as the spot-test target on Fly.io and for local dev with `just broker-dev`.",
29
+
decision = "axum 0.7 on tokio, IPv6 dual-stack, Zeroizing<String> for all credential values.",
30
+
rationale = "Idiomatic async Rust for HTTP; Zeroizing scrubs heap on drop; axum router matches vault-worker's route surface identically so the rgtv CLI works against both.",
31
+
consequences = "vault-broker holds credentials in-process (Arc<Mutex<HashMap>>); not suitable for multi-node production — CF Workers is." },
32
+
33
+
{ id = "ADR-004", title = "rgtv CLI (formerly svalinn-cli) wired to HTTP API", status = "accepted", date = "2026-04-12",
34
+
context = "The CLI binary was named svalinn_cli and was a skeleton not wired to vault-broker.",
35
+
decision = "Renamed to rgtv binary. Full rewrite using ureq 2 (sync HTTP) + Zeroizing<String>. Works against both vault-broker and vault-worker.",
36
+
rationale = "Single synchronous binary; no async runtime needed for CLI; ureq is minimal.",
37
+
consequences = "svalinn-cli crate name kept for Cargo workspace; only the binary name changed." },
38
+
39
+
{ id = "ADR-005", title = "Bearer token auth (RGTV_AGENT_TOKEN) as sole auth mechanism", status = "accepted", date = "2026-04-11",
40
+
context = "LLM agents need a simple, stateless auth mechanism compatible with both vault-broker and vault-worker.",
41
+
decision = "Single shared secret (RGTV_AGENT_TOKEN) passed as Authorization: Bearer header. Worker Secret on CF side; env var on Fly.io side.",
42
+
rationale = "Simple, stateless, zero-dependency. Rate limiting per agent token is a future concern (see blockers in STATE.a2ml).",
43
+
consequences = "All tokens share the same privilege level. Per-agent tokens are a future enhancement." },
{ date = "2026-04-12 (s3)", description = "vault-worker DO migration: replaced GRANTS KV namespace with Durable Objects. One GrantObject DO instance per outstanding grant. Atomic one-use enforced by DO single-threaded runtime. Removed GRANTS KV binding from wrangler.toml. Added migrations block for GrantObject. do_put_request/do_post_request helpers. handle_create_grant stores via DO PUT. handle_redeem_grant dispatches via DO POST (atomic read+delete)." },
71
73
{ date = "2026-04-12 (s2)", description = "vault-worker: Cloudflare Workers production target (Rust/WASM, workers-rs 0.8). Same HTTP API as vault-broker. CREDENTIALS KV (hint→value, operator-managed). GRANTS KV (grant_id→hint, 30s TTL). Justfile: worker-dev, worker-deploy, worker-logs, worker-creds-list, worker-cred-put. KV double-spend caveat documented; Durable Objects migration on roadmap." },
72
74
{ date = "2026-04-12", description = "vault-broker: added GET /v1/credentials endpoint returning sorted hint names with no credential values. Fixed two pre-existing bugs: Zeroizing<String> clone in redeem handler, .json() tracing_subscriber call removed (feature not enabled)." },
73
75
{ date = "2026-04-12", description = "rgtv CLI (svalinn-cli crate renamed): full rewrite wired to vault-broker HTTP API. Commands: get (grant→redeem→exec with Zeroizing value), list (/v1/credentials), status (/health), verify (functional round-trip), daemon start/stop/status (PID-file managed). Binary renamed from svalinn_cli to rgtv. Added ureq+zeroize deps." },
0 commit comments