@getpaseo/server 0.1.16 → 0.1.17

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 (346) hide show
  1. package/dist/scripts/daemon-runner.js +53 -14
  2. package/dist/scripts/daemon-runner.js.map +1 -1
  3. package/dist/scripts/dev-runner.js +9 -16
  4. package/dist/scripts/dev-runner.js.map +1 -1
  5. package/dist/scripts/supervisor.js +40 -13
  6. package/dist/scripts/supervisor.js.map +1 -1
  7. package/dist/server/client/daemon-client.d.ts +23 -3
  8. package/dist/server/client/daemon-client.d.ts.map +1 -1
  9. package/dist/server/client/daemon-client.js +81 -8
  10. package/dist/server/client/daemon-client.js.map +1 -1
  11. package/dist/server/server/agent/agent-manager.d.ts +3 -1
  12. package/dist/server/server/agent/agent-manager.d.ts.map +1 -1
  13. package/dist/server/server/agent/agent-manager.js +146 -24
  14. package/dist/server/server/agent/agent-manager.js.map +1 -1
  15. package/dist/server/server/agent/agent-metadata-generator.d.ts.map +1 -1
  16. package/dist/server/server/agent/agent-metadata-generator.js +13 -4
  17. package/dist/server/server/agent/agent-metadata-generator.js.map +1 -1
  18. package/dist/server/server/agent/agent-response-loop.js +1 -1
  19. package/dist/server/server/agent/agent-response-loop.js.map +1 -1
  20. package/dist/server/server/agent/agent-sdk-types.d.ts +9 -0
  21. package/dist/server/server/agent/agent-sdk-types.d.ts.map +1 -1
  22. package/dist/server/server/agent/agent-sdk-types.js +11 -1
  23. package/dist/server/server/agent/agent-sdk-types.js.map +1 -1
  24. package/dist/server/server/agent/agent-storage.d.ts +5 -1
  25. package/dist/server/server/agent/agent-storage.d.ts.map +1 -1
  26. package/dist/server/server/agent/agent-storage.js +41 -72
  27. package/dist/server/server/agent/agent-storage.js.map +1 -1
  28. package/dist/server/server/agent/agent-title-limits.d.ts +3 -0
  29. package/dist/server/server/agent/agent-title-limits.d.ts.map +1 -0
  30. package/dist/server/server/agent/agent-title-limits.js +3 -0
  31. package/dist/server/server/agent/agent-title-limits.js.map +1 -0
  32. package/dist/server/server/agent/providers/claude/model-catalog.d.ts +29 -0
  33. package/dist/server/server/agent/providers/claude/model-catalog.d.ts.map +1 -0
  34. package/dist/server/server/agent/providers/claude/model-catalog.js +70 -0
  35. package/dist/server/server/agent/providers/claude/model-catalog.js.map +1 -0
  36. package/dist/server/server/agent/providers/claude/task-notification-tool-call.d.ts +44 -0
  37. package/dist/server/server/agent/providers/claude/task-notification-tool-call.d.ts.map +1 -0
  38. package/dist/server/server/agent/providers/claude/task-notification-tool-call.js +250 -0
  39. package/dist/server/server/agent/providers/claude/task-notification-tool-call.js.map +1 -0
  40. package/dist/server/server/agent/providers/claude/tool-call-detail-parser.d.ts.map +1 -1
  41. package/dist/server/server/agent/providers/claude/tool-call-detail-parser.js +15 -0
  42. package/dist/server/server/agent/providers/claude/tool-call-detail-parser.js.map +1 -1
  43. package/dist/server/server/agent/providers/claude-agent.d.ts +3 -2
  44. package/dist/server/server/agent/providers/claude-agent.d.ts.map +1 -1
  45. package/dist/server/server/agent/providers/claude-agent.js +240 -106
  46. package/dist/server/server/agent/providers/claude-agent.js.map +1 -1
  47. package/dist/server/server/agent/providers/codex/tool-call-mapper.d.ts.map +1 -1
  48. package/dist/server/server/agent/providers/codex/tool-call-mapper.js +81 -28
  49. package/dist/server/server/agent/providers/codex/tool-call-mapper.js.map +1 -1
  50. package/dist/server/server/agent/providers/codex-app-server-agent.d.ts.map +1 -1
  51. package/dist/server/server/agent/providers/codex-app-server-agent.js +31 -5
  52. package/dist/server/server/agent/providers/codex-app-server-agent.js.map +1 -1
  53. package/dist/server/server/agent/providers/opencode-agent.d.ts +10 -1
  54. package/dist/server/server/agent/providers/opencode-agent.d.ts.map +1 -1
  55. package/dist/server/server/agent/providers/opencode-agent.js +207 -176
  56. package/dist/server/server/agent/providers/opencode-agent.js.map +1 -1
  57. package/dist/server/server/agent/providers/tool-call-detail-primitives.d.ts +15 -0
  58. package/dist/server/server/agent/providers/tool-call-detail-primitives.d.ts.map +1 -1
  59. package/dist/server/server/agent/timeline-projection.d.ts +20 -0
  60. package/dist/server/server/agent/timeline-projection.d.ts.map +1 -1
  61. package/dist/server/server/agent/timeline-projection.js +73 -0
  62. package/dist/server/server/agent/timeline-projection.js.map +1 -1
  63. package/dist/server/server/bootstrap.d.ts +15 -0
  64. package/dist/server/server/bootstrap.d.ts.map +1 -1
  65. package/dist/server/server/bootstrap.js +27 -4
  66. package/dist/server/server/bootstrap.js.map +1 -1
  67. package/dist/server/server/file-download/token-store.d.ts +0 -1
  68. package/dist/server/server/file-download/token-store.d.ts.map +1 -1
  69. package/dist/server/server/file-download/token-store.js.map +1 -1
  70. package/dist/server/server/file-explorer/service.d.ts.map +1 -1
  71. package/dist/server/server/file-explorer/service.js +56 -36
  72. package/dist/server/server/file-explorer/service.js.map +1 -1
  73. package/dist/server/server/index.js +85 -29
  74. package/dist/server/server/index.js.map +1 -1
  75. package/dist/server/server/logger.d.ts +24 -3
  76. package/dist/server/server/logger.d.ts.map +1 -1
  77. package/dist/server/server/logger.js +157 -21
  78. package/dist/server/server/logger.js.map +1 -1
  79. package/dist/server/server/persisted-config.d.ts +86 -0
  80. package/dist/server/server/persisted-config.d.ts.map +1 -1
  81. package/dist/server/server/persisted-config.js +25 -3
  82. package/dist/server/server/persisted-config.js.map +1 -1
  83. package/dist/server/server/pid-lock.d.ts +6 -2
  84. package/dist/server/server/pid-lock.d.ts.map +1 -1
  85. package/dist/server/server/pid-lock.js +7 -10
  86. package/dist/server/server/pid-lock.js.map +1 -1
  87. package/dist/server/server/relay-transport.d.ts.map +1 -1
  88. package/dist/server/server/relay-transport.js +1 -0
  89. package/dist/server/server/relay-transport.js.map +1 -1
  90. package/dist/server/server/session.d.ts +57 -3
  91. package/dist/server/server/session.d.ts.map +1 -1
  92. package/dist/server/server/session.js +755 -182
  93. package/dist/server/server/session.js.map +1 -1
  94. package/dist/server/server/websocket-server.d.ts +16 -1
  95. package/dist/server/server/websocket-server.d.ts.map +1 -1
  96. package/dist/server/server/websocket-server.js +135 -9
  97. package/dist/server/server/websocket-server.js.map +1 -1
  98. package/dist/server/server/worktree-bootstrap.d.ts.map +1 -1
  99. package/dist/server/server/worktree-bootstrap.js +45 -2
  100. package/dist/server/server/worktree-bootstrap.js.map +1 -1
  101. package/dist/server/shared/messages.d.ts +2841 -541
  102. package/dist/server/shared/messages.d.ts.map +1 -1
  103. package/dist/server/shared/messages.js +99 -5
  104. package/dist/server/shared/messages.js.map +1 -1
  105. package/dist/server/shared/tool-call-display.d.ts.map +1 -1
  106. package/dist/server/shared/tool-call-display.js +3 -0
  107. package/dist/server/shared/tool-call-display.js.map +1 -1
  108. package/dist/server/terminal/terminal-manager.d.ts.map +1 -1
  109. package/dist/server/terminal/terminal-manager.js +1 -13
  110. package/dist/server/terminal/terminal-manager.js.map +1 -1
  111. package/dist/server/terminal/terminal.d.ts.map +1 -1
  112. package/dist/server/terminal/terminal.js +29 -5
  113. package/dist/server/terminal/terminal.js.map +1 -1
  114. package/dist/server/utils/worktree.d.ts +1 -0
  115. package/dist/server/utils/worktree.d.ts.map +1 -1
  116. package/dist/server/utils/worktree.js +17 -2
  117. package/dist/server/utils/worktree.js.map +1 -1
  118. package/dist/src/server/agent/activity-curator.js +228 -0
  119. package/dist/src/server/agent/activity-curator.js.map +1 -0
  120. package/dist/src/server/agent/agent-manager.js +1712 -0
  121. package/dist/src/server/agent/agent-manager.js.map +1 -0
  122. package/dist/src/server/agent/agent-metadata-generator.js +163 -0
  123. package/dist/src/server/agent/agent-metadata-generator.js.map +1 -0
  124. package/dist/src/server/agent/agent-projections.js +262 -0
  125. package/dist/src/server/agent/agent-projections.js.map +1 -0
  126. package/dist/src/server/agent/agent-response-loop.js +304 -0
  127. package/dist/src/server/agent/agent-response-loop.js.map +1 -0
  128. package/dist/src/server/agent/agent-sdk-types.js +12 -0
  129. package/dist/src/server/agent/agent-sdk-types.js.map +1 -0
  130. package/dist/src/server/agent/agent-storage.js +299 -0
  131. package/dist/src/server/agent/agent-storage.js.map +1 -0
  132. package/dist/src/server/agent/agent-title-limits.js +3 -0
  133. package/dist/src/server/agent/agent-title-limits.js.map +1 -0
  134. package/dist/src/server/agent/audio-utils.js +19 -0
  135. package/dist/src/server/agent/audio-utils.js.map +1 -0
  136. package/dist/src/server/agent/dictation-debug.js +50 -0
  137. package/dist/src/server/agent/dictation-debug.js.map +1 -0
  138. package/dist/src/server/agent/mcp-server.js +787 -0
  139. package/dist/src/server/agent/mcp-server.js.map +1 -0
  140. package/dist/src/server/agent/orchestrator-instructions.js +51 -0
  141. package/dist/src/server/agent/orchestrator-instructions.js.map +1 -0
  142. package/dist/src/server/agent/pcm16-resampler.js +63 -0
  143. package/dist/src/server/agent/pcm16-resampler.js.map +1 -0
  144. package/dist/src/server/agent/provider-launch-config.js +83 -0
  145. package/dist/src/server/agent/provider-launch-config.js.map +1 -0
  146. package/dist/src/server/agent/provider-manifest.js +97 -0
  147. package/dist/src/server/agent/provider-manifest.js.map +1 -0
  148. package/dist/src/server/agent/provider-registry.js +45 -0
  149. package/dist/src/server/agent/provider-registry.js.map +1 -0
  150. package/dist/src/server/agent/providers/claude/model-catalog.js +70 -0
  151. package/dist/src/server/agent/providers/claude/model-catalog.js.map +1 -0
  152. package/dist/src/server/agent/providers/claude/task-notification-tool-call.js +250 -0
  153. package/dist/src/server/agent/providers/claude/task-notification-tool-call.js.map +1 -0
  154. package/dist/src/server/agent/providers/claude/tool-call-detail-parser.js +109 -0
  155. package/dist/src/server/agent/providers/claude/tool-call-detail-parser.js.map +1 -0
  156. package/dist/src/server/agent/providers/claude/tool-call-mapper.js +238 -0
  157. package/dist/src/server/agent/providers/claude/tool-call-mapper.js.map +1 -0
  158. package/dist/src/server/agent/providers/claude-agent.js +3747 -0
  159. package/dist/src/server/agent/providers/claude-agent.js.map +1 -0
  160. package/dist/src/server/agent/providers/codex/tool-call-detail-parser.js +104 -0
  161. package/dist/src/server/agent/providers/codex/tool-call-detail-parser.js.map +1 -0
  162. package/dist/src/server/agent/providers/codex/tool-call-mapper.js +720 -0
  163. package/dist/src/server/agent/providers/codex/tool-call-mapper.js.map +1 -0
  164. package/dist/src/server/agent/providers/codex-app-server-agent.js +2601 -0
  165. package/dist/src/server/agent/providers/codex-app-server-agent.js.map +1 -0
  166. package/dist/src/server/agent/providers/codex-rollout-timeline.js +487 -0
  167. package/dist/src/server/agent/providers/codex-rollout-timeline.js.map +1 -0
  168. package/dist/src/server/agent/providers/opencode/tool-call-detail-parser.js +39 -0
  169. package/dist/src/server/agent/providers/opencode/tool-call-detail-parser.js.map +1 -0
  170. package/dist/src/server/agent/providers/opencode/tool-call-mapper.js +151 -0
  171. package/dist/src/server/agent/providers/opencode/tool-call-mapper.js.map +1 -0
  172. package/dist/src/server/agent/providers/opencode-agent.js +905 -0
  173. package/dist/src/server/agent/providers/opencode-agent.js.map +1 -0
  174. package/dist/src/server/agent/providers/tool-call-detail-primitives.js +552 -0
  175. package/dist/src/server/agent/providers/tool-call-detail-primitives.js.map +1 -0
  176. package/dist/src/server/agent/providers/tool-call-mapper-utils.js +109 -0
  177. package/dist/src/server/agent/providers/tool-call-mapper-utils.js.map +1 -0
  178. package/dist/src/server/agent/recordings-debug.js +19 -0
  179. package/dist/src/server/agent/recordings-debug.js.map +1 -0
  180. package/dist/src/server/agent/stt-debug.js +33 -0
  181. package/dist/src/server/agent/stt-debug.js.map +1 -0
  182. package/dist/src/server/agent/stt-manager.js +233 -0
  183. package/dist/src/server/agent/stt-manager.js.map +1 -0
  184. package/dist/src/server/agent/timeline-append.js +27 -0
  185. package/dist/src/server/agent/timeline-append.js.map +1 -0
  186. package/dist/src/server/agent/timeline-projection.js +215 -0
  187. package/dist/src/server/agent/timeline-projection.js.map +1 -0
  188. package/dist/src/server/agent/tool-name-normalization.js +45 -0
  189. package/dist/src/server/agent/tool-name-normalization.js.map +1 -0
  190. package/dist/src/server/agent/tts-debug.js +24 -0
  191. package/dist/src/server/agent/tts-debug.js.map +1 -0
  192. package/dist/src/server/agent/tts-manager.js +249 -0
  193. package/dist/src/server/agent/tts-manager.js.map +1 -0
  194. package/dist/src/server/agent/wait-for-agent-tracker.js +53 -0
  195. package/dist/src/server/agent/wait-for-agent-tracker.js.map +1 -0
  196. package/dist/src/server/agent-attention-policy.js +40 -0
  197. package/dist/src/server/agent-attention-policy.js.map +1 -0
  198. package/dist/src/server/allowed-hosts.js +94 -0
  199. package/dist/src/server/allowed-hosts.js.map +1 -0
  200. package/dist/src/server/bootstrap.js +498 -0
  201. package/dist/src/server/bootstrap.js.map +1 -0
  202. package/dist/src/server/client-message-id.js +12 -0
  203. package/dist/src/server/client-message-id.js.map +1 -0
  204. package/dist/src/server/config.js +84 -0
  205. package/dist/src/server/config.js.map +1 -0
  206. package/dist/src/server/connection-offer.js +60 -0
  207. package/dist/src/server/connection-offer.js.map +1 -0
  208. package/dist/src/server/daemon-keypair.js +40 -0
  209. package/dist/src/server/daemon-keypair.js.map +1 -0
  210. package/dist/src/server/daemon-version.js +22 -0
  211. package/dist/src/server/daemon-version.js.map +1 -0
  212. package/dist/src/server/dictation/dictation-stream-manager.js +568 -0
  213. package/dist/src/server/dictation/dictation-stream-manager.js.map +1 -0
  214. package/dist/src/server/file-download/token-store.js +40 -0
  215. package/dist/src/server/file-download/token-store.js.map +1 -0
  216. package/dist/src/server/file-explorer/service.js +183 -0
  217. package/dist/src/server/file-explorer/service.js.map +1 -0
  218. package/dist/src/server/json-utils.js +45 -0
  219. package/dist/src/server/json-utils.js.map +1 -0
  220. package/dist/src/server/messages.js +29 -0
  221. package/dist/src/server/messages.js.map +1 -0
  222. package/dist/src/server/package-version.js +47 -0
  223. package/dist/src/server/package-version.js.map +1 -0
  224. package/dist/src/server/paseo-home.js +19 -0
  225. package/dist/src/server/paseo-home.js.map +1 -0
  226. package/dist/src/server/path-utils.js +20 -0
  227. package/dist/src/server/path-utils.js.map +1 -0
  228. package/dist/src/server/persisted-config.js +259 -0
  229. package/dist/src/server/persisted-config.js.map +1 -0
  230. package/dist/src/server/persistence-hooks.js +60 -0
  231. package/dist/src/server/persistence-hooks.js.map +1 -0
  232. package/dist/src/server/pid-lock.js +126 -0
  233. package/dist/src/server/pid-lock.js.map +1 -0
  234. package/dist/src/server/push/push-service.js +68 -0
  235. package/dist/src/server/push/push-service.js.map +1 -0
  236. package/dist/src/server/push/token-store.js +70 -0
  237. package/dist/src/server/push/token-store.js.map +1 -0
  238. package/dist/src/server/relay-transport.js +457 -0
  239. package/dist/src/server/relay-transport.js.map +1 -0
  240. package/dist/src/server/server-id.js +63 -0
  241. package/dist/src/server/server-id.js.map +1 -0
  242. package/dist/src/server/session.js +5947 -0
  243. package/dist/src/server/session.js.map +1 -0
  244. package/dist/src/server/speech/audio.js +101 -0
  245. package/dist/src/server/speech/audio.js.map +1 -0
  246. package/dist/src/server/speech/provider-resolver.js +7 -0
  247. package/dist/src/server/speech/provider-resolver.js.map +1 -0
  248. package/dist/src/server/speech/providers/local/config.js +83 -0
  249. package/dist/src/server/speech/providers/local/config.js.map +1 -0
  250. package/dist/src/server/speech/providers/local/models.js +17 -0
  251. package/dist/src/server/speech/providers/local/models.js.map +1 -0
  252. package/dist/src/server/speech/providers/local/pocket/pocket-tts-onnx.js +422 -0
  253. package/dist/src/server/speech/providers/local/pocket/pocket-tts-onnx.js.map +1 -0
  254. package/dist/src/server/speech/providers/local/runtime.js +253 -0
  255. package/dist/src/server/speech/providers/local/runtime.js.map +1 -0
  256. package/dist/src/server/speech/providers/local/sherpa/model-catalog.js +166 -0
  257. package/dist/src/server/speech/providers/local/sherpa/model-catalog.js.map +1 -0
  258. package/dist/src/server/speech/providers/local/sherpa/model-downloader.js +165 -0
  259. package/dist/src/server/speech/providers/local/sherpa/model-downloader.js.map +1 -0
  260. package/dist/src/server/speech/providers/local/sherpa/sherpa-offline-recognizer.js +68 -0
  261. package/dist/src/server/speech/providers/local/sherpa/sherpa-offline-recognizer.js.map +1 -0
  262. package/dist/src/server/speech/providers/local/sherpa/sherpa-online-recognizer.js +79 -0
  263. package/dist/src/server/speech/providers/local/sherpa/sherpa-online-recognizer.js.map +1 -0
  264. package/dist/src/server/speech/providers/local/sherpa/sherpa-onnx-loader.js +11 -0
  265. package/dist/src/server/speech/providers/local/sherpa/sherpa-onnx-loader.js.map +1 -0
  266. package/dist/src/server/speech/providers/local/sherpa/sherpa-onnx-node-loader.js +102 -0
  267. package/dist/src/server/speech/providers/local/sherpa/sherpa-onnx-node-loader.js.map +1 -0
  268. package/dist/src/server/speech/providers/local/sherpa/sherpa-parakeet-realtime-session.js +131 -0
  269. package/dist/src/server/speech/providers/local/sherpa/sherpa-parakeet-realtime-session.js.map +1 -0
  270. package/dist/src/server/speech/providers/local/sherpa/sherpa-parakeet-stt.js +132 -0
  271. package/dist/src/server/speech/providers/local/sherpa/sherpa-parakeet-stt.js.map +1 -0
  272. package/dist/src/server/speech/providers/local/sherpa/sherpa-realtime-session.js +112 -0
  273. package/dist/src/server/speech/providers/local/sherpa/sherpa-realtime-session.js.map +1 -0
  274. package/dist/src/server/speech/providers/local/sherpa/sherpa-stt.js +140 -0
  275. package/dist/src/server/speech/providers/local/sherpa/sherpa-stt.js.map +1 -0
  276. package/dist/src/server/speech/providers/local/sherpa/sherpa-tts.js +95 -0
  277. package/dist/src/server/speech/providers/local/sherpa/sherpa-tts.js.map +1 -0
  278. package/dist/src/server/speech/providers/openai/config.js +99 -0
  279. package/dist/src/server/speech/providers/openai/config.js.map +1 -0
  280. package/dist/src/server/speech/providers/openai/realtime-transcription-session.js +165 -0
  281. package/dist/src/server/speech/providers/openai/realtime-transcription-session.js.map +1 -0
  282. package/dist/src/server/speech/providers/openai/runtime.js +114 -0
  283. package/dist/src/server/speech/providers/openai/runtime.js.map +1 -0
  284. package/dist/src/server/speech/providers/openai/stt.js +208 -0
  285. package/dist/src/server/speech/providers/openai/stt.js.map +1 -0
  286. package/dist/src/server/speech/providers/openai/tts.js +46 -0
  287. package/dist/src/server/speech/providers/openai/tts.js.map +1 -0
  288. package/dist/src/server/speech/speech-config-resolver.js +85 -0
  289. package/dist/src/server/speech/speech-config-resolver.js.map +1 -0
  290. package/dist/src/server/speech/speech-provider.js +2 -0
  291. package/dist/src/server/speech/speech-provider.js.map +1 -0
  292. package/dist/src/server/speech/speech-runtime.js +497 -0
  293. package/dist/src/server/speech/speech-runtime.js.map +1 -0
  294. package/dist/src/server/speech/speech-types.js +8 -0
  295. package/dist/src/server/speech/speech-types.js.map +1 -0
  296. package/dist/src/server/utils/diff-highlighter.js +244 -0
  297. package/dist/src/server/utils/diff-highlighter.js.map +1 -0
  298. package/dist/src/server/utils/syntax-highlighter.js +145 -0
  299. package/dist/src/server/utils/syntax-highlighter.js.map +1 -0
  300. package/dist/src/server/voice-config.js +51 -0
  301. package/dist/src/server/voice-config.js.map +1 -0
  302. package/dist/src/server/voice-mcp-bridge-command.js +31 -0
  303. package/dist/src/server/voice-mcp-bridge-command.js.map +1 -0
  304. package/dist/src/server/voice-mcp-bridge.js +109 -0
  305. package/dist/src/server/voice-mcp-bridge.js.map +1 -0
  306. package/dist/src/server/voice-permission-policy.js +13 -0
  307. package/dist/src/server/voice-permission-policy.js.map +1 -0
  308. package/dist/src/server/voice-types.js +2 -0
  309. package/dist/src/server/voice-types.js.map +1 -0
  310. package/dist/src/server/websocket-server.js +967 -0
  311. package/dist/src/server/websocket-server.js.map +1 -0
  312. package/dist/src/server/worktree-bootstrap.js +497 -0
  313. package/dist/src/server/worktree-bootstrap.js.map +1 -0
  314. package/dist/src/shared/agent-attention-notification.js +130 -0
  315. package/dist/src/shared/agent-attention-notification.js.map +1 -0
  316. package/dist/src/shared/agent-lifecycle.js +8 -0
  317. package/dist/src/shared/agent-lifecycle.js.map +1 -0
  318. package/dist/src/shared/binary-mux.js +114 -0
  319. package/dist/src/shared/binary-mux.js.map +1 -0
  320. package/dist/src/shared/connection-offer.js +17 -0
  321. package/dist/src/shared/connection-offer.js.map +1 -0
  322. package/dist/src/shared/daemon-endpoints.js +113 -0
  323. package/dist/src/shared/daemon-endpoints.js.map +1 -0
  324. package/dist/src/shared/messages.js +2001 -0
  325. package/dist/src/shared/messages.js.map +1 -0
  326. package/dist/src/shared/path-utils.js +16 -0
  327. package/dist/src/shared/path-utils.js.map +1 -0
  328. package/dist/src/shared/tool-call-display.js +93 -0
  329. package/dist/src/shared/tool-call-display.js.map +1 -0
  330. package/dist/src/terminal/terminal-manager.js +136 -0
  331. package/dist/src/terminal/terminal-manager.js.map +1 -0
  332. package/dist/src/terminal/terminal.js +410 -0
  333. package/dist/src/terminal/terminal.js.map +1 -0
  334. package/dist/src/utils/checkout-git.js +1397 -0
  335. package/dist/src/utils/checkout-git.js.map +1 -0
  336. package/dist/src/utils/directory-suggestions.js +655 -0
  337. package/dist/src/utils/directory-suggestions.js.map +1 -0
  338. package/dist/src/utils/path.js +15 -0
  339. package/dist/src/utils/path.js.map +1 -0
  340. package/dist/src/utils/project-icon.js +391 -0
  341. package/dist/src/utils/project-icon.js.map +1 -0
  342. package/dist/src/utils/worktree-metadata.js +116 -0
  343. package/dist/src/utils/worktree-metadata.js.map +1 -0
  344. package/dist/src/utils/worktree.js +741 -0
  345. package/dist/src/utils/worktree.js.map +1 -0
  346. package/package.json +14 -6
@@ -41,14 +41,20 @@ export declare const AgentStreamEventPayloadSchema: z.ZodDiscriminatedUnion<"typ
41
41
  type: z.ZodLiteral<"turn_failed">;
42
42
  provider: z.ZodEnum<[string, ...string[]]>;
43
43
  error: z.ZodString;
44
+ code: z.ZodOptional<z.ZodString>;
45
+ diagnostic: z.ZodOptional<z.ZodString>;
44
46
  }, "strip", z.ZodTypeAny, {
45
47
  error: string;
46
48
  provider: string;
47
49
  type: "turn_failed";
50
+ code?: string | undefined;
51
+ diagnostic?: string | undefined;
48
52
  }, {
49
53
  error: string;
50
54
  provider: string;
51
55
  type: "turn_failed";
56
+ code?: string | undefined;
57
+ diagnostic?: string | undefined;
52
58
  }>, z.ZodObject<{
53
59
  type: z.ZodLiteral<"turn_canceled">;
54
60
  provider: z.ZodEnum<[string, ...string[]]>;
@@ -473,6 +479,89 @@ export declare const FetchAgentsRequestMessageSchema: z.ZodObject<{
473
479
  subscriptionId?: string | undefined;
474
480
  } | undefined;
475
481
  }>;
482
+ declare const WorkspaceStateBucketSchema: z.ZodEnum<["needs_input", "failed", "running", "attention", "done"]>;
483
+ export declare const FetchWorkspacesRequestMessageSchema: z.ZodObject<{
484
+ type: z.ZodLiteral<"fetch_workspaces_request">;
485
+ requestId: z.ZodString;
486
+ filter: z.ZodOptional<z.ZodObject<{
487
+ query: z.ZodOptional<z.ZodString>;
488
+ projectId: z.ZodOptional<z.ZodString>;
489
+ idPrefix: z.ZodOptional<z.ZodString>;
490
+ }, "strip", z.ZodTypeAny, {
491
+ query?: string | undefined;
492
+ projectId?: string | undefined;
493
+ idPrefix?: string | undefined;
494
+ }, {
495
+ query?: string | undefined;
496
+ projectId?: string | undefined;
497
+ idPrefix?: string | undefined;
498
+ }>>;
499
+ sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
500
+ key: z.ZodEnum<["status_priority", "activity_at", "name", "project_id"]>;
501
+ direction: z.ZodEnum<["asc", "desc"]>;
502
+ }, "strip", z.ZodTypeAny, {
503
+ key: "name" | "status_priority" | "activity_at" | "project_id";
504
+ direction: "asc" | "desc";
505
+ }, {
506
+ key: "name" | "status_priority" | "activity_at" | "project_id";
507
+ direction: "asc" | "desc";
508
+ }>, "many">>;
509
+ page: z.ZodOptional<z.ZodObject<{
510
+ limit: z.ZodNumber;
511
+ cursor: z.ZodOptional<z.ZodString>;
512
+ }, "strip", z.ZodTypeAny, {
513
+ limit: number;
514
+ cursor?: string | undefined;
515
+ }, {
516
+ limit: number;
517
+ cursor?: string | undefined;
518
+ }>>;
519
+ subscribe: z.ZodOptional<z.ZodObject<{
520
+ subscriptionId: z.ZodOptional<z.ZodString>;
521
+ }, "strip", z.ZodTypeAny, {
522
+ subscriptionId?: string | undefined;
523
+ }, {
524
+ subscriptionId?: string | undefined;
525
+ }>>;
526
+ }, "strip", z.ZodTypeAny, {
527
+ type: "fetch_workspaces_request";
528
+ requestId: string;
529
+ sort?: {
530
+ key: "name" | "status_priority" | "activity_at" | "project_id";
531
+ direction: "asc" | "desc";
532
+ }[] | undefined;
533
+ filter?: {
534
+ query?: string | undefined;
535
+ projectId?: string | undefined;
536
+ idPrefix?: string | undefined;
537
+ } | undefined;
538
+ page?: {
539
+ limit: number;
540
+ cursor?: string | undefined;
541
+ } | undefined;
542
+ subscribe?: {
543
+ subscriptionId?: string | undefined;
544
+ } | undefined;
545
+ }, {
546
+ type: "fetch_workspaces_request";
547
+ requestId: string;
548
+ sort?: {
549
+ key: "name" | "status_priority" | "activity_at" | "project_id";
550
+ direction: "asc" | "desc";
551
+ }[] | undefined;
552
+ filter?: {
553
+ query?: string | undefined;
554
+ projectId?: string | undefined;
555
+ idPrefix?: string | undefined;
556
+ } | undefined;
557
+ page?: {
558
+ limit: number;
559
+ cursor?: string | undefined;
560
+ } | undefined;
561
+ subscribe?: {
562
+ subscriptionId?: string | undefined;
563
+ } | undefined;
564
+ }>;
476
565
  export declare const FetchAgentRequestMessageSchema: z.ZodObject<{
477
566
  type: z.ZodLiteral<"fetch_agent_request">;
478
567
  requestId: z.ZodString;
@@ -1161,6 +1250,16 @@ export declare const RestartServerRequestMessageSchema: z.ZodObject<{
1161
1250
  requestId: string;
1162
1251
  reason?: string | undefined;
1163
1252
  }>;
1253
+ export declare const ShutdownServerRequestMessageSchema: z.ZodObject<{
1254
+ type: z.ZodLiteral<"shutdown_server_request">;
1255
+ requestId: z.ZodString;
1256
+ }, "strip", z.ZodTypeAny, {
1257
+ type: "shutdown_server_request";
1258
+ requestId: string;
1259
+ }, {
1260
+ type: "shutdown_server_request";
1261
+ requestId: string;
1262
+ }>;
1164
1263
  export declare const AgentTimelineCursorSchema: z.ZodObject<{
1165
1264
  epoch: z.ZodString;
1166
1265
  seq: z.ZodNumber;
@@ -1732,19 +1831,19 @@ export declare const PaseoWorktreeArchiveRequestSchema: z.ZodObject<{
1732
1831
  }>;
1733
1832
  export declare const FileExplorerRequestSchema: z.ZodObject<{
1734
1833
  type: z.ZodLiteral<"file_explorer_request">;
1735
- agentId: z.ZodString;
1834
+ cwd: z.ZodString;
1736
1835
  path: z.ZodOptional<z.ZodString>;
1737
1836
  mode: z.ZodEnum<["list", "file"]>;
1738
1837
  requestId: z.ZodString;
1739
1838
  }, "strip", z.ZodTypeAny, {
1740
- agentId: string;
1741
1839
  mode: "file" | "list";
1840
+ cwd: string;
1742
1841
  type: "file_explorer_request";
1743
1842
  requestId: string;
1744
1843
  path?: string | undefined;
1745
1844
  }, {
1746
- agentId: string;
1747
1845
  mode: "file" | "list";
1846
+ cwd: string;
1748
1847
  type: "file_explorer_request";
1749
1848
  requestId: string;
1750
1849
  path?: string | undefined;
@@ -1764,16 +1863,16 @@ export declare const ProjectIconRequestSchema: z.ZodObject<{
1764
1863
  }>;
1765
1864
  export declare const FileDownloadTokenRequestSchema: z.ZodObject<{
1766
1865
  type: z.ZodLiteral<"file_download_token_request">;
1767
- agentId: z.ZodString;
1866
+ cwd: z.ZodString;
1768
1867
  path: z.ZodString;
1769
1868
  requestId: z.ZodString;
1770
1869
  }, "strip", z.ZodTypeAny, {
1771
- agentId: string;
1870
+ cwd: string;
1772
1871
  path: string;
1773
1872
  type: "file_download_token_request";
1774
1873
  requestId: string;
1775
1874
  }, {
1776
- agentId: string;
1875
+ cwd: string;
1777
1876
  path: string;
1778
1877
  type: "file_download_token_request";
1779
1878
  requestId: string;
@@ -2203,6 +2302,87 @@ export declare const SessionInboundMessageSchema: z.ZodDiscriminatedUnion<"type"
2203
2302
  subscribe?: {
2204
2303
  subscriptionId?: string | undefined;
2205
2304
  } | undefined;
2305
+ }>, z.ZodObject<{
2306
+ type: z.ZodLiteral<"fetch_workspaces_request">;
2307
+ requestId: z.ZodString;
2308
+ filter: z.ZodOptional<z.ZodObject<{
2309
+ query: z.ZodOptional<z.ZodString>;
2310
+ projectId: z.ZodOptional<z.ZodString>;
2311
+ idPrefix: z.ZodOptional<z.ZodString>;
2312
+ }, "strip", z.ZodTypeAny, {
2313
+ query?: string | undefined;
2314
+ projectId?: string | undefined;
2315
+ idPrefix?: string | undefined;
2316
+ }, {
2317
+ query?: string | undefined;
2318
+ projectId?: string | undefined;
2319
+ idPrefix?: string | undefined;
2320
+ }>>;
2321
+ sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
2322
+ key: z.ZodEnum<["status_priority", "activity_at", "name", "project_id"]>;
2323
+ direction: z.ZodEnum<["asc", "desc"]>;
2324
+ }, "strip", z.ZodTypeAny, {
2325
+ key: "name" | "status_priority" | "activity_at" | "project_id";
2326
+ direction: "asc" | "desc";
2327
+ }, {
2328
+ key: "name" | "status_priority" | "activity_at" | "project_id";
2329
+ direction: "asc" | "desc";
2330
+ }>, "many">>;
2331
+ page: z.ZodOptional<z.ZodObject<{
2332
+ limit: z.ZodNumber;
2333
+ cursor: z.ZodOptional<z.ZodString>;
2334
+ }, "strip", z.ZodTypeAny, {
2335
+ limit: number;
2336
+ cursor?: string | undefined;
2337
+ }, {
2338
+ limit: number;
2339
+ cursor?: string | undefined;
2340
+ }>>;
2341
+ subscribe: z.ZodOptional<z.ZodObject<{
2342
+ subscriptionId: z.ZodOptional<z.ZodString>;
2343
+ }, "strip", z.ZodTypeAny, {
2344
+ subscriptionId?: string | undefined;
2345
+ }, {
2346
+ subscriptionId?: string | undefined;
2347
+ }>>;
2348
+ }, "strip", z.ZodTypeAny, {
2349
+ type: "fetch_workspaces_request";
2350
+ requestId: string;
2351
+ sort?: {
2352
+ key: "name" | "status_priority" | "activity_at" | "project_id";
2353
+ direction: "asc" | "desc";
2354
+ }[] | undefined;
2355
+ filter?: {
2356
+ query?: string | undefined;
2357
+ projectId?: string | undefined;
2358
+ idPrefix?: string | undefined;
2359
+ } | undefined;
2360
+ page?: {
2361
+ limit: number;
2362
+ cursor?: string | undefined;
2363
+ } | undefined;
2364
+ subscribe?: {
2365
+ subscriptionId?: string | undefined;
2366
+ } | undefined;
2367
+ }, {
2368
+ type: "fetch_workspaces_request";
2369
+ requestId: string;
2370
+ sort?: {
2371
+ key: "name" | "status_priority" | "activity_at" | "project_id";
2372
+ direction: "asc" | "desc";
2373
+ }[] | undefined;
2374
+ filter?: {
2375
+ query?: string | undefined;
2376
+ projectId?: string | undefined;
2377
+ idPrefix?: string | undefined;
2378
+ } | undefined;
2379
+ page?: {
2380
+ limit: number;
2381
+ cursor?: string | undefined;
2382
+ } | undefined;
2383
+ subscribe?: {
2384
+ subscriptionId?: string | undefined;
2385
+ } | undefined;
2206
2386
  }>, z.ZodObject<{
2207
2387
  type: z.ZodLiteral<"fetch_agent_request">;
2208
2388
  requestId: z.ZodString;
@@ -2900,6 +3080,15 @@ export declare const SessionInboundMessageSchema: z.ZodDiscriminatedUnion<"type"
2900
3080
  }, {
2901
3081
  agentId: string;
2902
3082
  type: "cancel_agent_request";
3083
+ }>, z.ZodObject<{
3084
+ type: z.ZodLiteral<"shutdown_server_request">;
3085
+ requestId: z.ZodString;
3086
+ }, "strip", z.ZodTypeAny, {
3087
+ type: "shutdown_server_request";
3088
+ requestId: string;
3089
+ }, {
3090
+ type: "shutdown_server_request";
3091
+ requestId: string;
2903
3092
  }>, z.ZodObject<{
2904
3093
  type: z.ZodLiteral<"restart_server_request">;
2905
3094
  reason: z.ZodOptional<z.ZodString>;
@@ -3259,19 +3448,19 @@ export declare const SessionInboundMessageSchema: z.ZodDiscriminatedUnion<"type"
3259
3448
  repoRoot?: string | undefined;
3260
3449
  }>, z.ZodObject<{
3261
3450
  type: z.ZodLiteral<"file_explorer_request">;
3262
- agentId: z.ZodString;
3451
+ cwd: z.ZodString;
3263
3452
  path: z.ZodOptional<z.ZodString>;
3264
3453
  mode: z.ZodEnum<["list", "file"]>;
3265
3454
  requestId: z.ZodString;
3266
3455
  }, "strip", z.ZodTypeAny, {
3267
- agentId: string;
3268
3456
  mode: "file" | "list";
3457
+ cwd: string;
3269
3458
  type: "file_explorer_request";
3270
3459
  requestId: string;
3271
3460
  path?: string | undefined;
3272
3461
  }, {
3273
- agentId: string;
3274
3462
  mode: "file" | "list";
3463
+ cwd: string;
3275
3464
  type: "file_explorer_request";
3276
3465
  requestId: string;
3277
3466
  path?: string | undefined;
@@ -3289,16 +3478,16 @@ export declare const SessionInboundMessageSchema: z.ZodDiscriminatedUnion<"type"
3289
3478
  requestId: string;
3290
3479
  }>, z.ZodObject<{
3291
3480
  type: z.ZodLiteral<"file_download_token_request">;
3292
- agentId: z.ZodString;
3481
+ cwd: z.ZodString;
3293
3482
  path: z.ZodString;
3294
3483
  requestId: z.ZodString;
3295
3484
  }, "strip", z.ZodTypeAny, {
3296
- agentId: string;
3485
+ cwd: string;
3297
3486
  path: string;
3298
3487
  type: "file_download_token_request";
3299
3488
  requestId: string;
3300
3489
  }, {
3301
- agentId: string;
3490
+ cwd: string;
3302
3491
  path: string;
3303
3492
  type: "file_download_token_request";
3304
3493
  requestId: string;
@@ -4766,6 +4955,19 @@ export declare const RestartRequestedStatusPayloadSchema: z.ZodObject<{
4766
4955
  clientId: string;
4767
4956
  reason?: string | undefined;
4768
4957
  }>;
4958
+ export declare const ShutdownRequestedStatusPayloadSchema: z.ZodObject<{
4959
+ status: z.ZodLiteral<"shutdown_requested">;
4960
+ clientId: z.ZodString;
4961
+ requestId: z.ZodString;
4962
+ }, "strip", z.ZodTypeAny, {
4963
+ status: "shutdown_requested";
4964
+ requestId: string;
4965
+ clientId: string;
4966
+ }, {
4967
+ status: "shutdown_requested";
4968
+ requestId: string;
4969
+ clientId: string;
4970
+ }>;
4769
4971
  export declare const KnownStatusPayloadSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
4770
4972
  status: z.ZodLiteral<"agent_created">;
4771
4973
  agent: z.ZodObject<{
@@ -5081,6 +5283,18 @@ export declare const KnownStatusPayloadSchema: z.ZodDiscriminatedUnion<"status",
5081
5283
  status: "agent_refreshed";
5082
5284
  requestId: string;
5083
5285
  timelineSize?: number | undefined;
5286
+ }>, z.ZodObject<{
5287
+ status: z.ZodLiteral<"shutdown_requested">;
5288
+ clientId: z.ZodString;
5289
+ requestId: z.ZodString;
5290
+ }, "strip", z.ZodTypeAny, {
5291
+ status: "shutdown_requested";
5292
+ requestId: string;
5293
+ clientId: string;
5294
+ }, {
5295
+ status: "shutdown_requested";
5296
+ requestId: string;
5297
+ clientId: string;
5084
5298
  }>, z.ZodObject<{
5085
5299
  status: z.ZodLiteral<"restart_requested">;
5086
5300
  clientId: z.ZodString;
@@ -5386,6 +5600,25 @@ export declare const ProjectPlacementPayloadSchema: z.ZodObject<{
5386
5600
  mainRepoRoot: string;
5387
5601
  };
5388
5602
  }>;
5603
+ export declare const WorkspaceDescriptorPayloadSchema: z.ZodObject<{
5604
+ id: z.ZodString;
5605
+ projectId: z.ZodString;
5606
+ name: z.ZodString;
5607
+ status: z.ZodEnum<["needs_input", "failed", "running", "attention", "done"]>;
5608
+ activityAt: z.ZodNullable<z.ZodString>;
5609
+ }, "strip", z.ZodTypeAny, {
5610
+ id: string;
5611
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
5612
+ name: string;
5613
+ projectId: string;
5614
+ activityAt: string | null;
5615
+ }, {
5616
+ id: string;
5617
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
5618
+ name: string;
5619
+ projectId: string;
5620
+ activityAt: string | null;
5621
+ }>;
5389
5622
  export declare const AgentUpdateMessageSchema: z.ZodObject<{
5390
5623
  type: z.ZodLiteral<"agent_update">;
5391
5624
  payload: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -5864,14 +6097,20 @@ export declare const AgentStreamMessageSchema: z.ZodObject<{
5864
6097
  type: z.ZodLiteral<"turn_failed">;
5865
6098
  provider: z.ZodEnum<[string, ...string[]]>;
5866
6099
  error: z.ZodString;
6100
+ code: z.ZodOptional<z.ZodString>;
6101
+ diagnostic: z.ZodOptional<z.ZodString>;
5867
6102
  }, "strip", z.ZodTypeAny, {
5868
6103
  error: string;
5869
6104
  provider: string;
5870
6105
  type: "turn_failed";
6106
+ code?: string | undefined;
6107
+ diagnostic?: string | undefined;
5871
6108
  }, {
5872
6109
  error: string;
5873
6110
  provider: string;
5874
6111
  type: "turn_failed";
6112
+ code?: string | undefined;
6113
+ diagnostic?: string | undefined;
5875
6114
  }>, z.ZodObject<{
5876
6115
  type: z.ZodLiteral<"turn_canceled">;
5877
6116
  provider: z.ZodEnum<[string, ...string[]]>;
@@ -6014,6 +6253,8 @@ export declare const AgentStreamMessageSchema: z.ZodObject<{
6014
6253
  error: string;
6015
6254
  provider: string;
6016
6255
  type: "turn_failed";
6256
+ code?: string | undefined;
6257
+ diagnostic?: string | undefined;
6017
6258
  } | {
6018
6259
  reason: string;
6019
6260
  provider: string;
@@ -6067,6 +6308,8 @@ export declare const AgentStreamMessageSchema: z.ZodObject<{
6067
6308
  error: string;
6068
6309
  provider: string;
6069
6310
  type: "turn_failed";
6311
+ code?: string | undefined;
6312
+ diagnostic?: string | undefined;
6070
6313
  } | {
6071
6314
  reason: string;
6072
6315
  provider: string;
@@ -6123,6 +6366,8 @@ export declare const AgentStreamMessageSchema: z.ZodObject<{
6123
6366
  error: string;
6124
6367
  provider: string;
6125
6368
  type: "turn_failed";
6369
+ code?: string | undefined;
6370
+ diagnostic?: string | undefined;
6126
6371
  } | {
6127
6372
  reason: string;
6128
6373
  provider: string;
@@ -6179,6 +6424,8 @@ export declare const AgentStreamMessageSchema: z.ZodObject<{
6179
6424
  error: string;
6180
6425
  provider: string;
6181
6426
  type: "turn_failed";
6427
+ code?: string | undefined;
6428
+ diagnostic?: string | undefined;
6182
6429
  } | {
6183
6430
  reason: string;
6184
6431
  provider: string;
@@ -7192,6 +7439,193 @@ export declare const FetchAgentsResponseMessageSchema: z.ZodObject<{
7192
7439
  subscriptionId?: string | null | undefined;
7193
7440
  };
7194
7441
  }>;
7442
+ export declare const FetchWorkspacesResponseMessageSchema: z.ZodObject<{
7443
+ type: z.ZodLiteral<"fetch_workspaces_response">;
7444
+ payload: z.ZodObject<{
7445
+ requestId: z.ZodString;
7446
+ subscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7447
+ entries: z.ZodArray<z.ZodObject<{
7448
+ id: z.ZodString;
7449
+ projectId: z.ZodString;
7450
+ name: z.ZodString;
7451
+ status: z.ZodEnum<["needs_input", "failed", "running", "attention", "done"]>;
7452
+ activityAt: z.ZodNullable<z.ZodString>;
7453
+ }, "strip", z.ZodTypeAny, {
7454
+ id: string;
7455
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7456
+ name: string;
7457
+ projectId: string;
7458
+ activityAt: string | null;
7459
+ }, {
7460
+ id: string;
7461
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7462
+ name: string;
7463
+ projectId: string;
7464
+ activityAt: string | null;
7465
+ }>, "many">;
7466
+ pageInfo: z.ZodObject<{
7467
+ nextCursor: z.ZodNullable<z.ZodString>;
7468
+ prevCursor: z.ZodNullable<z.ZodString>;
7469
+ hasMore: z.ZodBoolean;
7470
+ }, "strip", z.ZodTypeAny, {
7471
+ nextCursor: string | null;
7472
+ prevCursor: string | null;
7473
+ hasMore: boolean;
7474
+ }, {
7475
+ nextCursor: string | null;
7476
+ prevCursor: string | null;
7477
+ hasMore: boolean;
7478
+ }>;
7479
+ }, "strip", z.ZodTypeAny, {
7480
+ entries: {
7481
+ id: string;
7482
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7483
+ name: string;
7484
+ projectId: string;
7485
+ activityAt: string | null;
7486
+ }[];
7487
+ requestId: string;
7488
+ pageInfo: {
7489
+ nextCursor: string | null;
7490
+ prevCursor: string | null;
7491
+ hasMore: boolean;
7492
+ };
7493
+ subscriptionId?: string | null | undefined;
7494
+ }, {
7495
+ entries: {
7496
+ id: string;
7497
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7498
+ name: string;
7499
+ projectId: string;
7500
+ activityAt: string | null;
7501
+ }[];
7502
+ requestId: string;
7503
+ pageInfo: {
7504
+ nextCursor: string | null;
7505
+ prevCursor: string | null;
7506
+ hasMore: boolean;
7507
+ };
7508
+ subscriptionId?: string | null | undefined;
7509
+ }>;
7510
+ }, "strip", z.ZodTypeAny, {
7511
+ type: "fetch_workspaces_response";
7512
+ payload: {
7513
+ entries: {
7514
+ id: string;
7515
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7516
+ name: string;
7517
+ projectId: string;
7518
+ activityAt: string | null;
7519
+ }[];
7520
+ requestId: string;
7521
+ pageInfo: {
7522
+ nextCursor: string | null;
7523
+ prevCursor: string | null;
7524
+ hasMore: boolean;
7525
+ };
7526
+ subscriptionId?: string | null | undefined;
7527
+ };
7528
+ }, {
7529
+ type: "fetch_workspaces_response";
7530
+ payload: {
7531
+ entries: {
7532
+ id: string;
7533
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7534
+ name: string;
7535
+ projectId: string;
7536
+ activityAt: string | null;
7537
+ }[];
7538
+ requestId: string;
7539
+ pageInfo: {
7540
+ nextCursor: string | null;
7541
+ prevCursor: string | null;
7542
+ hasMore: boolean;
7543
+ };
7544
+ subscriptionId?: string | null | undefined;
7545
+ };
7546
+ }>;
7547
+ export declare const WorkspaceUpdateMessageSchema: z.ZodObject<{
7548
+ type: z.ZodLiteral<"workspace_update">;
7549
+ payload: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
7550
+ kind: z.ZodLiteral<"upsert">;
7551
+ workspace: z.ZodObject<{
7552
+ id: z.ZodString;
7553
+ projectId: z.ZodString;
7554
+ name: z.ZodString;
7555
+ status: z.ZodEnum<["needs_input", "failed", "running", "attention", "done"]>;
7556
+ activityAt: z.ZodNullable<z.ZodString>;
7557
+ }, "strip", z.ZodTypeAny, {
7558
+ id: string;
7559
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7560
+ name: string;
7561
+ projectId: string;
7562
+ activityAt: string | null;
7563
+ }, {
7564
+ id: string;
7565
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7566
+ name: string;
7567
+ projectId: string;
7568
+ activityAt: string | null;
7569
+ }>;
7570
+ }, "strip", z.ZodTypeAny, {
7571
+ kind: "upsert";
7572
+ workspace: {
7573
+ id: string;
7574
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7575
+ name: string;
7576
+ projectId: string;
7577
+ activityAt: string | null;
7578
+ };
7579
+ }, {
7580
+ kind: "upsert";
7581
+ workspace: {
7582
+ id: string;
7583
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7584
+ name: string;
7585
+ projectId: string;
7586
+ activityAt: string | null;
7587
+ };
7588
+ }>, z.ZodObject<{
7589
+ kind: z.ZodLiteral<"remove">;
7590
+ id: z.ZodString;
7591
+ }, "strip", z.ZodTypeAny, {
7592
+ id: string;
7593
+ kind: "remove";
7594
+ }, {
7595
+ id: string;
7596
+ kind: "remove";
7597
+ }>]>;
7598
+ }, "strip", z.ZodTypeAny, {
7599
+ type: "workspace_update";
7600
+ payload: {
7601
+ kind: "upsert";
7602
+ workspace: {
7603
+ id: string;
7604
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7605
+ name: string;
7606
+ projectId: string;
7607
+ activityAt: string | null;
7608
+ };
7609
+ } | {
7610
+ id: string;
7611
+ kind: "remove";
7612
+ };
7613
+ }, {
7614
+ type: "workspace_update";
7615
+ payload: {
7616
+ kind: "upsert";
7617
+ workspace: {
7618
+ id: string;
7619
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
7620
+ name: string;
7621
+ projectId: string;
7622
+ activityAt: string | null;
7623
+ };
7624
+ } | {
7625
+ id: string;
7626
+ kind: "remove";
7627
+ };
7628
+ }>;
7195
7629
  export declare const FetchAgentResponseMessageSchema: z.ZodObject<{
7196
7630
  type: z.ZodLiteral<"fetch_agent_response">;
7197
7631
  payload: z.ZodObject<{
@@ -7664,6 +8098,82 @@ export declare const FetchAgentTimelineResponseMessageSchema: z.ZodObject<{
7664
8098
  payload: z.ZodObject<{
7665
8099
  requestId: z.ZodString;
7666
8100
  agentId: z.ZodString;
8101
+ agent: z.ZodNullable<z.ZodObject<{
8102
+ id: z.ZodString;
8103
+ provider: z.ZodEnum<[string, ...string[]]>;
8104
+ cwd: z.ZodString;
8105
+ model: z.ZodNullable<z.ZodString>;
8106
+ thinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8107
+ effectiveThinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8108
+ createdAt: z.ZodString;
8109
+ updatedAt: z.ZodString;
8110
+ lastUserMessageAt: z.ZodNullable<z.ZodString>;
8111
+ status: z.ZodEnum<["initializing", "idle", "running", "error", "closed"]>;
8112
+ capabilities: z.ZodType<AgentCapabilityFlags, z.ZodTypeDef, AgentCapabilityFlags>;
8113
+ currentModeId: z.ZodNullable<z.ZodString>;
8114
+ availableModes: z.ZodArray<z.ZodType<AgentMode, z.ZodTypeDef, AgentMode>, "many">;
8115
+ pendingPermissions: z.ZodArray<z.ZodType<AgentPermissionRequest, z.ZodTypeDef, AgentPermissionRequest>, "many">;
8116
+ persistence: z.ZodNullable<z.ZodType<AgentPersistenceHandle | null, z.ZodTypeDef, AgentPersistenceHandle | null>>;
8117
+ runtimeInfo: z.ZodOptional<z.ZodType<AgentRuntimeInfo, z.ZodTypeDef, AgentRuntimeInfo>>;
8118
+ lastUsage: z.ZodOptional<z.ZodType<AgentUsage, z.ZodTypeDef, AgentUsage>>;
8119
+ lastError: z.ZodOptional<z.ZodString>;
8120
+ title: z.ZodNullable<z.ZodString>;
8121
+ labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
8122
+ requiresAttention: z.ZodOptional<z.ZodBoolean>;
8123
+ attentionReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<["finished", "error", "permission"]>>>;
8124
+ attentionTimestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8125
+ archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8126
+ }, "strip", z.ZodTypeAny, {
8127
+ id: string;
8128
+ provider: string;
8129
+ cwd: string;
8130
+ createdAt: string;
8131
+ updatedAt: string;
8132
+ lastUserMessageAt: string | null;
8133
+ title: string | null;
8134
+ status: "error" | "initializing" | "idle" | "running" | "closed";
8135
+ labels: Record<string, string>;
8136
+ model: string | null;
8137
+ persistence: AgentPersistenceHandle | null;
8138
+ capabilities: AgentCapabilityFlags;
8139
+ currentModeId: string | null;
8140
+ availableModes: AgentMode[];
8141
+ pendingPermissions: AgentPermissionRequest[];
8142
+ thinkingOptionId?: string | null | undefined;
8143
+ runtimeInfo?: AgentRuntimeInfo | undefined;
8144
+ requiresAttention?: boolean | undefined;
8145
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
8146
+ attentionTimestamp?: string | null | undefined;
8147
+ archivedAt?: string | null | undefined;
8148
+ effectiveThinkingOptionId?: string | null | undefined;
8149
+ lastUsage?: AgentUsage | undefined;
8150
+ lastError?: string | undefined;
8151
+ }, {
8152
+ id: string;
8153
+ provider: string;
8154
+ cwd: string;
8155
+ createdAt: string;
8156
+ updatedAt: string;
8157
+ lastUserMessageAt: string | null;
8158
+ title: string | null;
8159
+ status: "error" | "initializing" | "idle" | "running" | "closed";
8160
+ model: string | null;
8161
+ persistence: AgentPersistenceHandle | null;
8162
+ capabilities: AgentCapabilityFlags;
8163
+ currentModeId: string | null;
8164
+ availableModes: AgentMode[];
8165
+ pendingPermissions: AgentPermissionRequest[];
8166
+ thinkingOptionId?: string | null | undefined;
8167
+ labels?: Record<string, string> | undefined;
8168
+ runtimeInfo?: AgentRuntimeInfo | undefined;
8169
+ requiresAttention?: boolean | undefined;
8170
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
8171
+ attentionTimestamp?: string | null | undefined;
8172
+ archivedAt?: string | null | undefined;
8173
+ effectiveThinkingOptionId?: string | null | undefined;
8174
+ lastUsage?: AgentUsage | undefined;
8175
+ lastError?: string | undefined;
8176
+ }>>;
7667
8177
  direction: z.ZodEnum<["tail", "before", "after"]>;
7668
8178
  projection: z.ZodEnum<["projected", "canonical"]>;
7669
8179
  epoch: z.ZodString;
@@ -7765,6 +8275,32 @@ export declare const FetchAgentTimelineResponseMessageSchema: z.ZodObject<{
7765
8275
  direction: "tail" | "before" | "after";
7766
8276
  epoch: string;
7767
8277
  projection: "projected" | "canonical";
8278
+ agent: {
8279
+ id: string;
8280
+ provider: string;
8281
+ cwd: string;
8282
+ createdAt: string;
8283
+ updatedAt: string;
8284
+ lastUserMessageAt: string | null;
8285
+ title: string | null;
8286
+ status: "error" | "initializing" | "idle" | "running" | "closed";
8287
+ labels: Record<string, string>;
8288
+ model: string | null;
8289
+ persistence: AgentPersistenceHandle | null;
8290
+ capabilities: AgentCapabilityFlags;
8291
+ currentModeId: string | null;
8292
+ availableModes: AgentMode[];
8293
+ pendingPermissions: AgentPermissionRequest[];
8294
+ thinkingOptionId?: string | null | undefined;
8295
+ runtimeInfo?: AgentRuntimeInfo | undefined;
8296
+ requiresAttention?: boolean | undefined;
8297
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
8298
+ attentionTimestamp?: string | null | undefined;
8299
+ archivedAt?: string | null | undefined;
8300
+ effectiveThinkingOptionId?: string | null | undefined;
8301
+ lastUsage?: AgentUsage | undefined;
8302
+ lastError?: string | undefined;
8303
+ } | null;
7768
8304
  reset: boolean;
7769
8305
  staleCursor: boolean;
7770
8306
  gap: boolean;
@@ -7802,6 +8338,32 @@ export declare const FetchAgentTimelineResponseMessageSchema: z.ZodObject<{
7802
8338
  direction: "tail" | "before" | "after";
7803
8339
  epoch: string;
7804
8340
  projection: "projected" | "canonical";
8341
+ agent: {
8342
+ id: string;
8343
+ provider: string;
8344
+ cwd: string;
8345
+ createdAt: string;
8346
+ updatedAt: string;
8347
+ lastUserMessageAt: string | null;
8348
+ title: string | null;
8349
+ status: "error" | "initializing" | "idle" | "running" | "closed";
8350
+ model: string | null;
8351
+ persistence: AgentPersistenceHandle | null;
8352
+ capabilities: AgentCapabilityFlags;
8353
+ currentModeId: string | null;
8354
+ availableModes: AgentMode[];
8355
+ pendingPermissions: AgentPermissionRequest[];
8356
+ thinkingOptionId?: string | null | undefined;
8357
+ labels?: Record<string, string> | undefined;
8358
+ runtimeInfo?: AgentRuntimeInfo | undefined;
8359
+ requiresAttention?: boolean | undefined;
8360
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
8361
+ attentionTimestamp?: string | null | undefined;
8362
+ archivedAt?: string | null | undefined;
8363
+ effectiveThinkingOptionId?: string | null | undefined;
8364
+ lastUsage?: AgentUsage | undefined;
8365
+ lastError?: string | undefined;
8366
+ } | null;
7805
8367
  reset: boolean;
7806
8368
  staleCursor: boolean;
7807
8369
  gap: boolean;
@@ -7842,6 +8404,32 @@ export declare const FetchAgentTimelineResponseMessageSchema: z.ZodObject<{
7842
8404
  direction: "tail" | "before" | "after";
7843
8405
  epoch: string;
7844
8406
  projection: "projected" | "canonical";
8407
+ agent: {
8408
+ id: string;
8409
+ provider: string;
8410
+ cwd: string;
8411
+ createdAt: string;
8412
+ updatedAt: string;
8413
+ lastUserMessageAt: string | null;
8414
+ title: string | null;
8415
+ status: "error" | "initializing" | "idle" | "running" | "closed";
8416
+ labels: Record<string, string>;
8417
+ model: string | null;
8418
+ persistence: AgentPersistenceHandle | null;
8419
+ capabilities: AgentCapabilityFlags;
8420
+ currentModeId: string | null;
8421
+ availableModes: AgentMode[];
8422
+ pendingPermissions: AgentPermissionRequest[];
8423
+ thinkingOptionId?: string | null | undefined;
8424
+ runtimeInfo?: AgentRuntimeInfo | undefined;
8425
+ requiresAttention?: boolean | undefined;
8426
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
8427
+ attentionTimestamp?: string | null | undefined;
8428
+ archivedAt?: string | null | undefined;
8429
+ effectiveThinkingOptionId?: string | null | undefined;
8430
+ lastUsage?: AgentUsage | undefined;
8431
+ lastError?: string | undefined;
8432
+ } | null;
7845
8433
  reset: boolean;
7846
8434
  staleCursor: boolean;
7847
8435
  gap: boolean;
@@ -7882,6 +8470,32 @@ export declare const FetchAgentTimelineResponseMessageSchema: z.ZodObject<{
7882
8470
  direction: "tail" | "before" | "after";
7883
8471
  epoch: string;
7884
8472
  projection: "projected" | "canonical";
8473
+ agent: {
8474
+ id: string;
8475
+ provider: string;
8476
+ cwd: string;
8477
+ createdAt: string;
8478
+ updatedAt: string;
8479
+ lastUserMessageAt: string | null;
8480
+ title: string | null;
8481
+ status: "error" | "initializing" | "idle" | "running" | "closed";
8482
+ model: string | null;
8483
+ persistence: AgentPersistenceHandle | null;
8484
+ capabilities: AgentCapabilityFlags;
8485
+ currentModeId: string | null;
8486
+ availableModes: AgentMode[];
8487
+ pendingPermissions: AgentPermissionRequest[];
8488
+ thinkingOptionId?: string | null | undefined;
8489
+ labels?: Record<string, string> | undefined;
8490
+ runtimeInfo?: AgentRuntimeInfo | undefined;
8491
+ requiresAttention?: boolean | undefined;
8492
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
8493
+ attentionTimestamp?: string | null | undefined;
8494
+ archivedAt?: string | null | undefined;
8495
+ effectiveThinkingOptionId?: string | null | undefined;
8496
+ lastUsage?: AgentUsage | undefined;
8497
+ lastError?: string | undefined;
8498
+ } | null;
7885
8499
  reset: boolean;
7886
8500
  staleCursor: boolean;
7887
8501
  gap: boolean;
@@ -9640,13 +10254,16 @@ export declare const PaseoWorktreeListResponseSchema: z.ZodObject<{
9640
10254
  payload: z.ZodObject<{
9641
10255
  worktrees: z.ZodArray<z.ZodObject<{
9642
10256
  worktreePath: z.ZodString;
10257
+ createdAt: z.ZodString;
9643
10258
  branchName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9644
10259
  head: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9645
10260
  }, "strip", z.ZodTypeAny, {
10261
+ createdAt: string;
9646
10262
  worktreePath: string;
9647
10263
  branchName?: string | null | undefined;
9648
10264
  head?: string | null | undefined;
9649
10265
  }, {
10266
+ createdAt: string;
9650
10267
  worktreePath: string;
9651
10268
  branchName?: string | null | undefined;
9652
10269
  head?: string | null | undefined;
@@ -9669,6 +10286,7 @@ export declare const PaseoWorktreeListResponseSchema: z.ZodObject<{
9669
10286
  } | null;
9670
10287
  requestId: string;
9671
10288
  worktrees: {
10289
+ createdAt: string;
9672
10290
  worktreePath: string;
9673
10291
  branchName?: string | null | undefined;
9674
10292
  head?: string | null | undefined;
@@ -9680,6 +10298,7 @@ export declare const PaseoWorktreeListResponseSchema: z.ZodObject<{
9680
10298
  } | null;
9681
10299
  requestId: string;
9682
10300
  worktrees: {
10301
+ createdAt: string;
9683
10302
  worktreePath: string;
9684
10303
  branchName?: string | null | undefined;
9685
10304
  head?: string | null | undefined;
@@ -9694,6 +10313,7 @@ export declare const PaseoWorktreeListResponseSchema: z.ZodObject<{
9694
10313
  } | null;
9695
10314
  requestId: string;
9696
10315
  worktrees: {
10316
+ createdAt: string;
9697
10317
  worktreePath: string;
9698
10318
  branchName?: string | null | undefined;
9699
10319
  head?: string | null | undefined;
@@ -9708,6 +10328,7 @@ export declare const PaseoWorktreeListResponseSchema: z.ZodObject<{
9708
10328
  } | null;
9709
10329
  requestId: string;
9710
10330
  worktrees: {
10331
+ createdAt: string;
9711
10332
  worktreePath: string;
9712
10333
  branchName?: string | null | undefined;
9713
10334
  head?: string | null | undefined;
@@ -9773,7 +10394,7 @@ export declare const PaseoWorktreeArchiveResponseSchema: z.ZodObject<{
9773
10394
  export declare const FileExplorerResponseSchema: z.ZodObject<{
9774
10395
  type: z.ZodLiteral<"file_explorer_response">;
9775
10396
  payload: z.ZodObject<{
9776
- agentId: z.ZodString;
10397
+ cwd: z.ZodString;
9777
10398
  path: z.ZodString;
9778
10399
  mode: z.ZodEnum<["list", "file"]>;
9779
10400
  directory: z.ZodNullable<z.ZodObject<{
@@ -9845,8 +10466,8 @@ export declare const FileExplorerResponseSchema: z.ZodObject<{
9845
10466
  requestId: z.ZodString;
9846
10467
  }, "strip", z.ZodTypeAny, {
9847
10468
  error: string | null;
9848
- agentId: string;
9849
10469
  mode: "file" | "list";
10470
+ cwd: string;
9850
10471
  path: string;
9851
10472
  requestId: string;
9852
10473
  file: {
@@ -9870,8 +10491,8 @@ export declare const FileExplorerResponseSchema: z.ZodObject<{
9870
10491
  } | null;
9871
10492
  }, {
9872
10493
  error: string | null;
9873
- agentId: string;
9874
10494
  mode: "file" | "list";
10495
+ cwd: string;
9875
10496
  path: string;
9876
10497
  requestId: string;
9877
10498
  file: {
@@ -9898,8 +10519,8 @@ export declare const FileExplorerResponseSchema: z.ZodObject<{
9898
10519
  type: "file_explorer_response";
9899
10520
  payload: {
9900
10521
  error: string | null;
9901
- agentId: string;
9902
10522
  mode: "file" | "list";
10523
+ cwd: string;
9903
10524
  path: string;
9904
10525
  requestId: string;
9905
10526
  file: {
@@ -9926,8 +10547,8 @@ export declare const FileExplorerResponseSchema: z.ZodObject<{
9926
10547
  type: "file_explorer_response";
9927
10548
  payload: {
9928
10549
  error: string | null;
9929
- agentId: string;
9930
10550
  mode: "file" | "list";
10551
+ cwd: string;
9931
10552
  path: string;
9932
10553
  requestId: string;
9933
10554
  file: {
@@ -9980,47 +10601,47 @@ export declare const ProjectIconResponseSchema: z.ZodObject<{
9980
10601
  }, "strip", z.ZodTypeAny, {
9981
10602
  error: string | null;
9982
10603
  cwd: string;
9983
- requestId: string;
9984
10604
  icon: {
9985
10605
  data: string;
9986
10606
  mimeType: string;
9987
10607
  } | null;
10608
+ requestId: string;
9988
10609
  }, {
9989
10610
  error: string | null;
9990
10611
  cwd: string;
9991
- requestId: string;
9992
10612
  icon: {
9993
10613
  data: string;
9994
10614
  mimeType: string;
9995
10615
  } | null;
10616
+ requestId: string;
9996
10617
  }>;
9997
10618
  }, "strip", z.ZodTypeAny, {
9998
10619
  type: "project_icon_response";
9999
10620
  payload: {
10000
10621
  error: string | null;
10001
10622
  cwd: string;
10002
- requestId: string;
10003
10623
  icon: {
10004
10624
  data: string;
10005
10625
  mimeType: string;
10006
10626
  } | null;
10627
+ requestId: string;
10007
10628
  };
10008
10629
  }, {
10009
10630
  type: "project_icon_response";
10010
10631
  payload: {
10011
10632
  error: string | null;
10012
10633
  cwd: string;
10013
- requestId: string;
10014
10634
  icon: {
10015
10635
  data: string;
10016
10636
  mimeType: string;
10017
10637
  } | null;
10638
+ requestId: string;
10018
10639
  };
10019
10640
  }>;
10020
10641
  export declare const FileDownloadTokenResponseSchema: z.ZodObject<{
10021
10642
  type: z.ZodLiteral<"file_download_token_response">;
10022
10643
  payload: z.ZodObject<{
10023
- agentId: z.ZodString;
10644
+ cwd: z.ZodString;
10024
10645
  path: z.ZodString;
10025
10646
  token: z.ZodNullable<z.ZodString>;
10026
10647
  fileName: z.ZodNullable<z.ZodString>;
@@ -10030,7 +10651,7 @@ export declare const FileDownloadTokenResponseSchema: z.ZodObject<{
10030
10651
  requestId: z.ZodString;
10031
10652
  }, "strip", z.ZodTypeAny, {
10032
10653
  error: string | null;
10033
- agentId: string;
10654
+ cwd: string;
10034
10655
  path: string;
10035
10656
  requestId: string;
10036
10657
  mimeType: string | null;
@@ -10039,7 +10660,7 @@ export declare const FileDownloadTokenResponseSchema: z.ZodObject<{
10039
10660
  fileName: string | null;
10040
10661
  }, {
10041
10662
  error: string | null;
10042
- agentId: string;
10663
+ cwd: string;
10043
10664
  path: string;
10044
10665
  requestId: string;
10045
10666
  mimeType: string | null;
@@ -10051,7 +10672,7 @@ export declare const FileDownloadTokenResponseSchema: z.ZodObject<{
10051
10672
  type: "file_download_token_response";
10052
10673
  payload: {
10053
10674
  error: string | null;
10054
- agentId: string;
10675
+ cwd: string;
10055
10676
  path: string;
10056
10677
  requestId: string;
10057
10678
  mimeType: string | null;
@@ -10063,7 +10684,7 @@ export declare const FileDownloadTokenResponseSchema: z.ZodObject<{
10063
10684
  type: "file_download_token_response";
10064
10685
  payload: {
10065
10686
  error: string | null;
10066
- agentId: string;
10687
+ cwd: string;
10067
10688
  path: string;
10068
10689
  requestId: string;
10069
10690
  mimeType: string | null;
@@ -12048,6 +12669,87 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
12048
12669
  agentId: string;
12049
12670
  kind: "remove";
12050
12671
  };
12672
+ }>, z.ZodObject<{
12673
+ type: z.ZodLiteral<"workspace_update">;
12674
+ payload: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
12675
+ kind: z.ZodLiteral<"upsert">;
12676
+ workspace: z.ZodObject<{
12677
+ id: z.ZodString;
12678
+ projectId: z.ZodString;
12679
+ name: z.ZodString;
12680
+ status: z.ZodEnum<["needs_input", "failed", "running", "attention", "done"]>;
12681
+ activityAt: z.ZodNullable<z.ZodString>;
12682
+ }, "strip", z.ZodTypeAny, {
12683
+ id: string;
12684
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
12685
+ name: string;
12686
+ projectId: string;
12687
+ activityAt: string | null;
12688
+ }, {
12689
+ id: string;
12690
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
12691
+ name: string;
12692
+ projectId: string;
12693
+ activityAt: string | null;
12694
+ }>;
12695
+ }, "strip", z.ZodTypeAny, {
12696
+ kind: "upsert";
12697
+ workspace: {
12698
+ id: string;
12699
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
12700
+ name: string;
12701
+ projectId: string;
12702
+ activityAt: string | null;
12703
+ };
12704
+ }, {
12705
+ kind: "upsert";
12706
+ workspace: {
12707
+ id: string;
12708
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
12709
+ name: string;
12710
+ projectId: string;
12711
+ activityAt: string | null;
12712
+ };
12713
+ }>, z.ZodObject<{
12714
+ kind: z.ZodLiteral<"remove">;
12715
+ id: z.ZodString;
12716
+ }, "strip", z.ZodTypeAny, {
12717
+ id: string;
12718
+ kind: "remove";
12719
+ }, {
12720
+ id: string;
12721
+ kind: "remove";
12722
+ }>]>;
12723
+ }, "strip", z.ZodTypeAny, {
12724
+ type: "workspace_update";
12725
+ payload: {
12726
+ kind: "upsert";
12727
+ workspace: {
12728
+ id: string;
12729
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
12730
+ name: string;
12731
+ projectId: string;
12732
+ activityAt: string | null;
12733
+ };
12734
+ } | {
12735
+ id: string;
12736
+ kind: "remove";
12737
+ };
12738
+ }, {
12739
+ type: "workspace_update";
12740
+ payload: {
12741
+ kind: "upsert";
12742
+ workspace: {
12743
+ id: string;
12744
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
12745
+ name: string;
12746
+ projectId: string;
12747
+ activityAt: string | null;
12748
+ };
12749
+ } | {
12750
+ id: string;
12751
+ kind: "remove";
12752
+ };
12051
12753
  }>, z.ZodObject<{
12052
12754
  type: z.ZodLiteral<"agent_stream">;
12053
12755
  payload: z.ZodObject<{
@@ -12089,14 +12791,20 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
12089
12791
  type: z.ZodLiteral<"turn_failed">;
12090
12792
  provider: z.ZodEnum<[string, ...string[]]>;
12091
12793
  error: z.ZodString;
12794
+ code: z.ZodOptional<z.ZodString>;
12795
+ diagnostic: z.ZodOptional<z.ZodString>;
12092
12796
  }, "strip", z.ZodTypeAny, {
12093
12797
  error: string;
12094
12798
  provider: string;
12095
12799
  type: "turn_failed";
12800
+ code?: string | undefined;
12801
+ diagnostic?: string | undefined;
12096
12802
  }, {
12097
12803
  error: string;
12098
12804
  provider: string;
12099
12805
  type: "turn_failed";
12806
+ code?: string | undefined;
12807
+ diagnostic?: string | undefined;
12100
12808
  }>, z.ZodObject<{
12101
12809
  type: z.ZodLiteral<"turn_canceled">;
12102
12810
  provider: z.ZodEnum<[string, ...string[]]>;
@@ -12239,6 +12947,8 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
12239
12947
  error: string;
12240
12948
  provider: string;
12241
12949
  type: "turn_failed";
12950
+ code?: string | undefined;
12951
+ diagnostic?: string | undefined;
12242
12952
  } | {
12243
12953
  reason: string;
12244
12954
  provider: string;
@@ -12292,6 +13002,8 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
12292
13002
  error: string;
12293
13003
  provider: string;
12294
13004
  type: "turn_failed";
13005
+ code?: string | undefined;
13006
+ diagnostic?: string | undefined;
12295
13007
  } | {
12296
13008
  reason: string;
12297
13009
  provider: string;
@@ -12348,6 +13060,8 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
12348
13060
  error: string;
12349
13061
  provider: string;
12350
13062
  type: "turn_failed";
13063
+ code?: string | undefined;
13064
+ diagnostic?: string | undefined;
12351
13065
  } | {
12352
13066
  reason: string;
12353
13067
  provider: string;
@@ -12404,6 +13118,8 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
12404
13118
  error: string;
12405
13119
  provider: string;
12406
13120
  type: "turn_failed";
13121
+ code?: string | undefined;
13122
+ diagnostic?: string | undefined;
12407
13123
  } | {
12408
13124
  reason: string;
12409
13125
  provider: string;
@@ -13219,6 +13935,110 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
13219
13935
  };
13220
13936
  subscriptionId?: string | null | undefined;
13221
13937
  };
13938
+ }>, z.ZodObject<{
13939
+ type: z.ZodLiteral<"fetch_workspaces_response">;
13940
+ payload: z.ZodObject<{
13941
+ requestId: z.ZodString;
13942
+ subscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13943
+ entries: z.ZodArray<z.ZodObject<{
13944
+ id: z.ZodString;
13945
+ projectId: z.ZodString;
13946
+ name: z.ZodString;
13947
+ status: z.ZodEnum<["needs_input", "failed", "running", "attention", "done"]>;
13948
+ activityAt: z.ZodNullable<z.ZodString>;
13949
+ }, "strip", z.ZodTypeAny, {
13950
+ id: string;
13951
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
13952
+ name: string;
13953
+ projectId: string;
13954
+ activityAt: string | null;
13955
+ }, {
13956
+ id: string;
13957
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
13958
+ name: string;
13959
+ projectId: string;
13960
+ activityAt: string | null;
13961
+ }>, "many">;
13962
+ pageInfo: z.ZodObject<{
13963
+ nextCursor: z.ZodNullable<z.ZodString>;
13964
+ prevCursor: z.ZodNullable<z.ZodString>;
13965
+ hasMore: z.ZodBoolean;
13966
+ }, "strip", z.ZodTypeAny, {
13967
+ nextCursor: string | null;
13968
+ prevCursor: string | null;
13969
+ hasMore: boolean;
13970
+ }, {
13971
+ nextCursor: string | null;
13972
+ prevCursor: string | null;
13973
+ hasMore: boolean;
13974
+ }>;
13975
+ }, "strip", z.ZodTypeAny, {
13976
+ entries: {
13977
+ id: string;
13978
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
13979
+ name: string;
13980
+ projectId: string;
13981
+ activityAt: string | null;
13982
+ }[];
13983
+ requestId: string;
13984
+ pageInfo: {
13985
+ nextCursor: string | null;
13986
+ prevCursor: string | null;
13987
+ hasMore: boolean;
13988
+ };
13989
+ subscriptionId?: string | null | undefined;
13990
+ }, {
13991
+ entries: {
13992
+ id: string;
13993
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
13994
+ name: string;
13995
+ projectId: string;
13996
+ activityAt: string | null;
13997
+ }[];
13998
+ requestId: string;
13999
+ pageInfo: {
14000
+ nextCursor: string | null;
14001
+ prevCursor: string | null;
14002
+ hasMore: boolean;
14003
+ };
14004
+ subscriptionId?: string | null | undefined;
14005
+ }>;
14006
+ }, "strip", z.ZodTypeAny, {
14007
+ type: "fetch_workspaces_response";
14008
+ payload: {
14009
+ entries: {
14010
+ id: string;
14011
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
14012
+ name: string;
14013
+ projectId: string;
14014
+ activityAt: string | null;
14015
+ }[];
14016
+ requestId: string;
14017
+ pageInfo: {
14018
+ nextCursor: string | null;
14019
+ prevCursor: string | null;
14020
+ hasMore: boolean;
14021
+ };
14022
+ subscriptionId?: string | null | undefined;
14023
+ };
14024
+ }, {
14025
+ type: "fetch_workspaces_response";
14026
+ payload: {
14027
+ entries: {
14028
+ id: string;
14029
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
14030
+ name: string;
14031
+ projectId: string;
14032
+ activityAt: string | null;
14033
+ }[];
14034
+ requestId: string;
14035
+ pageInfo: {
14036
+ nextCursor: string | null;
14037
+ prevCursor: string | null;
14038
+ hasMore: boolean;
14039
+ };
14040
+ subscriptionId?: string | null | undefined;
14041
+ };
13222
14042
  }>, z.ZodObject<{
13223
14043
  type: z.ZodLiteral<"fetch_agent_response">;
13224
14044
  payload: z.ZodObject<{
@@ -13617,39 +14437,115 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
13617
14437
  effectiveThinkingOptionId?: string | null | undefined;
13618
14438
  lastUsage?: AgentUsage | undefined;
13619
14439
  lastError?: string | undefined;
13620
- } | null;
13621
- project?: {
13622
- projectKey: string;
13623
- projectName: string;
13624
- checkout: {
13625
- cwd: string;
13626
- isGit: false;
13627
- currentBranch: null;
13628
- remoteUrl: null;
13629
- isPaseoOwnedWorktree: false;
13630
- mainRepoRoot: null;
13631
- } | {
13632
- cwd: string;
13633
- isGit: true;
13634
- currentBranch: string | null;
13635
- remoteUrl: string | null;
13636
- isPaseoOwnedWorktree: false;
13637
- mainRepoRoot: null;
13638
- } | {
13639
- cwd: string;
13640
- isGit: true;
13641
- currentBranch: string | null;
13642
- remoteUrl: string | null;
13643
- isPaseoOwnedWorktree: true;
13644
- mainRepoRoot: string;
13645
- };
13646
- } | null | undefined;
13647
- };
13648
- }>, z.ZodObject<{
13649
- type: z.ZodLiteral<"fetch_agent_timeline_response">;
13650
- payload: z.ZodObject<{
13651
- requestId: z.ZodString;
13652
- agentId: z.ZodString;
14440
+ } | null;
14441
+ project?: {
14442
+ projectKey: string;
14443
+ projectName: string;
14444
+ checkout: {
14445
+ cwd: string;
14446
+ isGit: false;
14447
+ currentBranch: null;
14448
+ remoteUrl: null;
14449
+ isPaseoOwnedWorktree: false;
14450
+ mainRepoRoot: null;
14451
+ } | {
14452
+ cwd: string;
14453
+ isGit: true;
14454
+ currentBranch: string | null;
14455
+ remoteUrl: string | null;
14456
+ isPaseoOwnedWorktree: false;
14457
+ mainRepoRoot: null;
14458
+ } | {
14459
+ cwd: string;
14460
+ isGit: true;
14461
+ currentBranch: string | null;
14462
+ remoteUrl: string | null;
14463
+ isPaseoOwnedWorktree: true;
14464
+ mainRepoRoot: string;
14465
+ };
14466
+ } | null | undefined;
14467
+ };
14468
+ }>, z.ZodObject<{
14469
+ type: z.ZodLiteral<"fetch_agent_timeline_response">;
14470
+ payload: z.ZodObject<{
14471
+ requestId: z.ZodString;
14472
+ agentId: z.ZodString;
14473
+ agent: z.ZodNullable<z.ZodObject<{
14474
+ id: z.ZodString;
14475
+ provider: z.ZodEnum<[string, ...string[]]>;
14476
+ cwd: z.ZodString;
14477
+ model: z.ZodNullable<z.ZodString>;
14478
+ thinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14479
+ effectiveThinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14480
+ createdAt: z.ZodString;
14481
+ updatedAt: z.ZodString;
14482
+ lastUserMessageAt: z.ZodNullable<z.ZodString>;
14483
+ status: z.ZodEnum<["initializing", "idle", "running", "error", "closed"]>;
14484
+ capabilities: z.ZodType<AgentCapabilityFlags, z.ZodTypeDef, AgentCapabilityFlags>;
14485
+ currentModeId: z.ZodNullable<z.ZodString>;
14486
+ availableModes: z.ZodArray<z.ZodType<AgentMode, z.ZodTypeDef, AgentMode>, "many">;
14487
+ pendingPermissions: z.ZodArray<z.ZodType<AgentPermissionRequest, z.ZodTypeDef, AgentPermissionRequest>, "many">;
14488
+ persistence: z.ZodNullable<z.ZodType<AgentPersistenceHandle | null, z.ZodTypeDef, AgentPersistenceHandle | null>>;
14489
+ runtimeInfo: z.ZodOptional<z.ZodType<AgentRuntimeInfo, z.ZodTypeDef, AgentRuntimeInfo>>;
14490
+ lastUsage: z.ZodOptional<z.ZodType<AgentUsage, z.ZodTypeDef, AgentUsage>>;
14491
+ lastError: z.ZodOptional<z.ZodString>;
14492
+ title: z.ZodNullable<z.ZodString>;
14493
+ labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
14494
+ requiresAttention: z.ZodOptional<z.ZodBoolean>;
14495
+ attentionReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<["finished", "error", "permission"]>>>;
14496
+ attentionTimestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14497
+ archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14498
+ }, "strip", z.ZodTypeAny, {
14499
+ id: string;
14500
+ provider: string;
14501
+ cwd: string;
14502
+ createdAt: string;
14503
+ updatedAt: string;
14504
+ lastUserMessageAt: string | null;
14505
+ title: string | null;
14506
+ status: "error" | "initializing" | "idle" | "running" | "closed";
14507
+ labels: Record<string, string>;
14508
+ model: string | null;
14509
+ persistence: AgentPersistenceHandle | null;
14510
+ capabilities: AgentCapabilityFlags;
14511
+ currentModeId: string | null;
14512
+ availableModes: AgentMode[];
14513
+ pendingPermissions: AgentPermissionRequest[];
14514
+ thinkingOptionId?: string | null | undefined;
14515
+ runtimeInfo?: AgentRuntimeInfo | undefined;
14516
+ requiresAttention?: boolean | undefined;
14517
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
14518
+ attentionTimestamp?: string | null | undefined;
14519
+ archivedAt?: string | null | undefined;
14520
+ effectiveThinkingOptionId?: string | null | undefined;
14521
+ lastUsage?: AgentUsage | undefined;
14522
+ lastError?: string | undefined;
14523
+ }, {
14524
+ id: string;
14525
+ provider: string;
14526
+ cwd: string;
14527
+ createdAt: string;
14528
+ updatedAt: string;
14529
+ lastUserMessageAt: string | null;
14530
+ title: string | null;
14531
+ status: "error" | "initializing" | "idle" | "running" | "closed";
14532
+ model: string | null;
14533
+ persistence: AgentPersistenceHandle | null;
14534
+ capabilities: AgentCapabilityFlags;
14535
+ currentModeId: string | null;
14536
+ availableModes: AgentMode[];
14537
+ pendingPermissions: AgentPermissionRequest[];
14538
+ thinkingOptionId?: string | null | undefined;
14539
+ labels?: Record<string, string> | undefined;
14540
+ runtimeInfo?: AgentRuntimeInfo | undefined;
14541
+ requiresAttention?: boolean | undefined;
14542
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
14543
+ attentionTimestamp?: string | null | undefined;
14544
+ archivedAt?: string | null | undefined;
14545
+ effectiveThinkingOptionId?: string | null | undefined;
14546
+ lastUsage?: AgentUsage | undefined;
14547
+ lastError?: string | undefined;
14548
+ }>>;
13653
14549
  direction: z.ZodEnum<["tail", "before", "after"]>;
13654
14550
  projection: z.ZodEnum<["projected", "canonical"]>;
13655
14551
  epoch: z.ZodString;
@@ -13751,6 +14647,32 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
13751
14647
  direction: "tail" | "before" | "after";
13752
14648
  epoch: string;
13753
14649
  projection: "projected" | "canonical";
14650
+ agent: {
14651
+ id: string;
14652
+ provider: string;
14653
+ cwd: string;
14654
+ createdAt: string;
14655
+ updatedAt: string;
14656
+ lastUserMessageAt: string | null;
14657
+ title: string | null;
14658
+ status: "error" | "initializing" | "idle" | "running" | "closed";
14659
+ labels: Record<string, string>;
14660
+ model: string | null;
14661
+ persistence: AgentPersistenceHandle | null;
14662
+ capabilities: AgentCapabilityFlags;
14663
+ currentModeId: string | null;
14664
+ availableModes: AgentMode[];
14665
+ pendingPermissions: AgentPermissionRequest[];
14666
+ thinkingOptionId?: string | null | undefined;
14667
+ runtimeInfo?: AgentRuntimeInfo | undefined;
14668
+ requiresAttention?: boolean | undefined;
14669
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
14670
+ attentionTimestamp?: string | null | undefined;
14671
+ archivedAt?: string | null | undefined;
14672
+ effectiveThinkingOptionId?: string | null | undefined;
14673
+ lastUsage?: AgentUsage | undefined;
14674
+ lastError?: string | undefined;
14675
+ } | null;
13754
14676
  reset: boolean;
13755
14677
  staleCursor: boolean;
13756
14678
  gap: boolean;
@@ -13788,6 +14710,32 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
13788
14710
  direction: "tail" | "before" | "after";
13789
14711
  epoch: string;
13790
14712
  projection: "projected" | "canonical";
14713
+ agent: {
14714
+ id: string;
14715
+ provider: string;
14716
+ cwd: string;
14717
+ createdAt: string;
14718
+ updatedAt: string;
14719
+ lastUserMessageAt: string | null;
14720
+ title: string | null;
14721
+ status: "error" | "initializing" | "idle" | "running" | "closed";
14722
+ model: string | null;
14723
+ persistence: AgentPersistenceHandle | null;
14724
+ capabilities: AgentCapabilityFlags;
14725
+ currentModeId: string | null;
14726
+ availableModes: AgentMode[];
14727
+ pendingPermissions: AgentPermissionRequest[];
14728
+ thinkingOptionId?: string | null | undefined;
14729
+ labels?: Record<string, string> | undefined;
14730
+ runtimeInfo?: AgentRuntimeInfo | undefined;
14731
+ requiresAttention?: boolean | undefined;
14732
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
14733
+ attentionTimestamp?: string | null | undefined;
14734
+ archivedAt?: string | null | undefined;
14735
+ effectiveThinkingOptionId?: string | null | undefined;
14736
+ lastUsage?: AgentUsage | undefined;
14737
+ lastError?: string | undefined;
14738
+ } | null;
13791
14739
  reset: boolean;
13792
14740
  staleCursor: boolean;
13793
14741
  gap: boolean;
@@ -13828,6 +14776,32 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
13828
14776
  direction: "tail" | "before" | "after";
13829
14777
  epoch: string;
13830
14778
  projection: "projected" | "canonical";
14779
+ agent: {
14780
+ id: string;
14781
+ provider: string;
14782
+ cwd: string;
14783
+ createdAt: string;
14784
+ updatedAt: string;
14785
+ lastUserMessageAt: string | null;
14786
+ title: string | null;
14787
+ status: "error" | "initializing" | "idle" | "running" | "closed";
14788
+ labels: Record<string, string>;
14789
+ model: string | null;
14790
+ persistence: AgentPersistenceHandle | null;
14791
+ capabilities: AgentCapabilityFlags;
14792
+ currentModeId: string | null;
14793
+ availableModes: AgentMode[];
14794
+ pendingPermissions: AgentPermissionRequest[];
14795
+ thinkingOptionId?: string | null | undefined;
14796
+ runtimeInfo?: AgentRuntimeInfo | undefined;
14797
+ requiresAttention?: boolean | undefined;
14798
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
14799
+ attentionTimestamp?: string | null | undefined;
14800
+ archivedAt?: string | null | undefined;
14801
+ effectiveThinkingOptionId?: string | null | undefined;
14802
+ lastUsage?: AgentUsage | undefined;
14803
+ lastError?: string | undefined;
14804
+ } | null;
13831
14805
  reset: boolean;
13832
14806
  staleCursor: boolean;
13833
14807
  gap: boolean;
@@ -13868,6 +14842,32 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
13868
14842
  direction: "tail" | "before" | "after";
13869
14843
  epoch: string;
13870
14844
  projection: "projected" | "canonical";
14845
+ agent: {
14846
+ id: string;
14847
+ provider: string;
14848
+ cwd: string;
14849
+ createdAt: string;
14850
+ updatedAt: string;
14851
+ lastUserMessageAt: string | null;
14852
+ title: string | null;
14853
+ status: "error" | "initializing" | "idle" | "running" | "closed";
14854
+ model: string | null;
14855
+ persistence: AgentPersistenceHandle | null;
14856
+ capabilities: AgentCapabilityFlags;
14857
+ currentModeId: string | null;
14858
+ availableModes: AgentMode[];
14859
+ pendingPermissions: AgentPermissionRequest[];
14860
+ thinkingOptionId?: string | null | undefined;
14861
+ labels?: Record<string, string> | undefined;
14862
+ runtimeInfo?: AgentRuntimeInfo | undefined;
14863
+ requiresAttention?: boolean | undefined;
14864
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
14865
+ attentionTimestamp?: string | null | undefined;
14866
+ archivedAt?: string | null | undefined;
14867
+ effectiveThinkingOptionId?: string | null | undefined;
14868
+ lastUsage?: AgentUsage | undefined;
14869
+ lastError?: string | undefined;
14870
+ } | null;
13871
14871
  reset: boolean;
13872
14872
  staleCursor: boolean;
13873
14873
  gap: boolean;
@@ -15797,13 +16797,16 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
15797
16797
  payload: z.ZodObject<{
15798
16798
  worktrees: z.ZodArray<z.ZodObject<{
15799
16799
  worktreePath: z.ZodString;
16800
+ createdAt: z.ZodString;
15800
16801
  branchName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15801
16802
  head: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15802
16803
  }, "strip", z.ZodTypeAny, {
16804
+ createdAt: string;
15803
16805
  worktreePath: string;
15804
16806
  branchName?: string | null | undefined;
15805
16807
  head?: string | null | undefined;
15806
16808
  }, {
16809
+ createdAt: string;
15807
16810
  worktreePath: string;
15808
16811
  branchName?: string | null | undefined;
15809
16812
  head?: string | null | undefined;
@@ -15826,6 +16829,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
15826
16829
  } | null;
15827
16830
  requestId: string;
15828
16831
  worktrees: {
16832
+ createdAt: string;
15829
16833
  worktreePath: string;
15830
16834
  branchName?: string | null | undefined;
15831
16835
  head?: string | null | undefined;
@@ -15837,6 +16841,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
15837
16841
  } | null;
15838
16842
  requestId: string;
15839
16843
  worktrees: {
16844
+ createdAt: string;
15840
16845
  worktreePath: string;
15841
16846
  branchName?: string | null | undefined;
15842
16847
  head?: string | null | undefined;
@@ -15851,6 +16856,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
15851
16856
  } | null;
15852
16857
  requestId: string;
15853
16858
  worktrees: {
16859
+ createdAt: string;
15854
16860
  worktreePath: string;
15855
16861
  branchName?: string | null | undefined;
15856
16862
  head?: string | null | undefined;
@@ -15865,6 +16871,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
15865
16871
  } | null;
15866
16872
  requestId: string;
15867
16873
  worktrees: {
16874
+ createdAt: string;
15868
16875
  worktreePath: string;
15869
16876
  branchName?: string | null | undefined;
15870
16877
  head?: string | null | undefined;
@@ -15928,7 +16935,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
15928
16935
  }>, z.ZodObject<{
15929
16936
  type: z.ZodLiteral<"file_explorer_response">;
15930
16937
  payload: z.ZodObject<{
15931
- agentId: z.ZodString;
16938
+ cwd: z.ZodString;
15932
16939
  path: z.ZodString;
15933
16940
  mode: z.ZodEnum<["list", "file"]>;
15934
16941
  directory: z.ZodNullable<z.ZodObject<{
@@ -16000,8 +17007,8 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
16000
17007
  requestId: z.ZodString;
16001
17008
  }, "strip", z.ZodTypeAny, {
16002
17009
  error: string | null;
16003
- agentId: string;
16004
17010
  mode: "file" | "list";
17011
+ cwd: string;
16005
17012
  path: string;
16006
17013
  requestId: string;
16007
17014
  file: {
@@ -16025,8 +17032,8 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
16025
17032
  } | null;
16026
17033
  }, {
16027
17034
  error: string | null;
16028
- agentId: string;
16029
17035
  mode: "file" | "list";
17036
+ cwd: string;
16030
17037
  path: string;
16031
17038
  requestId: string;
16032
17039
  file: {
@@ -16053,8 +17060,8 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
16053
17060
  type: "file_explorer_response";
16054
17061
  payload: {
16055
17062
  error: string | null;
16056
- agentId: string;
16057
17063
  mode: "file" | "list";
17064
+ cwd: string;
16058
17065
  path: string;
16059
17066
  requestId: string;
16060
17067
  file: {
@@ -16081,8 +17088,8 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
16081
17088
  type: "file_explorer_response";
16082
17089
  payload: {
16083
17090
  error: string | null;
16084
- agentId: string;
16085
17091
  mode: "file" | "list";
17092
+ cwd: string;
16086
17093
  path: string;
16087
17094
  requestId: string;
16088
17095
  file: {
@@ -16124,46 +17131,46 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
16124
17131
  }, "strip", z.ZodTypeAny, {
16125
17132
  error: string | null;
16126
17133
  cwd: string;
16127
- requestId: string;
16128
17134
  icon: {
16129
17135
  data: string;
16130
17136
  mimeType: string;
16131
17137
  } | null;
17138
+ requestId: string;
16132
17139
  }, {
16133
17140
  error: string | null;
16134
17141
  cwd: string;
16135
- requestId: string;
16136
17142
  icon: {
16137
17143
  data: string;
16138
17144
  mimeType: string;
16139
17145
  } | null;
17146
+ requestId: string;
16140
17147
  }>;
16141
17148
  }, "strip", z.ZodTypeAny, {
16142
17149
  type: "project_icon_response";
16143
17150
  payload: {
16144
17151
  error: string | null;
16145
17152
  cwd: string;
16146
- requestId: string;
16147
17153
  icon: {
16148
17154
  data: string;
16149
17155
  mimeType: string;
16150
17156
  } | null;
17157
+ requestId: string;
16151
17158
  };
16152
17159
  }, {
16153
17160
  type: "project_icon_response";
16154
17161
  payload: {
16155
17162
  error: string | null;
16156
17163
  cwd: string;
16157
- requestId: string;
16158
17164
  icon: {
16159
17165
  data: string;
16160
17166
  mimeType: string;
16161
17167
  } | null;
17168
+ requestId: string;
16162
17169
  };
16163
17170
  }>, z.ZodObject<{
16164
17171
  type: z.ZodLiteral<"file_download_token_response">;
16165
17172
  payload: z.ZodObject<{
16166
- agentId: z.ZodString;
17173
+ cwd: z.ZodString;
16167
17174
  path: z.ZodString;
16168
17175
  token: z.ZodNullable<z.ZodString>;
16169
17176
  fileName: z.ZodNullable<z.ZodString>;
@@ -16173,7 +17180,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
16173
17180
  requestId: z.ZodString;
16174
17181
  }, "strip", z.ZodTypeAny, {
16175
17182
  error: string | null;
16176
- agentId: string;
17183
+ cwd: string;
16177
17184
  path: string;
16178
17185
  requestId: string;
16179
17186
  mimeType: string | null;
@@ -16182,7 +17189,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
16182
17189
  fileName: string | null;
16183
17190
  }, {
16184
17191
  error: string | null;
16185
- agentId: string;
17192
+ cwd: string;
16186
17193
  path: string;
16187
17194
  requestId: string;
16188
17195
  mimeType: string | null;
@@ -16194,7 +17201,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
16194
17201
  type: "file_download_token_response";
16195
17202
  payload: {
16196
17203
  error: string | null;
16197
- agentId: string;
17204
+ cwd: string;
16198
17205
  path: string;
16199
17206
  requestId: string;
16200
17207
  mimeType: string | null;
@@ -16206,7 +17213,7 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<"type
16206
17213
  type: "file_download_token_response";
16207
17214
  payload: {
16208
17215
  error: string | null;
16209
- agentId: string;
17216
+ cwd: string;
16210
17217
  path: string;
16211
17218
  requestId: string;
16212
17219
  mimeType: string | null;
@@ -17317,7 +18324,10 @@ export type AgentStreamMessage = z.infer<typeof AgentStreamMessageSchema>;
17317
18324
  export type AgentStatusMessage = z.infer<typeof AgentStatusMessageSchema>;
17318
18325
  export type ProjectCheckoutLitePayload = z.infer<typeof ProjectCheckoutLitePayloadSchema>;
17319
18326
  export type ProjectPlacementPayload = z.infer<typeof ProjectPlacementPayloadSchema>;
18327
+ export type WorkspaceStateBucket = z.infer<typeof WorkspaceStateBucketSchema>;
18328
+ export type WorkspaceDescriptorPayload = z.infer<typeof WorkspaceDescriptorPayloadSchema>;
17320
18329
  export type FetchAgentsResponseMessage = z.infer<typeof FetchAgentsResponseMessageSchema>;
18330
+ export type FetchWorkspacesResponseMessage = z.infer<typeof FetchWorkspacesResponseMessageSchema>;
17321
18331
  export type FetchAgentResponseMessage = z.infer<typeof FetchAgentResponseMessageSchema>;
17322
18332
  export type FetchAgentTimelineResponseMessage = z.infer<typeof FetchAgentTimelineResponseMessageSchema>;
17323
18333
  export type SendAgentMessageResponseMessage = z.infer<typeof SendAgentMessageResponseMessageSchema>;
@@ -17334,6 +18344,7 @@ export type SpeechModelsDownloadResponse = z.infer<typeof SpeechModelsDownloadRe
17334
18344
  export type ActivityLogPayload = z.infer<typeof ActivityLogPayloadSchema>;
17335
18345
  export type VoiceAudioChunkMessage = z.infer<typeof VoiceAudioChunkMessageSchema>;
17336
18346
  export type FetchAgentsRequestMessage = z.infer<typeof FetchAgentsRequestMessageSchema>;
18347
+ export type FetchWorkspacesRequestMessage = z.infer<typeof FetchWorkspacesRequestMessageSchema>;
17337
18348
  export type FetchAgentRequestMessage = z.infer<typeof FetchAgentRequestMessageSchema>;
17338
18349
  export type SendAgentMessageRequest = z.infer<typeof SendAgentMessageRequestSchema>;
17339
18350
  export type WaitForFinishRequest = z.infer<typeof WaitForFinishRequestSchema>;
@@ -17389,6 +18400,7 @@ export type ProjectIcon = z.infer<typeof ProjectIconSchema>;
17389
18400
  export type FileDownloadTokenRequest = z.infer<typeof FileDownloadTokenRequestSchema>;
17390
18401
  export type FileDownloadTokenResponse = z.infer<typeof FileDownloadTokenResponseSchema>;
17391
18402
  export type RestartServerRequestMessage = z.infer<typeof RestartServerRequestMessageSchema>;
18403
+ export type ShutdownServerRequestMessage = z.infer<typeof ShutdownServerRequestMessageSchema>;
17392
18404
  export type ClearAgentAttentionMessage = z.infer<typeof ClearAgentAttentionMessageSchema>;
17393
18405
  export type ClientHeartbeatMessage = z.infer<typeof ClientHeartbeatMessageSchema>;
17394
18406
  export type ListCommandsRequest = z.infer<typeof ListCommandsRequestSchema>;
@@ -17826,6 +18838,87 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
17826
18838
  subscribe?: {
17827
18839
  subscriptionId?: string | undefined;
17828
18840
  } | undefined;
18841
+ }>, z.ZodObject<{
18842
+ type: z.ZodLiteral<"fetch_workspaces_request">;
18843
+ requestId: z.ZodString;
18844
+ filter: z.ZodOptional<z.ZodObject<{
18845
+ query: z.ZodOptional<z.ZodString>;
18846
+ projectId: z.ZodOptional<z.ZodString>;
18847
+ idPrefix: z.ZodOptional<z.ZodString>;
18848
+ }, "strip", z.ZodTypeAny, {
18849
+ query?: string | undefined;
18850
+ projectId?: string | undefined;
18851
+ idPrefix?: string | undefined;
18852
+ }, {
18853
+ query?: string | undefined;
18854
+ projectId?: string | undefined;
18855
+ idPrefix?: string | undefined;
18856
+ }>>;
18857
+ sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
18858
+ key: z.ZodEnum<["status_priority", "activity_at", "name", "project_id"]>;
18859
+ direction: z.ZodEnum<["asc", "desc"]>;
18860
+ }, "strip", z.ZodTypeAny, {
18861
+ key: "name" | "status_priority" | "activity_at" | "project_id";
18862
+ direction: "asc" | "desc";
18863
+ }, {
18864
+ key: "name" | "status_priority" | "activity_at" | "project_id";
18865
+ direction: "asc" | "desc";
18866
+ }>, "many">>;
18867
+ page: z.ZodOptional<z.ZodObject<{
18868
+ limit: z.ZodNumber;
18869
+ cursor: z.ZodOptional<z.ZodString>;
18870
+ }, "strip", z.ZodTypeAny, {
18871
+ limit: number;
18872
+ cursor?: string | undefined;
18873
+ }, {
18874
+ limit: number;
18875
+ cursor?: string | undefined;
18876
+ }>>;
18877
+ subscribe: z.ZodOptional<z.ZodObject<{
18878
+ subscriptionId: z.ZodOptional<z.ZodString>;
18879
+ }, "strip", z.ZodTypeAny, {
18880
+ subscriptionId?: string | undefined;
18881
+ }, {
18882
+ subscriptionId?: string | undefined;
18883
+ }>>;
18884
+ }, "strip", z.ZodTypeAny, {
18885
+ type: "fetch_workspaces_request";
18886
+ requestId: string;
18887
+ sort?: {
18888
+ key: "name" | "status_priority" | "activity_at" | "project_id";
18889
+ direction: "asc" | "desc";
18890
+ }[] | undefined;
18891
+ filter?: {
18892
+ query?: string | undefined;
18893
+ projectId?: string | undefined;
18894
+ idPrefix?: string | undefined;
18895
+ } | undefined;
18896
+ page?: {
18897
+ limit: number;
18898
+ cursor?: string | undefined;
18899
+ } | undefined;
18900
+ subscribe?: {
18901
+ subscriptionId?: string | undefined;
18902
+ } | undefined;
18903
+ }, {
18904
+ type: "fetch_workspaces_request";
18905
+ requestId: string;
18906
+ sort?: {
18907
+ key: "name" | "status_priority" | "activity_at" | "project_id";
18908
+ direction: "asc" | "desc";
18909
+ }[] | undefined;
18910
+ filter?: {
18911
+ query?: string | undefined;
18912
+ projectId?: string | undefined;
18913
+ idPrefix?: string | undefined;
18914
+ } | undefined;
18915
+ page?: {
18916
+ limit: number;
18917
+ cursor?: string | undefined;
18918
+ } | undefined;
18919
+ subscribe?: {
18920
+ subscriptionId?: string | undefined;
18921
+ } | undefined;
17829
18922
  }>, z.ZodObject<{
17830
18923
  type: z.ZodLiteral<"fetch_agent_request">;
17831
18924
  requestId: z.ZodString;
@@ -18523,6 +19616,15 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
18523
19616
  }, {
18524
19617
  agentId: string;
18525
19618
  type: "cancel_agent_request";
19619
+ }>, z.ZodObject<{
19620
+ type: z.ZodLiteral<"shutdown_server_request">;
19621
+ requestId: z.ZodString;
19622
+ }, "strip", z.ZodTypeAny, {
19623
+ type: "shutdown_server_request";
19624
+ requestId: string;
19625
+ }, {
19626
+ type: "shutdown_server_request";
19627
+ requestId: string;
18526
19628
  }>, z.ZodObject<{
18527
19629
  type: z.ZodLiteral<"restart_server_request">;
18528
19630
  reason: z.ZodOptional<z.ZodString>;
@@ -18882,19 +19984,19 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
18882
19984
  repoRoot?: string | undefined;
18883
19985
  }>, z.ZodObject<{
18884
19986
  type: z.ZodLiteral<"file_explorer_request">;
18885
- agentId: z.ZodString;
19987
+ cwd: z.ZodString;
18886
19988
  path: z.ZodOptional<z.ZodString>;
18887
19989
  mode: z.ZodEnum<["list", "file"]>;
18888
19990
  requestId: z.ZodString;
18889
19991
  }, "strip", z.ZodTypeAny, {
18890
- agentId: string;
18891
19992
  mode: "file" | "list";
19993
+ cwd: string;
18892
19994
  type: "file_explorer_request";
18893
19995
  requestId: string;
18894
19996
  path?: string | undefined;
18895
19997
  }, {
18896
- agentId: string;
18897
19998
  mode: "file" | "list";
19999
+ cwd: string;
18898
20000
  type: "file_explorer_request";
18899
20001
  requestId: string;
18900
20002
  path?: string | undefined;
@@ -18912,16 +20014,16 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
18912
20014
  requestId: string;
18913
20015
  }>, z.ZodObject<{
18914
20016
  type: z.ZodLiteral<"file_download_token_request">;
18915
- agentId: z.ZodString;
20017
+ cwd: z.ZodString;
18916
20018
  path: z.ZodString;
18917
20019
  requestId: z.ZodString;
18918
20020
  }, "strip", z.ZodTypeAny, {
18919
- agentId: string;
20021
+ cwd: string;
18920
20022
  path: string;
18921
20023
  type: "file_download_token_request";
18922
20024
  requestId: string;
18923
20025
  }, {
18924
- agentId: string;
20026
+ cwd: string;
18925
20027
  path: string;
18926
20028
  type: "file_download_token_request";
18927
20029
  requestId: string;
@@ -19262,6 +20364,25 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
19262
20364
  subscribe?: {
19263
20365
  subscriptionId?: string | undefined;
19264
20366
  } | undefined;
20367
+ } | {
20368
+ type: "fetch_workspaces_request";
20369
+ requestId: string;
20370
+ sort?: {
20371
+ key: "name" | "status_priority" | "activity_at" | "project_id";
20372
+ direction: "asc" | "desc";
20373
+ }[] | undefined;
20374
+ filter?: {
20375
+ query?: string | undefined;
20376
+ projectId?: string | undefined;
20377
+ idPrefix?: string | undefined;
20378
+ } | undefined;
20379
+ page?: {
20380
+ limit: number;
20381
+ cursor?: string | undefined;
20382
+ } | undefined;
20383
+ subscribe?: {
20384
+ subscriptionId?: string | undefined;
20385
+ } | undefined;
19265
20386
  } | {
19266
20387
  agentId: string;
19267
20388
  type: "fetch_agent_request";
@@ -19409,6 +20530,9 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
19409
20530
  type: "restart_server_request";
19410
20531
  requestId: string;
19411
20532
  reason?: string | undefined;
20533
+ } | {
20534
+ type: "shutdown_server_request";
20535
+ requestId: string;
19412
20536
  } | {
19413
20537
  agentId: string;
19414
20538
  type: "fetch_agent_timeline_request";
@@ -19521,8 +20645,8 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
19521
20645
  branchName?: string | undefined;
19522
20646
  repoRoot?: string | undefined;
19523
20647
  } | {
19524
- agentId: string;
19525
20648
  mode: "file" | "list";
20649
+ cwd: string;
19526
20650
  type: "file_explorer_request";
19527
20651
  requestId: string;
19528
20652
  path?: string | undefined;
@@ -19531,7 +20655,7 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
19531
20655
  type: "project_icon_request";
19532
20656
  requestId: string;
19533
20657
  } | {
19534
- agentId: string;
20658
+ cwd: string;
19535
20659
  path: string;
19536
20660
  type: "file_download_token_request";
19537
20661
  requestId: string;
@@ -19671,6 +20795,25 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
19671
20795
  subscribe?: {
19672
20796
  subscriptionId?: string | undefined;
19673
20797
  } | undefined;
20798
+ } | {
20799
+ type: "fetch_workspaces_request";
20800
+ requestId: string;
20801
+ sort?: {
20802
+ key: "name" | "status_priority" | "activity_at" | "project_id";
20803
+ direction: "asc" | "desc";
20804
+ }[] | undefined;
20805
+ filter?: {
20806
+ query?: string | undefined;
20807
+ projectId?: string | undefined;
20808
+ idPrefix?: string | undefined;
20809
+ } | undefined;
20810
+ page?: {
20811
+ limit: number;
20812
+ cursor?: string | undefined;
20813
+ } | undefined;
20814
+ subscribe?: {
20815
+ subscriptionId?: string | undefined;
20816
+ } | undefined;
19674
20817
  } | {
19675
20818
  agentId: string;
19676
20819
  type: "fetch_agent_request";
@@ -19818,6 +20961,9 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
19818
20961
  type: "restart_server_request";
19819
20962
  requestId: string;
19820
20963
  reason?: string | undefined;
20964
+ } | {
20965
+ type: "shutdown_server_request";
20966
+ requestId: string;
19821
20967
  } | {
19822
20968
  agentId: string;
19823
20969
  type: "fetch_agent_timeline_request";
@@ -19930,8 +21076,8 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
19930
21076
  branchName?: string | undefined;
19931
21077
  repoRoot?: string | undefined;
19932
21078
  } | {
19933
- agentId: string;
19934
21079
  mode: "file" | "list";
21080
+ cwd: string;
19935
21081
  type: "file_explorer_request";
19936
21082
  requestId: string;
19937
21083
  path?: string | undefined;
@@ -19940,7 +21086,7 @@ export declare const WSSessionInboundSchema: z.ZodObject<{
19940
21086
  type: "project_icon_request";
19941
21087
  requestId: string;
19942
21088
  } | {
19943
- agentId: string;
21089
+ cwd: string;
19944
21090
  path: string;
19945
21091
  type: "file_download_token_request";
19946
21092
  requestId: string;
@@ -20908,6 +22054,87 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
20908
22054
  agentId: string;
20909
22055
  kind: "remove";
20910
22056
  };
22057
+ }>, z.ZodObject<{
22058
+ type: z.ZodLiteral<"workspace_update">;
22059
+ payload: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
22060
+ kind: z.ZodLiteral<"upsert">;
22061
+ workspace: z.ZodObject<{
22062
+ id: z.ZodString;
22063
+ projectId: z.ZodString;
22064
+ name: z.ZodString;
22065
+ status: z.ZodEnum<["needs_input", "failed", "running", "attention", "done"]>;
22066
+ activityAt: z.ZodNullable<z.ZodString>;
22067
+ }, "strip", z.ZodTypeAny, {
22068
+ id: string;
22069
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
22070
+ name: string;
22071
+ projectId: string;
22072
+ activityAt: string | null;
22073
+ }, {
22074
+ id: string;
22075
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
22076
+ name: string;
22077
+ projectId: string;
22078
+ activityAt: string | null;
22079
+ }>;
22080
+ }, "strip", z.ZodTypeAny, {
22081
+ kind: "upsert";
22082
+ workspace: {
22083
+ id: string;
22084
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
22085
+ name: string;
22086
+ projectId: string;
22087
+ activityAt: string | null;
22088
+ };
22089
+ }, {
22090
+ kind: "upsert";
22091
+ workspace: {
22092
+ id: string;
22093
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
22094
+ name: string;
22095
+ projectId: string;
22096
+ activityAt: string | null;
22097
+ };
22098
+ }>, z.ZodObject<{
22099
+ kind: z.ZodLiteral<"remove">;
22100
+ id: z.ZodString;
22101
+ }, "strip", z.ZodTypeAny, {
22102
+ id: string;
22103
+ kind: "remove";
22104
+ }, {
22105
+ id: string;
22106
+ kind: "remove";
22107
+ }>]>;
22108
+ }, "strip", z.ZodTypeAny, {
22109
+ type: "workspace_update";
22110
+ payload: {
22111
+ kind: "upsert";
22112
+ workspace: {
22113
+ id: string;
22114
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
22115
+ name: string;
22116
+ projectId: string;
22117
+ activityAt: string | null;
22118
+ };
22119
+ } | {
22120
+ id: string;
22121
+ kind: "remove";
22122
+ };
22123
+ }, {
22124
+ type: "workspace_update";
22125
+ payload: {
22126
+ kind: "upsert";
22127
+ workspace: {
22128
+ id: string;
22129
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
22130
+ name: string;
22131
+ projectId: string;
22132
+ activityAt: string | null;
22133
+ };
22134
+ } | {
22135
+ id: string;
22136
+ kind: "remove";
22137
+ };
20911
22138
  }>, z.ZodObject<{
20912
22139
  type: z.ZodLiteral<"agent_stream">;
20913
22140
  payload: z.ZodObject<{
@@ -20949,14 +22176,20 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
20949
22176
  type: z.ZodLiteral<"turn_failed">;
20950
22177
  provider: z.ZodEnum<[string, ...string[]]>;
20951
22178
  error: z.ZodString;
22179
+ code: z.ZodOptional<z.ZodString>;
22180
+ diagnostic: z.ZodOptional<z.ZodString>;
20952
22181
  }, "strip", z.ZodTypeAny, {
20953
22182
  error: string;
20954
22183
  provider: string;
20955
22184
  type: "turn_failed";
22185
+ code?: string | undefined;
22186
+ diagnostic?: string | undefined;
20956
22187
  }, {
20957
22188
  error: string;
20958
22189
  provider: string;
20959
22190
  type: "turn_failed";
22191
+ code?: string | undefined;
22192
+ diagnostic?: string | undefined;
20960
22193
  }>, z.ZodObject<{
20961
22194
  type: z.ZodLiteral<"turn_canceled">;
20962
22195
  provider: z.ZodEnum<[string, ...string[]]>;
@@ -21099,6 +22332,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
21099
22332
  error: string;
21100
22333
  provider: string;
21101
22334
  type: "turn_failed";
22335
+ code?: string | undefined;
22336
+ diagnostic?: string | undefined;
21102
22337
  } | {
21103
22338
  reason: string;
21104
22339
  provider: string;
@@ -21152,6 +22387,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
21152
22387
  error: string;
21153
22388
  provider: string;
21154
22389
  type: "turn_failed";
22390
+ code?: string | undefined;
22391
+ diagnostic?: string | undefined;
21155
22392
  } | {
21156
22393
  reason: string;
21157
22394
  provider: string;
@@ -21208,6 +22445,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
21208
22445
  error: string;
21209
22446
  provider: string;
21210
22447
  type: "turn_failed";
22448
+ code?: string | undefined;
22449
+ diagnostic?: string | undefined;
21211
22450
  } | {
21212
22451
  reason: string;
21213
22452
  provider: string;
@@ -21264,6 +22503,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
21264
22503
  error: string;
21265
22504
  provider: string;
21266
22505
  type: "turn_failed";
22506
+ code?: string | undefined;
22507
+ diagnostic?: string | undefined;
21267
22508
  } | {
21268
22509
  reason: string;
21269
22510
  provider: string;
@@ -22079,6 +23320,110 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
22079
23320
  };
22080
23321
  subscriptionId?: string | null | undefined;
22081
23322
  };
23323
+ }>, z.ZodObject<{
23324
+ type: z.ZodLiteral<"fetch_workspaces_response">;
23325
+ payload: z.ZodObject<{
23326
+ requestId: z.ZodString;
23327
+ subscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23328
+ entries: z.ZodArray<z.ZodObject<{
23329
+ id: z.ZodString;
23330
+ projectId: z.ZodString;
23331
+ name: z.ZodString;
23332
+ status: z.ZodEnum<["needs_input", "failed", "running", "attention", "done"]>;
23333
+ activityAt: z.ZodNullable<z.ZodString>;
23334
+ }, "strip", z.ZodTypeAny, {
23335
+ id: string;
23336
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
23337
+ name: string;
23338
+ projectId: string;
23339
+ activityAt: string | null;
23340
+ }, {
23341
+ id: string;
23342
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
23343
+ name: string;
23344
+ projectId: string;
23345
+ activityAt: string | null;
23346
+ }>, "many">;
23347
+ pageInfo: z.ZodObject<{
23348
+ nextCursor: z.ZodNullable<z.ZodString>;
23349
+ prevCursor: z.ZodNullable<z.ZodString>;
23350
+ hasMore: z.ZodBoolean;
23351
+ }, "strip", z.ZodTypeAny, {
23352
+ nextCursor: string | null;
23353
+ prevCursor: string | null;
23354
+ hasMore: boolean;
23355
+ }, {
23356
+ nextCursor: string | null;
23357
+ prevCursor: string | null;
23358
+ hasMore: boolean;
23359
+ }>;
23360
+ }, "strip", z.ZodTypeAny, {
23361
+ entries: {
23362
+ id: string;
23363
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
23364
+ name: string;
23365
+ projectId: string;
23366
+ activityAt: string | null;
23367
+ }[];
23368
+ requestId: string;
23369
+ pageInfo: {
23370
+ nextCursor: string | null;
23371
+ prevCursor: string | null;
23372
+ hasMore: boolean;
23373
+ };
23374
+ subscriptionId?: string | null | undefined;
23375
+ }, {
23376
+ entries: {
23377
+ id: string;
23378
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
23379
+ name: string;
23380
+ projectId: string;
23381
+ activityAt: string | null;
23382
+ }[];
23383
+ requestId: string;
23384
+ pageInfo: {
23385
+ nextCursor: string | null;
23386
+ prevCursor: string | null;
23387
+ hasMore: boolean;
23388
+ };
23389
+ subscriptionId?: string | null | undefined;
23390
+ }>;
23391
+ }, "strip", z.ZodTypeAny, {
23392
+ type: "fetch_workspaces_response";
23393
+ payload: {
23394
+ entries: {
23395
+ id: string;
23396
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
23397
+ name: string;
23398
+ projectId: string;
23399
+ activityAt: string | null;
23400
+ }[];
23401
+ requestId: string;
23402
+ pageInfo: {
23403
+ nextCursor: string | null;
23404
+ prevCursor: string | null;
23405
+ hasMore: boolean;
23406
+ };
23407
+ subscriptionId?: string | null | undefined;
23408
+ };
23409
+ }, {
23410
+ type: "fetch_workspaces_response";
23411
+ payload: {
23412
+ entries: {
23413
+ id: string;
23414
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
23415
+ name: string;
23416
+ projectId: string;
23417
+ activityAt: string | null;
23418
+ }[];
23419
+ requestId: string;
23420
+ pageInfo: {
23421
+ nextCursor: string | null;
23422
+ prevCursor: string | null;
23423
+ hasMore: boolean;
23424
+ };
23425
+ subscriptionId?: string | null | undefined;
23426
+ };
22082
23427
  }>, z.ZodObject<{
22083
23428
  type: z.ZodLiteral<"fetch_agent_response">;
22084
23429
  payload: z.ZodObject<{
@@ -22251,34 +23596,147 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
22251
23596
  isPaseoOwnedWorktree: true;
22252
23597
  mainRepoRoot: string;
22253
23598
  };
22254
- }, {
22255
- projectKey: string;
22256
- projectName: string;
22257
- checkout: {
22258
- cwd: string;
22259
- isGit: false;
22260
- currentBranch: null;
22261
- remoteUrl: null;
22262
- isPaseoOwnedWorktree: false;
22263
- mainRepoRoot: null;
22264
- } | {
22265
- cwd: string;
22266
- isGit: true;
22267
- currentBranch: string | null;
22268
- remoteUrl: string | null;
22269
- isPaseoOwnedWorktree: false;
22270
- mainRepoRoot: null;
22271
- } | {
22272
- cwd: string;
22273
- isGit: true;
22274
- currentBranch: string | null;
22275
- remoteUrl: string | null;
22276
- isPaseoOwnedWorktree: true;
22277
- mainRepoRoot: string;
22278
- };
22279
- }>>>;
22280
- error: z.ZodNullable<z.ZodString>;
22281
- }, "strip", z.ZodTypeAny, {
23599
+ }, {
23600
+ projectKey: string;
23601
+ projectName: string;
23602
+ checkout: {
23603
+ cwd: string;
23604
+ isGit: false;
23605
+ currentBranch: null;
23606
+ remoteUrl: null;
23607
+ isPaseoOwnedWorktree: false;
23608
+ mainRepoRoot: null;
23609
+ } | {
23610
+ cwd: string;
23611
+ isGit: true;
23612
+ currentBranch: string | null;
23613
+ remoteUrl: string | null;
23614
+ isPaseoOwnedWorktree: false;
23615
+ mainRepoRoot: null;
23616
+ } | {
23617
+ cwd: string;
23618
+ isGit: true;
23619
+ currentBranch: string | null;
23620
+ remoteUrl: string | null;
23621
+ isPaseoOwnedWorktree: true;
23622
+ mainRepoRoot: string;
23623
+ };
23624
+ }>>>;
23625
+ error: z.ZodNullable<z.ZodString>;
23626
+ }, "strip", z.ZodTypeAny, {
23627
+ error: string | null;
23628
+ requestId: string;
23629
+ agent: {
23630
+ id: string;
23631
+ provider: string;
23632
+ cwd: string;
23633
+ createdAt: string;
23634
+ updatedAt: string;
23635
+ lastUserMessageAt: string | null;
23636
+ title: string | null;
23637
+ status: "error" | "initializing" | "idle" | "running" | "closed";
23638
+ labels: Record<string, string>;
23639
+ model: string | null;
23640
+ persistence: AgentPersistenceHandle | null;
23641
+ capabilities: AgentCapabilityFlags;
23642
+ currentModeId: string | null;
23643
+ availableModes: AgentMode[];
23644
+ pendingPermissions: AgentPermissionRequest[];
23645
+ thinkingOptionId?: string | null | undefined;
23646
+ runtimeInfo?: AgentRuntimeInfo | undefined;
23647
+ requiresAttention?: boolean | undefined;
23648
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
23649
+ attentionTimestamp?: string | null | undefined;
23650
+ archivedAt?: string | null | undefined;
23651
+ effectiveThinkingOptionId?: string | null | undefined;
23652
+ lastUsage?: AgentUsage | undefined;
23653
+ lastError?: string | undefined;
23654
+ } | null;
23655
+ project?: {
23656
+ projectKey: string;
23657
+ projectName: string;
23658
+ checkout: {
23659
+ cwd: string;
23660
+ isGit: false;
23661
+ currentBranch: null;
23662
+ remoteUrl: null;
23663
+ isPaseoOwnedWorktree: false;
23664
+ mainRepoRoot: null;
23665
+ } | {
23666
+ cwd: string;
23667
+ isGit: true;
23668
+ currentBranch: string | null;
23669
+ remoteUrl: string | null;
23670
+ isPaseoOwnedWorktree: false;
23671
+ mainRepoRoot: null;
23672
+ } | {
23673
+ cwd: string;
23674
+ isGit: true;
23675
+ currentBranch: string | null;
23676
+ remoteUrl: string | null;
23677
+ isPaseoOwnedWorktree: true;
23678
+ mainRepoRoot: string;
23679
+ };
23680
+ } | null | undefined;
23681
+ }, {
23682
+ error: string | null;
23683
+ requestId: string;
23684
+ agent: {
23685
+ id: string;
23686
+ provider: string;
23687
+ cwd: string;
23688
+ createdAt: string;
23689
+ updatedAt: string;
23690
+ lastUserMessageAt: string | null;
23691
+ title: string | null;
23692
+ status: "error" | "initializing" | "idle" | "running" | "closed";
23693
+ model: string | null;
23694
+ persistence: AgentPersistenceHandle | null;
23695
+ capabilities: AgentCapabilityFlags;
23696
+ currentModeId: string | null;
23697
+ availableModes: AgentMode[];
23698
+ pendingPermissions: AgentPermissionRequest[];
23699
+ thinkingOptionId?: string | null | undefined;
23700
+ labels?: Record<string, string> | undefined;
23701
+ runtimeInfo?: AgentRuntimeInfo | undefined;
23702
+ requiresAttention?: boolean | undefined;
23703
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
23704
+ attentionTimestamp?: string | null | undefined;
23705
+ archivedAt?: string | null | undefined;
23706
+ effectiveThinkingOptionId?: string | null | undefined;
23707
+ lastUsage?: AgentUsage | undefined;
23708
+ lastError?: string | undefined;
23709
+ } | null;
23710
+ project?: {
23711
+ projectKey: string;
23712
+ projectName: string;
23713
+ checkout: {
23714
+ cwd: string;
23715
+ isGit: false;
23716
+ currentBranch: null;
23717
+ remoteUrl: null;
23718
+ isPaseoOwnedWorktree: false;
23719
+ mainRepoRoot: null;
23720
+ } | {
23721
+ cwd: string;
23722
+ isGit: true;
23723
+ currentBranch: string | null;
23724
+ remoteUrl: string | null;
23725
+ isPaseoOwnedWorktree: false;
23726
+ mainRepoRoot: null;
23727
+ } | {
23728
+ cwd: string;
23729
+ isGit: true;
23730
+ currentBranch: string | null;
23731
+ remoteUrl: string | null;
23732
+ isPaseoOwnedWorktree: true;
23733
+ mainRepoRoot: string;
23734
+ };
23735
+ } | null | undefined;
23736
+ }>;
23737
+ }, "strip", z.ZodTypeAny, {
23738
+ type: "fetch_agent_response";
23739
+ payload: {
22282
23740
  error: string | null;
22283
23741
  requestId: string;
22284
23742
  agent: {
@@ -22333,7 +23791,10 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
22333
23791
  mainRepoRoot: string;
22334
23792
  };
22335
23793
  } | null | undefined;
22336
- }, {
23794
+ };
23795
+ }, {
23796
+ type: "fetch_agent_response";
23797
+ payload: {
22337
23798
  error: string | null;
22338
23799
  requestId: string;
22339
23800
  agent: {
@@ -22388,13 +23849,38 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
22388
23849
  mainRepoRoot: string;
22389
23850
  };
22390
23851
  } | null | undefined;
22391
- }>;
22392
- }, "strip", z.ZodTypeAny, {
22393
- type: "fetch_agent_response";
22394
- payload: {
22395
- error: string | null;
22396
- requestId: string;
22397
- agent: {
23852
+ };
23853
+ }>, z.ZodObject<{
23854
+ type: z.ZodLiteral<"fetch_agent_timeline_response">;
23855
+ payload: z.ZodObject<{
23856
+ requestId: z.ZodString;
23857
+ agentId: z.ZodString;
23858
+ agent: z.ZodNullable<z.ZodObject<{
23859
+ id: z.ZodString;
23860
+ provider: z.ZodEnum<[string, ...string[]]>;
23861
+ cwd: z.ZodString;
23862
+ model: z.ZodNullable<z.ZodString>;
23863
+ thinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23864
+ effectiveThinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23865
+ createdAt: z.ZodString;
23866
+ updatedAt: z.ZodString;
23867
+ lastUserMessageAt: z.ZodNullable<z.ZodString>;
23868
+ status: z.ZodEnum<["initializing", "idle", "running", "error", "closed"]>;
23869
+ capabilities: z.ZodType<AgentCapabilityFlags, z.ZodTypeDef, AgentCapabilityFlags>;
23870
+ currentModeId: z.ZodNullable<z.ZodString>;
23871
+ availableModes: z.ZodArray<z.ZodType<AgentMode, z.ZodTypeDef, AgentMode>, "many">;
23872
+ pendingPermissions: z.ZodArray<z.ZodType<AgentPermissionRequest, z.ZodTypeDef, AgentPermissionRequest>, "many">;
23873
+ persistence: z.ZodNullable<z.ZodType<AgentPersistenceHandle | null, z.ZodTypeDef, AgentPersistenceHandle | null>>;
23874
+ runtimeInfo: z.ZodOptional<z.ZodType<AgentRuntimeInfo, z.ZodTypeDef, AgentRuntimeInfo>>;
23875
+ lastUsage: z.ZodOptional<z.ZodType<AgentUsage, z.ZodTypeDef, AgentUsage>>;
23876
+ lastError: z.ZodOptional<z.ZodString>;
23877
+ title: z.ZodNullable<z.ZodString>;
23878
+ labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
23879
+ requiresAttention: z.ZodOptional<z.ZodBoolean>;
23880
+ attentionReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<["finished", "error", "permission"]>>>;
23881
+ attentionTimestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23882
+ archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23883
+ }, "strip", z.ZodTypeAny, {
22398
23884
  id: string;
22399
23885
  provider: string;
22400
23886
  cwd: string;
@@ -22419,40 +23905,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
22419
23905
  effectiveThinkingOptionId?: string | null | undefined;
22420
23906
  lastUsage?: AgentUsage | undefined;
22421
23907
  lastError?: string | undefined;
22422
- } | null;
22423
- project?: {
22424
- projectKey: string;
22425
- projectName: string;
22426
- checkout: {
22427
- cwd: string;
22428
- isGit: false;
22429
- currentBranch: null;
22430
- remoteUrl: null;
22431
- isPaseoOwnedWorktree: false;
22432
- mainRepoRoot: null;
22433
- } | {
22434
- cwd: string;
22435
- isGit: true;
22436
- currentBranch: string | null;
22437
- remoteUrl: string | null;
22438
- isPaseoOwnedWorktree: false;
22439
- mainRepoRoot: null;
22440
- } | {
22441
- cwd: string;
22442
- isGit: true;
22443
- currentBranch: string | null;
22444
- remoteUrl: string | null;
22445
- isPaseoOwnedWorktree: true;
22446
- mainRepoRoot: string;
22447
- };
22448
- } | null | undefined;
22449
- };
22450
- }, {
22451
- type: "fetch_agent_response";
22452
- payload: {
22453
- error: string | null;
22454
- requestId: string;
22455
- agent: {
23908
+ }, {
22456
23909
  id: string;
22457
23910
  provider: string;
22458
23911
  cwd: string;
@@ -22477,39 +23930,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
22477
23930
  effectiveThinkingOptionId?: string | null | undefined;
22478
23931
  lastUsage?: AgentUsage | undefined;
22479
23932
  lastError?: string | undefined;
22480
- } | null;
22481
- project?: {
22482
- projectKey: string;
22483
- projectName: string;
22484
- checkout: {
22485
- cwd: string;
22486
- isGit: false;
22487
- currentBranch: null;
22488
- remoteUrl: null;
22489
- isPaseoOwnedWorktree: false;
22490
- mainRepoRoot: null;
22491
- } | {
22492
- cwd: string;
22493
- isGit: true;
22494
- currentBranch: string | null;
22495
- remoteUrl: string | null;
22496
- isPaseoOwnedWorktree: false;
22497
- mainRepoRoot: null;
22498
- } | {
22499
- cwd: string;
22500
- isGit: true;
22501
- currentBranch: string | null;
22502
- remoteUrl: string | null;
22503
- isPaseoOwnedWorktree: true;
22504
- mainRepoRoot: string;
22505
- };
22506
- } | null | undefined;
22507
- };
22508
- }>, z.ZodObject<{
22509
- type: z.ZodLiteral<"fetch_agent_timeline_response">;
22510
- payload: z.ZodObject<{
22511
- requestId: z.ZodString;
22512
- agentId: z.ZodString;
23933
+ }>>;
22513
23934
  direction: z.ZodEnum<["tail", "before", "after"]>;
22514
23935
  projection: z.ZodEnum<["projected", "canonical"]>;
22515
23936
  epoch: z.ZodString;
@@ -22611,6 +24032,32 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
22611
24032
  direction: "tail" | "before" | "after";
22612
24033
  epoch: string;
22613
24034
  projection: "projected" | "canonical";
24035
+ agent: {
24036
+ id: string;
24037
+ provider: string;
24038
+ cwd: string;
24039
+ createdAt: string;
24040
+ updatedAt: string;
24041
+ lastUserMessageAt: string | null;
24042
+ title: string | null;
24043
+ status: "error" | "initializing" | "idle" | "running" | "closed";
24044
+ labels: Record<string, string>;
24045
+ model: string | null;
24046
+ persistence: AgentPersistenceHandle | null;
24047
+ capabilities: AgentCapabilityFlags;
24048
+ currentModeId: string | null;
24049
+ availableModes: AgentMode[];
24050
+ pendingPermissions: AgentPermissionRequest[];
24051
+ thinkingOptionId?: string | null | undefined;
24052
+ runtimeInfo?: AgentRuntimeInfo | undefined;
24053
+ requiresAttention?: boolean | undefined;
24054
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
24055
+ attentionTimestamp?: string | null | undefined;
24056
+ archivedAt?: string | null | undefined;
24057
+ effectiveThinkingOptionId?: string | null | undefined;
24058
+ lastUsage?: AgentUsage | undefined;
24059
+ lastError?: string | undefined;
24060
+ } | null;
22614
24061
  reset: boolean;
22615
24062
  staleCursor: boolean;
22616
24063
  gap: boolean;
@@ -22648,6 +24095,32 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
22648
24095
  direction: "tail" | "before" | "after";
22649
24096
  epoch: string;
22650
24097
  projection: "projected" | "canonical";
24098
+ agent: {
24099
+ id: string;
24100
+ provider: string;
24101
+ cwd: string;
24102
+ createdAt: string;
24103
+ updatedAt: string;
24104
+ lastUserMessageAt: string | null;
24105
+ title: string | null;
24106
+ status: "error" | "initializing" | "idle" | "running" | "closed";
24107
+ model: string | null;
24108
+ persistence: AgentPersistenceHandle | null;
24109
+ capabilities: AgentCapabilityFlags;
24110
+ currentModeId: string | null;
24111
+ availableModes: AgentMode[];
24112
+ pendingPermissions: AgentPermissionRequest[];
24113
+ thinkingOptionId?: string | null | undefined;
24114
+ labels?: Record<string, string> | undefined;
24115
+ runtimeInfo?: AgentRuntimeInfo | undefined;
24116
+ requiresAttention?: boolean | undefined;
24117
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
24118
+ attentionTimestamp?: string | null | undefined;
24119
+ archivedAt?: string | null | undefined;
24120
+ effectiveThinkingOptionId?: string | null | undefined;
24121
+ lastUsage?: AgentUsage | undefined;
24122
+ lastError?: string | undefined;
24123
+ } | null;
22651
24124
  reset: boolean;
22652
24125
  staleCursor: boolean;
22653
24126
  gap: boolean;
@@ -22688,6 +24161,32 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
22688
24161
  direction: "tail" | "before" | "after";
22689
24162
  epoch: string;
22690
24163
  projection: "projected" | "canonical";
24164
+ agent: {
24165
+ id: string;
24166
+ provider: string;
24167
+ cwd: string;
24168
+ createdAt: string;
24169
+ updatedAt: string;
24170
+ lastUserMessageAt: string | null;
24171
+ title: string | null;
24172
+ status: "error" | "initializing" | "idle" | "running" | "closed";
24173
+ labels: Record<string, string>;
24174
+ model: string | null;
24175
+ persistence: AgentPersistenceHandle | null;
24176
+ capabilities: AgentCapabilityFlags;
24177
+ currentModeId: string | null;
24178
+ availableModes: AgentMode[];
24179
+ pendingPermissions: AgentPermissionRequest[];
24180
+ thinkingOptionId?: string | null | undefined;
24181
+ runtimeInfo?: AgentRuntimeInfo | undefined;
24182
+ requiresAttention?: boolean | undefined;
24183
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
24184
+ attentionTimestamp?: string | null | undefined;
24185
+ archivedAt?: string | null | undefined;
24186
+ effectiveThinkingOptionId?: string | null | undefined;
24187
+ lastUsage?: AgentUsage | undefined;
24188
+ lastError?: string | undefined;
24189
+ } | null;
22691
24190
  reset: boolean;
22692
24191
  staleCursor: boolean;
22693
24192
  gap: boolean;
@@ -22728,6 +24227,32 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
22728
24227
  direction: "tail" | "before" | "after";
22729
24228
  epoch: string;
22730
24229
  projection: "projected" | "canonical";
24230
+ agent: {
24231
+ id: string;
24232
+ provider: string;
24233
+ cwd: string;
24234
+ createdAt: string;
24235
+ updatedAt: string;
24236
+ lastUserMessageAt: string | null;
24237
+ title: string | null;
24238
+ status: "error" | "initializing" | "idle" | "running" | "closed";
24239
+ model: string | null;
24240
+ persistence: AgentPersistenceHandle | null;
24241
+ capabilities: AgentCapabilityFlags;
24242
+ currentModeId: string | null;
24243
+ availableModes: AgentMode[];
24244
+ pendingPermissions: AgentPermissionRequest[];
24245
+ thinkingOptionId?: string | null | undefined;
24246
+ labels?: Record<string, string> | undefined;
24247
+ runtimeInfo?: AgentRuntimeInfo | undefined;
24248
+ requiresAttention?: boolean | undefined;
24249
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
24250
+ attentionTimestamp?: string | null | undefined;
24251
+ archivedAt?: string | null | undefined;
24252
+ effectiveThinkingOptionId?: string | null | undefined;
24253
+ lastUsage?: AgentUsage | undefined;
24254
+ lastError?: string | undefined;
24255
+ } | null;
22731
24256
  reset: boolean;
22732
24257
  staleCursor: boolean;
22733
24258
  gap: boolean;
@@ -24657,13 +26182,16 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24657
26182
  payload: z.ZodObject<{
24658
26183
  worktrees: z.ZodArray<z.ZodObject<{
24659
26184
  worktreePath: z.ZodString;
26185
+ createdAt: z.ZodString;
24660
26186
  branchName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24661
26187
  head: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24662
26188
  }, "strip", z.ZodTypeAny, {
26189
+ createdAt: string;
24663
26190
  worktreePath: string;
24664
26191
  branchName?: string | null | undefined;
24665
26192
  head?: string | null | undefined;
24666
26193
  }, {
26194
+ createdAt: string;
24667
26195
  worktreePath: string;
24668
26196
  branchName?: string | null | undefined;
24669
26197
  head?: string | null | undefined;
@@ -24686,6 +26214,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24686
26214
  } | null;
24687
26215
  requestId: string;
24688
26216
  worktrees: {
26217
+ createdAt: string;
24689
26218
  worktreePath: string;
24690
26219
  branchName?: string | null | undefined;
24691
26220
  head?: string | null | undefined;
@@ -24697,6 +26226,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24697
26226
  } | null;
24698
26227
  requestId: string;
24699
26228
  worktrees: {
26229
+ createdAt: string;
24700
26230
  worktreePath: string;
24701
26231
  branchName?: string | null | undefined;
24702
26232
  head?: string | null | undefined;
@@ -24711,6 +26241,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24711
26241
  } | null;
24712
26242
  requestId: string;
24713
26243
  worktrees: {
26244
+ createdAt: string;
24714
26245
  worktreePath: string;
24715
26246
  branchName?: string | null | undefined;
24716
26247
  head?: string | null | undefined;
@@ -24725,6 +26256,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24725
26256
  } | null;
24726
26257
  requestId: string;
24727
26258
  worktrees: {
26259
+ createdAt: string;
24728
26260
  worktreePath: string;
24729
26261
  branchName?: string | null | undefined;
24730
26262
  head?: string | null | undefined;
@@ -24788,7 +26320,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24788
26320
  }>, z.ZodObject<{
24789
26321
  type: z.ZodLiteral<"file_explorer_response">;
24790
26322
  payload: z.ZodObject<{
24791
- agentId: z.ZodString;
26323
+ cwd: z.ZodString;
24792
26324
  path: z.ZodString;
24793
26325
  mode: z.ZodEnum<["list", "file"]>;
24794
26326
  directory: z.ZodNullable<z.ZodObject<{
@@ -24860,8 +26392,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24860
26392
  requestId: z.ZodString;
24861
26393
  }, "strip", z.ZodTypeAny, {
24862
26394
  error: string | null;
24863
- agentId: string;
24864
26395
  mode: "file" | "list";
26396
+ cwd: string;
24865
26397
  path: string;
24866
26398
  requestId: string;
24867
26399
  file: {
@@ -24885,8 +26417,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24885
26417
  } | null;
24886
26418
  }, {
24887
26419
  error: string | null;
24888
- agentId: string;
24889
26420
  mode: "file" | "list";
26421
+ cwd: string;
24890
26422
  path: string;
24891
26423
  requestId: string;
24892
26424
  file: {
@@ -24913,8 +26445,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24913
26445
  type: "file_explorer_response";
24914
26446
  payload: {
24915
26447
  error: string | null;
24916
- agentId: string;
24917
26448
  mode: "file" | "list";
26449
+ cwd: string;
24918
26450
  path: string;
24919
26451
  requestId: string;
24920
26452
  file: {
@@ -24941,8 +26473,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24941
26473
  type: "file_explorer_response";
24942
26474
  payload: {
24943
26475
  error: string | null;
24944
- agentId: string;
24945
26476
  mode: "file" | "list";
26477
+ cwd: string;
24946
26478
  path: string;
24947
26479
  requestId: string;
24948
26480
  file: {
@@ -24984,46 +26516,46 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
24984
26516
  }, "strip", z.ZodTypeAny, {
24985
26517
  error: string | null;
24986
26518
  cwd: string;
24987
- requestId: string;
24988
26519
  icon: {
24989
26520
  data: string;
24990
26521
  mimeType: string;
24991
26522
  } | null;
26523
+ requestId: string;
24992
26524
  }, {
24993
26525
  error: string | null;
24994
26526
  cwd: string;
24995
- requestId: string;
24996
26527
  icon: {
24997
26528
  data: string;
24998
26529
  mimeType: string;
24999
26530
  } | null;
26531
+ requestId: string;
25000
26532
  }>;
25001
26533
  }, "strip", z.ZodTypeAny, {
25002
26534
  type: "project_icon_response";
25003
26535
  payload: {
25004
26536
  error: string | null;
25005
26537
  cwd: string;
25006
- requestId: string;
25007
26538
  icon: {
25008
26539
  data: string;
25009
26540
  mimeType: string;
25010
26541
  } | null;
26542
+ requestId: string;
25011
26543
  };
25012
26544
  }, {
25013
26545
  type: "project_icon_response";
25014
26546
  payload: {
25015
26547
  error: string | null;
25016
26548
  cwd: string;
25017
- requestId: string;
25018
26549
  icon: {
25019
26550
  data: string;
25020
26551
  mimeType: string;
25021
26552
  } | null;
26553
+ requestId: string;
25022
26554
  };
25023
26555
  }>, z.ZodObject<{
25024
26556
  type: z.ZodLiteral<"file_download_token_response">;
25025
26557
  payload: z.ZodObject<{
25026
- agentId: z.ZodString;
26558
+ cwd: z.ZodString;
25027
26559
  path: z.ZodString;
25028
26560
  token: z.ZodNullable<z.ZodString>;
25029
26561
  fileName: z.ZodNullable<z.ZodString>;
@@ -25033,7 +26565,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
25033
26565
  requestId: z.ZodString;
25034
26566
  }, "strip", z.ZodTypeAny, {
25035
26567
  error: string | null;
25036
- agentId: string;
26568
+ cwd: string;
25037
26569
  path: string;
25038
26570
  requestId: string;
25039
26571
  mimeType: string | null;
@@ -25042,7 +26574,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
25042
26574
  fileName: string | null;
25043
26575
  }, {
25044
26576
  error: string | null;
25045
- agentId: string;
26577
+ cwd: string;
25046
26578
  path: string;
25047
26579
  requestId: string;
25048
26580
  mimeType: string | null;
@@ -25054,7 +26586,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
25054
26586
  type: "file_download_token_response";
25055
26587
  payload: {
25056
26588
  error: string | null;
25057
- agentId: string;
26589
+ cwd: string;
25058
26590
  path: string;
25059
26591
  requestId: string;
25060
26592
  mimeType: string | null;
@@ -25066,7 +26598,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
25066
26598
  type: "file_download_token_response";
25067
26599
  payload: {
25068
26600
  error: string | null;
25069
- agentId: string;
26601
+ cwd: string;
25070
26602
  path: string;
25071
26603
  requestId: string;
25072
26604
  mimeType: string | null;
@@ -26390,6 +27922,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
26390
27922
  error: string;
26391
27923
  provider: string;
26392
27924
  type: "turn_failed";
27925
+ code?: string | undefined;
27926
+ diagnostic?: string | undefined;
26393
27927
  } | {
26394
27928
  reason: string;
26395
27929
  provider: string;
@@ -26523,6 +28057,39 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
26523
28057
  };
26524
28058
  subscriptionId?: string | null | undefined;
26525
28059
  };
28060
+ } | {
28061
+ type: "fetch_workspaces_response";
28062
+ payload: {
28063
+ entries: {
28064
+ id: string;
28065
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
28066
+ name: string;
28067
+ projectId: string;
28068
+ activityAt: string | null;
28069
+ }[];
28070
+ requestId: string;
28071
+ pageInfo: {
28072
+ nextCursor: string | null;
28073
+ prevCursor: string | null;
28074
+ hasMore: boolean;
28075
+ };
28076
+ subscriptionId?: string | null | undefined;
28077
+ };
28078
+ } | {
28079
+ type: "workspace_update";
28080
+ payload: {
28081
+ kind: "upsert";
28082
+ workspace: {
28083
+ id: string;
28084
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
28085
+ name: string;
28086
+ projectId: string;
28087
+ activityAt: string | null;
28088
+ };
28089
+ } | {
28090
+ id: string;
28091
+ kind: "remove";
28092
+ };
26526
28093
  } | {
26527
28094
  type: "fetch_agent_response";
26528
28095
  payload: {
@@ -26602,6 +28169,32 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
26602
28169
  direction: "tail" | "before" | "after";
26603
28170
  epoch: string;
26604
28171
  projection: "projected" | "canonical";
28172
+ agent: {
28173
+ id: string;
28174
+ provider: string;
28175
+ cwd: string;
28176
+ createdAt: string;
28177
+ updatedAt: string;
28178
+ lastUserMessageAt: string | null;
28179
+ title: string | null;
28180
+ status: "error" | "initializing" | "idle" | "running" | "closed";
28181
+ labels: Record<string, string>;
28182
+ model: string | null;
28183
+ persistence: AgentPersistenceHandle | null;
28184
+ capabilities: AgentCapabilityFlags;
28185
+ currentModeId: string | null;
28186
+ availableModes: AgentMode[];
28187
+ pendingPermissions: AgentPermissionRequest[];
28188
+ thinkingOptionId?: string | null | undefined;
28189
+ runtimeInfo?: AgentRuntimeInfo | undefined;
28190
+ requiresAttention?: boolean | undefined;
28191
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
28192
+ attentionTimestamp?: string | null | undefined;
28193
+ archivedAt?: string | null | undefined;
28194
+ effectiveThinkingOptionId?: string | null | undefined;
28195
+ lastUsage?: AgentUsage | undefined;
28196
+ lastError?: string | undefined;
28197
+ } | null;
26605
28198
  reset: boolean;
26606
28199
  staleCursor: boolean;
26607
28200
  gap: boolean;
@@ -26929,6 +28522,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
26929
28522
  } | null;
26930
28523
  requestId: string;
26931
28524
  worktrees: {
28525
+ createdAt: string;
26932
28526
  worktreePath: string;
26933
28527
  branchName?: string | null | undefined;
26934
28528
  head?: string | null | undefined;
@@ -26949,8 +28543,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
26949
28543
  type: "file_explorer_response";
26950
28544
  payload: {
26951
28545
  error: string | null;
26952
- agentId: string;
26953
28546
  mode: "file" | "list";
28547
+ cwd: string;
26954
28548
  path: string;
26955
28549
  requestId: string;
26956
28550
  file: {
@@ -26978,17 +28572,17 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
26978
28572
  payload: {
26979
28573
  error: string | null;
26980
28574
  cwd: string;
26981
- requestId: string;
26982
28575
  icon: {
26983
28576
  data: string;
26984
28577
  mimeType: string;
26985
28578
  } | null;
28579
+ requestId: string;
26986
28580
  };
26987
28581
  } | {
26988
28582
  type: "file_download_token_response";
26989
28583
  payload: {
26990
28584
  error: string | null;
26991
- agentId: string;
28585
+ cwd: string;
26992
28586
  path: string;
26993
28587
  requestId: string;
26994
28588
  mimeType: string | null;
@@ -27413,6 +29007,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
27413
29007
  error: string;
27414
29008
  provider: string;
27415
29009
  type: "turn_failed";
29010
+ code?: string | undefined;
29011
+ diagnostic?: string | undefined;
27416
29012
  } | {
27417
29013
  reason: string;
27418
29014
  provider: string;
@@ -27546,6 +29142,39 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
27546
29142
  };
27547
29143
  subscriptionId?: string | null | undefined;
27548
29144
  };
29145
+ } | {
29146
+ type: "fetch_workspaces_response";
29147
+ payload: {
29148
+ entries: {
29149
+ id: string;
29150
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
29151
+ name: string;
29152
+ projectId: string;
29153
+ activityAt: string | null;
29154
+ }[];
29155
+ requestId: string;
29156
+ pageInfo: {
29157
+ nextCursor: string | null;
29158
+ prevCursor: string | null;
29159
+ hasMore: boolean;
29160
+ };
29161
+ subscriptionId?: string | null | undefined;
29162
+ };
29163
+ } | {
29164
+ type: "workspace_update";
29165
+ payload: {
29166
+ kind: "upsert";
29167
+ workspace: {
29168
+ id: string;
29169
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
29170
+ name: string;
29171
+ projectId: string;
29172
+ activityAt: string | null;
29173
+ };
29174
+ } | {
29175
+ id: string;
29176
+ kind: "remove";
29177
+ };
27549
29178
  } | {
27550
29179
  type: "fetch_agent_response";
27551
29180
  payload: {
@@ -27625,6 +29254,32 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
27625
29254
  direction: "tail" | "before" | "after";
27626
29255
  epoch: string;
27627
29256
  projection: "projected" | "canonical";
29257
+ agent: {
29258
+ id: string;
29259
+ provider: string;
29260
+ cwd: string;
29261
+ createdAt: string;
29262
+ updatedAt: string;
29263
+ lastUserMessageAt: string | null;
29264
+ title: string | null;
29265
+ status: "error" | "initializing" | "idle" | "running" | "closed";
29266
+ model: string | null;
29267
+ persistence: AgentPersistenceHandle | null;
29268
+ capabilities: AgentCapabilityFlags;
29269
+ currentModeId: string | null;
29270
+ availableModes: AgentMode[];
29271
+ pendingPermissions: AgentPermissionRequest[];
29272
+ thinkingOptionId?: string | null | undefined;
29273
+ labels?: Record<string, string> | undefined;
29274
+ runtimeInfo?: AgentRuntimeInfo | undefined;
29275
+ requiresAttention?: boolean | undefined;
29276
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
29277
+ attentionTimestamp?: string | null | undefined;
29278
+ archivedAt?: string | null | undefined;
29279
+ effectiveThinkingOptionId?: string | null | undefined;
29280
+ lastUsage?: AgentUsage | undefined;
29281
+ lastError?: string | undefined;
29282
+ } | null;
27628
29283
  reset: boolean;
27629
29284
  staleCursor: boolean;
27630
29285
  gap: boolean;
@@ -27952,6 +29607,7 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
27952
29607
  } | null;
27953
29608
  requestId: string;
27954
29609
  worktrees: {
29610
+ createdAt: string;
27955
29611
  worktreePath: string;
27956
29612
  branchName?: string | null | undefined;
27957
29613
  head?: string | null | undefined;
@@ -27972,8 +29628,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
27972
29628
  type: "file_explorer_response";
27973
29629
  payload: {
27974
29630
  error: string | null;
27975
- agentId: string;
27976
29631
  mode: "file" | "list";
29632
+ cwd: string;
27977
29633
  path: string;
27978
29634
  requestId: string;
27979
29635
  file: {
@@ -28001,17 +29657,17 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
28001
29657
  payload: {
28002
29658
  error: string | null;
28003
29659
  cwd: string;
28004
- requestId: string;
28005
29660
  icon: {
28006
29661
  data: string;
28007
29662
  mimeType: string;
28008
29663
  } | null;
29664
+ requestId: string;
28009
29665
  };
28010
29666
  } | {
28011
29667
  type: "file_download_token_response";
28012
29668
  payload: {
28013
29669
  error: string | null;
28014
- agentId: string;
29670
+ cwd: string;
28015
29671
  path: string;
28016
29672
  requestId: string;
28017
29673
  mimeType: string | null;
@@ -28383,6 +30039,87 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
28383
30039
  subscribe?: {
28384
30040
  subscriptionId?: string | undefined;
28385
30041
  } | undefined;
30042
+ }>, z.ZodObject<{
30043
+ type: z.ZodLiteral<"fetch_workspaces_request">;
30044
+ requestId: z.ZodString;
30045
+ filter: z.ZodOptional<z.ZodObject<{
30046
+ query: z.ZodOptional<z.ZodString>;
30047
+ projectId: z.ZodOptional<z.ZodString>;
30048
+ idPrefix: z.ZodOptional<z.ZodString>;
30049
+ }, "strip", z.ZodTypeAny, {
30050
+ query?: string | undefined;
30051
+ projectId?: string | undefined;
30052
+ idPrefix?: string | undefined;
30053
+ }, {
30054
+ query?: string | undefined;
30055
+ projectId?: string | undefined;
30056
+ idPrefix?: string | undefined;
30057
+ }>>;
30058
+ sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
30059
+ key: z.ZodEnum<["status_priority", "activity_at", "name", "project_id"]>;
30060
+ direction: z.ZodEnum<["asc", "desc"]>;
30061
+ }, "strip", z.ZodTypeAny, {
30062
+ key: "name" | "status_priority" | "activity_at" | "project_id";
30063
+ direction: "asc" | "desc";
30064
+ }, {
30065
+ key: "name" | "status_priority" | "activity_at" | "project_id";
30066
+ direction: "asc" | "desc";
30067
+ }>, "many">>;
30068
+ page: z.ZodOptional<z.ZodObject<{
30069
+ limit: z.ZodNumber;
30070
+ cursor: z.ZodOptional<z.ZodString>;
30071
+ }, "strip", z.ZodTypeAny, {
30072
+ limit: number;
30073
+ cursor?: string | undefined;
30074
+ }, {
30075
+ limit: number;
30076
+ cursor?: string | undefined;
30077
+ }>>;
30078
+ subscribe: z.ZodOptional<z.ZodObject<{
30079
+ subscriptionId: z.ZodOptional<z.ZodString>;
30080
+ }, "strip", z.ZodTypeAny, {
30081
+ subscriptionId?: string | undefined;
30082
+ }, {
30083
+ subscriptionId?: string | undefined;
30084
+ }>>;
30085
+ }, "strip", z.ZodTypeAny, {
30086
+ type: "fetch_workspaces_request";
30087
+ requestId: string;
30088
+ sort?: {
30089
+ key: "name" | "status_priority" | "activity_at" | "project_id";
30090
+ direction: "asc" | "desc";
30091
+ }[] | undefined;
30092
+ filter?: {
30093
+ query?: string | undefined;
30094
+ projectId?: string | undefined;
30095
+ idPrefix?: string | undefined;
30096
+ } | undefined;
30097
+ page?: {
30098
+ limit: number;
30099
+ cursor?: string | undefined;
30100
+ } | undefined;
30101
+ subscribe?: {
30102
+ subscriptionId?: string | undefined;
30103
+ } | undefined;
30104
+ }, {
30105
+ type: "fetch_workspaces_request";
30106
+ requestId: string;
30107
+ sort?: {
30108
+ key: "name" | "status_priority" | "activity_at" | "project_id";
30109
+ direction: "asc" | "desc";
30110
+ }[] | undefined;
30111
+ filter?: {
30112
+ query?: string | undefined;
30113
+ projectId?: string | undefined;
30114
+ idPrefix?: string | undefined;
30115
+ } | undefined;
30116
+ page?: {
30117
+ limit: number;
30118
+ cursor?: string | undefined;
30119
+ } | undefined;
30120
+ subscribe?: {
30121
+ subscriptionId?: string | undefined;
30122
+ } | undefined;
28386
30123
  }>, z.ZodObject<{
28387
30124
  type: z.ZodLiteral<"fetch_agent_request">;
28388
30125
  requestId: z.ZodString;
@@ -29080,6 +30817,15 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
29080
30817
  }, {
29081
30818
  agentId: string;
29082
30819
  type: "cancel_agent_request";
30820
+ }>, z.ZodObject<{
30821
+ type: z.ZodLiteral<"shutdown_server_request">;
30822
+ requestId: z.ZodString;
30823
+ }, "strip", z.ZodTypeAny, {
30824
+ type: "shutdown_server_request";
30825
+ requestId: string;
30826
+ }, {
30827
+ type: "shutdown_server_request";
30828
+ requestId: string;
29083
30829
  }>, z.ZodObject<{
29084
30830
  type: z.ZodLiteral<"restart_server_request">;
29085
30831
  reason: z.ZodOptional<z.ZodString>;
@@ -29439,19 +31185,19 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
29439
31185
  repoRoot?: string | undefined;
29440
31186
  }>, z.ZodObject<{
29441
31187
  type: z.ZodLiteral<"file_explorer_request">;
29442
- agentId: z.ZodString;
31188
+ cwd: z.ZodString;
29443
31189
  path: z.ZodOptional<z.ZodString>;
29444
31190
  mode: z.ZodEnum<["list", "file"]>;
29445
31191
  requestId: z.ZodString;
29446
31192
  }, "strip", z.ZodTypeAny, {
29447
- agentId: string;
29448
31193
  mode: "file" | "list";
31194
+ cwd: string;
29449
31195
  type: "file_explorer_request";
29450
31196
  requestId: string;
29451
31197
  path?: string | undefined;
29452
31198
  }, {
29453
- agentId: string;
29454
31199
  mode: "file" | "list";
31200
+ cwd: string;
29455
31201
  type: "file_explorer_request";
29456
31202
  requestId: string;
29457
31203
  path?: string | undefined;
@@ -29469,16 +31215,16 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
29469
31215
  requestId: string;
29470
31216
  }>, z.ZodObject<{
29471
31217
  type: z.ZodLiteral<"file_download_token_request">;
29472
- agentId: z.ZodString;
31218
+ cwd: z.ZodString;
29473
31219
  path: z.ZodString;
29474
31220
  requestId: z.ZodString;
29475
31221
  }, "strip", z.ZodTypeAny, {
29476
- agentId: string;
31222
+ cwd: string;
29477
31223
  path: string;
29478
31224
  type: "file_download_token_request";
29479
31225
  requestId: string;
29480
31226
  }, {
29481
- agentId: string;
31227
+ cwd: string;
29482
31228
  path: string;
29483
31229
  type: "file_download_token_request";
29484
31230
  requestId: string;
@@ -29819,6 +31565,25 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
29819
31565
  subscribe?: {
29820
31566
  subscriptionId?: string | undefined;
29821
31567
  } | undefined;
31568
+ } | {
31569
+ type: "fetch_workspaces_request";
31570
+ requestId: string;
31571
+ sort?: {
31572
+ key: "name" | "status_priority" | "activity_at" | "project_id";
31573
+ direction: "asc" | "desc";
31574
+ }[] | undefined;
31575
+ filter?: {
31576
+ query?: string | undefined;
31577
+ projectId?: string | undefined;
31578
+ idPrefix?: string | undefined;
31579
+ } | undefined;
31580
+ page?: {
31581
+ limit: number;
31582
+ cursor?: string | undefined;
31583
+ } | undefined;
31584
+ subscribe?: {
31585
+ subscriptionId?: string | undefined;
31586
+ } | undefined;
29822
31587
  } | {
29823
31588
  agentId: string;
29824
31589
  type: "fetch_agent_request";
@@ -29966,6 +31731,9 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
29966
31731
  type: "restart_server_request";
29967
31732
  requestId: string;
29968
31733
  reason?: string | undefined;
31734
+ } | {
31735
+ type: "shutdown_server_request";
31736
+ requestId: string;
29969
31737
  } | {
29970
31738
  agentId: string;
29971
31739
  type: "fetch_agent_timeline_request";
@@ -30078,8 +31846,8 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
30078
31846
  branchName?: string | undefined;
30079
31847
  repoRoot?: string | undefined;
30080
31848
  } | {
30081
- agentId: string;
30082
31849
  mode: "file" | "list";
31850
+ cwd: string;
30083
31851
  type: "file_explorer_request";
30084
31852
  requestId: string;
30085
31853
  path?: string | undefined;
@@ -30088,7 +31856,7 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
30088
31856
  type: "project_icon_request";
30089
31857
  requestId: string;
30090
31858
  } | {
30091
- agentId: string;
31859
+ cwd: string;
30092
31860
  path: string;
30093
31861
  type: "file_download_token_request";
30094
31862
  requestId: string;
@@ -30228,6 +31996,25 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
30228
31996
  subscribe?: {
30229
31997
  subscriptionId?: string | undefined;
30230
31998
  } | undefined;
31999
+ } | {
32000
+ type: "fetch_workspaces_request";
32001
+ requestId: string;
32002
+ sort?: {
32003
+ key: "name" | "status_priority" | "activity_at" | "project_id";
32004
+ direction: "asc" | "desc";
32005
+ }[] | undefined;
32006
+ filter?: {
32007
+ query?: string | undefined;
32008
+ projectId?: string | undefined;
32009
+ idPrefix?: string | undefined;
32010
+ } | undefined;
32011
+ page?: {
32012
+ limit: number;
32013
+ cursor?: string | undefined;
32014
+ } | undefined;
32015
+ subscribe?: {
32016
+ subscriptionId?: string | undefined;
32017
+ } | undefined;
30231
32018
  } | {
30232
32019
  agentId: string;
30233
32020
  type: "fetch_agent_request";
@@ -30375,6 +32162,9 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
30375
32162
  type: "restart_server_request";
30376
32163
  requestId: string;
30377
32164
  reason?: string | undefined;
32165
+ } | {
32166
+ type: "shutdown_server_request";
32167
+ requestId: string;
30378
32168
  } | {
30379
32169
  agentId: string;
30380
32170
  type: "fetch_agent_timeline_request";
@@ -30487,8 +32277,8 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
30487
32277
  branchName?: string | undefined;
30488
32278
  repoRoot?: string | undefined;
30489
32279
  } | {
30490
- agentId: string;
30491
32280
  mode: "file" | "list";
32281
+ cwd: string;
30492
32282
  type: "file_explorer_request";
30493
32283
  requestId: string;
30494
32284
  path?: string | undefined;
@@ -30497,7 +32287,7 @@ export declare const WSInboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z.
30497
32287
  type: "project_icon_request";
30498
32288
  requestId: string;
30499
32289
  } | {
30500
- agentId: string;
32290
+ cwd: string;
30501
32291
  path: string;
30502
32292
  type: "file_download_token_request";
30503
32293
  requestId: string;
@@ -31697,6 +33487,87 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
31697
33487
  agentId: string;
31698
33488
  kind: "remove";
31699
33489
  };
33490
+ }>, z.ZodObject<{
33491
+ type: z.ZodLiteral<"workspace_update">;
33492
+ payload: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
33493
+ kind: z.ZodLiteral<"upsert">;
33494
+ workspace: z.ZodObject<{
33495
+ id: z.ZodString;
33496
+ projectId: z.ZodString;
33497
+ name: z.ZodString;
33498
+ status: z.ZodEnum<["needs_input", "failed", "running", "attention", "done"]>;
33499
+ activityAt: z.ZodNullable<z.ZodString>;
33500
+ }, "strip", z.ZodTypeAny, {
33501
+ id: string;
33502
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
33503
+ name: string;
33504
+ projectId: string;
33505
+ activityAt: string | null;
33506
+ }, {
33507
+ id: string;
33508
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
33509
+ name: string;
33510
+ projectId: string;
33511
+ activityAt: string | null;
33512
+ }>;
33513
+ }, "strip", z.ZodTypeAny, {
33514
+ kind: "upsert";
33515
+ workspace: {
33516
+ id: string;
33517
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
33518
+ name: string;
33519
+ projectId: string;
33520
+ activityAt: string | null;
33521
+ };
33522
+ }, {
33523
+ kind: "upsert";
33524
+ workspace: {
33525
+ id: string;
33526
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
33527
+ name: string;
33528
+ projectId: string;
33529
+ activityAt: string | null;
33530
+ };
33531
+ }>, z.ZodObject<{
33532
+ kind: z.ZodLiteral<"remove">;
33533
+ id: z.ZodString;
33534
+ }, "strip", z.ZodTypeAny, {
33535
+ id: string;
33536
+ kind: "remove";
33537
+ }, {
33538
+ id: string;
33539
+ kind: "remove";
33540
+ }>]>;
33541
+ }, "strip", z.ZodTypeAny, {
33542
+ type: "workspace_update";
33543
+ payload: {
33544
+ kind: "upsert";
33545
+ workspace: {
33546
+ id: string;
33547
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
33548
+ name: string;
33549
+ projectId: string;
33550
+ activityAt: string | null;
33551
+ };
33552
+ } | {
33553
+ id: string;
33554
+ kind: "remove";
33555
+ };
33556
+ }, {
33557
+ type: "workspace_update";
33558
+ payload: {
33559
+ kind: "upsert";
33560
+ workspace: {
33561
+ id: string;
33562
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
33563
+ name: string;
33564
+ projectId: string;
33565
+ activityAt: string | null;
33566
+ };
33567
+ } | {
33568
+ id: string;
33569
+ kind: "remove";
33570
+ };
31700
33571
  }>, z.ZodObject<{
31701
33572
  type: z.ZodLiteral<"agent_stream">;
31702
33573
  payload: z.ZodObject<{
@@ -31738,14 +33609,20 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
31738
33609
  type: z.ZodLiteral<"turn_failed">;
31739
33610
  provider: z.ZodEnum<[string, ...string[]]>;
31740
33611
  error: z.ZodString;
33612
+ code: z.ZodOptional<z.ZodString>;
33613
+ diagnostic: z.ZodOptional<z.ZodString>;
31741
33614
  }, "strip", z.ZodTypeAny, {
31742
33615
  error: string;
31743
33616
  provider: string;
31744
33617
  type: "turn_failed";
33618
+ code?: string | undefined;
33619
+ diagnostic?: string | undefined;
31745
33620
  }, {
31746
33621
  error: string;
31747
33622
  provider: string;
31748
33623
  type: "turn_failed";
33624
+ code?: string | undefined;
33625
+ diagnostic?: string | undefined;
31749
33626
  }>, z.ZodObject<{
31750
33627
  type: z.ZodLiteral<"turn_canceled">;
31751
33628
  provider: z.ZodEnum<[string, ...string[]]>;
@@ -31888,6 +33765,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
31888
33765
  error: string;
31889
33766
  provider: string;
31890
33767
  type: "turn_failed";
33768
+ code?: string | undefined;
33769
+ diagnostic?: string | undefined;
31891
33770
  } | {
31892
33771
  reason: string;
31893
33772
  provider: string;
@@ -31941,6 +33820,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
31941
33820
  error: string;
31942
33821
  provider: string;
31943
33822
  type: "turn_failed";
33823
+ code?: string | undefined;
33824
+ diagnostic?: string | undefined;
31944
33825
  } | {
31945
33826
  reason: string;
31946
33827
  provider: string;
@@ -31997,6 +33878,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
31997
33878
  error: string;
31998
33879
  provider: string;
31999
33880
  type: "turn_failed";
33881
+ code?: string | undefined;
33882
+ diagnostic?: string | undefined;
32000
33883
  } | {
32001
33884
  reason: string;
32002
33885
  provider: string;
@@ -32053,6 +33936,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
32053
33936
  error: string;
32054
33937
  provider: string;
32055
33938
  type: "turn_failed";
33939
+ code?: string | undefined;
33940
+ diagnostic?: string | undefined;
32056
33941
  } | {
32057
33942
  reason: string;
32058
33943
  provider: string;
@@ -32868,6 +34753,110 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
32868
34753
  };
32869
34754
  subscriptionId?: string | null | undefined;
32870
34755
  };
34756
+ }>, z.ZodObject<{
34757
+ type: z.ZodLiteral<"fetch_workspaces_response">;
34758
+ payload: z.ZodObject<{
34759
+ requestId: z.ZodString;
34760
+ subscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34761
+ entries: z.ZodArray<z.ZodObject<{
34762
+ id: z.ZodString;
34763
+ projectId: z.ZodString;
34764
+ name: z.ZodString;
34765
+ status: z.ZodEnum<["needs_input", "failed", "running", "attention", "done"]>;
34766
+ activityAt: z.ZodNullable<z.ZodString>;
34767
+ }, "strip", z.ZodTypeAny, {
34768
+ id: string;
34769
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
34770
+ name: string;
34771
+ projectId: string;
34772
+ activityAt: string | null;
34773
+ }, {
34774
+ id: string;
34775
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
34776
+ name: string;
34777
+ projectId: string;
34778
+ activityAt: string | null;
34779
+ }>, "many">;
34780
+ pageInfo: z.ZodObject<{
34781
+ nextCursor: z.ZodNullable<z.ZodString>;
34782
+ prevCursor: z.ZodNullable<z.ZodString>;
34783
+ hasMore: z.ZodBoolean;
34784
+ }, "strip", z.ZodTypeAny, {
34785
+ nextCursor: string | null;
34786
+ prevCursor: string | null;
34787
+ hasMore: boolean;
34788
+ }, {
34789
+ nextCursor: string | null;
34790
+ prevCursor: string | null;
34791
+ hasMore: boolean;
34792
+ }>;
34793
+ }, "strip", z.ZodTypeAny, {
34794
+ entries: {
34795
+ id: string;
34796
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
34797
+ name: string;
34798
+ projectId: string;
34799
+ activityAt: string | null;
34800
+ }[];
34801
+ requestId: string;
34802
+ pageInfo: {
34803
+ nextCursor: string | null;
34804
+ prevCursor: string | null;
34805
+ hasMore: boolean;
34806
+ };
34807
+ subscriptionId?: string | null | undefined;
34808
+ }, {
34809
+ entries: {
34810
+ id: string;
34811
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
34812
+ name: string;
34813
+ projectId: string;
34814
+ activityAt: string | null;
34815
+ }[];
34816
+ requestId: string;
34817
+ pageInfo: {
34818
+ nextCursor: string | null;
34819
+ prevCursor: string | null;
34820
+ hasMore: boolean;
34821
+ };
34822
+ subscriptionId?: string | null | undefined;
34823
+ }>;
34824
+ }, "strip", z.ZodTypeAny, {
34825
+ type: "fetch_workspaces_response";
34826
+ payload: {
34827
+ entries: {
34828
+ id: string;
34829
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
34830
+ name: string;
34831
+ projectId: string;
34832
+ activityAt: string | null;
34833
+ }[];
34834
+ requestId: string;
34835
+ pageInfo: {
34836
+ nextCursor: string | null;
34837
+ prevCursor: string | null;
34838
+ hasMore: boolean;
34839
+ };
34840
+ subscriptionId?: string | null | undefined;
34841
+ };
34842
+ }, {
34843
+ type: "fetch_workspaces_response";
34844
+ payload: {
34845
+ entries: {
34846
+ id: string;
34847
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
34848
+ name: string;
34849
+ projectId: string;
34850
+ activityAt: string | null;
34851
+ }[];
34852
+ requestId: string;
34853
+ pageInfo: {
34854
+ nextCursor: string | null;
34855
+ prevCursor: string | null;
34856
+ hasMore: boolean;
34857
+ };
34858
+ subscriptionId?: string | null | undefined;
34859
+ };
32871
34860
  }>, z.ZodObject<{
32872
34861
  type: z.ZodLiteral<"fetch_agent_response">;
32873
34862
  payload: z.ZodObject<{
@@ -33040,34 +35029,147 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
33040
35029
  isPaseoOwnedWorktree: true;
33041
35030
  mainRepoRoot: string;
33042
35031
  };
33043
- }, {
33044
- projectKey: string;
33045
- projectName: string;
33046
- checkout: {
33047
- cwd: string;
33048
- isGit: false;
33049
- currentBranch: null;
33050
- remoteUrl: null;
33051
- isPaseoOwnedWorktree: false;
33052
- mainRepoRoot: null;
33053
- } | {
33054
- cwd: string;
33055
- isGit: true;
33056
- currentBranch: string | null;
33057
- remoteUrl: string | null;
33058
- isPaseoOwnedWorktree: false;
33059
- mainRepoRoot: null;
33060
- } | {
33061
- cwd: string;
33062
- isGit: true;
33063
- currentBranch: string | null;
33064
- remoteUrl: string | null;
33065
- isPaseoOwnedWorktree: true;
33066
- mainRepoRoot: string;
33067
- };
33068
- }>>>;
33069
- error: z.ZodNullable<z.ZodString>;
33070
- }, "strip", z.ZodTypeAny, {
35032
+ }, {
35033
+ projectKey: string;
35034
+ projectName: string;
35035
+ checkout: {
35036
+ cwd: string;
35037
+ isGit: false;
35038
+ currentBranch: null;
35039
+ remoteUrl: null;
35040
+ isPaseoOwnedWorktree: false;
35041
+ mainRepoRoot: null;
35042
+ } | {
35043
+ cwd: string;
35044
+ isGit: true;
35045
+ currentBranch: string | null;
35046
+ remoteUrl: string | null;
35047
+ isPaseoOwnedWorktree: false;
35048
+ mainRepoRoot: null;
35049
+ } | {
35050
+ cwd: string;
35051
+ isGit: true;
35052
+ currentBranch: string | null;
35053
+ remoteUrl: string | null;
35054
+ isPaseoOwnedWorktree: true;
35055
+ mainRepoRoot: string;
35056
+ };
35057
+ }>>>;
35058
+ error: z.ZodNullable<z.ZodString>;
35059
+ }, "strip", z.ZodTypeAny, {
35060
+ error: string | null;
35061
+ requestId: string;
35062
+ agent: {
35063
+ id: string;
35064
+ provider: string;
35065
+ cwd: string;
35066
+ createdAt: string;
35067
+ updatedAt: string;
35068
+ lastUserMessageAt: string | null;
35069
+ title: string | null;
35070
+ status: "error" | "initializing" | "idle" | "running" | "closed";
35071
+ labels: Record<string, string>;
35072
+ model: string | null;
35073
+ persistence: AgentPersistenceHandle | null;
35074
+ capabilities: AgentCapabilityFlags;
35075
+ currentModeId: string | null;
35076
+ availableModes: AgentMode[];
35077
+ pendingPermissions: AgentPermissionRequest[];
35078
+ thinkingOptionId?: string | null | undefined;
35079
+ runtimeInfo?: AgentRuntimeInfo | undefined;
35080
+ requiresAttention?: boolean | undefined;
35081
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
35082
+ attentionTimestamp?: string | null | undefined;
35083
+ archivedAt?: string | null | undefined;
35084
+ effectiveThinkingOptionId?: string | null | undefined;
35085
+ lastUsage?: AgentUsage | undefined;
35086
+ lastError?: string | undefined;
35087
+ } | null;
35088
+ project?: {
35089
+ projectKey: string;
35090
+ projectName: string;
35091
+ checkout: {
35092
+ cwd: string;
35093
+ isGit: false;
35094
+ currentBranch: null;
35095
+ remoteUrl: null;
35096
+ isPaseoOwnedWorktree: false;
35097
+ mainRepoRoot: null;
35098
+ } | {
35099
+ cwd: string;
35100
+ isGit: true;
35101
+ currentBranch: string | null;
35102
+ remoteUrl: string | null;
35103
+ isPaseoOwnedWorktree: false;
35104
+ mainRepoRoot: null;
35105
+ } | {
35106
+ cwd: string;
35107
+ isGit: true;
35108
+ currentBranch: string | null;
35109
+ remoteUrl: string | null;
35110
+ isPaseoOwnedWorktree: true;
35111
+ mainRepoRoot: string;
35112
+ };
35113
+ } | null | undefined;
35114
+ }, {
35115
+ error: string | null;
35116
+ requestId: string;
35117
+ agent: {
35118
+ id: string;
35119
+ provider: string;
35120
+ cwd: string;
35121
+ createdAt: string;
35122
+ updatedAt: string;
35123
+ lastUserMessageAt: string | null;
35124
+ title: string | null;
35125
+ status: "error" | "initializing" | "idle" | "running" | "closed";
35126
+ model: string | null;
35127
+ persistence: AgentPersistenceHandle | null;
35128
+ capabilities: AgentCapabilityFlags;
35129
+ currentModeId: string | null;
35130
+ availableModes: AgentMode[];
35131
+ pendingPermissions: AgentPermissionRequest[];
35132
+ thinkingOptionId?: string | null | undefined;
35133
+ labels?: Record<string, string> | undefined;
35134
+ runtimeInfo?: AgentRuntimeInfo | undefined;
35135
+ requiresAttention?: boolean | undefined;
35136
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
35137
+ attentionTimestamp?: string | null | undefined;
35138
+ archivedAt?: string | null | undefined;
35139
+ effectiveThinkingOptionId?: string | null | undefined;
35140
+ lastUsage?: AgentUsage | undefined;
35141
+ lastError?: string | undefined;
35142
+ } | null;
35143
+ project?: {
35144
+ projectKey: string;
35145
+ projectName: string;
35146
+ checkout: {
35147
+ cwd: string;
35148
+ isGit: false;
35149
+ currentBranch: null;
35150
+ remoteUrl: null;
35151
+ isPaseoOwnedWorktree: false;
35152
+ mainRepoRoot: null;
35153
+ } | {
35154
+ cwd: string;
35155
+ isGit: true;
35156
+ currentBranch: string | null;
35157
+ remoteUrl: string | null;
35158
+ isPaseoOwnedWorktree: false;
35159
+ mainRepoRoot: null;
35160
+ } | {
35161
+ cwd: string;
35162
+ isGit: true;
35163
+ currentBranch: string | null;
35164
+ remoteUrl: string | null;
35165
+ isPaseoOwnedWorktree: true;
35166
+ mainRepoRoot: string;
35167
+ };
35168
+ } | null | undefined;
35169
+ }>;
35170
+ }, "strip", z.ZodTypeAny, {
35171
+ type: "fetch_agent_response";
35172
+ payload: {
33071
35173
  error: string | null;
33072
35174
  requestId: string;
33073
35175
  agent: {
@@ -33122,7 +35224,10 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
33122
35224
  mainRepoRoot: string;
33123
35225
  };
33124
35226
  } | null | undefined;
33125
- }, {
35227
+ };
35228
+ }, {
35229
+ type: "fetch_agent_response";
35230
+ payload: {
33126
35231
  error: string | null;
33127
35232
  requestId: string;
33128
35233
  agent: {
@@ -33177,13 +35282,38 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
33177
35282
  mainRepoRoot: string;
33178
35283
  };
33179
35284
  } | null | undefined;
33180
- }>;
33181
- }, "strip", z.ZodTypeAny, {
33182
- type: "fetch_agent_response";
33183
- payload: {
33184
- error: string | null;
33185
- requestId: string;
33186
- agent: {
35285
+ };
35286
+ }>, z.ZodObject<{
35287
+ type: z.ZodLiteral<"fetch_agent_timeline_response">;
35288
+ payload: z.ZodObject<{
35289
+ requestId: z.ZodString;
35290
+ agentId: z.ZodString;
35291
+ agent: z.ZodNullable<z.ZodObject<{
35292
+ id: z.ZodString;
35293
+ provider: z.ZodEnum<[string, ...string[]]>;
35294
+ cwd: z.ZodString;
35295
+ model: z.ZodNullable<z.ZodString>;
35296
+ thinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35297
+ effectiveThinkingOptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35298
+ createdAt: z.ZodString;
35299
+ updatedAt: z.ZodString;
35300
+ lastUserMessageAt: z.ZodNullable<z.ZodString>;
35301
+ status: z.ZodEnum<["initializing", "idle", "running", "error", "closed"]>;
35302
+ capabilities: z.ZodType<AgentCapabilityFlags, z.ZodTypeDef, AgentCapabilityFlags>;
35303
+ currentModeId: z.ZodNullable<z.ZodString>;
35304
+ availableModes: z.ZodArray<z.ZodType<AgentMode, z.ZodTypeDef, AgentMode>, "many">;
35305
+ pendingPermissions: z.ZodArray<z.ZodType<AgentPermissionRequest, z.ZodTypeDef, AgentPermissionRequest>, "many">;
35306
+ persistence: z.ZodNullable<z.ZodType<AgentPersistenceHandle | null, z.ZodTypeDef, AgentPersistenceHandle | null>>;
35307
+ runtimeInfo: z.ZodOptional<z.ZodType<AgentRuntimeInfo, z.ZodTypeDef, AgentRuntimeInfo>>;
35308
+ lastUsage: z.ZodOptional<z.ZodType<AgentUsage, z.ZodTypeDef, AgentUsage>>;
35309
+ lastError: z.ZodOptional<z.ZodString>;
35310
+ title: z.ZodNullable<z.ZodString>;
35311
+ labels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
35312
+ requiresAttention: z.ZodOptional<z.ZodBoolean>;
35313
+ attentionReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<["finished", "error", "permission"]>>>;
35314
+ attentionTimestamp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35315
+ archivedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35316
+ }, "strip", z.ZodTypeAny, {
33187
35317
  id: string;
33188
35318
  provider: string;
33189
35319
  cwd: string;
@@ -33208,40 +35338,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
33208
35338
  effectiveThinkingOptionId?: string | null | undefined;
33209
35339
  lastUsage?: AgentUsage | undefined;
33210
35340
  lastError?: string | undefined;
33211
- } | null;
33212
- project?: {
33213
- projectKey: string;
33214
- projectName: string;
33215
- checkout: {
33216
- cwd: string;
33217
- isGit: false;
33218
- currentBranch: null;
33219
- remoteUrl: null;
33220
- isPaseoOwnedWorktree: false;
33221
- mainRepoRoot: null;
33222
- } | {
33223
- cwd: string;
33224
- isGit: true;
33225
- currentBranch: string | null;
33226
- remoteUrl: string | null;
33227
- isPaseoOwnedWorktree: false;
33228
- mainRepoRoot: null;
33229
- } | {
33230
- cwd: string;
33231
- isGit: true;
33232
- currentBranch: string | null;
33233
- remoteUrl: string | null;
33234
- isPaseoOwnedWorktree: true;
33235
- mainRepoRoot: string;
33236
- };
33237
- } | null | undefined;
33238
- };
33239
- }, {
33240
- type: "fetch_agent_response";
33241
- payload: {
33242
- error: string | null;
33243
- requestId: string;
33244
- agent: {
35341
+ }, {
33245
35342
  id: string;
33246
35343
  provider: string;
33247
35344
  cwd: string;
@@ -33266,39 +35363,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
33266
35363
  effectiveThinkingOptionId?: string | null | undefined;
33267
35364
  lastUsage?: AgentUsage | undefined;
33268
35365
  lastError?: string | undefined;
33269
- } | null;
33270
- project?: {
33271
- projectKey: string;
33272
- projectName: string;
33273
- checkout: {
33274
- cwd: string;
33275
- isGit: false;
33276
- currentBranch: null;
33277
- remoteUrl: null;
33278
- isPaseoOwnedWorktree: false;
33279
- mainRepoRoot: null;
33280
- } | {
33281
- cwd: string;
33282
- isGit: true;
33283
- currentBranch: string | null;
33284
- remoteUrl: string | null;
33285
- isPaseoOwnedWorktree: false;
33286
- mainRepoRoot: null;
33287
- } | {
33288
- cwd: string;
33289
- isGit: true;
33290
- currentBranch: string | null;
33291
- remoteUrl: string | null;
33292
- isPaseoOwnedWorktree: true;
33293
- mainRepoRoot: string;
33294
- };
33295
- } | null | undefined;
33296
- };
33297
- }>, z.ZodObject<{
33298
- type: z.ZodLiteral<"fetch_agent_timeline_response">;
33299
- payload: z.ZodObject<{
33300
- requestId: z.ZodString;
33301
- agentId: z.ZodString;
35366
+ }>>;
33302
35367
  direction: z.ZodEnum<["tail", "before", "after"]>;
33303
35368
  projection: z.ZodEnum<["projected", "canonical"]>;
33304
35369
  epoch: z.ZodString;
@@ -33400,6 +35465,32 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
33400
35465
  direction: "tail" | "before" | "after";
33401
35466
  epoch: string;
33402
35467
  projection: "projected" | "canonical";
35468
+ agent: {
35469
+ id: string;
35470
+ provider: string;
35471
+ cwd: string;
35472
+ createdAt: string;
35473
+ updatedAt: string;
35474
+ lastUserMessageAt: string | null;
35475
+ title: string | null;
35476
+ status: "error" | "initializing" | "idle" | "running" | "closed";
35477
+ labels: Record<string, string>;
35478
+ model: string | null;
35479
+ persistence: AgentPersistenceHandle | null;
35480
+ capabilities: AgentCapabilityFlags;
35481
+ currentModeId: string | null;
35482
+ availableModes: AgentMode[];
35483
+ pendingPermissions: AgentPermissionRequest[];
35484
+ thinkingOptionId?: string | null | undefined;
35485
+ runtimeInfo?: AgentRuntimeInfo | undefined;
35486
+ requiresAttention?: boolean | undefined;
35487
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
35488
+ attentionTimestamp?: string | null | undefined;
35489
+ archivedAt?: string | null | undefined;
35490
+ effectiveThinkingOptionId?: string | null | undefined;
35491
+ lastUsage?: AgentUsage | undefined;
35492
+ lastError?: string | undefined;
35493
+ } | null;
33403
35494
  reset: boolean;
33404
35495
  staleCursor: boolean;
33405
35496
  gap: boolean;
@@ -33437,6 +35528,32 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
33437
35528
  direction: "tail" | "before" | "after";
33438
35529
  epoch: string;
33439
35530
  projection: "projected" | "canonical";
35531
+ agent: {
35532
+ id: string;
35533
+ provider: string;
35534
+ cwd: string;
35535
+ createdAt: string;
35536
+ updatedAt: string;
35537
+ lastUserMessageAt: string | null;
35538
+ title: string | null;
35539
+ status: "error" | "initializing" | "idle" | "running" | "closed";
35540
+ model: string | null;
35541
+ persistence: AgentPersistenceHandle | null;
35542
+ capabilities: AgentCapabilityFlags;
35543
+ currentModeId: string | null;
35544
+ availableModes: AgentMode[];
35545
+ pendingPermissions: AgentPermissionRequest[];
35546
+ thinkingOptionId?: string | null | undefined;
35547
+ labels?: Record<string, string> | undefined;
35548
+ runtimeInfo?: AgentRuntimeInfo | undefined;
35549
+ requiresAttention?: boolean | undefined;
35550
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
35551
+ attentionTimestamp?: string | null | undefined;
35552
+ archivedAt?: string | null | undefined;
35553
+ effectiveThinkingOptionId?: string | null | undefined;
35554
+ lastUsage?: AgentUsage | undefined;
35555
+ lastError?: string | undefined;
35556
+ } | null;
33440
35557
  reset: boolean;
33441
35558
  staleCursor: boolean;
33442
35559
  gap: boolean;
@@ -33477,6 +35594,32 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
33477
35594
  direction: "tail" | "before" | "after";
33478
35595
  epoch: string;
33479
35596
  projection: "projected" | "canonical";
35597
+ agent: {
35598
+ id: string;
35599
+ provider: string;
35600
+ cwd: string;
35601
+ createdAt: string;
35602
+ updatedAt: string;
35603
+ lastUserMessageAt: string | null;
35604
+ title: string | null;
35605
+ status: "error" | "initializing" | "idle" | "running" | "closed";
35606
+ labels: Record<string, string>;
35607
+ model: string | null;
35608
+ persistence: AgentPersistenceHandle | null;
35609
+ capabilities: AgentCapabilityFlags;
35610
+ currentModeId: string | null;
35611
+ availableModes: AgentMode[];
35612
+ pendingPermissions: AgentPermissionRequest[];
35613
+ thinkingOptionId?: string | null | undefined;
35614
+ runtimeInfo?: AgentRuntimeInfo | undefined;
35615
+ requiresAttention?: boolean | undefined;
35616
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
35617
+ attentionTimestamp?: string | null | undefined;
35618
+ archivedAt?: string | null | undefined;
35619
+ effectiveThinkingOptionId?: string | null | undefined;
35620
+ lastUsage?: AgentUsage | undefined;
35621
+ lastError?: string | undefined;
35622
+ } | null;
33480
35623
  reset: boolean;
33481
35624
  staleCursor: boolean;
33482
35625
  gap: boolean;
@@ -33517,6 +35660,32 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
33517
35660
  direction: "tail" | "before" | "after";
33518
35661
  epoch: string;
33519
35662
  projection: "projected" | "canonical";
35663
+ agent: {
35664
+ id: string;
35665
+ provider: string;
35666
+ cwd: string;
35667
+ createdAt: string;
35668
+ updatedAt: string;
35669
+ lastUserMessageAt: string | null;
35670
+ title: string | null;
35671
+ status: "error" | "initializing" | "idle" | "running" | "closed";
35672
+ model: string | null;
35673
+ persistence: AgentPersistenceHandle | null;
35674
+ capabilities: AgentCapabilityFlags;
35675
+ currentModeId: string | null;
35676
+ availableModes: AgentMode[];
35677
+ pendingPermissions: AgentPermissionRequest[];
35678
+ thinkingOptionId?: string | null | undefined;
35679
+ labels?: Record<string, string> | undefined;
35680
+ runtimeInfo?: AgentRuntimeInfo | undefined;
35681
+ requiresAttention?: boolean | undefined;
35682
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
35683
+ attentionTimestamp?: string | null | undefined;
35684
+ archivedAt?: string | null | undefined;
35685
+ effectiveThinkingOptionId?: string | null | undefined;
35686
+ lastUsage?: AgentUsage | undefined;
35687
+ lastError?: string | undefined;
35688
+ } | null;
33520
35689
  reset: boolean;
33521
35690
  staleCursor: boolean;
33522
35691
  gap: boolean;
@@ -35446,13 +37615,16 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35446
37615
  payload: z.ZodObject<{
35447
37616
  worktrees: z.ZodArray<z.ZodObject<{
35448
37617
  worktreePath: z.ZodString;
37618
+ createdAt: z.ZodString;
35449
37619
  branchName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35450
37620
  head: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35451
37621
  }, "strip", z.ZodTypeAny, {
37622
+ createdAt: string;
35452
37623
  worktreePath: string;
35453
37624
  branchName?: string | null | undefined;
35454
37625
  head?: string | null | undefined;
35455
37626
  }, {
37627
+ createdAt: string;
35456
37628
  worktreePath: string;
35457
37629
  branchName?: string | null | undefined;
35458
37630
  head?: string | null | undefined;
@@ -35475,6 +37647,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35475
37647
  } | null;
35476
37648
  requestId: string;
35477
37649
  worktrees: {
37650
+ createdAt: string;
35478
37651
  worktreePath: string;
35479
37652
  branchName?: string | null | undefined;
35480
37653
  head?: string | null | undefined;
@@ -35486,6 +37659,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35486
37659
  } | null;
35487
37660
  requestId: string;
35488
37661
  worktrees: {
37662
+ createdAt: string;
35489
37663
  worktreePath: string;
35490
37664
  branchName?: string | null | undefined;
35491
37665
  head?: string | null | undefined;
@@ -35500,6 +37674,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35500
37674
  } | null;
35501
37675
  requestId: string;
35502
37676
  worktrees: {
37677
+ createdAt: string;
35503
37678
  worktreePath: string;
35504
37679
  branchName?: string | null | undefined;
35505
37680
  head?: string | null | undefined;
@@ -35514,6 +37689,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35514
37689
  } | null;
35515
37690
  requestId: string;
35516
37691
  worktrees: {
37692
+ createdAt: string;
35517
37693
  worktreePath: string;
35518
37694
  branchName?: string | null | undefined;
35519
37695
  head?: string | null | undefined;
@@ -35577,7 +37753,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35577
37753
  }>, z.ZodObject<{
35578
37754
  type: z.ZodLiteral<"file_explorer_response">;
35579
37755
  payload: z.ZodObject<{
35580
- agentId: z.ZodString;
37756
+ cwd: z.ZodString;
35581
37757
  path: z.ZodString;
35582
37758
  mode: z.ZodEnum<["list", "file"]>;
35583
37759
  directory: z.ZodNullable<z.ZodObject<{
@@ -35649,8 +37825,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35649
37825
  requestId: z.ZodString;
35650
37826
  }, "strip", z.ZodTypeAny, {
35651
37827
  error: string | null;
35652
- agentId: string;
35653
37828
  mode: "file" | "list";
37829
+ cwd: string;
35654
37830
  path: string;
35655
37831
  requestId: string;
35656
37832
  file: {
@@ -35674,8 +37850,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35674
37850
  } | null;
35675
37851
  }, {
35676
37852
  error: string | null;
35677
- agentId: string;
35678
37853
  mode: "file" | "list";
37854
+ cwd: string;
35679
37855
  path: string;
35680
37856
  requestId: string;
35681
37857
  file: {
@@ -35702,8 +37878,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35702
37878
  type: "file_explorer_response";
35703
37879
  payload: {
35704
37880
  error: string | null;
35705
- agentId: string;
35706
37881
  mode: "file" | "list";
37882
+ cwd: string;
35707
37883
  path: string;
35708
37884
  requestId: string;
35709
37885
  file: {
@@ -35730,8 +37906,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35730
37906
  type: "file_explorer_response";
35731
37907
  payload: {
35732
37908
  error: string | null;
35733
- agentId: string;
35734
37909
  mode: "file" | "list";
37910
+ cwd: string;
35735
37911
  path: string;
35736
37912
  requestId: string;
35737
37913
  file: {
@@ -35773,46 +37949,46 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35773
37949
  }, "strip", z.ZodTypeAny, {
35774
37950
  error: string | null;
35775
37951
  cwd: string;
35776
- requestId: string;
35777
37952
  icon: {
35778
37953
  data: string;
35779
37954
  mimeType: string;
35780
37955
  } | null;
37956
+ requestId: string;
35781
37957
  }, {
35782
37958
  error: string | null;
35783
37959
  cwd: string;
35784
- requestId: string;
35785
37960
  icon: {
35786
37961
  data: string;
35787
37962
  mimeType: string;
35788
37963
  } | null;
37964
+ requestId: string;
35789
37965
  }>;
35790
37966
  }, "strip", z.ZodTypeAny, {
35791
37967
  type: "project_icon_response";
35792
37968
  payload: {
35793
37969
  error: string | null;
35794
37970
  cwd: string;
35795
- requestId: string;
35796
37971
  icon: {
35797
37972
  data: string;
35798
37973
  mimeType: string;
35799
37974
  } | null;
37975
+ requestId: string;
35800
37976
  };
35801
37977
  }, {
35802
37978
  type: "project_icon_response";
35803
37979
  payload: {
35804
37980
  error: string | null;
35805
37981
  cwd: string;
35806
- requestId: string;
35807
37982
  icon: {
35808
37983
  data: string;
35809
37984
  mimeType: string;
35810
37985
  } | null;
37986
+ requestId: string;
35811
37987
  };
35812
37988
  }>, z.ZodObject<{
35813
37989
  type: z.ZodLiteral<"file_download_token_response">;
35814
37990
  payload: z.ZodObject<{
35815
- agentId: z.ZodString;
37991
+ cwd: z.ZodString;
35816
37992
  path: z.ZodString;
35817
37993
  token: z.ZodNullable<z.ZodString>;
35818
37994
  fileName: z.ZodNullable<z.ZodString>;
@@ -35822,7 +37998,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35822
37998
  requestId: z.ZodString;
35823
37999
  }, "strip", z.ZodTypeAny, {
35824
38000
  error: string | null;
35825
- agentId: string;
38001
+ cwd: string;
35826
38002
  path: string;
35827
38003
  requestId: string;
35828
38004
  mimeType: string | null;
@@ -35831,7 +38007,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35831
38007
  fileName: string | null;
35832
38008
  }, {
35833
38009
  error: string | null;
35834
- agentId: string;
38010
+ cwd: string;
35835
38011
  path: string;
35836
38012
  requestId: string;
35837
38013
  mimeType: string | null;
@@ -35843,7 +38019,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35843
38019
  type: "file_download_token_response";
35844
38020
  payload: {
35845
38021
  error: string | null;
35846
- agentId: string;
38022
+ cwd: string;
35847
38023
  path: string;
35848
38024
  requestId: string;
35849
38025
  mimeType: string | null;
@@ -35855,7 +38031,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
35855
38031
  type: "file_download_token_response";
35856
38032
  payload: {
35857
38033
  error: string | null;
35858
- agentId: string;
38034
+ cwd: string;
35859
38035
  path: string;
35860
38036
  requestId: string;
35861
38037
  mimeType: string | null;
@@ -37154,169 +39330,278 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
37154
39330
  isPaseoOwnedWorktree: true;
37155
39331
  mainRepoRoot: string;
37156
39332
  };
37157
- };
37158
- } | {
37159
- agentId: string;
37160
- kind: "remove";
39333
+ };
39334
+ } | {
39335
+ agentId: string;
39336
+ kind: "remove";
39337
+ };
39338
+ } | {
39339
+ type: "agent_stream";
39340
+ payload: {
39341
+ agentId: string;
39342
+ timestamp: string;
39343
+ event: {
39344
+ provider: string;
39345
+ type: "thread_started";
39346
+ sessionId: string;
39347
+ } | {
39348
+ provider: string;
39349
+ type: "turn_started";
39350
+ } | {
39351
+ provider: string;
39352
+ type: "turn_completed";
39353
+ usage?: AgentUsage | undefined;
39354
+ } | {
39355
+ error: string;
39356
+ provider: string;
39357
+ type: "turn_failed";
39358
+ code?: string | undefined;
39359
+ diagnostic?: string | undefined;
39360
+ } | {
39361
+ reason: string;
39362
+ provider: string;
39363
+ type: "turn_canceled";
39364
+ } | {
39365
+ provider: string;
39366
+ type: "timeline";
39367
+ item: AgentTimelineItem;
39368
+ } | {
39369
+ provider: string;
39370
+ type: "permission_requested";
39371
+ request: AgentPermissionRequest;
39372
+ } | {
39373
+ provider: string;
39374
+ type: "permission_resolved";
39375
+ requestId: string;
39376
+ resolution: AgentPermissionResponse;
39377
+ } | {
39378
+ reason: "finished" | "error" | "permission";
39379
+ provider: string;
39380
+ type: "attention_required";
39381
+ timestamp: string;
39382
+ shouldNotify: boolean;
39383
+ notification?: {
39384
+ title: string;
39385
+ body: string;
39386
+ data: {
39387
+ agentId: string;
39388
+ reason: "finished" | "error" | "permission";
39389
+ serverId: string;
39390
+ };
39391
+ } | undefined;
39392
+ };
39393
+ seq?: number | undefined;
39394
+ epoch?: string | undefined;
39395
+ };
39396
+ } | {
39397
+ type: "agent_status";
39398
+ payload: {
39399
+ agentId: string;
39400
+ status: string;
39401
+ info: {
39402
+ id: string;
39403
+ provider: string;
39404
+ cwd: string;
39405
+ createdAt: string;
39406
+ updatedAt: string;
39407
+ lastUserMessageAt: string | null;
39408
+ title: string | null;
39409
+ status: "error" | "initializing" | "idle" | "running" | "closed";
39410
+ labels: Record<string, string>;
39411
+ model: string | null;
39412
+ persistence: AgentPersistenceHandle | null;
39413
+ capabilities: AgentCapabilityFlags;
39414
+ currentModeId: string | null;
39415
+ availableModes: AgentMode[];
39416
+ pendingPermissions: AgentPermissionRequest[];
39417
+ thinkingOptionId?: string | null | undefined;
39418
+ runtimeInfo?: AgentRuntimeInfo | undefined;
39419
+ requiresAttention?: boolean | undefined;
39420
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
39421
+ attentionTimestamp?: string | null | undefined;
39422
+ archivedAt?: string | null | undefined;
39423
+ effectiveThinkingOptionId?: string | null | undefined;
39424
+ lastUsage?: AgentUsage | undefined;
39425
+ lastError?: string | undefined;
39426
+ };
39427
+ };
39428
+ } | {
39429
+ type: "fetch_agents_response";
39430
+ payload: {
39431
+ entries: {
39432
+ agent: {
39433
+ id: string;
39434
+ provider: string;
39435
+ cwd: string;
39436
+ createdAt: string;
39437
+ updatedAt: string;
39438
+ lastUserMessageAt: string | null;
39439
+ title: string | null;
39440
+ status: "error" | "initializing" | "idle" | "running" | "closed";
39441
+ labels: Record<string, string>;
39442
+ model: string | null;
39443
+ persistence: AgentPersistenceHandle | null;
39444
+ capabilities: AgentCapabilityFlags;
39445
+ currentModeId: string | null;
39446
+ availableModes: AgentMode[];
39447
+ pendingPermissions: AgentPermissionRequest[];
39448
+ thinkingOptionId?: string | null | undefined;
39449
+ runtimeInfo?: AgentRuntimeInfo | undefined;
39450
+ requiresAttention?: boolean | undefined;
39451
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
39452
+ attentionTimestamp?: string | null | undefined;
39453
+ archivedAt?: string | null | undefined;
39454
+ effectiveThinkingOptionId?: string | null | undefined;
39455
+ lastUsage?: AgentUsage | undefined;
39456
+ lastError?: string | undefined;
39457
+ };
39458
+ project: {
39459
+ projectKey: string;
39460
+ projectName: string;
39461
+ checkout: {
39462
+ cwd: string;
39463
+ isGit: false;
39464
+ currentBranch: null;
39465
+ remoteUrl: null;
39466
+ isPaseoOwnedWorktree: false;
39467
+ mainRepoRoot: null;
39468
+ } | {
39469
+ cwd: string;
39470
+ isGit: true;
39471
+ currentBranch: string | null;
39472
+ remoteUrl: string | null;
39473
+ isPaseoOwnedWorktree: false;
39474
+ mainRepoRoot: null;
39475
+ } | {
39476
+ cwd: string;
39477
+ isGit: true;
39478
+ currentBranch: string | null;
39479
+ remoteUrl: string | null;
39480
+ isPaseoOwnedWorktree: true;
39481
+ mainRepoRoot: string;
39482
+ };
39483
+ };
39484
+ }[];
39485
+ requestId: string;
39486
+ pageInfo: {
39487
+ nextCursor: string | null;
39488
+ prevCursor: string | null;
39489
+ hasMore: boolean;
39490
+ };
39491
+ subscriptionId?: string | null | undefined;
39492
+ };
39493
+ } | {
39494
+ type: "fetch_workspaces_response";
39495
+ payload: {
39496
+ entries: {
39497
+ id: string;
39498
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
39499
+ name: string;
39500
+ projectId: string;
39501
+ activityAt: string | null;
39502
+ }[];
39503
+ requestId: string;
39504
+ pageInfo: {
39505
+ nextCursor: string | null;
39506
+ prevCursor: string | null;
39507
+ hasMore: boolean;
39508
+ };
39509
+ subscriptionId?: string | null | undefined;
39510
+ };
39511
+ } | {
39512
+ type: "workspace_update";
39513
+ payload: {
39514
+ kind: "upsert";
39515
+ workspace: {
39516
+ id: string;
39517
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
39518
+ name: string;
39519
+ projectId: string;
39520
+ activityAt: string | null;
39521
+ };
39522
+ } | {
39523
+ id: string;
39524
+ kind: "remove";
39525
+ };
39526
+ } | {
39527
+ type: "fetch_agent_response";
39528
+ payload: {
39529
+ error: string | null;
39530
+ requestId: string;
39531
+ agent: {
39532
+ id: string;
39533
+ provider: string;
39534
+ cwd: string;
39535
+ createdAt: string;
39536
+ updatedAt: string;
39537
+ lastUserMessageAt: string | null;
39538
+ title: string | null;
39539
+ status: "error" | "initializing" | "idle" | "running" | "closed";
39540
+ labels: Record<string, string>;
39541
+ model: string | null;
39542
+ persistence: AgentPersistenceHandle | null;
39543
+ capabilities: AgentCapabilityFlags;
39544
+ currentModeId: string | null;
39545
+ availableModes: AgentMode[];
39546
+ pendingPermissions: AgentPermissionRequest[];
39547
+ thinkingOptionId?: string | null | undefined;
39548
+ runtimeInfo?: AgentRuntimeInfo | undefined;
39549
+ requiresAttention?: boolean | undefined;
39550
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
39551
+ attentionTimestamp?: string | null | undefined;
39552
+ archivedAt?: string | null | undefined;
39553
+ effectiveThinkingOptionId?: string | null | undefined;
39554
+ lastUsage?: AgentUsage | undefined;
39555
+ lastError?: string | undefined;
39556
+ } | null;
39557
+ project?: {
39558
+ projectKey: string;
39559
+ projectName: string;
39560
+ checkout: {
39561
+ cwd: string;
39562
+ isGit: false;
39563
+ currentBranch: null;
39564
+ remoteUrl: null;
39565
+ isPaseoOwnedWorktree: false;
39566
+ mainRepoRoot: null;
39567
+ } | {
39568
+ cwd: string;
39569
+ isGit: true;
39570
+ currentBranch: string | null;
39571
+ remoteUrl: string | null;
39572
+ isPaseoOwnedWorktree: false;
39573
+ mainRepoRoot: null;
39574
+ } | {
39575
+ cwd: string;
39576
+ isGit: true;
39577
+ currentBranch: string | null;
39578
+ remoteUrl: string | null;
39579
+ isPaseoOwnedWorktree: true;
39580
+ mainRepoRoot: string;
39581
+ };
39582
+ } | null | undefined;
37161
39583
  };
37162
39584
  } | {
37163
- type: "agent_stream";
39585
+ type: "fetch_agent_timeline_response";
37164
39586
  payload: {
39587
+ error: string | null;
37165
39588
  agentId: string;
37166
- timestamp: string;
37167
- event: {
37168
- provider: string;
37169
- type: "thread_started";
37170
- sessionId: string;
37171
- } | {
37172
- provider: string;
37173
- type: "turn_started";
37174
- } | {
37175
- provider: string;
37176
- type: "turn_completed";
37177
- usage?: AgentUsage | undefined;
37178
- } | {
37179
- error: string;
37180
- provider: string;
37181
- type: "turn_failed";
37182
- } | {
37183
- reason: string;
37184
- provider: string;
37185
- type: "turn_canceled";
37186
- } | {
39589
+ entries: {
37187
39590
  provider: string;
37188
- type: "timeline";
37189
39591
  item: AgentTimelineItem;
37190
- } | {
37191
- provider: string;
37192
- type: "permission_requested";
37193
- request: AgentPermissionRequest;
37194
- } | {
37195
- provider: string;
37196
- type: "permission_resolved";
37197
- requestId: string;
37198
- resolution: AgentPermissionResponse;
37199
- } | {
37200
- reason: "finished" | "error" | "permission";
37201
- provider: string;
37202
- type: "attention_required";
37203
39592
  timestamp: string;
37204
- shouldNotify: boolean;
37205
- notification?: {
37206
- title: string;
37207
- body: string;
37208
- data: {
37209
- agentId: string;
37210
- reason: "finished" | "error" | "permission";
37211
- serverId: string;
37212
- };
37213
- } | undefined;
37214
- };
37215
- seq?: number | undefined;
37216
- epoch?: string | undefined;
37217
- };
37218
- } | {
37219
- type: "agent_status";
37220
- payload: {
37221
- agentId: string;
37222
- status: string;
37223
- info: {
37224
- id: string;
37225
- provider: string;
37226
- cwd: string;
37227
- createdAt: string;
37228
- updatedAt: string;
37229
- lastUserMessageAt: string | null;
37230
- title: string | null;
37231
- status: "error" | "initializing" | "idle" | "running" | "closed";
37232
- labels: Record<string, string>;
37233
- model: string | null;
37234
- persistence: AgentPersistenceHandle | null;
37235
- capabilities: AgentCapabilityFlags;
37236
- currentModeId: string | null;
37237
- availableModes: AgentMode[];
37238
- pendingPermissions: AgentPermissionRequest[];
37239
- thinkingOptionId?: string | null | undefined;
37240
- runtimeInfo?: AgentRuntimeInfo | undefined;
37241
- requiresAttention?: boolean | undefined;
37242
- attentionReason?: "finished" | "error" | "permission" | null | undefined;
37243
- attentionTimestamp?: string | null | undefined;
37244
- archivedAt?: string | null | undefined;
37245
- effectiveThinkingOptionId?: string | null | undefined;
37246
- lastUsage?: AgentUsage | undefined;
37247
- lastError?: string | undefined;
37248
- };
37249
- };
37250
- } | {
37251
- type: "fetch_agents_response";
37252
- payload: {
37253
- entries: {
37254
- agent: {
37255
- id: string;
37256
- provider: string;
37257
- cwd: string;
37258
- createdAt: string;
37259
- updatedAt: string;
37260
- lastUserMessageAt: string | null;
37261
- title: string | null;
37262
- status: "error" | "initializing" | "idle" | "running" | "closed";
37263
- labels: Record<string, string>;
37264
- model: string | null;
37265
- persistence: AgentPersistenceHandle | null;
37266
- capabilities: AgentCapabilityFlags;
37267
- currentModeId: string | null;
37268
- availableModes: AgentMode[];
37269
- pendingPermissions: AgentPermissionRequest[];
37270
- thinkingOptionId?: string | null | undefined;
37271
- runtimeInfo?: AgentRuntimeInfo | undefined;
37272
- requiresAttention?: boolean | undefined;
37273
- attentionReason?: "finished" | "error" | "permission" | null | undefined;
37274
- attentionTimestamp?: string | null | undefined;
37275
- archivedAt?: string | null | undefined;
37276
- effectiveThinkingOptionId?: string | null | undefined;
37277
- lastUsage?: AgentUsage | undefined;
37278
- lastError?: string | undefined;
37279
- };
37280
- project: {
37281
- projectKey: string;
37282
- projectName: string;
37283
- checkout: {
37284
- cwd: string;
37285
- isGit: false;
37286
- currentBranch: null;
37287
- remoteUrl: null;
37288
- isPaseoOwnedWorktree: false;
37289
- mainRepoRoot: null;
37290
- } | {
37291
- cwd: string;
37292
- isGit: true;
37293
- currentBranch: string | null;
37294
- remoteUrl: string | null;
37295
- isPaseoOwnedWorktree: false;
37296
- mainRepoRoot: null;
37297
- } | {
37298
- cwd: string;
37299
- isGit: true;
37300
- currentBranch: string | null;
37301
- remoteUrl: string | null;
37302
- isPaseoOwnedWorktree: true;
37303
- mainRepoRoot: string;
37304
- };
37305
- };
39593
+ seqStart: number;
39594
+ seqEnd: number;
39595
+ sourceSeqRanges: {
39596
+ startSeq: number;
39597
+ endSeq: number;
39598
+ }[];
39599
+ collapsed: ("assistant_merge" | "tool_lifecycle")[];
37306
39600
  }[];
37307
39601
  requestId: string;
37308
- pageInfo: {
37309
- nextCursor: string | null;
37310
- prevCursor: string | null;
37311
- hasMore: boolean;
37312
- };
37313
- subscriptionId?: string | null | undefined;
37314
- };
37315
- } | {
37316
- type: "fetch_agent_response";
37317
- payload: {
37318
- error: string | null;
37319
- requestId: string;
39602
+ direction: "tail" | "before" | "after";
39603
+ epoch: string;
39604
+ projection: "projected" | "canonical";
37320
39605
  agent: {
37321
39606
  id: string;
37322
39607
  provider: string;
@@ -37343,54 +39628,6 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
37343
39628
  lastUsage?: AgentUsage | undefined;
37344
39629
  lastError?: string | undefined;
37345
39630
  } | null;
37346
- project?: {
37347
- projectKey: string;
37348
- projectName: string;
37349
- checkout: {
37350
- cwd: string;
37351
- isGit: false;
37352
- currentBranch: null;
37353
- remoteUrl: null;
37354
- isPaseoOwnedWorktree: false;
37355
- mainRepoRoot: null;
37356
- } | {
37357
- cwd: string;
37358
- isGit: true;
37359
- currentBranch: string | null;
37360
- remoteUrl: string | null;
37361
- isPaseoOwnedWorktree: false;
37362
- mainRepoRoot: null;
37363
- } | {
37364
- cwd: string;
37365
- isGit: true;
37366
- currentBranch: string | null;
37367
- remoteUrl: string | null;
37368
- isPaseoOwnedWorktree: true;
37369
- mainRepoRoot: string;
37370
- };
37371
- } | null | undefined;
37372
- };
37373
- } | {
37374
- type: "fetch_agent_timeline_response";
37375
- payload: {
37376
- error: string | null;
37377
- agentId: string;
37378
- entries: {
37379
- provider: string;
37380
- item: AgentTimelineItem;
37381
- timestamp: string;
37382
- seqStart: number;
37383
- seqEnd: number;
37384
- sourceSeqRanges: {
37385
- startSeq: number;
37386
- endSeq: number;
37387
- }[];
37388
- collapsed: ("assistant_merge" | "tool_lifecycle")[];
37389
- }[];
37390
- requestId: string;
37391
- direction: "tail" | "before" | "after";
37392
- epoch: string;
37393
- projection: "projected" | "canonical";
37394
39631
  reset: boolean;
37395
39632
  staleCursor: boolean;
37396
39633
  gap: boolean;
@@ -37718,6 +39955,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
37718
39955
  } | null;
37719
39956
  requestId: string;
37720
39957
  worktrees: {
39958
+ createdAt: string;
37721
39959
  worktreePath: string;
37722
39960
  branchName?: string | null | undefined;
37723
39961
  head?: string | null | undefined;
@@ -37738,8 +39976,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
37738
39976
  type: "file_explorer_response";
37739
39977
  payload: {
37740
39978
  error: string | null;
37741
- agentId: string;
37742
39979
  mode: "file" | "list";
39980
+ cwd: string;
37743
39981
  path: string;
37744
39982
  requestId: string;
37745
39983
  file: {
@@ -37767,17 +40005,17 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
37767
40005
  payload: {
37768
40006
  error: string | null;
37769
40007
  cwd: string;
37770
- requestId: string;
37771
40008
  icon: {
37772
40009
  data: string;
37773
40010
  mimeType: string;
37774
40011
  } | null;
40012
+ requestId: string;
37775
40013
  };
37776
40014
  } | {
37777
40015
  type: "file_download_token_response";
37778
40016
  payload: {
37779
40017
  error: string | null;
37780
- agentId: string;
40018
+ cwd: string;
37781
40019
  path: string;
37782
40020
  requestId: string;
37783
40021
  mimeType: string | null;
@@ -38202,6 +40440,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
38202
40440
  error: string;
38203
40441
  provider: string;
38204
40442
  type: "turn_failed";
40443
+ code?: string | undefined;
40444
+ diagnostic?: string | undefined;
38205
40445
  } | {
38206
40446
  reason: string;
38207
40447
  provider: string;
@@ -38335,6 +40575,39 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
38335
40575
  };
38336
40576
  subscriptionId?: string | null | undefined;
38337
40577
  };
40578
+ } | {
40579
+ type: "fetch_workspaces_response";
40580
+ payload: {
40581
+ entries: {
40582
+ id: string;
40583
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
40584
+ name: string;
40585
+ projectId: string;
40586
+ activityAt: string | null;
40587
+ }[];
40588
+ requestId: string;
40589
+ pageInfo: {
40590
+ nextCursor: string | null;
40591
+ prevCursor: string | null;
40592
+ hasMore: boolean;
40593
+ };
40594
+ subscriptionId?: string | null | undefined;
40595
+ };
40596
+ } | {
40597
+ type: "workspace_update";
40598
+ payload: {
40599
+ kind: "upsert";
40600
+ workspace: {
40601
+ id: string;
40602
+ status: "running" | "failed" | "needs_input" | "attention" | "done";
40603
+ name: string;
40604
+ projectId: string;
40605
+ activityAt: string | null;
40606
+ };
40607
+ } | {
40608
+ id: string;
40609
+ kind: "remove";
40610
+ };
38338
40611
  } | {
38339
40612
  type: "fetch_agent_response";
38340
40613
  payload: {
@@ -38414,6 +40687,32 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
38414
40687
  direction: "tail" | "before" | "after";
38415
40688
  epoch: string;
38416
40689
  projection: "projected" | "canonical";
40690
+ agent: {
40691
+ id: string;
40692
+ provider: string;
40693
+ cwd: string;
40694
+ createdAt: string;
40695
+ updatedAt: string;
40696
+ lastUserMessageAt: string | null;
40697
+ title: string | null;
40698
+ status: "error" | "initializing" | "idle" | "running" | "closed";
40699
+ model: string | null;
40700
+ persistence: AgentPersistenceHandle | null;
40701
+ capabilities: AgentCapabilityFlags;
40702
+ currentModeId: string | null;
40703
+ availableModes: AgentMode[];
40704
+ pendingPermissions: AgentPermissionRequest[];
40705
+ thinkingOptionId?: string | null | undefined;
40706
+ labels?: Record<string, string> | undefined;
40707
+ runtimeInfo?: AgentRuntimeInfo | undefined;
40708
+ requiresAttention?: boolean | undefined;
40709
+ attentionReason?: "finished" | "error" | "permission" | null | undefined;
40710
+ attentionTimestamp?: string | null | undefined;
40711
+ archivedAt?: string | null | undefined;
40712
+ effectiveThinkingOptionId?: string | null | undefined;
40713
+ lastUsage?: AgentUsage | undefined;
40714
+ lastError?: string | undefined;
40715
+ } | null;
38417
40716
  reset: boolean;
38418
40717
  staleCursor: boolean;
38419
40718
  gap: boolean;
@@ -38741,6 +41040,7 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
38741
41040
  } | null;
38742
41041
  requestId: string;
38743
41042
  worktrees: {
41043
+ createdAt: string;
38744
41044
  worktreePath: string;
38745
41045
  branchName?: string | null | undefined;
38746
41046
  head?: string | null | undefined;
@@ -38761,8 +41061,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
38761
41061
  type: "file_explorer_response";
38762
41062
  payload: {
38763
41063
  error: string | null;
38764
- agentId: string;
38765
41064
  mode: "file" | "list";
41065
+ cwd: string;
38766
41066
  path: string;
38767
41067
  requestId: string;
38768
41068
  file: {
@@ -38790,17 +41090,17 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<"type", [z
38790
41090
  payload: {
38791
41091
  error: string | null;
38792
41092
  cwd: string;
38793
- requestId: string;
38794
41093
  icon: {
38795
41094
  data: string;
38796
41095
  mimeType: string;
38797
41096
  } | null;
41097
+ requestId: string;
38798
41098
  };
38799
41099
  } | {
38800
41100
  type: "file_download_token_response";
38801
41101
  payload: {
38802
41102
  error: string | null;
38803
- agentId: string;
41103
+ cwd: string;
38804
41104
  path: string;
38805
41105
  requestId: string;
38806
41106
  mimeType: string | null;