@phenx-inc/ctlsurf 0.17.2 → 0.17.3

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 (51) hide show
  1. package/README.md +25 -2
  2. package/out/headless/index.mjs +1033 -128
  3. package/out/headless/index.mjs.map +4 -4
  4. package/out/main/index.js +929 -17
  5. package/out/preload/index.js +15 -0
  6. package/out/renderer/assets/{cssMode-BtQxI2Eb.js → cssMode-BJfoToLX.js} +3 -3
  7. package/out/renderer/assets/{freemarker2-DRW5dmY5.js → freemarker2-T0eMtP1Z.js} +1 -1
  8. package/out/renderer/assets/{handlebars-CFLF3cP7.js → handlebars-Dbbib8fi.js} +1 -1
  9. package/out/renderer/assets/{html-DtnBOkwp.js → html-BRHT_oxc.js} +1 -1
  10. package/out/renderer/assets/{htmlMode-DMVysDCg.js → htmlMode-BRlZTxME.js} +3 -3
  11. package/out/renderer/assets/{index-CEjwKjtd.css → index-CBWAeUYW.css} +91 -0
  12. package/out/renderer/assets/{index-Dm70hk5s.js → index-RCAeuJTr.js} +476 -411
  13. package/out/renderer/assets/{javascript-ChlyA1sf.js → javascript-BbOZOxq9.js} +2 -2
  14. package/out/renderer/assets/{jsonMode-D1_oHzeN.js → jsonMode-CUvAeYcT.js} +3 -3
  15. package/out/renderer/assets/{liquid-D4ftdy1G.js → liquid-DRIACo_s.js} +1 -1
  16. package/out/renderer/assets/{lspLanguageFeatures-Ckqu5ubG.js → lspLanguageFeatures-Ds-3nH9p.js} +1 -1
  17. package/out/renderer/assets/{mdx-B9wsVYSC.js → mdx-D76jlpLO.js} +1 -1
  18. package/out/renderer/assets/{python-e23tD6IS.js → python-CMuRPKJi.js} +1 -1
  19. package/out/renderer/assets/{razor-CrDyXj3d.js → razor-DRoH5mal.js} +1 -1
  20. package/out/renderer/assets/{tsMode-BwGC5o4O.js → tsMode-dPJzgFD7.js} +1 -1
  21. package/out/renderer/assets/{typescript-Do-98d_O.js → typescript-D5USKnLj.js} +1 -1
  22. package/out/renderer/assets/{xml-Dpdu5R3m.js → xml-qYg1wt2P.js} +1 -1
  23. package/out/renderer/assets/{yaml-B0Zt7LCJ.js → yaml-Uc-CvnvL.js} +1 -1
  24. package/out/renderer/index.html +2 -2
  25. package/package.json +4 -2
  26. package/scripts/check-work-map-gpu.cjs +62 -0
  27. package/scripts/check-work-map-gpu.d.cts +13 -0
  28. package/scripts/postinstall.cjs +15 -0
  29. package/scripts/prepare-work-map.py +37 -0
  30. package/scripts/test-work-map-capability.cjs +45 -0
  31. package/scripts/test-work-map-ui.cjs +130 -0
  32. package/scripts/test-work-map.cjs +352 -0
  33. package/scripts/work-map-clef.py +81 -0
  34. package/src/main/index.ts +35 -1
  35. package/src/main/observer/observer.ts +2 -0
  36. package/src/main/orchestrator.ts +39 -4
  37. package/src/main/transcripts.ts +35 -16
  38. package/src/main/workMap/clef.ts +156 -0
  39. package/src/main/workMap/normalize.ts +172 -0
  40. package/src/main/workMap/source.ts +28 -0
  41. package/src/main/workMap/tree.ts +199 -0
  42. package/src/main/workMap/workMap.ts +244 -0
  43. package/src/preload/index.ts +17 -0
  44. package/src/renderer/App.tsx +15 -16
  45. package/src/renderer/components/ObserverPanel.tsx +3 -0
  46. package/src/renderer/components/SettingsDialog.tsx +0 -104
  47. package/src/renderer/components/WorkMapPanel.tsx +235 -0
  48. package/src/renderer/components/WorkMapToggle.tsx +50 -0
  49. package/src/renderer/lib/workMapHighlights.ts +41 -0
  50. package/src/renderer/styles.css +91 -0
  51. package/src/shared/workMap.d.ts +70 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ctlsurf worker
2
2
 
3
- The terminal that remembers. Run Claude Code, Codex, or any coding agent inside it, and everything about the session lands in your [ctlsurf](https://ctlsurf.com) project automatically: live transcript, time attribution, tickets, and an observer digest. The agent does not have to cooperate, or even know.
3
+ The terminal that remembers. Run Claude Code, Codex, or any coding agent inside it, and everything about the session lands in your [ctlsurf](https://ctlsurf.com) project automatically: live transcript, time attribution, and tickets. The agent does not have to cooperate, or even know.
4
4
 
5
5
  ```bash
6
6
  npx @phenx-inc/ctlsurf
@@ -14,7 +14,6 @@ Works as a desktop app (macOS, Windows) or fully headless on a server.
14
14
  - **Watch and drive it from anywhere.** The session streams live to your project at [app.ctlsurf.com](https://app.ctlsurf.com); open a browser on another machine to watch the agent work, and type back into the session remotely.
15
15
  - **Automatic time tracking.** Each session becomes rows in the project's time-tracking datastore. The billing report reads straight from it.
16
16
  - **Tickets from the terminal.** File a ticket without leaving the session; it lands on a cross-project board.
17
- - **The Observer.** A supervision layer that tails the agent's transcript and the terminal's activity into an append-only local ledger, producing findings and time spans, with a session-end digest written to your project. Advisory only: every code path is wrapped so observation can never block or slow the working agent.
18
17
 
19
18
  ## Why outside-in recording
20
19
 
@@ -34,3 +33,27 @@ Docs: [ctlsurf.com/docs](https://ctlsurf.com/docs) · Free tier includes 1 conne
34
33
  ## Requirements
35
34
 
36
35
  Node.js 18+. A ctlsurf account (free tier works).
36
+
37
+ ## Development status
38
+
39
+ **Live work map.** Open **Work map** in the titlebar (Ctrl+Shift+M), choose **Clef-Flash · local** or **Rules · lightweight**, and turn the map on. One chronological thread combines stated choices, hypotheses, readable thinking, actions, and results. Choice cards show the selected excerpt and its stated reason; following actions remain underneath in the same thread. Collapsible groups keep the semantic topics while preserving event order when Clef updates their placement. Expanding a thinking card loads the complete readable source block on demand and highlights the selected choice and reason. Full source text stays out of live map snapshots. Scrolling up pauses following; **Follow latest** returns to the newest activity. Closing the pane hides it; its On/Off switch controls collection for all local tabs.
40
+
41
+ Work map is currently limited to the **desktop app on Apple Silicon Macs with an available Metal GPU**. npm installation performs a lightweight hardware check, without downloading or loading a model. Desktop startup checks the hardware again and verifies that Electron can access the Apple GPU. The option stays disabled during detection and on unsupported machines, including when saved preferences previously enabled it. GPU detection never blocks installation or other app features. The terminal/headless version does not start map collection or inference. HTTP and Cloudflare providers are not enabled in this release.
42
+
43
+ Claude Code's readable `thinking` blocks and Codex's public reasoning summaries (response items, completed reasoning items, and legacy `agent_reasoning` events) feed the same pipeline. Candidate segments come from the complete readable block before the source preview is shortened; Clef selects the important choice and a supporting reason, rather than only a type label. Public agent updates can also state decisions and are labelled as updates. The recent stated reasoning informs placement of following actions. Encrypted, redacted, or omitted reasoning is never treated as readable thinking. The panel reports when summaries are unavailable, rather than inferring private decisions from tool output. Some models/sessions omit readable summaries entirely. [Claude thinking format](https://platform.claude.com/docs/en/build-with-claude/thinking), [Codex reasoning summaries](https://learn.chatgpt.com/docs/app-server).
44
+
45
+ Clef-Flash suggests branch placement and activity types. Titles come from transcript text and tool inputs; execution status comes from linked runtime results. Unknown results remain unverified. This is a map of recorded activity, not a claim that the overall task succeeded. Maps stay in memory, retain at most 240 nodes per tab, and reset when the session is replaced or the app exits. The map does not upload transcripts or turn on Observer. Session discovery follows recent transcript files by agent and directory; it cannot reliably distinguish simultaneous independent agent processes in the same directory.
46
+
47
+ The local engine uses one shared, offline Python/MLX worker on Apple Silicon. It processes at most two events per request, caps input at 2,048 tokens, limits the pending queue to 24 events per tab, applies MLX allocation/cache limits, and unloads after 60 seconds idle or when mapping is turned off. A watchdog unloads a process exceeding 16 GiB RSS. These are resource guards, not a guarantee against system-wide memory pressure. Requests that fail leave the transcript-based map available and surface an error with a Retry control.
48
+
49
+ This checkout automatically reuses the local pilot's downloaded Clef-Flash runtime. On another Mac, install `uv` and prepare only Clef-Flash (approximately 11 GB of model weights):
50
+
51
+ ```sh
52
+ python3 scripts/prepare-work-map.py
53
+ ```
54
+
55
+ The script prints the Python executable and model folder for **Local model setup**. These paths can also be supplied with `CTLSURF_CLEF_PYTHON` and `CTLSURF_CLEF_MODEL` before launch. Selecting an engine or opening the pane does not download model files. Rules needs no model or Python installation.
56
+
57
+ Validation: `npm run test:workmap`, `npm run test:workmap:ui`. To also load the pilot's actual weights for one offline decision-extraction inference and unload check: `node scripts/test-work-map.cjs --real-clef`. Optional `--replay-claude /path/session.jsonl` and `--replay-codex /path/rollout.jsonl` replay local files and print only diagnostic counts, never transcript text.
58
+
59
+ **Observer — on hold.** Its supervision engine, IPC, saved settings and panel code are retained for future work. It is removed from the app's controls and Settings, and runtime is disabled in the orchestrator, including for previously enabled installations.