@devrouter/cli 0.0.34 → 0.0.36

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.34",
3
+ "version": "0.0.36",
4
4
  "description": "Local dev routing CLI with shared Traefik reverse proxy",
5
5
  "author": "Roland Schlaefli",
6
6
  "homepage": "https://github.com/rschlaefli/devrouter#readme",
@@ -45,10 +45,12 @@
45
45
  "build": "tsup",
46
46
  "dev": "tsx src/cli.ts",
47
47
  "test": "vitest run && pnpm test:process",
48
+ "test:package": "./scripts/package-smoke.sh",
48
49
  "test:process": "bash scripts/test-devrouter-process.sh",
49
50
  "check": "biome check .",
50
51
  "check:fix": "biome check --write .",
51
52
  "check:docs-policy": "./scripts/check-docs-policy.sh",
53
+ "check:knowledge": "node --import tsx scripts/check-knowledge.ts",
52
54
  "format": "biome format --write .",
53
55
  "knip": "knip",
54
56
  "lint": "biome lint .",
@@ -56,6 +58,7 @@
56
58
  "routing:smoke": "./scripts/smoke-routing.sh",
57
59
  "devcontainer:smoke": "./scripts/smoke-devcontainer.sh",
58
60
  "workspace:lifecycle-smoke": "./scripts/smoke-workspace-lifecycle.sh",
61
+ "workspace:cleanup-smoke": "./scripts/smoke-workspace-cleanup-report.sh",
59
62
  "bench:startup": "zsh -lc 'set -euo pipefail; echo \"=== dev --help (x5) ===\"; for i in {1..5}; do /usr/bin/time -p node dist/devrouter.js --help >/dev/null; done; echo \"=== dev app add --help (x5) ===\"; for i in {1..5}; do /usr/bin/time -p node dist/devrouter.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/devrouter.js status --json >/dev/null || true; done'",
60
63
  "typecheck": "tsc --noEmit",
61
64
  "bootstrap": "pnpm install && pnpm install:local",
@@ -0,0 +1,29 @@
1
+ # Upgrade to devrouter 0.0.35
2
+
3
+ Devrouter now binds provider mutations, managed processes, proxy upstreams, and published routes to one exact checkout and runtime generation. Configuration and ownership schemas are unchanged.
4
+
5
+ 1. Install `@devrouter/cli@0.0.35` on the host and bump `.devrouter.yml` to `devrouter.version: 0.0.35`.
6
+ 2. Replace raw `devpod up`, `devpod stop`, or `devpod delete` calls for managed environments with `devrouter ensure <checkout>`, `devrouter stop <checkout>`, `devrouter stop <checkout> --delete`, or the matching `devrouter workspace` command. Raw DevPod mutations bypass devrouter's machine-wide ownership lock.
7
+ 3. For every proxy app started through managed `ensure`, use the resolved checkout alias namespace. Prefer `${WORKSPACE}-<service>:<port>` in `.devrouter.yml` with matching `${WORKSPACE:-<project>}-<service>` Compose aliases for both HTTP and TCP routes.
8
+ 4. Keep the managed adapter contract from `0.0.34`: require `DEVROUTER_PROCESS_HELPER` and call `"$DEVROUTER_PROCESS_HELPER" ensure`. If reuse depends on non-secret runtime values beyond command and workspace identity, set `DEVROUTER_PROCESS_FINGERPRINT_ENV` to their comma-separated environment names before calling the helper. Secret-like names are rejected and raw values are never written to process state.
9
+ 5. Run `devrouter repo agents --repo <checkout>` to refresh generated guidance.
10
+
11
+ No manual route-state migration is required. The first `0.0.35` route read migrates a valid headerless `0.0.34` generation; invalid canonical metadata fails closed instead of discarding routes.
12
+
13
+ Verification:
14
+
15
+ - Run `devrouter doctor --repo <checkout>` and `devrouter repo devcontainer verify --repo <checkout> --json`; confirm the managed post-start and upstream-alias checks are `ok`.
16
+ - Run `devrouter ensure <checkout> --json` twice. Confirm the cold run starts the exact checkout and the warm run preserves the same DevPod and owned process group.
17
+ - For a linked worktree, confirm every published HTTP/TCP upstream begins with its workspace token and every routed endpoint reaches that worktree.
18
+ - Run `devrouter workspace ls --repo <repo> --json` and confirm each owner has one exact worktree path and DevPod ID.
19
+ - If explicit DevPod cleanup is needed, use `devrouter stop <checkout> --delete --json` and confirm the Git checkout remains present.
20
+
21
+ Report template:
22
+
23
+ - CLI/config version: `0.0.35`
24
+ - Raw DevPod lifecycle calls removed: `<yes or not applicable>`
25
+ - Proxy alias namespace: `<workspace/project token and upstreams>`
26
+ - Managed adapter and optional environment identity: `<ok or details>`
27
+ - Cold/warm exact-checkout ensure: `<DevPod id and process evidence>`
28
+ - Route and browser evidence: `<URLs and result>`
29
+ - Remaining blockers: `<none or details>`
@@ -0,0 +1,31 @@
1
+ # Upgrade to devrouter 0.0.36
2
+
3
+ Devrouter gains a report-only inspection path for managed linked workspaces: `devrouter workspace cleanup` joins ownership, DevPod registration and runtime, checkout, route, advisory activity, and integration evidence, and the opt-in `--measure-size` adds per-workspace storage consumption. Configuration, ownership, and route-state schemas are unchanged; only the cleanup `--json` report version moves, from `1` to `2`.
4
+
5
+ 1. Install `@devrouter/cli@0.0.36` on the host and bump `.devrouter.yml` to `devrouter.version: 0.0.36`.
6
+ 2. If any agent workflow parses cleanup `--json`, accept `schemaVersion: 2`. Fields are additive, but a strict equality check against `1` now fails.
7
+ 3. Use `devrouter workspace cleanup --repo <repo> --inactive-for 30d [--json]` to decide what is worth reclaiming. It has no `--yes` and no apply mode, and it never touches DevPod, routes, ownership, Git, Docker, applications, worktrees, or branches. Act only through the exact `workspace gc` or `workspace down` command a row suggests; never script raw `devpod` or `git worktree remove` calls from its output.
8
+ 4. Add `--check-merged` only when you want the read-only origin and GitHub/GitLab checks. Without it the report stays local, and integration state is reported as `not-verified` rather than guessed.
9
+ 5. Add `--measure-size` only when you need sizes. It walks each worktree and asks Docker to size the attributed container, so leave it off for routine evidence checks. Reclaimable figures are `worktree` plus `containerWritable`; `imageShared` covers layers shared with other containers, overlaps across workspaces, and must never be summed or presented as reclaimable.
10
+ 6. Treat every `unknown` figure as unknown rather than zero. A workspace with no attributed container reports a measured `0`, which is a different and trustworthy answer.
11
+ 7. Run `devrouter repo agents --repo <checkout>` to refresh generated guidance.
12
+
13
+ No manual migration is required. Existing owner records, routes, and devcontainer wiring are read as-is, and a repository with no managed linked workspaces reports an empty list rather than an error.
14
+
15
+ Verification:
16
+
17
+ - Run `devrouter -V --repo <checkout>` and confirm both the installed CLI and the local repository report `0.0.36`.
18
+ - Run `devrouter workspace cleanup --repo <repo> --json` and confirm `schemaVersion` is `2` and no `consumption` key is present.
19
+ - Run the same command with `--measure-size` and confirm each workspace carries `consumption`, and that `reclaimable` equals `worktree` plus `containerWritable` wherever both are measured.
20
+ - Run it once with Docker unavailable and confirm the container figures are `unknown` with a reason, worktree bytes stay measured, and the report is still complete.
21
+ - Run `devrouter workspace ls --repo <repo> --json` before and after the report and confirm the output is identical; the report changes no state.
22
+
23
+ Report template:
24
+
25
+ - CLI/config version: `0.0.36`
26
+ - Cleanup `--json` consumers updated for `schemaVersion` 2: `<yes or not applicable>`
27
+ - Report-only run: `<workspace count and evidence states>`
28
+ - Suggestions acted on, if any: `<exact command and result, or none>`
29
+ - Sized run: `<reclaimable totals and any unknown figures with reasons>`
30
+ - Docker-absent run: `<container fields unknown, worktree measured>`
31
+ - Remaining blockers: `<none or details>`