@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
package/src/client.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  AUTH_ROUTES,
3
+ agentPath,
3
4
  CLAIM_PATH,
4
5
  categoryPath,
5
6
  connectPath,
@@ -14,6 +15,23 @@ import {
14
15
  rulesPath,
15
16
  } from "./routes.js";
16
17
  import {
18
+ type RestAgent,
19
+ type RestAgentInput,
20
+ type RestAgentInvitationMade,
21
+ type RestAgentInvitationState,
22
+ type RestAgentPatch,
23
+ type RestAgentProposals,
24
+ type RestAgentSecret,
25
+ type RestAgentSecretAccesses,
26
+ type RestAgentSecretInput,
27
+ type RestAgentSecrets,
28
+ type RestAgentSecretValue,
29
+ type RestAgentSession,
30
+ type RestAgentSessionEndInput,
31
+ type RestAgentSessionInput,
32
+ type RestAgentSessions,
33
+ type RestAgentSetup,
34
+ type RestAgents,
17
35
  type RestAnswerInput,
18
36
  type RestArchivedTasks,
19
37
  type RestArtifactInput,
@@ -28,6 +46,7 @@ import {
28
46
  type RestConnection,
29
47
  type RestConnectRequest,
30
48
  type RestDecision,
49
+ type RestDecisionDeciders,
31
50
  type RestDecisionInput,
32
51
  type RestDecisionPatch,
33
52
  type RestDecisions,
@@ -41,6 +60,7 @@ import {
41
60
  type RestGoals,
42
61
  type RestListing,
43
62
  type RestListingInput,
63
+ type RestManager,
44
64
  type RestMe,
45
65
  type RestMember,
46
66
  type RestMemberInput,
@@ -55,6 +75,7 @@ import {
55
75
  type RestPerson,
56
76
  type RestPersonPatch,
57
77
  type RestPersonWork,
78
+ type RestPersonWorkBrief,
58
79
  type RestPluginCommandInput,
59
80
  type RestPluginDetail,
60
81
  type RestPluginEnableInput,
@@ -71,6 +92,7 @@ import {
71
92
  type RestPluginSettingsPatch,
72
93
  type RestPlugins,
73
94
  type RestProject,
95
+ type RestProjectGlance,
74
96
  type RestProjectInput,
75
97
  type RestProjectPatch,
76
98
  type RestProjectRules,
@@ -80,16 +102,26 @@ import {
80
102
  type RestRules,
81
103
  type RestRulesInput,
82
104
  type RestRun,
105
+ type RestRunBriefs,
83
106
  type RestRunEndInput,
84
107
  type RestRunInput,
108
+ type RestRunnerHeartbeat,
109
+ type RestRunnerHeartbeatInput,
110
+ type RestRunnerWake,
85
111
  type RestRuns,
86
112
  type RestSessions,
113
+ type RestSignal,
114
+ type RestSignalInput,
115
+ type RestSignals,
87
116
  type RestSkillBrowse,
117
+ type RestSkillCode,
88
118
  type RestSkillFile,
89
119
  type RestSkillFind,
90
120
  type RestSkillLoad,
121
+ type RestSkillRows,
91
122
  type RestSkills,
92
123
  type RestTask,
124
+ type RestTaskBriefs,
93
125
  type RestTaskInput,
94
126
  type RestTaskPatch,
95
127
  type RestTasks,
@@ -100,12 +132,32 @@ import {
100
132
  type RestTokenCreated,
101
133
  type RestTokenInput,
102
134
  type RestTokens,
135
+ type RestTranscriptBatch,
136
+ type RestTranscriptBatchInput,
137
+ type RestTranscriptEvent,
138
+ type RestTranscriptEvents,
139
+ type RestTranscriptFile,
140
+ type RestTranscriptSealInput,
141
+ type RestTranscriptText,
103
142
  type RestVersion,
104
143
  type RestVersions,
105
144
  type RestWork,
145
+ type RestWorkBrief,
106
146
  type RestWorkspace,
107
147
  type RestWorkspacePackConnect,
108
148
  type RestWorkspacePatch,
149
+ restAgentInvitationMadeSchema,
150
+ restAgentInvitationStateSchema,
151
+ restAgentProposalsSchema,
152
+ restAgentSchema,
153
+ restAgentSecretAccessesSchema,
154
+ restAgentSecretSchema,
155
+ restAgentSecretsSchema,
156
+ restAgentSecretValueSchema,
157
+ restAgentSessionSchema,
158
+ restAgentSessionsSchema,
159
+ restAgentSetupSchema,
160
+ restAgentsSchema,
109
161
  restArchivedTasksSchema,
110
162
  restCategoriesSchema,
111
163
  restCategorySchema,
@@ -123,6 +175,7 @@ import {
123
175
  restGoalSchema,
124
176
  restGoalsSchema,
125
177
  restListingSchema,
178
+ restManagerSchema,
126
179
  restMemberSchema,
127
180
  restMembersSchema,
128
181
  restMeSchema,
@@ -131,6 +184,7 @@ import {
131
184
  restPackConnectStartedSchema,
132
185
  restPeopleSchema,
133
186
  restPersonSchema,
187
+ restPersonWorkBriefSchema,
134
188
  restPersonWorkSchema,
135
189
  restPluginDetailSchema,
136
190
  restPluginEventsSchema,
@@ -142,31 +196,46 @@ import {
142
196
  restPluginRecordReadSchema,
143
197
  restPluginRecordVersionsSchema,
144
198
  restPluginsSchema,
199
+ restProjectGlanceSchema,
145
200
  restProjectRulesSchema,
146
201
  restProjectSchema,
147
202
  restProjectsSchema,
148
203
  restReachedDecisionSchema,
149
204
  restRulesSchema,
205
+ restRunBriefsSchema,
206
+ restRunnerHeartbeatSchema,
150
207
  restRunSchema,
151
208
  restRunsSchema,
152
209
  restSessionsSchema,
210
+ restSignalSchema,
211
+ restSignalsSchema,
153
212
  restSkillBrowseSchema,
213
+ restSkillCodeSchema,
154
214
  restSkillFileSchema,
155
215
  restSkillFindSchema,
156
216
  restSkillLoadSchema,
217
+ restSkillRowsSchema,
157
218
  restSkillsSchema,
219
+ restTaskBriefsSchema,
158
220
  restTaskSchema,
159
221
  restTasksSchema,
160
222
  restTeamSchema,
161
223
  restTeamsSchema,
162
224
  restTokenCreatedSchema,
163
225
  restTokensSchema,
226
+ restTranscriptBatchSchema,
227
+ restTranscriptEventSchema,
228
+ restTranscriptEventsSchema,
229
+ restTranscriptFileSchema,
230
+ restTranscriptTextSchema,
164
231
  restVersionSchema,
165
232
  restVersionsSchema,
233
+ restWorkBriefSchema,
166
234
  restWorkSchema,
167
235
  restWorkspacePackConnectSchema,
168
236
  restWorkspaceSchema,
169
237
  } from "./schemas.js";
238
+ import { readSse } from "./sse.js";
170
239
  import type { GoalState, TaskState } from "./vocabulary.js";
171
240
 
172
241
  // The client of the console's REST API: what the default console and a custom one talk to the
@@ -298,12 +367,29 @@ export interface DocumentFilter {
298
367
  readonly archived?: boolean | undefined;
299
368
  }
300
369
 
370
+ /**
371
+ * The reads of a pack: the listing, one skill, a file, a folder, what words find, and the tables
372
+ * and the code blocks as data. A project's client has them for the project's pack, a plugin's
373
+ * for its own, and the console's client for the organization's (`organizationPack()`).
374
+ */
375
+ export type PackClient = Pick<
376
+ ProjectClient,
377
+ "skills" | "skill" | "skillFile" | "skillBrowse" | "skillFind" | "skillRows" | "skillCode"
378
+ >;
379
+
301
380
  /** The board of one project, as the asker may see and change it. */
302
381
  export interface ProjectClient {
303
382
  /** The key the project is reached by. */
304
383
  readonly key: string;
305
384
  /** The project, with what the asker is in it. */
306
385
  get(signal?: AbortSignal): Promise<RestProject>;
386
+ /**
387
+ * What the project's tile at a glance shows (ADR-0105), in one answer read at one moment
388
+ * (ADR-0107): its tasks counted by state, the decisions waiting, and its tasks in progress,
389
+ * its tasks in review and its goals ahead, each ordered and cut by the console with how many
390
+ * there are in all.
391
+ */
392
+ glance(signal?: AbortSignal): Promise<RestProjectGlance>;
307
393
  /** Changes the project's settings; for an owner. */
308
394
  update(patch: RestProjectPatch): Promise<RestProject>;
309
395
  /** Sets the project's own image for its mark, sent as a form; for an owner on the console's own pages. */
@@ -317,6 +403,12 @@ export interface ProjectClient {
317
403
  updateMember(personId: string, patch: RestMemberPatch): Promise<RestMember>;
318
404
  removeMember(personId: string): Promise<void>;
319
405
  tasks(filter?: TaskFilter, signal?: AbortSignal): Promise<RestTasks>;
406
+ /**
407
+ * The same page of the board without the tasks' bodies (`?brief=true`), for what lists tasks
408
+ * and shows no body. A console from before the brief form answers the tasks whole, and they
409
+ * read the same.
410
+ */
411
+ taskBriefs(filter?: TaskFilter, signal?: AbortSignal): Promise<RestTaskBriefs>;
320
412
  /** One task, by its id or by its number. */
321
413
  task(ref: string, signal?: AbortSignal): Promise<RestTask>;
322
414
  createTask(input: RestTaskInput): Promise<RestTask>;
@@ -342,11 +434,22 @@ export interface ProjectClient {
342
434
  answerDecision(id: string, input: RestAnswerInput): Promise<RestDecision>;
343
435
  /** Grows a decision's record: its context, or what followed. */
344
436
  updateDecision(id: string, patch: RestDecisionPatch): Promise<RestDecision>;
437
+ /** Addresses a decision that waits anew (ADR-0096): the people named, by id, take the place of those it was for. */
438
+ addressDecision(id: string, deciderIds: readonly string[]): Promise<RestDecision>;
345
439
  /** The runs, newest first; or only those on one task, only the open ones, only the asker's own; a page of them. */
346
440
  runs(
347
441
  filter?: { readonly task?: string; readonly open?: boolean; readonly mine?: boolean } & Page,
348
442
  signal?: AbortSignal,
349
443
  ): Promise<RestRuns>;
444
+ /**
445
+ * The same page of the runs without their reports, counted (`?brief=true`), for what lists
446
+ * runs and shows no report. A console from before the brief form answers the runs whole,
447
+ * which reads the same: `reportCountOf` says how many reports a run has either way.
448
+ */
449
+ runBriefs(
450
+ filter?: { readonly task?: string; readonly open?: boolean; readonly mine?: boolean } & Page,
451
+ signal?: AbortSignal,
452
+ ): Promise<RestRunBriefs>;
350
453
  run(id: string, signal?: AbortSignal): Promise<RestRun>;
351
454
  /** Takes a task: a run begins, for the person the asker is or acts for. */
352
455
  startRun(input: RestRunInput): Promise<RestRun>;
@@ -399,6 +502,30 @@ export interface ProjectClient {
399
502
  },
400
503
  signal?: AbortSignal,
401
504
  ): Promise<RestSkillFind>;
505
+ /**
506
+ * The tables of a document of the pack, or of every document under a folder, as data: a page
507
+ * of them by whole files, under a heading that holds the words of `heading` when given; the
508
+ * mounted folder when `path` is left out (ADR-0100).
509
+ */
510
+ skillRows(
511
+ page?: {
512
+ readonly path?: string | undefined;
513
+ readonly heading?: string | undefined;
514
+ readonly cursor?: string | undefined;
515
+ readonly limit?: number | undefined;
516
+ },
517
+ signal?: AbortSignal,
518
+ ): Promise<RestSkillRows>;
519
+ /** The fenced code blocks of a document of the pack, or of every document under a folder, as data: a page of them, as `skillRows` answers the tables. */
520
+ skillCode(
521
+ page?: {
522
+ readonly path?: string | undefined;
523
+ readonly heading?: string | undefined;
524
+ readonly cursor?: string | undefined;
525
+ readonly limit?: number | undefined;
526
+ },
527
+ signal?: AbortSignal,
528
+ ): Promise<RestSkillCode>;
402
529
  /** Sets the pack token the project reads a private pack with; for an owner. The token travels once and is answered never. */
403
530
  setPackToken(input: RestPackTokenInput): Promise<RestProject>;
404
531
  /** Takes the pack token away; for an owner. */
@@ -525,7 +652,7 @@ export interface PluginClient {
525
652
  ): Promise<RestPluginEvents>;
526
653
  /** Removes everything the console keeps of a disabled plugin, the key named again; for an administrator. */
527
654
  purge(confirm: string): Promise<void>;
528
- /** The plugin's skills, a pack of its own read from its package, as a project's five reads. */
655
+ /** The plugin's skills, a pack of its own read from its package, as a project's reads. */
529
656
  skills(signal?: AbortSignal): Promise<RestSkills>;
530
657
  skill(path: string, cursor?: string, signal?: AbortSignal): Promise<RestSkillLoad>;
531
658
  skillFile(
@@ -550,8 +677,36 @@ export interface PluginClient {
550
677
  },
551
678
  signal?: AbortSignal,
552
679
  ): Promise<RestSkillFind>;
553
- /** The plugin's events, newest first, a page at a time. */
554
- events(page?: Page, signal?: AbortSignal): Promise<RestEvents>;
680
+ /** The tables and the code blocks of the plugin's documents as data, as a project's pack answers them. */
681
+ skillRows(
682
+ page?: {
683
+ readonly path?: string | undefined;
684
+ readonly heading?: string | undefined;
685
+ readonly cursor?: string | undefined;
686
+ readonly limit?: number | undefined;
687
+ },
688
+ signal?: AbortSignal,
689
+ ): Promise<RestSkillRows>;
690
+ skillCode(
691
+ page?: {
692
+ readonly path?: string | undefined;
693
+ readonly heading?: string | undefined;
694
+ readonly cursor?: string | undefined;
695
+ readonly limit?: number | undefined;
696
+ },
697
+ signal?: AbortSignal,
698
+ ): Promise<RestSkillCode>;
699
+ /**
700
+ * The plugin's events the asker may read, newest first, a page at a time: every one for an
701
+ * administrator; for anyone else those of the projects they may see, their own doing, and the
702
+ * console's word of the plugin, the rest left out with no word that it is there. Of one kind
703
+ * where one is named (ADR-0128), which a console before 0.5.1 does not narrow by and answers
704
+ * every kind.
705
+ */
706
+ events(
707
+ page?: Page & { readonly kind?: string | undefined },
708
+ signal?: AbortSignal,
709
+ ): Promise<RestEvents>;
555
710
  /** Enables the plugin, with consent to every capability it asks; for an administrator. */
556
711
  enable(input: RestPluginEnableInput): Promise<RestPluginDetail>;
557
712
  disable(): Promise<RestPluginDetail>;
@@ -559,9 +714,12 @@ export interface PluginClient {
559
714
  updateSettings(patch: RestPluginSettingsPatch): Promise<RestPluginDetail>;
560
715
  /** Says what an enabled plugin holds: those it requires, named again, and the optional ones to turn on. */
561
716
  updateConsent(consent: readonly string[]): Promise<RestPluginDetail>;
562
- /** Seals a secret for the plugin; it is answered by nothing from then on. */
563
- setSecret(name: string, value: string): Promise<void>;
564
- removeSecret(name: string): Promise<void>;
717
+ /**
718
+ * Seals a secret for the plugin; it is answered by nothing from then on. A keyed secret
719
+ * (ADR-0111) is set and removed under a key, one value at a time.
720
+ */
721
+ setSecret(name: string, value: string, key?: string): Promise<void>;
722
+ removeSecret(name: string, key?: string): Promise<void>;
565
723
  grants(signal?: AbortSignal): Promise<RestPluginGrants>;
566
724
  grant(input: RestPluginGrantInput): Promise<RestPluginGrant>;
567
725
  revoke(grantId: string): Promise<RestPluginGrant>;
@@ -587,6 +745,12 @@ export interface ConsoleClient {
587
745
  workspacePackTokenConnection(signal?: AbortSignal): Promise<RestWorkspacePackConnect>;
588
746
  claimWorkspacePackTokenConnection(signal?: AbortSignal): Promise<RestWorkspacePackConnect>;
589
747
  cancelWorkspacePackTokenConnection(): Promise<void>;
748
+ /**
749
+ * The organization's pack, read where no project is named (ADR-0113): the workspace's skills
750
+ * address, with the workspace's SkillCDN token where the pack is private; for every member
751
+ * of the workspace, as the workspace's rules are.
752
+ */
753
+ organizationPack(): PackClient;
590
754
  /** The people the asker may see: everyone, or those they share a project with (ADR-0035). */
591
755
  people(signal?: AbortSignal): Promise<RestPeople>;
592
756
  /**
@@ -596,8 +760,126 @@ export interface ConsoleClient {
596
760
  findPerson(login: string, signal?: AbortSignal): Promise<RestPerson | undefined>;
597
761
  /** Changes what a person is, or whether they are in; for an administrator. */
598
762
  updatePerson(id: string, patch: RestPersonPatch): Promise<RestPerson>;
763
+ /** Whom whoever asks reports to, and the administrators, who stand in where there is nobody (ADR-0084). */
764
+ manager(signal?: AbortSignal): Promise<RestManager>;
765
+ /**
766
+ * An agent account's secret store (ADR-0087), for the account itself on a session of its own:
767
+ * the names; one with its value; one set; one removed. Every reading of a value is noted.
768
+ */
769
+ secrets(signal?: AbortSignal): Promise<RestAgentSecrets>;
770
+ secret(name: string, signal?: AbortSignal): Promise<RestAgentSecretValue>;
771
+ setSecret(name: string, input: RestAgentSecretInput): Promise<RestAgentSecret>;
772
+ removeSecret(name: string): Promise<void>;
773
+ /** An agent account's secrets for a supervisor: the names, one seeded write-only, one removed; never a value. */
774
+ agentSecrets(handle: string, signal?: AbortSignal): Promise<RestAgentSecrets>;
775
+ seedAgentSecret(
776
+ handle: string,
777
+ name: string,
778
+ input: RestAgentSecretInput,
779
+ ): Promise<RestAgentSecret>;
780
+ removeAgentSecret(handle: string, name: string): Promise<void>;
781
+ /** The invitation that leads a machine to an agent account (ADR-0088), as it stands; for a supervisor. */
782
+ agentInvitation(handle: string, signal?: AbortSignal): Promise<RestAgentInvitationState>;
783
+ /** Makes the invitation, in place of the one there was: the code this once, and the command to run with it. */
784
+ inviteAgent(handle: string): Promise<RestAgentInvitationMade>;
785
+ /** Takes the invitation away. */
786
+ revokeAgentInvitation(handle: string): Promise<void>;
787
+ /** What an invitation's code opens, for whoever holds it, signed in or not. */
788
+ agentSetup(code: string, signal?: AbortSignal): Promise<RestAgentSetup>;
789
+ /** The account's record of its store, the newest first, for a supervisor. */
790
+ agentSecretAccesses(
791
+ handle: string,
792
+ query?: { readonly before?: number | undefined; readonly limit?: number | undefined },
793
+ signal?: AbortSignal,
794
+ ): Promise<RestAgentSecretAccesses>;
795
+ /**
796
+ * The signals of an agent account (ADR-0085): one sent, by a supervisor; and the record of
797
+ * them, the newest first, for its supervisors, or with `me` for the account itself.
798
+ */
799
+ sendSignal(
800
+ handle: string,
801
+ input: RestSignalInput,
802
+ /** The pictures a tell or an interrupt carries: sent with it, as the parts of a form. */
803
+ pictures?: readonly FileUpload[],
804
+ ): Promise<RestSignal>;
805
+ /** Where the bytes of a picture sent with a signal are read, for a supervisor of the account. */
806
+ signalFileUrl(handle: string, number: number, fileId: string): string;
807
+ /** The bytes of a picture sent with a signal of the account's own, for its runner to hand to the product. */
808
+ readSignalFile(number: number, fileId: string, signal?: AbortSignal): Promise<FileRead>;
809
+ signals(
810
+ handle: string,
811
+ query?: { readonly before?: number | undefined; readonly limit?: number | undefined },
812
+ signal?: AbortSignal,
813
+ ): Promise<RestSignals>;
814
+ /** The runner's heartbeat, on the command signed in as the account itself. */
815
+ runnerHeartbeat(input: RestRunnerHeartbeatInput): Promise<RestRunnerHeartbeat>;
816
+ /**
817
+ * The runner's stream of the account's signals after number `after`, in order, as they are
818
+ * sent, until the console ends it or `signal` says to stop. What does not read as a signal is
819
+ * left out.
820
+ */
821
+ signalStream(after: number, signal: AbortSignal): AsyncIterable<RestSignal>;
822
+ /** Raises a wake of the runner's own, from a wake source on its machine: it comes back in order on the stream. */
823
+ raiseWake(input: Omit<RestRunnerWake, "kind">): Promise<RestSignal>;
824
+ /** The runner begins a session (ADR-0086): the one that was open is taken over. */
825
+ beginAgentSession(input: RestAgentSessionInput): Promise<RestAgentSession>;
826
+ /** The runner reports a batch of a session's events, in order; the same number sent again changes nothing. */
827
+ sendTranscript(sessionId: string, input: RestTranscriptBatchInput): Promise<RestTranscriptBatch>;
828
+ /** The runner hands in a picture of a session, and is answered the id an event names it by. */
829
+ uploadTranscriptFile(sessionId: string, input: FileUpload): Promise<RestTranscriptFile>;
830
+ /** The runner ends a session, and says how. */
831
+ endAgentSession(sessionId: string, input: RestAgentSessionEndInput): Promise<RestAgentSession>;
832
+ /** The sessions of an agent account, the newest first; for its supervisors, and as `me` for the account itself. */
833
+ agentSessions(
834
+ handle: string,
835
+ query?: { readonly before?: string | undefined; readonly limit?: number | undefined },
836
+ signal?: AbortSignal,
837
+ ): Promise<RestAgentSessions>;
838
+ agentSession(handle: string, sessionId: string, signal?: AbortSignal): Promise<RestAgentSession>;
839
+ /** The events of a session after a number, in order, a page at a time. */
840
+ transcript(
841
+ handle: string,
842
+ sessionId: string,
843
+ query?: { readonly after?: number | undefined; readonly limit?: number | undefined },
844
+ signal?: AbortSignal,
845
+ ): Promise<RestTranscriptEvents>;
846
+ /** Where an `EventSource` subscribes to a session's events after number `after`, as they happen. */
847
+ transcriptStreamUrl(handle: string, sessionId: string, after: number): string;
848
+ /** The whole text of one event, where its row keeps the beginning alone. */
849
+ transcriptText(
850
+ handle: string,
851
+ sessionId: string,
852
+ n: number,
853
+ signal?: AbortSignal,
854
+ ): Promise<RestTranscriptText>;
855
+ /** Where the bytes of a picture of a session are read. */
856
+ transcriptFileUrl(handle: string, sessionId: string, fileId: string): string;
857
+ /** Seals an event: what it held is replaced by who sealed it, when and why; for an administrator. */
858
+ sealTranscriptEvent(
859
+ handle: string,
860
+ sessionId: string,
861
+ n: number,
862
+ input: RestTranscriptSealInput,
863
+ ): Promise<RestTranscriptEvent>;
864
+ /** Where an agent account is signed in, its browsers and its command; for a supervisor, on the console's own pages. */
865
+ agentSignIns(handle: string, signal?: AbortSignal): Promise<RestSessions>;
866
+ /** Ends one of an agent account's sessions; for a supervisor, on the console's own pages. */
867
+ endAgentSignIn(handle: string, sessionId: string): Promise<void>;
599
868
  /** Lets a login in (ADR-0022): whoever signs in with that account becomes a person; for an administrator. */
600
869
  createListing(input: RestListingInput): Promise<RestListing>;
870
+ /** The agent accounts the asker may see, and the ones they supervise (ADR-0084), by handle. */
871
+ agents(signal?: AbortSignal): Promise<RestAgents>;
872
+ /** One agent account by its handle. */
873
+ agent(handle: string, signal?: AbortSignal): Promise<RestAgent>;
874
+ /** Makes an agent account: the member's row at once, its login let in; for an administrator. */
875
+ createAgent(input: RestAgentInput): Promise<RestAgent>;
876
+ /** Keeps an agent account's persona, its name, its title, its avatar; for a supervisor. */
877
+ updateAgent(handle: string, patch: RestAgentPatch): Promise<RestAgent>;
878
+ /** A few personas to choose from, a name in `lang`, a handle nobody has and an avatar each; for an administrator. */
879
+ agentProposals(
880
+ query?: { readonly count?: number | undefined; readonly lang?: string | undefined },
881
+ signal?: AbortSignal,
882
+ ): Promise<RestAgentProposals>;
601
883
  /** Takes a listing away before anyone signed in with it; for an administrator. */
602
884
  removeListing(id: string): Promise<void>;
603
885
  /** The teams of the workspace (ADR-0073), each with the members the asker may see. */
@@ -627,11 +909,11 @@ export interface ConsoleClient {
627
909
  pictureUrl(url: string): string;
628
910
  /** The categories tasks are sorted into (ADR-0019), by name. */
629
911
  categories(signal?: AbortSignal): Promise<RestCategories>;
630
- /** The workspace's rules (ADR-0023): the console's own until an administrator writes the organization's. */
912
+ /** The workspace's rules (ADR-0120): the console's, which always hold, and what the organization adds to them. */
631
913
  rules(signal?: AbortSignal): Promise<RestRules>;
632
- /** Writes the organization's rules; for an administrator. The console's own, sent as they are, write nothing. */
914
+ /** Writes what the organization adds to the console's rules; for an administrator. */
633
915
  writeRules(input: RestRulesInput): Promise<RestRules>;
634
- /** Puts the organization's rules away, so that the console's own hold again; for an administrator. */
916
+ /** Puts what the organization adds away, so that the console's rules stand alone; for an administrator. */
635
917
  archiveRules(): Promise<RestRules>;
636
918
  /** The versions of the organization's rules, newest first; none while the console's own hold. */
637
919
  rulesVersions(signal?: AbortSignal): Promise<RestVersions>;
@@ -642,6 +924,8 @@ export interface ConsoleClient {
642
924
  removeCategory(key: string): Promise<void>;
643
925
  /** What is on the asker's plate across the projects they may see: their open tasks, and the decisions waiting for them. */
644
926
  work(signal?: AbortSignal): Promise<RestWork>;
927
+ /** The plate as its page shows it: the same without the bodies of the tasks and the decisions, which weigh more than the rest of the plate together. */
928
+ plate(signal?: AbortSignal): Promise<RestWorkBrief>;
645
929
  /** The decisions addressed to the asker (ADR-0042) across the projects they may see, or with `raised` those they raised for someone else: a page, the waiting first; or only those. */
646
930
  myDecisions(
647
931
  filter?: { readonly open?: boolean; readonly raised?: boolean } & Page,
@@ -671,6 +955,8 @@ export interface ConsoleClient {
671
955
  readDecisionFile(decisionId: string, fileId: string, signal?: AbortSignal): Promise<FileRead>;
672
956
  /** Another person's plate, within what the asker may see: for an administrator, or an owner of a project they are in. */
673
957
  personWork(personId: string, signal?: AbortSignal): Promise<RestPersonWork>;
958
+ /** Another person's plate as its page shows it: without the tasks' bodies. */
959
+ personPlate(personId: string, signal?: AbortSignal): Promise<RestPersonWorkBrief>;
674
960
  /** The tokens of whoever asks. */
675
961
  tokens(signal?: AbortSignal): Promise<RestTokens>;
676
962
  /** The browsers whoever asks is signed in on (board #309): the current first, then the last used first. */
@@ -813,6 +1099,30 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
813
1099
  value === undefined ? undefined : String(value);
814
1100
  const number = (value: number | undefined): string | undefined =>
815
1101
  value === undefined ? undefined : String(value);
1102
+ /** What narrows a page of the board, as the query of its address. */
1103
+ const tasksQuery = (filter: TaskFilter): Record<string, string | undefined> => ({
1104
+ state: filter.state,
1105
+ archived: flag(filter.archived),
1106
+ open: flag(filter.open),
1107
+ category: filter.category,
1108
+ goal: filter.goal,
1109
+ worker: filter.worker,
1110
+ unassigned: flag(filter.unassigned),
1111
+ dueBy: filter.dueBy,
1112
+ q: filter.q,
1113
+ limit: number(filter.limit),
1114
+ offset: number(filter.offset),
1115
+ });
1116
+ /** What narrows a page of the runs, as the query of its address. */
1117
+ const runsQuery = (
1118
+ filter: { readonly task?: string; readonly open?: boolean; readonly mine?: boolean } & Page,
1119
+ ): Record<string, string | undefined> => ({
1120
+ task: filter.task,
1121
+ open: flag(filter.open),
1122
+ mine: flag(filter.mine),
1123
+ limit: number(filter.limit),
1124
+ offset: number(filter.offset),
1125
+ });
816
1126
 
817
1127
  /** A file as the parts of a form: the bytes with their name and type, and the label. */
818
1128
  const formOf = (input: FileUpload): FormData => {
@@ -859,12 +1169,93 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
859
1169
  return form;
860
1170
  };
861
1171
 
1172
+ /**
1173
+ * The reads of a pack under `root`: a project's, a plugin's own, and the organization's where
1174
+ * no project is named (ADR-0113) are read by the same seven routes, each under its own root.
1175
+ */
1176
+ const packAt = (root: string): PackClient => ({
1177
+ skills: (signal) => request("GET", `${base}${root}`, undefined, restSkillsSchema, signal),
1178
+ skill: (path, cursor, signal) =>
1179
+ request(
1180
+ "GET",
1181
+ withQuery(`${root}/one`, { path, cursor }),
1182
+ undefined,
1183
+ restSkillLoadSchema,
1184
+ signal,
1185
+ ),
1186
+ skillFile: (path, page = {}, signal) =>
1187
+ request(
1188
+ "GET",
1189
+ withQuery(`${root}/file`, {
1190
+ path,
1191
+ offset: number(page.offset),
1192
+ limit: number(page.limit),
1193
+ }),
1194
+ undefined,
1195
+ restSkillFileSchema,
1196
+ signal,
1197
+ ),
1198
+ skillBrowse: (page = {}, signal) =>
1199
+ request(
1200
+ "GET",
1201
+ withQuery(`${root}/browse`, {
1202
+ path: page.path,
1203
+ cursor: page.cursor,
1204
+ limit: number(page.limit),
1205
+ }),
1206
+ undefined,
1207
+ restSkillBrowseSchema,
1208
+ signal,
1209
+ ),
1210
+ skillFind: (query, options = {}, signal) =>
1211
+ request(
1212
+ "GET",
1213
+ withQuery(`${root}/find`, {
1214
+ query,
1215
+ path: options.path,
1216
+ cursor: options.cursor,
1217
+ limit: number(options.limit),
1218
+ }),
1219
+ undefined,
1220
+ restSkillFindSchema,
1221
+ signal,
1222
+ ),
1223
+ skillRows: (page = {}, signal) =>
1224
+ request(
1225
+ "GET",
1226
+ withQuery(`${root}/rows`, {
1227
+ path: page.path,
1228
+ heading: page.heading,
1229
+ cursor: page.cursor,
1230
+ limit: number(page.limit),
1231
+ }),
1232
+ undefined,
1233
+ restSkillRowsSchema,
1234
+ signal,
1235
+ ),
1236
+ skillCode: (page = {}, signal) =>
1237
+ request(
1238
+ "GET",
1239
+ withQuery(`${root}/code`, {
1240
+ path: page.path,
1241
+ heading: page.heading,
1242
+ cursor: page.cursor,
1243
+ limit: number(page.limit),
1244
+ }),
1245
+ undefined,
1246
+ restSkillCodeSchema,
1247
+ signal,
1248
+ ),
1249
+ });
1250
+
862
1251
  const projectClient = (key: string): ProjectClient => {
863
1252
  const at = (collection?: Parameters<typeof projectPath>[1], id?: string) =>
864
1253
  projectPath(key, collection, id);
865
1254
  return {
866
1255
  key,
867
1256
  get: (signal) => request("GET", `${base}${at()}`, undefined, restProjectSchema, signal),
1257
+ glance: (signal) =>
1258
+ request("GET", `${base}${at("glance")}`, undefined, restProjectGlanceSchema, signal),
868
1259
  update: (patch) => request("PATCH", `${base}${at()}`, patch, restProjectSchema),
869
1260
  setIcon: (input) => request("POST", `${base}${at()}/icon`, formOf(input), restProjectSchema),
870
1261
  removeIcon: () => request("DELETE", `${base}${at()}/icon`, undefined, restProjectSchema),
@@ -878,23 +1269,19 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
878
1269
  tasks: (filter = {}, signal) =>
879
1270
  request(
880
1271
  "GET",
881
- withQuery(at("tasks"), {
882
- state: filter.state,
883
- archived: flag(filter.archived),
884
- open: flag(filter.open),
885
- category: filter.category,
886
- goal: filter.goal,
887
- worker: filter.worker,
888
- unassigned: flag(filter.unassigned),
889
- dueBy: filter.dueBy,
890
- q: filter.q,
891
- limit: number(filter.limit),
892
- offset: number(filter.offset),
893
- }),
1272
+ withQuery(at("tasks"), tasksQuery(filter)),
894
1273
  undefined,
895
1274
  restTasksSchema,
896
1275
  signal,
897
1276
  ),
1277
+ taskBriefs: (filter = {}, signal) =>
1278
+ request(
1279
+ "GET",
1280
+ withQuery(at("tasks"), { ...tasksQuery(filter), brief: "true" }),
1281
+ undefined,
1282
+ restTaskBriefsSchema,
1283
+ signal,
1284
+ ),
898
1285
  task: (ref, signal) =>
899
1286
  request("GET", `${base}${at("tasks", ref)}`, undefined, restTaskSchema, signal),
900
1287
  createTask: (input) => request("POST", `${base}${at("tasks")}`, input, restTaskSchema),
@@ -940,18 +1327,21 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
940
1327
  request("POST", `${base}${at("decisions", id)}/answer`, input, restDecisionSchema),
941
1328
  updateDecision: (id, patch) =>
942
1329
  request("PATCH", `${base}${at("decisions", id)}`, patch, restDecisionSchema),
1330
+ addressDecision: (id, deciderIds) =>
1331
+ request(
1332
+ "PUT",
1333
+ `${base}${at("decisions", id)}/deciders`,
1334
+ { deciderIds: [...deciderIds] } satisfies RestDecisionDeciders,
1335
+ restDecisionSchema,
1336
+ ),
943
1337
  runs: (filter = {}, signal) =>
1338
+ request("GET", withQuery(at("runs"), runsQuery(filter)), undefined, restRunsSchema, signal),
1339
+ runBriefs: (filter = {}, signal) =>
944
1340
  request(
945
1341
  "GET",
946
- withQuery(at("runs"), {
947
- task: filter.task,
948
- open: flag(filter.open),
949
- mine: flag(filter.mine),
950
- limit: number(filter.limit),
951
- offset: number(filter.offset),
952
- }),
1342
+ withQuery(at("runs"), { ...runsQuery(filter), brief: "true" }),
953
1343
  undefined,
954
- restRunsSchema,
1344
+ restRunBriefsSchema,
955
1345
  signal,
956
1346
  ),
957
1347
  run: (id, signal) =>
@@ -998,53 +1388,7 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
998
1388
  signal,
999
1389
  ),
1000
1390
  eventStreamUrl: (after) => withQuery(`${at("events")}/stream`, { after: String(after) }),
1001
- skills: (signal) =>
1002
- request("GET", `${base}${at("skills")}`, undefined, restSkillsSchema, signal),
1003
- skill: (path, cursor, signal) =>
1004
- request(
1005
- "GET",
1006
- withQuery(`${at("skills")}/one`, { path, cursor }),
1007
- undefined,
1008
- restSkillLoadSchema,
1009
- signal,
1010
- ),
1011
- skillFile: (path, page = {}, signal) =>
1012
- request(
1013
- "GET",
1014
- withQuery(`${at("skills")}/file`, {
1015
- path,
1016
- offset: page.offset === undefined ? undefined : String(page.offset),
1017
- limit: page.limit === undefined ? undefined : String(page.limit),
1018
- }),
1019
- undefined,
1020
- restSkillFileSchema,
1021
- signal,
1022
- ),
1023
- skillBrowse: (page = {}, signal) =>
1024
- request(
1025
- "GET",
1026
- withQuery(`${at("skills")}/browse`, {
1027
- path: page.path,
1028
- cursor: page.cursor,
1029
- limit: page.limit === undefined ? undefined : String(page.limit),
1030
- }),
1031
- undefined,
1032
- restSkillBrowseSchema,
1033
- signal,
1034
- ),
1035
- skillFind: (query, options = {}, signal) =>
1036
- request(
1037
- "GET",
1038
- withQuery(`${at("skills")}/find`, {
1039
- query,
1040
- path: options.path,
1041
- cursor: options.cursor,
1042
- limit: options.limit === undefined ? undefined : String(options.limit),
1043
- }),
1044
- undefined,
1045
- restSkillFindSchema,
1046
- signal,
1047
- ),
1391
+ ...packAt(at("skills")),
1048
1392
  setPackToken: (input) =>
1049
1393
  request("PUT", `${base}${at()}/pack-token`, input, restProjectSchema),
1050
1394
  removePackToken: () =>
@@ -1144,8 +1488,6 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
1144
1488
 
1145
1489
  const pluginClient = (key: string): PluginClient => {
1146
1490
  const at = (...parts: readonly string[]) => pluginPath(key, ...parts);
1147
- const skillsQuery = (part: string, params: Record<string, string | undefined>): string =>
1148
- withQuery(at("skills", part), params);
1149
1491
  const queryUrl = (
1150
1492
  name: string,
1151
1493
  args: Readonly<Record<string, unknown>>,
@@ -1215,54 +1557,16 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
1215
1557
  signal,
1216
1558
  ),
1217
1559
  purge: (confirm) => request("POST", `${base}${at("purge")}`, { confirm }, undefined),
1218
- skills: (signal) =>
1219
- request("GET", `${base}${at("skills")}`, undefined, restSkillsSchema, signal),
1220
- skill: (path, cursor, signal) =>
1221
- request(
1222
- "GET",
1223
- skillsQuery("one", { path, cursor }),
1224
- undefined,
1225
- restSkillLoadSchema,
1226
- signal,
1227
- ),
1228
- skillFile: (path, page = {}, signal) =>
1229
- request(
1230
- "GET",
1231
- skillsQuery("file", { path, offset: number(page.offset), limit: number(page.limit) }),
1232
- undefined,
1233
- restSkillFileSchema,
1234
- signal,
1235
- ),
1236
- skillBrowse: (page = {}, signal) =>
1560
+ ...packAt(at("skills")),
1561
+ events: (page = {}, signal) =>
1237
1562
  request(
1238
1563
  "GET",
1239
- skillsQuery("browse", {
1240
- path: page.path,
1241
- cursor: page.cursor,
1564
+ withQuery(at("events"), {
1242
1565
  limit: number(page.limit),
1566
+ offset: number(page.offset),
1567
+ kind: page.kind,
1243
1568
  }),
1244
1569
  undefined,
1245
- restSkillBrowseSchema,
1246
- signal,
1247
- ),
1248
- skillFind: (query, options = {}, signal) =>
1249
- request(
1250
- "GET",
1251
- skillsQuery("find", {
1252
- query,
1253
- path: options.path,
1254
- cursor: options.cursor,
1255
- limit: number(options.limit),
1256
- }),
1257
- undefined,
1258
- restSkillFindSchema,
1259
- signal,
1260
- ),
1261
- events: (page = {}, signal) =>
1262
- request(
1263
- "GET",
1264
- withQuery(at("events"), { limit: number(page.limit), offset: number(page.offset) }),
1265
- undefined,
1266
1570
  restEventsSchema,
1267
1571
  signal,
1268
1572
  ),
@@ -1272,10 +1576,20 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
1272
1576
  request("PATCH", `${base}${at("settings")}`, patch, restPluginDetailSchema),
1273
1577
  updateConsent: (consent) =>
1274
1578
  request("PATCH", `${base}${at("consent")}`, { consent }, restPluginDetailSchema),
1275
- setSecret: (name, value) =>
1276
- request("PUT", `${base}${at("secrets", name)}`, { value }, undefined),
1277
- removeSecret: (name) =>
1278
- request("DELETE", `${base}${at("secrets", name)}`, undefined, undefined),
1579
+ setSecret: (name, value, under) =>
1580
+ request(
1581
+ "PUT",
1582
+ `${base}${under === undefined ? at("secrets", name) : at("secrets", name, "keys", under)}`,
1583
+ { value },
1584
+ undefined,
1585
+ ),
1586
+ removeSecret: (name, under) =>
1587
+ request(
1588
+ "DELETE",
1589
+ `${base}${under === undefined ? at("secrets", name) : at("secrets", name, "keys", under)}`,
1590
+ undefined,
1591
+ undefined,
1592
+ ),
1279
1593
  grants: (signal) =>
1280
1594
  request("GET", `${base}${at("grants")}`, undefined, restPluginGrantsSchema, signal),
1281
1595
  grant: (input) => request("POST", `${base}${at("grants")}`, input, restPluginGrantSchema),
@@ -1299,6 +1613,7 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
1299
1613
  );
1300
1614
  return found.items[0];
1301
1615
  },
1616
+ organizationPack: () => packAt(REST_ROUTES.workspaceSkills),
1302
1617
  updateWorkspace: (patch) =>
1303
1618
  request("PATCH", `${base}${REST_ROUTES.workspace}`, patch, restWorkspaceSchema),
1304
1619
  setWorkspacePackToken: (input) =>
@@ -1332,8 +1647,262 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
1332
1647
  request("DELETE", `${base}${REST_ROUTES.workspacePackToken}/connect`, undefined, undefined),
1333
1648
  updatePerson: (id, patch) =>
1334
1649
  request("PATCH", `${base}${restPath("people", id)}`, patch, restPersonSchema),
1650
+ manager: (signal) =>
1651
+ request("GET", `${base}${REST_ROUTES.meManager}`, undefined, restManagerSchema, signal),
1652
+ secrets: (signal) =>
1653
+ request(
1654
+ "GET",
1655
+ `${base}${agentPath("me", "secrets")}`,
1656
+ undefined,
1657
+ restAgentSecretsSchema,
1658
+ signal,
1659
+ ),
1660
+ secret: (name, signal) =>
1661
+ request(
1662
+ "GET",
1663
+ `${base}${agentPath("me", "secrets", name)}`,
1664
+ undefined,
1665
+ restAgentSecretValueSchema,
1666
+ signal,
1667
+ ),
1668
+ setSecret: (name, input) =>
1669
+ request("PUT", `${base}${agentPath("me", "secrets", name)}`, input, restAgentSecretSchema),
1670
+ removeSecret: (name) =>
1671
+ request("DELETE", `${base}${agentPath("me", "secrets", name)}`, undefined, undefined),
1672
+ agentSecrets: (handle, signal) =>
1673
+ request(
1674
+ "GET",
1675
+ `${base}${agentPath(handle, "secrets")}`,
1676
+ undefined,
1677
+ restAgentSecretsSchema,
1678
+ signal,
1679
+ ),
1680
+ seedAgentSecret: (handle, name, input) =>
1681
+ request("PUT", `${base}${agentPath(handle, "secrets", name)}`, input, restAgentSecretSchema),
1682
+ removeAgentSecret: (handle, name) =>
1683
+ request("DELETE", `${base}${agentPath(handle, "secrets", name)}`, undefined, undefined),
1684
+ agentSecretAccesses: (handle, query, signal) =>
1685
+ request(
1686
+ "GET",
1687
+ withQuery(agentPath(handle, "secret-accesses"), {
1688
+ before: query?.before === undefined ? undefined : String(query.before),
1689
+ limit: query?.limit === undefined ? undefined : String(query.limit),
1690
+ }),
1691
+ undefined,
1692
+ restAgentSecretAccessesSchema,
1693
+ signal,
1694
+ ),
1695
+ agentInvitation: (handle, signal) =>
1696
+ request(
1697
+ "GET",
1698
+ `${base}${agentPath(handle, "invitation")}`,
1699
+ undefined,
1700
+ restAgentInvitationStateSchema,
1701
+ signal,
1702
+ ),
1703
+ inviteAgent: (handle) =>
1704
+ request(
1705
+ "POST",
1706
+ `${base}${agentPath(handle, "invitation")}`,
1707
+ undefined,
1708
+ restAgentInvitationMadeSchema,
1709
+ ),
1710
+ revokeAgentInvitation: (handle) =>
1711
+ request("DELETE", `${base}${agentPath(handle, "invitation")}`, undefined, undefined),
1712
+ agentSetup: (code, signal) =>
1713
+ request(
1714
+ "GET",
1715
+ `${base}${REST_ROUTES.setup}/${encodeURIComponent(code)}`,
1716
+ undefined,
1717
+ restAgentSetupSchema,
1718
+ signal,
1719
+ ),
1720
+ sendSignal: (handle, input, pictures = []) => {
1721
+ let body: unknown = input;
1722
+ if (pictures.length > 0) {
1723
+ const form = new FormData();
1724
+ form.set("signal", JSON.stringify(input));
1725
+ appendFiles(form, pictures);
1726
+ body = form;
1727
+ }
1728
+ return request("POST", `${base}${agentPath(handle, "signals")}`, body, restSignalSchema);
1729
+ },
1730
+ signalFileUrl: (handle, number, fileId) =>
1731
+ `${base}${agentPath(handle, "signals", String(number), "files", fileId)}`,
1732
+ readSignalFile: (number, fileId, signal) =>
1733
+ read(`${base}${agentPath("me", "signals", String(number), "files", fileId)}`, fileId, signal),
1734
+ signals: (handle, query, signal) =>
1735
+ request(
1736
+ "GET",
1737
+ withQuery(agentPath(handle, "signals"), {
1738
+ before: query?.before === undefined ? undefined : String(query.before),
1739
+ limit: query?.limit === undefined ? undefined : String(query.limit),
1740
+ }),
1741
+ undefined,
1742
+ restSignalsSchema,
1743
+ signal,
1744
+ ),
1745
+ runnerHeartbeat: (input) =>
1746
+ request("PUT", `${base}${agentPath("me", "runner")}`, input, restRunnerHeartbeatSchema),
1747
+ raiseWake: (input) =>
1748
+ request(
1749
+ "POST",
1750
+ `${base}${agentPath("me", "signals")}`,
1751
+ { kind: "wake", ...input },
1752
+ restSignalSchema,
1753
+ ),
1754
+ async *signalStream(after, signal) {
1755
+ let response: Response;
1756
+ try {
1757
+ response = await send(`${base}${agentPath("me", "signals", "stream")}?after=${after}`, {
1758
+ method: "GET",
1759
+ signal,
1760
+ credentials: token === undefined ? "same-origin" : "omit",
1761
+ headers: {
1762
+ accept: "text/event-stream",
1763
+ ...(token === undefined ? {} : { authorization: `Bearer ${token}` }),
1764
+ ...named,
1765
+ },
1766
+ });
1767
+ } catch (error) {
1768
+ if (signal.aborted) {
1769
+ return;
1770
+ }
1771
+ throw error instanceof ApiError
1772
+ ? error
1773
+ : new ApiError(0, "network", "The server could not be reached.");
1774
+ }
1775
+ if (!response.ok) {
1776
+ throw await failure(response);
1777
+ }
1778
+ if (response.body === null) {
1779
+ return;
1780
+ }
1781
+ try {
1782
+ for await (const block of readSse(response.body, signal)) {
1783
+ if (block.event !== "signal") {
1784
+ continue;
1785
+ }
1786
+ let json: unknown;
1787
+ try {
1788
+ json = JSON.parse(block.data);
1789
+ } catch {
1790
+ continue;
1791
+ }
1792
+ const parsed = restSignalSchema.safeParse(json);
1793
+ if (parsed.success) {
1794
+ yield parsed.data;
1795
+ }
1796
+ }
1797
+ } catch (error) {
1798
+ if (!signal.aborted) {
1799
+ throw new ApiError(0, "network", "The stream of signals ended before its end.");
1800
+ }
1801
+ void error;
1802
+ }
1803
+ },
1804
+ beginAgentSession: (input) =>
1805
+ request("POST", `${base}${agentPath("me", "sessions")}`, input, restAgentSessionSchema),
1806
+ sendTranscript: (sessionId, input) =>
1807
+ request(
1808
+ "POST",
1809
+ `${base}${agentPath("me", "sessions", sessionId, "events")}`,
1810
+ input,
1811
+ restTranscriptBatchSchema,
1812
+ ),
1813
+ uploadTranscriptFile: (sessionId, input) =>
1814
+ request(
1815
+ "POST",
1816
+ `${base}${agentPath("me", "sessions", sessionId, "files")}`,
1817
+ formOf(input),
1818
+ restTranscriptFileSchema,
1819
+ ),
1820
+ endAgentSession: (sessionId, input) =>
1821
+ request(
1822
+ "POST",
1823
+ `${base}${agentPath("me", "sessions", sessionId, "end")}`,
1824
+ input,
1825
+ restAgentSessionSchema,
1826
+ ),
1827
+ agentSessions: (handle, query, signal) =>
1828
+ request(
1829
+ "GET",
1830
+ withQuery(agentPath(handle, "sessions"), {
1831
+ before: query?.before,
1832
+ limit: query?.limit === undefined ? undefined : String(query.limit),
1833
+ }),
1834
+ undefined,
1835
+ restAgentSessionsSchema,
1836
+ signal,
1837
+ ),
1838
+ agentSession: (handle, sessionId, signal) =>
1839
+ request(
1840
+ "GET",
1841
+ `${base}${agentPath(handle, "sessions", sessionId)}`,
1842
+ undefined,
1843
+ restAgentSessionSchema,
1844
+ signal,
1845
+ ),
1846
+ transcript: (handle, sessionId, query, signal) =>
1847
+ request(
1848
+ "GET",
1849
+ withQuery(agentPath(handle, "sessions", sessionId, "events"), {
1850
+ after: query?.after === undefined ? undefined : String(query.after),
1851
+ limit: query?.limit === undefined ? undefined : String(query.limit),
1852
+ }),
1853
+ undefined,
1854
+ restTranscriptEventsSchema,
1855
+ signal,
1856
+ ),
1857
+ transcriptStreamUrl: (handle, sessionId, after) =>
1858
+ `${base}${agentPath(handle, "sessions", sessionId, "events", "stream")}?after=${after}`,
1859
+ transcriptText: (handle, sessionId, n, signal) =>
1860
+ request(
1861
+ "GET",
1862
+ `${base}${agentPath(handle, "sessions", sessionId, "events", String(n), "text")}`,
1863
+ undefined,
1864
+ restTranscriptTextSchema,
1865
+ signal,
1866
+ ),
1867
+ transcriptFileUrl: (handle, sessionId, fileId) =>
1868
+ `${base}${agentPath(handle, "sessions", sessionId, "files", fileId)}`,
1869
+ sealTranscriptEvent: (handle, sessionId, n, input) =>
1870
+ request(
1871
+ "POST",
1872
+ `${base}${agentPath(handle, "sessions", sessionId, "events", String(n), "seal")}`,
1873
+ input,
1874
+ restTranscriptEventSchema,
1875
+ ),
1876
+ agentSignIns: (handle, signal) =>
1877
+ request(
1878
+ "GET",
1879
+ `${base}${agentPath(handle, "sign-ins")}`,
1880
+ undefined,
1881
+ restSessionsSchema,
1882
+ signal,
1883
+ ),
1884
+ endAgentSignIn: (handle, sessionId) =>
1885
+ request("DELETE", `${base}${agentPath(handle, "sign-ins", sessionId)}`, undefined, undefined),
1335
1886
  createListing: (input) =>
1336
1887
  request("POST", `${base}${REST_ROUTES.listings}`, input, restListingSchema),
1888
+ agents: (signal) =>
1889
+ request("GET", `${base}${REST_ROUTES.agents}`, undefined, restAgentsSchema, signal),
1890
+ agent: (handle, signal) =>
1891
+ request("GET", `${base}${agentPath(handle)}`, undefined, restAgentSchema, signal),
1892
+ createAgent: (input) => request("POST", `${base}${REST_ROUTES.agents}`, input, restAgentSchema),
1893
+ updateAgent: (handle, patch) =>
1894
+ request("PATCH", `${base}${agentPath(handle)}`, patch, restAgentSchema),
1895
+ agentProposals: (query, signal) =>
1896
+ request(
1897
+ "GET",
1898
+ withQuery(`${REST_ROUTES.agents}/proposals`, {
1899
+ count: query?.count === undefined ? undefined : String(query.count),
1900
+ lang: query?.lang,
1901
+ }),
1902
+ undefined,
1903
+ restAgentProposalsSchema,
1904
+ signal,
1905
+ ),
1337
1906
  removeListing: (id) =>
1338
1907
  request("DELETE", `${base}${restPath("listings", id)}`, undefined, undefined),
1339
1908
  teams: (signal) =>
@@ -1385,6 +1954,14 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
1385
1954
  removeCategory: (key) => request("DELETE", `${base}${categoryPath(key)}`, undefined, undefined),
1386
1955
  work: (signal) =>
1387
1956
  request("GET", `${base}${REST_ROUTES.work}`, undefined, restWorkSchema, signal),
1957
+ plate: (signal) =>
1958
+ request(
1959
+ "GET",
1960
+ withQuery(REST_ROUTES.work, { brief: "true" }),
1961
+ undefined,
1962
+ restWorkBriefSchema,
1963
+ signal,
1964
+ ),
1388
1965
  myDecisions: (filter = {}, signal) =>
1389
1966
  request(
1390
1967
  "GET",
@@ -1415,6 +1992,14 @@ export function createClient(options: ClientOptions = {}): ConsoleClient {
1415
1992
  read(`${base}${decisionFilePath(decisionId, fileId)}`, fileId, signal),
1416
1993
  personWork: (personId, signal) =>
1417
1994
  request("GET", `${base}${personWorkPath(personId)}`, undefined, restPersonWorkSchema, signal),
1995
+ personPlate: (personId, signal) =>
1996
+ request(
1997
+ "GET",
1998
+ withQuery(personWorkPath(personId), { brief: "true" }),
1999
+ undefined,
2000
+ restPersonWorkBriefSchema,
2001
+ signal,
2002
+ ),
1418
2003
  tokens: (signal) =>
1419
2004
  request("GET", `${base}${REST_ROUTES.tokens}`, undefined, restTokensSchema, signal),
1420
2005
  sessions: (signal) =>