@songsid/agend 2.3.5-alpha.4 → 2.3.5-alpha.6

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 (995) hide show
  1. package/THIRD_PARTY_NOTICES.md +51 -0
  2. package/dist/accounts-profiles.d.ts +96 -0
  3. package/dist/accounts-profiles.js +178 -0
  4. package/dist/accounts-profiles.js.map +1 -0
  5. package/dist/accounts-signout.d.ts +59 -0
  6. package/dist/accounts-signout.js +184 -0
  7. package/dist/accounts-signout.js.map +1 -0
  8. package/dist/accounts-view.d.ts +151 -0
  9. package/dist/accounts-view.js +160 -0
  10. package/dist/accounts-view.js.map +1 -0
  11. package/dist/agent-cli-instructions.md +1 -1
  12. package/dist/agent-credentials.d.ts +24 -0
  13. package/dist/agent-credentials.js +66 -0
  14. package/dist/agent-credentials.js.map +1 -0
  15. package/dist/agent-endpoint.d.ts +3 -1
  16. package/dist/agent-endpoint.js +13 -0
  17. package/dist/agent-endpoint.js.map +1 -1
  18. package/dist/agent-file-read.js +1 -1
  19. package/dist/agent-file-read.js.map +1 -1
  20. package/dist/agent-runtime-change.d.ts +3 -1
  21. package/dist/agent-runtime-change.js +15 -3
  22. package/dist/agent-runtime-change.js.map +1 -1
  23. package/dist/agent-workspace.d.ts +104 -0
  24. package/dist/agent-workspace.js +381 -0
  25. package/dist/agent-workspace.js.map +1 -0
  26. package/dist/auth-api.d.ts +27 -0
  27. package/dist/auth-api.js +191 -8
  28. package/dist/auth-api.js.map +1 -1
  29. package/dist/authority/session-authorizations.d.ts +30 -4
  30. package/dist/authority/session-authorizations.js +69 -17
  31. package/dist/authority/session-authorizations.js.map +1 -1
  32. package/dist/backend/antigravity.js +3 -1
  33. package/dist/backend/antigravity.js.map +1 -1
  34. package/dist/backend/codex-footer-hints.d.ts +3 -0
  35. package/dist/backend/codex-footer-hints.js +14 -0
  36. package/dist/backend/codex-footer-hints.js.map +1 -1
  37. package/dist/backend/codex-metadata.d.ts +14 -0
  38. package/dist/backend/codex-metadata.js +45 -0
  39. package/dist/backend/codex-metadata.js.map +1 -1
  40. package/dist/backend/codex-quota-history.d.ts +7 -0
  41. package/dist/backend/codex-quota-history.js +57 -0
  42. package/dist/backend/codex-quota-history.js.map +1 -0
  43. package/dist/backend/codex-session-lookup.d.ts +6 -0
  44. package/dist/backend/codex-session-lookup.js +1 -1
  45. package/dist/backend/codex-session-lookup.js.map +1 -1
  46. package/dist/backend/codex-speed.d.ts +14 -0
  47. package/dist/backend/codex-speed.js +35 -0
  48. package/dist/backend/codex-speed.js.map +1 -0
  49. package/dist/backend/codex.d.ts +7 -0
  50. package/dist/backend/codex.js +79 -15
  51. package/dist/backend/codex.js.map +1 -1
  52. package/dist/backend/grok-weekly-reset.d.ts +24 -0
  53. package/dist/backend/grok-weekly-reset.js +95 -0
  54. package/dist/backend/grok-weekly-reset.js.map +1 -0
  55. package/dist/backend/grok.d.ts +30 -1
  56. package/dist/backend/grok.js +301 -54
  57. package/dist/backend/grok.js.map +1 -1
  58. package/dist/backend/kiro.d.ts +3 -0
  59. package/dist/backend/kiro.js +50 -2
  60. package/dist/backend/kiro.js.map +1 -1
  61. package/dist/backend/muse.js +5 -3
  62. package/dist/backend/muse.js.map +1 -1
  63. package/dist/backend/native-pane.d.ts +3 -1
  64. package/dist/backend/native-pane.js +2 -2
  65. package/dist/backend/native-pane.js.map +1 -1
  66. package/dist/backend/types.d.ts +15 -1
  67. package/dist/backend/types.js +3 -0
  68. package/dist/backend/types.js.map +1 -1
  69. package/dist/build-provenance-cli.d.ts +3 -0
  70. package/dist/build-provenance-cli.js +11 -0
  71. package/dist/build-provenance-cli.js.map +1 -0
  72. package/dist/build-provenance.d.ts +20 -0
  73. package/dist/build-provenance.js +67 -0
  74. package/dist/build-provenance.js.map +1 -0
  75. package/dist/build-provenance.json +1 -0
  76. package/dist/bundled-tmux-guard.d.ts +19 -0
  77. package/dist/bundled-tmux-guard.js +83 -0
  78. package/dist/bundled-tmux-guard.js.map +1 -0
  79. package/dist/cache-ledger.d.ts +95 -0
  80. package/dist/cache-ledger.js +276 -4
  81. package/dist/cache-ledger.js.map +1 -1
  82. package/dist/cache-service.d.ts +5 -0
  83. package/dist/cache-service.js +16 -4
  84. package/dist/cache-service.js.map +1 -1
  85. package/dist/channel/adapters/discord.js +11 -3
  86. package/dist/channel/adapters/discord.js.map +1 -1
  87. package/dist/channel/adapters/telegram.d.ts +51 -0
  88. package/dist/channel/adapters/telegram.js +235 -17
  89. package/dist/channel/adapters/telegram.js.map +1 -1
  90. package/dist/channel/mcp-tools.js +3 -3
  91. package/dist/channel/mcp-tools.js.map +1 -1
  92. package/dist/channel/types.d.ts +2 -0
  93. package/dist/classic-bindings.d.ts +13 -0
  94. package/dist/classic-bindings.js +28 -2
  95. package/dist/classic-bindings.js.map +1 -1
  96. package/dist/classic-channel-manager.d.ts +2 -0
  97. package/dist/classic-channel-manager.js +5 -1
  98. package/dist/classic-channel-manager.js.map +1 -1
  99. package/dist/claude-auth-status.d.ts +48 -0
  100. package/dist/claude-auth-status.js +149 -0
  101. package/dist/claude-auth-status.js.map +1 -0
  102. package/dist/cli.js +252 -46
  103. package/dist/cli.js.map +1 -1
  104. package/dist/config-validator.js +32 -1
  105. package/dist/config-validator.js.map +1 -1
  106. package/dist/config.js +3 -1
  107. package/dist/config.js.map +1 -1
  108. package/dist/cross-instance-notice.d.ts +10 -0
  109. package/dist/cross-instance-notice.js +67 -5
  110. package/dist/cross-instance-notice.js.map +1 -1
  111. package/dist/daemon.d.ts +95 -1
  112. package/dist/daemon.js +652 -29
  113. package/dist/daemon.js.map +1 -1
  114. package/dist/dashboard-permissions.d.ts +8 -0
  115. package/dist/dashboard-permissions.js +16 -0
  116. package/dist/dashboard-permissions.js.map +1 -1
  117. package/dist/delivery-consumed-watch.d.ts +23 -1
  118. package/dist/delivery-consumed-watch.js +30 -3
  119. package/dist/delivery-consumed-watch.js.map +1 -1
  120. package/dist/delivery-reconciliation.d.ts +1 -1
  121. package/dist/delivery-reconciliation.js +1 -1
  122. package/dist/delivery-reconciliation.js.map +1 -1
  123. package/dist/doctor.js +19 -9
  124. package/dist/doctor.js.map +1 -1
  125. package/dist/e2e-isolation.js +5 -2
  126. package/dist/e2e-isolation.js.map +1 -1
  127. package/dist/export-import.d.ts +7 -0
  128. package/dist/export-import.js +44 -10
  129. package/dist/export-import.js.map +1 -1
  130. package/dist/fleet-context.d.ts +2 -0
  131. package/dist/fleet-control-audit.d.ts +1 -1
  132. package/dist/fleet-manager.d.ts +488 -7
  133. package/dist/fleet-manager.js +2069 -122
  134. package/dist/fleet-manager.js.map +1 -1
  135. package/dist/fleet-windows-runtime.d.ts +2 -1
  136. package/dist/fleet-windows-runtime.js +25 -7
  137. package/dist/fleet-windows-runtime.js.map +1 -1
  138. package/dist/general-knowledge/skills/concepts/SKILL.md +425 -0
  139. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +15 -2
  140. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +1 -0
  141. package/dist/general-knowledge/skills/fleet-health/SKILL.md +2 -2
  142. package/dist/general-knowledge/skills/instance-lifecycle/SKILL.md +3 -1
  143. package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +41 -4
  144. package/dist/general-knowledge/skills/session-management/SKILL.md +1 -1
  145. package/dist/general-knowledge/skills/tui-effort/SKILL.md +10 -10
  146. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +31 -15
  147. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +1 -1
  148. package/dist/general-role.d.ts +1 -1
  149. package/dist/general-role.js +1 -0
  150. package/dist/general-role.js.map +1 -1
  151. package/dist/hub/admission.d.ts +28 -0
  152. package/dist/hub/admission.js +62 -0
  153. package/dist/hub/admission.js.map +1 -0
  154. package/dist/hub/attachments/limits.d.ts +20 -0
  155. package/dist/hub/attachments/limits.js +48 -0
  156. package/dist/hub/attachments/limits.js.map +1 -0
  157. package/dist/hub/attachments/store.d.ts +116 -0
  158. package/dist/hub/attachments/store.js +246 -0
  159. package/dist/hub/attachments/store.js.map +1 -0
  160. package/dist/hub/audit/index.d.ts +62 -0
  161. package/dist/hub/audit/index.js +344 -0
  162. package/dist/hub/audit/index.js.map +1 -0
  163. package/dist/hub/browser-certificate.d.ts +38 -0
  164. package/dist/hub/browser-certificate.js +247 -0
  165. package/dist/hub/browser-certificate.js.map +1 -0
  166. package/dist/hub/buttons-model.d.ts +9 -0
  167. package/dist/hub/buttons-model.js +42 -0
  168. package/dist/hub/buttons-model.js.map +1 -0
  169. package/dist/hub/buttons.d.ts +54 -0
  170. package/dist/hub/buttons.js +346 -0
  171. package/dist/hub/buttons.js.map +1 -0
  172. package/dist/hub/catalog.d.ts +74 -0
  173. package/dist/hub/catalog.js +195 -0
  174. package/dist/hub/catalog.js.map +1 -0
  175. package/dist/hub/client.d.ts +69 -0
  176. package/dist/hub/client.js +300 -0
  177. package/dist/hub/client.js.map +1 -0
  178. package/dist/hub/compose/member.d.ts +139 -0
  179. package/dist/hub/compose/member.js +450 -0
  180. package/dist/hub/compose/member.js.map +1 -0
  181. package/dist/hub/compose/server.d.ts +77 -0
  182. package/dist/hub/compose/server.js +350 -0
  183. package/dist/hub/compose/server.js.map +1 -0
  184. package/dist/hub/compose/views.d.ts +12 -0
  185. package/dist/hub/compose/views.js +4 -0
  186. package/dist/hub/compose/views.js.map +1 -0
  187. package/dist/hub/db.d.ts +56 -0
  188. package/dist/hub/db.js +188 -0
  189. package/dist/hub/db.js.map +1 -0
  190. package/dist/hub/directory/config.d.ts +39 -0
  191. package/dist/hub/directory/config.js +108 -0
  192. package/dist/hub/directory/config.js.map +1 -0
  193. package/dist/hub/directory/directory.d.ts +18 -0
  194. package/dist/hub/directory/directory.js +432 -0
  195. package/dist/hub/directory/directory.js.map +1 -0
  196. package/dist/hub/directory/groups.d.ts +29 -0
  197. package/dist/hub/directory/groups.js +29 -0
  198. package/dist/hub/directory/groups.js.map +1 -0
  199. package/dist/hub/directory/index.d.ts +8 -0
  200. package/dist/hub/directory/index.js +4 -0
  201. package/dist/hub/directory/index.js.map +1 -0
  202. package/dist/hub/directory/profiles.d.ts +41 -0
  203. package/dist/hub/directory/profiles.js +90 -0
  204. package/dist/hub/directory/profiles.js.map +1 -0
  205. package/dist/hub/directory/types.d.ts +75 -0
  206. package/dist/hub/directory/types.js +14 -0
  207. package/dist/hub/directory/types.js.map +1 -0
  208. package/dist/hub/execution/cli-provider.d.ts +23 -0
  209. package/dist/hub/execution/cli-provider.js +341 -0
  210. package/dist/hub/execution/cli-provider.js.map +1 -0
  211. package/dist/hub/execution/index.d.ts +13 -0
  212. package/dist/hub/execution/index.js +8 -0
  213. package/dist/hub/execution/index.js.map +1 -0
  214. package/dist/hub/execution/model-broker.d.ts +24 -0
  215. package/dist/hub/execution/model-broker.js +208 -0
  216. package/dist/hub/execution/model-broker.js.map +1 -0
  217. package/dist/hub/execution/provider-setup.d.ts +11 -0
  218. package/dist/hub/execution/provider-setup.js +21 -0
  219. package/dist/hub/execution/provider-setup.js.map +1 -0
  220. package/dist/hub/execution/sandbox-runner.d.ts +1 -0
  221. package/dist/hub/execution/sandbox-runner.js +221 -0
  222. package/dist/hub/execution/sandbox-runner.js.map +1 -0
  223. package/dist/hub/execution/service.d.ts +136 -0
  224. package/dist/hub/execution/service.js +459 -0
  225. package/dist/hub/execution/service.js.map +1 -0
  226. package/dist/hub/execution/store.d.ts +61 -0
  227. package/dist/hub/execution/store.js +182 -0
  228. package/dist/hub/execution/store.js.map +1 -0
  229. package/dist/hub/execution/views.d.ts +20 -0
  230. package/dist/hub/execution/views.js +48 -0
  231. package/dist/hub/execution/views.js.map +1 -0
  232. package/dist/hub/group-policy/model.d.ts +56 -0
  233. package/dist/hub/group-policy/model.js +46 -0
  234. package/dist/hub/group-policy/model.js.map +1 -0
  235. package/dist/hub/group-policy/resources.d.ts +52 -0
  236. package/dist/hub/group-policy/resources.js +166 -0
  237. package/dist/hub/group-policy/resources.js.map +1 -0
  238. package/dist/hub/group-policy/store.d.ts +52 -0
  239. package/dist/hub/group-policy/store.js +149 -0
  240. package/dist/hub/group-policy/store.js.map +1 -0
  241. package/dist/hub/http/compose.d.ts +20 -0
  242. package/dist/hub/http/compose.js +519 -0
  243. package/dist/hub/http/compose.js.map +1 -0
  244. package/dist/hub/http/core.d.ts +49 -0
  245. package/dist/hub/http/core.js +124 -0
  246. package/dist/hub/http/core.js.map +1 -0
  247. package/dist/hub/http/deps.d.ts +61 -0
  248. package/dist/hub/http/deps.js +2 -0
  249. package/dist/hub/http/deps.js.map +1 -0
  250. package/dist/hub/http/schema.d.ts +14 -0
  251. package/dist/hub/http/schema.js +80 -0
  252. package/dist/hub/http/schema.js.map +1 -0
  253. package/dist/hub/identity.d.ts +32 -0
  254. package/dist/hub/identity.js +80 -0
  255. package/dist/hub/identity.js.map +1 -0
  256. package/dist/hub/init/browser-certificate.d.ts +9 -0
  257. package/dist/hub/init/browser-certificate.js +78 -0
  258. package/dist/hub/init/browser-certificate.js.map +1 -0
  259. package/dist/hub/init/browser-tls.d.ts +18 -0
  260. package/dist/hub/init/browser-tls.js +62 -0
  261. package/dist/hub/init/browser-tls.js.map +1 -0
  262. package/dist/hub/init/cli.d.ts +3 -0
  263. package/dist/hub/init/cli.js +83 -0
  264. package/dist/hub/init/cli.js.map +1 -0
  265. package/dist/hub/init/directory-certificate.d.ts +24 -0
  266. package/dist/hub/init/directory-certificate.js +222 -0
  267. package/dist/hub/init/directory-certificate.js.map +1 -0
  268. package/dist/hub/init/existing-fleet.d.ts +6 -0
  269. package/dist/hub/init/existing-fleet.js +58 -0
  270. package/dist/hub/init/existing-fleet.js.map +1 -0
  271. package/dist/hub/init/handoff.d.ts +8 -0
  272. package/dist/hub/init/handoff.js +36 -0
  273. package/dist/hub/init/handoff.js.map +1 -0
  274. package/dist/hub/init/identity.d.ts +5 -0
  275. package/dist/hub/init/identity.js +24 -0
  276. package/dist/hub/init/identity.js.map +1 -0
  277. package/dist/hub/init/initializer.d.ts +24 -0
  278. package/dist/hub/init/initializer.js +385 -0
  279. package/dist/hub/init/initializer.js.map +1 -0
  280. package/dist/hub/init/inventory.d.ts +17 -0
  281. package/dist/hub/init/inventory.js +33 -0
  282. package/dist/hub/init/inventory.js.map +1 -0
  283. package/dist/hub/init/layout.d.ts +32 -0
  284. package/dist/hub/init/layout.js +53 -0
  285. package/dist/hub/init/layout.js.map +1 -0
  286. package/dist/hub/init/network.d.ts +18 -0
  287. package/dist/hub/init/network.js +104 -0
  288. package/dist/hub/init/network.js.map +1 -0
  289. package/dist/hub/init/plan-digest.d.ts +5 -0
  290. package/dist/hub/init/plan-digest.js +47 -0
  291. package/dist/hub/init/plan-digest.js.map +1 -0
  292. package/dist/hub/init/prompt.d.ts +26 -0
  293. package/dist/hub/init/prompt.js +110 -0
  294. package/dist/hub/init/prompt.js.map +1 -0
  295. package/dist/hub/init/secret-file.d.ts +1 -0
  296. package/dist/hub/init/secret-file.js +59 -0
  297. package/dist/hub/init/secret-file.js.map +1 -0
  298. package/dist/hub/init/text.d.ts +127 -0
  299. package/dist/hub/init/text.js +247 -0
  300. package/dist/hub/init/text.js.map +1 -0
  301. package/dist/hub/init/types.d.ts +114 -0
  302. package/dist/hub/init/types.js +9 -0
  303. package/dist/hub/init/types.js.map +1 -0
  304. package/dist/hub/init/wizard.d.ts +34 -0
  305. package/dist/hub/init/wizard.js +554 -0
  306. package/dist/hub/init/wizard.js.map +1 -0
  307. package/dist/hub/initialization.d.ts +23 -0
  308. package/dist/hub/initialization.js +28 -0
  309. package/dist/hub/initialization.js.map +1 -0
  310. package/dist/hub/member/agent-mode.d.ts +6 -0
  311. package/dist/hub/member/agent-mode.js +23 -0
  312. package/dist/hub/member/agent-mode.js.map +1 -0
  313. package/dist/hub/member/attachments.d.ts +29 -0
  314. package/dist/hub/member/attachments.js +107 -0
  315. package/dist/hub/member/attachments.js.map +1 -0
  316. package/dist/hub/member/exposure-api.d.ts +87 -0
  317. package/dist/hub/member/exposure-api.js +64 -0
  318. package/dist/hub/member/exposure-api.js.map +1 -0
  319. package/dist/hub/member/exposures.d.ts +123 -0
  320. package/dist/hub/member/exposures.js +282 -0
  321. package/dist/hub/member/exposures.js.map +1 -0
  322. package/dist/hub/member/pairing-api.d.ts +85 -0
  323. package/dist/hub/member/pairing-api.js +385 -0
  324. package/dist/hub/member/pairing-api.js.map +1 -0
  325. package/dist/hub/member/quota.d.ts +20 -0
  326. package/dist/hub/member/quota.js +98 -0
  327. package/dist/hub/member/quota.js.map +1 -0
  328. package/dist/hub/member-journal.d.ts +104 -0
  329. package/dist/hub/member-journal.js +336 -0
  330. package/dist/hub/member-journal.js.map +1 -0
  331. package/dist/hub/member-reconciliation.d.ts +14 -0
  332. package/dist/hub/member-reconciliation.js +97 -0
  333. package/dist/hub/member-reconciliation.js.map +1 -0
  334. package/dist/hub/mount.d.ts +39 -0
  335. package/dist/hub/mount.js +123 -0
  336. package/dist/hub/mount.js.map +1 -0
  337. package/dist/hub/pairing-client.d.ts +17 -0
  338. package/dist/hub/pairing-client.js +108 -0
  339. package/dist/hub/pairing-client.js.map +1 -0
  340. package/dist/hub/pairing.d.ts +67 -0
  341. package/dist/hub/pairing.js +214 -0
  342. package/dist/hub/pairing.js.map +1 -0
  343. package/dist/hub/policy.d.ts +63 -0
  344. package/dist/hub/policy.js +147 -0
  345. package/dist/hub/policy.js.map +1 -0
  346. package/dist/hub/preview.d.ts +32 -0
  347. package/dist/hub/preview.js +64 -0
  348. package/dist/hub/preview.js.map +1 -0
  349. package/dist/hub/private-files.d.ts +5 -0
  350. package/dist/hub/private-files.js +44 -0
  351. package/dist/hub/private-files.js.map +1 -0
  352. package/dist/hub/profile.d.ts +59 -0
  353. package/dist/hub/profile.js +73 -0
  354. package/dist/hub/profile.js.map +1 -0
  355. package/dist/hub/protocol.d.ts +779 -0
  356. package/dist/hub/protocol.js +93 -0
  357. package/dist/hub/protocol.js.map +1 -0
  358. package/dist/hub/quota.d.ts +24 -0
  359. package/dist/hub/quota.js +112 -0
  360. package/dist/hub/quota.js.map +1 -0
  361. package/dist/hub/representative.d.ts +141 -0
  362. package/dist/hub/representative.js +528 -0
  363. package/dist/hub/representative.js.map +1 -0
  364. package/dist/hub/retention.d.ts +17 -0
  365. package/dist/hub/retention.js +45 -0
  366. package/dist/hub/retention.js.map +1 -0
  367. package/dist/hub/rooms.d.ts +120 -0
  368. package/dist/hub/rooms.js +535 -0
  369. package/dist/hub/rooms.js.map +1 -0
  370. package/dist/hub/runtime.d.ts +106 -0
  371. package/dist/hub/runtime.js +298 -0
  372. package/dist/hub/runtime.js.map +1 -0
  373. package/dist/hub/server.d.ts +58 -0
  374. package/dist/hub/server.js +212 -0
  375. package/dist/hub/server.js.map +1 -0
  376. package/dist/hub/service-start.d.ts +17 -0
  377. package/dist/hub/service-start.js +109 -0
  378. package/dist/hub/service-start.js.map +1 -0
  379. package/dist/hub/sessions.d.ts +53 -0
  380. package/dist/hub/sessions.js +196 -0
  381. package/dist/hub/sessions.js.map +1 -0
  382. package/dist/hub/socket.d.ts +24 -0
  383. package/dist/hub/socket.js +79 -0
  384. package/dist/hub/socket.js.map +1 -0
  385. package/dist/hub/store.d.ts +77 -0
  386. package/dist/hub/store.js +88 -0
  387. package/dist/hub/store.js.map +1 -0
  388. package/dist/hub/tls.d.ts +31 -0
  389. package/dist/hub/tls.js +135 -0
  390. package/dist/hub/tls.js.map +1 -0
  391. package/dist/hub/types.d.ts +401 -0
  392. package/dist/hub/types.js +2 -0
  393. package/dist/hub/types.js.map +1 -0
  394. package/dist/hub/validation.d.ts +33 -0
  395. package/dist/hub/validation.js +136 -0
  396. package/dist/hub/validation.js.map +1 -0
  397. package/dist/hub/version-floor.d.ts +10 -0
  398. package/dist/hub/version-floor.js +45 -0
  399. package/dist/hub/version-floor.js.map +1 -0
  400. package/dist/hub-browser-certificate-policy.d.ts +31 -0
  401. package/dist/hub-browser-certificate-policy.js +25 -0
  402. package/dist/hub-browser-certificate-policy.js.map +1 -0
  403. package/dist/hub-membership-settings.d.ts +6 -0
  404. package/dist/hub-membership-settings.js +21 -0
  405. package/dist/hub-membership-settings.js.map +1 -0
  406. package/dist/hub-mode.d.ts +15 -0
  407. package/dist/hub-mode.js +17 -0
  408. package/dist/hub-mode.js.map +1 -0
  409. package/dist/hub-pairing-summary.d.ts +48 -0
  410. package/dist/hub-pairing-summary.js +36 -0
  411. package/dist/hub-pairing-summary.js.map +1 -0
  412. package/dist/hub-report-target.d.ts +32 -0
  413. package/dist/hub-report-target.js +33 -0
  414. package/dist/hub-report-target.js.map +1 -0
  415. package/dist/hub-retention-policy.d.ts +14 -0
  416. package/dist/hub-retention-policy.js +15 -0
  417. package/dist/hub-retention-policy.js.map +1 -0
  418. package/dist/instance-config-impact.js +7 -3
  419. package/dist/instance-config-impact.js.map +1 -1
  420. package/dist/instance-lifecycle.d.ts +34 -2
  421. package/dist/instance-lifecycle.js +96 -9
  422. package/dist/instance-lifecycle.js.map +1 -1
  423. package/dist/instance-topic-delete.d.ts +77 -0
  424. package/dist/instance-topic-delete.js +123 -0
  425. package/dist/instance-topic-delete.js.map +1 -0
  426. package/dist/instructions.d.ts +1 -1
  427. package/dist/instructions.js +1 -1
  428. package/dist/instructions.js.map +1 -1
  429. package/dist/kiro-engine-status.d.ts +11 -0
  430. package/dist/kiro-engine-status.js +6 -0
  431. package/dist/kiro-engine-status.js.map +1 -1
  432. package/dist/launchd-service-domain.d.ts +5 -0
  433. package/dist/launchd-service-domain.js +21 -0
  434. package/dist/launchd-service-domain.js.map +1 -0
  435. package/dist/locale.js +146 -3
  436. package/dist/locale.js.map +1 -1
  437. package/dist/log-service.d.ts +28 -0
  438. package/dist/log-service.js +29 -0
  439. package/dist/log-service.js.map +1 -1
  440. package/dist/log-steps.d.ts +4 -3
  441. package/dist/log-steps.js +32 -7
  442. package/dist/log-steps.js.map +1 -1
  443. package/dist/logger.d.ts +16 -2
  444. package/dist/logger.js +346 -66
  445. package/dist/logger.js.map +1 -1
  446. package/dist/login-controller.d.ts +5 -0
  447. package/dist/login-controller.js +11 -0
  448. package/dist/login-controller.js.map +1 -1
  449. package/dist/login-flows.d.ts +15 -7
  450. package/dist/login-flows.js +29 -3
  451. package/dist/login-flows.js.map +1 -1
  452. package/dist/login-manager.js +25 -4
  453. package/dist/login-manager.js.map +1 -1
  454. package/dist/login-window-lock.d.ts +2 -1
  455. package/dist/login-window-lock.js.map +1 -1
  456. package/dist/ls-rows.d.ts +1 -1
  457. package/dist/ls-rows.js +3 -4
  458. package/dist/ls-rows.js.map +1 -1
  459. package/dist/machine-accounts.d.ts +110 -0
  460. package/dist/machine-accounts.js +229 -0
  461. package/dist/machine-accounts.js.map +1 -0
  462. package/dist/machine-signins.d.ts +89 -0
  463. package/dist/machine-signins.js +182 -0
  464. package/dist/machine-signins.js.map +1 -0
  465. package/dist/missed-offline.d.ts +25 -0
  466. package/dist/missed-offline.js +79 -0
  467. package/dist/missed-offline.js.map +1 -0
  468. package/dist/muse-usage-relay.d.ts +2 -0
  469. package/dist/muse-usage-relay.js +5 -3
  470. package/dist/muse-usage-relay.js.map +1 -1
  471. package/dist/native-instance-api.d.ts +0 -1
  472. package/dist/native-instance-api.js +15 -3
  473. package/dist/native-instance-api.js.map +1 -1
  474. package/dist/native-instance-input.d.ts +3 -0
  475. package/dist/native-instance-input.js +6 -1
  476. package/dist/native-instance-input.js.map +1 -1
  477. package/dist/native-instance-registry.d.ts +6 -0
  478. package/dist/native-instance-registry.js +24 -0
  479. package/dist/native-instance-registry.js.map +1 -1
  480. package/dist/native-mcp.d.ts +3 -0
  481. package/dist/native-mcp.js +15 -2
  482. package/dist/native-mcp.js.map +1 -1
  483. package/dist/native-pane-lifecycle.d.ts +8 -0
  484. package/dist/native-pane-lifecycle.js +13 -4
  485. package/dist/native-pane-lifecycle.js.map +1 -1
  486. package/dist/native-pane-manager.js +17 -9
  487. package/dist/native-pane-manager.js.map +1 -1
  488. package/dist/needs-you-hub.d.ts +12 -1
  489. package/dist/needs-you-hub.js +57 -9
  490. package/dist/needs-you-hub.js.map +1 -1
  491. package/dist/needs-you.d.ts +80 -2
  492. package/dist/needs-you.js +50 -3
  493. package/dist/needs-you.js.map +1 -1
  494. package/dist/office-share-page.js +2 -2
  495. package/dist/office-share-page.js.map +1 -1
  496. package/dist/office-share.d.ts +11 -0
  497. package/dist/office-share.js +14 -0
  498. package/dist/office-share.js.map +1 -1
  499. package/dist/office-talk.d.ts +26 -0
  500. package/dist/office-talk.js +50 -0
  501. package/dist/office-talk.js.map +1 -0
  502. package/dist/outbound-handlers.d.ts +14 -0
  503. package/dist/outbound-handlers.js +49 -6
  504. package/dist/outbound-handlers.js.map +1 -1
  505. package/dist/outbound-schemas.d.ts +33 -1
  506. package/dist/outbound-schemas.js +29 -16
  507. package/dist/outbound-schemas.js.map +1 -1
  508. package/dist/pane-quota-history.d.ts +9 -0
  509. package/dist/pane-quota-history.js +67 -0
  510. package/dist/pane-quota-history.js.map +1 -0
  511. package/dist/pause-marker.d.ts +1 -1
  512. package/dist/pause-marker.js +1 -1
  513. package/dist/pause-marker.js.map +1 -1
  514. package/dist/platform-general.d.ts +46 -0
  515. package/dist/platform-general.js +91 -0
  516. package/dist/platform-general.js.map +1 -0
  517. package/dist/public-web-gateway.js +7 -0
  518. package/dist/public-web-gateway.js.map +1 -1
  519. package/dist/queued-handoffs.d.ts +33 -0
  520. package/dist/queued-handoffs.js +75 -0
  521. package/dist/queued-handoffs.js.map +1 -0
  522. package/dist/quickstart.d.ts +13 -0
  523. package/dist/quickstart.js +68 -3
  524. package/dist/quickstart.js.map +1 -1
  525. package/dist/quiet-run.d.ts +31 -0
  526. package/dist/quiet-run.js +50 -0
  527. package/dist/quiet-run.js.map +1 -0
  528. package/dist/quota-notice-config.d.ts +22 -0
  529. package/dist/quota-notice-config.js +41 -0
  530. package/dist/quota-notice-config.js.map +1 -0
  531. package/dist/quota-notice.d.ts +7 -0
  532. package/dist/quota-notice.js +40 -0
  533. package/dist/quota-notice.js.map +1 -1
  534. package/dist/reply-buttons-controller.js +10 -6
  535. package/dist/reply-buttons-controller.js.map +1 -1
  536. package/dist/reply-polls.d.ts +2 -2
  537. package/dist/reply-polls.js +3 -3
  538. package/dist/reply-polls.js.map +1 -1
  539. package/dist/runtime-api.d.ts +15 -0
  540. package/dist/runtime-api.js +149 -7
  541. package/dist/runtime-api.js.map +1 -1
  542. package/dist/runtime-build-info.d.ts +2 -1
  543. package/dist/runtime-build-info.js +9 -3
  544. package/dist/runtime-build-info.js.map +1 -1
  545. package/dist/runtime-bundle.d.ts +3 -0
  546. package/dist/runtime-bundle.js +3 -1
  547. package/dist/runtime-bundle.js.map +1 -1
  548. package/dist/runtime-cli-install.d.ts +153 -0
  549. package/dist/runtime-cli-install.js +675 -0
  550. package/dist/runtime-cli-install.js.map +1 -0
  551. package/dist/runtime-cli.d.ts +8 -1
  552. package/dist/runtime-cli.js +273 -9
  553. package/dist/runtime-cli.js.map +1 -1
  554. package/dist/runtime-client-store.d.ts +7 -0
  555. package/dist/runtime-client-store.js +30 -2
  556. package/dist/runtime-client-store.js.map +1 -1
  557. package/dist/runtime-client.d.ts +126 -2
  558. package/dist/runtime-client.js +558 -27
  559. package/dist/runtime-client.js.map +1 -1
  560. package/dist/runtime-coordinator.d.ts +17 -1
  561. package/dist/runtime-coordinator.js +304 -35
  562. package/dist/runtime-coordinator.js.map +1 -1
  563. package/dist/runtime-credential-profiles.d.ts +87 -0
  564. package/dist/runtime-credential-profiles.js +304 -0
  565. package/dist/runtime-credential-profiles.js.map +1 -0
  566. package/dist/runtime-install.d.ts +50 -0
  567. package/dist/runtime-install.js +189 -0
  568. package/dist/runtime-install.js.map +1 -0
  569. package/dist/runtime-pane-assets.d.ts +1 -1
  570. package/dist/runtime-pane-assets.js +1 -1
  571. package/dist/runtime-pane-assets.js.map +1 -1
  572. package/dist/runtime-pane-codex-index.d.ts +10 -1
  573. package/dist/runtime-pane-codex-index.js +131 -27
  574. package/dist/runtime-pane-codex-index.js.map +1 -1
  575. package/dist/runtime-pane-host.d.ts +19 -0
  576. package/dist/runtime-pane-host.js +50 -7
  577. package/dist/runtime-pane-host.js.map +1 -1
  578. package/dist/runtime-pane-link.d.ts +7 -0
  579. package/dist/runtime-pane-link.js +95 -3
  580. package/dist/runtime-pane-link.js.map +1 -1
  581. package/dist/runtime-pane-mcp-relay.d.ts +1 -0
  582. package/dist/runtime-pane-mcp-relay.js +10 -0
  583. package/dist/runtime-pane-mcp-relay.js.map +1 -1
  584. package/dist/runtime-pane-mcp.d.ts +4 -0
  585. package/dist/runtime-pane-mcp.js +6 -3
  586. package/dist/runtime-pane-mcp.js.map +1 -1
  587. package/dist/runtime-pane-native.d.ts +32 -2
  588. package/dist/runtime-pane-native.js +55 -6
  589. package/dist/runtime-pane-native.js.map +1 -1
  590. package/dist/runtime-pane-port.d.ts +5 -0
  591. package/dist/runtime-pane-port.js +17 -1
  592. package/dist/runtime-pane-port.js.map +1 -1
  593. package/dist/runtime-pane-process.d.ts +1 -1
  594. package/dist/runtime-pane-process.js +11 -2
  595. package/dist/runtime-pane-process.js.map +1 -1
  596. package/dist/runtime-pane-protocol.d.ts +11 -1
  597. package/dist/runtime-pane-protocol.js +27 -5
  598. package/dist/runtime-pane-protocol.js.map +1 -1
  599. package/dist/runtime-pane-quota-history.d.ts +6 -0
  600. package/dist/runtime-pane-quota-history.js +44 -0
  601. package/dist/runtime-pane-quota-history.js.map +1 -0
  602. package/dist/runtime-pane-service.d.ts +5 -0
  603. package/dist/runtime-pane-service.js +49 -14
  604. package/dist/runtime-pane-service.js.map +1 -1
  605. package/dist/runtime-pane-store.d.ts +10 -0
  606. package/dist/runtime-pane-store.js +13 -1
  607. package/dist/runtime-pane-store.js.map +1 -1
  608. package/dist/runtime-pane-transcript.d.ts +5 -0
  609. package/dist/runtime-pane-transcript.js +66 -5
  610. package/dist/runtime-pane-transcript.js.map +1 -1
  611. package/dist/runtime-pane-worker.js +19 -6
  612. package/dist/runtime-pane-worker.js.map +1 -1
  613. package/dist/runtime-profile-ownership.d.ts +66 -0
  614. package/dist/runtime-profile-ownership.js +391 -0
  615. package/dist/runtime-profile-ownership.js.map +1 -0
  616. package/dist/runtime-protocol.d.ts +103 -2
  617. package/dist/runtime-protocol.js +52 -0
  618. package/dist/runtime-protocol.js.map +1 -1
  619. package/dist/runtime-remote-accounts.d.ts +197 -0
  620. package/dist/runtime-remote-accounts.js +663 -0
  621. package/dist/runtime-remote-accounts.js.map +1 -0
  622. package/dist/runtime-remote-setup.d.ts +105 -0
  623. package/dist/runtime-remote-setup.js +529 -0
  624. package/dist/runtime-remote-setup.js.map +1 -0
  625. package/dist/runtime-signin-transport.d.ts +39 -0
  626. package/dist/runtime-signin-transport.js +110 -0
  627. package/dist/runtime-signin-transport.js.map +1 -0
  628. package/dist/runtime-signin.d.ts +132 -0
  629. package/dist/runtime-signin.js +289 -0
  630. package/dist/runtime-signin.js.map +1 -0
  631. package/dist/runtime-update-activity.d.ts +21 -0
  632. package/dist/runtime-update-activity.js +51 -0
  633. package/dist/runtime-update-activity.js.map +1 -0
  634. package/dist/runtime-update-artifact.d.ts +31 -0
  635. package/dist/runtime-update-artifact.js +252 -0
  636. package/dist/runtime-update-artifact.js.map +1 -0
  637. package/dist/runtime-update-attention.d.ts +4 -0
  638. package/dist/runtime-update-attention.js +11 -0
  639. package/dist/runtime-update-attention.js.map +1 -0
  640. package/dist/runtime-update-controller.d.ts +75 -0
  641. package/dist/runtime-update-controller.js +691 -0
  642. package/dist/runtime-update-controller.js.map +1 -0
  643. package/dist/runtime-update-install.d.ts +31 -0
  644. package/dist/runtime-update-install.js +205 -0
  645. package/dist/runtime-update-install.js.map +1 -0
  646. package/dist/runtime-update-ipc.d.ts +42 -0
  647. package/dist/runtime-update-ipc.js +144 -0
  648. package/dist/runtime-update-ipc.js.map +1 -0
  649. package/dist/runtime-update-journal.d.ts +49 -0
  650. package/dist/runtime-update-journal.js +128 -0
  651. package/dist/runtime-update-journal.js.map +1 -0
  652. package/dist/runtime-update-lock.d.ts +48 -0
  653. package/dist/runtime-update-lock.js +232 -0
  654. package/dist/runtime-update-lock.js.map +1 -0
  655. package/dist/runtime-update-owners.d.ts +29 -0
  656. package/dist/runtime-update-owners.js +240 -0
  657. package/dist/runtime-update-owners.js.map +1 -0
  658. package/dist/runtime-update-protocol.d.ts +15 -0
  659. package/dist/runtime-update-protocol.js +13 -0
  660. package/dist/runtime-update-protocol.js.map +1 -0
  661. package/dist/runtime-update-status.d.ts +30 -0
  662. package/dist/runtime-update-status.js +31 -0
  663. package/dist/runtime-update-status.js.map +1 -0
  664. package/dist/runtime-windows-bridge.d.ts +2 -1
  665. package/dist/runtime-windows-bridge.js +11 -1
  666. package/dist/runtime-windows-bridge.js.map +1 -1
  667. package/dist/scheduler/db.d.ts +2 -1
  668. package/dist/scheduler/db.js +23 -9
  669. package/dist/scheduler/db.js.map +1 -1
  670. package/dist/scheduler/task-board-text.js +1 -1
  671. package/dist/scheduler/task-board-text.js.map +1 -1
  672. package/dist/scheduler/task-board.d.ts +13 -0
  673. package/dist/scheduler/task-board.js +28 -3
  674. package/dist/scheduler/task-board.js.map +1 -1
  675. package/dist/service-drain.d.ts +19 -0
  676. package/dist/service-drain.js +64 -0
  677. package/dist/service-drain.js.map +1 -0
  678. package/dist/service-installer.d.ts +7 -2
  679. package/dist/service-installer.js +13 -10
  680. package/dist/service-installer.js.map +1 -1
  681. package/dist/settings-api.d.ts +20 -0
  682. package/dist/settings-api.js +417 -4
  683. package/dist/settings-api.js.map +1 -1
  684. package/dist/settings-baseline.d.ts +6 -0
  685. package/dist/settings-baseline.js +3 -1
  686. package/dist/settings-baseline.js.map +1 -1
  687. package/dist/settings-change.js +37 -6
  688. package/dist/settings-change.js.map +1 -1
  689. package/dist/settings-effect.d.ts +13 -0
  690. package/dist/settings-effect.js +97 -0
  691. package/dist/settings-effect.js.map +1 -1
  692. package/dist/settings-http-confirmation.js +13 -1
  693. package/dist/settings-http-confirmation.js.map +1 -1
  694. package/dist/settings-instance-patch.js +28 -1
  695. package/dist/settings-instance-patch.js.map +1 -1
  696. package/dist/setup-wizard.js +4 -2
  697. package/dist/setup-wizard.js.map +1 -1
  698. package/dist/signin-keepalive.d.ts +203 -0
  699. package/dist/signin-keepalive.js +652 -0
  700. package/dist/signin-keepalive.js.map +1 -0
  701. package/dist/structured-signin-transport.js +4 -0
  702. package/dist/structured-signin-transport.js.map +1 -1
  703. package/dist/structured-signin.d.ts +7 -0
  704. package/dist/structured-signin.js +1 -1
  705. package/dist/structured-signin.js.map +1 -1
  706. package/dist/task-board-tool.d.ts +13 -1
  707. package/dist/task-board-tool.js +104 -4
  708. package/dist/task-board-tool.js.map +1 -1
  709. package/dist/task-board-waker.d.ts +6 -0
  710. package/dist/task-board-waker.js +4 -0
  711. package/dist/task-board-waker.js.map +1 -1
  712. package/dist/tmux-binary.d.ts +59 -0
  713. package/dist/tmux-binary.js +189 -0
  714. package/dist/tmux-binary.js.map +1 -0
  715. package/dist/tmux-control.js +4 -4
  716. package/dist/tmux-control.js.map +1 -1
  717. package/dist/tmux-exec-helper.js +32 -1
  718. package/dist/tmux-exec-helper.js.map +1 -1
  719. package/dist/tmux-legacy.d.ts +94 -0
  720. package/dist/tmux-legacy.js +309 -0
  721. package/dist/tmux-legacy.js.map +1 -0
  722. package/dist/tmux-manager.d.ts +7 -1
  723. package/dist/tmux-manager.js +56 -37
  724. package/dist/tmux-manager.js.map +1 -1
  725. package/dist/tmux-read.js +4 -3
  726. package/dist/tmux-read.js.map +1 -1
  727. package/dist/tmux-rollback.d.ts +31 -0
  728. package/dist/tmux-rollback.js +72 -0
  729. package/dist/tmux-rollback.js.map +1 -0
  730. package/dist/tmux-server.d.ts +102 -0
  731. package/dist/tmux-server.js +248 -0
  732. package/dist/tmux-server.js.map +1 -0
  733. package/dist/tool-permissions.d.ts +5 -2
  734. package/dist/tool-permissions.js +6 -5
  735. package/dist/tool-permissions.js.map +1 -1
  736. package/dist/tool-progress.d.ts +2 -0
  737. package/dist/tool-progress.js +19 -3
  738. package/dist/tool-progress.js.map +1 -1
  739. package/dist/topic-commands.js +10 -5
  740. package/dist/topic-commands.js.map +1 -1
  741. package/dist/transcript-monitor.d.ts +20 -0
  742. package/dist/transcript-monitor.js +87 -5
  743. package/dist/transcript-monitor.js.map +1 -1
  744. package/dist/transcript-needles.d.ts +7 -0
  745. package/dist/transcript-needles.js +9 -1
  746. package/dist/transcript-needles.js.map +1 -1
  747. package/dist/transcript-records.d.ts +2 -1
  748. package/dist/transcript-records.js +5 -1
  749. package/dist/transcript-records.js.map +1 -1
  750. package/dist/transcript-sources.js +3 -0
  751. package/dist/transcript-sources.js.map +1 -1
  752. package/dist/types.d.ts +9 -0
  753. package/dist/ui/account-identity.js +27 -0
  754. package/dist/ui/accounts-keepalive.js +112 -0
  755. package/dist/ui/accounts-manage.js +237 -0
  756. package/dist/ui/accounts-view.js +358 -0
  757. package/dist/ui/agent-runtime-settings.js +11 -9
  758. package/dist/ui/app.html +8 -1
  759. package/dist/ui/backend-signin.js +4 -1
  760. package/dist/ui/chat-ambient.js +1 -1
  761. package/dist/ui/chat-md-strings.js +3 -0
  762. package/dist/ui/chat-render.js +3 -670
  763. package/dist/ui/chat-store.js +1 -1
  764. package/dist/ui/chat-strings.js +3 -333
  765. package/dist/ui/chat-thread.js +3 -919
  766. package/dist/ui/chat-time.js +3 -80
  767. package/dist/ui/chat-tour.js +1 -1
  768. package/dist/ui/credential-profile-select.js +54 -0
  769. package/dist/ui/fleet-office-dialogue.d.ts +30 -0
  770. package/dist/ui/fleet-office-dialogue.js +382 -0
  771. package/dist/ui/fleet-office-pack.d.ts +9 -0
  772. package/dist/ui/fleet-office-pack.js +76 -4
  773. package/dist/ui/fleet-office-skin.js +23 -5
  774. package/dist/ui/fleet-office-store.js +5 -0
  775. package/dist/ui/fleet-office.js +173 -6
  776. package/dist/ui/fleet-task-card.js +10 -6
  777. package/dist/ui/fleet-task-common.js +12 -2
  778. package/dist/ui/fleet-task-menu.js +188 -0
  779. package/dist/ui/fleet-task-stats.js +124 -0
  780. package/dist/ui/fleet-task-view.js +340 -0
  781. package/dist/ui/fleet-tasks.js +131 -43
  782. package/dist/ui/fleet-usage.js +90 -27
  783. package/dist/ui/html-attachment.js +3 -40
  784. package/dist/ui/hub-agent-copy.js +23 -0
  785. package/dist/ui/hub-attachments.js +90 -0
  786. package/dist/ui/hub-button-actions.js +65 -0
  787. package/dist/ui/hub-chat-store.js +163 -0
  788. package/dist/ui/hub-chat-strings.js +77 -0
  789. package/dist/ui/hub-client.js +348 -0
  790. package/dist/ui/hub-owner-strings.js +51 -0
  791. package/dist/ui/hub-preview.js +101 -0
  792. package/dist/ui/hub-provider-guidance.js +31 -0
  793. package/dist/ui/hub-quota.js +85 -0
  794. package/dist/ui/hub-strings.js +162 -0
  795. package/dist/ui/hub-switcher.js +27 -0
  796. package/dist/ui/machine-signin.js +56 -0
  797. package/dist/ui/native-pane-recovery.js +1 -1
  798. package/dist/ui/office-share-page.js +4 -2
  799. package/dist/ui/panel-chat.js +34 -48
  800. package/dist/ui/panel-details.js +1 -1
  801. package/dist/ui/panel-fleet.js +79 -11
  802. package/dist/ui/panel-hub.js +714 -0
  803. package/dist/ui/panel-log.js +2 -2
  804. package/dist/ui/panel-needs.js +36 -14
  805. package/dist/ui/panel-notices.js +4 -3
  806. package/dist/ui/panel-runtimes.js +131 -27
  807. package/dist/ui/panel-settings.js +81 -86
  808. package/dist/ui/panel-windows-agent.js +2 -1
  809. package/dist/ui/panel-windows-cli.js +12 -2
  810. package/dist/ui/preview-pages.js +3 -41
  811. package/dist/ui/preview-panel-actions.js +3 -161
  812. package/dist/ui/preview-panel.js +11 -472
  813. package/dist/ui/preview-versions.js +3 -155
  814. package/dist/ui/preview.js +3 -476
  815. package/dist/ui/runtime-cli-install.js +114 -0
  816. package/dist/ui/runtime-commands.d.ts +4 -0
  817. package/dist/ui/runtime-commands.js +59 -0
  818. package/dist/ui/runtime-update-commands.d.ts +2 -0
  819. package/dist/ui/runtime-update-commands.js +11 -0
  820. package/dist/ui/runtime-update-status.js +53 -0
  821. package/dist/ui/search-dialog.js +5 -2
  822. package/dist/ui/settings-access-strings.js +42 -0
  823. package/dist/ui/settings-build-version.js +35 -0
  824. package/dist/ui/settings-codex-copy.js +19 -0
  825. package/dist/ui/settings-devices.js +253 -0
  826. package/dist/ui/settings-dialogs.js +28 -7
  827. package/dist/ui/settings-guests.js +3 -2
  828. package/dist/ui/settings-hub-browser-certificate.js +76 -0
  829. package/dist/ui/settings-hub-membership.js +78 -0
  830. package/dist/ui/settings-hub-retention.js +54 -0
  831. package/dist/ui/settings-hub.js +204 -0
  832. package/dist/ui/settings-layout.js +8 -11
  833. package/dist/ui/settings-model.js +16 -2
  834. package/dist/ui/settings-outside.js +104 -38
  835. package/dist/ui/settings-quota-notice.js +100 -0
  836. package/dist/ui/settings-registry.js +5 -1
  837. package/dist/ui/settings-shared-strings.js +143 -0
  838. package/dist/ui/settings-shared.js +345 -0
  839. package/dist/ui/settings-strings.js +12 -48
  840. package/dist/ui/settings-web-authority.js +7 -3
  841. package/dist/ui/shared/accounts-keepalive.css +7 -0
  842. package/dist/ui/shared/accounts.css +28 -0
  843. package/dist/ui/shared/app-i18n.js +2 -2
  844. package/dist/ui/shared/app-needs.js +1 -1
  845. package/dist/ui/shared/app-route.js +7 -2
  846. package/dist/ui/shared/app-session.js +6 -2
  847. package/dist/ui/shared/app-shell.js +73 -11
  848. package/dist/ui/shared/app-store.js +2 -2
  849. package/dist/ui/shared/app.css +134 -30
  850. package/dist/ui/shared/app.js +14 -4
  851. package/dist/ui/shared/chat-composer.js +68 -0
  852. package/dist/ui/shared/chat-md-strings.js +9 -0
  853. package/dist/ui/shared/chat-render.js +682 -0
  854. package/dist/ui/shared/chat-strings.js +333 -0
  855. package/dist/ui/shared/chat-thread.js +969 -0
  856. package/dist/ui/shared/chat-time.js +80 -0
  857. package/dist/ui/shared/header-tools.js +3 -5
  858. package/dist/ui/shared/html-attachment.js +42 -0
  859. package/dist/ui/shared/hub-chat.css +86 -0
  860. package/dist/ui/shared/hub-owner.css +33 -0
  861. package/dist/ui/shared/hub-quota.css +8 -0
  862. package/dist/ui/shared/hub.css +71 -0
  863. package/dist/ui/shared/loading.css +37 -0
  864. package/dist/ui/shared/page-head.js +8 -0
  865. package/dist/ui/shared/panel-view.js +77 -4
  866. package/dist/ui/shared/preview-pages.js +41 -0
  867. package/dist/ui/shared/preview-panel-actions.js +168 -0
  868. package/dist/ui/shared/preview-panel.js +565 -0
  869. package/dist/ui/shared/preview-versions.js +155 -0
  870. package/dist/ui/shared/preview.js +476 -0
  871. package/dist/ui/shared/runtime-install.css +30 -0
  872. package/dist/ui/shared/side-rail.js +15 -0
  873. package/dist/ui/shared/signin.js +238 -4
  874. package/dist/ui/shared/task-board.css +95 -0
  875. package/dist/ui/shared/ui-states.js +14 -3
  876. package/dist/ui/shared/usage-dialog.js +18 -1
  877. package/dist/ui/shared/view-history.css +17 -0
  878. package/dist/ui/shared/view-history.js +438 -0
  879. package/dist/ui/shared/view-strings.js +16 -0
  880. package/dist/ui/shared/workspace-follow.css +19 -0
  881. package/dist/ui/shared/workspace.css +20 -0
  882. package/dist/ui/signin.html +27 -2
  883. package/dist/ui/structured-signin.js +31 -7
  884. package/dist/ui/workspace-follow-strings.js +28 -0
  885. package/dist/ui/workspace-panel.js +378 -0
  886. package/dist/ui/workspace-strings.js +35 -0
  887. package/dist/unattended-install.d.ts +11 -2
  888. package/dist/unattended-install.js +41 -6
  889. package/dist/unattended-install.js.map +1 -1
  890. package/dist/update-install.d.ts +7 -0
  891. package/dist/update-install.js +23 -0
  892. package/dist/update-install.js.map +1 -1
  893. package/dist/usage/capacity.d.ts +69 -0
  894. package/dist/usage/capacity.js +119 -0
  895. package/dist/usage/capacity.js.map +1 -0
  896. package/dist/usage/i18n-keys.d.ts +1 -1
  897. package/dist/usage/i18n-keys.js +3 -0
  898. package/dist/usage/i18n-keys.js.map +1 -1
  899. package/dist/usage/profile-timeline.d.ts +16 -0
  900. package/dist/usage/profile-timeline.js +58 -0
  901. package/dist/usage/profile-timeline.js.map +1 -0
  902. package/dist/usage/providers.d.ts +5 -0
  903. package/dist/usage/providers.js +7 -1
  904. package/dist/usage/providers.js.map +1 -1
  905. package/dist/usage/quota-history.d.ts +43 -0
  906. package/dist/usage/quota-history.js +168 -0
  907. package/dist/usage/quota-history.js.map +1 -0
  908. package/dist/usage/quota-notices.d.ts +38 -0
  909. package/dist/usage/quota-notices.js +160 -0
  910. package/dist/usage/quota-notices.js.map +1 -0
  911. package/dist/usage/usage-api.d.ts +32 -0
  912. package/dist/usage/usage-api.js +96 -1
  913. package/dist/usage/usage-api.js.map +1 -1
  914. package/dist/usage-report.d.ts +25 -1
  915. package/dist/usage-report.js +55 -4
  916. package/dist/usage-report.js.map +1 -1
  917. package/dist/usage-rollup.d.ts +6 -1
  918. package/dist/usage-rollup.js +16 -4
  919. package/dist/usage-rollup.js.map +1 -1
  920. package/dist/view-api.d.ts +16 -0
  921. package/dist/view-api.js +105 -23
  922. package/dist/view-api.js.map +1 -1
  923. package/dist/view-history.d.ts +84 -0
  924. package/dist/view-history.js +116 -0
  925. package/dist/view-history.js.map +1 -0
  926. package/dist/web-api.d.ts +81 -2
  927. package/dist/web-api.js +615 -13
  928. package/dist/web-api.js.map +1 -1
  929. package/dist/web-backend-login.d.ts +23 -1
  930. package/dist/web-backend-login.js +11 -17
  931. package/dist/web-backend-login.js.map +1 -1
  932. package/dist/web-device-login.d.ts +153 -0
  933. package/dist/web-device-login.js +278 -0
  934. package/dist/web-device-login.js.map +1 -0
  935. package/dist/web-login.d.ts +35 -1
  936. package/dist/web-login.js +51 -5
  937. package/dist/web-login.js.map +1 -1
  938. package/dist/web-office-skins.d.ts +9 -0
  939. package/dist/web-office-skins.js +16 -1
  940. package/dist/web-office-skins.js.map +1 -1
  941. package/dist/web-session-authorization.d.ts +13 -2
  942. package/dist/web-session-authorization.js +10 -3
  943. package/dist/web-session-authorization.js.map +1 -1
  944. package/dist/web-session.d.ts +46 -0
  945. package/dist/web-session.js +45 -1
  946. package/dist/web-session.js.map +1 -1
  947. package/dist/web-settings-patch.d.ts +3 -1
  948. package/dist/web-settings-patch.js +4 -1
  949. package/dist/web-settings-patch.js.map +1 -1
  950. package/dist/web-shell-routes.d.ts +7 -1
  951. package/dist/web-shell-routes.js +8 -1
  952. package/dist/web-shell-routes.js.map +1 -1
  953. package/dist/web-signin-link.d.ts +42 -0
  954. package/dist/web-signin-link.js +110 -0
  955. package/dist/web-signin-link.js.map +1 -0
  956. package/dist/web-terminal.d.ts +4 -30
  957. package/dist/web-terminal.js +9 -6
  958. package/dist/web-terminal.js.map +1 -1
  959. package/dist/windows-agents.d.ts +1 -0
  960. package/dist/windows-agents.js +1 -0
  961. package/dist/windows-agents.js.map +1 -1
  962. package/dist/windows-cli-api.d.ts +18 -1
  963. package/dist/windows-cli-api.js +38 -1
  964. package/dist/windows-cli-api.js.map +1 -1
  965. package/dist/windows-cli-providers.d.ts +0 -9
  966. package/dist/windows-cli-providers.js +4 -9
  967. package/dist/windows-cli-providers.js.map +1 -1
  968. package/dist/windows-cli-worker.d.ts +26 -0
  969. package/dist/windows-cli-worker.js +113 -7
  970. package/dist/windows-cli-worker.js.map +1 -1
  971. package/dist/windows-cli.d.ts +10 -0
  972. package/dist/windows-cli.js +10 -1
  973. package/dist/windows-cli.js.map +1 -1
  974. package/dist/workspace-follow-parse.d.ts +36 -0
  975. package/dist/workspace-follow-parse.js +208 -0
  976. package/dist/workspace-follow-parse.js.map +1 -0
  977. package/dist/workspace-follow-records.d.ts +17 -0
  978. package/dist/workspace-follow-records.js +88 -0
  979. package/dist/workspace-follow-records.js.map +1 -0
  980. package/dist/workspace-follow.d.ts +41 -0
  981. package/dist/workspace-follow.js +143 -0
  982. package/dist/workspace-follow.js.map +1 -0
  983. package/dist/wsl-detect.d.ts +1 -0
  984. package/dist/wsl-detect.js +20 -0
  985. package/dist/wsl-detect.js.map +1 -0
  986. package/dist/yaml-shared-nodes.js +8 -3
  987. package/dist/yaml-shared-nodes.js.map +1 -1
  988. package/launcher/agend-install.cjs +8 -1
  989. package/launcher/launchd-session-type.cjs +14 -0
  990. package/launcher/postinstall.cjs +27 -2
  991. package/launcher/private-home.cjs +1 -1
  992. package/launcher/tmux-bundle.cjs +263 -0
  993. package/package.json +8 -3
  994. package/templates/launchd.plist.ejs +3 -1
  995. package/templates/runtime-install/install.ps1 +411 -0
package/dist/web-api.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { hubModeOf, hubNameOf } from "./hub-mode.js";
2
+ import { validCredentialProfileName } from "./runtime-credential-profiles.js";
1
3
  import { CANVAS_WORKER_EXPERIMENTAL_MESSAGE } from "./web-experimental.js";
2
4
  import { MachineSlotLimitError } from "./windows-agents.js";
3
5
  import { daemonTopicMode } from "./web-only-fleet.js";
@@ -46,6 +48,10 @@ import { WEB_CHAT_CARDS_OVERFLOW, catchUpWindow, newWebMessageId, parseLastEvent
46
48
  import { PAGE_SHARE_LIMITS, htmlFences, htmlTitle } from "./page-share.js";
47
49
  import { attachmentDelivery, createPartFile, displayName, fileTooLargeText, INLINE_MIME, isFileId, MEDIA_RANGE_MAX, publicAttachment, UPLOAD_LIMITS, UPLOAD_MAX_MS, UPLOAD_STALL_MS, UploadSniffer, uploadLimits, wellFormed } from "./web-upload.js";
48
50
  import { getAgendHome } from "./paths.js";
51
+ import { workspaceChanges, workspaceFile, workspaceFileDiff, workspaceImage, workspaceList, workspaceRoot, WorkspaceError } from "./agent-workspace.js";
52
+ import { resolveFollowSteps } from "./workspace-follow.js";
53
+ import { isGeneralInstance } from "./general-instance.js";
54
+ import { resolveToolSet } from "./tool-permissions.js";
49
55
  import { OPERATOR, isOwnerEffectKey } from "./web-prefs.js";
50
56
  import { WEB_NAME_FALLBACK, webPersonKey } from "./web-profile.js";
51
57
  import { commitTeamCreate, commitTeamUpdate } from "./outbound-handlers.js";
@@ -63,6 +69,8 @@ import { isWindowsInstance, isNativePaneInstance, isNativeExecInstance } from ".
63
69
  import { handleNativeModelCatalog } from "./native-model-catalog.js";
64
70
  import { claudeDocumentedModels } from "./model-catalog-defaults.js";
65
71
  import { handleRuntimeRequest } from "./runtime-api.js";
72
+ import { taskBoardOffNames } from "./dashboard-permissions.js";
73
+ import { topicFields } from "./instance-topic-delete.js";
66
74
  // ── Strict public-facing schemas ────────────────────────────────────────────
67
75
  // web-api endpoints must reject unknown fields so the dashboard cannot inject
68
76
  // internal-only flags that would reach handleCreate/scheduler/config writers.
@@ -241,8 +249,10 @@ function visibleNeeds(ctx, gateway, items) {
241
249
  const { hidden } = boardHiding(ctx, true);
242
250
  return items.filter((i) => {
243
251
  const item = i;
244
- if (item.type === "config")
245
- return false; // private operator configuration diagnostics never cross a public link
252
+ if (item.type === "config" || item.type === "hub")
253
+ return false; // member-local diagnostics/proposals never cross a public link
254
+ if (item.type === "runtime")
255
+ return false;
246
256
  if (item.type !== "task")
247
257
  return true;
248
258
  const code = item.card?.code;
@@ -1105,18 +1115,85 @@ function handleBrowserBackendSignIns(req, res, url, ctx) {
1105
1115
  json(res, 403, { error: "sign_in_needs_a_local_admin" });
1106
1116
  return true;
1107
1117
  }
1108
- if (!["GET", "POST"].includes(req.method ?? "") || [...url.searchParams.keys()].length) {
1118
+ if (!["GET", "POST"].includes(req.method ?? "")) {
1109
1119
  json(res, 404, { error: "not_found" });
1110
1120
  return true;
1111
1121
  }
1112
- const service = ctx.browserBackendSignIns;
1113
- if (!service) {
1122
+ // #3190 Part 3c: `?machine=<id>&profile=<name>` addresses the same sign-in controls for a credential profile on a paired computer (machine-signins.ts). Nothing else
1123
+ // is accepted in the query, and both are checked in full before anything else happens.
1124
+ const keys = [...url.searchParams.keys()];
1125
+ let target = null;
1126
+ if (keys.length) {
1127
+ const machine = url.searchParams.get("machine"), profile = url.searchParams.get("profile");
1128
+ if (keys.length !== 2 || !machine || !profile || !/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(machine) || !validCredentialProfileName(profile)) {
1129
+ json(res, 404, { error: "not_found" });
1130
+ return true;
1131
+ }
1132
+ target = { machine, profile };
1133
+ }
1134
+ // Only the one that is asked for is looked up: the host's creates its checklist state, a computer's does not need it.
1135
+ const service = target ? undefined : ctx.browserBackendSignIns, machines = target ? ctx.machineSignIns : undefined;
1136
+ if (target ? !machines : !service) {
1114
1137
  json(res, 404, { error: "sign_in_unavailable" });
1115
1138
  return true;
1116
1139
  }
1117
1140
  void (async () => {
1118
1141
  let result;
1119
- if (reading)
1142
+ if (target && machines) {
1143
+ if (reading)
1144
+ result = machines.snapshot(owner, target);
1145
+ else {
1146
+ let bytes;
1147
+ try {
1148
+ bytes = await readBoundedWebBody(req, 8192);
1149
+ }
1150
+ catch {
1151
+ json(res, 413, { error: "sign_in_body_bound" });
1152
+ return;
1153
+ }
1154
+ if (!permitWebContinuation(req, res, ctx))
1155
+ return;
1156
+ if (who() !== owner) {
1157
+ json(res, 409, { error: "signin_session_expired" });
1158
+ return;
1159
+ }
1160
+ let body;
1161
+ try {
1162
+ body = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
1163
+ }
1164
+ catch {
1165
+ json(res, 400, { error: "sign_in_json" });
1166
+ return;
1167
+ }
1168
+ // Only what a computer's sign-in can do: start (Claude Code, subscription: the Runtime builds the command), answer a prompt, cancel, read again.
1169
+ const parsed = z.discriminatedUnion("operation", [
1170
+ z.strictObject({ operation: z.literal("start"), backend: z.literal("claude-code"), relogin: z.boolean().optional() }),
1171
+ z.strictObject({ operation: z.literal("input"), id: z.string().regex(/^[0-9a-f]{32}$/), revision: z.number().int().nonnegative(), action: z.discriminatedUnion("kind", [
1172
+ z.strictObject({ kind: z.literal("method"), choice: z.string().max(32) }),
1173
+ z.strictObject({ kind: z.enum(["code", "start_url", "region"]), value: z.string().max(4096) }),
1174
+ ]) }),
1175
+ z.strictObject({ operation: z.literal("cancel") }), z.strictObject({ operation: z.literal("refresh") }),
1176
+ ]).safeParse(body);
1177
+ if (!parsed.success) {
1178
+ json(res, 400, { error: "invalid_signin_action" });
1179
+ return;
1180
+ }
1181
+ const action = parsed.data;
1182
+ if (action.operation === "start")
1183
+ result = await machines.begin(owner, target, action.relogin === true);
1184
+ else if (action.operation === "input")
1185
+ result = await machines.input(owner, target, action.id, action.revision, action.action);
1186
+ else if (action.operation === "cancel")
1187
+ result = await machines.cancel(owner, target);
1188
+ else
1189
+ result = machines.snapshot(owner, target);
1190
+ }
1191
+ }
1192
+ else if (!service) {
1193
+ json(res, 404, { error: "sign_in_unavailable" });
1194
+ return;
1195
+ }
1196
+ else if (reading)
1120
1197
  result = await service.refresh(owner);
1121
1198
  else {
1122
1199
  let bytes;
@@ -1178,7 +1255,7 @@ function handleBrowserBackendSignIns(req, res, url, ctx) {
1178
1255
  json(res, 200, result);
1179
1256
  })().catch(error => {
1180
1257
  const code = error instanceof Error ? error.message : "";
1181
- const safe = /^(?:signin_(?:session_expired|console_only|cleanup_failed|action_(?:stale|invalid|ended|busy))|invalid_signin_(?:action|checklist))$/.test(code) ? code : "signin_failed";
1258
+ const safe = /^(?:signin_(?:session_expired|console_only|cleanup_failed|action_(?:stale|invalid|ended|busy))|invalid_signin_(?:action|checklist)|machine_(?:unknown|offline|unsupported|accounts_off|unreachable|profile_not_owned|busy)|invalid_machine_target)$/.test(code) ? code : "signin_failed";
1182
1259
  if (!res.destroyed && !res.writableEnded)
1183
1260
  json(res, safe === "signin_cleanup_failed" || safe === "signin_failed" ? 503 : 409, { error: safe });
1184
1261
  });
@@ -1217,7 +1294,18 @@ function handleBackendLogin(req, res, url, ctx, path, method) {
1217
1294
  }
1218
1295
  const action = /^\/ui\/backend-login\/(check|start|cancel)$/.exec(path)?.[1];
1219
1296
  if (reading && path === "/ui/backend-login" && [...url.searchParams.keys()].length === 0) {
1220
- json(res, 200, { login: logins.view(first.handle), targets: ctx.backendSignInTargets?.() ?? [] });
1297
+ // The sign-in view (its access code included) is answered at once and never waits for an account to be read: that happens in the background
1298
+ // and the page is told to read again when something new is known.
1299
+ try {
1300
+ ctx.refreshSignInIdentities?.();
1301
+ }
1302
+ catch { /* the list is served with what is known */ }
1303
+ try {
1304
+ json(res, 200, { login: logins.view(first.handle), targets: ctx.backendSignInTargets?.() ?? [] });
1305
+ }
1306
+ catch {
1307
+ json(res, 503, { error: "sign_in_unavailable" });
1308
+ }
1221
1309
  return true;
1222
1310
  }
1223
1311
  if (method !== "POST" || !action) {
@@ -1282,6 +1370,233 @@ function handleBackendLogin(req, res, url, ctx, path, method) {
1282
1370
  catch { /* response ended */ } });
1283
1371
  return true;
1284
1372
  }
1373
+ /**
1374
+ * #3212 PR 2: Settings → Accounts — `POST /ui/accounts/<backend>` `{ name }` adds a named account (a credential profile's
1375
+ * folder); `DELETE /ui/accounts/<backend>/<name>` `{ confirm: <name> }` removes one (accounts-profiles.ts: every refusal
1376
+ * deletes nothing). PR 3: `POST /ui/accounts/<backend>/signout` `{ profile: <name> | null, confirm: true }` signs an
1377
+ * account out with the CLI's own logout (accounts-signout.ts). The fleet's local admin session only, as the sign-in routes: never the CLI's header token, a guest,
1378
+ * a read session, the public link or the gateway — refused before the body is read, and again after it.
1379
+ */
1380
+ const ACCOUNT_STATUS = {
1381
+ backend: 400, name: 400, confirm: 400, exists: 409, case_clash: 409, unsafe_root: 409, in_use: 409, users_unknown: 409, signing_in: 409, missing: 404,
1382
+ unsafe: 409, default_home: 409, failed: 500, unsupported: 400,
1383
+ // #3190 Part 3c: a paired computer (the Runtime there decides; these are what the server can say before it asks, or what the computer answered).
1384
+ machine_unknown: 404, machine_offline: 409, machine_unsupported: 409, machine_accounts_off: 409, machine_unreachable: 502, machine_profile_not_owned: 409,
1385
+ machine_refused: 409, machine_default_login: 409,
1386
+ };
1387
+ function handleAccountWrite(req, res, url, ctx, path, method) {
1388
+ res.setHeader("Cache-Control", "private, no-store");
1389
+ res.setHeader("X-Content-Type-Options", "nosniff");
1390
+ if (gatewayRequestContext(req)) {
1391
+ json(res, 403, { error: "accounts_not_over_public_link" });
1392
+ return true;
1393
+ }
1394
+ const who = () => {
1395
+ const v = evaluateWebRequest(req, url, ctx.webToken ?? null, ctx.webSessions, { touch: false });
1396
+ if (v.kind !== "allow")
1397
+ return { error: WEB_TOKEN_INVALID_MESSAGE, status: 401 };
1398
+ if (v.via !== "session" || v.session.tier !== "admin" || v.session.surface !== "local")
1399
+ return { error: "accounts_need_a_local_admin", status: 403 };
1400
+ return { handle: v.session.handle, label: v.session.label };
1401
+ };
1402
+ const first = who();
1403
+ if ("error" in first) {
1404
+ json(res, first.status, { error: first.error });
1405
+ return true;
1406
+ }
1407
+ const add = method === "POST" ? /^\/ui\/accounts\/([a-z][a-z0-9-]{0,31})$/.exec(path) : null;
1408
+ const remove = method === "DELETE" ? /^\/ui\/accounts\/([a-z][a-z0-9-]{0,31})\/([^/]{1,200})$/.exec(path) : null;
1409
+ const signout = method === "POST" ? /^\/ui\/accounts\/([a-z][a-z0-9-]{0,31})\/signout$/.exec(path) : null;
1410
+ if (!add && !remove && !signout) {
1411
+ json(res, 404, { error: "not_found" });
1412
+ return true;
1413
+ }
1414
+ const handler = add ? ctx.addAccountProfile : remove ? ctx.removeAccountProfile : ctx.signOutAccount;
1415
+ if (typeof handler !== "function") {
1416
+ json(res, 404, { error: "not_found" });
1417
+ return true;
1418
+ }
1419
+ let target = "";
1420
+ if (remove) {
1421
+ try {
1422
+ target = decodeURIComponent(remove[2]);
1423
+ }
1424
+ catch {
1425
+ json(res, 400, { error: "name" });
1426
+ return true;
1427
+ }
1428
+ }
1429
+ (async () => {
1430
+ let bytes;
1431
+ try {
1432
+ bytes = await readBoundedWebBody(req, 1024);
1433
+ }
1434
+ catch {
1435
+ json(res, 413, { error: "accounts_body_bound" });
1436
+ return;
1437
+ }
1438
+ if (!permitWebContinuation(req, res, ctx))
1439
+ return;
1440
+ const now = who();
1441
+ if ("error" in now) {
1442
+ json(res, now.status, { error: now.error });
1443
+ return;
1444
+ }
1445
+ if (now.handle !== first.handle) {
1446
+ json(res, 409, { error: "accounts_session_changed" });
1447
+ return;
1448
+ }
1449
+ let body;
1450
+ try {
1451
+ body = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
1452
+ }
1453
+ catch {
1454
+ json(res, 400, { error: "accounts_json" });
1455
+ return;
1456
+ }
1457
+ // #3190 Part 3c: `machine` (a paired computer's id) turns the same route into that computer's account; the person's audit name is the session's opaque handle.
1458
+ const machineId = z.string().regex(/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/).optional();
1459
+ const onMachine = (id) => {
1460
+ if (id === undefined)
1461
+ return undefined;
1462
+ return /^[a-f0-9]{16}$/.test(now.handle) ? { id, actor: `admin:${now.handle}` } : "refused";
1463
+ };
1464
+ const fail = (r) => json(res, ACCOUNT_STATUS[r.error] ?? 409, { error: r.error, ...(r.clash ? { clash: r.clash } : {}), ...(r.users ? { users: r.users } : {}), ...(r.message ? { message: r.message } : {}) });
1465
+ if (add) {
1466
+ const parsed = z.strictObject({ name: z.string().max(200), machine: machineId }).safeParse(body);
1467
+ if (!parsed.success) {
1468
+ json(res, 400, { error: "accounts_args" });
1469
+ return;
1470
+ }
1471
+ const machine = onMachine(parsed.data.machine);
1472
+ if (machine === "refused") {
1473
+ json(res, 403, { error: "accounts_need_a_local_admin" });
1474
+ return;
1475
+ }
1476
+ const r = await (machine ? ctx.addAccountProfile(add[1], parsed.data.name, now.label, machine) : ctx.addAccountProfile(add[1], parsed.data.name, now.label));
1477
+ if (r.ok)
1478
+ json(res, 200, { added: parsed.data.name, ...(machine ? { machine: machine.id } : {}) });
1479
+ else
1480
+ fail(r);
1481
+ }
1482
+ else if (remove) {
1483
+ const parsed = z.strictObject({ confirm: z.string().max(200), machine: machineId }).safeParse(body);
1484
+ if (!parsed.success) {
1485
+ json(res, 400, { error: "accounts_args" });
1486
+ return;
1487
+ }
1488
+ const machine = onMachine(parsed.data.machine);
1489
+ if (machine === "refused") {
1490
+ json(res, 403, { error: "accounts_need_a_local_admin" });
1491
+ return;
1492
+ }
1493
+ const r = await (machine ? ctx.removeAccountProfile(remove[1], target, parsed.data.confirm, now.label, machine) : ctx.removeAccountProfile(remove[1], target, parsed.data.confirm, now.label));
1494
+ if (r.ok)
1495
+ json(res, 200, { removed: target, ...(r.keychainLeft ? { keychainLeft: true } : {}) });
1496
+ else
1497
+ fail(r);
1498
+ }
1499
+ else {
1500
+ const parsed = z.strictObject({ profile: z.string().max(200).nullable(), confirm: z.literal(true), machine: machineId }).safeParse(body);
1501
+ if (!parsed.success) {
1502
+ json(res, 400, { error: "accounts_args" });
1503
+ return;
1504
+ }
1505
+ const machine = onMachine(parsed.data.machine);
1506
+ if (machine === "refused") {
1507
+ json(res, 403, { error: "accounts_need_a_local_admin" });
1508
+ return;
1509
+ }
1510
+ const r = await (machine ? ctx.signOutAccount(signout[1], parsed.data.profile, parsed.data.confirm, now.label, machine) : ctx.signOutAccount(signout[1], parsed.data.profile, parsed.data.confirm, now.label));
1511
+ if (r.ok)
1512
+ json(res, 200, { signedOut: parsed.data.profile, ...(r.keychainLeft ? { keychainLeft: true } : {}) });
1513
+ else
1514
+ fail(r);
1515
+ }
1516
+ })().catch(() => { try {
1517
+ json(res, 500, { error: "accounts_request_failed" });
1518
+ }
1519
+ catch { /* response ended */ } });
1520
+ return true;
1521
+ }
1522
+ /**
1523
+ * #3292: Settings → Accounts → Keep sign-in alive — `POST /ui/accounts/keep-alive` `{ backend, profile: <name> | null,
1524
+ * enabled, fallback? }`. The same gate as the other account writes: the fleet's local admin session only, refused before
1525
+ * the body is read and again after it; never the gateway, a guest, a read session or the CLI's header token.
1526
+ */
1527
+ const KEEPALIVE_STATUS = { backend: 400, profile: 400, fallback: 400, write: 500 };
1528
+ function handleAccountKeepAlive(req, res, url, ctx, method) {
1529
+ res.setHeader("Cache-Control", "private, no-store");
1530
+ res.setHeader("X-Content-Type-Options", "nosniff");
1531
+ if (gatewayRequestContext(req)) {
1532
+ json(res, 403, { error: "accounts_not_over_public_link" });
1533
+ return true;
1534
+ }
1535
+ if (method !== "POST") {
1536
+ json(res, 405, { error: "method_not_allowed" });
1537
+ return true;
1538
+ }
1539
+ const who = () => {
1540
+ const v = evaluateWebRequest(req, url, ctx.webToken ?? null, ctx.webSessions, { touch: false });
1541
+ if (v.kind !== "allow")
1542
+ return { error: WEB_TOKEN_INVALID_MESSAGE, status: 401 };
1543
+ if (v.via !== "session" || v.session.tier !== "admin" || v.session.surface !== "local")
1544
+ return { error: "accounts_need_a_local_admin", status: 403 };
1545
+ return { handle: v.session.handle, label: v.session.label };
1546
+ };
1547
+ const first = who();
1548
+ if ("error" in first) {
1549
+ json(res, first.status, { error: first.error });
1550
+ return true;
1551
+ }
1552
+ if (typeof ctx.setAccountKeepAlive !== "function") {
1553
+ json(res, 404, { error: "not_found" });
1554
+ return true;
1555
+ }
1556
+ (async () => {
1557
+ let bytes;
1558
+ try {
1559
+ bytes = await readBoundedWebBody(req, 1024);
1560
+ }
1561
+ catch {
1562
+ json(res, 413, { error: "accounts_body_bound" });
1563
+ return;
1564
+ }
1565
+ if (!permitWebContinuation(req, res, ctx))
1566
+ return;
1567
+ const now = who();
1568
+ if ("error" in now) {
1569
+ json(res, now.status, { error: now.error });
1570
+ return;
1571
+ }
1572
+ if (now.handle !== first.handle) {
1573
+ json(res, 409, { error: "accounts_session_changed" });
1574
+ return;
1575
+ }
1576
+ let body;
1577
+ try {
1578
+ body = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
1579
+ }
1580
+ catch {
1581
+ json(res, 400, { error: "accounts_json" });
1582
+ return;
1583
+ }
1584
+ const parsed = z.strictObject({ backend: z.string().max(32), profile: z.string().max(200).nullable(), enabled: z.boolean(), fallback: z.boolean().optional() }).safeParse(body);
1585
+ if (!parsed.success) {
1586
+ json(res, 400, { error: "accounts_args" });
1587
+ return;
1588
+ }
1589
+ const r = ctx.setAccountKeepAlive(parsed.data.backend, parsed.data.profile, parsed.data.enabled, parsed.data.fallback, now.label);
1590
+ if (r.ok)
1591
+ json(res, 200, { backend: parsed.data.backend, profile: parsed.data.profile, enabled: parsed.data.enabled });
1592
+ else
1593
+ json(res, KEEPALIVE_STATUS[r.error] ?? 409, { error: r.error });
1594
+ })().catch(() => { try {
1595
+ json(res, 500, { error: "accounts_request_failed" });
1596
+ }
1597
+ catch { /* response ended */ } });
1598
+ return true;
1599
+ }
1285
1600
  /**
1286
1601
  * #1629 r4 §4 (r4-5): mods — a person's import (stage, then commit), uninstall and export. Every route is a signed-in
1287
1602
  * session's, writes an admin's: never the CLI's header token (the way an agent could reach it) and never the public link
@@ -1911,6 +2226,11 @@ export function handleWebRequest(req, res, url, ctx) {
1911
2226
  json(res, 400, { error: "invalid instance name" });
1912
2227
  return true;
1913
2228
  }
2229
+ // AgEnD Hub P1: the Hub's pages live on a Hub's own listener (slice 1), never on this fleet's: the ordinary not-found.
2230
+ if (shell?.kind === "shell" && shell.route.panel === "hub") {
2231
+ json(res, 404, { error: "not found" });
2232
+ return true;
2233
+ }
1914
2234
  if (shell?.kind === "shell") {
1915
2235
  serveAppShell(req, res, ctx, "full");
1916
2236
  return true;
@@ -2202,6 +2522,143 @@ export function handleWebRequest(req, res, url, ctx) {
2202
2522
  json(res, 200, { messages, boot: ctx.webChatHistory?.boot ?? null, lastId: ctx.webChatHistory?.lastId ?? 0, ...(allHidden ? { allHidden: true } : {}) });
2203
2523
  return true;
2204
2524
  }
2525
+ // ── #3212 PR 1: Settings → Agents → Accounts (read-only) ─────────────────────────────────
2526
+ // Each CLI's default sign-in and credential profiles, who uses them and their weekly usage. Names, states, the masked
2527
+ // identity and the host login command (which, as in the sign-in list, names the profile's folder) — no credential or
2528
+ // full e-mail: only for the fleet's local admin session — never the public link, a guest, a token or the gateway (the
2529
+ // same rule as the sign-in list it extends).
2530
+ if (method === "GET" && path === "/ui/accounts") {
2531
+ res.setHeader("Cache-Control", "private, no-store");
2532
+ if (gatewayRequestContext(req)) {
2533
+ json(res, 404, { error: "not_found" });
2534
+ return true;
2535
+ }
2536
+ const localAdmin = () => {
2537
+ const v = evaluateWebRequest(req, url, ctx.webToken ?? null, ctx.webSessions, { touch: false });
2538
+ return v.kind === "allow" && v.via === "session" && v.session.tier === "admin" && v.session.surface === "local" ? v.session : null;
2539
+ };
2540
+ const who = localAdmin();
2541
+ if (!who) {
2542
+ json(res, 403, { error: "accounts_need_a_local_admin" });
2543
+ return true;
2544
+ }
2545
+ if (typeof ctx.accountsView !== "function") {
2546
+ json(res, 404, { error: "not_found" });
2547
+ return true;
2548
+ }
2549
+ void ctx.accountsView().then(view => {
2550
+ if (localAdmin()?.handle !== who.handle) {
2551
+ json(res, 403, { error: "accounts_need_a_local_admin" });
2552
+ return;
2553
+ }
2554
+ json(res, 200, view);
2555
+ }, err => { ctx.logger.error({ err: err.message }, "Accounts view failed"); json(res, 500, { error: "could not read the accounts" }); });
2556
+ return true;
2557
+ }
2558
+ // ── #3153 P1: an agent's Files / Changes (read-only) ─────────────────────────────────
2559
+ // The fleet's local admin session only: never the public link, a guest, a token or a connection from outside. One
2560
+ // agent's own working directory (agent-workspace.ts confines and filters every path); not General or a coordinator
2561
+ // (they work in the fleet's own directory), not an agent on another machine.
2562
+ if (method === "GET" && path === "/ui/workspace") {
2563
+ res.setHeader("Cache-Control", "private, no-store");
2564
+ res.setHeader("X-Content-Type-Options", "nosniff");
2565
+ if (gatewayRequestContext(req)) {
2566
+ json(res, 404, { error: "not_found" });
2567
+ return true;
2568
+ }
2569
+ const localAdmin = () => {
2570
+ const v = evaluateWebRequest(req, url, ctx.webToken ?? null, ctx.webSessions, { touch: false });
2571
+ return v.kind === "allow" && v.via === "session" && v.session.tier === "admin" && v.session.surface === "local" ? v.session : null;
2572
+ };
2573
+ const who = localAdmin();
2574
+ if (!who) {
2575
+ json(res, 403, { error: "workspace_needs_a_local_admin" });
2576
+ return true;
2577
+ }
2578
+ const p = url.searchParams, instance = p.get("instance") ?? "", op = p.get("op") ?? "";
2579
+ const cfg = ctx.fleetConfig?.instances && Object.hasOwn(ctx.fleetConfig.instances, instance) ? ctx.fleetConfig.instances[instance] : undefined;
2580
+ if (!cfg) {
2581
+ json(res, 404, { error: "not_found" });
2582
+ return true;
2583
+ }
2584
+ const offered = !isGeneralInstance(ctx.fleetConfig, instance) && resolveToolSet(cfg, instance) !== "coordinator"
2585
+ && cfg.runtime !== "windows" && !cfg.machine_id;
2586
+ if (!offered) {
2587
+ json(res, 404, { error: "workspace_not_offered" });
2588
+ return true;
2589
+ }
2590
+ if (!["changes", "list", "file", "image", "diff", "follow"].includes(op)) {
2591
+ json(res, 400, { error: "op: changes | list | file | image | diff | follow" });
2592
+ return true;
2593
+ }
2594
+ const workDir = String(cfg.working_directory ?? "").replace(/^~(?=$|\/)/, process.env.HOME ?? "~");
2595
+ const backend = String(cfg.backend ?? ctx.fleetConfig?.defaults?.backend ?? "claude-code");
2596
+ const daemon = ctx.daemons.get(instance);
2597
+ void (async () => {
2598
+ try {
2599
+ const ws = await workspaceRoot(workDir, getAgendHome());
2600
+ // The session must still be the same one when the answer goes out (it may have ended while git ran).
2601
+ const answer = async () => {
2602
+ if (op === "changes")
2603
+ return { kind: "json", body: await workspaceChanges(ws) };
2604
+ if (op === "list")
2605
+ return { kind: "json", body: await workspaceList(ws, p.get("path") ?? "") };
2606
+ if (op === "file")
2607
+ return { kind: "json", body: await workspaceFile(ws, p.get("path")) };
2608
+ if (op === "diff")
2609
+ return { kind: "json", body: await workspaceFileDiff(ws, p.get("path")) };
2610
+ if (op === "follow") {
2611
+ // #3160: this turn's file steps, from the CLI's own record, confined to this folder (outside paths dropped,
2612
+ // secret-looking ones marked hidden). Polled by an open panel with Follow on; nothing is pushed.
2613
+ const supported = backend === "claude-code" || backend === "codex";
2614
+ const d = daemon;
2615
+ const after = Number(p.get("after") ?? 0), turnQ = p.get("turn");
2616
+ const snap = supported && d && typeof d.workspaceFollow === "function"
2617
+ ? d.workspaceFollow(Number.isSafeInteger(after) && after >= 0 ? after : 0, turnQ !== null && /^\d{1,9}$/.test(turnQ) ? Number(turnQ) : undefined, p.get("scope") ?? undefined)
2618
+ : { scope: "", turn: 0, steps: [], last: 0 };
2619
+ return { kind: "json", body: { supported, running: !!d, scope: snap.scope, turn: snap.turn, last: snap.last, steps: await resolveFollowSteps(ws, snap.steps) } };
2620
+ }
2621
+ return { kind: "image", body: await workspaceImage(ws, p.get("path")) };
2622
+ };
2623
+ const out = await answer();
2624
+ if (localAdmin()?.handle !== who.handle) {
2625
+ json(res, 403, { error: "workspace_needs_a_local_admin" });
2626
+ return;
2627
+ }
2628
+ const current = ctx.fleetConfig?.instances[instance];
2629
+ if (current !== cfg || String(current.working_directory ?? "").replace(/^~(?=$|\/)/, process.env.HOME ?? "~") !== workDir
2630
+ || String(current.backend ?? ctx.fleetConfig?.defaults?.backend ?? "claude-code") !== backend
2631
+ || current.runtime === "windows" || current.machine_id || isGeneralInstance(ctx.fleetConfig, instance)
2632
+ || resolveToolSet(current, instance) === "coordinator" || (op === "follow" && ctx.daemons.get(instance) !== daemon)) {
2633
+ json(res, 403, { error: "workspace_changed" });
2634
+ return;
2635
+ }
2636
+ if (op === "follow" && out.kind === "json") {
2637
+ const frame = out.body;
2638
+ const live = daemon;
2639
+ if (frame.supported && frame.running && frame.scope && live?.workspaceFollow?.(0).scope !== frame.scope) {
2640
+ json(res, 403, { error: "workspace_changed" });
2641
+ return;
2642
+ }
2643
+ }
2644
+ if (out.kind === "image") {
2645
+ res.writeHead(200, { "Content-Type": out.body.mime, "Content-Length": String(out.body.bytes.length), "Content-Security-Policy": "default-src 'none'; sandbox" });
2646
+ res.end(out.body.bytes);
2647
+ return;
2648
+ }
2649
+ json(res, 200, out.body);
2650
+ }
2651
+ catch (err) {
2652
+ if (err instanceof WorkspaceError) {
2653
+ json(res, err.code === "not_found" || err.code === "not_a_directory" ? 404 : 403, { error: err.code });
2654
+ return;
2655
+ }
2656
+ ctx.logger.error({ err: err.message, instance }, "Workspace read failed");
2657
+ json(res, 500, { error: "could not read the folder" });
2658
+ }
2659
+ })();
2660
+ return true;
2661
+ }
2205
2662
  // ── #1218: the Log tab ─────────────────────────────────
2206
2663
  // An instance's steps, read on demand from its own transcript (log-service.ts). Read-only, and offered on the public
2207
2664
  // link on purpose (the user's decision): the same masking applies to every viewer. Passive (web-auth.ts).
@@ -2952,6 +3409,11 @@ export function handleWebRequest(req, res, url, ctx) {
2952
3409
  return handleBrowserBackendSignIns(req, res, url, ctx);
2953
3410
  if (path === "/ui/backend-login" || path.startsWith("/ui/backend-login/"))
2954
3411
  return handleBackendLogin(req, res, url, ctx, path, method);
3412
+ // #3292: before the accounts prefix — its Add pattern (`POST /ui/accounts/<backend>`) would read "keep-alive" as a backend.
3413
+ if (path === "/ui/accounts/keep-alive")
3414
+ return handleAccountKeepAlive(req, res, url, ctx, method);
3415
+ if (path.startsWith("/ui/accounts/"))
3416
+ return handleAccountWrite(req, res, url, ctx, path, method);
2955
3417
  // #1386: Acknowledge a "Needs you" delivery item — a session write (CSRF, checked by the gate) or the CLI's header
2956
3418
  // token. Who did it is recorded by principal: the session's public handle, never the session id or a credential.
2957
3419
  // #2910 D2: a web-only fleet's Notices — what General would have said. Admins only (never a guest: not in
@@ -3062,6 +3524,93 @@ export function handleWebRequest(req, res, url, ctx) {
3062
3524
  });
3063
3525
  return true;
3064
3526
  }
3527
+ // ── Refs #3061 (P2a): signing a new device in with its 8-character code (a web-only fleet) ──
3528
+ // GET /ui/devices: whether this is such a fleet and whether THIS session may approve (it is the verified owner — this
3529
+ // computer's admin here, or signed in from outside with the authenticator's code). POST /ui/devices/lookup {code}: the
3530
+ // request that code names, for the confirm screen; POST /ui/devices/approve {code} and /ui/devices/deny {code}. Every
3531
+ // one asks the live session again in the fleet (webDeviceLoginAct) and answers 403 `owner_required` to anyone else —
3532
+ // a guest, a LAN or device-approved session, the CLI's header token. Over the public link only for the owner who
3533
+ // signed in from outside. A decision hands the new device nothing: its session is made by its own next poll.
3534
+ if (method === "GET" && path === "/ui/devices") {
3535
+ res.setHeader("Cache-Control", "no-store");
3536
+ json(res, 200, ctx.webDevicesStatus?.(req) ?? { webOnly: false, owner: false, devices: [] });
3537
+ return true;
3538
+ }
3539
+ // Refs #3061 (P2b): POST /ui/devices/signout {handle} — the verified owner ends another signed-in device. The same
3540
+ // authority as approving one, asked of the live session in the fleet after the body is in (webDeviceSignOut answers
3541
+ // 403 `owner_required` to anyone else before it looks the handle up). Over the public link only for the owner signed in
3542
+ // from outside, like approving.
3543
+ if (method === "POST" && path === "/ui/devices/signout") {
3544
+ const act = ctx.webDeviceSignOut?.bind(ctx);
3545
+ if (!act) {
3546
+ json(res, 404, { error: "not_found" });
3547
+ return true;
3548
+ }
3549
+ (async () => {
3550
+ let body;
3551
+ try {
3552
+ body = await parseBody(req);
3553
+ }
3554
+ catch {
3555
+ json(res, 400, { error: "Invalid JSON" });
3556
+ return;
3557
+ }
3558
+ if (!permitWebContinuation(req, res, ctx))
3559
+ return;
3560
+ const handle = body && typeof body === "object" ? body.handle : undefined;
3561
+ if (typeof handle !== "string" || !/^[0-9a-f]{16}$/.test(handle)) {
3562
+ json(res, 400, { error: "handle required" });
3563
+ return;
3564
+ }
3565
+ res.setHeader("Cache-Control", "no-store");
3566
+ const r = act(req, handle);
3567
+ json(res, r.status, r.body);
3568
+ })().catch(err => {
3569
+ ctx.logger.error({ err: err.message }, "Device sign-out failed");
3570
+ try {
3571
+ json(res, 500, { error: "devices_failed" });
3572
+ }
3573
+ catch { /* already answered */ }
3574
+ });
3575
+ return true;
3576
+ }
3577
+ if (method === "POST" && (path === "/ui/devices/lookup" || path === "/ui/devices/approve" || path === "/ui/devices/deny")) {
3578
+ const act = ctx.webDeviceLoginAct?.bind(ctx);
3579
+ if (!act) {
3580
+ json(res, 404, { error: "not_found" });
3581
+ return true;
3582
+ }
3583
+ const op = path === "/ui/devices/lookup" ? "lookup" : path === "/ui/devices/approve" ? "approve" : "deny";
3584
+ (async () => {
3585
+ let body;
3586
+ try {
3587
+ body = await parseBody(req);
3588
+ }
3589
+ catch {
3590
+ json(res, 400, { error: "Invalid JSON" });
3591
+ return;
3592
+ }
3593
+ if (!permitWebContinuation(req, res, ctx))
3594
+ return;
3595
+ const code = body && typeof body === "object" ? body.code : undefined;
3596
+ if (typeof code !== "string" || code.length > 32) {
3597
+ json(res, 400, { error: "code required" });
3598
+ return;
3599
+ }
3600
+ res.setHeader("Cache-Control", "no-store");
3601
+ const r = act(req, op, code);
3602
+ if (typeof r.body.retryAfterMs === "number")
3603
+ res.setHeader("Retry-After", String(Math.ceil(r.body.retryAfterMs / 1000)));
3604
+ json(res, r.status, r.body);
3605
+ })().catch(err => {
3606
+ ctx.logger.error({ err: err.message }, "New device approval failed");
3607
+ try {
3608
+ json(res, 500, { error: "devices_failed" });
3609
+ }
3610
+ catch { /* already answered */ }
3611
+ });
3612
+ return true;
3613
+ }
3065
3614
  // ── alpha.2 (M-2300): an agent's Windows request, decided by a web-only fleet's owner in Needs you ──
3066
3615
  // The list is the owner's only: anyone else (a guest, a LAN or public-link session, a chat fleet's admin) reads an
3067
3616
  // empty one, so nothing actionable ever reaches them. The stream's `agent_proposals` event carries nothing.
@@ -3392,12 +3941,17 @@ export function handleWebRequest(req, res, url, ctx) {
3392
3941
  return;
3393
3942
  }
3394
3943
  const execution = settingsRequestExecution(req);
3395
- if (execution)
3944
+ // The same removal as delete_instance: the agent, then its own topic (the user's default), said truthfully.
3945
+ let topic = null;
3946
+ if (ctx.removeInstanceAndTopic) {
3947
+ topic = await ctx.removeInstanceAndTopic(name, authorizeExplicitInstanceRemoval("dashboard-confirmed"), { deleteTopic: true, ...(execution ? { execution } : {}) });
3948
+ }
3949
+ else if (execution)
3396
3950
  await ctx.removeInstance(name, authorizeExplicitInstanceRemoval("dashboard-confirmed"), execution);
3397
3951
  else
3398
3952
  await ctx.removeInstance(name, authorizeExplicitInstanceRemoval("dashboard-confirmed"));
3399
3953
  ctx.emitSseEvent("status", ctx.getUiStatus());
3400
- json(res, 200, { deleted: name });
3954
+ json(res, 200, { deleted: name, ...topicFields(name, topic) });
3401
3955
  }
3402
3956
  catch (err) {
3403
3957
  json(res, 500, { error: err.message });
@@ -3631,7 +4185,10 @@ export function handleWebRequest(req, res, url, ctx) {
3631
4185
  // board for a revision, so it is built once per (revision, done=all, minute) — the minute for the 14-day
3632
4186
  // window. The public link's reads are filtered per request (hidden instances) and are built each time.
3633
4187
  // #2757 review: and by the dispatchers gone (a deleted one makes its cards the person's, the revision unchanged).
3634
- const key = gateway ? null : `${rev}:${allDone ? 1 : 0}:${Math.floor(Date.now() / 60_000)}:${board.goneDispatchers(ctx.dispatcherGone)}`;
4188
+ // The instances with the task board switched off: no card is handed to them (the pickers mark them), and a
4189
+ // fleet.yaml edit changes them with the revision unchanged.
4190
+ const boardOff = taskBoardOffNames(ctx.fleetConfig).filter((n) => !hiddenName(n));
4191
+ const key = gateway ? null : `${rev}:${allDone ? 1 : 0}:${Math.floor(Date.now() / 60_000)}:${board.goneDispatchers(ctx.dispatcherGone)}:${boardOff.join("\u0000")}`;
3635
4192
  const kept = key ? boardBodies.get(board) : undefined;
3636
4193
  if (kept && kept.key === key) {
3637
4194
  jsonText(res, 200, kept.body);
@@ -3643,7 +4200,7 @@ export function handleWebRequest(req, res, url, ctx) {
3643
4200
  // #2355 review: the names a project's lead may be — the fleet's instances (a Classic-only room is not one); over the
3644
4201
  // public link, not a hidden one.
3645
4202
  const leads = Object.keys(ctx.fleetConfig?.instances ?? {}).filter((n) => !hiddenName(n)).sort();
3646
- const body = JSON.stringify({ rev, cards: board.views(cards, scope, ctx.dispatcherGone), projects, leads, stats: board.projectStats(ctx.dispatcherGone) });
4203
+ const body = JSON.stringify({ rev, cards: board.views(cards, scope, ctx.dispatcherGone), projects, leads, boardOff, stats: board.projectStats(ctx.dispatcherGone) });
3647
4204
  if (key)
3648
4205
  boardBodies.set(board, { key, body });
3649
4206
  jsonText(res, 200, body);
@@ -4896,6 +5453,16 @@ function shellHtmlTag(ctx, mode, viewer) {
4896
5453
  function shellOwnerCss(ctx, mode, viewer) {
4897
5454
  return mode === "full" && !viewer?.guest && viewer?.person !== null && viewer?.person !== undefined && ctx.ownerCss ? ctx.ownerCss.active(viewer.person) : null;
4898
5455
  }
5456
+ /**
5457
+ * AgEnD Hub P1 (docs/design/hub.md, docs/design/hub-ui-client.md): the page's Hub mark — presentation only, never
5458
+ * authority, set by the listener that serves the page (never a client's choice): `member` on this fleet's listener when
5459
+ * `hub_member.enabled`, never over the public link. `hub` is only the Hub listener's own workspace page
5460
+ * (serveHubWorkspaceShell). Nothing otherwise: no Hub UI is drawn and no Hub module loads.
5461
+ */
5462
+ function hubBodyAttrs(req, config) {
5463
+ // hub.md §1: member handlers are local-owner-only and unavailable through the public gateway — no member mark there.
5464
+ return hubModeOf(config).member && !gatewayRequestContext(req) ? ' data-hub="member"' : "";
5465
+ }
4899
5466
  function guestBodyAttrs(ctx, owner, attr) {
4900
5467
  const badge = ctx.guestBadge?.(owner);
4901
5468
  const trusted = ctx.guestTrusted?.(owner) ? ' data-guest-level="trusted"' : "";
@@ -4932,12 +5499,47 @@ function shellBodyTag(req, ctx, mode, viewer) {
4932
5499
  + `${gatewayRequestContext(req) ? ' data-public-link="1"' : ""}`
4933
5500
  // #2478: search is offered over the public link unless web.search.public_link is false (the page then shows no entry).
4934
5501
  + `${gatewayRequestContext(req) && ctx.fleetConfig?.web?.search?.public_link === false ? ' data-search-link="0"' : ""}`
5502
+ // AgEnD Hub P1 (docs/design/hub-ui-client.md): the Hub's marks — only when a switch is on, never on a guest's page.
5503
+ + `${mode === "full" && !viewer?.guest ? hubBodyAttrs(req, ctx.fleetConfig) : ""}`
4935
5504
  // #1920 phase 3: a guest's page — the shell shows only what a guest may use, and who it is signed in as.
4936
5505
  + `${mode === "full" && viewer?.guest && viewer.owner ? guestBodyAttrs(ctx, viewer.owner, attr) : ""}>`;
4937
5506
  }
5507
+ /**
5508
+ * AgEnD Hub P1, slice 3: the app shell as a Hub's own workspace (served only by the Hub's listener, at its own origin).
5509
+ * It boots Hub-only (app.js: no fleet stream, chat, Needs you, preferences or themes). Nothing of the request is read
5510
+ * — no cookie (the fleet's or the Hub's), no session, no Host: who is signed in is the page's own /hub/v1/session.
5511
+ */
5512
+ export const HUB_SHELL_DROPS = '<script src="/assets/agend-auth.js"></script>';
5513
+ export function serveHubWorkspaceShell(res, hub) {
5514
+ try {
5515
+ // Without the fleet's fetch wrapper (agend-auth.js): it reads the fleet's /auth/session for a CSRF value and answers
5516
+ // a 401 with the fleet's "session ended" banner. The Hub's pages carry the Hub's own CSRF (hub-client.js).
5517
+ const html = readFileSync(join(__dirname, "ui", "app.html"), "utf-8").replace(HUB_SHELL_DROPS, "");
5518
+ const attr = (v) => v.replace(/[&<>"']/g, c => `&#${c.charCodeAt(0)};`);
5519
+ const name = hubNameOf(hub.name);
5520
+ const preview = hub.preview;
5521
+ const previewAttrs = preview ? ` data-dashboard-origin="${attr(preview.dashboardOrigin)}"`
5522
+ + (preview.previewOrigin && preview.bootId ? ` data-preview-origin="${attr(preview.previewOrigin)}" data-preview-boot="${attr(preview.bootId)}"`
5523
+ : ` data-preview-reason-code="${attr(preview.reasonCode ?? "notOffered")}" data-preview-reason="${attr(preview.reason ?? "")}"`) : "";
5524
+ const body = `<body data-mode="full" data-web-transport="none" data-usage-panel="0" data-log-tab="0" data-hub="hub"${name ? ` data-hub-name="${attr(name)}"` : ""}${previewAttrs}>`;
5525
+ sendPanelHtml(res, withAppIconLinks(html).replace("<body>", body), 200, { "Cache-Control": "no-store" }, { mediaSrc: "'none'", ...(preview?.previewOrigin ? { frameSrc: `${preview.previewOrigin}/frame` } : {}) });
5526
+ }
5527
+ catch {
5528
+ json(res, 500, { error: "app.html not found" });
5529
+ }
5530
+ }
4938
5531
  /** The app shell page for one entry, under the panels' CSP; it may frame exactly <preview origin>/frame, and only
4939
5532
  * when this load chose one. */
4940
- export function serveAppShell(req, res, ctx, mode) {
5533
+ /**
5534
+ * The app shell page. `opts.hubWorkspace`: the page is a Hub's own workspace (slice 1's Hub listener only — the fleet's
5535
+ * listener never passes it), so it is drawn as the Hub shell.
5536
+ */
5537
+ export function serveAppShell(req, res, ctx, mode, opts = {}) {
5538
+ // A Hub workspace is drawn from nothing of this fleet's: no fleet cookie, session, preference or preview is read.
5539
+ if (opts.hubWorkspace) {
5540
+ serveHubWorkspaceShell(res, opts.hubWorkspace);
5541
+ return;
5542
+ }
4941
5543
  try {
4942
5544
  const html = readFileSync(join(__dirname, "ui", "app.html"), "utf-8");
4943
5545
  const viewer = mode === "full" ? prefsViewer(req, new URL(req.url ?? "/", "http://localhost"), ctx) : null;