@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
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: A shell with Node.js 24 or newer, npm and git, and an agent that reads and writes files. For running the plugin on a local console, Docker for the database and a checkout of the console's repository, where signing in needs a GitHub OAuth app of the person's own, as the console's README says. The console command is optional, for running the plugin's commands as an agent would. No key of the agent's own is needed, and it never sees a token.
6
6
  metadata:
7
7
  author: skillcdn
8
- version: "1.7"
8
+ version: "1.9"
9
9
  skillcdn:
10
10
  translations:
11
11
  ko:
@@ -77,12 +77,12 @@ Produces the **design**: one table, a row per thing the feature does, saying who
77
77
  | Another plugin must tell it | A **hook** on `plugin:<key>:<kind>` (`events:plugins`), or a call on the other's `api` (`plugins:<key>`). |
78
78
  | Time passes | A **job** (`jobs`), `every` or `at` in the workspace's time zone, never two at once; what it did goes into records and, where people should know, a task or a decision. |
79
79
  | An outside service calls in | An **endpoint** (`endpoints`): a `person` endpoint for whoever holds a role, a `webhook` for nobody, verified with `ctx.secrets.verify` against a secret setting. |
80
- | The plugin must call out | `ctx.fetch` to a host the manifest names (`outbound:<host>`), with `GET`, `HEAD`, `POST`, `PUT`, `PATCH`, `DELETE` or `OPTIONS`, the secrets put in by the console from `secret` settings (`secret` or `secrets`, each `as` a header, `bearer`, a query parameter, `basic` or `body:<field>`), never read by the plugin, nor in an answer that sends them back; what an answer gives back that is secret, the tokens of an exchange, sealed by the console into `secret` settings with `seal` before the plugin reads the answer, with their expiry, the answer's `sealed` saying what became of each (a token endpoint is asked for JSON, since the body of an answer that is no JSON is withheld), and sealed again by a job that reads `ctx.secrets.status(name)`; a callback the service is to call is `ctx.endpoints.url(name)`, the full address of one of the plugin's endpoints, and a link back to the console starts from `ctx.console.workspace().url`. |
80
+ | The plugin must call out | `ctx.fetch` to a host the manifest names (`outbound:<host>`), with `GET`, `HEAD`, `POST`, `PUT`, `PATCH`, `DELETE` or `OPTIONS`, the secrets put in by the console from `secret` settings (`secret` or `secrets`, each `as` a header, `bearer`, a query parameter, `basic` or `body:<field>`), never read by the plugin, nor in an answer that sends them back; what an answer gives back that is secret, the tokens of an exchange, sealed by the console into `secret` settings with `seal` before the plugin reads the answer, with their expiry, the answer's `sealed` saying what became of each (a token endpoint is asked for JSON, since the body of an answer that is no JSON is withheld), and sealed again by a job that reads `ctx.secrets.status(name)`; a token per installation of a service, one for each workspace an app is installed in, a `secret` setting declared `keyed: { max }`, sealed under the key the same answer names (`seal: { <setting>: { path, key: "$.team.id" } }`), put in by its key (`secret: { name, key, as }`), listed with `ctx.secrets.keys(name)`, forgotten with `forget(name, key)` when the installation is gone, and an upgrade's `move(name, key)` keeping the one value of before under a key ([ADR-0111](/docs/adr/0111-a-secret-setting-may-keep-one-value-per-key.md)); a callback the service is to call is `ctx.endpoints.url(name)`, the full address of one of the plugin's endpoints, and a link back to the console starts from `ctx.console.workspace().url`. |
81
81
  | It acts for a person who did something elsewhere, or reads another plugin as itself | `people:act`, then `ctx.plugins.get(key).for(personId)` for the other plugin's api as the person, or `ctx.console.decisions.answer(id, answer, { for })` for a decision the person answered elsewhere, one on their own plate (addressed to them, or a plugin's addressed to someone they manage): the person's standing as a member decides, never their administration, and the record is theirs through the plugin. A role of another plugin, asked in the manifest's `grants` with why, is held as itself from a job or a hook, with `ctx.plugin.grants` saying what was granted ([ADR-0072](/docs/adr/0072-a-plugin-is-a-principal-it-holds-roles-granted-to-it-calls-as-itself-and-acts-for-a-person-within-what-both-may-do.md)). |
82
82
  | People look at it, or fill a form (a calendar starts its week on `frame.context.workspace.firstDay`, the day the workspace's setting says, and reads `timeZone` beside it; faces come from `frame.people.picture(id)`, since a frame loads no image from elsewhere) | A **page** (level `workspace` or `project`) or a **widget** on the front page, which declares the `sizes` it comes in, at least one of them no wider than four cells, which is all a phone has (`small` 2×2, `medium` 4×2, `large` 4×4, `wide` 8×2, `full` 8×4, square cells of the page's grid) and lays itself out for the one it has (`frame.context.size`, `frame.onSize`), since the person arranges the page ([ADR-0061](/docs/adr/0061-the-front-page-is-one-grid-of-tiles-a-person-arranges-by-hand.md)): it shows records and calls commands and queries through the bridge; the logic stays in the server module, so that the command line and the pages do the same thing. |
83
83
  | An agent must know how | A **skill** in the package, one per kind of work, naming the commands as `console plugin <key> <command>`, with the rules of that work; `SKILLCDN.md` at the root. The agent note of the manifest is the one line that sends an agent to them. |
84
84
 
85
- Then the data. Records, unless the feature needs what records do not give: joins across many collections, more rows than a plugin's records may hold, or figures beyond counting, summing, the least and the most; then `storage:sql`, a schema and a role of the plugin's own with migrations under `migrations/`, which needs the deployment's database user to hold `CREATEROLE` and is said in the hand-over. Records are the default: the console keeps them with versions, files, links, search and aggregates, exports and purges them, and shows them to people by role; a schema is the plugin's to keep.
85
+ Then the data. Records, unless the feature needs what records do not give: joins across many collections, more rows than a plugin's records may hold, or figures beyond counting, summing, the least and the most; then `storage:sql`, a schema and a role of the plugin's own with migrations under `migrations/`, which needs the deployment's database user to hold `CREATEROLE` and to own the database, closes the console's schemas to every other role not granted them by name, and is said in the hand-over. The role reaches its own schema alone: a statement that names a table of the console's is refused. Records are the default: the console keeps them with versions, files, links, search and aggregates, exports and purges them, and shows them to people by role; a schema is the plugin's to keep.
86
86
 
87
87
  Then the capabilities: the list the split needs, each read as the sentence the administrator will consent to (the specification's catalogue says what each opens and what a malicious plugin could do with it). A capability no row needs is dropped; `people:read:all`, `people:read:email` (the work email, to match a person to an account elsewhere), `projects:read:all`, `storage:sql` and every `outbound:<host>` are asked for only where the design shows the row that needs them. Write the design: the table, the collections with their fields, the roles, the settings, the board (`needs`, the defaults), the menu group, the pages and the widgets, and the capabilities with their sentences; stop for the checkpoint.
88
88
 
@@ -90,7 +90,7 @@ Then the capabilities: the list the split needs, each read as the sentence the a
90
90
 
91
91
  Produces the **plugin as source**. `console-plugin init <dir> --key <key> --name "<Name>"` writes the smallest complete plugin: the manifest, a server module with one collection, one command and one query, a web bundle with one page and one widget, one skill with its `SKILLCDN.md`, the tests, the build and a README that says where things are; `--console` names the version of `@skillcdn/console` it depends on, the command's own unless said, and for a plugin written for a deployed console, the version that console runs (`console whoami` says it), and the manifest's `console` is written from it, the line of that version (`>=0.4.3 <0.5.0`): the consoles the plugin runs on, which the console checks when it reads the plugin and `console-plugin check` holds the dependency to; narrow it to the patch that brought what the plugin depends on, and widen it to the next line once the plugin is built against it; `--package <name>` the package's name where it is not `console-plugin-<key>`, a scoped one (`@<scope>/console-plugin-<key>`) for a repository of several plugins, published as public; `--repository <url>` with `--directory <path>` where the plugin lives in a repository, which fill `repository`, `homepage` and `bugs` and the manifest's `store`; and `--languages en,ko` the languages of its words, `en` first, which gives every language map and both manifests' translations the others as English words to translate, of which `console-plugin check` warns while they stay English. Then, in `<dir>`: `npm install`, `npm run build`, `npm test`, `npm run check`, all green before a line is changed, and `git init`.
92
92
 
93
- Then the design goes in, file by file: the manifest `console-plugin.json` from the design, its `key`, names and descriptions per language (a name of a word or two, which a tab shows and stops short with an ellipsis past about 28 characters; the description is what the plugin's settings page says of it, and what an agent reads in the rules where there is no `agentNote`), `agentNote`, `capabilities`, `roles` (a role for managers is `follows: "reports"`, held by whoever someone reports to and granted by nobody) and `defaultRole`, `board`, `settings`, `menu`, `pages`, `widgets`, `dataVersion`; the server module `src/server/index.ts`, one `defineCollection` per collection, one `defineCommand` or `defineQuery` per row, `endpoints`, `on`, `jobs`, `api`, `onEnable` and `onDisable` where the design has them, exported by name for the tests and gathered in `definePlugin(...)` as the default export; the web bundle `src/web/index.ts` and `index.css`, where `connect()` gives the page the context (who looks, at what, in which language), `command`, `query`, `records`, `files`, `navigate` (a path of the console's), `open` (a link to the web or to mail, from the press itself, which the console's page opens in a new tab), `download`, `setTitle` and the events, every class prefixed `pl-<key>-`, the console's `sc-` classes and `--sc-*` tokens for the look, and every word a person wrote put in as text; the skills under `skills/<name>/SKILL.md`, one per kind of work, in the SkillCDN Format, and the README of the package. The server module imports only what the host allows and bundles everything it imports; it keeps no state between calls but in records, since its thread is started afresh after a fault. Where the design has `storage:sql`, `migrations/0001-<words>.sql` makes the tables, and `manifest.migrations` names the directory.
93
+ Then the design goes in, file by file: the manifest `console-plugin.json` from the design, its `key`, names and descriptions per language (a name of a word or two, which a tab shows and stops short with an ellipsis past about 28 characters; the description is what the plugin's settings page says of it, and what an agent reads in the rules where there is no `agentNote`), `agentNote`, `capabilities`, `roles` (a role for managers is `follows: "reports"`, held by whoever someone reports to and granted by nobody) and `defaultRole`, `board`, `settings`, `menu`, `pages`, `widgets`, `dataVersion`; the server module `src/server/index.ts`, one `defineCollection` per collection, one `defineCommand` or `defineQuery` per row, `endpoints`, `on`, `jobs`, `api`, `onEnable` and `onDisable` where the design has them, exported by name for the tests and gathered in `definePlugin(...)` as the default export; the web bundle `src/web/index.ts` and `index.css`, where `connect()` gives the page the context (who looks, at what, in which language), `command`, `query`, `records`, `files`, `navigate` (a path of the console's), `open` (a link to the web or to mail, from the press itself, which the console's page opens in a new tab), `download`, `setTitle` and the events, every class prefixed `pl-<key>-`, the console's `sc-` classes and `--sc-*` tokens for the look, the classes being the parts of the console's catalogue (`src/styles/README.md` in the package) and never a class of one of the console's own pages, which `check` refuses, figures drawn with the console's charts (a figure, a list of bars, a chart over time, a share, a table of figures: the package's README, "Charts", says which is for what; their classes are in the frame's stylesheet, their measures are attributes from `@skillcdn/console/charts` and never a style, which a frame refuses, and a bundle of React takes the components from `@skillcdn/console`), and every word a person wrote put in as text; the skills under `skills/<name>/SKILL.md`, one per kind of work, in the SkillCDN Format, and the README of the package. The server module imports only what the host allows and bundles everything it imports; it keeps no state between calls but in records, since its thread is started afresh after a fault. Where the design has `storage:sql`, `migrations/0001-<words>.sql` makes the tables, and `manifest.migrations` names the directory.
94
94
 
95
95
  ### Phase 3: Test it as the console runs it
96
96
 
@@ -98,13 +98,13 @@ Produces the **tests**, green. `src/server/index.test.ts` runs each command, que
98
98
 
99
99
  ### Phase 4: Run it on a local console
100
100
 
101
- Produces the **plugin running**, enabled, with its commands tried and its pages shown. The console from its checkout, as the console's README's "Install" says, with one difference: before the api starts, `.env` sets `PLUGINS_DIR` to a directory made for the purpose, whose `package.json` is `{ "private": true, "dependencies": {} }` and in which `npm install --ignore-scripts <path to the plugin>` writes the plugin as a `file:` dependency and links `node_modules/<its name>` to the checkout, built; the console reads the link where it points, so the checkout is the plugin, and `npm run build` in it followed by a restart of the api is a new version. The person signs in on the local console as its administrator (`ADMINS` in `.env`, a GitHub OAuth app registered for the local address, as `apps/console/README.md` of the console says), opens the plugins' settings page, where the plugin is listed as installed with any reason it failed to load, and enables it: the consent to each capability, the board project made from the manifest's defaults or chosen, the projects it is on, the settings; or their agent does the same with `console plugin <key> enable` ([setting-up.md](/skills/planning-the-board/references/setting-up.md), "A plugin's board project"), signed in there with `console login`. The compose database's user owns the database, so `storage:sql` is available locally. Then the tabs appear where the manifest put them, and the plugin is worked as an agent works it ([working-the-board](/skills/working-the-board/SKILL.md)): `console plugin <key>` lists the commands, `console plugin <key> <command> ...` runs one, a decision raised is answered on the pages, a hook runs, a job runs at its time (the worker inside the api, locally), and the pages are looked at with a browser the agent can drive, else by the person. What is seen is shown at the checkpoint; what could not run is reported as not run. Without a provider to register: in the console's checkout, `pnpm dev:plugins --plugin <path to the built plugin>` runs the console on this machine with the fixture's people signing in from the browser at the addresses it prints, the plugin installed beside the fixtures and not enabled, and the plugin's hooks and jobs running in that process, so that a decision answered there reaches the hook within seconds and a job runs at its time; the administrator among them enables it on the settings page, and the pages and `console plugin <key>` are looked at as above. The directory is read as the image lays a plugin out, so a checkout is built first (`npm run build`), and a directory that is not a built plugin stops the console with the reason.
101
+ Produces the **plugin running**, enabled, with its commands tried and its pages shown. The console from its checkout, as the console's README's "Install" says, with one difference: before the api starts, `.env` sets `PLUGINS_DIR` to a directory made for the purpose, whose `package.json` is `{ "private": true, "dependencies": {} }` and in which `npm install --ignore-scripts <path to the plugin>` writes the plugin as a `file:` dependency and links `node_modules/<its name>` to the checkout, built; the console reads the link where it points, so the checkout is the plugin, and `npm run build` in it followed by a restart of the api is a new version. The person signs in on the local console as its administrator (`ADMINS` in `.env`, a GitHub OAuth app registered for the local address, as `apps/console/README.md` of the console says), opens the plugins' settings page, where the plugin is listed as installed with any reason it failed to load, and enables it: the consent to each capability, the board project made from the manifest's defaults or chosen, the projects it is on, the settings; or their agent does the same with `console plugin <key> enable` ([setting-up.md](/skills/planning-the-board/references/setting-up.md), "A plugin's board project"), signed in there with `console login`. The compose database's user owns the database, so `storage:sql` is available locally. Then the tabs appear where the manifest put them, and the plugin is worked as an agent works it ([working-the-board](/skills/working-the-board/SKILL.md)): `console plugin <key>` lists the commands, `console plugin <key> <command> ...` runs one, a decision raised is answered on the pages, a hook runs, a job runs at its time (the worker inside the api, locally; `console plugin <key>` says how each job's last run went and when it runs next, and `console plugin <key> events --kind plugin.failed` why one failed), and the pages are looked at with a browser the agent can drive, else by the person. What is seen is shown at the checkpoint; what could not run is reported as not run. Without a provider to register: in the console's checkout, `pnpm dev:plugins --plugin <path to the built plugin>` runs the console on this machine with the fixture's people signing in from the browser at the addresses it prints, the plugin installed beside the fixtures and not enabled, and the plugin's hooks and jobs running in that process, so that a decision answered there reaches the hook within seconds and a job runs at its time; the administrator among them enables it on the settings page, and the pages and `console plugin <key>` are looked at as above. The directory is read as the image lays a plugin out, so a checkout is built first (`npm run build`), and a directory that is not a built plugin stops the console with the reason.
102
102
 
103
103
  ### Phase 5: Ship, and hand the install to the deployment
104
104
 
105
- Produces the **release** and the **hand-over**. The version in `package.json` moves as semver says, `dataVersion` moves with an entry in `upgrades` whenever the shape of a record changed; `npm run build`, `npm test` and `npm run check` pass; a commit, and a push of the repository. Then one of two, confirmed with its consequence: `npm publish` (`--access public` for a scoped name), which puts the package on the registry under that name for good, and is done by the person or with their word; or a tag `v<version>` whose tree carries the built package (the template's `.gitignore` leaves `dist/` out of git, so a release commit adds it with `git add -f dist` before the tag), since the deployment installs with no scripts and runs no build. The deployment then names the plugin as `"<name>": "<version>"` or, for a repository of one plugin alone, `"github:<owner>/<repo>#v<version>"`.
105
+ Produces the **release** and the **hand-over**. The version in `package.json` moves as semver says, `dataVersion` moves with an entry in `upgrades` whenever the shape of a record changed: an upgrade reaches its records through `ctx` as a job does, and the code reads a record of the version before as well, since a plugin whose upgrade did not go through on a deployment is loaded all the same and said to be behind; `npm run build`, `npm test` and `npm run check` pass; a commit, and a push of the repository. Then one of two, confirmed with its consequence: `npm publish` (`--access public` for a scoped name), which puts the package on the registry under that name for good, and is done by the person or with their word; or a tag `v<version>` whose tree carries the built package (the template's `.gitignore` leaves `dist/` out of git, so a release commit adds it with `git add -f dist` before the tag), since the deployment installs with no scripts and runs no build. The deployment then names the plugin as `"<name>": "<version>"` or, for a repository of one plugin alone, `"github:<owner>/<repo>#v<version>"`.
106
106
 
107
- The hand-over is a task on the deployment's board, written as [planning-the-board](/skills/planning-the-board/SKILL.md) writes one, or the same words in chat where there is no board: the package and its version, the consoles it runs on (the manifest's `console`, which must admit the deployment's console: `console whoami` says its version, and a console outside the range lists the plugin as failed with the reason), and how it is installed ([deploy/README.md, "Plugins in the image"](/deploy/README.md#plugins-in-the-image), a row of deploying-a-console's [running-it-again.md](/skills/deploying-a-console/references/running-it-again.md)); what the deployment must provide, where the plugin asks it (`CREATEROLE` for `storage:sql`, the hosts of `outbound`, a bound on the files); what the administrator does when they enable it: the capabilities they consent to, the board project, the projects, the settings to fill and the secrets to set, the roles and who gets them; and where the plugin's skills are once it runs (`console plugin <key> skills`). The deployment's agent installs it as a release of the deployment; the administrator enables it; the plugin is then proven on that console as phase 4 proved it locally, and that is the delivery.
107
+ The hand-over is a task on the deployment's board, written as [planning-the-board](/skills/planning-the-board/SKILL.md) writes one, or the same words in chat where there is no board: the package and its version, the consoles it runs on (the manifest's `console`, which must admit the deployment's console: `console whoami` says its version, and a console outside the range lists the plugin as failed with the reason), and how it is installed ([deploy/README.md, "Plugins in the image"](/deploy/README.md#plugins-in-the-image), a row of deploying-a-console's [running-it-again.md](/skills/deploying-a-console/references/running-it-again.md)); what the deployment must provide, where the plugin asks it (for `storage:sql`, a database user that holds `CREATEROLE` and owns the database, and a grant by name of the schema `public` to any other role that reads the console's tables, since its first provisioning takes from every role what it held through `PUBLIC`, as [deploy/README.md](/deploy/README.md#plugins-in-the-image) says; the hosts of `outbound`; a bound on the files); what the administrator does when they enable it: the capabilities they consent to, the board project, the projects, the settings to fill and the secrets to set, the roles and who gets them; and where the plugin's skills are once it runs (`console plugin <key> skills`). The deployment's agent installs it as a release of the deployment; the administrator enables it; the plugin is then proven on that console as phase 4 proved it locally, and that is the delivery.
108
108
 
109
109
  ## Verdicts
110
110
 
@@ -5,7 +5,7 @@ license: MIT
5
5
  compatibility: Needs a shell with Node.js 24 or newer, git, curl, jq and the AWS CLI v2, the gh command signed in or an empty repository the person made, network access to AWS, Cloudflare, GitHub and npm, an AWS account and a domain on Cloudflare the person can create a key and a token for, and a browser on any device for the few steps only a signed-in person can take. Works in any agent that can run a shell and write files; on Windows, in Git Bash with path conversion off.
6
6
  metadata:
7
7
  author: skillcdn
8
- version: "1.7"
8
+ version: "1.8"
9
9
  skillcdn:
10
10
  translations:
11
11
  ko:
@@ -48,7 +48,7 @@ Check these before the first message. Without the AWS CLI, offer to install it (
48
48
  | How people sign in, and who | Asked: "How should people sign in: with GitHub, with Google (Workspace), or both? Who configures the console (you, at least): their GitHub login or Google address. With GitHub, everyone of your organization can be in, as the organization has them: say which organization. With a Google Workspace, everyone of the domain is in. Anyone else, an administrator lets in on the People page once the console runs." |
49
49
  | The organization's skills | Asked: "Where are your organization's skills on SkillCDN, if anywhere yet? An address like `/gh/<owner>/<repo>`. Is that repository private?" Default: none; a project names one later on its Settings page. A private one is connected in phase 6, with a code the person approves at SkillCDN ([ADR-0036](/docs/adr/0036-a-private-pack-is-connected-with-a-code-a-person-approves-from-the-projects-settings.md)); nothing of it is needed before. |
50
50
  | The organization's website, and the look | Asked: "Does your organization have a website? Its address." With one, the console takes the organization's look by default: the marks, the colours and the type read from the site as building-a-console's [the-look-from-a-website.md](/skills/building-a-console/references/the-look-from-a-website.md) says, mapped onto the pages and shown at the plan, and built into the image as the organization's own console, `console-ui/` of the deployment repository, so that the first deploy already carries it. Without a site, or when the person says the default pages are fine, the image's default pages serve: the board's name alone, and no marks. A look that is wanted later is the same skill, building-a-console, in `console-ui/`, and a push. |
51
- | The plugins | Asked only when the request names one, or the organization's console is to carry a feature of its work (leave, customers, money): "Should the console carry a plugin? Which package, at which version or tag?" Default: none. A plugin is installed by building it into the image from `plugins/package.json` and its lockfile in the deployment repository, with no install scripts ([deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image)), and enabled by the administrator on the console's settings page once it runs, consenting to what it asks; one with `storage:sql` needs the database user to hold `CREATEROLE`, which the master user of phase 3's database does. One wanted later is a row of [running-it-again.md](references/running-it-again.md); one to be written is [building-a-plugin](/skills/building-a-plugin/SKILL.md). |
51
+ | The plugins | Asked only when the request names one, or the organization's console is to carry a feature of its work (leave, customers, money): "Should the console carry a plugin? Which package, at which version or tag?" Default: none. A plugin is installed by building it into the image from `plugins/package.json` and its lockfile in the deployment repository, with no install scripts ([deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image)), and enabled by the administrator on the console's settings page once it runs, consenting to what it asks; one with `storage:sql` needs the database user to hold `CREATEROLE` and to own the database, as the master user of phase 3's database does. One wanted later is a row of [running-it-again.md](references/running-it-again.md); one to be written is [building-a-plugin](/skills/building-a-plugin/SKILL.md). |
52
52
  | The AWS account | Asked: "Do you have an AWS account for this, or should the console get an account of its own (the simplest to run and to read the bill of)?" A new account is made by the person, on the paid plan, with the order of cost already in front of them (the second message). |
53
53
  | The region | Asked when the organization's country does not say: "Where are most of your people: a country, or a city?" The region is the one nearest them: `ap-northeast-2` (Seoul), `ap-northeast-1` (Tokyo), `ap-southeast-1` (Singapore), `eu-central-1` (Frankfurt), `eu-west-1` (Ireland), `eu-west-2` (London), `us-east-1` (N. Virginia), `us-east-2` (Ohio), `us-west-2` (Oregon); `aws ec2 describe-regions` lists them all, and sizing.md says how a region's prices are read. |
54
54
  | The run's folder | Asked with a suggestion: "Which folder should the deployment live in on this machine? I suggest `console-deploy` under your home folder." It is made at once and becomes the deployment repository. |
@@ -83,7 +83,7 @@ Produces the **live address**. The zone is active (else the wait of "How the per
83
83
 
84
84
  ### Phase 6: The first people
85
85
 
86
- Produces the **first administrator and the first project**. Tell the person: "Open <address> and sign in with <provider>; you are an administrator. Make the first project: Projects, New project, a key such as `general`, its name, and the skills address <address or none>. Tell me the key." Then connect this agent: `console login --url <address> --agent deploying-a-console`, which shows an address and a code; relay them, and the person approves on the console's own pages. `console use <key>` in the run's folder. A private pack: `console project pack-token <key> --connect`, which prints a page at SkillCDN and a code; relay them, and the person, signed in at SkillCDN as someone who may open the repository, checks the code and approves there; the command says when the pack is connected, and `console skills` then lists it. Nothing is pasted.
86
+ Produces the **first administrator and the first project**. Tell the person: "Open <address> and sign in with <provider>; you are an administrator. Make the first project: Projects, New project, a key such as `general`, its name, and the skills address <address or none>. Tell me the key." Then connect this agent: `console login --url <address> --agent deploying-a-console`, which shows an address and a code and ends; relay them, run it once more as it says, and the person approves on the console's own pages. `console use <key>` in the run's folder. A private pack: `console project pack-token <key> --connect`, which prints a page at SkillCDN and a code; relay them, and the person, signed in at SkillCDN as someone who may open the repository, checks the code and approves there; the command says when the pack is connected, and `console skills` then lists it. Nothing is pasted.
87
87
 
88
88
  ### Phase 7: Proof
89
89
 
@@ -95,7 +95,7 @@ Produces **`DEPLOY.md`** in the repository, from the template in resources.md: w
95
95
 
96
96
  ### Running it again
97
97
 
98
- The same skill, from phase 2, with the plan naming only what changes and its price: a new version of the console or of the connector, a plugin installed, updated or removed, the next size, a person let in or taken out, a secret rotated, a console shared with outside teams or customers, the console paused or removed. What each takes is in [running-it-again.md](references/running-it-again.md); each is confirmed at the plan, and the record is updated with it.
98
+ The same skill, from phase 2, with the plan naming only what changes and its price: a new version of the console or of the connector, a plugin installed, updated or removed, the next size, a person let in or taken out, a secret rotated, the console's own secret replaced, a console shared with outside teams or customers, the console paused or removed. What each takes is in [running-it-again.md](references/running-it-again.md); each is confirmed at the plan, and the record is updated with it.
99
99
 
100
100
  ### Verdicts
101
101
 
@@ -138,11 +138,14 @@ No user and no key: the tasks read and write the bucket as their own role, whose
138
138
  "Version": "2012-10-17",
139
139
  "Statement": [
140
140
  { "Effect": "Allow", "Action": ["s3:ListBucket"], "Resource": "arn:aws:s3:::<bucket>" },
141
- { "Effect": "Allow", "Action": ["s3:GetObject", "s3:PutObject"], "Resource": "arn:aws:s3:::<bucket>/*" }
141
+ { "Effect": "Allow", "Action": ["s3:GetObject", "s3:PutObject"], "Resource": "arn:aws:s3:::<bucket>/*" },
142
+ { "Effect": "Allow", "Action": ["s3:DeleteObject"], "Resource": "arn:aws:s3:::<bucket>/transcript/*" }
142
143
  ]
143
144
  }
144
145
  ```
145
146
 
147
+ The last statement lets the console take the bytes of a sealed event off the transcript of an agent account's sessions and nothing else: no file of the board is ever deleted. With `S3_KEY_PREFIX` set, the prefix stands before `transcript/` there.
148
+
146
149
  `ListBucket` on the bucket is what the console's probe at start (`HEAD` on the bucket) needs; the objects are read and written under their hash.
147
150
 
148
151
  ### The image repository, the logs, the roles, the cluster
@@ -168,12 +171,12 @@ The task role carries the files policy and nothing else: the platform hands ever
168
171
  1. **The tunnel.** `cf "/accounts/$CF_ACCOUNT/cfd_tunnel" -X POST --data '{"name":"console","config_src":"cloudflare"}' > scratch/tunnel.json`; `TUNNEL=$(jq -r .result.id scratch/tunnel.json)`; `jq -r .result.token scratch/tunnel.json | set_secret TUNNEL_TOKEN`; `rm scratch/tunnel.json`. Then its routing: `cf "/accounts/$CF_ACCOUNT/cfd_tunnel/$TUNNEL/configurations" -X PUT --data '{"config":{"ingress":[{"hostname":"<hostname>","service":"http://127.0.0.1:11199"},{"service":"http_status:404"}]}}'`. The connector runs beside the `api` container, so the service is the loopback, by its address rather than `localhost`, which may resolve to `::1` and reach the console from there; the last rule, without a hostname, is required.
169
172
  2. **The hostname.** `cf "/zones/$ZONE/dns_records" -X POST --data '{"type":"CNAME","name":"<hostname>","content":"'$TUNNEL'.cfargotunnel.com","proxied":true,"ttl":1}'`. Proxied: the traffic goes through Cloudflare, which terminates TLS with its own certificate for the zone.
170
173
  3. **Always HTTPS**, so that `http://` turns into `https://`, which `PUBLIC_URL` is. On a zone of the console's own: `cf "/zones/$ZONE/settings/always_use_https" -X PATCH --data '{"value":"on"}'`. On a zone that serves other hosts: the redirect rule of "A zone that serves other hosts" below, for the hostname alone.
171
- 4. **The rate limiting rule**, on the sign-in and connect paths of the console's hostname, which is what the console asks of a proxy; the board's own traffic is not limited. `RULESET=$(cf "/zones/$ZONE/rulesets/phases/http_ratelimit/entrypoint" | jq -r '.result.id')`: the entry point ruleset's id, or `null` when the zone has none yet. With one, `cf "/zones/$ZONE/rulesets/$RULESET/rules" -X POST --data @scratch/rule.json`, which adds the rule and leaves the zone's others alone; with none, `cf "/zones/$ZONE/rulesets" -X POST --data '{"name":"console","kind":"zone","phase":"http_ratelimit","rules":[<the rule>]}'`. Either answer carries the ruleset with its rules: the ruleset's id and the rule's (`.result.id`, `.result.rules[-1].id`) go into the notes and the record. Never `PUT` on the entry point: it replaces every rule of the phase. `scratch/rule.json`:
174
+ 4. **The rate limiting rule**, on the sign-in and connect paths of the console's hostname and on the path an agent account's invitation is looked up at (`/api/v1/setup/`, read without a sign-in), which is what the console asks of a proxy; the board's own traffic is not limited. `RULESET=$(cf "/zones/$ZONE/rulesets/phases/http_ratelimit/entrypoint" | jq -r '.result.id')`: the entry point ruleset's id, or `null` when the zone has none yet. With one, `cf "/zones/$ZONE/rulesets/$RULESET/rules" -X POST --data @scratch/rule.json`, which adds the rule and leaves the zone's others alone; with none, `cf "/zones/$ZONE/rulesets" -X POST --data '{"name":"console","kind":"zone","phase":"http_ratelimit","rules":[<the rule>]}'`. Either answer carries the ruleset with its rules: the ruleset's id and the rule's (`.result.id`, `.result.rules[-1].id`) go into the notes and the record. Never `PUT` on the entry point: it replaces every rule of the phase. `scratch/rule.json`:
172
175
 
173
176
  ```json
174
177
  {
175
- "description": "console: sign-in and connect, per client",
176
- "expression": "(http.host eq \"<hostname>\" and (starts_with(http.request.uri.path, \"/auth/\") or starts_with(http.request.uri.path, \"/api/v1/connect\")))",
178
+ "description": "console: sign-in, connect and setup, per client",
179
+ "expression": "(http.host eq \"<hostname>\" and (starts_with(http.request.uri.path, \"/auth/\") or starts_with(http.request.uri.path, \"/api/v1/connect\") or starts_with(http.request.uri.path, \"/api/v1/setup/\")))",
177
180
  "action": "block",
178
181
  "enabled": true,
179
182
  "ratelimit": { "characteristics": ["ip.src", "cf.colo.id"], "period": 10, "requests_per_period": 30, "mitigation_timeout": 10 }
@@ -307,7 +310,7 @@ The same with `"family": "console-worker"`, `"cpu": "256"`, `"memory": "512"`, o
307
310
 
308
311
  ### `deploy/migrate.task.json`
309
312
 
310
- The same with `"family": "console-migrate"`, `"cpu": "256"`, `"memory": "512"`, one container `migrate` with `"command": ["migrate"]` and the read-only root filesystem, `secrets` `DATABASE_URL` and `DATABASE_CA`, no environment, no port, no health check, the log stream prefix `migrate`, and no tunnel: a connector must never start for a one-off task.
313
+ The same with `"family": "console-migrate"`, `"cpu": "256"`, `"memory": "512"`, one container `migrate` with `"command": ["migrate"]` and the read-only root filesystem, `secrets` `DATABASE_URL` and `DATABASE_CA`, no environment, no port, no health check, the log stream prefix `migrate`, and no tunnel: a connector must never start for a one-off task. Where the image carries plugins, the task takes the `environment`, the `secrets` and the task role of `api.task.json` as well: the role runs the plugins' upgrades, and an upgrade that reads a file of the plugin's records finds it only in the bucket the `api` wrote it to ([deploy/README.md](/deploy/README.md#plugins-in-the-image)); the console starts on the whole of signing in or on none of it, so the `secrets` come with the `environment`. The same `environment` and `secrets` are what the step that ends a rotation of the console's own secret runs with ("The console's own secret replaced").
311
314
 
312
315
  **Without a pipeline.** A deployment that is rolled by hand, or on a platform that runs one task definition and nothing before it, can run `migrate` inside the tasks instead of as a one-off: a container `migrate` in `api.task.json`, and at `large` in `worker.task.json` too, from the same image with `"command": ["migrate"]`, `"essential": false` and the `secrets` of the migrate task, and the role's own container with `"dependsOn": [{ "containerName": "migrate", "condition": "SUCCESS" }]` (the tunnel keeps its `dependsOn` on `api`). Every task of every role then migrates before it serves; tasks that start together wait on the advisory lock the migration takes, so none races another; a migration that fails leaves the role's container unstarted and the circuit breaker rolls the deployment back. The contract then holds per task rather than per rollout, which hard rule 8 allows in these words. The one-off task stays the default here because it stops the rollout before a single task is replaced.
313
316
 
@@ -442,7 +445,7 @@ aws iam put-role-policy --role-name console-github-deploy --policy-name console-
442
445
 
443
446
  ### The plugins
444
447
 
445
- `plugins/package.json` and `plugins/package-lock.json`, when the plan names a plugin: `dependencies` only, each at an exact version from the registry or a tag of a git host (`github:<owner>/<repo>#<tag>`), written with `npm install --save-exact --package-lock-only --ignore-scripts <package>@<version>` in `plugins/`, which installs nothing on the machine; no scripts, no other field that does anything. The workflow installs them into the image from the lockfile with no install scripts and sets `PLUGINS_DIR`, as [deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image) lays it out; the console reads them at boot, and the administrator enables each on the settings page once the console runs. Absent, the console has no plugins. A plugin that asks `storage:sql` needs the database user to hold `CREATEROLE`, which the master user of phase 3's database does; one that keeps files is bounded with `PLUGIN_FILE_BYTES_AT_MOST` in `deploy/console.env` as `PROJECT_FILE_BYTES_AT_MOST` is, and each plugin's thread may hold `PLUGIN_MEMORY_MB_AT_MOST` (256 unless set), which the task's memory leaves room for.
448
+ `plugins/package.json` and `plugins/package-lock.json`, when the plan names a plugin: `dependencies` only, each at an exact version from the registry or a tag of a git host (`github:<owner>/<repo>#<tag>`), written with `npm install --save-exact --package-lock-only --ignore-scripts <package>@<version>` in `plugins/`, which installs nothing on the machine; no scripts, no other field that does anything. The workflow installs them into the image from the lockfile with no install scripts and sets `PLUGINS_DIR`, as [deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image) lays it out; the console reads them at boot, and the administrator enables each on the settings page once the console runs. Absent, the console has no plugins. A plugin that asks `storage:sql` needs the database user to hold `CREATEROLE` and to own the database, as the master user of phase 3's database does; one that keeps files is bounded with `PLUGIN_FILE_BYTES_AT_MOST` in `deploy/console.env` as `PROJECT_FILE_BYTES_AT_MOST` is, and each plugin's thread may hold `PLUGIN_MEMORY_MB_AT_MOST` (256 unless set), which the task's memory leaves room for.
446
449
 
447
450
  ### The rest of the repository
448
451
 
@@ -481,7 +484,7 @@ aws budgets create-budget --account-id $ACCOUNT --budget file://scratch/budget.j
481
484
  The person signs in and makes the first project on the pages (the skill's phase 6). Then, in the run's folder:
482
485
 
483
486
  ```sh
484
- console login --url https://<hostname> --agent deploying-a-console # relay the address and the code; the person approves
487
+ console login --url https://<hostname> --agent deploying-a-console # relay the address and the code and run it once more as it says; the person approves
485
488
  console use <key>
486
489
  printf '# Deployment check\n\nHanded in by the deploying agent on <date> to prove the bucket.\n' > scratch/deployment-check.md
487
490
  NUMBER=$(console task new "Deployment check" --body "What this run deployed, in a few lines: the size, the address, what is owed." --json | jq -r .number)
@@ -525,7 +528,7 @@ Made on <date> with the skill `deploying-a-console` of the SkillCDN Console (ski
525
528
  - **A new version of the console:** set `CONSOLE_REF` in `deploy/console.env` to the commit of the newest release tag: the last line of `git ls-remote --tags https://github.com/skillcdn/console 'refs/tags/@skillcdn/console@*' | sort -t@ -k3 -V` is the highest version, with the commit in its first column; move `console-ui/` to the same version of the package when there is one; push. **A new connector:** `CLOUDFLARED_VERSION` there, push.
526
529
  - **A person added or removed:** with an organization at GitHub (`GITHUB_ORG`), in the organization, which the console reads every ten minutes; otherwise on the People page, or with `console person add <login>` and `console person deactivate <login>`, by an administrator; nothing to push. With a Google Workspace, everyone of `GOOGLE_WORKSPACE_DOMAIN` is in. `ADMINS` in `deploy/api.task.json` names only the first administrators, who make others on the People page.
527
530
  - **The next size:** the numbers in `deploy/api.task.json` (and `deploy/worker.task.json` at `large`), `API_COUNT` and `WORKER_COUNT` in `deploy/console.env`, push; to `large`, also `deploy/worker.task.json` written as the skill's resources.md gives it and `WORKER_IN_PROCESS` dropped from the api task; the database: `aws rds modify-db-instance --db-instance-identifier console --db-instance-class <class> --apply-immediately` (a few minutes of unavailability).
528
- - **A secret rotated:** the new value into a secrets file of the same shape with the skill's script (`set`), then `node <the script> store <file> /console`, which overwrites the parameter in its tier (`$(npm root -g)/@skillcdn/console/skills/deploying-a-console/scripts/store-secrets.mjs`; `DATABASE_CA` is in the advanced tier, which an `aws ssm put-parameter --overwrite` by hand must name with `--tier Advanced`); then `aws ecs update-service --cluster console --service api --force-new-deployment`.
531
+ - **A secret rotated:** the new value into a secrets file of the same shape with the skill's script (`set`), then `node <the script> store <file> /console`, which overwrites the parameter in its tier (`$(npm root -g)/@skillcdn/console/skills/deploying-a-console/scripts/store-secrets.mjs`; `DATABASE_CA` is in the advanced tier, which an `aws ssm put-parameter --overwrite` by hand must name with `--tier Advanced`); then `aws ecs update-service --cluster console --service api --force-new-deployment`. **The console's own secret (`AUTH_SECRET`)** is never overwritten alone: it is replaced with the skill, in three steps that lose nothing it sealed and sign nobody out.
529
532
  - **The organization's own console:** its source in `console-ui/` (building-a-console makes it); a push builds it into the image.
530
533
  - **Paused:** `aws ecs update-service --cluster console --service api --desired-count 0` (and `worker`), `aws rds stop-db-instance --db-instance-identifier console` (seven days at most); the reverse resumes.
531
534
  - **Removed:** the skill's "Removing", resource by resource, confirmed.
@@ -541,6 +544,43 @@ Made on <date> with the skill `deploying-a-console` of the SkillCDN Console (ski
541
544
 
542
545
  A change to `DEPLOY.md` or `README.md` alone does not run the workflow (its `paths`), so the record is pushed without a deployment: `git add DEPLOY.md README.md && git commit -m "The record" && git push`, never `git add -A` here, after `git status --short` shows nothing else of the folder as untracked (`scratch/`, the files and `.skillcdn-console.json` are ignored).
543
546
 
547
+ ## The console's own secret replaced
548
+
549
+ `AUTH_SECRET` keys everything the console seals, so it is never overwritten alone: it is replaced in three steps, and then nothing sealed is lost and nobody is signed out ([deploy/README.md](/deploy/README.md#rotating-the-secret)). The console must be at 0.5.1 or later (`console whoami` says its version); an older one is moved to a new version first. The plan names the three steps and the two pushes.
550
+
551
+ **1. The new secret beside the old one.** In the repository first, without pushing: one line more in the `secrets` of `deploy/api.task.json`, and of every other task definition that carries `AUTH_SECRET`,
552
+
553
+ ```json
554
+ { "name": "AUTH_SECRET_PREVIOUS", "valueFrom": "arn:aws:ssm:<region>:<account>:parameter/console/AUTH_SECRET_PREVIOUS" }
555
+ ```
556
+
557
+ and `deploy/migrate.task.json` given the `environment` and the `secrets` of `deploy/api.task.json`, this line among them, where it does not carry them yet; commit. Then the two values, neither ever shown: the old one from its parameter into the secrets file under its new name, a new one generated, both stored:
558
+
559
+ ```sh
560
+ aws ssm get-parameter --name /console/AUTH_SECRET --with-decryption --query Parameter.Value --output text | set_secret AUTH_SECRET_PREVIOUS
561
+ node -e "process.stdout.write(require('node:crypto').randomBytes(36).toString('base64url'))" | set_secret AUTH_SECRET
562
+ node scratch/store-secrets.mjs store "$SECRETS" /console
563
+ ```
564
+
565
+ Push at once, and watch the run to green: the services roll with both secrets. Check: the `api` says so as it starts, `aws logs tail /console --since 15m --format short --log-stream-name-prefix api | grep 'previous secret'`.
566
+
567
+ **2. What the old one sealed, sealed again.** When the run is green and the services have rolled, the console's own step, as a one-off task from the migrate task definition with its word:
568
+
569
+ ```sh
570
+ set -a; . deploy/console.env; set +a
571
+ NETWORK="awsvpcConfiguration={subnets=[$SUBNETS],securityGroups=[$TASKS_SECURITY_GROUP],assignPublicIp=ENABLED}"
572
+ TASK=$(aws ecs run-task --cluster "$ECS_CLUSTER" --task-definition console-migrate --launch-type FARGATE --network-configuration "$NETWORK" --overrides '{"containerOverrides":[{"name":"migrate","command":["migrate","reseal"]}]}' --query 'tasks[0].taskArn' --output text)
573
+ aws ecs wait tasks-stopped --cluster "$ECS_CLUSTER" --tasks "$TASK"
574
+ aws ecs describe-tasks --cluster "$ECS_CLUSTER" --tasks "$TASK" --query 'tasks[0].containers[0].exitCode' --output text
575
+ aws logs tail /console --since 15m --format short --log-stream-name-prefix migrate | grep -E 'sealed again|previous secret opened'
576
+ ```
577
+
578
+ The exit code is `0` and the line says `"left":0`: nothing is under the old secret any more. `resealed` is how many values were sealed again; `unopened`, where it is not `0`, is how many were already lost before this, under a secret from an earlier time, which the person is told with their kinds (`kinds` in the line) so that their holders set them again. An exit code of `1` with `left` above `0` means a task of the old definition was still running: wait for the rollout to end and run the step again. An exit code of `78` means the task was not given the two secrets: step 1's lines are missing from `deploy/migrate.task.json`. Where a second line follows on the step's first run, `the previous secret opened no value`, the old secret was not given as it was, whatever `left` says: nothing was changed, step 3 waits, and the person is told that `AUTH_SECRET_PREVIOUS` must hold exactly the old value, given in the same form the old one was (here a parameter, copied from the old one as step 1 copies it), before it is put right and the step run again.
579
+
580
+ **3. The old one taken out.** Only after `"left":0`: the `AUTH_SECRET_PREVIOUS` line out of every task definition, commit, push, the run watched to green. Then, on the person's word, the parameter deleted (`aws ssm delete-parameter --name /console/AUTH_SECRET_PREVIOUS`) and the secrets file deleted again. The record's line, with the date.
581
+
582
+ Where the secret leaked to someone who may hold a copy of the database too, the tokens it sealed are made anew at their sources as well, each by whoever holds it: a pack token at the SkillCDN deployment, a plugin's credential at its service. The person is told this at the plan.
583
+
544
584
  ## Removing
545
585
 
546
586
  Only on request, each step confirmed, in this order, after a last snapshot of the database: the services (`aws ecs update-service --desired-count 0`, then `delete-service`), the cluster; the hostname (`DELETE /zones/<zone>/dns_records/<id>`), the rules (`DELETE /zones/<zone>/rulesets/<ruleset>/rules/<rule>`, the two ids of the record; a zone-wide always-HTTPS the run turned on is left as it is, since the zone may have come to rely on it) and the tunnel (`DELETE /accounts/<account>/cfd_tunnel/<id>`, after `.../connections` is empty); the database (`modify-db-instance --no-deletion-protection`, then `delete-db-instance --final-db-snapshot-identifier console-final-<date>`); the bucket, emptied first (`aws s3 rm s3://<bucket> --recursive`, then `delete-bucket`); the parameters; the roles' policies and the roles; the log group; the image repository (`--force`); the security groups; the budget. The deployment repository stays, with the record of what was removed and the snapshot's name.
@@ -5,11 +5,12 @@ A deployment is changed with the same skill, from phase 2: the plan names only w
5
5
  | What changes | What it takes |
6
6
  |---|---|
7
7
  | A new version of the console | The next release tag's commit as `CONSOLE_REF` in `deploy/console.env`, found as the Inputs say under "The console's version"; `console-ui/`, where there is one, moved to the same version of the package, so that the pages and the server stay one release; a push, which builds the image and rolls it, `migrate` first. |
8
- | A plugin installed, updated or removed | The package named in `plugins/package.json` at an exact version or a tag of a git host, and the lockfile written beside it: `cd plugins && npm install --save-exact --package-lock-only --ignore-scripts <package>@<version>` (`npm uninstall --package-lock-only <package>` to remove), as [deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image) says; a push, which builds the image with the plugin installed and rolls it, `migrate` first. Then the administrator enables it on the console's settings page, consenting to what it asks, makes or chooses its board project and grants its roles ([planning-the-board](/skills/planning-the-board/references/setting-up.md)); a plugin with `storage:sql` needs the database user to hold `CREATEROLE`, which the master user does. The record names the plugin and its version. What a removed plugin stored stays until an administrator purges it. |
8
+ | A plugin installed, updated or removed | The package named in `plugins/package.json` at an exact version or a tag of a git host, and the lockfile written beside it: `cd plugins && npm install --save-exact --package-lock-only --ignore-scripts <package>@<version>` (`npm uninstall --package-lock-only <package>` to remove), as [deploy/README.md "Plugins in the image"](/deploy/README.md#plugins-in-the-image) says; a push, which builds the image with the plugin installed and rolls it, `migrate` first. Then the administrator enables it on the console's settings page, consenting to what it asks, makes or chooses its board project and grants its roles ([planning-the-board](/skills/planning-the-board/references/setting-up.md)); a plugin with `storage:sql` needs the database user to hold `CREATEROLE` and to own the database, as the master user does. The record names the plugin and its version. What a removed plugin stored stays until an administrator purges it. |
9
9
  | A new connector | `CLOUDFLARED_VERSION` in `deploy/console.env`, the connector's newest release, which `gh api repos/cloudflare/cloudflared/releases/latest --jq .tag_name` prints; a push. |
10
10
  | The next size | The numbers of the task definitions set to the next size's (sizing.md "The sizes"), `API_COUNT` and `WORKER_COUNT` in `deploy/console.env`; to `large`, `deploy/worker.task.json` written as resources.md gives it and `WORKER_IN_PROCESS` dropped from the api task; the database's class changed with one command, when nobody works (sizing.md "Growing"); the estimate of the new size at the plan; a push. |
11
11
  | A person let in or taken out | With an organization at GitHub, in the organization, which the console reads on its own; otherwise by an administrator, on the People page or with `console person add <login>` and `console person deactivate <login>`; no push, since nothing of the deployment changes. |
12
- | A secret rotated | The new value read from a secrets file of the same shape, as in phase 3, never from the chat; the parameter overwritten with the skill's script and the service rolled, so that the tasks start with it (resources.md "Phase 8: the record", "A secret rotated"); the file deleted again on the person's word; the record's line "a secret rotated", with the date. |
12
+ | A secret rotated | The new value read from a secrets file of the same shape, as in phase 3, never from the chat; the parameter overwritten with the skill's script and the service rolled, so that the tasks start with it (resources.md "Phase 8: the record", "A secret rotated"); the file deleted again on the person's word; the record's line "a secret rotated", with the date. `AUTH_SECRET` is not rotated this way, since a new value alone opens nothing the console sealed: it has the row below. |
13
+ | The console's own secret replaced (`AUTH_SECRET`) | Three steps, each named in the plan, and nothing the console sealed is lost: the pack tokens, the plugins' secret settings and every value of an agent account's store stay, and nobody is signed out ([deploy/README.md](/deploy/README.md#rotating-the-secret)). The new secret rolled out beside the old one; the console's `migrate reseal` run once, whose answer says that nothing is left under the old one; the old one taken out, and its parameter deleted on the person's word (resources.md "The console's own secret replaced"). Two pushes, each a deployment. The record's line "the console's secret replaced", with the date. |
13
14
  | A console shared with outside teams or customers, each in projects of their own | The settings of [deploy/README.md "A shared console"](/deploy/README.md#a-shared-console): who sees whom, the bytes a project's files may hold together, tokens that end; as lines of the task definitions, with a push, or on the Settings page, with none. |
14
15
  | The console paused | Both services at zero tasks and the database stopped, which pauses the deployment at the cost of storage alone, for seven days at most, after which the database starts itself (sizing.md "Growing", "Fewer people"); the reverse resumes; the record says since when. |
15
16
  | The console removed | A run of its own, asked for and confirmed resource by resource (hard rule 7), as resources.md "Removing" says: a last snapshot of the database first, and the deployment repository kept, with the record of what was removed. |
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: keeping-a-desk
3
+ description: "Shapes a member's desk, their own repository, to what they ask to keep there and to see: what is kept goes under records/ in a shape chosen for it, what is shown is a page of their own under web/, built from the console's package and served from their machine, and the desk's AGENTS.md says both in a line each. Use when a person says 'keep what I make here', 'record this on my desk', 'I want to see that on my desk', 'add a page for it', 'what can I do with my desk?', and after console desk, whose last line names this skill. The repository itself, its remote and its first push are set up by a skill of the organization's pack; a page of the organization's console is building-a-console; a task of the board is working-the-board. Nothing is spent, and nothing leaves the desk but its own push."
4
+ license: MIT
5
+ compatibility: A shell with git and the console command (npm install -g @skillcdn/console, Node.js 24 or newer), and an agent that reads and writes files. For pages, npm; a browser the agent can drive is optional. The agent never sees a token.
6
+ metadata:
7
+ author: skillcdn
8
+ version: "1.3"
9
+ skillcdn:
10
+ translations:
11
+ ko:
12
+ title: 데스크 가꾸기
13
+ description: "구성원 자신의 레포인 데스크를, 거기에 남기고 싶은 것과 보고 싶은 것에 맞춰 만듭니다. 남길 것은 그에 맞는 모양으로 records/ 아래에 두고, 볼 것은 콘솔 패키지로 만들어 내 PC에서 띄우는 나만의 페이지로 web/ 아래에 두며, 데스크의 AGENTS.md가 그 둘을 한 줄씩 말합니다. '내가 만든 걸 여기에 남겨 줘', '이거 데스크에 기록해 줘', '그걸 데스크에서 보고 싶어', '페이지 하나 추가해 줘', '데스크로 뭘 할 수 있어?'라고 하거나, console desk의 마지막 줄이 이 스킬을 가리킬 때 쓰세요. 레포와 원격, 첫 푸시는 조직 팩의 스킬이 하고, 조직 콘솔의 페이지는 building-a-console, 보드의 작업은 working-the-board입니다. 비용은 들지 않고, 데스크 밖으로 나가는 것은 데스크 자신의 푸시뿐입니다."
14
+ ---
15
+ # Keeping a desk
16
+
17
+ A desk is a member's own repository, a person's or an agent account's, at their own git account, private and wholly theirs. It is given its least, its instructions and a structure ([ADR-0122](/docs/adr/0122-a-desk-is-given-its-least-and-grown-by-what-its-member-asks.md)): what it keeps and what it shows is whatever its member asks for. What the member says goes in; the desk shaped to it comes out, with a line in its `AGENTS.md` for each thing it now keeps or shows, checked, committed and pushed. Nothing is made that was not asked for: no kind of record, no page, no folder.
18
+
19
+ ## The structure
20
+
21
+ Every desk is these four, and nothing of the last three is there until it is used:
22
+
23
+ | Place | What it is | Who writes it |
24
+ |---|---|---|
25
+ | `AGENTS.md` | The instructions of whichever agent works in the desk; under "This desk", what the desk keeps and shows, a line each, in the member's words | `console desk` first, then the member and their agent |
26
+ | `records/` | What the member keeps: plain files in the shape that fits the thing, JSON an agent writes and the files themselves | The agent, as the member asks |
27
+ | `web/` | The member's pages: a console of their own, built from `@skillcdn/console` and served from their machine | `console desk . --web` writes its shell, one empty page, for a person and an agent account alike |
28
+ | `work/` | Checkouts of projects' repositories, each under its own agreement; the desk ignores it | `git clone` |
29
+
30
+ A session begun in a desk works from `AGENTS.md` and what it points to. This skill is read when something is to be kept or shown that the desk does not keep or show yet, and not for one more entry in a shape the desk already has.
31
+
32
+ ## How the person is involved
33
+
34
+ - **Questions:** one message, for what the request leaves open: "What do you want to keep here, and what do you want to see of it?" Of a thing to keep: what they want to find again of each one, and what becomes of one afterwards, if anything. Of a thing to see: what a glance at the page should tell them. A member who does not know yet is told the structure in three lines, and nothing is made.
35
+ - **Checkpoints:** the plan, before a file is written: what is kept, where, with one entry as it will be written; what the page shows, from its top down; the line `AGENTS.md` gains. One short message; "OK", in their language, continues. Then the page, at its address with the server left up, for them to look at: "is this what you wanted to see?". The agent's own look does not stand in for theirs.
36
+ - **Go-ahead:** told to go ahead alone, the plan is reported instead of approved; the checks of phase 6 are never skipped.
37
+ - **Changes mid-run:** a shape that changes after things are kept carries them over in the same change, and its line in `AGENTS.md` is written again; a page is changed where it stands, never begun again beside.
38
+ - **An agent account** shapes its own desk: nobody is at its terminal, so it chooses the shape from what its work makes, says it in its `AGENTS.md`, and asks its manager, as a decision, only what is the manager's to choose.
39
+ - **Language:** what the member reads, the questions, the plan, a page's words, a title or a label in a record, is in the language `AGENTS.md` names, and so may be the line `AGENTS.md` gains and a folder's `README.md`; a key and a file's name stay in English.
40
+
41
+ ## Requirements
42
+
43
+ | Need | How | When missing |
44
+ |---|---|---|
45
+ | The desk is a repository, with a private remote | `git status` and `git remote -v` in the desk | It is set up first, by the skill for that in the organization's pack: `console skills --search "desk setup" --limit 5`. Where the pack has none: `git init`, a private repository at the member's own git account, the first push, each on their word |
46
+ | For pages: Node.js 24 or newer with npm, and the `console` command signed in | `node --version`; `console whoami` says as whom | Say so, and keep what is to be kept: records need neither. Never look for a token |
47
+
48
+ ## Workflow
49
+
50
+ Each phase ends with one line to the member; only phase 2 and the member's look at the page in phase 4 stop for them.
51
+
52
+ ### Phase 1: Read the desk
53
+
54
+ `AGENTS.md`, "This desk": what the desk keeps and shows now. Then `records/` and `web/` as they are. What is there is kept: a shape is added to, a page is added to, and neither is begun again beside the one that exists.
55
+
56
+ ### Phase 2: Ask, and plan
57
+
58
+ Ask what the request leaves open, then show the plan of "How the person is involved". Plan the least that gives the member what they said: one kind kept in one folder, one page for what they asked to see. A wish to keep something is no wish to see it, and a page is planned only where they asked for one.
59
+
60
+ ### Phase 3: Keep
61
+
62
+ Choose the shape from what the member wants to find again, not from a form:
63
+
64
+ - **One folder under `records/` for one kind of thing**, named by a key: lowercase letters, digits and hyphens.
65
+ - **JSON an agent writes with its file tools.** A list of entries, an object each: an `id` that never changes, what the member wants to find again as fields, a day written `2026-11-15`, an address that begins with `https://`, a path to each file of its own. Nothing is generated, and git shows what changed.
66
+ - **The shape, said once,** in a `README.md` of that folder: each field, what is needed, one entry as an example. The next session writes the same from it, so it is written before the first entry.
67
+ - **The files themselves** go in a `files/` folder there, of any kind and size, by names with no part that begins with a full stop; a kind that is large is tracked with git LFS before the first is added (`git lfs track`).
68
+ - **Text is text.** What a person wrote is kept and shown as text, never as HTML.
69
+ - **A set of things made, with where each was used and how it did by day,** is a shape the package already has, with a check and a ready page: [collections.md](collections.md). Take it where the member asks for exactly that, and only then.
70
+
71
+ ### Phase 4: Show
72
+
73
+ Only where the member asked to see something. Paths below are under the desk's `web/`, and `<package>/` is `node_modules/@skillcdn/console/` there, whose `README.md` is [the package's](/packages/console/README.md).
74
+
75
+ 1. **The shell.** `console desk . --web`, run in the desk, writes `web/` where it holds nothing: one empty page of the member's own, on the version of the package the command is. `src/main.tsx` mounts `page` from `src/page.tsx` beside it; the page's key is `mine`, its address `/pages/mine`, and `/` opens on it. Then `npm install` and `npm run build`, which says nothing of its own where it went well and leaves `dist/index.html`; `README.md` says how the pages are built, served and stopped.
76
+ 2. **A page** is one entry of the `pages` handed to `createConsole` in `src/main.tsx`: a key, which is its address (`/pages/<key>`), a label, which is its tab, and a function that renders it. What the member asks to see first goes on the empty page; another page is another entry. What the function is given: `<package>/README.md`, "Pages of your own"; what the readers of a collection answer and what the small parts take: the same file, "A desk's pages". Those two sections are read before the page is written, and the package's types are not dug through.
77
+ 3. **What a page reads.** The desk's own files, with `fetch` at `/records/<path>`, each read when it is asked for; and the board, as the member, through the client the page is given. Nothing of another origin, and no token. `console serve dist --records ../records` serves both: JSON, pictures, video, sound and PDF are shown in place, anything else is a download ([records.md](/docs/specs/records.md#serving)).
78
+ 4. **What a page is built from:** the console's parts, each named with the component that renders it in `<package>/src/styles/README.md`, "The catalogue" ([in the repository](/packages/console/src/styles/README.md)). A page places parts and writes no colour, border or type of its own, so that it looks as the console does. For figures there are the charts, each exported from `@skillcdn/console`, with their props in `<package>/README.md`, "Charts":
79
+ - `Stat`, and `Stats` for a row of them: a figure with its label and, where given, its change and a sparkline.
80
+ - `BarList`: a ranking or a comparison, each a label, a bar and a value.
81
+ - `Chart`: columns or lines over time (`kind: "columns" | "line"`), one to a few series.
82
+ - `Sparkline`: one figure over time, as a small line.
83
+ - `ShareBar`: the parts of a whole in one bar, with its legend.
84
+ - `Legend`: the series by their colours.
85
+ - `FigureTable`: rows by columns, the numbers aligned.
86
+
87
+ A view of figures is laid out in this order: the few numbers that matter first (`Stats`), then one chart, then what breaks them down (`BarList`). No figure stands twice at one level: a chart carries its own figures as a table for a reader who cannot see it, so a `FigureTable` beside it is for figures the chart does not show. Where there is nothing yet, the view says in a sentence what would fill it (`EmptyState`) and draws no empty axis. The ready views below are laid out so.
88
+ 5. **What is ready,** for a member who wants exactly that, in `<package>/README.md`, "A desk's pages". Each shows the collections of [collections.md](collections.md) or the member's own work on the board:
89
+ - `deskPage()`: all of the below as one page, one more entry of `pages`, at `/pages/desk` (`DESK_PAGE_KEY`).
90
+ - `DeskRecords`: the collections, read from `/records/` and shown whole, composed of the next four; it opens on the list of collections, and where an item was used is on the item's own view, so a member who asked to see that at a glance wants a page of their own.
91
+ - `DeskCollections`: the collections, each with its items counted by status.
92
+ - `DeskCollectionView`: a collection's items, narrowed by status.
93
+ - `DeskItemView`: an item with its preview, how it did as figures, where it was used, its files, and its figures by day.
94
+ - `DeskCollectionResults`: each metric and each ratio in all, then one metric the member picks: by week as a chart, and the items that did best by it.
95
+ - `DeskStanding`: the decisions that wait, the open runs and the open tasks.
96
+ - `DeskFiguresView`: how many tasks were done and how the runs ended, then what was done by week, by project and by category.
97
+ - `DeskArchive`: the closed tasks and the ended runs, found by words.
98
+ - `readDeskRecords`: reads the collections for a page of one's own, every file bounded and parsed.
99
+ 6. **Build, serve, show.** `npm run build`, which went well where it ended in 0 and `dist/index.html` is there, not by what it printed; then `npm run serve` and `http://127.0.0.1:11197/`: the page answers, and `/api/v1/me` there names the member. The page is checked with what the desk keeps, an empty state where it keeps nothing yet: no sample is made to fill it. Then the member is given the address, with the server left up, and asked whether it is what they wanted to see; the run stops there for them, and phases 5 and 6 wait for their answer, so that what is written down and pushed is what they saw. The server is the agent's own to stop, by ending the process it started, once they have looked or said to: say that it was stopped, and how the pages are started again. Whether a server is up is asked of its address before it is said, since a session that comes back may no longer hold the process it started. A look at an empty state is a look at a sentence: once the first entry is kept, the member is offered the look again, at the page with it.
100
+
101
+ Where a page shows what someone else wrote, the hard rules of [building-a-console](/skills/building-a-console/SKILL.md) hold for it.
102
+
103
+ ### Phase 5: Write it down
104
+
105
+ `AGENTS.md`, "This desk": one line for each thing the desk now keeps or shows, in the member's words. For what is kept: what, in which folder, and when a new entry is written. For a page: what it shows, and how it is opened; and `web/README.md`, where it still says the page is empty, says what the page shows. A later session records and shows from that line and the folder's `README.md` alone.
106
+
107
+ ### Phase 6: Check, commit and push
108
+
109
+ - Every JSON file written is read back, and parses.
110
+ - Collections: `console desk check`, which says each problem with its file and signs in nowhere.
111
+ - Pages: `npm run build` ends in 0 and `web/dist/index.html` is there, written by it.
112
+ - Nothing secret is staged: `git status`, read in a step of its own before the commit. `web/node_modules` and `web/dist` are ignored, by a line added to the desk's `.gitignore` where it has none for them; the lockfile of `web/` is committed.
113
+ - Commit and push, without asking: the desk is the member's own, and its `AGENTS.md` says so. Where the host refuses a git command (it may keep an agent from writing under `.git`), the checks above are run all the same, and the member is told in the chat what is not committed, with the commands left to run written out in order.
114
+
115
+ Then tell the member, in one message: what is kept and where, with one entry; the page's address, and how it is started and stopped; what was left out.
116
+
117
+ ## Verdicts
118
+
119
+ | Result | Verdict |
120
+ |---|---|
121
+ | What the member asked to keep is under `records/` in a shape its `README.md` says; what they asked to see is on a page that builds and shows it; `AGENTS.md` has its line for each; the checks of phase 6 passed; pushed | Done |
122
+ | A page could not be looked at with no browser, or `npm` is not there | Done, with what was not seen named |
123
+ | Something was made that the member did not ask for: a kind of record, a page, a folder | Taken out again, and said so |
124
+ | A secret in a file, a record or a commit | Stopped: the member is told, and it is rotated, not only deleted |
125
+
126
+ ## What stays true of every desk
127
+
128
+ - **Private.** A desk's repository is private, at the member's own git account.
129
+ - **No secret,** in a file, a record or a commit: no token, key or password.
130
+ - **The pages never see the token.** `console serve` carries it, on the loopback alone, and no page is served anywhere else.
131
+ - **The board is the organization's.** What is done in a desk is its member's own, and is a task only where they put it on the board. Tying a record to a task, or reading the board from a page, is free: nothing asks for it and nothing forbids it. What an organization wants kept out of its members' desks, its rules say (`console rules`).
132
+ - **`/records/` is the files' address,** and no page lives under it.
133
+ - **Nothing is made unasked.** A desk says what it is for by what its member put there.
@@ -0,0 +1,96 @@
1
+ # Collections: things made, where each was used and how it did
2
+
3
+ One shape a desk may take, read when its member wants a set of things they made kept with, for each, whether and where it was used and how it did by day. It is not the shape of a desk: for anything else, choose a shape for that thing ([SKILL.md](SKILL.md), phase 3). The package has this one whole, so nothing of it is built: its schemas ([records.md](/docs/specs/records.md)), `console desk check`, which says each problem of the files with its file and signs in nowhere, and a ready page, `deskPage()`. Which collections a desk keeps is said in the desk's `AGENTS.md`. After writing, run `console desk check` in the desk.
4
+
5
+ ## The files
6
+
7
+ ```
8
+ records/
9
+ index.json the collections
10
+ <key>/collection.json what the collection is, and how its items are read
11
+ <key>/items.json what was made
12
+ <key>/uses.json where an item was used (optional)
13
+ <key>/metrics.json how an item did, by day (optional)
14
+ <key>/files/ the files themselves
15
+ ```
16
+
17
+ A key is lowercase letters, digits and hyphens. A day is written `2026-11-15`. An address begins with `https://`. Everything else is text, and is shown as text.
18
+
19
+ `index.json`, the collections in the order they are shown:
20
+
21
+ ```json
22
+ { "collections": [{ "key": "ad-creatives", "title": "Ad creatives" }] }
23
+ ```
24
+
25
+ `ad-creatives/collection.json`. Only `title` is needed; the rest says how an item is read:
26
+
27
+ ```json
28
+ {
29
+ "title": "Ad creatives",
30
+ "description": "What was made for the ads, and how each did.",
31
+ "statuses": [
32
+ { "key": "used", "label": "Used" },
33
+ { "key": "unused", "label": "Not used" }
34
+ ],
35
+ "fields": [{ "key": "format", "label": "Format", "kind": "text" }],
36
+ "metrics": [
37
+ { "key": "impressions", "label": "Impressions", "unit": "count" },
38
+ { "key": "clicks", "label": "Clicks", "unit": "count" },
39
+ { "key": "spend", "label": "Spend", "unit": "currency", "currency": "KRW" }
40
+ ],
41
+ "ratios": [
42
+ { "key": "ctr", "label": "Clicks per impression", "of": "clicks", "per": "impressions", "as": "percent" }
43
+ ]
44
+ }
45
+ ```
46
+
47
+ A field's `kind` is `text`, `number`, `day` or `link`. A metric's `unit` is `count`, `currency`, `percent` or `seconds`. Each state an item can be in is a status, the one it begins in too. A rate of two metrics, such as clicks per impression, is a ratio: the total of `of` for each of `per`, shown `as` `percent` or `number`; a rate that is no ratio is shown nowhere.
48
+
49
+ `ad-creatives/items.json`, a list. `id`, `title` and `madeOn` are needed; an `id` is letters, digits and hyphens, and never changes:
50
+
51
+ ```json
52
+ [
53
+ {
54
+ "id": "c-001",
55
+ "title": "Morning commute, 15 seconds",
56
+ "madeOn": "2026-11-03",
57
+ "status": "used",
58
+ "preview": "files/c-001.png",
59
+ "files": [{ "label": "The video", "path": "files/c-001.mp4" }],
60
+ "links": [{ "label": "Where it runs", "url": "https://ads.example/c-001" }],
61
+ "task": { "project": "ads", "number": 12 },
62
+ "fields": { "format": "9:16" },
63
+ "note": "The first cut."
64
+ }
65
+ ]
66
+ ```
67
+
68
+ `status` is one of the collection's, and where the collection has statuses every item carries one. `preview` is a picture (png, jpg, jpeg, webp, gif, avif, svg). `task` is a task of the board, where the item is tied to one.
69
+
70
+ `ad-creatives/uses.json`, a list: where an item was used, and when.
71
+
72
+ ```json
73
+ [{ "item": "c-001", "on": "2026-11-06", "where": "The November campaign, feed" }]
74
+ ```
75
+
76
+ `ad-creatives/metrics.json`, a list: a row for an item and a day, with a number for each metric that day has.
77
+
78
+ ```json
79
+ [{ "item": "c-001", "on": "2026-11-06", "values": { "impressions": 1200, "clicks": 36, "spend": 54000 } }]
80
+ ```
81
+
82
+ ## The files themselves
83
+
84
+ `files/` of a collection holds what was made, of any kind and size, and an item names each by its path from the collection: `files/c-001.mp4`. No part of a path begins with a full stop. A large file goes in with git LFS: track its kind (`git lfs track`) before adding it.
85
+
86
+ ## Bounds
87
+
88
+ At most 100 collections; in a collection 5,000 items, 20,000 uses and 50,000 rows of figures; 64 characters in a key or an id, 200 in a title, a label or `where`, 2,000 in a description, a note or a field that is text; 8 MiB in a JSON file. A file under `files/` has no bound.
89
+
90
+ ## What the check says
91
+
92
+ A problem, with its file, for what does not read: a file that is no JSON or not in this shape, an item a use or a row of figures names that is not there, a preview or a file that is not there, a JSON file over its bound. A note, and no problem, for a file git LFS has not fetched on this machine, a use or a figure dated before its item was made, and an item with no status where its collection names some. With any problem it ends in 1; where a desk keeps no collection it says so and ends in 0, and what else lies under `records/` is not its to read.
93
+
94
+ ## What never goes in
95
+
96
+ A secret: a token, a key, a password.