@jacques-ai/server 0.0.7-alpha.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/config/config.d.ts +34 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +32 -0
- package/dist/config/config.js.map +1 -0
- package/dist/connection/applescript.d.ts +46 -0
- package/dist/connection/applescript.d.ts.map +1 -0
- package/dist/connection/applescript.js +62 -0
- package/dist/connection/applescript.js.map +1 -0
- package/dist/connection/applescript.test.d.ts +5 -0
- package/dist/connection/applescript.test.d.ts.map +1 -0
- package/dist/connection/applescript.test.js +64 -0
- package/dist/connection/applescript.test.js.map +1 -0
- package/dist/connection/constants.d.ts +88 -0
- package/dist/connection/constants.d.ts.map +1 -0
- package/dist/connection/constants.js +110 -0
- package/dist/connection/constants.js.map +1 -0
- package/dist/connection/git-info.d.ts +30 -0
- package/dist/connection/git-info.d.ts.map +1 -0
- package/dist/connection/git-info.js +52 -0
- package/dist/connection/git-info.js.map +1 -0
- package/dist/connection/git-info.test.d.ts +5 -0
- package/dist/connection/git-info.test.d.ts.map +1 -0
- package/dist/connection/git-info.test.js +35 -0
- package/dist/connection/git-info.test.js.map +1 -0
- package/dist/connection/index.d.ts +19 -0
- package/dist/connection/index.d.ts.map +1 -0
- package/dist/connection/index.js +36 -0
- package/dist/connection/index.js.map +1 -0
- package/dist/connection/process-detection.d.ts +58 -0
- package/dist/connection/process-detection.d.ts.map +1 -0
- package/dist/connection/process-detection.js +239 -0
- package/dist/connection/process-detection.js.map +1 -0
- package/dist/connection/process-detection.test.d.ts +5 -0
- package/dist/connection/process-detection.test.d.ts.map +1 -0
- package/dist/connection/process-detection.test.js +43 -0
- package/dist/connection/process-detection.test.js.map +1 -0
- package/dist/connection/session-discovery.d.ts +55 -0
- package/dist/connection/session-discovery.d.ts.map +1 -0
- package/dist/connection/session-discovery.js +311 -0
- package/dist/connection/session-discovery.js.map +1 -0
- package/dist/connection/terminal-key.d.ts +126 -0
- package/dist/connection/terminal-key.d.ts.map +1 -0
- package/dist/connection/terminal-key.js +271 -0
- package/dist/connection/terminal-key.js.map +1 -0
- package/dist/connection/terminal-key.test.d.ts +5 -0
- package/dist/connection/terminal-key.test.d.ts.map +1 -0
- package/dist/connection/terminal-key.test.js +221 -0
- package/dist/connection/terminal-key.test.js.map +1 -0
- package/dist/connection/worktree.d.ts +114 -0
- package/dist/connection/worktree.d.ts.map +1 -0
- package/dist/connection/worktree.js +320 -0
- package/dist/connection/worktree.js.map +1 -0
- package/dist/connection/worktree.test.d.ts +5 -0
- package/dist/connection/worktree.test.d.ts.map +1 -0
- package/dist/connection/worktree.test.js +113 -0
- package/dist/connection/worktree.test.js.map +1 -0
- package/dist/focus-watcher.d.ts +51 -0
- package/dist/focus-watcher.d.ts.map +1 -0
- package/dist/focus-watcher.js +169 -0
- package/dist/focus-watcher.js.map +1 -0
- package/dist/handlers/event-handler.d.ts +93 -0
- package/dist/handlers/event-handler.d.ts.map +1 -0
- package/dist/handlers/event-handler.js +196 -0
- package/dist/handlers/event-handler.js.map +1 -0
- package/dist/handlers/event-handler.test.d.ts +5 -0
- package/dist/handlers/event-handler.test.d.ts.map +1 -0
- package/dist/handlers/event-handler.test.js +305 -0
- package/dist/handlers/event-handler.test.js.map +1 -0
- package/dist/handlers/session-handler.d.ts +23 -0
- package/dist/handlers/session-handler.d.ts.map +1 -0
- package/dist/handlers/session-handler.js +104 -0
- package/dist/handlers/session-handler.js.map +1 -0
- package/dist/handlers/session-handler.test.d.ts +5 -0
- package/dist/handlers/session-handler.test.d.ts.map +1 -0
- package/dist/handlers/session-handler.test.js +89 -0
- package/dist/handlers/session-handler.test.js.map +1 -0
- package/dist/handlers/settings-handler.d.ts +32 -0
- package/dist/handlers/settings-handler.d.ts.map +1 -0
- package/dist/handlers/settings-handler.js +127 -0
- package/dist/handlers/settings-handler.js.map +1 -0
- package/dist/handlers/settings-handler.test.d.ts +5 -0
- package/dist/handlers/settings-handler.test.d.ts.map +1 -0
- package/dist/handlers/settings-handler.test.js +105 -0
- package/dist/handlers/settings-handler.test.js.map +1 -0
- package/dist/handlers/window-handler.d.ts +30 -0
- package/dist/handlers/window-handler.d.ts.map +1 -0
- package/dist/handlers/window-handler.js +486 -0
- package/dist/handlers/window-handler.js.map +1 -0
- package/dist/handlers/window-handler.test.d.ts +8 -0
- package/dist/handlers/window-handler.test.d.ts.map +1 -0
- package/dist/handlers/window-handler.test.js +167 -0
- package/dist/handlers/window-handler.test.js.map +1 -0
- package/dist/handlers/worktree-handler.d.ts +28 -0
- package/dist/handlers/worktree-handler.d.ts.map +1 -0
- package/dist/handlers/worktree-handler.js +268 -0
- package/dist/handlers/worktree-handler.js.map +1 -0
- package/dist/handlers/worktree-handler.test.d.ts +8 -0
- package/dist/handlers/worktree-handler.test.d.ts.map +1 -0
- package/dist/handlers/worktree-handler.test.js +118 -0
- package/dist/handlers/worktree-handler.test.js.map +1 -0
- package/dist/handlers/ws-utils.d.ts +12 -0
- package/dist/handlers/ws-utils.d.ts.map +1 -0
- package/dist/handlers/ws-utils.js +16 -0
- package/dist/handlers/ws-utils.js.map +1 -0
- package/dist/http-api.d.ts +26 -0
- package/dist/http-api.d.ts.map +1 -0
- package/dist/http-api.js +148 -0
- package/dist/http-api.js.map +1 -0
- package/dist/logger.d.ts +42 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +147 -0
- package/dist/logger.js.map +1 -0
- package/dist/logging/logger-factory.d.ts +51 -0
- package/dist/logging/logger-factory.d.ts.map +1 -0
- package/dist/logging/logger-factory.js +59 -0
- package/dist/logging/logger-factory.js.map +1 -0
- package/dist/mcp/search-tool.d.ts +65 -0
- package/dist/mcp/search-tool.d.ts.map +1 -0
- package/dist/mcp/search-tool.js +176 -0
- package/dist/mcp/search-tool.js.map +1 -0
- package/dist/mcp/server.d.ts +9 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +152 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/process-scanner.d.ts +96 -0
- package/dist/process-scanner.d.ts.map +1 -0
- package/dist/process-scanner.js +194 -0
- package/dist/process-scanner.js.map +1 -0
- package/dist/routes/__tests__/archive-routes.test.d.ts +5 -0
- package/dist/routes/__tests__/archive-routes.test.d.ts.map +1 -0
- package/dist/routes/__tests__/archive-routes.test.js +158 -0
- package/dist/routes/__tests__/archive-routes.test.js.map +1 -0
- package/dist/routes/__tests__/config-routes.test.d.ts +5 -0
- package/dist/routes/__tests__/config-routes.test.d.ts.map +1 -0
- package/dist/routes/__tests__/config-routes.test.js +112 -0
- package/dist/routes/__tests__/config-routes.test.js.map +1 -0
- package/dist/routes/__tests__/http-utils.test.d.ts +5 -0
- package/dist/routes/__tests__/http-utils.test.d.ts.map +1 -0
- package/dist/routes/__tests__/http-utils.test.js +102 -0
- package/dist/routes/__tests__/http-utils.test.js.map +1 -0
- package/dist/routes/__tests__/notification-routes.test.d.ts +5 -0
- package/dist/routes/__tests__/notification-routes.test.d.ts.map +1 -0
- package/dist/routes/__tests__/notification-routes.test.js +91 -0
- package/dist/routes/__tests__/notification-routes.test.js.map +1 -0
- package/dist/routes/__tests__/project-routes.test.d.ts +5 -0
- package/dist/routes/__tests__/project-routes.test.d.ts.map +1 -0
- package/dist/routes/__tests__/project-routes.test.js +168 -0
- package/dist/routes/__tests__/project-routes.test.js.map +1 -0
- package/dist/routes/__tests__/session-routes.test.d.ts +5 -0
- package/dist/routes/__tests__/session-routes.test.d.ts.map +1 -0
- package/dist/routes/__tests__/session-routes.test.js +198 -0
- package/dist/routes/__tests__/session-routes.test.js.map +1 -0
- package/dist/routes/__tests__/source-routes.test.d.ts +5 -0
- package/dist/routes/__tests__/source-routes.test.d.ts.map +1 -0
- package/dist/routes/__tests__/source-routes.test.js +142 -0
- package/dist/routes/__tests__/source-routes.test.js.map +1 -0
- package/dist/routes/__tests__/sync-routes.test.d.ts +5 -0
- package/dist/routes/__tests__/sync-routes.test.d.ts.map +1 -0
- package/dist/routes/__tests__/sync-routes.test.js +77 -0
- package/dist/routes/__tests__/sync-routes.test.js.map +1 -0
- package/dist/routes/__tests__/test-helpers.d.ts +47 -0
- package/dist/routes/__tests__/test-helpers.d.ts.map +1 -0
- package/dist/routes/__tests__/test-helpers.js +97 -0
- package/dist/routes/__tests__/test-helpers.js.map +1 -0
- package/dist/routes/archive-routes.d.ts +15 -0
- package/dist/routes/archive-routes.d.ts.map +1 -0
- package/dist/routes/archive-routes.js +181 -0
- package/dist/routes/archive-routes.js.map +1 -0
- package/dist/routes/claude-routes.d.ts +9 -0
- package/dist/routes/claude-routes.d.ts.map +1 -0
- package/dist/routes/claude-routes.js +47 -0
- package/dist/routes/claude-routes.js.map +1 -0
- package/dist/routes/config-routes.d.ts +9 -0
- package/dist/routes/config-routes.d.ts.map +1 -0
- package/dist/routes/config-routes.js +56 -0
- package/dist/routes/config-routes.js.map +1 -0
- package/dist/routes/config-store.d.ts +41 -0
- package/dist/routes/config-store.d.ts.map +1 -0
- package/dist/routes/config-store.js +52 -0
- package/dist/routes/config-store.js.map +1 -0
- package/dist/routes/http-utils.d.ts +32 -0
- package/dist/routes/http-utils.d.ts.map +1 -0
- package/dist/routes/http-utils.js +123 -0
- package/dist/routes/http-utils.js.map +1 -0
- package/dist/routes/index.d.ts +19 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +17 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/notification-routes.d.ts +10 -0
- package/dist/routes/notification-routes.d.ts.map +1 -0
- package/dist/routes/notification-routes.js +64 -0
- package/dist/routes/notification-routes.js.map +1 -0
- package/dist/routes/project-routes.d.ts +22 -0
- package/dist/routes/project-routes.d.ts.map +1 -0
- package/dist/routes/project-routes.js +415 -0
- package/dist/routes/project-routes.js.map +1 -0
- package/dist/routes/session-routes.d.ts +18 -0
- package/dist/routes/session-routes.d.ts.map +1 -0
- package/dist/routes/session-routes.js +609 -0
- package/dist/routes/session-routes.js.map +1 -0
- package/dist/routes/source-routes.d.ts +12 -0
- package/dist/routes/source-routes.d.ts.map +1 -0
- package/dist/routes/source-routes.js +119 -0
- package/dist/routes/source-routes.js.map +1 -0
- package/dist/routes/static-routes.d.ts +12 -0
- package/dist/routes/static-routes.d.ts.map +1 -0
- package/dist/routes/static-routes.js +52 -0
- package/dist/routes/static-routes.js.map +1 -0
- package/dist/routes/sync-routes.d.ts +9 -0
- package/dist/routes/sync-routes.d.ts.map +1 -0
- package/dist/routes/sync-routes.js +78 -0
- package/dist/routes/sync-routes.js.map +1 -0
- package/dist/routes/tile-routes.d.ts +10 -0
- package/dist/routes/tile-routes.d.ts.map +1 -0
- package/dist/routes/tile-routes.js +108 -0
- package/dist/routes/tile-routes.js.map +1 -0
- package/dist/routes/types.d.ts +17 -0
- package/dist/routes/types.d.ts.map +1 -0
- package/dist/routes/types.js +5 -0
- package/dist/routes/types.js.map +1 -0
- package/dist/routes/usage-routes.d.ts +8 -0
- package/dist/routes/usage-routes.d.ts.map +1 -0
- package/dist/routes/usage-routes.js +18 -0
- package/dist/routes/usage-routes.js.map +1 -0
- package/dist/server.d.ts +8 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +173 -0
- package/dist/server.js.map +1 -0
- package/dist/services/branch-divergence-service.d.ts +48 -0
- package/dist/services/branch-divergence-service.d.ts.map +1 -0
- package/dist/services/branch-divergence-service.js +156 -0
- package/dist/services/branch-divergence-service.js.map +1 -0
- package/dist/services/broadcast-service.d.ts +68 -0
- package/dist/services/broadcast-service.d.ts.map +1 -0
- package/dist/services/broadcast-service.js +78 -0
- package/dist/services/broadcast-service.js.map +1 -0
- package/dist/services/broadcast-service.test.d.ts +5 -0
- package/dist/services/broadcast-service.test.d.ts.map +1 -0
- package/dist/services/broadcast-service.test.js +130 -0
- package/dist/services/broadcast-service.test.js.map +1 -0
- package/dist/services/chat-service.d.ts +72 -0
- package/dist/services/chat-service.d.ts.map +1 -0
- package/dist/services/chat-service.js +342 -0
- package/dist/services/chat-service.js.map +1 -0
- package/dist/services/chat-system-prompt.d.ts +14 -0
- package/dist/services/chat-system-prompt.d.ts.map +1 -0
- package/dist/services/chat-system-prompt.js +68 -0
- package/dist/services/chat-system-prompt.js.map +1 -0
- package/dist/services/notification-service.d.ts +115 -0
- package/dist/services/notification-service.d.ts.map +1 -0
- package/dist/services/notification-service.js +424 -0
- package/dist/services/notification-service.js.map +1 -0
- package/dist/services/notification-service.test.d.ts +5 -0
- package/dist/services/notification-service.test.d.ts.map +1 -0
- package/dist/services/notification-service.test.js +918 -0
- package/dist/services/notification-service.test.js.map +1 -0
- package/dist/session/cleanup-service.d.ts +51 -0
- package/dist/session/cleanup-service.d.ts.map +1 -0
- package/dist/session/cleanup-service.js +98 -0
- package/dist/session/cleanup-service.js.map +1 -0
- package/dist/session/cleanup-service.test.d.ts +5 -0
- package/dist/session/cleanup-service.test.d.ts.map +1 -0
- package/dist/session/cleanup-service.test.js +121 -0
- package/dist/session/cleanup-service.test.js.map +1 -0
- package/dist/session/process-monitor.d.ts +79 -0
- package/dist/session/process-monitor.d.ts.map +1 -0
- package/dist/session/process-monitor.js +270 -0
- package/dist/session/process-monitor.js.map +1 -0
- package/dist/session/process-monitor.test.d.ts +5 -0
- package/dist/session/process-monitor.test.d.ts.map +1 -0
- package/dist/session/process-monitor.test.js +367 -0
- package/dist/session/process-monitor.test.js.map +1 -0
- package/dist/session/session-factory.d.ts +29 -0
- package/dist/session/session-factory.d.ts.map +1 -0
- package/dist/session/session-factory.js +123 -0
- package/dist/session/session-factory.js.map +1 -0
- package/dist/session/session-factory.test.d.ts +5 -0
- package/dist/session/session-factory.test.d.ts.map +1 -0
- package/dist/session/session-factory.test.js +299 -0
- package/dist/session/session-factory.test.js.map +1 -0
- package/dist/session-registry.d.ts +168 -0
- package/dist/session-registry.d.ts.map +1 -0
- package/dist/session-registry.js +626 -0
- package/dist/session-registry.js.map +1 -0
- package/dist/session-registry.test.d.ts +5 -0
- package/dist/session-registry.test.d.ts.map +1 -0
- package/dist/session-registry.test.js +582 -0
- package/dist/session-registry.test.js.map +1 -0
- package/dist/start-server.d.ts +31 -0
- package/dist/start-server.d.ts.map +1 -0
- package/dist/start-server.js +408 -0
- package/dist/start-server.js.map +1 -0
- package/dist/terminal-activator.d.ts +29 -0
- package/dist/terminal-activator.d.ts.map +1 -0
- package/dist/terminal-activator.js +264 -0
- package/dist/terminal-activator.js.map +1 -0
- package/dist/terminal-activator.test.d.ts +9 -0
- package/dist/terminal-activator.test.d.ts.map +1 -0
- package/dist/terminal-activator.test.js +95 -0
- package/dist/terminal-activator.test.js.map +1 -0
- package/dist/terminal-launcher.d.ts +51 -0
- package/dist/terminal-launcher.d.ts.map +1 -0
- package/dist/terminal-launcher.js +298 -0
- package/dist/terminal-launcher.js.map +1 -0
- package/dist/terminal-launcher.test.d.ts +8 -0
- package/dist/terminal-launcher.test.d.ts.map +1 -0
- package/dist/terminal-launcher.test.js +222 -0
- package/dist/terminal-launcher.test.js.map +1 -0
- package/dist/types.d.ts +796 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +15 -0
- package/dist/types.js.map +1 -0
- package/dist/unix-socket.d.ts +68 -0
- package/dist/unix-socket.d.ts.map +1 -0
- package/dist/unix-socket.js +180 -0
- package/dist/unix-socket.js.map +1 -0
- package/dist/usage-limits.d.ts +13 -0
- package/dist/usage-limits.d.ts.map +1 -0
- package/dist/usage-limits.js +112 -0
- package/dist/usage-limits.js.map +1 -0
- package/dist/watchers/handoff-watcher.d.ts +74 -0
- package/dist/watchers/handoff-watcher.d.ts.map +1 -0
- package/dist/watchers/handoff-watcher.js +124 -0
- package/dist/watchers/handoff-watcher.js.map +1 -0
- package/dist/watchers/handoff-watcher.test.d.ts +8 -0
- package/dist/watchers/handoff-watcher.test.d.ts.map +1 -0
- package/dist/watchers/handoff-watcher.test.js +142 -0
- package/dist/watchers/handoff-watcher.test.js.map +1 -0
- package/dist/websocket.d.ts +107 -0
- package/dist/websocket.d.ts.map +1 -0
- package/dist/websocket.js +268 -0
- package/dist/websocket.js.map +1 -0
- package/dist/window-manager/index.d.ts +28 -0
- package/dist/window-manager/index.d.ts.map +1 -0
- package/dist/window-manager/index.js +56 -0
- package/dist/window-manager/index.js.map +1 -0
- package/dist/window-manager/layouts.d.ts +42 -0
- package/dist/window-manager/layouts.d.ts.map +1 -0
- package/dist/window-manager/layouts.js +133 -0
- package/dist/window-manager/layouts.js.map +1 -0
- package/dist/window-manager/linux-manager.d.ts +45 -0
- package/dist/window-manager/linux-manager.d.ts.map +1 -0
- package/dist/window-manager/linux-manager.js +299 -0
- package/dist/window-manager/linux-manager.js.map +1 -0
- package/dist/window-manager/macos-manager.d.ts +103 -0
- package/dist/window-manager/macos-manager.d.ts.map +1 -0
- package/dist/window-manager/macos-manager.js +637 -0
- package/dist/window-manager/macos-manager.js.map +1 -0
- package/dist/window-manager/smart-layouts.d.ts +116 -0
- package/dist/window-manager/smart-layouts.d.ts.map +1 -0
- package/dist/window-manager/smart-layouts.js +188 -0
- package/dist/window-manager/smart-layouts.js.map +1 -0
- package/dist/window-manager/smart-layouts.test.d.ts +8 -0
- package/dist/window-manager/smart-layouts.test.d.ts.map +1 -0
- package/dist/window-manager/smart-layouts.test.js +311 -0
- package/dist/window-manager/smart-layouts.test.js.map +1 -0
- package/dist/window-manager/tile-state.d.ts +87 -0
- package/dist/window-manager/tile-state.d.ts.map +1 -0
- package/dist/window-manager/tile-state.js +136 -0
- package/dist/window-manager/tile-state.js.map +1 -0
- package/dist/window-manager/tile-state.test.d.ts +8 -0
- package/dist/window-manager/tile-state.test.d.ts.map +1 -0
- package/dist/window-manager/tile-state.test.js +179 -0
- package/dist/window-manager/tile-state.test.js.map +1 -0
- package/dist/window-manager/types.d.ts +104 -0
- package/dist/window-manager/types.d.ts.map +1 -0
- package/dist/window-manager/types.js +8 -0
- package/dist/window-manager/types.js.map +1 -0
- package/dist/window-manager/windows-manager.d.ts +44 -0
- package/dist/window-manager/windows-manager.d.ts.map +1 -0
- package/dist/window-manager/windows-manager.js +281 -0
- package/dist/window-manager/windows-manager.js.map +1 -0
- package/dist/window-manager/windows-manager.test.d.ts +8 -0
- package/dist/window-manager/windows-manager.test.d.ts.map +1 -0
- package/dist/window-manager/windows-manager.test.js +183 -0
- package/dist/window-manager/windows-manager.test.js.map +1 -0
- package/gui-dist/assets/index-BmYIHRYe.js +142 -0
- package/gui-dist/assets/index-D_N5RH8O.css +1 -0
- package/gui-dist/assets/vendor-icons-ByXNrcwf.js +336 -0
- package/gui-dist/assets/vendor-markdown-DWPYwU1x.js +22 -0
- package/gui-dist/assets/vendor-react-CpILBTDM.js +59 -0
- package/gui-dist/index.html +17 -0
- package/gui-dist/jacsub.png +0 -0
- package/package.json +67 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,796 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jacques Server Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for sessions, events, and context metrics
|
|
5
|
+
* used throughout the Jacques server and dashboard.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Terminal-specific identifiers captured from environment
|
|
9
|
+
* Used to uniquely identify terminal instances
|
|
10
|
+
*/
|
|
11
|
+
export interface TerminalIdentity {
|
|
12
|
+
tty: string | null;
|
|
13
|
+
terminal_pid: number;
|
|
14
|
+
term_program: string | null;
|
|
15
|
+
iterm_session_id: string | null;
|
|
16
|
+
term_session_id: string | null;
|
|
17
|
+
kitty_window_id: string | null;
|
|
18
|
+
wezterm_pane: string | null;
|
|
19
|
+
vscode_injection: string | null;
|
|
20
|
+
windowid: string | null;
|
|
21
|
+
term: string | null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Auto-compact status for Claude Code sessions
|
|
25
|
+
*
|
|
26
|
+
* Claude Code has an `autoCompact` setting in ~/.claude/settings.json.
|
|
27
|
+
* Known Bug (Issue #18264): Even with autoCompact: false, compaction
|
|
28
|
+
* still triggers at ~78% context usage.
|
|
29
|
+
*/
|
|
30
|
+
export interface AutoCompactStatus {
|
|
31
|
+
/** Whether auto-compact is enabled in settings.json (true if not set) */
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
/** Threshold percentage for auto-compact (95 default, or from CLAUDE_AUTOCOMPACT_PCT_OVERRIDE) */
|
|
34
|
+
threshold: number;
|
|
35
|
+
/** Bug threshold - 78 if disabled due to known bug, null otherwise */
|
|
36
|
+
bug_threshold: number | null;
|
|
37
|
+
}
|
|
38
|
+
export interface UsageLimits {
|
|
39
|
+
fiveHour: {
|
|
40
|
+
utilization: number;
|
|
41
|
+
resetsAt: string;
|
|
42
|
+
} | null;
|
|
43
|
+
sevenDay: {
|
|
44
|
+
utilization: number;
|
|
45
|
+
resetsAt: string;
|
|
46
|
+
} | null;
|
|
47
|
+
extraUsage: {
|
|
48
|
+
isEnabled: boolean;
|
|
49
|
+
utilization: number;
|
|
50
|
+
usedCredits: number;
|
|
51
|
+
monthlyLimit: number;
|
|
52
|
+
resetsAt: string;
|
|
53
|
+
} | null;
|
|
54
|
+
fetchedAt: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Context window metrics for a session
|
|
58
|
+
* Tracks token usage, limits, and breakdown
|
|
59
|
+
*/
|
|
60
|
+
export interface ContextMetrics {
|
|
61
|
+
/** Percentage of context window used (0-100) */
|
|
62
|
+
used_percentage: number;
|
|
63
|
+
/** Percentage of context window remaining (0-100) */
|
|
64
|
+
remaining_percentage: number;
|
|
65
|
+
/** Total tokens currently used */
|
|
66
|
+
total_input_tokens: number;
|
|
67
|
+
/** Total output tokens */
|
|
68
|
+
total_output_tokens: number;
|
|
69
|
+
/** Maximum context window size */
|
|
70
|
+
context_window_size: number;
|
|
71
|
+
/** Total cost in USD */
|
|
72
|
+
total_cost_usd?: number;
|
|
73
|
+
/** Total duration in ms */
|
|
74
|
+
total_duration_ms?: number;
|
|
75
|
+
/** True if this is an estimate (not actual from preCompact) */
|
|
76
|
+
is_estimate?: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Model information
|
|
80
|
+
*/
|
|
81
|
+
export interface ModelInfo {
|
|
82
|
+
id: string;
|
|
83
|
+
display_name: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Workspace information
|
|
87
|
+
*/
|
|
88
|
+
export interface WorkspaceInfo {
|
|
89
|
+
current_dir: string;
|
|
90
|
+
project_dir: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Session status
|
|
94
|
+
* - active: just registered, not yet working
|
|
95
|
+
* - working: Claude is actively processing (tools, generation)
|
|
96
|
+
* - idle: Claude finished, waiting for next user message (Stop hook)
|
|
97
|
+
* - awaiting: Claude called a tool, waiting for user approval (PreToolUse debounce)
|
|
98
|
+
*/
|
|
99
|
+
export type SessionStatus = 'active' | 'working' | 'idle' | 'awaiting';
|
|
100
|
+
/**
|
|
101
|
+
* Session mode - from permission_mode hook field or JSONL detection
|
|
102
|
+
*
|
|
103
|
+
* Hook-based (real-time, preferred):
|
|
104
|
+
* - plan: Plan mode (read-only, no changes)
|
|
105
|
+
* - acceptEdits: Auto-accept mode (Claude runs freely)
|
|
106
|
+
* - default: Normal mode (Claude asks before risky actions)
|
|
107
|
+
*
|
|
108
|
+
* JSONL-based (fallback for discovered sessions):
|
|
109
|
+
* - planning: EnterPlanMode tool was called during session
|
|
110
|
+
* - execution: First user message contains plan trigger pattern
|
|
111
|
+
*/
|
|
112
|
+
export type SessionMode = 'plan' | 'acceptEdits' | 'default' | 'planning' | 'execution' | 'bypass' | null;
|
|
113
|
+
/**
|
|
114
|
+
* Session source - identifies which AI tool the session is from
|
|
115
|
+
*/
|
|
116
|
+
export type SessionSource = 'claude_code' | 'cursor' | string;
|
|
117
|
+
/**
|
|
118
|
+
* Complete session representation
|
|
119
|
+
*/
|
|
120
|
+
export interface Session {
|
|
121
|
+
/** Unique session identifier from the AI tool */
|
|
122
|
+
session_id: string;
|
|
123
|
+
/** Source identifier (claude_code, cursor, etc.) */
|
|
124
|
+
source: SessionSource;
|
|
125
|
+
/** Human-readable session title (extracted from transcript) */
|
|
126
|
+
session_title: string | null;
|
|
127
|
+
/** Path to the session transcript file */
|
|
128
|
+
transcript_path: string | null;
|
|
129
|
+
/** Current working directory */
|
|
130
|
+
cwd: string;
|
|
131
|
+
/** Project name (derived from cwd) */
|
|
132
|
+
project: string;
|
|
133
|
+
/** Model information */
|
|
134
|
+
model: ModelInfo | null;
|
|
135
|
+
/** Workspace information */
|
|
136
|
+
workspace: WorkspaceInfo | null;
|
|
137
|
+
/** Terminal identity information */
|
|
138
|
+
terminal: TerminalIdentity | null;
|
|
139
|
+
/** Unique terminal key for identification */
|
|
140
|
+
terminal_key: string;
|
|
141
|
+
/** Current session status */
|
|
142
|
+
status: SessionStatus;
|
|
143
|
+
/** Timestamp of last activity */
|
|
144
|
+
last_activity: number;
|
|
145
|
+
/** Timestamp when session was registered */
|
|
146
|
+
registered_at: number;
|
|
147
|
+
/** Context metrics (updated from statusLine) */
|
|
148
|
+
context_metrics: ContextMetrics | null;
|
|
149
|
+
/** Session start reason (startup, resume, clear, compact) */
|
|
150
|
+
start_reason?: 'startup' | 'resume' | 'clear' | 'compact';
|
|
151
|
+
/** Auto-compact status (from ~/.claude/settings.json) */
|
|
152
|
+
autocompact: AutoCompactStatus | null;
|
|
153
|
+
/** Current git branch name */
|
|
154
|
+
git_branch?: string | null;
|
|
155
|
+
/** Git worktree name (if session is in a worktree) */
|
|
156
|
+
git_worktree?: string | null;
|
|
157
|
+
/** Canonical git repo root path (main worktree root, shared across all worktrees) */
|
|
158
|
+
git_repo_root?: string | null;
|
|
159
|
+
/** Commits ahead of default branch */
|
|
160
|
+
git_ahead?: number | null;
|
|
161
|
+
/** Commits behind default branch */
|
|
162
|
+
git_behind?: number | null;
|
|
163
|
+
/** Whether worktree has uncommitted changes */
|
|
164
|
+
git_dirty?: boolean | null;
|
|
165
|
+
/** Session mode: planning if EnterPlanMode was called, execution if started with plan trigger */
|
|
166
|
+
mode?: SessionMode;
|
|
167
|
+
/** Last tool name from PostToolUse activity event */
|
|
168
|
+
last_tool_name?: string | null;
|
|
169
|
+
/** Whether the session was launched with --dangerously-skip-permissions */
|
|
170
|
+
is_bypass?: boolean;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Base event structure
|
|
174
|
+
*/
|
|
175
|
+
interface BaseEvent {
|
|
176
|
+
event: string;
|
|
177
|
+
timestamp: number;
|
|
178
|
+
session_id: string;
|
|
179
|
+
/** Source identifier (claude_code, cursor, etc.) */
|
|
180
|
+
source?: SessionSource;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Session start event from SessionStart hook
|
|
184
|
+
*/
|
|
185
|
+
export interface SessionStartEvent extends BaseEvent {
|
|
186
|
+
event: 'session_start';
|
|
187
|
+
session_title: string | null;
|
|
188
|
+
transcript_path: string | null;
|
|
189
|
+
cwd: string;
|
|
190
|
+
project: string;
|
|
191
|
+
model?: string;
|
|
192
|
+
/** Hook trigger reason (startup, resume, clear, compact) - different from source (AI tool) */
|
|
193
|
+
hook_source?: 'startup' | 'resume' | 'clear' | 'compact';
|
|
194
|
+
terminal: TerminalIdentity | null;
|
|
195
|
+
terminal_key: string;
|
|
196
|
+
/** Auto-compact settings (from ~/.claude/settings.json) */
|
|
197
|
+
autocompact?: AutoCompactStatus;
|
|
198
|
+
/** Git branch detected from project directory */
|
|
199
|
+
git_branch?: string;
|
|
200
|
+
/** Git worktree name */
|
|
201
|
+
git_worktree?: string;
|
|
202
|
+
/** Canonical git repo root path (main worktree root) */
|
|
203
|
+
git_repo_root?: string;
|
|
204
|
+
/** Current permission mode from Claude Code (default, plan, acceptEdits, etc.) */
|
|
205
|
+
permission_mode?: string;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Pre-tool-use event from PreToolUse hook
|
|
209
|
+
* Fires before a tool executes - used to detect when Claude is waiting for user approval
|
|
210
|
+
*/
|
|
211
|
+
export interface PreToolUseEvent extends BaseEvent {
|
|
212
|
+
event: 'pre_tool_use';
|
|
213
|
+
tool_name: string;
|
|
214
|
+
terminal_pid: number;
|
|
215
|
+
/** Current permission mode from Claude Code */
|
|
216
|
+
permission_mode?: string;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Activity event from PostToolUse hook
|
|
220
|
+
*/
|
|
221
|
+
export interface ActivityEvent extends BaseEvent {
|
|
222
|
+
event: 'activity';
|
|
223
|
+
session_title: string | null;
|
|
224
|
+
tool_name: string;
|
|
225
|
+
terminal_pid: number;
|
|
226
|
+
context_metrics?: ContextMetrics;
|
|
227
|
+
/** Current permission mode from Claude Code */
|
|
228
|
+
permission_mode?: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Context update event from statusLine or hooks
|
|
232
|
+
*/
|
|
233
|
+
export interface ContextUpdateEvent extends BaseEvent {
|
|
234
|
+
event: 'context_update';
|
|
235
|
+
used_percentage: number;
|
|
236
|
+
remaining_percentage: number;
|
|
237
|
+
context_window_size: number;
|
|
238
|
+
total_input_tokens?: number;
|
|
239
|
+
total_output_tokens?: number;
|
|
240
|
+
model: string;
|
|
241
|
+
model_display_name?: string;
|
|
242
|
+
cwd: string;
|
|
243
|
+
project_dir?: string;
|
|
244
|
+
/** True if this is an estimate (from hooks), false if actual (from preCompact) */
|
|
245
|
+
is_estimate?: boolean;
|
|
246
|
+
/** Auto-compact settings (from ~/.claude/settings.json via statusLine) */
|
|
247
|
+
autocompact?: AutoCompactStatus;
|
|
248
|
+
/** Terminal key for focus detection (from statusLine hook) */
|
|
249
|
+
terminal_key?: string;
|
|
250
|
+
/** Terminal PID for bypass detection (from statusLine hook) */
|
|
251
|
+
terminal_pid?: number;
|
|
252
|
+
/** Session title extracted from transcript (from statusLine hook) */
|
|
253
|
+
session_title?: string;
|
|
254
|
+
/** Path to the session transcript file (from statusLine hook) */
|
|
255
|
+
transcript_path?: string;
|
|
256
|
+
/** Git branch detected from project directory */
|
|
257
|
+
git_branch?: string;
|
|
258
|
+
/** Git worktree name (basename of worktree dir) */
|
|
259
|
+
git_worktree?: string;
|
|
260
|
+
/** Canonical git repo root path (main worktree root) */
|
|
261
|
+
git_repo_root?: string;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Idle event from Stop hook
|
|
265
|
+
*/
|
|
266
|
+
export interface IdleEvent extends BaseEvent {
|
|
267
|
+
event: 'idle';
|
|
268
|
+
terminal_pid: number;
|
|
269
|
+
/** Current permission mode from Claude Code */
|
|
270
|
+
permission_mode?: string;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Session end event from SessionEnd hook
|
|
274
|
+
*/
|
|
275
|
+
export interface SessionEndEvent extends BaseEvent {
|
|
276
|
+
event: 'session_end';
|
|
277
|
+
terminal_pid: number;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Union type for all hook events
|
|
281
|
+
*/
|
|
282
|
+
export type HookEvent = SessionStartEvent | PreToolUseEvent | ActivityEvent | ContextUpdateEvent | IdleEvent | SessionEndEvent;
|
|
283
|
+
/**
|
|
284
|
+
* Initial state sent to newly connected clients
|
|
285
|
+
*/
|
|
286
|
+
export interface InitialStateMessage {
|
|
287
|
+
type: 'initial_state';
|
|
288
|
+
sessions: Session[];
|
|
289
|
+
focused_session_id: string | null;
|
|
290
|
+
/** True while server is still discovering existing sessions at startup */
|
|
291
|
+
scanning?: boolean;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Session update broadcast
|
|
295
|
+
*/
|
|
296
|
+
export interface SessionUpdateMessage {
|
|
297
|
+
type: 'session_update';
|
|
298
|
+
session: Session;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Session removed broadcast
|
|
302
|
+
*/
|
|
303
|
+
export interface SessionRemovedMessage {
|
|
304
|
+
type: 'session_removed';
|
|
305
|
+
session_id: string;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Focus changed broadcast
|
|
309
|
+
*/
|
|
310
|
+
export interface FocusChangedMessage {
|
|
311
|
+
type: 'focus_changed';
|
|
312
|
+
session_id: string | null;
|
|
313
|
+
session: Session | null;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Server status message
|
|
317
|
+
*/
|
|
318
|
+
export interface ServerStatusMessage {
|
|
319
|
+
type: 'server_status';
|
|
320
|
+
status: 'connected' | 'disconnected';
|
|
321
|
+
session_count: number;
|
|
322
|
+
/** True while server is still discovering existing sessions at startup */
|
|
323
|
+
scanning?: boolean;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Auto-compact toggled response
|
|
327
|
+
*/
|
|
328
|
+
export interface AutoCompactToggledMessage {
|
|
329
|
+
type: 'autocompact_toggled';
|
|
330
|
+
enabled: boolean;
|
|
331
|
+
warning?: string;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Handoff file ready notification
|
|
335
|
+
*/
|
|
336
|
+
export interface HandoffReadyMessage {
|
|
337
|
+
type: 'handoff_ready';
|
|
338
|
+
session_id: string;
|
|
339
|
+
path: string;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Handoff progress notification
|
|
343
|
+
* Sent during handoff generation to show extractor progress
|
|
344
|
+
*/
|
|
345
|
+
export interface HandoffProgressMessage {
|
|
346
|
+
type: 'handoff_progress';
|
|
347
|
+
session_id: string;
|
|
348
|
+
stage: 'starting' | 'extracting' | 'synthesizing' | 'writing' | 'complete';
|
|
349
|
+
extractors_done: number;
|
|
350
|
+
extractors_total: number;
|
|
351
|
+
current_extractor?: string;
|
|
352
|
+
output_file?: string;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Server log message
|
|
356
|
+
* Broadcast to clients for real-time log viewing
|
|
357
|
+
*/
|
|
358
|
+
export interface ServerLogMessage {
|
|
359
|
+
type: 'server_log';
|
|
360
|
+
level: 'info' | 'warn' | 'error';
|
|
361
|
+
message: string;
|
|
362
|
+
timestamp: number;
|
|
363
|
+
source: string;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Handoff context response
|
|
367
|
+
* Contains pre-extracted compact context for LLM skill (~2k tokens)
|
|
368
|
+
*/
|
|
369
|
+
export interface HandoffContextMessage {
|
|
370
|
+
type: 'handoff_context';
|
|
371
|
+
session_id: string;
|
|
372
|
+
/** Compact context for LLM skill consumption */
|
|
373
|
+
context: string;
|
|
374
|
+
/** Estimated token count */
|
|
375
|
+
token_estimate: number;
|
|
376
|
+
/** Raw extracted data for reference */
|
|
377
|
+
data: {
|
|
378
|
+
title: string;
|
|
379
|
+
projectDir: string;
|
|
380
|
+
filesModified: string[];
|
|
381
|
+
toolsUsed: string[];
|
|
382
|
+
recentMessages: string[];
|
|
383
|
+
assistantHighlights: string[];
|
|
384
|
+
decisions: string[];
|
|
385
|
+
technologies: string[];
|
|
386
|
+
blockers: string[];
|
|
387
|
+
totalUserMessages: number;
|
|
388
|
+
totalToolCalls: number;
|
|
389
|
+
plans?: Array<{
|
|
390
|
+
path: string;
|
|
391
|
+
title: string;
|
|
392
|
+
}>;
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Handoff context error response
|
|
397
|
+
*/
|
|
398
|
+
export interface HandoffContextErrorMessage {
|
|
399
|
+
type: 'handoff_context_error';
|
|
400
|
+
session_id: string;
|
|
401
|
+
error: string;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Claude operation message
|
|
405
|
+
* Broadcasts Claude Code CLI operations (e.g., LLM handoff) to GUI
|
|
406
|
+
*/
|
|
407
|
+
export interface ClaudeOperationMessage {
|
|
408
|
+
type: 'claude_operation';
|
|
409
|
+
operation: {
|
|
410
|
+
/** Unique identifier for this operation */
|
|
411
|
+
id: string;
|
|
412
|
+
/** ISO timestamp when operation started */
|
|
413
|
+
timestamp: string;
|
|
414
|
+
/** Operation type (e.g., "llm-handoff") */
|
|
415
|
+
operation: string;
|
|
416
|
+
/** Phase: "start" when beginning, "complete" when done */
|
|
417
|
+
phase: 'start' | 'complete';
|
|
418
|
+
/** Input tokens used by the LLM */
|
|
419
|
+
inputTokens: number;
|
|
420
|
+
/** Output tokens generated by the LLM */
|
|
421
|
+
outputTokens: number;
|
|
422
|
+
/** Total tokens (input + output) */
|
|
423
|
+
totalTokens: number;
|
|
424
|
+
/** Cache read tokens (if any) */
|
|
425
|
+
cacheReadTokens?: number;
|
|
426
|
+
/** Duration in milliseconds */
|
|
427
|
+
durationMs: number;
|
|
428
|
+
/** Whether the operation succeeded */
|
|
429
|
+
success: boolean;
|
|
430
|
+
/** Error message if operation failed */
|
|
431
|
+
errorMessage?: string;
|
|
432
|
+
/** Character count of user prompt */
|
|
433
|
+
userPromptChars: number;
|
|
434
|
+
/** Character count of system prompt */
|
|
435
|
+
systemPromptChars: number;
|
|
436
|
+
/** Estimated tokens for user prompt (~4 chars/token) */
|
|
437
|
+
userPromptTokensEst?: number;
|
|
438
|
+
/** Estimated tokens for system prompt (~4 chars/token) */
|
|
439
|
+
systemPromptTokensEst?: number;
|
|
440
|
+
/** Output content length (chars) */
|
|
441
|
+
outputLength?: number;
|
|
442
|
+
/** Truncated preview of user prompt */
|
|
443
|
+
userPromptPreview?: string;
|
|
444
|
+
/** Truncated preview of system prompt */
|
|
445
|
+
systemPromptPreview?: string;
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Focus terminal result message
|
|
450
|
+
* Sent back to the client that requested terminal focus
|
|
451
|
+
*/
|
|
452
|
+
export interface FocusTerminalResultMessage {
|
|
453
|
+
type: 'focus_terminal_result';
|
|
454
|
+
session_id: string;
|
|
455
|
+
success: boolean;
|
|
456
|
+
method: string;
|
|
457
|
+
error?: string;
|
|
458
|
+
}
|
|
459
|
+
import type { NotificationCategory as _NotificationCategory, NotificationSettings as _NotificationSettings, NotificationItem as _NotificationItem } from '@jacques-ai/core/notifications';
|
|
460
|
+
export type NotificationCategory = _NotificationCategory;
|
|
461
|
+
export type NotificationSettings = _NotificationSettings;
|
|
462
|
+
export type NotificationItem = _NotificationItem;
|
|
463
|
+
/**
|
|
464
|
+
* Notification settings message (server → client)
|
|
465
|
+
*/
|
|
466
|
+
export interface NotificationSettingsMessage {
|
|
467
|
+
type: 'notification_settings';
|
|
468
|
+
settings: NotificationSettings;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Notification fired message (server → client)
|
|
472
|
+
* Sent when the server detects and fires a notification
|
|
473
|
+
*/
|
|
474
|
+
export interface NotificationFiredMessage {
|
|
475
|
+
type: 'notification_fired';
|
|
476
|
+
notification: NotificationItem;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Client request to update notification settings
|
|
480
|
+
*/
|
|
481
|
+
export interface UpdateNotificationSettingsRequest {
|
|
482
|
+
type: 'update_notification_settings';
|
|
483
|
+
settings: Partial<NotificationSettings>;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* API log message
|
|
487
|
+
* Broadcasts HTTP API requests to GUI for debugging
|
|
488
|
+
*/
|
|
489
|
+
export interface ApiLogMessage {
|
|
490
|
+
type: 'api_log';
|
|
491
|
+
/** HTTP method (GET, POST, DELETE) */
|
|
492
|
+
method: string;
|
|
493
|
+
/** Request path (e.g., /api/sources/status) */
|
|
494
|
+
path: string;
|
|
495
|
+
/** HTTP status code */
|
|
496
|
+
status: number;
|
|
497
|
+
/** Request duration in milliseconds */
|
|
498
|
+
durationMs: number;
|
|
499
|
+
/** Timestamp when request completed */
|
|
500
|
+
timestamp: number;
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Client sends a chat message
|
|
504
|
+
*/
|
|
505
|
+
export interface ChatSendRequest {
|
|
506
|
+
type: 'chat_send';
|
|
507
|
+
projectPath: string;
|
|
508
|
+
message: string;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Client requests abort of active chat
|
|
512
|
+
*/
|
|
513
|
+
export interface ChatAbortRequest {
|
|
514
|
+
type: 'chat_abort';
|
|
515
|
+
projectPath: string;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Server streams a text delta back
|
|
519
|
+
*/
|
|
520
|
+
export interface ChatDeltaMessage {
|
|
521
|
+
type: 'chat_delta';
|
|
522
|
+
projectPath: string;
|
|
523
|
+
text: string;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Server notifies about a tool being used
|
|
527
|
+
*/
|
|
528
|
+
export interface ChatToolEventMessage {
|
|
529
|
+
type: 'chat_tool_event';
|
|
530
|
+
projectPath: string;
|
|
531
|
+
toolName: string;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Server signals chat completion
|
|
535
|
+
*/
|
|
536
|
+
export interface ChatCompleteMessage {
|
|
537
|
+
type: 'chat_complete';
|
|
538
|
+
projectPath: string;
|
|
539
|
+
fullText: string;
|
|
540
|
+
inputTokens: number;
|
|
541
|
+
outputTokens: number;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Server signals a chat error
|
|
545
|
+
*/
|
|
546
|
+
export interface ChatErrorMessage {
|
|
547
|
+
type: 'chat_error';
|
|
548
|
+
projectPath: string;
|
|
549
|
+
reason: 'aborted' | 'timeout' | 'process_error' | 'spawn_failed' | 'already_active';
|
|
550
|
+
message: string;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Server notifies that project catalog was updated
|
|
554
|
+
*/
|
|
555
|
+
export interface CatalogUpdatedMessage {
|
|
556
|
+
type: 'catalog_updated';
|
|
557
|
+
projectPath: string;
|
|
558
|
+
action: 'add' | 'update' | 'delete' | 'refresh';
|
|
559
|
+
itemId?: string;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Union type for all server → client messages
|
|
563
|
+
*/
|
|
564
|
+
export type ServerMessage = InitialStateMessage | SessionUpdateMessage | SessionRemovedMessage | FocusChangedMessage | ServerStatusMessage | AutoCompactToggledMessage | HandoffReadyMessage | HandoffProgressMessage | ServerLogMessage | HandoffContextMessage | HandoffContextErrorMessage | ClaudeOperationMessage | ApiLogMessage | FocusTerminalResultMessage | TileWindowsResultMessage | MaximizeWindowResultMessage | PositionBrowserLayoutResultMessage | LaunchSessionResultMessage | CreateWorktreeResultMessage | ListWorktreesResultMessage | RemoveWorktreeResultMessage | NotificationSettingsMessage | NotificationFiredMessage | ChatDeltaMessage | ChatToolEventMessage | ChatCompleteMessage | ChatErrorMessage | CatalogUpdatedMessage;
|
|
565
|
+
/**
|
|
566
|
+
* Client request to select a session
|
|
567
|
+
*/
|
|
568
|
+
export interface SelectSessionRequest {
|
|
569
|
+
type: 'select_session';
|
|
570
|
+
session_id: string;
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Client request to trigger an action
|
|
574
|
+
*/
|
|
575
|
+
export interface TriggerActionRequest {
|
|
576
|
+
type: 'trigger_action';
|
|
577
|
+
session_id: string;
|
|
578
|
+
action: 'smart_compact' | 'new_session' | 'save_snapshot';
|
|
579
|
+
options?: Record<string, unknown>;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Client request to toggle auto-compact setting
|
|
583
|
+
*/
|
|
584
|
+
export interface ToggleAutoCompactRequest {
|
|
585
|
+
type: 'toggle_autocompact';
|
|
586
|
+
session_id?: string;
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Client request to get compact handoff context for LLM skill
|
|
590
|
+
*/
|
|
591
|
+
export interface GetHandoffContextRequest {
|
|
592
|
+
type: 'get_handoff_context';
|
|
593
|
+
session_id: string;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Client request to focus a terminal window
|
|
597
|
+
*/
|
|
598
|
+
export interface FocusTerminalRequest {
|
|
599
|
+
type: 'focus_terminal';
|
|
600
|
+
session_id: string;
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Client request to tile multiple terminal windows
|
|
604
|
+
*/
|
|
605
|
+
export interface TileWindowsRequest {
|
|
606
|
+
type: 'tile_windows';
|
|
607
|
+
session_ids: string[];
|
|
608
|
+
layout?: 'side-by-side' | 'thirds' | '2x2' | 'smart';
|
|
609
|
+
display_id?: string;
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Tile windows result message
|
|
613
|
+
*/
|
|
614
|
+
export interface TileWindowsResultMessage {
|
|
615
|
+
type: 'tile_windows_result';
|
|
616
|
+
success: boolean;
|
|
617
|
+
positioned: number;
|
|
618
|
+
total: number;
|
|
619
|
+
layout: 'side-by-side' | 'thirds' | '2x2' | 'smart';
|
|
620
|
+
errors?: string[];
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Client request to maximize a terminal window to full screen
|
|
624
|
+
*/
|
|
625
|
+
export interface MaximizeWindowRequest {
|
|
626
|
+
type: 'maximize_window';
|
|
627
|
+
session_id: string;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Maximize window result message
|
|
631
|
+
*/
|
|
632
|
+
export interface MaximizeWindowResultMessage {
|
|
633
|
+
type: 'maximize_window_result';
|
|
634
|
+
session_id: string;
|
|
635
|
+
success: boolean;
|
|
636
|
+
error?: string;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Client request to position browser and terminal(s) side by side
|
|
640
|
+
*/
|
|
641
|
+
export interface PositionBrowserLayoutRequest {
|
|
642
|
+
type: 'position_browser_layout';
|
|
643
|
+
session_ids: string[];
|
|
644
|
+
layout: 'browser-terminal' | 'browser-two-terminals';
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Position browser layout result message
|
|
648
|
+
*/
|
|
649
|
+
export interface PositionBrowserLayoutResultMessage {
|
|
650
|
+
type: 'position_browser_layout_result';
|
|
651
|
+
success: boolean;
|
|
652
|
+
layout: string;
|
|
653
|
+
error?: string;
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Client request to launch a new terminal session running claude
|
|
657
|
+
*/
|
|
658
|
+
export interface LaunchSessionRequest {
|
|
659
|
+
type: 'launch_session';
|
|
660
|
+
cwd: string;
|
|
661
|
+
preferred_terminal?: string;
|
|
662
|
+
dangerously_skip_permissions?: boolean;
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* Launch session result message
|
|
666
|
+
*/
|
|
667
|
+
export interface LaunchSessionResultMessage {
|
|
668
|
+
type: 'launch_session_result';
|
|
669
|
+
success: boolean;
|
|
670
|
+
method: string;
|
|
671
|
+
cwd: string;
|
|
672
|
+
error?: string;
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Client request to create a new git worktree and optionally launch a session in it
|
|
676
|
+
*/
|
|
677
|
+
export interface CreateWorktreeRequest {
|
|
678
|
+
type: 'create_worktree';
|
|
679
|
+
/** Canonical git repo root (from session.git_repo_root) */
|
|
680
|
+
repo_root: string;
|
|
681
|
+
/** Worktree name (used as directory suffix and branch name) */
|
|
682
|
+
name: string;
|
|
683
|
+
/** Optional base branch (defaults to HEAD) */
|
|
684
|
+
base_branch?: string;
|
|
685
|
+
/** Whether to launch a Claude session in the new worktree (default true) */
|
|
686
|
+
launch_session?: boolean;
|
|
687
|
+
dangerously_skip_permissions?: boolean;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Create worktree result message
|
|
691
|
+
*/
|
|
692
|
+
export interface CreateWorktreeResultMessage {
|
|
693
|
+
type: 'create_worktree_result';
|
|
694
|
+
success: boolean;
|
|
695
|
+
worktree_path?: string;
|
|
696
|
+
branch?: string;
|
|
697
|
+
session_launched?: boolean;
|
|
698
|
+
launch_method?: string;
|
|
699
|
+
error?: string;
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Client request to list all worktrees with their status
|
|
703
|
+
*/
|
|
704
|
+
export interface ListWorktreesRequest {
|
|
705
|
+
type: 'list_worktrees';
|
|
706
|
+
repo_root: string;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* List worktrees result message
|
|
710
|
+
*/
|
|
711
|
+
export interface ListWorktreesResultMessage {
|
|
712
|
+
type: 'list_worktrees_result';
|
|
713
|
+
success: boolean;
|
|
714
|
+
repo_root?: string;
|
|
715
|
+
worktrees?: Array<{
|
|
716
|
+
name: string;
|
|
717
|
+
path: string;
|
|
718
|
+
branch: string | null;
|
|
719
|
+
isMain: boolean;
|
|
720
|
+
status: {
|
|
721
|
+
hasUncommittedChanges: boolean;
|
|
722
|
+
isMergedToMain: boolean;
|
|
723
|
+
};
|
|
724
|
+
}>;
|
|
725
|
+
error?: string;
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Client request to remove a git worktree
|
|
729
|
+
*/
|
|
730
|
+
export interface RemoveWorktreeRequest {
|
|
731
|
+
type: 'remove_worktree';
|
|
732
|
+
repo_root: string;
|
|
733
|
+
worktree_path: string;
|
|
734
|
+
force?: boolean;
|
|
735
|
+
delete_branch?: boolean;
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* Remove worktree result message
|
|
739
|
+
*/
|
|
740
|
+
export interface RemoveWorktreeResultMessage {
|
|
741
|
+
type: 'remove_worktree_result';
|
|
742
|
+
success: boolean;
|
|
743
|
+
worktree_path?: string;
|
|
744
|
+
branch_deleted?: boolean;
|
|
745
|
+
error?: string;
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Smart Tile Add request — launch a terminal and smartly tile it into the existing layout.
|
|
749
|
+
* If an existing tiled layout is tracked, extends it (up to 8 windows).
|
|
750
|
+
* Otherwise, places the terminal in the least-occupied area.
|
|
751
|
+
*/
|
|
752
|
+
export interface SmartTileAddRequest {
|
|
753
|
+
type: 'smart_tile_add';
|
|
754
|
+
/** CWD to launch a new terminal in */
|
|
755
|
+
launch_cwd?: string;
|
|
756
|
+
/** Or: session ID of an already-running terminal to add to the tile */
|
|
757
|
+
new_session_id?: string;
|
|
758
|
+
/** Target display (optional, auto-detected via majority vote or tile state) */
|
|
759
|
+
display_id?: string;
|
|
760
|
+
/** Launch with --dangerously-skip-permissions */
|
|
761
|
+
dangerously_skip_permissions?: boolean;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Result of a smart tile add operation
|
|
765
|
+
*/
|
|
766
|
+
export interface SmartTileAddResultMessage {
|
|
767
|
+
type: 'smart_tile_add_result';
|
|
768
|
+
success: boolean;
|
|
769
|
+
/** How many existing windows were repositioned */
|
|
770
|
+
repositioned: number;
|
|
771
|
+
/** Total windows in the tile after the operation */
|
|
772
|
+
total_tiled: number;
|
|
773
|
+
/** Whether the operation fell back to free-space placement */
|
|
774
|
+
used_free_space: boolean;
|
|
775
|
+
/** The launch method used (if a terminal was launched) */
|
|
776
|
+
launch_method?: string;
|
|
777
|
+
error?: string;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Union type for all client → server messages
|
|
781
|
+
*/
|
|
782
|
+
export type ClientMessage = SelectSessionRequest | TriggerActionRequest | ToggleAutoCompactRequest | GetHandoffContextRequest | FocusTerminalRequest | TileWindowsRequest | MaximizeWindowRequest | PositionBrowserLayoutRequest | LaunchSessionRequest | CreateWorktreeRequest | ListWorktreesRequest | RemoveWorktreeRequest | SmartTileAddRequest | UpdateNotificationSettingsRequest | ChatSendRequest | ChatAbortRequest;
|
|
783
|
+
/**
|
|
784
|
+
* Jacques server configuration
|
|
785
|
+
*/
|
|
786
|
+
export interface ServerConfig {
|
|
787
|
+
unix_socket_path: string;
|
|
788
|
+
websocket_port: number;
|
|
789
|
+
log_level: 'debug' | 'info' | 'warn' | 'error';
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Default server configuration
|
|
793
|
+
*/
|
|
794
|
+
export declare const DEFAULT_CONFIG: ServerConfig;
|
|
795
|
+
export {};
|
|
796
|
+
//# sourceMappingURL=types.d.ts.map
|