daimon 0.4.3 → 0.6.0

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +231 -0
  2. package/dist/cli.js +71 -58
  3. package/dist/dashboard/3rdpartylicenses.txt +461 -0
  4. package/dist/dashboard/browser/chunk-4VNZXWQZ.js +3 -0
  5. package/dist/dashboard/browser/chunk-4ZR4NTJW.js +1 -0
  6. package/dist/dashboard/browser/chunk-7L4DWDGL.js +4 -0
  7. package/dist/dashboard/browser/chunk-BLNPJ4WD.js +4 -0
  8. package/dist/dashboard/browser/chunk-E3HUMJ6S.js +6 -0
  9. package/dist/dashboard/browser/chunk-EBOHC6KX.js +1 -0
  10. package/dist/dashboard/browser/chunk-ESDYJ3BP.js +1 -0
  11. package/dist/dashboard/browser/chunk-JUZHAE4L.js +2 -0
  12. package/dist/dashboard/browser/chunk-K43KW4K2.js +4 -0
  13. package/dist/dashboard/browser/chunk-K46KCL6L.js +1 -0
  14. package/dist/dashboard/browser/chunk-KDCKLTCZ.js +1 -0
  15. package/dist/dashboard/browser/chunk-L63FHXGH.js +4 -0
  16. package/dist/dashboard/browser/chunk-LBRCWYRN.js +3 -0
  17. package/dist/dashboard/browser/chunk-MHOSWLRR.js +3 -0
  18. package/dist/dashboard/browser/chunk-N5GRSTMJ.js +6 -0
  19. package/dist/dashboard/browser/chunk-NDSAQ2HK.js +1 -0
  20. package/dist/dashboard/browser/chunk-NN2YNLGP.js +3 -0
  21. package/dist/dashboard/browser/chunk-PJPGLT4T.js +1 -0
  22. package/dist/dashboard/browser/chunk-R6J2WYUD.js +1 -0
  23. package/dist/dashboard/browser/chunk-T2YKGOEM.js +3 -0
  24. package/dist/dashboard/browser/chunk-U6AY7XZK.js +5 -0
  25. package/dist/dashboard/browser/chunk-UC3XMN2Y.js +1 -0
  26. package/dist/dashboard/browser/chunk-UNT27XFJ.js +2 -0
  27. package/dist/dashboard/browser/chunk-V2CQL6W5.js +1 -0
  28. package/dist/dashboard/browser/chunk-VZ6E4VQY.js +2 -0
  29. package/dist/dashboard/browser/chunk-WAN7TQQW.js +1 -0
  30. package/dist/dashboard/browser/chunk-WJUGRIIZ.js +1 -0
  31. package/dist/dashboard/browser/chunk-WRBP4DQN.js +4 -0
  32. package/dist/dashboard/browser/chunk-XUU4AY4M.js +2 -0
  33. package/dist/dashboard/browser/chunk-XYVF5I5T.js +1 -0
  34. package/dist/dashboard/browser/chunk-Y6B6X4Y6.js +2 -0
  35. package/dist/dashboard/browser/chunk-YNQPX5G6.js +1 -0
  36. package/dist/dashboard/browser/chunk-YYAZGY5M.js +1 -0
  37. package/dist/dashboard/browser/index.html +15 -0
  38. package/dist/dashboard/browser/main-ZADV4SOC.js +1 -0
  39. package/dist/dashboard/browser/styles-SIPYJLMG.css +1 -0
  40. package/dist/dashboard/prerendered-routes.json +3 -0
  41. package/dist/main.js +52 -43
  42. package/dist/mcp.js +3 -2
  43. package/package.json +6 -5
  44. package/src/templates/claude/skill.md.tmpl +23 -31
  45. package/src/dashboard.html +0 -451
  46. package/src/templates/claude/commands/doctor.md.tmpl +0 -10
  47. package/src/templates/claude/commands/errors.md.tmpl +0 -10
  48. package/src/templates/claude/commands/logs.md.tmpl +0 -10
  49. package/src/templates/claude/commands/restart.md.tmpl +0 -10
  50. package/src/templates/claude/commands/start.md.tmpl +0 -12
  51. package/src/templates/claude/commands/status.md.tmpl +0 -10
  52. package/src/templates/claude/commands/stop.md.tmpl +0 -10
  53. package/src/templates/claude/commands/up.md.tmpl +0 -10
  54. package/src/templates/claude/commands/wait.md.tmpl +0 -10
  55. package/src/templates/claude/commands/why.md.tmpl +0 -10
package/CHANGELOG.md ADDED
@@ -0,0 +1,231 @@
1
+ # Changelog
2
+
3
+ All notable changes to Daimon are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/), and versions follow [SemVer](https://semver.org/).
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.6.0] — 2026-05-20
8
+
9
+ Strategic theme: **Every signal becomes actionable.** M33 deepens parser coverage so every tool's errors land structured; M34 turns daimon into a 3-call agent surface (overview → try-fix → focus); M35 ships keyboard / logs / ribbon polish; M36 broadens auto-heal with four new doctor rules and opt-in health-probe path discovery.
10
+
11
+ ### Added (M33) — Parser depth
12
+
13
+ - **P1 — Parser corpus + tests.** New `test/fixtures/parsers/*.log` for Vite, Storybook, Jest, Nx, Angular esbuild, webpack, and Node native, each paired with a `.expected.json` of `{tool, status, errors:[{file,line,col,code}]}`. New `test/parser-corpus.test.mjs` replays every fixture through `parseLine` and asserts ≥95% capture rate on file-bearing lines plus tool tagging. Captures parser regressions in CI instead of via screenshots.
14
+ - **P2 — Multi-tool parsers.** `parseLine` now detects and tags errors from Vite (`[vite]`, `[plugin:vite:…]`, `transformWithEsbuild`), Storybook (`ERR!`, `builder-vite`), Jest (`FAIL <path>`, `● <test>`), Nx (`> NX … failed`, `Failed tasks:`), webpack (`Module not found:`, `ERROR in <path>[:L:C|<sp>L:C]`), Node native (`Error|TypeError|… at <file>:<L>:<C>`), and TSC-style `file(line,col): error TSnnn`. Parsed entries gain a new optional `tool` field (`ParserTool` in `types.ts`). Stack-trace style `(file:line:col)` locations are extracted and also back-fill the most-recent error entry that has no file.
15
+ - **P3 — Errors-panel grouping by tool.** Dashboard `Errors` page gains a fourth `Group by` tab: `tool`. Each tool group renders with a colored chip per tool (esbuild/vite → primary, jest/nx → secondary, storybook/webpack → tertiary, node/typescript → neutral) and lists per-app, per-file rows.
16
+
17
+ ### Fixed (M33)
18
+
19
+ - **Webpack "compiled with N errors" no longer clears the error map.** The serving pattern was loosened to `webpack compiled (?:successfully|in)` so a build summary that includes errors does not transition the state to `serving` and wipe collected errors.
20
+
21
+ ### Added (M34) — Agent-first surface
22
+
23
+ - **A1 — `daimon focus <app>`.** New CLI / HTTP / MCP verb. One round-trip subscribe-then-act over `POST /api/apps/:name/focus?until=serving|healthy|stable[&timeoutMs=]` that streams NDJSON events: `{kind:"subscribed"|"status"|"health"|"error"|"done", …}`. `--until stable` resolves when the app is serving + healthy with no event for ≥5s. Designed so an agent issues one MCP call and reads a coherent narrative instead of polling. CLI exits when the stream ends; MCP `focus` aggregates events into `{events, final}`.
24
+ - **A2 — `diff_errors` MCP tool.** Wraps the existing F2 `errors --since-last --client <id>` HTTP endpoint as a dedicated MCP tool with a `budget` (token) cap; overflow rows are dropped and reported as `_meta.omitted`. Compact `{file,line,col,code,tool,message}` per entry.
25
+ - **A3 — `daimon try-fix <app>`.** New CLI / HTTP / MCP verb. `POST /api/apps/:name/try-fix?until=…` composes `runAutoFix` (permitted rules), `registry.restart(name)`, and `registry.waitFor(name, until)`, then returns `{before:{status,health,errCount,firstError}, after:{status,health,errCount}, fixed:[ruleName], stillFailing:[…first 5 parsed errors], reached, waitedMs}`. Never edits user source — only daemon state, exactly as the F58 rules already did.
26
+ - **A4 — `daimon overview --budget <tokens>`.** Both the HTTP endpoint and the CLI accept a token budget. Rows past the budget are dropped from `needsAttention` first, then `recentlyChanged`, with the counts reported as `_meta.omitted.{needsAttention,recentlyChanged}`. Makes the session-opener predictable for agents.
27
+ - **Test:** new `test/overview-budget.test.mjs` covers the truncation invariants (no-op under-budget, truncates over-budget, no-op on empty input).
28
+
29
+ ### Added (M35 partial) — Dashboard depth
30
+
31
+ - **H2 — Keyboard shortcuts realigned with the v0.6 spec.** `g e` now jumps to **Errors** (was Events; Events moved to `g v`). `g s` now jumps to **Settings** (alias of `/config`; the previous `g s` → Sessions moved to `g n`). The legacy `g r` → Errors and `g c` → Settings bindings remain as aliases for muscle memory. `r` (restart focused app) now requires a snack-bar confirm before firing, eliminating accidental restarts during keyboard navigation.
32
+ - **H4 — Logs page: regex filter + jump-to-next-error.** A `.* regex` toggle on the filter bar switches between substring and regex matching (case-insensitive). Invalid patterns surface inline (`mat-icon warning` + parser message) instead of throwing. A `Next error` button scrolls the virtual viewport to the next `severity === 'error'` row from the current visible end, wrapping to the top.
33
+ - **H5 — Per-app event ribbon.** Each card on `Apps` gains a 6px ribbon between the workspace-tone accent and the status row, showing the last 60 minutes of status events as 20 colored buckets (primary tint = serving, error = error, tertiary = compiling/starting, outline-variant = stopped). Hover shows a `last 60 min: 5 serving · 2 error` summary. Empty for apps with no recent transitions.
34
+
35
+ ### Deferred (M35 → v0.6.1)
36
+
37
+ - **H1 — Vitest + Playwright dashboard tests.** Adds non-trivial dev-deps (Vitest + Playwright + Angular bridge config), a fixture-daemon harness, and per-component specs. Out of scope for the v0.6.0 weekend; will land in v0.6.1.
38
+ - **H3 — WCAG AA contrast audit.** Needs visual inspection across all M3 tonal surfaces under light + dark + reduced-motion. Pushed to v0.6.1 alongside H1; reduced-motion path from M30 is already verified.
39
+
40
+ ### Fixed (M35 follow-up) — Initial-route bundle back under budget
41
+
42
+ - **Initial-route gzip transfer: 126.01 KB** (down from 151 KB at v0.5 HEAD; well under the 130 KB v0.6 ceiling). Achieved with three surgical lazy-loads, no functional change:
43
+ - `MatDialog` import is now dynamic — the keyboard `?` help dialog imports `@angular/material/dialog` only when triggered.
44
+ - `<dm-command-palette>` is wrapped in `@defer (when paletteActivated())`; the palette mounts on first `Ctrl/⌘+K`, and the activation handler re-dispatches the `daimon:cmdk` event so the user only presses the chord once.
45
+ - `MatMenu`-based dropdowns in `dm-topbar` and `dm-theme-toggle` are replaced with native-button + `@if` popovers (`HostListener('document:click')` for outside-click close). Removes `MatMenuModule` + CDK overlay/portal from the initial chunk.
46
+ - `MatSnackBar` is no longer eager in `dm-topbar`; `runProfile()` now uses a small inline DOM toast (positioned via `mat-sys-inverse-surface` tokens to stay in M3). The apps-list (route-lazy) keeps `MatSnackBar` for the `r` restart confirm — that import lives in its own lazy chunk.
47
+ - Bundle structure delta: `MatDialog`/`MatMenu`/`MatSnackBar`/Overlay+Portal moved out of eager into either a deferred chunk or are absent. No functional regression: the help dialog still opens on `?`, the palette still opens on `⌘K`, the workspace + profile dropdowns still work, and the runProfile toast still appears.
48
+
49
+ ### Added (M36) — Auto-heal expansion
50
+
51
+ - **E1 — Health-probe path auto-discovery.** On first `serving` (when there is no `overrides.<name>.url`, no `overrides.<name>.healthProbePath`, and the global `healthProbe.path` is the default `/`), the monitor runs one in-flight scan against `['/', '/health', '/-/health', '/api/health', '/ready', '/healthz']`, taking the first strictly-2xx response. The discovered path is stored on `AppState.discoveredHealthPath` and an event is recorded: `discovered probe path: /health (pin via POST /api/apps/<name>/health/pin or daimon pin-health <name> --accept)`. The discovery is used by subsequent probes immediately, but **persistence is opt-in** — nothing is written to `daimon.config.json` until the user accepts.
52
+ - **`daimon pin-health <name> [--accept] [--path <p>]` + `POST /api/apps/:name/health/pin`.** Without `--accept` the CLI just reports the discovered candidate; with `--accept` it writes `overrides.<name>.healthProbePath` to the active `daimon.config.json` and triggers soft-reload. `AppOverride.healthProbePath` is a new optional field; v0.5 configs continue to load unchanged.
53
+ - **E2 — Four new doctor rules** added to `daimon doctor --auto-fix`:
54
+ - `port-conflict-pred` — predicts which configured `portRange` endpoints + pinned ports are already in LISTEN. Reports only; no kill.
55
+ - `node-version-mismatch` — compares `.nvmrc` then `package.json#engines.node` against `process.versions.node`. Reports only; switching Node versions stays a user action.
56
+ - `orphan-node-modules` — flags `searchRoots` whose `package.json` exists but `node_modules` is missing, or older than `package-lock.json` / `pnpm-lock.yaml` / `yarn.lock`. Per locked decision in PLAN-v0.6.md, daimon **never runs npm/pnpm/yarn install** — the rule emits a `would suggest: (cd ... && npm install)` paragraph instead.
57
+ - `dead-search-root` — finds `searchRoots` that no longer resolve on disk and removes them from the config file (with a soft-reload), printing a `to undo: re-add` paragraph.
58
+ - All four rules are added to `ALL_AUTO_FIX` and to the default `doctor.autoFix.permitted` list. v0.5 configs whose `permitted` list is shorter are honored as-is — the new rules just don't activate for them.
59
+ - **Test:** `test/autofix-rules.test.mjs` asserts the new rule names are present in `ALL_AUTO_FIX` and the original M28 rules are still listed (backwards-compat smoke).
60
+
61
+ ## [0.5.0] — 2026-05-19
62
+
63
+ Strategic theme: **Claude path first. Dashboard second. Auto-heal everywhere.**
64
+
65
+ ### Added (M26)
66
+
67
+ - **F54 — Compact-by-default JSON.** `daimon list`, `daimon status`, and `daimon errors` (plus the matching HTTP endpoints and MCP tools) now return compact rows by default. A 10-app `daimon list` drops from ~74 lines to ~10. Compact list = `{name,status,port,health,errCount,lastChangeMs}`. Compact status = `{name,status,port,url,health,errCount,lastChangeMs,uptime,_meta:{format:"compact"}}`. Compact errors = `{file,line,col,code,message}`. `lastChangeMs` is derived from the existing event buffer.
68
+ - **F53/F63 — One skill replaces eleven.** `daimon claude install` writes a single `~/.claude/skills/daimon/SKILL.md` that documents every verb inline (~120 useful tokens). Per-command `daimon-*.md` files in `~/.claude/commands/` are removed on install (or renamed to `.bak` when the file's mtime indicates user edits since the manifest's `installed-at`). Removal/backup events are printed as one JSON line each (`{"removed":...}` / `{"warning":...}`) and recorded in the manifest.
69
+
70
+ ### Added (M27)
71
+
72
+ - **F55 — `daimon ensure` and `daimon ensure-up`.** One CLI/HTTP/MCP call replaces the canonical `list → status → start → wait → status` sequence. Idempotent on already-terminal apps. Honors `--until serving|healthy` and `--timeout`. `ensure-up <profile>` cascade-starts every app in the profile and waits for each to reach the target. On timeout the response is `{error:"timeout", state, _meta:{timedOut:true}}` and the CLI exits 2.
73
+ - **F56 — `daimon overview`.** Decision-ready snapshot in one call: totals (serving / error / stopped / total err / cpu / mem), `byStatus` map, `needsAttention` with the first parsed TS error per failing app, last 5 status transitions in the past 5 minutes. Filterable by `--workspace` and `--profile`. MCP `overview` is documented as the recommended first call in a session.
74
+ - **F62 — NDJSON `--stream`.** `daimon list --stream` and `daimon events --stream` emit one JSON object per line. The list stream is one-shot. The events stream is long-lived: historical events flush first, then each newly-recorded event arrives on its own line. 30-second newline keepalives keep the connection alive on quiet workspaces. The registry emits a new `event` signal for in-process subscribers.
75
+
76
+ ### Added (M28)
77
+
78
+ - **F58 — `daimon doctor --auto-fix [--dry-run]`.** Four rule-based, transparent repair routines that operate **only on daimon's own state** — never user source:
79
+ - `orphan-daemon` — daemon's recorded cwd/configPath differs from the current shell's cwd and a local `daimon.config.json` exists here; snapshot-handoff-shuts-down-respawn from the new cwd.
80
+ - `stale-lock` — lock file claims a pid that's dead; remove + spawn fresh.
81
+ - `missing-search-root` — cwd has nx/angular/vite/storybook markers but no configured searchRoot covers it; append (with `package.json` `name` as label when available) and trigger F39 soft-reload.
82
+ - `corrupt-history-db` — `quickCheck()` fails or open throws; rotate to `history.db.corrupt-<ts>` (and its `-wal` / `-shm` siblings) so a fresh DB is rebuilt on next start.
83
+ Each routine returns a paragraph describing what was wrong, what was done, and how to undo. Gated by `config.doctor.autoFix.permitted`.
84
+ - **F57 — Self-explaining discovery.** `daimon list --explain` (alias: `daimon why-empty`) wraps the response as `{ apps, _meta:{ searchRoots, scanned, rejected:{reason:count}, warnings, suggestion } }`. `discoverApps` now accepts an optional stats collector that gets bumped at every concrete skip (`searchRoot missing`, `no serve target`, `duplicate name`, `no project markers`, …). New HTTP endpoint `GET /api/discovery/explain` returns the same `_meta`. The non-`--explain` default still returns a bare array, preserving the M26 contract.
85
+ - **F59 — `daimon init --auto` + smoke test.** `daimon init --auto` writes a config without prompting (cwd auto-added as searchRoot, labeled from `package.json` `name` when present). All init paths now run a discovery smoke test after the post-init daemon restart and emit `{init:"ok", configPath, discovered:{apps, byKind}}`. When `apps === 0`, the response embeds the F57 `_meta` and a copy-pasteable suggestion.
86
+ - **F65 — HTTPS-cert tolerance on loopback.** Health probes against `127.0.0.1` / `::1` / `localhost` over HTTPS now always pass `rejectUnauthorized: false`, so Vite dev servers using mkcert or auto-generated self-signed certs no longer fail with `UNABLE_TO_VERIFY_LEAF_SIGNATURE`. Off-loopback hosts still get strict cert checks unless `healthProbe.rejectUnauthorized` is explicitly relaxed.
87
+
88
+ ### Added (M29) — Angular 20 dashboard
89
+
90
+ - **F60 — Sibling `dashboard/` workspace** (Angular 20 standalone, zoneless, Signals, Material 3). Components: root toolbar, apps-list (overview card + per-app cards), app-detail (status + errors + metrics chart), `daimon-api` typed HTTP store backed by signals with an NDJSON `/api/events?stream=ndjson` subscription.
91
+ - **Bundled SPA in the published tarball.** `dist/dashboard/browser/` ships in the published `daimon` npm package. Initial-route bundle: **426 KB raw / 111 KB transfer-gzip.** App-detail (chart.js): **211 KB raw / 63 KB transfer**, lazy-loaded. Errors panel: 23 KB raw lazy. The daemon serves the bundle at `/` with correct MIME types, 1h `cache-control` on hashed assets, SPA-fallback to `index.html` for non-API routes. Fonts (Roboto, Material Symbols Outlined) load from `fonts.gstatic.com`; this is an explicit project choice to keep the bundle slim, not telemetry. **Legacy `src/dashboard.html` is removed** — the Angular bundle is now the only dashboard the daemon serves.
92
+
93
+ ### Added (M30) — Dashboard polish
94
+
95
+ - **F64 — Per-app actions** (start / stop / restart / open) on each card and in the detail panel.
96
+ - **F67 — Workspace tones.** `workspace-tone.ts` derives a deterministic Material 3 surface-tonal color from each workspace label string (FNV-1a hash → oklch hue), used as a 4px top accent on each card.
97
+ - **F61 — Errors panel + real-time CPU/RAM charts.** `dm-errors-panel` aggregates dedup'd errors across every app with a `vscode://` link per file. `dm-metrics-chart` renders a chart.js line chart of CPU% + Mem MB over the last 5 minutes per app (5-second polling, last 60 samples). Chart.js is now a direct dep, lazy-loaded via the `app-detail` route so it never appears in the initial bundle.
98
+ - **F70 — Material motion polish.** Material 3 motion tokens (`--dm-motion-easing`, `--dm-motion-short/medium`) drive transitions on card hover (translate + elevation), route enter (fade-up), and card mount (fade + scale). `@media (prefers-reduced-motion: reduce)` collapses all animations to ~instant.
99
+ - **Theme toggle** (auto / light / dark) persisted in `localStorage`, applied via `color-scheme` on the document root.
100
+
101
+ ### Added (M32) — Dashboard final polish
102
+
103
+ - **Settings → Discovery** now renders `searchRoots` (Array&lt;{path,label}&gt;) as one editable row per entry instead of a useless `[object Object]` chip. New `path-objects` field kind in the form editor.
104
+ - **Doctor → System Overview** shows the live daemon version (`/api/overview` now returns `version`).
105
+ - **Errors page** auto-collapses the file column when no error in a group has a file path, replaces `(unknown)` with a dimmed `—`, and surfaces a one-line hint with a switch-to-group-by-app shortcut.
106
+ - **Events page** type-chips no longer wrap to two lines for long event kinds (`compile-regression`).
107
+ - **Material 3 density** set to `-2` and global overrides tighten slide-toggle, button-toggle, form-field, expansion-panel-header, and in-button icon sizes so the dashboard feels like a dev tool, not an app launcher.
108
+ - **Global `mat-icon` fontSet** defaults to `material-symbols-outlined`, fixing leftover icons that previously rendered their ligature name as text (`se Dry-run`, `bu Fix`).
109
+
110
+ ### Fixed (M32)
111
+
112
+ - **Error parser back-fills file paths.** Esbuild prints `path:line:col:` on the indented line *after* `✘ [ERROR] TSnnn: …`. The parser now matches that bare-location line and attaches it to the most-recent error entry that lacks a file. Errors emitted by the Angular esbuild plugin now click through to VS Code at the right line.
113
+ - **`/api/doctor/auto-fix` endpoint** added (was 404 from the dashboard despite the CLI command working).
114
+
115
+ ### Added (M31) — Polish CLI features
116
+
117
+ - **F66 — `daimon why-empty`** shipped early in M28 as an alias of `daimon list --explain`.
118
+ - **F68 — Agent token footprint in `daimon doctor`.** A new check prints `skill=120 tokens · daimon list (N apps) ≈ X compact / Y full · savings: ~Z%`. Deterministic from current app count, no remote calls.
119
+ - **F69 — `daimon export-config [--redacted]`.** Emits the active config to stdout. `--redacted` replaces `apiToken` with `"<redacted>"` and rewrites paths under `$HOME` to `~/...`. Intended for paste into GitHub issues.
120
+ - **`daimon discover [--dry-run]`** (sub-feature of F57). New CLI subcommand that returns the F57 `_meta` (searchRoots, scanned, rejected per folder, suggestion) without changing daemon state. Reuses `GET /api/discovery/explain`.
121
+
122
+ ### Changed (M26, breaking)
123
+
124
+ - `/api/apps` and `/api/apps/:name` now return the compact shape by default (see F54 above). Pass `?format=full` (HTTP) or `--full` (CLI) for the v0.4 verbose shape. **External automation that parsed `daimon list` or `daimon status` must add `--full` or migrate to the compact field names** (`errorCount` → `errCount`, `uptimeMs` → `uptime`, new `lastChangeMs`). The dashboard is unchanged because it now requests `?format=full` explicitly.
125
+ - `LockInfo` gained optional `cwd` and `configPath` fields so auto-fix can identify orphan daemons without poking `/proc`. Old daemons that wrote the v0.4 lock shape continue to work — the fields are optional.
126
+
127
+ ### Schema additions (all optional, safe defaults)
128
+
129
+ - `output: { format: "compact" | "full" (default "compact"), ndjson: false }`
130
+ - `doctor: { autoFix: { onInit: false, permitted: ["orphan-daemon","stale-lock","missing-search-root","corrupt-history-db"] } }`
131
+ - `dashboard: { theme: "auto" | "light" | "dark", density: "comfortable" | "compact" }`
132
+ - `AppSummary.lastChangeMs?` — milliseconds since the last status transition
133
+
134
+ ### Tarball budget
135
+
136
+ The original v0.5 plan capped the published tarball at **200 KB packed** — written before Angular 20 + Material 3 were measured. With the full v0.5 surface shipped (Angular SPA, chart.js for metrics, Material motion, M31 polish CLI), `daimon-0.5.0.tgz` lands at **332 KB packed / 1.1 MB unpacked / 28 files**. The new agreed budget is **2 MB packed** to leave headroom for future dashboard work. Initial-route gzip transfer stays at ~111 KB; chart.js sits in the lazy app-detail chunk and only loads when a user opens an app.
137
+
138
+ ### Deferred (v0.6+ or never)
139
+
140
+ - **Dashboard unit tests** — no Angular `*.spec.ts` files yet; the plan deferred them to M31 polish but they were not written this round.
141
+ - **Local-bundled fonts** — `fonts.gstatic.com` remains the source for Roboto + Material Symbols Outlined. Bundling locally would add ~150 KB raw to the initial chunk; the CDN approach is the explicit project choice.
142
+
143
+ ## [0.4.3] — 2026-05-18
144
+
145
+ ### Fixed
146
+ - `daimon init` now auto-restarts the daemon at the end so the new config is actually loaded. Previously, if a daemon was already running when init was invoked, the new `daimon.config.json` was silently ignored (the daemon's config path is locked at startup), causing `daimon list` to return `[]` immediately after init. State is preserved across the restart via the existing zero-downtime snapshot mechanism.
147
+
148
+ ## [0.4.2] — 2026-05-17
149
+
150
+ ### Changed (first npm publish)
151
+ - **License changed from MIT to PolyForm Noncommercial 1.0.0.** Free for personal, academic, and noncommercial-organization use; commercial use requires a separate license. The MIT-licensed history remains in git for anyone who obtained it before this change.
152
+ - **Renamed from `appman` to `daimon`.** Binary, package, environment variables (`APPMAN_*` → `DAIMON_*`), config file (`appman.config.json` → `daimon.config.json`), state directory (`~/.appman/` → `~/.daimon/`), and Claude integration paths (`~/.claude/skills/appman/` → `~/.claude/skills/daimon/`) all changed. No automated migration — first OSS release does not have prior public users.
153
+ - **Published builds are bundled and minified.** `npm i -g daimon` ships a single bundled+minified `.js` per entry point (cli / main / mcp). The TypeScript source remains in the GitHub repo for review.
154
+
155
+ ### Added (M25)
156
+ - Live log stream via Server-Sent Events on the dashboard
157
+ - `~/.daimon/secrets.json` with `${NAME}` substitution in `overrides.env`
158
+ - Zero-downtime daemon restart via state handoff
159
+ - Audit log of dashboard config edits at `~/.daimon/audit.log`
160
+ - Workspace presets surfaced in the dashboard config editor
161
+
162
+ ## [0.4.1] — 2026-05-17
163
+
164
+ ### Added (M24)
165
+ - `searchRoots[*].label` for workspace grouping (F44)
166
+ - `daimon init` — interactive config scaffolder (F45)
167
+ - `daimon daemon install-service` — emits Windows/macOS/Linux service artifacts (F46)
168
+ - Crash report dumps to `~/.daimon/crashes/<ts>.txt` on daemon fatal (F47)
169
+
170
+ ## [0.4.0] — 2026-05-17
171
+
172
+ ### Added (M20–M23)
173
+ - **Global install** via `npm i -g`. New `daimon` command on PATH (F37).
174
+ - **Auto-spawn daemon** on first CLI/MCP call; lock file at `~/.daimon/daemon.lock` (F38).
175
+ - `daimon daemon start|stop|status|restart|attach` family + `--detach` / `--headless` flags.
176
+ - `daimon daemon attach` — HTTP-client TUI against a detached daemon (F38b).
177
+ - `daimon claude install|update|uninstall|status` — Claude Code integration installer with selectable skill / slash commands / subagent artifacts (F41).
178
+ - `src/cliSurface.ts` — single source of truth for CLI usage, MCP tool descriptions, and Claude templates.
179
+ - Auto-update nudge when installed Claude artifacts are older than current daimon version (throttled to 24h, silence with `DAIMON_NO_CLAUDE_NUDGE=1`).
180
+ - Dashboard configuration editor — per-app overrides + global config (F39). Soft reload on save without killing running children.
181
+ - Optional `apiToken` for mutating endpoints (F43). Loopback bind unchanged.
182
+ - Errors panel in the dashboard with expandable per-app drawer, structured `file:line` deep-links, and copy-to-clipboard (F40).
183
+ - Configurable editor URL scheme (`vscode`, `vscode-insiders`, `cursor`, custom) (F42).
184
+
185
+ ## [0.3.0] — 2026-05-16
186
+
187
+ ### Added (M11–M19)
188
+ - **Dependency graph + cascade restart** via `config.depends` (F18). `daimon up <profile>` topologically orders starts and waits for each level to reach `healthy`.
189
+ - **SQLite event/compile/task history** at `~/.daimon/history.db` with 30-day retention (F19). New `daimon history <name>` and `daimon why <name>` queries.
190
+ - **`daimon run <app> <task>`** — non-serve actions (test/build/lint) with the same capture/dedupe infra (F20).
191
+ - Desktop notifications on app error / unhealthy / stale / regression (F21). Throttled per-app-per-minute. Audit log to `~/.daimon/notifications.log`.
192
+ - Stale detector — flags apps that are `serving` but silent while sources change (F22).
193
+ - `daimon snapshot <name>` — write a state bundle for bug reports (F23).
194
+ - Headless mode (`--headless` flag or `config.headless: true`) (F24).
195
+ - TUI live config edit (`e` key on a selected app) (F25).
196
+ - Bundle size readout in summary + dashboard (F26).
197
+ - Port-in-use diagnostics + `daimon free-port <port> [--force]` (F27).
198
+ - `daimon doctor` — config sanity checks (F28).
199
+ - Compile-time regression alarm (F29).
200
+ - `.env` file switcher per app (F30).
201
+ - `daimon clean <name> [--deep] [--yes]` — remove build artifacts (F31).
202
+ - Experimental: passive HTTP request log proxy (F32, off by default).
203
+ - Experimental: Prometheus exporter at `/metrics` (F33, off by default).
204
+ - Session record/replay (F34).
205
+ - VS Code companion extension (`daimon-vscode`, separate package) (F35).
206
+ - **Accurate health probe** — uses the URL the dev server announced, with HTTPS support, IPv6 brackets, 0.0.0.0 rewrite, fallback hosts, per-app overrides (F36). `summary.url` semantics changed: now reflects the resolved probe URL, not a synthetic loopback.
207
+
208
+ ## [0.2.0] — 2026-05-16
209
+
210
+ ### Added (M1–M10)
211
+ - `daimon wait <name> --until serving|healthy|stopped|error --timeout 60s` — blocking command for AI agents (F1).
212
+ - Diff-mode error queries: `--since 2m` and `--since-last --client <id>` (F2).
213
+ - Real HTTP health probe — separate `health` dimension from `status` (F3).
214
+ - `autoStart` config + `daimon up [<profile>]` / `daimon down` (F4).
215
+ - TUI `o` key opens app URL in default browser (F5).
216
+ - CPU / RAM per app via `pidusage` (F6).
217
+ - Structured TS error extraction (file, line, col, code) (F7).
218
+ - Full-screen log view in TUI with `/` search (F8).
219
+ - Persistent sticky ports across daemon restarts (F9).
220
+ - Per-app environment overrides (F10).
221
+ - Dashboard start/stop/restart buttons (F11).
222
+ - Crash auto-restart with exponential backoff (F12).
223
+ - Compile-time history sparkline in TUI and dashboard (F13).
224
+ - Project filtering by tag (F14).
225
+ - Disk log files with rotation (F15).
226
+ - MCP server for Claude Code (`daimon mcp`) (F16).
227
+ - Vite + Storybook discovery (F17).
228
+
229
+ ## [0.1.0] — 2026-05-16
230
+
231
+ Initial foundation. Foreground TUI, loopback HTTP API, JSON CLI, Nx + Angular workspace discovery, port auto-allocation, log dedup, error fingerprinting.