@skillcdn/console 0.6.0 → 0.6.2

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 (415) hide show
  1. package/README.md +7 -7
  2. package/dist/agent-page.d.ts.map +1 -1
  3. package/dist/agent-page.js +58 -35
  4. package/dist/agent-page.js.map +1 -1
  5. package/dist/agent-usage.d.ts +51 -0
  6. package/dist/agent-usage.d.ts.map +1 -0
  7. package/dist/agent-usage.js +77 -0
  8. package/dist/agent-usage.js.map +1 -0
  9. package/dist/api.d.ts +4 -2
  10. package/dist/api.d.ts.map +1 -1
  11. package/dist/api.js +4 -2
  12. package/dist/api.js.map +1 -1
  13. package/dist/cli/cli.d.ts +9 -2
  14. package/dist/cli/cli.d.ts.map +1 -1
  15. package/dist/cli/cli.js +491 -125
  16. package/dist/cli/cli.js.map +1 -1
  17. package/dist/cli/format.d.ts +46 -4
  18. package/dist/cli/format.d.ts.map +1 -1
  19. package/dist/cli/format.js +163 -45
  20. package/dist/cli/format.js.map +1 -1
  21. package/dist/cli/help.d.ts.map +1 -1
  22. package/dist/cli/help.js +62 -13
  23. package/dist/cli/help.js.map +1 -1
  24. package/dist/cli/machine-check.d.ts +24 -5
  25. package/dist/cli/machine-check.d.ts.map +1 -1
  26. package/dist/cli/machine-check.js +128 -16
  27. package/dist/cli/machine-check.js.map +1 -1
  28. package/dist/cli/pack.d.ts +11 -8
  29. package/dist/cli/pack.d.ts.map +1 -1
  30. package/dist/cli/pack.js +63 -28
  31. package/dist/cli/pack.js.map +1 -1
  32. package/dist/cli/runner-host.d.ts +2 -0
  33. package/dist/cli/runner-host.d.ts.map +1 -1
  34. package/dist/cli/runner-host.js +1 -0
  35. package/dist/cli/runner-host.js.map +1 -1
  36. package/dist/cli/secret-notes.d.ts.map +1 -1
  37. package/dist/cli/secret-notes.js +9 -1
  38. package/dist/cli/secret-notes.js.map +1 -1
  39. package/dist/cli/terminal.d.ts +10 -2
  40. package/dist/cli/terminal.d.ts.map +1 -1
  41. package/dist/cli/terminal.js +16 -4
  42. package/dist/cli/terminal.js.map +1 -1
  43. package/dist/client.d.ts +30 -7
  44. package/dist/client.d.ts.map +1 -1
  45. package/dist/client.js +13 -1
  46. package/dist/client.js.map +1 -1
  47. package/dist/components/agent-page.d.ts +76 -18
  48. package/dist/components/agent-page.d.ts.map +1 -1
  49. package/dist/components/agent-page.js +183 -53
  50. package/dist/components/agent-page.js.map +1 -1
  51. package/dist/components/agents.d.ts +2 -0
  52. package/dist/components/agents.d.ts.map +1 -1
  53. package/dist/components/agents.js +6 -5
  54. package/dist/components/agents.js.map +1 -1
  55. package/dist/components/calendar.d.ts +24 -4
  56. package/dist/components/calendar.d.ts.map +1 -1
  57. package/dist/components/calendar.js +79 -36
  58. package/dist/components/calendar.js.map +1 -1
  59. package/dist/components/categories.js +2 -2
  60. package/dist/components/categories.js.map +1 -1
  61. package/dist/components/comments.js +2 -2
  62. package/dist/components/comments.js.map +1 -1
  63. package/dist/components/decision-list.d.ts.map +1 -1
  64. package/dist/components/decision-list.js +5 -5
  65. package/dist/components/decision-list.js.map +1 -1
  66. package/dist/components/documents.d.ts.map +1 -1
  67. package/dist/components/documents.js +4 -4
  68. package/dist/components/documents.js.map +1 -1
  69. package/dist/components/event-feed.d.ts +2 -3
  70. package/dist/components/event-feed.d.ts.map +1 -1
  71. package/dist/components/event-feed.js +4 -184
  72. package/dist/components/event-feed.js.map +1 -1
  73. package/dist/components/goals.d.ts.map +1 -1
  74. package/dist/components/goals.js +3 -3
  75. package/dist/components/goals.js.map +1 -1
  76. package/dist/components/home.js +9 -9
  77. package/dist/components/home.js.map +1 -1
  78. package/dist/components/icon.d.ts.map +1 -1
  79. package/dist/components/icon.js +11 -2
  80. package/dist/components/icon.js.map +1 -1
  81. package/dist/components/notifications.d.ts +65 -0
  82. package/dist/components/notifications.d.ts.map +1 -0
  83. package/dist/components/notifications.js +162 -0
  84. package/dist/components/notifications.js.map +1 -0
  85. package/dist/components/pack-connect.js +1 -1
  86. package/dist/components/pack-connect.js.map +1 -1
  87. package/dist/components/pack-token.js +1 -1
  88. package/dist/components/pack-token.js.map +1 -1
  89. package/dist/components/people.js +2 -2
  90. package/dist/components/people.js.map +1 -1
  91. package/dist/components/pictures.js +1 -1
  92. package/dist/components/pictures.js.map +1 -1
  93. package/dist/components/plugin-settings.d.ts +22 -1
  94. package/dist/components/plugin-settings.d.ts.map +1 -1
  95. package/dist/components/plugin-settings.js +63 -11
  96. package/dist/components/plugin-settings.js.map +1 -1
  97. package/dist/components/projects.js +1 -1
  98. package/dist/components/projects.js.map +1 -1
  99. package/dist/components/roadmap.js +2 -2
  100. package/dist/components/roadmap.js.map +1 -1
  101. package/dist/components/rules.js +2 -2
  102. package/dist/components/rules.js.map +1 -1
  103. package/dist/components/runs.d.ts.map +1 -1
  104. package/dist/components/runs.js +1 -1
  105. package/dist/components/runs.js.map +1 -1
  106. package/dist/components/sessions.js +1 -1
  107. package/dist/components/sessions.js.map +1 -1
  108. package/dist/components/shell.d.ts +2 -0
  109. package/dist/components/shell.d.ts.map +1 -1
  110. package/dist/components/shell.js +1 -1
  111. package/dist/components/shell.js.map +1 -1
  112. package/dist/components/sign-in.js +2 -2
  113. package/dist/components/sign-in.js.map +1 -1
  114. package/dist/components/skills.d.ts.map +1 -1
  115. package/dist/components/skills.js +1 -1
  116. package/dist/components/skills.js.map +1 -1
  117. package/dist/components/task-view.d.ts +6 -0
  118. package/dist/components/task-view.d.ts.map +1 -1
  119. package/dist/components/task-view.js +3 -2
  120. package/dist/components/task-view.js.map +1 -1
  121. package/dist/components/tokens.js +1 -1
  122. package/dist/components/tokens.js.map +1 -1
  123. package/dist/components/ui.d.ts +21 -2
  124. package/dist/components/ui.d.ts.map +1 -1
  125. package/dist/components/ui.js +24 -3
  126. package/dist/components/ui.js.map +1 -1
  127. package/dist/components/work.js +1 -1
  128. package/dist/components/work.js.map +1 -1
  129. package/dist/console.css +506 -289
  130. package/dist/console.d.ts.map +1 -1
  131. package/dist/console.js +193 -16
  132. package/dist/console.js.map +1 -1
  133. package/dist/data.d.ts +17 -1
  134. package/dist/data.d.ts.map +1 -1
  135. package/dist/data.js +31 -0
  136. package/dist/data.js.map +1 -1
  137. package/dist/desk-page.js +5 -5
  138. package/dist/desk-page.js.map +1 -1
  139. package/dist/feed-words.d.ts +5 -0
  140. package/dist/feed-words.d.ts.map +1 -0
  141. package/dist/feed-words.js +193 -0
  142. package/dist/feed-words.js.map +1 -0
  143. package/dist/i18n/en.d.ts +93 -1
  144. package/dist/i18n/en.d.ts.map +1 -1
  145. package/dist/i18n/en.js +103 -15
  146. package/dist/i18n/en.js.map +1 -1
  147. package/dist/i18n/ko.d.ts.map +1 -1
  148. package/dist/i18n/ko.js +105 -22
  149. package/dist/i18n/ko.js.map +1 -1
  150. package/dist/icons/glyphs.d.ts +370 -104
  151. package/dist/icons/glyphs.d.ts.map +1 -1
  152. package/dist/icons/glyphs.js +72 -66
  153. package/dist/icons/glyphs.js.map +1 -1
  154. package/dist/icons/index.d.ts.map +1 -1
  155. package/dist/icons/index.js +9 -1
  156. package/dist/icons/index.js.map +1 -1
  157. package/dist/index.d.ts +3 -2
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +3 -2
  160. package/dist/index.js.map +1 -1
  161. package/dist/limits.d.ts +7 -0
  162. package/dist/limits.d.ts.map +1 -1
  163. package/dist/limits.js +7 -0
  164. package/dist/limits.js.map +1 -1
  165. package/dist/notifications.d.ts +124 -0
  166. package/dist/notifications.d.ts.map +1 -0
  167. package/dist/notifications.js +147 -0
  168. package/dist/notifications.js.map +1 -0
  169. package/dist/onboarding.d.ts.map +1 -1
  170. package/dist/onboarding.js +7 -12
  171. package/dist/onboarding.js.map +1 -1
  172. package/dist/plugin/capabilities.d.ts +1 -1
  173. package/dist/plugin/capabilities.d.ts.map +1 -1
  174. package/dist/plugin/capabilities.js +10 -0
  175. package/dist/plugin/capabilities.js.map +1 -1
  176. package/dist/plugin/context.d.ts +85 -1
  177. package/dist/plugin/context.d.ts.map +1 -1
  178. package/dist/plugin/limits.d.ts +7 -0
  179. package/dist/plugin/limits.d.ts.map +1 -1
  180. package/dist/plugin/limits.js +7 -0
  181. package/dist/plugin/limits.js.map +1 -1
  182. package/dist/plugin/manifest.d.ts +8 -0
  183. package/dist/plugin/manifest.d.ts.map +1 -1
  184. package/dist/plugin/manifest.js +13 -0
  185. package/dist/plugin/manifest.js.map +1 -1
  186. package/dist/plugin/rest-schemas.d.ts +22 -0
  187. package/dist/plugin/rest-schemas.d.ts.map +1 -1
  188. package/dist/plugin/rest-schemas.js +19 -3
  189. package/dist/plugin/rest-schemas.js.map +1 -1
  190. package/dist/plugin/testing.d.ts +2 -0
  191. package/dist/plugin/testing.d.ts.map +1 -1
  192. package/dist/plugin/testing.js +2 -0
  193. package/dist/plugin/testing.js.map +1 -1
  194. package/dist/plugin.d.ts +1 -1
  195. package/dist/plugin.d.ts.map +1 -1
  196. package/dist/plugin.js +1 -1
  197. package/dist/plugin.js.map +1 -1
  198. package/dist/router.d.ts +6 -0
  199. package/dist/router.d.ts.map +1 -1
  200. package/dist/router.js +5 -0
  201. package/dist/router.js.map +1 -1
  202. package/dist/routes.d.ts +2 -0
  203. package/dist/routes.d.ts.map +1 -1
  204. package/dist/routes.js +2 -0
  205. package/dist/routes.js.map +1 -1
  206. package/dist/rules.js +1 -1
  207. package/dist/rules.js.map +1 -1
  208. package/dist/runner/acp.d.ts.map +1 -1
  209. package/dist/runner/acp.js +12 -97
  210. package/dist/runner/acp.js.map +1 -1
  211. package/dist/runner/browser.d.ts +50 -0
  212. package/dist/runner/browser.d.ts.map +1 -0
  213. package/dist/runner/browser.js +104 -0
  214. package/dist/runner/browser.js.map +1 -0
  215. package/dist/runner/claude.d.ts +1 -2
  216. package/dist/runner/claude.d.ts.map +1 -1
  217. package/dist/runner/claude.js +352 -13
  218. package/dist/runner/claude.js.map +1 -1
  219. package/dist/runner/codex.d.ts +9 -10
  220. package/dist/runner/codex.d.ts.map +1 -1
  221. package/dist/runner/codex.js +809 -346
  222. package/dist/runner/codex.js.map +1 -1
  223. package/dist/runner/config.d.ts +14 -3
  224. package/dist/runner/config.d.ts.map +1 -1
  225. package/dist/runner/config.js +27 -7
  226. package/dist/runner/config.js.map +1 -1
  227. package/dist/runner/desk.d.ts +3 -1
  228. package/dist/runner/desk.d.ts.map +1 -1
  229. package/dist/runner/desk.js +17 -5
  230. package/dist/runner/desk.js.map +1 -1
  231. package/dist/runner/message.d.ts +53 -3
  232. package/dist/runner/message.d.ts.map +1 -1
  233. package/dist/runner/message.js +201 -20
  234. package/dist/runner/message.js.map +1 -1
  235. package/dist/runner/registry.d.ts +6 -0
  236. package/dist/runner/registry.d.ts.map +1 -1
  237. package/dist/runner/registry.js.map +1 -1
  238. package/dist/runner/rpc.d.ts +31 -0
  239. package/dist/runner/rpc.d.ts.map +1 -0
  240. package/dist/runner/rpc.js +102 -0
  241. package/dist/runner/rpc.js.map +1 -0
  242. package/dist/runner/runner.d.ts +41 -1
  243. package/dist/runner/runner.d.ts.map +1 -1
  244. package/dist/runner/runner.js +695 -52
  245. package/dist/runner/runner.js.map +1 -1
  246. package/dist/runner/slack.d.ts +17 -8
  247. package/dist/runner/slack.d.ts.map +1 -1
  248. package/dist/runner/slack.js +1250 -78
  249. package/dist/runner/slack.js.map +1 -1
  250. package/dist/runner/types.d.ts +160 -8
  251. package/dist/runner/types.d.ts.map +1 -1
  252. package/dist/runner/types.js.map +1 -1
  253. package/dist/runner/usage.d.ts +105 -0
  254. package/dist/runner/usage.d.ts.map +1 -0
  255. package/dist/runner/usage.js +218 -0
  256. package/dist/runner/usage.js.map +1 -0
  257. package/dist/runner.d.ts +4 -4
  258. package/dist/runner.d.ts.map +1 -1
  259. package/dist/runner.js +3 -3
  260. package/dist/runner.js.map +1 -1
  261. package/dist/schemas.d.ts +673 -0
  262. package/dist/schemas.d.ts.map +1 -1
  263. package/dist/schemas.js +205 -1
  264. package/dist/schemas.js.map +1 -1
  265. package/dist/services.js +3 -3
  266. package/dist/services.js.map +1 -1
  267. package/dist/setup-guide.d.ts +4 -3
  268. package/dist/setup-guide.d.ts.map +1 -1
  269. package/dist/setup-guide.js +11 -13
  270. package/dist/setup-guide.js.map +1 -1
  271. package/dist/text.d.ts +7 -0
  272. package/dist/text.d.ts.map +1 -1
  273. package/dist/text.js +18 -0
  274. package/dist/text.js.map +1 -1
  275. package/dist/vocabulary.d.ts +4 -2
  276. package/dist/vocabulary.d.ts.map +1 -1
  277. package/dist/vocabulary.js +4 -1
  278. package/dist/vocabulary.js.map +1 -1
  279. package/docs/specs/cli.md +26 -19
  280. package/docs/specs/plugins.md +16 -10
  281. package/docs/specs/rest.md +28 -10
  282. package/docs/specs/runner.md +132 -44
  283. package/package.json +4 -4
  284. package/skills/building-a-console/SKILL.md +2 -2
  285. package/skills/building-a-console/references/configuring.md +1 -1
  286. package/skills/building-a-plugin/SKILL.md +4 -4
  287. package/skills/planning-the-board/SKILL.md +1 -1
  288. package/skills/planning-the-board/references/setting-up.md +2 -2
  289. package/skills/running-an-agent/SKILL.md +15 -64
  290. package/skills/running-an-agent/references/preparing-the-machine.md +17 -0
  291. package/skills/running-an-agent/references/several-tasks.md +37 -0
  292. package/skills/running-an-agent/references/slack-app.md +70 -13
  293. package/skills/running-an-agent/references/the-account-and-the-invitation.md +5 -0
  294. package/skills/running-an-agent/references/what-was-not-seen-run-yet.md +3 -0
  295. package/skills/running-an-agent/references/when-the-agent-could-not-go-on.md +16 -0
  296. package/skills/running-an-agent/references/your-first-task.md +14 -0
  297. package/skills/working-the-board/SKILL.md +9 -12
  298. package/skills/working-the-board/references/a-pack-skills-questions.md +3 -0
  299. package/skills/working-the-board/references/a-plugins-commands.md +3 -0
  300. package/skills/working-the-board/references/a-review.md +3 -0
  301. package/skills/working-the-board/references/an-open-run.md +3 -0
  302. package/skills/working-the-board/references/requirements.md +7 -0
  303. package/skills/working-the-board/references/the-pack.md +2 -2
  304. package/skills/working-the-board/references/what-they-were-told.md +3 -0
  305. package/skills/working-the-board/references/work-given-in-chat.md +5 -0
  306. package/src/agent-page.tsx +76 -47
  307. package/src/agent-usage.ts +113 -0
  308. package/src/api.ts +62 -0
  309. package/src/cli/cli.ts +634 -162
  310. package/src/cli/format.ts +190 -47
  311. package/src/cli/help.ts +77 -12
  312. package/src/cli/machine-check.ts +182 -29
  313. package/src/cli/pack.ts +81 -40
  314. package/src/cli/runner-host.ts +3 -0
  315. package/src/cli/secret-notes.ts +9 -1
  316. package/src/cli/terminal.ts +20 -4
  317. package/src/client.ts +94 -6
  318. package/src/components/agent-page.tsx +280 -63
  319. package/src/components/agents.tsx +23 -3
  320. package/src/components/calendar.tsx +93 -37
  321. package/src/components/categories.tsx +2 -2
  322. package/src/components/comments.tsx +5 -5
  323. package/src/components/decision-list.tsx +13 -10
  324. package/src/components/documents.tsx +13 -8
  325. package/src/components/event-feed.tsx +4 -203
  326. package/src/components/goals.tsx +6 -4
  327. package/src/components/home.tsx +12 -12
  328. package/src/components/icon.tsx +16 -3
  329. package/src/components/notifications.tsx +419 -0
  330. package/src/components/pack-connect.tsx +1 -1
  331. package/src/components/pack-token.tsx +5 -5
  332. package/src/components/people.tsx +3 -3
  333. package/src/components/pictures.tsx +1 -1
  334. package/src/components/plugin-settings.tsx +128 -23
  335. package/src/components/projects.tsx +1 -1
  336. package/src/components/roadmap.tsx +2 -2
  337. package/src/components/rules.tsx +2 -2
  338. package/src/components/runs.tsx +6 -3
  339. package/src/components/sessions.tsx +2 -2
  340. package/src/components/shell.tsx +3 -0
  341. package/src/components/sign-in.tsx +3 -3
  342. package/src/components/skills.tsx +5 -3
  343. package/src/components/task-view.tsx +18 -7
  344. package/src/components/tokens.tsx +2 -2
  345. package/src/components/ui.tsx +70 -5
  346. package/src/components/work.tsx +2 -2
  347. package/src/console.tsx +269 -12
  348. package/src/data.ts +54 -0
  349. package/src/desk-page.tsx +5 -5
  350. package/src/feed-words.ts +214 -0
  351. package/src/i18n/en.ts +114 -15
  352. package/src/i18n/ko.ts +115 -22
  353. package/src/icons/glyphs.ts +74 -68
  354. package/src/icons/index.ts +9 -1
  355. package/src/index.ts +11 -0
  356. package/src/limits.ts +7 -0
  357. package/src/notifications.ts +205 -0
  358. package/src/onboarding.ts +10 -14
  359. package/src/plugin/capabilities.ts +13 -0
  360. package/src/plugin/context.ts +87 -0
  361. package/src/plugin/limits.ts +7 -0
  362. package/src/plugin/manifest.ts +14 -0
  363. package/src/plugin/rest-schemas.ts +27 -3
  364. package/src/plugin/testing.ts +4 -0
  365. package/src/plugin.ts +2 -0
  366. package/src/router.ts +7 -0
  367. package/src/routes.ts +2 -0
  368. package/src/rules.ts +1 -1
  369. package/src/runner/acp.ts +12 -118
  370. package/src/runner/browser.ts +128 -0
  371. package/src/runner/claude.ts +399 -12
  372. package/src/runner/codex.ts +904 -400
  373. package/src/runner/config.ts +30 -7
  374. package/src/runner/desk.ts +22 -6
  375. package/src/runner/message.ts +251 -21
  376. package/src/runner/registry.ts +6 -0
  377. package/src/runner/rpc.ts +140 -0
  378. package/src/runner/runner.ts +863 -53
  379. package/src/runner/slack.ts +1535 -85
  380. package/src/runner/types.ts +150 -5
  381. package/src/runner/usage.ts +299 -0
  382. package/src/runner.ts +16 -1
  383. package/src/schemas.ts +249 -0
  384. package/src/services.ts +3 -3
  385. package/src/setup-guide.ts +12 -14
  386. package/src/styles/README.md +11 -7
  387. package/src/styles/console.css +2 -0
  388. package/src/styles/drawn-by-pages.json +7 -82
  389. package/src/styles/pages/agents.css +46 -35
  390. package/src/styles/pages/calendar.css +0 -1
  391. package/src/styles/pages/connect.css +0 -14
  392. package/src/styles/pages/decisions.css +2 -43
  393. package/src/styles/pages/documents.css +0 -29
  394. package/src/styles/pages/home.css +4 -16
  395. package/src/styles/pages/people.css +2 -17
  396. package/src/styles/pages/plugins.css +9 -12
  397. package/src/styles/pages/roadmap.css +0 -16
  398. package/src/styles/pages/settings.css +0 -28
  399. package/src/styles/pages/sign-in.css +2 -17
  400. package/src/styles/pages/thread.css +4 -50
  401. package/src/styles/pages/work.css +0 -5
  402. package/src/styles/parts/button.css +31 -0
  403. package/src/styles/parts/count.css +10 -0
  404. package/src/styles/parts/divider.css +17 -0
  405. package/src/styles/parts/frame.css +12 -0
  406. package/src/styles/parts/icon.css +39 -0
  407. package/src/styles/parts/menu.css +184 -0
  408. package/src/styles/parts/panel.css +7 -0
  409. package/src/styles/parts/progress.css +63 -0
  410. package/src/styles/parts/settings.css +2 -0
  411. package/src/styles/parts/sheet.css +28 -0
  412. package/src/styles/parts/text.css +34 -0
  413. package/src/text.ts +19 -0
  414. package/src/vocabulary.ts +4 -1
  415. package/template/plugin/package.json +1 -1
@@ -19,16 +19,20 @@ import {
19
19
  type RestAgentRunner,
20
20
  type RestAgentSecret,
21
21
  type RestAgentSession,
22
+ type RestAgentUsageWindow,
22
23
  type RestPerson,
23
24
  type RestSignal,
24
25
  type RestTranscriptEvent,
26
+ usageNear,
27
+ usageSaidTogether,
28
+ usedHundredths,
25
29
  } from "../api.js";
26
30
  import { today } from "../dates.js";
27
31
  import { useWords } from "../i18n/index.js";
28
32
  import { isPicture } from "./files.js";
29
33
  import { Markdown } from "./markdown.js";
30
34
  import { Lightbox, type PictureState, PictureThumb, usePicture } from "./pictures.js";
31
- import { Avatar, Badge, Button, Callout, cx, formatBytes, personName, Time } from "./ui.js";
35
+ import { Avatar, Badge, Button, Callout, cx, formatBytes, Meter, personName, Time } from "./ui.js";
32
36
 
33
37
  // The parts of an agent account's page (ADR-0085, ADR-0086): how it stands, what it is doing as
34
38
  // it happens, read as a conversation in a pane that follows its end, what a supervisor says to
@@ -49,6 +53,76 @@ const STATE_TONES: Readonly<Record<AgentState, "success" | "neutral" | "warning"
49
53
  unheard: "warning",
50
54
  };
51
55
 
56
+ /**
57
+ * What an agent account's product last said of what its subscription allows (ADR-0156): a
58
+ * window a line, by the name its driver gives it, with how much of it is used and when it
59
+ * resets. One near its limit is marked, and one used up. `usage` is the windows that still
60
+ * stand (`usageStanding`); `said` adds when the product said so, where there is room.
61
+ */
62
+ export function AgentUsage(props: {
63
+ readonly usage: readonly RestAgentUsageWindow[];
64
+ readonly said?: boolean | undefined;
65
+ }) {
66
+ const words = useWords().agents.usage;
67
+ // When they were said: once for all where the product said them together, and beside each
68
+ // where it did not, so that a window kept from days ago does not read as said just now.
69
+ const together = usageSaidTogether(props.usage);
70
+ const said = (iso: string) => (
71
+ <>
72
+ {words.said.before}
73
+ <Time iso={iso} precision="clock" />
74
+ {words.said.after}
75
+ </>
76
+ );
77
+ return (
78
+ <div className="sc-agent-usage">
79
+ {props.usage.map((window, place) => {
80
+ // A name is what a runner sent: read as a word of the pack only where the pack itself
81
+ // holds it, and no key by itself, since two windows may be named alike.
82
+ const name = usageWindowName(words, window.name);
83
+ const near = usageNear(window);
84
+ const hundredths = window.used === null ? undefined : usedHundredths(window.used);
85
+ const resets = window.resetsAt !== null && (
86
+ <>
87
+ {words.resets.before}
88
+ <Time iso={window.resetsAt} precision="week" />
89
+ {words.resets.after}
90
+ </>
91
+ );
92
+ const apart = props.said === true && together === undefined && said(window.at);
93
+ return (
94
+ <Meter
95
+ // biome-ignore lint/suspicious/noArrayIndexKey: the windows are told apart by their place
96
+ key={place}
97
+ label={name}
98
+ share={window.used ?? undefined}
99
+ figure={hundredths === undefined ? (near ? words.near : undefined) : `${hundredths}%`}
100
+ tone={
101
+ hundredths !== undefined && hundredths >= 100
102
+ ? "danger"
103
+ : near
104
+ ? "warning"
105
+ : undefined
106
+ }
107
+ note={
108
+ resets === false && apart === false ? undefined : (
109
+ <>
110
+ {resets}
111
+ {resets !== false && apart !== false && " · "}
112
+ {apart}
113
+ </>
114
+ )
115
+ }
116
+ />
117
+ );
118
+ })}
119
+ {props.said === true && together !== undefined && (
120
+ <span className="sc-progress-words">{said(together)}</span>
121
+ )}
122
+ </div>
123
+ );
124
+ }
125
+
52
126
  /** The state of an agent account as a badge: the word, and why and since when where there is room. */
53
127
  export function AgentStateBadge(props: {
54
128
  readonly state: RestAgent["state"];
@@ -65,7 +139,7 @@ export function AgentStateBadge(props: {
65
139
  <Badge tone="neutral" kind="state">
66
140
  {words.unset}
67
141
  </Badge>
68
- <span className="sc-agent-state-why">{words.none}</span>
142
+ <span className="sc-note">{words.none}</span>
69
143
  </span>
70
144
  ) : null;
71
145
  }
@@ -87,11 +161,19 @@ export function AgentStateBadge(props: {
87
161
  return (
88
162
  <span className="sc-agent-state">
89
163
  {badge}
90
- <span className="sc-agent-state-why">
164
+ <span className="sc-note">
91
165
  {reason !== undefined && `${reason} · `}
92
166
  {words.since.before}
93
167
  <Time iso={state.since} precision="clock" />
94
168
  {words.since.after}
169
+ {state.until !== undefined && state.until !== null && (
170
+ <>
171
+ {" · "}
172
+ {words.until.before}
173
+ <Time iso={state.until} precision="clock" />
174
+ {words.until.after}
175
+ </>
176
+ )}
95
177
  {state.heardAt !== null && (
96
178
  <>
97
179
  {" · "}
@@ -170,8 +252,16 @@ export type TalkItem =
170
252
  * their parent, read as a conversation of their own. Nothing for a call that started none.
171
253
  */
172
254
  readonly steps?: readonly TalkItem[] | undefined;
173
- /** When the turn or the session it ran in ended, where that came before its answer. */
255
+ /**
256
+ * When the turn or the session it ran in ended, where that came before its answer; for a
257
+ * sub-agent that goes on in the background, when its session ended before it did.
258
+ */
174
259
  readonly endedAt?: string | undefined;
260
+ /**
261
+ * The event of the sub-agent's that says it ended, and how (`over`, ADR-0161): the last
262
+ * of them, and none where the sub-agent did something after it, as one started again does.
263
+ */
264
+ readonly over?: RestTranscriptEvent | undefined;
175
265
  };
176
266
 
177
267
  /** The most characters of a sub-agent's name that a label shows. */
@@ -209,8 +299,27 @@ const endsTurn = (event: RestTranscriptEvent): boolean =>
209
299
  event.sealed === null &&
210
300
  (event.data.turn === "completed" || typeof event.data.ended === "string");
211
301
 
302
+ /** Whether an event is a sub-agent's word that it ended: a runner writes how under `over` (ADR-0161). */
303
+ const saysOver = (event: RestTranscriptEvent): boolean =>
304
+ event.kind === "status" && typeof event.data.over === "string";
305
+
306
+ /**
307
+ * The kinds of event by which a sub-agent that ended is at work again: what it says, thinks and
308
+ * calls, and its own word that it was started again. A tool's answer is none: a product that
309
+ * stops a sub-agent in the middle of a call says first that it ended, and then what became of
310
+ * the call.
311
+ */
312
+ const AT_WORK: ReadonlySet<string> = new Set(["assistant", "thinking", "tool_call", "status"]);
313
+
212
314
  type ToolItem = Extract<TalkItem, { type: "tool" }>;
213
315
 
316
+ /**
317
+ * Whether a call was answered with the word that its sub-agent goes on in the background
318
+ * (`background` on its answer, ADR-0161): the answer is then not the sub-agent's, which goes on
319
+ * past it, and past the turn it was started in.
320
+ */
321
+ const goesOn = (item: ToolItem): boolean => item.result?.data.background === true;
322
+
214
323
  /** Things in the order they are read: the session's own, or one sub-agent's. */
215
324
  type TalkLineOf = TalkItem[];
216
325
 
@@ -231,7 +340,9 @@ interface TalkPlace {
231
340
  * not a thing of the line the call stands in. A call that says it starts a sub-agent (`starts`)
232
341
  * has such a line from the first, empty; one a runner of before wrote has it from the first
233
342
  * event that names it. An event that names a call the events do not hold stays where it stood.
234
- * A turn or a session that ended ends every sub-agent still open in it.
343
+ * A turn or a session that ended ends every sub-agent still open in it, but for one that goes on
344
+ * in the background (ADR-0161): its own line says when it ended, and nothing but its session's
345
+ * end ends it before.
235
346
  */
236
347
  export function talkOf(events: readonly RestTranscriptEvent[]): TalkItem[] {
237
348
  const top: TalkLineOf = [];
@@ -241,7 +352,7 @@ export function talkOf(events: readonly RestTranscriptEvent[]): TalkItem[] {
241
352
  const calls = new Map<string, TalkPlace>();
242
353
  /** The line of each sub-agent, by the id of the call that started it. */
243
354
  const lines = new Map<string, TalkLineOf>();
244
- /** The calls that started a sub-agent and were not answered, as far as the events read say. */
355
+ /** The calls that started a sub-agent that nothing ended yet, as far as the events read say. */
245
356
  let running: TalkPlace[] = [];
246
357
  const toolAt = (place: TalkPlace | undefined): ToolItem | undefined => {
247
358
  const item = place === undefined ? undefined : place.line[place.at];
@@ -288,6 +399,13 @@ export function talkOf(events: readonly RestTranscriptEvent[]): TalkItem[] {
288
399
  const parent = parentOf(event);
289
400
  const starter = parent === undefined ? undefined : calls.get(parent);
290
401
  const line = parent === undefined || starter === undefined ? top : lineOf(parent, starter);
402
+ // What a sub-agent's own line says of its end stands until the sub-agent does something
403
+ // after it, as one that was started again does: then it is at work again.
404
+ const begun = toolAt(starter);
405
+ if (starter !== undefined && begun !== undefined && event.sealed === null) {
406
+ const over = saysOver(event) ? event : AT_WORK.has(event.kind) ? undefined : begun.over;
407
+ set(starter, { ...begun, over });
408
+ }
291
409
  // A sealed event says who sealed it and why, wherever it stood.
292
410
  if (event.sealed !== null) {
293
411
  line.push({ type: "note", event });
@@ -360,15 +478,26 @@ export function talkOf(events: readonly RestTranscriptEvent[]): TalkItem[] {
360
478
  } else {
361
479
  line.push({ type: "note", event });
362
480
  // Where the session's own line says a turn ended, or the session did, nothing started in
363
- // it goes on: a sub-agent that was not answered by then is ended there.
481
+ // it goes on: a sub-agent that was not answered by then is ended there. One that goes on
482
+ // in the background goes on past a turn's end, and is ended by its session's alone.
364
483
  if (parent === undefined && endsTurn(event)) {
484
+ const session = typeof event.data.ended === "string";
485
+ const still: TalkPlace[] = [];
365
486
  for (const place of running) {
366
487
  const tool = toolAt(place);
367
- if (tool !== undefined && tool.result === undefined && tool.endedAt === undefined) {
488
+ if (tool === undefined) {
489
+ continue;
490
+ }
491
+ if (goesOn(tool) && !session) {
492
+ still.push(place);
493
+ } else if (
494
+ (goesOn(tool) ? tool.over === undefined : tool.result === undefined) &&
495
+ tool.endedAt === undefined
496
+ ) {
368
497
  set(place, { ...tool, endedAt: event.at });
369
498
  }
370
499
  }
371
- running = [];
500
+ running = still;
372
501
  }
373
502
  }
374
503
  }
@@ -445,6 +574,11 @@ function atOf(steps: readonly TalkItem[]): Working {
445
574
  * otherwise, which only an open session's is (`live`); how long it ran, to its answer, to where
446
575
  * it was ended or to the last thing it did, and to `now` while it runs; how many tools it
447
576
  * called; and what it is at. Nothing for a thing that is no call that started a sub-agent.
577
+ *
578
+ * One that goes on in the background (ADR-0161) is not answered for by its call's answer, which
579
+ * says only that it was started: it stands by its own word that it ended, done, failed or
580
+ * stopped, is ended where its session ended first, and is at work otherwise, whatever turn
581
+ * ended meanwhile.
448
582
  */
449
583
  export function subAgentOf(
450
584
  item: TalkItem,
@@ -462,24 +596,34 @@ export function subAgentOf(
462
596
  const named = typeof said === "string" ? said : steps.map(firstOf).find(Boolean)?.data.subagent;
463
597
  const name = typeof named === "string" ? named.trim().slice(0, MAX_SUBAGENT_NAME) : "";
464
598
  const started = Date.parse(first.at);
465
- const answered = item.result === undefined ? Number.NaN : Date.parse(item.result.at);
599
+ // What the sub-agent answered: the call's answer, but for one that says the sub-agent goes on.
600
+ const answer = goesOn(item) ? undefined : item.result;
601
+ const how = item.over?.data.over;
466
602
  const cut = item.endedAt === undefined ? Number.NaN : Date.parse(item.endedAt);
467
603
  const state: SubAgentState =
468
- item.result !== undefined
469
- ? item.result.data.error === true
604
+ answer !== undefined
605
+ ? answer.data.error === true
470
606
  ? "failed"
471
607
  : "done"
472
- : item.endedAt !== undefined || refusedOf(item) || !input.live
473
- ? "ended"
474
- : "running";
608
+ : item.over !== undefined
609
+ ? how === "failed"
610
+ ? "failed"
611
+ : how === "stopped"
612
+ ? "ended"
613
+ : "done"
614
+ : item.endedAt !== undefined || refusedOf(item) || !input.live
615
+ ? "ended"
616
+ : "running";
475
617
  const until =
476
618
  state === "running"
477
619
  ? input.now
478
- : item.result !== undefined
479
- ? answered
480
- : item.endedAt !== undefined
481
- ? cut
482
- : Math.max(started, ...steps.flatMap(momentsOf));
620
+ : answer !== undefined
621
+ ? Date.parse(answer.at)
622
+ : item.over !== undefined
623
+ ? Date.parse(item.over.at)
624
+ : item.endedAt !== undefined
625
+ ? cut
626
+ : Math.max(started, ...steps.flatMap(momentsOf));
483
627
  const seconds = Math.floor((until - started) / 1000);
484
628
  return {
485
629
  n: first.n,
@@ -506,22 +650,33 @@ function subAgentsIn(
506
650
  }
507
651
 
508
652
  /**
509
- * The sub-agents at work in the turn under way, read off a session's events alone, in the order
510
- * they were started: those a call of this turn started that was not answered yet. None where the
511
- * session has no event, or its last turn is over.
653
+ * The sub-agents at work in an open session, read off its events alone, in the order they were
654
+ * started: those a call of the turn under way started that was not answered yet, and those that
655
+ * go on in the background, whatever turn started them, until each says it ended (ADR-0161).
656
+ * None where the session has no event; none but those in the background where its last turn is
657
+ * over.
512
658
  */
513
659
  export function atWorkOf(events: readonly RestTranscriptEvent[], now: number): readonly SubAgent[] {
514
- let from = 0;
515
- for (let at = events.length - 1; at >= 0; at -= 1) {
516
- const event = events[at];
517
- if (event !== undefined && parentOf(event) === undefined && endsTurn(event)) {
518
- from = at + 1;
519
- break;
660
+ return subAgentsIn(talkOf(events), { now, live: true }).filter((one) => one.state === "running");
661
+ }
662
+
663
+ /**
664
+ * Whether the events read hold what a sub-agent did and not the call that started it: the call
665
+ * then stands before them, as it does once a sub-agent has worked for long, and what it did is
666
+ * read under it only once the events before are read too.
667
+ */
668
+ export function lacksStarter(events: readonly RestTranscriptEvent[]): boolean {
669
+ const calls = new Set<string>();
670
+ for (const event of events) {
671
+ const id = event.kind === "tool_call" ? idOf(event) : undefined;
672
+ if (id !== undefined) {
673
+ calls.add(id);
520
674
  }
521
675
  }
522
- return subAgentsIn(talkOf(events.slice(from)), { now, live: true }).filter(
523
- (one) => one.state === "running",
524
- );
676
+ return events.some((event) => {
677
+ const parent = parentOf(event);
678
+ return parent !== undefined && !calls.has(parent);
679
+ });
525
680
  }
526
681
 
527
682
  /**
@@ -590,9 +745,10 @@ export function takenOf(events: readonly RestTranscriptEvent[]): number | undefi
590
745
  }
591
746
 
592
747
  /**
593
- * The words supervisors sent that the agent has not taken: the tells, and the interrupts that
594
- * carry words or files, after the last signal the record says it took, the oldest first. A
595
- * signal is taken in order, so everything up to that one was.
748
+ * The words sent that the agent has not taken: the tells, the interrupts that carry words or
749
+ * files, and the resets that carry words, a supervisor's or the account's own (ADR-0154),
750
+ * which a new conversation begins with, after the last signal the record says it took, the
751
+ * oldest first. A signal is taken in order, so everything up to that one was.
596
752
  */
597
753
  export function waitingOf(signals: readonly RestSignal[], taken: number): readonly RestSignal[] {
598
754
  return signals
@@ -600,13 +756,36 @@ export function waitingOf(signals: readonly RestSignal[], taken: number): readon
600
756
  (signal) =>
601
757
  signal.number > taken &&
602
758
  signal.source === "person" &&
603
- (signal.kind === "tell" || signal.kind === "interrupt") &&
759
+ (signal.kind === "tell" || signal.kind === "interrupt" || signal.kind === "reset") &&
604
760
  (signal.text.trim().length > 0 || signal.attachments.length > 0),
605
761
  )
606
762
  .slice()
607
763
  .sort((a, b) => a.number - b.number);
608
764
  }
609
765
 
766
+ /** Whether a signal is a reset the account itself sent (ADR-0154): who sent it tells it from a supervisor's. */
767
+ export const isOwnReset = (signal: RestSignal, account: string): boolean =>
768
+ signal.kind === "reset" && signal.source === "person" && signal.by?.id === account;
769
+
770
+ /**
771
+ * The account's own reset that waits (ADR-0154), or nothing. It waits for the turn under way
772
+ * to end, whatever its product takes in a turn and whatever was taken after it, so the count
773
+ * of what was taken does not say it: taking it ends the session, so one sent since the open
774
+ * session began waits still, the last of them standing for those before it. `began` is when
775
+ * the open session began; with none open, nothing waits so.
776
+ */
777
+ export function ownResetWaiting(
778
+ signals: readonly RestSignal[],
779
+ account: string,
780
+ began: string | undefined,
781
+ ): RestSignal | undefined {
782
+ const from = began === undefined ? Number.NaN : Date.parse(began);
783
+ return signals
784
+ .filter((signal) => isOwnReset(signal, account) && Date.parse(signal.at) >= from)
785
+ .sort((a, b) => a.number - b.number)
786
+ .at(-1);
787
+ }
788
+
610
789
  /** The texts read whole in a session: the session they were read in, and each by its event's number. */
611
790
  export interface WholeTexts {
612
791
  readonly of: string | undefined;
@@ -711,6 +890,30 @@ export function saidLine(text: string): string {
711
890
  const word = (value: unknown): string | undefined =>
712
891
  typeof value === "string" && value.length > 0 ? value : undefined;
713
892
 
893
+ /**
894
+ * A window of an allowance by the words a person has for it (ADR-0156): the plan's two by the
895
+ * pack's words, and a window of a part of the allowance, which a driver names by the plan's
896
+ * window with what it is of after it (`weekly fable`), as that window's word with the rest
897
+ * beside it, "Week (Fable)". Any other name is what a runner sent, and is shown as it came.
898
+ */
899
+ export function usageWindowName(
900
+ words: {
901
+ readonly windows: Readonly<Record<string, string>>;
902
+ readonly windowOf: (window: string, of: string) => string;
903
+ },
904
+ name: string,
905
+ ): string {
906
+ if (Object.hasOwn(words.windows, name)) {
907
+ return words.windows[name] ?? name;
908
+ }
909
+ const space = name.indexOf(" ");
910
+ const window = space > 0 ? name.slice(0, space) : "";
911
+ const of = space > 0 ? name.slice(space + 1).trim() : "";
912
+ return Object.hasOwn(words.windows, window) && of !== ""
913
+ ? words.windowOf(words.windows[window] ?? window, `${of.charAt(0).toUpperCase()}${of.slice(1)}`)
914
+ : name;
915
+ }
916
+
714
917
  /**
715
918
  * What the record names in a word of its own, a signal's kind, an answer, a fact's name, in the
716
919
  * page's words: the pack's word for it, or the word as it came where the pack has none, as for
@@ -826,7 +1029,8 @@ function sameItem(a: TalkItem, b: TalkItem): boolean {
826
1029
  a.call === b.call &&
827
1030
  a.result === b.result &&
828
1031
  a.permission === b.permission &&
829
- a.endedAt === b.endedAt
1032
+ a.endedAt === b.endedAt &&
1033
+ a.over === b.over
830
1034
  );
831
1035
  }
832
1036
  return a.type === b.type && a.event === b.event;
@@ -1014,7 +1218,7 @@ const TalkLine: NamedExoticComponent<TalkLineProps> = memo(function Line(
1014
1218
  <pre className={className}>{shown}</pre>
1015
1219
  ))}
1016
1220
  {event.whole !== null && read === undefined && (
1017
- <p className="sc-talk-cut">
1221
+ <p className="sc-talk-cut sc-fine">
1018
1222
  {words.cutAt(formatBytes(event.whole))}{" "}
1019
1223
  {readWhole !== undefined && (
1020
1224
  <Button
@@ -1087,7 +1291,7 @@ const TalkLine: NamedExoticComponent<TalkLineProps> = memo(function Line(
1087
1291
  >
1088
1292
  <details className="sc-talk-tool-fold">
1089
1293
  <summary className="sc-talk-tool-head sc-talk-agent-head">
1090
- <span className="sc-talk-who sc-talk-agent-name" title={called}>
1294
+ <span className="sc-name sc-talk-agent-name" title={called}>
1091
1295
  {called}
1092
1296
  </span>
1093
1297
  {sub !== undefined && <Badge>{words.subagent(sub)}</Badge>}
@@ -1181,7 +1385,7 @@ const TalkLine: NamedExoticComponent<TalkLineProps> = memo(function Line(
1181
1385
  const { event } = one;
1182
1386
  if (event.sealed !== null) {
1183
1387
  return (
1184
- <li className="sc-talk-item sc-talk-note" data-n={event.n}>
1388
+ <li className="sc-talk-item sc-talk-note sc-fine" data-n={event.n}>
1185
1389
  <span className="sc-talk-note-line">
1186
1390
  {words.sealed(
1187
1391
  event.sealed.by === null ? "?" : (event.sealed.by.name ?? event.sealed.by.login),
@@ -1212,7 +1416,7 @@ const TalkLine: NamedExoticComponent<TalkLineProps> = memo(function Line(
1212
1416
  others === undefined
1213
1417
  ) {
1214
1418
  return (
1215
- <li className="sc-talk-item sc-talk-note" data-n={event.n}>
1419
+ <li className="sc-talk-item sc-talk-note sc-fine" data-n={event.n}>
1216
1420
  <span className="sc-talk-note-line">
1217
1421
  {words.interrupted(who)}
1218
1422
  {when(event)}
@@ -1252,8 +1456,8 @@ const TalkLine: NamedExoticComponent<TalkLineProps> = memo(function Line(
1252
1456
  <p className="sc-talk-note-line sc-talk-unseen">{words.unseen(unseen)}</p>
1253
1457
  )}
1254
1458
  </div>
1255
- <div className="sc-talk-meta">
1256
- <span className="sc-talk-who">{who}</span>
1459
+ <div className="sc-talk-meta sc-fine">
1460
+ <span className="sc-name">{who}</span>
1257
1461
  {through !== undefined && <span>{words.through(through)}</span>}
1258
1462
  {kind !== undefined && kind !== "tell" && (
1259
1463
  <Badge>{wordOf(words.signalKinds, kind)}</Badge>
@@ -1332,7 +1536,8 @@ const TalkLine: NamedExoticComponent<TalkLineProps> = memo(function Line(
1332
1536
  );
1333
1537
  }
1334
1538
  // A wake, a status, an error, and whatever a newer runner calls otherwise: a note between.
1335
- // What the note's own words say already, how a session ended, is not said twice as a fact.
1539
+ // What the note's own words say already, how a session or a sub-agent ended, is not said
1540
+ // twice as a fact.
1336
1541
  // The id of the call that started a sub-agent is for joining, and says nothing to a reader;
1337
1542
  // whose a note is, is not said again under the sub-agent that made it.
1338
1543
  const facts = Object.entries(event.data).filter(
@@ -1341,13 +1546,19 @@ const TalkLine: NamedExoticComponent<TalkLineProps> = memo(function Line(
1341
1546
  name !== "signal" &&
1342
1547
  name !== "kind" &&
1343
1548
  name !== "ended" &&
1549
+ name !== "over" &&
1344
1550
  name !== "parent" &&
1345
1551
  !(name === "subagent" && props.inside === true),
1346
1552
  );
1347
1553
  const lines = event.text.split("\n").filter((line) => line.trim().length > 0);
1348
1554
  return (
1349
1555
  <li
1350
- className={cx("sc-talk-item", "sc-talk-note", event.kind === "error" && "sc-talk-note-error")}
1556
+ className={cx(
1557
+ "sc-talk-item",
1558
+ "sc-talk-note",
1559
+ "sc-fine",
1560
+ event.kind === "error" && "sc-talk-note-error",
1561
+ )}
1351
1562
  data-n={event.n}
1352
1563
  >
1353
1564
  <span className="sc-talk-note-line">
@@ -1473,9 +1684,10 @@ export interface TalkWaitingProps {
1473
1684
  /** The words that wait, the oldest first: `waitingOf` says which. */
1474
1685
  readonly signals: readonly RestSignal[];
1475
1686
  /**
1476
- * Why they wait, which says when they are read: a turn under way that the product takes a
1477
- * message in (`call`) or takes none in (`turn`), an agent that is stopped, a runner not heard
1478
- * from, or nothing but the moment it takes to hand them over (`soon`).
1687
+ * Why they wait, which says when they are handed over: a turn under way that the product
1688
+ * takes a message in (`call`) or takes none in (`turn`), which is also what the account's
1689
+ * own reset waits for whatever its product takes in a turn; an agent that is stopped, a
1690
+ * runner not heard from, or nothing but the moment it takes to hand them over (`soon`).
1479
1691
  */
1480
1692
  readonly why: "call" | "turn" | "stopped" | "unheard" | "soon";
1481
1693
  /** Where the bytes of a file of a signal are read. */
@@ -1489,9 +1701,10 @@ export interface TalkWaitingProps {
1489
1701
  }
1490
1702
 
1491
1703
  /**
1492
- * What supervisors said and the agent has not taken yet, at the foot of the conversation: each
1493
- * as it will stand there, quieter, with when it is read; and under the last, while a turn is
1494
- * under way, the way to have them read now. Rows of the conversation's list.
1704
+ * What was said and the agent has not taken yet, at the foot of the conversation: each as it
1705
+ * will stand there, quieter, with what it was where it was more than a tell and when it is
1706
+ * read; and under the last, while a turn is under way, the way to have them read now. Rows of
1707
+ * the conversation's list.
1495
1708
  */
1496
1709
  export function TalkWaiting(props: TalkWaitingProps) {
1497
1710
  const words = useWords().agents.page.live;
@@ -1539,14 +1752,15 @@ export function TalkWaiting(props: TalkWaitingProps) {
1539
1752
  </ul>
1540
1753
  )}
1541
1754
  </div>
1542
- <div className="sc-talk-meta">
1543
- <span className="sc-talk-who">
1755
+ <div className="sc-talk-meta sc-fine">
1756
+ <span className="sc-name">
1544
1757
  {signal.by === null ? words.kinds.person : personName(signal.by)}
1545
1758
  </span>
1759
+ {signal.kind !== "tell" && <Badge>{wordOf(words.signalKinds, signal.kind)}</Badge>}
1546
1760
  <Time iso={signal.at} precision="clock" />
1547
1761
  </div>
1548
1762
  {last && (
1549
- <p className="sc-talk-wait" role="status">
1763
+ <p className="sc-talk-wait sc-fine" role="status">
1550
1764
  <span>{waits[props.why]}</span>
1551
1765
  {stops && (
1552
1766
  <Button
@@ -1571,27 +1785,30 @@ export function TalkWaiting(props: TalkWaitingProps) {
1571
1785
  * The sign that the agent is at work while a turn is under way: its picture, three dots, and
1572
1786
  * what it is at, a thought, a tool by its name, or the work between. Where sub-agents run, it
1573
1787
  * says how many, with each under it: its name, what it is at, how many tools it called and how
1574
- * long it has run, which the page counts by itself (ADR-0141). A row of the conversation's list;
1575
- * nothing where no turn is under way.
1788
+ * long it has run, which the page counts by itself (ADR-0141). Sub-agents that go on in the
1789
+ * background are at work past the turn that started them (ADR-0161), and the sign stands for
1790
+ * them alone then. A row of the conversation's list; nothing where no turn is under way and no
1791
+ * sub-agent is at work.
1576
1792
  */
1577
1793
  export function TalkWorking(props: {
1578
1794
  readonly working: Working | undefined;
1579
1795
  readonly agent?: RestPerson | undefined;
1580
- /** The sub-agents at work in the turn under way: `atWorkOf` says which. */
1796
+ /** The sub-agents at work in the session: `atWorkOf` says which. */
1581
1797
  readonly agents?: readonly SubAgent[] | undefined;
1582
1798
  }) {
1583
1799
  const live = useWords().agents.page.live;
1584
1800
  const words = live.working;
1585
1801
  const { working } = props;
1586
- if (working === undefined) {
1802
+ const agents = props.agents ?? [];
1803
+ if (working === undefined && agents.length === 0) {
1587
1804
  return null;
1588
1805
  }
1589
- const agents = props.agents ?? [];
1590
1806
  return (
1591
1807
  <li
1592
1808
  className={cx(
1593
1809
  "sc-talk-item",
1594
1810
  "sc-talk-working",
1811
+ "sc-note",
1595
1812
  agents.length > 0 && "sc-talk-working-agents",
1596
1813
  )}
1597
1814
  role="status"
@@ -1608,7 +1825,7 @@ export function TalkWorking(props: {
1608
1825
  <ul className="sc-talk-agents" aria-live="off">
1609
1826
  {agents.map((one) => (
1610
1827
  <li key={one.n} className="sc-talk-agents-row">
1611
- <span className="sc-talk-who sc-talk-agent-name">
1828
+ <span className="sc-name sc-talk-agent-name">
1612
1829
  {one.name.length === 0 ? live.agent.label : one.name}
1613
1830
  </span>
1614
1831
  <span className="sc-talk-agents-facts">
@@ -2274,7 +2491,7 @@ export function AgentSessionList(props: AgentSessionListProps) {
2274
2491
  )}
2275
2492
  {session.away && <Badge tone="warning">{words.away}</Badge>}
2276
2493
  </span>
2277
- <span className="sc-agent-session-facts">
2494
+ <span className="sc-agent-session-facts sc-note">
2278
2495
  {[
2279
2496
  `${session.product.name}${session.product.version === null ? "" : ` ${session.product.version}`}`,
2280
2497
  ...(session.model === null ? [] : [session.model]),
@@ -2414,9 +2631,9 @@ export function AgentSecretList(props: AgentSecretListProps) {
2414
2631
  {props.secrets.length === 0 ? (
2415
2632
  <p className="sc-field-hint">{words.empty}</p>
2416
2633
  ) : (
2417
- <ul className="sc-agent-secret-list" aria-label={words.title}>
2634
+ <ul className="sc-divided sc-agent-secret-list" aria-label={words.title}>
2418
2635
  {props.secrets.map((secret) => (
2419
- <li key={secret.name} className="sc-agent-secret">
2636
+ <li key={secret.name} className="sc-small sc-agent-secret">
2420
2637
  <code>{secret.name}</code>
2421
2638
  <span className="sc-muted">
2422
2639
  <Time iso={secret.setAt} precision="day" />