@keyboxed/cli 0.3.2 → 0.3.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/assets/schema.sql CHANGED
@@ -16,3 +16,7 @@ CREATE INDEX IF NOT EXISTS nonces_expires ON nonces (expires_at);
16
16
  CREATE TABLE IF NOT EXISTS codes (hash TEXT PRIMARY KEY, kind TEXT NOT NULL, member_id TEXT, expires_at INTEGER NOT NULL, created_at INTEGER NOT NULL);
17
17
  CREATE TABLE IF NOT EXISTS events (id INTEGER PRIMARY KEY AUTOINCREMENT, ts INTEGER NOT NULL, member_id TEXT, device_id TEXT, via TEXT NOT NULL, action TEXT NOT NULL);
18
18
  CREATE INDEX IF NOT EXISTS events_ts ON events (ts);
19
+ CREATE TABLE IF NOT EXISTS approvers (id TEXT PRIMARY KEY, member_id TEXT, name TEXT NOT NULL, kind TEXT NOT NULL, pubkey TEXT NOT NULL UNIQUE, created_at INTEGER NOT NULL, revoked_at INTEGER);
20
+ CREATE TABLE IF NOT EXISTS approvals (id TEXT PRIMARY KEY, status TEXT NOT NULL, requester TEXT NOT NULL, requester_key TEXT NOT NULL, requester_ip TEXT, requester_country TEXT, method TEXT NOT NULL, path TEXT NOT NULL, body TEXT NOT NULL, action_hash TEXT NOT NULL, summary TEXT NOT NULL, risk TEXT NOT NULL, created_at INTEGER NOT NULL, expires_at INTEGER NOT NULL, decided_at INTEGER, decided_by TEXT, decision_sig TEXT, executed_at INTEGER, result_status INTEGER, result TEXT, note TEXT);
21
+ CREATE INDEX IF NOT EXISTS approvals_status ON approvals (status, expires_at);
22
+ CREATE INDEX IF NOT EXISTS approvals_requester ON approvals (requester_key, status);
@@ -113,7 +113,7 @@ keybox agents create writer \
113
113
  keybox run writer -- node server.js
114
114
  ```
115
115
 
116
- `keybox run` mints a short-lived token, removes known key variables from the child's environment, and sets `KEYBOX_URL` and `KEYBOX_TOKEN`. For OpenAI and Anthropic it also sets `OPENAI_BASE_URL`/`OPENAI_API_KEY` and `ANTHROPIC_BASE_URL`/`ANTHROPIC_API_KEY`, so SDK code needs no change. For other APIs, point the base URL at `$KEYBOX_URL/<api host>` and send `$KEYBOX_TOKEN` where the API key used to go.
116
+ `keybox run` mints a short-lived token, removes known key variables from the child's environment, and sets `KEYBOX_URL` and `KEYBOX_TOKEN`. For OpenAI and Anthropic it also sets `OPENAI_BASE_URL`/`OPENAI_API_KEY` and `ANTHROPIC_BASE_URL`/`ANTHROPIC_API_KEY`, so SDK code needs no change. For other APIs, point the base URL at `$KEYBOX_URL/<api host>` and send `$KEYBOX_TOKEN` where the API key used to go. If the API takes its key in the query or body (Google `key=`, Moodle `wstoken=`, Sapling), store it with `--param NAME` or `--body-field NAME`; Keybox replaces whatever the code sends there. Under `keybox run` the key's own variable holds the agent token, and Keybox accepts the token from that query parameter or body field, so only the base URL changes. A key with two parts (Sightengine user + secret, Cloudflare Access id + secret) uses `NAME=FIELD`, or `keybox secrets combine` for parts already stored.
117
117
 
118
118
  Update `package.json` scripts, Makefiles, compose files and the README to start through `keybox run`.
119
119