@devrouter/cli 0.0.1 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devrouter/cli",
3
- "version": "0.0.1",
3
+ "version": "0.0.22",
4
4
  "description": "Local dev routing CLI with shared Traefik on macOS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -8,11 +8,12 @@
8
8
  "url": "https://github.com/rschlaefli/devrouter.git"
9
9
  },
10
10
  "files": [
11
- "dist"
11
+ "dist",
12
+ "upgrade-prompts"
12
13
  ],
13
14
  "type": "commonjs",
14
15
  "engines": {
15
- "node": ">=22"
16
+ "node": ">=24"
16
17
  },
17
18
  "bin": {
18
19
  "dev": "dist/dev.js"
@@ -27,19 +28,24 @@
27
28
  "@types/node": "^22.10.1",
28
29
  "tsup": "^8.3.5",
29
30
  "tsx": "^4.19.2",
30
- "typescript": "^5.7.2"
31
+ "typescript": "^5.7.2",
32
+ "vitest": "^4.0.18"
31
33
  },
32
34
  "volta": {
33
- "node": "22.22.0",
34
- "pnpm": "10.28.2"
35
+ "node": "24.16.0",
36
+ "pnpm": "11.6.0"
35
37
  },
36
38
  "scripts": {
37
39
  "build": "tsup",
38
40
  "dev": "tsx src/cli.ts",
41
+ "test": "vitest run",
42
+ "check:docs-policy": "./scripts/check-docs-policy.sh",
43
+ "test:watch": "vitest",
39
44
  "demo:smoke": "./scripts/smoke-demo.sh",
40
45
  "bench:startup": "zsh -lc 'set -euo pipefail; echo \"=== dev --help (x5) ===\"; for i in {1..5}; do /usr/bin/time -p node dist/dev.js --help >/dev/null; done; echo \"=== dev app add --help (x5) ===\"; for i in {1..5}; do /usr/bin/time -p node dist/dev.js app add --help >/dev/null; done; echo \"=== dev status --json (x3, best effort) ===\"; for i in {1..3}; do /usr/bin/time -p node dist/dev.js status --json >/dev/null || true; done'",
41
46
  "typecheck": "tsc --noEmit",
42
- "install:local": "./scripts/install-local.sh",
47
+ "bootstrap": "pnpm install && pnpm install:local",
48
+ "install:local": "pnpm build && ./scripts/install-local.sh",
43
49
  "uninstall:local": "./scripts/uninstall-local.sh"
44
50
  }
45
51
  }
@@ -0,0 +1,27 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.10.
2
+
3
+ Task:
4
+ 1) Refresh discoverability artifacts with the installed CLI version:
5
+ - `dev repo agents --repo <repo>`
6
+ 2) Audit host-run commands that wrap app startup with secret managers (Infisical/Doppler or any wrapper using `run --`):
7
+ - detect forms like `DATABASE_URI=... <wrapper> run -- ...`
8
+ - migrate to post-wrapper env override when DB vars must be forced:
9
+ - `<wrapper> run -- env DATABASE_URI=${DATABASE_URL:?missing DATABASE_URL} <app command ...>`
10
+ 3) For one-shot commands, keep deterministic alias mapping:
11
+ - `dev app exec <app> --yes --env-map DATABASE_URI=DATABASE_URL -- <command ...>`
12
+ 4) Run env probe before migrate/seed to confirm effective values:
13
+ - `dev app exec <app> --yes --env-map DATABASE_URI=DATABASE_URL -- printenv DATABASE_URL DATABASE_URI DB_HOST DB_PORT SHADOW_DATABASE_URL`
14
+ 5) Run diagnostics and resolve new wrapper-precedence warnings:
15
+ - `dev doctor --repo <repo>`
16
+ - address `repo.host-command-env-precedence` warnings by moving DB assignments after `run --`.
17
+
18
+ Validation:
19
+ - run representative host app startup (`dev app run <host-app> --repo <repo> --yes`)
20
+ - run env probe command and confirm `DATABASE_URI` aligns with injected `DATABASE_URL` for local postgres flow
21
+ - run `dev doctor --repo <repo>` and confirm no blocking errors
22
+
23
+ Report:
24
+ - host-run commands updated
25
+ - env probe output summary
26
+ - doctor check summary (including whether `repo.host-command-env-precedence` is clean)
27
+ - unresolved risks/ambiguities
@@ -0,0 +1,26 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.11.
2
+
3
+ Task:
4
+ 1) Refresh discoverability artifacts with the installed CLI version:
5
+ - `dev repo agents --repo <repo>`
6
+ 2) Review automation/scripts that expect `dev app exec` to always stop dependencies.
7
+ - Update assumptions: exec now stops only deps it started; already-running deps stay up.
8
+ 3) For workflows that chain app startup + seed/migrate:
9
+ - keep using `dev app run <app> --repo <repo> --yes`
10
+ - run one-shot commands with `dev app exec <app> --repo <repo> --yes -- <command ...>`
11
+ - confirm DB/service remains running when it was already up before exec.
12
+ 4) Keep deterministic alias mapping for non-Prisma apps:
13
+ - `dev app exec <app> --yes --env-map DATABASE_URI=DATABASE_URL -- <command ...>`
14
+ 5) Keep env probe before migrate/seed when secret managers are involved:
15
+ - `dev app exec <app> --yes --env-map DATABASE_URI=DATABASE_URL -- printenv DATABASE_URL DATABASE_URI DB_HOST DB_PORT SHADOW_DATABASE_URL`
16
+
17
+ Validation:
18
+ - start app/deps: `dev app run <host-app> --repo <repo> --yes`
19
+ - run one-shot command: `dev app exec <host-app> --repo <repo> --yes -- <seed-or-migrate-command ...>`
20
+ - verify dependency service state is unchanged when it was already running before exec
21
+ - run `dev doctor --repo <repo>`
22
+
23
+ Report:
24
+ - scripts/workflows reviewed for old teardown assumptions
25
+ - command(s) validated and resulting dependency lifecycle behavior
26
+ - unresolved risks/ambiguities
@@ -0,0 +1,26 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.12.
2
+
3
+ Task:
4
+ 1) Keep `.localhost` hostnames as configured; multi-segment hostnames (for example `elearning.klicker.localhost`) remain supported.
5
+ 2) Ensure runtime workflows use normal run/exec entrypoints so TLS host coverage can auto-refresh:
6
+ - `dev app run <app> --repo <repo> --yes`
7
+ - `dev app exec <app> --repo <repo> --yes -- <command ...>`
8
+ 3) Validate TLS coverage diagnostics:
9
+ - run `dev doctor --repo <repo>`
10
+ - inspect `repo.tls-host-coverage`
11
+ 4) If `repo.tls-host-coverage` warns, remediate by either:
12
+ - running app startup via `dev app run <app> --repo <repo> --yes` (auto-refresh), or
13
+ - running `dev tls install` (manual refresh).
14
+ 5) Re-run diagnostics after remediation:
15
+ - `dev doctor --repo <repo>`
16
+
17
+ Validation:
18
+ - `dev doctor --repo <repo>` has no blocking errors
19
+ - `repo.tls-host-coverage` is clear for configured hosts
20
+ - representative HTTPS route no longer presents Traefik default cert fallback
21
+
22
+ Report:
23
+ - hostnames reviewed/kept
24
+ - whether auto-refresh or manual refresh was used
25
+ - doctor summary for `repo.tls-host-coverage`
26
+ - unresolved TLS or certificate-trust risks
@@ -0,0 +1,29 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.13.
2
+
3
+ Task:
4
+ 1) Refresh discoverability artifacts with the installed CLI version:
5
+ - `dev repo agents --repo <repo>`
6
+ 2) Identify non-routed Docker dependency workarounds currently modeled as routed apps (for example Redis configured as `protocol=http` + dummy `.localhost` host only to enable dependency startup).
7
+ 3) Convert those entries to first-class dependency apps:
8
+ - set `kind: dependency`
9
+ - keep `runtime: docker`
10
+ - keep `docker.service` and `docker.composeFiles`
11
+ - remove routed-only fields: `host`, `protocol`, `tcpProtocol`, `hostRun`, `docker.internalPort`, `docker.router`
12
+ 4) Keep dependency references in dependent apps via `dependencies: [{ app: "<name>" }]`.
13
+ 5) Update scripts/docs that previously attempted direct execution of dependency-only entries:
14
+ - `dev app run <dependency-name>` is intentionally rejected
15
+ - `dev app exec <dependency-name> -- <cmd>` is intentionally rejected
16
+ - `dev open <dependency-name>` reports no route exists by design
17
+
18
+ Validation:
19
+ - run `dev app ls --repo <repo>` and confirm dependency entries show as dependency/docker without route host requirements
20
+ - run routed parent app startup: `dev app run <parent-app> --repo <repo> --yes`
21
+ - run one-shot command on routed parent: `dev app exec <parent-app> --repo <repo> --yes -- <command ...>`
22
+ - run `dev ls` and confirm dependency-only entries do not produce endpoints
23
+ - run `dev doctor --repo <repo>`
24
+
25
+ Report:
26
+ - entries migrated from workaround style to `kind: dependency`
27
+ - dependency graph and startup behavior validated
28
+ - direct-target script/doc updates completed
29
+ - unresolved risks/ambiguities
@@ -0,0 +1,27 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.14.
2
+
3
+ Task:
4
+ 1) Ensure the repository stores the applied devrouter release in `.devrouter.yml`:
5
+ - use top-level `devrouter.version: <semver>`
6
+ - keep schema `version: 1` unchanged
7
+ 2) Verify version state with:
8
+ - `dev -V --repo <repo>`
9
+ 3) Resolve upgrade path with:
10
+ - `dev upgrade --repo <repo>`
11
+ 4) Apply the next required release prompt (incremental upgrade):
12
+ - `dev upgrade <target-version> --repo <repo>`
13
+ 5) If further versions are reported after that target, continue incrementally by repeating step 4 until reaching the desired version.
14
+ 6) After finishing upgrade edits, refresh discoverability artifacts:
15
+ - `dev repo agents --repo <repo>`
16
+
17
+ Validation:
18
+ - `dev -V --repo <repo>` shows installed CLI version, local repo version, and next target (or none)
19
+ - `dev upgrade --repo <repo>` lists upgrade targets in ascending order and marks the next version
20
+ - `dev upgrade <target-version> --repo <repo>` prints the expected Agent Adaptation Prompt for that version
21
+ - `dev doctor --repo <repo>`
22
+
23
+ Report:
24
+ - `.devrouter.yml` `devrouter.version` before/after
25
+ - target versions applied in order
26
+ - remaining available versions (if any)
27
+ - unresolved risks/ambiguities
@@ -0,0 +1,22 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.15.
2
+
3
+ Changes in this release:
4
+ - Postgres dependency env injection now includes `DIRECT_URL` (equals `DATABASE_URL`).
5
+ - This enables Prisma + PgBouncer setups where `DIRECT_URL` bypasses the pooler for migrations.
6
+
7
+ Task:
8
+ 1) Bump `.devrouter.yml` `devrouter.version` to `0.0.15`.
9
+ 2) No schema or config migration required — `DIRECT_URL` injection is additive.
10
+ 3) If your app uses Prisma with PgBouncer, you can now reference `DIRECT_URL` in `schema.prisma` `directUrl` field; devrouter injects it automatically for postgres deps.
11
+ 4) Refresh discoverability artifacts:
12
+ - `dev repo agents --repo <repo>`
13
+
14
+ Validation:
15
+ - `dev -V --repo <repo>` shows `0.0.15` as local repo version
16
+ - `dev doctor --repo <repo>`
17
+ - `dev app exec <app-with-postgres-dep> --repo <repo> -- env | grep DIRECT_URL` confirms injection
18
+
19
+ Report:
20
+ - `.devrouter.yml` `devrouter.version` before/after
21
+ - whether `DIRECT_URL` is consumed by app (if applicable)
22
+ - unresolved risks/ambiguities
@@ -0,0 +1,34 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.16.
2
+
3
+ Changes in this release:
4
+ - New optional `secretManager.command` field in `.devrouter.yml`.
5
+ - When configured, `dev app run` and `dev app exec` automatically wrap user commands with the secret manager command.
6
+ - Devrouter-injected dependency env vars (`DATABASE_URL`, `DIRECT_URL`, `SHADOW_DATABASE_URL`, `*_HOST`, `*_PORT`) are re-applied after the SM boundary via `env KEY=VAL` prefix, ensuring they take precedence over SM-provided values.
7
+ - Env-map targets (`--env-map TARGET=SOURCE`) are also included in the re-injection set.
8
+
9
+ Task:
10
+ 1) Bump `.devrouter.yml` `devrouter.version` to `0.0.16`.
11
+ 2) If your app uses a secret manager (Infisical, Doppler, etc.) with devrouter-managed services:
12
+ a) Add `secretManager.command` to `.devrouter.yml`:
13
+ ```yaml
14
+ secretManager:
15
+ command: infisical run --env dev --
16
+ ```
17
+ b) Simplify `hostRun.command` — remove any manual SM wrapping and env-var forwarding prefixes. The bare application command suffices now (e.g., `turbo run dev --no-daemon` instead of `infisical run --env dev -- env DATABASE_URL=${DATABASE_URL} ... turbo run dev --no-daemon`).
18
+ c) Simplify package.json scripts — remove `infisical run --env dev -- env DATABASE_URL=... DIRECT_URL=... SHADOW_DATABASE_URL=...` prefixes from npm scripts. The bare command is enough when run through `dev app run` or `dev app exec`.
19
+ d) Simplify shell helper scripts — if you have wrapper scripts that manually forward DB env vars through the SM, those prefixes can be removed.
20
+ 3) Note: `DIRECT_URL` is now injected correctly by devrouter (equal to `DATABASE_URL`). Any workaround like `DIRECT_URL=${DATABASE_URL}` can be removed.
21
+ 4) Refresh discoverability artifacts:
22
+ - `dev repo agents --repo <repo>`
23
+
24
+ Validation:
25
+ - `dev -V --repo <repo>` shows `0.0.16` as local repo version
26
+ - `dev doctor --repo <repo>`
27
+ - `dev app run <app> --repo <repo>` starts with SM wrapping (check process tree or env output)
28
+ - `dev app exec <app> --repo <repo> -- env | grep DATABASE_URL` confirms env injection after SM boundary
29
+
30
+ Report:
31
+ - `.devrouter.yml` `devrouter.version` before/after
32
+ - whether `secretManager.command` was added
33
+ - scripts/commands simplified (list before/after)
34
+ - unresolved risks/ambiguities
@@ -0,0 +1,37 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.17.
2
+
3
+ Changes in this release:
4
+ - `tcpProtocol` now supports `postgres`, `redis`, `mariadb`, and `mysql` (previously postgres-only).
5
+ - TCP ports (5432, 6379, 3306) are only bound to Traefik when a project first starts an app using that protocol. Released on `dev down`.
6
+ - Generic `NAME_HOST`/`NAME_PORT` env vars injected for all TCP deps. Postgres-specific `DATABASE_URL`/`DIRECT_URL`/`SHADOW_DATABASE_URL` still injected only for `tcpProtocol: postgres`.
7
+ - `DevrouterDockerPostgresApp` type renamed to `DevrouterDockerTcpApp`.
8
+
9
+ Task:
10
+ 1) Bump `.devrouter.yml` `devrouter.version` to `0.0.17`.
11
+ 2) If your project uses Redis, MariaDB, or MySQL as a TCP-routed service:
12
+ a) Change the service from `kind: dependency` (non-routed) to a routed TCP app:
13
+ ```yaml
14
+ - name: cache
15
+ host: cache.localhost
16
+ protocol: tcp
17
+ tcpProtocol: redis
18
+ runtime: docker
19
+ docker:
20
+ service: redis
21
+ internalPort: 6379
22
+ composeFiles:
23
+ - docker-compose.yml
24
+ ```
25
+ b) TLS is required for TCP routing. Run `dev tls install` if not already done.
26
+ 3) Refresh discoverability artifacts:
27
+ - `dev repo agents --repo <repo>`
28
+
29
+ Validation:
30
+ - `dev -V --repo <repo>` shows `0.0.17` as local repo version
31
+ - `dev doctor --repo <repo>` passes
32
+ - `dev app ls --repo <repo>` shows new TCP apps with correct protocol
33
+
34
+ Report:
35
+ - `.devrouter.yml` `devrouter.version` before/after
36
+ - any new TCP apps added (list names and protocols)
37
+ - unresolved risks/ambiguities
@@ -0,0 +1,47 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.18.
2
+
3
+ Changes in this release:
4
+ - **Breaking**: Shared hardcoded env vars (`DATABASE_URL`, `DIRECT_URL`, `SHADOW_DATABASE_URL`) are no longer auto-injected for postgres deps. Replaced by per-dep deterministic vars.
5
+ - **Breaking**: `--env-map` CLI flag removed. Env var aliasing is now config-only via `envMap` on dependency references.
6
+ - Per-dep deterministic env vars: `{PREFIX}_HOST`, `{PREFIX}_PORT`, `{PREFIX}_URL`, `{PREFIX}_SHADOW_URL` (where `{PREFIX} = dep.name.toUpperCase().replace(/-/g, "_")`).
7
+ - Config-level `envMap` on dependency references for backward-compatible aliasing.
8
+ - Protocol-specific URL builders for redis (`redis://localhost:{PORT}`) and mysql/mariadb (`mysql://root@localhost:{PORT}`).
9
+ - Secret manager `{env}` template support with `--env` CLI override and `defaultEnv` config fallback.
10
+ - `dev app run` now checks for already-running host apps before spawning. If the same app (or a different app claiming the same hostname) is already running with a live PID, the command fails with the existing URL, PID, and repo path.
11
+ - Stale host route entries (dead PID) are evicted automatically on run attempt.
12
+ - `dev doctor` includes a new `routes.stale-host-routes` check that cleans up dead-PID entries from `host-routes-state.json`.
13
+
14
+ Task:
15
+ 1) Bump `.devrouter.yml` `devrouter.version` to `0.0.18`.
16
+ 2) Update dependency references to use `envMap` for any env vars your app expects under legacy names:
17
+ ```yaml
18
+ dependencies:
19
+ - app: db
20
+ envMap:
21
+ DATABASE_URL: DB_URL
22
+ DIRECT_URL: DB_URL
23
+ SHADOW_DATABASE_URL: DB_SHADOW_URL
24
+ ```
25
+ This maps the new per-dep var `DB_URL` to the legacy `DATABASE_URL` your app code expects.
26
+ 3) If you used `--env-map TARGET=SOURCE` on `dev app exec`, move those mappings into `.devrouter.yml` `envMap` on the relevant dependency reference.
27
+ 4) If you use a secret manager with `{env}` templating, optionally add `defaultEnv` to your config:
28
+ ```yaml
29
+ secretManager:
30
+ command: infisical run --env {env} --
31
+ defaultEnv: dev
32
+ ```
33
+ 5) No config changes required for the concurrent run guard — it is automatic.
34
+ 6) Refresh discoverability artifacts:
35
+ - `dev repo agents --repo <repo>`
36
+
37
+ Validation:
38
+ - `dev -V --repo <repo>` shows `0.0.18` as local repo version
39
+ - `dev doctor --repo <repo>` passes (including `routes.stale-host-routes: ok`)
40
+ - `dev app exec <name> --repo <repo> -- env | grep -E "(DB_URL|DATABASE_URL)"` shows both per-dep vars and envMap aliases
41
+ - `dev app run <name>` in one terminal, then again in another terminal: second invocation should fail with the running URL
42
+
43
+ Report:
44
+ - `.devrouter.yml` `devrouter.version` before/after
45
+ - envMap entries added (list target: source pairs)
46
+ - any `--env-map` CLI usages migrated
47
+ - unresolved risks/ambiguities
@@ -0,0 +1,19 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.19.
2
+
3
+ Changes in this release:
4
+ - Bugfix: dependency env vars are now injected even when dependency containers are already running. Previously, if deps were already up, the overlay/port-probing step was skipped and env vars were missing.
5
+
6
+ Task:
7
+ 1) Bump `.devrouter.yml` `devrouter.version` to `0.0.19`.
8
+ 2) No schema or config migration required — this is a bugfix-only release.
9
+ 3) Refresh discoverability artifacts:
10
+ - `dev repo agents --repo <repo>`
11
+
12
+ Validation:
13
+ - `dev -V --repo <repo>` shows `0.0.19` as local repo version
14
+ - `dev doctor --repo <repo>`
15
+ - With deps already running: `dev app exec <app> --repo <repo> -- env | grep _URL` confirms env injection
16
+
17
+ Report:
18
+ - `.devrouter.yml` `devrouter.version` before/after
19
+ - unresolved risks/ambiguities
@@ -0,0 +1,33 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.20.
2
+
3
+ Changes in this release:
4
+ - New app runtime `runtime: proxy`: registers an HTTP route to an already-running `upstream` (`host:port`) and nothing else — no process lifecycle, env injection, `hostRun`, compose ownership, or dependencies. It fronts a devcontainer or any externally-managed process with a stable `*.localhost` host.
5
+ - New `upstream` field in the app schema (proxy apps only). `dev app add` gains `--upstream <host:port>`.
6
+ - Loopback upstreams (`localhost`/`127.0.0.1`/`0.0.0.0`) are rewritten to `host.docker.internal` so Traefik (in Docker) can reach the host.
7
+ - Proxy routes persist until `dev app rm`; they have no PID and are never evicted as stale.
8
+
9
+ Task:
10
+ 1) Bump `.devrouter.yml` `devrouter.version` to `0.0.20`.
11
+ 2) No migration is required for existing host/docker/tcp/dependency apps — they are unchanged.
12
+ 3) (Optional) If this repo now runs its app inside a devcontainer / external process (so devrouter should only route, not start it), convert the app to a proxy route:
13
+ ```yaml
14
+ - name: app
15
+ host: <name>.localhost
16
+ protocol: http
17
+ runtime: proxy
18
+ upstream: 127.0.0.1:<port> # the port the devcontainer/process publishes on the host
19
+ ```
20
+ Remove that app's `hostRun`/`docker`/`dependencies` (a proxy app owns none of them). Keep datastore apps as-is only if devrouter should still manage them; if the devcontainer owns the datastores, drop those apps too.
21
+ 4) Refresh discoverability artifacts:
22
+ - `dev repo agents --repo <repo>`
23
+
24
+ Validation:
25
+ - `dev -V --repo <repo>` shows `0.0.20` as local repo version
26
+ - `dev doctor --repo <repo>` passes (proxy apps are not flagged as stale routes)
27
+ - `dev app ls --repo <repo>` shows any proxy apps with their `upstream` target
28
+ - With the upstream running and `dev up` + `dev tls install` done: `dev app run <proxy-app> --repo <repo>` prints `Proxy route ready: https://<host> -> <upstream>` and the host serves the upstream
29
+
30
+ Report:
31
+ - `.devrouter.yml` `devrouter.version` before/after
32
+ - any apps converted to `runtime: proxy` (names + upstreams)
33
+ - unresolved risks/ambiguities
@@ -0,0 +1,36 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.21.
2
+
3
+ Changes in this release:
4
+ - `runtime: proxy` now supports `protocol: tcp` (in addition to `http`). With `protocol: tcp` and a `tcpProtocol` (`postgres`/`redis`/`mariadb`/`mysql`), devrouter registers a Traefik TLS-SNI TCP route — `HostSNI(<host>)` on the shared protocol entrypoint (e.g. `:5432`) — to an `upstream` reachable by name on a shared Docker network. This fronts an externally-managed datastore (e.g. a devcontainer's Postgres on `devnet`) with a stable `db.*.localhost` and no per-DB host port. Pairs with the existing HTTP proxy so N apps + their DBs route through devrouter with zero host-port collisions.
5
+ - TCP proxy routes require TLS (`dev tls install`): SNI is read from the TLS ClientHello. `dev app run` auto-extends the mkcert cert to cover the new host. devrouter emits a per-protocol Traefik `TLSOption` advertising ALPN `postgresql` (libpq direct-SSL mandates it).
6
+ - `dev app add --runtime proxy --protocol tcp --tcp-protocol <postgres|redis|...> --upstream <host:port>` scaffolds a TCP proxy app.
7
+
8
+ Task:
9
+ 1) Bump `.devrouter.yml` `devrouter.version` to `0.0.21`.
10
+ 2) No migration is required for existing host/docker/proxy(http)/dependency/tcp(docker) apps — they are unchanged.
11
+ 3) (Optional) If a datastore lives in an externally-managed container that joins a shared Docker network devrouter's Traefik is also on (e.g. `devnet`), you can front it with a stable TCP host instead of a published host port:
12
+ ```yaml
13
+ - name: db
14
+ host: db.<name>.localhost
15
+ protocol: tcp
16
+ tcpProtocol: postgres
17
+ runtime: proxy
18
+ upstream: <container-network-alias>:5432
19
+ ```
20
+ The container must join the shared network with that alias and must NOT publish the port on the host.
21
+ 4) Refresh discoverability artifacts:
22
+ - `dev repo agents --repo <repo>`
23
+
24
+ Validation:
25
+ - `dev -V --repo <repo>` shows `0.0.21` as local repo version
26
+ - With TLS on (`dev up` + `dev tls install`) and the upstream container on the shared network: `dev app run <tcp-proxy-app> --repo <repo>` prints `TCP proxy route ready: <proto>://<host>:<port> -> <upstream> (tls required)`
27
+ - Postgres reachable via direct-SSL (the ClientHello must carry the SNI):
28
+ `psql "host=db.<name>.localhost port=5432 user=<u> password=<p> dbname=<d> sslmode=require sslnegotiation=direct"` (libpq 17+)
29
+ - Redis reachable via TLS+SNI:
30
+ `redis-cli -h redis.<name>.localhost -p 6379 --tls --sni redis.<name>.localhost --cacert "$(mkcert -CAROOT)/rootCA.pem" PING`
31
+ - `dev doctor --repo <repo>` passes (proxy routes are not flagged as stale)
32
+
33
+ Report:
34
+ - `.devrouter.yml` `devrouter.version` before/after
35
+ - any datastores fronted with `runtime: proxy` + `protocol: tcp` (names + upstreams)
36
+ - unresolved risks/ambiguities
@@ -0,0 +1,51 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.22.
2
+
3
+ Changes in this release:
4
+ - **Workspace isolation** for parallel git worktrees / agents. A single "workspace token" now spans three layers with one identity: the devpod workspace id (`devpod up --id <ws>`), the routes devrouter registers, and the `${WORKSPACE}` placeholder in `.devrouter.yml` upstreams + the devcontainer compose network alias. Several worktrees of the same repo can run at once without host/route collisions.
5
+ - Token resolution precedence: `--workspace <slug>` flag > `DEVROUTER_WORKSPACE` env var > auto-derived from a linked git worktree branch (sanitized: lowercase, non-alphanumeric → `-`, capped at 32 chars) > none. The primary checkout resolves to no token and routes exactly as before — **fully back-compatible, no behavior change for existing repos**.
6
+ - When a workspace is active: hosts auto-namespace (`web.localhost` → `web.<ws>.localhost`), `${WORKSPACE}` in an app `upstream` is substituted with the token and re-validated, and the docker `router` key is suffixed per workspace. The runtime config is computed in memory only — the committed `.devrouter.yml` is never rewritten. `${WORKSPACE}` is upstream-only (rejected in `host`; the host is auto-namespaced).
7
+ - New `dev workspace` lifecycle: `dev workspace up <branch> [--path <dir>] [--no-devpod] [--open]`, `dev workspace ls [--json]`, `dev workspace down <workspace|branch> [--keep-worktree] [--keep-devpod]`. `dev app run`/`dev app exec` gain `--workspace <slug>`.
8
+ - `dev doctor` now reclaims orphaned workspace proxy routes whose worktree directory was removed without `dev workspace down` (check `routes.orphaned-workspace-routes`). It uses worktree existence as the signal and never touches primary-checkout routes.
9
+ - TLS: namespaced hosts (`web.<ws>.localhost`) are not covered by the `*.localhost` wildcard; devrouter auto-extends the mkcert cert SANs for active hosts when TLS is enabled.
10
+ - Fix: `dev app run` leaves `runtime: docker` target services running after startup; host app runs still stop auto-started docker deps when the host process exits.
11
+
12
+ Task:
13
+ 1) Bump `.devrouter.yml` `devrouter.version` to `0.0.22`.
14
+ 2) No migration is required for existing host/docker/proxy/dependency apps — they are unchanged and the primary checkout routes identically.
15
+ 3) (Optional — only if you front a devcontainer and want parallel-worktree isolation) Parameterize the proxy upstream with `${WORKSPACE}` and have the devcontainer compose service expose a matching network alias:
16
+ ```yaml
17
+ # .devrouter.yml
18
+ - name: app
19
+ host: app.localhost # auto-namespaced to app.<ws>.localhost when a workspace is active
20
+ protocol: http
21
+ runtime: proxy
22
+ upstream: ${WORKSPACE}-app:3000
23
+ ```
24
+ ```yaml
25
+ # devcontainer docker-compose: join devnet with the workspace alias
26
+ services:
27
+ app:
28
+ networks:
29
+ devnet:
30
+ aliases:
31
+ - ${WORKSPACE}-app # WORKSPACE defaults to <project> in devcontainer.env
32
+ networks:
33
+ devnet:
34
+ external: true
35
+ ```
36
+ Default `WORKSPACE=<project>` in the devcontainer env so the primary checkout still resolves a stable alias.
37
+ 4) Refresh discoverability artifacts:
38
+ - `dev repo agents --repo <repo>`
39
+
40
+ Validation:
41
+ - `dev -V --repo <repo>` shows `0.0.22` as local repo version.
42
+ - Primary checkout unchanged: `dev app run <app> --repo <repo>` registers the same `*.localhost` host as before.
43
+ - Parallel worktree (if adopted): in a linked worktree on branch `feat-a`, `dev workspace up feat-a` (or `DEVROUTER_WORKSPACE=feat-a dev app run <app>`) registers `app.feat-a.localhost` → `feat-a-app`, reachable alongside the primary host.
44
+ - `dev workspace ls` lists each worktree with its token and route count.
45
+ - `dev workspace down feat-a` frees the `feat-a` routes, stops its devpod, and removes the worktree; `dev ls` is clean afterward.
46
+ - `dev doctor --repo <repo>` passes (and reclaims any orphaned workspace routes from removed worktrees).
47
+
48
+ Report:
49
+ - `.devrouter.yml` `devrouter.version` before/after
50
+ - whether `${WORKSPACE}` upstream parameterization was adopted (and the devcontainer alias used)
51
+ - unresolved risks/ambiguities
@@ -0,0 +1,32 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.6.
2
+
3
+ Task:
4
+ 1) Update any workflows/scripts that relied on `dev init` side effects:
5
+ - use `dev init --write-agents --write-skill`, or
6
+ - run `dev repo agents` after `dev init`.
7
+ 2) Audit `dev open <name>` usage:
8
+ - confirm names remain unambiguous with app-first resolution,
9
+ - switch to explicit hosts if needed (for example `dev open api.localhost`).
10
+ 3) Migrate any `dev ls` table parsing to `dev ls --json` and consume:
11
+ - `routes[].appName`
12
+ - `routes[].serviceName`
13
+ - `routes[].hosts`
14
+ 4) Run `dev doctor --repo <repo>` and handle `repo.postgres-credentials` advisories:
15
+ - align to `POSTGRES_USER/PASSWORD/DB=prisma` where using injected DB URLs, or
16
+ - keep custom credentials with explicit app/runtime URL management.
17
+ 5) If your repo was copied from older demo patterns:
18
+ - remove hardcoded host-side `DATABASE_URL` overrides,
19
+ - align compose Postgres defaults to `prisma/prisma/prisma` when using injected env.
20
+
21
+ Validation:
22
+ - run `dev ls`
23
+ - run updated `dev open` commands
24
+ - run repo automation that consumes routes
25
+ - run `dev doctor --repo <repo>`
26
+ - run app startup with deps (`dev app run <host-app> --yes`)
27
+
28
+ Report:
29
+ - files/scripts changed
30
+ - command changes made
31
+ - doctor output summary
32
+ - unresolved risks/ambiguities
@@ -0,0 +1,23 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.7.
2
+
3
+ Task:
4
+ 1) Replace wrapper-recursion or brittle quoted `dev app exec` invocations with argv-safe form:
5
+ - `dev app exec <app> --yes -- <command ...>`
6
+ 2) For commands that require shell expansion, switch to explicit shell mode:
7
+ - `dev app exec <app> --yes --shell -- "<single shell command string>"`
8
+ 3) For non-Prisma apps expecting `DATABASE_URI`, add deterministic env aliasing:
9
+ - `dev app exec <app> --yes --env-map DATABASE_URI=DATABASE_URL -- <command ...>`
10
+ 4) If using secret managers (Infisical/Doppler), verify effective DB env before migrate/seed:
11
+ - `dev app exec <app> --yes --env-map DATABASE_URI=DATABASE_URL -- printenv DATABASE_URL DATABASE_URI DB_HOST DB_PORT SHADOW_DATABASE_URL`
12
+ 5) Update onboarding/docs/scripts in your repo to prefer the new primary forms and keep wrapper scripts as fallback only.
13
+
14
+ Validation:
15
+ - run one migration/seed command through the updated `dev app exec` flow
16
+ - run the env probe command and confirm expected values
17
+ - run `dev doctor --repo <repo>`
18
+
19
+ Report:
20
+ - commands/scripts updated
21
+ - env-map usage introduced (if any)
22
+ - probe output summary
23
+ - unresolved risks/ambiguities
@@ -0,0 +1,26 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.8.
2
+
3
+ Task:
4
+ 1) Refresh discoverability artifacts with the installed CLI version:
5
+ - `dev repo agents --repo <repo>`
6
+ 2) If your team wants Linear-backed milestone workflow assets, bootstrap them explicitly:
7
+ - `dev repo agents --repo <repo> --with-linear`
8
+ - or `dev init --repo <repo> --with-linear --write-agents --write-skill`
9
+ 3) Ensure AGENTS.md now references both skills when Linear workflow is enabled:
10
+ - `.factory/skills/devrouter/SKILL.md`
11
+ - `.factory/skills/linear-workflow/SKILL.md`
12
+ 4) Adopt the linear-workflow templates for new milestone tracking:
13
+ - `references/LINEAR_ISSUE_TEMPLATE.md`
14
+ - `references/MILESTONE_PLAN_TEMPLATE.md`
15
+ - `references/PROGRESS_UPDATE_TEMPLATE.md`
16
+ 5) Use devrouter release guidance from `https://github.com/rschlaefli/devrouter/blob/main/CHANGELOG.md` (latest Agent Adaptation Prompt); this does not require adding `CHANGELOG.md` to the target repository unless that repository already has its own policy.
17
+
18
+ Validation:
19
+ - run `dev init --repo <repo> --with-linear` and confirm the prompt includes "Linear milestone workflow"
20
+ - run `dev repo agents --repo <repo> --with-linear` and confirm Linear skill/template files exist
21
+ - run `dev doctor --repo <repo>`
22
+
23
+ Report:
24
+ - whether Linear workflow bootstrap was enabled
25
+ - artifacts created/updated
26
+ - any repo-specific deviations from the template policy
@@ -0,0 +1,30 @@
1
+ You are upgrading a repository that uses devrouter to version 0.0.9.
2
+
3
+ Task:
4
+ 1) Refresh discoverability artifacts with the installed CLI version:
5
+ - `dev repo agents --repo <repo>`
6
+ 2) If Linear workflow is enabled in this repository, re-run with guided metadata capture:
7
+ - `dev repo agents --repo <repo> --with-linear`
8
+ 3) Confirm AGENTS.md contains one managed Linear metadata block between:
9
+ - `<!-- devrouter-linear-workflow-config:start -->`
10
+ - `<!-- devrouter-linear-workflow-config:end -->`
11
+ 4) Ensure required mapping fields are set (no placeholders left):
12
+ - `linear.workspace.name`
13
+ - `linear.team.name`
14
+ - `linear.project.name`
15
+ 5) If placeholders exist from non-interactive runs, re-run the command in an interactive TTY and provide workspace/team/project values.
16
+ 6) For Linear-tracked implementation, enforce execution hygiene:
17
+ - set issue status at session start and each phase transition
18
+ - post progress comments at meaningful checkpoints during implementation
19
+ - post an end-of-session recap comment and re-check status/comment freshness before stopping
20
+
21
+ Validation:
22
+ - run `dev init --repo <repo> --with-linear` and confirm guided Linear questions appear
23
+ - run `dev repo agents --repo <repo> --with-linear` and confirm AGENTS metadata block is populated
24
+ - run `dev doctor --repo <repo>`
25
+
26
+ Report:
27
+ - final workspace/team/project mapping stored in AGENTS
28
+ - whether placeholders were replaced
29
+ - any unresolved mapping ambiguity
30
+ - confirmation that Linear status/comment cadence was followed during execution and at session end