Skip to content

feat(up): governed one-command stack — secrets, ghcr images, --wait (#7)#16

Merged
amitpaz1 merged 1 commit into
mainfrom
feat/issue-7-up
Jun 26, 2026
Merged

feat(up): governed one-command stack — secrets, ghcr images, --wait (#7)#16
amitpaz1 merged 1 commit into
mainfrom
feat/issue-7-up

Conversation

@amitpaz1

Copy link
Copy Markdown
Member

Closes #7. Turns agentkit up from a thin compose wrapper into a one-command governed stack.

  • ghcr images: SERVICE_REGISTRY images → ghcr.io/agentkitai/* (were stale agentkit/* placeholders).
  • Fresh secrets: ensureSecrets() writes a .env with random LORE_API_KEY/ADMIN_API_KEY/JWT_SECRET on first run — never overwrites, 0600.
  • --wait: waitForHealth() blocks until every required service is healthy or --timeout (default 120s); prints the status table + verdict, exits non-zero on timeout (CI-gateable). agentlens non-blocking (known version-skew — reported, not gated).
  • Governance by default: up applies the governance profile unless --profile overrides.

Tests: 6 (genSecret, ensureSecrets create/no-overwrite, waitForHealth ready/agentlens-non-blocking/timeout) with an injected clock+status. Full suite 57 green.

Turns `agentkit up` from a thin compose wrapper into a one-command governed
stack.

- src/services.ts: SERVICE_REGISTRY images → ghcr.io/agentkitai/* (were stale
  agentkit/* placeholders that don't exist).
- src/commands/up.ts: ensureSecrets() writes a .env with fresh random
  LORE_API_KEY/ADMIN_API_KEY/JWT_SECRET on first run (never overwrites; 0600);
  waitForHealth() polls service health until every REQUIRED service (enabled,
  has a health endpoint) is running or a timeout elapses — agentlens is
  non-blocking (known version-skew degraded; reported, not gated).
- cli.ts `up`: generates secrets, applies the governance profile by DEFAULT
  (--profile overrides), and with --wait blocks until healthy (--timeout, default
  120s), printing the status table + a ready/timeout verdict and exiting non-zero
  on timeout so CI can gate.

Decision (default, flagged): --wait gates on lore+agentgate health and treats
agentlens as known-degraded until the stack version-alignment effort lands —
keeps "one command → working stack" honest without blocking on the stale image.

Tests: 6 — genSecret (prefix/randomness), ensureSecrets (creates / never
overwrites), waitForHealth (becomes ready, agentlens-non-blocking, times out)
with an injected clock+status (no real docker/network). Updated the generator
image assertion to ghcr. Full suite 57 green.

Closes #7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019tXZpN29akdmG8AEjgSZwk
@amitpaz1 amitpaz1 merged commit 24148be into main Jun 26, 2026
1 check passed
@amitpaz1 amitpaz1 deleted the feat/issue-7-up branch June 26, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agentkit up: one command → governed, audit-verifiable stack (fresh secrets, ghcr images, real ports/health, --wait, CI smoke test)

1 participant