Module Design
Safekeys CLI
create
Purpose: Read plaintext from a file or stdin and hand it to the sidecar; return only a token
Paths: apps/cli/cmd/create.go
exec
Purpose: Run a wrapped command with injected secrets and a scrubbed environment
Paths: apps/cli/cmd/exec.go
revoke
Purpose: Revoke a token by jti or an object by id via the control plane
Paths: apps/cli/cmd/revoke.go
list
Purpose: List known objects and active tokens (metadata only, never values)
Paths: apps/cli/cmd/list.go
Control Plane Database
objects
Purpose: Registered secret objects and their owning principals and wrapping policy
Paths: apps/control-plane/internal/store/objects.go
tokens
Purpose: Issued token records keyed by jti, plus the revocation denylist
Paths: apps/control-plane/internal/store/tokens.go
audit
Purpose: Append-only resolve, deny, issue, and revoke records
Paths: apps/control-plane/internal/store/audit.go
policy
Purpose: Resolution policy rules evaluated at issue and resolve time
Paths: apps/control-plane/internal/store/policy.go
Related features:
- safekeys/policy-engine — The policy engine decides which sidecar, principal, and process may resolve whic
migrations
Purpose: Versioned SQL migrations
Paths: apps/control-plane/internal/store/migrations
Control Plane API
api
Purpose: HTTP handlers for token issue, revoke, policy, and audit endpoints
Paths: apps/control-plane/internal/api
Related features:
- safekeys/control-plane-api — The Control Plane API is the authority service: it allocates object ids, issues
token
Purpose: Capability token minting, signing (kid), TTL and scope validation, jti registry
Paths: apps/control-plane/internal/token
Related features:
- safekeys/capability-token — The capability token is the only secret-bearing artefact an agent reasons about.
policy
Purpose: Policy evaluation — which sidecar may resolve which object for which scope
Paths: apps/control-plane/internal/policy
Related features:
- safekeys/policy-engine — The policy engine decides which sidecar, principal, and process may resolve whic
audit
Purpose: Append-only audit records for create, resolve, deny, and revoke events
Paths: apps/control-plane/internal/audit
keystore
Purpose: Client for OpenBao/Vault — envelope key wrapping and unwrap brokering
Paths: apps/control-plane/internal/keystore
Related features:
- safekeys/hardware-root — Phase 1 hardening moves the long-term key share out of ordinary RAM and into a h
- safekeys/dev-key-custody — Development-stack key custody: no key material the coding agent's OS user can re
Safekeys MCP Server
server
Purpose: MCP server bootstrap and tool registration
Paths: packages/mcp-server/src/index.ts
Related features:
- safekeys/integration-mcp-server — The Safekeys MCP server exposes secret tooling to every MCP-capable agent runtim
- safekeys/secret-transport — Transport is how a secret gets from where it was created to where it is used — a
tools
Purpose: Tool handlers — create_secret, resolve_for_tool, list, revoke — all token-only
Paths: packages/mcp-server/src/tools
sidecar-client
Purpose: Unix socket client to the local sidecar
Paths: packages/mcp-server/src/sidecar
Python SDK
client
Purpose: Sidecar socket client and token handling
Paths: packages/sdk-python/safekeys
Related features:
- safekeys/integration-python-sdk — The Python Agent SDK is a token-only client for teams building agents, shipping
tools
Purpose: LangChain / LangGraph tool definitions (create_secret, resolve_for_tool)
Paths: packages/sdk-python/safekeys/tools
Safekeys.ai Site
site
Purpose: Landing page, positioning, and protocol overview
Paths: apps/site/app
Sidecar / Resolver
token-verify
Purpose: Verify token signature, expiry, audience, scope, and jti denylist before any unwrap
Paths: apps/sidecar/internal/verify
resolve
Purpose: Request DEK unwrap from the key store and decrypt the target object in memory
Paths: apps/sidecar/internal/resolve
Related features:
- safekeys/sidecar-resolution — Token resolution is the act that turns a capability token into a plaintext value
inject
Purpose: Injection adapters — env var, 0600 temp file, Unix socket/pipe, exec wrapper
Paths: apps/sidecar/internal/inject
Related features:
- safekeys/secret-injection — Injection is how a resolved secret reaches a consumer without passing through mo
zeroise
Purpose: Best-effort zeroisation of DEK and plaintext buffers after use
Paths: apps/sidecar/internal/zeroise
socket
Purpose: Local request/response protocol over the Unix domain socket
Paths: apps/sidecar/internal/socket
TypeScript SDK
client
Purpose: Sidecar socket client and token handling
Paths: packages/sdk-typescript/src
Related features:
- safekeys/integration-python-sdk — The Python Agent SDK is a token-only client for teams building agents, shipping