@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
@@ -24,6 +24,19 @@
24
24
  @keyframes hub-pulse { 50% { opacity: .3; } }
25
25
  @media (prefers-reduced-motion: reduce) { .hub-room-side .pulse { animation: none; } }
26
26
  .hub-list-empty, .hub-list-err { margin: var(--s-2); font-size: var(--fs-sm); }
27
+ /* M-3092: the list as the Fleet roster draws it (its row, avatar, dot and nav-count); only what the Hub adds is here. */
28
+ .hub-room-group + .hub-room-group { margin-top: var(--s-2); }
29
+ .av.av-square { border-radius: var(--r-sm); }
30
+ .hub-room-at { flex: none; color: var(--accent); font-weight: var(--fw-semibold); font-size: var(--fs-xs); }
31
+ .inst-line2 > .nav-count { flex: none; height: 18px; min-width: 18px; line-height: 18px; }
32
+ .hub-room-archived .inst-name { color: var(--text-3); }
33
+ /* The room composer's fixed hint and @all bar wrap without leaving a lone word on the last line. */
34
+ .hub-room-hint, .hub-room-allbar { text-wrap: pretty; }
35
+ /* A question's folded answers: a left-aligned link under the last one shown (Lumen), not a centred line. */
36
+ .hub-room-page .msg.status-line:has(.st-action) .st-text { display: none; }
37
+ .hub-room-page .msg.status-line:has(.st-action) .body { justify-content: flex-start; }
38
+ .hub-room-page .status-line .st-action { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; }
39
+ .hub-room-page .status-line .st-action:hover { text-decoration: underline; }
27
40
 
28
41
  /* a name's letter on a tone (the same tones in both themes) */
29
42
  .hub-av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 600; font-size: 14px; color: #fff; flex: none; }
@@ -91,6 +104,10 @@
91
104
  background: var(--surface); border-radius: var(--r-sm); color: var(--text-3); }
92
105
  .hub-side-filter input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); padding: 7px 0; font: inherit; font-size: var(--fs-sm); outline: none; }
93
106
  .hub-side-rooms .inst-head > .count { padding: var(--s-3) var(--s-3) var(--s-1); color: var(--text-3); font-size: var(--fs-xs); }
107
+ /* S-145: 「最愛」's head — the Fleet's star before the name (fav-mark: its colour), the Edit chip after the count. */
108
+ .hub-side-rooms .fav-head > .side-label { display: flex; align-items: center; gap: var(--s-1); }
109
+ .hub-side-rooms .fav-head > .count { padding-right: var(--s-1); }
110
+ .hub-side-rooms .fav-head > .fav-edit { margin-top: var(--s-2); } /* on the label's line (side-label is padded above) */
94
111
  .side-foot > .hub-prefs { flex: 1; min-width: 0; }
95
112
  .side-foot > .hub-session-row, .hub-session-row > .menu, .hub-session-row > .menu > .side-row { width: 100%; min-width: 0; }
96
113
  /* The foot is the sidebar's bottom: its session menu opens upward (as the dashboard's), never below the screen. */
@@ -0,0 +1,4 @@
1
+ /* Loaded by the lazy picker, including tabs retaining an older app.css. */
2
+ @media (max-width: 899px), (pointer: coarse) {
3
+ .hub-grant[data-grant-picker] :is(input, select) { min-width: var(--tap); min-height: var(--tap); font-size: var(--fs-md); }
4
+ }
@@ -0,0 +1,42 @@
1
+ /* Hub rooms, track U2: New room, Room settings, the members panel, invitations and Administration → Rooms. Its own
2
+ stylesheet (linked by hub-room-new-strings.js's linkRoomsU2Css, which every U2 module calls), so a tab holding an older
3
+ hub-chat.css or hub-owner.css still draws these. Built on the shared field / btn / tag / dot / note pieces; only the
4
+ layout of tags, results, rows and the rail is here. */
5
+ .hub-room-picker { display: flex; flex-direction: column; gap: var(--s-1); }
6
+ .hub-room-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
7
+ .hub-room-tags > .tag { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--fs-xs); max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
8
+ .hub-room-results { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-sm); max-height: 240px; overflow-y: auto; }
9
+ .hub-room-result { display: flex; width: 100%; align-items: baseline; gap: var(--s-2); padding: var(--s-2); background: transparent; border: 0; text-align: start; cursor: pointer; color: inherit; font: inherit; min-height: 40px; }
10
+ .hub-room-result:hover, .hub-room-result:focus-visible { background: var(--surface-2); }
11
+ .hub-room-new .form, .hub-room-settings section.form { display: flex; flex-direction: column; gap: var(--s-3); }
12
+ .hub-room-settings section + section { margin-top: var(--s-4); }
13
+ /* Room settings → Name: the label above, then the input and 儲存 on one line, the input taking the rest of it. */
14
+ .hub-room-name-row .field-row > input { flex: 1; min-width: 0; }
15
+ .hub-room-name-row .field-row > .btn { flex: none; min-height: 40px; }
16
+ .hub-room-settings h4, .hub-room-members h4, .hub-agent-rooms h4 { margin: 0 0 var(--s-2); font-size: var(--fs-sm); color: var(--text-2); }
17
+ .hub-room-settings fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-1); }
18
+ .hub-settings-people, .hub-settings-agents, .hub-settings-invited, .hub-agent-rooms ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
19
+ .hub-settings-row, .hub-agent-rooms li { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-1) 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
20
+ .hub-settings-row > span { min-width: 0; overflow-wrap: anywhere; }
21
+ .hub-room-members { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-3); }
22
+ .hub-room-members ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); }
23
+ .hub-member, .hub-member-open { display: flex; flex-direction: column; gap: 2px; }
24
+ .hub-member-open { width: 100%; background: transparent; border: 0; padding: var(--s-1); border-radius: var(--r-sm); text-align: start; cursor: pointer; color: inherit; font: inherit; }
25
+ .hub-member-open:hover, .hub-member-open:focus-visible { background: var(--surface-2); }
26
+ .hub-member-state { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 var(--s-1); font-size: var(--fs-xs); color: var(--text-2); }
27
+ .hub-member-owner { overflow-wrap: anywhere; }
28
+ .hub-member-card { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-2); margin: var(--s-1) 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
29
+ .hub-member-card .field-row { display: flex; flex-wrap: wrap; gap: var(--s-1); }
30
+ .hub-invitations { display: flex; flex-direction: column; gap: var(--s-2); }
31
+ .hub-invitation { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
32
+ .hub-invitation p { margin: 0; overflow-wrap: anywhere; }
33
+ .hub-admin-rooms { display: flex; flex-direction: column; gap: var(--s-4); }
34
+ .hub-admin-all-rooms { overflow-x: auto; }
35
+ .hub-admin-rooms-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
36
+ .hub-admin-rooms-table th, .hub-admin-rooms-table td { text-align: start; padding: var(--s-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
37
+ .hub-admin-rooms-table td:first-child { white-space: normal; overflow-wrap: anywhere; min-width: 8em; }
38
+ /* Phone and touch: every button in these screens is at least a fingertip (--tap, 44px) tall and wide — the invitations
39
+ list's 同意/拒絕, its retry, the sidebar's invitations row, 退出這個房間, the member card, Room settings, admin rooms. */
40
+ @media (max-width: 899px), (pointer: coarse) {
41
+ :is(.hub-invitations, .hub-agent-rooms, .hub-room-members, .hub-room-settings, .hub-room-new, .hub-admin-rooms) .btn { min-height: var(--tap); min-width: var(--tap); }
42
+ }
@@ -0,0 +1,4 @@
1
+ /* Loaded with the resumable-sharing renderer, including tabs retaining an older shell stylesheet. */
2
+ @media (max-width: 899px), (pointer: coarse) {
3
+ .hub-owner .btn, .hub-owner .icon-btn { min-height: 44px; min-width: 44px; }
4
+ }
@@ -0,0 +1,16 @@
1
+ // Metadata-only presentation. New leaf module: retained shell modules need no new named exports.
2
+ import { register, t } from "./app-i18n.js";
3
+ register("app", { en: { needs_reason_model_switch: "Claude model switched" }, "zh-TW": { needs_reason_model_switch: "Claude 模型已切換" } });
4
+ register("modelObservation", {
5
+ en: { title: "Model switched", safeguards: "Model switched by safeguards", availability: "Model switched due to availability", observed: "Different served model observed",
6
+ turn: "turn", session: "session", unknown: "scope unknown", configured: "Configured model", selection: "Session model", served: "Last served model", unresolved: "Not resolved" },
7
+ "zh-TW": { title: "模型已切換", safeguards: "安全機制已切換模型", availability: "模型因供應狀況而切換", observed: "觀察到不同的回應模型",
8
+ turn: "此回合", session: "此工作階段", unknown: "範圍未知", configured: "設定模型", selection: "工作階段模型", served: "最近回應模型", unresolved: "尚未確認" },
9
+ });
10
+ export const modelName = (value) => {
11
+ const id = String(value || "").replace(/\[1m\]$/i, "").replace(/^claude-/i, "").replace(/-\d{8}$/, "");
12
+ const m = /^(opus|sonnet|haiku)-(\d+)(?:[-.](\d+))?$/i.exec(id);
13
+ return m ? `${m[1][0].toUpperCase()}${m[1].slice(1).toLowerCase()} ${m[2]}${m[3] ? `.${m[3]}` : ""}` : id;
14
+ };
15
+ export const observationLabel = (key) => t(`modelObservation.${key}`);
16
+ export const modelSwitchText = (s) => s ? `${observationLabel(s.cause)}: ${modelName(s.original)} → ${modelName(s.served)} · ${observationLabel(s.scope)}` : "";
@@ -0,0 +1,6 @@
1
+ /* #3822: the "this tab is older than AgEnD" prompt. Its own public stylesheet, linked by stale-tab.js, because the tab
2
+ that shows it kept its OLD app.css (no rule for it there). On a phone or a coarse pointer its Reload is a full touch
3
+ target (style guide rule 7); --tap is a token every version has. */
4
+ @media (max-width: 899px), (pointer: coarse) {
5
+ .stale-tab .btn { min-height: var(--tap, 44px); min-width: var(--tap, 44px); }
6
+ }
@@ -0,0 +1,50 @@
1
+ // #3822: a tab left open across an AgEnD update keeps the modules it already loaded. A module it loads later comes from the
2
+ // new version, and when that one imports a name the tab's older copy of a module does not have, the browser refuses to
3
+ // link it (SyntaxError: "… does not provide an export named …"). Trying again cannot help: the old copy stays in the
4
+ // tab. Only a reload does. Where a lazily loaded part of a page fails that way, it says so in place, with Reload,
5
+ // instead of a Retry that cannot work or a loading skeleton that never ends.
6
+ // A file of its own with its own words: a brand-new module is always fetched fresh, so an older tab never meets it half
7
+ // updated. Shared components: error-state, btn.
8
+ import { html } from "./app-html.js";
9
+ import { register, t } from "./app-i18n.js";
10
+ import { Icon } from "./ui-icons.js";
11
+
12
+ register("staleTab", {
13
+ en: {
14
+ title: "This tab is older than AgEnD now.",
15
+ hint: "AgEnD was updated while this tab was open. Reload the tab to use the new version; nothing you saved is lost.",
16
+ reload: "Reload this tab",
17
+ },
18
+ "zh-TW": {
19
+ title: "這個分頁比 AgEnD 舊。",
20
+ hint: "這個分頁開著時 AgEnD 已更新。重新載入分頁即可使用新版,已儲存的內容不會遺失。",
21
+ reload: "重新載入這個分頁",
22
+ },
23
+ });
24
+
25
+ /**
26
+ * A lazily loaded module that could not be linked or parsed: what a tab older than the server meets (a missing export,
27
+ * or code its older modules cannot run) — the browser's own rejection, or one a loader wrapped with it as its `cause`. A
28
+ * network failure is not this (a TypeError): Retry still fits that.
29
+ */
30
+ export function isStaleModuleError(err) {
31
+ return err instanceof SyntaxError || (!!err && typeof err === "object" && err.cause instanceof SyntaxError);
32
+ }
33
+
34
+ /**
35
+ * The prompt's own public stylesheet (its phone touch target), linked once: the tab that shows this kept its OLD
36
+ * app.css, which has no rule for it (as Skeleton links loading.css).
37
+ */
38
+ function staleStyles() {
39
+ if (typeof document === "undefined" || !document.head || document.querySelector('link[href="/assets/stale-tab.css"]')) return;
40
+ const link = document.createElement("link"); link.setAttribute("rel", "stylesheet"); link.setAttribute("href", "/assets/stale-tab.css");
41
+ document.head.appendChild(link);
42
+ }
43
+
44
+ /** In place of what could not load: why, and one button that reloads the tab. */
45
+ export function StaleTabPrompt({ reload = () => globalThis.location?.reload() } = {}) {
46
+ staleStyles();
47
+ return html`<div class="error-state stale-tab" role="alert" data-stale-tab="1"><${Icon} name="alert" size=${24} />
48
+ <p>${t("staleTab.title")}</p><p class="muted">${t("staleTab.hint")}</p>
49
+ <button type="button" class="btn btn-primary" onClick=${() => reload()}>${t("staleTab.reload")}</button></div>`;
50
+ }
@@ -176,7 +176,7 @@ register("view", {
176
176
  "usage.error.grok_response_changed": "Grok billing response changed.",
177
177
  "usage.error.agy_cap": "Individual cap reached — CLI is rate limited (resets in ~{0}). The per-model pool quotas are separate and may still read 0% used.",
178
178
  "usage.error.agy_no_refresh": "Access token expired and no refresh token is stored. Run `agy` once.",
179
- "usage.error.agy_token_expired": "Access token expired. Run `agy` once to refresh it (or set AGY_OAUTH_CLIENT_ID/SECRET to refresh automatically).",
179
+ "usage.error.agy_token_expired": "Access token expired. Turn on Keep connection alive for this account (Settings → Accounts) to renew it every hour, or run `agy` once.",
180
180
  "usage.error.agy_login_expired": "Google sign-in expired. Run `agy` once to log in again.",
181
181
  "usage.error.agy_refresh_empty": "Google token refresh returned no token.",
182
182
  "usage.error.grok_auth_readonly": "Token expired and auth.json is read-only. Run `grok` once to refresh it.",
@@ -449,7 +449,7 @@ register("view", {
449
449
  "usage.error.grok_response_changed": "Grok 計費回應格式已變更。",
450
450
  "usage.error.agy_cap": "個人上限已用完,CLI 正受到速率限制(約 {0} 後重置)。各模型的額度池是另一組計數,因此仍可能顯示 0% 已使用。",
451
451
  "usage.error.agy_no_refresh": "Access token 已過期,且未儲存 refresh token。請執行一次 `agy`。",
452
- "usage.error.agy_token_expired": "Access token 已過期。請執行一次 `agy` 重新整理,或設定 AGY_OAUTH_CLIENT_ID/SECRET 以自動更新。",
452
+ "usage.error.agy_token_expired": "Access token 已過期。請在「設定 → 帳號」打開這個帳號的「保持連接」,每小時自動更新;或執行一次 `agy`。",
453
453
  "usage.error.agy_login_expired": "Google 登入已過期。請執行一次 `agy` 重新登入。",
454
454
  "usage.error.agy_refresh_empty": "Google token 更新回應沒有 access token。",
455
455
  "usage.error.grok_auth_readonly": "Token 已過期且 auth.json 為唯讀。請執行一次 `grok` 重新整理。",
@@ -12,12 +12,14 @@ export const SIGNIN_STRINGS = {
12
12
  field_code: "Paste the authorization code", field_start_url: "Organization Start URL", field_region: "AWS region",
13
13
  phase_method: "method", phase_code: "authorization code", phase_start_url: "start URL", phase_region: "region", phase_authorization: "authorization",
14
14
  choice_organization: "Your organization", choice_subscription: "Claude subscription",
15
- antigravity: "Antigravity (console fallback)",
15
+ consoleName: "{0} (console fallback)",
16
16
  error: "Could not connect the account. Check status, retry, or connect later.",
17
17
  error_unsupported_prompt: "This CLI screen is not supported. Cancel and use the console fallback.",
18
18
  error_cleanup_failed: "The login process could not be confirmed closed. Close it on the host and restart setup before retrying.",
19
19
  error_signin_cleanup_failed: "The login process could not be confirmed closed. Close it on the host and restart setup before retrying.",
20
20
  error_signin_action_stale: "That prompt changed or was already answered. Refresh its status; do not submit it again.",
21
+ error_signin_action_invalid: "That is not a valid entry. Check it and try again.",
22
+ codeOnly: "Paste only the code the page shows, not the page's address.",
21
23
  error_signin_console_only: "This backend uses the explicit console fallback.",
22
24
  error_backend_signin_local_only: "AI accounts can be connected only on this computer. Use the local setup page, or connect later.",
23
25
  error_signin_session_expired: "This setup session has ended. Reopen setup on the host.",
@@ -27,6 +29,7 @@ export const SIGNIN_STRINGS = {
27
29
  error_signin_profile_unknown: "This account is not in the list. Add it with + Add account in Settings → Accounts, then connect it.",
28
30
  error_auth_unconfirmed: "The CLI exited, but credentials could not be verified. Retry or connect later.",
29
31
  error_provider_rejected: "The provider rejected this authorization. Retry or connect later.",
32
+ error_not_isolated: "This CLI keeps one connection for every account on this computer (the system's keyring), so this account cannot have its own. Nothing was started and no connection was changed.",
30
33
  // #3190 Part 3c: a profile on a paired computer (the dashboard's Accounts view).
31
34
  error_machine_unknown: "That computer is not paired any more.",
32
35
  error_machine_offline: "That computer is offline. Start its Runtime, then try again.",
@@ -49,12 +52,14 @@ export const SIGNIN_STRINGS = {
49
52
  field_code: "貼上取得的授權碼", field_start_url: "組織的 Start URL", field_region: "AWS 區域",
50
53
  phase_method: "選擇方式", phase_code: "授權碼", phase_start_url: "Start URL", phase_region: "區域", phase_authorization: "授權",
51
54
  choice_organization: "你的組織", choice_subscription: "Claude 訂閱",
52
- antigravity: "Antigravity(主控台備援)",
55
+ consoleName: "{0}(主控台備援)",
53
56
  error: "無法連接帳號。請檢查狀態、重試,或稍後連接。",
54
57
  error_unsupported_prompt: "不支援這個 CLI 畫面。請取消並改用主控台備援。",
55
58
  error_cleanup_failed: "無法確認登入程序已關閉。請在主機上關閉它,並重新開始設定後再試。",
56
59
  error_signin_cleanup_failed: "無法確認登入程序已關閉。請在主機上關閉它,並重新開始設定後再試。",
57
60
  error_signin_action_stale: "這個畫面已改變或已回答過。請重新整理狀態,不要再送一次。",
61
+ error_signin_action_invalid: "這不是有效的輸入。請檢查後再試一次。",
62
+ codeOnly: "只貼上頁面顯示的授權碼,不要貼網址。",
58
63
  error_signin_console_only: "這個後端使用主控台備援。",
59
64
  error_backend_signin_local_only: "AI 帳號只能在這台電腦上連接。請使用本機的設定頁,或稍後連接。",
60
65
  error_signin_session_expired: "這個設定工作階段已結束。請在主機上重新開啟設定。",
@@ -64,6 +69,7 @@ export const SIGNIN_STRINGS = {
64
69
  error_signin_profile_unknown: "清單裡沒有這個帳號。請先在 設定 → 帳號 用 + 新增帳號 加入,再連接。",
65
70
  error_auth_unconfirmed: "CLI 已結束,但無法確認憑證。請重試或稍後連接。",
66
71
  error_provider_rejected: "平台拒絕了這次授權。請重試或稍後連接。",
72
+ error_not_isolated: "這個 CLI 在這台電腦上只保留一份連接(系統鑰匙圈),所以這個帳號無法有自己的連接。沒有啟動任何東西,也沒有改到現有的連接。",
67
73
  // #3190 Part 3c:配對電腦上的憑證設定檔(儀表板的「帳號」頁)。
68
74
  error_machine_unknown: "那台電腦已不再配對。",
69
75
  error_machine_offline: "那台電腦離線了。請先啟動它的 Runtime,再試一次。",
@@ -99,7 +105,7 @@ const pageLang = doc => /^zh/i.test(doc?.documentElement?.lang || "") ? "zh-TW"
99
105
  * `abandoned` (run id → void): the same id, when the cards were disposed (the dialog closed) while that request was still in flight: nobody is left to show or keep the run, so
100
106
  * whoever mounted the cards ends it by this id. Nothing is drawn, and no other run is touched.
101
107
  */
102
- export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, changed = () => {}, lang, machine = false, ask, dashboard = false, dialog = false, focus, started = () => {}, abandoned = () => {} } = {}) {
108
+ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, changed = () => {}, lang, machine = false, ask, dashboard = false, dialog = false, focus, started = () => {}, abandoned = () => {}, codeHint = () => false } = {}) {
103
109
  const doc = root.ownerDocument;
104
110
  let view = null, busy = false, disposed = false, timer = null, generation = 0, message = "", rendered = "";
105
111
  const language = () => (lang ? lang() : pageLang(doc)) === "zh-TW" ? "zh-TW" : "en";
@@ -107,7 +113,10 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
107
113
  const el = (tag, text, parent = root) => { const node = doc.createElement(tag); if (text) node.textContent = text; parent.append(node); return node; };
108
114
  // An error is kept as its code, so it is said again in the other language when that changes.
109
115
  const errorText = code => machine && SIGNIN_STRINGS.en["error_machine_" + code] ? tr("error_machine_" + code) : SIGNIN_STRINGS.en["error_" + code] ? tr("error_" + code) : tr("error");
110
- const name = backend => backend === "antigravity" ? tr("antigravity") : NAMES[backend] || backend;
116
+ // `view.console`: the CLIs the first-run list only names the console command for (cli-registry.ts `host.firstRunSignIn.mode`). Such a CLI is "(console fallback)" on that list only; in Settings
117
+ // → Accounts (a dialog, or a computer's own sign-in) it signs in here, so it is just its name.
118
+ const consoleOnly = backend => !!view && Array.isArray(view.console) && view.console.includes(backend);
119
+ const name = backend => !(dialog || machine) && consoleOnly(backend) ? tr("consoleName", NAMES[backend] || backend) : NAMES[backend] || backend;
111
120
  const choiceName = choice => CHOICES[choice] ?? tr("choice_" + choice);
112
121
  const phaseName = phase => SIGNIN_STRINGS.en["phase_" + phase] ? tr("phase_" + phase) : phase.replaceAll("_", " ");
113
122
  const button = (parent, label, action) => { const b = el("button", label, parent); b.type = "button"; b.disabled = busy; b.onclick = action; return b; };
@@ -144,7 +153,8 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
144
153
  const card = el("section"); card.dataset.backend = backend;
145
154
  el("h3", name(backend), card);
146
155
  const state = view.states[backend], pending = view.pending.includes(backend), skipped = view.skipped.includes(backend);
147
- el("p", tr(skipped ? "skipped" : state === "valid" ? "valid" : state === "not_installed" ? "notInstalled" : state === "console_only" ? "consoleOnly" : "needed"), card);
156
+ // "Console only" is the first-run list's word for a CLI it does not sign in; Settings → Accounts (`dialog`, or a computer's own sign-in) does, so there it is a sign-in that is needed.
157
+ el("p", tr(skipped ? "skipped" : state === "valid" ? "valid" : state === "not_installed" ? "notInstalled" : state === "console_only" && !(dialog || machine) ? "consoleOnly" : "needed"), card);
148
158
  const login = view.login?.backend === backend ? view.login : null;
149
159
  const active = login && login.phase !== "done" && !(login.phase === "failed" && login.reason);
150
160
  if (active) {
@@ -164,13 +174,16 @@ export function mountStructuredSignIns(root, { endpoint, fetcher = fetch, change
164
174
  const label = el("label", tr("field_" + login.phase), card);
165
175
  const input = el("input", null, label); input.type = login.phase === "code" ? "password" : "text"; input.autocomplete = "off"; input.spellcheck = false;
166
176
  input.setAttribute("aria-label", label.textContent); input.disabled = busy;
177
+ if (login.phase === "code" && codeHint(backend)) el("small", tr("codeOnly"), card); // the CLI's own prompt also accepts the page's address; ours takes the code only (the driver and the Runtime both check)
167
178
  button(card, tr("submit", phaseName(login.phase)), () => { const value = input.value; input.value = ""; void perform({ operation: "input", id: login.id, revision: login.revision, action: { kind: login.phase, value } }); });
168
179
  }
169
180
  if (["method", "code", "start_url", "region"].includes(login.phase) && !login.canAct) el("p", tr("answerSent"), card);
170
181
  button(card, tr("cancel"), () => perform({ operation: "cancel" }));
171
182
  } else {
172
183
  if (login?.reason && login.reason !== "cancelled") el("p", errorText(login.reason), card);
173
- const usable = !["antigravity"].includes(backend) && state !== "not_installed";
184
+ // A CLI the first-run list only names the console command for (`view.console`, from the registry's `host.firstRunSignIn`) has no button there; in Settings → Accounts (a dialog, or a
185
+ // computer's own sign-in) the caller has already chosen a CLI the registry says can be signed in, so it does.
186
+ const usable = (dialog || machine || !consoleOnly(backend)) && state !== "not_installed";
174
187
  // Ridge #3321 S01: the question names THIS card's CLI, and says what a sign-in again does to it — only Kiro signs out
175
188
  // first (logoutArgv); Claude Code and Codex sign in again over the account they have. The dashboard passes its own
176
189
  // in-app confirmation (`ask`); the setup page, which loads nothing else, keeps the browser's.
@@ -0,0 +1,76 @@
1
+ // AGEND-113: an account's usage block on Settings → Accounts: EVERY pool and EVERY window the account reports, as the server sends them (accounts-view.ts `accountUsage`), never one picked from
2
+ // several. A provider with one set of limits (Claude, Codex) draws its windows side by side, as it always did; a provider with pools (Antigravity: Gemini, Claude & others, Gemini 4 Argon) draws a
3
+ // block per pool, named, with that pool's windows in it. The meter is the Usage panel's own (`CompactMeter`); the order is the full card's. A module of its own, its stylesheet linked from here:
4
+ // a tab that loaded an older accounts-view.js keeps working, and nothing of the Accounts view's own strings or meter markup is touched.
5
+ import { html } from "/assets/app-html.js";
6
+ import { t } from "/assets/app-i18n.js";
7
+ import "/assets/view-strings.js"; // the usage panel's own words (`view.usage.metric.*`)
8
+ import { CompactMeter, usageClock, usageText } from "/assets/usage-meter.js";
9
+
10
+ /**
11
+ * The pool's name in the page's language from the usage panel's own reference (`labelI18n`), else the label the server sent. Text only; a reference that does not name a
12
+ * `usage.metric.*` word is not looked up.
13
+ */
14
+ export function poolName(pool) {
15
+ if (!pool || typeof pool.label !== "string") return "";
16
+ const ref = pool.labelI18n;
17
+ if (ref && typeof ref.key === "string" && /^usage\.metric\.[a-z_]+$/.test(ref.key)) {
18
+ const key = `view.${ref.key}`, word = t(key);
19
+ if (word && word !== key) return (Array.isArray(ref.args) ? ref.args : []).reduce((text, value, i) => text.split(`{${i}}`).join(String(value)), word);
20
+ }
21
+ return pool.label;
22
+ }
23
+
24
+ /** This module's stylesheet, linked once (an older accounts.css has no rules for it). */
25
+ function linkPoolCss(doc = typeof document !== "undefined" ? document : null) {
26
+ try {
27
+ if (!doc || !doc.head || doc.querySelector('link[data-accounts-usage-pool-css="1"]')) return;
28
+ const link = doc.createElement("link");
29
+ link.setAttribute("rel", "stylesheet"); link.setAttribute("href", "/assets/accounts-usage-pool.css"); link.setAttribute("data-accounts-usage-pool-css", "1");
30
+ doc.head.appendChild(link);
31
+ } catch { /* the block still reads without it */ }
32
+ }
33
+
34
+ /**
35
+ * One window: the Usage panel's meter with its tag ("5h", "7d"). A window that has reset since the numbers were read has no number to trust, so it says so, in the full card's own words,
36
+ * instead of the old percent.
37
+ */
38
+ function UsageWindow({ w, tag }) {
39
+ if (w.resetPassed) {
40
+ const note = usageText("", { key: "usage.metric.reset_since", args: [usageClock(w.resetsAt)] });
41
+ return html`<span class="u-cm s-usage-reset" title=${note}><span class="u-cm-tag">${tag}</span><span class="s-usage-reset-note">${note}</span></span>`;
42
+ }
43
+ return html`<${CompactMeter} m=${{ used: Number(w.percent) || 0, windowMs: w.windowMs, resetsAt: w.resetsAt, label: tag }} tag=${tag} />`;
44
+ }
45
+
46
+ /**
47
+ * AGEND-119: what a row of last-known numbers says about why they are: the usage panel's own words for the cause ("expired · cached at 14:05") and, for anything but a transient failure, what the read
48
+ * said ("Access token expired …"). `info` is the server's `usageStaleInfo` (`{ cause, cachedAt, hint?, hintI18n? }`); a row from an older server has none, and then there is only the page's own mark.
49
+ */
50
+ export function staleParts(info) {
51
+ if (!info || !["expired", "transient", "error"].includes(info.cause) || !info.cachedAt) return { cause: "", detail: "" };
52
+ const cause = usageText("", { key: `usage.stale.${info.cause}`, args: [usageClock(info.cachedAt)] });
53
+ const detail = info.cause !== "transient" && (info.hint || info.hintI18n) ? usageText(info.hint || "", info.hintI18n) : "";
54
+ return { cause, detail };
55
+ }
56
+
57
+ /**
58
+ * The usage block. `groups`: the server's `usageGroups` (each `{ pool?, windows: [{ kind, percent, windowMs?, resetsAt?, resetPassed? }] }`); `tagOf(window)`: the window's short name in the
59
+ * page's language (the Accounts view's own words); `stale`/`staleText`: the numbers are the last known ones, `staleInfo` (AGEND-119): why, and when they were read.
60
+ */
61
+ export function UsageBlock({ groups, stale, tagOf, label, staleText, staleInfo }) {
62
+ const pooled = groups.length > 1 || groups.some((g) => g.pool);
63
+ if (pooled) linkPoolCss();
64
+ const cls = `s-account-usage${stale ? " is-stale" : ""}${pooled ? " is-pooled" : ""}`;
65
+ return html`<div class=${cls} role="group" aria-label=${label}>
66
+ ${pooled ? groups.map((g, i) => {
67
+ const name = poolName(g.pool);
68
+ return html`<div key=${i} class="s-usage-group" role="group" aria-label=${name || label}>
69
+ ${name ? html`<small class="s-usage-pool">${name}</small>` : null}
70
+ ${g.windows.map((w, j) => html`<${UsageWindow} key=${j} w=${w} tag=${tagOf(w)} />`)}
71
+ </div>`;
72
+ }) : groups[0].windows.map((w, j) => html`<${UsageWindow} key=${j} w=${w} tag=${tagOf(w)} />`)}
73
+ ${stale ? (() => { const why = staleParts(staleInfo);
74
+ return html`<small class="s-usage-stale" title=${why.detail || undefined}>${staleText}${why.cause ? html` <span class="s-usage-stale-cause">${why.cause}</span>` : null}${why.detail ? html`<span class="s-usage-stale-detail">${why.detail}</span>` : null}</small>`; })() : null}
75
+ </div>`;
76
+ }
@@ -0,0 +1,144 @@
1
+ /** Agent-only projections. Never change the shared web/slash snapshots or their caches. */
2
+ import type { UsagePayload } from "./usage-api.js";
3
+ import type { UsageReport } from "../usage-report.js";
4
+ export declare function agentUsage(payload: UsagePayload, detail?: boolean, now?: number): UsagePayload | {
5
+ fetchedAt: string;
6
+ refreshing?: boolean | undefined;
7
+ providers: {
8
+ name: string;
9
+ profile?: string | undefined;
10
+ plan?: string | undefined;
11
+ unlimited?: boolean | undefined;
12
+ windows: string[];
13
+ binding?: string[] | undefined;
14
+ status?: string | undefined;
15
+ }[];
16
+ note?: string | undefined;
17
+ };
18
+ /** The report has already been scoped to the caller before it reaches this projection. */
19
+ export declare function agentUsageReport(r: UsageReport, top?: number, detail?: boolean): {
20
+ basis: string;
21
+ range: {
22
+ kind: import("../usage-report.js").UsageRange["kind"];
23
+ from: string;
24
+ to: string;
25
+ };
26
+ zone: string;
27
+ granularity: "hour";
28
+ group: "backend" | "instance" | "model" | "profile" | "team";
29
+ rows: ({
30
+ input: number;
31
+ output: number;
32
+ reasoning: number;
33
+ cacheRead: number;
34
+ cacheWrite5m: number;
35
+ cacheWrite1h: number;
36
+ cacheWrite: number;
37
+ requests: number;
38
+ key: string;
39
+ reasoningReported: boolean;
40
+ estimated: boolean;
41
+ amountEstimated: number | null;
42
+ total: number;
43
+ messages: number | null;
44
+ amount: number | null;
45
+ priced: "all" | "partial" | "none";
46
+ flags: string[];
47
+ unpriced: string[];
48
+ instances: string[];
49
+ backends: string[];
50
+ models: string[];
51
+ profiles: string[];
52
+ speed: import("../usage-report.js").UsageSpeed | null;
53
+ basis: string;
54
+ } | {
55
+ input: number;
56
+ output: number;
57
+ reasoning: number;
58
+ cacheRead: number;
59
+ cacheWrite5m: number;
60
+ cacheWrite1h: number;
61
+ cacheWrite: number;
62
+ requests: number;
63
+ key: string;
64
+ reasoningReported: boolean;
65
+ estimated: boolean;
66
+ amountEstimated: number | null;
67
+ total: number;
68
+ messages: number | null;
69
+ amount: number | null;
70
+ priced: "all" | "partial" | "none";
71
+ flags: string[];
72
+ unpriced: string[];
73
+ instances: string[];
74
+ backends: string[];
75
+ models: string[];
76
+ profiles: string[];
77
+ })[];
78
+ more: number;
79
+ totals: {
80
+ input: number;
81
+ output: number;
82
+ reasoning: number;
83
+ cacheRead: number;
84
+ cacheWrite5m: number;
85
+ cacheWrite1h: number;
86
+ cacheWrite: number;
87
+ requests: number;
88
+ key: string;
89
+ reasoningReported: boolean;
90
+ estimated: boolean;
91
+ amountEstimated: number | null;
92
+ total: number;
93
+ messages: number | null;
94
+ amount: number | null;
95
+ priced: "all" | "partial" | "none";
96
+ flags: string[];
97
+ unpriced: string[];
98
+ instances: string[];
99
+ backends: string[];
100
+ models: string[];
101
+ profiles: string[];
102
+ speed: import("../usage-report.js").UsageSpeed | null;
103
+ basis: string;
104
+ } | {
105
+ input: number;
106
+ output: number;
107
+ reasoning: number;
108
+ cacheRead: number;
109
+ cacheWrite5m: number;
110
+ cacheWrite1h: number;
111
+ cacheWrite: number;
112
+ requests: number;
113
+ key: string;
114
+ reasoningReported: boolean;
115
+ estimated: boolean;
116
+ amountEstimated: number | null;
117
+ total: number;
118
+ messages: number | null;
119
+ amount: number | null;
120
+ priced: "all" | "partial" | "none";
121
+ flags: string[];
122
+ unpriced: string[];
123
+ instances: string[];
124
+ backends: string[];
125
+ models: string[];
126
+ profiles: string[];
127
+ };
128
+ notMeasured: {
129
+ name: string;
130
+ backend: string;
131
+ reason: "credit_billed" | "unsupported" | "no_data";
132
+ }[];
133
+ shared: {
134
+ name: string;
135
+ backend: string;
136
+ with: string[];
137
+ }[];
138
+ scanning: {
139
+ active: boolean;
140
+ caughtUp: boolean;
141
+ pendingBytes: number;
142
+ pendingFiles: number;
143
+ };
144
+ };
@@ -0,0 +1,75 @@
1
+ const number = (n) => Number.isFinite(n) ? String(Math.round(n * 10) / 10) : "unknown";
2
+ const label = (m) => m.pool ? `${m.pool.label} / ${m.label}` : m.label;
3
+ function time(iso, now, kind) {
4
+ if (!iso)
5
+ return "";
6
+ const ms = Date.parse(iso) - now;
7
+ if (!Number.isFinite(ms))
8
+ return ` (${kind} unknown)`;
9
+ if (ms <= 0)
10
+ return ` (${kind === "reset" ? "reset due" : "expired"})`;
11
+ const minutes = Math.ceil(ms / 60_000);
12
+ const days = Math.floor(minutes / 1440), hours = Math.floor(minutes % 1440 / 60), mins = minutes % 60;
13
+ const duration = days ? `${days}d${hours ? `${hours}h` : ""}` : hours ? `${hours}h${mins ? `${mins}m` : ""}` : `${mins}m`;
14
+ return ` (${kind} ${duration})`;
15
+ }
16
+ function metric(m, now) {
17
+ let value;
18
+ if (m.resetPassed)
19
+ value = "unknown (previous window reset)";
20
+ else if (m.type === "percent")
21
+ value = m.used === undefined ? "unknown" : `${number(m.used)}%`;
22
+ else if (m.type === "dollars")
23
+ value = m.used === undefined ? "unknown" : `$${m.used.toFixed(2)}${m.limit === undefined ? "" : `/$${m.limit.toFixed(2)}`}`;
24
+ else
25
+ value = `${m.value ?? "unknown"}${m.unit ? ` ${m.unit}` : ""}`;
26
+ // An expiring allowance (bonus credits) is not a refilling quota.
27
+ const reset = time(m.resetsAt, now, m.resetKind === "expiry" ? "expires" : "reset");
28
+ const expiry = time(m.expiresAt, now, "expires");
29
+ return `${label(m)} ${value}${reset}${expiry}${m.note && !/^binding\b/.test(m.note) ? ` · ${m.note}` : ""}`;
30
+ }
31
+ function account(p, now) {
32
+ const binding = p.metrics.filter(m => /^binding\b/.test(m.note ?? "")).map(label);
33
+ const status = [
34
+ p.status !== "ok" ? p.status : "",
35
+ p.stale ? `stale${p.staleCause ? ` (${p.staleCause})` : ""}` : p.transient ? "temporarily unavailable" : "",
36
+ p.cachedAt ? `cached ${p.cachedAt}` : "",
37
+ ...new Set([p.error, p.hint].filter(Boolean)),
38
+ ].filter(Boolean).join("; ");
39
+ return {
40
+ name: p.name,
41
+ ...(p.profile ? { profile: p.profile } : {}),
42
+ ...(p.plan ? { plan: p.plan } : {}),
43
+ ...(p.unlimited ? { unlimited: true } : {}),
44
+ windows: p.metrics.map(m => metric(m, now)),
45
+ // Only vendor-reported binding evidence; highest percentage alone is not proof.
46
+ ...(binding.length ? { binding } : {}),
47
+ ...(status ? { status } : {}),
48
+ };
49
+ }
50
+ export function agentUsage(payload, detail = false, now = Date.now()) {
51
+ if (detail)
52
+ return payload;
53
+ const hasCapacity = payload.providers.some(p => p.metrics.some(m => !!m.capacity));
54
+ return {
55
+ fetchedAt: payload.fetchedAt,
56
+ ...(payload.refreshing ? { refreshing: true } : {}),
57
+ providers: payload.providers.map(p => account(p, now)),
58
+ ...(hasCapacity ? { note: "Counts only this fleet's agents; use of the same account elsewhere makes capacity estimates low. detail:true includes capacity." } : {}),
59
+ };
60
+ }
61
+ /** The report has already been scoped to the caller before it reaches this projection. */
62
+ export function agentUsageReport(r, top = 10, detail = false) {
63
+ const row = (value) => {
64
+ if (detail)
65
+ return { ...value, basis: r.basis };
66
+ const { speed: _speed, ...compact } = value;
67
+ return compact;
68
+ };
69
+ return {
70
+ basis: r.basis, range: r.range, zone: r.zone, granularity: r.granularity, group: r.group,
71
+ rows: r.rows.slice(0, top).map(row), more: Math.max(0, r.rows.length - top),
72
+ totals: row(r.totals), notMeasured: r.notMeasured, shared: r.shared, scanning: r.scanning,
73
+ };
74
+ }
75
+ //# sourceMappingURL=agent-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-output.js","sourceRoot":"","sources":["../../src/usage/agent-output.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACvG,MAAM,KAAK,GAAG,CAAC,CAAc,EAAU,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAE5F,SAAS,IAAI,CAAC,GAA8B,EAAE,GAAW,EAAE,IAAyB;IAClF,IAAI,CAAC,GAAG;QAAE,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,CAAC,KAAK,EAAE,CAAC;QAChD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,CAAC;QAC5C,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IACF,OAAO;QACL,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK;QACxF,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QAC3E,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ;KAC1F,CAAC;AACJ,CAAC"}
@@ -14,6 +14,12 @@
14
14
  * usage provider, and a restart just means the alert reappears the next time an
15
15
  * instance hits the cap.
16
16
  */
17
+ /**
18
+ * AGEND-250 (#3771 review P2-6): the key an Antigravity individual-cap alert is kept under, per account: `antigravity` for the default sign-in, `antigravity:<profile>` for a named account (the
19
+ * profile an agent was LAUNCHED with, its binding, not whatever the configuration says now). The cap belongs to the Google account the agent's own login is, so a cap seen by one account's agent
20
+ * is never shown on another's row.
21
+ */
22
+ export declare function antigravityCapKey(profile: string | null | undefined): string;
17
23
  /**
18
24
  * `Resets in 139h12m12s` → milliseconds. Null when the text carries no such
19
25
  * phrase — the caller falls back to a default TTL rather than guessing.
@@ -15,6 +15,12 @@
15
15
  * instance hits the cap.
16
16
  */
17
17
  const alerts = new Map();
18
+ /**
19
+ * AGEND-250 (#3771 review P2-6): the key an Antigravity individual-cap alert is kept under, per account: `antigravity` for the default sign-in, `antigravity:<profile>` for a named account (the
20
+ * profile an agent was LAUNCHED with, its binding, not whatever the configuration says now). The cap belongs to the Google account the agent's own login is, so a cap seen by one account's agent
21
+ * is never shown on another's row.
22
+ */
23
+ export function antigravityCapKey(profile) { return profile ? `antigravity:${profile.toLowerCase()}` : "antigravity"; }
18
24
  /**
19
25
  * `Resets in 139h12m12s` → milliseconds. Null when the text carries no such
20
26
  * phrase — the caller falls back to a default TTL rather than guessing.