You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
- inject versioned, non-secret runtime host metadata into every Compose
service
- expose branch-qualified public route maps plus current-service
convenience fields
- make `up`, `restart`, targeted restart, `run`, and `exec` inspection
consume consistent generated Compose overrides
- extract and directly test branch-host rewriting
- document Compose-DNS vs public-URL usage and bump agent-integration
freshness
## Runtime contract
Containers receive `HACK_RUNTIME_METADATA`, `HACK_DEV_URL`,
`HACK_ALIAS_URL`, `HACK_SERVICE_NAME`, `HACK_SERVICE_URL`, and
`HACK_SERVICE_URLS`. The versioned JSON document includes all routable
services, avoiding lossy service-name-to-env-key conversion. Explicit
project env values retain precedence for backward compatibility.
## Verification
- `bun test` — 897 pass, 5 skip, 0 fail
- focused metadata/branch/run/exec/agent tests — 27 pass, 0 fail
- `bun run check`
- `bun run typecheck`
- `bun run build`
- Docker E2E `worktree-parallel-up` — primary and branch containers
expose distinct URLs; metadata survives restart
## Release decision
This is a user-facing runtime capability and should produce a
feature/minor release signal. The Conventional Commit title
intentionally uses `feat(runtime)`.
## Landing order
PR #65 should land first; then this branch should be updated from `main`
before merge so its `project.ts` changes include the completion-gate
fixes.
Copy file name to clipboardExpand all lines: .codex/skills/hack-cli/SKILL.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Use `hack` as the primary interface for local-first development.
16
16
- At session start, audit project and global integrations with `hack setup sync --all-scopes --check`.
17
17
- If anything is stale, missing, or deprecated, run `hack setup sync --all-scopes`, then reload the agent session so cached instructions are replaced.
18
18
- Never copy or hand-edit generated Hack rules to refresh them; update the CLI and run the sync command.
19
-
- Content revision: `eef2b0142b95` (version alone is not a freshness guarantee).
19
+
- Content revision: `64098e5ae1ea` (version alone is not a freshness guarantee).
20
20
21
21
## Product boundary
22
22
@@ -154,6 +154,7 @@ Use `hack` as the primary interface for local-first development.
154
154
- Use a branch instance when you need two versions running at once (PR review, experiments, migrations) or want to keep a stable environment while testing another branch.
155
155
- Target one with `--branch <name>` on up/open/logs/down (for example: `hack up --branch <name> --detach`).
156
156
- Linked worktrees pick a branch instance automatically (see Linked git worktrees).
157
+
- Containers receive `HACK_RUNTIME_METADATA` plus `HACK_DEV_URL`, `HACK_ALIAS_URL`, and current-service URL fields derived from effective Caddy routes. Use Compose DNS for internal traffic and this metadata for browser-facing links, OAuth callbacks, and webhooks.
- Use a branch instance when you need two versions running at once (PR review, experiments, migrations) or want to keep a stable environment while testing another branch.
337
337
- Target one with `--branch <name>` on up/open/logs/down (for example: `hack up --branch <name> --detach`).
338
338
- Linked worktrees pick a branch instance automatically (see Linked git worktrees).
339
+
- Containers receive `HACK_RUNTIME_METADATA` plus `HACK_DEV_URL`, `HACK_ALIAS_URL`, and current-service URL fields derived from effective Caddy routes. Use Compose DNS for internal traffic and this metadata for browser-facing links, OAuth callbacks, and webhooks.
339
340
340
341
Run commands inside services:
341
342
- One-off: `hack run <service> <cmd...>` (uses `docker compose run --rm`)
- Use a branch instance when you need two versions running at once (PR review, experiments, migrations) or want to keep a stable environment while testing another branch.
207
207
- Target one with `--branch <name>` on up/open/logs/down (for example: `hack up --branch <name> --detach`).
208
208
- Linked worktrees pick a branch instance automatically (see Linked git worktrees).
209
+
- Containers receive `HACK_RUNTIME_METADATA` plus `HACK_DEV_URL`, `HACK_ALIAS_URL`, and current-service URL fields derived from effective Caddy routes. Use Compose DNS for internal traffic and this metadata for browser-facing links, OAuth callbacks, and webhooks.
209
210
210
211
Run commands inside services:
211
212
- One-off: `hack run <service> <cmd...>` (uses `docker compose run --rm`)
"Use a branch instance when you need two versions running at once (PR review, experiments, migrations) or want to keep a stable environment while testing another branch.",
248
248
"Target one with `--branch <name>` on up/open/logs/down (for example: `hack up --branch <name> --detach`).",
249
249
"Linked worktrees pick a branch instance automatically (see Linked git worktrees).",
250
+
"Containers receive `HACK_RUNTIME_METADATA` plus `HACK_DEV_URL`, `HACK_ALIAS_URL`, and current-service URL fields derived from effective Caddy routes. Use Compose DNS for internal traffic and this metadata for browser-facing links, OAuth callbacks, and webhooks.",
0 commit comments