claude-code-session-manager 0.8.2 → 0.8.4

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 (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +66 -11
  3. package/dist/assets/{cssMode-30PYohIN.js → cssMode-SwUA7tV8.js} +1 -1
  4. package/dist/assets/{editor.main-CZ_l_CSt.js → editor.main-C0vxDQaJ.js} +3 -3
  5. package/dist/assets/{freemarker2-DA5xODSz.js → freemarker2-KX6gG2yg.js} +1 -1
  6. package/dist/assets/{handlebars-BgJKogMf.js → handlebars-B9LxZbcv.js} +1 -1
  7. package/dist/assets/{html-D3DAPwAR.js → html-B-8ZJyzc.js} +1 -1
  8. package/dist/assets/{htmlMode-mS5mzFjU.js → htmlMode-BrQu9A96.js} +1 -1
  9. package/dist/assets/index-CrdBAMX2.js +3044 -0
  10. package/dist/assets/index-DpbPBSiS.css +32 -0
  11. package/dist/assets/{javascript-CJ-Uxk_I.js → javascript-D3vhfNJL.js} +1 -1
  12. package/dist/assets/{jsonMode-DbcDRati.js → jsonMode-CCVQ7oTr.js} +1 -1
  13. package/dist/assets/{liquid-I4DHwPR_.js → liquid-DnwPncmC.js} +1 -1
  14. package/dist/assets/{lspLanguageFeatures-BntDl6Xn.js → lspLanguageFeatures-DrwXiqW0.js} +1 -1
  15. package/dist/assets/{mdx-DWI58irx.js → mdx-C6MKH-vG.js} +1 -1
  16. package/dist/assets/{python-DPx3c0QA.js → python-Dp1TzxJl.js} +1 -1
  17. package/dist/assets/{razor-BcxFqE_H.js → razor-KRJat9pO.js} +1 -1
  18. package/dist/assets/{tsMode-CGTi49DJ.js → tsMode-BZ-CF_4O.js} +1 -1
  19. package/dist/assets/{typescript-CE9RqBjC.js → typescript-CTLs4m8W.js} +1 -1
  20. package/dist/assets/{whisperWorker-ivwFFLMj.js → whisperWorker-QfIS0sPF.js} +5 -5
  21. package/dist/assets/{xml-DsrLAWcV.js → xml-DUE-XnsH.js} +1 -1
  22. package/dist/assets/{yaml-CA8rRsQI.js → yaml-DSuhPI0o.js} +1 -1
  23. package/dist/index.html +2 -2
  24. package/package.json +16 -1
  25. package/src/main/historyAggregator.cjs +208 -0
  26. package/src/main/index.cjs +4 -0
  27. package/src/main/ipcSchemas.cjs +15 -0
  28. package/src/main/lib/schedulerConfig.cjs +2 -0
  29. package/src/main/scheduler.cjs +551 -120
  30. package/src/main/supervisor.cjs +512 -0
  31. package/src/main/usage.cjs +44 -2
  32. package/src/preload/api.d.ts +59 -2
  33. package/src/preload/index.cjs +8 -0
  34. package/dist/assets/index-Bs-mHiD-.js +0 -2976
  35. package/dist/assets/index-DCK87t79.css +0 -32
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 bilkobibitkov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,32 +1,58 @@
1
1
  # claude-code-session-manager
2
2
 
3
- Local cockpit for Claude Code CLI sessions — terminal + full config surface. Runs as an Electron desktop app.
3
+ Local cockpit for Claude Code CLI — multi-tab terminal plus a full configuration and observability surface, running as an Electron desktop app.
4
4
 
5
5
  ## Usage
6
6
 
7
7
  ```bash
8
- npx claude-code-session-manager
8
+ npx claude-code-session-manager@latest
9
9
  ```
10
10
 
11
- The first run installs Electron (~200MB) and rebuilds `node-pty` against the bundled Electron runtime. Subsequent runs launch instantly from the npx cache.
11
+ First run installs Electron (~200 MB) and rebuilds `node-pty` against the bundled Electron runtime. Subsequent launches are instant from the npx cache.
12
12
 
13
13
  ## Supported platforms
14
14
 
15
15
  - Linux
16
16
  - macOS (requires Xcode Command Line Tools: `xcode-select --install`)
17
17
 
18
- Windows is not currently supported (node-pty backend differs).
18
+ Windows is not supported (different node-pty backend).
19
19
 
20
- ## What it does
20
+ ## Main features
21
21
 
22
- - Multi-tab Claude Code sessions, each with its own PTY
23
- - Live terminal + transcript inspector
24
- - Editing surfaces for `~/.claude/settings.json`, project `CLAUDE.md`, skills, agents, MCP servers
25
- - Per-session presets, persisted tab state, and a one-shot "reboot sessions" action
22
+ - **Multi-tab terminals.** Each tab owns its own PTY and Claude Code session. Tab id = `claudeSessionId`, so `--session-id` pass-through and JSONL transcript lookup line up automatically. Tabs persist across restarts.
23
+ - **Live transcript inspector.** Tails `~/.claude/projects/<encoded-cwd>/<sessionUuid>.jsonl` per tab and broadcasts events to the renderer in a ring buffer — no file reload, no polling.
24
+ - **Voice dictation.** Local-only Whisper + Silero VAD running in a Web Worker. No audio leaves the machine. Push-to-talk hotkey (window or global), continuous listening across turns, auto-submit with a configurable countdown, and barge-in that ducks TTS.
25
+ - **Scheduler / PRD queue.** Drop a PRD into `~/.claude/session-manager/scheduled-plans/prds/` and the scheduler runs it as a `claude -p` job. Modes: `manual`, `on-reset`, or `when-available` (the default — polls billing usage every 2 min, auto-pauses on rate-limit, auto-resumes at the next 5 h reset).
26
+ - **Engage presets.** Per-tab build/engage presets stored in `session-rules.json`, with a one-shot "reboot sessions" action that respects the active preset.
27
+ - **17 configuration and observability tabs:** Overview · Terminal · System Prompt · Agent-View · Settings · Permissions · Skills · Plugins · MCP Servers · Hooks · Subagents · Keybindings · Plans · Tasks · Projects · History · Usage.
28
+
29
+ ## Configuration surface
30
+
31
+ Edit-in-place for everything Claude Code reads, with atomic writes (tmp + rename) and per-path file-watcher refcounting:
32
+
33
+ - `~/.claude/settings.json` — Monaco editor with the official schemastore.org schema for validation and completion.
34
+ - `CLAUDE.md` files — project + global, with scope switcher.
35
+ - **Skills** — list/detail editor for `~/.claude/skills/*` and project-local skills.
36
+ - **Plugins** — installed plugin inventory and toggles.
37
+ - **MCP Servers** — `mcp.json` editor with status and reconnect.
38
+ - **Hooks** — definitions plus a "test fire" runner.
39
+ - **Subagents** — agent definitions with live invocation status.
40
+ - **Permissions** — allow/ask/deny per-tool, scoped at user / project / local.
41
+ - **Keybindings** — the `~/.claude/keybindings.json` editor with chord support.
42
+
43
+ ## Observability tabs
44
+
45
+ - **Plans** — current plan, in-flight tasks, decisions.
46
+ - **Tasks** — TaskCreate/Get/List feed, live.
47
+ - **Subagents** — running agents, their tools, output streams.
48
+ - **Agent-View** — assistant turn inspector tied to the active session.
49
+ - **History** — recent sessions, replayable transcripts.
50
+ - **Usage** — billing/usage from the undocumented `/api/oauth/usage` endpoint, with the active 5 h window.
51
+ - **Projects** — session inventory grouped by `cwd`.
26
52
 
27
53
  ## Optional: engage presets
28
54
 
29
- If you maintain a `session-rules.json` somewhere, point to it with an environment variable before launch:
55
+ If you maintain a `session-rules.json`, point to it before launch:
30
56
 
31
57
  ```bash
32
58
  SESSION_MANAGER_ENGAGE_RULES=/path/to/session-rules.json npx claude-code-session-manager
@@ -34,11 +60,40 @@ SESSION_MANAGER_ENGAGE_RULES=/path/to/session-rules.json npx claude-code-session
34
60
 
35
61
  Unset → no engage presets, no error.
36
62
 
63
+ ## Voice dictation details
64
+
65
+ - Local Whisper-based ASR via `@huggingface/transformers` + onnxruntime-web; Silero VAD via `@ricky0123/vad-web` for endpointing. No network round-trip after the first model download.
66
+ - **Continuous listening across turns.** Auto-submit fires Enter at the configured countdown (default 6 s) and the mic stays open — only true silence (default 30 s) or an explicit hotkey/button click closes it.
67
+ - **Push-to-talk** with hold or toggle modes; per-OS default hotkey, customizable in Keybindings.
68
+ - **Barge-in:** speaking while TTS plays cancels playback and raises the VAD threshold so self-talk doesn't retrigger.
69
+ - **First-run wizard** picks a mic, verifies a sample utterance, and persists the choice in `voice.json`.
70
+ - **Privacy invariant:** the recording-status pill is always visible at the top of the window whenever the mic is hot.
71
+
72
+ ## Scheduler details
73
+
74
+ - PRD format: `~/.claude/session-manager/scheduled-plans/prds/<NN>-<kebab-slug>.md`. Frontmatter `title`, absolute `cwd`, `estimateMinutes`. The `NN` prefix is the parallel group.
75
+ - The `/prd` slash command in Claude Code emits the canonical structure.
76
+ - Body is self-contained because `claude -p` runs without conversation context.
77
+ - Rate-limit handling: scheduler reads the same `/api/oauth/usage` endpoint the in-app `/usage` panel uses, with the OAuth token from `~/.claude/.credentials.json`.
78
+
79
+ ## Security model
80
+
81
+ - All filesystem paths in the main process go through `validatePath` against the user's home directory.
82
+ - `setWindowOpenHandler` denies all popups; `will-navigate` only allows the dev URL.
83
+ - IPC payloads are zod-validated at the main-process boundary (`ipcSchemas.cjs`).
84
+ - `child_process.spawn` is argv-only except for two narrowly-scoped places (the watchers feature and `app:test-fire-hook`) where a user-supplied shell string is part of the feature.
85
+
37
86
  ## Development
38
87
 
39
88
  ```bash
40
89
  git clone <repo>
41
90
  cd claude-code-session-manager
42
91
  npm install
43
- npm run dev
92
+ npm run dev # Vite + Electron with HMR (SM_DEV=1)
93
+ npm run typecheck # tsc --noEmit
94
+ npm run test:e2e # Playwright Electron under xvfb-run
44
95
  ```
96
+
97
+ ## License
98
+
99
+ MIT.
@@ -1 +1 @@
1
- import{c as h,l as s}from"./editor.main-CZ_l_CSt.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-BntDl6Xn.js";import{h as H,i as U,j as y,t as T,k as x}from"./lspLanguageFeatures-BntDl6Xn.js";import"./index-Bs-mHiD-.js";const C=120*1e3;class A{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>C&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL(""+new URL("css.worker-B4z49cGk.js",import.meta.url).href,import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function L(o){const n=[],e=[],a=new A(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,H as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,U as fromPosition,y as fromRange,L as setupMode,T as toRange,x as toTextEdit};
1
+ import{c as h,l as s}from"./editor.main-C0vxDQaJ.js";import{C as c,H as u,D as p,a as m,R as f,b as _,c as w,d as k,F as v,e as D,S as P,f as R,g as I}from"./lspLanguageFeatures-DrwXiqW0.js";import{h as H,i as U,j as y,t as T,k as x}from"./lspLanguageFeatures-DrwXiqW0.js";import"./index-CrdBAMX2.js";const C=120*1e3;class A{constructor(n){this._defaults=n,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>C&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=h({moduleId:"vs/language/css/cssWorker",createWorker:()=>new Worker(new URL(""+new URL("css.worker-B4z49cGk.js",import.meta.url).href,import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...n){let e;return this._getClient().then(a=>{e=a}).then(a=>{if(this._worker)return this._worker.withSyncedResources(n)}).then(a=>e)}}function L(o){const n=[],e=[],a=new A(o);n.push(a);const r=(...t)=>a.getLanguageServiceWorker(...t);function l(){const{languageId:t,modeConfiguration:i}=o;g(e),i.completionItems&&e.push(s.registerCompletionItemProvider(t,new c(r,["/","-",":"]))),i.hovers&&e.push(s.registerHoverProvider(t,new u(r))),i.documentHighlights&&e.push(s.registerDocumentHighlightProvider(t,new p(r))),i.definitions&&e.push(s.registerDefinitionProvider(t,new m(r))),i.references&&e.push(s.registerReferenceProvider(t,new f(r))),i.documentSymbols&&e.push(s.registerDocumentSymbolProvider(t,new _(r))),i.rename&&e.push(s.registerRenameProvider(t,new w(r))),i.colors&&e.push(s.registerColorProvider(t,new k(r))),i.foldingRanges&&e.push(s.registerFoldingRangeProvider(t,new v(r))),i.diagnostics&&e.push(new D(t,r,o.onDidChange)),i.selectionRanges&&e.push(s.registerSelectionRangeProvider(t,new P(r))),i.documentFormattingEdits&&e.push(s.registerDocumentFormattingEditProvider(t,new R(r))),i.documentRangeFormattingEdits&&e.push(s.registerDocumentRangeFormattingEditProvider(t,new I(r)))}return l(),n.push(d(e)),d(n)}function d(o){return{dispose:()=>g(o)}}function g(o){for(;o.length;)o.pop().dispose()}export{c as CompletionAdapter,m as DefinitionAdapter,D as DiagnosticsAdapter,k as DocumentColorAdapter,R as DocumentFormattingEditProvider,p as DocumentHighlightAdapter,H as DocumentLinkAdapter,I as DocumentRangeFormattingEditProvider,_ as DocumentSymbolAdapter,v as FoldingRangeAdapter,u as HoverAdapter,f as ReferenceAdapter,w as RenameAdapter,P as SelectionRangeAdapter,A as WorkerManager,U as fromPosition,y as fromRange,L as setupMode,T as toRange,x as toTextEdit};