daimon 0.5.0 → 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 (58) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/cli.js +71 -67
  3. package/dist/dashboard/3rdpartylicenses.txt +4 -4
  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-HFJ25UTJ.js → chunk-7L4DWDGL.js} +4 -4
  7. package/dist/dashboard/browser/{chunk-C65CUT7O.js → chunk-BLNPJ4WD.js} +4 -4
  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-JX3IOOXU.js → chunk-L63FHXGH.js} +1 -1
  16. package/dist/dashboard/browser/{chunk-Q7R63OUT.js → chunk-LBRCWYRN.js} +1 -1
  17. package/dist/dashboard/browser/chunk-MHOSWLRR.js +3 -0
  18. package/dist/dashboard/browser/{chunk-TSB6OOH2.js → chunk-N5GRSTMJ.js} +1 -1
  19. package/dist/dashboard/browser/{chunk-AEERNAF7.js → chunk-NDSAQ2HK.js} +1 -1
  20. package/dist/dashboard/browser/chunk-NN2YNLGP.js +3 -0
  21. package/dist/dashboard/browser/{chunk-3TYCIBMV.js → chunk-PJPGLT4T.js} +1 -1
  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-ZVU34B5S.js → chunk-UC3XMN2Y.js} +1 -1
  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-WJUGRIIZ.js +1 -0
  30. package/dist/dashboard/browser/{chunk-D4BFRQ63.js → chunk-WRBP4DQN.js} +4 -4
  31. package/dist/dashboard/browser/chunk-XUU4AY4M.js +2 -0
  32. package/dist/dashboard/browser/chunk-XYVF5I5T.js +1 -0
  33. package/dist/dashboard/browser/chunk-Y6B6X4Y6.js +2 -0
  34. package/dist/dashboard/browser/chunk-YNQPX5G6.js +1 -0
  35. package/dist/dashboard/browser/{chunk-SLQ2WBUA.js → chunk-YYAZGY5M.js} +1 -1
  36. package/dist/dashboard/browser/index.html +1 -1
  37. package/dist/dashboard/browser/main-ZADV4SOC.js +1 -0
  38. package/dist/main.js +48 -44
  39. package/dist/mcp.js +3 -2
  40. package/package.json +2 -2
  41. package/dist/dashboard/browser/chunk-5UAN6ETO.js +0 -1
  42. package/dist/dashboard/browser/chunk-AX3RJNG4.js +0 -1
  43. package/dist/dashboard/browser/chunk-BADBUP5C.js +0 -3
  44. package/dist/dashboard/browser/chunk-BF6RQFHS.js +0 -2
  45. package/dist/dashboard/browser/chunk-CNIZYK4A.js +0 -1
  46. package/dist/dashboard/browser/chunk-E235WGFQ.js +0 -3
  47. package/dist/dashboard/browser/chunk-F2EDJ6FT.js +0 -4
  48. package/dist/dashboard/browser/chunk-HFAARBWL.js +0 -1
  49. package/dist/dashboard/browser/chunk-LQNYSOSZ.js +0 -1
  50. package/dist/dashboard/browser/chunk-MBVVV35N.js +0 -1
  51. package/dist/dashboard/browser/chunk-NC2VPB4Y.js +0 -2
  52. package/dist/dashboard/browser/chunk-NXNVIINH.js +0 -1
  53. package/dist/dashboard/browser/chunk-QLKOKZDG.js +0 -9
  54. package/dist/dashboard/browser/chunk-QQSPJIPQ.js +0 -1
  55. package/dist/dashboard/browser/chunk-SCAIGUJL.js +0 -6
  56. package/dist/dashboard/browser/chunk-WWUKM5OG.js +0 -1
  57. package/dist/dashboard/browser/chunk-ZYE3XQS4.js +0 -2
  58. package/dist/dashboard/browser/main-Z6L5VPBT.js +0 -4
package/CHANGELOG.md CHANGED
@@ -4,6 +4,60 @@ All notable changes to Daimon are documented here. The format follows [Keep a Ch
4
4
 
5
5
  ## [Unreleased]
6
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
+
7
61
  ## [0.5.0] — 2026-05-19
8
62
 
9
63
  Strategic theme: **Claude path first. Dashboard second. Auto-heal everywhere.**