claude-code-session-manager 0.55.0 → 0.55.1

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/dist/index.html CHANGED
@@ -7,7 +7,7 @@
7
7
  <link rel="preconnect" href="https://fonts.googleapis.com">
8
8
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
9
  <link href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Geist:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap" rel="stylesheet">
10
- <script type="module" crossorigin src="./assets/index-Bh-XKC4X.js"></script>
10
+ <script type="module" crossorigin src="./assets/index-tW8C4h-7.js"></script>
11
11
  <link rel="modulepreload" crossorigin href="./assets/monaco-editor-BW5C4Iv1.js">
12
12
  <link rel="stylesheet" crossorigin href="./assets/monaco-editor-BTnBOi8r.css">
13
13
  <link rel="stylesheet" crossorigin href="./assets/index-CMQ3X1Y6.css">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-session-manager",
3
- "version": "0.55.0",
3
+ "version": "0.55.1",
4
4
  "description": "Local cockpit for the Claude Code CLI — multi-tab terminal, full config surface, scheduler, voice dictation, and live observability.",
5
5
  "type": "module",
6
6
  "main": "src/main/index.cjs",
@@ -33,6 +33,7 @@ const chatRunner = require('./chatRunner.cjs');
33
33
  const promptSessionEvents = require('./promptSessionEvents.cjs');
34
34
  const activeIndexMerge = require('./lib/activeIndexMerge.cjs');
35
35
  const agentLibrary = require('./agentLibrary.cjs');
36
+ const { sendIfAlive } = require('./lib/sendToRenderer.cjs');
36
37
  const { resolveBuildTarget } = require('./lib/buildTarget.cjs');
37
38
  const adminHttp = createAdminHttp();
38
39
  scheduler.registerAdminRoutes(adminHttp);
@@ -457,10 +458,29 @@ ipcMain.handle('agents:list-personas', () => agentLibrary.listPersonas());
457
458
  // Agent Library CRUD — global personas only (`~/.claude/agents/*.md`); a
458
459
  // project's local overlay can only be removed here (removeOverride), never
459
460
  // created, since Agent Library is a Home-face, machine-wide surface with no
460
- // per-tab cwd context of its own.
461
- ipcMain.handle('agents:save-persona', (_e, payload) => agentLibrary.savePersona(payload));
462
- ipcMain.handle('agents:delete-persona', (_e, payload) => agentLibrary.deletePersona(payload));
463
- ipcMain.handle('agents:remove-override', (_e, payload) => agentLibrary.removeOverride(payload));
461
+ // per-tab cwd context of its own. Each mutation broadcasts `agents:changed`
462
+ // so Agent Library and Tag Library — two independently-mounted dockview
463
+ // panels, each with its own component-local `listPersonas()` snapshot —
464
+ // both refresh off the one file on disk instead of one panel going stale
465
+ // after the other edits the agent<->tag relationship.
466
+ function broadcastAgentsChanged() {
467
+ sendIfAlive(mainWindow, 'agents:changed', {});
468
+ }
469
+ ipcMain.handle('agents:save-persona', async (_e, payload) => {
470
+ const result = await agentLibrary.savePersona(payload);
471
+ broadcastAgentsChanged();
472
+ return result;
473
+ });
474
+ ipcMain.handle('agents:delete-persona', async (_e, payload) => {
475
+ const result = await agentLibrary.deletePersona(payload);
476
+ broadcastAgentsChanged();
477
+ return result;
478
+ });
479
+ ipcMain.handle('agents:remove-override', async (_e, payload) => {
480
+ const result = await agentLibrary.removeOverride(payload);
481
+ broadcastAgentsChanged();
482
+ return result;
483
+ });
464
484
 
465
485
  ipcMain.handle('app:engage-rules-path', () => process.env.SESSION_MANAGER_ENGAGE_RULES || null);
466
486
 
@@ -1349,6 +1349,8 @@ export interface SessionManagerAPI {
1349
1349
  savePersona: (payload: AgentPersonaSaveInput) => Promise<{ ok: boolean; path: string }>;
1350
1350
  deletePersona: (payload: { name: string }) => Promise<{ ok: boolean }>;
1351
1351
  removeOverride: (payload: { name: string; projectName: string }) => Promise<{ ok: boolean }>;
1352
+ /** Fires after any save/delete/removeOverride — subscribers should re-fetch listPersonas(). */
1353
+ onChanged: (handler: () => void) => () => void;
1352
1354
  };
1353
1355
  logs: {
1354
1356
  write: (
@@ -151,6 +151,13 @@ contextBridge.exposeInMainWorld('api', {
151
151
  savePersona: (payload) => ipcRenderer.invoke('agents:save-persona', payload),
152
152
  deletePersona: (payload) => ipcRenderer.invoke('agents:delete-persona', payload),
153
153
  removeOverride: (payload) => ipcRenderer.invoke('agents:remove-override', payload),
154
+ // Fired after any save/delete/removeOverride so every mounted
155
+ // subscriber (Agent Library, Tag Library) re-fetches the same file.
156
+ onChanged: (handler) => {
157
+ const listener = () => handler();
158
+ ipcRenderer.on('agents:changed', listener);
159
+ return () => ipcRenderer.removeListener('agents:changed', listener);
160
+ },
154
161
  },
155
162
  logs: {
156
163
  // ctx is optional: { cwd, tabId, epicId, tags } — when present and