claude-code-session-manager 0.31.0 → 0.32.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.
@@ -1129,6 +1129,12 @@ export interface SessionManagerAPI {
1129
1129
  ingest: () => Promise<{ ok: boolean; added?: number; projects?: number; stopped?: boolean; error?: string; note?: string }>;
1130
1130
  /** Ask a question answered from ONE project's graph + prompts via claude -p. */
1131
1131
  ask: (question: string, cwd?: string) => Promise<{ ok: boolean; answer?: string; cited?: { ts: string; prompt: string }[]; error?: string }>;
1132
+ /** Purge graphs: one project (`{ cwd }`) or all (`{ all: true }`). */
1133
+ clear: (arg?: { cwd?: string; all?: boolean }) => Promise<{ ok: boolean; cleared?: string; removed?: number }>;
1134
+ /** Toggle the recurring claude -p extraction on/off (sets captureMode 'llm'/'off'). */
1135
+ setExtraction: (enabled: boolean) => Promise<{ ok: boolean; extractionEnabled: boolean }>;
1136
+ /** Set capture mode: 'llm' = claude -p extraction; 'lite' = heuristic (free); 'off' = disabled. */
1137
+ setCaptureMode: (mode: 'llm' | 'lite' | 'off') => Promise<{ ok: boolean; captureMode?: string; error?: string }>;
1132
1138
  onIngestProgress: (handler: (ev: KgIngestProgress) => void) => () => void;
1133
1139
  };
1134
1140
  }
@@ -1179,6 +1185,11 @@ export interface KgState {
1179
1185
  lastIngest: string | null;
1180
1186
  ingesting: boolean;
1181
1187
  logPath: string;
1188
+ extractionEnabled: boolean;
1189
+ /** Active capture mode: 'llm' | 'lite' | 'off'. */
1190
+ captureMode: 'llm' | 'lite' | 'off';
1191
+ /** Node cap from kg-config.json; 0 = disabled; default 300. */
1192
+ maxGraphNodes: number;
1182
1193
  };
1183
1194
  }
1184
1195
  export interface KgIngestProgress {
@@ -326,6 +326,12 @@ contextBridge.exposeInMainWorld('api', {
326
326
  projects: () => ipcRenderer.invoke('kg:projects'),
327
327
  ingest: () => ipcRenderer.invoke('kg:ingest'),
328
328
  ask: (question, cwd) => ipcRenderer.invoke('kg:ask', { question, cwd }),
329
+ /** Purge graphs: one project (cwd) or all (`{ all: true }`). */
330
+ clear: (arg) => ipcRenderer.invoke('kg:clear', arg ?? {}),
331
+ /** Toggle the recurring `claude -p` extraction on/off. */
332
+ setExtraction: (enabled) => ipcRenderer.invoke('kg:set-extraction', { enabled }),
333
+ /** Set capture mode: 'llm' | 'lite' | 'off'. */
334
+ setCaptureMode: (mode) => ipcRenderer.invoke('kg:set-capture-mode', { mode }),
329
335
  onIngestProgress: (handler) => {
330
336
  const listener = (_e, payload) => handler(payload);
331
337
  ipcRenderer.on('kg:ingest-progress', listener);