@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
@@ -11,6 +11,7 @@ The API is the board as its members see it: the people, the projects, and in eac
11
11
  - Every answer is `cache-control: no-store`: it is one person's, or it changes.
12
12
  - A request that changes something (`POST`, `PATCH`, `DELETE`) on a session must carry the session cookie **and** come from the console's own pages: the browser's `origin` header must be `PUBLIC_URL`. The cookie is `SameSite=Lax`, so another site's request does not carry it in the first place; the origin is the second fence.
13
13
  - A token ([`POST /api/v1/tokens`](#get-apiv1tokens-and-post-apiv1tokens)) is presented as `Authorization: Bearer <secret>` on any route, by an agent, a script or a console of a person's own. It is then the credential: a cookie beside it is not looked at, and no origin is needed, since nothing attaches a token but whoever holds it. A token that is nothing is refused, whatever cookie travels with it. What a token does is attributed to its person, and the event names the agent: the token's name, or what the agent called itself on its run.
14
+ - The command signed in as the account itself ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md), point 9) holds a session of its own in place of a token, and presents its secret (`cns_a_...`) the same way, as `Authorization: Bearer <secret>`. It is the account: what is done with it names no agent beside the member, since the member did it. Presented as a token is, it is held to what a token may ask, and whatever is said below of a token's request holds for it; where a rule names "a session", it means a browser's. Each kind is read only where it is presented: a command's secret in a cookie is nobody, and so is a browser's token in the header.
14
15
  - A token configures as its person does ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)): every request a session may make, a token may make, within the same roles, except the tokens themselves, the sessions and the approval of a connection, which stay a person's own doing, signed in on the console's own pages; the one thing a token does about the tokens is give itself up (`DELETE /api/v1/me/token`).
15
16
  - An agent connects without anyone copying a token ([ADR-0011](../adr/0011-an-agent-connects-with-a-short-code-a-person-approves-and-the-token-is-never-shown.md)): [`POST /api/v1/connect`](#connecting-an-agent) is nobody's, the approval is a person's own doing on the console's own pages, and the claim is the command's, with the secret it was given.
16
17
  - The command names its version on every request, as the product token of its `user-agent` (`skillcdn-console/0.1.18 (cli; node 24.11.0; linux)`), and every answer under `/api` says the console's version (`console-version`) and the range of command versions it takes (`console-client-range`, as npm spells one: `>=0.1.18 <0.2.0`) ([ADR-0025](../adr/0025-the-command-names-its-version-on-every-request-and-the-console-holds-it-to-the-range-it-takes.md)). Before 1.0 the range is the console's line, every patch of its major.minor, from the floor the console names where a release raised one: the oldest command whose requests and answers still fit it, raised only by a release that changed what passes between them ([ADR-0038](../adr/0038-the-command-and-the-console-go-together-within-a-line-and-a-release-that-changes-what-passes-between-them-raises-the-floors.md)); from 1.0, the console's major and a minor within one, either way. A command outside the range is refused with `426` before anything else is asked of its request, `client.outdated` or `client.too_new`, the message naming both versions and the range. The command holds the console to a floor of its own the same way, and refuses a console below it itself, as `console.outdated`, in this same form. A request that names no command, a browser's, a script's, is held to nothing.
@@ -67,10 +68,12 @@ The API is the board as its members see it: the people, the projects, and in eac
67
68
  | 409 | `category.key_taken`, `category.in_use`, `category.too_many` | A category of the workspace has that key already; tasks or goals are sorted into the category, so it stays until they are moved; the workspace has as many categories as one may (`MAX_CATEGORIES`). |
68
69
  | 409 | `project.too_many`, `task.too_many`, `goal.too_many`, `decision.too_many`, `document.too_many`, `run.too_many` | The workspace holds as many projects as one may (`MAX_PROJECTS_PER_WORKSPACE`); the project as many tasks, goals, decisions or pages (`MAX_TASKS_PER_PROJECT`, `MAX_GOALS_PER_PROJECT`, `MAX_DECISIONS_PER_PROJECT`, `MAX_DOCUMENTS_PER_PROJECT`), those put away counted; the task has been taken as many times as one may (`MAX_RUNS_PER_TASK`). Bounds a runaway script meets and real work does not. |
69
70
  | 409 | `project.too_many_bytes` | The files of the project, handed in by runs, put in comments and on decisions and attached to pages, hold as many bytes together as the deployment allows one project (`PROJECT_FILE_BYTES_AT_MOST`, [deploy/README.md](../../deploy/README.md#a-shared-console)); no bound unless set. Asked before any byte is kept. |
70
- | 429 | `feed.too_many` | The person holds as many streams of the feed as one may at once (`MAX_STREAMS_PER_PERSON`), or the process does for everyone (`MAX_STREAMS`); `retry-after` says when to try again. |
71
+ | 503 | `feed.unsettled` | A read of a feed, `GET .../events` or a plugin's `GET .../plugin-events`, by a process of the console that has not seen the feed settle since it began, while a change is still under way ([ADR-0125](../adr/0125-a-feed-is-read-no-further-than-its-settled-end-which-its-writers-hold-a-lock-for.md)): it cannot say where the feed stands, and an empty page would be taken for a feed in which nothing ever happened. `retry-after: 1`; the reader asks again, and never goes on from the beginning in its place. |
72
+ | 429 | `feed.too_many` | The person holds as many streams as one may at once (`MAX_STREAMS_PER_PERSON`), of the feed, of an agent account's signals and of a session's transcript together, or the process does for everyone (`MAX_STREAMS`); `retry-after` says when to try again. |
71
73
  | 403 | `picture.refused` | The console fetches no picture from that address: one of its own network, the loopback, a private or a link-local range, or a redirect to one ([ADR-0048](../adr/0048-a-picture-from-elsewhere-is-read-through-the-console-from-a-public-address-and-kept-a-while.md)). |
72
74
  | 502 | `picture.unavailable` | The picture could not be fetched from where it is named: the origin answered an error or something that is not a picture, sent more than `MAX_FILE_BYTES`, or could not be reached in time. |
73
- | 409 | `decision.answered` | The decision has an answer already. |
75
+ | 409 | `decision.answered` | The decision has an answer already: it is answered once, and stays as it was addressed. |
76
+ | 409 | `decision.plugin_addressed` | The decision is a plugin's, which says itself whom it is for: nobody addresses it anew ([ADR-0096](../adr/0096-a-decision-that-waits-may-be-addressed-anew-by-whoever-may-answer-it.md)). |
74
77
  | 409 | `document.conflict` | The page has moved on since the version the write started from (`baseVersion`), or was written at that path by someone else first. |
75
78
  | 409 | `document.archived` | The page is archived: restore it before writing to it or attaching to it. |
76
79
  | 409 | `document.too_many_versions`, `document.too_many_files` | The page carries as many versions, or files, as one may (`MAX_VERSIONS_PER_DOCUMENT`, `MAX_FILES_PER_DOCUMENT`). |
@@ -95,15 +98,15 @@ The API is the board as its members see it: the people, the projects, and in eac
95
98
 
96
99
  ### `GET /api/v1/me`
97
100
 
98
- `{ "workspace": { "name", "tokenDaysAtMost", "skills": { "source", "address", "packToken" }, "peopleVisibility", "weekStart", "timeZone", "language" }, "person": ... | null, "agent": "..." | null, "language": "..." | null, "signIn": [{ "key", "label", "admits": { "organization", "domains" } }, ...], "console": { "version", "clientRange" }, "decisions": { "waiting" } | null }`: what the board is called, the most days a token may be good for here (or `null` where a person chooses), where the organization's skills come from (`source`, the origin of the SkillCDN deployment they are read through, and `address`, the organization's, canonical, which a project without one of its own reads, or `null`; and `packToken`, when the SkillCDN token the organization's pack is read with was set, `{ setAt }`, or `null`), who sees whom on the People page (`peopleVisibility`: `everyone`, or `shared_projects`, where a member sees only the people they share a project with and an administrator everyone; [ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md); read as optional, for a console from before the setting), the day the calendars begin a week on and this week is counted by (`weekStart`: `auto`, as the language of the pages has it, or `monday`, `sunday`; [ADR-0039](../adr/0039-this-week-is-the-plans-unit-and-the-week-begins-as-the-workspace-says.md)) and the workspace's time zone (`timeZone`: an IANA name, in which the command prints moments, or `null` for none; `language`: the workspace's language, the tag of one the console speaks, for whoever has none of their own, the pages after the browser's languages and the plugins' calls ([ADR-0081](../adr/0081-a-workspace-has-a-language-for-whoever-has-none-of-their-own.md)), or `null` for none, English then; both optional the same way), who the session cookie or the token says is asking (`id`, `login`, `name` or `null`, `avatar` or `null`, `role`), with what (`agent`: the name of the token when a token asks, as its person called it, so that a console of a person's own knows it holds one and offers nothing a token cannot do; `null` on a session), the language the person reads in (`language`, a tag: the one they chose, else the one the pages first saw them in, [ADR-0065](../adr/0065-a-plugin-writes-one-text-and-a-persons-language-is-kept-from-the-first-time-the-pages-see-them.md); `null` until then), their own arrangement of the front page's widgets (`home`, [ADR-0059](../adr/0059-a-person-arranges-the-front-pages-widgets-from-the-sizes-each-comes-in.md): `[{ plugin, widget, size, place? }]` in order, or `null` for the manifests'; answered from 0.4.4 and read as optional), and the identity providers people sign in through (`gh`, `google`, each with the label of its button and, in `admits`, who gets in through it: the organization at the git host whose members are in, or `null`, and the Workspace domains whose accounts are, which a sign-in page says under the button; answered from 0.4.1 and read as optional), none where nobody can; and the console's own version with the range of command versions it takes (`console`, [ADR-0025](../adr/0025-the-command-names-its-version-on-every-request-and-the-console-holds-it-to-the-range-it-takes.md)), for a console built on the package to compare itself with; and how many decisions wait for the person's answer across the projects they may see (`decisions.waiting`, [ADR-0042](../adr/0042-a-decision-is-addressed-to-a-person-its-raiser-unless-another-is-named.md); `null` for nobody; answered from 0.4.3 and read as optional), which the pages say beside My decisions and read again when a decision is raised or answered. Nobody is an answer, not an error; the pages ask this once to decide what to show, and the command once, at `login`, to see that the console knows the token. A token the console knows whose person is out is refused here as on every route, `auth.deactivated` or `auth.not_admitted`, so that the agent learns why ([ADR-0044](../adr/0044-a-token-of-a-person-who-is-out-is-kept-and-refused-with-the-reason-until-they-are-back-in.md)).
101
+ `{ "workspace": { "name", "tokenDaysAtMost", "skills": { "source", "address", "packToken" }, "peopleVisibility", "weekStart", "timeZone", "language" }, "person": ... | null, "agent": "..." | null, "session": { "kind", "name" } | null, "language": "..." | null, "signIn": [{ "key", "label", "admits": { "organization", "domains" } }, ...], "console": { "version", "clientRange" }, "decisions": { "waiting" } | null }`: what the board is called, the most days a token may be good for here (or `null` where a person chooses), where the organization's skills come from (`source`, the origin of the SkillCDN deployment they are read through, and `address`, the organization's, canonical, which a project without one of its own reads, or `null`; and `packToken`, when the SkillCDN token the organization's pack is read with was set, `{ setAt }`, or `null`), who sees whom on the People page (`peopleVisibility`: `everyone`, or `shared_projects`, where a member sees only the people they share a project with and an administrator everyone; [ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md); read as optional, for a console from before the setting), the day the calendars begin a week on and this week is counted by (`weekStart`: `auto`, as the language of the pages has it, or `monday`, `sunday`; [ADR-0039](../adr/0039-this-week-is-the-plans-unit-and-the-week-begins-as-the-workspace-says.md)) and the workspace's time zone (`timeZone`: an IANA name, in which the command prints moments, or `null` for none; `language`: the workspace's language, the tag of one the console speaks, for whoever has none of their own, the pages after the browser's languages and the plugins' calls ([ADR-0081](../adr/0081-a-workspace-has-a-language-for-whoever-has-none-of-their-own.md)), or `null` for none, English then; both optional the same way), who the session cookie or the token says is asking (`id`, `login`, `name` or `null`, `avatar` or `null`, `role`), with what (`agent`: the name of the token when a token asks, as its person called it, so that a console of a person's own knows it holds one and offers nothing a token cannot do; `null` on a session), the language the person reads in (`language`, a tag: the one they chose, else the one the pages first saw them in, [ADR-0065](../adr/0065-a-plugin-writes-one-text-and-a-persons-language-is-kept-from-the-first-time-the-pages-see-them.md); `null` until then), their own arrangement of the front page's widgets (`home`, [ADR-0059](../adr/0059-a-person-arranges-the-front-pages-widgets-from-the-sizes-each-comes-in.md): `[{ plugin, widget, size, place? }]` in order, or `null` for the manifests'; answered from 0.4.4 and read as optional), and the identity providers people sign in through (`gh`, `google`, each with the label of its button and, in `admits`, who gets in through it: the organization at the git host whose members are in, or `null`, and the Workspace domains whose accounts are, which a sign-in page says under the button; answered from 0.4.1 and read as optional), none where nobody can; and the console's own version with the range of command versions it takes (`console`, [ADR-0025](../adr/0025-the-command-names-its-version-on-every-request-and-the-console-holds-it-to-the-range-it-takes.md)), for a console built on the package to compare itself with; and how many decisions wait for the person's answer across the projects they may see (`decisions.waiting`, [ADR-0042](../adr/0042-a-decision-is-addressed-to-a-person-its-raiser-unless-another-is-named.md); `null` for nobody; answered from 0.4.3 and read as optional), which the pages say beside My decisions and read again when a decision is raised or answered. Nobody is an answer, not an error; the pages ask this once to decide what to show, and the command once, at `login`, to see that the console knows the token. Nobody is told what the sign-in page shows and no more: of the workspace its `name` and its `language`, with `tokenDaysAtMost` as `null` and `skills` as `{ "source": "", "address": null }`, the two keys every answer has, saying nothing; its short name, its domain, its services, who sees whom, the week's first day, the time zone and where the skills are read are its members' to read, and are left out; then the ways in and the console's version. A token the console knows whose person is out is refused here as on every route, `auth.deactivated` or `auth.not_admitted`, so that the agent learns why ([ADR-0044](../adr/0044-a-token-of-a-person-who-is-out-is-kept-and-refused-with-the-reason-until-they-are-back-in.md)).
99
102
 
100
103
  ### `GET /api/v1/people?login=`
101
104
 
102
- `{ "items": [person, ...], "listed": [listing, ...] }`: the people the asker may see, those in first and by login, and the logins an administrator let in that nobody has signed in with yet ([ADR-0022](../adr/0022-who-is-in-is-the-consoles-own-record-and-an-administrator-keeps-it.md)). Who sees whom is the workspace's setting, decided by the one policy of the server on every request ([ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md)): with `everyone`, everyone who has signed in; with `shared_projects`, a member sees the active people who are in a project they are in, themselves, and the administrators, while an administrator sees everyone whatever the setting; a project open to the workspace has everyone in it, so a member of one sees everyone. The logins let in (`listed`) and the organization's reading (`organization`) go only to whom the policy shows everyone, `[]` and `null` otherwise. With `login`, one person by their exact login, compared without regard to case, or none: whom the asker sees, and, for an owner of a project, anyone active of the workspace, so that an owner lists someone the list does not show, learning that the login is one of the workspace and nothing more; `listed` is `[]` and `organization` `null` then; an empty or overlong login is `request.invalid`. A person carries their `role` in the workspace (`admin`, who configures it, or `member`, who works in the projects they are in), their `status` (`active`, or `deactivated`: kept with everything they did, refused on every request, and offered to no picker), their `source` (what let them in at their last sign-in: `organization`, the git host's organization the deployment names; `domain`, the Workspace domain it names; or `listed`, an administrator's listing), `deactivatedAt` (or `null`) and `managerId`, the id of the person they report to, the reporting line of the directory an administrator keeps, or `null` for nobody (answered from 0.4.4 and read as optional): what a plugin that reads people takes as the default where it needs someone's manager, the approver of their leave, say, in place of a line of its own. A person also carries `language`, the language they read in: the one they chose, else the one the pages first saw them in, or `null` until then (answered from 0.4.4 and read as optional): what a plugin or an agent writes for them in ([ADR-0065](../adr/0065-a-plugin-writes-one-text-and-a-persons-language-is-kept-from-the-first-time-the-pages-see-them.md)). To an administrator, and to each person for themselves, a person carries `email`, their work email, lowercase, or `null` until known ([ADR-0069](../adr/0069-the-directory-keeps-a-work-email-read-by-an-administrator-the-person-and-a-plugin-allowed-to.md)): the address they sign in with at Google, kept at every sign-in, else what an administrator wrote; everyone else reads a person without it, here and wherever a person is named (answered from 0.4.5 and read as optional). A listing carries its `id`, the `host` (`gh`, `google`), the `login` as the administrator spelled it, and `createdAt`. `organization` is the organization at the git host whose members are in, where the deployment names one (`host`, `name`, and `syncedAt`, when the worker last read it whole, or `null` until it has), or `null`. What a picker of workers and of members is made of, the active people. A token reads it as its person does: what the command's `--worker`, `member` and `person` take a login from, through `login`.
105
+ `{ "items": [person, ...], "listed": [listing, ...] }`: the people the asker may see, those in first and by login, and the logins an administrator let in that nobody has signed in with yet ([ADR-0022](../adr/0022-who-is-in-is-the-consoles-own-record-and-an-administrator-keeps-it.md)). Who sees whom is the workspace's setting, decided by the one policy of the server on every request ([ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md)): with `everyone`, everyone who has signed in; with `shared_projects`, a member sees the active people who are in a project they are in, themselves, the administrators, and their own reporting line, whom they report to and whoever is below them, whatever the projects say ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md)), while an administrator sees everyone whatever the setting; a project open to the workspace has everyone in it, so a member of one sees everyone. The logins let in (`listed`) and the organization's reading (`organization`) go only to whom the policy shows everyone, `[]` and `null` otherwise. With `login`, one person by their exact login, compared without regard to case, or one agent account by its handle, written with its `@` (`?login=@mira`, [ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md)), or none: whom the asker sees, and, for an owner of a project, anyone active of the workspace, so that an owner lists someone the list does not show, learning that the login is one of the workspace and nothing more; `listed` is `[]` and `organization` `null` then; an empty or overlong login is `request.invalid`. A person carries their `role` in the workspace (`admin`, who configures it, or `member`, who works in the projects they are in), their `status` (`active`, or `deactivated`: kept with everything they did, refused on every request, and offered to no picker), their `source` (what let them in at their last sign-in: `organization`, the git host's organization the deployment names; `domain`, the Workspace domain it names; or `listed`, an administrator's listing), `deactivatedAt` (or `null`) and `managerId`, the id of the person they report to, the reporting line of the directory an administrator keeps, or `null` for nobody (answered from 0.4.4 and read as optional): what a plugin that reads people takes as the default where it needs someone's manager, the approver of their leave, say, in place of a line of its own. A person also carries `language`, the language they read in: the one they chose, else the one the pages first saw them in, or `null` until then (answered from 0.4.4 and read as optional): what a plugin or an agent writes for them in ([ADR-0065](../adr/0065-a-plugin-writes-one-text-and-a-persons-language-is-kept-from-the-first-time-the-pages-see-them.md)). To an administrator, and to each person for themselves, a person carries `email`, their work email, lowercase, or `null` until known ([ADR-0069](../adr/0069-the-directory-keeps-a-work-email-read-by-an-administrator-the-person-and-a-plugin-allowed-to.md)): the address they sign in with at Google, kept at every sign-in, else what an administrator wrote; everyone else reads a person without it, here and wherever a person is named (answered from 0.4.5 and read as optional). A listing carries its `id`, the `host` (`gh`, `google`), the `login` as the administrator spelled it, and `createdAt`. `organization` is the organization at the git host whose members are in, where the deployment names one (`host`, `name`, and `syncedAt`, when the worker last read it whole, or `null` until it has), or `null`. What a picker of workers and of members is made of, the active people. A token reads it as its person does: what the command's `--worker`, `member` and `person` take a login from, through `login`.
103
106
 
104
107
  ### `PATCH /api/v1/people/<id>`
105
108
 
106
- Takes `role`, `status`, `managerId`, `email`, one or more, and answers the person, with their `email`. For an administrator, signed in or through their agent's token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)). The board keeps at least one administrator in (`person.last_admin`). A change of role writes `person.role_changed` with `login` and `role`. `managerId` names whom the person reports to: another active person of the workspace who does not report to them, directly or through others, so that the line never loops, or `null` for nobody (`person.invalid_manager` otherwise); it writes `person.manager_changed` with `login` and `manager`, the manager's login or `null`, which reaches the hooks of a plugin that reads the directory as every people event does ([specs/plugins.md](plugins.md#capabilities)). `email` writes the person's work email, lowercase and one per workspace (`person.email_taken`), or `null` for none ([ADR-0069](../adr/0069-the-directory-keeps-a-work-email-read-by-an-administrator-the-person-and-a-plugin-allowed-to.md)); it writes `person.email_changed` with `login` and `set`, whether an address is set now, and never the address, so that the feed tells nobody what only an administrator, the person and a plugin with `people:read:email` read. A person who signs in at Google has theirs from the sign-in, written again at each: the address Google vouches for is theirs over an administrator's word, and whoever else of the workspace held it gives it up, their `email` becoming `null`, whether an administrator wrote it on them or they are the person of an account Google has since made again under another id, so that the sign-in never fails on it. Each address a sign-in changes, the other person's and the signing-in person's own, writes `person.email_changed` the same way, by nobody; a person's first sign-in writes `person.joined` alone. `status: "deactivated"` takes the person out: refused on every request from the next one, their agents' tokens with them, listed nowhere and offered to no picker, kept with everything they did; the listing they came in on goes with it, so that signing in again admits nobody. `status: "active"` takes them back in, and lists them again where a listing let them in. Each writes `person.deactivated` or `person.reactivated` with `login`; what is already so writes nothing. A person the organization let in is neither (`person.of_organization`): the organization says, on the schedule the worker reads it on.
109
+ Takes `role`, `status`, `managerId`, `email`, `title`, one or more, and answers the person, with their `email`. For an administrator, signed in or through their agent's token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)). `title` says what the member does, in a line up to `MAX_PERSON_TITLE_LENGTH`, or `null` for none ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md)): every member's, a person's as an agent account's; a patch that names a title alone is taken from a supervisor of an agent account too, an administrator or whoever is above it in the reporting line, who is answered the person without an `email`. It writes `person.updated` with `login`, `fields: ["title"]`, and the `handle` of an agent account. The board keeps at least one administrator in (`person.last_admin`). A change of role writes `person.role_changed` with `login` and `role`. `managerId` names whom the person reports to: another active person of the workspace who does not report to them, directly or through others, so that the line never loops, or `null` for nobody (`person.invalid_manager` otherwise); it writes `person.manager_changed` with `login` and `manager`, the manager's login or `null`, which reaches the hooks of a plugin that reads the directory as every people event does ([specs/plugins.md](plugins.md#capabilities)). `email` writes the person's work email, lowercase and one per workspace (`person.email_taken`), or `null` for none ([ADR-0069](../adr/0069-the-directory-keeps-a-work-email-read-by-an-administrator-the-person-and-a-plugin-allowed-to.md)); it writes `person.email_changed` with `login` and `set`, whether an address is set now, and never the address, so that the feed tells nobody what only an administrator, the person and a plugin with `people:read:email` read. A person who signs in at Google has theirs from the sign-in, written again at each: the address Google vouches for is theirs over an administrator's word, and whoever else of the workspace held it gives it up, their `email` becoming `null`, whether an administrator wrote it on them or they are the person of an account Google has since made again under another id, so that the sign-in never fails on it. Each address a sign-in changes, the other person's and the signing-in person's own, writes `person.email_changed` the same way, by nobody; a person's first sign-in writes `person.joined` alone. `status: "deactivated"` takes the person out: refused on every request from the next one, their agents' tokens with them, listed nowhere and offered to no picker, kept with everything they did; the listing they came in on goes with it, so that signing in again admits nobody. `status: "active"` takes them back in, and lists them again where a listing let them in. Each writes `person.deactivated` or `person.reactivated` with `login`; what is already so writes nothing. A person the organization let in is neither (`person.of_organization`): the organization says, on the schedule the worker reads it on.
107
110
 
108
111
  ### `POST /api/v1/listings` and `DELETE /api/v1/listings/<id>`
109
112
 
@@ -128,7 +131,7 @@ Takes `key` and `name`, and optionally `description`, `visibility` (default `pri
128
131
 
129
132
  ### `GET /api/v1/events?after=&limit=`
130
133
 
131
- The workspace's own events, the ones about no project: who joined (`person.joined`), who was made what (`person.role_changed`), who was let in, taken off the list, taken out and taken back in (`person.listed`, `person.unlisted`, `person.deactivated`, `person.reactivated`, each with the `login`), whom someone reports to now (`person.manager_changed`, with the `login` and the `manager`'s login, or `null`), what became of the categories (`category.created`, `category.updated`, `category.removed`, each with the `key` and the `name`), and which of the workspace's settings an administrator changed (`workspace.updated`, with `fields`). The same shape and parameters as a project's feed below, without the filters. They say who is in, so they go to whom the policy shows everyone ([ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md)): `auth.forbidden` for a member while the people are narrowed to those they share a project with.
134
+ The workspace's own events, the ones about no project: who joined (`person.joined`), who was made what (`person.role_changed`), who was let in, taken off the list, taken out and taken back in (`person.listed`, `person.unlisted`, `person.deactivated`, `person.reactivated`, each with the `login`), whom someone reports to now (`person.manager_changed`, with the `login` and the `manager`'s login, or `null`), what changed of a member, a title or what an agent account is (`person.updated`, with the `login`, the `fields` and an agent account's `handle`), what became of the categories (`category.created`, `category.updated`, `category.removed`, each with the `key` and the `name`), and which of the workspace's settings an administrator changed (`workspace.updated`, with `fields`). The same shape and parameters as a project's feed below, without the filters. They say who is in, so they go to whom the policy shows everyone ([ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md)): `auth.forbidden` for a member while the people are narrowed to those they share a project with.
132
135
 
133
136
  ### `PATCH /api/v1/me`
134
137
 
@@ -138,6 +141,8 @@ Keeps the language the person reads in ([ADR-0012](../adr/0012-the-pages-speak-t
138
141
 
139
142
  The workspace's settings, which an administrator keeps on the Settings page ([ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md)), from the console's own pages or through their agent's token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)): `{ "peopleVisibility": "everyone" | "shared_projects", "weekStart": "auto" | "monday" | "sunday", "timeZone": "Asia/Seoul" | null, "language": "en" | "ko" | null }`, which of the settings to change, at least one, a time zone being a name the console knows and a language one it speaks (`request.invalid` otherwise, as for a patch that names nothing); answers the `workspace` as `GET /api/v1/me` describes it, and writes `workspace.updated` with the `fields` that changed; what is already so writes nothing. `auth.forbidden` for a member. The setting holds from the next request on, for everyone: nothing of it is kept in memory.
140
143
 
144
+ The same route keeps what the workspace's agents work with ([ADR-0089](../adr/0089-a-workspace-names-the-services-its-agents-work-with.md)): `handle`, the organization's short name, spelled as an agent account's handle is (`acme`); `domain`, its mail and web domain in small letters (`acme.example`); `null` takes either away; and `services`, by role, `identity`, `git` and `messenger`, each `{ "kind", ...parameters }` or `null` to take it away, a role left out staying as it is. A kind the package knows takes its own parameters and is named for a role it may have: `github` for `identity` or `git`, with `organization` and `account`; `gitlab` for `git`, with `group` (a group as the host nests them, `acme/platform`), `host` (the domain of one an organization runs itself; `gitlab.com` where it names none), `form` (`user`, a person's account, which is the one where it names none, or `service`, the account the host has for a machine, which signs in at no page and holds a token alone) and `account`; `google-workspace` for `identity`, with `account`; `slack` for `messenger`, with `workspace`. `account` is the template an agent's name there is put together from, of letters, digits, `.`, `_`, `-`, `@` and the places `{workspace}`, `{agent}` and `{domain}`; left out, the kind's own (`{agent}@{domain}` at a service of mailboxes, `{workspace}-{agent}` at a git host). Any other kind is kept as it came, with up to `MAX_SERVICE_PARAMETERS` parameters, each a word and a line of up to `MAX_SERVICE_VALUE_LENGTH`; no secret belongs among them. A service that does not read is `request.invalid`, and the message says which and why (`services.git: takes no org.`), naming a parameter at most. The service named for `identity` is one the deployment signs people in through, since an agent account signs in to the console with it (`workspace.identity_unavailable`). The workspace answers them, `handle` and `domain` `null` for none and `services` with the roles that are named, on `GET /api/v1/me` for every member, and leaves the three out for nobody signed in, who is told the board's name, its language and the ways in and not what its accounts are named from; `workspace.updated` says which changed, a service by its role (`services.git`). The console derives nothing from them by itself: whoever makes an agent account puts its login together from them (`agentLoginOf` in the package), and the console takes it as any login.
145
+
141
146
  ### `PUT /api/v1/workspace/pack-token` and `DELETE .../pack-token`
142
147
 
143
148
  The SkillCDN token the organization's pack is read with ([ADR-0036](../adr/0036-a-private-pack-is-connected-with-a-code-a-person-approves-from-the-projects-settings.md)), for an administrator, signed in from the console's own pages or through their agent's token: every project that names no address of its own and holds no token of its own reads the organization's pack (`SKILLS_ADDRESS`) with it. `PUT` takes `{ "token" }` as the project's route does, tries it against the organization's pack once (`workspace.pack_token_refused` when the pack is not served to it or the console names no address for the organization's skills; `skills.unavailable` when the deployment could not be reached), seals it with the console's secret (`workspace.pack_token_unsupported` where the console has none) and keeps it on the workspace, answering the workspace as `me` carries it, with `skills.packToken: { setAt }`, and writing a `workspace.updated` event naming the field `packToken`. The token is answered nowhere and logged nowhere. `DELETE` takes it away the same way; taking away what is not there writes nothing.
@@ -146,6 +151,10 @@ The SkillCDN token the organization's pack is read with ([ADR-0036](../adr/0036-
146
151
 
147
152
  The workspace's token connected with a code a person approves ([ADR-0036](../adr/0036-a-private-pack-is-connected-with-a-code-a-person-approves-from-the-projects-settings.md)), for an administrator, as a project's is: `POST .../connect` asks the deployment to connect the organization's address and answers `201` with `{ "code", "url", "expiresAt", "intervalSeconds" }`, with `workspace.pack_connect_unsupported`, `workspace.pack_connect_refused` and `skills.unavailable` where a project's route has its own, the refusal naming a console with no address for the organization's skills; `GET` reads how it stands and changes nothing: `{ "status": "none" }`, `pending` with what the person is shown, or `ended` with `reason` `expired`; `POST .../connect/claim` asks the deployment whether the person approved ([ADR-0046](../adr/0046-the-claim-of-a-pack-token-is-a-request-of-its-own-and-reading-how-the-connection-stands-changes-nothing.md)) and answers `pending` still, `connected` with `workspace` as `me` carries it once the token is kept, or `ended` with `reason`; `DELETE` gives the request up. One request for the workspace at a time.
148
153
 
154
+ ### `GET /api/v1/workspace/skills`, `.../skills/one`, `.../skills/file`, `.../skills/browse`, `.../skills/find`, `.../skills/rows` and `.../skills/code`
155
+
156
+ The organization's pack, read where no project is named ([ADR-0113](../adr/0113-the-organizations-pack-is-read-where-no-project-is-named-by-every-member.md)): the pack at the console's own address (`SKILLS_ADDRESS`), which a project that names no address reads too, by the seven reads of [a project's pack](#get-apiv1projectskeyskills), one for one: the same queries, the same bounds, the same envelope and the same bodies, with the workspace's SkillCDN token where the pack is private ([above](#put-apiv1workspacepack-token-and-delete-pack-token)) and no project's. For every member of the workspace, signed in or through their agent's token, an agent account as a person, whatever projects they are in, as the workspace's rules are read; whoever is out, deactivated or no longer let in, and whoever is not signed in, read none of it. `status` is `none`, with `address: null`, where the console names no address for the organization's skills. An outline names `/api/v1/workspace/skills/rows` and `.../code` for a document's tables and code blocks. Each read is logged with who read which path of which pack, with no project, never with what was read. What the command reads in a directory that names no project: a desk, or a folder a repository is about to be made in. From 0.5.1.
157
+
149
158
  ### `GET /api/v1/categories`
150
159
 
151
160
  `{ "items": [category, ...] }`: the kinds of work tasks are sorted into ([ADR-0019](../adr/0019-a-task-is-planned-in-days-the-board-keeps-its-moments-and-goals-and-categories-give-the-work-its-shape.md)), by name, for whoever is signed in or presents a token. A category carries its `key` (what the command and the filters say; lowercase letters, digits and hyphens; immutable), `name`, `color` (one of `CATEGORY_COLORS`, a name the pages paint and never a value typed), `createdAt` and `updatedAt`. Every workspace starts with `engineering`, `product`, `design`, `marketing` and `operations`.
@@ -156,11 +165,11 @@ Kept by an administrator, signed in or through their agent's token. `POST` takes
156
165
 
157
166
  ### `GET /api/v1/rules`, `PUT /api/v1/rules`, `POST /api/v1/rules/archive` and `GET /api/v1/rules/versions`
158
167
 
159
- The rules of the board ([ADR-0023](../adr/0023-the-rules-of-a-board-are-pages-the-workspace-and-its-projects-keep-read-first-by-every-agent.md)): what the organization asks of agents, read by whoever is signed in or presents a token, kept by an administrator, signed in or through their agent's token. `GET` answers `{ "source", "body", "page" }`: `source` is `reference` while the organization has written none, and `body` is then the console's own rules as this version of the console carries them, with `page: null`; once written, `source` is `written`, `body` the page's and `page` the page without its body (as a folder lists one: `path` `rules`, `title` `Rules`, `version`, `updatedBy`, `agent`, `createdAt`, `updatedAt`). `PUT` takes `body` (Markdown, `MAX_RULES_LENGTH`) and optionally `baseVersion`, writes the next version of the page, bringing it back when it was put away, and answers what `GET` answers; the console's own rules sent as they are are never written, so that what holds keeps following the console's version: with none written they change nothing, and with the organization's written they put its page away, as `POST .../archive` does; a write from a version the rules have moved on from is `document.conflict`. The write is a `document.written` event in the workspace's own feed, with `path`, `title` and `version`. `POST .../archive` puts the written rules away, so that the console's own hold again (`document.archived`); what is put away already changes nothing. `.../versions` answers `{ "items": [version, ...] }` as a page's versions are answered, newest first, and `{ "items": [] }` while none is written. A body may say `{language}` for the language of the person an agent works for: the API answers the text as written, and the pages and the command fill it (`fillRules`), with the name of the language the person reads in (`GET /api/v1/me`, `language`) or with the task's while they have none. The answer also carries `plugins` ([plugins.md](plugins.md), "The command"): every enabled plugin the asker may use, by key, each with its `name`, `agentNote` and `description` by language and the asker's `roles` in it; empty where the console has none.
168
+ The rules of the board ([ADR-0023](../adr/0023-the-rules-of-a-board-are-pages-the-workspace-and-its-projects-keep-read-first-by-every-agent.md), [ADR-0120](../adr/0120-the-consoles-rules-always-hold-and-a-workspace-and-a-project-add-to-them.md)): the console's rules, which always hold, and what the organization adds to them; read by whoever is signed in or presents a token, and added to by an administrator, signed in or through their agent's token. `GET` answers `{ "source", "body", "page", "own", "added" }`. `body` is what holds at the workspace, whole: the console's rules as this version of the console carries them, then what the organization adds under a heading of its own (`# What this organization adds`), which is what a command of 0.5.0 prints. `source` is `reference` while the organization adds nothing, with `page: null`; once something is added, `source` is `written` and `page` is the additions' page without its body (as a folder lists one: `path` `rules`, `title` `Rules`, `version`, `updatedBy`, `agent`, `createdAt`, `updatedAt`). The two parts come apart as well, from 0.5.1 and read as optional: `own`, the console's rules by themselves, and `added`, `{ "body", "page" }` for what the organization adds, or `null`. `PUT` takes `body` (Markdown, `MAX_RULES_LENGTH`) and optionally `baseVersion`, writes it as the next version of what the organization adds, bringing the page back when it was put away, and answers what `GET` answers. The console's rules are never written: a body that carries them whole, as a command or a page of before read them and sends them back, is written as what stands before them and after them, without the heading, and with nothing beside them it puts what was added away, as `POST .../archive` does. The whole is known as it was read: with `{language}` as it stands or filled with any words, as `console rules` prints it, and with lines that end in a line feed or in a carriage return and one; a body that quotes a sentence of the rules, or a part of them, is written as it is. A write from a version the additions have moved on from is `document.conflict`. The write is a `document.written` event in the workspace's own feed, with `path`, `title` and `version`. `POST .../archive` puts what the organization adds away, so that the console's rules stand alone (`document.archived`); what is put away already changes nothing. `.../versions` answers `{ "items": [version, ...] }` as a page's versions are answered, newest first, and `{ "items": [] }` while nothing is added. A body may say `{language}` for the language of the person an agent works for: the API answers the text as written, and the pages and the command fill it (`fillRules`), with the name of the language the person reads in (`GET /api/v1/me`, `language`) or with the task's while they have none. The answer also carries `plugins` ([plugins.md](plugins.md), "The command"): every enabled plugin the asker may use, by key, each with its `name`, `agentNote` and `description` by language and the asker's `roles` in it; empty where the console has none.
160
169
 
161
170
  ### `GET /api/v1/work`
162
171
 
163
- `{ "tasks": [{ "project": { "key", "name", "color", "symbol", "icon" }, "task" }, ...], "closed": [{ "project", "task" }, ...], "decisions": [{ "project", "decision" }, ...] }`: what is on the asker's plate across the projects they may see ([ADR-0019](../adr/0019-a-task-is-planned-in-days-the-board-keeps-its-moments-and-goals-and-categories-give-the-work-its-shape.md)): the open tasks they are at work on, the sooner due first and those with no day last; `closed`, the tasks they are at work on that are done or dropped and not yet put away, the last closed first, so that the week on the plate's page shows them on their days as a project's calendar does; and the decisions that wait for the asker's answer ([ADR-0042](../adr/0042-a-decision-is-addressed-to-a-person-its-raiser-unless-another-is-named.md)), a plugin's wherever it is and a person's own while the asker is in its project ([ADR-0077](../adr/0077-a-persons-own-decision-is-its-projects-and-reaches-nobody-out-of-it.md)), the longest waiting first; each with the project it belongs to, so that a page says and links it. A task put away is in neither list ([ADR-0030](../adr/0030-a-task-is-put-away-from-any-state.md)). At most `LIST_LIMIT` of each.
172
+ `{ "tasks": [{ "project": { "key", "name", "color", "symbol", "icon" }, "task" }, ...], "closed": [{ "project", "task" }, ...], "decisions": [{ "project", "decision" }, ...] }`: what is on the asker's plate across the projects they may see ([ADR-0019](../adr/0019-a-task-is-planned-in-days-the-board-keeps-its-moments-and-goals-and-categories-give-the-work-its-shape.md)): the open tasks they are at work on, the sooner due first and those with no day last; `closed`, the tasks they are at work on that are done or dropped and not yet put away, the last closed first, so that the week on the plate's page shows them on their days as a project's calendar does; and the decisions that wait for the asker's answer ([ADR-0042](../adr/0042-a-decision-is-addressed-to-a-person-its-raiser-unless-another-is-named.md)), a plugin's wherever it is and a person's own while the asker is in its project ([ADR-0077](../adr/0077-a-persons-own-decision-is-its-projects-and-reaches-nobody-out-of-it.md)), the longest waiting first; each with the project it belongs to, so that a page says and links it. A task put away is in neither list ([ADR-0030](../adr/0030-a-task-is-put-away-from-any-state.md)). At most `LIST_LIMIT` of each. With `?brief=true`, what the pages ask for, the tasks and the decisions come without their bodies, which the plate's page does not show and which weigh more than the rest of the plate together; the command reads the plate whole.
164
173
 
165
174
  ### `GET /api/v1/decisions?open=&raised=&limit=&offset=`
166
175
 
@@ -184,11 +193,11 @@ Takes one of the asker's tokens away, whoever holds it, and answers `204`. A tok
184
193
 
185
194
  ### `DELETE /api/v1/me/token`
186
195
 
187
- The token the request is made with gives itself up, so that it is good for nothing from now on, and the answer is `204`: what `console logout` does, so that a token forgotten on a machine does not outlive it. The one thing a token does about the tokens; with a session, which has none to give, it is `request.invalid`. A token whose person is out is refused here as everywhere ([ADR-0044](../adr/0044-a-token-of-a-person-who-is-out-is-kept-and-refused-with-the-reason-until-they-are-back-in.md)): the console keeps it for when they are back in, and the command forgets it on the machine.
196
+ The token the request is made with gives itself up, so that it is good for nothing from now on, and the answer is `204`: what `console logout` does, so that a token forgotten on a machine does not outlive it. The one thing a token does about the tokens; with a browser's session, which has none to give, it is `request.invalid`. A command signed in as the account itself gives its session up the same way, and that session is good for nothing from then on. A token whose person is out is refused here as everywhere ([ADR-0044](../adr/0044-a-token-of-a-person-who-is-out-is-kept-and-refused-with-the-reason-until-they-are-back-in.md)): the console keeps it for when they are back in, and the command forgets it on the machine.
188
197
 
189
198
  ### `GET /api/v1/sessions`, `DELETE /api/v1/sessions/<id>` and `DELETE /api/v1/sessions/others`
190
199
 
191
- The browsers whoever is signed in is signed in on: for a person signed in on the console's own pages, never with a token (`auth.session_required`), so that a token which leaks reaches no browser of its person's. `GET` answers `{ "items": [session, ...], "idleDays": 30 }`, the current session first and then the last used first: `id`, `current` (whether it is the session this request was made on), `createdAt`, `lastSeenAt` (noted at most hourly), `expiresAt` (the idle limit from the last use; `idleDays` says it in days, the deployment's `SESSION_TTL_DAYS`), `browser` and `platform` (what the browser called itself when the session began, read as families, `Chrome` on `Windows`, or `null` for either the console does not know), `address` (where the browser last came from, as the server saw it behind a trusted proxy or not, noted with the last use, or `null`), and never the cookie's token. `DELETE .../<id>` ends one of the asker's sessions and answers `204`; the current one ends with its cookie, which the answer takes away; another person's, or one already ended, is `session.not_found`. `DELETE .../others` ends every session of the asker but the one the request is made on, and answers `204`. A session not used for `SESSION_TTL_DAYS` ends on its own, which is the one policy for a session left alone.
200
+ Where whoever is signed in is signed in: their browsers, and any command signed in as the account itself ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md)), each a session with its `kind`, `browser` or `command`, and for a command's its `name`, what the command called itself when it signed in (`null` for a browser's, as `browser` and `platform` are `null` for a command's). For a person signed in on the console's own pages, never with a token or a command's session (`auth.session_required`), so that a credential which leaks reaches no session of its member's. `GET` answers `{ "items": [session, ...], "idleDays": 30 }`, the current session first and then the last used first: `id`, `current` (whether it is the session this request was made on), `createdAt`, `lastSeenAt` (noted at most hourly), `expiresAt` (the idle limit from the last use; `idleDays` says it in days, the deployment's `SESSION_TTL_DAYS`), `browser` and `platform` (what the browser called itself when the session began, read as families, `Chrome` on `Windows`, or `null` for either the console does not know), `address` (where the browser last came from, as the server saw it behind a trusted proxy or not, noted with the last use, or `null`), and never the cookie's token. `DELETE .../<id>` ends one of the asker's sessions and answers `204`; the current one ends with its cookie, which the answer takes away; another person's, or one already ended, is `session.not_found`. `DELETE .../others` ends every session of the asker but the one the request is made on, and answers `204`. A session not used for `SESSION_TTL_DAYS` ends on its own, which is the one policy for a session left alone.
192
201
 
193
202
  ### `GET /api/v1/people/<id>/tokens` and `DELETE /api/v1/people/<id>/tokens/<token id>`
194
203
 
@@ -196,7 +205,7 @@ An administrator's sight of everyone's agents ([ADR-0011](../adr/0011-an-agent-c
196
205
 
197
206
  ### `GET /api/v1/people/<id>/work`
198
207
 
199
- `{ "tasks": [{ "project", "task" }, ...], "closed": [{ "project", "task" }, ...] }`: what is on another person's plate, for whoever oversees them: an administrator, or an owner of a project the person is in (everyone of the workspace is in a project open to it; a private one holds those listed), signed in or through their agent. The open tasks the person is at work on, the sooner due first and those with no day last, and as `closed` those of them done or dropped and not yet put away, both within the projects the asker may see and no other, each with its project; the decisions are left out, since they wait for anyone. `auth.forbidden` for anyone else; `person.not_found` for an id that is nobody's.
208
+ `{ "tasks": [{ "project", "task" }, ...], "closed": [{ "project", "task" }, ...] }`: what is on another person's plate, for whoever oversees them: an administrator, or an owner of a project the person is in (everyone of the workspace is in a project open to it; a private one holds those listed), signed in or through their agent. The open tasks the person is at work on, the sooner due first and those with no day last, and as `closed` those of them done or dropped and not yet put away, both within the projects the asker may see and no other, each with its project; the decisions are left out, since they wait for anyone. `auth.forbidden` for anyone else; `person.not_found` for an id that is nobody's. `?brief=true` leaves the tasks' bodies out, as it does on the asker's own plate.
200
209
 
201
210
  ### `GET /api/v1/pictures?src=`
202
211
 
@@ -206,12 +215,14 @@ A picture from elsewhere, for a page that shows one ([ADR-0048](../adr/0048-a-pi
206
215
 
207
216
  `POST /api/v1/connect`, `GET /api/v1/connect/<code>`, `POST /api/v1/connect/<code>/approve`, `POST /api/v1/connect/<code>/deny` and `POST /api/v1/connect/claim`: how an agent gets its token without anyone copying one ([ADR-0011](../adr/0011-an-agent-connects-with-a-short-code-a-person-approves-and-the-token-is-never-shown.md)).
208
217
 
209
- `POST /api/v1/connect` is nobody's: the command sends `{ "agent" }` (what the agent calls itself and where it runs, a line up to `MAX_TOKEN_NAME_LENGTH`) and is answered `201` with `{ "code", "url", "secret", "expiresAt", "interval" }`: a code of eight characters in two groups (`ABCD-EFGH`, from an alphabet without look-alikes) for a person to approve, the console's own page for it, a secret (`cns_c_...`) the command claims with and shows nowhere, when the request expires (thirty minutes after it began), and how many seconds the command waits between claims. A deployment holds a bounded number of requests at once (`connect.too_many`), and a bounded number from one address, as the trusted proxies resolve it: at that bound the oldest request of the address not yet approved makes way for the new one, and its claim is `connect.not_found`; an address whose requests are all approved is `connect.too_many` ([ADR-0047](../adr/0047-a-connection-request-is-bounded-per-address-and-the-oldest-not-yet-approved-makes-way.md)).
218
+ `POST /api/v1/connect` is nobody's: the command sends `{ "agent" }` (what the agent calls itself and where it runs, a line up to `MAX_TOKEN_NAME_LENGTH`) and is answered `201` with `{ "code", "url", "secret", "expiresAt", "interval" }`: a code of eight characters in two groups (`ABCD-EFGH`, from an alphabet without look-alikes) for a person to approve, the console's own page for it, a secret (`cns_c_...`) the command claims with and shows nowhere, when the request expires (thirty minutes after it began), and how many seconds the command waits between claims. The answer is read within bounds (`restConnectionSchema`): the code up to 64 characters, the page's address up to `MAX_URL_LENGTH`, the secret up to `MAX_SECRET_LENGTH`, the instant up to 40 characters and the wait up to 600 seconds, none empty, each no wider than the command's credentials file reads back, since the route answers nobody and the command keeps the answer while it waits ([ADR-0129](../adr/0129-a-login-under-an-agent-says-its-code-and-ends-and-the-next-call-waits.md)); an answer beyond them is not a console's, and is refused. A deployment holds a bounded number of requests at once (`connect.too_many`), and a bounded number from one address, as the trusted proxies resolve it: at that bound the oldest request of the address not yet approved makes way for the new one, and its claim is `connect.not_found`; an address whose requests are all approved is `connect.too_many` ([ADR-0047](../adr/0047-a-connection-request-is-bounded-per-address-and-the-oldest-not-yet-approved-makes-way.md)).
210
219
 
211
- `GET /api/v1/connect/<code>`, for a person signed in, answers what asks: `{ "code", "agent", "createdAt", "expiresAt", "approved" }`. A code is read as a person types it: any case, with or without the hyphen. `POST .../approve`, from the console's own pages, takes what `POST /api/v1/tokens` takes (`name`, `expiresInDays`) and answers the request, approved; `POST .../deny` takes the request away and answers `204`.
220
+ `GET /api/v1/connect/<code>`, for a person signed in, answers what asks: `{ "code", "agent", "createdAt", "expiresAt", "approved", "as" }`. A code is read as a person types it: any case, with or without the hyphen. `POST .../approve`, from the console's own pages, takes what `POST /api/v1/tokens` takes (`name`, `expiresInDays`) and answers the request, approved; `POST .../deny` takes the request away and answers `204`.
212
221
 
213
222
  `POST /api/v1/connect/claim` takes `{ "secret" }` and answers `202` with `{ "status": "pending", "expiresAt" }` while nobody approved, or `200` with `{ "status": "connected", "token", "secret" }` once: the token is made then, for the approver, as any token of theirs is, and the request goes with it, so that a second claim is `connect.not_found`. Nothing secret rests in the database meanwhile: the hash of the command's secret, and never a token.
214
223
 
224
+ A connection may ask to be the account itself ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md), point 9): the command sends `as: "self"` beside `agent` (`"agent"`, or nothing, is an agent's connection as above), which is how an agent account's own command signs in, and a person's where they work at it themselves. `GET /api/v1/connect/<code>` then answers `as: "self"`, and the page asks whoever is signed in whether the command is them: `POST .../approve` takes no name and no days for it, and whoever approves says "this is me". The claim answers `200` with `{ "status": "signed_in", "session", "secret" }`: a session of the command's, begun then from where the claim comes, called what the command called itself, kept for as long as it is used and ended when left unused for `SESSION_TTL_DAYS`, as a browser's is; and its secret, this once, which the command presents as a token is presented. A request that is refused because the member is out is no use of the session: it is refused with the reason, as a token is ([ADR-0044](../adr/0044-a-token-of-a-person-who-is-out-is-kept-and-refused-with-the-reason-until-they-are-back-in.md)), and works again when they are back within the days it had left; out for longer, the account signs its command in again. The session is listed among the member's own ([`GET /api/v1/sessions`](#get-apiv1sessions-delete-apiv1sessionsid-and-delete-apiv1sessionsothers)) and ended there, or by a supervisor of an agent account ([`.../sign-ins`](#get-apiv1agentshandlesign-ins-and-delete-sign-insid)).
225
+
215
226
  ## A project
216
227
 
217
228
  Everything below is under `/api/v1/projects/<key>`, for whoever may see the project; what changes it needs a member (with a session from the console's own pages, or a token), what configures it an owner signed in.
@@ -220,6 +231,10 @@ Everything below is under `/api/v1/projects/<key>`, for whoever may see the proj
220
231
 
221
232
  The project, as the asker sees it. A patch, for an owner, signed in or with a token, takes any of `name`, `description`, `visibility`, `skillsAddress` (`null` for the organization's), `color` and `symbol` (`null` for none), and writes a `project.updated` event naming the `fields`; what is already so writes nothing. The key does not change.
222
233
 
234
+ ### `GET /api/v1/projects/<key>/glance`
235
+
236
+ What the project's tile at a glance shows on the front page ([ADR-0105](../adr/0105-a-project-at-a-larger-size-is-a-glance-at-its-board.md)), in one answer read at one moment, so that its figures and its rows agree ([ADR-0107](../adr/0107-a-glance-is-read-in-one-request.md)); for whoever may see the project. `{ "taskCounts", "openDecisions", "inProgress": { "items", "total" }, "inReview": { "items", "total" }, "goals": { "items", "total" } }`: `taskCounts` is the tasks of its board by state, `idea`, `ready`, `in_progress`, `in_review`, `done` and `dropped`, those put away left out; `openDecisions` the decisions waiting in it. `inProgress` and `inReview` are its tasks in those states, the sooner due first, those due on no day after them and the newer first within a day, each as `id`, `number`, `title`, `state`, `dueOn` and `workers` and nothing else of a task; `goals` its goals ahead, the active before the planned and the sooner due first as the roadmap lists them, each as `id`, `title`, `state`, `dueOn` and `taskCounts`. A list carries 20 rows at most, ordered and cut by the console, and `total` says how many there are in all. From 0.5.0.
237
+
223
238
  ### `POST /api/v1/projects/<key>/icon`, `DELETE .../icon` and `GET .../icon`
224
239
 
225
240
  The project's own image for its mark, in place of the symbol on the colour. `POST`, for an owner, takes a form with a part called `file`: a PNG, a JPEG, a GIF or a WebP of at most `MAX_PROJECT_ICON_BYTES`, known by its first bytes and never by what the form says of it (`project.invalid_icon`; `request.too_large`). The bytes are kept by their hash, the project is answered with its `icon`, and the board hears `project.updated` with `fields: ["icon"]`; the same image again writes nothing. `DELETE` takes the image away and answers the project. `GET`, for whoever may see the project, answers the bytes with their type, the hash as `ETag` and `Cache-Control: private, max-age=86400, immutable`, since the address the pages read it at carries the hash, or `304` to a matching `If-None-Match`; a project without an image is `project.no_icon`. The pages read it at `projectIconPath(key, icon)`, which carries the hash as a version.
@@ -234,7 +249,7 @@ For an owner, signed in or with a token. The patch takes `role` and writes `proj
234
249
 
235
250
  ### `GET /api/v1/projects/<key>/tasks?state=&open=&archived=&category=&goal=&worker=&unassigned=&dueBy=&q=&limit=&offset=`
236
251
 
237
- `{ "items": [task, ...], "more": boolean }`: the project's board, newest first, a page at a time: `limit` (1 to `LIST_LIMIT`, the default) and `offset` (from 0) say which page, and `more` whether there is one after it; a `limit` or an `offset` that is not a number in range is `request.invalid`. `state` keeps one state of it; `open=true` the tasks not done or dropped, `open=false` the rest; `category=<key>` those sorted into a category; `goal=<id>` those that work towards a goal; `worker=<person id>` those one person is at work on, `unassigned=true` those nobody is at work on (with `worker`, nothing); `dueBy=<day>` (`2026-10-24`) those due on that day or before it; `q=<words>` (1 to `MAX_SEARCH_LENGTH` characters) those whose title holds every word, whatever the case and in any order, and the task of that number for a number (`12`, `#12`), which is how a picker or a command finds a task by its title ([ADR-0037](../adr/0037-a-task-has-one-owner-and-any-number-of-workers-and-a-parent-or-a-goal-is-found-by-search.md)). The tasks put away ([ADR-0029](../adr/0029-a-task-done-or-dropped-is-put-away-out-of-the-board-and-open-by-its-number.md)) are left out; `archived=true` answers them alone, newest first: the archive and the board are two listings, never one. A task carries its `number` (the one people say out loud, numbered per project), `title`, `body` (Markdown, to be shown as text or rendered to elements, never as HTML), `state`, `priority`, `owner` (one person, whoever wrote it), `agent` (the agent the task was written through, or `null` when a person wrote it themselves, the owner may have changed since; [ADR-0056](../adr/0056-a-record-that-names-the-person-who-did-a-thing-names-the-agent-they-did-it-through.md); from 0.4.4, read as optional), `workers` (the people at work on it, in the order they came to it, `[]` while nobody is; [ADR-0037](../adr/0037-a-task-has-one-owner-and-any-number-of-workers-and-a-parent-or-a-goal-is-found-by-search.md)), `parentId`, `category` (its `key`, `name` and `color` as the workspace keeps it, or `null`), `goalId` (or `null`), its plan ([ADR-0019](../adr/0019-a-task-is-planned-in-days-the-board-keeps-its-moments-and-goals-and-categories-give-the-work-its-shape.md)): `startsOn` and `dueOn`, each a day (`2026-10-24`) or `null`; its moments, which the board keeps itself: `startedAt`, when it was first moved past `ready`, and `doneAt`, when it was moved to `done`, each an instant or `null`; `archivedAt`, when it was put away, an instant or `null` while it is current; `links` (`url` and `label`), `openDecisions` (how many decisions about it wait for a person), `openRuns` (how many runs on it are open: begun and not ended, which says nothing of whether an agent is still at it, [ADR-0020](../adr/0020-the-console-does-not-claim-an-agent-is-at-work-a-run-says-when-it-was-last-heard-from-and-a-new-run-takes-over.md)), `createdAt` and `updatedAt`.
252
+ `{ "items": [task, ...], "more": boolean }`: the project's board, newest first, a page at a time; `brief=true` answers the same page with every task without its `body`, for what lists tasks and shows no body, a listing of the command or a desk's pages, where the bodies weigh more than the rest of a page together (a console from before 0.5.1 ignores the word and answers the tasks whole, which reads the same, so whoever asks for the brief form reads `body` as optional). `limit` (1 to `LIST_LIMIT`, the default) and `offset` (from 0) say which page, and `more` whether there is one after it; a `limit` or an `offset` that is not a number in range is `request.invalid`. `state` keeps one state of it; `open=true` the tasks not done or dropped, `open=false` the rest; `category=<key>` those sorted into a category; `goal=<id>` those that work towards a goal; `worker=<person id>` those one person is at work on, `unassigned=true` those nobody is at work on (with `worker`, nothing); `dueBy=<day>` (`2026-10-24`) those due on that day or before it; `q=<words>` (1 to `MAX_SEARCH_LENGTH` characters) those whose title holds every word, whatever the case and in any order, and the task of that number for a number (`12`, `#12`), which is how a picker or a command finds a task by its title ([ADR-0037](../adr/0037-a-task-has-one-owner-and-any-number-of-workers-and-a-parent-or-a-goal-is-found-by-search.md)). The tasks put away ([ADR-0029](../adr/0029-a-task-done-or-dropped-is-put-away-out-of-the-board-and-open-by-its-number.md)) are left out; `archived=true` answers them alone, newest first: the archive and the board are two listings, never one. A task carries its `number` (the one people say out loud, numbered per project), `title`, `body` (Markdown, to be shown as text or rendered to elements, never as HTML), `state`, `priority`, `owner` (one person, whoever wrote it), `agent` (the agent the task was written through, or `null` when a person wrote it themselves, the owner may have changed since; [ADR-0056](../adr/0056-a-record-that-names-the-person-who-did-a-thing-names-the-agent-they-did-it-through.md); from 0.4.4, read as optional), `workers` (the people at work on it, in the order they came to it, `[]` while nobody is; [ADR-0037](../adr/0037-a-task-has-one-owner-and-any-number-of-workers-and-a-parent-or-a-goal-is-found-by-search.md)), `parentId`, `category` (its `key`, `name` and `color` as the workspace keeps it, or `null`), `goalId` (or `null`), its plan ([ADR-0019](../adr/0019-a-task-is-planned-in-days-the-board-keeps-its-moments-and-goals-and-categories-give-the-work-its-shape.md)): `startsOn` and `dueOn`, each a day (`2026-10-24`) or `null`; its moments, which the board keeps itself: `startedAt`, when it was first moved past `ready`, and `doneAt`, when it was moved to `done`, each an instant or `null`; `archivedAt`, when it was put away, an instant or `null` while it is current; `links` (`url` and `label`), `openDecisions` (how many decisions about it wait for a person), `openRuns` (how many runs on it are open: begun and not ended, which says nothing of whether an agent is still at it, [ADR-0020](../adr/0020-the-console-does-not-claim-an-agent-is-at-work-a-run-says-when-it-was-last-heard-from-and-a-new-run-takes-over.md)), `createdAt` and `updatedAt`.
238
253
 
239
254
  ### `POST /api/v1/projects/<key>/tasks`
240
255
 
@@ -242,7 +257,7 @@ Takes `title`, and optionally `body`, `state` (default `idea`), `priority` (defa
242
257
 
243
258
  ### `GET /api/v1/projects/<key>/tasks/<id or number>` and `PATCH .../tasks/<id>`
244
259
 
245
- One task, by its id or by its number in the project (`/tasks/7`): the pages hold ids, people and their agents say numbers. A patch takes the id and names only what changes, with the same fields as a creation; a field set to `null` clears it, and `workerIds` names the workers whole, in place of those there were, only the newcomers being checked, `[]` leaving nobody on it. A change of `state` is a `task.moved` event with `from` and `to`; any other change is one `task.updated` event naming the `fields` (`workers`, `category`, `goalId`, `startsOn` and `dueOn` among them, as the input names them). A patch that changes nothing writes nothing and answers the task as it is. The moments follow the moves: the first move past `ready` sets `startedAt`, a move to `done` sets `doneAt`, and a move back out of `done` clears it.
260
+ One task, by its id or by its number in the project (`/tasks/7`): the pages hold ids, people and their agents say numbers. A patch takes the id and names only what changes, with the same fields as a creation; a field set to `null` clears it, and `workerIds` names the workers whole, in place of those there were, only the newcomers being checked, `[]` leaving nobody on it. A change of `state` is a `task.moved` event with `from` and `to`; any other change is one `task.updated` event naming the `fields` (`workers`, `category`, `goalId`, `startsOn` and `dueOn` among them, as the input names them), and, where the change put anyone to work on it, their ids (`workersAdded`). A patch that changes nothing writes nothing and answers the task as it is. The moments follow the moves: the first move past `ready` sets `startedAt`, a move to `done` sets `doneAt`, and a move back out of `done` clears it.
246
261
 
247
262
  ### `POST .../tasks/<id>/archive`, `POST .../tasks/<id>/restore` and `POST /api/v1/projects/<key>/tasks/archive`
248
263
 
@@ -268,6 +283,10 @@ One decision. With `wait=<seconds>` (`0` to `600`) the request is held while the
268
283
 
269
284
  The answer takes `option` (the id of one of its options) or `own` (the person's own answer, where none of the options is it: one line, up to `MAX_OPTION_LABEL_LENGTH`, as an option is worded; `request.invalid` with both or with neither), and optionally a `note`. An answer of the person's own becomes one more option of the decision, numbered after the ones given and marked `own: true`, and the one chosen, so that the answer names an option either way and every reader finds its label. A decision is answered once; the answer records who gave it, the agent it came through (`agent`: the token's name when an agent wrote it in the person's name, `null` when they answered themselves; [ADR-0056](../adr/0056-a-record-that-names-the-person-who-did-a-thing-names-the-agent-they-did-it-through.md)) and when, writes a `decision.answered` event with the label of the option (`option`) and, where the raiser gave one, its key (`optionKey`), and lets a run that waited go on (`status: running`), unless another decision of its still waits.
270
285
 
286
+ ### `PUT /api/v1/projects/<key>/decisions/<id>/deciders`
287
+
288
+ Addresses a decision that waits anew ([ADR-0096](../adr/0096-a-decision-that-waits-may-be-addressed-anew-by-whoever-may-answer-it.md)): takes `deciderIds`, one to `MAX_DECIDERS` people, each once in the order given, who take the place of those it was for; to add someone, those it is for are named again with them. For anyone who may work in the project, with a session from the console's own pages or a token, as its answer is. Each person named must be able to work in the project, as at its raising (`decision.invalid_decider`). An answered decision stays as it was addressed (`decision.answered`), and a plugin's as the plugin addressed it (`decision.plugin_addressed`). Answers the decision, whose `decider` and `deciders` say whom it is for now; who raised it, what it asks and the run that waits are as before. Writes a `decision.addressed` event with the `question`, the logins of everyone it is for now (`deciders`) and the ids of those named anew (`decidersAdded`); the same people in the same order write nothing. Those named find it among their decisions from then on, and those left out no longer do. From 0.5.0: a console of before answers `404`.
289
+
271
290
  ### `PATCH /api/v1/projects/<key>/decisions/<id>`
272
291
 
273
292
  Grows the record: takes any of `body` (the context) and `outcome` (what followed; empty clears it), for anyone who may work in the project, with a session from the console's own pages or a token, answered or not. What followed records who wrote it, through which agent, and when (`outcomeBy`, `outcomeAgent`, `outcomeAt`; [ADR-0056](../adr/0056-a-record-that-names-the-person-who-did-a-thing-names-the-agent-they-did-it-through.md)), and clears with it. Writes a `decision.updated` event naming the `fields`; a patch that changes nothing writes nothing.
@@ -282,7 +301,7 @@ One goal, for whoever may see the project. The patch, for an owner, takes any of
282
301
 
283
302
  ### `GET /api/v1/projects/<key>/runs?task=&open=&mine=&limit=&offset=` and `GET .../runs/<id>`
284
303
 
285
- `{ "items": [run, ...], "more": boolean }`: the project's runs, newest first, a page at a time as the tasks are (`limit`, `offset`, `more`); `task=<id>` keeps those on one task, `open=true` those not over (`running` or `waiting`) and `open=false` those over, `mine=true` the asker's own: with a token, the runs begun with that token, which is one agent's; on a session, the runs for the person. A run is one agent's work on one task for one person: `taskId` and `taskNumber` (the one people say), `person` (whom the agent acts for), `agent` (what it calls itself), `status` (`running`, that is open, `waiting` for a decision, `finished`, `failed`, `abandoned`), `startedAt`, `endedAt` or `null`, `lastHeardAt` (when the agent was last heard from through the run: its start, then its latest report, hand-in or question; the console knows nothing of an agent but what it sends, and claims nothing more, [ADR-0020](../adr/0020-the-console-does-not-claim-an-agent-is-at-work-a-run-says-when-it-was-last-heard-from-and-a-new-run-takes-over.md); a run `running` and not heard from for twelve hours, or the hours the deployment sets, is ended by the console as `abandoned`, its `summary` saying so and `run.ended` naming no actor and `reason: "unheard"`, while a run `waiting` for an answer waits on, [ADR-0041](../adr/0041-a-run-not-heard-from-for-twelve-hours-is-ended-by-the-console.md)), `summary` (Markdown, what the agent said at the end, or `null`), `reports` (each `id`, `body` in Markdown, `createdAt`; oldest first), `artifacts` (each `id`, `kind`, `url` for a link or `null`, `label` or `null`, `file` for a file or `null`, and `createdAt`; a file is its `name`, `size` in bytes, `contentType` and `sha256`), and `waitingFor`, the id of the decision the run waits for, or `null`.
304
+ `{ "items": [run, ...], "more": boolean }`: the project's runs, newest first, a page at a time as the tasks are (`limit`, `offset`, `more`); `brief=true` answers the same page with every run without its `reports` and with `reportCount`, how many it has, counted and never read, for what lists runs and shows no report (a console from before 0.5.1 ignores the word and answers the runs whole, so whoever asks for the brief form reads `reportCount` and `reports` as optional, and counts the reports it was sent where none were counted: `reportCountOf` in the package); `task=<id>` keeps those on one task, `open=true` those not over (`running` or `waiting`) and `open=false` those over, `mine=true` the asker's own: with a token, the runs begun with that token, which is one agent's; on a session, the runs for the person. A run is one agent's work on one task for one person: `taskId` and `taskNumber` (the one people say), `person` (whom the agent acts for), `agent` (what it calls itself), `status` (`running`, that is open, `waiting` for a decision, `finished`, `failed`, `abandoned`), `startedAt`, `endedAt` or `null`, `lastHeardAt` (when the agent was last heard from through the run: its start, then its latest report, hand-in or question; the console knows nothing of an agent but what it sends, and claims nothing more, [ADR-0020](../adr/0020-the-console-does-not-claim-an-agent-is-at-work-a-run-says-when-it-was-last-heard-from-and-a-new-run-takes-over.md); a run `running` and not heard from for twelve hours, or the hours the deployment sets, is ended by the console as `abandoned`, its `summary` saying so and `run.ended` naming no actor and `reason: "unheard"`, while a run `waiting` for an answer waits on, [ADR-0041](../adr/0041-a-run-not-heard-from-for-twelve-hours-is-ended-by-the-console.md)), `summary` (Markdown, what the agent said at the end, or `null`), `reports` (each `id`, `body` in Markdown, `createdAt`; oldest first), `artifacts` (each `id`, `kind`, `url` for a link or `null`, `label` or `null`, `file` for a file or `null`, and `createdAt`; a file is its `name`, `size` in bytes, `contentType` and `sha256`), and `waitingFor`, the id of the decision the run waits for, or `null`.
286
305
 
287
306
  ### `POST /api/v1/projects/<key>/runs`
288
307
 
@@ -300,7 +319,7 @@ The bytes of any file of the project, handed in by a run, put in a comment or on
300
319
 
301
320
  ### `POST .../runs/<id>/end`
302
321
 
303
- Takes `status` (`finished`, `failed` or `abandoned`) and optionally a `summary` (Markdown, `MAX_SUMMARY_LENGTH`: what was done and what is left), ends the run (`run.ended`), and answers it. A finished run puts a task that was `in_progress` up for review (`in_review`); the rest leave the task as it is. The run's person ends it, as `finished` or `failed` from their agent; `abandoned` is a person giving up on a run that will not come back: their own, or anyone's as an owner of the project, signed in or through their agent (`run.not_yours` otherwise); the console gives up on a run itself when it has not heard from it for twelve hours ([ADR-0041](../adr/0041-a-run-not-heard-from-for-twelve-hours-is-ended-by-the-console.md)). A run that is over is `run.over`.
322
+ Takes `status` (`finished`, `failed` or `abandoned`) and optionally a `summary` (Markdown, `MAX_SUMMARY_LENGTH`: what was done and what is left), ends the run (`run.ended`), and answers it. No run leaves a task at work behind it ([ADR-0114](../adr/0114-the-end-of-a-run-leaves-no-task-at-work-behind-it.md)): a finished or a failed run puts a task that is `in_progress` up for review (`in_review`), where a person looks at what the run ended with, and an abandoned one puts it back in the state the take found it in, which a run that took another over keeps from that one, `ready` for a run from before the state was kept; a task a person moved meanwhile, and one another run is open on, is left where it is. The move is `task.moved`, by whoever ended the run. The run's person ends it, as `finished` or `failed` from their agent; `abandoned` is a person giving up on a run that will not come back: their own, or anyone's as an owner of the project, signed in or through their agent (`run.not_yours` otherwise); the console gives up on a run itself when it has not heard from it for twelve hours ([ADR-0041](../adr/0041-a-run-not-heard-from-for-twelve-hours-is-ended-by-the-console.md)), and the task it gives back so is moved by nobody and wakes no agent account. A run that is over is `run.over`.
304
323
 
305
324
  ### `GET /api/v1/projects/<key>/skills`
306
325
 
@@ -308,11 +327,15 @@ The project's pack, read by address ([ADR-0028](../adr/0028-the-console-reads-a-
308
327
 
309
328
  ### `GET /api/v1/projects/<key>/skills/one?path=&cursor=`, `.../skills/file?path=&offset=&limit=`, `.../skills/browse?path=&cursor=&limit=` and `.../skills/find?query=&path=&cursor=&limit=`
310
329
 
311
- One skill of the pack, a file of it, what a folder holds and what words find, read by the console from the pack for whoever may see the project, with the SkillCDN token the pack is read with, the project's own or the workspace's ([ADR-0028](../adr/0028-the-console-reads-a-projects-pack-through-the-deployments-rest-api-with-a-pack-token-for-a-private-one.md)), and answered as the pack answered them ([ADR-0031](../adr/0031-the-console-reads-a-pack-as-the-skillcdn-command-does-and-a-local-one-from-a-directory.md)): `{ "address", "source", "page", "status", "refusal", "read" }`, the envelope as above, and `read` the body of the matching route of the main repository's REST API, as `@skillcdn/core` spells it, or `null` unless `ready`. `skills/one` is `load_skill`: `read` is a `RestSkill`, a page of the skill's context, the rules from the repository's root to the nearest manifest, the body and the included files, which `complete` and `nextCursor` say to continue, and `commit`, the commit it was read from. `skills/file` is `read_repo_file`: `read` is a `RestFile`, a page of the file in characters (`offset`, `nextOffset`, `totalLength`; `limit` 1 to 100,000) or, when the path names a folder, its entries. `skills/browse` is `browse_repo`: `read` is a `RestBrowse`, a page of what the folder holds (`limit` 1 to 200, 50 unless given; `cursor` continues); given a file's path, the file's `outline`, every heading with its level and the `offset` and `length` that read its section through `skills/file`, paged the same way, with `entries` empty (SkillCDN 0.4). `skills/find` is `search_repo`: `read` is a `RestFind`, a page of what the words find in relevance order (`query` 1 to 500 characters, required; `limit` 1 to 25, 10 unless given); a document among the results names the `sections` of it that matched, each with its heading path, the `offset` and `limit` that read it and an excerpt, and `ranking` says how the page was ranked where the deployment searches by meaning as well as by words. `path` is a path from the repository's root, up to 500 characters, the mounted folder when `browse` and `find` leave it out; a query out of bounds is `request.invalid`. Each read is logged with who read what of which pack, never with what was read or the words searched for. What the pack refuses is the status with the pack's own `refusal`: a skill or a file that is not there is `not_found`, a file the pack will not carry, too large or not text, is `failed` with where it is at its source. `@skillcdn/core` reads every `read` back as the result it was made from (`skillResultOf`, `fileResultOf`, `directoryResultOf`, `browseResultOf`, `findResultOf`, at the `mountSummaryOf` of the listing's `mount`) and renders what a model is given; the command does exactly that.
330
+ One skill of the pack, a file of it, what a folder holds and what words find, read by the console from the pack for whoever may see the project, with the SkillCDN token the pack is read with, the project's own or the workspace's ([ADR-0028](../adr/0028-the-console-reads-a-projects-pack-through-the-deployments-rest-api-with-a-pack-token-for-a-private-one.md)), and answered as the pack answered them ([ADR-0031](../adr/0031-the-console-reads-a-pack-as-the-skillcdn-command-does-and-a-local-one-from-a-directory.md)): `{ "address", "source", "page", "status", "refusal", "read" }`, the envelope as above, and `read` the body of the matching route of the main repository's REST API, as `@skillcdn/core` spells it, or `null` unless `ready`. `skills/one` is `load_skill`: `read` is a `RestSkill`, a page of the skill's context, the rules from the repository's root to the nearest manifest, the body and the included files, which `complete` and `nextCursor` say to continue, and `commit`, the commit it was read from. `skills/file` is `read_repo_file`: `read` is a `RestFile`, a page of the file in characters (`offset`, `nextOffset`, `totalLength`; `limit` 1 to 100,000) or, when the path names a folder, its entries. `skills/browse` is `browse_repo`: `read` is a `RestBrowse`, a page of what the folder holds (`limit` 1 to 200, 50 unless given; `cursor` continues); given a file's path, the file's `outline`, every heading with its level and the `offset` and `length` that read its section through `skills/file`, paged the same way, with `entries` empty (SkillCDN 0.4); from SkillCDN 0.5 a heading says how many `rows` the tables of its section hold, and the outline how many `tables` the document has, with their rows, and how many `codeBlocks`. Where they are had as data (`data`) is the console's own: `rows` and `code` name the two routes below for the document, in place of the address of the deployment itself, which the console's token does not read ([ADR-0100](../adr/0100-a-packs-tables-and-code-blocks-are-had-as-data-through-the-console.md)). A skill and a file name, for a reference whose link carries a fragment, the `section` the fragment names, with the `offset` and `length` that read it (SkillCDN 0.5). `skills/find` is `search_repo`: `read` is a `RestFind`, a page of what the words find in relevance order (`query` 1 to 500 characters, required; `limit` 1 to 25, 10 unless given); a document among the results names the `sections` of it that matched, each with its heading path, the `offset` and `limit` that read it and an excerpt, and `ranking` says how the page was ranked where the deployment searches by meaning as well as by words; from SkillCDN 0.5 a document made from others is marked `derived`, and `ranking` says where a query of identifiers alone was ranked by its words (`identifiers`) and, while a pack is being embedded, how many of its documents are so far (`embedding`). `path` is a path from the repository's root, up to 500 characters, the mounted folder when `browse` and `find` leave it out; a query out of bounds is `request.invalid`. Each read is logged with who read what of which pack, never with what was read or the words searched for. What the pack refuses is the status with the pack's own `refusal`: a skill or a file that is not there is `not_found`, a file the pack will not carry, too large or not text, is `failed` with where it is at its source. `@skillcdn/core` reads every `read` back as the result it was made from (`skillResultOf`, `fileResultOf`, `directoryResultOf`, `browseResultOf`, `findResultOf`, at the `mountSummaryOf` of the listing's `mount`) and renders what a model is given; the command does exactly that.
331
+
332
+ ### `GET /api/v1/projects/<key>/skills/rows?path=&heading=&cursor=&limit=` and `.../skills/code?path=&heading=&cursor=&limit=`
333
+
334
+ The tables and the fenced code blocks of the pack's documents as data ([ADR-0100](../adr/0100-a-packs-tables-and-code-blocks-are-had-as-data-through-the-console.md)), for a program to take whole where a model would copy them out: read for whoever may see the project, with the token the other reads are read with, and answered in the same envelope, `read` being a `RestRows` or a `RestCode` of `@skillcdn/core`, or `null` unless `ready`. `path` names a document, or a folder whose documents are read in path order, the mounted folder when left out (up to 500 characters); `heading` keeps what stands under a heading whose path holds every word of it (up to 500 characters). `rows` answers the `commit`, the `path`, the `tables` in reading order, each with the `path` of its file, the `heading` path of the section it stands in, its `columns` and its `rows`, every row as many cells as there are columns, as written; `rowCount`, the rows of the page together; and `nextCursor`. A table written in several sections and files under one header is several entries with the same `columns`, one after another. `code` answers `blocks`, each with its `path`, its `heading`, its `language`, empty where the block names none, and its `text`; and `nextCursor`. A page is whole files: it ends with the file in which it reaches `limit` (rows: 1 to 5,000, 1,000 unless given; blocks: 1 to 500, 100 unless given), a million characters or 200 files read, and `cursor` continues it. The answer is JSON; the command makes the CSV. No Markdown document at the path, and none under it, is `not_found` with the pack's `file.not_found`; a query out of bounds is `request.invalid`. Each read is logged with who read which path of which pack, never with what was read.
312
335
 
313
336
  ### `PUT /api/v1/projects/<key>/pack-token` and `DELETE .../pack-token`
314
337
 
315
- The pack token ([ADR-0028](../adr/0028-the-console-reads-a-projects-pack-through-the-deployments-rest-api-with-a-pack-token-for-a-private-one.md)), for an owner, signed in from the console's own pages or through their agent's token. `PUT` takes `{ "token" }`, a token a person made at the deployment for the pack's repository (8 to 1024 characters, no whitespace), tries it against the deployment once (`project.pack_token_refused` when the pack is not served to it or the project names no pack; `skills.unavailable` when the deployment could not be reached), seals it with the console's secret (`project.pack_token_unsupported` where the console has none) and keeps it, answering the project with `packToken: { setAt }` and writing a `project.updated` event naming the field `packToken`. The token is answered nowhere and logged nowhere. `DELETE` takes it away the same way; taking away what is not there writes nothing.
338
+ The pack token ([ADR-0028](../adr/0028-the-console-reads-a-projects-pack-through-the-deployments-rest-api-with-a-pack-token-for-a-private-one.md)), for an owner, signed in from the console's own pages or through their agent's token. `PUT` takes `{ "token" }`, a token a person made at the deployment for the pack's repository, or the one its operator made for a pack of the deployment's own directory where that directory is read with a token only (8 to 1024 characters, no whitespace; the console reads no meaning into it and tries it), tries it against the deployment once (`project.pack_token_refused` when the pack is not served to it or the project names no pack; `skills.unavailable` when the deployment could not be reached), seals it with the console's secret (`project.pack_token_unsupported` where the console has none) and keeps it, answering the project with `packToken: { setAt }` and writing a `project.updated` event naming the field `packToken`. The token is answered nowhere and logged nowhere. `DELETE` takes it away the same way; taking away what is not there writes nothing.
316
339
 
317
340
  ### `POST /api/v1/projects/<key>/pack-token/connect`, `GET .../pack-token/connect`, `POST .../pack-token/connect/claim` and `DELETE .../pack-token/connect`
318
341
 
@@ -356,10 +379,122 @@ A file attached to the page, sent and read back exactly as a run hands one in ([
356
379
 
357
380
  ### `GET /api/v1/projects/<key>/events/stream?after=`
358
381
 
359
- The same events as they happen, as server-sent events: one message per event, with `id` the event's number, `event` its kind and `data` the event as JSON; a comment (`: ping`) every 25 seconds of silence. A browser that reconnects sends `Last-Event-ID`, which wins over `after`, so that nothing is missed. The stream ends when the server shuts down, and when the person may no longer read the project, which is asked again before every delivery and every heartbeat: a member taken off a private project, a person deactivated or a token revoked stops reading within a heartbeat. An `EventSource` reconnects on its own, and is answered as any request is. A person holds at most `MAX_STREAMS_PER_PERSON` streams at once, across their tabs, and a process of the console `MAX_STREAMS` for everyone: one more is `feed.too_many` (`429`, `retry-after`), which a browser's `EventSource` does not retry on its own; the page shows the board as it stands and loads it again on the next visit.
382
+ The same events as they happen, as server-sent events: one message per event, with `id` the event's number, `event` its kind and `data` the event as JSON; a comment (`: ping`) every 25 seconds of silence. A browser that reconnects sends `Last-Event-ID`, which wins over `after`, so that nothing is missed. The stream ends when the server shuts down, and when the person may no longer read the project, which is asked again before every delivery and every heartbeat: a member taken off a private project, a person deactivated or a token revoked stops reading within a heartbeat. An `EventSource` reconnects on its own, and is answered as any request is. A person holds at most `MAX_STREAMS_PER_PERSON` streams at once, across their tabs, and a process of the console `MAX_STREAMS` for everyone: one more is `feed.too_many` (`429`, `retry-after`), which a browser's `EventSource` does not retry on its own, as it retries no answer that is no stream, a gateway's error while the console restarts among them. The console's pages then show the board as it stands and open the stream again themselves, after the last event that arrived, a few seconds later and further apart while it is refused, half a minute at the most.
360
383
 
361
384
  The feed is written in the same transaction as the change it records, so what a stream carries happened, and what happened is carried; every process of the deployment learns of a change through the database's own channel, so a board with several `api` replicas is one board.
362
385
 
386
+ An event is numbered when it is written and seen when its change is committed, and a change numbered first may be committed last. So every read of a feed by number ends at the feed's settled end, the highest number below which no change is still under way ([ADR-0125](../adr/0125-a-feed-is-read-no-further-than-its-settled-end-which-its-writers-hold-a-lock-for.md)): a page of the feed (`after=`), its newest page (`latest=true`), the stream, and the wait for an answer. Whoever comes back with the last number they were given has passed over nothing. An event committed while an earlier one is still under way is carried once that one has ended, in the order of the numbers; a page shown meanwhile ends before both. A process that has not seen the feed settle since it began, while a change is still under way, answers a read of the feed with `503` and `feed.unsettled` (`retry-after: 1`) and not with an empty page, whose reader would go on from the beginning: the pages ask again, a second apart and ten times, before they say that the project could not be loaded.
387
+
388
+ ## Agent accounts
389
+
390
+ An agent account is a member of its own ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md) to [ADR-0089](../adr/0089-a-workspace-names-the-services-its-agents-work-with.md)): a row of the directory with `kind: "agent"`, under the rules a person is under, and never an administrator. What passes between the command and the console for the whole of that plan moved once, at 0.5.0, before the plan was built ([ADR-0043](../adr/0043-the-rest-contract-is-held-to-a-snapshot-taken-at-the-floors.md)): what stands under "In the contract" is read by every command and console from 0.5.0 on, and every route of the plan is specified below, in the change that built it ([roadmap](../roadmap.md), milestones 41 to 43).
391
+
392
+ ### In the contract
393
+
394
+ - **A person** carries `kind` (`person`, or `agent`), `handle` (an agent account's, what the pages and the command call it by, `@mira`; `null` for a person), `title` (every member's, a line that says what they do; `null` for none) and `avatarParts` (what an agent account's avatar is drawn from: `set`, the version of the set of shapes, and an index into it each for `background`, `head`, `ears`, `eyes`, `mouth`, `marks`, `accessory` and `palette`; `null` for a person, whose picture is `avatar`). Each is read as optional: a console that answers none has persons only.
395
+ - **`person.updated`**, an event of the workspace's feed: a member's title, or an agent account's name or avatar, changed. Its data: `login`, `fields`, and `handle` for an agent account.
396
+ - **`agent.state_changed`**, an event of the workspace's feed ([ADR-0085](../adr/0085-a-runner-on-the-agents-machine-is-told-by-signals-and-runs-one-session-at-a-time.md)): how an agent account stands now. Its data: `login`, `handle`, `state` (`running`, `stopped`, `refused`, `failed` or `unheard`), `was` (the state before, `null` where none had been said) and `detail` (why, in a few words, where one was said). Its actor is the account itself, whose runner said so; the supervisor whose `stop` stopped it; or nobody, where the console noted an account it has not heard from.
397
+ - **A connection** ([Connecting an agent](#connecting-an-agent)) may ask to be the account itself: `as: "self"` beside `agent` on `POST /api/v1/connect`, `as` answered by `GET /api/v1/connect/<code>`, and a claim that answers `{ "status": "signed_in", "session", "secret" }`, the command's session in place of a token; `GET /api/v1/me` says `session`, and a session its `kind` and `name`.
398
+
399
+ ### `GET /api/v1/agents` and `POST /api/v1/agents`
400
+
401
+ `GET` answers `{ "items": [<agent>, ...] }`, the agent accounts the asker may see, as the people are seen ([ADR-0035](../adr/0035-who-may-see-whom-is-decided-by-one-policy-and-the-workspace-keeps-its-settings.md)), and the ones they supervise, those in first, by handle. An agent is `{ "person", "manager", "supervised", "state", "runner" }`: the account as a member, a person object with `kind: "agent"`, its `handle`, its `title` and its `avatarParts`, and `invited: true` while nobody has signed in with it; `firstSignIn`, while it waits for that sign-in at a git host, what the sign-in is held to ([ADR-0126](../adr/0126-an-agent-account-at-a-git-host-is-bound-to-the-hosts-account-when-it-is-added.md)): `account`, `member` or `login`, as below, left out once it has signed in and under a provider that makes its own addresses, and read as optional; whom it reports to, `null` where the asker may not see them; whether the asker supervises it: an administrator, or above it in the reporting line, its manager or the manager of one above them; and how it stands and what its runner last said of itself, `state` and `runner`, [as below](#the-runner-put-apiv1agentsmerunner-and-the-signals), each read as optional and `null` where there is nothing to say. Supervision is one function of the policy, and what a supervisor may do of an agent account, the routes below that say so, nobody else may: an owner of a project it works in reads its runs and reports as anyone's, and nothing more. An agent account is a member, so `GET /api/v1/people` lists it among the people too, and everything that names a person, a task's worker, a decision's decider, an event's actor, names it the same way.
402
+
403
+ `POST`, for an administrator, signed in or through their agent's token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)), makes one and answers `201` with it. It takes the account the agent will sign in with, as a listing names one, `host` (one the deployment signs people in through; `agent.unknown_host` otherwise) and `login` (as the host spells one); its persona, `handle` (2 to 39 lowercase letters, digits and hyphens, a letter or a digit first and last, none of the words the addresses and the command use, `RESERVED_HANDLES`: `new`, `me`, `proposals`, `setup`, `invite`, `secret`, `secrets`, `signals`, `tell`, `interrupt`, `stop`, `restart`, `reset`, `set`, `wake`; one among the workspace's agent accounts, `agent.handle_taken`; it never changes), `name` (a line up to `MAX_PERSON_NAME_LENGTH`), `title` (optional, a line up to `MAX_PERSON_TITLE_LENGTH`), and its avatar, `avatarParts` with optionally the `avatarSeed` they were rolled from, or neither, and the console rolls the parts, from the seed where one is given; `managerId`, an active member of the workspace, a person or an agent account, whoever makes the account where none is named (`agent.invalid_manager` for anyone else, or for one who reports to the account); and `project`, the key of the project it starts in (`agent.invalid_project`), where it is listed as a member when the project lists its members. The member's row is written at once, so that work is assigned to it before anyone signed in with it, and the login is let in as a listing lets one in ([ADR-0022](../adr/0022-who-is-in-is-the-consoles-own-record-and-an-administrator-keeps-it.md)); its first sign-in is the account's `person.joined`. A Workspace makes its own addresses: there the account may be made on the way, and the first sign-in with that address binds the provider's account to the row. At a git host a login goes to whoever registers it, so the account has to be the organization's before it is added here, as the pages, the command and the guide say, and the console holds the first sign-in to more than the name ([ADR-0126](../adr/0126-an-agent-account-at-a-git-host-is-bound-to-the-hosts-account-when-it-is-added.md)). Where the deployment names the organization at the host, the console asks it, as the account is added, which of its members the login is, in one question whose answer says both that the login is a member and which account the membership is of, so that no account that came to carry the name between two questions is read in its place, and binds the row to the host's id of that account: `firstSignIn` is `account`, that account alone is let in as this one, whatever it is called by then, and whoever else comes to carry the name is refused while the account waits. Where the organization has no member called so, or cannot be asked, the account is added all the same, not confirmed: `firstSignIn` is `member`, and its first sign-in binds it only where the organization says, at that sign-in, that the login is a member; anyone else under the login is refused. Where the deployment names no organization, nothing can say which account a login is: `firstSignIn` is `login`, and until the account has signed in the console lets in whoever holds the login, as a listing does. A login that is, by the host's id, an account a member already is, under whatever name the console last saw, is that member (`agent.login_is_member`, or the member made the account where `convert` asks); and where the host said which account the login is, a member bound to another account is not the one named, whatever the console last saw them called: the name was theirs and is another account's now, so they are neither refused for nor made the account, with `convert` or without, and the account is added beside them, let in by the organization where a listing of theirs still spells the name. An account added and not used is deactivated, which takes its listing away. The name and the picture stay the console's: a sign-in writes the login as the provider spells it now, and neither the provider's name nor its picture. It writes `person.listed` with `login` and `handle`.
404
+
405
+ With the account the console makes its onboarding ([ADR-0088](../adr/0088-an-agent-account-has-a-desk-and-is-set-up-from-an-invitation-by-signing-in-as-itself.md), points 4 to 6): a task in the project it starts in, `Set up @<handle>`, `ready`, with the account as its worker and whoever made the account as its owner, through the agent they made it through; its body says what the agent does itself and what it cannot, to be asked for as decisions, in the words of the services the workspace names (`onboardingOf` in the package), and nothing is asked there of the account it signs in with, which comes before it. It names the account's own address where the account signs in with one, the login it was made with, and has it ask which address an invitation goes to where it does not, offering none; and it says that a run waiting for a decision stays open, the answer waking the account, so that the task is finished when nothing of it waits on anyone: each item set up, or answered as not to be done now, the last report listing what is not done. The board wakes the account with it, as with any ready task it is at work on ([runner.md](runner.md#the-boards-wakes)), and the wake waits on the account's record until a runner first connects. The answer carries `onboarding`, `{ "project", "number" }`, or `null` where the board took no task; an account read later says nothing of it.
406
+
407
+ A login a member already carries is refused, `409` `agent.login_is_member`, unless the input says `convert: true` ([ADR-0104](../adr/0104-a-member-is-made-an-agent-account-only-where-that-is-asked-for.md)): a persona's proposed login may spell a colleague's, and nobody is made an agent account by a name that happens to be theirs. With `convert`, the member is made the account, once: the member's own row becomes the account, with everything it did and the sessions and tokens it holds, and the board is told with `person.updated` (`login`, `handle`, `fields: ["kind"]`). An administrator is not made one (`agent.administrator`), and a login that is an agent account already is `agent.exists`, whatever `convert` says; `convert` asks nothing of a login nobody carries. `kind` never goes back.
408
+
409
+ What `PATCH /api/v1/people/<id>` says of a member it says of an agent account, with two refusals: `role: "admin"` is `person.agent_admin`, the one thing kept from an agent account, and `managerId: null` is `person.manager_required`, since its manager is replaced and never taken away.
410
+
411
+ ### `GET /api/v1/agents/proposals?count=&lang=`
412
+
413
+ A few personas to choose from, for whoever makes an account: `{ "items": [{ "seed", "name", "handle", "avatarParts" }, ...] }`, `count` of them, 4 where none is said and 12 at most (`request.invalid` otherwise). The seed is the console's own, rolled again at each asking; the name is one of those the package ships, in the language `lang` names (a language tag), else the asker's own, else the workspace's, else English, no name twice in one answer; the handle is the name's, or the first of `mira-2`, `mira-3` and on that no agent account of the workspace has; the parts are the seed's, as the package rolls them (`rollAvatar`), so that the same seed draws the same avatar wherever the package is. For an administrator. A suggestion, edited freely: what is sent to make the account is whatever its maker settled on.
414
+
415
+ ### `GET /api/v1/agents/<handle>` and `PATCH /api/v1/agents/<handle>`
416
+
417
+ `GET` answers one agent account by its handle, as `GET /api/v1/agents` answers one, with `accounts` beside: the accounts it holds elsewhere ([ADR-0089](../adr/0089-a-workspace-names-the-services-its-agents-work-with.md)), an object of what it is called at each service by the service's short name (`{ "github": "acme-mira" }`), and no secret, for whoever sees the account, so that taking it out knows what to close. `agent.not_found` for a handle that is none, or the handle of an account the asker may neither see nor supervise.
418
+
419
+ `PATCH` keeps the account's persona, for a supervisor, signed in or through their agent's token: `name`, `title` (`null` for none) and `avatarParts`, with `avatarSeed` beside the parts where they were rolled from one (`null` for parts chosen by hand); one or more, `request.invalid` with none. It answers the agent, and writes `person.updated` with `login`, `handle` and the `fields` that changed, among `name`, `title` and `avatar`; what is already so writes nothing. Whoever sees the account and does not supervise it is `auth.forbidden`. The handle never changes, and neither does what the account signs in with: its login is the provider's, as a person's is.
420
+
421
+ `PATCH` also records the accounts it holds elsewhere, `accounts`, for a supervisor and for the account itself, which keeps nothing else of itself here: a service named with a name is kept, one named with `null` is taken away, one left out stays as it is. A service is spelled as a kind is, lowercase letters, digits and hyphens; a name is a line up to `MAX_ELSEWHERE_NAME_LENGTH`; an account records up to `MAX_AGENT_ELSEWHERE` (`agent.too_many_accounts`, 409). It answers the agent with its `accounts` as they are from then on, and writes `person.updated` with `fields: ["accounts"]`, once for a request that changed any; what is already so writes nothing.
422
+
423
+ And it keeps the hours of the account's day ([ADR-0085](../adr/0085-a-runner-on-the-agents-machine-is-told-by-signals-and-runs-one-session-at-a-time.md), point 11), for a supervisor and for the account itself: `dayStart` and `dayEnd`, each an hour and a minute as `09:00` in the workspace's time zone, or `null`, which is the usual start, `DEFAULT_DAY_START`, and a day with no end. The console sends the account its briefings by them ([runner.md](runner.md#the-boards-wakes)). An agent read by a supervisor or by itself carries `hours`, `{ "dayStart", "dayEnd" }`, the start as it is acted on; a change writes `person.updated` with the `fields` that changed, `dayStart` and `dayEnd`.
424
+
425
+ An avatar is nothing but its parts ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md), point 8; [ADR-0097](../adr/0097-an-avatar-is-a-planet-of-flat-shapes-in-two-tones-filled-as-pixels.md)): a person object carries `avatarParts`, `{ "set", "palette", "ground", "form", "material", "accent", "vein" }`, each a whole number from 0 to 255 beside the set's version, and whoever shows the picture draws it with the package (`avatarPixels`, `avatarDataUrl`, the `Avatar` component). The console serves no picture of an agent account, and takes none: `avatar` is `null` for one. `palette`, `ground`, `form`, `material` and `accent` are each a place in the set `set` names by its version, counted round the end of what the set has, so that parts a reader's set does not have still draw: `palette` among its ramps of colours, `ground` among its grounds, `form` among its bodies, `material` among what lies on a body's surface, and `accent` among what stands beside a body, `0` being nothing. The names are older than the set and say only which list each is a place in. `vein` is the seed the faint squares on the ground are strewn by. A released set never changes.
426
+
427
+ ### `GET /api/v1/agents/<handle>/sign-ins` and `DELETE .../sign-ins/<id>`
428
+
429
+ Where an agent account is signed in, for its supervisors ([ADR-0084](../adr/0084-an-agent-account-is-a-member-of-its-own-with-a-manager-above-it.md), point 5): `GET` answers what [`GET /api/v1/sessions`](#get-apiv1sessions-delete-apiv1sessionsid-and-delete-apiv1sessionsothers) answers the account itself, its browsers and its commands, none of them `current`; `DELETE` ends one, which is good for nothing from the next request, and answers `204` (`session.not_found` for one that is not the account's, or ended already). On the console's own pages, by a person signed in, never with a token or a command's session (`auth.session_required`), as a member's own sessions are; `auth.forbidden` for whoever sees the account and does not supervise it. How a lost machine is dealt with: a supervisor ends the session there, and the account signs in again elsewhere.
430
+
431
+ ### `GET /api/v1/me/manager`
432
+
433
+ `{ "manager": person | null, "administrators": [person, ...] }`: whom whoever asks reports to, a person or an agent account, whatever they are and whether they are still in, or `null` for nobody; and the administrators of the workspace who are in, by login, who stand in where there is nobody or the manager is out. For every member, with a session or a token. A manager is whom a member turns to first, and who is answerable for an agent account; it is no rule of the board, where a decision is addressed to whomever the asker names.
434
+
435
+ ### The secret store: `/api/v1/agents/me/secrets` and `/api/v1/agents/<handle>/secrets`
436
+
437
+ An agent account keeps named secrets in the console ([ADR-0087](../adr/0087-an-agent-account-keeps-its-secrets-in-a-store-of-its-own-that-only-it-reads.md)): values sealed with the deployment's key, each for its account and its name, which the account alone reads back. A name is lowercase letters, digits, dots, hyphens and underscores, a letter or a digit first and last, up to `MAX_AGENT_SECRET_NAME_LENGTH` (`git.token`, `mail.password`); a value up to `MAX_AGENT_SECRET_BYTES` of UTF-8 (`secret.too_large`); an account keeps up to `MAX_AGENT_SECRETS` (`secret.too_many`). A secret in a listing is `{ "name", "setAt", "seeded", "expiresOn" }`: when it was set, whether a supervisor set it, and the day its value ends on, where one was said. Nothing here is an event of the board's feed, and no value is ever in a log.
438
+
439
+ **The account's own**, under `/api/v1/agents/me/secrets`. For an agent account (`agent.not_found` for a person, who has no store), on a session of its own, a browser's or its command's ([`console login --self`](#connecting-an-agent)), never with a token it made for an agent of its own (`secret.own_session`): what such an agent holds reads none of the account's secrets. `GET` answers `{ "items": [secret, ...] }`, the names, by name. `GET .../<name>` answers the secret with its `value`, and notes the reading; a value this deployment's key does not open, or one sealed for another account or name, is `secret.unreadable`, to be set again. `PUT .../<name>` takes `{ "value", "expiresOn" }`, the day optional and `null` for none, sets the secret, a new one or over the one there was, and answers it, without its value. `DELETE .../<name>` removes it and answers `204`. A change on a browser's session comes from the console's own pages.
440
+
441
+ **A supervisor's part**, under `/api/v1/agents/<handle>/secrets`, with a session or a token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)); `auth.forbidden` for whoever sees the account and does not supervise it. `GET` answers the names as above. `PUT .../<name>` seeds a secret, write-only: the same body, answered without the value, the secret marked `seeded`. `DELETE .../<name>` removes one. No route of a supervisor's answers a value: `GET .../<name>` is nothing.
442
+
443
+ `GET /api/v1/agents/<handle>/secret-accesses?before=&limit=` is the account's record of its store, for its supervisors: `{ "items": [{ "id", "name", "action", "by", "agent", "seeded", "at" }, ...], "more" }`, the newest first, `limit` of them (50 where none is said, 200 at most), from before the line `before` on. A line says what was done to which secret (`set`, `read` or `removed`), by whom, through which agent where they acted with a token, and whether it was a supervisor's doing; never a value.
444
+
445
+ ### The runner: `PUT /api/v1/agents/me/runner` and the signals
446
+
447
+ What passes between the console and an agent account's runner ([ADR-0085](../adr/0085-a-runner-on-the-agents-machine-is-told-by-signals-and-runs-one-session-at-a-time.md)) is specified in [runner.md](runner.md), the bodies with it; the routes, who asks them and what they refuse are here.
448
+
449
+ **How an agent stands.** An agent object carries `state`, `{ "state", "reason", "since", "heardAt" }`: one of `running`, `stopped`, `refused`, `failed` and `unheard`; why, one of a short list of words (`started`, `resumed`, `reset`, `completed`, `stop`, `model_refused`, `sign_in`, `start`, `crashed`, `no_heartbeat`); since when; and when its runner was last heard from. It is `null` until a runner has said anything of the account, and answered to whoever sees the account. `runner` is what its runner last said of itself and what was chosen for it, `{ "delivered", "latest", "session", "machine", "runner", "product", "offers", "running", "settings" }`, answered to the account's supervisors and to the account, `null` to anyone else. The console says when it last heard and claims nothing more ([ADR-0020](../adr/0020-the-console-does-not-claim-an-agent-is-at-work-a-run-says-when-it-was-last-heard-from-and-a-new-run-takes-over.md)): a runner not heard from for five minutes is noted `unheard` by the worker, and its next heartbeat says how the agent stands again.
450
+
451
+ **The runner's own**, for an agent account (`agent.not_found` for a person) on the session of its command signed in as itself ([`console login --self`](#connecting-an-agent)); its browser, or a token it made, is `agent.own_command`, since the command's session is the runner's one credential.
452
+
453
+ - `PUT /api/v1/agents/me/runner` is the heartbeat: how the agent stands and why, the last signal delivered, the open session, the machine, the runner's version, the product and what it offers to choose from, and what the session runs with; every line bounded and read by schema (`request.invalid`), the body up to 64 KiB (`request.too_large`). It answers `{ "latest", "delivered", "settings", "state" }`: the number of the account's newest signal; the most the console was ever told was delivered, where a runner that lost its own count goes on from; the model and the effort chosen for it, `null` each for the product's own, and a choice this heartbeat's `offers` do not list, where they list any, is `null` from then on, since what is chosen is kept among what the product offers; and how the console has the agent, which is `stopped` whatever the runner says while a supervisor's `stop` stands. A state that changed is `agent.state_changed`, by the account.
454
+ - `GET /api/v1/agents/me/signals/stream?after=<number>` is a stream of server-sent events, each `signal` with a signal as its data and its number as its id, from the number after `after` on, in order, with a comment in the silences. `Last-Event-ID` is read in place of `after` where it is further on. The stream ends when the command's session does, and when the process closes. It counts among the streams the account holds (`feed.too_many`).
455
+
456
+ **The record.** `GET /api/v1/agents/<handle>/signals?before=&limit=` answers `{ "items": [signal, ...], "more" }`, the newest first, `limit` of them (50 where none is said, 200 at most), from before the number `before` on, to the account's supervisors (`auth.forbidden` for whoever sees the account and does not supervise it). `GET /api/v1/agents/me/signals` answers the same to the account itself, on a session of its own, a browser's or its command's. A signal is no event of the board's feed.
457
+
458
+ **A wake the runner raises itself.** `POST /api/v1/agents/me/signals`, for an agent account on its command's session, as the heartbeat is (`agent.own_command`, `agent.not_found`): `{ "kind": "wake", "source": "messenger", "key", "text" }`, what one of its wake sources heard on the machine ([runner.md](runner.md#wake-sources)). `key` is a line up to `MAX_SIGNAL_KEY_LENGTH` saying what it is about, a thread say; `text`, optional, is someone else's words, bounded as a signal's are. It answers `201` with the signal, recorded under the next number of the account's record, by nobody, and sent on the account's stream in its order. Nothing else is raised this way, any other `kind` or `source` being `request.invalid`: a runner tells its own agent nothing in a supervisor's name, the board's or the console's. A runner raises 600 wakes within an hour at most ([ADR-0132](../adr/0132-what-a-runner-writes-is-bounded-by-the-hour-and-its-log-by-its-size.md)): one more is `signal.too_many` (`429`), with `retry-after`, the seconds until the hour has room, and nothing recorded. What a supervisor, the board and the schedule send is not counted.
459
+
460
+ **Sending one.** `POST /api/v1/agents/<handle>/signals`, for a supervisor, signed in on the console's own pages or through their agent's token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)), takes `{ "kind", "text", "set" }` and answers `201` with the signal, numbered next on the account's record and naming who sent it and the agent they sent it through. A `tell` or an `interrupt` carries files as a form in place of the JSON ([ADR-0095](../adr/0095-a-tell-carries-files-of-any-kind-handed-to-the-agent-in-its-desk.md)): the part `signal` with what the JSON would say, and a part `file` for each, up to `MAX_SIGNAL_ATTACHMENTS`, of any kind, each with a name that is one line and no path and not empty, within `MAX_FILE_BYTES` together (`request.too_large`); the signal's `attachments` name them, `{ "id", "name", "size", "contentType" }` each. A picture is one by its bytes, a PNG, a JPEG, a GIF or a WebP, whatever the form calls it; any other file is kept as the media type its part names, and one whose part calls it a picture while its bytes are none is kept as `application/octet-stream`. `GET /api/v1/agents/<handle>/signals/<number>/files/<id>` answers the bytes of one to the account's supervisors, and `GET /api/v1/agents/me/signals/<number>/files/<id>` to the account, whose runner hands them to the agent: a picture shown in place under its kind, any other file as `application/octet-stream` with `content-disposition: attachment` and its name, both with `nosniff` and a policy that runs nothing; `file.not_found` for an id that is not that signal's. `kind` is one of `wake`, `tell`, `interrupt`, `stop`, `restart`, `reset` and `set`; `text` is up to `MAX_SIGNAL_LENGTH` characters, which a `tell` needs and an `interrupt` takes: with none, an `interrupt` stops the turn under way so that what the agent was sent and has not taken is read now ([ADR-0098](../adr/0098-a-message-is-on-the-record-where-the-agent-took-it-and-an-interrupt-may-carry-no-words.md)); `set` is `{ "model", "effort" }` for the kind `set`, one or both, a field left out staying as it is and `null` meaning the product's own again, each one of those the runner last offered where it offered any (`signal.not_offered`). A `stop` makes the agent `stopped` at once, by whoever sent it, and it stays so until a `restart` or a `reset` is sent; a `set` is kept with the account, and its runner applies it. The account's stream is woken in every process, on a channel of the accounts' own, which wakes no reader of the board's feed.
461
+
462
+ ### The sessions and the transcript
463
+
464
+ A session is the lifetime of one process of an agent account's product, and leaves a transcript that the console keeps for good ([ADR-0086](../adr/0086-a-session-leaves-a-transcript-that-is-kept-for-good.md)). The bodies and their bounds are in [runner.md](runner.md#the-transcript); the routes, who asks them and what they refuse are here. Nothing of it is an event of the board's feed.
465
+
466
+ A session is `{ "id", "month", "startedAt", "endedAt", "ended", "product", "model", "effort", "resumed", "machine", "events", "lastEventAt", "away" }`: the month it began in (`2026-11`), under which everything of it is kept; when and how it ended (`stopped`, `restarted`, `reset`, `crashed`, `exited`, or `taken_over` by a session begun after it), `null` each while it is open; what it ran, with which model and effort, whether it went on with the conversation before, and where; the number of its last event and when that came; and `away`, whether its month is not with the database now, put away by whoever keeps it.
467
+
468
+ **The runner's own**, under `/api/v1/agents/me/sessions`, for an agent account on its command's session, as the heartbeat is (`agent.own_command`, `agent.not_found`).
469
+
470
+ - `POST` begins a session and answers `201` with it. One session of an account is open at a time: the one that was open ends as `taken_over`. An account begins 60 sessions within an hour at most ([ADR-0132](../adr/0132-what-a-runner-writes-is-bounded-by-the-hour-and-its-log-by-its-size.md)): one more is `transcript.too_many_sessions` (`429`), with `retry-after`, and the session that is open stays open.
471
+ - `POST .../<id>/events` takes `{ "events": [...] }`, a batch in order, and answers `{ "last" }`, the number of the session's last event now. A number the session has already changes nothing; `transcript.out_of_order` (`400`) for a batch not in order, `transcript.gap` (`409`) for one that would leave a gap, `transcript.unknown_file` (`400`) for a picture that is not the session's, `transcript.session_over` (`409`) for a session that ended, `transcript.away` (`409`) for one whose month is put away, `request.too_large` beyond 2 MiB, and `transcript.session_not_found` for a session that is not the account's. A session takes 60,000 events within an hour at most ([ADR-0132](../adr/0132-what-a-runner-writes-is-bounded-by-the-hour-and-its-log-by-its-size.md)): a batch that would take it past that is `transcript.too_many` (`429`), refused whole with `retry-after`, the seconds until it fits, and taken when it is sent again then; a batch sent again that holds nothing new is answered as ever.
472
+ - `POST .../<id>/files` takes a form with one part `file`, a picture (`image/png`, `image/jpeg`, `image/gif`, `image/webp`) up to `MAX_FILE_BYTES`, and answers `201` with `{ "id", "name", "size", "contentType" }`, what an event names it by; `transcript.too_fast` (`429`) beyond 60 a minute for one session.
473
+ - `POST .../<id>/end` takes `{ "how" }` and answers the session; ended already, it stays as it ended.
474
+
475
+ **Reading**, under `/api/v1/agents/<handle>/sessions`, for the account's supervisors, with a session or a token, and for the account itself, as `me` or by its handle, on a session of its own (`auth.forbidden` for whoever sees the account and does not supervise it; `agent.own_command` for a token the account made).
476
+
477
+ - `GET ?before=&limit=` answers `{ "items": [session, ...], "more" }`, the newest first, `limit` of them (50 where none is said, 200 at most), from before the moment `before` on, which is a session's `startedAt`.
478
+ - `GET .../<id>` answers one; `transcript.session_not_found` for a session that is not that account's.
479
+ - `GET .../<id>/events?after=&limit=` answers `{ "items": [event, ...], "more" }`, the events after the number `after`, in order, `limit` of them (100 where none is said, 500 at most). An event is `{ "n", "kind", "at", "text", "whole", "data", "files", "sealed" }`: `text` is the whole text, or its beginning where `whole` says how many bytes the whole is; `files` its pictures; `sealed` is `null`, or `{ "by", "at", "reason" }` for an event whose content was sealed, which then has no text, no facts and no pictures.
480
+ - `GET .../<id>/events/stream?after=` is the same as server-sent events: each `event` with an event as its data and its number as its id, a comment in the silences, and an `end` with the session as its data once it is over and everything of it was sent, after which the stream ends. `Last-Event-ID` is read in place of `after` where it is further on. Whoever watches is woken on the agent accounts' own channel, by the session, and the stream counts among those the reader holds (`feed.too_many`).
481
+ - `GET .../<id>/events/<n>/text` answers `{ "n", "text" }`, the whole text of one event; `transcript.event_not_found` for a number the session has not.
482
+ - `GET .../<id>/files/<file id>` answers the bytes of a picture, shown in place under its kind, with `nosniff` and a policy that runs nothing; `file.not_found` for an id that is not that session's.
483
+
484
+ **Sealing.** `POST /api/v1/agents/<handle>/sessions/<id>/events/<n>/seal`, for an administrator, signed in on the console's own pages or through their agent's token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)), takes `{ "reason" }`, a line up to `MAX_SEAL_REASON_LENGTH`, and answers the event as it is from then on: its content replaced by who sealed it, when and why. A supervisor who is no administrator is `auth.forbidden`. An event sealed already stays as it was sealed. The bytes it held go with the seal: where the store refuses to let them go, nothing is sealed and the answer is `file.store_unavailable` (`503`, with `retry-after`), for the seal to be asked again. The one way anything leaves a transcript, and on the record.
485
+
486
+ A run carries `sessionId`, the session of an agent account's runner it was begun in, or `null`: set by the console for a run the account's command begins while a session of the account is open.
487
+
488
+ ### The invitation: `/api/v1/agents/<handle>/invitation` and `GET /api/v1/setup/<code>`
489
+
490
+ The invitation that leads a machine to an agent account ([ADR-0088](../adr/0088-an-agent-account-has-a-desk-and-is-set-up-from-an-invitation-by-signing-in-as-itself.md), point 4), and what its code opens. Both exist where the deployment signs people in, and nowhere else.
491
+
492
+ `GET`, `POST` and `DELETE /api/v1/agents/<handle>/invitation` are a supervisor's, an administrator or whoever is above the account on its reporting line, with a session or a token ([ADR-0021](../adr/0021-a-token-configures-as-its-person-does.md)): `auth.forbidden` for a member who sees the account and supervises nothing of it, `agent.not_found` for a handle that is none. `GET` answers `{ "invitation": { "createdAt", "expiresAt", "by": person | null } | null }`, the invitation as it stands, or `null` where none was made or its day has passed; never the code. `POST` makes one, in place of the one there was, and answers `201` with `{ "invitation", "code", "command" }`: the code, eight characters of the alphabet of connection codes in two groups (`ABCD-EFGH`), which is answered this once and of which the console keeps the hash alone; and the command that sets a machine up with it, `console agent setup --console <the console's origin> --code <code>`. An account has one invitation, good for `INVITATION_DAYS` (7) days or until the account's command has signed in, whichever is first: a connection approved `as: "self"` for the account ends it. `DELETE` takes it away and answers `204`, whether there was one. An invitation is on no feed; the console logs who invited which account, and never the code.
493
+
494
+ `GET /api/v1/setup/<code>` is read without a sign-in, by whoever holds the code, typed in any case and with or without its hyphen. It answers `{ "account": { "handle", "name", "title", "login", "host", "avatarParts" }, "workspace": { "name", "handle", "domain", "services" }, "console": { "url" }, "expiresAt" }`: which account the setup is for, the login it signs in with and the provider it signs in through, the names and the services of its workspace ([ADR-0089](../adr/0089-a-workspace-names-the-services-its-agents-work-with.md)), and the console to come back to. Nothing secret is among them, nothing by which the account or anyone is entered, and nobody else of the workspace. A code that opens nothing is `setup.not_found` (404), one answer whatever the reason: no invitation was made with it, its day has passed, it was taken away or made again, the account's command has signed in, or the account is out. It is answered with `cache-control: no-store`. The code is an invitation and no credential: it says which account a setup is for, and gives nobody the account.
495
+
496
+ The guide is made from that answer by the package (`setupGuideOf`, `setupGuideText`), for that account and those services, in the order a setup is done and by whom: what has to be there before the line, what the agent asks the person at the machine for and how the account signs the command in as itself, what the agent does when it starts, how it signs in elsewhere in a browser, and what it asks for where it cannot. It says what has to be there at a service and never who makes an account there ([ADR-0094](../adr/0094-the-account-an-agent-signs-in-with-is-named-and-who-makes-it-is-the-organizations-to-say.md)). `console agent setup --console <origin> --code <code>` prints it for the agent and the page `/setup/<code>` shows it to a person, who is asked for no sign-in there ([cli.md](cli.md#agent-accounts)).
497
+
363
498
  ## Signing in
364
499
 
365
500
  Not part of the REST API, and described in [`deploy/README.md`](../../deploy/README.md#signing-in): `GET /auth/<provider>/login?return_to=` and `GET /auth/<provider>/callback` for each provider the deployment has (`gh`, `google`; any other is nothing), and `POST /auth/logout` from the console's own pages. A page learns why a sign-in did not complete from `?sign_in=denied|expired|failed|refused` on the page it was for.