@songsid/agend 2.4.0-beta.2 → 2.4.0-beta.21

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 (1434) hide show
  1. package/dist/accounts-profiles.d.ts +1 -1
  2. package/dist/accounts-view.d.ts +32 -0
  3. package/dist/accounts-view.js +2 -14
  4. package/dist/accounts-view.js.map +1 -1
  5. package/dist/agent-cli-instructions.md +17 -7
  6. package/dist/agent-cli.js +163 -51
  7. package/dist/agent-cli.js.map +1 -1
  8. package/dist/agent-endpoint.d.ts +4 -1
  9. package/dist/agent-endpoint.js +47 -11
  10. package/dist/agent-endpoint.js.map +1 -1
  11. package/dist/agent-export.d.ts +3 -1
  12. package/dist/agent-export.js +18 -1
  13. package/dist/agent-export.js.map +1 -1
  14. package/dist/agent-token-header.d.ts +1 -1
  15. package/dist/agent-token-header.js +1 -1
  16. package/dist/agent-whats-new.js +15 -0
  17. package/dist/agent-whats-new.js.map +1 -1
  18. package/dist/app-message-origin.d.ts +2 -0
  19. package/dist/app-message-origin.js +3 -0
  20. package/dist/app-message-origin.js.map +1 -0
  21. package/dist/apply-job.d.ts +2 -2
  22. package/dist/auth-api.d.ts +10 -0
  23. package/dist/auth-api.js +81 -4
  24. package/dist/auth-api.js.map +1 -1
  25. package/dist/authority/authority-state.d.ts +7 -0
  26. package/dist/authority/authority-state.js +17 -2
  27. package/dist/authority/authority-state.js.map +1 -1
  28. package/dist/authority/web-authority.d.ts +11 -1
  29. package/dist/authority/web-authority.js +11 -1
  30. package/dist/authority/web-authority.js.map +1 -1
  31. package/dist/backend/agy-model-switch.d.ts +22 -0
  32. package/dist/backend/agy-model-switch.js +62 -0
  33. package/dist/backend/agy-model-switch.js.map +1 -0
  34. package/dist/backend/antigravity.d.ts +9 -2
  35. package/dist/backend/antigravity.js +84 -9
  36. package/dist/backend/antigravity.js.map +1 -1
  37. package/dist/backend/claude-carry.d.ts +11 -0
  38. package/dist/backend/claude-carry.js +88 -6
  39. package/dist/backend/claude-carry.js.map +1 -1
  40. package/dist/backend/claude-code.d.ts +24 -7
  41. package/dist/backend/claude-code.js +206 -29
  42. package/dist/backend/claude-code.js.map +1 -1
  43. package/dist/backend/claude-transcript-errors.d.ts +4 -0
  44. package/dist/backend/claude-transcript-errors.js +5 -1
  45. package/dist/backend/claude-transcript-errors.js.map +1 -1
  46. package/dist/backend/cli-env-probe.js +1 -1
  47. package/dist/backend/cli-env-probe.js.map +1 -1
  48. package/dist/backend/cli-runtime-switch.d.ts +90 -0
  49. package/dist/backend/cli-runtime-switch.js +273 -0
  50. package/dist/backend/cli-runtime-switch.js.map +1 -0
  51. package/dist/backend/codex-footer-hints.d.ts +1 -0
  52. package/dist/backend/codex-footer-hints.js +15 -0
  53. package/dist/backend/codex-footer-hints.js.map +1 -1
  54. package/dist/backend/codex-model-switch.d.ts +41 -0
  55. package/dist/backend/codex-model-switch.js +170 -0
  56. package/dist/backend/codex-model-switch.js.map +1 -0
  57. package/dist/backend/codex-precaution.d.ts +7 -0
  58. package/dist/backend/codex-precaution.js +103 -0
  59. package/dist/backend/codex-precaution.js.map +1 -0
  60. package/dist/backend/codex.d.ts +7 -4
  61. package/dist/backend/codex.js +56 -10
  62. package/dist/backend/codex.js.map +1 -1
  63. package/dist/backend/credential-profile.js +1 -1
  64. package/dist/backend/credential-profile.js.map +1 -1
  65. package/dist/backend/grok-model-switch.d.ts +16 -0
  66. package/dist/backend/grok-model-switch.js +45 -0
  67. package/dist/backend/grok-model-switch.js.map +1 -0
  68. package/dist/backend/grok.js +33 -7
  69. package/dist/backend/grok.js.map +1 -1
  70. package/dist/backend/kiro.js +10 -5
  71. package/dist/backend/kiro.js.map +1 -1
  72. package/dist/backend/muse.d.ts +2 -0
  73. package/dist/backend/muse.js +7 -3
  74. package/dist/backend/muse.js.map +1 -1
  75. package/dist/backend/native-pane.js +1 -1
  76. package/dist/backend/native-pane.js.map +1 -1
  77. package/dist/backend/types.d.ts +29 -2
  78. package/dist/backend/types.js.map +1 -1
  79. package/dist/backend-availability.d.ts +23 -16
  80. package/dist/backend-availability.js +73 -93
  81. package/dist/backend-availability.js.map +1 -1
  82. package/dist/backend-command.d.ts +4 -2
  83. package/dist/backend-command.js +3 -0
  84. package/dist/backend-command.js.map +1 -1
  85. package/dist/backend-signin-guide.js +1 -1
  86. package/dist/backend-signin-guide.js.map +1 -1
  87. package/dist/backend-version-static.d.ts +15 -0
  88. package/dist/backend-version-static.js +95 -0
  89. package/dist/backend-version-static.js.map +1 -0
  90. package/dist/browser-backend-signins.d.ts +1 -0
  91. package/dist/browser-backend-signins.js +3 -1
  92. package/dist/browser-backend-signins.js.map +1 -1
  93. package/dist/build-provenance.json +1 -1
  94. package/dist/channel/adapters/discord.d.ts +10 -0
  95. package/dist/channel/adapters/discord.js +35 -0
  96. package/dist/channel/adapters/discord.js.map +1 -1
  97. package/dist/channel/adapters/telegram.d.ts +2 -0
  98. package/dist/channel/adapters/telegram.js +6 -1
  99. package/dist/channel/adapters/telegram.js.map +1 -1
  100. package/dist/channel/mcp-server.js +36 -4
  101. package/dist/channel/mcp-server.js.map +1 -1
  102. package/dist/channel/mcp-tools.d.ts +27 -1
  103. package/dist/channel/mcp-tools.js +91 -8
  104. package/dist/channel/mcp-tools.js.map +1 -1
  105. package/dist/channel/tool-router.d.ts +4 -0
  106. package/dist/channel/tool-router.js +50 -19
  107. package/dist/channel/tool-router.js.map +1 -1
  108. package/dist/channel/types.d.ts +10 -0
  109. package/dist/chat-task-refs.d.ts +61 -0
  110. package/dist/chat-task-refs.js +112 -0
  111. package/dist/chat-task-refs.js.map +1 -0
  112. package/dist/classic-channel-manager.d.ts +6 -2
  113. package/dist/classic-channel-manager.js +29 -4
  114. package/dist/classic-channel-manager.js.map +1 -1
  115. package/dist/classic-cli-guard.d.ts +66 -0
  116. package/dist/classic-cli-guard.js +209 -0
  117. package/dist/classic-cli-guard.js.map +1 -0
  118. package/dist/claude-credential-change.d.ts +22 -0
  119. package/dist/claude-credential-change.js +47 -0
  120. package/dist/claude-credential-change.js.map +1 -0
  121. package/dist/claude-credential-launch.d.ts +69 -0
  122. package/dist/claude-credential-launch.js +328 -0
  123. package/dist/claude-credential-launch.js.map +1 -0
  124. package/dist/claude-credential-runner.d.ts +1 -0
  125. package/dist/claude-credential-runner.js +58 -0
  126. package/dist/claude-credential-runner.js.map +1 -0
  127. package/dist/claude-credential-vault.d.ts +57 -0
  128. package/dist/claude-credential-vault.js +277 -0
  129. package/dist/claude-credential-vault.js.map +1 -0
  130. package/dist/claude-install-kind.d.ts +19 -0
  131. package/dist/claude-install-kind.js +54 -0
  132. package/dist/claude-install-kind.js.map +1 -0
  133. package/dist/claude-request-observation.d.ts +7 -0
  134. package/dist/claude-request-observation.js +26 -0
  135. package/dist/claude-request-observation.js.map +1 -0
  136. package/dist/claude-setup-token-transport.d.ts +9 -0
  137. package/dist/claude-setup-token-transport.js +104 -0
  138. package/dist/claude-setup-token-transport.js.map +1 -0
  139. package/dist/claude-setup-token.d.ts +51 -0
  140. package/dist/claude-setup-token.js +83 -0
  141. package/dist/claude-setup-token.js.map +1 -0
  142. package/dist/cli-audited.js +24 -17
  143. package/dist/cli-audited.js.map +1 -1
  144. package/dist/cli-capability.d.ts +3 -0
  145. package/dist/cli-capability.js.map +1 -1
  146. package/dist/cli-registry-check.js +1 -1
  147. package/dist/cli-registry-check.js.map +1 -1
  148. package/dist/cli-registry.d.ts +1 -0
  149. package/dist/cli-spec-antigravity.d.ts +1 -0
  150. package/dist/cli-spec-antigravity.js +3 -1
  151. package/dist/cli-spec-antigravity.js.map +1 -1
  152. package/dist/cli.js +8 -0
  153. package/dist/cli.js.map +1 -1
  154. package/dist/command-report.d.ts +11 -0
  155. package/dist/command-report.js +2 -0
  156. package/dist/command-report.js.map +1 -0
  157. package/dist/composite-tools.d.ts +11 -0
  158. package/dist/composite-tools.js +29 -0
  159. package/dist/composite-tools.js.map +1 -0
  160. package/dist/config-validator.js +52 -2
  161. package/dist/config-validator.js.map +1 -1
  162. package/dist/config.js +15 -2
  163. package/dist/config.js.map +1 -1
  164. package/dist/connect/control.d.ts +20 -0
  165. package/dist/connect/control.js +236 -0
  166. package/dist/connect/control.js.map +1 -0
  167. package/dist/connect/install.d.ts +13 -0
  168. package/dist/connect/install.js +12 -0
  169. package/dist/connect/install.js.map +1 -0
  170. package/dist/connect/mcp.d.ts +9 -0
  171. package/dist/connect/mcp.js +10 -0
  172. package/dist/connect/mcp.js.map +1 -0
  173. package/dist/connect/protocol.d.ts +38 -0
  174. package/dist/connect/protocol.js +36 -0
  175. package/dist/connect/protocol.js.map +1 -0
  176. package/dist/connect/service.d.ts +19 -0
  177. package/dist/connect/service.js +79 -0
  178. package/dist/connect/service.js.map +1 -0
  179. package/dist/connect/stdio-entry.d.ts +1 -0
  180. package/dist/connect/stdio-entry.js +6 -0
  181. package/dist/connect/stdio-entry.js.map +1 -0
  182. package/dist/connect/stdio.d.ts +5 -0
  183. package/dist/connect/stdio.js +33 -0
  184. package/dist/connect/stdio.js.map +1 -0
  185. package/dist/contact-auth-api.d.ts +17 -0
  186. package/dist/contact-auth-api.js +88 -0
  187. package/dist/contact-auth-api.js.map +1 -0
  188. package/dist/contact-auth-files.d.ts +6 -0
  189. package/dist/contact-auth-files.js +29 -0
  190. package/dist/contact-auth-files.js.map +1 -0
  191. package/dist/contact-auth-policy.d.ts +81 -0
  192. package/dist/contact-auth-policy.js +26 -0
  193. package/dist/contact-auth-policy.js.map +1 -0
  194. package/dist/contact-auth-service.d.ts +32 -0
  195. package/dist/contact-auth-service.js +101 -0
  196. package/dist/contact-auth-service.js.map +1 -0
  197. package/dist/contact-auth-store.d.ts +86 -0
  198. package/dist/contact-auth-store.js +372 -0
  199. package/dist/contact-auth-store.js.map +1 -0
  200. package/dist/contact-auth-types.d.ts +198 -0
  201. package/dist/contact-auth-types.js +7 -0
  202. package/dist/contact-auth-types.js.map +1 -0
  203. package/dist/contact-change-proposals.d.ts +47 -0
  204. package/dist/contact-change-proposals.js +131 -0
  205. package/dist/contact-change-proposals.js.map +1 -0
  206. package/dist/daemon.d.ts +98 -3
  207. package/dist/daemon.js +673 -59
  208. package/dist/daemon.js.map +1 -1
  209. package/dist/darwin-memory.js +2 -1
  210. package/dist/darwin-memory.js.map +1 -1
  211. package/dist/dashboard-permissions.d.ts +15 -8
  212. package/dist/dashboard-permissions.js +25 -10
  213. package/dist/dashboard-permissions.js.map +1 -1
  214. package/dist/delivery-consumed-watch.js +3 -0
  215. package/dist/delivery-consumed-watch.js.map +1 -1
  216. package/dist/delivery-outbox.d.ts +6 -6
  217. package/dist/delivery-outbox.js +19 -25
  218. package/dist/delivery-outbox.js.map +1 -1
  219. package/dist/delivery-outbox.test.js +132 -96
  220. package/dist/delivery-outbox.test.js.map +1 -1
  221. package/dist/dispatcher-liveness.d.ts +51 -1
  222. package/dist/dispatcher-liveness.js +94 -4
  223. package/dist/dispatcher-liveness.js.map +1 -1
  224. package/dist/event-log.d.ts +13 -1
  225. package/dist/event-log.js +41 -1
  226. package/dist/event-log.js.map +1 -1
  227. package/dist/fleet-context.d.ts +1 -0
  228. package/dist/fleet-level-config.d.ts +1 -1
  229. package/dist/fleet-level-config.js +1 -0
  230. package/dist/fleet-level-config.js.map +1 -1
  231. package/dist/fleet-manager.d.ts +530 -14
  232. package/dist/fleet-manager.js +3323 -266
  233. package/dist/fleet-manager.js.map +1 -1
  234. package/dist/fleet-windows-runtime.d.ts +2 -2
  235. package/dist/fleet-windows-runtime.js +13 -4
  236. package/dist/fleet-windows-runtime.js.map +1 -1
  237. package/dist/fleet-yaml-stringify.d.ts +3 -0
  238. package/dist/fleet-yaml-stringify.js +132 -0
  239. package/dist/fleet-yaml-stringify.js.map +1 -0
  240. package/dist/general-knowledge/skills/concepts/SKILL.md +72 -4
  241. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +23 -1
  242. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +52 -0
  243. package/dist/general-knowledge/skills/fleet-config/SKILL.md +21 -1
  244. package/dist/general-knowledge/skills/fleet-health/SKILL.md +18 -0
  245. package/dist/general-knowledge/skills/hub/SKILL.md +369 -27
  246. package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +5 -1
  247. package/dist/general-knowledge/skills/model-discovery/SKILL.md +7 -2
  248. package/dist/general-knowledge/skills/persona-emoji/SKILL.md +3 -0
  249. package/dist/general-knowledge/skills/task-board/SKILL.md +67 -0
  250. package/dist/general-knowledge/skills/web-appearance/SKILL.md +29 -3
  251. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +224 -43
  252. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +6 -0
  253. package/dist/general-knowledge/steering/core-rules.md +15 -78
  254. package/dist/general-role-block.d.ts +19 -0
  255. package/dist/general-role-block.js +56 -0
  256. package/dist/general-role-block.js.map +1 -0
  257. package/dist/general-role.d.ts +1 -1
  258. package/dist/general-role.js +1 -0
  259. package/dist/general-role.js.map +1 -1
  260. package/dist/host-memory.d.ts +3 -0
  261. package/dist/host-memory.js.map +1 -1
  262. package/dist/host-monitoring/darwin/collector.d.ts +18 -0
  263. package/dist/host-monitoring/darwin/collector.js +65 -0
  264. package/dist/host-monitoring/darwin/collector.js.map +1 -0
  265. package/dist/host-monitoring/darwin/defaults.d.ts +2 -0
  266. package/dist/host-monitoring/darwin/defaults.js +9 -0
  267. package/dist/host-monitoring/darwin/defaults.js.map +1 -0
  268. package/dist/host-monitoring/darwin/interpretation.d.ts +20 -0
  269. package/dist/host-monitoring/darwin/interpretation.js +73 -0
  270. package/dist/host-monitoring/darwin/interpretation.js.map +1 -0
  271. package/dist/host-monitoring/linux/collector.d.ts +17 -0
  272. package/dist/host-monitoring/linux/collector.js +55 -0
  273. package/dist/host-monitoring/linux/collector.js.map +1 -0
  274. package/dist/host-monitoring/linux/defaults.d.ts +2 -0
  275. package/dist/host-monitoring/linux/defaults.js +9 -0
  276. package/dist/host-monitoring/linux/defaults.js.map +1 -0
  277. package/dist/host-monitoring/linux/interpretation.d.ts +22 -0
  278. package/dist/host-monitoring/linux/interpretation.js +76 -0
  279. package/dist/host-monitoring/linux/interpretation.js.map +1 -0
  280. package/dist/host-monitoring/transport.d.ts +42 -0
  281. package/dist/host-monitoring/transport.js +101 -0
  282. package/dist/host-monitoring/transport.js.map +1 -0
  283. package/dist/host-monitoring/wsl/collector.d.ts +19 -0
  284. package/dist/host-monitoring/wsl/collector.js +72 -0
  285. package/dist/host-monitoring/wsl/collector.js.map +1 -0
  286. package/dist/host-monitoring/wsl/defaults.d.ts +2 -0
  287. package/dist/host-monitoring/wsl/defaults.js +9 -0
  288. package/dist/host-monitoring/wsl/defaults.js.map +1 -0
  289. package/dist/host-monitoring/wsl/interpretation.d.ts +22 -0
  290. package/dist/host-monitoring/wsl/interpretation.js +77 -0
  291. package/dist/host-monitoring/wsl/interpretation.js.map +1 -0
  292. package/dist/host-monitoring-alert-policy.d.ts +73 -0
  293. package/dist/host-monitoring-alert-policy.js +152 -0
  294. package/dist/host-monitoring-alert-policy.js.map +1 -0
  295. package/dist/host-monitoring-alert-resources.d.ts +11 -0
  296. package/dist/host-monitoring-alert-resources.js +16 -0
  297. package/dist/host-monitoring-alert-resources.js.map +1 -0
  298. package/dist/host-monitoring-alert-settings.d.ts +16 -0
  299. package/dist/host-monitoring-alert-settings.js +68 -0
  300. package/dist/host-monitoring-alert-settings.js.map +1 -0
  301. package/dist/host-monitoring-alert-store.d.ts +49 -0
  302. package/dist/host-monitoring-alert-store.js +228 -0
  303. package/dist/host-monitoring-alert-store.js.map +1 -0
  304. package/dist/host-monitoring-alert-text.d.ts +7 -0
  305. package/dist/host-monitoring-alert-text.js +10 -0
  306. package/dist/host-monitoring-alert-text.js.map +1 -0
  307. package/dist/host-monitoring-alerts.d.ts +79 -0
  308. package/dist/host-monitoring-alerts.js +276 -0
  309. package/dist/host-monitoring-alerts.js.map +1 -0
  310. package/dist/host-monitoring-config.d.ts +15 -0
  311. package/dist/host-monitoring-config.js +36 -0
  312. package/dist/host-monitoring-config.js.map +1 -0
  313. package/dist/host-monitoring-defaults.d.ts +19 -0
  314. package/dist/host-monitoring-defaults.js +10 -0
  315. package/dist/host-monitoring-defaults.js.map +1 -0
  316. package/dist/host-monitoring-footprint-policy.d.ts +45 -0
  317. package/dist/host-monitoring-footprint-policy.js +150 -0
  318. package/dist/host-monitoring-footprint-policy.js.map +1 -0
  319. package/dist/host-monitoring-footprint.d.ts +42 -0
  320. package/dist/host-monitoring-footprint.js +169 -0
  321. package/dist/host-monitoring-footprint.js.map +1 -0
  322. package/dist/host-monitoring-history-files.d.ts +2 -0
  323. package/dist/host-monitoring-history-files.js +16 -0
  324. package/dist/host-monitoring-history-files.js.map +1 -0
  325. package/dist/host-monitoring-history-policy.d.ts +57 -0
  326. package/dist/host-monitoring-history-policy.js +107 -0
  327. package/dist/host-monitoring-history-policy.js.map +1 -0
  328. package/dist/host-monitoring-history-store.d.ts +52 -0
  329. package/dist/host-monitoring-history-store.js +178 -0
  330. package/dist/host-monitoring-history-store.js.map +1 -0
  331. package/dist/host-monitoring-history-worker.d.ts +1 -0
  332. package/dist/host-monitoring-history-worker.js +66 -0
  333. package/dist/host-monitoring-history-worker.js.map +1 -0
  334. package/dist/host-monitoring-history.d.ts +80 -0
  335. package/dist/host-monitoring-history.js +301 -0
  336. package/dist/host-monitoring-history.js.map +1 -0
  337. package/dist/host-monitoring-platform.d.ts +21 -0
  338. package/dist/host-monitoring-platform.js +18 -0
  339. package/dist/host-monitoring-platform.js.map +1 -0
  340. package/dist/host-monitoring-process-identity.d.ts +8 -0
  341. package/dist/host-monitoring-process-identity.js +81 -0
  342. package/dist/host-monitoring-process-identity.js.map +1 -0
  343. package/dist/host-monitoring-runtime.d.ts +42 -0
  344. package/dist/host-monitoring-runtime.js +95 -0
  345. package/dist/host-monitoring-runtime.js.map +1 -0
  346. package/dist/host-monitoring-settings-store.d.ts +5 -0
  347. package/dist/host-monitoring-settings-store.js +49 -0
  348. package/dist/host-monitoring-settings-store.js.map +1 -0
  349. package/dist/host-monitoring.d.ts +121 -0
  350. package/dist/host-monitoring.js +157 -0
  351. package/dist/host-monitoring.js.map +1 -0
  352. package/dist/hub/admin-dashboard.d.ts +85 -0
  353. package/dist/hub/admin-dashboard.js +177 -0
  354. package/dist/hub/admin-dashboard.js.map +1 -0
  355. package/dist/hub/agent-catalog-model.d.ts +297 -0
  356. package/dist/hub/agent-catalog-model.js +57 -0
  357. package/dist/hub/agent-catalog-model.js.map +1 -0
  358. package/dist/hub/agent-catalog.d.ts +140 -0
  359. package/dist/hub/agent-catalog.js +129 -0
  360. package/dist/hub/agent-catalog.js.map +1 -0
  361. package/dist/hub/agent-intro-model.d.ts +38 -0
  362. package/dist/hub/agent-intro-model.js +14 -0
  363. package/dist/hub/agent-intro-model.js.map +1 -0
  364. package/dist/hub/agent-intro-tool.d.ts +35 -0
  365. package/dist/hub/agent-intro-tool.js +83 -0
  366. package/dist/hub/agent-intro-tool.js.map +1 -0
  367. package/dist/hub/agent-intro.d.ts +31 -0
  368. package/dist/hub/agent-intro.js +51 -0
  369. package/dist/hub/agent-intro.js.map +1 -0
  370. package/dist/hub/agent-pictures-model.d.ts +147 -0
  371. package/dist/hub/agent-pictures-model.js +64 -0
  372. package/dist/hub/agent-pictures-model.js.map +1 -0
  373. package/dist/hub/agent-pictures.d.ts +52 -0
  374. package/dist/hub/agent-pictures.js +202 -0
  375. package/dist/hub/agent-pictures.js.map +1 -0
  376. package/dist/hub/attachments/store.d.ts +2 -0
  377. package/dist/hub/attachments/store.js +6 -0
  378. package/dist/hub/attachments/store.js.map +1 -1
  379. package/dist/hub/audit/index.d.ts +5 -1
  380. package/dist/hub/audit/index.js +43 -3
  381. package/dist/hub/audit/index.js.map +1 -1
  382. package/dist/hub/buttons.js +3 -1
  383. package/dist/hub/buttons.js.map +1 -1
  384. package/dist/hub/catalog.d.ts +19 -6
  385. package/dist/hub/catalog.js +89 -17
  386. package/dist/hub/catalog.js.map +1 -1
  387. package/dist/hub/client.d.ts +18 -0
  388. package/dist/hub/client.js +149 -12
  389. package/dist/hub/client.js.map +1 -1
  390. package/dist/hub/compose/member.d.ts +56 -7
  391. package/dist/hub/compose/member.js +371 -31
  392. package/dist/hub/compose/member.js.map +1 -1
  393. package/dist/hub/compose/server.d.ts +24 -0
  394. package/dist/hub/compose/server.js +130 -16
  395. package/dist/hub/compose/server.js.map +1 -1
  396. package/dist/hub/direct-posts-model.d.ts +1 -0
  397. package/dist/hub/direct-posts-model.js +2 -0
  398. package/dist/hub/direct-posts-model.js.map +1 -0
  399. package/dist/hub/direct-posts.d.ts +36 -0
  400. package/dist/hub/direct-posts.js +145 -0
  401. package/dist/hub/direct-posts.js.map +1 -0
  402. package/dist/hub/directory/directory.js +5 -2
  403. package/dist/hub/directory/directory.js.map +1 -1
  404. package/dist/hub/directory/types.d.ts +5 -1
  405. package/dist/hub/directory/types.js.map +1 -1
  406. package/dist/hub/display-name.d.ts +10 -0
  407. package/dist/hub/display-name.js +35 -0
  408. package/dist/hub/display-name.js.map +1 -0
  409. package/dist/hub/execution/service.d.ts +2 -1
  410. package/dist/hub/execution/service.js +2 -1
  411. package/dist/hub/execution/service.js.map +1 -1
  412. package/dist/hub/fleet-info.d.ts +12 -0
  413. package/dist/hub/fleet-info.js +14 -0
  414. package/dist/hub/fleet-info.js.map +1 -0
  415. package/dist/hub/fleet-update-model.d.ts +100 -0
  416. package/dist/hub/fleet-update-model.js +15 -0
  417. package/dist/hub/fleet-update-model.js.map +1 -0
  418. package/dist/hub/fleet-updates.d.ts +46 -0
  419. package/dist/hub/fleet-updates.js +282 -0
  420. package/dist/hub/fleet-updates.js.map +1 -0
  421. package/dist/hub/fleet-versions.d.ts +28 -0
  422. package/dist/hub/fleet-versions.js +80 -0
  423. package/dist/hub/fleet-versions.js.map +1 -0
  424. package/dist/hub/group-policy/admin-api.d.ts +1 -0
  425. package/dist/hub/group-policy/admin-api.js +10 -1
  426. package/dist/hub/group-policy/admin-api.js.map +1 -1
  427. package/dist/hub/group-policy/admin-control.d.ts +1 -0
  428. package/dist/hub/group-policy/admin-control.js +13 -4
  429. package/dist/hub/group-policy/admin-control.js.map +1 -1
  430. package/dist/hub/group-policy/admin-dto.d.ts +39 -1
  431. package/dist/hub/group-policy/admin-dto.js.map +1 -1
  432. package/dist/hub/group-policy/admin-facts.d.ts +4 -2
  433. package/dist/hub/group-policy/admin-facts.js +17 -2
  434. package/dist/hub/group-policy/admin-facts.js.map +1 -1
  435. package/dist/hub/group-policy/admin-impact.d.ts +36 -6
  436. package/dist/hub/group-policy/admin-impact.js +21 -7
  437. package/dist/hub/group-policy/admin-impact.js.map +1 -1
  438. package/dist/hub/group-policy/admin-inventory.d.ts +2 -0
  439. package/dist/hub/group-policy/admin-inventory.js +13 -4
  440. package/dist/hub/group-policy/admin-inventory.js.map +1 -1
  441. package/dist/hub/group-policy/admin-search.d.ts +2 -1
  442. package/dist/hub/group-policy/admin-search.js +56 -7
  443. package/dist/hub/group-policy/admin-search.js.map +1 -1
  444. package/dist/hub/group-policy/authorization.d.ts +2 -0
  445. package/dist/hub/group-policy/authorization.js +7 -2
  446. package/dist/hub/group-policy/authorization.js.map +1 -1
  447. package/dist/hub/group-policy/impact-inventory.d.ts +4 -1
  448. package/dist/hub/group-policy/impact-inventory.js +23 -2
  449. package/dist/hub/group-policy/impact-inventory.js.map +1 -1
  450. package/dist/hub/group-policy/model.d.ts +52 -1
  451. package/dist/hub/group-policy/model.js +20 -7
  452. package/dist/hub/group-policy/model.js.map +1 -1
  453. package/dist/hub/group-policy/resources.d.ts +2 -0
  454. package/dist/hub/group-policy/resources.js +12 -1
  455. package/dist/hub/group-policy/resources.js.map +1 -1
  456. package/dist/hub/group-policy/store.js +22 -3
  457. package/dist/hub/group-policy/store.js.map +1 -1
  458. package/dist/hub/group-policy/team-subjects.d.ts +16 -0
  459. package/dist/hub/group-policy/team-subjects.js +32 -0
  460. package/dist/hub/group-policy/team-subjects.js.map +1 -0
  461. package/dist/hub/http/compose.d.ts +14 -0
  462. package/dist/hub/http/compose.js +771 -47
  463. package/dist/hub/http/compose.js.map +1 -1
  464. package/dist/hub/http/core.d.ts +9 -1
  465. package/dist/hub/http/core.js +53 -3
  466. package/dist/hub/http/core.js.map +1 -1
  467. package/dist/hub/http/deps.d.ts +19 -0
  468. package/dist/hub/http/schema.js +50 -1
  469. package/dist/hub/http/schema.js.map +1 -1
  470. package/dist/hub/invitations.js +15 -7
  471. package/dist/hub/invitations.js.map +1 -1
  472. package/dist/hub/join/client.js +75 -42
  473. package/dist/hub/join/client.js.map +1 -1
  474. package/dist/hub/join/service.d.ts +3 -1
  475. package/dist/hub/join/service.js +7 -3
  476. package/dist/hub/join/service.js.map +1 -1
  477. package/dist/hub/lapse-carry.d.ts +45 -0
  478. package/dist/hub/lapse-carry.js +62 -0
  479. package/dist/hub/lapse-carry.js.map +1 -0
  480. package/dist/hub/mcp/auth-schema.d.ts +7 -0
  481. package/dist/hub/mcp/auth-schema.js +31 -0
  482. package/dist/hub/mcp/auth-schema.js.map +1 -0
  483. package/dist/hub/mcp/auth.d.ts +89 -0
  484. package/dist/hub/mcp/auth.js +374 -0
  485. package/dist/hub/mcp/auth.js.map +1 -0
  486. package/dist/hub/mcp/catalog.d.ts +44 -0
  487. package/dist/hub/mcp/catalog.js +31 -0
  488. package/dist/hub/mcp/catalog.js.map +1 -0
  489. package/dist/hub/mcp/door-schema.d.ts +7 -0
  490. package/dist/hub/mcp/door-schema.js +20 -0
  491. package/dist/hub/mcp/door-schema.js.map +1 -0
  492. package/dist/hub/mcp/http.d.ts +25 -0
  493. package/dist/hub/mcp/http.js +259 -0
  494. package/dist/hub/mcp/http.js.map +1 -0
  495. package/dist/hub/mcp/policy.d.ts +65 -0
  496. package/dist/hub/mcp/policy.js +153 -0
  497. package/dist/hub/mcp/policy.js.map +1 -0
  498. package/dist/hub/mcp/server.d.ts +3 -0
  499. package/dist/hub/mcp/server.js +32 -0
  500. package/dist/hub/mcp/server.js.map +1 -0
  501. package/dist/hub/mcp/tools.d.ts +31 -0
  502. package/dist/hub/mcp/tools.js +177 -0
  503. package/dist/hub/mcp/tools.js.map +1 -0
  504. package/dist/hub/member/agent-catalog.d.ts +31 -0
  505. package/dist/hub/member/agent-catalog.js +91 -0
  506. package/dist/hub/member/agent-catalog.js.map +1 -0
  507. package/dist/hub/member/agent-intro.d.ts +29 -0
  508. package/dist/hub/member/agent-intro.js +73 -0
  509. package/dist/hub/member/agent-intro.js.map +1 -0
  510. package/dist/hub/member/agent-pictures.d.ts +43 -0
  511. package/dist/hub/member/agent-pictures.js +125 -0
  512. package/dist/hub/member/agent-pictures.js.map +1 -0
  513. package/dist/hub/member/direct-rooms.d.ts +9 -0
  514. package/dist/hub/member/direct-rooms.js +14 -0
  515. package/dist/hub/member/direct-rooms.js.map +1 -0
  516. package/dist/hub/member/display-name.d.ts +9 -0
  517. package/dist/hub/member/display-name.js +71 -0
  518. package/dist/hub/member/display-name.js.map +1 -0
  519. package/dist/hub/member/exposure-api.d.ts +11 -3
  520. package/dist/hub/member/exposure-api.js +24 -10
  521. package/dist/hub/member/exposure-api.js.map +1 -1
  522. package/dist/hub/member/exposures.d.ts +16 -4
  523. package/dist/hub/member/exposures.js +47 -13
  524. package/dist/hub/member/exposures.js.map +1 -1
  525. package/dist/hub/member/pairing-api.js +3 -2
  526. package/dist/hub/member/pairing-api.js.map +1 -1
  527. package/dist/hub/member/recommendations.d.ts +37 -0
  528. package/dist/hub/member/recommendations.js +129 -0
  529. package/dist/hub/member/recommendations.js.map +1 -0
  530. package/dist/hub/member/room-ask.d.ts +78 -5
  531. package/dist/hub/member/room-ask.js +337 -26
  532. package/dist/hub/member/room-ask.js.map +1 -1
  533. package/dist/hub/member/room-context-budget.d.ts +5 -0
  534. package/dist/hub/member/room-context-budget.js +34 -0
  535. package/dist/hub/member/room-context-budget.js.map +1 -0
  536. package/dist/hub/member/room-mention-feedback.d.ts +44 -0
  537. package/dist/hub/member/room-mention-feedback.js +121 -0
  538. package/dist/hub/member/room-mention-feedback.js.map +1 -0
  539. package/dist/hub/member/room-notification.d.ts +9 -0
  540. package/dist/hub/member/room-notification.js +2 -0
  541. package/dist/hub/member/room-notification.js.map +1 -0
  542. package/dist/hub/member/room-post-answers.d.ts +46 -0
  543. package/dist/hub/member/room-post-answers.js +152 -0
  544. package/dist/hub/member/room-post-answers.js.map +1 -0
  545. package/dist/hub/member/room-post-receipt.d.ts +21 -0
  546. package/dist/hub/member/room-post-receipt.js +49 -0
  547. package/dist/hub/member/room-post-receipt.js.map +1 -0
  548. package/dist/hub/member/room-post.d.ts +135 -0
  549. package/dist/hub/member/room-post.js +311 -0
  550. package/dist/hub/member/room-post.js.map +1 -0
  551. package/dist/hub/member/sharing-journal.d.ts +252 -0
  552. package/dist/hub/member/sharing-journal.js +212 -0
  553. package/dist/hub/member/sharing-journal.js.map +1 -0
  554. package/dist/hub/member/sharing-link.d.ts +25 -0
  555. package/dist/hub/member/sharing-link.js +68 -0
  556. package/dist/hub/member/sharing-link.js.map +1 -0
  557. package/dist/hub/member/sharing-result.d.ts +6 -0
  558. package/dist/hub/member/sharing-result.js +46 -0
  559. package/dist/hub/member/sharing-result.js.map +1 -0
  560. package/dist/hub/member/sharing.d.ts +39 -0
  561. package/dist/hub/member/sharing.js +188 -0
  562. package/dist/hub/member/sharing.js.map +1 -0
  563. package/dist/hub/member/updates.d.ts +92 -0
  564. package/dist/hub/member/updates.js +316 -0
  565. package/dist/hub/member/updates.js.map +1 -0
  566. package/dist/hub/pairing.d.ts +15 -1
  567. package/dist/hub/pairing.js +33 -2
  568. package/dist/hub/pairing.js.map +1 -1
  569. package/dist/hub/personal/owner-host.d.ts +146 -0
  570. package/dist/hub/personal/owner-host.js +289 -0
  571. package/dist/hub/personal/owner-host.js.map +1 -0
  572. package/dist/hub/personal/refusals.d.ts +11 -0
  573. package/dist/hub/personal/refusals.js +33 -0
  574. package/dist/hub/personal/refusals.js.map +1 -0
  575. package/dist/hub/personal/runtime-host.d.ts +26 -0
  576. package/dist/hub/personal/runtime-host.js +51 -0
  577. package/dist/hub/personal/runtime-host.js.map +1 -0
  578. package/dist/hub/personal/schema.d.ts +4 -0
  579. package/dist/hub/personal/schema.js +54 -0
  580. package/dist/hub/personal/schema.js.map +1 -0
  581. package/dist/hub/personal/turns.d.ts +39 -0
  582. package/dist/hub/personal/turns.js +221 -0
  583. package/dist/hub/personal/turns.js.map +1 -0
  584. package/dist/hub/personal/types.d.ts +42 -0
  585. package/dist/hub/personal/types.js +2 -0
  586. package/dist/hub/personal/types.js.map +1 -0
  587. package/dist/hub/policy.d.ts +12 -3
  588. package/dist/hub/policy.js +62 -7
  589. package/dist/hub/policy.js.map +1 -1
  590. package/dist/hub/protocol.d.ts +1274 -56
  591. package/dist/hub/protocol.js +123 -16
  592. package/dist/hub/protocol.js.map +1 -1
  593. package/dist/hub/published-version.d.ts +3 -0
  594. package/dist/hub/published-version.js +35 -0
  595. package/dist/hub/published-version.js.map +1 -0
  596. package/dist/hub/quota.js +3 -1
  597. package/dist/hub/quota.js.map +1 -1
  598. package/dist/hub/recommendation-model.d.ts +36 -0
  599. package/dist/hub/recommendation-model.js +9 -0
  600. package/dist/hub/recommendation-model.js.map +1 -0
  601. package/dist/hub/recommendations.d.ts +58 -0
  602. package/dist/hub/recommendations.js +211 -0
  603. package/dist/hub/recommendations.js.map +1 -0
  604. package/dist/hub/representative.d.ts +33 -0
  605. package/dist/hub/representative.js +132 -12
  606. package/dist/hub/representative.js.map +1 -1
  607. package/dist/hub/roles/admin-control.d.ts +29 -0
  608. package/dist/hub/roles/admin-control.js +187 -0
  609. package/dist/hub/roles/admin-control.js.map +1 -0
  610. package/dist/hub/roles/admin-types.d.ts +72 -0
  611. package/dist/hub/roles/admin-types.js +2 -0
  612. package/dist/hub/roles/admin-types.js.map +1 -0
  613. package/dist/hub/roles/allowed-list-control.d.ts +34 -0
  614. package/dist/hub/roles/allowed-list-control.js +179 -0
  615. package/dist/hub/roles/allowed-list-control.js.map +1 -0
  616. package/dist/hub/roles/allowed-list.d.ts +8 -0
  617. package/dist/hub/roles/allowed-list.js +49 -0
  618. package/dist/hub/roles/allowed-list.js.map +1 -0
  619. package/dist/hub/roles/audit-details.d.ts +144 -0
  620. package/dist/hub/roles/audit-details.js +26 -0
  621. package/dist/hub/roles/audit-details.js.map +1 -0
  622. package/dist/hub/roles/authority.d.ts +12 -0
  623. package/dist/hub/roles/authority.js +39 -3
  624. package/dist/hub/roles/authority.js.map +1 -1
  625. package/dist/hub/roles/change.d.ts +3 -1
  626. package/dist/hub/roles/change.js +7 -2
  627. package/dist/hub/roles/change.js.map +1 -1
  628. package/dist/hub/roles/clock.d.ts +3 -0
  629. package/dist/hub/roles/clock.js +1 -1
  630. package/dist/hub/roles/clock.js.map +1 -1
  631. package/dist/hub/roles/convert.js +1 -1
  632. package/dist/hub/roles/convert.js.map +1 -1
  633. package/dist/hub/roles/cutover-inventory.d.ts +5 -0
  634. package/dist/hub/roles/cutover-inventory.js +27 -4
  635. package/dist/hub/roles/cutover-inventory.js.map +1 -1
  636. package/dist/hub/roles/cutover-marker.d.ts +18 -2
  637. package/dist/hub/roles/cutover-marker.js +6 -2
  638. package/dist/hub/roles/cutover-marker.js.map +1 -1
  639. package/dist/hub/roles/cutover.d.ts +2 -2
  640. package/dist/hub/roles/cutover.js +3 -4
  641. package/dist/hub/roles/cutover.js.map +1 -1
  642. package/dist/hub/roles/delegation.d.ts +4 -1
  643. package/dist/hub/roles/delegation.js +7 -2
  644. package/dist/hub/roles/delegation.js.map +1 -1
  645. package/dist/hub/roles/evaluate.d.ts +2 -1
  646. package/dist/hub/roles/evaluate.js +14 -0
  647. package/dist/hub/roles/evaluate.js.map +1 -1
  648. package/dist/hub/roles/expiry-effects.d.ts +8 -0
  649. package/dist/hub/roles/expiry-effects.js +50 -0
  650. package/dist/hub/roles/expiry-effects.js.map +1 -0
  651. package/dist/hub/roles/migrations.d.ts +7 -0
  652. package/dist/hub/roles/migrations.js +44 -0
  653. package/dist/hub/roles/migrations.js.map +1 -0
  654. package/dist/hub/roles/model.d.ts +25 -0
  655. package/dist/hub/roles/model.js +9 -3
  656. package/dist/hub/roles/model.js.map +1 -1
  657. package/dist/hub/roles/overview.d.ts +8 -0
  658. package/dist/hub/roles/overview.js +15 -0
  659. package/dist/hub/roles/overview.js.map +1 -0
  660. package/dist/hub/roles/resource-effects.d.ts +17 -0
  661. package/dist/hub/roles/resource-effects.js +62 -0
  662. package/dist/hub/roles/resource-effects.js.map +1 -0
  663. package/dist/hub/roles/review.d.ts +16 -0
  664. package/dist/hub/roles/review.js +42 -0
  665. package/dist/hub/roles/review.js.map +1 -0
  666. package/dist/hub/roles/writer.d.ts +14 -3
  667. package/dist/hub/roles/writer.js +64 -16
  668. package/dist/hub/roles/writer.js.map +1 -1
  669. package/dist/hub/room-agent-discovery-model.d.ts +29 -0
  670. package/dist/hub/room-agent-discovery-model.js +33 -0
  671. package/dist/hub/room-agent-discovery-model.js.map +1 -0
  672. package/dist/hub/room-agent-discovery.d.ts +14 -0
  673. package/dist/hub/room-agent-discovery.js +65 -0
  674. package/dist/hub/room-agent-discovery.js.map +1 -0
  675. package/dist/hub/room-agent-requests.d.ts +71 -0
  676. package/dist/hub/room-agent-requests.js +377 -0
  677. package/dist/hub/room-agent-requests.js.map +1 -0
  678. package/dist/hub/room-answer-status-model.d.ts +3 -0
  679. package/dist/hub/room-answer-status-model.js +4 -0
  680. package/dist/hub/room-answer-status-model.js.map +1 -0
  681. package/dist/hub/room-brief-model.d.ts +30 -0
  682. package/dist/hub/room-brief-model.js +38 -0
  683. package/dist/hub/room-brief-model.js.map +1 -0
  684. package/dist/hub/room-context-model.d.ts +45 -0
  685. package/dist/hub/room-context-model.js +12 -0
  686. package/dist/hub/room-context-model.js.map +1 -0
  687. package/dist/hub/room-members-model.d.ts +63 -0
  688. package/dist/hub/room-members-model.js +7 -0
  689. package/dist/hub/room-members-model.js.map +1 -0
  690. package/dist/hub/room-mention-feedback-model.d.ts +12 -0
  691. package/dist/hub/room-mention-feedback-model.js +12 -0
  692. package/dist/hub/room-mention-feedback-model.js.map +1 -0
  693. package/dist/hub/rooms/agents.d.ts +49 -10
  694. package/dist/hub/rooms/agents.js +356 -33
  695. package/dist/hub/rooms/agents.js.map +1 -1
  696. package/dist/hub/rooms/assistant.d.ts +1 -6
  697. package/dist/hub/rooms/assistant.js +7 -2
  698. package/dist/hub/rooms/assistant.js.map +1 -1
  699. package/dist/hub/rooms/automation.d.ts +24 -0
  700. package/dist/hub/rooms/automation.js +66 -0
  701. package/dist/hub/rooms/automation.js.map +1 -0
  702. package/dist/hub/rooms/brief.d.ts +18 -0
  703. package/dist/hub/rooms/brief.js +39 -0
  704. package/dist/hub/rooms/brief.js.map +1 -0
  705. package/dist/hub/rooms/buttons.d.ts +85 -0
  706. package/dist/hub/rooms/buttons.js +62 -0
  707. package/dist/hub/rooms/buttons.js.map +1 -0
  708. package/dist/hub/rooms/context-cursor.d.ts +18 -0
  709. package/dist/hub/rooms/context-cursor.js +61 -0
  710. package/dist/hub/rooms/context-cursor.js.map +1 -0
  711. package/dist/hub/rooms/context.d.ts +1 -1
  712. package/dist/hub/rooms/context.js +4 -4
  713. package/dist/hub/rooms/context.js.map +1 -1
  714. package/dist/hub/rooms/direct-view.d.ts +12 -3
  715. package/dist/hub/rooms/direct-view.js +25 -10
  716. package/dist/hub/rooms/direct-view.js.map +1 -1
  717. package/dist/hub/rooms/directory.d.ts +13 -0
  718. package/dist/hub/rooms/directory.js +12 -3
  719. package/dist/hub/rooms/directory.js.map +1 -1
  720. package/dist/hub/rooms/members-page.d.ts +33 -0
  721. package/dist/hub/rooms/members-page.js +37 -0
  722. package/dist/hub/rooms/members-page.js.map +1 -0
  723. package/dist/hub/rooms/mentions.d.ts +15 -0
  724. package/dist/hub/rooms/mentions.js +43 -0
  725. package/dist/hub/rooms/mentions.js.map +1 -0
  726. package/dist/hub/rooms/office.d.ts +123 -0
  727. package/dist/hub/rooms/office.js +79 -0
  728. package/dist/hub/rooms/office.js.map +1 -0
  729. package/dist/hub/rooms/post-replies.d.ts +23 -0
  730. package/dist/hub/rooms/post-replies.js +114 -0
  731. package/dist/hub/rooms/post-replies.js.map +1 -0
  732. package/dist/hub/rooms/purpose.d.ts +7 -0
  733. package/dist/hub/rooms/purpose.js +14 -0
  734. package/dist/hub/rooms/purpose.js.map +1 -0
  735. package/dist/hub/rooms/schema.d.ts +14 -0
  736. package/dist/hub/rooms/schema.js +52 -0
  737. package/dist/hub/rooms/schema.js.map +1 -1
  738. package/dist/hub/rooms/service.d.ts +373 -7
  739. package/dist/hub/rooms/service.js +1056 -47
  740. package/dist/hub/rooms/service.js.map +1 -1
  741. package/dist/hub/rooms/types.d.ts +46 -4
  742. package/dist/hub/rooms.d.ts +22 -2
  743. package/dist/hub/rooms.js +193 -47
  744. package/dist/hub/rooms.js.map +1 -1
  745. package/dist/hub/runtime.d.ts +1 -1
  746. package/dist/hub/runtime.js +17 -4
  747. package/dist/hub/runtime.js.map +1 -1
  748. package/dist/hub/server.d.ts +8 -1
  749. package/dist/hub/server.js +165 -7
  750. package/dist/hub/server.js.map +1 -1
  751. package/dist/hub/session-directory-transition.d.ts +3 -1
  752. package/dist/hub/session-directory-transition.js +25 -12
  753. package/dist/hub/session-directory-transition.js.map +1 -1
  754. package/dist/hub/session-limits.d.ts +58 -0
  755. package/dist/hub/session-limits.js +121 -0
  756. package/dist/hub/session-limits.js.map +1 -0
  757. package/dist/hub/sessions.d.ts +2 -2
  758. package/dist/hub/sessions.js +39 -11
  759. package/dist/hub/sessions.js.map +1 -1
  760. package/dist/hub/settings-commit.d.ts +32 -1
  761. package/dist/hub/settings-commit.js +11 -4
  762. package/dist/hub/settings-commit.js.map +1 -1
  763. package/dist/hub/settings-directory-ca.js +1 -1
  764. package/dist/hub/settings-directory-ca.js.map +1 -1
  765. package/dist/hub/settings-directory-control.js +7 -7
  766. package/dist/hub/settings-directory-control.js.map +1 -1
  767. package/dist/hub/settings-directory-decision.js +1 -1
  768. package/dist/hub/settings-directory-decision.js.map +1 -1
  769. package/dist/hub/settings-directory-http.d.ts +2 -0
  770. package/dist/hub/settings-directory-http.js +21 -6
  771. package/dist/hub/settings-directory-http.js.map +1 -1
  772. package/dist/hub/settings-directory-proof.d.ts +5 -1
  773. package/dist/hub/settings-directory-proof.js +49 -10
  774. package/dist/hub/settings-directory-proof.js.map +1 -1
  775. package/dist/hub/settings-directory-recovery.js +2 -1
  776. package/dist/hub/settings-directory-recovery.js.map +1 -1
  777. package/dist/hub/settings-directory-save.d.ts +2 -0
  778. package/dist/hub/settings-directory-save.js +9 -6
  779. package/dist/hub/settings-directory-save.js.map +1 -1
  780. package/dist/hub/sharing-previous-access.d.ts +22 -0
  781. package/dist/hub/sharing-previous-access.js +93 -0
  782. package/dist/hub/sharing-previous-access.js.map +1 -0
  783. package/dist/hub/sharing-requests.d.ts +174 -0
  784. package/dist/hub/sharing-requests.js +326 -0
  785. package/dist/hub/sharing-requests.js.map +1 -0
  786. package/dist/hub/sharing-retention.d.ts +47 -0
  787. package/dist/hub/sharing-retention.js +83 -0
  788. package/dist/hub/sharing-retention.js.map +1 -0
  789. package/dist/hub/sharing-withdrawal.d.ts +14 -0
  790. package/dist/hub/sharing-withdrawal.js +28 -0
  791. package/dist/hub/sharing-withdrawal.js.map +1 -0
  792. package/dist/hub/sharing.js +2 -2
  793. package/dist/hub/sharing.js.map +1 -1
  794. package/dist/hub/socket.d.ts +1 -0
  795. package/dist/hub/socket.js +39 -2
  796. package/dist/hub/socket.js.map +1 -1
  797. package/dist/hub/teams/index.d.ts +8 -3
  798. package/dist/hub/teams/index.js +106 -31
  799. package/dist/hub/teams/index.js.map +1 -1
  800. package/dist/hub/teams/store.d.ts +5 -1
  801. package/dist/hub/teams/store.js +25 -2
  802. package/dist/hub/teams/store.js.map +1 -1
  803. package/dist/hub/teams/types.d.ts +19 -2
  804. package/dist/hub/types.d.ts +173 -5
  805. package/dist/hub-classic-private.d.ts +19 -0
  806. package/dist/hub-classic-private.js +64 -0
  807. package/dist/hub-classic-private.js.map +1 -0
  808. package/dist/hub-contact-windows.d.ts +11 -0
  809. package/dist/hub-contact-windows.js +56 -0
  810. package/dist/hub-contact-windows.js.map +1 -0
  811. package/dist/hub-page-sharing-settings.d.ts +6 -0
  812. package/dist/hub-page-sharing-settings.js +19 -0
  813. package/dist/hub-page-sharing-settings.js.map +1 -0
  814. package/dist/hub-pairing-summary.d.ts +1 -1
  815. package/dist/hub-picture-reduce.d.ts +14 -0
  816. package/dist/hub-picture-reduce.js +49 -0
  817. package/dist/hub-picture-reduce.js.map +1 -0
  818. package/dist/hub-picture-worker.d.ts +1 -0
  819. package/dist/hub-picture-worker.js +11 -0
  820. package/dist/hub-picture-worker.js.map +1 -0
  821. package/dist/hub-report-target.d.ts +6 -0
  822. package/dist/hub-report-target.js +6 -0
  823. package/dist/hub-report-target.js.map +1 -1
  824. package/dist/hub-room-conversation.d.ts +14 -0
  825. package/dist/hub-room-conversation.js +60 -0
  826. package/dist/hub-room-conversation.js.map +1 -0
  827. package/dist/hub-room-reply-warning.d.ts +2 -0
  828. package/dist/hub-room-reply-warning.js +16 -0
  829. package/dist/hub-room-reply-warning.js.map +1 -0
  830. package/dist/hub-sharing-notice.d.ts +43 -0
  831. package/dist/hub-sharing-notice.js +34 -0
  832. package/dist/hub-sharing-notice.js.map +1 -0
  833. package/dist/hub-update-notice.d.ts +12 -0
  834. package/dist/hub-update-notice.js +35 -0
  835. package/dist/hub-update-notice.js.map +1 -0
  836. package/dist/human-delivery-receipts.js +8 -0
  837. package/dist/human-delivery-receipts.js.map +1 -1
  838. package/dist/instance-config-impact.js +5 -2
  839. package/dist/instance-config-impact.js.map +1 -1
  840. package/dist/instance-lifecycle.d.ts +21 -1
  841. package/dist/instance-lifecycle.js +55 -14
  842. package/dist/instance-lifecycle.js.map +1 -1
  843. package/dist/instruction-file-sizes.d.ts +46 -0
  844. package/dist/instruction-file-sizes.js +115 -0
  845. package/dist/instruction-file-sizes.js.map +1 -0
  846. package/dist/instructions.d.ts +35 -1
  847. package/dist/instructions.js +63 -33
  848. package/dist/instructions.js.map +1 -1
  849. package/dist/locale.d.ts +2 -0
  850. package/dist/locale.js +373 -34
  851. package/dist/locale.js.map +1 -1
  852. package/dist/log-steps.d.ts +5 -0
  853. package/dist/log-steps.js +6 -2
  854. package/dist/log-steps.js.map +1 -1
  855. package/dist/login-controller.d.ts +45 -2
  856. package/dist/login-controller.js +98 -10
  857. package/dist/login-controller.js.map +1 -1
  858. package/dist/login-flows.js +1 -1
  859. package/dist/login-flows.js.map +1 -1
  860. package/dist/memory-guidance.d.ts +5 -0
  861. package/dist/memory-guidance.js +14 -0
  862. package/dist/memory-guidance.js.map +1 -0
  863. package/dist/model-defaults.d.ts +5 -0
  864. package/dist/model-defaults.js +6 -0
  865. package/dist/model-defaults.js.map +1 -0
  866. package/dist/native-mcp.d.ts +2 -0
  867. package/dist/native-mcp.js +23 -11
  868. package/dist/native-mcp.js.map +1 -1
  869. package/dist/native-model-catalog.d.ts +15 -0
  870. package/dist/native-model-catalog.js +43 -3
  871. package/dist/native-model-catalog.js.map +1 -1
  872. package/dist/native-pane-lifecycle.js +3 -2
  873. package/dist/native-pane-lifecycle.js.map +1 -1
  874. package/dist/native-pane-tools.js +3 -0
  875. package/dist/native-pane-tools.js.map +1 -1
  876. package/dist/needs-you-hub.d.ts +4 -0
  877. package/dist/needs-you-hub.js +17 -2
  878. package/dist/needs-you-hub.js.map +1 -1
  879. package/dist/needs-you.d.ts +40 -2
  880. package/dist/needs-you.js +18 -0
  881. package/dist/needs-you.js.map +1 -1
  882. package/dist/office-share-page.js +4 -4
  883. package/dist/office-share-page.js.map +1 -1
  884. package/dist/outbound-handlers.d.ts +28 -4
  885. package/dist/outbound-handlers.js +150 -13
  886. package/dist/outbound-handlers.js.map +1 -1
  887. package/dist/outbound-schemas.d.ts +32 -0
  888. package/dist/outbound-schemas.js +44 -25
  889. package/dist/outbound-schemas.js.map +1 -1
  890. package/dist/pane-port.d.ts +2 -0
  891. package/dist/pause-marker.d.ts +1 -1
  892. package/dist/pause-marker.js +1 -1
  893. package/dist/pause-marker.js.map +1 -1
  894. package/dist/profile-signins.d.ts +1 -0
  895. package/dist/profile-signins.js +3 -1
  896. package/dist/profile-signins.js.map +1 -1
  897. package/dist/public-web-gateway.d.ts +20 -0
  898. package/dist/public-web-gateway.js +232 -9
  899. package/dist/public-web-gateway.js.map +1 -1
  900. package/dist/public-web-link.d.ts +21 -2
  901. package/dist/public-web-link.js +22 -2
  902. package/dist/public-web-link.js.map +1 -1
  903. package/dist/queued-handoffs.d.ts +16 -4
  904. package/dist/queued-handoffs.js +18 -1
  905. package/dist/queued-handoffs.js.map +1 -1
  906. package/dist/quickstart-api.d.ts +0 -1
  907. package/dist/quickstart-api.js +8 -1
  908. package/dist/quickstart-api.js.map +1 -1
  909. package/dist/quickstart.d.ts +1 -1
  910. package/dist/quickstart.js +2 -3
  911. package/dist/quickstart.js.map +1 -1
  912. package/dist/remote-card-answer.d.ts +1 -1
  913. package/dist/remote-card-answer.js +8 -1
  914. package/dist/remote-card-answer.js.map +1 -1
  915. package/dist/remote-card-prompt.d.ts +1 -0
  916. package/dist/remote-card-prompt.js +2 -2
  917. package/dist/remote-card-prompt.js.map +1 -1
  918. package/dist/reply-dedup.js +3 -1
  919. package/dist/reply-dedup.js.map +1 -1
  920. package/dist/reply-preview-files.d.ts +38 -0
  921. package/dist/reply-preview-files.js +142 -0
  922. package/dist/reply-preview-files.js.map +1 -0
  923. package/dist/reply-preview-spec.d.ts +18 -0
  924. package/dist/reply-preview-spec.js +27 -0
  925. package/dist/reply-preview-spec.js.map +1 -0
  926. package/dist/restart-progress.d.ts +6 -0
  927. package/dist/restart-progress.js +5 -0
  928. package/dist/restart-progress.js.map +1 -1
  929. package/dist/runtime-api.js +10 -2
  930. package/dist/runtime-api.js.map +1 -1
  931. package/dist/runtime-build-info.js +2 -1
  932. package/dist/runtime-build-info.js.map +1 -1
  933. package/dist/runtime-cli-install.js +18 -14
  934. package/dist/runtime-cli-install.js.map +1 -1
  935. package/dist/runtime-cli.js +31 -5
  936. package/dist/runtime-cli.js.map +1 -1
  937. package/dist/runtime-client-store.d.ts +5 -0
  938. package/dist/runtime-client-store.js +28 -0
  939. package/dist/runtime-client-store.js.map +1 -1
  940. package/dist/runtime-client.d.ts +4 -0
  941. package/dist/runtime-client.js +33 -10
  942. package/dist/runtime-client.js.map +1 -1
  943. package/dist/runtime-coordinator.d.ts +4 -2
  944. package/dist/runtime-coordinator.js +33 -6
  945. package/dist/runtime-coordinator.js.map +1 -1
  946. package/dist/runtime-install.d.ts +6 -1
  947. package/dist/runtime-install.js +12 -4
  948. package/dist/runtime-install.js.map +1 -1
  949. package/dist/runtime-pane-mcp.js +7 -3
  950. package/dist/runtime-pane-mcp.js.map +1 -1
  951. package/dist/runtime-pane-native.js +5 -2
  952. package/dist/runtime-pane-native.js.map +1 -1
  953. package/dist/runtime-personal-answer-only-probe.d.ts +3 -0
  954. package/dist/runtime-personal-answer-only-probe.js +134 -0
  955. package/dist/runtime-personal-answer-only-probe.js.map +1 -0
  956. package/dist/runtime-personal-answer-only.d.ts +16 -0
  957. package/dist/runtime-personal-answer-only.js +54 -0
  958. package/dist/runtime-personal-answer-only.js.map +1 -0
  959. package/dist/runtime-personal-answer.d.ts +30 -0
  960. package/dist/runtime-personal-answer.js +124 -0
  961. package/dist/runtime-personal-answer.js.map +1 -0
  962. package/dist/runtime-personal-preflight.d.ts +8 -0
  963. package/dist/runtime-personal-preflight.js +103 -0
  964. package/dist/runtime-personal-preflight.js.map +1 -0
  965. package/dist/runtime-personal-profile.d.ts +40 -0
  966. package/dist/runtime-personal-profile.js +81 -0
  967. package/dist/runtime-personal-profile.js.map +1 -0
  968. package/dist/runtime-personal-protocol.d.ts +10 -0
  969. package/dist/runtime-personal-protocol.js +15 -0
  970. package/dist/runtime-personal-protocol.js.map +1 -0
  971. package/dist/runtime-personal-stage.d.ts +37 -0
  972. package/dist/runtime-personal-stage.js +167 -0
  973. package/dist/runtime-personal-stage.js.map +1 -0
  974. package/dist/runtime-protocol.d.ts +2 -0
  975. package/dist/scheduler/db.js +2 -0
  976. package/dist/scheduler/db.js.map +1 -1
  977. package/dist/scheduler/task-board-mentions.d.ts +32 -0
  978. package/dist/scheduler/task-board-mentions.js +97 -0
  979. package/dist/scheduler/task-board-mentions.js.map +1 -0
  980. package/dist/scheduler/task-board-text.js +3 -0
  981. package/dist/scheduler/task-board-text.js.map +1 -1
  982. package/dist/scheduler/task-board.d.ts +199 -3
  983. package/dist/scheduler/task-board.js +492 -7
  984. package/dist/scheduler/task-board.js.map +1 -1
  985. package/dist/settings-api.d.ts +36 -1
  986. package/dist/settings-api.js +525 -96
  987. package/dist/settings-api.js.map +1 -1
  988. package/dist/settings-baseline.d.ts +4 -0
  989. package/dist/settings-baseline.js +7 -5
  990. package/dist/settings-baseline.js.map +1 -1
  991. package/dist/settings-change.js +47 -7
  992. package/dist/settings-change.js.map +1 -1
  993. package/dist/settings-effect.d.ts +7 -0
  994. package/dist/settings-effect.js +80 -5
  995. package/dist/settings-effect.js.map +1 -1
  996. package/dist/settings-http-confirmation.js +18 -44
  997. package/dist/settings-http-confirmation.js.map +1 -1
  998. package/dist/settings-instance-patch.js +3 -1
  999. package/dist/settings-instance-patch.js.map +1 -1
  1000. package/dist/setup-form.js +10 -0
  1001. package/dist/setup-form.js.map +1 -1
  1002. package/dist/setup-host.d.ts +2 -3
  1003. package/dist/setup-host.js +3 -5
  1004. package/dist/setup-host.js.map +1 -1
  1005. package/dist/setup-i18n.js +2 -2
  1006. package/dist/setup-i18n.js.map +1 -1
  1007. package/dist/setup-wizard.js +0 -2
  1008. package/dist/setup-wizard.js.map +1 -1
  1009. package/dist/shared-default-adoption.d.ts +24 -0
  1010. package/dist/shared-default-adoption.js +73 -0
  1011. package/dist/shared-default-adoption.js.map +1 -0
  1012. package/dist/subagent-records.d.ts +2 -0
  1013. package/dist/subagent-records.js +64 -12
  1014. package/dist/subagent-records.js.map +1 -1
  1015. package/dist/subagent-service.d.ts +3 -0
  1016. package/dist/subagent-service.js +27 -5
  1017. package/dist/subagent-service.js.map +1 -1
  1018. package/dist/task-board-tool.d.ts +48 -0
  1019. package/dist/task-board-tool.js +89 -6
  1020. package/dist/task-board-tool.js.map +1 -1
  1021. package/dist/task-board-waker.d.ts +23 -30
  1022. package/dist/task-board-waker.js +136 -97
  1023. package/dist/task-board-waker.js.map +1 -1
  1024. package/dist/tmux-manager.d.ts +2 -0
  1025. package/dist/tmux-manager.js +2 -0
  1026. package/dist/tmux-manager.js.map +1 -1
  1027. package/dist/tool-permissions.js +5 -2
  1028. package/dist/tool-permissions.js.map +1 -1
  1029. package/dist/tool-progress.d.ts +9 -0
  1030. package/dist/tool-progress.js +141 -32
  1031. package/dist/tool-progress.js.map +1 -1
  1032. package/dist/topic-commands.d.ts +7 -1
  1033. package/dist/topic-commands.js +103 -91
  1034. package/dist/topic-commands.js.map +1 -1
  1035. package/dist/transcript-monitor.d.ts +1 -0
  1036. package/dist/transcript-monitor.js +18 -0
  1037. package/dist/transcript-monitor.js.map +1 -1
  1038. package/dist/tunnel/lease.d.ts +14 -0
  1039. package/dist/tunnel/lease.js +23 -0
  1040. package/dist/tunnel/lease.js.map +1 -1
  1041. package/dist/turn-reply-guard.d.ts +2 -2
  1042. package/dist/turn-reply-guard.js +3 -3
  1043. package/dist/turn-reply-guard.js.map +1 -1
  1044. package/dist/types.d.ts +37 -2
  1045. package/dist/ui/accounts-keepalive.js +2 -1
  1046. package/dist/ui/accounts-view.js +18 -9
  1047. package/dist/ui/agent-details-settings.js +9 -7
  1048. package/dist/ui/agent-export-dialog.js +4 -3
  1049. package/dist/ui/agent-export-strings.js +4 -4
  1050. package/dist/ui/agent-page-strings.js +18 -0
  1051. package/dist/ui/backend-signin.js +94 -23
  1052. package/dist/ui/chat-activity-groups.js +42 -9
  1053. package/dist/ui/chat-activity.js +22 -3
  1054. package/dist/ui/chat-commands.js +2 -0
  1055. package/dist/ui/chat-mentions.js +13 -0
  1056. package/dist/ui/chat-msg-actions.js +3 -222
  1057. package/dist/ui/chat-pins.js +106 -0
  1058. package/dist/ui/chat-popout-header.js +2 -2
  1059. package/dist/ui/chat-popout-transport.js +49 -19
  1060. package/dist/ui/chat-popout.js +15 -1
  1061. package/dist/ui/chat-quote.js +3 -261
  1062. package/dist/ui/chat-store.js +178 -16
  1063. package/dist/ui/chat-task-ref-strings.js +24 -0
  1064. package/dist/ui/chat-task-refs.js +131 -0
  1065. package/dist/ui/chat-tour.js +1 -1
  1066. package/dist/ui/chat-workspace.js +3 -3
  1067. package/dist/ui/claude-credentials.js +123 -0
  1068. package/dist/ui/claude-setup-token.js +36 -0
  1069. package/dist/ui/contact-auth-client.js +55 -0
  1070. package/dist/ui/contact-auth-strings.js +256 -0
  1071. package/dist/ui/contact-authorizations.js +139 -0
  1072. package/dist/ui/contact-grant-editor.js +50 -0
  1073. package/dist/ui/contact-needs.js +100 -0
  1074. package/dist/ui/contact-permissions.js +251 -0
  1075. package/dist/ui/contact-ticket-badge.js +54 -0
  1076. package/dist/ui/contact-tool-groups.js +39 -0
  1077. package/dist/ui/fleet-canvas.js +20 -7
  1078. package/dist/ui/fleet-office-card.js +446 -41
  1079. package/dist/ui/fleet-office-carousel.d.ts +14 -0
  1080. package/dist/ui/fleet-office-carousel.js +95 -0
  1081. package/dist/ui/fleet-office-dialogue.d.ts +6 -3
  1082. package/dist/ui/fleet-office-dialogue.js +16 -6
  1083. package/dist/ui/fleet-office-editor.js +6 -1
  1084. package/dist/ui/fleet-office-layout.js +13 -13
  1085. package/dist/ui/fleet-office-model.js +5 -3
  1086. package/dist/ui/fleet-office-overview.js +1 -1
  1087. package/dist/ui/fleet-office-pack.d.ts +81 -4
  1088. package/dist/ui/fleet-office-pack.js +514 -48
  1089. package/dist/ui/fleet-office-play.js +498 -0
  1090. package/dist/ui/fleet-office-skin.js +268 -38
  1091. package/dist/ui/fleet-office-store.js +88 -3
  1092. package/dist/ui/fleet-office-talk.js +423 -0
  1093. package/dist/ui/fleet-office-view.js +26 -17
  1094. package/dist/ui/fleet-office-zones.js +151 -38
  1095. package/dist/ui/fleet-office.js +1147 -155
  1096. package/dist/ui/fleet-route.js +44 -6
  1097. package/dist/ui/fleet-task-activity.js +362 -0
  1098. package/dist/ui/fleet-task-card.js +317 -314
  1099. package/dist/ui/fleet-task-common.js +100 -10
  1100. package/dist/ui/fleet-task-create.js +67 -0
  1101. package/dist/ui/fleet-task-edit.js +204 -0
  1102. package/dist/ui/fleet-task-follow.js +123 -0
  1103. package/dist/ui/fleet-task-menu.js +1 -1
  1104. package/dist/ui/fleet-task-owner.js +252 -0
  1105. package/dist/ui/fleet-task-run.js +257 -0
  1106. package/dist/ui/fleet-task-sort.js +88 -0
  1107. package/dist/ui/fleet-task-view.js +209 -40
  1108. package/dist/ui/fleet-task-work.js +2 -2
  1109. package/dist/ui/fleet-tasks.js +294 -134
  1110. package/dist/ui/host-alerts.js +23 -0
  1111. package/dist/ui/host-footprint.js +17 -0
  1112. package/dist/ui/host-health-model.js +42 -0
  1113. package/dist/ui/host-health.js +82 -0
  1114. package/dist/ui/host-install.js +87 -7
  1115. package/dist/ui/host-monitoring-darwin.js +6 -0
  1116. package/dist/ui/host-monitoring-help.js +7 -0
  1117. package/dist/ui/host-monitoring-linux.js +6 -0
  1118. package/dist/ui/host-monitoring-wsl.js +6 -0
  1119. package/dist/ui/host-time.js +5 -0
  1120. package/dist/ui/hub-admin-overview.js +189 -0
  1121. package/dist/ui/hub-admin-rooms.js +1 -1
  1122. package/dist/ui/hub-agent-copy.js +8 -2
  1123. package/dist/ui/hub-agent-intro.js +35 -0
  1124. package/dist/ui/hub-ai-apps-strings.js +6 -0
  1125. package/dist/ui/hub-ai-apps.js +84 -0
  1126. package/dist/ui/hub-attachments.js +81 -3
  1127. package/dist/ui/hub-chat-store.js +4 -3
  1128. package/dist/ui/hub-chat-strings.js +13 -3
  1129. package/dist/ui/hub-client.js +123 -12
  1130. package/dist/ui/hub-directory-editor-strings.js +2 -2
  1131. package/dist/ui/hub-directory-editor.js +1 -0
  1132. package/dist/ui/hub-fleet-versions.js +393 -0
  1133. package/dist/ui/hub-grant-picker.js +28 -47
  1134. package/dist/ui/hub-group-policy.js +26 -13
  1135. package/dist/ui/hub-group-strings.js +28 -18
  1136. package/dist/ui/hub-intro-notice.js +16 -0
  1137. package/dist/ui/hub-invitations.js +5 -1
  1138. package/dist/ui/hub-join-steps.js +27 -15
  1139. package/dist/ui/hub-my-agents-model.js +42 -0
  1140. package/dist/ui/hub-my-agents-strings.js +20 -0
  1141. package/dist/ui/hub-my-agents.js +169 -0
  1142. package/dist/ui/hub-owner-strings.js +9 -8
  1143. package/dist/ui/hub-personal-agent-strings.js +246 -0
  1144. package/dist/ui/hub-personal-agent.js +119 -0
  1145. package/dist/ui/hub-policy-subjects.js +35 -0
  1146. package/dist/ui/hub-quick-pairing.js +7 -2
  1147. package/dist/ui/hub-quota.js +2 -1
  1148. package/dist/ui/hub-role-audit.js +39 -0
  1149. package/dist/ui/hub-role-forms.js +99 -0
  1150. package/dist/ui/hub-role-notices.js +11 -0
  1151. package/dist/ui/hub-role-view.js +86 -0
  1152. package/dist/ui/hub-roles-strings.js +440 -0
  1153. package/dist/ui/hub-roles.js +83 -0
  1154. package/dist/ui/hub-room-agent-strings.js +28 -0
  1155. package/dist/ui/hub-room-composer.js +183 -20
  1156. package/dist/ui/hub-room-list.js +6 -4
  1157. package/dist/ui/hub-room-members-strings.js +11 -4
  1158. package/dist/ui/hub-room-members.js +132 -18
  1159. package/dist/ui/hub-room-new-strings.js +2 -1
  1160. package/dist/ui/hub-room-new.js +17 -7
  1161. package/dist/ui/hub-room-notify.js +161 -0
  1162. package/dist/ui/hub-room-office.js +203 -0
  1163. package/dist/ui/hub-room-owner-requests-strings.js +114 -0
  1164. package/dist/ui/hub-room-owner-requests.js +264 -0
  1165. package/dist/ui/hub-room-pins.js +43 -0
  1166. package/dist/ui/hub-room-presence.js +14 -2
  1167. package/dist/ui/hub-room-purpose.js +35 -0
  1168. package/dist/ui/hub-room-search.js +126 -0
  1169. package/dist/ui/hub-room-settings.js +79 -4
  1170. package/dist/ui/hub-room-source-strings.js +17 -0
  1171. package/dist/ui/hub-room-source.js +37 -0
  1172. package/dist/ui/hub-room-strings.js +102 -7
  1173. package/dist/ui/hub-room-thread.js +510 -65
  1174. package/dist/ui/hub-room-unread.js +2 -1
  1175. package/dist/ui/hub-room-working.js +37 -0
  1176. package/dist/ui/hub-session-limits.js +79 -0
  1177. package/dist/ui/hub-strings.js +19 -10
  1178. package/dist/ui/hub-subject-picker.js +58 -0
  1179. package/dist/ui/hub-switcher.js +2 -2
  1180. package/dist/ui/hub-teams-strings.js +10 -6
  1181. package/dist/ui/hub-teams.js +58 -29
  1182. package/dist/ui/hub-this-hub.js +2 -2
  1183. package/dist/ui/hub-welcome.js +122 -75
  1184. package/dist/ui/image-annotate.js +2 -283
  1185. package/dist/ui/image-lightbox.js +2 -176
  1186. package/dist/ui/image-zoom.js +2 -242
  1187. package/dist/ui/log-row.js +7 -5
  1188. package/dist/ui/model-picker.js +7 -3
  1189. package/dist/ui/native-instance-settings.js +4 -2
  1190. package/dist/ui/notice-hub-sharing.js +81 -0
  1191. package/dist/ui/notice-hub-update.js +94 -0
  1192. package/dist/ui/office-share-dialog.js +2 -2
  1193. package/dist/ui/office-share-page.js +5 -1
  1194. package/dist/ui/panel-chat.js +578 -78
  1195. package/dist/ui/panel-details.js +22 -1
  1196. package/dist/ui/panel-fleet.js +49 -14
  1197. package/dist/ui/panel-hub.js +459 -129
  1198. package/dist/ui/panel-log.js +4 -4
  1199. package/dist/ui/panel-needs.js +78 -24
  1200. package/dist/ui/panel-notices.js +4 -1
  1201. package/dist/ui/panel-runtimes.js +2 -1
  1202. package/dist/ui/panel-settings.js +111 -51
  1203. package/dist/ui/preview-panel.js +3 -1
  1204. package/dist/ui/preview-popout.js +134 -0
  1205. package/dist/ui/reply-file-preview.js +65 -0
  1206. package/dist/ui/runtime-commands.d.ts +2 -2
  1207. package/dist/ui/runtime-commands.js +7 -4
  1208. package/dist/ui/search-dialog.js +8 -1
  1209. package/dist/ui/settings-access-overview.js +5 -4
  1210. package/dist/ui/settings-appearance.js +13 -11
  1211. package/dist/ui/settings-apply.js +8 -3
  1212. package/dist/ui/settings-archive-files.js +109 -0
  1213. package/dist/ui/settings-build-version.js +2 -2
  1214. package/dist/ui/settings-capabilities.js +2 -0
  1215. package/dist/ui/settings-catalog.js +22 -0
  1216. package/dist/ui/settings-connector-strings.js +23 -0
  1217. package/dist/ui/settings-connector.js +40 -0
  1218. package/dist/ui/settings-default-model-scope.js +40 -0
  1219. package/dist/ui/settings-default-model-strings.js +43 -0
  1220. package/dist/ui/settings-dialogs.js +9 -5
  1221. package/dist/ui/settings-guests-entries.js +16 -0
  1222. package/dist/ui/settings-guests.js +57 -15
  1223. package/dist/ui/settings-host-alerts.js +23 -0
  1224. package/dist/ui/settings-host-monitoring.js +71 -0
  1225. package/dist/ui/settings-hub-connection.js +6 -7
  1226. package/dist/ui/settings-hub-membership.js +6 -7
  1227. package/dist/ui/settings-hub-page-sharing.js +52 -0
  1228. package/dist/ui/settings-hub-section.js +2 -4
  1229. package/dist/ui/settings-hub-setup.js +2 -1
  1230. package/dist/ui/settings-hub-updates.js +67 -0
  1231. package/dist/ui/settings-hub.js +35 -7
  1232. package/dist/ui/settings-layout.js +17 -14
  1233. package/dist/ui/settings-model.js +9 -5
  1234. package/dist/ui/settings-quota-notice.js +3 -3
  1235. package/dist/ui/settings-registry.js +27 -5
  1236. package/dist/ui/settings-shared-strings.js +24 -0
  1237. package/dist/ui/settings-shared.js +62 -14
  1238. package/dist/ui/settings-strings.js +15 -6
  1239. package/dist/ui/settings-update.js +11 -5
  1240. package/dist/ui/settings-web-authority.js +7 -5
  1241. package/dist/ui/shared/access-overview.css +1 -1
  1242. package/dist/ui/shared/accounts-keepalive.css +1 -1
  1243. package/dist/ui/shared/accounts.css +9 -5
  1244. package/dist/ui/shared/agent-sheet.js +120 -0
  1245. package/dist/ui/shared/agent-widget.js +1 -2
  1246. package/dist/ui/shared/app-i18n.js +10 -2
  1247. package/dist/ui/shared/app-nav.js +9 -5
  1248. package/dist/ui/shared/app-prefs.js +9 -3
  1249. package/dist/ui/shared/app-route.js +5 -3
  1250. package/dist/ui/shared/app-shell.js +202 -34
  1251. package/dist/ui/shared/app-store.js +7 -3
  1252. package/dist/ui/shared/app-stream.js +8 -2
  1253. package/dist/ui/shared/app-swipe.js +3 -1
  1254. package/dist/ui/shared/app-themes.js +3 -5
  1255. package/dist/ui/shared/app-update.js +90 -8
  1256. package/dist/ui/shared/app.css +1089 -262
  1257. package/dist/ui/shared/app.js +12 -3
  1258. package/dist/ui/shared/asset-url.d.ts +2 -0
  1259. package/dist/ui/shared/asset-url.js +20 -0
  1260. package/dist/ui/shared/chat-composer.js +36 -11
  1261. package/dist/ui/shared/chat-msg-actions.js +233 -0
  1262. package/dist/ui/shared/chat-quote.js +285 -0
  1263. package/dist/ui/shared/chat-render.js +63 -10
  1264. package/dist/ui/shared/chat-strings.js +32 -11
  1265. package/dist/ui/shared/chat-table-select.js +175 -0
  1266. package/dist/ui/shared/chat-thread.js +175 -29
  1267. package/dist/ui/shared/chat-work-bar.css +118 -0
  1268. package/dist/ui/shared/composer-focus.js +21 -0
  1269. package/dist/ui/shared/connector-prompt.d.ts +3 -0
  1270. package/dist/ui/shared/connector-prompt.js +20 -0
  1271. package/dist/ui/shared/hub-ai-apps.css +12 -0
  1272. package/dist/ui/shared/hub-chat.css +117 -4
  1273. package/dist/ui/shared/hub-groups.css +19 -15
  1274. package/dist/ui/shared/hub-my-agents.css +41 -0
  1275. package/dist/ui/shared/hub-owner.css +123 -3
  1276. package/dist/ui/shared/hub-roles.css +99 -0
  1277. package/dist/ui/shared/hub-rooms-u2.css +98 -0
  1278. package/dist/ui/shared/hub.css +23 -5
  1279. package/dist/ui/shared/image-annotate.css +22 -3
  1280. package/dist/ui/shared/image-annotate.js +416 -0
  1281. package/dist/ui/shared/image-lightbox.js +218 -0
  1282. package/dist/ui/shared/image-zoom.js +316 -0
  1283. package/dist/ui/shared/info-tip.js +64 -0
  1284. package/dist/ui/shared/instance-nav.js +166 -19
  1285. package/dist/ui/shared/jump-idle.js +36 -0
  1286. package/dist/ui/shared/loading.css +1 -1
  1287. package/dist/ui/shared/model-picker.css +32 -4
  1288. package/dist/ui/shared/module-warm.d.ts +3 -0
  1289. package/dist/ui/shared/module-warm.js +39 -0
  1290. package/dist/ui/shared/office-dialogue.css +122 -0
  1291. package/dist/ui/shared/owner-css.js +1 -1
  1292. package/dist/ui/shared/panel-view.js +7 -1
  1293. package/dist/ui/shared/preview-panel-actions.js +1 -1
  1294. package/dist/ui/shared/preview-panel.js +50 -20
  1295. package/dist/ui/shared/preview-popout.css +11 -0
  1296. package/dist/ui/shared/reply-previews.css +4 -0
  1297. package/dist/ui/shared/runtime-install.css +5 -0
  1298. package/dist/ui/shared/settings-connector.css +7 -0
  1299. package/dist/ui/shared/signin.js +27 -12
  1300. package/dist/ui/shared/task-board.css +505 -11
  1301. package/dist/ui/shared/text-undo.js +17 -3
  1302. package/dist/ui/shared/theme-picker.js +46 -0
  1303. package/dist/ui/shared/theme.js +101 -2
  1304. package/dist/ui/shared/tokens.css +300 -10
  1305. package/dist/ui/shared/ui-confirm.js +5 -2
  1306. package/dist/ui/shared/ui-icons.js +2 -0
  1307. package/dist/ui/shared/ui-menu.js +17 -11
  1308. package/dist/ui/shared/ui-states.js +3 -2
  1309. package/dist/ui/shared/ui-toast.js +4 -4
  1310. package/dist/ui/shared/usage-dialog.js +88 -17
  1311. package/dist/ui/shared/view-history.js +2 -1
  1312. package/dist/ui/shared/view-strings.js +28 -4
  1313. package/dist/ui/shared/web-authorize.js +3 -3
  1314. package/dist/ui/signin.html +4 -2
  1315. package/dist/ui/structured-signin.js +64 -12
  1316. package/dist/ui/subagent-row.js +3 -2
  1317. package/dist/ui/trigger-complete.js +71 -0
  1318. package/dist/ui/usage-pool.js +2 -1
  1319. package/dist/ui/web-terminal/terminal.css +1 -1
  1320. package/dist/ui/workspace-panel.js +6 -4
  1321. package/dist/update-dispatch.d.ts +8 -1
  1322. package/dist/update-dispatch.js +16 -1
  1323. package/dist/update-dispatch.js.map +1 -1
  1324. package/dist/update-idle.d.ts +65 -0
  1325. package/dist/update-idle.js +190 -0
  1326. package/dist/update-idle.js.map +1 -0
  1327. package/dist/update-launch.d.ts +1 -1
  1328. package/dist/update-launch.js +9 -2
  1329. package/dist/update-launch.js.map +1 -1
  1330. package/dist/usage/i18n-keys.d.ts +1 -1
  1331. package/dist/usage/i18n-keys.js +2 -2
  1332. package/dist/usage/i18n-keys.js.map +1 -1
  1333. package/dist/usage/profile-timeline.d.ts +2 -0
  1334. package/dist/usage/profile-timeline.js +4 -0
  1335. package/dist/usage/profile-timeline.js.map +1 -1
  1336. package/dist/usage/providers.d.ts +1 -0
  1337. package/dist/usage/providers.js +20 -7
  1338. package/dist/usage/providers.js.map +1 -1
  1339. package/dist/usage/quota-history.d.ts +1 -1
  1340. package/dist/usage/usage-api.js +5 -2
  1341. package/dist/usage/usage-api.js.map +1 -1
  1342. package/dist/view-api.js +1 -1
  1343. package/dist/view-api.js.map +1 -1
  1344. package/dist/wake-coordinator.js +3 -2
  1345. package/dist/wake-coordinator.js.map +1 -1
  1346. package/dist/web-api.d.ts +62 -6
  1347. package/dist/web-api.js +1050 -212
  1348. package/dist/web-api.js.map +1 -1
  1349. package/dist/web-asset-version.d.ts +65 -0
  1350. package/dist/web-asset-version.js +259 -0
  1351. package/dist/web-asset-version.js.map +1 -0
  1352. package/dist/web-backend-login.d.ts +5 -1
  1353. package/dist/web-backend-login.js +8 -2
  1354. package/dist/web-backend-login.js.map +1 -1
  1355. package/dist/web-chat-archive.d.ts +147 -0
  1356. package/dist/web-chat-archive.js +530 -0
  1357. package/dist/web-chat-archive.js.map +1 -0
  1358. package/dist/web-chat-history.d.ts +128 -2
  1359. package/dist/web-chat-history.js +320 -12
  1360. package/dist/web-chat-history.js.map +1 -1
  1361. package/dist/web-claude-credentials.d.ts +31 -0
  1362. package/dist/web-claude-credentials.js +138 -0
  1363. package/dist/web-claude-credentials.js.map +1 -0
  1364. package/dist/web-commands.d.ts +9 -5
  1365. package/dist/web-commands.js +7 -4
  1366. package/dist/web-commands.js.map +1 -1
  1367. package/dist/web-guest-access.d.ts +3 -0
  1368. package/dist/web-guest-access.js +8 -4
  1369. package/dist/web-guest-access.js.map +1 -1
  1370. package/dist/web-host-guard.js +3 -1
  1371. package/dist/web-host-guard.js.map +1 -1
  1372. package/dist/web-host-install.d.ts +30 -3
  1373. package/dist/web-host-install.js +50 -4
  1374. package/dist/web-host-install.js.map +1 -1
  1375. package/dist/web-icons.js +3 -3
  1376. package/dist/web-icons.js.map +1 -1
  1377. package/dist/web-login.d.ts +7 -0
  1378. package/dist/web-login.js +8 -1
  1379. package/dist/web-login.js.map +1 -1
  1380. package/dist/web-mentions.d.ts +2 -0
  1381. package/dist/web-mentions.js +20 -0
  1382. package/dist/web-mentions.js.map +1 -1
  1383. package/dist/web-notices.d.ts +20 -0
  1384. package/dist/web-notices.js +64 -8
  1385. package/dist/web-notices.js.map +1 -1
  1386. package/dist/web-office-skins.d.ts +14 -3
  1387. package/dist/web-office-skins.js +66 -21
  1388. package/dist/web-office-skins.js.map +1 -1
  1389. package/dist/web-office-store.d.ts +2 -0
  1390. package/dist/web-office-store.js +20 -6
  1391. package/dist/web-office-store.js.map +1 -1
  1392. package/dist/web-pin-store.d.ts +58 -0
  1393. package/dist/web-pin-store.js +170 -0
  1394. package/dist/web-pin-store.js.map +1 -0
  1395. package/dist/web-prefs.js +5 -1
  1396. package/dist/web-prefs.js.map +1 -1
  1397. package/dist/web-reply-files.d.ts +1 -0
  1398. package/dist/web-reply-files.js +2 -0
  1399. package/dist/web-reply-files.js.map +1 -1
  1400. package/dist/web-session-authorization.d.ts +24 -0
  1401. package/dist/web-session-authorization.js +32 -0
  1402. package/dist/web-session-authorization.js.map +1 -1
  1403. package/dist/web-session.d.ts +26 -5
  1404. package/dist/web-session.js +32 -3
  1405. package/dist/web-session.js.map +1 -1
  1406. package/dist/web-settings-patch.d.ts +24 -3
  1407. package/dist/web-settings-patch.js +57 -1
  1408. package/dist/web-settings-patch.js.map +1 -1
  1409. package/dist/web-shell-routes.d.ts +2 -2
  1410. package/dist/web-shell-routes.js +3 -2
  1411. package/dist/web-shell-routes.js.map +1 -1
  1412. package/dist/web-terminal.d.ts +9 -0
  1413. package/dist/web-terminal.js +27 -1
  1414. package/dist/web-terminal.js.map +1 -1
  1415. package/dist/web-theme.js +2 -2
  1416. package/dist/web-update.d.ts +15 -1
  1417. package/dist/web-upload.d.ts +37 -1
  1418. package/dist/web-upload.js +105 -5
  1419. package/dist/web-upload.js.map +1 -1
  1420. package/dist/windows-cli-api.d.ts +10 -7
  1421. package/dist/windows-cli-api.js +13 -12
  1422. package/dist/windows-cli-api.js.map +1 -1
  1423. package/dist/windows-cli-worker.d.ts +10 -0
  1424. package/dist/windows-cli-worker.js +109 -14
  1425. package/dist/windows-cli-worker.js.map +1 -1
  1426. package/dist/windows-cli.d.ts +10 -1
  1427. package/dist/windows-cli.js +47 -13
  1428. package/dist/windows-cli.js.map +1 -1
  1429. package/dist/windows-native-mcp.js +5 -2
  1430. package/dist/windows-native-mcp.js.map +1 -1
  1431. package/dist/workflow-templates/default.md +4 -6
  1432. package/launcher/agend-install.cjs +48 -7
  1433. package/package.json +1 -1
  1434. package/templates/runtime-install/install.ps1 +24 -4
package/dist/daemon.js CHANGED
@@ -1,5 +1,10 @@
1
+ import { managedClaudeBinding } from "./claude-credential-launch.js";
2
+ import { HUB_REPORT_TARGET } from "./hub-report-target.js";
3
+ import { RoomConversationGeneration, roomContextInputMarker } from "./hub-room-conversation.js";
1
4
  import { checkpointGrokDelivery } from "./grok-delivery-proof.js";
2
5
  import { nativePaneToolRefusal } from "./native-pane-tools.js";
6
+ import { classicGuardInventory, classicPlanDigest, invalidateClassicGuard } from "./classic-cli-guard.js";
7
+ import { CLASSIC_RESTRICTED_TOOLS } from "./contact-auth-types.js";
3
8
  import { generalByName } from "./general-instance.js";
4
9
  import { ClaudeModelObserver, normalizeClaudeModel } from "./claude-model-observation.js";
5
10
  import { codexMetadataHomes } from "./backend/codex-metadata.js";
@@ -15,6 +20,7 @@ import { join, dirname, basename, resolve } from "node:path";
15
20
  import { checkoutTarget, readCheckouts, releaseCandidate, reposRoot, verifyWorktree, writeCheckouts } from "./repo-worktree-guard.js";
16
21
  import { mkdirSync, writeFileSync, readFileSync, readdirSync, existsSync, unlinkSync, rmSync, appendFileSync, statSync, renameSync } from "node:fs";
17
22
  import { COMPACT_WATCH_TIMEOUT_MS, launchIdentity } from "./compact-watch.js";
23
+ import { TurnWatch } from "./dispatcher-liveness.js";
18
24
  import { KIRO_COMPACT_PANE_LINES, KiroCompactPaneFollower } from "./kiro-compact-pane.js";
19
25
  import { clearKiroSessionProof, proveKiroSessionId, recordKiroSessionProof } from "./kiro-session-proof.js";
20
26
  import { fileURLToPath } from "node:url";
@@ -79,6 +85,8 @@ import { QUEUED_HANDOFF_MAX_REDELIVERIES, QueuedHandoffStore } from "./queued-ha
79
85
  import { measureSyncWork, noteSyncWork } from "./sync-work-attribution.js";
80
86
  import { TranscriptDeltaReader } from "./transcript-delta-reader.js";
81
87
  import { checkpointCodexPane } from "./codex-pane-ownership.js";
88
+ import { codexAppliedFromRollout, codexRunningVersion, codexSupportsInlineModel, codexSwitchAnswerCount, codexSwitchFromPane, readFrom } from "./backend/codex-model-switch.js";
89
+ import { CLI_RUNTIME_SWITCH, cliRunningVersion, cliSwitchAllowed } from "./backend/cli-runtime-switch.js";
82
90
  import { buildResumeContinuation, clearInFlightTurnMarker, consumeInFlightTurnMarker, decideTurnResume, normalizeResumeBackend, readResumeFingerprint, RESUME_BLOCKING_DELIVERY_STATES, writeInFlightTurnMarker, } from "./turn-resume.js";
83
91
  import { codexLiveRowMatches } from "./backend/codex.js";
84
92
  import { codexPackageProblemMessage } from "./backend/codex-package.js";
@@ -109,7 +117,7 @@ const WEB_THEME_IPC = Object.freeze({
109
117
  });
110
118
  /** The largest picture any slot may take (a card slot's ceiling; the fleet checks the limit in force): read no more. */
111
119
  const WEB_THEME_ASSET_MAX_BYTES = ASSET_UPLOAD_MAX_BYTES;
112
- const CROSS_INSTANCE_TOOLS = new Set(["send_to_instance", "broadcast", "list_instances", "start_instance", "restart_instance", "create_instance", "delete_instance", "replace_instance", "request_information", "delegate_task", "report_result", "delivery_status", "describe_instance"]);
120
+ const CROSS_INSTANCE_TOOLS = new Set(["hub_set_intro", "hub_room_status", "hub_room_list", "hub_room_post", "hub_room_members", "hub_people_search", "send_to_instance", "broadcast", "list_instances", "start_instance", "restart_instance", "create_instance", "delete_instance", "replace_instance", "request_information", "delegate_task", "report_result", "delivery_status", "describe_instance"]);
113
121
  const SCHEDULE_TOOLS = new Set(["create_schedule", "list_schedules", "update_schedule", "delete_schedule"]);
114
122
  const DECISION_TOOLS = new Set(["post_decision", "list_decisions", "update_decision"]);
115
123
  const TASK_TOOL = "task";
@@ -155,6 +163,10 @@ export const DEFAULT_STATE_IDLE_DEBOUNCE_MS = 2_000;
155
163
  export const DEFAULT_STATE_SAFETY_SWEEP_MS = 60_000;
156
164
  /** Coalesce one cosmetic-redraw burst before comparing the visible pane. */
157
165
  export const PERIODIC_REDRAW_PROBE_MS = 25;
166
+ /** M-3239: a turn's progress reaches the fleet at most this often while it runs. */
167
+ const TURN_ACTIVITY_REPORT_MS = 30_000;
168
+ /** M-3239: after the idle edge, the transcript's last lines (the final answer) are read within this. */
169
+ const TURN_END_SETTLE_MS = 5_000;
158
170
  /** Board 907c7899: how often a kiro /compact's pane is read (TUI V2's "too short" shows for about ten seconds). */
159
171
  const KIRO_COMPACT_PANE_POLL_MS = 1_000;
160
172
  /** Do not turn a streaming Codex turn into one capture-pane per burst. */
@@ -187,7 +199,7 @@ const HEALTH_ERROR_NOTIFY_INTERVAL_MS = 10 * 60_000;
187
199
  * Whether two working directories belong to the same project, so a fleet-scoped
188
200
  * decision recorded in one reaches the other. Covers the worktree/checkout
189
201
  * layout AgEnD fleets actually use — `AgEnD`, `AgEnD-dev1`, `AgEnD-dev2`,
190
- * `AgEnD-reviewer`, `AgEnD-main` are one project; `DouPo_Server` is not.
202
+ * `AgEnD-reviewer`, `AgEnD-main` are one project; `GameServer` is not.
191
203
  * Nesting counts too (a subdirectory of a project belongs to it).
192
204
  */
193
205
  export function sameProjectFamily(a, b) {
@@ -563,6 +575,13 @@ const STARTUP_DIALOG_BUDGET_MS = 30_000;
563
575
  export const OWN_SWITCH_WAIT_MS = 6_000;
564
576
  /** #1690: after an answer to that dialog, how long it gets to go away. */
565
577
  const OWN_SWITCH_SETTLE_MS = 3_000;
578
+ /** M-3175: how long a codex switch waits for the pane to be idle before it is not typed (the fleet then restarts instead). */
579
+ const CODEX_SWITCH_IDLE_MS = 60_000;
580
+ /** M-3175: how long codex gets to record the switch (rollout) or answer it (pane) after it is typed. */
581
+ const CODEX_SWITCH_VERIFY_MS = 10_000;
582
+ /** M-3175: the scrollback read around a codex switch (codex's answer rows are counted in it) and the most of a rollout delta read. */
583
+ const CODEX_SWITCH_HISTORY_LINES = 200;
584
+ const CODEX_SWITCH_ROLLOUT_READ = 4 * 1024 * 1024;
566
585
  /** A blocking dialog still on screen this long after first being seen is reported for a human. */
567
586
  const DIALOG_PARKED_NOTIFY_MS = 60_000;
568
587
  /** #2675: a card a person can answer from the chat is posted once it has been on screen, unchanged, this long. */
@@ -660,7 +679,7 @@ const INPUT_TRANSIENT_STALL_MS = 30_000;
660
679
  */
661
680
  const INPUT_TRANSIENT_WAIT_MS = 10 * 60_000;
662
681
  const INPUT_TRANSIENT_POLL_MS = 250;
663
- /** Max "stranded text → submit → wait for prompt → re-check" rounds per delivery; each may send one recovery Enter. */
682
+ /** Max actual stranded-text recovery Enters per delivery; a busy observation spends none. */
664
683
  const STRANDED_INPUT_MAX_ROUNDS = 3;
665
684
  /** The Claude phrasing every backend was judged by before #1217; still the default for a backend that names none. */
666
685
  const LEGACY_NO_CONVERSATION = /no conversation found|no conversation to (continue|resume)|no previous (session|conversation)/i;
@@ -676,6 +695,8 @@ const INPUT_RESIDUE_POLL_MS = 100;
676
695
  const RECENT_PASTES_KEPT = 8;
677
696
  /** Build a status holder from channel metadata, keeping chat and thread apart. */
678
697
  export function channelStatus(meta) {
698
+ if (meta.source === "app")
699
+ return undefined; // no platform post exists to react to
679
700
  const chatId = meta.chat_id;
680
701
  const messageId = meta.message_id;
681
702
  // A web chat message has no platform chat when the fleet has no channel, and still gets its reports:
@@ -1550,6 +1571,8 @@ export class Daemon extends EventEmitter {
1550
1571
  * instance is still auth-broken and must not resume raising alarms.
1551
1572
  */
1552
1573
  authFailureUnresolved = false;
1574
+ /** A process-local login failure cannot be repaired by a valid auth file or idle chrome. */
1575
+ staleAuth = null;
1553
1576
  /** One login-screen auth report per spawn — the screen persists across polls. */
1554
1577
  loginScreenReported = false;
1555
1578
  /** #2795: the auth pattern match the token-free check is still to judge; it arms nothing until confirmAuthFailure(). */
@@ -1843,7 +1866,7 @@ export class Daemon extends EventEmitter {
1843
1866
  if (!["codex", "grok"].includes(this.backend?.binaryName ?? ""))
1844
1867
  return [];
1845
1868
  const patterns = this.backend?.getErrorPatterns?.() ?? [];
1846
- return this.backend?.binaryName === "codex" ? patterns.filter(ep => Daemon.isCodexUsageLimitPause(ep)) : patterns.filter(ep => ep.type === "quota");
1869
+ return this.backend?.binaryName === "codex" ? patterns.filter(ep => Daemon.isCodexUsageLimitPause(ep) || ep.type === "stale_auth") : patterns.filter(ep => ep.type === "quota");
1847
1870
  }
1848
1871
  async prepareQuotaReplayHistory(reuseWindow) {
1849
1872
  this.quotaReplay = null;
@@ -1867,7 +1890,20 @@ export class Daemon extends EventEmitter {
1867
1890
  if (!current())
1868
1891
  return;
1869
1892
  const patterns = this.paneQuotaPatterns();
1870
- const messages = oldPane.split(/\r?\n/).filter(row => patterns.some(ep => ep.pattern.test(row)));
1893
+ // A quota frame can span several wrapped rows. Keep the complete rows
1894
+ // each actual match covered, rather than testing the rows independently.
1895
+ // Exact spans dedupe overlapping rules without collapsing repeated hits.
1896
+ const spans = new Map();
1897
+ for (const ep of patterns) {
1898
+ const flags = ep.pattern.flags.includes("g") ? ep.pattern.flags : ep.pattern.flags + "g";
1899
+ for (const match of oldPane.matchAll(new RegExp(ep.pattern.source, flags))) {
1900
+ const start = oldPane.lastIndexOf("\n", match.index) + 1;
1901
+ const newline = oldPane.indexOf("\n", match.index + match[0].length);
1902
+ const end = newline < 0 ? oldPane.length : newline;
1903
+ spans.set(`${start}:${end}`, oldPane.slice(start, end));
1904
+ }
1905
+ }
1906
+ const messages = [...spans.values()];
1871
1907
  this.quotaReplay = { messages, current: () => true, spawn, fence, attempt };
1872
1908
  }
1873
1909
  }
@@ -1883,7 +1919,13 @@ export class Daemon extends EventEmitter {
1883
1919
  this.quotaReplay = null;
1884
1920
  if (history.spawn !== this.spawnGeneration || history.fence !== this.launchFenceEpoch || history.attempt !== this.launchAttempt || !history.current())
1885
1921
  return;
1886
- for (const ep of this.paneQuotaPatterns()) {
1922
+ const patterns = this.paneQuotaPatterns();
1923
+ // Grok's old quota frame can also contain a 401. That same proven frame
1924
+ // must not arm the auth gate after its quota was absorbed as history.
1925
+ if (this.backend?.binaryName === "grok") {
1926
+ patterns.push(...(this.backend.getErrorPatterns?.() ?? []).filter(ep => ep.type === "auth_error"));
1927
+ }
1928
+ for (const ep of patterns) {
1887
1929
  const count = Math.min(Daemon.countOccurrences(ep.pattern, pane), quotaHistoryCount(pane, ep.pattern, history.messages));
1888
1930
  if (!count)
1889
1931
  continue;
@@ -1905,7 +1947,7 @@ export class Daemon extends EventEmitter {
1905
1947
  this.quotaInput = history.marker && history.occurrences === 0 ? { history, reported: new Map() } : null;
1906
1948
  }
1907
1949
  quotaOccurrencesAfterInput(pane, ep) {
1908
- if (!(this.backend?.binaryName === "codex" && Daemon.isCodexUsageLimitPause(ep)
1950
+ if (!(this.backend?.binaryName === "codex" && (Daemon.isCodexUsageLimitPause(ep) || ep.type === "stale_auth")
1909
1951
  || this.backend?.binaryName === "grok" && ep.type === "quota"))
1910
1952
  return null;
1911
1953
  const input = this.quotaInput, history = input?.history;
@@ -2069,6 +2111,10 @@ export class Daemon extends EventEmitter {
2069
2111
  }
2070
2112
  return super.emit(event, ...args);
2071
2113
  }
2114
+ /** Attention remains active for General/busy agents too, until a new launch takes ownership. */
2115
+ staleAuthIssue() {
2116
+ return this.staleAuth?.generation === this.spawnGeneration ? { since: this.staleAuth.since } : null;
2117
+ }
2072
2118
  /**
2073
2119
  * Undo an auth suspicion once the backend's token-free probe has said the credentials are fine. Since #2795 a pane
2074
2120
  * pattern match arms nothing before that probe (its pending match is just dropped); what is left to undo is a
@@ -2077,6 +2123,8 @@ export class Daemon extends EventEmitter {
2077
2123
  * is still live and stays.
2078
2124
  */
2079
2125
  clearSuspectedAuthFailure() {
2126
+ if (this.staleAuthIssue())
2127
+ return false;
2080
2128
  this.unverifiedAuthMatch = null;
2081
2129
  if (!this.authFailureUnresolved && !this.loginScreenReported)
2082
2130
  return false;
@@ -2194,6 +2242,63 @@ export class Daemon extends EventEmitter {
2194
2242
  fleetTransportAvailable() {
2195
2243
  return this.nativePaneLifecycle ? !!this.nativeFleetBridge?.current() && !this.runtimeMonitorsFrozen : !!this.ipcServer;
2196
2244
  }
2245
+ classicRestriction;
2246
+ classicRestrictionFailed = false;
2247
+ classicRestrictionNeedsRestart = false;
2248
+ setClassicRestriction(input) {
2249
+ if (this.runtimeIdentity?.kind !== "classic") {
2250
+ if (input?.mode === "legacy")
2251
+ return; // The optional adapter also sees existing/default-kind starts.
2252
+ throw Error("Classic restriction requires a Classic room");
2253
+ }
2254
+ try {
2255
+ if (!input || !["legacy", "restricted"].includes(input.mode))
2256
+ throw Error("invalid-policy");
2257
+ const next = input.mode === "restricted" ? { roomKey: this.name, policyRevision: input.policyRevision ?? 0,
2258
+ publicRead: input.roomTools.publicRead, allowedMcpTools: structuredClone(input.roomTools.allowedMcpTools),
2259
+ allowedAgendTools: [...CLASSIC_RESTRICTED_TOOLS] } : undefined;
2260
+ // A1's revision also changes for contact grants and approvers. Validate it,
2261
+ // but preserve the frozen launch when the native tool policy is unchanged.
2262
+ if (next)
2263
+ classicPlanDigest(next);
2264
+ const before = this.classicRestriction ? classicPlanDigest({ ...this.classicRestriction, policyRevision: 0 }) : null;
2265
+ const after = next ? classicPlanDigest({ ...next, policyRevision: 0 }) : null;
2266
+ if (before !== after) {
2267
+ invalidateClassicGuard(this.instanceDir);
2268
+ if (this.classicRestriction && !next && this.processStatus === "running")
2269
+ this.classicRestrictionNeedsRestart = true;
2270
+ this.classicRestriction = next;
2271
+ }
2272
+ this.classicRestrictionFailed = false;
2273
+ }
2274
+ catch {
2275
+ this.classicRestrictionFailed = true;
2276
+ try {
2277
+ invalidateClassicGuard(this.instanceDir);
2278
+ }
2279
+ catch { /* failed remains visible and refuses the next launch */ }
2280
+ }
2281
+ }
2282
+ assertClassicRestrictionLaunch(expected) {
2283
+ const current = this.classicRestriction ? classicPlanDigest(this.classicRestriction) : null;
2284
+ if (this.classicRestrictionFailed || current !== expected)
2285
+ throw Error("Restricted room policy changed while CLI launch was being prepared");
2286
+ }
2287
+ classicNativeGuard() {
2288
+ const backend = this.config.backend ?? this.backend?.binaryName ?? "unknown";
2289
+ if (this.classicRestrictionFailed)
2290
+ return classicGuardInventory({ state: "failed", backend, reason: "guard-unavailable" });
2291
+ if (!this.classicRestriction)
2292
+ return classicGuardInventory(this.classicRestrictionNeedsRestart
2293
+ ? { state: "restart-required", backend, reason: "stale-policy" }
2294
+ : { state: "not-covered", backend, reason: "legacy-mode" });
2295
+ if (this.nativePaneLifecycle)
2296
+ return classicGuardInventory({ state: "not-covered", backend, reason: "unsupported-platform" });
2297
+ const status = this.backend?.classicNativeGuard?.(this.classicRestriction)
2298
+ ?? { state: "not-covered", backend, reason: "unsupported-backend" };
2299
+ return classicGuardInventory(status.state === "ready" && this.processStatus !== "running"
2300
+ ? { state: "restart-required", backend, reason: "not-running" } : status);
2301
+ }
2197
2302
  /** Internal lifecycle injection, before start. Native paths and provider files stay on their runner. */
2198
2303
  setNativePaneLifecycle(native) {
2199
2304
  if (this.tmux || this.ipcServer || this.nativePaneLifecycle)
@@ -2279,6 +2384,58 @@ export class Daemon extends EventEmitter {
2279
2384
  setStatusEmojiAvoidList(list) {
2280
2385
  this.statusEmojiAvoidList = list;
2281
2386
  }
2387
+ credentialChangeIncarnation = null;
2388
+ /** Claim an idle local Claude pane for an account change; queued input cannot race the final capture. */
2389
+ async quiesceClaudeCredential() {
2390
+ const spawn = this.spawnGeneration, fence = this.launchFenceEpoch;
2391
+ return this.paneWriteLock.run(async () => {
2392
+ const turn = this.turnReplyGuard.snapshot(), deliveryEpoch = this.deliveryEpoch;
2393
+ if (turn && !turn.cancelledByUser && !turn.completionDelivered)
2394
+ return false;
2395
+ if (this.backend?.binaryName !== "claude" || this.usesNativePane() || this.spawning || this.healthCheckPaused || this.deliveryWritesStopping || this.startupAborted || this.isPaused)
2396
+ return false;
2397
+ if (!await this.isPaneAuthoritativelyIdle())
2398
+ return false;
2399
+ const windowId = this.tmux?.getWindowId();
2400
+ if (!windowId)
2401
+ return false;
2402
+ let pid = null;
2403
+ try {
2404
+ pid = await this.paneHost.getPanePid(this.tmuxSessionName, windowId);
2405
+ }
2406
+ catch {
2407
+ return false;
2408
+ }
2409
+ if (pid === null || !Number.isSafeInteger(pid) || pid <= 1 || windowId !== this.tmux?.getWindowId())
2410
+ return false;
2411
+ // A tool pause can look idle. Re-read the owned logical turn after both
2412
+ // pane awaits; new input or another turn must not inherit this idle proof.
2413
+ const currentTurn = this.turnReplyGuard.snapshot();
2414
+ if ((currentTurn && !currentTurn.cancelledByUser && !currentTurn.completionDelivered) || currentTurn?.generation !== turn?.generation || deliveryEpoch !== this.deliveryEpoch)
2415
+ return false;
2416
+ if (spawn !== this.spawnGeneration || fence !== this.launchFenceEpoch || this.spawning || this.healthCheckPaused || this.deliveryWritesStopping || this.startupAborted || this.isPaused)
2417
+ return false;
2418
+ this.credentialChangeIncarnation = { windowId, pid };
2419
+ this.fenceDeliveryWritesForStop();
2420
+ return true;
2421
+ });
2422
+ }
2423
+ /** Read-only proof for the exact pane captured above; never kill a replacement window. */
2424
+ async claudeCredentialRetired() {
2425
+ const inc = this.credentialChangeIncarnation;
2426
+ if (!inc)
2427
+ return false;
2428
+ try {
2429
+ const windows = await TmuxManager.listWindowsStrict(this.tmuxSessionName);
2430
+ if (!windows.some(window => window.id === inc.windowId))
2431
+ return true;
2432
+ const pid = await this.paneHost.getPanePid(this.tmuxSessionName, inc.windowId);
2433
+ return pid !== null && pid !== inc.pid;
2434
+ }
2435
+ catch {
2436
+ return false;
2437
+ }
2438
+ }
2282
2439
  /** Fence pane writers before lifecycle captures pre-kill reconciliation evidence. */
2283
2440
  fenceDeliveryWritesForStop() {
2284
2441
  if (this.deliveryWritesStopping)
@@ -2455,25 +2612,26 @@ export class Daemon extends EventEmitter {
2455
2612
  if (!["claude-code", "codex"].includes(backend))
2456
2613
  return;
2457
2614
  const marker = durableAttempt ? `[agend-delivery-id:${durableAttempt.deliveryId}]`
2458
- : humanVerificationId ? verdict.humanReceipt?.marker ?? `[agend-human-id:${humanVerificationId}]` : null;
2615
+ : humanVerificationId ? verdict.humanReceipt?.marker ?? `[agend-human-id:${humanVerificationId}]` : roomContextInputMarker(track.meta);
2459
2616
  if (!marker || !formatted.startsWith(marker))
2460
2617
  return;
2461
2618
  let found = verdict.transcriptCheckpoint ?? null;
2462
2619
  if (!found) {
2463
2620
  try {
2464
- found = await this.transcriptMonitor?.reconciliationCheckpoint() ?? null;
2621
+ // M-2403: a native or remote pane checkpoints its runtime transcript (no local file); a local CLI, its file.
2622
+ const runtime = this.nativePaneLifecycle ? await this.transcriptMonitor?.reconciliationRuntimeCheckpoint() ?? null : null;
2623
+ found = runtime ? { runtime } : await this.transcriptMonitor?.reconciliationCheckpoint() ?? null;
2465
2624
  }
2466
2625
  catch (err) {
2467
2626
  this.logger.debug({ err }, "Could not checkpoint the transcript before a queued hand-off");
2468
2627
  }
2469
2628
  }
2470
- // main→alpha sync: a hand-off record is judged against a local transcript file. A native or remote runtime's
2471
- // transcript (no local path) has none: it runs as before (✅ at the hand-off), as with no checkpoint at all.
2472
- const checkpoint = found && typeof found.path === "string" && typeof found.offset === "number" ? { path: found.path, offset: found.offset } : null;
2629
+ const checkpoint = found?.runtime ? { runtime: found.runtime }
2630
+ : found && typeof found.path === "string" && typeof found.offset === "number" ? { path: found.path, offset: found.offset } : null;
2473
2631
  if (!checkpoint)
2474
2632
  return; // nothing could judge it later: it runs as before (✅ at the hand-off)
2475
2633
  const entry = {
2476
- id: track.id ?? randomUUID(), marker, backend, path: checkpoint.path, offset: checkpoint.offset,
2634
+ id: track.id ?? randomUUID(), marker, backend, ...checkpoint,
2477
2635
  content: track.content, meta: track.meta, wire: formatted, holder: this.handoffHolder(), createdAt: Date.now(),
2478
2636
  redeliveries: track.redeliveries ?? 0,
2479
2637
  };
@@ -2504,6 +2662,8 @@ export class Daemon extends EventEmitter {
2504
2662
  this.dropQueuedHandoff(verdict);
2505
2663
  return;
2506
2664
  }
2665
+ if (sent && !verdict.roomInputQueued && meta.hub_room_context_generation)
2666
+ this.roomInputHandedOff(meta);
2507
2667
  const id = meta.handoff_redelivery;
2508
2668
  if (!id)
2509
2669
  return;
@@ -2545,12 +2705,24 @@ export class Daemon extends EventEmitter {
2545
2705
  */
2546
2706
  watchQueuedHandoff(entry) {
2547
2707
  const spawn = this.spawnGeneration, fence = this.launchFenceEpoch, epoch = this.deliveryEpoch;
2708
+ // M-2403: a native or remote pane's record is read through its runner (the runtime reader), a local one from its file.
2709
+ let source;
2710
+ if (entry.runtime) {
2711
+ try {
2712
+ source = { reader: this.nativeTranscriptReader(entry.runtime, { marker: entry.marker, ...(entry.wire !== undefined ? { wire: entry.wire } : {}) }) };
2713
+ }
2714
+ catch (err) {
2715
+ this.logger.debug({ err, handoff: entry.id }, "Queued hand-off: its pane's transcript is not readable now");
2716
+ return this.settleQueuedHandoff(entry, "unverifiable", "transcript:unavailable");
2717
+ }
2718
+ }
2719
+ else
2720
+ source = { path: entry.path, offset: entry.offset };
2548
2721
  const started = consumedWatches.start({
2549
2722
  deliveryId: `handoff:${entry.id}`,
2550
2723
  attemptNo: entry.redeliveries,
2551
2724
  backend: entry.backend,
2552
- path: entry.path,
2553
- offset: entry.offset,
2725
+ ...source,
2554
2726
  marker: entry.marker,
2555
2727
  ...(entry.wire !== undefined ? { wire: entry.wire } : {}),
2556
2728
  // A cancel or stop moves the epoch: the watch ends quietly (a cancel cleared the record, a stop leaves it).
@@ -2581,6 +2753,8 @@ export class Daemon extends EventEmitter {
2581
2753
  const meta = entry.meta;
2582
2754
  const status = channelStatus(meta);
2583
2755
  if (outcome === "taken") {
2756
+ if (meta.hub_room_context_generation)
2757
+ this.roomInputHandedOff(meta);
2584
2758
  this.logger.info({ handoff: entry.id, proof, redeliveries: entry.redeliveries }, "Queued hand-off taken by the CLI");
2585
2759
  if (status)
2586
2760
  this.emit("message_confirmed", status);
@@ -2628,8 +2802,20 @@ export class Daemon extends EventEmitter {
2628
2802
  const spawn = this.spawnGeneration, fence = this.launchFenceEpoch, epoch = this.deliveryEpoch;
2629
2803
  const fresh = () => spawn === this.spawnGeneration && fence === this.launchFenceEpoch && epoch === this.deliveryEpoch
2630
2804
  && !this.deliveryWritesStopping;
2631
- let redelivered = 0, taken = 0, unverifiable = 0;
2805
+ let redelivered = 0, taken = 0, unverifiable = 0, watching = 0;
2632
2806
  for (const entry of entries) {
2807
+ if (entry.runtime) {
2808
+ const outcome = await this.reconcileRuntimeHandoff(entry, holder, fresh);
2809
+ if (outcome === "stale")
2810
+ return;
2811
+ if (outcome === "taken")
2812
+ taken++;
2813
+ else if (outcome === "unverifiable")
2814
+ unverifiable++;
2815
+ else if (outcome === "watching")
2816
+ watching++;
2817
+ continue;
2818
+ }
2633
2819
  const kind = await scanTranscriptForDeliveryMarker(entry.path, entry.offset, entry.backend, { marker: entry.marker, ...(entry.wire !== undefined ? { wire: entry.wire } : {}) });
2634
2820
  // This CLI is gone already, or a cancel came: the next CLI settles them (a cancel cleared them).
2635
2821
  if (!fresh())
@@ -2669,7 +2855,71 @@ export class Daemon extends EventEmitter {
2669
2855
  this.pushChannelMessage(entry.content, { ...meta, handoff_redelivery: entry.id,
2670
2856
  handoff_redeliveries: String(next.redeliveries), handoff_holder: next.holder }, undefined, epoch);
2671
2857
  }
2672
- this.logger.info({ instance: this.name, redelivered, taken, unverifiable, proof: "transcript" }, "Queued hand-offs left by the previous CLI settled");
2858
+ this.logger.info({ instance: this.name, redelivered, taken, unverifiable, watching, proof: "transcript" }, "Queued hand-offs left by the previous CLI settled");
2859
+ }
2860
+ /**
2861
+ * M-2403: a native or remote pane's record, after this daemon came up. Its runner may have kept the CLI (and its queue)
2862
+ * across the coordinator's restart, so nothing here proves the queue is gone, and a runtime record is never
2863
+ * redelivered. Read through the runner from its checkpoint (bounded, as reconcileNativePaneTarget): taken → ✅; the
2864
+ * same launch still current with the marker not taken yet → watched again under this CLI; that launch gone, or its
2865
+ * transcript unreadable → unverifiable (reported, never pasted again).
2866
+ */
2867
+ async reconcileRuntimeHandoff(entry, holder, fresh) {
2868
+ const still = () => {
2869
+ let current;
2870
+ try {
2871
+ current = this.handoffStore().get(entry.id);
2872
+ }
2873
+ catch {
2874
+ current = undefined;
2875
+ }
2876
+ return !!current && current.holder === entry.holder && current.redeliveries === entry.redeliveries;
2877
+ };
2878
+ const native = this.nativePaneLifecycle;
2879
+ let kind = null;
2880
+ if (native?.current(entry.runtime)) {
2881
+ let reader;
2882
+ try {
2883
+ reader = this.nativeTranscriptReader(entry.runtime, { marker: entry.marker, ...(entry.wire !== undefined ? { wire: entry.wire } : {}) });
2884
+ for (let n = 0; n < 8; n++) {
2885
+ const before = reader.readPosition, look = await reader.look();
2886
+ if (!fresh())
2887
+ return "stale";
2888
+ kind = look;
2889
+ if (markerConsumed(look) || look === "unavailable" || look === "pending" || reader.readPosition === before)
2890
+ break;
2891
+ }
2892
+ }
2893
+ catch {
2894
+ kind = "unavailable";
2895
+ }
2896
+ finally {
2897
+ reader?.close?.();
2898
+ }
2899
+ }
2900
+ if (!fresh())
2901
+ return "stale";
2902
+ if (!still())
2903
+ return "skipped";
2904
+ if (kind && markerConsumed(kind)) {
2905
+ this.settleQueuedHandoff(entry, "taken", `restart-transcript:${kind}`);
2906
+ return "taken";
2907
+ }
2908
+ if (kind === null || kind === "unavailable" || !native?.current(entry.runtime)) {
2909
+ this.settleQueuedHandoff(entry, "unverifiable", "restart-transcript:unavailable");
2910
+ return "unverifiable";
2911
+ }
2912
+ // The same launch still holds it in its queue: this CLI watches it from where the read stopped.
2913
+ const next = { ...entry, holder };
2914
+ try {
2915
+ this.handoffStore().put(next);
2916
+ }
2917
+ catch (err) {
2918
+ this.logger.warn({ err, handoff: entry.id }, "Could not update a queued hand-off record");
2919
+ return "skipped";
2920
+ }
2921
+ this.watchQueuedHandoff(next);
2922
+ return "watching";
2673
2923
  }
2674
2924
  finishDurableSubmission(delivery, verdict) {
2675
2925
  // Legacy backends may accept a pane write without enough pane evidence to
@@ -2859,6 +3109,8 @@ export class Daemon extends EventEmitter {
2859
3109
  const oomStop = readSessionOomStop(this.instanceDir);
2860
3110
  if (oomStop.blocked)
2861
3111
  return sessionOomStopHint(oomStop);
3112
+ if (this.staleAuthIssue())
3113
+ return t("inst.codex_stale_auth");
2862
3114
  if (this.pauseWakeState !== "active")
2863
3115
  return t("delivery.hold_state", this.pauseWakeState);
2864
3116
  if (this.inputBlockedDialogKey !== null)
@@ -3133,6 +3385,7 @@ export class Daemon extends EventEmitter {
3133
3385
  }
3134
3386
  if (nativeDisposition)
3135
3387
  this.isNewSession = nativeDisposition === "fresh";
3388
+ this.resetRoomConversation(nativeDisposition === "reattached");
3136
3389
  // #1209: conditional continuation for the turn interrupted by the last
3137
3390
  // restart, if the gates allow. Detached; the gate
3138
3391
  // consumes its one-shot marker first and never throws into boot.
@@ -3712,9 +3965,12 @@ export class Daemon extends EventEmitter {
3712
3965
  return;
3713
3966
  }
3714
3967
  const native = this.nativePaneLifecycle, pane = this.tmux;
3968
+ const footprintObservedAt = this.footprintEnabled ? Date.now() : 0, footprintOwner = this.footprintEnabled ? JSON.stringify(this.interactionOwner()) : null;
3715
3969
  const status = await pane?.getPaneStatus();
3716
3970
  if (this.runtimeMonitorsFrozen || native !== this.nativePaneLifecycle || pane !== this.tmux)
3717
3971
  return;
3972
+ if (this.footprintEnabled && status?.alive && status.pid && footprintOwner === JSON.stringify(this.interactionOwner()))
3973
+ this.footprintPane = { pid: status.pid, owner: footprintOwner, observedAt: footprintObservedAt, pane };
3718
3974
  const snapshot = native.snapshot?.();
3719
3975
  if (status?.alive === false && snapshot?.state === "exited") {
3720
3976
  this.healthCheckPaused = true;
@@ -3755,12 +4011,15 @@ export class Daemon extends EventEmitter {
3755
4011
  scheduleNext();
3756
4012
  return true;
3757
4013
  };
4014
+ const footprintObservedAt = this.footprintEnabled ? Date.now() : 0;
3758
4015
  let paneStatus = await healthTmux.getPaneStatus();
3759
4016
  // Auto-pause intentionally exits the pane process. A health tick that
3760
4017
  // began just before pause must not classify that exit as a crash.
3761
4018
  if (discardStaleHealth())
3762
4019
  return;
3763
4020
  if (paneStatus?.alive) {
4021
+ if (this.footprintEnabled && footprintObservedAt > 0 && paneStatus.pid)
4022
+ this.footprintPane = { pid: paneStatus.pid, owner: JSON.stringify(healthOwner), observedAt: footprintObservedAt, pane: healthTmux };
3764
4023
  // A CLI shutdown also closes its MCP children. Revive tools only for
3765
4024
  // a positively live pane, never while its exit is being classified.
3766
4025
  measureSyncWork("daemon.healthCheck", () => this.checkMcpServerAlive());
@@ -4367,7 +4626,7 @@ export class Daemon extends EventEmitter {
4367
4626
  const loginFlow = LOGIN_FLOWS[this.config.backend ?? "claude-code"];
4368
4627
  if (loginFlow?.loginScreenActive && this.reportLoginScreen(pane))
4369
4628
  return;
4370
- const interactivePrompt = this.interactivePromptDetector.observe(pane, Date.now(), this.instanceStateLastOutputAt);
4629
+ const interactivePrompt = dialogs.some(d => d.humanOnly && Daemon.dialogMatches(d, pane)) ? null : this.interactivePromptDetector.observe(pane, Date.now(), this.instanceStateLastOutputAt);
4371
4630
  if (interactivePrompt) {
4372
4631
  this.logger.warn(interactivePrompt, "Interactive terminal prompt is waiting for human input");
4373
4632
  // M-2269: the prompt as it was on screen, from this capture, for the Log.
@@ -4602,6 +4861,8 @@ export class Daemon extends EventEmitter {
4602
4861
  }
4603
4862
  /** Evaluate one pane snapshot. Kept synchronous so state-machine edges are unit-testable. */
4604
4863
  evaluateErrorPatterns(pane, patterns, readyPattern, now = Date.now(), busyPattern = null) {
4864
+ if (this.staleAuthIssue())
4865
+ return; // Ready chrome and recovery deadlines cannot repair this process.
4605
4866
  // Count occurrences across the WHOLE pane (not just text after the last
4606
4867
  // ready prompt). One shared counter (the static below): arm requires
4607
4868
  // count > baseline, so a drifted clone here would silently gate nudges.
@@ -4712,7 +4973,7 @@ export class Daemon extends EventEmitter {
4712
4973
  // composer to establish its baseline; later appended occurrences remain eligible.
4713
4974
  if ((ep.type === "rate_limit" && ep.action === "nudge_continue") || ep.historyUntilLiveComposer) {
4714
4975
  const baseline = this.nudgeBaselines?.get(key);
4715
- if (baseline === undefined || count <= baseline) {
4976
+ if ((baseline === undefined || count <= baseline) && !(ep.type === "stale_auth" && newQuotaAfterInput)) {
4716
4977
  if (baseline !== undefined)
4717
4978
  this.lastErrorCount.set(key, count);
4718
4979
  continue;
@@ -4810,6 +5071,10 @@ export class Daemon extends EventEmitter {
4810
5071
  });
4811
5072
  return;
4812
5073
  }
5074
+ if (ep.type === "stale_auth") {
5075
+ this.staleAuth = { generation: this.spawnGeneration, since: now };
5076
+ this.authFailureUnresolved = true;
5077
+ }
4813
5078
  // #2795: auth text on the pane proves nothing about the credentials (22 of 22 such matches on the main host were
4814
5079
  // conversation text). It arms nothing here; it only asks the lifecycle's token-free check, and a failing check
4815
5080
  // arms the auth state through confirmAuthFailure().
@@ -5037,6 +5302,8 @@ export class Daemon extends EventEmitter {
5037
5302
  return;
5038
5303
  }
5039
5304
  const verdict = { reached: false };
5305
+ let codexBefore = null;
5306
+ let cliBefore = null;
5040
5307
  try {
5041
5308
  await this.wake();
5042
5309
  if (!this.isDeliveryEpochCurrent(deliveryEpoch)) {
@@ -5046,6 +5313,27 @@ export class Daemon extends EventEmitter {
5046
5313
  tellWritten(false);
5047
5314
  return;
5048
5315
  }
5316
+ // M-3175: a codex switch is typed only into an idle pane of a codex known to take it, with the rollout's end taken first.
5317
+ if (ownSwitch?.codex) {
5318
+ const gate = await this.codexSwitchGate();
5319
+ if ("blocked" in gate) {
5320
+ this.logger.info({ requested: ownSwitch.codex, reason: gate.blocked, version: gate.version }, "Codex runtime switch not typed");
5321
+ reportSwitch({ outcome: "not_sent", reason: gate.blocked, version: gate.version ?? null });
5322
+ tellWritten(false);
5323
+ return;
5324
+ }
5325
+ codexBefore = gate;
5326
+ }
5327
+ if (ownSwitch?.cli) {
5328
+ const gate = await this.cliSwitchGate(ownSwitch.cli);
5329
+ if ("blocked" in gate) {
5330
+ this.logger.info({ requested: ownSwitch.cli, reason: gate.blocked, version: gate.version }, "CLI runtime switch not typed");
5331
+ reportSwitch({ outcome: "not_sent", reason: gate.blocked, version: gate.version ?? null });
5332
+ tellWritten(false);
5333
+ return;
5334
+ }
5335
+ cliBefore = gate;
5336
+ }
5049
5337
  // Board 907c7899: the pane just before this attempt's paste — after its readiness wait, last capture and fence,
5050
5338
  // under the paste lock (no other input lands in between). Each attempt looks again.
5051
5339
  const lookBefore = async () => {
@@ -5060,8 +5348,10 @@ export class Daemon extends EventEmitter {
5060
5348
  preserveExactBytes: true,
5061
5349
  // #1690: our own /model holds every other delivery from its write on — before the lock is released, so a steer
5062
5350
  // or /btw waiting on it cannot type into the gap before claude paints "Switch model?" (default cursor: Yes).
5063
- ...(ownSwitch || notifyWritten || contextReset ? { onPaneWritten: () => { if (contextReset)
5064
- this.resetInboundPresentation(); if (ownSwitch) {
5351
+ ...(ownSwitch || notifyWritten || contextReset ? { onPaneWritten: () => { if (contextReset) {
5352
+ this.resetInboundPresentation();
5353
+ this.resetRoomConversation();
5354
+ } if (ownSwitch) {
5065
5355
  this.ownSwitch = ownSwitch;
5066
5356
  if (currentModelOwner())
5067
5357
  modelObserver?.ownIntent(ownSwitch.requested);
@@ -5115,7 +5405,7 @@ export class Daemon extends EventEmitter {
5115
5405
  reportSwitch({ outcome: "not_sent" }); // its write never began
5116
5406
  else {
5117
5407
  try {
5118
- reportSwitch(await this.answerOwnSwitchDialog(ownSwitch));
5408
+ reportSwitch(ownSwitch.codex ? await this.verifyCodexSwitch(ownSwitch.codex, codexBefore) : ownSwitch.cli ? await this.verifyCliSwitch(ownSwitch.cli, cliBefore) : await this.answerOwnSwitchDialog(ownSwitch));
5119
5409
  }
5120
5410
  catch (err) {
5121
5411
  this.logger.warn({ err: err.message }, "Answering our own model switch failed");
@@ -5145,11 +5435,118 @@ export class Daemon extends EventEmitter {
5145
5435
  return;
5146
5436
  }
5147
5437
  const sw = msg.runtime_switch;
5148
- const ownSwitch = sw && typeof sw.id === "string" && sw.kind === "model" && typeof sw.requested === "string"
5149
- ? { id: sw.id, kind: "model", requested: sw.requested } : undefined;
5438
+ const codexPart = (v) => v === null ? null : typeof v === "string" && v ? v : undefined;
5439
+ const codex = sw?.codex && typeof sw.codex === "object" ? { model: codexPart(sw.codex.model), effort: codexPart(sw.codex.effort) } : undefined;
5440
+ // M-3180: one generic spec for the CLIs of CLI_RUNTIME_SWITCH — a known backend and one command (which may carry both model and effort).
5441
+ const rawCli = sw?.cli;
5442
+ const cli = rawCli && typeof rawCli === "object" && typeof rawCli.backend === "string" && Object.hasOwn(CLI_RUNTIME_SWITCH, rawCli.backend)
5443
+ ? { backend: rawCli.backend, model: codexPart(rawCli.model), effort: codexPart(rawCli.effort) } : rawCli === undefined ? undefined : null;
5444
+ const cliOk = !cli || (cli.model !== undefined && cli.effort !== undefined && (cli.model !== null || cli.effort !== null)
5445
+ && CLI_RUNTIME_SWITCH[cli.backend].command({ model: cli.model, effort: cli.effort }) === msg.content);
5446
+ // A malformed switch must not downgrade into an ungated legacy raw paste.
5447
+ if (rawCli !== undefined && (cli === null || !cliOk || codex || !sw || typeof sw.id !== "string" || sw.kind !== "model" || typeof sw.requested !== "string")) {
5448
+ if (typeof sw?.id === "string")
5449
+ this.broadcastFleetMessage({ type: "runtime_switch_result", id: sw.id, outcome: "not_sent", reason: "command" });
5450
+ return;
5451
+ }
5452
+ const ownSwitch = sw && typeof sw.id === "string" && sw.kind === "model" && typeof sw.requested === "string" && cli !== null && cliOk && !(codex && cli)
5453
+ && (!codex || (codex.model !== undefined && codex.effort !== undefined && (codex.model !== null || codex.effort !== null)))
5454
+ ? { id: sw.id, kind: "model", requested: sw.requested,
5455
+ ...(codex ? { codex: { model: codex.model, effort: codex.effort } } : {}),
5456
+ ...(cli ? { cli: { backend: cli.backend, model: cli.model, effort: cli.effort } } : {}) } : undefined;
5150
5457
  const notifyWritten = typeof msg.notify_written === "string" && /^[0-9a-f]{16}$/.test(msg.notify_written) ? msg.notify_written : undefined;
5151
5458
  this.queueRawPaste(msg.content, this.captureDeliveryEpoch(msg.delivery_epoch), msg.confirm_clear === true, durableAttempt ? { ...durableAttempt, submissionMode: "raw_paste", silentSchedule: msg.silent_schedule === true } : undefined, ownSwitch, notifyWritten, msg.context_reset === "clear" || msg.context_reset === "compact" ? msg.context_reset : undefined);
5152
5459
  }
5460
+ /**
5461
+ * M-3175: before typing a codex `/model … --reasoning=…`: the pane authoritatively idle (bounded), the RUNNING codex at a
5462
+ * version that has the inline form (an older one would send the line to the model as a prompt), and what the switch is
5463
+ * verified against afterwards — the rollout's end when the session has one, and the count of codex's answers on the pane.
5464
+ */
5465
+ async codexSwitchGate() {
5466
+ const tmux = this.tmux;
5467
+ if (!tmux || !await this.waitForAuthoritativePaneIdle(CODEX_SWITCH_IDLE_MS, 500) || this.tmux !== tmux)
5468
+ return { blocked: "busy" };
5469
+ const pid = await tmux.getPanePid?.() ?? null;
5470
+ const version = pid ? await codexRunningVersion(pid) : null;
5471
+ if (!codexSupportsInlineModel(version))
5472
+ return { blocked: "version", version };
5473
+ const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
5474
+ let rollout = null;
5475
+ const session = this.backend?.readRawPasteSession?.(pane);
5476
+ if (session) {
5477
+ const file = await checkpointCodexPane(session.sessionsDir, session.sessionId, this.config.working_directory || process.cwd()).catch(() => null);
5478
+ if (file)
5479
+ rollout = { path: file.path, offset: file.offset };
5480
+ }
5481
+ return { rollout, answers: codexSwitchAnswerCount(pane), version };
5482
+ }
5483
+ /**
5484
+ * M-3180: before typing a CLI_RUNTIME_SWITCH step: the pane authoritatively idle (bounded), the RUNNING binary at the entry's minimum
5485
+ * for this step, and what the verdict compares against — the scrollback before the command and the entry's record checkpoint.
5486
+ */
5487
+ async cliSwitchGate(step) {
5488
+ const tmux = this.tmux, entry = CLI_RUNTIME_SWITCH[step.backend];
5489
+ if (!entry || !tmux || !await this.waitForAuthoritativePaneIdle(CODEX_SWITCH_IDLE_MS, 500) || this.tmux !== tmux)
5490
+ return { blocked: "busy" };
5491
+ const pid = await tmux.getPanePid?.() ?? null;
5492
+ const version = pid ? await cliRunningVersion(pid, { backend: step.backend, matchExe: entry.matchExe, versionFromExe: entry.versionFromExe }) : null;
5493
+ if (!cliSwitchAllowed(entry, step, version))
5494
+ return { blocked: "version", version };
5495
+ const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
5496
+ const record = entry.checkpoint ? await entry.checkpoint(pane, this.config.working_directory || process.cwd(), pid).catch(() => undefined) : undefined;
5497
+ return { pane, ...(record !== undefined ? { record } : {}) };
5498
+ }
5499
+ /** M-3180: the entry's verdict on the scrollback after the step, against the one before it; nothing in time is not confirmed. */
5500
+ async verifyCliSwitch(step, before) {
5501
+ const tmux = this.tmux, entry = CLI_RUNTIME_SWITCH[step.backend];
5502
+ if (!tmux || !before || !entry)
5503
+ return { outcome: "not_confirmed" };
5504
+ const deadline = performance.now() + CODEX_SWITCH_VERIFY_MS;
5505
+ while (performance.now() < deadline && this.tmux === tmux) {
5506
+ const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
5507
+ const verdict = await entry.verify({ model: step.model, effort: step.effort }, before, { pane });
5508
+ if (verdict?.outcome === "switched")
5509
+ return { outcome: "switched", confirmed: true, shown: verdict.shown };
5510
+ if (verdict?.outcome === "mismatch")
5511
+ return { outcome: "mismatch", shown: verdict.shown, answered: true };
5512
+ await new Promise(resolve => setTimeout(resolve, 200));
5513
+ }
5514
+ return { outcome: "not_confirmed" };
5515
+ }
5516
+ /**
5517
+ * M-3175: what our codex switch came to. The rollout's `thread_settings_applied` written after our checkpoint is the proof
5518
+ * (codex writes it at once once the session has a rollout); a session with none yet has codex's own answer on the pane —
5519
+ * a NEW `• Model changed to … for this session only` (or `■` refusal) after the ones counted before the line was typed.
5520
+ * Anything that does not name what was asked is a mismatch; no answer in time is not confirmed. The fleet restarts on both.
5521
+ */
5522
+ async verifyCodexSwitch(want, before) {
5523
+ const tmux = this.tmux;
5524
+ if (!tmux || !before)
5525
+ return { outcome: "not_confirmed" };
5526
+ const fits = (model, effort) => (want.model === null || model === want.model) && (want.effort === null || effort === want.effort);
5527
+ const deadline = performance.now() + CODEX_SWITCH_VERIFY_MS;
5528
+ while (performance.now() < deadline && this.tmux === tmux) {
5529
+ if (before.rollout) {
5530
+ const applied = codexAppliedFromRollout(await readFrom(before.rollout.path, before.rollout.offset, CODEX_SWITCH_ROLLOUT_READ));
5531
+ if (applied) {
5532
+ const shown = `${applied.model} ${applied.effort ?? "default"}`;
5533
+ return fits(applied.model, applied.effort) ? { outcome: "switched", confirmed: true, shown } : { outcome: "mismatch", shown, answered: true };
5534
+ }
5535
+ }
5536
+ const pane = await tmux.capturePaneWithHistory(CODEX_SWITCH_HISTORY_LINES).catch(() => "");
5537
+ if (codexSwitchAnswerCount(pane) > before.answers) {
5538
+ const answer = codexSwitchFromPane(pane);
5539
+ if (answer?.kind === "refused")
5540
+ return { outcome: "mismatch", shown: answer.text, answered: true };
5541
+ if (answer?.kind === "switched" && !before.rollout) {
5542
+ const shown = `${answer.model} ${answer.effort}`;
5543
+ return fits(answer.model, answer.effort) ? { outcome: "switched", confirmed: true, shown } : { outcome: "mismatch", shown, answered: true };
5544
+ }
5545
+ }
5546
+ await new Promise(resolve => setTimeout(resolve, 200));
5547
+ }
5548
+ return { outcome: "not_confirmed" };
5549
+ }
5153
5550
  /**
5154
5551
  * #1690 (the user's choice A): after AgEnD's own `/model <name>`, claude may ask "Switch model?" (a warm cache for
5155
5552
  * another model). When the model it names is the one asked for, answer Yes; otherwise No (Escape — `Kept model as …`),
@@ -5607,7 +6004,7 @@ export class Daemon extends EventEmitter {
5607
6004
  await this.ipcServer?.close();
5608
6005
  // Clean up backend config files
5609
6006
  if (this.backend?.cleanup) {
5610
- this.backend.cleanup(this.buildBackendConfig());
6007
+ this.backend.cleanup(this.buildBackendConfig(false));
5611
6008
  }
5612
6009
  // Clean up checked-out repos
5613
6010
  try {
@@ -5660,6 +6057,16 @@ export class Daemon extends EventEmitter {
5660
6057
  }
5661
6058
  return { ...snapshot, interaction: this.getInteractionSnapshot() };
5662
6059
  }
6060
+ footprintEnabled = false;
6061
+ footprintPane = null;
6062
+ setHostFootprintEnabled(enabled) { this.footprintEnabled = enabled; if (!enabled)
6063
+ this.footprintPane = null; }
6064
+ hostFootprintRoot() {
6065
+ const cached = this.footprintPane;
6066
+ if (!this.footprintEnabled || !cached || cached.pane !== this.tmux || cached.owner !== JSON.stringify(this.interactionOwner()) || this.isPaused || this.spawning || this.healthCheckPaused || this.runtimeMonitorsFrozen || Date.now() - cached.observedAt > 120000)
6067
+ return null;
6068
+ return { pid: cached.pid, owner: cached.owner, observedAt: cached.observedAt };
6069
+ }
5663
6070
  interactionOwner() {
5664
6071
  return { bootId: this.bootId, spawnGeneration: this.spawnGeneration,
5665
6072
  launchAttempt: this.launchAttempt, launchFenceEpoch: this.launchFenceEpoch };
@@ -5910,6 +6317,10 @@ export class Daemon extends EventEmitter {
5910
6317
  }
5911
6318
  /** Shared Fleet inputs: socket and native transports retain the same wake, epoch and raw-paste semantics. */
5912
6319
  handleFleetMessage(msg, send, current = () => true) {
6320
+ if (msg.type === "hub_room_tools_changed") {
6321
+ this.ipcServer?.broadcast({ type: "hub_room_tools_changed" });
6322
+ return true;
6323
+ }
5913
6324
  if (msg.type === "query_sessions") {
5914
6325
  send({ type: "query_sessions_response", sessions: [] });
5915
6326
  }
@@ -6058,7 +6469,7 @@ export class Daemon extends EventEmitter {
6058
6469
  this.pauseRequested = false;
6059
6470
  return false;
6060
6471
  }
6061
- if (!ready() || admission && !admission.accepts(text) || this.backend?.backgroundWorkRunning?.(text)
6472
+ if (!ready() || admission && !admission.accepts(text) || this.backend?.isDraftIdlePane?.(text) === true || this.backend?.backgroundWorkRunning?.(text)
6062
6473
  || !allowStuck && !this.paneAuthoritativelyIdle(text)) {
6063
6474
  this.pauseRequested = false;
6064
6475
  return false;
@@ -6216,7 +6627,8 @@ export class Daemon extends EventEmitter {
6216
6627
  // auth pause — otherwise the instance would pause again the moment it idles.
6217
6628
  this.pausePending = false;
6218
6629
  this.pauseReconfirmAuth = false;
6219
- this.authFailureUnresolved = false;
6630
+ if (!this.staleAuthIssue())
6631
+ this.authFailureUnresolved = false;
6220
6632
  this.unverifiedAuthMatch = null;
6221
6633
  this.loginScreenReported = false;
6222
6634
  this.fatalStartupReported = false;
@@ -6446,7 +6858,9 @@ export class Daemon extends EventEmitter {
6446
6858
  this.logStateEdge(previous, snapshot);
6447
6859
  this.publishWorkingState("execution");
6448
6860
  this.emit("instance_state", { name: this.name, ...snapshot });
6449
- this.broadcastFleetMessage({ type: "instance_state", instanceName: this.name, ...snapshot });
6861
+ this.broadcastFleetMessage({ type: "instance_state", instanceName: this.name, ...snapshot,
6862
+ turnEvidence: this.turnEvidence(), turnActivityAt: this.turnWatch.activityAt });
6863
+ this.noteTurnEdge(snapshot.state);
6450
6864
  if (snapshot.state === "stuck" && pane && this.instanceStateReadyPattern) {
6451
6865
  this.handleStuckTransition(pane, snapshot, this.instanceStateReadyPattern);
6452
6866
  }
@@ -6887,6 +7301,62 @@ export class Daemon extends EventEmitter {
6887
7301
  * This launch's transcript monitor. #1510: its turn boundaries feed the reply guard's ledger, which starts empty
6888
7302
  * with it — a new monitor re-baselines at the transcript's end, so nothing the old one read can be attributed.
6889
7303
  */
7304
+ /** M-3239: this launch's turn as its transcript tells it (dispatcher-liveness.ts). */
7305
+ turnWatch = new TurnWatch();
7306
+ turnActivitySentAt = 0;
7307
+ hubRoomInputEpoch = 0;
7308
+ hubRoomTranscriptActivity = 0;
7309
+ hubRoomTurnActivityStart = null;
7310
+ hubRoomTurnBoot = randomUUID();
7311
+ hubRoomTurnSequence = 0;
7312
+ turnEndTimer = null;
7313
+ /** M-3239: Claude's and Codex's transcripts tell each tool call and answer; their pane's spinner alone is not a turn. */
7314
+ turnEvidence() {
7315
+ const bin = this.backend?.binaryName;
7316
+ return (bin === "claude" || bin === "codex") && this.transcriptMonitor?.following() === true;
7317
+ }
7318
+ /** M-3239: progress for the board's quiet clock, at most every 30 s while a turn runs (the idle edge carries the last). */
7319
+ reportTurnActivity() {
7320
+ const now = Date.now();
7321
+ if (now - this.turnActivitySentAt < TURN_ACTIVITY_REPORT_MS)
7322
+ return;
7323
+ this.turnActivitySentAt = now;
7324
+ this.broadcastFleetMessage({ type: "turn_activity", instanceName: this.name, at: now });
7325
+ }
7326
+ /**
7327
+ * M-3239: on the pane's idle edge, after a moment for the transcript's last lines: the turn's final text, when it
7328
+ * messaged no one — the fleet tells the dispatcher of a claimed card if that text asks a question.
7329
+ */
7330
+ noteTurnEdge(state) {
7331
+ if (state !== "idle") {
7332
+ if (this.turnEndTimer) {
7333
+ clearTimeout(this.turnEndTimer);
7334
+ this.turnEndTimer = null;
7335
+ }
7336
+ if (state === "working") {
7337
+ this.turnWatch.begin(Date.now());
7338
+ this.hubRoomTurnActivityStart ??= this.hubRoomTranscriptActivity;
7339
+ }
7340
+ return;
7341
+ }
7342
+ if (this.turnEndTimer)
7343
+ return;
7344
+ const roomGeneration = this.roomConversationState ? this.roomConversationGeneration() : null, roomInputEpoch = this.hubRoomInputEpoch;
7345
+ this.turnEndTimer = setTimeout(() => {
7346
+ this.turnEndTimer = null; // a working edge before this cancels it: the turn went on
7347
+ const turn = this.turnWatch.end();
7348
+ // A Claude/Codex compaction spinner is not a completed model turn. Require fresh tool/text evidence.
7349
+ const bin = this.backend?.binaryName, needsTranscript = bin === "claude" || bin === "codex";
7350
+ const realWork = !needsTranscript || this.hubRoomTurnActivityStart !== null && this.hubRoomTranscriptActivity > this.hubRoomTurnActivityStart;
7351
+ this.hubRoomTurnActivityStart = null;
7352
+ if (turn && realWork && roomGeneration && roomGeneration === this.roomConversationGeneration() && roomInputEpoch === this.hubRoomInputEpoch)
7353
+ this.broadcastFleetMessage({ type: "hub_room_turn_ended", generation: roomGeneration, turn: `${this.hubRoomTurnBoot}:${++this.hubRoomTurnSequence}` });
7354
+ if (!turn || turn.messaged || !turn.text.trim() || !this.turnEvidence())
7355
+ return;
7356
+ this.broadcastFleetMessage({ type: "turn_ended", instanceName: this.name, startedAt: turn.startedAt, text: turn.text.slice(-4000) });
7357
+ }, TURN_END_SETTLE_MS);
7358
+ this.turnEndTimer.unref?.();
7359
+ }
6890
7360
  buildTranscriptMonitor(source) {
6891
7361
  this.followLog.reset();
6892
7362
  const modelLaunch = this.backend?.modelObservationLaunch?.();
@@ -6905,6 +7375,12 @@ export class Daemon extends EventEmitter {
6905
7375
  this.claudeModelObserver = modelObserver;
6906
7376
  this.modelObservationBound = false;
6907
7377
  const owner = launchIdentity(this.interactionOwner());
7378
+ const credentialLaunch = source || !this.isClaudeCodeBackend() ? null : this.backend?.credentialObservationLaunch?.();
7379
+ monitor.on("claude_request", (record, launchId) => {
7380
+ if (!credentialLaunch || credentialLaunch.binding.kind === "subscription" || this.transcriptMonitor !== monitor || owner !== launchIdentity(this.interactionOwner()) || this.deliveryWritesStopping || this.startupAborted || launchId !== credentialLaunch.launch.id || this.backend?.credentialObservationLaunch?.()?.launch.id !== launchId || record.at < credentialLaunch.launch.startedAt || !credentialLaunch.sourceCurrent())
7381
+ return;
7382
+ this.emit("claude_credential_request", { binding: credentialLaunch.binding, record, owner: this.interactionOwner() });
7383
+ });
6908
7384
  let reminderSession = modelObserver?.checkpoint().sessionId ?? null;
6909
7385
  const observeReminderBoundary = (sessionId, before, after) => {
6910
7386
  const selected = (s) => normalizeClaudeModel(s.session ?? s.launch);
@@ -6969,6 +7445,23 @@ export class Daemon extends EventEmitter {
6969
7445
  });
6970
7446
  for (const event of ["tool_use", "tool_result", "assistant_text"])
6971
7447
  monitor.on(event, touch);
7448
+ // M-3239: the turn as the transcript tells it — progress for the board's quiet clock, and the question a turn ends on.
7449
+ const mine = () => this.transcriptMonitor === monitor;
7450
+ monitor.on("tool_use", (name, input) => { if (mine()) {
7451
+ this.hubRoomTranscriptActivity++;
7452
+ this.turnWatch.tool(name, input, Date.now());
7453
+ this.reportTurnActivity();
7454
+ } });
7455
+ monitor.on("tool_result", () => { if (mine()) {
7456
+ this.hubRoomTranscriptActivity++;
7457
+ this.turnWatch.result(Date.now());
7458
+ this.reportTurnActivity();
7459
+ } });
7460
+ monitor.on("assistant_text", (text) => { if (mine()) {
7461
+ this.hubRoomTranscriptActivity++;
7462
+ this.turnWatch.text(text, Date.now());
7463
+ this.reportTurnActivity();
7464
+ } });
6972
7465
  return monitor;
6973
7466
  }
6974
7467
  /**
@@ -7398,7 +7891,7 @@ export class Daemon extends EventEmitter {
7398
7891
  // work cannot hide behind this: it changes the layout, the next
7399
7892
  // output arms another probe, and the debounce capture still fires.
7400
7893
  // #1641: never while the transcript shows a turn running — that idle-looking screen is mid-turn.
7401
- if (this.instanceState === "idle" && this.backend?.isPeriodicRedrawIdlePane?.(pane) === true
7894
+ if (this.instanceState === "idle" && this.executionIdleProof()?.(pane) === true
7402
7895
  && this.transcriptTurnState() !== "open")
7403
7896
  return;
7404
7897
  // A second burst overtook the probe. Do not bless its stale capture as
@@ -7435,7 +7928,7 @@ export class Daemon extends EventEmitter {
7435
7928
  // observe twice, which silently disabled the "content moved" branch.
7436
7929
  if (this.backend?.periodicRedrawFrom)
7437
7930
  this.periodicRedrawLayout = this.backend.periodicRedrawFrom(pane);
7438
- const structuredPeriodicIdle = this.periodicIdleProof();
7931
+ const structuredPeriodicIdle = this.executionIdleProof();
7439
7932
  // #1641: the transcript outranks the pane: while it shows the turn running, no reading of this pane is idle (codex
7440
7933
  // hides its status row while streaming, leaving the idle composer and footer in view mid-turn).
7441
7934
  const transcriptTurn = this.transcriptTurnState();
@@ -7665,6 +8158,13 @@ export class Daemon extends EventEmitter {
7665
8158
  return undefined;
7666
8159
  return proof;
7667
8160
  }
8161
+ /** Draft text can be execution-idle, but must not become empty-composer proof for delivery, pause or nudges. */
8162
+ executionIdleProof() {
8163
+ const empty = this.periodicIdleProof(), draft = this.backend?.isDraftIdlePane;
8164
+ if (!empty && !draft)
8165
+ return undefined;
8166
+ return pane => empty?.call(this.backend, pane) === true || draft?.call(this.backend, pane) === true;
8167
+ }
7668
8168
  bindInstanceStateOutputListener(windowId) {
7669
8169
  if (!this.controlClient || !this.instanceStateMonitorActive)
7670
8170
  return;
@@ -8235,7 +8735,7 @@ export class Daemon extends EventEmitter {
8235
8735
  // terminal state is announced by the outbox only after its retry/TTL policy
8236
8736
  // is exhausted; emitting ❌ here would expose a transient gate timeout.
8237
8737
  if (status && !verdict.durableAttempt)
8238
- this.emit("message_failed", status); // ❌
8738
+ this.emit("message_failed", { ...status, phase, proof }); // ❌
8239
8739
  return false;
8240
8740
  }
8241
8741
  /** Tell the fleet when an already-accepted cross-instance pane write failed. */
@@ -8498,7 +8998,9 @@ export class Daemon extends EventEmitter {
8498
8998
  // byte for byte (its proof is the wire's hash), so the notice waits for the next delivery without one.
8499
8999
  const whatsNew = this.pendingWhatsNew && !meta.human_receipt_id && !meta.handoff_redelivery
8500
9000
  ? this.currentWhatsNew(this.pendingWhatsNew) : null;
8501
- const pasted = whatsNew ? withWhatsNew(formatted, whatsNew.notice) : formatted;
9001
+ const body = whatsNew ? withWhatsNew(formatted, whatsNew.notice) : formatted;
9002
+ const roomMarker = roomContextInputMarker(meta);
9003
+ const pasted = roomMarker ? `${roomMarker}\n${body}` : body;
8502
9004
  const status = channelStatus(meta);
8503
9005
  // A fresh delivery begins a fresh turn — its bubble must not inherit
8504
9006
  // the previous turn's tool list.
@@ -8516,6 +9018,10 @@ export class Daemon extends EventEmitter {
8516
9018
  this.logger.info({ handoff: meta.handoff_redelivery }, "Queued hand-off redelivery dropped: its CLI was replaced before the write");
8517
9019
  return;
8518
9020
  }
9021
+ if (meta.hub_room_context_generation && meta.hub_room_context_generation !== this.roomConversationGeneration()) {
9022
+ this.reportCrossInstanceDeliveryFailure(meta, { reached: true, phase: "room-context", proof: "stale-generation" });
9023
+ return;
9024
+ }
8519
9025
  const durableAttempt = this.durableDeliveryAttempt(meta, content);
8520
9026
  if (durableAttempt === false) {
8521
9027
  this.deferDurableDelivery(meta, "invalid durable delivery attempt metadata");
@@ -8527,6 +9033,7 @@ export class Daemon extends EventEmitter {
8527
9033
  sent = await this.deliverMessage(pasted, status, {
8528
9034
  deliveryEpoch,
8529
9035
  submissionId: meta.message_id,
9036
+ ...(meta.hub_room_context_generation ? { roomContextGeneration: meta.hub_room_context_generation } : {}),
8530
9037
  ...(meta.verification_id ? { humanVerificationId: meta.verification_id, humanMeta: meta } : {}),
8531
9038
  verdict,
8532
9039
  durableAttempt: durableAttempt || undefined,
@@ -8620,8 +9127,8 @@ export class Daemon extends EventEmitter {
8620
9127
  const verdict = opts?.verdict ?? { reached: false };
8621
9128
  if (opts?.durableAttempt)
8622
9129
  verdict.durableAttempt = true;
8623
- const cancelled = () => opts?.deliveryEpoch !== undefined
8624
- && !this.isDeliveryEpochCurrent(opts.deliveryEpoch);
9130
+ const cancelled = () => (opts?.deliveryEpoch !== undefined && !this.isDeliveryEpochCurrent(opts.deliveryEpoch))
9131
+ || (!!opts?.roomContextGeneration && opts.roomContextGeneration !== this.roomConversationGeneration());
8625
9132
  if (cancelled() || this.stormWindow?.isStopped())
8626
9133
  return false;
8627
9134
  formatted = prepareDeliveryWire(formatted, opts?.preserveExactBytes);
@@ -8648,7 +9155,7 @@ export class Daemon extends EventEmitter {
8648
9155
  const settleFence = this.launchFenceEpoch;
8649
9156
  if (cancelled())
8650
9157
  return false;
8651
- if (this.refuseFatalStartupDelivery(verdict, status))
9158
+ if (this.refuseBlockedDelivery(verdict, status))
8652
9159
  return false;
8653
9160
  let windowId = this.getWindowId();
8654
9161
  const supportsQueuedInput = this.backend?.supportsQueuedInput?.() === true;
@@ -8731,29 +9238,50 @@ export class Daemon extends EventEmitter {
8731
9238
  // must come back AND the check runs again — the stranded text may still
8732
9239
  // be there. "failed" (the Enter could not be sent) fails the delivery:
8733
9240
  // pasting now would submit both messages as one.
8734
- for (let round = 0;; round++) {
8735
- // Budget check BEFORE the next mutating call: each round may send one
8736
- // recovery Enter, so exactly STRANDED_INPUT_MAX_ROUNDS of them go out.
8737
- if (round >= STRANDED_INPUT_MAX_ROUNDS) {
8738
- this.logger.error({ round }, "Input row still not clear after the stranded-text recovery budget — reporting delivery failure");
8739
- return this.failDelivery(verdict, status, "stranded-input", "retry-budget-exhausted");
9241
+ const inputDeadline = Date.now() + 30 * 60_000;
9242
+ let submissions = 0;
9243
+ let unavailableProbes = 0;
9244
+ for (;;) {
9245
+ if (cancelled())
9246
+ return false;
9247
+ if (Date.now() >= inputDeadline) {
9248
+ this.logger.error("Input row stayed unavailable until the delivery deadline");
9249
+ return this.failDelivery(verdict, status, "stranded-input", "input-not-clear-timeout");
8740
9250
  }
8741
- const stranded = await this.submitStrandedInputIfAny(windowId);
9251
+ // Only actual recovery Enters spend the submission budget. A live pane's
9252
+ // unreadable/changing composer may need time, not three synchronous probes.
9253
+ const stranded = await this.submitStrandedInputIfAny(windowId, submissions < STRANDED_INPUT_MAX_ROUNDS);
8742
9254
  if (cancelled())
8743
9255
  return false;
8744
9256
  if (stranded === "idle")
8745
9257
  break;
9258
+ if (stranded === "exhausted") {
9259
+ this.logger.error({ submissions }, "Input row still not clear after the stranded-text recovery budget — reporting delivery failure");
9260
+ return this.failDelivery(verdict, status, "stranded-input", "retry-budget-exhausted");
9261
+ }
8746
9262
  if (stranded === "failed") {
8747
- this.logger.error({ round }, "Could not submit the stranded text — reporting delivery failure");
9263
+ this.logger.error({ submissions }, "Could not submit the stranded text — reporting delivery failure");
8748
9264
  return this.failDelivery(verdict, status, "stranded-input", "enter-failed");
8749
9265
  }
8750
- const readyAgain = await this.waitForPaneReadyForDelivery(windowId);
9266
+ if (stranded === "submitted")
9267
+ submissions++;
9268
+ // Only the proven empty unknown-footer candidate needs the timed
9269
+ // fallback. Preserve the existing bounded refusal for other unsafe
9270
+ // input (including a stranded draft whose footer cannot be proved).
9271
+ if (stranded === "busy" && this.footerFallbackPaneKey === null && ++unavailableProbes >= STRANDED_INPUT_MAX_ROUNDS) {
9272
+ return this.failDelivery(verdict, status, "stranded-input", "input-not-clear");
9273
+ }
9274
+ const readyAgain = await this.waitForPaneReadyForDelivery(windowId, inputDeadline - Date.now());
8751
9275
  if (cancelled())
8752
9276
  return false;
8753
9277
  if (!readyAgain) {
8754
- this.logger.error("Pane never returned to its prompt after submitting stranded input — reporting delivery failure");
9278
+ this.logger.error("Pane never returned to its prompt after checking stranded input — reporting delivery failure");
8755
9279
  return this.failDelivery(verdict, status, "stranded-input", "prompt-timeout");
8756
9280
  }
9281
+ // After startup, the general idle gate can pass while the stricter input
9282
+ // proof is still collecting a stable composer. Yield before re-reading it.
9283
+ if (stranded === "busy")
9284
+ await new Promise(resolve => setTimeout(resolve, BOTTOM_READY_POLL_MS));
8757
9285
  }
8758
9286
  }
8759
9287
  // Everything above is *waiting*; everything below owns the write lock.
@@ -8773,7 +9301,7 @@ export class Daemon extends EventEmitter {
8773
9301
  // delivery from the top, where the settle wait runs again outside it.
8774
9302
  if (!settledClean || settleGeneration !== this.spawnGeneration || this.spawning)
8775
9303
  return "spawn-started";
8776
- if (this.refuseFatalStartupDelivery(verdict, status))
9304
+ if (this.refuseBlockedDelivery(verdict, status))
8777
9305
  return false;
8778
9306
  // A passive startup phase may paint after the outer readiness probe.
8779
9307
  // It clears without input, so waiting under the pane lock cannot starve
@@ -8807,6 +9335,7 @@ export class Daemon extends EventEmitter {
8807
9335
  // same process, a pause/stop/respawn is not (launchFenceEpoch moves even
8808
9336
  // when a failed pause resumes the monitors).
8809
9337
  const writeCurrent = () => !cancelled()
9338
+ && !this.staleAuthIssue()
8810
9339
  && !this.deliveryWritesStopping
8811
9340
  && !this.runtimeMonitorsFrozen
8812
9341
  && !this.spawning
@@ -9666,7 +10195,7 @@ export class Daemon extends EventEmitter {
9666
10195
  locked: fn => this.paneWriteLock.run(fn),
9667
10196
  // An unreadable screen (a failed capture, another spawn's pane) is unknown — never "the card closed".
9668
10197
  read: async () => answerScreen = this.tmux === tmux ? await tmux.capturePane().catch(() => null) : null,
9669
- key: key => this.tmux !== tmux || answerScreen === null ? Promise.resolve(false) : key === "Space" ? (this.nativePaneLifecycle ? tmux.sendKeys(" ", { kind: "dialog", screen: answerScreen }) : tmux.sendKeys(" ")) : (this.nativePaneLifecycle ? tmux.sendSpecialKey(key, undefined, { kind: "dialog", screen: answerScreen }) : tmux.sendSpecialKey(key)),
10198
+ key: key => this.tmux !== tmux || answerScreen === null ? Promise.resolve(false) : (key === "Space" || key === "q") ? (this.nativePaneLifecycle ? tmux.sendKeys(key === "q" ? "q" : " ", { kind: "dialog", screen: answerScreen }) : tmux.sendKeys(key === "q" ? "q" : " ")) : (this.nativePaneLifecycle ? tmux.sendSpecialKey(key, undefined, { kind: "dialog", screen: answerScreen }) : tmux.sendSpecialKey(key)),
9670
10199
  paste: text => this.tmux !== tmux || answerScreen === null ? Promise.resolve(false) : this.nativePaneLifecycle ? tmux.pasteBuffer(text, { proof: { kind: "dialog", screen: answerScreen } }) : tmux.pasteBuffer(text),
9671
10200
  sleep: ms => new Promise(resolve => setTimeout(resolve, ms)),
9672
10201
  now: () => performance.now(),
@@ -10041,6 +10570,10 @@ export class Daemon extends EventEmitter {
10041
10570
  * pane proves nothing. The silence gate comes first and costs no capture.
10042
10571
  */
10043
10572
  async paneReadinessForDelivery(windowId) {
10573
+ if (this.staleAuthIssue()) {
10574
+ this.resetFooterFallback();
10575
+ return "dialog";
10576
+ }
10044
10577
  // Each early return below is the pane seen outside the footer-fallback
10045
10578
  // candidate state, and never reaches deliveryInputReadyPane: reset here.
10046
10579
  if (!this.isPaneIdleForDelivery(windowId)) {
@@ -10313,7 +10846,7 @@ export class Daemon extends EventEmitter {
10313
10846
  this.logger.error({ rows: rows.length }, "The input box did not empty — not writing this delivery onto it");
10314
10847
  return "not-cleared";
10315
10848
  }
10316
- async submitStrandedInputIfAny(windowId) {
10849
+ async submitStrandedInputIfAny(windowId, allowSubmit = true) {
10317
10850
  if (!this.tmux || !this.backend)
10318
10851
  return "idle";
10319
10852
  const prompt = this.backend.getBottomReadyPattern?.();
@@ -10344,6 +10877,8 @@ export class Daemon extends EventEmitter {
10344
10877
  return "idle";
10345
10878
  if (state !== "stranded")
10346
10879
  return "busy"; // busy, or unreadable: no evidence the prompt is free
10880
+ if (!allowSubmit)
10881
+ return "exhausted"; // a final clear check is allowed, a fourth recovery Enter is not
10347
10882
  const sent = await this.sendDeliveryEnter("stranded-input-submit");
10348
10883
  return sent ? "submitted" : "failed";
10349
10884
  });
@@ -10366,10 +10901,24 @@ export class Daemon extends EventEmitter {
10366
10901
  return "busy";
10367
10902
  if (this.backend?.getBusyPattern?.()?.test(pane))
10368
10903
  return "busy";
10904
+ // The timed footer fallback is valid only in a live raw TUI, even
10905
+ // after the startup guard has retired. Historical shell scrollback is not
10906
+ // evidence that a composer still owns the terminal.
10907
+ const known = this.backend?.isDeliveryInputReadyPane?.(pane);
10908
+ if (known === false && this.backend?.isStableUnknownLayoutIdlePane?.(pane)) {
10909
+ if (this.nativePaneLifecycle || await this.tmux?.getPaneInputMode?.() !== "raw") {
10910
+ this.resetFooterFallback();
10911
+ return "busy";
10912
+ }
10913
+ }
10369
10914
  if (!this.deliveryInputReadyPane(pane))
10370
10915
  return "busy";
10371
- if (strandedAgendMessageInInput(pane, prompt))
10916
+ if (strandedAgendMessageInInput(pane, prompt)) {
10917
+ // A cancelled human turn can restore its text here. Idle observation must not let a later delivery submit it.
10918
+ if (this.backend?.binaryName === "codex" && /\[user:/.test(inputAreaText(pane, prompt) ?? ""))
10919
+ return "busy";
10372
10920
  return "stranded";
10921
+ }
10373
10922
  // Kiro uses the bottom row; Codex's positive prompt/footer check above
10374
10923
  // rules out a historical transcript echo or a transition/modal screen.
10375
10924
  return !requireBottomReady || bottomRowIsReady(pane, prompt) ? "clear" : "busy";
@@ -10561,6 +11110,7 @@ export class Daemon extends EventEmitter {
10561
11110
  }
10562
11111
  }
10563
11112
  /**
11113
+ * A stale process login refuses delivery before any write; durable attempts stay retryable.
10564
11114
  * While the CLI is parked on a fatal startup screen (see fatalStartupBlocked),
10565
11115
  * no pane write may happen: paste+Enter into the corrupt-config modal would
10566
11116
  * confirm "Exit and fix manually" and exit the CLI. The message is failed (❌)
@@ -10568,7 +11118,11 @@ export class Daemon extends EventEmitter {
10568
11118
  * what to fix, and holding would only build a queue that floods the pane the
10569
11119
  * moment the flag clears.
10570
11120
  */
10571
- refuseFatalStartupDelivery(verdict, status) {
11121
+ refuseBlockedDelivery(verdict, status) {
11122
+ if (this.staleAuthIssue()) {
11123
+ this.failDelivery(verdict, status, "pre-write", "stale-auth");
11124
+ return true;
11125
+ }
10572
11126
  if (!this.fatalStartupBlocked && !this.modelMinimumBlocked)
10573
11127
  return false;
10574
11128
  this.logger.error("Delivery refused — CLI startup or model-version repair is held");
@@ -10926,6 +11480,8 @@ export class Daemon extends EventEmitter {
10926
11480
  catch {
10927
11481
  return hold("check_failed");
10928
11482
  }
11483
+ if (this.codexInputOccupied(screen))
11484
+ return hold("input_occupied");
10929
11485
  if (!current())
10930
11486
  return false;
10931
11487
  if (performance.now() >= deadline)
@@ -10984,6 +11540,7 @@ export class Daemon extends EventEmitter {
10984
11540
  signature.takenMarker = leadMarker;
10985
11541
  const rawPaste = durableAttempt?.submissionMode === "raw_paste";
10986
11542
  const humanAttempt = verdict.humanReceipt;
11543
+ verdict.roomInputQueued = handingOffToNativeQueue || steer;
10987
11544
  const humanMode = rawPaste ? "raw_paste" : steer ? "steer"
10988
11545
  : handingOffToNativeQueue ? "native_queue_handoff" : "idle_submit";
10989
11546
  if (humanAttempt && signature.unique && signature.value === humanReceiptMarker(humanAttempt.verificationId, humanDialect).slice(1, -1)
@@ -11024,6 +11581,8 @@ export class Daemon extends EventEmitter {
11024
11581
  verdict.fenced = !verdict.durableBeginCommitted;
11025
11582
  return false;
11026
11583
  }
11584
+ if (pasteBaseline?.unsubmittedAgendInput)
11585
+ return this.failDelivery(verdict, status, "input-residue", "occupied-codex-composer");
11027
11586
  // M-2267: the pane went into a tmux mode after the readiness wait. Nothing begun or written: the caller waits for
11028
11587
  // readiness (which holds while it lasts) and tries again — as for a dialog that appeared before the write.
11029
11588
  if (!verdict.durableBeginCommitted && await this.paneInTmuxMode("paste"))
@@ -11349,6 +11908,7 @@ export class Daemon extends EventEmitter {
11349
11908
  : after === "queue" ? "composer-empty-queue" : "composer-empty-idle");
11350
11909
  verdict.phase = steer ? "steer-accepted" : "composer-accepted";
11351
11910
  verdict.proof = `${steer ? "steer" : "handoff"}-composer-${after}`;
11911
+ verdict.roomInputQueued = after === "queue";
11352
11912
  if (status)
11353
11913
  this.emit("message_confirmed", status); // ✅ taken from the box
11354
11914
  return true;
@@ -11424,6 +11984,7 @@ export class Daemon extends EventEmitter {
11424
11984
  if (verdict.handoff && !verdict.trackHandoff?.id)
11425
11985
  this.dropQueuedHandoff(verdict);
11426
11986
  verdict.handoff = undefined;
11987
+ verdict.roomInputQueued = false;
11427
11988
  if (windowId && this.controlClient && !(await this.controlClient.waitUntilIdle(windowId))) {
11428
11989
  verdict.phase = "native-queue-idle-wait";
11429
11990
  verdict.proof = "idle-wait-failed";
@@ -12101,6 +12662,11 @@ export class Daemon extends EventEmitter {
12101
12662
  * paste and once after, so confirmSubmitted can require a NEW marker or a NEW
12102
12663
  * echo rather than accepting whatever was already there.
12103
12664
  */
12665
+ codexInputOccupied(pane) {
12666
+ const backend = this.backend, prompt = backend?.getBottomReadyPattern?.();
12667
+ return backend?.binaryName === "codex" && backend.ownsComposerRows?.(pane) === true && !!prompt
12668
+ && strandedAgendMessageInInput(pane, prompt);
12669
+ }
12104
12670
  async capturePaneEvidence(signature) {
12105
12671
  if (!this.tmux)
12106
12672
  return null;
@@ -12111,6 +12677,8 @@ export class Daemon extends EventEmitter {
12111
12677
  try {
12112
12678
  const pane = await this.tmux.capturePane();
12113
12679
  const evidence = this.paneEvidence(pane, signature);
12680
+ if (this.codexInputOccupied(pane))
12681
+ evidence.unsubmittedAgendInput = true;
12114
12682
  if (owner === this.tmux && window === owner.getWindowId?.() && spawn === this.spawnGeneration && fence === this.launchFenceEpoch && launch === this.launchAttempt) {
12115
12683
  const counts = this.paneQuotaPatterns().map(ep => ({ key: Daemon.errorPatternKey(ep), count: Daemon.countOccurrences(ep.pattern, pane) }));
12116
12684
  if (counts.length)
@@ -12118,10 +12686,7 @@ export class Daemon extends EventEmitter {
12118
12686
  }
12119
12687
  const input = this.inputRegion(pane);
12120
12688
  if (input && agendMessageInInput(input.text)) {
12121
- // Whatever we paste now lands after it, and one Enter submits both as
12122
- // a single message. Nothing here can undo that; saying so beats
12123
- // letting two messages silently merge.
12124
- this.logger.warn("An unsubmitted message is already in the input row — this delivery will be appended to it");
12689
+ this.logger.warn("An unsubmitted message is already in the input row");
12125
12690
  }
12126
12691
  return evidence;
12127
12692
  }
@@ -12789,7 +13354,7 @@ export class Daemon extends EventEmitter {
12789
13354
  type: "fleet_outbound",
12790
13355
  tool,
12791
13356
  args,
12792
- ...(operationId ? { operationId, sourceDaemonBootId: this.bootId } : {}),
13357
+ ...((operationId || (tool.startsWith("hub_room_") || tool === "hub_people_search")) ? { ...(operationId ? { operationId } : {}), sourceDaemonBootId: this.bootId } : {}),
12793
13358
  fleetRequestId: fleetReqId,
12794
13359
  senderSessionName,
12795
13360
  });
@@ -12909,7 +13474,7 @@ export class Daemon extends EventEmitter {
12909
13474
  };
12910
13475
  }
12911
13476
  /** Build config object for the CLI backend */
12912
- buildBackendConfig() {
13477
+ buildBackendConfig(forLaunch = true) {
12913
13478
  // Antigravity 1.1.17 has no per-workspace MCP config, but its global MCP
12914
13479
  // children inherit the CLI process environment. The backend installs one
12915
13480
  // environment-selecting launcher, so MCP is now the safe default here too.
@@ -12988,6 +13553,8 @@ export class Daemon extends EventEmitter {
12988
13553
  ? resolveToolSet(this.config, this.name, "general")
12989
13554
  : resolveToolSet(this.config, this.name);
12990
13555
  mcpEnv.AGEND_TOOL_SET = toolSet;
13556
+ if (this.classicRestriction)
13557
+ mcpEnv.AGEND_CLASSIC_ALLOWED_TOOLS = JSON.stringify(this.classicRestriction.allowedAgendTools);
12991
13558
  // The dashboard features the person switched off: out of the tool menu from this start (the fleet refuses them
12992
13559
  // at once, whatever the menu still shows).
12993
13560
  const dashboardOff = dashboardFeaturesOff(dashboardAccessOf(this.config));
@@ -13028,9 +13595,11 @@ export class Daemon extends EventEmitter {
13028
13595
  taskBoard: !dashboardOff.includes("task_board"),
13029
13596
  workingDirectory: this.config.working_directory,
13030
13597
  runtimeIdentity: this.runtimeIdentity,
13598
+ restrictedClassic: !!this.classicRestriction,
13031
13599
  displayName: this.config.display_name,
13032
13600
  description: this.config.description,
13033
13601
  customPrompt: resolvedCustomPrompt,
13602
+ operations: this.config.operations,
13034
13603
  workflow: resolvedWorkflow,
13035
13604
  decisions,
13036
13605
  statusEmojis,
@@ -13043,9 +13612,11 @@ export class Daemon extends EventEmitter {
13043
13612
  taskBoard: !dashboardOff.includes("task_board"),
13044
13613
  workingDirectory: this.config.working_directory,
13045
13614
  runtimeIdentity: this.runtimeIdentity,
13615
+ restrictedClassic: !!this.classicRestriction,
13046
13616
  displayName: this.config.display_name,
13047
13617
  description: this.config.description,
13048
13618
  customPrompt: resolvedCustomPrompt,
13619
+ operations: this.config.operations,
13049
13620
  workflow: resolvedWorkflow,
13050
13621
  decisions,
13051
13622
  statusEmojis,
@@ -13054,7 +13625,11 @@ export class Daemon extends EventEmitter {
13054
13625
  const agentPort = parseInt(process.env.AGEND_PORT ?? "19280", 10);
13055
13626
  const backendName = this.config.backend ?? "claude-code";
13056
13627
  const backendOptions = this.config.backend_options?.[backendName];
13628
+ const managedClaudeCredential = forLaunch && backendName === "claude-code"
13629
+ ? managedClaudeBinding(resolve(this.instanceDir, "..", ".."), resolveCredentialProfile(backendOptions)) : null;
13057
13630
  return {
13631
+ ...(managedClaudeCredential ? { managedClaudeCredential } : {}),
13632
+ ...(this.classicRestriction ? { classicRestriction: this.classicRestriction } : {}),
13058
13633
  workingDirectory: this.config.working_directory,
13059
13634
  instanceDir: this.instanceDir,
13060
13635
  instanceName: this.name,
@@ -14432,12 +15007,19 @@ export class Daemon extends EventEmitter {
14432
15007
  if (this.nativePaneLifecycle)
14433
15008
  throw Error("Native relaunch requires its owned exit and a new lifecycle reservation");
14434
15009
  let expectedAttempt = this.launchAttempt;
14435
- const admit = () => { this.startupAdmission?.(); if (repairAdmission && !repairAdmission(expectedAttempt))
14436
- throw new Error("CLI repair superseded by another launch, pause or stop"); };
15010
+ const restrictionStamp = this.classicRestriction ? classicPlanDigest(this.classicRestriction) : null;
15011
+ const admit = () => {
15012
+ this.startupAdmission?.();
15013
+ this.assertClassicRestrictionLaunch(restrictionStamp);
15014
+ if (repairAdmission && !repairAdmission(expectedAttempt))
15015
+ throw new Error("CLI repair superseded by another launch, pause or stop");
15016
+ };
14437
15017
  this.assertSessionOomAdmission();
14438
15018
  admit();
14439
15019
  const launchFence = this.launchFenceEpoch;
14440
- const backendConfig = this.buildBackendConfig();
15020
+ const backendConfig = this.buildBackendConfig(true);
15021
+ if (this.classicRestrictionFailed)
15022
+ throw Error("Restricted room policy is unavailable");
14441
15023
  // A compatibility refusal is not a failed resume: no configuration, pin, history or pane may change.
14442
15024
  if (this.backend?.assertLaunchSupported) {
14443
15025
  this.backend.assertLaunchSupported(backendConfig);
@@ -14467,6 +15049,7 @@ export class Daemon extends EventEmitter {
14467
15049
  if (launchFence !== this.launchFenceEpoch)
14468
15050
  throw new Error("Launch cancelled: the instance was stopped or paused while the launch was being prepared");
14469
15051
  this.backend.writeConfig(backendConfig);
15052
+ this.classicRestrictionNeedsRestart = false;
14470
15053
  if (freshInboundInstructions)
14471
15054
  this.installCompactInboundInstructions();
14472
15055
  else {
@@ -15041,11 +15624,41 @@ export class Daemon extends EventEmitter {
15041
15624
  this.lastIdleSessionRefreshAt = now;
15042
15625
  void refresh.call(this.backend).then(() => this.saveSessionId(), () => { });
15043
15626
  }
15627
+ roomConversationState = null;
15628
+ roomConversationGeneration() {
15629
+ try {
15630
+ // Local non-Claude backends checkpoint their own session below; do not replace it with a Claude-only field.
15631
+ if (this.nativePaneLifecycle || (this.config.backend ?? "claude-code") === "claude-code")
15632
+ this.roomConversationState?.observeSession(this.ownedWorkingSession);
15633
+ }
15634
+ catch (err) {
15635
+ this.logger.warn({ err }, "Room conversation checkpoint failed");
15636
+ return null;
15637
+ }
15638
+ return this.roomConversationState?.current() ?? null;
15639
+ }
15640
+ resetRoomConversation(reattached = false) {
15641
+ this.roomConversationState ??= new RoomConversationGeneration(this.instanceDir);
15642
+ try {
15643
+ this.roomConversationState.start(reattached);
15644
+ }
15645
+ catch (err) {
15646
+ this.logger.warn({ err }, "Room conversation generation is unconfirmed");
15647
+ }
15648
+ }
15649
+ roomInputHandedOff(meta) {
15650
+ const generation = meta.hub_room_context_generation;
15651
+ if (meta.from_instance !== HUB_REPORT_TARGET || !generation || generation !== this.roomConversationGeneration())
15652
+ return;
15653
+ this.hubRoomInputEpoch++;
15654
+ this.broadcastFleetMessage({ type: "hub_room_input", correlationId: meta.correlation_id, generation });
15655
+ }
15044
15656
  saveSessionId() {
15045
15657
  if (this.nativePaneLifecycle) {
15046
15658
  try {
15047
15659
  this.nativePaneLifecycle.checkpointSession();
15048
15660
  this.ownedWorkingSession = this.backend?.getSessionId() ?? null;
15661
+ this.roomConversationState?.observeSession(this.ownedWorkingSession);
15049
15662
  }
15050
15663
  catch (err) {
15051
15664
  this.logger.warn({ err }, "Native conversation checkpoint is unconfirmed");
@@ -15060,6 +15673,7 @@ export class Daemon extends EventEmitter {
15060
15673
  const sid = this.backend?.getSessionId();
15061
15674
  if (!sid)
15062
15675
  return;
15676
+ this.roomConversationState?.observeSession(sid);
15063
15677
  if ((this.config.backend ?? "claude-code") === "claude-code" && Buffer.byteLength(sid) <= 256
15064
15678
  && !/[\u0000-\u001f\u007f]/.test(sid) && this.ownedWorkingSession !== sid) {
15065
15679
  this.ownedWorkingSession = sid;