Skip to content

feat: dev container setup for Codespaces (maintainer + consumer configs) - #124

Merged
pacphi merged 2 commits into
mainfrom
feat/devcontainers
Aug 8, 2026
Merged

feat: dev container setup for Codespaces (maintainer + consumer configs)#124
pacphi merged 2 commits into
mainfrom
feat/devcontainers

Conversation

@pacphi

@pacphi pacphi commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds two dev container configurations so users can experiment with and use agentic-kit on Codespaces or any dev-container-compatible tool:
    • .devcontainer/devcontainer.json — contributor environment: Node 22 + pnpm, pnpm install, then npm link so ak/agentic-kit resolve to the live checkout (edit source, run ak immediately).
    • .devcontainer/consumer/devcontainer.json — reuses docker/Dockerfile (the same image the existing first-use docker compose environment builds) to install the published @pacphi/agentic-kit release into a disposable container, seeding a ~/sandbox project outside the mounted repo so ak setup's project-scope work never touches this checkout.
  • Adds .github/workflows/devcontainers.yml: builds + smoke-tests both configs with the devcontainers/ci action (the reference devcontainer CLI, same one Codespaces uses).
    • A changes job (dorny/paths-filter) scopes each job to only the files it depends on, so a docker/Dockerfile-only change doesn't rebuild the maintainer config and vice versa.
    • Runs on relevant PR/push changes, monthly (23 6 1 * *, unfiltered — the point is catching base-image or published-package drift even when nothing here changed), and via workflow_dispatch.
  • Adds docs/DEVCONTAINERS.md documenting both configs, the CI job, and how port forwarding differs from docker/'s socat bridge (VS Code Server attaches inside the container, so no bridge is needed). Linked from README and cross-linked from docker/USER-GUIDE.md.

Test plan

  • pnpm run check (typecheck + lint + markdown lint + build + test) passes
  • pnpm run lint:links:internal — all new doc links resolve
  • actionlint .github/workflows/devcontainers.yml — clean
  • Both devcontainer.json files validated as parseable JSONC
  • New devcontainers CI workflow run (will execute on this PR since it touches .devcontainer/**, docker/Dockerfile, and the workflow file itself)
  • Manual smoke: open in Codespaces / VS Code Dev Containers with each config

pacphi added 2 commits August 8, 2026 10:41
Adds two dev container configurations so users can experiment with
agentic-kit on Codespaces or any dev-container-compatible tool:

- .devcontainer/devcontainer.json — contributor environment; pnpm install
  + npm link so `ak`/`agentic-kit` resolve to the live checkout.
- .devcontainer/consumer/devcontainer.json — reuses docker/Dockerfile to
  install the published @pacphi/agentic-kit release into a disposable
  container, seeding a ~/sandbox project outside the mounted repo.

CI (.github/workflows/devcontainers.yml) builds and smoke-tests both
configs with the devcontainers/ci action on relevant PR changes (a
paths-filter job scopes each config to only the files it depends on) and
monthly, to catch base-image or published-package drift independent of
any change in this repo.

docs/DEVCONTAINERS.md documents both configs, the CI job, and how the
dashboard's port forwarding differs from the docker/ compose bridge;
linked from README and cross-linked from docker/USER-GUIDE.md.
CI (devcontainers.yml) caught this: postCreateCommand runs as the
non-root `node` user, but corepack's shim install and npm link both
write into the base image's root-owned /usr/local/bin, so both failed
with EACCES. The devcontainers base image grants node passwordless
sudo for exactly this. pnpm install stays unprivileged — it only
touches the (UID-synced) mounted repo.
@pacphi
pacphi merged commit f2b6d13 into main Aug 8, 2026
14 checks passed
@pacphi
pacphi deleted the feat/devcontainers branch August 8, 2026 18:18
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.

1 participant