logicsrc/packages/cli/src
Anthony Ettinger ade33efd17
Machine API keys: headless teams pull for deploy boxes and CI (#230)
A person's lsk_ key acts as the person, with one identity key per user. Logging
a fresh box in with `login --token` uploaded the box's new keypair as the
person's identity and replaced the real one. Machine keys fix that: a key made
for a box, scoped to one team (and optionally named vaults), read-only unless
--read-write, optionally expiring, with its OWN identity key registered on the
key row. A vault key reaches it as a grant sealed to that public key
(credshare_key_grants), never through the person.

Schema (005_machine_keys, SQLite + Postgres): api_keys gains kind, team_id,
vault_scope, read_only (default 0, so existing person keys keep writing),
expires_at, public_key; new credshare_key_grants; credshare_audit.actor_key_id.

Server: each credshare route declares what a machine key may do (read / write /
register); the rest are people-only. Machine keys see only their team and
scoped vaults, read their grant from credshare_key_grants (audited as
vault:read with the key id), are refused every write when read-only, and cannot
mint/list/revoke keys, read /api/me or touch the personal vault. Expired and
revoked keys are 401. New GET|POST /api/keys, DELETE /api/keys/:id, and
GET|POST|DELETE /api/credshare/vaults/:id/key-grants. A re-key re-seals the
machine grants it is given and drops the rest.

CLI 0.8.0: `logicsrc keys create|list|revoke` (--team, --vault, --read-only /
--read-write, --expires, --out 0600); LOGICSRC_API_KEY and
`login --api-key` with a per-key identity in keys/<prefix>.json (0600),
generated and registered on first use; `login --token` with a machine key takes
that path instead of replacing the person's key; `teams grant … --key <name>`;
`credentials rotate` re-seals machine keys.

PWA: settings creates machine keys (team, vaults, read-only, expiry); a vault
page grants or revokes a machine key in the browser after unlock.

MCP: list_api_keys / create_api_key / revoke_api_key over /api/keys with a
Bearer LOGICSRC_API_KEY.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 23:08:32 -07:00
..
config.test.ts fix(cli): block config prototype pollution (#54) 2026-06-13 22:52:20 -07:00
config.ts fix(credentials): one vault per user, in the config dir (#119) 2026-07-31 22:53:17 -07:00
context.ts Add the LogicSRC OpenContext specification (#132) 2026-08-09 11:46:11 -07:00
creds.ts vault: autosync the personal vault to the logicsrc account (#226) 2026-10-04 03:45:25 -07:00
errand.test.ts OpenErrand reference runner: @logicsrc/openerrand and logicsrc errand (#228) 2026-10-04 09:17:06 -07:00
errand.ts OpenErrand reference runner: @logicsrc/openerrand and logicsrc errand (#228) 2026-10-04 09:17:06 -07:00
fixtures.ts Scaffold LogicSRC and CommandBoard plugins 2026-06-06 11:24:02 +00:00
fleet.test.ts OpenFleet reference implementation: @logicsrc/openfleet, logicsrc fleet, and Claude Code hooks (#185) 2026-09-13 10:58:55 +00:00
fleet.ts OpenFleet reference implementation: @logicsrc/openfleet, logicsrc fleet, and Claude Code hooks (#185) 2026-09-13 10:58:55 +00:00
format.ts vault + teams: filter secrets by category, export to CSV, simpler help (#195) 2026-09-23 21:08:08 -07:00
index.test.ts Add feed discovery plugin 2026-06-09 09:34:31 +00:00
index.ts Machine API keys: headless teams pull for deploy boxes and CI (#230) 2026-10-05 23:08:32 -07:00
install-npm.test.ts Ship OpenFleet contracts and the OpenWall draft proposal (#177) 2026-09-13 00:57:45 -07:00
keys.ts Machine API keys: headless teams pull for deploy boxes and CI (#230) 2026-10-05 23:08:32 -07:00
machine-keys.test.ts Machine API keys: headless teams pull for deploy boxes and CI (#230) 2026-10-05 23:08:32 -07:00
mcp.ts logicsrc CLI 0.2.0: every LogicSRC tool is a word after logicsrc (#157) 2026-09-12 11:16:40 -07:00
numeric-options.test.ts fix(cli): validate positive numeric options (#49) 2026-06-13 22:55:18 -07:00
numeric-options.ts fix(cli): validate positive numeric options (#49) 2026-06-13 22:55:18 -07:00
ontology.ts feat(openontology): Phase 2 + Phase 3 — storage, REST/SSE, MCP, RDF/SHACL, adapters, TUI, explorer (#101) 2026-07-28 05:10:33 -07:00
openmcp.ts logicsrc CLI 0.2.0: every LogicSRC tool is a word after logicsrc (#157) 2026-09-12 11:16:40 -07:00
openspec-dev.ts logicsrc CLI 0.2.0: every LogicSRC tool is a word after logicsrc (#157) 2026-09-12 11:16:40 -07:00
openspec.ts Implement OpenSpec artifacts and SDK contracts 2026-06-06 16:44:58 +00:00
prd.ts Add Tech Stack and Monetization sections to OpenPRD (0.3) (#144) 2026-09-06 16:50:11 -07:00
registry.ts Add AgentBBS connector plugin (#131) 2026-08-04 18:43:31 -07:00
rotate.ts Machine API keys: headless teams pull for deploy boxes and CI (#230) 2026-10-05 23:08:32 -07:00
secrets-link.test.ts feat(credentials): link directories to team secrets (#129) 2026-08-04 17:17:04 -07:00
secrets-link.ts feat(credentials): link directories to team secrets (#129) 2026-08-04 17:17:04 -07:00
ssh.test.ts Add SSH keys and config to credential sharing (#139) 2026-08-13 17:03:00 -07:00
ssh.ts Add SSH keys and config to credential sharing (#139) 2026-08-13 17:03:00 -07:00
teams.test.ts fix(cli): vault names join with "--", not "/" — the server rejects slashes (#112) 2026-07-30 13:32:07 -07:00
teams.ts Machine API keys: headless teams pull for deploy boxes and CI (#230) 2026-10-05 23:08:32 -07:00
umbrella.test.ts logicsrc CLI 0.2.0: every LogicSRC tool is a word after logicsrc (#157) 2026-09-12 11:16:40 -07:00
update.test.ts fix(cli): make logicsrc update actually check for updates 2026-07-29 06:15:28 +00:00
update.ts fix(credentials): one vault per user, in the config dir (#119) 2026-07-31 22:53:17 -07:00
vault-sync.ts vault: autosync the personal vault to the logicsrc account (#226) 2026-10-04 03:45:25 -07:00
vault-tui-run.ts Add logicsrc teams tui, a browser for team vaults (#146) 2026-09-08 08:07:17 -07:00
vault-tui.test.ts Add logicsrc teams tui, a browser for team vaults (#146) 2026-09-08 08:07:17 -07:00
vault-tui.ts Add logicsrc teams tui, a browser for team vaults (#146) 2026-09-08 08:07:17 -07:00