@songsid/agend 2.4.0-alpha.2 → 2.4.0-alpha.4

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 (654) hide show
  1. package/dist/account-isolation.d.ts +6 -0
  2. package/dist/account-isolation.js +40 -0
  3. package/dist/account-isolation.js.map +1 -0
  4. package/dist/accounts-signout.d.ts +15 -2
  5. package/dist/accounts-signout.js +52 -4
  6. package/dist/accounts-signout.js.map +1 -1
  7. package/dist/accounts-view.d.ts +114 -27
  8. package/dist/accounts-view.js +123 -60
  9. package/dist/accounts-view.js.map +1 -1
  10. package/dist/agent-cli-instructions.md +15 -9
  11. package/dist/agent-cli.js +47 -20
  12. package/dist/agent-cli.js.map +1 -1
  13. package/dist/agent-endpoint.js +23 -8
  14. package/dist/agent-endpoint.js.map +1 -1
  15. package/dist/agent-list-output.d.ts +23 -0
  16. package/dist/agent-list-output.js +53 -0
  17. package/dist/agent-list-output.js.map +1 -0
  18. package/dist/agent-runtime-change.js +4 -4
  19. package/dist/agent-runtime-change.js.map +1 -1
  20. package/dist/agent-whats-new.js +9 -7
  21. package/dist/agent-whats-new.js.map +1 -1
  22. package/dist/antigravity-first-run.d.ts +4 -0
  23. package/dist/antigravity-first-run.js +57 -0
  24. package/dist/antigravity-first-run.js.map +1 -0
  25. package/dist/antigravity-identity.d.ts +6 -0
  26. package/dist/antigravity-identity.js +27 -0
  27. package/dist/antigravity-identity.js.map +1 -0
  28. package/dist/antigravity-store.d.ts +22 -0
  29. package/dist/antigravity-store.js +79 -0
  30. package/dist/antigravity-store.js.map +1 -0
  31. package/dist/auth-api.js +11 -1
  32. package/dist/auth-api.js.map +1 -1
  33. package/dist/backend/agy-onboarding.d.ts +14 -0
  34. package/dist/backend/agy-onboarding.js +114 -0
  35. package/dist/backend/agy-onboarding.js.map +1 -0
  36. package/dist/backend/antigravity.d.ts +15 -0
  37. package/dist/backend/antigravity.js +44 -4
  38. package/dist/backend/antigravity.js.map +1 -1
  39. package/dist/backend/claude-code.d.ts +8 -0
  40. package/dist/backend/claude-code.js +11 -4
  41. package/dist/backend/claude-code.js.map +1 -1
  42. package/dist/backend/codex.js +7 -3
  43. package/dist/backend/codex.js.map +1 -1
  44. package/dist/backend/credential-profile.d.ts +22 -3
  45. package/dist/backend/credential-profile.js +61 -9
  46. package/dist/backend/credential-profile.js.map +1 -1
  47. package/dist/backend/grok.d.ts +19 -0
  48. package/dist/backend/grok.js +112 -1
  49. package/dist/backend/grok.js.map +1 -1
  50. package/dist/backend/types.d.ts +10 -0
  51. package/dist/backend/types.js.map +1 -1
  52. package/dist/backend-availability.d.ts +6 -0
  53. package/dist/backend-availability.js +11 -0
  54. package/dist/backend-availability.js.map +1 -1
  55. package/dist/browser-backend-signins.d.ts +9 -1
  56. package/dist/browser-backend-signins.js +9 -5
  57. package/dist/browser-backend-signins.js.map +1 -1
  58. package/dist/build-provenance.json +1 -1
  59. package/dist/channel/mcp-tools.js +10 -10
  60. package/dist/channel/mcp-tools.js.map +1 -1
  61. package/dist/child-process.d.ts +1 -0
  62. package/dist/child-process.js.map +1 -1
  63. package/dist/claude-auth-status.d.ts +1 -0
  64. package/dist/claude-auth-status.js +25 -0
  65. package/dist/claude-auth-status.js.map +1 -1
  66. package/dist/claude-model-observation.d.ts +71 -0
  67. package/dist/claude-model-observation.js +169 -0
  68. package/dist/claude-model-observation.js.map +1 -0
  69. package/dist/cli-capability.d.ts +104 -19
  70. package/dist/cli-capability.js +3 -1
  71. package/dist/cli-capability.js.map +1 -1
  72. package/dist/cli-caps-module.d.ts +14 -0
  73. package/dist/cli-caps-module.js +8 -1
  74. package/dist/cli-caps-module.js.map +1 -1
  75. package/dist/cli-registry-check.js +114 -18
  76. package/dist/cli-registry-check.js.map +1 -1
  77. package/dist/cli-registry.d.ts +116 -12
  78. package/dist/cli-registry.js +16 -1
  79. package/dist/cli-registry.js.map +1 -1
  80. package/dist/cli-spec-antigravity.d.ts +53 -11
  81. package/dist/cli-spec-antigravity.js +44 -13
  82. package/dist/cli-spec-antigravity.js.map +1 -1
  83. package/dist/cli-spec-claude-code.d.ts +14 -1
  84. package/dist/cli-spec-claude-code.js +5 -4
  85. package/dist/cli-spec-claude-code.js.map +1 -1
  86. package/dist/cli-spec-codex.d.ts +8 -0
  87. package/dist/cli-spec-codex.js +4 -3
  88. package/dist/cli-spec-codex.js.map +1 -1
  89. package/dist/cli-spec-grok.d.ts +4 -0
  90. package/dist/cli-spec-grok.js +2 -1
  91. package/dist/cli-spec-grok.js.map +1 -1
  92. package/dist/cli-spec-kiro-cli.d.ts +7 -0
  93. package/dist/cli-spec-kiro-cli.js +3 -2
  94. package/dist/cli-spec-kiro-cli.js.map +1 -1
  95. package/dist/cli-spec-muse.d.ts +4 -0
  96. package/dist/cli-spec-muse.js +2 -1
  97. package/dist/cli-spec-muse.js.map +1 -1
  98. package/dist/cli-spec-opencode.d.ts +1 -0
  99. package/dist/cli-spec-opencode.js +1 -0
  100. package/dist/cli-spec-opencode.js.map +1 -1
  101. package/dist/credential-store-proof.d.ts +6 -0
  102. package/dist/credential-store-proof.js +30 -0
  103. package/dist/credential-store-proof.js.map +1 -0
  104. package/dist/cross-instance-envelope.d.ts +4 -1
  105. package/dist/cross-instance-envelope.js +12 -7
  106. package/dist/cross-instance-envelope.js.map +1 -1
  107. package/dist/daemon.d.ts +24 -2
  108. package/dist/daemon.js +265 -37
  109. package/dist/daemon.js.map +1 -1
  110. package/dist/decision-list.d.ts +5 -4
  111. package/dist/decision-list.js +22 -8
  112. package/dist/decision-list.js.map +1 -1
  113. package/dist/delivery-consumed-watch.d.ts +24 -0
  114. package/dist/delivery-consumed-watch.js +21 -10
  115. package/dist/delivery-consumed-watch.js.map +1 -1
  116. package/dist/delivery-outbox.d.ts +5 -1
  117. package/dist/delivery-outbox.js +5 -0
  118. package/dist/delivery-outbox.js.map +1 -1
  119. package/dist/fleet-manager.d.ts +31 -2
  120. package/dist/fleet-manager.js +238 -56
  121. package/dist/fleet-manager.js.map +1 -1
  122. package/dist/fleet-windows-runtime.js +6 -6
  123. package/dist/fleet-windows-runtime.js.map +1 -1
  124. package/dist/general-knowledge/skills/concepts/SKILL.md +48 -7
  125. package/dist/general-knowledge/skills/credential-profiles/SKILL.md +23 -6
  126. package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +18 -8
  127. package/dist/general-knowledge/skills/fleet-health/SKILL.md +16 -0
  128. package/dist/general-knowledge/skills/hub/SKILL.md +518 -0
  129. package/dist/general-knowledge/skills/multi-channel/SKILL.md +1 -1
  130. package/dist/general-knowledge/skills/scheduling/SKILL.md +1 -1
  131. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +199 -40
  132. package/dist/general-knowledge/skills/worker-collaboration/SKILL.md +5 -1
  133. package/dist/general-role.d.ts +1 -1
  134. package/dist/general-role.js +1 -0
  135. package/dist/general-role.js.map +1 -1
  136. package/dist/grok-delivery-proof.d.ts +24 -0
  137. package/dist/grok-delivery-proof.js +124 -0
  138. package/dist/grok-delivery-proof.js.map +1 -0
  139. package/dist/hub/assistant/admin-types.d.ts +43 -0
  140. package/dist/hub/assistant/admin-types.js +2 -0
  141. package/dist/hub/assistant/admin-types.js.map +1 -0
  142. package/dist/hub/assistant/claude-host.d.ts +17 -0
  143. package/dist/hub/assistant/claude-host.js +300 -0
  144. package/dist/hub/assistant/claude-host.js.map +1 -0
  145. package/dist/hub/assistant/context.d.ts +3 -0
  146. package/dist/hub/assistant/context.js +7 -0
  147. package/dist/hub/assistant/context.js.map +1 -0
  148. package/dist/hub/assistant/fleet-host.d.ts +19 -0
  149. package/dist/hub/assistant/fleet-host.js +28 -0
  150. package/dist/hub/assistant/fleet-host.js.map +1 -0
  151. package/dist/hub/assistant/runner.d.ts +64 -0
  152. package/dist/hub/assistant/runner.js +239 -0
  153. package/dist/hub/assistant/runner.js.map +1 -0
  154. package/dist/hub/assistant/service.d.ts +51 -0
  155. package/dist/hub/assistant/service.js +143 -0
  156. package/dist/hub/assistant/service.js.map +1 -0
  157. package/dist/hub/assistant/store.d.ts +3 -0
  158. package/dist/hub/assistant/store.js +65 -0
  159. package/dist/hub/assistant/store.js.map +1 -0
  160. package/dist/hub/assistant/types.d.ts +60 -0
  161. package/dist/hub/assistant/types.js +2 -0
  162. package/dist/hub/assistant/types.js.map +1 -0
  163. package/dist/hub/buttons.d.ts +3 -0
  164. package/dist/hub/buttons.js +11 -11
  165. package/dist/hub/buttons.js.map +1 -1
  166. package/dist/hub/catalog.d.ts +13 -6
  167. package/dist/hub/catalog.js +127 -35
  168. package/dist/hub/catalog.js.map +1 -1
  169. package/dist/hub/client.d.ts +16 -0
  170. package/dist/hub/client.js +52 -9
  171. package/dist/hub/client.js.map +1 -1
  172. package/dist/hub/compose/member.d.ts +8 -1
  173. package/dist/hub/compose/member.js +238 -57
  174. package/dist/hub/compose/member.js.map +1 -1
  175. package/dist/hub/compose/server.d.ts +17 -1
  176. package/dist/hub/compose/server.js +76 -13
  177. package/dist/hub/compose/server.js.map +1 -1
  178. package/dist/hub/directory/admission.d.ts +15 -0
  179. package/dist/hub/directory/admission.js +56 -0
  180. package/dist/hub/directory/admission.js.map +1 -0
  181. package/dist/hub/directory/directory.d.ts +1 -1
  182. package/dist/hub/directory/directory.js +114 -0
  183. package/dist/hub/directory/directory.js.map +1 -1
  184. package/dist/hub/directory/types.d.ts +27 -0
  185. package/dist/hub/directory/types.js.map +1 -1
  186. package/dist/hub/enrolment-code.d.ts +1 -1
  187. package/dist/hub/enrolment-code.js +4 -4
  188. package/dist/hub/enrolment-code.js.map +1 -1
  189. package/dist/hub/grant-access.d.ts +11 -0
  190. package/dist/hub/grant-access.js +113 -0
  191. package/dist/hub/grant-access.js.map +1 -0
  192. package/dist/hub/grant-search.d.ts +9 -0
  193. package/dist/hub/grant-search.js +92 -0
  194. package/dist/hub/grant-search.js.map +1 -0
  195. package/dist/hub/group-policy/admin-control.d.ts +1 -0
  196. package/dist/hub/group-policy/admin-control.js +4 -2
  197. package/dist/hub/group-policy/admin-control.js.map +1 -1
  198. package/dist/hub/group-policy/admin-facts.d.ts +1 -0
  199. package/dist/hub/group-policy/admin-facts.js +2 -1
  200. package/dist/hub/group-policy/admin-facts.js.map +1 -1
  201. package/dist/hub/group-policy/admin-impact.d.ts +2 -0
  202. package/dist/hub/group-policy/admin-impact.js +10 -2
  203. package/dist/hub/group-policy/admin-impact.js.map +1 -1
  204. package/dist/hub/group-policy/admin-inventory.js +1 -1
  205. package/dist/hub/group-policy/admin-inventory.js.map +1 -1
  206. package/dist/hub/group-policy/admin-read.d.ts +1 -0
  207. package/dist/hub/group-policy/admin-read.js +3 -2
  208. package/dist/hub/group-policy/admin-read.js.map +1 -1
  209. package/dist/hub/group-policy/authorization.d.ts +5 -2
  210. package/dist/hub/group-policy/authorization.js +73 -32
  211. package/dist/hub/group-policy/authorization.js.map +1 -1
  212. package/dist/hub/group-policy/errors.d.ts +9 -0
  213. package/dist/hub/group-policy/errors.js +13 -0
  214. package/dist/hub/group-policy/errors.js.map +1 -0
  215. package/dist/hub/group-policy/impact-inventory.js +20 -4
  216. package/dist/hub/group-policy/impact-inventory.js.map +1 -1
  217. package/dist/hub/group-policy/resources.d.ts +4 -5
  218. package/dist/hub/group-policy/resources.js +26 -19
  219. package/dist/hub/group-policy/resources.js.map +1 -1
  220. package/dist/hub/group-policy/store.d.ts +21 -12
  221. package/dist/hub/group-policy/store.js +99 -109
  222. package/dist/hub/group-policy/store.js.map +1 -1
  223. package/dist/hub/group-policy/welcome.js.map +1 -1
  224. package/dist/hub/http/compose.d.ts +1 -0
  225. package/dist/hub/http/compose.js +463 -20
  226. package/dist/hub/http/compose.js.map +1 -1
  227. package/dist/hub/http/core.d.ts +24 -5
  228. package/dist/hub/http/core.js +181 -54
  229. package/dist/hub/http/core.js.map +1 -1
  230. package/dist/hub/http/deps.d.ts +26 -0
  231. package/dist/hub/http/schema.js +19 -0
  232. package/dist/hub/http/schema.js.map +1 -1
  233. package/dist/hub/init/member-certificate.d.ts +1 -0
  234. package/dist/hub/init/member-certificate.js +39 -0
  235. package/dist/hub/init/member-certificate.js.map +1 -0
  236. package/dist/hub/init/plan-digest.js +1 -0
  237. package/dist/hub/init/plan-digest.js.map +1 -1
  238. package/dist/hub/invitations.d.ts +96 -0
  239. package/dist/hub/invitations.js +292 -0
  240. package/dist/hub/invitations.js.map +1 -0
  241. package/dist/hub/join/certificate-trust.d.ts +13 -0
  242. package/dist/hub/join/certificate-trust.js +41 -0
  243. package/dist/hub/join/certificate-trust.js.map +1 -0
  244. package/dist/hub/join/certificate.d.ts +11 -0
  245. package/dist/hub/join/certificate.js +67 -0
  246. package/dist/hub/join/certificate.js.map +1 -0
  247. package/dist/hub/join/client.d.ts +5 -0
  248. package/dist/hub/join/client.js +30 -3
  249. package/dist/hub/join/client.js.map +1 -1
  250. package/dist/hub/join/http.js +5 -3
  251. package/dist/hub/join/http.js.map +1 -1
  252. package/dist/hub/join/local.d.ts +37 -1
  253. package/dist/hub/join/local.js +142 -14
  254. package/dist/hub/join/local.js.map +1 -1
  255. package/dist/hub/join/service.d.ts +19 -0
  256. package/dist/hub/join/service.js +46 -35
  257. package/dist/hub/join/service.js.map +1 -1
  258. package/dist/hub/join/trust.d.ts +9 -0
  259. package/dist/hub/join/trust.js +35 -0
  260. package/dist/hub/join/trust.js.map +1 -1
  261. package/dist/hub/member/pairing-api.js +12 -1
  262. package/dist/hub/member/pairing-api.js.map +1 -1
  263. package/dist/hub/member/room-ask.d.ts +137 -0
  264. package/dist/hub/member/room-ask.js +358 -0
  265. package/dist/hub/member/room-ask.js.map +1 -0
  266. package/dist/hub/member-journal.d.ts +18 -1
  267. package/dist/hub/member-journal.js +76 -3
  268. package/dist/hub/member-journal.js.map +1 -1
  269. package/dist/hub/member-origin.d.ts +177 -0
  270. package/dist/hub/member-origin.js +314 -0
  271. package/dist/hub/member-origin.js.map +1 -0
  272. package/dist/hub/pairing-notices.d.ts +1 -0
  273. package/dist/hub/pairing-notices.js +2 -1
  274. package/dist/hub/pairing-notices.js.map +1 -1
  275. package/dist/hub/pairing.d.ts +11 -0
  276. package/dist/hub/pairing.js +69 -21
  277. package/dist/hub/pairing.js.map +1 -1
  278. package/dist/hub/policy.d.ts +1 -1
  279. package/dist/hub/policy.js +19 -6
  280. package/dist/hub/policy.js.map +1 -1
  281. package/dist/hub/protocol.d.ts +172 -0
  282. package/dist/hub/protocol.js +25 -2
  283. package/dist/hub/protocol.js.map +1 -1
  284. package/dist/hub/quota.d.ts +2 -1
  285. package/dist/hub/quota.js +2 -2
  286. package/dist/hub/quota.js.map +1 -1
  287. package/dist/hub/roles/authority.d.ts +45 -0
  288. package/dist/hub/roles/authority.js +199 -0
  289. package/dist/hub/roles/authority.js.map +1 -0
  290. package/dist/hub/roles/change.d.ts +18 -0
  291. package/dist/hub/roles/change.js +76 -0
  292. package/dist/hub/roles/change.js.map +1 -0
  293. package/dist/hub/roles/clock.d.ts +18 -0
  294. package/dist/hub/roles/clock.js +58 -0
  295. package/dist/hub/roles/clock.js.map +1 -0
  296. package/dist/hub/roles/convert.d.ts +11 -0
  297. package/dist/hub/roles/convert.js +27 -0
  298. package/dist/hub/roles/convert.js.map +1 -0
  299. package/dist/hub/roles/cutover-inventory.d.ts +14 -0
  300. package/dist/hub/roles/cutover-inventory.js +42 -0
  301. package/dist/hub/roles/cutover-inventory.js.map +1 -0
  302. package/dist/hub/roles/cutover-marker.d.ts +57 -0
  303. package/dist/hub/roles/cutover-marker.js +26 -0
  304. package/dist/hub/roles/cutover-marker.js.map +1 -0
  305. package/dist/hub/roles/cutover.d.ts +32 -0
  306. package/dist/hub/roles/cutover.js +170 -0
  307. package/dist/hub/roles/cutover.js.map +1 -0
  308. package/dist/hub/roles/delegation.d.ts +24 -0
  309. package/dist/hub/roles/delegation.js +111 -0
  310. package/dist/hub/roles/delegation.js.map +1 -0
  311. package/dist/hub/roles/evaluate.d.ts +50 -0
  312. package/dist/hub/roles/evaluate.js +96 -0
  313. package/dist/hub/roles/evaluate.js.map +1 -0
  314. package/dist/hub/roles/expiry.d.ts +46 -0
  315. package/dist/hub/roles/expiry.js +180 -0
  316. package/dist/hub/roles/expiry.js.map +1 -0
  317. package/dist/hub/roles/mode-effects.d.ts +5 -0
  318. package/dist/hub/roles/mode-effects.js +21 -0
  319. package/dist/hub/roles/mode-effects.js.map +1 -0
  320. package/dist/hub/roles/model.d.ts +171 -0
  321. package/dist/hub/roles/model.js +79 -0
  322. package/dist/hub/roles/model.js.map +1 -0
  323. package/dist/hub/roles/read.d.ts +33 -0
  324. package/dist/hub/roles/read.js +55 -0
  325. package/dist/hub/roles/read.js.map +1 -0
  326. package/dist/hub/roles/writer.d.ts +80 -0
  327. package/dist/hub/roles/writer.js +427 -0
  328. package/dist/hub/roles/writer.js.map +1 -0
  329. package/dist/hub/rooms/admin.d.ts +45 -0
  330. package/dist/hub/rooms/admin.js +105 -0
  331. package/dist/hub/rooms/admin.js.map +1 -0
  332. package/dist/hub/rooms/agents.d.ts +74 -0
  333. package/dist/hub/rooms/agents.js +333 -0
  334. package/dist/hub/rooms/agents.js.map +1 -0
  335. package/dist/hub/rooms/assistant.d.ts +44 -0
  336. package/dist/hub/rooms/assistant.js +179 -0
  337. package/dist/hub/rooms/assistant.js.map +1 -0
  338. package/dist/hub/rooms/context.d.ts +10 -0
  339. package/dist/hub/rooms/context.js +24 -0
  340. package/dist/hub/rooms/context.js.map +1 -0
  341. package/dist/hub/rooms/direct-view.d.ts +39 -0
  342. package/dist/hub/rooms/direct-view.js +38 -0
  343. package/dist/hub/rooms/direct-view.js.map +1 -0
  344. package/dist/hub/rooms/directory.d.ts +35 -0
  345. package/dist/hub/rooms/directory.js +98 -0
  346. package/dist/hub/rooms/directory.js.map +1 -0
  347. package/dist/hub/rooms/schema.d.ts +11 -0
  348. package/dist/hub/rooms/schema.js +73 -0
  349. package/dist/hub/rooms/schema.js.map +1 -0
  350. package/dist/hub/rooms/service.d.ts +449 -0
  351. package/dist/hub/rooms/service.js +581 -0
  352. package/dist/hub/rooms/service.js.map +1 -0
  353. package/dist/hub/rooms/types.d.ts +79 -0
  354. package/dist/hub/rooms/types.js +2 -0
  355. package/dist/hub/rooms/types.js.map +1 -0
  356. package/dist/hub/rooms.d.ts +15 -1
  357. package/dist/hub/rooms.js +76 -31
  358. package/dist/hub/rooms.js.map +1 -1
  359. package/dist/hub/runtime.d.ts +8 -0
  360. package/dist/hub/runtime.js +57 -3
  361. package/dist/hub/runtime.js.map +1 -1
  362. package/dist/hub/server.d.ts +28 -0
  363. package/dist/hub/server.js +66 -6
  364. package/dist/hub/server.js.map +1 -1
  365. package/dist/hub/sessions.js +6 -2
  366. package/dist/hub/sessions.js.map +1 -1
  367. package/dist/hub/settings-commit.d.ts +6 -1
  368. package/dist/hub/settings-commit.js +15 -0
  369. package/dist/hub/settings-commit.js.map +1 -1
  370. package/dist/hub/settings-directory-decision.d.ts +2 -2
  371. package/dist/hub/settings-directory-decision.js +7 -5
  372. package/dist/hub/settings-directory-decision.js.map +1 -1
  373. package/dist/hub/settings-directory-proof.js +3 -1
  374. package/dist/hub/settings-directory-proof.js.map +1 -1
  375. package/dist/hub/settings-directory-recovery.d.ts +5 -0
  376. package/dist/hub/settings-directory-recovery.js +14 -4
  377. package/dist/hub/settings-directory-recovery.js.map +1 -1
  378. package/dist/hub/settings-member-address-control.d.ts +84 -0
  379. package/dist/hub/settings-member-address-control.js +150 -0
  380. package/dist/hub/settings-member-address-control.js.map +1 -0
  381. package/dist/hub/settings-member-address-decision.d.ts +229 -0
  382. package/dist/hub/settings-member-address-decision.js +318 -0
  383. package/dist/hub/settings-member-address-decision.js.map +1 -0
  384. package/dist/hub/settings-member-address-http.d.ts +9 -0
  385. package/dist/hub/settings-member-address-http.js +78 -0
  386. package/dist/hub/settings-member-address-http.js.map +1 -0
  387. package/dist/hub/settings-member-address-network.d.ts +2 -0
  388. package/dist/hub/settings-member-address-network.js +22 -0
  389. package/dist/hub/settings-member-address-network.js.map +1 -0
  390. package/dist/hub/settings-member-address-notices.d.ts +22 -0
  391. package/dist/hub/settings-member-address-notices.js +21 -0
  392. package/dist/hub/settings-member-address-notices.js.map +1 -0
  393. package/dist/hub/settings-member-address-policy.d.ts +21 -0
  394. package/dist/hub/settings-member-address-policy.js +34 -0
  395. package/dist/hub/settings-member-address-policy.js.map +1 -0
  396. package/dist/hub/settings-member-address.d.ts +64 -0
  397. package/dist/hub/settings-member-address.js +239 -0
  398. package/dist/hub/settings-member-address.js.map +1 -0
  399. package/dist/hub/sharing.d.ts +10 -0
  400. package/dist/hub/sharing.js +74 -0
  401. package/dist/hub/sharing.js.map +1 -0
  402. package/dist/hub/socket.d.ts +2 -0
  403. package/dist/hub/socket.js +2 -0
  404. package/dist/hub/socket.js.map +1 -1
  405. package/dist/hub/store.js +6 -2
  406. package/dist/hub/store.js.map +1 -1
  407. package/dist/hub/teams/types.d.ts +41 -0
  408. package/dist/hub/teams/types.js +2 -0
  409. package/dist/hub/teams/types.js.map +1 -0
  410. package/dist/hub/tls.d.ts +47 -0
  411. package/dist/hub/tls.js +23 -6
  412. package/dist/hub/tls.js.map +1 -1
  413. package/dist/hub/types.d.ts +68 -4
  414. package/dist/hub/validation.d.ts +1 -1
  415. package/dist/hub/validation.js +2 -2
  416. package/dist/hub/validation.js.map +1 -1
  417. package/dist/hub/web-origin.d.ts +93 -0
  418. package/dist/hub/web-origin.js +174 -0
  419. package/dist/hub/web-origin.js.map +1 -0
  420. package/dist/hub-pilot-trust-settings.d.ts +4 -0
  421. package/dist/hub-pilot-trust-settings.js +13 -0
  422. package/dist/hub-pilot-trust-settings.js.map +1 -0
  423. package/dist/human-delivery-receipts.d.ts +4 -2
  424. package/dist/human-delivery-receipts.js +20 -13
  425. package/dist/human-delivery-receipts.js.map +1 -1
  426. package/dist/inbound-presentation.d.ts +28 -0
  427. package/dist/inbound-presentation.js +48 -0
  428. package/dist/inbound-presentation.js.map +1 -0
  429. package/dist/instance-lifecycle.d.ts +13 -1
  430. package/dist/instance-lifecycle.js +33 -10
  431. package/dist/instance-lifecycle.js.map +1 -1
  432. package/dist/instructions.d.ts +10 -2
  433. package/dist/instructions.js +32 -7
  434. package/dist/instructions.js.map +1 -1
  435. package/dist/locale.js +20 -6
  436. package/dist/locale.js.map +1 -1
  437. package/dist/log-service.d.ts +3 -0
  438. package/dist/log-service.js +39 -22
  439. package/dist/log-service.js.map +1 -1
  440. package/dist/log-steps.d.ts +56 -1
  441. package/dist/log-steps.js +318 -56
  442. package/dist/log-steps.js.map +1 -1
  443. package/dist/login-flows.d.ts +24 -2
  444. package/dist/login-flows.js +53 -22
  445. package/dist/login-flows.js.map +1 -1
  446. package/dist/login-url.js +3 -0
  447. package/dist/login-url.js.map +1 -1
  448. package/dist/machine-accounts.d.ts +42 -12
  449. package/dist/machine-accounts.js +144 -46
  450. package/dist/machine-accounts.js.map +1 -1
  451. package/dist/machine-signins.d.ts +35 -13
  452. package/dist/machine-signins.js +57 -27
  453. package/dist/machine-signins.js.map +1 -1
  454. package/dist/native-instance-input.js +4 -4
  455. package/dist/native-instance-input.js.map +1 -1
  456. package/dist/native-instance-registry.d.ts +3 -3
  457. package/dist/native-instance-registry.js +11 -10
  458. package/dist/native-instance-registry.js.map +1 -1
  459. package/dist/needs-you-hub.js +6 -2
  460. package/dist/needs-you-hub.js.map +1 -1
  461. package/dist/needs-you.d.ts +5 -1
  462. package/dist/needs-you.js +4 -8
  463. package/dist/needs-you.js.map +1 -1
  464. package/dist/office-share-page.js +1 -1
  465. package/dist/office-share-page.js.map +1 -1
  466. package/dist/outbound-handlers.d.ts +1 -0
  467. package/dist/outbound-handlers.js +25 -19
  468. package/dist/outbound-handlers.js.map +1 -1
  469. package/dist/outbound-schemas.d.ts +19 -0
  470. package/dist/outbound-schemas.js +23 -4
  471. package/dist/outbound-schemas.js.map +1 -1
  472. package/dist/profile-signins.d.ts +5 -0
  473. package/dist/profile-signins.js +1 -0
  474. package/dist/profile-signins.js.map +1 -1
  475. package/dist/queued-handoffs.d.ts +3 -1
  476. package/dist/queued-handoffs.js +1 -1
  477. package/dist/queued-handoffs.js.map +1 -1
  478. package/dist/runtime-build-info.js +6 -2
  479. package/dist/runtime-build-info.js.map +1 -1
  480. package/dist/runtime-cli.js +33 -11
  481. package/dist/runtime-cli.js.map +1 -1
  482. package/dist/runtime-client.d.ts +18 -2
  483. package/dist/runtime-client.js +84 -21
  484. package/dist/runtime-client.js.map +1 -1
  485. package/dist/runtime-credential-profiles.d.ts +36 -4
  486. package/dist/runtime-credential-profiles.js +82 -16
  487. package/dist/runtime-credential-profiles.js.map +1 -1
  488. package/dist/runtime-profile-ownership.d.ts +2 -2
  489. package/dist/runtime-profile-ownership.js +3 -3
  490. package/dist/runtime-profile-ownership.js.map +1 -1
  491. package/dist/runtime-protocol.d.ts +5 -3
  492. package/dist/runtime-protocol.js +4 -0
  493. package/dist/runtime-protocol.js.map +1 -1
  494. package/dist/runtime-remote-accounts.d.ts +72 -5
  495. package/dist/runtime-remote-accounts.js +293 -52
  496. package/dist/runtime-remote-accounts.js.map +1 -1
  497. package/dist/runtime-remote-setup.d.ts +2 -2
  498. package/dist/runtime-remote-setup.js +2 -2
  499. package/dist/runtime-remote-setup.js.map +1 -1
  500. package/dist/runtime-signin-transport.d.ts +22 -4
  501. package/dist/runtime-signin-transport.js +50 -12
  502. package/dist/runtime-signin-transport.js.map +1 -1
  503. package/dist/runtime-signin.d.ts +42 -0
  504. package/dist/runtime-signin.js +105 -9
  505. package/dist/runtime-signin.js.map +1 -1
  506. package/dist/runtime-transcript-source.d.ts +2 -0
  507. package/dist/runtime-transcript-source.js +23 -1
  508. package/dist/runtime-transcript-source.js.map +1 -1
  509. package/dist/runtime-windows-bridge.js +6 -1
  510. package/dist/runtime-windows-bridge.js.map +1 -1
  511. package/dist/scheduler/task-board.d.ts +1 -0
  512. package/dist/scheduler/task-board.js +10 -1
  513. package/dist/scheduler/task-board.js.map +1 -1
  514. package/dist/settings-api.d.ts +1 -0
  515. package/dist/settings-api.js +15 -8
  516. package/dist/settings-api.js.map +1 -1
  517. package/dist/settings-baseline.d.ts +3 -0
  518. package/dist/settings-baseline.js +2 -2
  519. package/dist/settings-baseline.js.map +1 -1
  520. package/dist/settings-effect.d.ts +3 -0
  521. package/dist/settings-effect.js +12 -2
  522. package/dist/settings-effect.js.map +1 -1
  523. package/dist/signin-keepalive.d.ts +31 -2
  524. package/dist/signin-keepalive.js +123 -12
  525. package/dist/signin-keepalive.js.map +1 -1
  526. package/dist/structured-signin-transport.d.ts +2 -2
  527. package/dist/structured-signin-transport.js +27 -6
  528. package/dist/structured-signin-transport.js.map +1 -1
  529. package/dist/structured-signin.d.ts +16 -2
  530. package/dist/structured-signin.js +59 -4
  531. package/dist/structured-signin.js.map +1 -1
  532. package/dist/task-board-tool.d.ts +0 -13
  533. package/dist/task-board-tool.js +42 -6
  534. package/dist/task-board-tool.js.map +1 -1
  535. package/dist/tool-receipt-output.d.ts +151 -0
  536. package/dist/tool-receipt-output.js +50 -0
  537. package/dist/tool-receipt-output.js.map +1 -0
  538. package/dist/topic-commands.js +2 -1
  539. package/dist/topic-commands.js.map +1 -1
  540. package/dist/transcript-jsonl.d.ts +24 -0
  541. package/dist/transcript-jsonl.js +72 -22
  542. package/dist/transcript-jsonl.js.map +1 -1
  543. package/dist/transcript-monitor.d.ts +5 -1
  544. package/dist/transcript-monitor.js +65 -3
  545. package/dist/transcript-monitor.js.map +1 -1
  546. package/dist/transcript-needles.d.ts +1 -1
  547. package/dist/transcript-needles.js +1 -1
  548. package/dist/transcript-records.d.ts +2 -1
  549. package/dist/transcript-records.js.map +1 -1
  550. package/dist/transcript-sources.d.ts +4 -0
  551. package/dist/transcript-sources.js +2 -0
  552. package/dist/transcript-sources.js.map +1 -1
  553. package/dist/ui/accounts-keepalive.js +15 -6
  554. package/dist/ui/accounts-manage.js +25 -5
  555. package/dist/ui/accounts-view.js +28 -24
  556. package/dist/ui/agent-details-settings.js +10 -1
  557. package/dist/ui/agent-proposals.js +22 -2
  558. package/dist/ui/agent-runtime-settings.js +3 -3
  559. package/dist/ui/backend-signin.js +4 -4
  560. package/dist/ui/chat-activity.js +2 -2
  561. package/dist/ui/cli-caps.js +7 -7
  562. package/dist/ui/credential-profile-select.js +32 -19
  563. package/dist/ui/fleet-canvas.js +5 -2
  564. package/dist/ui/fleet-office-card.js +4 -2
  565. package/dist/ui/fleet-org.js +2 -0
  566. package/dist/ui/hub-admin-rooms-strings.js +28 -0
  567. package/dist/ui/hub-admin-rooms.js +77 -0
  568. package/dist/ui/hub-assistant-admin-strings.js +26 -0
  569. package/dist/ui/hub-assistant-admin.js +85 -0
  570. package/dist/ui/hub-chat-store.js +8 -4
  571. package/dist/ui/hub-client.js +224 -33
  572. package/dist/ui/hub-enrolment-code.js +1 -1
  573. package/dist/ui/hub-grant-picker.js +100 -0
  574. package/dist/ui/hub-group-search.js +2 -2
  575. package/dist/ui/hub-invitations-strings.js +30 -0
  576. package/dist/ui/hub-invitations.js +108 -0
  577. package/dist/ui/hub-join-one-strings.js +4 -2
  578. package/dist/ui/hub-join-steps.js +5 -2
  579. package/dist/ui/hub-pairing-form-strings.js +48 -0
  580. package/dist/ui/hub-pilot-trust-strings.js +27 -0
  581. package/dist/ui/hub-pilot-trust.js +41 -0
  582. package/dist/ui/hub-room-composer.js +113 -0
  583. package/dist/ui/hub-room-favorites.js +90 -0
  584. package/dist/ui/hub-room-list.js +152 -0
  585. package/dist/ui/hub-room-members-strings.js +12 -0
  586. package/dist/ui/hub-room-members.js +104 -0
  587. package/dist/ui/hub-room-new-strings.js +46 -0
  588. package/dist/ui/hub-room-new.js +135 -0
  589. package/dist/ui/hub-room-presence.js +123 -0
  590. package/dist/ui/hub-room-settings-strings.js +26 -0
  591. package/dist/ui/hub-room-settings.js +134 -0
  592. package/dist/ui/hub-room-strings.js +222 -0
  593. package/dist/ui/hub-room-thread.js +262 -0
  594. package/dist/ui/hub-room-unread.js +51 -0
  595. package/dist/ui/hub-room-working.js +29 -0
  596. package/dist/ui/log-row.js +14 -5
  597. package/dist/ui/machine-signin.js +47 -14
  598. package/dist/ui/panel-details.js +6 -1
  599. package/dist/ui/panel-fleet.js +2 -2
  600. package/dist/ui/panel-hub.js +145 -59
  601. package/dist/ui/panel-needs.js +2 -0
  602. package/dist/ui/panel-settings.js +2 -2
  603. package/dist/ui/settings-hub-company-join.js +32 -11
  604. package/dist/ui/settings-hub-connection.js +9 -3
  605. package/dist/ui/settings-hub-member-address.js +205 -0
  606. package/dist/ui/settings-hub-section.js +4 -0
  607. package/dist/ui/settings-hub-web-address.js +233 -0
  608. package/dist/ui/settings-hub.js +16 -4
  609. package/dist/ui/shared/accounts-keepalive.css +8 -0
  610. package/dist/ui/shared/accounts-usage-pool.css +10 -0
  611. package/dist/ui/shared/accounts.css +9 -0
  612. package/dist/ui/shared/app-i18n.js +2 -2
  613. package/dist/ui/shared/app-needs.js +3 -0
  614. package/dist/ui/shared/app-shell.js +4 -1
  615. package/dist/ui/shared/app.css +43 -5
  616. package/dist/ui/shared/chat-render.js +10 -0
  617. package/dist/ui/shared/chat-thread.js +14 -5
  618. package/dist/ui/shared/hub-chat.css +17 -0
  619. package/dist/ui/shared/hub-grant-picker.css +4 -0
  620. package/dist/ui/shared/hub-rooms-u2.css +42 -0
  621. package/dist/ui/shared/hub-sharing.css +4 -0
  622. package/dist/ui/shared/model-observation.js +16 -0
  623. package/dist/ui/shared/stale-tab.css +6 -0
  624. package/dist/ui/shared/stale-tab.js +50 -0
  625. package/dist/ui/shared/view-strings.js +2 -2
  626. package/dist/ui/structured-signin.js +19 -6
  627. package/dist/ui/usage-pool.js +76 -0
  628. package/dist/usage/agent-output.d.ts +144 -0
  629. package/dist/usage/agent-output.js +75 -0
  630. package/dist/usage/agent-output.js.map +1 -0
  631. package/dist/usage/provider-alerts.d.ts +6 -0
  632. package/dist/usage/provider-alerts.js +6 -0
  633. package/dist/usage/provider-alerts.js.map +1 -1
  634. package/dist/usage/providers.d.ts +2 -2
  635. package/dist/usage/providers.js +60 -18
  636. package/dist/usage/providers.js.map +1 -1
  637. package/dist/usage/usage-api.d.ts +12 -0
  638. package/dist/usage/usage-api.js +39 -0
  639. package/dist/usage/usage-api.js.map +1 -1
  640. package/dist/web-api.d.ts +4 -0
  641. package/dist/web-api.js +32 -13
  642. package/dist/web-api.js.map +1 -1
  643. package/dist/web-backend-login.d.ts +4 -1
  644. package/dist/web-backend-login.js.map +1 -1
  645. package/dist/windows-cli-providers.js +5 -1
  646. package/dist/windows-cli-providers.js.map +1 -1
  647. package/dist/windows-cli-worker.d.ts +33 -1
  648. package/dist/windows-cli-worker.js +150 -10
  649. package/dist/windows-cli-worker.js.map +1 -1
  650. package/dist/windows-cli.d.ts +7 -1
  651. package/dist/windows-cli.js +19 -2
  652. package/dist/windows-cli.js.map +1 -1
  653. package/dist/workflow-templates/default.md +2 -2
  654. package/package.json +1 -1
package/dist/log-steps.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { parseClaudeModelRecord } from "./claude-model-observation.js";
1
2
  /**
2
3
  * #1218: an instance's work, step by step, for the web Log tab (紀錄) — the step model and the per-backend parsers.
3
4
  * Design: issue #1218 comment 6142912335 and the user's decisions after it; docs/design/1218-live-activity.md.
@@ -10,10 +11,10 @@
10
11
  * was cut, so the page can say so. The page renders words from the structured fields (kind, cat, subject), so the
11
12
  * labels follow its language.
12
13
  *
13
- * Nothing here reads a file except `readTailRecords` (bounded, async, for an on-demand backfill).
14
+ * File reads are async: `readTailRecords` for Log/backfill, `readStartupTailRecords` for a bounded metadata look.
14
15
  */
15
16
  import { open } from "node:fs/promises";
16
- import { LINE_MAX_BYTES, LONG_HEAD_BYTES, lastLineBoundary } from "./transcript-jsonl.js";
17
+ import { LINE_MAX_BYTES, LONG_HEAD_BYTES, boundaryBefore, openTranscript } from "./transcript-jsonl.js";
17
18
  import { redactSecrets, shellProgramName } from "./tool-progress.js";
18
19
  export const ANCHOR_TEXT = 200;
19
20
  export const SUBJECT_MAX = 300;
@@ -206,7 +207,7 @@ export const tsOf = (v) => { const t = typeof v === "string" ? Date.parse(v) : N
206
207
  /** AgEnD's `reply` tool as each backend names it: `mcp__agend__reply`, `mcp__agend-x__reply`, codex's `agend:reply`, kiro's bare `reply`. */
207
208
  const REPLY_TOOL = /^(?:mcp__agend[\w-]*__|agend[\w-]*:)?reply$/;
208
209
  export const isReplyTool = (name) => REPLY_TOOL.test(name);
209
- const HUMAN_ID = /^\s*(?:<pasted_content[^>]*>\s*)?\[agend-human-id:(hmsg-[A-Za-z0-9-]{1,80})\]/;
210
+ const HUMAN_ID = /^\s*(?:<pasted_content[^>]*>\s*)?\[(?:hid|agend-human-id):(hmsg-[A-Za-z0-9-]{1,80})\]/;
210
211
  const MESSAGE_ID = /\(message_id:\s*([A-Za-z0-9._:-]{1,80})(?:\s*\|[^)\n]{0,200})?\)/g;
211
212
  /** The ids in a delivered prompt's text (the last `(message_id: …)` — the trailer AgEnD appends — wins), or undefined. */
212
213
  export function promptAnchor(text) {
@@ -458,6 +459,11 @@ export class ClaudeStepParser extends StepParser {
458
459
  record(e) {
459
460
  const ts = tsOf(e.timestamp);
460
461
  const msg = e.message;
462
+ const modelRecord = parseClaudeModelRecord(e);
463
+ if (modelRecord?.kind === "switch")
464
+ return [this.add({ id: `model:${modelRecord.sessionId}:${modelRecord.id}`, kind: "state", ts, note: `Model switched: ${modelRecord.original} → ${modelRecord.served}`,
465
+ modelSwitch: { id: modelRecord.id, original: modelRecord.original, served: modelRecord.served,
466
+ cause: modelRecord.cause, scope: modelRecord.scope, since: ts } })];
461
467
  if (e.type === "system") {
462
468
  if (e.subtype === "turn_duration") {
463
469
  const out = this.endOpen("interrupted");
@@ -508,7 +514,7 @@ export class ClaudeStepParser extends StepParser {
508
514
  for (const b of Array.isArray(content) ? content : []) {
509
515
  const blk = b;
510
516
  if (blk.type === "text" && typeof blk.text === "string" && blk.text.trim()) {
511
- const s = this.add({ kind: "assistant", ts });
517
+ const s = this.add({ kind: "assistant", ts, ...(modelRecord?.kind === "served" ? { servedModel: modelRecord.served } : {}) });
512
518
  bodyOf(s, blk.text, TEXT_MAX);
513
519
  out.push(s);
514
520
  }
@@ -557,6 +563,46 @@ export class ClaudeStepParser extends StepParser {
557
563
  return [this.result(id, headString(head, "content") ?? "", false, ts, bytes)];
558
564
  }
559
565
  }
566
+ /** An `exec` script that sends a reply (`tools.mcp__agend__reply(...)`): its turn has said something. */
567
+ const REPLY_IN_SCRIPT = /\btools\.(?:mcp__agend[\w-]*__|agend[\w-]*:)?reply\s*\(/;
568
+ /**
569
+ * A codex `user` message that is a person's prompt. 0.15x+ names what each message holds (`content_item_kinds`): `user.text` is
570
+ * the prompt; `agents_md.instructions`, `environments.environment_context` and the like are Codex's own context — one of them
571
+ * is first in every turn and would be taken for the turn's prompt (and the turn would lose its anchor). A rollout without the
572
+ * kinds (older) is judged by its text.
573
+ */
574
+ function isPrompt(payload, text) {
575
+ const kinds = payload.internal_chat_message_metadata_passthrough?.content_item_kinds;
576
+ if (Array.isArray(kinds) && kinds.length)
577
+ return kinds.includes("user.text");
578
+ return !/^(?:<(?:environment_context|user_instructions|permissions)|# AGENTS\.md instructions)/.test(text.trim());
579
+ }
580
+ /** A command's argv as the one command it runs: `["/bin/bash", "-lc", "<script>"]` (or powershell's `-Command`) is `<script>`. */
581
+ function commandText(cmd) {
582
+ if (!Array.isArray(cmd))
583
+ return String(cmd ?? "");
584
+ const argv = cmd.map(String);
585
+ const shell = /(?:^|[\\/])(?:bash|sh|zsh|fish|pwsh|powershell)(?:\.exe)?$/i.test(argv[0] ?? "");
586
+ const last = argv[argv.length - 1] ?? "";
587
+ return shell && argv.length >= 3 && /^-[A-Za-z]+$/.test(argv[argv.length - 2] ?? "") ? last : argv.join(" ");
588
+ }
589
+ /** The command of an `exec` script that runs exactly one `exec_command` (`tools.exec_command({cmd:"npm test"})`), else undefined. */
590
+ function scriptCommand(script) {
591
+ const tools = new Set([...script.matchAll(/\btools\.(\w+)\s*\(/g)].map((m) => m[1]));
592
+ if (tools.size !== 1 || !tools.has("exec_command"))
593
+ return undefined;
594
+ const lit = /\btools\.exec_command\s*\(\s*\{\s*["']?cmd["']?\s*:\s*("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|`(?:[^`\\$]|\\.)*`)/.exec(script)?.[1];
595
+ if (!lit)
596
+ return undefined;
597
+ try {
598
+ return lit.startsWith('"') ? JSON.parse(lit) : lit.slice(1, -1).replace(/\\(['`\\])/g, "$1").replace(/\\n/g, "\n");
599
+ }
600
+ catch {
601
+ return undefined;
602
+ }
603
+ }
604
+ /** A `file:///C:/x/y.png` item path as the path it names. */
605
+ const filePath = (u) => String(u ?? "").replace(/^file:\/\/\/?(?=[A-Za-z]:|\/)/, "").replace(/^file:\/\//, "");
560
606
  const CODEX_EXIT = /Process exited with code (-?\d+)/;
561
607
  const CODEX_WALL = /Wall time: ([\d.]+) seconds/;
562
608
  /**
@@ -564,22 +610,67 @@ const CODEX_WALL = /Wall time: ([\d.]+) seconds/;
564
610
  * `local_shell_call` (running, by `call_id`) and their `*_output` (exec_command's output says its exit code and wall
565
611
  * time); `event_msg`: `task_started` (a turn), `task_complete` / `turn_aborted` (its end), and — on versions that
566
612
  * write them — `item_completed` items: CommandExecution (a command, with exit code and duration), McpToolCall,
567
- * FileChange. Their AgentMessage / UserMessage duplicate the response items and are not shown twice; reasoning never.
613
+ * FileChange, Extension (web search). Their AgentMessage / UserMessage duplicate the response items and are not shown twice;
614
+ * reasoning never (only a summary the model chose to write — `encrypted_content` is not read).
615
+ *
616
+ * Codex 0.153–0.167 (real rollouts, #3787) runs every tool through one `exec` custom tool call — a script driving `tools.*` —
617
+ * and writes each tool it ran as an `item_completed` item of its own, with an id that is not the call's. Shown both, an action
618
+ * would be two steps: the item (the thing that was done, with its output) takes over the running `exec` call's step, so there is
619
+ * one step per action (`wrapper`). Further items of the same script are steps of their own.
620
+ *
621
+ * The turn is the `turn_id` every record of it carries, not only `task_started`: a read that begins inside a turn (the newest
622
+ * window after a long `compacted` record, or a poll that picks up mid-turn — each with a fresh parser) still names it, so its
623
+ * steps hang on the same turn as the ones read before.
568
624
  */
569
625
  export class CodexStepParser extends StepParser {
570
626
  started = new Map();
571
627
  /** The reasoning texts of this turn already shown: `reasoning` and `agent_reasoning` say the same thing twice. */
572
628
  reasoned = new Set();
629
+ /** The `exec` script call of this turn still running whose first tool item has not come yet (that item takes over its step). */
630
+ wrapper = "";
631
+ /** Script calls whose step an item has taken over: their `custom_tool_call_output` adds nothing. */
632
+ adopted = new Set();
633
+ /** This turn has said something (a message or a `reply` call): `task_complete` with no last message then is not a failure. */
634
+ spoke = false;
635
+ /**
636
+ * When a `compacted` record was read while the turn was still unknown (it carries no `turn_id`, and this read began inside the
637
+ * turn: its first record): its time. The note is made once a record names the turn — a step with no turn between two runs of
638
+ * one turn would cut the turn in two for the page.
639
+ */
640
+ compactedAt = null;
641
+ /** A compaction happened at `ts`: a `state` step on the turn, or — the turn not known yet — as soon as it is. */
642
+ compacted(ts) {
643
+ if (this.turn)
644
+ return [this.add({ kind: "state", ts, note: "compacted" })];
645
+ this.compactedAt = ts;
646
+ return [];
647
+ }
573
648
  record(e) {
574
- const ts = tsOf(e.timestamp);
575
649
  const p = e.payload;
576
650
  if (!p)
577
651
  return [];
652
+ // The turn this record belongs to, when this read has not met its `task_started`.
653
+ if (!this.turn) {
654
+ const tid = p.turn_id ?? p.internal_chat_message_metadata_passthrough?.turn_id;
655
+ if (typeof tid === "string" && tid)
656
+ this.turn = tid;
657
+ }
658
+ const lead = this.compactedAt !== null && this.turn ? [this.add({ kind: "state", ts: this.compactedAt, note: "compacted" })] : [];
659
+ if (lead.length)
660
+ this.compactedAt = null;
661
+ const out = this.codexRecord(e, p);
662
+ return lead.length ? [...lead, ...out] : out;
663
+ }
664
+ codexRecord(e, p) {
665
+ const ts = tsOf(e.timestamp);
578
666
  if (e.type === "compacted")
579
- return [this.add({ kind: "state", ts, note: "compacted" })];
667
+ return this.compacted(ts);
580
668
  if (e.type === "event_msg") {
581
669
  if (p.type === "task_started") {
582
670
  this.reasoned.clear();
671
+ this.wrapper = "";
672
+ this.adopted.clear();
673
+ this.spoke = false;
583
674
  return this.newTurn(String(p.turn_id ?? ""));
584
675
  }
585
676
  if (p.type === "agent_reasoning" && typeof p.text === "string")
@@ -592,7 +683,7 @@ export class CodexStepParser extends StepParser {
592
683
  if (typeof p.reason === "string")
593
684
  s.note = p.reason;
594
685
  }
595
- else if (p.last_agent_message == null)
686
+ else if (p.last_agent_message == null && !this.spoke)
596
687
  s.status = "failed";
597
688
  out.push(s);
598
689
  return out;
@@ -614,8 +705,10 @@ export class CodexStepParser extends StepParser {
614
705
  if (role !== "user" && role !== "assistant")
615
706
  return [];
616
707
  const text = resultText(p.content);
617
- if (!text.trim() || (role === "user" && /^<(environment_context|user_instructions|permissions)/.test(text.trim())))
708
+ if (!text.trim() || (role === "user" && !isPrompt(p, text)))
618
709
  return [];
710
+ if (role === "assistant")
711
+ this.spoke = true;
619
712
  const out = [];
620
713
  const anchor = role === "user" ? promptAnchor(text) : undefined;
621
714
  const s = this.add({ kind: role, ts, ...(anchor ? { anchor } : {}) });
@@ -645,37 +738,65 @@ export class CodexStepParser extends StepParser {
645
738
  input = { ...input, command: cmd.map(String).join(" ") };
646
739
  }
647
740
  const anchor = isReplyTool(name) ? replyAnchor(input) : undefined;
648
- const s = this.add({ ...(id ? { id } : {}), kind: "tool", ts, tool: name, ...describeTool(name, input), status: "running", ...(anchor ? { anchor } : {}) });
741
+ if (isReplyTool(name) || (typeof input === "string" && REPLY_IN_SCRIPT.test(input)))
742
+ this.spoke = true;
743
+ const described = describeTool(name, input);
744
+ // A script that runs one command: the step names the command while it runs (the item that finishes it says the same).
745
+ const one = name === "exec" && typeof input === "string" ? scriptCommand(input) : undefined;
746
+ const s = this.add({ ...(id ? { id } : {}), kind: "tool", ts, tool: name, ...described, ...(one ? { subject: subjectOf(one) } : {}), status: "running", ...(anchor ? { anchor } : {}) });
649
747
  inputOf(s, input);
650
- if (ts && id)
651
- this.started.set(id, ts);
748
+ this.called(id, p.type, name, ts);
652
749
  return [s];
653
750
  }
654
751
  case "function_call_output":
655
- case "custom_tool_call_output": {
656
- const id = String(p.call_id ?? "");
657
- const s = this.close(id) ?? this.add({ id: id || undefined, kind: "tool", ts, tool: "", cat: "other", status: "done" });
658
- const text = resultText(p.output);
659
- const exit = CODEX_EXIT.exec(text), wall = CODEX_WALL.exec(text);
660
- s.status = (exit && exit[1] !== "0") || /^failed to /.test(text) ? "failed" : "done";
661
- if (exit)
662
- s.exitCode = Number(exit[1]);
663
- const t0 = this.started.get(id);
664
- this.started.delete(id);
665
- if (wall)
666
- s.durationMs = Math.round(Number(wall[1]) * 1000);
667
- else if (t0 && ts >= t0)
668
- s.durationMs = ts - t0;
669
- const out = /\nOutput:\n([\s\S]*)$/.exec(text);
670
- if (text) {
671
- bodyOf(s, out ? out[1] : text, RESULT_MAX);
672
- replyResult(s, text);
673
- }
674
- return [{ ...s }];
675
- }
752
+ case "custom_tool_call_output":
753
+ return this.answered(String(p.call_id ?? ""), resultText(p.output), ts);
676
754
  }
677
755
  return [];
678
756
  }
757
+ /**
758
+ * What a call leaves behind for its output and for the items that may take it over — the one place both the whole record and a
759
+ * long one (`long()`) go through, so a call over the line limit is bookkept exactly as a short one: its start time, and an `exec`
760
+ * script call as the `wrapper` the first item takes over.
761
+ */
762
+ called(id, type, name, ts) {
763
+ if (ts && id)
764
+ this.started.set(id, ts);
765
+ if (id && type === "custom_tool_call" && name === "exec")
766
+ this.wrapper = id;
767
+ }
768
+ /**
769
+ * A call's output (`text`: all of it, or the start of one too long to parse; `bytes`: its size then). An item already took the
770
+ * script's step over (it has the command, its output and its exit code): nothing to add, and above all not a second, nameless
771
+ * step of the same id — the page would lay it over the item's.
772
+ */
773
+ answered(id, text, ts, bytes) {
774
+ if (id && this.wrapper === id)
775
+ this.wrapper = "";
776
+ if (id && this.adopted.delete(id)) {
777
+ this.started.delete(id);
778
+ return [];
779
+ }
780
+ const s = this.close(id) ?? this.add({ id: id || undefined, kind: "tool", ts, tool: "", cat: "other", status: "done" });
781
+ const exit = CODEX_EXIT.exec(text), wall = CODEX_WALL.exec(text);
782
+ s.status = (exit && exit[1] !== "0") || /^failed to /.test(text) ? "failed" : "done";
783
+ if (exit)
784
+ s.exitCode = Number(exit[1]);
785
+ const t0 = this.started.get(id);
786
+ this.started.delete(id);
787
+ if (wall)
788
+ s.durationMs = Math.round(Number(wall[1]) * 1000);
789
+ else if (t0 && ts >= t0)
790
+ s.durationMs = ts - t0;
791
+ if (bytes !== undefined)
792
+ s.bodyBytes = bytes;
793
+ const out = /\nOutput:\n([\s\S]*)$/.exec(text);
794
+ if (text) {
795
+ bodyOf(s, out ? out[1] : text, RESULT_MAX);
796
+ replyResult(s, text);
797
+ }
798
+ return [{ ...s }];
799
+ }
679
800
  /** AGEND-181: a reasoning summary as a `thinking` step (none unless asked for, empty, or already shown this turn). */
680
801
  reasoning(text, ts) {
681
802
  if (!this.opts.thinking || !text.trim() || this.reasoned.has(text))
@@ -685,6 +806,31 @@ export class CodexStepParser extends StepParser {
685
806
  bodyOf(s, text, TEXT_MAX);
686
807
  return [s];
687
808
  }
809
+ /**
810
+ * A tool item is the action itself. While an `exec` script call is running with no item yet, the first item takes over its step
811
+ * (same id, the call's start time): one step for the action, not the call and the item. Otherwise it is a step of its own.
812
+ */
813
+ place(fields) {
814
+ const w = this.wrapper && !this.adopted.has(this.wrapper) ? this.openTool(this.wrapper) : undefined;
815
+ if (!w)
816
+ return this.add(fields);
817
+ this.close(w.id);
818
+ this.adopted.add(w.id);
819
+ this.started.delete(w.id);
820
+ delete w.input;
821
+ delete w.inputCut;
822
+ delete w.body;
823
+ delete w.bodyCut;
824
+ delete w.bodyBytes;
825
+ delete w.exitCode;
826
+ delete w.durationMs;
827
+ delete w.subject;
828
+ delete w.anchor;
829
+ // The page merges a later answer over the step it already holds (`{ ...held, ...new }`): a key the item does not say is kept
830
+ // from the script's step. So the keys the script's step had are always said here (empty when the item has none).
831
+ Object.assign(w, { input: "", subject: "" }, fields, { id: w.id, ts: w.ts || fields.ts });
832
+ return w;
833
+ }
688
834
  item(it, ts) {
689
835
  if (!it || typeof it.id !== "string")
690
836
  return [];
@@ -692,40 +838,66 @@ export class CodexStepParser extends StepParser {
692
838
  const durationMs = dur && typeof dur.secs === "number" ? dur.secs * 1000 + Math.round((dur.nanos ?? 0) / 1e6) : undefined;
693
839
  const failed = it.status === "failed" || (typeof it.exit_code === "number" && it.exit_code !== 0);
694
840
  const base = { id: it.id, kind: "tool", ts, status: (failed ? "failed" : "done"), ...(durationMs !== undefined ? { durationMs } : {}) };
841
+ const put = (fields) => this.place(fields);
842
+ const out = (s) => [this.adopted.has(s.id) ? { ...s } : s];
695
843
  switch (it.type) {
696
844
  case "CommandExecution": {
697
- const cmd = Array.isArray(it.command) ? it.command.map(String).join(" ") : String(it.command ?? "");
698
- const s = this.add({ ...base, tool: "command", cat: "run", subject: subjectOf(cmd), ...(typeof it.exit_code === "number" ? { exitCode: it.exit_code } : {}) });
845
+ const cmd = commandText(it.command);
846
+ // codex classifies what it ran (`parsed_cmd`): one read of a file / one search is a read / a search, the rest a command.
847
+ const parsed = Array.isArray(it.parsed_cmd) && it.parsed_cmd.length === 1 ? it.parsed_cmd[0] : undefined;
848
+ const kind = parsed?.type === "read" && typeof (parsed.path ?? parsed.name) === "string" ? "read"
849
+ : parsed?.type === "search" ? "search" : parsed?.type === "list_files" ? "read" : "run";
850
+ const subject = kind === "read" ? subjectOf(parsed?.path ?? parsed?.name ?? parsed?.cmd) : kind === "search" ? subjectOf(parsed?.query ?? parsed?.cmd) : subjectOf(cmd);
851
+ const s = put({ ...base, tool: "command", cat: kind, subject: subject ?? subjectOf(cmd), ...(typeof it.exit_code === "number" ? { exitCode: it.exit_code } : {}) });
699
852
  const text = String(it.aggregated_output ?? it.formatted_output ?? "");
700
853
  if (text)
701
854
  bodyOf(s, text, RESULT_MAX);
702
- return [s];
855
+ inputOf(s, cmd);
856
+ return out(s);
703
857
  }
704
858
  case "McpToolCall": {
705
859
  const tool = `${it.server}:${it.tool}`;
706
860
  const anchor = isReplyTool(tool) ? replyAnchor(it.arguments) : undefined;
707
- const s = this.add({ ...base, tool, cat: /^agend/.test(String(it.server)) ? "message" : "mcp", subject: subjectOf(tool), ...(anchor ? { anchor } : {}) });
861
+ if (isReplyTool(tool))
862
+ this.spoke = true;
863
+ const s = put({ ...base, tool, cat: /^agend/.test(String(it.server)) ? "message" : "mcp", subject: subjectOf(tool), ...(anchor ? { anchor } : {}) });
708
864
  inputOf(s, it.arguments);
709
865
  const text = resultText(it.result?.content);
710
866
  if (text) {
711
867
  bodyOf(s, text, RESULT_MAX);
712
868
  replyResult(s, text);
713
869
  }
714
- return [s];
870
+ return out(s);
715
871
  }
716
872
  case "FileChange": {
717
873
  const files = Object.keys(it.changes ?? {});
718
- const s = this.add({ ...base, tool: "file_change", cat: "edit", subject: subjectOf(files.join(", ")) });
874
+ const s = put({ ...base, tool: "file_change", cat: "edit", subject: subjectOf(files.join(", ")) });
719
875
  const text = [it.stdout, it.stderr].filter((x) => typeof x === "string" && x).join("\n");
720
876
  if (text)
721
877
  bodyOf(s, text, RESULT_MAX);
722
- return [s];
878
+ return out(s);
879
+ }
880
+ case "Extension": {
881
+ // web search / page open (`kind: "web.search"`): what was asked or opened; the results are not kept.
882
+ if (it.kind !== "web.search")
883
+ return [];
884
+ const action = it.action;
885
+ const queries = Array.isArray(action?.queries) ? action.queries.map(String).join(" · ") : "";
886
+ const s = put({ ...base, tool: "web.search", cat: "web", subject: subjectOf(action?.url ?? it.query ?? (queries || undefined)) });
887
+ return out(s);
888
+ }
889
+ case "ImageView": {
890
+ const s = put({ ...base, tool: "view_image", cat: "read", subject: subjectOf(filePath(it.path)) });
891
+ return out(s);
723
892
  }
724
893
  }
725
894
  return [];
726
895
  }
727
896
  /** A long rollout line: an output completes its call with the start of its text; a call starts by its name. */
728
897
  long(head, bytes) {
898
+ // `compacted` carries the whole replacement history (megabytes): it is a long line, and its type is all that is read of it.
899
+ if (/^\{[^{}]{0,200}"type":"compacted"/.test(head))
900
+ return this.compacted(tsOf(/"timestamp":"([^"]{10,40})"/.exec(head)?.[1]));
729
901
  if (!head.includes('"type":"response_item"'))
730
902
  return [];
731
903
  const type = /"payload":\{[^{}]{0,400}?"type":"(function_call|custom_tool_call|function_call_output|custom_tool_call_output)"/.exec(head)?.[1];
@@ -733,17 +905,15 @@ export class CodexStepParser extends StepParser {
733
905
  if (!type || !id)
734
906
  return [];
735
907
  const ts = tsOf(/"timestamp":"([^"]{10,40})"/.exec(head)?.[1]);
736
- if (type.endsWith("_output")) {
737
- const s = this.close(id) ?? this.add({ id, kind: "tool", ts, tool: "", cat: "other", status: "done" });
738
- s.status = "done";
739
- s.bodyBytes = bytes;
740
- const text = headString(head, "text") ?? headString(head, "output");
741
- if (text)
742
- bodyOf(s, text, RESULT_MAX);
743
- return [{ ...s }];
744
- }
908
+ if (type.endsWith("_output"))
909
+ return this.answered(id, headString(head, "text") ?? headString(head, "output") ?? "", ts, bytes);
745
910
  const name = /"name":"([^"]{1,200})"/.exec(head)?.[1] ?? "tool";
746
- return [this.add({ id, kind: "tool", ts, tool: name, ...describeTool(name, undefined), status: "running", bodyBytes: bytes })];
911
+ // Its input is not read (too long): the head can still say it sends a reply.
912
+ if (isReplyTool(name) || REPLY_IN_SCRIPT.test(head))
913
+ this.spoke = true;
914
+ const s = this.add({ id, kind: "tool", ts, tool: name, ...describeTool(name, undefined), status: "running", bodyBytes: bytes });
915
+ this.called(id, type, name, ts);
916
+ return [s];
747
917
  }
748
918
  }
749
919
  /** A kiro tool result's text: stdout and stderr of a command (with its exit status), or its text blocks. */
@@ -947,18 +1117,28 @@ const BACKFILL_CHUNK = 256 * 1024;
947
1117
  export async function readTailRecords(path, opts = {}) {
948
1118
  const maxBytes = Math.max(1, opts.maxBytes ?? BACKFILL_MAX_BYTES);
949
1119
  const maxLines = Math.max(1, opts.maxLines ?? 2000);
950
- // `end`: read the records before this offset (a record start, from an earlier read: a line boundary) — older ones.
951
- const end = opts.end !== undefined ? Math.min(opts.end, await lastLineBoundary(path)) : await lastLineBoundary(path);
952
1120
  const out = [];
953
- if (end === 0)
954
- return { records: out, truncated: false, end };
955
1121
  const KEEP = LINE_MAX_BYTES + LONG_HEAD_BYTES;
956
- const fh = await open(path, "r");
1122
+ const fh = await openTranscript(path);
957
1123
  try {
1124
+ // The last complete record ends at a line boundary. Finding it is part of the read, so it is inside the budget too: an
1125
+ // unfinished record after it (a record being written, or one of megabytes) is never scanned past `maxBytes`.
1126
+ // `end` (a record start from an earlier read: a boundary) is where the look begins — the older records before it — and
1127
+ // nothing after it is read; with none, the file's end.
1128
+ const size = (await fh.stat()).size;
1129
+ const from = opts.end !== undefined ? Math.min(opts.end, size) : size;
1130
+ const found = await boundaryBefore(fh, path, from, maxBytes);
1131
+ // No line end within the budget: an unfinished record longer than it. Complete lines only — none is returned. The cursor of a
1132
+ // read from the file's end is inside that record (`skip`: the next forward read drops through its end), not a boundary.
1133
+ if (found.at === null)
1134
+ return { records: out, truncated: true, end: from, ...(opts.end === undefined ? { skip: true } : {}) };
1135
+ const end = found.at;
1136
+ if (end === 0)
1137
+ return { records: out, truncated: false, end };
958
1138
  let pos = end - 1; // the last record's line end (excluded); records lie between line ends
959
1139
  let recEnd = end - 1; // where the record being assembled ends (its line end)
960
1140
  let acc = Buffer.alloc(0); // its bytes after the current chunk: its first KEEP bytes at most
961
- let read = 0;
1141
+ let read = found.read; // the boundary search's reads count against the budget
962
1142
  const emit = (bytes, total, at) => { if (total > 0)
963
1143
  out.push({ record: toRecord(bytes, total, at), at }); };
964
1144
  while (pos > 0 && read < maxBytes && out.length < maxLines) {
@@ -1002,6 +1182,88 @@ export async function readTailRecords(path, opts = {}) {
1002
1182
  await fh.close();
1003
1183
  }
1004
1184
  }
1185
+ /** Metadata-only startup look. No forward cursor is exposed when a boundary does not fit the read budget. */
1186
+ export async function readStartupTailRecords(path, opts) {
1187
+ const maxBytes = Math.max(1, opts.maxBytes ?? BACKFILL_MAX_BYTES);
1188
+ const maxLines = Math.max(1, opts.maxLines ?? 2000);
1189
+ const fh = await open(path, "r");
1190
+ try {
1191
+ // The cursor is applied before any boundary read; all physical reads share the same budget.
1192
+ const size = (await fh.stat()).size;
1193
+ let boundary = Math.max(0, Math.min(opts.end, size)), end = 0, read = 0;
1194
+ while (boundary > 0 && read < maxBytes) {
1195
+ // The usual cursor already ends just after LF; one byte verifies it without rereading its whole chunk.
1196
+ const length = Math.min(read === 0 ? 1 : BACKFILL_CHUNK, boundary, maxBytes - read);
1197
+ const start = boundary - length, buf = Buffer.alloc(length);
1198
+ for (let filled = 0; filled < length;) {
1199
+ const { bytesRead } = await fh.read(buf, filled, length - filled, start + filled);
1200
+ if (bytesRead <= 0)
1201
+ throw new Error(`readStartupTailRecords: no progress reading ${path} at ${start + filled}`);
1202
+ filled += bytesRead;
1203
+ read += bytesRead;
1204
+ }
1205
+ const lf = buf.lastIndexOf(0x0a);
1206
+ if (lf >= 0) {
1207
+ end = start + lf + 1;
1208
+ break;
1209
+ }
1210
+ boundary = start;
1211
+ }
1212
+ if (end === 0)
1213
+ return { records: [], truncated: boundary > 0 };
1214
+ const { records, truncated } = await readTailAtBoundary(path, fh, end, maxBytes - read, maxLines);
1215
+ return { records, truncated };
1216
+ }
1217
+ finally {
1218
+ await fh.close();
1219
+ }
1220
+ }
1221
+ async function readTailAtBoundary(path, fh, end, maxBytes, maxLines) {
1222
+ const out = [];
1223
+ const KEEP = LINE_MAX_BYTES + LONG_HEAD_BYTES;
1224
+ let read = 0;
1225
+ let pos = end - 1; // the last record's line end (excluded); records lie between line ends
1226
+ let recEnd = end - 1; // where the record being assembled ends (its line end)
1227
+ let acc = Buffer.alloc(0); // its bytes after the current chunk: its first KEEP bytes at most
1228
+ const emit = (bytes, total, at) => { if (total > 0)
1229
+ out.push({ record: toRecord(bytes, total, at), at }); };
1230
+ while (pos > 0 && read < maxBytes && out.length < maxLines) {
1231
+ const length = Math.min(BACKFILL_CHUNK, pos, maxBytes - read);
1232
+ const start = pos - length;
1233
+ const buf = Buffer.alloc(length);
1234
+ for (let filled = 0; filled < length;) {
1235
+ const { bytesRead } = await fh.read(buf, filled, length - filled, start + filled);
1236
+ if (bytesRead <= 0)
1237
+ throw new Error(`readTailRecords: no progress reading ${path} at ${start + filled}`);
1238
+ filled += bytesRead;
1239
+ }
1240
+ read += length;
1241
+ let segEnd = length;
1242
+ for (let i = length - 1; i >= 0 && out.length < maxLines; i--) {
1243
+ if (buf[i] !== 0x0a)
1244
+ continue;
1245
+ const total = recEnd - (start + i + 1);
1246
+ emit(Buffer.concat([buf.subarray(i + 1, segEnd), acc]), total, start + i + 1);
1247
+ acc = Buffer.alloc(0);
1248
+ recEnd = start + i;
1249
+ segEnd = i;
1250
+ }
1251
+ if (out.length >= maxLines) {
1252
+ pos = start + segEnd;
1253
+ break;
1254
+ }
1255
+ acc = Buffer.concat([buf.subarray(0, segEnd), acc]);
1256
+ if (acc.length > KEEP)
1257
+ acc = acc.subarray(0, KEEP);
1258
+ pos = start;
1259
+ }
1260
+ // The first record of the file, when the read reached it.
1261
+ if (pos === 0 && out.length < maxLines) {
1262
+ emit(acc, recEnd, 0);
1263
+ recEnd = 0;
1264
+ }
1265
+ return { records: out.reverse(), truncated: recEnd > 0, end };
1266
+ }
1005
1267
  function toRecord(piece, bytes, offset) {
1006
1268
  if (bytes > LINE_MAX_BYTES) {
1007
1269
  let endAt = Math.min(LONG_HEAD_BYTES, piece.length);