@code-yeongyu/senpi 2026.8.28 → 2026.8.30

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 (272) hide show
  1. package/CHANGELOG.md +140 -0
  2. package/dist/cli/args.d.ts +2 -0
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +4 -0
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/core/agent-session-services.d.ts.map +1 -1
  7. package/dist/core/agent-session-services.js +2 -0
  8. package/dist/core/agent-session-services.js.map +1 -1
  9. package/dist/core/agent-session.d.ts +50 -1
  10. package/dist/core/agent-session.d.ts.map +1 -1
  11. package/dist/core/agent-session.js +313 -25
  12. package/dist/core/agent-session.js.map +1 -1
  13. package/dist/core/auth-storage.d.ts +1 -0
  14. package/dist/core/auth-storage.d.ts.map +1 -1
  15. package/dist/core/auth-storage.js +3 -0
  16. package/dist/core/auth-storage.js.map +1 -1
  17. package/dist/core/bash-executor.d.ts.map +1 -1
  18. package/dist/core/bash-executor.js +155 -37
  19. package/dist/core/bash-executor.js.map +1 -1
  20. package/dist/core/credential-accounts.d.ts.map +1 -1
  21. package/dist/core/credential-accounts.js +45 -21
  22. package/dist/core/credential-accounts.js.map +1 -1
  23. package/dist/core/credential-pool/classify.d.ts +6 -1
  24. package/dist/core/credential-pool/classify.d.ts.map +1 -1
  25. package/dist/core/credential-pool/classify.js +22 -5
  26. package/dist/core/credential-pool/classify.js.map +1 -1
  27. package/dist/core/credential-pool/env-slots.d.ts.map +1 -1
  28. package/dist/core/credential-pool/env-slots.js +2 -0
  29. package/dist/core/credential-pool/env-slots.js.map +1 -1
  30. package/dist/core/credential-pool/failover.d.ts +8 -0
  31. package/dist/core/credential-pool/failover.d.ts.map +1 -1
  32. package/dist/core/credential-pool/failover.js +24 -6
  33. package/dist/core/credential-pool/failover.js.map +1 -1
  34. package/dist/core/credential-pool/rotation-stream.d.ts +13 -2
  35. package/dist/core/credential-pool/rotation-stream.d.ts.map +1 -1
  36. package/dist/core/credential-pool/rotation-stream.js +97 -10
  37. package/dist/core/credential-pool/rotation-stream.js.map +1 -1
  38. package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts +8 -2
  39. package/dist/core/extensions/builtin/compaction/deterministic-fallback.d.ts.map +1 -1
  40. package/dist/core/extensions/builtin/compaction/deterministic-fallback.js +160 -47
  41. package/dist/core/extensions/builtin/compaction/deterministic-fallback.js.map +1 -1
  42. package/dist/core/extensions/builtin/compaction/retained-message-safety.d.ts.map +1 -1
  43. package/dist/core/extensions/builtin/compaction/retained-message-safety.js +31 -8
  44. package/dist/core/extensions/builtin/compaction/retained-message-safety.js.map +1 -1
  45. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.d.ts.map +1 -1
  46. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js +8 -28
  47. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js.map +1 -1
  48. package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
  49. package/dist/core/extensions/builtin/goal/index.js +7 -0
  50. package/dist/core/extensions/builtin/goal/index.js.map +1 -1
  51. package/dist/core/extensions/builtin/permission-system/external-dir.d.ts.map +1 -1
  52. package/dist/core/extensions/builtin/permission-system/external-dir.js +15 -5
  53. package/dist/core/extensions/builtin/permission-system/external-dir.js.map +1 -1
  54. package/dist/core/extensions/builtin/permission-system/parsers.d.ts.map +1 -1
  55. package/dist/core/extensions/builtin/permission-system/parsers.js +16 -1
  56. package/dist/core/extensions/builtin/permission-system/parsers.js.map +1 -1
  57. package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
  58. package/dist/core/extensions/builtin/service-tier.js +13 -0
  59. package/dist/core/extensions/builtin/service-tier.js.map +1 -1
  60. package/dist/core/extensions/builtin/terminal/extension.d.ts.map +1 -1
  61. package/dist/core/extensions/builtin/terminal/extension.js +4 -2
  62. package/dist/core/extensions/builtin/terminal/extension.js.map +1 -1
  63. package/dist/core/extensions/builtin/terminal/manager.d.ts +5 -0
  64. package/dist/core/extensions/builtin/terminal/manager.d.ts.map +1 -1
  65. package/dist/core/extensions/builtin/terminal/manager.js +31 -3
  66. package/dist/core/extensions/builtin/terminal/manager.js.map +1 -1
  67. package/dist/core/extensions/builtin/terminal/monitor-permission.d.ts +8 -0
  68. package/dist/core/extensions/builtin/terminal/monitor-permission.d.ts.map +1 -0
  69. package/dist/core/extensions/builtin/terminal/monitor-permission.js +16 -0
  70. package/dist/core/extensions/builtin/terminal/monitor-permission.js.map +1 -0
  71. package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts +13 -0
  72. package/dist/core/extensions/builtin/terminal/monitor-registry.d.ts.map +1 -1
  73. package/dist/core/extensions/builtin/terminal/monitor-registry.js +403 -3
  74. package/dist/core/extensions/builtin/terminal/monitor-registry.js.map +1 -1
  75. package/dist/core/extensions/builtin/terminal/session-bundle.d.ts.map +1 -1
  76. package/dist/core/extensions/builtin/terminal/session-bundle.js +1 -0
  77. package/dist/core/extensions/builtin/terminal/session-bundle.js.map +1 -1
  78. package/dist/core/extensions/builtin/terminal/tools/kill-bash.d.ts.map +1 -1
  79. package/dist/core/extensions/builtin/terminal/tools/kill-bash.js +5 -2
  80. package/dist/core/extensions/builtin/terminal/tools/kill-bash.js.map +1 -1
  81. package/dist/core/extensions/builtin/terminal/tools/monitor.d.ts +4 -0
  82. package/dist/core/extensions/builtin/terminal/tools/monitor.d.ts.map +1 -1
  83. package/dist/core/extensions/builtin/terminal/tools/monitor.js +40 -2
  84. package/dist/core/extensions/builtin/terminal/tools/monitor.js.map +1 -1
  85. package/dist/core/model-config-schema.d.ts +4 -4
  86. package/dist/core/model-resolver.js +2 -2
  87. package/dist/core/model-resolver.js.map +1 -1
  88. package/dist/core/model-runtime.d.ts +2 -0
  89. package/dist/core/model-runtime.d.ts.map +1 -1
  90. package/dist/core/model-runtime.js +74 -37
  91. package/dist/core/model-runtime.js.map +1 -1
  92. package/dist/core/retry-fallback/chains.d.ts +23 -1
  93. package/dist/core/retry-fallback/chains.d.ts.map +1 -1
  94. package/dist/core/retry-fallback/chains.js +59 -3
  95. package/dist/core/retry-fallback/chains.js.map +1 -1
  96. package/dist/core/retry-fallback/controller.d.ts.map +1 -1
  97. package/dist/core/retry-fallback/controller.js +9 -2
  98. package/dist/core/retry-fallback/controller.js.map +1 -1
  99. package/dist/core/retry-fallback/settings.d.ts.map +1 -1
  100. package/dist/core/retry-fallback/settings.js +9 -0
  101. package/dist/core/retry-fallback/settings.js.map +1 -1
  102. package/dist/core/retry-fallback/validate.js +1 -1
  103. package/dist/core/retry-fallback/validate.js.map +1 -1
  104. package/dist/core/sdk.js +1 -1
  105. package/dist/core/sdk.js.map +1 -1
  106. package/dist/core/session-manager.d.ts +9 -0
  107. package/dist/core/session-manager.d.ts.map +1 -1
  108. package/dist/core/session-manager.js +40 -0
  109. package/dist/core/session-manager.js.map +1 -1
  110. package/dist/core/settings-manager.d.ts +7 -0
  111. package/dist/core/settings-manager.d.ts.map +1 -1
  112. package/dist/core/settings-manager.js +6 -0
  113. package/dist/core/settings-manager.js.map +1 -1
  114. package/dist/core/tools/bash.d.ts.map +1 -1
  115. package/dist/core/tools/bash.js +97 -15
  116. package/dist/core/tools/bash.js.map +1 -1
  117. package/dist/core/tools/index.d.ts +1 -0
  118. package/dist/core/tools/index.d.ts.map +1 -1
  119. package/dist/core/tools/index.js +8 -0
  120. package/dist/core/tools/index.js.map +1 -1
  121. package/dist/core/tools/output-accumulator.d.ts +1 -1
  122. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  123. package/dist/core/tools/output-accumulator.js +76 -34
  124. package/dist/core/tools/output-accumulator.js.map +1 -1
  125. package/dist/main.d.ts +7 -0
  126. package/dist/main.d.ts.map +1 -1
  127. package/dist/main.js +10 -1
  128. package/dist/main.js.map +1 -1
  129. package/dist/modes/interactive/components/favorite-models-selector.d.ts.map +1 -1
  130. package/dist/modes/interactive/components/favorite-models-selector.js +2 -2
  131. package/dist/modes/interactive/components/favorite-models-selector.js.map +1 -1
  132. package/dist/modes/interactive/components/footer.d.ts +7 -0
  133. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  134. package/dist/modes/interactive/components/footer.js +34 -8
  135. package/dist/modes/interactive/components/footer.js.map +1 -1
  136. package/dist/modes/interactive/grok/chrome.d.ts +2 -0
  137. package/dist/modes/interactive/grok/chrome.d.ts.map +1 -1
  138. package/dist/modes/interactive/grok/chrome.js.map +1 -1
  139. package/dist/modes/interactive/interactive-host-runtime.d.ts +51 -1
  140. package/dist/modes/interactive/interactive-host-runtime.d.ts.map +1 -1
  141. package/dist/modes/interactive/interactive-host-runtime.js +545 -40
  142. package/dist/modes/interactive/interactive-host-runtime.js.map +1 -1
  143. package/dist/modes/interactive/interactive-mode.d.ts +7 -0
  144. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  145. package/dist/modes/interactive/interactive-mode.js +390 -239
  146. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  147. package/dist/modes/rpc/connection-handler.d.ts +8 -1
  148. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  149. package/dist/modes/rpc/connection-handler.js +268 -63
  150. package/dist/modes/rpc/connection-handler.js.map +1 -1
  151. package/dist/modes/rpc/host-ensure.d.ts +2 -0
  152. package/dist/modes/rpc/host-ensure.d.ts.map +1 -1
  153. package/dist/modes/rpc/host-ensure.js +15 -2
  154. package/dist/modes/rpc/host-ensure.js.map +1 -1
  155. package/dist/modes/rpc/host-lifecycle.d.ts.map +1 -1
  156. package/dist/modes/rpc/host-lifecycle.js +31 -12
  157. package/dist/modes/rpc/host-lifecycle.js.map +1 -1
  158. package/dist/modes/rpc/host-watchdog.d.ts +2 -0
  159. package/dist/modes/rpc/host-watchdog.d.ts.map +1 -1
  160. package/dist/modes/rpc/host-watchdog.js +23 -12
  161. package/dist/modes/rpc/host-watchdog.js.map +1 -1
  162. package/dist/modes/rpc/multi-session-host.js +20 -8
  163. package/dist/modes/rpc/multi-session-host.js.map +1 -1
  164. package/dist/modes/rpc/rpc-client.d.ts +91 -16
  165. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  166. package/dist/modes/rpc/rpc-client.js +129 -37
  167. package/dist/modes/rpc/rpc-client.js.map +1 -1
  168. package/dist/modes/rpc/rpc-input-validation.d.ts +1 -0
  169. package/dist/modes/rpc/rpc-input-validation.d.ts.map +1 -1
  170. package/dist/modes/rpc/rpc-input-validation.js +66 -0
  171. package/dist/modes/rpc/rpc-input-validation.js.map +1 -1
  172. package/dist/modes/rpc/rpc-mode.d.ts +3 -1
  173. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  174. package/dist/modes/rpc/rpc-mode.js +3 -1
  175. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  176. package/dist/modes/rpc/rpc-types.d.ts +241 -3
  177. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  178. package/dist/modes/rpc/rpc-types.js.map +1 -1
  179. package/dist/modes/rpc/session-binding.d.ts +1 -0
  180. package/dist/modes/rpc/session-binding.d.ts.map +1 -1
  181. package/dist/modes/rpc/session-binding.js +21 -1
  182. package/dist/modes/rpc/session-binding.js.map +1 -1
  183. package/dist/modes/rpc/session-command-router.d.ts +22 -0
  184. package/dist/modes/rpc/session-command-router.d.ts.map +1 -1
  185. package/dist/modes/rpc/session-command-router.js +148 -16
  186. package/dist/modes/rpc/session-command-router.js.map +1 -1
  187. package/dist/modes/rpc/session-event-writer.d.ts +4 -0
  188. package/dist/modes/rpc/session-event-writer.d.ts.map +1 -1
  189. package/dist/modes/rpc/session-event-writer.js +58 -7
  190. package/dist/modes/rpc/session-event-writer.js.map +1 -1
  191. package/dist/modes/rpc/session-extension-ui-requests.d.ts +1 -0
  192. package/dist/modes/rpc/session-extension-ui-requests.d.ts.map +1 -1
  193. package/dist/modes/rpc/session-extension-ui-requests.js +5 -0
  194. package/dist/modes/rpc/session-extension-ui-requests.js.map +1 -1
  195. package/dist/modes/rpc/session-registry.d.ts +17 -2
  196. package/dist/modes/rpc/session-registry.d.ts.map +1 -1
  197. package/dist/modes/rpc/session-registry.js +67 -4
  198. package/dist/modes/rpc/session-registry.js.map +1 -1
  199. package/dist/modes/rpc/socket-event-fanout.d.ts +22 -0
  200. package/dist/modes/rpc/socket-event-fanout.d.ts.map +1 -0
  201. package/dist/modes/rpc/socket-event-fanout.js +84 -0
  202. package/dist/modes/rpc/socket-event-fanout.js.map +1 -0
  203. package/docs/rpc.md +40 -1
  204. package/docs/settings.md +34 -0
  205. package/docs/windows.md +2 -0
  206. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +62 -0
  207. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  208. package/node_modules/@code-yeongyu/senpi-codemode/src/kernels/js/worker-indirect-eval.js +139 -90
  209. package/node_modules/@code-yeongyu/senpi-codemode/src/prompt/eval-prompt.ts +4 -4
  210. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  211. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +6 -3
  212. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  213. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
  214. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +40 -20
  215. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
  216. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +3 -3
  217. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  218. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  219. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +1 -1
  220. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +1 -1
  221. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +28 -9
  222. package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +1 -1
  223. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  224. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  225. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +58 -31
  226. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  227. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts +20 -0
  228. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.d.ts.map +1 -0
  229. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js +443 -0
  230. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/measure.js.map +1 -0
  231. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +2 -0
  232. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
  233. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +2 -0
  234. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
  235. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +1 -1
  236. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  237. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +1 -0
  238. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  239. package/node_modules/@earendil-works/pi-ai/dist/index.js +1 -0
  240. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  241. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  242. package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  243. package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  244. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  245. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
  246. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  247. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  248. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  249. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  250. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  251. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  252. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  253. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  254. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  255. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  256. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  257. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  258. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  259. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +7 -0
  260. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  261. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +5 -0
  262. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  263. package/node_modules/@earendil-works/pi-tui/dist/mux.d.ts +1 -1
  264. package/node_modules/@earendil-works/pi-tui/dist/mux.d.ts.map +1 -1
  265. package/node_modules/@earendil-works/pi-tui/dist/mux.js +2 -2
  266. package/node_modules/@earendil-works/pi-tui/dist/mux.js.map +1 -1
  267. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +1 -0
  268. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  269. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +19 -0
  270. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  271. package/node_modules/@earendil-works/pi-tui/package.json +1 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AAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,2EAA2E;AAC3E,MAAM,WAAW,6BAA6B;IAC7C,IAAI,EAAE,yBAAyB,CAAC;CAChC;AAED,yFAAyF;AACzF,MAAM,WAAW,2BAA2B;IAC3C,IAAI,EAAE,uBAAuB,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,iFAAiF;AACjF,MAAM,WAAW,uBAAuB;IACvC,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-types.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwGH,iDAAiD;AACjD,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAC3D,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAC3D,MAAM,CAAC,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AACnE,MAAM,CAAC,MAAM,4BAA4B,GAAG,oBAAoB,CAAC;AACjE,MAAM,CAAC,MAAM,gCAAgC,GAAG,wBAAwB,CAAC;AACzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,cAAc,CAAC;AACrD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC","sourcesContent":["/**\n * RPC protocol types for headless operation.\n *\n * Commands are sent as JSON lines on stdin.\n * Responses and events are emitted as JSON lines on stdout.\n */\n\nimport type { AgentMessage, ThinkingLevel } from \"@earendil-works/pi-agent-core\";\nimport type { ImageContent, Model } from \"@earendil-works/pi-ai\";\nimport type { PromptDisposition, SessionStats } from \"../../core/agent-session.ts\";\nimport type { BashResult } from \"../../core/bash-executor.ts\";\nimport type { CompactionResult } from \"../../core/compaction/index.ts\";\nimport type { ServiceTier } from \"../../core/extensions/builtin/service-tier.ts\";\nimport type { SessionEntry, SessionTreeNode } from \"../../core/session-manager.ts\";\nimport type { SourceInfo } from \"../../core/source-info.ts\";\nimport type { RpcSlashCommand } from \"./rpc-command-surface.ts\";\n\nexport type { RpcCommandInvocationEvent } from \"./rpc-command-invocation.ts\";\nexport type { RpcCommandsChangedEvent, RpcSlashCommand } from \"./rpc-command-surface.ts\";\n\n// ============================================================================\n// RPC Commands (stdin)\n// ============================================================================\n\ntype RpcSessionCommand =\n\t// Prompting\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"prompt\";\n\t\t\tmessage: string;\n\t\t\timages?: ImageContent[];\n\t\t\tstreamingBehavior?: \"steer\" | \"followUp\";\n\t\t\tthinkingLevel?: ThinkingLevel;\n\t }\n\t| { id?: string; type: \"steer\"; message: string; images?: ImageContent[] }\n\t| { id?: string; type: \"follow_up\"; message: string; images?: ImageContent[] }\n\t| { id?: string; type: \"abort\" }\n\t| { id?: string; type: \"clear_queue\" }\n\t| { id?: string; type: \"new_session\"; parentSession?: string }\n\n\t// State\n\t| { id?: string; type: \"get_state\" }\n\n\t// Model\n\t| { id?: string; type: \"set_model\"; provider: string; modelId: string }\n\t| { id?: string; type: \"cycle_model\" }\n\t| { id?: string; type: \"get_available_models\" }\n\n\t// Thinking\n\t| { id?: string; type: \"set_thinking_level\"; level: ThinkingLevel; scope?: \"turn\" }\n\t| { id?: string; type: \"cycle_thinking_level\" }\n\t| { id?: string; type: \"get_available_thinking_levels\" }\n\n\t// Fast mode (OpenAI Codex priority service tier)\n\t| { id?: string; type: \"set_fast_mode\"; enabled: boolean }\n\t| { id?: string; type: \"get_fast_mode\" }\n\n\t// Queue modes\n\t| { id?: string; type: \"set_steering_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\t| { id?: string; type: \"set_follow_up_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\n\t// Compaction\n\t| { id?: string; type: \"compact\"; customInstructions?: string }\n\t| { id?: string; type: \"set_auto_compaction\"; enabled: boolean }\n\n\t// Retry\n\t| { id?: string; type: \"set_auto_retry\"; enabled: boolean }\n\t| { id?: string; type: \"abort_retry\" }\n\n\t// Bash\n\t| { id?: string; type: \"bash\"; command: string; excludeFromContext?: boolean }\n\t| { id?: string; type: \"abort_bash\" }\n\n\t// Session\n\t| { id?: string; type: \"get_session_stats\" }\n\t| { id?: string; type: \"export_html\"; outputPath?: string }\n\t| { id?: string; type: \"switch_session\"; sessionPath: string }\n\t| { id?: string; type: \"fork\"; entryId: string }\n\t| { id?: string; type: \"clone\" }\n\t| { id?: string; type: \"get_fork_messages\" }\n\t| { id?: string; type: \"get_entries\"; since?: string }\n\t| { id?: string; type: \"get_tree\" }\n\t| { id?: string; type: \"get_last_assistant_text\" }\n\t| { id?: string; type: \"set_session_name\"; name: string }\n\n\t// Messages\n\t| { id?: string; type: \"get_messages\" }\n\n\t// Commands and loaded runtime surfaces\n\t| { id?: string; type: \"get_commands\" }\n\t| { id?: string; type: \"get_loaded_surfaces\" }\n\t| { id?: string; type: \"extension_request\"; name: string; data?: unknown }\n\n\t// Auth (task 13) is additive. get_auth_providers, login_api_key and logout\n\t// answer synchronously. login_start responds immediately (flow-started) and\n\t// completion is delivered via auth_login_url / auth_login_end EVENTS, because\n\t// an interactive OAuth round-trip cannot fit the 30s request timeout.\n\t| { id?: string; type: \"get_auth_providers\" }\n\t| { id?: string; type: \"login_start\"; provider: string }\n\t| { id?: string; type: \"login_cancel\"; provider: string }\n\t| { id?: string; type: \"login_api_key\"; provider: string; key: string }\n\t| { id?: string; type: \"logout\"; provider: string }\n\n\t// Provider accounts (task 13) are additive. The desktop consumer contract\n\t// lives in ../omo-desktop-app/packages/contracts/src/rpc.ts and is updated separately.\n\t| { id?: string; type: \"get_provider_accounts\"; provider: string }\n\t| { id?: string; type: \"account_pin\"; provider: string; name: string | null }\n\t| { id?: string; type: \"account_remove\"; provider: string; name: string };\n\n/** Stable multi-session protocol error codes. */\nexport const RPC_ERROR_UNKNOWN_SESSION = \"unknown_session\";\nexport const RPC_ERROR_SESSION_CLOSING = \"session_closing\";\nexport const RPC_ERROR_SESSION_PATH_IN_USE = \"session_path_in_use\";\nexport const RPC_ERROR_MISSING_SESSION_ID = \"missing_session_id\";\nexport const RPC_ERROR_MULTI_SESSION_DISABLED = \"multi_session_disabled\";\nexport const RPC_ERROR_INVALID_PATH = \"invalid_path\";\nexport const RPC_ERROR_OPEN_FAILED = \"open_failed\";\n\nexport type RpcErrorCode =\n\t| typeof RPC_ERROR_UNKNOWN_SESSION\n\t| typeof RPC_ERROR_SESSION_CLOSING\n\t| typeof RPC_ERROR_SESSION_PATH_IN_USE\n\t| typeof RPC_ERROR_MISSING_SESSION_ID\n\t| typeof RPC_ERROR_MULTI_SESSION_DISABLED\n\t| typeof RPC_ERROR_INVALID_PATH\n\t| typeof RPC_ERROR_OPEN_FAILED;\n\n/** Every established command accepts an additive routing envelope. */\nexport type RpcCommand =\n\t| (RpcSessionCommand & { sessionId?: string })\n\t| { id?: string; type: \"get_protocol_info\" }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"open_session\";\n\t\t\tsessionPath?: string;\n\t\t\tcwd?: string;\n\t\t\tprovider?: string;\n\t\t\tmodelId?: string;\n\t\t\tthinkingLevel?: ThinkingLevel;\n\t\t\tpermissionPreset?: string;\n\t }\n\t| { id?: string; type: \"close_session\"; sessionId: string }\n\t| { id?: string; type: \"list_sessions\" };\n\n// ============================================================================\n// Auth provider info (get_auth_providers response)\n// ============================================================================\n\n/** One provider row for the /login and /logout selectors. */\nexport interface RpcAuthProvider {\n\t/** Provider id (e.g. \"anthropic\", \"openai\"). */\n\tid: string;\n\t/** Human-readable display name. */\n\tname: string;\n\t/** How this provider authenticates. */\n\tauthType: \"oauth\" | \"api_key\";\n\t/** Auth status without exposing or refreshing any credential. */\n\tstatus: RpcAuthStatus;\n}\n\n/** Auth status mirror (no credential values), from getProviderAuthStatus. */\nexport interface RpcAuthStatus {\n\tconfigured: boolean;\n\tsource?:\n\t\t| \"stored\"\n\t\t| \"runtime\"\n\t\t| \"environment\"\n\t\t| \"fallback\"\n\t\t| \"models_json_key\"\n\t\t| \"models_json_command\"\n\t\t| \"models_json_headers\"\n\t\t| \"extension_headers\";\n\tlabel?: string;\n}\n\n/** Account-slot metadata safe to send to desktop clients. */\nexport interface RpcProviderAccount {\n\tname: string;\n\tsource: \"login\" | \"import\" | \"env\";\n\tblocked: boolean;\n\tpinned: boolean;\n}\n\n// ============================================================================\n// RPC Slash Command (for get_commands response)\n// ============================================================================\n\n/** One extension module loaded by the session resource loader. */\nexport interface RpcLoadedExtension {\n\tname: string;\n\tpath: string;\n\tsourceInfo: SourceInfo;\n\tenabled: boolean;\n}\n\nexport type RpcMcpServerStatus =\n\t| \"enabled\"\n\t| \"disabled\"\n\t| \"untrusted\"\n\t| \"idle\"\n\t| \"connecting\"\n\t| \"connected\"\n\t| \"degraded\"\n\t| \"suspended\"\n\t| \"needs_auth\"\n\t| \"needs_client_registration\";\n\n/** Runtime MCP server state projected from the session-owned MCP service. */\nexport interface RpcLoadedMcpServer {\n\tname: string;\n\ttoolCount: number;\n\tstatus: RpcMcpServerStatus;\n\tauthStatus: \"unsupported\" | \"notLoggedIn\" | \"bearerToken\" | \"oAuth\";\n}\n\n// ============================================================================\n// RPC State\n// ============================================================================\n\nexport interface RpcSessionState {\n\tmodel?: Model<any>;\n\tthinkingLevel: ThinkingLevel;\n\t/** Service tier the session resolved for the active model, if any. */\n\tserviceTier?: ServiceTier;\n\t/** True when the active model is served at the priority (\"fast\") tier. */\n\tfastMode: boolean;\n\tisStreaming: boolean;\n\tisCompacting: boolean;\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tpendingMessageCount: number;\n}\n\n// ============================================================================\n// RPC Responses (stdout)\n// ============================================================================\n\n// Success responses with data\nexport type RpcResponse =\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_protocol_info\";\n\t\t\tsuccess: true;\n\t\t\tdata: {\n\t\t\t\tprotocolVersion: 1;\n\t\t\t\tserverVersion: string;\n\t\t\t\tcapabilities: string[];\n\t\t\t\tmode: \"classic\" | \"multi\";\n\t\t\t};\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"open_session\";\n\t\t\tsuccess: true;\n\t\t\tdata: { sessionId: string; state: RpcSessionState };\n\t }\n\t| { id?: string; type: \"response\"; command: \"close_session\"; success: true; data: Record<string, never> }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_sessions\";\n\t\t\tsuccess: true;\n\t\t\tdata: {\n\t\t\t\tsessions: Array<{\n\t\t\t\t\tsessionId: string;\n\t\t\t\t\tdurableSessionId?: string;\n\t\t\t\t\tsessionPath?: string;\n\t\t\t\t\tcwd: string;\n\t\t\t\t\tname?: string;\n\t\t\t\t\tstatus: \"opening\" | \"open\" | \"closing\" | \"closed\";\n\t\t\t\t}>;\n\t\t\t};\n\t }\n\t// Prompting (async - events follow)\n\t// data.disposition reports how the host disposed the prompt (started/queued/handled)\n\t// so proxied optimistic-echo contracts resolve exactly like the local path; older\n\t// hosts omit it and clients must degrade to canonical-only rendering.\n\t| { id?: string; type: \"response\"; command: \"prompt\"; success: true; data?: { disposition?: PromptDisposition } }\n\t| { id?: string; type: \"response\"; command: \"steer\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"follow_up\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"clear_queue\";\n\t\t\tsuccess: true;\n\t\t\tdata: { steering: string[]; followUp: string[] };\n\t }\n\t| { id?: string; type: \"response\"; command: \"new_session\"; success: true; data: { cancelled: boolean } }\n\n\t// State\n\t| { id?: string; type: \"response\"; command: \"get_state\"; success: true; data: RpcSessionState }\n\n\t// Model\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"set_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: Model<any>;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: { model: Model<any>; thinkingLevel: ThinkingLevel; isScoped: boolean } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_available_models\";\n\t\t\tsuccess: true;\n\t\t\tdata: { models: Array<Model<any> & { supportedThinkingLevels: ThinkingLevel[] }> };\n\t }\n\n\t// Thinking\n\t| { id?: string; type: \"response\"; command: \"set_thinking_level\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_thinking_level\";\n\t\t\tsuccess: true;\n\t\t\tdata: { level: ThinkingLevel } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_available_thinking_levels\";\n\t\t\tsuccess: true;\n\t\t\tdata: { levels: ThinkingLevel[] };\n\t }\n\n\t// Fast mode\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"set_fast_mode\";\n\t\t\tsuccess: true;\n\t\t\tdata: { enabled: boolean; serviceTier: ServiceTier; provider: string; modelId: string };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_fast_mode\";\n\t\t\tsuccess: true;\n\t\t\tdata: { enabled: boolean; serviceTier: ServiceTier | null };\n\t }\n\n\t// Queue modes\n\t| { id?: string; type: \"response\"; command: \"set_steering_mode\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"set_follow_up_mode\"; success: true }\n\n\t// Compaction\n\t| { id?: string; type: \"response\"; command: \"compact\"; success: true; data: CompactionResult }\n\t| { id?: string; type: \"response\"; command: \"set_auto_compaction\"; success: true }\n\n\t// Retry\n\t| { id?: string; type: \"response\"; command: \"set_auto_retry\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_retry\"; success: true }\n\n\t// Bash\n\t| { id?: string; type: \"response\"; command: \"bash\"; success: true; data: BashResult }\n\t| { id?: string; type: \"response\"; command: \"abort_bash\"; success: true }\n\n\t// Session\n\t| { id?: string; type: \"response\"; command: \"get_session_stats\"; success: true; data: SessionStats }\n\t| { id?: string; type: \"response\"; command: \"export_html\"; success: true; data: { path: string } }\n\t| { id?: string; type: \"response\"; command: \"switch_session\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"fork\"; success: true; data: { text: string; cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"clone\"; success: true; data: { cancelled: boolean } }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_fork_messages\";\n\t\t\tsuccess: true;\n\t\t\tdata: { messages: Array<{ entryId: string; text: string }> };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_entries\";\n\t\t\tsuccess: true;\n\t\t\tdata: { entries: SessionEntry[]; leafId: string | null };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { tree: SessionTreeNode[]; leafId: string | null };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_last_assistant_text\";\n\t\t\tsuccess: true;\n\t\t\tdata: { text: string | null };\n\t }\n\t| { id?: string; type: \"response\"; command: \"set_session_name\"; success: true }\n\n\t// Messages\n\t| { id?: string; type: \"response\"; command: \"get_messages\"; success: true; data: { messages: AgentMessage[] } }\n\n\t// Commands and loaded runtime surfaces\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_commands\";\n\t\t\tsuccess: true;\n\t\t\tdata: { commands: RpcSlashCommand[] };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_loaded_surfaces\";\n\t\t\tsuccess: true;\n\t\t\tdata: { extensions: RpcLoadedExtension[]; mcpServers: RpcLoadedMcpServer[] };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"extension_request\";\n\t\t\tsuccess: true;\n\t\t\tdata: unknown;\n\t }\n\n\t// Auth (task 13)\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_auth_providers\";\n\t\t\tsuccess: true;\n\t\t\tdata: { providers: RpcAuthProvider[] };\n\t }\n\t// login_start returns immediately: success:true means the flow has started.\n\t// The URL and completion arrive as auth_login_url / auth_login_end events.\n\t| { id?: string; type: \"response\"; command: \"login_start\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"login_cancel\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"login_api_key\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"logout\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_provider_accounts\";\n\t\t\tsuccess: true;\n\t\t\tdata: { accounts: RpcProviderAccount[] };\n\t }\n\t| { id?: string; type: \"response\"; command: \"account_pin\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"account_remove\"; success: true }\n\n\t// Error response (any command can fail)\n\t| { id?: string; type: \"response\"; command: string; success: false; error: string };\n\n// ============================================================================\n// Extension UI Events (stdout)\n// ============================================================================\n\n/** Emitted when an extension needs user input */\nexport type RpcExtensionUIRequest =\n\t| { type: \"extension_ui_request\"; id: string; method: \"select\"; title: string; options: string[]; timeout?: number }\n\t| { type: \"extension_ui_request\"; id: string; method: \"confirm\"; title: string; message: string; timeout?: number }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"input\";\n\t\t\ttitle: string;\n\t\t\tplaceholder?: string;\n\t\t\ttimeout?: number;\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"editor\"; title: string; prefill?: string }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"notify\";\n\t\t\tmessage: string;\n\t\t\tnotifyType?: \"info\" | \"warning\" | \"error\";\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setStatus\";\n\t\t\tstatusKey: string;\n\t\t\tstatusText: string | undefined;\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setWidget\";\n\t\t\twidgetKey: string;\n\t\t\twidgetLines: string[] | undefined;\n\t\t\twidgetPlacement?: \"aboveEditor\" | \"belowEditor\";\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"setTitle\"; title: string }\n\t| { type: \"extension_ui_request\"; id: string; method: \"set_editor_text\"; text: string }\n\t// Additive (task 13/14): emitted ONLY when the client advertised the\n\t// \"custom_unsupported\" capability. ctx.ui.custom cannot render a third-party\n\t// component in RPC mode, so a flagged client gets this notice before custom()\n\t// returns undefined. Default clients never see it (byte-identical behavior).\n\t| { type: \"extension_ui_request\"; id: string; method: \"custom_unsupported\"; extensionName: string };\n\nexport type RpcExtensionEvent = {\n\ttype: \"extension_event\";\n\tname: string;\n\tdata: unknown;\n};\n\n// ============================================================================\n// Extension UI Commands (stdin)\n// ============================================================================\n\n/** Response to an extension UI request */\nexport type RpcExtensionUIResponse =\n\t| { type: \"extension_ui_response\"; id: string; value: string }\n\t| { type: \"extension_ui_response\"; id: string; confirmed: boolean }\n\t| { type: \"extension_ui_response\"; id: string; cancelled: true };\n\n/** Emitted when the effective session thinking level changes. */\nexport interface RpcThinkingLevelChangedEvent {\n\ttype: \"thinking_level_changed\";\n\tlevel: ThinkingLevel;\n}\n\nexport interface RpcHighReasoningWarningEvent {\n\ttype: \"high_reasoning_warning\";\n\tmodelId: string;\n\tprovider: string;\n\tthinkingLevel: ThinkingLevel;\n}\n\n/** Emitted after explicit skill tokens are expanded for a user-authored request. */\nexport interface RpcSkillInvocationEvent {\n\ttype: \"skill_invocation\";\n\tskills: readonly {\n\t\tname: string;\n\t\tpath: string;\n\t\tsyntax: \"dollar\" | \"slash\";\n\t}[];\n}\n\n/** Emitted when startup or reload selects an existing settings file. */\nexport interface RpcSettingsSourceSelectedEvent {\n\ttype: \"settings_source_selected\";\n\tpath: string;\n\tformat: \"jsonc\" | \"json\";\n\treason: \"explicit-jsonc\" | \"json-only\";\n\tscope: \"global\" | \"project\";\n}\n\n/**\n * Emitted after the session's active model changed, with the thinking level in force AFTER\n * the switch (per-model memory, a favorite's pinned level, or the clamped previous level).\n *\n * Clients that tracked the model by inferring it from `entry_appended` can consume this\n * instead. Additive: an old client that does not know the type filters it out.\n */\nexport interface RpcModelChangedEvent {\n\ttype: \"model_changed\";\n\tmodel: Model<any>;\n\tthinkingLevel: ThinkingLevel;\n\t/** Why the model changed: \"set\", \"cycle\", \"restore\", \"fallback\", or \"fallback-revert\". */\n\tsource: string;\n}\n\n/** Emitted when the effective service tier or fast-mode state of the session changes. */\nexport interface RpcServiceTierChangedEvent {\n\ttype: \"service_tier_changed\";\n\ttier?: ServiceTier;\n\tfastMode: boolean;\n}\n/** Emitted after the loaded skill, extension, or MCP inventory changes. */\nexport interface RpcLoadedSurfacesChangedEvent {\n\ttype: \"loaded_surfaces_changed\";\n}\n\n/** Emitted after an account is added, removed, pinned, or blocked by refresh failure. */\nexport interface RpcAuthAccountsChangedEvent {\n\ttype: \"auth_accounts_changed\";\n\tprovider: string;\n}\n\n/** Emitted when the SDK failover engine advances to a different account slot. */\nexport interface RpcAccountFailoverEvent {\n\ttype: \"account_failover\";\n\tprovider: string;\n\tfrom: string;\n\tto: string;\n\treason: string;\n}\n"]}
1
+ {"version":3,"file":"rpc-types.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuJH,iDAAiD;AACjD,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAC3D,MAAM,CAAC,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAC3D,MAAM,CAAC,MAAM,6BAA6B,GAAG,qBAAqB,CAAC;AACnE,MAAM,CAAC,MAAM,4BAA4B,GAAG,oBAAoB,CAAC;AACjE,MAAM,CAAC,MAAM,gCAAgC,GAAG,wBAAwB,CAAC;AACzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,cAAc,CAAC;AACrD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC","sourcesContent":["/**\n * RPC protocol types for headless operation.\n *\n * Commands are sent as JSON lines on stdin.\n * Responses and events are emitted as JSON lines on stdout.\n */\n\nimport type { AgentMessage, ThinkingLevel } from \"@earendil-works/pi-agent-core\";\nimport type { ImageContent, Model, ThinkingSelection } from \"@earendil-works/pi-ai\";\nimport type { AgentAbortSource } from \"../../core/agent-abort-provenance.ts\";\nimport type { PromptDisposition, SessionStats } from \"../../core/agent-session.ts\";\nimport type { BashResult } from \"../../core/bash-executor.ts\";\nimport type { CompactionResult } from \"../../core/compaction/index.ts\";\nimport type { ServiceTier } from \"../../core/extensions/builtin/service-tier.ts\";\nimport type { ContextUsage } from \"../../core/extensions/types.ts\";\nimport type { SessionEntry, SessionTreeNode, UsageTotals } from \"../../core/session-manager.ts\";\nimport type { SourceInfo } from \"../../core/source-info.ts\";\nimport type { RpcSlashCommand } from \"./rpc-command-surface.ts\";\n\nexport type { RpcCommandInvocationEvent } from \"./rpc-command-invocation.ts\";\nexport type { RpcCommandsChangedEvent, RpcSlashCommand } from \"./rpc-command-surface.ts\";\n\n// ============================================================================\n// RPC Commands (stdin)\n// ============================================================================\n\ntype RpcSessionCommand =\n\t// Prompting\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"prompt\";\n\t\t\tmessage: string;\n\t\t\timages?: ImageContent[];\n\t\t\tstreamingBehavior?: \"steer\" | \"followUp\";\n\t\t\tthinkingLevel?: ThinkingLevel;\n\t\t\tsessionTitlePrompt?: string | false;\n\t\t\texpandPromptTemplates?: boolean;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"send_custom_message\";\n\t\t\tcustomType: string;\n\t\t\tcontent: unknown;\n\t\t\tdisplay: boolean;\n\t\t\tdetails?: unknown;\n\t\t\ttriggerTurn?: boolean;\n\t\t\tdeliverAs?: \"steer\" | \"followUp\" | \"nextTurn\";\n\t }\n\t| { id?: string; type: \"append_user_message\"; content: unknown }\n\t| { id?: string; type: \"append_session_entry\"; entry: SessionEntry }\n\t| { id?: string; type: \"steer\"; message: string; images?: ImageContent[]; enqueueOrder?: number }\n\t| { id?: string; type: \"follow_up\"; message: string; images?: ImageContent[]; enqueueOrder?: number }\n\t| { id?: string; type: \"abort\" }\n\t| { id?: string; type: \"abort_compaction\" }\n\t| { id?: string; type: \"reload\" }\n\t| { id?: string; type: \"check_reload_veto\" }\n\t| { id?: string; type: \"clear_queue\"; abortWillFollow?: boolean }\n\t| { id?: string; type: \"get_steering_messages\" }\n\t| { id?: string; type: \"get_follow_up_messages\" }\n\t| { id?: string; type: \"abort_branch_summary\" }\n\t| { id?: string; type: \"new_session\"; parentSession?: string }\n\n\t// State\n\t| { id?: string; type: \"get_state\" }\n\n\t// Model\n\t| { id?: string; type: \"set_model\"; provider: string; modelId: string }\n\t| { id?: string; type: \"set_favorite_models\"; models: RpcSessionModelEntry[] }\n\t| { id?: string; type: \"set_scoped_models\"; models: RpcSessionModelEntry[] }\n\t| { id?: string; type: \"cycle_model\"; direction?: \"forward\" | \"backward\" }\n\t| { id?: string; type: \"get_available_models\" }\n\n\t// Thinking\n\t| { id?: string; type: \"set_thinking_level\"; level: ThinkingLevel; scope?: \"turn\" }\n\t| { id?: string; type: \"cycle_thinking_level\" }\n\t| { id?: string; type: \"get_available_thinking_levels\" }\n\n\t// Fast mode (OpenAI Codex priority service tier)\n\t| { id?: string; type: \"set_fast_mode\"; enabled: boolean }\n\t| { id?: string; type: \"get_fast_mode\" }\n\n\t// Queue modes\n\t| { id?: string; type: \"set_steering_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\t| { id?: string; type: \"set_follow_up_mode\"; mode: \"all\" | \"one-at-a-time\" }\n\n\t// Compaction\n\t| { id?: string; type: \"compact\"; customInstructions?: string }\n\t| { id?: string; type: \"set_auto_compaction\"; enabled: boolean }\n\n\t// Retry\n\t| { id?: string; type: \"set_auto_retry\"; enabled: boolean }\n\t| { id?: string; type: \"abort_retry\" }\n\n\t// Bash\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"bash\";\n\t\t\tcommand: string;\n\t\t\t/** Identifies output chunks to the requesting client. */\n\t\t\tbashId?: string;\n\t\t\texcludeFromContext?: boolean;\n\t\t\texecutionId?: string;\n\t\t\toperations?: Record<string, unknown>;\n\t }\n\t| { id?: string; type: \"record_bash_result\"; command: string; result: BashResult; excludeFromContext?: boolean }\n\t| { id?: string; type: \"abort_bash\" }\n\t| { id?: string; type: \"cleanup_bash_output\"; path: string }\n\t| { id?: string; type: \"set_label\"; entryId: string; label?: string }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"navigate_tree\";\n\t\t\ttargetId: string;\n\t\t\tsummarize?: boolean;\n\t\t\tcustomInstructions?: string;\n\t\t\treplaceInstructions?: boolean;\n\t\t\tlabel?: string;\n\t }\n\n\t// Session\n\t| { id?: string; type: \"get_session_stats\" }\n\t| { id?: string; type: \"export_html\"; outputPath?: string; themeName?: string }\n\t| { id?: string; type: \"export_jsonl\"; outputPath?: string }\n\t| { id?: string; type: \"switch_session\"; sessionPath: string; cwdOverride?: string }\n\t| { id?: string; type: \"fork\"; entryId: string; position?: \"before\" | \"at\" }\n\t| { id?: string; type: \"clone\" }\n\t| { id?: string; type: \"get_fork_messages\" }\n\t| { id?: string; type: \"get_entries\"; since?: string }\n\t| { id?: string; type: \"get_tree\" }\n\t| { id?: string; type: \"get_last_assistant_text\" }\n\t| { id?: string; type: \"set_session_name\"; name: string }\n\t| { id?: string; type: \"import_jsonl\"; inputPath: string; cwdOverride?: string }\n\n\t// Messages\n\t| { id?: string; type: \"get_messages\" }\n\n\t// Commands and loaded runtime surfaces\n\t| { id?: string; type: \"get_commands\" }\n\t| { id?: string; type: \"get_loaded_surfaces\" }\n\t| { id?: string; type: \"extension_request\"; name: string; data?: unknown }\n\n\t// Auth (task 13) is additive. get_auth_providers, login_api_key and logout\n\t// answer synchronously. login_start responds immediately (flow-started) and\n\t// completion is delivered via auth_login_url / auth_login_end EVENTS, because\n\t// an interactive OAuth round-trip cannot fit the 30s request timeout.\n\t| { id?: string; type: \"get_auth_providers\" }\n\t| { id?: string; type: \"login_start\"; provider: string }\n\t| { id?: string; type: \"login_cancel\"; provider: string }\n\t| { id?: string; type: \"login_api_key\"; provider: string; key: string }\n\t| { id?: string; type: \"logout\"; provider: string }\n\n\t// Provider accounts (task 13) are additive. The desktop consumer contract\n\t// lives in ../omo-desktop-app/packages/contracts/src/rpc.ts and is updated separately.\n\t| { id?: string; type: \"get_provider_accounts\"; provider: string }\n\t| { id?: string; type: \"account_pin\"; provider: string; name: string | null }\n\t| { id?: string; type: \"account_remove\"; provider: string; name: string };\n\n/** Stable multi-session protocol error codes. */\nexport const RPC_ERROR_UNKNOWN_SESSION = \"unknown_session\";\nexport const RPC_ERROR_SESSION_CLOSING = \"session_closing\";\nexport const RPC_ERROR_SESSION_PATH_IN_USE = \"session_path_in_use\";\nexport const RPC_ERROR_MISSING_SESSION_ID = \"missing_session_id\";\nexport const RPC_ERROR_MULTI_SESSION_DISABLED = \"multi_session_disabled\";\nexport const RPC_ERROR_INVALID_PATH = \"invalid_path\";\nexport const RPC_ERROR_OPEN_FAILED = \"open_failed\";\n\nexport type RpcErrorCode =\n\t| typeof RPC_ERROR_UNKNOWN_SESSION\n\t| typeof RPC_ERROR_SESSION_CLOSING\n\t| typeof RPC_ERROR_SESSION_PATH_IN_USE\n\t| typeof RPC_ERROR_MISSING_SESSION_ID\n\t| typeof RPC_ERROR_MULTI_SESSION_DISABLED\n\t| typeof RPC_ERROR_INVALID_PATH\n\t| typeof RPC_ERROR_OPEN_FAILED;\n\n/** Every established command accepts an additive routing envelope. */\nexport type RpcCommand =\n\t| (RpcSessionCommand & { sessionId?: string })\n\t| { id?: string; type: \"get_protocol_info\" }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"open_session\";\n\t\t\tsessionPath?: string;\n\t\t\tcwd?: string;\n\t\t\tprovider?: string;\n\t\t\tmodelId?: string;\n\t\t\tthinkingLevel?: ThinkingLevel;\n\t\t\tpermissionPreset?: string;\n\t }\n\t| { id?: string; type: \"close_session\"; sessionId: string }\n\t| { id?: string; type: \"list_sessions\" };\n\n// ============================================================================\n// Auth provider info (get_auth_providers response)\n// ============================================================================\n\n/** One provider row for the /login and /logout selectors. */\nexport interface RpcAuthProvider {\n\t/** Provider id (e.g. \"anthropic\", \"openai\"). */\n\tid: string;\n\t/** Human-readable display name. */\n\tname: string;\n\t/** How this provider authenticates. */\n\tauthType: \"oauth\" | \"api_key\";\n\t/** Auth status without exposing or refreshing any credential. */\n\tstatus: RpcAuthStatus;\n}\n\n/** Auth status mirror (no credential values), from getProviderAuthStatus. */\nexport interface RpcAuthStatus {\n\tconfigured: boolean;\n\tsource?:\n\t\t| \"stored\"\n\t\t| \"runtime\"\n\t\t| \"environment\"\n\t\t| \"fallback\"\n\t\t| \"models_json_key\"\n\t\t| \"models_json_command\"\n\t\t| \"models_json_headers\"\n\t\t| \"extension_headers\";\n\tlabel?: string;\n}\n\n/** Account-slot metadata safe to send to desktop clients. */\nexport interface RpcProviderAccount {\n\tname: string;\n\tsource: \"login\" | \"import\" | \"env\";\n\tblocked: boolean;\n\tpinned: boolean;\n}\n\n// ============================================================================\n// RPC Slash Command (for get_commands response)\n// ============================================================================\n\n/** One extension module loaded by the session resource loader. */\nexport interface RpcLoadedExtension {\n\tname: string;\n\tpath: string;\n\tsourceInfo: SourceInfo;\n\tenabled: boolean;\n}\n\nexport type RpcMcpServerStatus =\n\t| \"enabled\"\n\t| \"disabled\"\n\t| \"untrusted\"\n\t| \"idle\"\n\t| \"connecting\"\n\t| \"connected\"\n\t| \"degraded\"\n\t| \"suspended\"\n\t| \"needs_auth\"\n\t| \"needs_client_registration\";\n\n/** Runtime MCP server state projected from the session-owned MCP service. */\nexport interface RpcLoadedMcpServer {\n\tname: string;\n\ttoolCount: number;\n\tstatus: RpcMcpServerStatus;\n\tauthStatus: \"unsupported\" | \"notLoggedIn\" | \"bearerToken\" | \"oAuth\";\n}\n\n// ============================================================================\n// RPC State\n// ============================================================================\n\nexport interface RpcSessionModelEntry {\n\tmodel: Model<any>;\n\tthinkingLevel?: ThinkingLevel;\n\tthinkingSelection?: ThinkingSelection;\n\tserviceTier?: ServiceTier;\n}\n\nexport interface RpcSessionState {\n\tmodel?: Model<any>;\n\tthinkingLevel: ThinkingLevel;\n\t/**\n\t * Explicit selector provenance for `thinkingLevel`, absent for SDK-defaulted\n\t * effective levels. An attached client cannot distinguish \"the user chose high\"\n\t * from \"high is simply the effective level\" without it.\n\t */\n\tthinkingSelection?: ThinkingSelection;\n\t/**\n\t * Abort owner of the most recent aborted turn, or the in-flight one while it is\n\t * still settling. Retained after settle: the live session getter is transient, so a\n\t * client that snapshots state after the turn ends would otherwise see nothing and\n\t * fall back to generic wording instead of \"Operation aborted\".\n\t */\n\tlastAbortSource?: AgentAbortSource;\n\t/** Service tier the session resolved for the active model, if any. */\n\tserviceTier?: ServiceTier;\n\t/** True when the active model is served at the priority (\"fast\") tier. */\n\tfastMode: boolean;\n\tisStreaming: boolean;\n\tisCompacting: boolean;\n\tsteeringMode: \"all\" | \"one-at-a-time\";\n\tfollowUpMode: \"all\" | \"one-at-a-time\";\n\tsessionFile?: string;\n\tsessionId: string;\n\tsessionName?: string;\n\tcwd: string;\n\t/** Whether project-scoped settings and resources are trusted by the host. */\n\tprojectTrusted: boolean;\n\t/** Authoritative entries for setup-only sessions whose deferred file does not exist yet. */\n\tentries?: SessionEntry[];\n\tfavoriteModels: RpcSessionModelEntry[];\n\tscopedModels: RpcSessionModelEntry[];\n\tsteering: string[];\n\tfollowUp: string[];\n\tordered: Array<{ text: string; mode: \"steer\" | \"followUp\"; enqueueOrder: number }>;\n\tautoCompactionEnabled: boolean;\n\tmessageCount: number;\n\tpendingMessageCount: number;\n\tusageTotals: UsageTotals;\n\tcontextUsage?: ContextUsage;\n\tretryAttempt: number;\n\tisBashRunning: boolean;\n}\n\n// ============================================================================\n// RPC Responses (stdout)\n// ============================================================================\n\n// Success responses with data\nexport type RpcResponse =\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_protocol_info\";\n\t\t\tsuccess: true;\n\t\t\tdata: {\n\t\t\t\tprotocolVersion: 1;\n\t\t\t\tserverVersion: string;\n\t\t\t\tcapabilities: string[];\n\t\t\t\tmode: \"classic\" | \"multi\";\n\t\t\t};\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"open_session\";\n\t\t\tsuccess: true;\n\t\t\tdata: { sessionId: string; state: RpcSessionState; attached?: boolean };\n\t }\n\t| { id?: string; type: \"response\"; command: \"close_session\"; success: true; data: Record<string, never> }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"list_sessions\";\n\t\t\tsuccess: true;\n\t\t\tdata: {\n\t\t\t\tsessions: Array<{\n\t\t\t\t\tsessionId: string;\n\t\t\t\t\tdurableSessionId?: string;\n\t\t\t\t\tsessionPath?: string;\n\t\t\t\t\tcwd: string;\n\t\t\t\t\tname?: string;\n\t\t\t\t\tstatus: \"opening\" | \"open\" | \"closing\" | \"closed\";\n\t\t\t\t}>;\n\t\t\t};\n\t }\n\t// Prompting (async - events follow)\n\t// data.disposition reports how the host disposed the prompt (started/queued/handled)\n\t// so proxied optimistic-echo contracts resolve exactly like the local path; older\n\t// hosts omit it and clients must degrade to canonical-only rendering.\n\t| { id?: string; type: \"response\"; command: \"prompt\"; success: true; data?: { disposition?: PromptDisposition } }\n\t| { id?: string; type: \"response\"; command: \"send_custom_message\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"append_user_message\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"append_session_entry\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"steer\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"follow_up\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_compaction\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"reload\"; success: true; data: { cancelled: boolean; reason?: string } }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"check_reload_veto\";\n\t\t\tsuccess: true;\n\t\t\tdata: { cancelled: boolean; reason?: string };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"clear_queue\";\n\t\t\tsuccess: true;\n\t\t\tdata: {\n\t\t\t\tsteering: string[];\n\t\t\t\tfollowUp: string[];\n\t\t\t\tordered: Array<{ text: string; mode: \"steer\" | \"followUp\"; enqueueOrder: number }>;\n\t\t\t};\n\t }\n\t| { id?: string; type: \"response\"; command: \"new_session\"; success: true; data: { cancelled: boolean } }\n\n\t// State\n\t| { id?: string; type: \"response\"; command: \"get_state\"; success: true; data: RpcSessionState }\n\n\t// Model\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"set_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: Model<any> & { systemPromptName?: string };\n\t }\n\t| { id?: string; type: \"response\"; command: \"set_favorite_models\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"set_scoped_models\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_model\";\n\t\t\tsuccess: true;\n\t\t\tdata: { model: Model<any>; thinkingLevel: ThinkingLevel; isScoped: boolean } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_available_models\";\n\t\t\tsuccess: true;\n\t\t\tdata: { models: Array<Model<any> & { supportedThinkingLevels: ThinkingLevel[] }> };\n\t }\n\n\t// Thinking\n\t| { id?: string; type: \"response\"; command: \"set_thinking_level\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"cycle_thinking_level\";\n\t\t\tsuccess: true;\n\t\t\tdata: { level: ThinkingLevel } | null;\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_available_thinking_levels\";\n\t\t\tsuccess: true;\n\t\t\tdata: { levels: ThinkingLevel[] };\n\t }\n\n\t// Fast mode\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"set_fast_mode\";\n\t\t\tsuccess: true;\n\t\t\tdata: { enabled: boolean; serviceTier: ServiceTier; provider: string; modelId: string };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_fast_mode\";\n\t\t\tsuccess: true;\n\t\t\tdata: { enabled: boolean; serviceTier: ServiceTier | null };\n\t }\n\n\t// Queue modes\n\t| { id?: string; type: \"response\"; command: \"set_steering_mode\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"set_follow_up_mode\"; success: true }\n\n\t// Compaction\n\t| { id?: string; type: \"response\"; command: \"compact\"; success: true; data: CompactionResult }\n\t| { id?: string; type: \"response\"; command: \"set_auto_compaction\"; success: true }\n\n\t// Retry\n\t| { id?: string; type: \"response\"; command: \"set_auto_retry\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"abort_retry\"; success: true }\n\n\t// Bash\n\t| { id?: string; type: \"response\"; command: \"bash\"; success: true; data: BashResult }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"navigate_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { cancelled: boolean; editorText?: string; aborted?: boolean; summaryEntry?: unknown };\n\t }\n\t| { id?: string; type: \"response\"; command: \"abort_bash\"; success: true }\n\n\t// Session\n\t| { id?: string; type: \"response\"; command: \"get_session_stats\"; success: true; data: SessionStats }\n\t| { id?: string; type: \"response\"; command: \"export_html\"; success: true; data: { path: string } }\n\t| { id?: string; type: \"response\"; command: \"export_jsonl\"; success: true; data: { path: string } }\n\t| { id?: string; type: \"response\"; command: \"switch_session\"; success: true; data: { cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"fork\"; success: true; data: { text: string; cancelled: boolean } }\n\t| { id?: string; type: \"response\"; command: \"clone\"; success: true; data: { cancelled: boolean } }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_fork_messages\";\n\t\t\tsuccess: true;\n\t\t\tdata: { messages: Array<{ entryId: string; text: string }> };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_entries\";\n\t\t\tsuccess: true;\n\t\t\tdata: { entries: SessionEntry[]; leafId: string | null };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_tree\";\n\t\t\tsuccess: true;\n\t\t\tdata: { tree: SessionTreeNode[]; leafId: string | null };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_last_assistant_text\";\n\t\t\tsuccess: true;\n\t\t\tdata: { text: string | null };\n\t }\n\t| { id?: string; type: \"response\"; command: \"set_session_name\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"import_jsonl\"; success: true; data: { cancelled: boolean } }\n\n\t// Messages\n\t| { id?: string; type: \"response\"; command: \"get_messages\"; success: true; data: { messages: AgentMessage[] } }\n\n\t// Commands and loaded runtime surfaces\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_commands\";\n\t\t\tsuccess: true;\n\t\t\tdata: { commands: RpcSlashCommand[] };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_loaded_surfaces\";\n\t\t\tsuccess: true;\n\t\t\tdata: { extensions: RpcLoadedExtension[]; mcpServers: RpcLoadedMcpServer[] };\n\t }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"extension_request\";\n\t\t\tsuccess: true;\n\t\t\tdata: unknown;\n\t }\n\n\t// Auth (task 13)\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_auth_providers\";\n\t\t\tsuccess: true;\n\t\t\tdata: { providers: RpcAuthProvider[] };\n\t }\n\t// login_start returns immediately: success:true means the flow has started.\n\t// The URL and completion arrive as auth_login_url / auth_login_end events.\n\t| { id?: string; type: \"response\"; command: \"login_start\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"login_cancel\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"login_api_key\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"logout\"; success: true }\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: \"get_provider_accounts\";\n\t\t\tsuccess: true;\n\t\t\tdata: { accounts: RpcProviderAccount[] };\n\t }\n\t| { id?: string; type: \"response\"; command: \"account_pin\"; success: true }\n\t| { id?: string; type: \"response\"; command: \"account_remove\"; success: true }\n\n\t// Error response (any command can fail)\n\t| {\n\t\t\tid?: string;\n\t\t\ttype: \"response\";\n\t\t\tcommand: string;\n\t\t\tsuccess: false;\n\t\t\terror: string;\n\t\t\terrorCode?: string;\n\t\t\terrorData?: unknown;\n\t };\n\n// ============================================================================\n// Extension UI Events (stdout)\n// ============================================================================\n\n/** Emitted when an extension needs user input */\nexport type RpcExtensionUIRequest =\n\t| { type: \"extension_ui_request\"; id: string; method: \"select\"; title: string; options: string[]; timeout?: number }\n\t| { type: \"extension_ui_request\"; id: string; method: \"confirm\"; title: string; message: string; timeout?: number }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"input\";\n\t\t\ttitle: string;\n\t\t\tplaceholder?: string;\n\t\t\ttimeout?: number;\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"editor\"; title: string; prefill?: string }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"notify\";\n\t\t\tmessage: string;\n\t\t\tnotifyType?: \"info\" | \"warning\" | \"error\";\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setStatus\";\n\t\t\tstatusKey: string;\n\t\t\tstatusText: string | undefined;\n\t }\n\t| {\n\t\t\ttype: \"extension_ui_request\";\n\t\t\tid: string;\n\t\t\tmethod: \"setWidget\";\n\t\t\twidgetKey: string;\n\t\t\twidgetLines: string[] | undefined;\n\t\t\twidgetPlacement?: \"aboveEditor\" | \"belowEditor\";\n\t }\n\t| { type: \"extension_ui_request\"; id: string; method: \"setTitle\"; title: string }\n\t| { type: \"extension_ui_request\"; id: string; method: \"set_editor_text\"; text: string }\n\t// Additive (task 13/14): emitted ONLY when the client advertised the\n\t// \"custom_unsupported\" capability. ctx.ui.custom cannot render a third-party\n\t// component in RPC mode, so a flagged client gets this notice before custom()\n\t// returns undefined. Default clients never see it (byte-identical behavior).\n\t| { type: \"extension_ui_request\"; id: string; method: \"custom_unsupported\"; extensionName: string };\n\nexport type RpcExtensionEvent = {\n\ttype: \"extension_event\";\n\tname: string;\n\tdata: unknown;\n};\n\n// ============================================================================\n// Extension UI Commands (stdin)\n// ============================================================================\n\n/** Response to an extension UI request */\nexport type RpcExtensionUIResponse =\n\t| { type: \"extension_ui_response\"; id: string; value: string }\n\t| { type: \"extension_ui_response\"; id: string; confirmed: boolean }\n\t| { type: \"extension_ui_response\"; id: string; cancelled: true };\n\n/** Emitted when the effective session thinking level changes. */\nexport interface RpcThinkingLevelChangedEvent {\n\ttype: \"thinking_level_changed\";\n\tlevel: ThinkingLevel;\n\t/**\n\t * Selector provenance in force after the change; absent when the level is an\n\t * SDK-defaulted effective level rather than an explicit choice. Additive: an old\n\t * client that does not know the field ignores it.\n\t */\n\tthinkingSelection?: ThinkingSelection;\n}\n\nexport interface RpcHighReasoningWarningEvent {\n\ttype: \"high_reasoning_warning\";\n\tmodelId: string;\n\tprovider: string;\n\tthinkingLevel: ThinkingLevel;\n}\n\n/** Emitted after explicit skill tokens are expanded for a user-authored request. */\nexport interface RpcSkillInvocationEvent {\n\ttype: \"skill_invocation\";\n\tskills: readonly {\n\t\tname: string;\n\t\tpath: string;\n\t\tsyntax: \"dollar\" | \"slash\";\n\t}[];\n}\n\n/** Emitted when startup or reload selects an existing settings file. */\nexport interface RpcSettingsSourceSelectedEvent {\n\ttype: \"settings_source_selected\";\n\tpath: string;\n\tformat: \"jsonc\" | \"json\";\n\treason: \"explicit-jsonc\" | \"json-only\";\n\tscope: \"global\" | \"project\";\n}\n\n/**\n * Emitted after the session's active model changed, with the thinking level in force AFTER\n * the switch (per-model memory, a favorite's pinned level, or the clamped previous level).\n *\n * Clients that tracked the model by inferring it from `entry_appended` can consume this\n * instead. Additive: an old client that does not know the type filters it out.\n */\nexport interface RpcModelChangedEvent {\n\ttype: \"model_changed\";\n\tmodel: Model<any>;\n\tthinkingLevel: ThinkingLevel;\n\t/** Why the model changed: \"set\", \"cycle\", \"restore\", \"fallback\", or \"fallback-revert\". */\n\tsource: string;\n\t/** Selector provenance for `thinkingLevel` after the switch, when one was explicit. */\n\tthinkingSelection?: ThinkingSelection;\n}\n\n/** Emitted when the effective service tier or fast-mode state of the session changes. */\nexport interface RpcServiceTierChangedEvent {\n\ttype: \"service_tier_changed\";\n\ttier?: ServiceTier;\n\tfastMode: boolean;\n}\n/**\n * Emitted after the host swapped the live session behind this connection (new session,\n * fork, or switch), carrying the new authoritative identity.\n *\n * A replacement can be initiated by ANY attached client. Without this event the other\n * attached clients keep their stale identity and keep routing replacement-dependent\n * actions at the session that no longer exists. Additive: an old client that does not\n * know the type filters it out.\n */\nexport interface RpcSessionReplacedEvent {\n\ttype: \"session_replaced\";\n\t/** Durable session id of the session now bound to this connection. */\n\tsessionId: string;\n\t/** Session file backing the new session, absent for a deferred setup-only session. */\n\tsessionFile?: string;\n\tcwd: string;\n\tsessionName?: string;\n}\n\n/** Emitted after the loaded skill, extension, or MCP inventory changes. */\nexport interface RpcLoadedSurfacesChangedEvent {\n\ttype: \"loaded_surfaces_changed\";\n}\n\n/** Emitted after an account is added, removed, pinned, or blocked by refresh failure. */\nexport interface RpcAuthAccountsChangedEvent {\n\ttype: \"auth_accounts_changed\";\n\tprovider: string;\n}\n\n/** Emitted when the SDK failover engine advances to a different account slot. */\nexport interface RpcAccountFailoverEvent {\n\ttype: \"account_failover\";\n\tprovider: string;\n\tfrom: string;\n\tto: string;\n\treason: string;\n}\n"]}
@@ -4,6 +4,7 @@ import type { RpcSessionEntry } from "./session-registry.ts";
4
4
  /** A session-owned adapter around the classic command and extension-UI wiring. */
5
5
  export interface RpcSessionBinding {
6
6
  handle(command: object): Promise<void>;
7
+ cancelPendingExtensionUiRequests?(): void;
7
8
  dispose(): Promise<void>;
8
9
  }
9
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"session-binding.d.ts","sourceRoot":"","sources":["../../../src/modes/rpc/session-binding.ts"],"names":[],"mappings":"AAEA,OAAO,EAGN,KAAK,oBAAoB,EAEzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,kFAAkF;AAClF,MAAM,WAAW,iBAAiB;IACjC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAQD;;;GAGG;AACH,wBAAsB,uBAAuB,CAC5C,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,kBAAkB,EAC1B,YAAY,EAAE,MAAM,IAAI,EACxB,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,cAAc,CAAM,GACtD,OAAO,CAAC,iBAAiB,CAAC,CAmB5B"}
1
+ {"version":3,"file":"session-binding.d.ts","sourceRoot":"","sources":["../../../src/modes/rpc/session-binding.ts"],"names":[],"mappings":"AAEA,OAAO,EAGN,KAAK,oBAAoB,EAEzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,kFAAkF;AAClF,MAAM,WAAW,iBAAiB;IACjC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,gCAAgC,CAAC,IAAI,IAAI,CAAC;IAC1C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAQD;;;GAGG;AACH,wBAAsB,uBAAuB,CAC5C,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,eAAe,EACtB,MAAM,EAAE,kBAAkB,EAC1B,YAAY,EAAE,MAAM,IAAI,EACxB,OAAO,GAAE,IAAI,CAAC,oBAAoB,EAAE,cAAc,CAAM,GACtD,OAAO,CAAC,iBAAiB,CAAC,CAsC5B"}
@@ -13,12 +13,31 @@ function enqueueRecords(writer, sessionId, chunk) {
13
13
  export async function createRpcSessionBinding(sessionId, entry, writer, requestClose, options = {}) {
14
14
  if (!entry.runtime)
15
15
  throw new Error("Session runtime was not created");
16
+ // Attachments share one entry, so resolve the host from the live runtime. In
17
+ // particular, switch_session must use the entry's replacement-aware method
18
+ // instead of a runtime captured during open_session.
19
+ const runtimeHost = new Proxy({}, {
20
+ get(_target, property) {
21
+ if (property === "switchSession" && entry.switchSession)
22
+ return entry.switchSession;
23
+ if (property === "setRebindSession")
24
+ return (callback) => {
25
+ entry.rebindSession = callback;
26
+ entry.runtime?.setRebindSession(callback);
27
+ };
28
+ const runtime = entry.runtime;
29
+ if (!runtime)
30
+ throw new Error("Session runtime was not created");
31
+ const value = Reflect.get(runtime, property, runtime);
32
+ return typeof value === "function" ? value.bind(runtime) : value;
33
+ },
34
+ });
16
35
  const handler = await runWithProviderScope(entry.scope, async () => {
17
36
  const taggedSink = {
18
37
  writeRaw: bindToProviderScope((chunk) => enqueueRecords(writer, sessionId, chunk)),
19
38
  waitForBackpressure: bindToProviderScope(async () => { }),
20
39
  };
21
- return createRpcConnectionHandler(entry.runtime, taggedSink, {
40
+ return createRpcConnectionHandler(runtimeHost, taggedSink, {
22
41
  sessionId,
23
42
  shutdownHandler: bindToProviderScope(requestClose),
24
43
  disposeRuntime: false,
@@ -28,6 +47,7 @@ export async function createRpcSessionBinding(sessionId, entry, writer, requestC
28
47
  await handler.ready;
29
48
  return {
30
49
  handle: (command) => runWithProviderScope(entry.scope, () => handler.handleInputLine(JSON.stringify(command))),
50
+ cancelPendingExtensionUiRequests: () => runWithProviderScope(entry.scope, () => handler.cancelPendingExtensionUiRequests()),
31
51
  dispose: () => runWithProviderScope(entry.scope, () => handler.dispose()),
32
52
  };
33
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"session-binding.js","sourceRoot":"","sources":["../../../src/modes/rpc/session-binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEtG,OAAO,EACN,0BAA0B,GAI1B,MAAM,yBAAyB,CAAC;AAUjC,SAAS,cAAc,CAAC,MAA0B,EAAE,SAAiB,EAAE,KAAa;IACnF,KAAK,MAAM,IAAI,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AO,CAAC,OAAO,EAAE,CAAC;KACzE,CAAC;AACH,CAAC","sourcesContent":["import { bindToProviderScope, runWithProviderScope } from \"@earendil-works/pi-ai/node/provider-scope\";\nimport type { AgentSessionRuntime } from \"../../core/agent-session-runtime.ts\";\nimport {\n\tcreateRpcConnectionHandler,\n\ttype RpcConnectionHandler,\n\ttype RpcConnectionOptions,\n\ttype RpcConnectionSink,\n} from \"./connection-handler.ts\";\nimport type { SessionEventWriter } from \"./session-event-writer.ts\";\nimport type { RpcSessionEntry } from \"./session-registry.ts\";\n\n/** A session-owned adapter around the classic command and extension-UI wiring. */\nexport interface RpcSessionBinding {\n\thandle(command: object): Promise<void>;\n\tdispose(): Promise<void>;\n}\n\nfunction enqueueRecords(writer: SessionEventWriter, sessionId: string, chunk: string): void {\n\tfor (const line of chunk.split(\"\\n\")) {\n\t\tif (line) writer.enqueue(sessionId, JSON.parse(line) as object);\n\t}\n}\n\n/**\n * Creates the extension UI bridge and subscriptions within the entry's provider\n * scope. The classic handler remains the single source of command semantics.\n */\nexport async function createRpcSessionBinding(\n\tsessionId: string,\n\tentry: RpcSessionEntry,\n\twriter: SessionEventWriter,\n\trequestClose: () => void,\n\toptions: Pick<RpcConnectionOptions, \"capabilities\"> = {},\n): Promise<RpcSessionBinding> {\n\tif (!entry.runtime) throw new Error(\"Session runtime was not created\");\n\tconst handler: RpcConnectionHandler = await runWithProviderScope(entry.scope, async () => {\n\t\tconst taggedSink: RpcConnectionSink = {\n\t\t\twriteRaw: bindToProviderScope((chunk: string) => enqueueRecords(writer, sessionId, chunk)),\n\t\t\twaitForBackpressure: bindToProviderScope(async () => {}),\n\t\t};\n\t\treturn createRpcConnectionHandler(entry.runtime! as AgentSessionRuntime, taggedSink, {\n\t\t\tsessionId,\n\t\t\tshutdownHandler: bindToProviderScope(requestClose),\n\t\t\tdisposeRuntime: false,\n\t\t\t...options,\n\t\t});\n\t});\n\tawait handler.ready;\n\treturn {\n\t\thandle: (command) => runWithProviderScope(entry.scope, () => handler.handleInputLine(JSON.stringify(command))),\n\t\tdispose: () => runWithProviderScope(entry.scope, () => handler.dispose()),\n\t};\n}\n"]}
1
+ {"version":3,"file":"session-binding.js","sourceRoot":"","sources":["../../../src/modes/rpc/session-binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEtG,OAAO,EACN,0BAA0B,GAI1B,MAAM,yBAAyB,CAAC;AAWjC,SAAS,cAAc,CAAC,MAA0B,EAAE,SAAiB,EAAE,KAAa;IACnF,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACtC,IAAI,IAAI;YAAE,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAW,CAAC,CAAC;IACjE,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC5C,SAAiB,EACjB,KAAsB,EACtB,MAA0B,EAC1B,YAAwB,EACxB,UAAsD,EAAE;IAExD,IAAI,CAAC,KAAK,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACvE,6EAA6E;IAC7E,2EAA2E;IAC3E,qDAAqD;IACrD,MAAM,WAAW,GAAG,IAAI,KAAK,CAAC,EAAyB,EAAE;QACxD,GAAG,CAAC,OAAO,EAAE,QAAQ;YACpB,IAAI,QAAQ,KAAK,eAAe,IAAI,KAAK,CAAC,aAAa;gBAAE,OAAO,KAAK,CAAC,aAAa,CAAC;YACpF,IAAI,QAAQ,KAAK,kBAAkB;gBAClC,OAAO,CAAC,QAAiE,EAAE,EAAE;oBAC5E,KAAK,CAAC,aAAa,GAAG,QAAQ,CAAC;oBAC/B,KAAK,CAAC,OAAO,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;gBAC3C,CAAC,CAAC;YACH,MAAM,OAAO,GAAG,KAAK,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B,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;KACzE,CAAC;AACH,CAAC","sourcesContent":["import { bindToProviderScope, runWithProviderScope } from \"@earendil-works/pi-ai/node/provider-scope\";\nimport type { AgentSessionRuntime } from \"../../core/agent-session-runtime.ts\";\nimport {\n\tcreateRpcConnectionHandler,\n\ttype RpcConnectionHandler,\n\ttype RpcConnectionOptions,\n\ttype RpcConnectionSink,\n} from \"./connection-handler.ts\";\nimport type { SessionEventWriter } from \"./session-event-writer.ts\";\nimport type { RpcSessionEntry } from \"./session-registry.ts\";\n\n/** A session-owned adapter around the classic command and extension-UI wiring. */\nexport interface RpcSessionBinding {\n\thandle(command: object): Promise<void>;\n\tcancelPendingExtensionUiRequests?(): void;\n\tdispose(): Promise<void>;\n}\n\nfunction enqueueRecords(writer: SessionEventWriter, sessionId: string, chunk: string): void {\n\tfor (const line of chunk.split(\"\\n\")) {\n\t\tif (line) writer.enqueue(sessionId, JSON.parse(line) as object);\n\t}\n}\n\n/**\n * Creates the extension UI bridge and subscriptions within the entry's provider\n * scope. The classic handler remains the single source of command semantics.\n */\nexport async function createRpcSessionBinding(\n\tsessionId: string,\n\tentry: RpcSessionEntry,\n\twriter: SessionEventWriter,\n\trequestClose: () => void,\n\toptions: Pick<RpcConnectionOptions, \"capabilities\"> = {},\n): Promise<RpcSessionBinding> {\n\tif (!entry.runtime) throw new Error(\"Session runtime was not created\");\n\t// Attachments share one entry, so resolve the host from the live runtime. In\n\t// particular, switch_session must use the entry's replacement-aware method\n\t// instead of a runtime captured during open_session.\n\tconst runtimeHost = new Proxy({} as AgentSessionRuntime, {\n\t\tget(_target, property) {\n\t\t\tif (property === \"switchSession\" && entry.switchSession) return entry.switchSession;\n\t\t\tif (property === \"setRebindSession\")\n\t\t\t\treturn (callback?: Parameters<AgentSessionRuntime[\"setRebindSession\"]>[0]) => {\n\t\t\t\t\tentry.rebindSession = callback;\n\t\t\t\t\tentry.runtime?.setRebindSession(callback);\n\t\t\t\t};\n\t\t\tconst runtime = entry.runtime;\n\t\t\tif (!runtime) throw new Error(\"Session runtime was not created\");\n\t\t\tconst value = Reflect.get(runtime, property, runtime);\n\t\t\treturn typeof value === \"function\" ? value.bind(runtime) : value;\n\t\t},\n\t});\n\tconst handler: RpcConnectionHandler = await runWithProviderScope(entry.scope, async () => {\n\t\tconst taggedSink: RpcConnectionSink = {\n\t\t\twriteRaw: bindToProviderScope((chunk: string) => enqueueRecords(writer, sessionId, chunk)),\n\t\t\twaitForBackpressure: bindToProviderScope(async () => {}),\n\t\t};\n\t\treturn createRpcConnectionHandler(runtimeHost, taggedSink, {\n\t\t\tsessionId,\n\t\t\tshutdownHandler: bindToProviderScope(requestClose),\n\t\t\tdisposeRuntime: false,\n\t\t\t...options,\n\t\t});\n\t});\n\tawait handler.ready;\n\treturn {\n\t\thandle: (command) => runWithProviderScope(entry.scope, () => handler.handleInputLine(JSON.stringify(command))),\n\t\tcancelPendingExtensionUiRequests: () =>\n\t\t\trunWithProviderScope(entry.scope, () => handler.cancelPendingExtensionUiRequests()),\n\t\tdispose: () => runWithProviderScope(entry.scope, () => handler.dispose()),\n\t};\n}\n"]}
@@ -5,6 +5,12 @@ import type { RpcSessionLaunchProfile, RpcSessionRegistry } from "./session-regi
5
5
  /** Routes control messages and enforces a routing handle for every session command. */
6
6
  export declare class SessionCommandRouter {
7
7
  private readonly bindings;
8
+ /** Session handles opened by each connection, with one count per attachment. */
9
+ private readonly sessionsByConnection;
10
+ /** Opens currently awaiting runtime/binding setup, keyed by connection. */
11
+ private readonly opensByConnection;
12
+ /** Connections whose socket has already been detached. */
13
+ private readonly releasedConnections;
8
14
  private readonly registry;
9
15
  private readonly writer;
10
16
  private readonly defaults;
@@ -13,7 +19,23 @@ export declare class SessionCommandRouter {
13
19
  constructor(registry: RpcSessionRegistry, writer: SessionEventWriter, defaults: Pick<RpcSessionLaunchProfile, "cwd" | "permissionPreset" | "creationModel" | "initialThinkingLevel">, createBinding?: typeof createRpcSessionBinding, connectionOptions?: Parameters<typeof createRpcSessionBinding>[4]);
14
20
  handle(command: RpcCommand): Promise<RpcResponse | undefined>;
15
21
  dispose(): Promise<void>;
22
+ private openWithBarrier;
16
23
  private open;
24
+ /**
25
+ * Releases every session a dropped connection still owned. Each handle goes through
26
+ * the same refcounted close as an explicit close_session, so a session another
27
+ * connection is still attached to keeps running and only the last owner tears it down.
28
+ */
29
+ releaseConnection(connectionId: string): Promise<void>;
30
+ /**
31
+ * One owned handle's refcounted close: the same sequence as an explicit
32
+ * close_session, tolerant of races with other lifecycle paths (an entry
33
+ * already closed or claimed elsewhere is simply skipped). Disposal and
34
+ * binding removal happen only when this was the LAST attachment (the entry
35
+ * transitioned to "closing"): surviving attachments keep the shared binding
36
+ * and their event stream.
37
+ */
38
+ private releaseOwnedSession;
17
39
  private close;
18
40
  private code;
19
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"session-command-router.d.ts","sourceRoot":"","sources":["../../../src/modes/rpc/session-command-router.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAO9D,OAAO,EAAE,uBAAuB,EAA0B,MAAM,sBAAsB,CAAC;AACvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAGX,uBAAuB,EACvB,kBAAkB,EAClB,MAAM,uBAAuB,CAAC;AAS/B,uFAAuF;AACvF,qBAAa,oBAAoB;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwC;IACjE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAGvB;IACF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAiC;IAC/D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAgD;gBAGj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CAAiC;IAC/D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAgD;gBAGjF,QAAQ,EAAE,kBAAkB,EAC5B,MAAM,EAAE,kBAAkB,EAC1B,QAAQ,EAAE,IAAI,CAAC,uBAAuB,EAAE,KAAK,GAAG,kBAAkB,GAAG,eAAe,GAAG,sBAAsB,CAAC,EAC9G,aAAa,GAAE,OAAO,uBAAiD,EACvE,iBAAiB,GAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAM;IAShE,MAAM,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;IAuC7D,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAuB9B,OAAO,CAAC,eAAe;YAiBT,IAAI;IAkElB;;;;OAIG;IACG,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2C5D;;;;;;;OAOG;YACW,mBAAmB;YAkBnB,KAAK;IAuCnB,OAAO,CAAC,IAAI;CAWZ"}
@@ -11,6 +11,12 @@ function error(id, command, code) {
11
11
  export class SessionCommandRouter {
12
12
  constructor(registry, writer, defaults, createBinding = createRpcSessionBinding, connectionOptions = {}) {
13
13
  this.bindings = new Map();
14
+ /** Session handles opened by each connection, with one count per attachment. */
15
+ this.sessionsByConnection = new Map();
16
+ /** Opens currently awaiting runtime/binding setup, keyed by connection. */
17
+ this.opensByConnection = new Map();
18
+ /** Connections whose socket has already been detached. */
19
+ this.releasedConnections = new Set();
14
20
  this.registry = registry;
15
21
  this.writer = writer;
16
22
  this.defaults = defaults;
@@ -42,7 +48,7 @@ export class SessionCommandRouter {
42
48
  data: { sessions: this.registry.list() },
43
49
  };
44
50
  if (command.type === "open_session")
45
- return this.open(command);
51
+ return this.openWithBarrier(command);
46
52
  if (command.type === "close_session")
47
53
  return this.close(command);
48
54
  if (controls.has(command.type))
@@ -71,19 +77,39 @@ export class SessionCommandRouter {
71
77
  return;
72
78
  }
73
79
  try {
80
+ if (entry.state === "open") {
81
+ while (entry.state === "open")
82
+ entry = this.registry.beginClose(sessionId);
83
+ }
74
84
  await binding.dispose();
75
85
  }
76
86
  finally {
77
87
  this.bindings.delete(sessionId);
78
- // Attached sessions outlive this connection: only the last
79
- // attachment's close transitions the entry to "closing".
80
88
  if (entry.state === "closing")
81
89
  await this.registry.closeMarked(sessionId);
82
90
  }
83
91
  }));
84
92
  this.bindings.clear();
85
93
  }
86
- async open(command) {
94
+ openWithBarrier(command) {
95
+ const owner = this.writer.currentConnection();
96
+ if (owner === undefined)
97
+ return this.open(command);
98
+ let resolveBarrier;
99
+ const barrier = new Promise((resolve) => {
100
+ resolveBarrier = resolve;
101
+ });
102
+ const opens = this.opensByConnection.get(owner) ?? new Set();
103
+ opens.add(barrier);
104
+ this.opensByConnection.set(owner, opens);
105
+ return this.open(command, owner).finally(() => {
106
+ resolveBarrier();
107
+ opens.delete(barrier);
108
+ if (opens.size === 0)
109
+ this.opensByConnection.delete(owner);
110
+ });
111
+ }
112
+ async open(command, owner) {
87
113
  let opened;
88
114
  try {
89
115
  opened = await this.registry.openSession({
@@ -97,7 +123,20 @@ export class SessionCommandRouter {
97
123
  });
98
124
  const openedSession = opened;
99
125
  const entry = this.registry.getForCommand(openedSession.sessionId, "open_session");
100
- this.bindings.set(openedSession.sessionId, await this.createBinding(openedSession.sessionId, entry, this.writer, () => void this.close({ type: "close_session", sessionId: openedSession.sessionId }), this.connectionOptions));
126
+ // A client that dies without close_session (terminal closed, SIGKILL, dropped
127
+ // SSH) still holds this handle's attachment and its path reservation. Remember
128
+ // which connection owns it so releaseConnection() can close exactly that.
129
+ if (owner !== undefined) {
130
+ const owned = this.sessionsByConnection.get(owner) ?? new Map();
131
+ owned.set(openedSession.sessionId, (owned.get(openedSession.sessionId) ?? 0) + 1);
132
+ this.sessionsByConnection.set(owner, owned);
133
+ }
134
+ if (!this.bindings.has(openedSession.sessionId)) {
135
+ this.bindings.set(openedSession.sessionId, await this.createBinding(openedSession.sessionId, entry, this.writer, () => void this.close({ type: "close_session", sessionId: openedSession.sessionId }), this.connectionOptions));
136
+ }
137
+ if (owner !== undefined && this.releasedConnections.has(owner)) {
138
+ await this.releaseOwnedSession(openedSession.sessionId);
139
+ }
101
140
  const state = entry.runtime.session;
102
141
  this.writer.enqueue(opened.sessionId, {
103
142
  id: command.id,
@@ -124,28 +163,121 @@ export class SessionCommandRouter {
124
163
  return error(command.id, "open_session", this.code(cause));
125
164
  }
126
165
  }
166
+ /**
167
+ * Releases every session a dropped connection still owned. Each handle goes through
168
+ * the same refcounted close as an explicit close_session, so a session another
169
+ * connection is still attached to keeps running and only the last owner tears it down.
170
+ */
171
+ async releaseConnection(connectionId) {
172
+ this.releasedConnections.add(connectionId);
173
+ const opens = this.opensByConnection.get(connectionId);
174
+ if (opens)
175
+ await Promise.all([...opens]);
176
+ const owned = this.sessionsByConnection.get(connectionId);
177
+ this.sessionsByConnection.delete(connectionId);
178
+ if (owned === undefined) {
179
+ this.releasedConnections.delete(connectionId);
180
+ return;
181
+ }
182
+ for (const [sessionId, count] of owned) {
183
+ this.bindings.get(sessionId)?.cancelPendingExtensionUiRequests?.();
184
+ for (let attachment = 0; attachment < count; attachment++) {
185
+ // Headless completion contract: a turn survives its client's death and
186
+ // runs to settlement (the host lifecycle keeps the process alive on
187
+ // active turns even with zero connections). Releasing mid-turn aborts
188
+ // the run and seals the session before agent_settled reaches the
189
+ // lifecycle observer, leaking the busy counter so the host never
190
+ // idle-exits. Defer - never skip - the release until the turn settles,
191
+ // so the dropped owner's reservation still frees afterwards.
192
+ const live = this.registry.peek(sessionId);
193
+ const session = live?.state === "open" ? live.runtime?.session : undefined;
194
+ if (session?.isStreaming) {
195
+ let released = false;
196
+ const unsubscribe = session.subscribe((event) => {
197
+ if (event.type !== "agent_settled" && event.type !== "agent_idle")
198
+ return;
199
+ if (released)
200
+ return;
201
+ released = true;
202
+ unsubscribe();
203
+ void this.releaseOwnedSession(sessionId).catch((cause) => {
204
+ process.stderr.write(`senpi rpc deferred release for session ${sessionId} failed: ${String(cause)}\n`);
205
+ });
206
+ });
207
+ continue;
208
+ }
209
+ await this.releaseOwnedSession(sessionId);
210
+ }
211
+ }
212
+ this.releasedConnections.delete(connectionId);
213
+ }
214
+ /**
215
+ * One owned handle's refcounted close: the same sequence as an explicit
216
+ * close_session, tolerant of races with other lifecycle paths (an entry
217
+ * already closed or claimed elsewhere is simply skipped). Disposal and
218
+ * binding removal happen only when this was the LAST attachment (the entry
219
+ * transitioned to "closing"): surviving attachments keep the shared binding
220
+ * and their event stream.
221
+ */
222
+ async releaseOwnedSession(sessionId) {
223
+ let entry;
224
+ try {
225
+ entry = this.registry.beginClose(sessionId);
226
+ }
227
+ catch {
228
+ // Already closed or claimed by another lifecycle path; nothing to release.
229
+ return;
230
+ }
231
+ try {
232
+ if (entry.state === "closing")
233
+ await this.bindings.get(sessionId)?.dispose();
234
+ }
235
+ finally {
236
+ if (entry.state === "closing") {
237
+ this.bindings.delete(sessionId);
238
+ await this.registry.closeMarked(sessionId);
239
+ }
240
+ }
241
+ }
127
242
  async close(command) {
128
243
  try {
129
244
  // This must be the first operation: binding.dispose() awaits teardown and
130
245
  // otherwise leaves a window where commands can enter the old handler.
131
246
  const entry = this.registry.beginClose(command.sessionId);
132
- try {
133
- await this.bindings.get(command.sessionId)?.dispose();
134
- }
135
- finally {
136
- this.bindings.delete(command.sessionId);
137
- // Other attachments may still own the live session; only the last
138
- // close finalizes the runtime teardown.
139
- if (entry.state === "closing")
140
- await this.registry.closeMarked(command.sessionId);
247
+ const owner = this.writer.currentConnection();
248
+ if (owner !== undefined) {
249
+ const owned = this.sessionsByConnection.get(owner);
250
+ const count = owned?.get(command.sessionId);
251
+ if (owned && count !== undefined) {
252
+ if (count === 1)
253
+ owned.delete(command.sessionId);
254
+ else
255
+ owned.set(command.sessionId, count - 1);
256
+ if (owned.size === 0)
257
+ this.sessionsByConnection.delete(owner);
258
+ }
141
259
  }
142
- this.writer.closeSession(command.sessionId, {
260
+ const response = {
143
261
  id: command.id,
144
262
  type: "response",
145
263
  command: "close_session",
146
264
  success: true,
147
265
  data: {},
148
- });
266
+ };
267
+ try {
268
+ if (entry.state === "closing")
269
+ await this.bindings.get(command.sessionId)?.dispose();
270
+ }
271
+ finally {
272
+ if (entry.state === "closing") {
273
+ this.bindings.delete(command.sessionId);
274
+ await this.registry.closeMarked(command.sessionId);
275
+ this.writer.closeSession(command.sessionId, response);
276
+ }
277
+ else {
278
+ this.writer.enqueue(command.sessionId, response);
279
+ }
280
+ }
149
281
  return undefined;
150
282
  }
151
283
  catch (cause) {