@skillcdn/console 0.4.7 → 0.5.1

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 (599) hide show
  1. package/README.md +74 -14
  2. package/SKILLCDN.md +5 -3
  3. package/dist/agent-page.d.ts +44 -0
  4. package/dist/agent-page.d.ts.map +1 -0
  5. package/dist/agent-page.js +415 -0
  6. package/dist/agent-page.js.map +1 -0
  7. package/dist/agent-stream.d.ts +52 -0
  8. package/dist/agent-stream.d.ts.map +1 -0
  9. package/dist/agent-stream.js +155 -0
  10. package/dist/agent-stream.js.map +1 -0
  11. package/dist/api.d.ts +12 -6
  12. package/dist/api.d.ts.map +1 -1
  13. package/dist/api.js +11 -5
  14. package/dist/api.js.map +1 -1
  15. package/dist/avatar.d.ts +137 -0
  16. package/dist/avatar.d.ts.map +1 -0
  17. package/dist/avatar.js +1216 -0
  18. package/dist/avatar.js.map +1 -0
  19. package/dist/charts.d.ts +103 -0
  20. package/dist/charts.d.ts.map +1 -0
  21. package/dist/charts.js +182 -0
  22. package/dist/charts.js.map +1 -0
  23. package/dist/cli/cli.d.ts +39 -1
  24. package/dist/cli/cli.d.ts.map +1 -1
  25. package/dist/cli/cli.js +2424 -296
  26. package/dist/cli/cli.js.map +1 -1
  27. package/dist/cli/command-words.d.ts +20 -0
  28. package/dist/cli/command-words.d.ts.map +1 -0
  29. package/dist/cli/command-words.js +51 -0
  30. package/dist/cli/command-words.js.map +1 -0
  31. package/dist/cli/credentials.d.ts +59 -5
  32. package/dist/cli/credentials.d.ts.map +1 -1
  33. package/dist/cli/credentials.js +128 -16
  34. package/dist/cli/credentials.js.map +1 -1
  35. package/dist/cli/directory.d.ts +19 -4
  36. package/dist/cli/directory.d.ts.map +1 -1
  37. package/dist/cli/directory.js +16 -8
  38. package/dist/cli/directory.js.map +1 -1
  39. package/dist/cli/format.d.ts +91 -8
  40. package/dist/cli/format.d.ts.map +1 -1
  41. package/dist/cli/format.js +386 -57
  42. package/dist/cli/format.js.map +1 -1
  43. package/dist/cli/help.d.ts +13 -4
  44. package/dist/cli/help.d.ts.map +1 -1
  45. package/dist/cli/help.js +202 -62
  46. package/dist/cli/help.js.map +1 -1
  47. package/dist/cli/main.js +94 -0
  48. package/dist/cli/main.js.map +1 -1
  49. package/dist/cli/pack.d.ts +69 -36
  50. package/dist/cli/pack.d.ts.map +1 -1
  51. package/dist/cli/pack.js +241 -188
  52. package/dist/cli/pack.js.map +1 -1
  53. package/dist/cli/plugin-check.d.ts +42 -0
  54. package/dist/cli/plugin-check.d.ts.map +1 -1
  55. package/dist/cli/plugin-check.js +221 -36
  56. package/dist/cli/plugin-check.js.map +1 -1
  57. package/dist/cli/plugin-cli.d.ts +6 -1
  58. package/dist/cli/plugin-cli.d.ts.map +1 -1
  59. package/dist/cli/plugin-cli.js +21 -4
  60. package/dist/cli/plugin-cli.js.map +1 -1
  61. package/dist/cli/plugin-main.js +1 -0
  62. package/dist/cli/plugin-main.js.map +1 -1
  63. package/dist/cli/runner-host.d.ts +36 -0
  64. package/dist/cli/runner-host.d.ts.map +1 -0
  65. package/dist/cli/runner-host.js +154 -0
  66. package/dist/cli/runner-host.js.map +1 -0
  67. package/dist/cli/serve.d.ts +33 -1
  68. package/dist/cli/serve.d.ts.map +1 -1
  69. package/dist/cli/serve.js +275 -6
  70. package/dist/cli/serve.js.map +1 -1
  71. package/dist/cli/setup-machine.d.ts +36 -0
  72. package/dist/cli/setup-machine.d.ts.map +1 -0
  73. package/dist/cli/setup-machine.js +109 -0
  74. package/dist/cli/setup-machine.js.map +1 -0
  75. package/dist/client.d.ts +189 -10
  76. package/dist/client.d.ts.map +1 -1
  77. package/dist/client.js +192 -57
  78. package/dist/client.js.map +1 -1
  79. package/dist/compat.d.ts +1 -1
  80. package/dist/compat.js +2 -2
  81. package/dist/components/agent-page.d.ts +384 -0
  82. package/dist/components/agent-page.d.ts.map +1 -0
  83. package/dist/components/agent-page.js +985 -0
  84. package/dist/components/agent-page.js.map +1 -0
  85. package/dist/components/agents.d.ts +102 -0
  86. package/dist/components/agents.d.ts.map +1 -0
  87. package/dist/components/agents.js +246 -0
  88. package/dist/components/agents.js.map +1 -0
  89. package/dist/components/calendar.d.ts +17 -17
  90. package/dist/components/calendar.d.ts.map +1 -1
  91. package/dist/components/calendar.js +7 -2
  92. package/dist/components/calendar.js.map +1 -1
  93. package/dist/components/charts.d.ts +157 -0
  94. package/dist/components/charts.d.ts.map +1 -0
  95. package/dist/components/charts.js +182 -0
  96. package/dist/components/charts.js.map +1 -0
  97. package/dist/components/comments.d.ts +2 -0
  98. package/dist/components/comments.d.ts.map +1 -1
  99. package/dist/components/comments.js +1 -1
  100. package/dist/components/comments.js.map +1 -1
  101. package/dist/components/connect.d.ts.map +1 -1
  102. package/dist/components/connect.js +7 -2
  103. package/dist/components/connect.js.map +1 -1
  104. package/dist/components/decision-form.d.ts +21 -0
  105. package/dist/components/decision-form.d.ts.map +1 -1
  106. package/dist/components/decision-form.js +20 -6
  107. package/dist/components/decision-form.js.map +1 -1
  108. package/dist/components/decision-list.d.ts +24 -0
  109. package/dist/components/decision-list.d.ts.map +1 -1
  110. package/dist/components/decision-list.js +54 -5
  111. package/dist/components/decision-list.js.map +1 -1
  112. package/dist/components/desk-records.d.ts +102 -0
  113. package/dist/components/desk-records.d.ts.map +1 -0
  114. package/dist/components/desk-records.js +221 -0
  115. package/dist/components/desk-records.js.map +1 -0
  116. package/dist/components/desk.d.ts +85 -0
  117. package/dist/components/desk.d.ts.map +1 -0
  118. package/dist/components/desk.js +135 -0
  119. package/dist/components/desk.js.map +1 -0
  120. package/dist/components/event-feed.d.ts.map +1 -1
  121. package/dist/components/event-feed.js +26 -1
  122. package/dist/components/event-feed.js.map +1 -1
  123. package/dist/components/home.d.ts +12 -1
  124. package/dist/components/home.d.ts.map +1 -1
  125. package/dist/components/home.js +175 -16
  126. package/dist/components/home.js.map +1 -1
  127. package/dist/components/my-decisions.d.ts +5 -0
  128. package/dist/components/my-decisions.d.ts.map +1 -1
  129. package/dist/components/my-decisions.js +3 -3
  130. package/dist/components/my-decisions.js.map +1 -1
  131. package/dist/components/people.d.ts +17 -0
  132. package/dist/components/people.d.ts.map +1 -1
  133. package/dist/components/people.js +55 -19
  134. package/dist/components/people.js.map +1 -1
  135. package/dist/components/picker.d.ts +2 -0
  136. package/dist/components/picker.d.ts.map +1 -1
  137. package/dist/components/picker.js +1 -1
  138. package/dist/components/picker.js.map +1 -1
  139. package/dist/components/pictures.d.ts +38 -10
  140. package/dist/components/pictures.d.ts.map +1 -1
  141. package/dist/components/pictures.js +195 -40
  142. package/dist/components/pictures.js.map +1 -1
  143. package/dist/components/plugin-events.d.ts +29 -0
  144. package/dist/components/plugin-events.d.ts.map +1 -0
  145. package/dist/components/plugin-events.js +139 -0
  146. package/dist/components/plugin-events.js.map +1 -0
  147. package/dist/components/plugin-frame.d.ts.map +1 -1
  148. package/dist/components/plugin-frame.js +14 -37
  149. package/dist/components/plugin-frame.js.map +1 -1
  150. package/dist/components/plugin-settings.d.ts.map +1 -1
  151. package/dist/components/plugin-settings.js +58 -7
  152. package/dist/components/plugin-settings.js.map +1 -1
  153. package/dist/components/projects.d.ts.map +1 -1
  154. package/dist/components/projects.js +30 -10
  155. package/dist/components/projects.js.map +1 -1
  156. package/dist/components/rules.d.ts +8 -10
  157. package/dist/components/rules.d.ts.map +1 -1
  158. package/dist/components/rules.js +36 -14
  159. package/dist/components/rules.js.map +1 -1
  160. package/dist/components/sessions.d.ts.map +1 -1
  161. package/dist/components/sessions.js +8 -4
  162. package/dist/components/sessions.js.map +1 -1
  163. package/dist/components/setup.d.ts +59 -0
  164. package/dist/components/setup.d.ts.map +1 -0
  165. package/dist/components/setup.js +93 -0
  166. package/dist/components/setup.js.map +1 -0
  167. package/dist/components/sign-in.js +1 -1
  168. package/dist/components/sign-in.js.map +1 -1
  169. package/dist/components/task-form.d.ts.map +1 -1
  170. package/dist/components/task-form.js +2 -2
  171. package/dist/components/task-form.js.map +1 -1
  172. package/dist/components/task-list.d.ts +7 -6
  173. package/dist/components/task-list.d.ts.map +1 -1
  174. package/dist/components/task-list.js.map +1 -1
  175. package/dist/components/task-view.d.ts +3 -0
  176. package/dist/components/task-view.d.ts.map +1 -1
  177. package/dist/components/task-view.js +1 -1
  178. package/dist/components/task-view.js.map +1 -1
  179. package/dist/components/ui.d.ts +78 -8
  180. package/dist/components/ui.d.ts.map +1 -1
  181. package/dist/components/ui.js +88 -9
  182. package/dist/components/ui.js.map +1 -1
  183. package/dist/components/work.d.ts +5 -5
  184. package/dist/components/work.d.ts.map +1 -1
  185. package/dist/components/work.js.map +1 -1
  186. package/dist/components/workspace.d.ts +17 -0
  187. package/dist/components/workspace.d.ts.map +1 -1
  188. package/dist/components/workspace.js +129 -2
  189. package/dist/components/workspace.js.map +1 -1
  190. package/dist/connect-page.d.ts.map +1 -1
  191. package/dist/connect-page.js +5 -2
  192. package/dist/connect-page.js.map +1 -1
  193. package/dist/console.css +7551 -4580
  194. package/dist/console.d.ts +20 -0
  195. package/dist/console.d.ts.map +1 -1
  196. package/dist/console.js +331 -57
  197. package/dist/console.js.map +1 -1
  198. package/dist/data.d.ts +22 -1
  199. package/dist/data.d.ts.map +1 -1
  200. package/dist/data.js +62 -34
  201. package/dist/data.js.map +1 -1
  202. package/dist/desk-page.d.ts +38 -0
  203. package/dist/desk-page.d.ts.map +1 -0
  204. package/dist/desk-page.js +184 -0
  205. package/dist/desk-page.js.map +1 -0
  206. package/dist/desk-records-page.d.ts +18 -0
  207. package/dist/desk-records-page.d.ts.map +1 -0
  208. package/dist/desk-records-page.js +130 -0
  209. package/dist/desk-records-page.js.map +1 -0
  210. package/dist/desk-records.d.ts +247 -0
  211. package/dist/desk-records.d.ts.map +1 -0
  212. package/dist/desk-records.js +543 -0
  213. package/dist/desk-records.js.map +1 -0
  214. package/dist/desk.d.ts +122 -0
  215. package/dist/desk.d.ts.map +1 -0
  216. package/dist/desk.js +211 -0
  217. package/dist/desk.js.map +1 -0
  218. package/dist/feed-stream.d.ts +39 -0
  219. package/dist/feed-stream.d.ts.map +1 -0
  220. package/dist/feed-stream.js +117 -0
  221. package/dist/feed-stream.js.map +1 -0
  222. package/dist/glances.d.ts +39 -0
  223. package/dist/glances.d.ts.map +1 -0
  224. package/dist/glances.js +94 -0
  225. package/dist/glances.js.map +1 -0
  226. package/dist/home-tiles.d.ts +69 -5
  227. package/dist/home-tiles.d.ts.map +1 -1
  228. package/dist/home-tiles.js +347 -9
  229. package/dist/home-tiles.js.map +1 -1
  230. package/dist/i18n/en.d.ts +773 -3
  231. package/dist/i18n/en.d.ts.map +1 -1
  232. package/dist/i18n/en.js +770 -9
  233. package/dist/i18n/en.js.map +1 -1
  234. package/dist/i18n/ko.d.ts.map +1 -1
  235. package/dist/i18n/ko.js +736 -9
  236. package/dist/i18n/ko.js.map +1 -1
  237. package/dist/index.d.ts +19 -7
  238. package/dist/index.d.ts.map +1 -1
  239. package/dist/index.js +17 -5
  240. package/dist/index.js.map +1 -1
  241. package/dist/limits.d.ts +67 -0
  242. package/dist/limits.d.ts.map +1 -1
  243. package/dist/limits.js +67 -0
  244. package/dist/limits.js.map +1 -1
  245. package/dist/onboarding.d.ts +21 -0
  246. package/dist/onboarding.d.ts.map +1 -0
  247. package/dist/onboarding.js +43 -0
  248. package/dist/onboarding.js.map +1 -0
  249. package/dist/persona.d.ts +34 -0
  250. package/dist/persona.d.ts.map +1 -0
  251. package/dist/persona.js +71 -0
  252. package/dist/persona.js.map +1 -0
  253. package/dist/plugin/context.d.ts +42 -11
  254. package/dist/plugin/context.d.ts.map +1 -1
  255. package/dist/plugin/limits.d.ts +2 -0
  256. package/dist/plugin/limits.d.ts.map +1 -1
  257. package/dist/plugin/limits.js +2 -0
  258. package/dist/plugin/limits.js.map +1 -1
  259. package/dist/plugin/manifest.d.ts +13 -0
  260. package/dist/plugin/manifest.d.ts.map +1 -1
  261. package/dist/plugin/manifest.js +34 -4
  262. package/dist/plugin/manifest.js.map +1 -1
  263. package/dist/plugin/rest-schemas.d.ts +56 -0
  264. package/dist/plugin/rest-schemas.d.ts.map +1 -1
  265. package/dist/plugin/rest-schemas.js +42 -0
  266. package/dist/plugin/rest-schemas.js.map +1 -1
  267. package/dist/plugin/sandbox.d.ts.map +1 -1
  268. package/dist/plugin/sandbox.js +4 -1
  269. package/dist/plugin/sandbox.js.map +1 -1
  270. package/dist/plugin/testing.d.ts +6 -2
  271. package/dist/plugin/testing.d.ts.map +1 -1
  272. package/dist/plugin/testing.js +52 -10
  273. package/dist/plugin/testing.js.map +1 -1
  274. package/dist/plugin.d.ts +1 -1
  275. package/dist/plugin.d.ts.map +1 -1
  276. package/dist/plugin.js +1 -1
  277. package/dist/plugin.js.map +1 -1
  278. package/dist/records.d.ts +283 -0
  279. package/dist/records.d.ts.map +1 -0
  280. package/dist/records.js +543 -0
  281. package/dist/records.js.map +1 -0
  282. package/dist/router.d.ts +50 -3
  283. package/dist/router.d.ts.map +1 -1
  284. package/dist/router.js +78 -7
  285. package/dist/router.js.map +1 -1
  286. package/dist/routes.d.ts +12 -2
  287. package/dist/routes.d.ts.map +1 -1
  288. package/dist/routes.js +14 -1
  289. package/dist/routes.js.map +1 -1
  290. package/dist/rules.d.ts +30 -11
  291. package/dist/rules.d.ts.map +1 -1
  292. package/dist/rules.js +99 -42
  293. package/dist/rules.js.map +1 -1
  294. package/dist/runner/acp.d.ts +20 -0
  295. package/dist/runner/acp.d.ts.map +1 -0
  296. package/dist/runner/acp.js +1132 -0
  297. package/dist/runner/acp.js.map +1 -0
  298. package/dist/runner/claude.d.ts +13 -0
  299. package/dist/runner/claude.d.ts.map +1 -0
  300. package/dist/runner/claude.js +615 -0
  301. package/dist/runner/claude.js.map +1 -0
  302. package/dist/runner/codex.d.ts +19 -0
  303. package/dist/runner/codex.d.ts.map +1 -0
  304. package/dist/runner/codex.js +597 -0
  305. package/dist/runner/codex.js.map +1 -0
  306. package/dist/runner/config.d.ts +35 -0
  307. package/dist/runner/config.d.ts.map +1 -0
  308. package/dist/runner/config.js +74 -0
  309. package/dist/runner/config.js.map +1 -0
  310. package/dist/runner/desk.d.ts +81 -0
  311. package/dist/runner/desk.d.ts.map +1 -0
  312. package/dist/runner/desk.js +303 -0
  313. package/dist/runner/desk.js.map +1 -0
  314. package/dist/runner/launchd.d.ts +7 -0
  315. package/dist/runner/launchd.d.ts.map +1 -0
  316. package/dist/runner/launchd.js +78 -0
  317. package/dist/runner/launchd.js.map +1 -0
  318. package/dist/runner/message.d.ts +66 -0
  319. package/dist/runner/message.d.ts.map +1 -0
  320. package/dist/runner/message.js +181 -0
  321. package/dist/runner/message.js.map +1 -0
  322. package/dist/runner/modules.d.ts +13 -0
  323. package/dist/runner/modules.d.ts.map +1 -0
  324. package/dist/runner/modules.js +30 -0
  325. package/dist/runner/modules.js.map +1 -0
  326. package/dist/runner/process.d.ts +7 -0
  327. package/dist/runner/process.d.ts.map +1 -0
  328. package/dist/runner/process.js +65 -0
  329. package/dist/runner/process.js.map +1 -0
  330. package/dist/runner/redact.d.ts +48 -0
  331. package/dist/runner/redact.d.ts.map +1 -0
  332. package/dist/runner/redact.js +214 -0
  333. package/dist/runner/redact.js.map +1 -0
  334. package/dist/runner/registry.d.ts +37 -0
  335. package/dist/runner/registry.d.ts.map +1 -0
  336. package/dist/runner/registry.js +26 -0
  337. package/dist/runner/registry.js.map +1 -0
  338. package/dist/runner/runner.d.ts +130 -0
  339. package/dist/runner/runner.d.ts.map +1 -0
  340. package/dist/runner/runner.js +1551 -0
  341. package/dist/runner/runner.js.map +1 -0
  342. package/dist/runner/slack.d.ts +16 -0
  343. package/dist/runner/slack.d.ts.map +1 -0
  344. package/dist/runner/slack.js +157 -0
  345. package/dist/runner/slack.js.map +1 -0
  346. package/dist/runner/systemd-user.d.ts +7 -0
  347. package/dist/runner/systemd-user.d.ts.map +1 -0
  348. package/dist/runner/systemd-user.js +93 -0
  349. package/dist/runner/systemd-user.js.map +1 -0
  350. package/dist/runner/task-scheduler.d.ts +38 -0
  351. package/dist/runner/task-scheduler.d.ts.map +1 -0
  352. package/dist/runner/task-scheduler.js +216 -0
  353. package/dist/runner/task-scheduler.js.map +1 -0
  354. package/dist/runner/types.d.ts +315 -0
  355. package/dist/runner/types.d.ts.map +1 -0
  356. package/dist/runner/types.js +24 -0
  357. package/dist/runner/types.js.map +1 -0
  358. package/dist/runner.d.ts +18 -0
  359. package/dist/runner.d.ts.map +1 -0
  360. package/dist/runner.js +20 -0
  361. package/dist/runner.js.map +1 -0
  362. package/dist/schemas.d.ts +6082 -1295
  363. package/dist/schemas.d.ts.map +1 -1
  364. package/dist/schemas.js +930 -31
  365. package/dist/schemas.js.map +1 -1
  366. package/dist/services.d.ts +110 -0
  367. package/dist/services.d.ts.map +1 -0
  368. package/dist/services.js +305 -0
  369. package/dist/services.js.map +1 -0
  370. package/dist/setup-guide.d.ts +64 -0
  371. package/dist/setup-guide.d.ts.map +1 -0
  372. package/dist/setup-guide.js +256 -0
  373. package/dist/setup-guide.js.map +1 -0
  374. package/dist/setup-page.d.ts +6 -0
  375. package/dist/setup-page.d.ts.map +1 -0
  376. package/dist/setup-page.js +29 -0
  377. package/dist/setup-page.js.map +1 -0
  378. package/dist/sse.d.ts +15 -0
  379. package/dist/sse.d.ts.map +1 -0
  380. package/dist/sse.js +73 -0
  381. package/dist/sse.js.map +1 -0
  382. package/dist/tab-title.d.ts +6 -0
  383. package/dist/tab-title.d.ts.map +1 -0
  384. package/dist/tab-title.js +22 -0
  385. package/dist/tab-title.js.map +1 -0
  386. package/dist/tokens.d.ts.map +1 -1
  387. package/dist/tokens.js +3 -0
  388. package/dist/tokens.js.map +1 -1
  389. package/dist/use-action.d.ts +5 -2
  390. package/dist/use-action.d.ts.map +1 -1
  391. package/dist/use-action.js +6 -1
  392. package/dist/use-action.js.map +1 -1
  393. package/dist/vocabulary.d.ts +84 -4
  394. package/dist/vocabulary.d.ts.map +1 -1
  395. package/dist/vocabulary.js +115 -3
  396. package/dist/vocabulary.js.map +1 -1
  397. package/docs/specs/cli.md +147 -41
  398. package/docs/specs/plugins.md +37 -27
  399. package/docs/specs/records.md +113 -0
  400. package/docs/specs/rest.md +155 -20
  401. package/docs/specs/runner.md +347 -0
  402. package/package.json +12 -3
  403. package/skills/building-a-console/SKILL.md +4 -4
  404. package/skills/building-a-console/references/configuring.md +1 -0
  405. package/skills/building-a-plugin/SKILL.md +7 -7
  406. package/skills/deploying-a-console/SKILL.md +4 -4
  407. package/skills/deploying-a-console/references/resources.md +48 -8
  408. package/skills/deploying-a-console/references/running-it-again.md +3 -2
  409. package/skills/keeping-a-desk/SKILL.md +133 -0
  410. package/skills/keeping-a-desk/collections.md +96 -0
  411. package/skills/planning-the-board/SKILL.md +14 -18
  412. package/skills/planning-the-board/references/a-task.md +2 -2
  413. package/skills/planning-the-board/references/project-rules.md +13 -14
  414. package/skills/planning-the-board/references/setting-up.md +22 -9
  415. package/skills/running-an-agent/SKILL.md +107 -0
  416. package/skills/running-an-agent/references/slack-app.md +61 -0
  417. package/skills/working-the-board/SKILL.md +66 -39
  418. package/skills/working-the-board/references/terms.md +9 -5
  419. package/skills/working-the-board/references/the-pack.md +14 -9
  420. package/skills/working-the-board/references/the-sentence.md +2 -2
  421. package/src/agent-page.tsx +1039 -0
  422. package/src/agent-stream.ts +199 -0
  423. package/src/api.ts +317 -2
  424. package/src/avatar.ts +1506 -0
  425. package/src/charts.ts +250 -0
  426. package/src/cli/cli.ts +3210 -503
  427. package/src/cli/command-words.ts +56 -0
  428. package/src/cli/credentials.ts +188 -16
  429. package/src/cli/directory.ts +28 -10
  430. package/src/cli/format.ts +470 -67
  431. package/src/cli/help.ts +233 -61
  432. package/src/cli/main.ts +89 -0
  433. package/src/cli/pack.ts +332 -263
  434. package/src/cli/plugin-check.ts +275 -34
  435. package/src/cli/plugin-cli.ts +28 -4
  436. package/src/cli/plugin-main.ts +1 -0
  437. package/src/cli/runner-host.ts +188 -0
  438. package/src/cli/serve.ts +320 -5
  439. package/src/cli/setup-machine.ts +153 -0
  440. package/src/client.ts +711 -126
  441. package/src/compat.ts +2 -2
  442. package/src/components/agent-page.tsx +1946 -0
  443. package/src/components/agents.tsx +638 -0
  444. package/src/components/calendar.tsx +74 -53
  445. package/src/components/charts.tsx +680 -0
  446. package/src/components/comments.tsx +3 -0
  447. package/src/components/connect.tsx +37 -2
  448. package/src/components/decision-form.tsx +89 -51
  449. package/src/components/decision-list.tsx +140 -4
  450. package/src/components/desk-records.tsx +724 -0
  451. package/src/components/desk.tsx +471 -0
  452. package/src/components/event-feed.tsx +30 -1
  453. package/src/components/home.tsx +353 -12
  454. package/src/components/my-decisions.tsx +8 -2
  455. package/src/components/people.tsx +300 -203
  456. package/src/components/picker.tsx +3 -1
  457. package/src/components/pictures.tsx +256 -44
  458. package/src/components/plugin-events.ts +159 -0
  459. package/src/components/plugin-frame.tsx +14 -38
  460. package/src/components/plugin-settings.tsx +178 -22
  461. package/src/components/projects.tsx +33 -15
  462. package/src/components/rules.tsx +96 -36
  463. package/src/components/sessions.tsx +7 -4
  464. package/src/components/setup.tsx +252 -0
  465. package/src/components/sign-in.tsx +1 -1
  466. package/src/components/task-form.tsx +11 -2
  467. package/src/components/task-list.tsx +7 -6
  468. package/src/components/task-view.tsx +4 -0
  469. package/src/components/ui.tsx +169 -25
  470. package/src/components/work.tsx +9 -9
  471. package/src/components/workspace.tsx +345 -4
  472. package/src/connect-page.tsx +15 -2
  473. package/src/console.tsx +657 -83
  474. package/src/data.ts +109 -43
  475. package/src/desk-page.tsx +332 -0
  476. package/src/desk-records-page.tsx +256 -0
  477. package/src/desk-records.ts +808 -0
  478. package/src/desk.ts +329 -0
  479. package/src/feed-stream.ts +144 -0
  480. package/src/glances.ts +132 -0
  481. package/src/home-tiles.ts +411 -9
  482. package/src/i18n/en.ts +828 -10
  483. package/src/i18n/ko.ts +792 -10
  484. package/src/index.ts +172 -3
  485. package/src/limits.ts +67 -0
  486. package/src/onboarding.ts +84 -0
  487. package/src/persona.ts +100 -0
  488. package/src/plugin/context.ts +55 -12
  489. package/src/plugin/limits.ts +2 -0
  490. package/src/plugin/manifest.ts +42 -3
  491. package/src/plugin/rest-schemas.ts +46 -0
  492. package/src/plugin/sandbox.ts +4 -1
  493. package/src/plugin/testing.ts +63 -12
  494. package/src/plugin.ts +2 -0
  495. package/src/records.ts +702 -0
  496. package/src/router.ts +120 -10
  497. package/src/routes.ts +17 -1
  498. package/src/rules.ts +109 -44
  499. package/src/runner/acp.ts +1267 -0
  500. package/src/runner/claude.ts +695 -0
  501. package/src/runner/codex.ts +691 -0
  502. package/src/runner/config.ts +97 -0
  503. package/src/runner/desk.ts +377 -0
  504. package/src/runner/launchd.ts +86 -0
  505. package/src/runner/message.ts +232 -0
  506. package/src/runner/modules.ts +30 -0
  507. package/src/runner/process.ts +72 -0
  508. package/src/runner/redact.ts +242 -0
  509. package/src/runner/registry.ts +67 -0
  510. package/src/runner/runner.ts +1879 -0
  511. package/src/runner/slack.ts +180 -0
  512. package/src/runner/systemd-user.ts +103 -0
  513. package/src/runner/task-scheduler.ts +236 -0
  514. package/src/runner/types.ts +334 -0
  515. package/src/runner.ts +110 -0
  516. package/src/schemas.ts +1183 -30
  517. package/src/services.ts +424 -0
  518. package/src/setup-guide.ts +336 -0
  519. package/src/setup-page.tsx +46 -0
  520. package/src/sse.ts +84 -0
  521. package/src/styles/README.md +111 -0
  522. package/src/styles/base.css +130 -0
  523. package/src/styles/console.css +85 -7095
  524. package/src/styles/drawn-by-pages.json +256 -0
  525. package/src/styles/pages/agents.css +1195 -0
  526. package/src/styles/pages/board.css +380 -0
  527. package/src/styles/pages/calendar.css +214 -0
  528. package/src/styles/pages/connect.css +182 -0
  529. package/src/styles/pages/decisions.css +370 -0
  530. package/src/styles/pages/desk.css +126 -0
  531. package/src/styles/pages/documents.css +273 -0
  532. package/src/styles/pages/feed.css +118 -0
  533. package/src/styles/pages/home.css +718 -0
  534. package/src/styles/pages/people.css +90 -0
  535. package/src/styles/pages/plugins.css +212 -0
  536. package/src/styles/pages/roadmap.css +377 -0
  537. package/src/styles/pages/settings.css +171 -0
  538. package/src/styles/pages/shell.css +208 -0
  539. package/src/styles/pages/sign-in.css +178 -0
  540. package/src/styles/pages/task.css +108 -0
  541. package/src/styles/pages/thread.css +331 -0
  542. package/src/styles/pages/work.css +68 -0
  543. package/src/styles/parts/avatar.css +82 -0
  544. package/src/styles/parts/badge.css +227 -0
  545. package/src/styles/parts/bars.css +80 -0
  546. package/src/styles/parts/button.css +99 -0
  547. package/src/styles/parts/calendar.css +547 -0
  548. package/src/styles/parts/callout.css +41 -0
  549. package/src/styles/parts/category.css +8 -0
  550. package/src/styles/parts/chart.css +173 -0
  551. package/src/styles/parts/chip.css +90 -0
  552. package/src/styles/parts/code.css +48 -0
  553. package/src/styles/parts/count.css +27 -0
  554. package/src/styles/parts/crumbs.css +61 -0
  555. package/src/styles/parts/detail.css +110 -0
  556. package/src/styles/parts/empty.css +21 -0
  557. package/src/styles/parts/eyebrow.css +9 -0
  558. package/src/styles/parts/facts.css +147 -0
  559. package/src/styles/parts/figures.css +65 -0
  560. package/src/styles/parts/files.css +38 -0
  561. package/src/styles/parts/filters.css +42 -0
  562. package/src/styles/parts/form.css +109 -0
  563. package/src/styles/parts/frame.css +45 -0
  564. package/src/styles/parts/input.css +243 -0
  565. package/src/styles/parts/legend.css +48 -0
  566. package/src/styles/parts/links.css +37 -0
  567. package/src/styles/parts/mark.css +79 -0
  568. package/src/styles/parts/menu.css +147 -0
  569. package/src/styles/parts/page.css +174 -0
  570. package/src/styles/parts/pager.css +19 -0
  571. package/src/styles/parts/panel.css +33 -0
  572. package/src/styles/parts/person.css +257 -0
  573. package/src/styles/parts/picker.css +185 -0
  574. package/src/styles/parts/progress.css +25 -0
  575. package/src/styles/parts/prose.css +128 -0
  576. package/src/styles/parts/rows.css +63 -0
  577. package/src/styles/parts/series.css +32 -0
  578. package/src/styles/parts/settings.css +101 -0
  579. package/src/styles/parts/share.css +25 -0
  580. package/src/styles/parts/spark.css +23 -0
  581. package/src/styles/parts/spinner.css +29 -0
  582. package/src/styles/parts/stat.css +69 -0
  583. package/src/styles/parts/steps.css +68 -0
  584. package/src/styles/parts/tabs.css +175 -0
  585. package/src/styles/parts/text.css +61 -0
  586. package/src/styles/parts/toggle.css +71 -0
  587. package/src/styles/parts/workers.css +37 -0
  588. package/src/styles/tokens.css +295 -0
  589. package/src/tab-title.ts +25 -0
  590. package/src/tokens.ts +3 -0
  591. package/src/use-action.ts +7 -2
  592. package/src/vocabulary.ts +151 -3
  593. package/template/desk-web/README.md +8 -0
  594. package/template/desk-web/index.html +13 -0
  595. package/template/desk-web/package.json +25 -0
  596. package/template/desk-web/src/main.tsx +24 -0
  597. package/template/desk-web/src/page.tsx +51 -0
  598. package/template/desk-web/tsconfig.json +16 -0
  599. package/template/desk-web/vite.config.ts +15 -0
@@ -1,23 +1,24 @@
1
1
  import { type FormEvent, useState } from "react";
2
- import { fillRules, isReferenceRules, MAX_RULES_LENGTH, type RestRules } from "../api.js";
2
+ import { fillRules, MAX_RULES_LENGTH, type RestRules } from "../api.js";
3
3
  import { useLanguage, useWords } from "../i18n/index.js";
4
4
  import { Writer } from "./documents.js";
5
5
  import { Markdown } from "./markdown.js";
6
6
  import { Button, Callout, Time } from "./ui.js";
7
7
 
8
- // The rules of the board (ADR-0023), as the settings pages show them: what holds, where it
9
- // comes from (the console's own, a page written, or none), who wrote the page and when, and
10
- // the ways to change them for whoever may. Each takes its data as props and nothing from the
11
- // network; the rules are Markdown rendered to elements, never HTML, with `{language}` filled
12
- // with the language the pages speak, as the command fills it with the person's.
8
+ // The rules of the board (ADR-0023, ADR-0120), as the settings pages show them. At the
9
+ // workspace: the console's rules as they hold, read and never edited, and below them what the
10
+ // organization adds, with who wrote it and when, and the ways to change it for whoever may. At
11
+ // a project: what it adds, or that it adds none. Each takes its data as props and nothing from
12
+ // the network; the rules are Markdown rendered to elements, never HTML, with `{language}`
13
+ // filled with the language the pages speak, as the command fills it with the person's.
13
14
 
14
15
  export interface RulesViewProps {
15
16
  readonly rules: RestRules;
16
17
  /** Whose rules: the workspace's, or a project's, which add to the workspace's. */
17
18
  readonly scope: "workspace" | "project";
18
- /** Where the rules are written; left out, they are read here and not changed. */
19
+ /** Where what is added is written; left out, the rules are read here and not changed. */
19
20
  readonly editHref?: string | undefined;
20
- /** Called to put the written rules away; left out, they stay. */
21
+ /** Called to put what is added away; left out, it stays. */
21
22
  readonly onArchive?: (() => void) | undefined;
22
23
  readonly busy?: boolean | undefined;
23
24
  /** Where a page of the project is read, by its path, for the links a project's rules make. */
@@ -30,10 +31,13 @@ export function RulesView(props: RulesViewProps) {
30
31
  const words = useWords();
31
32
  const language = useLanguage().tag;
32
33
  const { rules, scope } = props;
34
+ if (scope === "workspace" && rules.own !== undefined && props.folded !== true) {
35
+ return <WorkspaceRules {...props} own={rules.own} />;
36
+ }
33
37
  const page = rules.page;
34
38
  if (rules.source === "none" || rules.body === null) {
35
39
  return (
36
- <div className="sc-rules">
40
+ <div>
37
41
  <p className="sc-muted">{words.rules.none}</p>
38
42
  {props.editHref !== undefined && (
39
43
  <div className="sc-rules-actions">
@@ -46,10 +50,13 @@ export function RulesView(props: RulesViewProps) {
46
50
  );
47
51
  }
48
52
  const text = <Markdown source={fillRules(rules.body, language)} docHref={props.docHref} />;
53
+ // A project's own are changed here. The workspace's come this way folded, on a project's
54
+ // page, or whole from a console of before, which says no parts: read, and changed elsewhere.
55
+ const changed = scope === "project";
49
56
  return (
50
- <div className="sc-rules">
57
+ <div>
51
58
  {rules.source === "reference" ? (
52
- <Callout tone="info">{words.rules.reference}</Callout>
59
+ <Callout tone="info">{words.rules.console}</Callout>
53
60
  ) : (
54
61
  page !== null && (
55
62
  <p className="sc-rules-facts">
@@ -66,16 +73,58 @@ export function RulesView(props: RulesViewProps) {
66
73
  ) : (
67
74
  text
68
75
  )}
69
- {(props.editHref !== undefined || props.onArchive !== undefined) && (
76
+ {changed && (props.editHref !== undefined || props.onArchive !== undefined) && (
77
+ <div className="sc-rules-actions">
78
+ {props.editHref !== undefined && (
79
+ <a className="sc-button sc-button-secondary" href={props.editHref}>
80
+ {words.common.edit}
81
+ </a>
82
+ )}
83
+ {props.onArchive !== undefined && (
84
+ <Button variant="ghost" onClick={props.onArchive} disabled={props.busy === true}>
85
+ {words.common.remove}
86
+ </Button>
87
+ )}
88
+ </div>
89
+ )}
90
+ </div>
91
+ );
92
+ }
93
+
94
+ /** The workspace's rules where they are kept: the console's as they hold, then what the organization adds. */
95
+ function WorkspaceRules(props: RulesViewProps & { readonly own: string }) {
96
+ const words = useWords();
97
+ const language = useLanguage().tag;
98
+ const added = props.rules.added ?? null;
99
+ return (
100
+ <div>
101
+ <Callout tone="info">{words.rules.console}</Callout>
102
+ <Markdown source={fillRules(props.own, language)} docHref={props.docHref} />
103
+ <div className="sc-rules-added">
104
+ <h3 className="sc-section-title">{words.rules.added}</h3>
105
+ {added === null ? (
106
+ <p className="sc-muted">{words.rules.nothingAdded}</p>
107
+ ) : (
108
+ <>
109
+ <p className="sc-rules-facts">
110
+ {words.docs.version(added.page.version)} · {words.docs.writtenBy}{" "}
111
+ <Writer by={added.page.updatedBy} agent={added.page.agent} />{" "}
112
+ <Time iso={added.page.updatedAt} />
113
+ </p>
114
+ <Markdown source={fillRules(added.body, language)} docHref={props.docHref} />
115
+ </>
116
+ )}
117
+ </div>
118
+ {(props.editHref !== undefined || (added !== null && props.onArchive !== undefined)) && (
70
119
  <div className="sc-rules-actions">
71
120
  {props.editHref !== undefined && (
72
121
  <a className="sc-button sc-button-secondary" href={props.editHref}>
73
- {rules.source === "reference" ? words.rules.writeOrganizations : words.common.edit}
122
+ {added === null ? words.rules.add : words.common.edit}
74
123
  </a>
75
124
  )}
76
- {rules.source === "written" && props.onArchive !== undefined && (
125
+ {added !== null && props.onArchive !== undefined && (
77
126
  <Button variant="ghost" onClick={props.onArchive} disabled={props.busy === true}>
78
- {scope === "workspace" ? words.rules.useReference : words.common.remove}
127
+ {words.common.remove}
79
128
  </Button>
80
129
  )}
81
130
  </div>
@@ -85,10 +134,10 @@ export function RulesView(props: RulesViewProps) {
85
134
  }
86
135
 
87
136
  export interface RulesFormProps {
88
- /** The rules as they hold now: what the form starts from when a page is written. */
137
+ /** The rules as they hold now: what the form starts from where something is written. */
89
138
  readonly rules: RestRules;
90
139
  readonly scope: "workspace" | "project";
91
- /** What the form starts from when a project adds none yet: the headings, and nothing an agent could mistake for a rule. */
140
+ /** What the form starts from where nothing is written yet: a project's headings; nothing at the workspace. */
92
141
  readonly template: string;
93
142
  readonly busy?: boolean | undefined;
94
143
  readonly error?: string | undefined;
@@ -97,25 +146,29 @@ export interface RulesFormProps {
97
146
  readonly baseVersion?: number | undefined;
98
147
  }) => void;
99
148
  readonly onCancel?: (() => void) | undefined;
100
- /** Called to put the organization's page away, so that the console's own rules hold again; offered while one is written. */
101
- readonly onReset?: (() => void) | undefined;
102
149
  }
103
150
 
104
151
  /**
105
- * The form the rules are written on: prefilled with what holds (the console's own, for a
106
- * workspace that wrote none), and saving nothing that would change nothing: the text as it
107
- * is, or the console's own rules where they hold already. Where the organization's are
108
- * written, the console's own saved as they stand put the page away, as the reset does.
152
+ * The form what is added to the rules is written on. At the workspace it holds what the
153
+ * organization adds and nothing of the console's rules, which are read above it: empty until
154
+ * something is added. At a project it starts from the project's page, or from the headings.
155
+ * It saves nothing that would change nothing.
109
156
  */
110
157
  export function RulesForm(props: RulesFormProps) {
111
158
  const words = useWords();
159
+ const language = useLanguage().tag;
112
160
  const { rules, scope } = props;
113
- /** What holds now: the page written, or the console's own; nothing for a project that adds none. */
114
- const current = rules.source === "none" ? undefined : (rules.body ?? undefined);
161
+ // A console of before says the whole and no parts, and takes the whole back.
162
+ const parts = scope === "workspace" && rules.own !== undefined;
163
+ /** What is written now: what the organization adds, or the page as it holds; nothing where nothing is. */
164
+ const current = parts
165
+ ? rules.added?.body
166
+ : rules.source === "none"
167
+ ? undefined
168
+ : (rules.body ?? undefined);
169
+ const page = parts ? (rules.added?.page ?? null) : rules.page;
115
170
  const [body, setBody] = useState(current ?? props.template);
116
- const unchanged =
117
- body.trim() === (current ?? "").trim() ||
118
- (scope === "workspace" && rules.source === "reference" && isReferenceRules(body));
171
+ const unchanged = body.trim() === (current ?? "").trim();
119
172
  const ready = !unchanged && body.trim().length > 0;
120
173
 
121
174
  const submit = (event: FormEvent) => {
@@ -125,14 +178,22 @@ export function RulesForm(props: RulesFormProps) {
125
178
  }
126
179
  props.onSubmit({
127
180
  body,
128
- ...(rules.page === null ? {} : { baseVersion: rules.page.version }),
181
+ ...(page === null ? {} : { baseVersion: page.version }),
129
182
  });
130
183
  };
131
184
 
132
185
  return (
133
186
  <form className="sc-form" onSubmit={submit}>
187
+ {parts && rules.own !== undefined && (
188
+ <details className="sc-rules-fold">
189
+ <summary>{words.rules.readConsole}</summary>
190
+ <Markdown source={fillRules(rules.own, language)} />
191
+ </details>
192
+ )}
134
193
  <label className="sc-field">
135
- <span className="sc-field-label">{words.rules.form.body}</span>
194
+ <span className="sc-field-label">
195
+ {scope === "workspace" ? words.rules.added : words.rules.form.body}
196
+ </span>
136
197
  <textarea
137
198
  className="sc-input sc-textarea sc-doc-editor"
138
199
  value={body}
@@ -140,7 +201,11 @@ export function RulesForm(props: RulesFormProps) {
140
201
  rows={20}
141
202
  onChange={(event) => setBody(event.target.value)}
142
203
  />
143
- <span className="sc-muted">{words.rules.form.hint(MAX_RULES_LENGTH)}</span>
204
+ <span className="sc-muted">
205
+ {scope === "workspace"
206
+ ? words.rules.form.hintAdded(MAX_RULES_LENGTH)
207
+ : words.rules.form.hint(MAX_RULES_LENGTH)}
208
+ </span>
144
209
  </label>
145
210
  {props.error !== undefined && (
146
211
  <p className="sc-form-error" role="alert">
@@ -156,11 +221,6 @@ export function RulesForm(props: RulesFormProps) {
156
221
  {words.common.cancel}
157
222
  </Button>
158
223
  )}
159
- {props.onReset !== undefined && rules.source === "written" && (
160
- <Button variant="ghost" onClick={props.onReset} disabled={props.busy === true}>
161
- {words.rules.useReference}
162
- </Button>
163
- )}
164
224
  </div>
165
225
  </form>
166
226
  );
@@ -47,11 +47,14 @@ export function SessionList(props: SessionListProps) {
47
47
  const words = useWords().sessions;
48
48
  const others = props.sessions.filter((session) => !session.current);
49
49
  const deviceOf = (session: RestSession): string =>
50
- session.browser !== null && session.platform !== null
51
- ? words.on(session.browser, session.platform)
52
- : (session.browser ?? session.platform ?? words.unknownBrowser);
50
+ // The command signed in as the account itself (ADR-0084), by what it called itself.
51
+ session.kind === "command"
52
+ ? words.command(session.name ?? "")
53
+ : session.browser !== null && session.platform !== null
54
+ ? words.on(session.browser, session.platform)
55
+ : (session.browser ?? session.platform ?? words.unknownBrowser);
53
56
  return (
54
- <section className="sc-panel sc-sessions" aria-label={words.title}>
57
+ <section className="sc-panel" aria-label={words.title}>
55
58
  <div className="sc-section-head">
56
59
  <h2 className="sc-section-title">{words.title}</h2>
57
60
  {props.onEndOthers !== undefined && others.length > 0 && (
@@ -0,0 +1,252 @@
1
+ import type { ReactNode } from "react";
2
+ import {
3
+ type FirstSignIn,
4
+ hostOfLogin,
5
+ type RestAgentInvitation,
6
+ type RestAgentInvitationMade,
7
+ type RestAgentSetup,
8
+ } from "../api.js";
9
+ import { useWords } from "../i18n/index.js";
10
+ import { type SetupGuide, setupSentenceOf } from "../setup-guide.js";
11
+ import { AvatarPicture, Badge, Button, Callout, CopyButton, cx, personName, Time } from "./ui.js";
12
+
13
+ // The way a machine is led to an agent account (ADR-0088): the invitation as a supervisor sees
14
+ // it under the account, with the one line to say on the machine, and the guide its code opens,
15
+ // as a person reads it. Each takes its data as props and nothing from the network.
16
+
17
+ /** A guide's sentence, with what it writes between backticks set as code. */
18
+ function withCode(text: string): ReactNode[] {
19
+ return text.split("`").map((part, index) =>
20
+ // biome-ignore lint/suspicious/noArrayIndexKey: the parts of one sentence, never reordered
21
+ index % 2 === 1 ? <code key={index}>{part}</code> : part,
22
+ );
23
+ }
24
+
25
+ /** A line to copy as it is. */
26
+ function Line(props: { readonly text: string }) {
27
+ return (
28
+ <div className="sc-copyable">
29
+ <pre className="sc-code">{props.text}</pre>
30
+ <CopyButton text={props.text} size="sm" />
31
+ </div>
32
+ );
33
+ }
34
+
35
+ export interface SetupGuideViewProps {
36
+ readonly guide: SetupGuide;
37
+ /** The account the setup is for, as the code opens it. */
38
+ readonly account: RestAgentSetup["account"];
39
+ }
40
+
41
+ /** The guide of one agent account's setup, in the order it is done and by whom. */
42
+ export function SetupGuideView(props: SetupGuideViewProps) {
43
+ const words = useWords().setup;
44
+ const { guide, account } = props;
45
+ return (
46
+ <article className="sc-setup">
47
+ <header className="sc-setup-head">
48
+ {account.avatarParts !== null && account.avatarParts !== undefined && (
49
+ <AvatarPicture parts={account.avatarParts} className="sc-avatar sc-avatar-lg" />
50
+ )}
51
+ <h1 className="sc-page-title">{guide.title}</h1>
52
+ </header>
53
+ {guide.about.map((paragraph) => (
54
+ <p key={paragraph}>{withCode(paragraph)}</p>
55
+ ))}
56
+ <p className="sc-muted">
57
+ {words.goodUntil} <Time iso={guide.expiresAt} />
58
+ {words.inEnglish.length > 0 && ` · ${words.inEnglish}`}
59
+ </p>
60
+ {guide.sections.map((section, index) => (
61
+ <section key={section.key} className="sc-panel sc-setup-section" aria-label={section.title}>
62
+ <h2 className="sc-section-title">
63
+ {index + 1}. {section.title} <Badge>{words.who[section.who]}</Badge>
64
+ </h2>
65
+ <p className="sc-field-hint">{section.about}</p>
66
+ <ol className="sc-setup-steps">
67
+ {section.steps.map((step) => (
68
+ <li key={step.title}>
69
+ <strong>{withCode(step.title)}</strong>
70
+ <p>{withCode(step.body)}</p>
71
+ {step.line !== undefined && <Line text={step.line} />}
72
+ </li>
73
+ ))}
74
+ </ol>
75
+ </section>
76
+ ))}
77
+ </article>
78
+ );
79
+ }
80
+
81
+ export interface AgentInvitationPanelProps {
82
+ /** The invitation as it stands: `null` for none, nothing while it is not read yet. */
83
+ readonly invitation: RestAgentInvitation | null | undefined;
84
+ /** The invitation just made, with its code, which is shown this once. */
85
+ readonly made?: RestAgentInvitationMade | undefined;
86
+ /** Whether what an invitation is is said first; left out where the words around the panel say it. */
87
+ readonly intro?: boolean | undefined;
88
+ /** Where a person reads the guide a code opens. */
89
+ readonly guideHref: (code: string) => string;
90
+ readonly busy?: boolean;
91
+ readonly onInvite: () => void;
92
+ readonly onRevoke: () => void;
93
+ }
94
+
95
+ /**
96
+ * The invitation of an agent account, for a supervisor: whether one stands, the way to make one,
97
+ * to make it again and to take it away, and, once made, the one line to say on the machine.
98
+ */
99
+ export function AgentInvitationPanel(props: AgentInvitationPanelProps) {
100
+ const words = useWords().agents.page.settings.machine;
101
+ const { invitation, made } = props;
102
+ const busy = props.busy === true;
103
+ const standing = made?.invitation ?? invitation;
104
+ return (
105
+ <div className="sc-agent-invitation">
106
+ {props.intro !== false && <p className="sc-field-hint">{words.intro}</p>}
107
+ {made !== undefined ? (
108
+ <Callout tone="warning" title={words.made.title}>
109
+ <p>{words.made.say}</p>
110
+ <Line text={setupSentenceOf(made.command)} />
111
+ <p>{words.made.orRun}</p>
112
+ <Line text={made.command} />
113
+ <p>
114
+ <a href={props.guideHref(made.code)}>{words.made.guide}</a>
115
+ </p>
116
+ <p>
117
+ {words.made.once} <Time iso={made.invitation.expiresAt} />
118
+ </p>
119
+ </Callout>
120
+ ) : standing === undefined ? null : standing === null ? (
121
+ <p>{words.none}</p>
122
+ ) : (
123
+ <p>
124
+ {words.stands} <Time iso={standing.expiresAt} />
125
+ {standing.by !== null && ` · ${words.by(personName(standing.by))}`}
126
+ {". "}
127
+ {words.shownOnce}
128
+ </p>
129
+ )}
130
+ <div className="sc-agent-invitation-actions">
131
+ <Button disabled={busy || invitation === undefined} onClick={props.onInvite}>
132
+ {standing === null || standing === undefined ? words.invite : words.again}
133
+ </Button>
134
+ {standing !== null && standing !== undefined && (
135
+ <Button variant="ghost" disabled={busy} onClick={props.onRevoke}>
136
+ {words.revoke}
137
+ </Button>
138
+ )}
139
+ </div>
140
+ </div>
141
+ );
142
+ }
143
+
144
+ export interface AgentStartStepsProps {
145
+ /** The login the account signs in to the console with, and what its provider is called. */
146
+ readonly login: string;
147
+ readonly provider: string;
148
+ /** Whether anyone has signed in with the account. */
149
+ readonly signedIn: boolean;
150
+ /**
151
+ * What its first sign-in is held to at a git host (ADR-0126), as the console answers it of
152
+ * the account: left out, as a console older than the answer leaves it, the login alone.
153
+ */
154
+ readonly firstSignIn?: FirstSignIn | undefined;
155
+ /** Whether an invitation stands. */
156
+ readonly invited: boolean;
157
+ /** Whether the account's command is signed in on a machine. */
158
+ readonly onMachine: boolean;
159
+ /** Whether its runner was ever heard from. */
160
+ readonly heard: boolean;
161
+ /** The invitation, with the way to make one: shown under its step. */
162
+ readonly invitation?: ReactNode;
163
+ }
164
+
165
+ /**
166
+ * What stands between an agent account that was just added and one at work, in the order it is
167
+ * done: the account it signs in with, an invitation, the one line on its machine, its runner.
168
+ * Each is said done as the console sees it, so that whoever looks reads what is next. Who makes
169
+ * the account at the provider is not said: the account is named, and when it has to be there
170
+ * (ADR-0094), which at a git host is already, since a login there is whoever's registers it:
171
+ * the step says whether the host said which account the login is, and marks the account not
172
+ * confirmed where it did not (ADR-0126).
173
+ */
174
+ export function AgentStartSteps(props: AgentStartStepsProps) {
175
+ const words = useWords().agents.page.start;
176
+ // A step further on that is done says the ones before it are: a runner heard from was set up.
177
+ const heard = props.heard;
178
+ const onMachine = props.onMachine || heard;
179
+ const signedIn = props.signedIn || onMachine;
180
+ const atGitHost = hostOfLogin(props.login) === "gh";
181
+ const heldTo = props.firstSignIn ?? "login";
182
+ const steps: readonly {
183
+ readonly key: string;
184
+ readonly title: string;
185
+ readonly body: string;
186
+ readonly done: boolean;
187
+ /** What is to be seen of a step that is not done, beside its title. */
188
+ readonly mark?: string | undefined;
189
+ readonly more?: ReactNode;
190
+ }[] = [
191
+ {
192
+ key: "account",
193
+ title: words.account.title,
194
+ body: signedIn
195
+ ? words.account.done(props.login)
196
+ : atGitHost
197
+ ? words.account.at.gh[heldTo](props.login, props.provider)
198
+ : words.account.at.google(props.login, props.provider),
199
+ done: signedIn,
200
+ mark: !signedIn && atGitHost && heldTo !== "account" ? words.account.notConfirmed : undefined,
201
+ },
202
+ {
203
+ key: "invitation",
204
+ title: words.invitation.title,
205
+ body: words.invitation.body,
206
+ done: props.invited || onMachine,
207
+ more: onMachine ? undefined : props.invitation,
208
+ },
209
+ {
210
+ key: "machine",
211
+ title: words.machine.title,
212
+ body: onMachine ? words.machine.done : words.machine.body,
213
+ done: onMachine,
214
+ },
215
+ {
216
+ key: "runner",
217
+ title: words.runner.title,
218
+ body: heard ? words.runner.done : words.runner.body,
219
+ done: heard,
220
+ },
221
+ ];
222
+ // What is next is the first step not done. Whether the account is there at its provider the
223
+ // console cannot see before it signs in: once a later step is done, the one after that is next.
224
+ const open = steps.findIndex((step) => !step.done);
225
+ const next = steps.some((step, index) => index > open && step.done)
226
+ ? steps.findIndex((step, index) => index > open && !step.done)
227
+ : open;
228
+ return (
229
+ <ol className="sc-steps" aria-label={words.title}>
230
+ {steps.map((step, index) => (
231
+ <li
232
+ key={step.key}
233
+ className={cx("sc-step", step.done && "sc-step-done", index === next && "sc-step-next")}
234
+ aria-current={index === next ? "step" : undefined}
235
+ >
236
+ <span className="sc-step-mark" aria-hidden="true">
237
+ {index + 1}
238
+ </span>
239
+ <div className="sc-step-what">
240
+ <span className="sc-step-title">
241
+ {step.title}
242
+ {step.done && <Badge tone="success">{words.done}</Badge>}
243
+ {!step.done && step.mark !== undefined && <Badge tone="warning">{step.mark}</Badge>}
244
+ </span>
245
+ <p className="sc-step-body">{step.body}</p>
246
+ {step.more}
247
+ </div>
248
+ </li>
249
+ ))}
250
+ </ol>
251
+ );
252
+ }
@@ -90,7 +90,7 @@ export function SignIn(props: SignInProps) {
90
90
  onClick={take(provider.key)}
91
91
  >
92
92
  <ProviderMark provider={provider.key} />
93
- <span className="sc-sign-in-button-label">
93
+ <span>
94
94
  {going ? words.going(provider.label) : words.signInWith(provider.label)}
95
95
  </span>
96
96
  {going && (
@@ -17,7 +17,15 @@ import {
17
17
  import { useWords } from "../i18n/index.js";
18
18
  import { Picker, type PickerSearch } from "./picker.js";
19
19
  import { peopleSearch } from "./searches.js";
20
- import { Button, Chip, GoalStateBadge, PersonChip, personName, StateBadge } from "./ui.js";
20
+ import {
21
+ Button,
22
+ Chip,
23
+ GoalStateBadge,
24
+ PersonChip,
25
+ PersonOption,
26
+ personName,
27
+ StateBadge,
28
+ } from "./ui.js";
21
29
 
22
30
  // Writing a task, or changing one. The bounds are the package's, said before a request is made.
23
31
  // The plan is two days (ADR-0019); what happened to the task is the board's to keep, not a
@@ -219,7 +227,7 @@ export function TaskForm(props: TaskFormProps) {
219
227
  </label>
220
228
  )}
221
229
  </div>
222
- <fieldset className="sc-field sc-workers-field">
230
+ <fieldset className="sc-field">
223
231
  <legend className="sc-field-label">{form.workers}</legend>
224
232
  <div className="sc-chips">
225
233
  {chosenWorkers.map((person) => (
@@ -238,6 +246,7 @@ export function TaskForm(props: TaskFormProps) {
238
246
  search={peopleSearch(otherPeople)}
239
247
  keyOf={(person) => person.id}
240
248
  render={(person) => <PersonChip person={person} size="sm" />}
249
+ renderOption={(person) => <PersonOption person={person} />}
241
250
  label={form.addWorker}
242
251
  placeholder={form.addWorker}
243
252
  onChange={(person) => {
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { RestTask } from "../api.js";
2
+ import type { RestTaskBrief } from "../api.js";
3
3
  import { useWords } from "../i18n/index.js";
4
4
  import { ShowMore, usePaged } from "./paged.js";
5
5
  import { Badge, CategoryBadge, DueBadge, StateBadge, Workers } from "./ui.js";
@@ -9,20 +9,21 @@ import { Badge, CategoryBadge, DueBadge, StateBadge, Workers } from "./ui.js";
9
9
  // in one line; a long list shows a page at a time. Takes its data as props and nothing from
10
10
  // the network.
11
11
 
12
- export interface TaskListProps {
13
- readonly tasks: readonly RestTask[];
14
- readonly taskHref: (task: RestTask) => string;
12
+ /** The tasks as they came, with at least what a row says (`RestTaskBrief`); the callbacks are given them as they are. */
13
+ export interface TaskListProps<T extends RestTaskBrief = RestTaskBrief> {
14
+ readonly tasks: readonly T[];
15
+ readonly taskHref: (task: T) => string;
15
16
  /** Whether each row says the task's state: where the rows are not grouped by it. */
16
17
  readonly showState?: boolean | undefined;
17
18
  /** What the row says the task belongs to, where tasks of several projects are listed together. */
18
- readonly projectOf?: ((task: RestTask) => ReactNode) | undefined;
19
+ readonly projectOf?: ((task: T) => ReactNode) | undefined;
19
20
  /** The day to count due days from; the browser's today when left out. */
20
21
  readonly today?: string | undefined;
21
22
  readonly label?: string | undefined;
22
23
  readonly empty?: ReactNode;
23
24
  }
24
25
 
25
- export function TaskList(props: TaskListProps) {
26
+ export function TaskList<T extends RestTaskBrief>(props: TaskListProps<T>) {
26
27
  const words = useWords();
27
28
  const { shown, rest, more } = usePaged(props.tasks);
28
29
  if (props.tasks.length === 0) {
@@ -20,6 +20,7 @@ import type { TaskFormKind } from "../router.js";
20
20
  import { TASK_STATES } from "../vocabulary.js";
21
21
  import { type CommentDraft, TaskThread } from "./comments.js";
22
22
  import { DecisionForm } from "./decision-form.js";
23
+ import type { DecisionAddressing } from "./decision-list.js";
23
24
  import { EventFeed } from "./event-feed.js";
24
25
  import { Markdown } from "./markdown.js";
25
26
  import { type GoalSearch, TaskForm, type TaskSearch } from "./task-form.js";
@@ -91,6 +92,8 @@ export interface TaskViewProps {
91
92
  readonly onUpdateDecision?:
92
93
  | ((decision: RestDecision, patch: RestDecisionPatch) => void)
93
94
  | undefined;
95
+ /** How a waiting decision about the task is addressed anew (ADR-0096). */
96
+ readonly addressing?: DecisionAddressing | undefined;
94
97
  readonly onAbandonRun?: ((run: RestRun) => void) | undefined;
95
98
  /** Called to put a done or dropped task away, and to bring one back (ADR-0029); left out, neither is offered. */
96
99
  readonly onArchive?: ((task: RestTask) => void) | undefined;
@@ -248,6 +251,7 @@ export function TaskView(props: TaskViewProps) {
248
251
  docHref={props.docHref}
249
252
  onAnswer={props.onAnswer}
250
253
  onUpdateDecision={props.onUpdateDecision}
254
+ addressing={props.addressing}
251
255
  onAbandonRun={props.onAbandonRun}
252
256
  onComment={props.onComment}
253
257
  busy={props.busy}