@songsid/agend 2.4.0-beta.24 → 2.4.0-beta.26

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 (488) hide show
  1. package/README.md +1 -1
  2. package/README.zh-TW.md +1 -1
  3. package/dist/agend-home.js +5 -5
  4. package/dist/agend-home.js.map +1 -1
  5. package/dist/agent-endpoint.js +10 -0
  6. package/dist/agent-endpoint.js.map +1 -1
  7. package/dist/agent-file-read.js +1 -1
  8. package/dist/agent-file-read.js.map +1 -1
  9. package/dist/agent-workspace.d.ts +18 -2
  10. package/dist/agent-workspace.js +15 -4
  11. package/dist/agent-workspace.js.map +1 -1
  12. package/dist/auth-api.js +3 -1
  13. package/dist/auth-api.js.map +1 -1
  14. package/dist/backend/antigravity.js +8 -6
  15. package/dist/backend/antigravity.js.map +1 -1
  16. package/dist/backend/claude-code.js +17 -0
  17. package/dist/backend/claude-code.js.map +1 -1
  18. package/dist/backend/claude-usage-credits.d.ts +8 -0
  19. package/dist/backend/claude-usage-credits.js +121 -0
  20. package/dist/backend/claude-usage-credits.js.map +1 -0
  21. package/dist/backend/types.d.ts +30 -0
  22. package/dist/backend/types.js.map +1 -1
  23. package/dist/build-provenance.json +1 -1
  24. package/dist/channel/adapters/discord.js +7 -1
  25. package/dist/channel/adapters/discord.js.map +1 -1
  26. package/dist/channel/mcp-tools.js +1 -1
  27. package/dist/channel/mcp-tools.js.map +1 -1
  28. package/dist/channel/tool-router.js +1 -0
  29. package/dist/channel/tool-router.js.map +1 -1
  30. package/dist/cli-audited.js +9 -4
  31. package/dist/cli-audited.js.map +1 -1
  32. package/dist/cli.js +184 -21
  33. package/dist/cli.js.map +1 -1
  34. package/dist/config-validator.js +11 -1
  35. package/dist/config-validator.js.map +1 -1
  36. package/dist/config.js +2 -0
  37. package/dist/config.js.map +1 -1
  38. package/dist/contact-auth-store.d.ts +18 -0
  39. package/dist/contact-auth-store.js +55 -8
  40. package/dist/contact-auth-store.js.map +1 -1
  41. package/dist/contact-auth-types.d.ts +3 -0
  42. package/dist/contact-auth-types.js.map +1 -1
  43. package/dist/contact-change-proposals.d.ts +34 -0
  44. package/dist/contact-change-proposals.js +1 -1
  45. package/dist/contact-change-proposals.js.map +1 -1
  46. package/dist/cross-instance-notice.d.ts +1 -0
  47. package/dist/cross-instance-notice.js +9 -8
  48. package/dist/cross-instance-notice.js.map +1 -1
  49. package/dist/daemon.d.ts +35 -0
  50. package/dist/daemon.js +234 -19
  51. package/dist/daemon.js.map +1 -1
  52. package/dist/delivery-outbox.d.ts +42 -1
  53. package/dist/delivery-outbox.js +198 -21
  54. package/dist/delivery-outbox.js.map +1 -1
  55. package/dist/fleet-context.d.ts +8 -0
  56. package/dist/fleet-lock.d.ts +83 -2
  57. package/dist/fleet-lock.js +276 -2
  58. package/dist/fleet-lock.js.map +1 -1
  59. package/dist/fleet-manager.d.ts +183 -7
  60. package/dist/fleet-manager.js +1279 -78
  61. package/dist/fleet-manager.js.map +1 -1
  62. package/dist/fleet-windows-runtime.d.ts +20 -1
  63. package/dist/fleet-windows-runtime.js +98 -18
  64. package/dist/fleet-windows-runtime.js.map +1 -1
  65. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +13 -1
  66. package/dist/general-knowledge/skills/hub/SKILL.md +12 -1
  67. package/dist/general-knowledge/skills/web-appearance/SKILL.md +3 -1
  68. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +21 -4
  69. package/dist/home-update-lock.d.ts +35 -0
  70. package/dist/home-update-lock.js +81 -0
  71. package/dist/home-update-lock.js.map +1 -0
  72. package/dist/hub/client.js +7 -0
  73. package/dist/hub/client.js.map +1 -1
  74. package/dist/hub/compose/member.d.ts +5 -1
  75. package/dist/hub/compose/member.js +15 -6
  76. package/dist/hub/compose/member.js.map +1 -1
  77. package/dist/hub/compose/server.d.ts +1 -0
  78. package/dist/hub/compose/server.js +3 -2
  79. package/dist/hub/compose/server.js.map +1 -1
  80. package/dist/hub/http/compose.js +3 -2
  81. package/dist/hub/http/compose.js.map +1 -1
  82. package/dist/hub/http/deps.d.ts +1 -0
  83. package/dist/hub/member/room-ask.d.ts +12 -8
  84. package/dist/hub/member/room-ask.js +95 -29
  85. package/dist/hub/member/room-ask.js.map +1 -1
  86. package/dist/hub/member/room-mention-feedback.d.ts +2 -0
  87. package/dist/hub/member/room-mention-feedback.js +1 -1
  88. package/dist/hub/member/room-mention-feedback.js.map +1 -1
  89. package/dist/hub/member/room-post-answers.d.ts +2 -0
  90. package/dist/hub/member/room-post-answers.js +1 -1
  91. package/dist/hub/member/room-post-answers.js.map +1 -1
  92. package/dist/hub/member/room-post.d.ts +5 -0
  93. package/dist/hub/member/room-post.js +4 -1
  94. package/dist/hub/member/room-post.js.map +1 -1
  95. package/dist/hub/member/room-reaction-acks.d.ts +12 -0
  96. package/dist/hub/member/room-reaction-acks.js +44 -0
  97. package/dist/hub/member/room-reaction-acks.js.map +1 -0
  98. package/dist/hub/member/updates.d.ts +7 -1
  99. package/dist/hub/member/updates.js +7 -1
  100. package/dist/hub/member/updates.js.map +1 -1
  101. package/dist/hub/protocol.d.ts +4 -0
  102. package/dist/hub/protocol.js +2 -2
  103. package/dist/hub/protocol.js.map +1 -1
  104. package/dist/hub/representative.d.ts +7 -0
  105. package/dist/hub/representative.js +38 -5
  106. package/dist/hub/representative.js.map +1 -1
  107. package/dist/hub/roles/audit-details.d.ts +2 -0
  108. package/dist/hub/roles/audit-details.js +1 -1
  109. package/dist/hub/roles/audit-details.js.map +1 -1
  110. package/dist/hub/roles/authority.d.ts +8 -3
  111. package/dist/hub/roles/authority.js +144 -102
  112. package/dist/hub/roles/authority.js.map +1 -1
  113. package/dist/hub/roles/delegation.js +2 -2
  114. package/dist/hub/roles/delegation.js.map +1 -1
  115. package/dist/hub/roles/model.d.ts +5 -2
  116. package/dist/hub/roles/model.js +5 -4
  117. package/dist/hub/roles/model.js.map +1 -1
  118. package/dist/hub/roles/review.js +2 -2
  119. package/dist/hub/roles/review.js.map +1 -1
  120. package/dist/hub/room-react-ack-model.d.ts +2 -0
  121. package/dist/hub/room-react-ack-model.js +3 -0
  122. package/dist/hub/room-react-ack-model.js.map +1 -0
  123. package/dist/hub/rooms/admin.d.ts +6 -0
  124. package/dist/hub/rooms/admin.js +33 -0
  125. package/dist/hub/rooms/admin.js.map +1 -1
  126. package/dist/hub/rooms/agents.d.ts +2 -0
  127. package/dist/hub/rooms/agents.js +44 -3
  128. package/dist/hub/rooms/agents.js.map +1 -1
  129. package/dist/hub/rooms/service.d.ts +5 -1
  130. package/dist/hub/rooms/service.js +76 -24
  131. package/dist/hub/rooms/service.js.map +1 -1
  132. package/dist/hub/rooms/types.d.ts +2 -0
  133. package/dist/hub/server.js +6 -1
  134. package/dist/hub/server.js.map +1 -1
  135. package/dist/hub/types.d.ts +2 -0
  136. package/dist/install-lock.d.ts +15 -1
  137. package/dist/install-lock.js +16 -8
  138. package/dist/install-lock.js.map +1 -1
  139. package/dist/install-ownership.d.ts +165 -0
  140. package/dist/install-ownership.js +404 -0
  141. package/dist/install-ownership.js.map +1 -0
  142. package/dist/instance-config-impact.js +2 -0
  143. package/dist/instance-config-impact.js.map +1 -1
  144. package/dist/instructions.d.ts +4 -0
  145. package/dist/instructions.js +4 -0
  146. package/dist/instructions.js.map +1 -1
  147. package/dist/local-pane-endpoint.d.ts +4 -1
  148. package/dist/local-pane-endpoint.js +12 -2
  149. package/dist/local-pane-endpoint.js.map +1 -1
  150. package/dist/locale.js +162 -6
  151. package/dist/locale.js.map +1 -1
  152. package/dist/native-agent-admission.d.ts +7 -0
  153. package/dist/native-agent-admission.js +46 -3
  154. package/dist/native-agent-admission.js.map +1 -1
  155. package/dist/native-mcp.d.ts +16 -1
  156. package/dist/native-mcp.js +38 -5
  157. package/dist/native-mcp.js.map +1 -1
  158. package/dist/native-pane-lifecycle.d.ts +9 -0
  159. package/dist/native-pane-lifecycle.js +23 -0
  160. package/dist/native-pane-lifecycle.js.map +1 -1
  161. package/dist/native-pane-manager.d.ts +19 -6
  162. package/dist/native-pane-manager.js +79 -4
  163. package/dist/native-pane-manager.js.map +1 -1
  164. package/dist/needs-you.d.ts +8 -0
  165. package/dist/needs-you.js +1 -0
  166. package/dist/needs-you.js.map +1 -1
  167. package/dist/outbound-handlers.d.ts +12 -0
  168. package/dist/outbound-handlers.js +30 -2
  169. package/dist/outbound-handlers.js.map +1 -1
  170. package/dist/package-preimage.js +4 -0
  171. package/dist/package-preimage.js.map +1 -1
  172. package/dist/pane-port.d.ts +1 -0
  173. package/dist/plist-args.d.ts +9 -0
  174. package/dist/plist-args.js +22 -0
  175. package/dist/plist-args.js.map +1 -0
  176. package/dist/public-preview.d.ts +4 -6
  177. package/dist/public-preview.js +5 -2
  178. package/dist/public-preview.js.map +1 -1
  179. package/dist/public-web-gateway.js +10 -3
  180. package/dist/public-web-gateway.js.map +1 -1
  181. package/dist/public-web-link.d.ts +13 -1
  182. package/dist/public-web-link.js +28 -1
  183. package/dist/public-web-link.js.map +1 -1
  184. package/dist/recover.cjs +2638 -0
  185. package/dist/remote-card-prompt.d.ts +6 -2
  186. package/dist/remote-card-prompt.js +12 -3
  187. package/dist/remote-card-prompt.js.map +1 -1
  188. package/dist/reply-draft.d.ts +12 -0
  189. package/dist/reply-draft.js +81 -0
  190. package/dist/reply-draft.js.map +1 -0
  191. package/dist/request-contact-api.d.ts +15 -0
  192. package/dist/request-contact-api.js +120 -0
  193. package/dist/request-contact-api.js.map +1 -0
  194. package/dist/request-contact-card.d.ts +36 -0
  195. package/dist/request-contact-card.js +206 -0
  196. package/dist/request-contact-card.js.map +1 -0
  197. package/dist/request-contact-gate.d.ts +79 -0
  198. package/dist/request-contact-gate.js +262 -0
  199. package/dist/request-contact-gate.js.map +1 -0
  200. package/dist/request-contact-native.d.ts +52 -0
  201. package/dist/request-contact-native.js +87 -0
  202. package/dist/request-contact-native.js.map +1 -0
  203. package/dist/request-contact-types.d.ts +86 -0
  204. package/dist/request-contact-types.js +7 -0
  205. package/dist/request-contact-types.js.map +1 -0
  206. package/dist/request-context-call-protocol.d.ts +12 -0
  207. package/dist/request-context-call-protocol.js +14 -0
  208. package/dist/request-context-call-protocol.js.map +1 -0
  209. package/dist/request-context-call.d.ts +22 -0
  210. package/dist/request-context-call.js +35 -0
  211. package/dist/request-context-call.js.map +1 -0
  212. package/dist/request-context-drain.d.ts +39 -0
  213. package/dist/request-context-drain.js +159 -0
  214. package/dist/request-context-drain.js.map +1 -0
  215. package/dist/request-context-fence.d.ts +28 -0
  216. package/dist/request-context-fence.js +58 -0
  217. package/dist/request-context-fence.js.map +1 -0
  218. package/dist/request-context-migration.d.ts +64 -0
  219. package/dist/request-context-migration.js +158 -0
  220. package/dist/request-context-migration.js.map +1 -0
  221. package/dist/request-context-pane.d.ts +25 -0
  222. package/dist/request-context-pane.js +48 -0
  223. package/dist/request-context-pane.js.map +1 -0
  224. package/dist/request-context-policy.d.ts +74 -0
  225. package/dist/request-context-policy.js +116 -0
  226. package/dist/request-context-policy.js.map +1 -0
  227. package/dist/request-context-recovery.d.ts +14 -0
  228. package/dist/request-context-recovery.js +56 -0
  229. package/dist/request-context-recovery.js.map +1 -0
  230. package/dist/request-context-relay.d.ts +19 -0
  231. package/dist/request-context-relay.js +63 -0
  232. package/dist/request-context-relay.js.map +1 -0
  233. package/dist/request-context-returns.d.ts +67 -0
  234. package/dist/request-context-returns.js +211 -0
  235. package/dist/request-context-returns.js.map +1 -0
  236. package/dist/request-context-store.d.ts +2 -1
  237. package/dist/request-context-store.js +8 -1
  238. package/dist/request-context-store.js.map +1 -1
  239. package/dist/request-context-turns.d.ts +99 -0
  240. package/dist/request-context-turns.js +215 -0
  241. package/dist/request-context-turns.js.map +1 -0
  242. package/dist/request-context-view.d.ts +33 -0
  243. package/dist/request-context-view.js +36 -0
  244. package/dist/request-context-view.js.map +1 -0
  245. package/dist/request-hub-context.d.ts +130 -0
  246. package/dist/request-hub-context.js +89 -0
  247. package/dist/request-hub-context.js.map +1 -0
  248. package/dist/request-hub-output.d.ts +11 -0
  249. package/dist/request-hub-output.js +21 -0
  250. package/dist/request-hub-output.js.map +1 -0
  251. package/dist/runtime-cli-install.js +13 -11
  252. package/dist/runtime-cli-install.js.map +1 -1
  253. package/dist/runtime-client.d.ts +2 -0
  254. package/dist/runtime-client.js +17 -4
  255. package/dist/runtime-client.js.map +1 -1
  256. package/dist/runtime-coordinator.d.ts +4 -1
  257. package/dist/runtime-coordinator.js +10 -3
  258. package/dist/runtime-coordinator.js.map +1 -1
  259. package/dist/runtime-pane-assets.d.ts +1 -1
  260. package/dist/runtime-pane-assets.js +1 -1
  261. package/dist/runtime-pane-assets.js.map +1 -1
  262. package/dist/runtime-pane-host.d.ts +3 -0
  263. package/dist/runtime-pane-host.js +39 -21
  264. package/dist/runtime-pane-host.js.map +1 -1
  265. package/dist/runtime-pane-link.d.ts +6 -2
  266. package/dist/runtime-pane-link.js +17 -4
  267. package/dist/runtime-pane-link.js.map +1 -1
  268. package/dist/runtime-pane-mcp-relay.d.ts +11 -1
  269. package/dist/runtime-pane-mcp-relay.js +69 -3
  270. package/dist/runtime-pane-mcp-relay.js.map +1 -1
  271. package/dist/runtime-pane-mcp.d.ts +28 -1
  272. package/dist/runtime-pane-mcp.js +92 -15
  273. package/dist/runtime-pane-mcp.js.map +1 -1
  274. package/dist/runtime-pane-port.d.ts +6 -0
  275. package/dist/runtime-pane-port.js +23 -4
  276. package/dist/runtime-pane-port.js.map +1 -1
  277. package/dist/runtime-pane-protocol.d.ts +4 -0
  278. package/dist/runtime-pane-protocol.js +11 -4
  279. package/dist/runtime-pane-protocol.js.map +1 -1
  280. package/dist/runtime-pane-service.d.ts +1 -0
  281. package/dist/runtime-pane-service.js +25 -9
  282. package/dist/runtime-pane-service.js.map +1 -1
  283. package/dist/runtime-pane-stdio-protocol.d.ts +4 -0
  284. package/dist/runtime-pane-stdio-protocol.js +12 -5
  285. package/dist/runtime-pane-stdio-protocol.js.map +1 -1
  286. package/dist/runtime-pane-stdio.js +5 -5
  287. package/dist/runtime-pane-stdio.js.map +1 -1
  288. package/dist/runtime-protocol.d.ts +3 -0
  289. package/dist/runtime-protocol.js.map +1 -1
  290. package/dist/scheduler/scheduler.d.ts +15 -0
  291. package/dist/scheduler/scheduler.js +45 -1
  292. package/dist/scheduler/scheduler.js.map +1 -1
  293. package/dist/scheduler/scheduler.test.js +17 -0
  294. package/dist/scheduler/scheduler.test.js.map +1 -1
  295. package/dist/scheduler/task-board.d.ts +4 -0
  296. package/dist/scheduler/task-board.js +6 -0
  297. package/dist/scheduler/task-board.js.map +1 -1
  298. package/dist/scheduler/types.d.ts +1 -1
  299. package/dist/service-activation.js +3 -13
  300. package/dist/service-activation.js.map +1 -1
  301. package/dist/service-lock.d.ts +28 -0
  302. package/dist/service-lock.js +85 -0
  303. package/dist/service-lock.js.map +1 -0
  304. package/dist/settings-api.d.ts +6 -0
  305. package/dist/settings-api.js +107 -0
  306. package/dist/settings-api.js.map +1 -1
  307. package/dist/settings-change.js +14 -1
  308. package/dist/settings-change.js.map +1 -1
  309. package/dist/settings-effect.js +11 -1
  310. package/dist/settings-effect.js.map +1 -1
  311. package/dist/state-lease.d.ts +24 -0
  312. package/dist/state-lease.js +103 -0
  313. package/dist/state-lease.js.map +1 -0
  314. package/dist/tmux-binary.js +1 -1
  315. package/dist/tmux-binary.js.map +1 -1
  316. package/dist/tool-receipt-output.d.ts +2 -0
  317. package/dist/topic-commands.js +21 -1
  318. package/dist/topic-commands.js.map +1 -1
  319. package/dist/transcript-monitor.js +3 -0
  320. package/dist/transcript-monitor.js.map +1 -1
  321. package/dist/tunnel/named-link-test.d.ts +27 -0
  322. package/dist/tunnel/named-link-test.js +41 -0
  323. package/dist/tunnel/named-link-test.js.map +1 -1
  324. package/dist/types.d.ts +7 -0
  325. package/dist/ui/chat-store.js +5 -4
  326. package/dist/ui/contact-auth-strings.js +7 -2
  327. package/dist/ui/contact-permissions.js +10 -2
  328. package/dist/ui/fleet-office-card.js +15 -2
  329. package/dist/ui/fleet-office-pack.d.ts +2 -2
  330. package/dist/ui/fleet-office-pack.js +25 -8
  331. package/dist/ui/fleet-office-skin.js +33 -9
  332. package/dist/ui/fleet-office-vehicles.js +28 -11
  333. package/dist/ui/fleet-office-zones.js +10 -5
  334. package/dist/ui/fleet-office.js +158 -20
  335. package/dist/ui/fleet-task-files.js +1 -1
  336. package/dist/ui/hub-admin-rooms-strings.js +6 -2
  337. package/dist/ui/hub-admin-rooms.js +3 -1
  338. package/dist/ui/hub-group-search.js +2 -2
  339. package/dist/ui/hub-notify-keep.js +49 -0
  340. package/dist/ui/hub-role-view.js +1 -1
  341. package/dist/ui/hub-roles-strings.js +14 -10
  342. package/dist/ui/hub-roles.js +1 -1
  343. package/dist/ui/hub-room-notify.js +2 -1
  344. package/dist/ui/hub-room-strings.js +3 -3
  345. package/dist/ui/hub-room-thread.js +9 -4
  346. package/dist/ui/panel-chat.js +15 -2
  347. package/dist/ui/panel-hub.js +3 -2
  348. package/dist/ui/panel-needs.js +35 -7
  349. package/dist/ui/panel-settings.js +22 -8
  350. package/dist/ui/settings-preview-address.js +156 -0
  351. package/dist/ui/settings-registry.js +2 -0
  352. package/dist/ui/settings-strings.js +6 -6
  353. package/dist/ui/settings-update.js +13 -0
  354. package/dist/ui/shared/app-install.js +123 -0
  355. package/dist/ui/shared/app-shell.js +4 -2
  356. package/dist/ui/shared/app-update.js +16 -2
  357. package/dist/ui/shared/app.css +119 -2
  358. package/dist/ui/shared/app.js +3 -0
  359. package/dist/ui/shared/chat-strings.js +6 -2
  360. package/dist/ui/shared/chat-thread.js +7 -1
  361. package/dist/ui/shared/hub-chat.css +6 -0
  362. package/dist/ui/shared/preview-panel.js +1 -1
  363. package/dist/ui/shared/preview.js +11 -2
  364. package/dist/ui/shared/tokens.css +18 -3
  365. package/dist/ui/shared/ui-confirm.js +7 -5
  366. package/dist/ui/shared/ui-icons.js +2 -0
  367. package/dist/ui/shared/update-card-ui.js +419 -0
  368. package/dist/ui/shared/workspace.css +7 -0
  369. package/dist/ui/usage-credits-card.js +84 -0
  370. package/dist/ui/workspace-ignored-strings.js +16 -0
  371. package/dist/ui/workspace-panel.js +15 -6
  372. package/dist/update-abandon.d.ts +26 -0
  373. package/dist/update-abandon.js +111 -0
  374. package/dist/update-abandon.js.map +1 -0
  375. package/dist/update-card.d.ts +193 -0
  376. package/dist/update-card.js +620 -0
  377. package/dist/update-card.js.map +1 -0
  378. package/dist/update-dispatch.d.ts +16 -1
  379. package/dist/update-dispatch.js +12 -4
  380. package/dist/update-dispatch.js.map +1 -1
  381. package/dist/update-forward.d.ts +59 -0
  382. package/dist/update-forward.js +227 -0
  383. package/dist/update-forward.js.map +1 -0
  384. package/dist/update-goback.d.ts +90 -0
  385. package/dist/update-goback.js +260 -0
  386. package/dist/update-goback.js.map +1 -0
  387. package/dist/update-idle.d.ts +1 -0
  388. package/dist/update-idle.js +12 -3
  389. package/dist/update-idle.js.map +1 -1
  390. package/dist/update-install.d.ts +2 -1
  391. package/dist/update-install.js +18 -10
  392. package/dist/update-install.js.map +1 -1
  393. package/dist/update-journal.d.ts +359 -0
  394. package/dist/update-journal.js +723 -0
  395. package/dist/update-journal.js.map +1 -0
  396. package/dist/update-launch.js +1 -1
  397. package/dist/update-launch.js.map +1 -1
  398. package/dist/update-npm-env.d.ts +45 -12
  399. package/dist/update-npm-env.js +48 -0
  400. package/dist/update-npm-env.js.map +1 -1
  401. package/dist/update-package-restore.d.ts +84 -0
  402. package/dist/update-package-restore.js +329 -0
  403. package/dist/update-package-restore.js.map +1 -0
  404. package/dist/update-quiescence.d.ts +221 -0
  405. package/dist/update-quiescence.js +370 -0
  406. package/dist/update-quiescence.js.map +1 -0
  407. package/dist/update-readiness-host.d.ts +61 -0
  408. package/dist/update-readiness-host.js +297 -0
  409. package/dist/update-readiness-host.js.map +1 -0
  410. package/dist/update-readiness.d.ts +83 -0
  411. package/dist/update-readiness.js +459 -0
  412. package/dist/update-readiness.js.map +1 -0
  413. package/dist/update-recovery/kit.d.ts +35 -0
  414. package/dist/update-recovery/kit.js +99 -0
  415. package/dist/update-recovery/kit.js.map +1 -0
  416. package/dist/update-recovery/pre-start.d.ts +34 -0
  417. package/dist/update-recovery/pre-start.js +103 -0
  418. package/dist/update-recovery/pre-start.js.map +1 -0
  419. package/dist/update-recovery/recover-main.d.ts +1 -0
  420. package/dist/update-recovery/recover-main.js +4 -0
  421. package/dist/update-recovery/recover-main.js.map +1 -0
  422. package/dist/update-recovery/recover.d.ts +22 -0
  423. package/dist/update-recovery/recover.js +134 -0
  424. package/dist/update-recovery/recover.js.map +1 -0
  425. package/dist/update-recovery/route.d.ts +53 -0
  426. package/dist/update-recovery/route.js +262 -0
  427. package/dist/update-recovery/route.js.map +1 -0
  428. package/dist/update-recovery/runner.d.ts +62 -0
  429. package/dist/update-recovery/runner.js +229 -0
  430. package/dist/update-recovery/runner.js.map +1 -0
  431. package/dist/update-recovery/service-manager.d.ts +39 -0
  432. package/dist/update-recovery/service-manager.js +57 -0
  433. package/dist/update-recovery/service-manager.js.map +1 -0
  434. package/dist/update-restore.d.ts +50 -0
  435. package/dist/update-restore.js +360 -0
  436. package/dist/update-restore.js.map +1 -0
  437. package/dist/update-retained.d.ts +65 -0
  438. package/dist/update-retained.js +116 -0
  439. package/dist/update-retained.js.map +1 -0
  440. package/dist/update-rollback.d.ts +74 -0
  441. package/dist/update-rollback.js +221 -0
  442. package/dist/update-rollback.js.map +1 -0
  443. package/dist/update-settings.d.ts +63 -0
  444. package/dist/update-settings.js +162 -0
  445. package/dist/update-settings.js.map +1 -0
  446. package/dist/update-snapshot-manifest.d.ts +32 -0
  447. package/dist/update-snapshot-manifest.js +65 -0
  448. package/dist/update-snapshot-manifest.js.map +1 -0
  449. package/dist/update-snapshot-scope.d.ts +67 -0
  450. package/dist/update-snapshot-scope.js +173 -0
  451. package/dist/update-snapshot-scope.js.map +1 -0
  452. package/dist/update-snapshot.d.ts +34 -0
  453. package/dist/update-snapshot.js +246 -0
  454. package/dist/update-snapshot.js.map +1 -0
  455. package/dist/update-writers.d.ts +71 -0
  456. package/dist/update-writers.js +235 -0
  457. package/dist/update-writers.js.map +1 -0
  458. package/dist/web-api.d.ts +3 -0
  459. package/dist/web-api.js +43 -8
  460. package/dist/web-api.js.map +1 -1
  461. package/dist/web-chat-history.d.ts +7 -0
  462. package/dist/web-chat-history.js +15 -0
  463. package/dist/web-chat-history.js.map +1 -1
  464. package/dist/web-icons.d.ts +11 -0
  465. package/dist/web-icons.js +14 -2
  466. package/dist/web-icons.js.map +1 -1
  467. package/dist/web-mentions.d.ts +27 -8
  468. package/dist/web-mentions.js +108 -1
  469. package/dist/web-mentions.js.map +1 -1
  470. package/dist/web-office-acts.js +3 -0
  471. package/dist/web-office-acts.js.map +1 -1
  472. package/dist/web-preview.d.ts +5 -0
  473. package/dist/web-preview.js +1 -1
  474. package/dist/web-preview.js.map +1 -1
  475. package/dist/web-update.d.ts +6 -0
  476. package/dist/windows-agents.d.ts +12 -0
  477. package/dist/windows-agents.js +5 -0
  478. package/dist/windows-agents.js.map +1 -1
  479. package/launcher/agend +4 -1
  480. package/launcher/agend-agent +4 -1
  481. package/launcher/agend-install.cjs +16 -8
  482. package/launcher/install-admission.d.cts +8 -0
  483. package/launcher/npm-allow-scripts.cjs +72 -0
  484. package/launcher/npm-global-prefix.cjs +81 -0
  485. package/launcher/postinstall.cjs +9 -8
  486. package/launcher/runtime-select.cjs +8 -2
  487. package/package.json +4 -3
  488. package/scripts/preinstall-guard.cjs +1 -1
@@ -0,0 +1,359 @@
1
+ import { type InstallLockDeps } from "./install-lock.js";
2
+ export type Stage = "opened" | "barrier" | "stopping" | "abandoning" | "abandoned" | "snapshotted" | "installing" | "trial" | "proving" | "committing" | "committed" | "rolling-back" | "rolled-back" | "manual-recovery";
3
+ export type Outcome = "committed" | "rolled-back" | "abandoned" | "manual-recovery";
4
+ export declare const TERMINAL: ReadonlySet<Stage>;
5
+ export declare function canAdvance(from: Stage, to: Stage): boolean;
6
+ export interface Artifact {
7
+ name: string;
8
+ version: string;
9
+ integrity: string | null;
10
+ }
11
+ export interface ProcessStartRecord {
12
+ processStart: string;
13
+ startTicks?: string;
14
+ bootId?: string;
15
+ }
16
+ export interface AttemptRecord {
17
+ schema: 1;
18
+ id: string;
19
+ kind: "update" | "go-back";
20
+ createdAt: string;
21
+ updater: {
22
+ pid: number;
23
+ start: ProcessStartRecord;
24
+ };
25
+ from: Artifact;
26
+ to: Artifact;
27
+ stage: Stage;
28
+ substep?: string;
29
+ history: Array<{
30
+ stage: Stage;
31
+ substep?: string;
32
+ at: string;
33
+ note?: string;
34
+ }>;
35
+ outcome?: {
36
+ kind: Outcome;
37
+ reason?: string;
38
+ at: string;
39
+ };
40
+ goBackOf?: string;
41
+ /** 2.1b/2.3 fill these (ownership, expected tuples, fleet generations, baseline); kept opaque here. */
42
+ [extra: string]: unknown;
43
+ }
44
+ /**
45
+ * The journal's I/O, as primitives (Prism #4494 4). Every primitive that changes the disk calls `step` right after it
46
+ * with `<op>:<file name>`, so a test can stop the writer at any boundary: after a tmp file's fsync, after a rename,
47
+ * after a directory fsync. `trace` records the order. (A process crash between steps is what this exercises; the
48
+ * order itself is what a power loss relies on, and the trace test checks it.)
49
+ */
50
+ export interface JournalIo {
51
+ now(): Date;
52
+ /** Create `path` exclusively (it must not exist: O_EXCL), write `data`, fsync it. */
53
+ writeSynced(path: string, data: string): void;
54
+ rename(from: string, to: string): void;
55
+ /** Hard-link `from` to `to`; throws with code EEXIST when `to` exists (a no-overwrite publication). */
56
+ link(from: string, to: string): void;
57
+ unlink(path: string): void;
58
+ /** Create one directory (not recursive); throws with code EEXIST when it exists. */
59
+ mkdir(path: string): void;
60
+ fsyncDir(path: string): void;
61
+ read(path: string): string | null;
62
+ list(path: string): string[];
63
+ step(name: string): void;
64
+ }
65
+ export declare const defaultJournalIo: JournalIo;
66
+ /** Replace `path` atomically and durably: tmp written and fsynced, renamed over, the directory fsynced. */
67
+ declare function writeAtomic(io: JournalIo, path: string, data: string): void;
68
+ /**
69
+ * Publish `path` only if it doesn't exist (Prism #4494 3): tmp written and fsynced, hard-linked into place (never
70
+ * replacing anything), tmp removed, the directory fsynced. An exact retry (the same bytes already there) succeeds; a
71
+ * conflicting one throws and the original stays.
72
+ */
73
+ declare function writeNew(io: JournalIo, path: string, data: string): void;
74
+ /**
75
+ * Create the directory chain from `base` (which must exist: the AgEnD home) down to `path` durably (Prism #4494 4, R2):
76
+ * each component's parent is fsynced whether this call made the component or a crashed earlier call did (a retry
77
+ * finding it present can't tell, so it syncs again before going on). `exclusive`: the last component must be new (an
78
+ * attempt's directory is never reused).
79
+ */
80
+ /** Create `path` below `base`, each new level made durable (its parent fsynced). `exclusive`: the last level must be new. */
81
+ export declare function mkdirDurable(io: JournalIo, base: string, path: string, exclusive?: boolean): void;
82
+ export declare const journalDir: (home: string) => string;
83
+ export declare const attemptDir: (home: string, id: string) => string;
84
+ /** An attempt id as `newAttemptId` makes it (and as `current` must name it). */
85
+ export declare const isAttemptId: (v: string) => boolean;
86
+ /** A time-sortable attempt id: `<UTC compact ISO>-<8 hex>`. */
87
+ export declare function newAttemptId(now: Date, hex8: string): string;
88
+ /** One attempt's own record, validated (null: absent, unreadable or invalid) — whatever `current` names. */
89
+ export declare function readAttemptRecord(home: string, id: string, io?: JournalIo): AttemptRecord | null;
90
+ export type JournalRead = {
91
+ state: "none";
92
+ } | {
93
+ state: "unknown";
94
+ reason: string;
95
+ path: string;
96
+ } | {
97
+ state: "open";
98
+ attempt: AttemptRecord;
99
+ } | {
100
+ state: "closing";
101
+ attempt: AttemptRecord;
102
+ } | {
103
+ state: "manual";
104
+ attempt: AttemptRecord;
105
+ };
106
+ /** §2.5: the journal as every reader sees it. Only an absent `current` is "none". */
107
+ export declare function readCurrent(home: string, io?: JournalIo): JournalRead;
108
+ /** §2.4 step 3, for a "closing" journal: clear `current` (rename it into the attempt). Only under the home lock. */
109
+ export declare function finishClosing(home: string, attempt: AttemptRecord, io?: JournalIo): void;
110
+ export type OpenResult = {
111
+ ok: true;
112
+ attempt: AttemptRecord;
113
+ } | {
114
+ ok: false;
115
+ reason: string;
116
+ };
117
+ /**
118
+ * §2.4 "Open": the record first (durable), then `current`. Refused unless the journal reads "none"; a "closing" one is
119
+ * finished first (the caller holds the home lock).
120
+ */
121
+ export interface AttemptInit {
122
+ id: string;
123
+ kind: "update" | "go-back";
124
+ updater: {
125
+ pid: number;
126
+ start: ProcessStartRecord;
127
+ };
128
+ from: Artifact;
129
+ to: Artifact;
130
+ goBackOf?: string;
131
+ /** 2.1b/2.3's fields (ownership, expected tuples, fleet generations, baseline). */
132
+ extra?: Record<string, unknown>;
133
+ }
134
+ /**
135
+ * §5.7 (rev 16, Fable Go back design): the update transaction's protocol, stamped into every attempt at open by the code
136
+ * that drives it — the OLD install's updater — so a later Go back knows what the version it would return to speaks
137
+ * (handoff takeover, the fleet's hand-back). Bump it when a version can't take part in a transaction an older one could.
138
+ */
139
+ export declare const UPDATE_TX_PROTOCOL = 1;
140
+ export declare function openAttempt(home: string, init: AttemptInit, io?: JournalIo): OpenResult;
141
+ /** §2.3: move to `to` (refused unless the table allows it). Returns the new record; the caller keeps using it. */
142
+ export declare function advance(home: string, attempt: AttemptRecord, to: Stage, opts?: {
143
+ substep?: string;
144
+ note?: string;
145
+ }, io?: JournalIo): AttemptRecord;
146
+ /** A substep inside the current stage (§2.3 abandoning, §5.5, §6.3): journaled after its effect is durable. */
147
+ export declare function substep(home: string, attempt: AttemptRecord, name: string, io?: JournalIo): AttemptRecord;
148
+ /**
149
+ * §2.4 "Terminal": a rollback's mark first, then the terminal record, then `current` cleared — except manual-recovery,
150
+ * which keeps `current` until a person resolves it.
151
+ */
152
+ export declare function finish(home: string, attempt: AttemptRecord, outcome: {
153
+ kind: Outcome;
154
+ reason?: string;
155
+ }, io?: JournalIo): AttemptRecord;
156
+ export interface Mark {
157
+ version: string;
158
+ integrity: string | null;
159
+ attemptId: string;
160
+ at?: string;
161
+ }
162
+ export type MarksRead = {
163
+ ok: true;
164
+ marks: Mark[];
165
+ } | {
166
+ ok: false;
167
+ reason: string;
168
+ };
169
+ /** `marks.json`; unreadable is never "no marks" (§2.5): the caller refuses every automatic or required update. */
170
+ export declare function readMarks(home: string, io?: JournalIo): MarksRead;
171
+ /** Append-only: the whole list rewritten atomically with the new mark (never pruned). Refuses on an unreadable list. */
172
+ export declare function appendMark(home: string, mark: Mark, io?: JournalIo): void;
173
+ /** Whether a version rolled back here (automatic and required updates never retry it). Unknown marks: "unknown". */
174
+ export declare function isMarked(home: string, artifact: {
175
+ version: string;
176
+ integrity: string | null;
177
+ }, io?: JournalIo): boolean | "unknown";
178
+ export type InboxSource = "outbox" | "adapter" | "web" | "hub";
179
+ /** A copy names the instance it was going to (rev 15, Fable #4536 design 1): hand-back admits it there. */
180
+ export type InboxItem = {
181
+ kind: "reference";
182
+ deliveryId: string;
183
+ createdSeq: number;
184
+ } | {
185
+ kind: "copy";
186
+ body: unknown;
187
+ target: string;
188
+ };
189
+ export declare const SEQ_WIDTH = 12;
190
+ export declare const inboxName: (seq: number, source: InboxSource) => string;
191
+ export declare const deferredName: (seq: number) => string;
192
+ /** The outbox `source_key` a copy is admitted under: stable per attempt and seq, so a replay reuses its row (§2.6). */
193
+ export declare const handbackSourceKey: (attemptId: string, seq: number) => string;
194
+ export declare function writeInboxItem(home: string, attemptId: string, seq: number, source: InboxSource, item: InboxItem, io?: JournalIo): void;
195
+ export declare function writeDeferred(home: string, attemptId: string, seq: number, job: {
196
+ scheduleId: string;
197
+ runId: string;
198
+ }, io?: JournalIo): void;
199
+ export type HandbackEntry = {
200
+ seq: number;
201
+ kind: "inbox";
202
+ source: InboxSource;
203
+ file: string;
204
+ item: InboxItem;
205
+ acked: boolean;
206
+ } | {
207
+ seq: number;
208
+ kind: "deferred";
209
+ file: string;
210
+ job: {
211
+ scheduleId: string;
212
+ runId: string;
213
+ };
214
+ started: boolean;
215
+ acked: boolean;
216
+ };
217
+ /**
218
+ * Everything to hand back, in the one sequence order (§2.6). An unreadable or invalid item throws: hand-back never
219
+ * skips an item it can't read.
220
+ */
221
+ export declare function listHandback(home: string, attemptId: string, io?: JournalIo): HandbackEntry[];
222
+ /** `<file>.started` (a deferred job, before it runs) and `<file>.acked` (after its hand-back took effect). */
223
+ export declare function markHandback(entry: HandbackEntry, mark: "started" | "acked", io?: JournalIo): void;
224
+ /**
225
+ * What a resumed hand-back does with one entry (§2.6). A deferred job started but not acknowledged was interrupted: it
226
+ * is recorded, never re-run (at most once).
227
+ */
228
+ export declare function handbackAction(entry: HandbackEntry): "skip" | "claim" | "admit-then-claim" | "run" | "record-interrupted";
229
+ /** The fleet's cancel request (§2.6): written only while the card is cancellable. */
230
+ export declare function writeCancel(home: string, attemptId: string, cancel: {
231
+ reason: string;
232
+ by: string;
233
+ }, io?: JournalIo): void;
234
+ /**
235
+ * The updater consumes a cancel by the stage it finds (§2.6), under the home lock, crash-safe (Prism #4494 1):
236
+ * honoured (opened, barrier, stopping with no snapshot): `abandoning` is journaled FIRST, then the marker becomes
237
+ * `cancel.consumed`. A retry finds either the marker still there with the attempt already abandoning (it only
238
+ * retires the marker), or no marker (nothing to do).
239
+ * too late: a history note is journaled first, then the marker becomes `cancel.ignored-<stage>`.
240
+ * Returns the outcome and the attempt as now recorded.
241
+ */
242
+ export declare function consumeCancel(home: string, attempt: AttemptRecord, snapshotPublished: boolean, io?: JournalIo): {
243
+ result: "none" | "honoured" | "too-late";
244
+ attempt: AttemptRecord;
245
+ };
246
+ export type UpdaterState = "live" | "gone" | "unknown";
247
+ export type RecoveryAction = {
248
+ kind: "start";
249
+ } | {
250
+ kind: "refuse";
251
+ reason: "unknown" | "manual" | "in-progress" | "updater-unknown";
252
+ attemptId?: string;
253
+ stage?: Stage;
254
+ } | {
255
+ kind: "finish-closing";
256
+ attemptId: string;
257
+ } | {
258
+ kind: "resume-abandoning";
259
+ attemptId: string;
260
+ substep?: string;
261
+ } | {
262
+ kind: "resume-rolling-back";
263
+ attemptId: string;
264
+ substep?: string;
265
+ } | {
266
+ kind: "resume-committing";
267
+ attemptId: string;
268
+ substep?: string;
269
+ };
270
+ /**
271
+ * §7, a pure function: what a fleet start (or the recovery runner) does with the journal it read. `ownStart`: this start
272
+ * holds the attempt's planned handoff nonce (it is the attempt's own start).
273
+ */
274
+ export declare function recoveryPlan(read: JournalRead, updater: UpdaterState, ownStart?: boolean): RecoveryAction;
275
+ /**
276
+ * §4.3 "the fence doesn't depend on fleet.lock alone", §7: every fleet start reads the journal FIRST. It goes on only
277
+ * when the plan is a normal start — no attempt, a closing one (a plain start doesn't run `finishClosing`: the updater,
278
+ * the recovery runner or the next update does, under the home lock — 2.1c), or this
279
+ * start holding the open attempt's planned nonce while its updater lives. Everything else refuses, naming the attempt;
280
+ * resuming an interrupted attempt is the recovery runner's (2.1c), never a plain start's.
281
+ */
282
+ export declare function fleetStartGate(home: string, handoffNonce: string | null, liveness: LivenessDeps, io?: JournalIo): {
283
+ ok: true;
284
+ resumeCommitting?: string;
285
+ } | {
286
+ ok: false;
287
+ reason: string;
288
+ };
289
+ /** The publication primitives, for the crash tests only. */
290
+ export declare const journalPrimitivesForTests: {
291
+ writeNew: typeof writeNew;
292
+ writeAtomic: typeof writeAtomic;
293
+ mkdirDurable: typeof mkdirDurable;
294
+ };
295
+ export type GenerationName = "old" | "trial" | "rollback";
296
+ export interface FleetGeneration {
297
+ gen: GenerationName;
298
+ nonce: string;
299
+ plannedAt: string;
300
+ pid?: number;
301
+ consumed?: boolean;
302
+ dead?: boolean;
303
+ }
304
+ /** §3.3: journal a generation with a fresh nonce BEFORE it is started (substep `start-planned`). */
305
+ export declare function planGeneration(home: string, attempt: AttemptRecord, gen: GenerationName, nonce: string, io?: JournalIo): AttemptRecord;
306
+ /** The generation a nonce names, if it is planned and not yet consumed or voided. */
307
+ export declare function plannedGeneration(attempt: AttemptRecord, nonce: string): FleetGeneration | null;
308
+ /**
309
+ * §4.3 step 1: the single-use claim of a handoff. Only for the open attempt's planned, unconsumed nonce; created with
310
+ * O_EXCL and synced, so exactly one contender wins. Returns false when another holds it or the nonce isn't planned.
311
+ */
312
+ export declare function claimHandoff(home: string, attemptId: string, nonce: string, claimant: {
313
+ pid: number;
314
+ start: ProcessStartRecord;
315
+ }, liveness: LivenessDeps, io?: JournalIo): boolean;
316
+ /** §4.3 step 3: the updater acknowledges a takeover: the generation's pid recorded, its nonce consumed. */
317
+ export declare function ackGeneration(home: string, attempt: AttemptRecord, nonce: string, pid: number, opts?: {
318
+ dead?: boolean;
319
+ }, io?: JournalIo): AttemptRecord;
320
+ /** The process-identity probes §2.7 judges liveness with (install-lock's). */
321
+ export type LivenessDeps = Pick<InstallLockDeps, "processStart" | "exists" | "startTicks" | "bootId">;
322
+ /**
323
+ * §2.7: the attempt's updater, by install-lock's `holderState` on its `{ pid, start }`. `gone` only on proof (no such
324
+ * pid, or another start in this boot); `unknown` never authorizes anything. The attempt's owner — this, or the recovery
325
+ * runner — is `ownerState`.
326
+ */
327
+ export declare function updaterState(attempt: AttemptRecord, deps: LivenessDeps): UpdaterState;
328
+ /** §6.2: the recovery runner's identity, written after it holds the three locks (the bootstrap handshake's answer). */
329
+ export declare const RUNNER_FILE = "runner.json";
330
+ export declare const runnerPath: (home: string, id: string) => string;
331
+ export declare function writeRunnerRecord(home: string, attemptId: string, runner: {
332
+ pid: number;
333
+ start: ProcessStartRecord;
334
+ }, io?: JournalIo): void;
335
+ /** The runner's record: absent (null), its identity, or "unreadable" (never taken as absent). */
336
+ export declare function readRunnerRecord(home: string, attemptId: string, io?: JournalIo): {
337
+ pid: number;
338
+ start: ProcessStartRecord;
339
+ } | null | "unreadable";
340
+ /**
341
+ * §2.7, §6.2: the attempt's owner — its updater, or the recovery runner acting for a gone one. Unknown when either
342
+ * can't be told (or the runner's record can't be read) — whatever the other is; otherwise live when either is live;
343
+ * gone only when both are proven gone (or no runner was ever recorded).
344
+ */
345
+ export declare function ownerState(home: string, attempt: AttemptRecord, deps: LivenessDeps, io?: JournalIo): UpdaterState;
346
+ export type RevokeResult = "revoked" | "claimed-live" | "claimant-gone" | "claimant-unknown";
347
+ /**
348
+ * §4.3: the updater takes back a planned handoff (to replace or clear it) by taking its single-use claim itself — the
349
+ * same O_EXCL file a start's `claimHandoff` creates, so exactly one of them wins. True: revoked (no start can claim it
350
+ * now; an exact retry by the same updater is fine). False: a start already holds the claim — the updater must not
351
+ * rewrite fleet.lock; it acknowledges or voids that generation instead.
352
+ */
353
+ export declare function revokeHandoff(home: string, attemptId: string, nonce: string, updater: {
354
+ pid: number;
355
+ start: ProcessStartRecord;
356
+ }, liveness: LivenessDeps, io?: JournalIo): RevokeResult;
357
+ /** A nonce whose claimant is proven gone with the update's fence still in place: void, never reused (§4.3). */
358
+ export declare function voidGeneration(home: string, attempt: AttemptRecord, nonce: string, io?: JournalIo): AttemptRecord;
359
+ export {};