No description
  • Go 89%
  • Python 6.9%
  • Shell 3.7%
  • Lua 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Linus 2476cc7ea3 Merge PR #1: admit credential authority regression repairs
Preserve the verified four-commit repair series. Both roots remain in progress; R01-R16 and the five V1 contract families remain unresolved.
2026-07-28 22:28:29 -05:00
cmd/agent-keyring keyring: align tool advertisements with runtime 2026-07-28 22:26:02 -05:00
docs keyring: align tool advertisements with runtime 2026-07-28 22:26:02 -05:00
internal keyring: align tool advertisements with runtime 2026-07-28 22:26:02 -05:00
pkg/keyringclient keyring: add public enrollment client 2026-05-27 13:47:23 -05:00
public Initialize agent-keyring scaffold 2026-04-28 10:33:54 -05:00
scripts workflow: add checked manifest baseline 2026-05-13 21:16:25 -05:00
templates Initialize agent-keyring scaffold 2026-04-28 10:33:54 -05:00
tool-skills keyring: align tool advertisements with runtime 2026-07-28 22:26:02 -05:00
workflow keyring: align tool advertisements with runtime 2026-07-28 22:26:02 -05:00
.gitignore workflow: ignore local feature worktrees 2026-05-15 12:16:05 -05:00
go.mod keyring: add substrate executable smoke 2026-05-25 08:02:32 -05:00
go.sum keyring: add substrate executable smoke 2026-05-25 08:02:32 -05:00
README.md keyring: wire executable service runtime 2026-07-21 19:57:19 -05:00
workflow.events.jsonl keyring: align tool advertisements with runtime 2026-07-28 22:26:02 -05:00
workflow.toml keyring: align tool advertisements with runtime 2026-07-28 22:26:02 -05:00

agent-keyring

Long-lived agent credential authority with a supervised lifecycle socket and a separate framed keyring service socket.

Purpose

This repository is for keyring structure, metadata, templates, tooling, and operational documentation. It is not for committing raw secrets, private keys, tokens, or live credential material.

Intended layout

  • docs/ for procedures and operating notes
  • templates/ for non-secret example files
  • scripts/ for safe helper tooling
  • pkg/keyringclient for the public Go client used by applications that need the agent-keyring service boundary
  • public/ for public material only
  • local/ for ignored machine-local state

Public Go client

Applications must not import agent-keyring/internal/.... Use pkg/keyringclient for direct Go wiring.

pkg/keyringclient speaks the framed JSON-RPC service contract over the configured Unix socket and hides secure-file staging for credential enrollment. It keeps secret material out of argv, env, stdin, logs, and application databases.

Minimal shape:

client, err := keyringclient.NewFromEnv("financial-site")
resp, err := client.EnrollCredential(ctx, keyringclient.EnrollCredentialRequest{
    CredentialType:   "api_key",
    CredentialUsage:  "api_auth",
    ProviderService:  "schwab",
    AccountPrincipal: "financial-site/schwab/client_secret",
    AudienceHash:     "sha256:...",
    RedactionPolicy:  "redacted_label_only",
}, []byte(secret))

Client runtime environment (development compatibility path):

  • AGENT_KEYRING_SOCKET=/path/to/agent-keyring.sock, or $XDG_RUNTIME_DIR/agent-keyring.sock
  • AGENT_KEYRING_OPERATOR_TOKEN=..., preferred
  • AGENT_KEYRING_ADMIN_TOKEN=..., fallback

NewFromEnv keeps the legacy environment-token client path for compatibility. Production callers should construct keyringclient.Client with auth material obtained from a supervisor-controlled secure source; live auth tokens in ambient environment variables are forbidden by the V1 deployment contract.

Executable configuration

The executable requires the normal rpc-plugin-system lifecycle variables plus:

  • AGENT_KEYRING_SOCKET: framed keyring service socket; must differ from the substrate lifecycle socket.
  • AGENT_KEYRING_DATA_DIR: private state root for metadata/metadata.sqlite and age-encrypted payloads/.
  • AGENT_KEYRING_AGE_RECIPIENT: public age X25519 recipient.
  • AGENT_KEYRING_UNLOCK_FILE: owner-only, non-symlink age X25519 identity file that must match the configured public recipient.
  • AGENT_KEYRING_ADMIN_TOKEN_FILE with AGENT_KEYRING_ADMIN_CALLER_ID, and/or
  • AGENT_KEYRING_OPERATOR_TOKEN_FILE with AGENT_KEYRING_OPERATOR_CALLER_ID.

Startup fails closed if storage, unlock, auth binding, recipient, socket, or restore verification is invalid. Auth token contents are read descriptor-bound from owner-only files; they are not accepted from executable environment values. The substrate socket remains lifecycle-only. Credential operations use the separate framed service socket.

Safety rules

  • Never commit live secrets
  • Never commit private keys
  • Never commit .env files with real values
  • Keep real credential material outside git and outside this repo's tracked history