@gokulvenkatareddy/cortex 0.1.7

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 (299) hide show
  1. package/README.md +1295 -0
  2. package/apps/octogent/.github/workflows/ci.yml +40 -0
  3. package/apps/octogent/.shims/claude +4 -0
  4. package/apps/octogent/AGENTS.md +71 -0
  5. package/apps/octogent/CONTRIBUTING.md +72 -0
  6. package/apps/octogent/LICENSE +21 -0
  7. package/apps/octogent/README.md +184 -0
  8. package/apps/octogent/apps/api/AGENTS.md +32 -0
  9. package/apps/octogent/apps/api/package.json +19 -0
  10. package/apps/octogent/apps/api/src/agentStateDetection.ts +181 -0
  11. package/apps/octogent/apps/api/src/claudeSessionScanner.ts +235 -0
  12. package/apps/octogent/apps/api/src/claudeSkills.ts +182 -0
  13. package/apps/octogent/apps/api/src/claudeUsage.ts +922 -0
  14. package/apps/octogent/apps/api/src/cli.ts +595 -0
  15. package/apps/octogent/apps/api/src/codeIntelStore.ts +46 -0
  16. package/apps/octogent/apps/api/src/codexUsage.ts +278 -0
  17. package/apps/octogent/apps/api/src/createApiServer/codeIntelRoutes.ts +60 -0
  18. package/apps/octogent/apps/api/src/createApiServer/conversationRoutes.ts +128 -0
  19. package/apps/octogent/apps/api/src/createApiServer/deckRoutes.ts +873 -0
  20. package/apps/octogent/apps/api/src/createApiServer/gitParsers.ts +140 -0
  21. package/apps/octogent/apps/api/src/createApiServer/gitRoutes.ts +214 -0
  22. package/apps/octogent/apps/api/src/createApiServer/miscRoutes.ts +316 -0
  23. package/apps/octogent/apps/api/src/createApiServer/monitorParsers.ts +137 -0
  24. package/apps/octogent/apps/api/src/createApiServer/monitorRoutes.ts +95 -0
  25. package/apps/octogent/apps/api/src/createApiServer/requestHandler.ts +311 -0
  26. package/apps/octogent/apps/api/src/createApiServer/requestParsers.ts +25 -0
  27. package/apps/octogent/apps/api/src/createApiServer/routeHelpers.ts +97 -0
  28. package/apps/octogent/apps/api/src/createApiServer/security.ts +70 -0
  29. package/apps/octogent/apps/api/src/createApiServer/terminalParsers.ts +167 -0
  30. package/apps/octogent/apps/api/src/createApiServer/terminalRoutes.ts +315 -0
  31. package/apps/octogent/apps/api/src/createApiServer/types.ts +24 -0
  32. package/apps/octogent/apps/api/src/createApiServer/uiStateParsers.ts +255 -0
  33. package/apps/octogent/apps/api/src/createApiServer/upgradeHandler.ts +38 -0
  34. package/apps/octogent/apps/api/src/createApiServer/usageRoutes.ts +84 -0
  35. package/apps/octogent/apps/api/src/createApiServer.ts +176 -0
  36. package/apps/octogent/apps/api/src/deck/readDeckTentacles.ts +595 -0
  37. package/apps/octogent/apps/api/src/githubRepoSummary.ts +397 -0
  38. package/apps/octogent/apps/api/src/logging.ts +9 -0
  39. package/apps/octogent/apps/api/src/monitor/defaults.ts +3 -0
  40. package/apps/octogent/apps/api/src/monitor/index.ts +8 -0
  41. package/apps/octogent/apps/api/src/monitor/repository.ts +303 -0
  42. package/apps/octogent/apps/api/src/monitor/service.ts +349 -0
  43. package/apps/octogent/apps/api/src/monitor/types.ts +120 -0
  44. package/apps/octogent/apps/api/src/monitor/xProvider.ts +587 -0
  45. package/apps/octogent/apps/api/src/projectPersistence.ts +377 -0
  46. package/apps/octogent/apps/api/src/prompts/index.ts +10 -0
  47. package/apps/octogent/apps/api/src/prompts/promptResolver.ts +145 -0
  48. package/apps/octogent/apps/api/src/runtimeMetadata.ts +69 -0
  49. package/apps/octogent/apps/api/src/server.ts +80 -0
  50. package/apps/octogent/apps/api/src/setupState.ts +80 -0
  51. package/apps/octogent/apps/api/src/setupStatus.ts +174 -0
  52. package/apps/octogent/apps/api/src/startupPrerequisites.ts +146 -0
  53. package/apps/octogent/apps/api/src/terminalRuntime/channelMessaging.ts +87 -0
  54. package/apps/octogent/apps/api/src/terminalRuntime/claudeTranscript.ts +279 -0
  55. package/apps/octogent/apps/api/src/terminalRuntime/constants.ts +15 -0
  56. package/apps/octogent/apps/api/src/terminalRuntime/conversations.ts +492 -0
  57. package/apps/octogent/apps/api/src/terminalRuntime/gitOperations.ts +341 -0
  58. package/apps/octogent/apps/api/src/terminalRuntime/hookProcessor.ts +405 -0
  59. package/apps/octogent/apps/api/src/terminalRuntime/protocol.ts +46 -0
  60. package/apps/octogent/apps/api/src/terminalRuntime/ptyEnvironment.ts +50 -0
  61. package/apps/octogent/apps/api/src/terminalRuntime/registry.ts +423 -0
  62. package/apps/octogent/apps/api/src/terminalRuntime/sessionRuntime.ts +671 -0
  63. package/apps/octogent/apps/api/src/terminalRuntime/systemClients.ts +432 -0
  64. package/apps/octogent/apps/api/src/terminalRuntime/types.ts +157 -0
  65. package/apps/octogent/apps/api/src/terminalRuntime/worktreeManager.ts +135 -0
  66. package/apps/octogent/apps/api/src/terminalRuntime.ts +567 -0
  67. package/apps/octogent/apps/api/src/usageUtils.ts +16 -0
  68. package/apps/octogent/apps/api/src/ws-shim.d.ts +28 -0
  69. package/apps/octogent/apps/api/tests/agentStateDetection.test.ts +67 -0
  70. package/apps/octogent/apps/api/tests/claudeUsage.test.ts +583 -0
  71. package/apps/octogent/apps/api/tests/codexUsage.test.ts +107 -0
  72. package/apps/octogent/apps/api/tests/createApiServer.test.ts +3207 -0
  73. package/apps/octogent/apps/api/tests/githubRepoSummary.test.ts +100 -0
  74. package/apps/octogent/apps/api/tests/logging.test.ts +33 -0
  75. package/apps/octogent/apps/api/tests/monitorApi.test.ts +467 -0
  76. package/apps/octogent/apps/api/tests/monitorCore.test.ts +104 -0
  77. package/apps/octogent/apps/api/tests/promptResolver.test.ts +109 -0
  78. package/apps/octogent/apps/api/tests/protocol.test.ts +14 -0
  79. package/apps/octogent/apps/api/tests/sessionRuntime.test.ts +608 -0
  80. package/apps/octogent/apps/api/tests/startupPrerequisites.test.ts +70 -0
  81. package/apps/octogent/apps/api/tests/upgradeHandler.test.ts +40 -0
  82. package/apps/octogent/apps/api/tests/xMonitorProvider.test.ts +109 -0
  83. package/apps/octogent/apps/api/tsconfig.json +7 -0
  84. package/apps/octogent/apps/api/vitest.config.ts +7 -0
  85. package/apps/octogent/apps/web/AGENTS.md +38 -0
  86. package/apps/octogent/apps/web/index.html +13 -0
  87. package/apps/octogent/apps/web/package.json +32 -0
  88. package/apps/octogent/apps/web/public/octopus-favicon.svg +26 -0
  89. package/apps/octogent/apps/web/src/App.tsx +646 -0
  90. package/apps/octogent/apps/web/src/app/canvas/types.ts +34 -0
  91. package/apps/octogent/apps/web/src/app/codeIntelAggregation.ts +278 -0
  92. package/apps/octogent/apps/web/src/app/constants.ts +28 -0
  93. package/apps/octogent/apps/web/src/app/conversationNormalizers.ts +135 -0
  94. package/apps/octogent/apps/web/src/app/formatTimestamp.ts +18 -0
  95. package/apps/octogent/apps/web/src/app/githubMetrics.ts +76 -0
  96. package/apps/octogent/apps/web/src/app/githubNormalizers.ts +91 -0
  97. package/apps/octogent/apps/web/src/app/hooks/useAgentRuntimeStates.ts +18 -0
  98. package/apps/octogent/apps/web/src/app/hooks/useBackendLivenessPolling.ts +53 -0
  99. package/apps/octogent/apps/web/src/app/hooks/useCanvasGraphData.ts +449 -0
  100. package/apps/octogent/apps/web/src/app/hooks/useCanvasTransform.ts +260 -0
  101. package/apps/octogent/apps/web/src/app/hooks/useClaudeUsagePolling.ts +40 -0
  102. package/apps/octogent/apps/web/src/app/hooks/useClickOutside.ts +30 -0
  103. package/apps/octogent/apps/web/src/app/hooks/useCodeIntelRuntime.ts +83 -0
  104. package/apps/octogent/apps/web/src/app/hooks/useCodexUsagePolling.ts +35 -0
  105. package/apps/octogent/apps/web/src/app/hooks/useConsoleKeyboardShortcuts.ts +31 -0
  106. package/apps/octogent/apps/web/src/app/hooks/useConversationsRuntime.ts +377 -0
  107. package/apps/octogent/apps/web/src/app/hooks/useForceSimulation.ts +319 -0
  108. package/apps/octogent/apps/web/src/app/hooks/useGitHubPrimaryViewModel.ts +143 -0
  109. package/apps/octogent/apps/web/src/app/hooks/useGithubSummaryPolling.ts +28 -0
  110. package/apps/octogent/apps/web/src/app/hooks/useInitialColumnsHydration.ts +64 -0
  111. package/apps/octogent/apps/web/src/app/hooks/useMonitorRuntime.ts +220 -0
  112. package/apps/octogent/apps/web/src/app/hooks/usePersistedUiState.ts +536 -0
  113. package/apps/octogent/apps/web/src/app/hooks/usePollingData.ts +79 -0
  114. package/apps/octogent/apps/web/src/app/hooks/usePromptLibrary.ts +185 -0
  115. package/apps/octogent/apps/web/src/app/hooks/useTentacleGitLifecycle.ts +530 -0
  116. package/apps/octogent/apps/web/src/app/hooks/useTerminalCompletionNotification.ts +94 -0
  117. package/apps/octogent/apps/web/src/app/hooks/useTerminalMutations.ts +266 -0
  118. package/apps/octogent/apps/web/src/app/hooks/useTerminalStateReconciliation.ts +23 -0
  119. package/apps/octogent/apps/web/src/app/hooks/useUsageHeatmapPolling.ts +43 -0
  120. package/apps/octogent/apps/web/src/app/hooks/useWorkspaceSetup.ts +80 -0
  121. package/apps/octogent/apps/web/src/app/hotkeys.ts +31 -0
  122. package/apps/octogent/apps/web/src/app/monitorNormalizers.ts +145 -0
  123. package/apps/octogent/apps/web/src/app/notificationSounds.ts +164 -0
  124. package/apps/octogent/apps/web/src/app/terminalRuntimeStateStore.ts +261 -0
  125. package/apps/octogent/apps/web/src/app/terminalState.ts +21 -0
  126. package/apps/octogent/apps/web/src/app/types.ts +42 -0
  127. package/apps/octogent/apps/web/src/app/uiStateNormalizers.ts +113 -0
  128. package/apps/octogent/apps/web/src/app/usageNormalizers.ts +58 -0
  129. package/apps/octogent/apps/web/src/components/ActiveAgentsSidebar.tsx +60 -0
  130. package/apps/octogent/apps/web/src/components/ActivityPrimaryView.tsx +21 -0
  131. package/apps/octogent/apps/web/src/components/AgentStateBadge.tsx +47 -0
  132. package/apps/octogent/apps/web/src/components/CanvasPrimaryView.tsx +1532 -0
  133. package/apps/octogent/apps/web/src/components/ClearAllConversationsDialog.tsx +33 -0
  134. package/apps/octogent/apps/web/src/components/CodeIntelArcDiagram.tsx +245 -0
  135. package/apps/octogent/apps/web/src/components/CodeIntelPrimaryView.tsx +104 -0
  136. package/apps/octogent/apps/web/src/components/CodeIntelTreemap.tsx +138 -0
  137. package/apps/octogent/apps/web/src/components/ConsolePrimaryNav.tsx +31 -0
  138. package/apps/octogent/apps/web/src/components/ConversationsPrimaryView.tsx +243 -0
  139. package/apps/octogent/apps/web/src/components/DeckPrimaryView.tsx +613 -0
  140. package/apps/octogent/apps/web/src/components/DeleteTentacleDialog.tsx +91 -0
  141. package/apps/octogent/apps/web/src/components/EmptyOctopus.tsx +715 -0
  142. package/apps/octogent/apps/web/src/components/GitHubPrimaryView.tsx +494 -0
  143. package/apps/octogent/apps/web/src/components/MonitorPrimaryView.tsx +475 -0
  144. package/apps/octogent/apps/web/src/components/PrimaryViewRouter.tsx +99 -0
  145. package/apps/octogent/apps/web/src/components/PromptsPrimaryView.tsx +243 -0
  146. package/apps/octogent/apps/web/src/components/RuntimeStatusStrip.tsx +273 -0
  147. package/apps/octogent/apps/web/src/components/SettingsPrimaryView.tsx +92 -0
  148. package/apps/octogent/apps/web/src/components/SidebarActionPanel.tsx +124 -0
  149. package/apps/octogent/apps/web/src/components/SidebarConversationsList.tsx +279 -0
  150. package/apps/octogent/apps/web/src/components/SidebarPromptsList.tsx +116 -0
  151. package/apps/octogent/apps/web/src/components/TelemetryTape.tsx +106 -0
  152. package/apps/octogent/apps/web/src/components/TentacleGitActionsDialog.tsx +341 -0
  153. package/apps/octogent/apps/web/src/components/Terminal.tsx +524 -0
  154. package/apps/octogent/apps/web/src/components/TerminalPromptPicker.tsx +140 -0
  155. package/apps/octogent/apps/web/src/components/UsageHeatmap.tsx +702 -0
  156. package/apps/octogent/apps/web/src/components/canvas/CanvasTentaclePanel.tsx +485 -0
  157. package/apps/octogent/apps/web/src/components/canvas/CanvasTerminalColumn.tsx +89 -0
  158. package/apps/octogent/apps/web/src/components/canvas/DeleteAllTerminalsDialog.tsx +221 -0
  159. package/apps/octogent/apps/web/src/components/canvas/OctopusNode.tsx +307 -0
  160. package/apps/octogent/apps/web/src/components/canvas/SessionNode.tsx +185 -0
  161. package/apps/octogent/apps/web/src/components/deck/ActionCards.tsx +118 -0
  162. package/apps/octogent/apps/web/src/components/deck/AddTentacleForm.tsx +269 -0
  163. package/apps/octogent/apps/web/src/components/deck/DeckBottomActions.tsx +56 -0
  164. package/apps/octogent/apps/web/src/components/deck/TentaclePod.tsx +334 -0
  165. package/apps/octogent/apps/web/src/components/deck/WorkspaceSetupCard.tsx +105 -0
  166. package/apps/octogent/apps/web/src/components/deck/octopusVisuals.ts +72 -0
  167. package/apps/octogent/apps/web/src/components/terminalReplay.ts +62 -0
  168. package/apps/octogent/apps/web/src/components/terminalWheel.ts +54 -0
  169. package/apps/octogent/apps/web/src/components/ui/ActionButton.tsx +34 -0
  170. package/apps/octogent/apps/web/src/components/ui/ConfirmationDialog.tsx +86 -0
  171. package/apps/octogent/apps/web/src/components/ui/MarkdownContent.tsx +43 -0
  172. package/apps/octogent/apps/web/src/components/ui/SettingsToggle.tsx +34 -0
  173. package/apps/octogent/apps/web/src/components/ui/StatusBadge.tsx +24 -0
  174. package/apps/octogent/apps/web/src/main.tsx +17 -0
  175. package/apps/octogent/apps/web/src/runtime/HttpTerminalSnapshotReader.ts +87 -0
  176. package/apps/octogent/apps/web/src/runtime/runtimeEndpoints.ts +412 -0
  177. package/apps/octogent/apps/web/src/styles/chrome-and-buttons.css +272 -0
  178. package/apps/octogent/apps/web/src/styles/console-canvas-activity.css +358 -0
  179. package/apps/octogent/apps/web/src/styles/console-canvas-canvas.css +1843 -0
  180. package/apps/octogent/apps/web/src/styles/console-canvas-code-intel.css +227 -0
  181. package/apps/octogent/apps/web/src/styles/console-canvas-conversations.css +705 -0
  182. package/apps/octogent/apps/web/src/styles/console-canvas-deck.css +1524 -0
  183. package/apps/octogent/apps/web/src/styles/console-canvas-github.css +541 -0
  184. package/apps/octogent/apps/web/src/styles/console-canvas-monitor.css +595 -0
  185. package/apps/octogent/apps/web/src/styles/console-canvas-pixpack.css +81 -0
  186. package/apps/octogent/apps/web/src/styles/console-canvas-prompts.css +474 -0
  187. package/apps/octogent/apps/web/src/styles/console-canvas-settings.css +207 -0
  188. package/apps/octogent/apps/web/src/styles/console-chrome-status-nav.css +441 -0
  189. package/apps/octogent/apps/web/src/styles/console-overrides-telemetry.css +320 -0
  190. package/apps/octogent/apps/web/src/styles/console-theme-tokens.css +25 -0
  191. package/apps/octogent/apps/web/src/styles/cortex-theme.css +412 -0
  192. package/apps/octogent/apps/web/src/styles/foundation.css +100 -0
  193. package/apps/octogent/apps/web/src/styles/sidebar-and-scrollbars.css +447 -0
  194. package/apps/octogent/apps/web/src/styles/terminal-and-status.css +356 -0
  195. package/apps/octogent/apps/web/src/styles.css +25 -0
  196. package/apps/octogent/apps/web/src/types/ws.d.ts +23 -0
  197. package/apps/octogent/apps/web/tests/CanvasPrimaryView.test.tsx +347 -0
  198. package/apps/octogent/apps/web/tests/HttpTerminalSnapshotReader.test.tsx +54 -0
  199. package/apps/octogent/apps/web/tests/RuntimeStatusStrip.test.tsx +70 -0
  200. package/apps/octogent/apps/web/tests/Terminal.test.tsx +87 -0
  201. package/apps/octogent/apps/web/tests/add-tentacle-form.test.tsx +48 -0
  202. package/apps/octogent/apps/web/tests/app-github-runtime.test.tsx +162 -0
  203. package/apps/octogent/apps/web/tests/app-monitor-runtime.test.tsx +657 -0
  204. package/apps/octogent/apps/web/tests/app-shell-navigation.test.tsx +109 -0
  205. package/apps/octogent/apps/web/tests/app-swarm-refresh.test.tsx +268 -0
  206. package/apps/octogent/apps/web/tests/app-ui-state-persistence.test.tsx +116 -0
  207. package/apps/octogent/apps/web/tests/app-workspace-setup.test.tsx +217 -0
  208. package/apps/octogent/apps/web/tests/canvas-tentacle-panel.test.tsx +195 -0
  209. package/apps/octogent/apps/web/tests/delete-all-terminals-dialog.test.tsx +76 -0
  210. package/apps/octogent/apps/web/tests/githubMetrics.test.tsx +52 -0
  211. package/apps/octogent/apps/web/tests/hotkeys.test.tsx +44 -0
  212. package/apps/octogent/apps/web/tests/runtimeEndpoints.test.tsx +240 -0
  213. package/apps/octogent/apps/web/tests/setup.ts +39 -0
  214. package/apps/octogent/apps/web/tests/tentacle-pod.test.tsx +62 -0
  215. package/apps/octogent/apps/web/tests/terminalReplay.test.ts +71 -0
  216. package/apps/octogent/apps/web/tests/terminalState.test.tsx +49 -0
  217. package/apps/octogent/apps/web/tests/terminalWheel.test.tsx +51 -0
  218. package/apps/octogent/apps/web/tests/test-utils/appTestHarness.ts +48 -0
  219. package/apps/octogent/apps/web/tests/uiPrimitives.test.tsx +31 -0
  220. package/apps/octogent/apps/web/tests/useAgentRuntimeStates.test.tsx +47 -0
  221. package/apps/octogent/apps/web/tsconfig.json +8 -0
  222. package/apps/octogent/apps/web/vite.api.bundle.config.mts +32 -0
  223. package/apps/octogent/apps/web/vite.config.ts +22 -0
  224. package/apps/octogent/bin/octogent +3 -0
  225. package/apps/octogent/biome.json +21 -0
  226. package/apps/octogent/docs/concepts/mental-model.md +79 -0
  227. package/apps/octogent/docs/concepts/runtime-and-api.md +60 -0
  228. package/apps/octogent/docs/concepts/tentacles.md +85 -0
  229. package/apps/octogent/docs/getting-started/installation.md +54 -0
  230. package/apps/octogent/docs/getting-started/quickstart.md +79 -0
  231. package/apps/octogent/docs/guides/inter-agent-messaging.md +43 -0
  232. package/apps/octogent/docs/guides/orchestrating-child-agents.md +49 -0
  233. package/apps/octogent/docs/guides/working-with-todos.md +56 -0
  234. package/apps/octogent/docs/index.md +40 -0
  235. package/apps/octogent/docs/reference/api.md +103 -0
  236. package/apps/octogent/docs/reference/cli.md +71 -0
  237. package/apps/octogent/docs/reference/experimental-features.md +28 -0
  238. package/apps/octogent/docs/reference/filesystem-layout.md +62 -0
  239. package/apps/octogent/docs/reference/troubleshooting.md +49 -0
  240. package/apps/octogent/package.json +35 -0
  241. package/apps/octogent/packages/core/AGENTS.md +31 -0
  242. package/apps/octogent/packages/core/package.json +12 -0
  243. package/apps/octogent/packages/core/src/adapters/InMemoryTerminalSnapshotReader.ts +10 -0
  244. package/apps/octogent/packages/core/src/application/buildTerminalList.ts +13 -0
  245. package/apps/octogent/packages/core/src/domain/agentRuntime.ts +18 -0
  246. package/apps/octogent/packages/core/src/domain/channel.ts +8 -0
  247. package/apps/octogent/packages/core/src/domain/completionSound.ts +14 -0
  248. package/apps/octogent/packages/core/src/domain/conversation.ts +48 -0
  249. package/apps/octogent/packages/core/src/domain/deck.ts +33 -0
  250. package/apps/octogent/packages/core/src/domain/git.ts +32 -0
  251. package/apps/octogent/packages/core/src/domain/monitor.ts +62 -0
  252. package/apps/octogent/packages/core/src/domain/setup.ts +27 -0
  253. package/apps/octogent/packages/core/src/domain/terminal.ts +17 -0
  254. package/apps/octogent/packages/core/src/domain/uiState.ts +22 -0
  255. package/apps/octogent/packages/core/src/domain/usage.ts +60 -0
  256. package/apps/octogent/packages/core/src/index.ts +15 -0
  257. package/apps/octogent/packages/core/src/ports/TerminalSnapshotReader.ts +5 -0
  258. package/apps/octogent/packages/core/src/util/typeCoercion.ts +20 -0
  259. package/apps/octogent/packages/core/tests/buildTerminalList.test.ts +75 -0
  260. package/apps/octogent/packages/core/tsconfig.json +7 -0
  261. package/apps/octogent/packages/core/tsconfig.tsbuildinfo +1 -0
  262. package/apps/octogent/packages/core/vitest.config.ts +7 -0
  263. package/apps/octogent/pnpm-lock.yaml +3212 -0
  264. package/apps/octogent/pnpm-workspace.yaml +3 -0
  265. package/apps/octogent/prompts/meta-prompt-generator.md +223 -0
  266. package/apps/octogent/prompts/octoboss-clean-contexts.md +30 -0
  267. package/apps/octogent/prompts/octoboss-reorganize-tentacles.md +29 -0
  268. package/apps/octogent/prompts/octoboss-reorganize-todos.md +27 -0
  269. package/apps/octogent/prompts/sandbox-init.md +3 -0
  270. package/apps/octogent/prompts/swarm-parent.md +83 -0
  271. package/apps/octogent/prompts/swarm-worker.md +50 -0
  272. package/apps/octogent/prompts/tentacle-context-init.md +1 -0
  273. package/apps/octogent/prompts/tentacle-planner.md +110 -0
  274. package/apps/octogent/prompts/tentacle-reorganize-todos.md +20 -0
  275. package/apps/octogent/prompts/tentacle-update-tentacle.md +18 -0
  276. package/apps/octogent/scripts/build-package.mjs +23 -0
  277. package/apps/octogent/scripts/dev.mjs +158 -0
  278. package/apps/octogent/scripts/smoke-public-install.mjs +271 -0
  279. package/apps/octogent/static/images/octogent-header.png +0 -0
  280. package/apps/octogent/static/images/preview_1.jpg +0 -0
  281. package/apps/octogent/static/images/preview_2.jpg +0 -0
  282. package/apps/octogent/static/images/preview_3.jpg +0 -0
  283. package/apps/octogent/static/images/preview_4.jpg +0 -0
  284. package/apps/octogent/static/images/preview_5.jpg +0 -0
  285. package/apps/octogent/static/images/preview_6.jpg +0 -0
  286. package/apps/octogent/tsconfig.base.json +16 -0
  287. package/bin/AGI +3 -0
  288. package/bin/AGI-install-app +71 -0
  289. package/bin/AGI-ui +16 -0
  290. package/bin/AGI-voice +15 -0
  291. package/bin/AGI-web +16 -0
  292. package/bin/cortex +109 -0
  293. package/bin/cortex-octogent +99 -0
  294. package/bin/import-specifier.mjs +13 -0
  295. package/bin/import-specifier.test.mjs +13 -0
  296. package/bin/octo +150 -0
  297. package/dist/cli.mjs +555650 -0
  298. package/package.json +157 -0
  299. package/scripts/setup-wizard.ts +390 -0
@@ -0,0 +1,103 @@
1
+ # API Reference
2
+
3
+ Octogent exposes a local HTTP and WebSocket API.
4
+
5
+ ## Terminals
6
+
7
+ - `GET /api/terminal-snapshots` - returns the current terminal list and snapshot state for the UI
8
+ - `POST /api/terminals` - creates a new terminal session
9
+ - `PATCH /api/terminals/:terminalId` - updates terminal metadata such as the display name
10
+ - `DELETE /api/terminals/:terminalId` - removes a terminal and closes its active session
11
+ - `WS /api/terminals/:terminalId/ws` - streams live terminal IO over WebSocket
12
+
13
+ ## Git and worktrees
14
+
15
+ - `GET /api/tentacles/:tentacleId/git/status` - reads git status for a worktree-backed tentacle
16
+ - `POST /api/tentacles/:tentacleId/git/commit` - creates a commit from the tentacle worktree
17
+ - `POST /api/tentacles/:tentacleId/git/push` - pushes the tentacle branch
18
+ - `POST /api/tentacles/:tentacleId/git/sync` - syncs the tentacle worktree with its base branch
19
+ - `GET /api/tentacles/:tentacleId/git/pr` - reads pull request information for the tentacle branch
20
+ - `POST /api/tentacles/:tentacleId/git/pr/merge` - merges the tentacle pull request
21
+
22
+ ## Deck and tentacles
23
+
24
+ - `GET /api/deck/skills` - lists available Claude Code skills discovered from project-local `.claude/skills/<skill>/SKILL.md` entries
25
+ - `GET /api/deck/tentacles` - lists tentacles with metadata, vault files, and todo progress
26
+ - `POST /api/deck/tentacles` - creates a new tentacle
27
+ - `DELETE /api/deck/tentacles/:tentacleId` - deletes a tentacle and its stored files
28
+ - `PATCH /api/deck/tentacles/:tentacleId/skills` - updates the tentacle's suggested Claude Code skills and rewrites the managed block in `CONTEXT.md`
29
+ - `POST /api/deck/tentacles/:tentacleId/todo` - adds a todo item to `todo.md`
30
+ - `PATCH /api/deck/tentacles/:tentacleId/todo/toggle` - marks a todo item done or undone
31
+ - `PATCH /api/deck/tentacles/:tentacleId/todo/edit` - edits the text of a todo item
32
+ - `POST /api/deck/tentacles/:tentacleId/todo/delete` - deletes a todo item
33
+ - `GET /api/deck/tentacles/:tentacleId/files/:filename` - reads one markdown file from the tentacle vault
34
+ - `POST /api/deck/tentacles/:tentacleId/swarm` - spawns worker terminals from incomplete todo items
35
+
36
+ ## Prompts
37
+
38
+ - `GET /api/prompts` - lists available prompt templates
39
+ - `POST /api/prompts` - creates a user prompt
40
+ - `GET /api/prompts/:promptId` - reads one prompt
41
+ - `PUT /api/prompts/:promptId` - updates one prompt
42
+ - `DELETE /api/prompts/:promptId` - deletes one prompt
43
+
44
+ ## Channels
45
+
46
+ - `GET /api/channels/:terminalId/messages` - lists messages for one terminal channel
47
+ - `POST /api/channels/:terminalId/messages` - sends a message to one terminal channel
48
+
49
+ ## Code intel
50
+
51
+ - `POST /api/code-intel/events` - records one code-intel event
52
+ - `GET /api/code-intel/events` - returns the stored code-intel event log
53
+
54
+ ## Hooks
55
+
56
+ - `POST /api/hooks/:hookName` - ingests lifecycle events coming from Claude Code hooks
57
+
58
+ Current hook names:
59
+
60
+ - `session-start`
61
+ - `user-prompt-submit`
62
+ - `pre-tool-use`
63
+ - `notification`
64
+ - `stop`
65
+
66
+ ## Usage and telemetry
67
+
68
+ - `GET /api/codex/usage` - returns Codex usage data when available
69
+ - `GET /api/claude/usage` - returns Claude usage data when available
70
+ - `GET /api/github/summary` - returns GitHub summary and repo telemetry data
71
+ - `GET /api/analytics/usage-heatmap?scope=all|project` - returns heatmap data from Claude session history
72
+
73
+ ## UI state
74
+
75
+ - `GET /api/ui-state` - reads the persisted UI state for the current project
76
+ - `PATCH /api/ui-state` - updates the persisted UI state
77
+
78
+ ## Workspace setup
79
+
80
+ - `GET /api/setup` - reads the verified first-run setup status for the current workspace
81
+ - `POST /api/setup/steps/:stepId` - runs one setup step and returns the refreshed setup snapshot
82
+
83
+ ## Monitor
84
+
85
+ - `GET /api/monitor/config` - reads monitor configuration
86
+ - `PATCH /api/monitor/config` - updates monitor configuration
87
+ - `GET /api/monitor/feed` - returns the current monitor feed snapshot
88
+ - `POST /api/monitor/refresh` - forces a monitor refresh
89
+
90
+ ## Conversations
91
+
92
+ - `GET /api/conversations` - lists stored conversations
93
+ - `DELETE /api/conversations` - deletes all stored conversations
94
+ - `GET /api/conversations/search?q=...` - searches conversations by text
95
+ - `GET /api/conversations/:sessionId` - reads one conversation in full
96
+ - `GET /api/conversations/:sessionId/export?format=json|md` - exports one conversation as JSON or Markdown
97
+
98
+ ## Request limits and defaults
99
+
100
+ - JSON request bodies are capped at `1 MiB`
101
+ - invalid JSON returns `400`
102
+ - unsupported methods return `405`
103
+ - the server binds to loopback by default
@@ -0,0 +1,71 @@
1
+ # CLI Reference
2
+
3
+ ## Start the dashboard
4
+
5
+ ```bash
6
+ octogent
7
+ ```
8
+
9
+ Starts the local API for the current project and opens the UI when bundled web assets are present.
10
+
11
+ If the current directory has not been initialized yet, `octogent` also creates or updates the local `.octogent/` scaffold automatically on first run.
12
+
13
+ ## Initialize a project
14
+
15
+ ```bash
16
+ octogent init [project-name]
17
+ ```
18
+
19
+ Creates or updates the `.octogent/` scaffold in the current directory without starting the dashboard.
20
+
21
+ Use this when you want to initialize the project explicitly or set the project display name ahead of time. In normal use, running `octogent` inside the codebase is enough to initialize and start the app.
22
+
23
+ ## List registered projects
24
+
25
+ ```bash
26
+ octogent projects
27
+ ```
28
+
29
+ ## Create a tentacle
30
+
31
+ ```bash
32
+ octogent tentacle create <name> --description "API runtime and routes"
33
+ ```
34
+
35
+ Octogent must already be running for this command.
36
+
37
+ ## List tentacles
38
+
39
+ ```bash
40
+ octogent tentacle list
41
+ ```
42
+
43
+ ## Create a terminal
44
+
45
+ ```bash
46
+ octogent terminal create [options]
47
+ ```
48
+
49
+ Options:
50
+
51
+ - `--name`, `-n`: terminal display name
52
+ - `--workspace-mode`, `-w`: `shared` or `worktree`
53
+ - `--initial-prompt`, `-p`: raw initial prompt text
54
+ - `--terminal-id`: explicit terminal ID
55
+ - `--tentacle-id`: existing tentacle ID to attach to
56
+ - `--worktree-id`: explicit worktree ID
57
+ - `--parent-terminal-id`: parent terminal ID for child terminals
58
+ - `--prompt-template`: prompt template name
59
+ - `--prompt-variables`: JSON object of prompt template variables
60
+
61
+ ## Send a message
62
+
63
+ ```bash
64
+ octogent channel send <terminal-id> "message"
65
+ ```
66
+
67
+ ## List messages
68
+
69
+ ```bash
70
+ octogent channel list <terminal-id>
71
+ ```
@@ -0,0 +1,28 @@
1
+ # Experimental Features
2
+
3
+ These features exist in the repo, but they are not the center of the current project story.
4
+
5
+ ## Secondary surfaces
6
+
7
+ - monitor
8
+ - GitHub summary and metrics
9
+ - user and token usage views
10
+ - prompt library UI
11
+ - code intel
12
+ - conversations
13
+
14
+ ## Why they are secondary
15
+
16
+ The main project claim is about:
17
+
18
+ - tentacles
19
+ - todos
20
+ - Claude Code terminals
21
+ - child-agent orchestration
22
+ - inter-agent messaging
23
+
24
+ Everything else should be treated as supporting or experimental unless the docs say otherwise.
25
+
26
+ ## Documentation rule
27
+
28
+ Do not let these features dominate the landing page or the core concepts pages.
@@ -0,0 +1,62 @@
1
+ # Filesystem Layout
2
+
3
+ ## Project-local files
4
+
5
+ `.octogent/` is created in the workspace.
6
+
7
+ Main paths:
8
+
9
+ - `.octogent/project.json`
10
+ - `.octogent/tentacles/`
11
+ - `.octogent/worktrees/`
12
+
13
+ Tentacle example:
14
+
15
+ ```text
16
+ .octogent/
17
+ tentacles/
18
+ api-backend/
19
+ CONTEXT.md
20
+ todo.md
21
+ routes.md
22
+ ```
23
+
24
+ `CONTEXT.md` may end with a managed `Suggested Skills` block when the operator or planner attaches Claude Code skills to that tentacle.
25
+
26
+ Project-local Claude Code skills, when present, live under:
27
+
28
+ ```text
29
+ .claude/
30
+ skills/
31
+ some-skill/
32
+ SKILL.md
33
+ ```
34
+
35
+ ## Global state
36
+
37
+ Per-project runtime state is stored under:
38
+
39
+ ```text
40
+ ~/.octogent/projects/<project-id>/state/
41
+ ```
42
+
43
+ Notable files:
44
+
45
+ - `tentacles.json`
46
+ - `deck.json`
47
+ - `transcripts/<sessionId>.jsonl`
48
+ - `monitor-config.json`
49
+ - `monitor-cache.json`
50
+ - `code-intel.jsonl`
51
+
52
+ ## Prompt storage
53
+
54
+ - core prompts are synced from `prompts/`
55
+ - synced copies live in `.octogent/prompts/core/`
56
+ - user prompts live in `.octogent/prompts/`
57
+
58
+ ## Practical rule
59
+
60
+ If something is agent-facing context, keep it in the tentacle folder.
61
+
62
+ If something is runtime-owned state, expect it under the global project state directory.
@@ -0,0 +1,49 @@
1
+ # Troubleshooting
2
+
3
+ ## `pnpm test` fails because of browser APIs
4
+
5
+ Make sure the workspace dependencies are installed from the repo root:
6
+
7
+ ```bash
8
+ pnpm install
9
+ ```
10
+
11
+ ## Package resolution is broken
12
+
13
+ Run install from the repository root, not from a subpackage.
14
+
15
+ ## Node version is too old
16
+
17
+ Use Node.js `22+`.
18
+
19
+ ## Terminal startup fails
20
+
21
+ Check that your shell environment is available and executable.
22
+
23
+ ## Worktree terminal creation fails
24
+
25
+ Verify:
26
+
27
+ - `git --version` works
28
+ - the workspace is a git repository
29
+ - the current user can create worktrees in `.octogent/worktrees/`
30
+
31
+ ## GitHub summary is unavailable
32
+
33
+ Verify:
34
+
35
+ ```bash
36
+ gh auth status
37
+ ```
38
+
39
+ ## Monitor refresh fails
40
+
41
+ Verify your X bearer token and API access.
42
+
43
+ ## Messages disappear after restart
44
+
45
+ That is expected. Channel messages are in-memory only and do not persist across API restarts.
46
+
47
+ ## A terminal survived reload but not server restart
48
+
49
+ That is also expected. PTY sessions can survive a reconnect window, but they do not survive an API restart.
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "octogent",
3
+ "version": "0.1.0",
4
+ "description": "Web-first command surface for running multiple coding agents in parallel",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "packageManager": "pnpm@10.4.1",
8
+ "engines": {
9
+ "node": ">=22.0.0"
10
+ },
11
+ "bin": {
12
+ "octogent": "./bin/octogent"
13
+ },
14
+ "files": ["bin", "dist", "README.md"],
15
+ "scripts": {
16
+ "start": "pnpm dev",
17
+ "dev": "node scripts/dev.mjs",
18
+ "build": "pnpm --filter @octogent/web build && pnpm --filter @octogent/web exec vite build --config vite.api.bundle.config.mts && node scripts/build-package.mjs",
19
+ "smoke:public-install": "node scripts/smoke-public-install.mjs",
20
+ "test": "pnpm -r test",
21
+ "lint": "biome check .",
22
+ "format": "biome format --write ."
23
+ },
24
+ "dependencies": {
25
+ "node-pty": "^1.1.0",
26
+ "ws": "^8.19.0"
27
+ },
28
+ "devDependencies": {
29
+ "@biomejs/biome": "^1.9.4",
30
+ "@types/node": "^22.13.10",
31
+ "knip": "^6.3.1",
32
+ "typescript": "^5.8.2",
33
+ "vitest": "^3.0.7"
34
+ }
35
+ }
@@ -0,0 +1,31 @@
1
+ # Core Guidelines
2
+
3
+ ## Ownership
4
+ - `packages/core` holds framework-agnostic domain types, application logic, ports, and small adapters that stay independent of app runtimes.
5
+ - This package is the shared contract between `apps/api` and `apps/web`.
6
+
7
+ ## Relevant Docs
8
+ - `docs/concepts/mental-model.md`
9
+ - `docs/concepts/tentacles.md`
10
+ - `docs/concepts/runtime-and-api.md`
11
+ - `docs/reference/api.md`
12
+ - `docs/reference/filesystem-layout.md`
13
+ - Read these when changing shared domain terminology, runtime contracts, persistence-facing types, or cross-app behavior.
14
+
15
+ ## Boundaries
16
+ - No React, HTTP server, PTY, process execution, filesystem persistence, or browser-specific behavior here.
17
+ - Prefer pure functions and explicit interfaces over runtime-coupled helpers.
18
+ - If logic needs app infrastructure to run, keep the interface in core and the implementation in the owning app.
19
+
20
+ ## Design
21
+ - Keep the ports-and-adapters split clear:
22
+ - `domain/` for core types and concepts
23
+ - `application/` for use-case logic
24
+ - `ports/` for system boundaries
25
+ - lightweight adapters only when they stay framework-agnostic
26
+ - Avoid leaking app-specific naming or transport details into shared types unless that detail is truly part of the domain contract.
27
+
28
+ ## Change Discipline
29
+ - Be cautious with exported types and functions. Changes here usually affect both apps.
30
+ - When modifying shared contracts, update the dependent call sites and add tests that pin the behavior from the core package outward.
31
+ - Prefer additive changes and normalization helpers over breaking contract churn.
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "@octogent/core",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "main": "./src/index.ts",
7
+ "types": "./src/index.ts",
8
+ "scripts": {
9
+ "build": "tsc -p tsconfig.json --noEmit",
10
+ "test": "vitest run"
11
+ }
12
+ }
@@ -0,0 +1,10 @@
1
+ import type { TerminalSnapshot } from "../domain/terminal";
2
+ import type { TerminalSnapshotReader } from "../ports/TerminalSnapshotReader";
3
+
4
+ export class InMemoryTerminalSnapshotReader implements TerminalSnapshotReader {
5
+ constructor(private readonly snapshots: TerminalSnapshot[]) {}
6
+
7
+ async listTerminalSnapshots(): Promise<TerminalSnapshot[]> {
8
+ return this.snapshots;
9
+ }
10
+ }
@@ -0,0 +1,13 @@
1
+ import type { TerminalSnapshotReader } from "../ports/TerminalSnapshotReader";
2
+
3
+ const byCreatedAtAscending = (a: string, b: string): number =>
4
+ new Date(a).getTime() - new Date(b).getTime();
5
+
6
+ export const buildTerminalList = async (
7
+ reader: TerminalSnapshotReader,
8
+ ): Promise<Awaited<ReturnType<typeof reader.listTerminalSnapshots>>> => {
9
+ const snapshots = await reader.listTerminalSnapshots();
10
+ return [...snapshots].sort((left, right) =>
11
+ byCreatedAtAscending(left.createdAt, right.createdAt),
12
+ );
13
+ };
@@ -0,0 +1,18 @@
1
+ export type AgentRuntimeState =
2
+ | "idle"
3
+ | "processing"
4
+ | "waiting_for_permission"
5
+ | "waiting_for_user";
6
+
7
+ export const isAgentRuntimeState = (value: unknown): value is AgentRuntimeState =>
8
+ value === "idle" ||
9
+ value === "processing" ||
10
+ value === "waiting_for_permission" ||
11
+ value === "waiting_for_user";
12
+
13
+ export type TerminalAgentProvider = "codex" | "claude-code";
14
+
15
+ export const TERMINAL_AGENT_PROVIDERS: TerminalAgentProvider[] = ["codex", "claude-code"];
16
+
17
+ export const isTerminalAgentProvider = (value: unknown): value is TerminalAgentProvider =>
18
+ typeof value === "string" && TERMINAL_AGENT_PROVIDERS.includes(value as TerminalAgentProvider);
@@ -0,0 +1,8 @@
1
+ export type ChannelMessage = {
2
+ messageId: string;
3
+ fromTerminalId: string;
4
+ toTerminalId: string;
5
+ content: string;
6
+ timestamp: string;
7
+ delivered: boolean;
8
+ };
@@ -0,0 +1,14 @@
1
+ export const TERMINAL_COMPLETION_SOUND_IDS = [
2
+ "soft-chime",
3
+ "retro-beep",
4
+ "double-beep",
5
+ "bell",
6
+ "pop",
7
+ "silent",
8
+ ] as const;
9
+
10
+ export type TerminalCompletionSoundId = (typeof TERMINAL_COMPLETION_SOUND_IDS)[number];
11
+
12
+ export const isTerminalCompletionSoundId = (value: unknown): value is TerminalCompletionSoundId =>
13
+ typeof value === "string" &&
14
+ TERMINAL_COMPLETION_SOUND_IDS.includes(value as TerminalCompletionSoundId);
@@ -0,0 +1,48 @@
1
+ export type ConversationTurn = {
2
+ turnId: string;
3
+ role: "user" | "assistant";
4
+ content: string;
5
+ startedAt: string;
6
+ endedAt: string;
7
+ };
8
+
9
+ export type ConversationTranscriptEvent = {
10
+ eventId: string;
11
+ sessionId: string;
12
+ tentacleId: string;
13
+ timestamp: string;
14
+ type: "session_start" | "input_submit" | "output_chunk" | "state_change" | "session_end";
15
+ };
16
+
17
+ export type ConversationSessionSummary = {
18
+ sessionId: string;
19
+ tentacleId: string | null;
20
+ startedAt: string | null;
21
+ endedAt: string | null;
22
+ lastEventAt: string | null;
23
+ eventCount: number;
24
+ turnCount: number;
25
+ userTurnCount: number;
26
+ assistantTurnCount: number;
27
+ firstUserTurnPreview: string | null;
28
+ lastUserTurnPreview: string | null;
29
+ lastAssistantTurnPreview: string | null;
30
+ };
31
+
32
+ export type ConversationSessionDetail = ConversationSessionSummary & {
33
+ turns: ConversationTurn[];
34
+ events: ConversationTranscriptEvent[];
35
+ };
36
+
37
+ export type ConversationSearchHit = {
38
+ sessionId: string;
39
+ turnId: string;
40
+ role: "user" | "assistant";
41
+ snippet: string;
42
+ turnStartedAt: string;
43
+ };
44
+
45
+ export type ConversationSearchResult = {
46
+ query: string;
47
+ hits: ConversationSearchHit[];
48
+ };
@@ -0,0 +1,33 @@
1
+ export type DeckTentacleStatus = "idle" | "active" | "blocked" | "needs-review";
2
+
3
+ export type DeckOctopusAppearance = {
4
+ animation: string | null;
5
+ /** Valid: "normal" | "happy" | "angry" | "surprised". "sleepy" is reserved for idle state — never assign on creation. */
6
+ expression: string | null;
7
+ accessory: string | null;
8
+ hairColor: string | null;
9
+ };
10
+
11
+ export type DeckAvailableSkill = {
12
+ name: string;
13
+ description: string;
14
+ source: "project" | "user";
15
+ };
16
+
17
+ export type DeckTentacleSummary = {
18
+ tentacleId: string;
19
+ displayName: string;
20
+ description: string;
21
+ status: DeckTentacleStatus;
22
+ color: string | null;
23
+ octopus: DeckOctopusAppearance;
24
+ scope: {
25
+ paths: string[];
26
+ tags: string[];
27
+ };
28
+ vaultFiles: string[];
29
+ todoTotal: number;
30
+ todoDone: number;
31
+ todoItems: { text: string; done: boolean }[];
32
+ suggestedSkills: string[];
33
+ };
@@ -0,0 +1,32 @@
1
+ import type { TentacleWorkspaceMode } from "./terminal";
2
+
3
+ export type TentaclePullRequestStatus = "none" | "open" | "merged" | "closed";
4
+
5
+ export type TentacleGitStatusSnapshot = {
6
+ tentacleId: string;
7
+ workspaceMode: TentacleWorkspaceMode;
8
+ branchName: string;
9
+ upstreamBranchName: string | null;
10
+ isDirty: boolean;
11
+ aheadCount: number;
12
+ behindCount: number;
13
+ insertedLineCount: number;
14
+ deletedLineCount: number;
15
+ hasConflicts: boolean;
16
+ changedFiles: string[];
17
+ defaultBaseBranchName: string | null;
18
+ };
19
+
20
+ export type TentaclePullRequestSnapshot = {
21
+ tentacleId: string;
22
+ workspaceMode: TentacleWorkspaceMode;
23
+ status: TentaclePullRequestStatus;
24
+ number: number | null;
25
+ url: string | null;
26
+ title: string | null;
27
+ baseRef: string | null;
28
+ headRef: string | null;
29
+ isDraft: boolean | null;
30
+ mergeable: "MERGEABLE" | "CONFLICTING" | "UNKNOWN" | null;
31
+ mergeStateStatus: string | null;
32
+ };
@@ -0,0 +1,62 @@
1
+ export type MonitorUsageSnapshot = {
2
+ status: "ok" | "unavailable" | "error";
3
+ source: "x-api" | "none";
4
+ fetchedAt: string;
5
+ message?: string | null;
6
+ cap?: number | null;
7
+ used?: number | null;
8
+ remaining?: number | null;
9
+ resetAt?: string | null;
10
+ };
11
+
12
+ export type MonitorPost = {
13
+ source: "x";
14
+ id: string;
15
+ text: string;
16
+ author: string;
17
+ createdAt: string;
18
+ likeCount: number;
19
+ permalink: string;
20
+ matchedQueryTerm: string | null;
21
+ };
22
+
23
+ export type MonitorCredentialSummary = {
24
+ isConfigured: boolean;
25
+ bearerTokenHint: string | null;
26
+ apiKeyHint: string | null;
27
+ hasApiSecret: boolean;
28
+ hasAccessToken: boolean;
29
+ hasAccessTokenSecret: boolean;
30
+ updatedAt: string | null;
31
+ };
32
+
33
+ export type MonitorConfigSnapshot = {
34
+ providerId: "x";
35
+ queryTerms: string[];
36
+ refreshPolicy: {
37
+ maxCacheAgeMs: number;
38
+ maxPosts: number;
39
+ searchWindowDays: 1 | 3 | 7;
40
+ };
41
+ providers: {
42
+ x: {
43
+ credentials: MonitorCredentialSummary;
44
+ };
45
+ };
46
+ };
47
+
48
+ export type MonitorFeedSnapshot = {
49
+ providerId: "x";
50
+ queryTerms: string[];
51
+ refreshPolicy: {
52
+ maxCacheAgeMs: number;
53
+ maxPosts: number;
54
+ searchWindowDays: 1 | 3 | 7;
55
+ };
56
+ lastFetchedAt: string | null;
57
+ staleAfter: string | null;
58
+ isStale: boolean;
59
+ lastError: string | null;
60
+ posts: MonitorPost[];
61
+ usage: MonitorUsageSnapshot | null;
62
+ };
@@ -0,0 +1,27 @@
1
+ export type WorkspaceSetupStepId =
2
+ | "initialize-workspace"
3
+ | "ensure-gitignore"
4
+ | "check-claude"
5
+ | "check-git"
6
+ | "check-curl"
7
+ | "create-tentacles";
8
+
9
+ export type WorkspaceSetupStep = {
10
+ id: WorkspaceSetupStepId;
11
+ title: string;
12
+ description: string;
13
+ complete: boolean;
14
+ required: boolean;
15
+ actionLabel: string | null;
16
+ statusText: string;
17
+ guidance: string | null;
18
+ command: string | null;
19
+ };
20
+
21
+ export type WorkspaceSetupSnapshot = {
22
+ isFirstRun: boolean;
23
+ shouldShowSetupCard: boolean;
24
+ hasAnyTentacles: boolean;
25
+ tentacleCount: number;
26
+ steps: WorkspaceSetupStep[];
27
+ };