@skillcdn/console 0.5.0 → 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 (345) hide show
  1. package/README.md +68 -11
  2. package/SKILLCDN.md +3 -3
  3. package/dist/agent-page.d.ts.map +1 -1
  4. package/dist/agent-page.js +3 -2
  5. package/dist/agent-page.js.map +1 -1
  6. package/dist/api.d.ts +7 -6
  7. package/dist/api.d.ts.map +1 -1
  8. package/dist/api.js +6 -5
  9. package/dist/api.js.map +1 -1
  10. package/dist/charts.d.ts +103 -0
  11. package/dist/charts.d.ts.map +1 -0
  12. package/dist/charts.js +182 -0
  13. package/dist/charts.js.map +1 -0
  14. package/dist/cli/cli.d.ts +26 -2
  15. package/dist/cli/cli.d.ts.map +1 -1
  16. package/dist/cli/cli.js +1304 -383
  17. package/dist/cli/cli.js.map +1 -1
  18. package/dist/cli/command-words.d.ts +20 -0
  19. package/dist/cli/command-words.d.ts.map +1 -0
  20. package/dist/cli/command-words.js +51 -0
  21. package/dist/cli/command-words.js.map +1 -0
  22. package/dist/cli/credentials.d.ts +54 -5
  23. package/dist/cli/credentials.d.ts.map +1 -1
  24. package/dist/cli/credentials.js +126 -20
  25. package/dist/cli/credentials.js.map +1 -1
  26. package/dist/cli/directory.d.ts +19 -4
  27. package/dist/cli/directory.d.ts.map +1 -1
  28. package/dist/cli/directory.js +16 -8
  29. package/dist/cli/directory.js.map +1 -1
  30. package/dist/cli/format.d.ts +65 -8
  31. package/dist/cli/format.d.ts.map +1 -1
  32. package/dist/cli/format.js +242 -37
  33. package/dist/cli/format.js.map +1 -1
  34. package/dist/cli/help.d.ts +13 -4
  35. package/dist/cli/help.d.ts.map +1 -1
  36. package/dist/cli/help.js +92 -54
  37. package/dist/cli/help.js.map +1 -1
  38. package/dist/cli/main.js +76 -2
  39. package/dist/cli/main.js.map +1 -1
  40. package/dist/cli/pack.d.ts +69 -60
  41. package/dist/cli/pack.d.ts.map +1 -1
  42. package/dist/cli/pack.js +241 -270
  43. package/dist/cli/pack.js.map +1 -1
  44. package/dist/cli/plugin-check.d.ts +42 -0
  45. package/dist/cli/plugin-check.d.ts.map +1 -1
  46. package/dist/cli/plugin-check.js +221 -36
  47. package/dist/cli/plugin-check.js.map +1 -1
  48. package/dist/cli/plugin-cli.d.ts +6 -1
  49. package/dist/cli/plugin-cli.d.ts.map +1 -1
  50. package/dist/cli/plugin-cli.js +21 -4
  51. package/dist/cli/plugin-cli.js.map +1 -1
  52. package/dist/cli/plugin-main.js +1 -0
  53. package/dist/cli/plugin-main.js.map +1 -1
  54. package/dist/cli/serve.d.ts +33 -1
  55. package/dist/cli/serve.d.ts.map +1 -1
  56. package/dist/cli/serve.js +252 -3
  57. package/dist/cli/serve.js.map +1 -1
  58. package/dist/client.d.ts +48 -9
  59. package/dist/client.d.ts.map +1 -1
  60. package/dist/client.js +72 -80
  61. package/dist/client.js.map +1 -1
  62. package/dist/components/agent-page.d.ts +64 -1
  63. package/dist/components/agent-page.d.ts.map +1 -1
  64. package/dist/components/agent-page.js +244 -96
  65. package/dist/components/agent-page.js.map +1 -1
  66. package/dist/components/charts.d.ts +157 -0
  67. package/dist/components/charts.d.ts.map +1 -0
  68. package/dist/components/charts.js +182 -0
  69. package/dist/components/charts.js.map +1 -0
  70. package/dist/components/desk-records.d.ts +102 -0
  71. package/dist/components/desk-records.d.ts.map +1 -0
  72. package/dist/components/desk-records.js +221 -0
  73. package/dist/components/desk-records.js.map +1 -0
  74. package/dist/components/desk.d.ts +85 -0
  75. package/dist/components/desk.d.ts.map +1 -0
  76. package/dist/components/desk.js +135 -0
  77. package/dist/components/desk.js.map +1 -0
  78. package/dist/components/event-feed.d.ts.map +1 -1
  79. package/dist/components/event-feed.js +4 -1
  80. package/dist/components/event-feed.js.map +1 -1
  81. package/dist/components/home.d.ts.map +1 -1
  82. package/dist/components/home.js +4 -2
  83. package/dist/components/home.js.map +1 -1
  84. package/dist/components/plugin-settings.d.ts.map +1 -1
  85. package/dist/components/plugin-settings.js +54 -3
  86. package/dist/components/plugin-settings.js.map +1 -1
  87. package/dist/components/projects.d.ts.map +1 -1
  88. package/dist/components/projects.js +27 -7
  89. package/dist/components/projects.js.map +1 -1
  90. package/dist/components/rules.d.ts +8 -10
  91. package/dist/components/rules.d.ts.map +1 -1
  92. package/dist/components/rules.js +35 -13
  93. package/dist/components/rules.js.map +1 -1
  94. package/dist/components/setup.d.ts +9 -3
  95. package/dist/components/setup.d.ts.map +1 -1
  96. package/dist/components/setup.js +10 -4
  97. package/dist/components/setup.js.map +1 -1
  98. package/dist/console.css +677 -7
  99. package/dist/console.d.ts +5 -0
  100. package/dist/console.d.ts.map +1 -1
  101. package/dist/console.js +14 -8
  102. package/dist/console.js.map +1 -1
  103. package/dist/data.d.ts.map +1 -1
  104. package/dist/data.js +32 -33
  105. package/dist/data.js.map +1 -1
  106. package/dist/desk-page.d.ts +38 -0
  107. package/dist/desk-page.d.ts.map +1 -0
  108. package/dist/desk-page.js +184 -0
  109. package/dist/desk-page.js.map +1 -0
  110. package/dist/desk-records-page.d.ts +18 -0
  111. package/dist/desk-records-page.d.ts.map +1 -0
  112. package/dist/desk-records-page.js +130 -0
  113. package/dist/desk-records-page.js.map +1 -0
  114. package/dist/desk-records.d.ts +247 -0
  115. package/dist/desk-records.d.ts.map +1 -0
  116. package/dist/desk-records.js +543 -0
  117. package/dist/desk-records.js.map +1 -0
  118. package/dist/desk.d.ts +122 -0
  119. package/dist/desk.d.ts.map +1 -0
  120. package/dist/desk.js +211 -0
  121. package/dist/desk.js.map +1 -0
  122. package/dist/feed-stream.d.ts +39 -0
  123. package/dist/feed-stream.d.ts.map +1 -0
  124. package/dist/feed-stream.js +117 -0
  125. package/dist/feed-stream.js.map +1 -0
  126. package/dist/home-tiles.d.ts +10 -3
  127. package/dist/home-tiles.d.ts.map +1 -1
  128. package/dist/home-tiles.js +54 -31
  129. package/dist/home-tiles.js.map +1 -1
  130. package/dist/i18n/en.d.ts +180 -5
  131. package/dist/i18n/en.d.ts.map +1 -1
  132. package/dist/i18n/en.js +184 -7
  133. package/dist/i18n/en.js.map +1 -1
  134. package/dist/i18n/ko.d.ts.map +1 -1
  135. package/dist/i18n/ko.js +169 -6
  136. package/dist/i18n/ko.js.map +1 -1
  137. package/dist/index.d.ts +8 -0
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +8 -0
  140. package/dist/index.js.map +1 -1
  141. package/dist/limits.d.ts +11 -0
  142. package/dist/limits.d.ts.map +1 -1
  143. package/dist/limits.js +11 -0
  144. package/dist/limits.js.map +1 -1
  145. package/dist/onboarding.d.ts +6 -0
  146. package/dist/onboarding.d.ts.map +1 -1
  147. package/dist/onboarding.js +3 -3
  148. package/dist/onboarding.js.map +1 -1
  149. package/dist/plugin/context.d.ts +42 -11
  150. package/dist/plugin/context.d.ts.map +1 -1
  151. package/dist/plugin/limits.d.ts +2 -0
  152. package/dist/plugin/limits.d.ts.map +1 -1
  153. package/dist/plugin/limits.js +2 -0
  154. package/dist/plugin/limits.js.map +1 -1
  155. package/dist/plugin/manifest.d.ts +13 -0
  156. package/dist/plugin/manifest.d.ts.map +1 -1
  157. package/dist/plugin/manifest.js +30 -3
  158. package/dist/plugin/manifest.js.map +1 -1
  159. package/dist/plugin/rest-schemas.d.ts +55 -0
  160. package/dist/plugin/rest-schemas.d.ts.map +1 -1
  161. package/dist/plugin/rest-schemas.js +37 -0
  162. package/dist/plugin/rest-schemas.js.map +1 -1
  163. package/dist/plugin/sandbox.d.ts.map +1 -1
  164. package/dist/plugin/sandbox.js +4 -1
  165. package/dist/plugin/sandbox.js.map +1 -1
  166. package/dist/plugin/testing.d.ts +6 -2
  167. package/dist/plugin/testing.d.ts.map +1 -1
  168. package/dist/plugin/testing.js +52 -10
  169. package/dist/plugin/testing.js.map +1 -1
  170. package/dist/plugin.d.ts +1 -1
  171. package/dist/plugin.d.ts.map +1 -1
  172. package/dist/plugin.js +1 -1
  173. package/dist/plugin.js.map +1 -1
  174. package/dist/records.d.ts +283 -0
  175. package/dist/records.d.ts.map +1 -0
  176. package/dist/records.js +543 -0
  177. package/dist/records.js.map +1 -0
  178. package/dist/routes.d.ts +3 -1
  179. package/dist/routes.d.ts.map +1 -1
  180. package/dist/routes.js +3 -1
  181. package/dist/routes.js.map +1 -1
  182. package/dist/rules.d.ts +30 -11
  183. package/dist/rules.d.ts.map +1 -1
  184. package/dist/rules.js +98 -45
  185. package/dist/rules.js.map +1 -1
  186. package/dist/runner/acp.d.ts +1 -1
  187. package/dist/runner/acp.d.ts.map +1 -1
  188. package/dist/runner/acp.js +31 -20
  189. package/dist/runner/acp.js.map +1 -1
  190. package/dist/runner/claude.d.ts +1 -1
  191. package/dist/runner/claude.d.ts.map +1 -1
  192. package/dist/runner/claude.js +85 -15
  193. package/dist/runner/claude.js.map +1 -1
  194. package/dist/runner/codex.d.ts +1 -1
  195. package/dist/runner/codex.d.ts.map +1 -1
  196. package/dist/runner/codex.js +19 -16
  197. package/dist/runner/codex.js.map +1 -1
  198. package/dist/runner/desk.d.ts +43 -2
  199. package/dist/runner/desk.d.ts.map +1 -1
  200. package/dist/runner/desk.js +166 -10
  201. package/dist/runner/desk.js.map +1 -1
  202. package/dist/runner/process.d.ts.map +1 -1
  203. package/dist/runner/process.js +11 -4
  204. package/dist/runner/process.js.map +1 -1
  205. package/dist/runner/redact.d.ts +39 -4
  206. package/dist/runner/redact.d.ts.map +1 -1
  207. package/dist/runner/redact.js +81 -5
  208. package/dist/runner/redact.js.map +1 -1
  209. package/dist/runner/runner.d.ts +15 -1
  210. package/dist/runner/runner.d.ts.map +1 -1
  211. package/dist/runner/runner.js +231 -33
  212. package/dist/runner/runner.js.map +1 -1
  213. package/dist/runner/task-scheduler.d.ts +20 -0
  214. package/dist/runner/task-scheduler.d.ts.map +1 -1
  215. package/dist/runner/task-scheduler.js +34 -4
  216. package/dist/runner/task-scheduler.js.map +1 -1
  217. package/dist/runner/types.d.ts +36 -1
  218. package/dist/runner/types.d.ts.map +1 -1
  219. package/dist/runner/types.js +17 -0
  220. package/dist/runner/types.js.map +1 -1
  221. package/dist/runner.d.ts +6 -6
  222. package/dist/runner.d.ts.map +1 -1
  223. package/dist/runner.js +5 -5
  224. package/dist/runner.js.map +1 -1
  225. package/dist/schemas.d.ts +509 -5
  226. package/dist/schemas.d.ts.map +1 -1
  227. package/dist/schemas.js +76 -16
  228. package/dist/schemas.js.map +1 -1
  229. package/dist/services.d.ts +22 -5
  230. package/dist/services.d.ts.map +1 -1
  231. package/dist/services.js +35 -15
  232. package/dist/services.js.map +1 -1
  233. package/dist/setup-guide.d.ts +3 -1
  234. package/dist/setup-guide.d.ts.map +1 -1
  235. package/dist/setup-guide.js +7 -4
  236. package/dist/setup-guide.js.map +1 -1
  237. package/dist/vocabulary.d.ts +14 -3
  238. package/dist/vocabulary.d.ts.map +1 -1
  239. package/dist/vocabulary.js +13 -3
  240. package/dist/vocabulary.js.map +1 -1
  241. package/docs/specs/cli.md +64 -38
  242. package/docs/specs/plugins.md +27 -20
  243. package/docs/specs/records.md +113 -0
  244. package/docs/specs/rest.md +20 -13
  245. package/docs/specs/runner.md +23 -17
  246. package/package.json +7 -2
  247. package/skills/building-a-console/SKILL.md +4 -4
  248. package/skills/building-a-plugin/SKILL.md +6 -6
  249. package/skills/deploying-a-console/SKILL.md +4 -4
  250. package/skills/deploying-a-console/references/resources.md +41 -4
  251. package/skills/deploying-a-console/references/running-it-again.md +3 -2
  252. package/skills/keeping-a-desk/SKILL.md +133 -0
  253. package/skills/keeping-a-desk/collections.md +96 -0
  254. package/skills/planning-the-board/SKILL.md +14 -18
  255. package/skills/planning-the-board/references/a-task.md +2 -2
  256. package/skills/planning-the-board/references/project-rules.md +13 -14
  257. package/skills/planning-the-board/references/setting-up.md +15 -13
  258. package/skills/running-an-agent/SKILL.md +10 -9
  259. package/skills/working-the-board/SKILL.md +62 -44
  260. package/skills/working-the-board/references/terms.md +9 -5
  261. package/skills/working-the-board/references/the-pack.md +12 -10
  262. package/skills/working-the-board/references/the-sentence.md +2 -2
  263. package/src/agent-page.tsx +3 -1
  264. package/src/api.ts +77 -2
  265. package/src/charts.ts +250 -0
  266. package/src/cli/cli.ts +1698 -476
  267. package/src/cli/command-words.ts +56 -0
  268. package/src/cli/credentials.ts +181 -20
  269. package/src/cli/directory.ts +28 -10
  270. package/src/cli/format.ts +301 -46
  271. package/src/cli/help.ts +102 -54
  272. package/src/cli/main.ts +72 -2
  273. package/src/cli/pack.ts +333 -372
  274. package/src/cli/plugin-check.ts +275 -34
  275. package/src/cli/plugin-cli.ts +28 -4
  276. package/src/cli/plugin-main.ts +1 -0
  277. package/src/cli/serve.ts +295 -2
  278. package/src/client.ts +192 -177
  279. package/src/components/agent-page.tsx +489 -243
  280. package/src/components/charts.tsx +680 -0
  281. package/src/components/desk-records.tsx +724 -0
  282. package/src/components/desk.tsx +471 -0
  283. package/src/components/event-feed.tsx +5 -1
  284. package/src/components/home.tsx +12 -0
  285. package/src/components/plugin-settings.tsx +171 -12
  286. package/src/components/projects.tsx +29 -12
  287. package/src/components/rules.tsx +94 -34
  288. package/src/components/setup.tsx +18 -3
  289. package/src/console.tsx +17 -9
  290. package/src/data.ts +37 -34
  291. package/src/desk-page.tsx +332 -0
  292. package/src/desk-records-page.tsx +256 -0
  293. package/src/desk-records.ts +808 -0
  294. package/src/desk.ts +329 -0
  295. package/src/feed-stream.ts +144 -0
  296. package/src/home-tiles.ts +55 -35
  297. package/src/i18n/en.ts +196 -9
  298. package/src/i18n/ko.ts +178 -8
  299. package/src/index.ts +118 -0
  300. package/src/limits.ts +11 -0
  301. package/src/onboarding.ts +12 -4
  302. package/src/plugin/context.ts +55 -12
  303. package/src/plugin/limits.ts +2 -0
  304. package/src/plugin/manifest.ts +38 -2
  305. package/src/plugin/rest-schemas.ts +41 -0
  306. package/src/plugin/sandbox.ts +4 -1
  307. package/src/plugin/testing.ts +63 -12
  308. package/src/plugin.ts +2 -0
  309. package/src/records.ts +702 -0
  310. package/src/routes.ts +3 -1
  311. package/src/rules.ts +108 -47
  312. package/src/runner/acp.ts +47 -29
  313. package/src/runner/claude.ts +113 -23
  314. package/src/runner/codex.ts +35 -25
  315. package/src/runner/desk.ts +198 -12
  316. package/src/runner/process.ts +11 -4
  317. package/src/runner/redact.ts +92 -6
  318. package/src/runner/runner.ts +275 -34
  319. package/src/runner/task-scheduler.ts +36 -4
  320. package/src/runner/types.ts +47 -1
  321. package/src/runner.ts +27 -2
  322. package/src/schemas.ts +83 -15
  323. package/src/services.ts +49 -14
  324. package/src/setup-guide.ts +6 -2
  325. package/src/styles/README.md +11 -1
  326. package/src/styles/console.css +9 -0
  327. package/src/styles/pages/desk.css +126 -0
  328. package/src/styles/pages/documents.css +5 -0
  329. package/src/styles/parts/bars.css +80 -0
  330. package/src/styles/parts/chart.css +173 -0
  331. package/src/styles/parts/figures.css +65 -0
  332. package/src/styles/parts/legend.css +48 -0
  333. package/src/styles/parts/series.css +32 -0
  334. package/src/styles/parts/share.css +25 -0
  335. package/src/styles/parts/spark.css +23 -0
  336. package/src/styles/parts/stat.css +69 -0
  337. package/src/styles/tokens.css +13 -7
  338. package/src/vocabulary.ts +16 -3
  339. package/template/desk-web/README.md +8 -0
  340. package/template/desk-web/index.html +13 -0
  341. package/template/desk-web/package.json +25 -0
  342. package/template/desk-web/src/main.tsx +24 -0
  343. package/template/desk-web/src/page.tsx +51 -0
  344. package/template/desk-web/tsconfig.json +16 -0
  345. package/template/desk-web/vite.config.ts +15 -0
package/src/runner.ts CHANGED
@@ -12,10 +12,15 @@ export {
12
12
  runnerConfigSchema,
13
13
  } from "./runner/config.js";
14
14
  export {
15
+ DESK_FOLDER,
15
16
  DESK_SECTIONS,
16
17
  type DeskInput,
17
18
  deskFiles,
18
19
  deskServicesOf,
20
+ deskWebTitleOf,
21
+ PERSON_DESK_SECTIONS,
22
+ type PersonDeskInput,
23
+ personDeskFiles,
19
24
  } from "./runner/desk.js";
20
25
  export { LAUNCHD_LABEL, launchd, launchdUnit } from "./runner/launchd.js";
21
26
  export {
@@ -33,7 +38,15 @@ export {
33
38
  } from "./runner/message.js";
34
39
  export { ownRunnerModules } from "./runner/modules.js";
35
40
  export { createSpawn } from "./runner/process.js";
36
- export { formsOf, redactorOf, WITHHELD } from "./runner/redact.js";
41
+ export {
42
+ cutShown,
43
+ cutShownEnd,
44
+ formsOf,
45
+ MAX_CUT_WINDOW,
46
+ type Redactor,
47
+ redactorOf,
48
+ WITHHELD,
49
+ } from "./runner/redact.js";
37
50
  export {
38
51
  createRegistry,
39
52
  createRunnerModules,
@@ -47,7 +60,9 @@ export {
47
60
  COOL_DOWN_MS,
48
61
  createRunner,
49
62
  HEARTBEAT_MS,
63
+ HOLD_MS,
50
64
  MAX_COOL_DOWN_MS,
65
+ MAX_HOLD_MS,
51
66
  type Runner,
52
67
  type RunnerClient,
53
68
  type RunnerOptions,
@@ -56,6 +71,9 @@ export {
56
71
  export { SLACK_APP_TOKEN, slack, slackWakeOf } from "./runner/slack.js";
57
72
  export { SYSTEMD_UNIT, systemdUnit, systemdUser } from "./runner/systemd-user.js";
58
73
  export {
74
+ KEPT_LOGS,
75
+ logKeeper,
76
+ MAX_LOG_BYTES,
59
77
  TASK_NAME,
60
78
  taskDefinition,
61
79
  taskNameOf,
@@ -65,6 +83,7 @@ export {
65
83
  export type {
66
84
  Boundary,
67
85
  Child,
86
+ Cut,
68
87
  Driver,
69
88
  DriverEvent,
70
89
  DriverMessage,
@@ -82,4 +101,10 @@ export type {
82
101
  WakeSocket,
83
102
  WakeSource,
84
103
  } from "./runner/types.js";
85
- export { KEEPER_VARIABLE } from "./runner/types.js";
104
+ export {
105
+ errorsShown,
106
+ KEEPER_VARIABLE,
107
+ MAX_ERRORS_SHOWN,
108
+ plainCut,
109
+ plainCutEnd,
110
+ } from "./runner/types.js";
package/src/schemas.ts CHANGED
@@ -80,6 +80,7 @@ import {
80
80
  COLOR_NAMES,
81
81
  CONSOLE_LANGUAGES,
82
82
  EVENT_KINDS,
83
+ FIRST_SIGN_INS,
83
84
  GOAL_STATES,
84
85
  LINK_SOURCES,
85
86
  MEMBERSHIP_SOURCES,
@@ -653,7 +654,9 @@ export type RestWorkspacePatch = z.infer<typeof restWorkspacePatchSchema>;
653
654
  /**
654
655
  * `GET /api/v1/me`: the workspace, who the session cookie says is signed in (or `null`), the
655
656
  * language they chose (or `null`), and the identity providers people sign in through, none
656
- * where nobody can.
657
+ * where nobody can. Nobody signed in is told the workspace's name and its language alone: the
658
+ * most days of a token is `null` then, the skills' source is empty and their address `null`,
659
+ * and everything read as optional is left out.
657
660
  */
658
661
  export const restMeSchema = z.object({
659
662
  workspace: restWorkspaceSchema,
@@ -827,7 +830,7 @@ export const restRunnerHeartbeatInputSchema = z.object({
827
830
  /** How the runner says its agent stands; `unheard` is the console's word, never the runner's. */
828
831
  state: z.enum(["running", "stopped", "refused", "failed"]),
829
832
  reason: z.enum(AGENT_STATE_REASONS),
830
- /** The number of the last signal handed to the product; `0` for none. */
833
+ /** The number of the last signal delivered, every one before it too: the product took it, or the record says what became of it; `0` for none. */
831
834
  delivered: z.int().check(z.gte(0)),
832
835
  /** The open session, or `null`. */
833
836
  session: z.nullable(uuid),
@@ -844,7 +847,7 @@ export type RestRunnerHeartbeatInput = z.infer<typeof restRunnerHeartbeatInputSc
844
847
  /** What the heartbeat is answered: where the account's record of signals stands, what its supervisors chose, and how the console has the agent. */
845
848
  export const restRunnerHeartbeatSchema = z.object({
846
849
  latest: z.int().check(z.gte(0)),
847
- /** The number of the last signal the console has as handed to the product: where a runner that lost its own count goes on from. */
850
+ /** The number of the last signal the console has as delivered: where a runner that lost its own count goes on from. */
848
851
  delivered: z.int().check(z.gte(0)),
849
852
  settings: restAgentChoiceSchema,
850
853
  state: z.enum(AGENT_STATES),
@@ -1370,6 +1373,14 @@ export const restAgentSchema = z.object({
1370
1373
  onboarding: z.optional(
1371
1374
  z.nullable(z.object({ project: z.string(), number: z.number().check(z.int()) })),
1372
1375
  ),
1376
+ /**
1377
+ * What its first sign-in is held to (ADR-0126), while nobody has signed in with it under a
1378
+ * sign-in at a git host: `account` where the host said which account its login is, so that
1379
+ * only that account is let in; `member` and `login` where the host did not, which the pages
1380
+ * and the command say as not confirmed. Left out once it has signed in, and under a provider
1381
+ * that makes its own addresses. Answered from 0.5.1 and read as optional.
1382
+ */
1383
+ firstSignIn: z.optional(z.enum(FIRST_SIGN_INS)),
1373
1384
  });
1374
1385
  export type RestAgent = z.infer<typeof restAgentSchema>;
1375
1386
 
@@ -1962,6 +1973,18 @@ export type RestPersonWork = z.infer<typeof restPersonWorkSchema>;
1962
1973
  export const restTaskBriefSchema = z.omit(restTaskSchema, { body: true });
1963
1974
  export type RestTaskBrief = z.infer<typeof restTaskBriefSchema>;
1964
1975
 
1976
+ /**
1977
+ * `GET /api/v1/projects/<key>/tasks?brief=true`: a page of the board as `.../tasks` answers it,
1978
+ * the tasks without their bodies, for whatever lists tasks and shows no body: a listing of
1979
+ * the command, a desk's pages. A console from before the brief form answers the tasks whole,
1980
+ * which reads the same.
1981
+ */
1982
+ export const restTaskBriefsSchema = z.object({
1983
+ items: z.array(restTaskBriefSchema),
1984
+ more: z.boolean(),
1985
+ });
1986
+ export type RestTaskBriefs = z.infer<typeof restTaskBriefsSchema>;
1987
+
1965
1988
  /** A decision as the plate's page asks for it: everything but its body. */
1966
1989
  export const restDecisionBriefSchema = z.omit(restDecisionSchema, { body: true });
1967
1990
  export type RestDecisionBrief = z.infer<typeof restDecisionBriefSchema>;
@@ -2121,6 +2144,8 @@ export const restEventDataSchema = z.object({
2121
2144
  capabilities: z.optional(z.array(z.string())),
2122
2145
  /** For `plugin.configured` of a secret: `administrator`, or the host of the answer it was sealed from (ADR-0070). */
2123
2146
  source: z.optional(z.string()),
2147
+ /** For `plugin.configured` of a keyed secret: the key its value was set, removed or moved under (ADR-0111). */
2148
+ under: z.optional(z.string()),
2124
2149
  /** For `plugin.granted` and `plugin.revoked`: the plugin the role went to, by key, where one did (ADR-0072). */
2125
2150
  grantee: z.optional(z.string()),
2126
2151
  /** For `plugin.granted` and `plugin.revoked`: whether the role went to everyone. */
@@ -2211,6 +2236,32 @@ export type RestRun = z.infer<typeof restRunSchema>;
2211
2236
  export const restRunsSchema = z.object({ items: z.array(restRunSchema), more: z.boolean() });
2212
2237
  export type RestRuns = z.infer<typeof restRunsSchema>;
2213
2238
 
2239
+ /**
2240
+ * A run as a listing asks for it: everything but its reports, of which it says how many. The
2241
+ * reports are what a run says as it goes, and weigh more than the rest of a listing together.
2242
+ * A console from before the brief form (0.5.0) ignores the word and answers the run whole, so
2243
+ * what is read is either: the count where the console counted, the reports where it sent them.
2244
+ */
2245
+ export const restRunBriefSchema = z.extend(z.omit(restRunSchema, { reports: true }), {
2246
+ /** How many reports the run has, as the brief form says it. */
2247
+ reportCount: z.optional(count),
2248
+ /** The reports themselves, from a console from before the brief form; a console that knows it leaves them out. */
2249
+ reports: z.optional(z.array(restReportSchema)),
2250
+ });
2251
+ export type RestRunBrief = z.infer<typeof restRunBriefSchema>;
2252
+
2253
+ /** How many reports a run has, as a listing says it: as the console counted them, else as many as it sent. */
2254
+ export function reportCountOf(run: RestRunBrief): number {
2255
+ return run.reportCount ?? run.reports?.length ?? 0;
2256
+ }
2257
+
2258
+ /** `GET /api/v1/projects/<key>/runs?brief=true`: a page of the runs as `.../runs` answers it, without their reports. */
2259
+ export const restRunBriefsSchema = z.object({
2260
+ items: z.array(restRunBriefSchema),
2261
+ more: z.boolean(),
2262
+ });
2263
+ export type RestRunBriefs = z.infer<typeof restRunBriefsSchema>;
2264
+
2214
2265
  /** A file put in a comment, kept as a run's file is; its bytes are at `projectPath(key, "files", <id>)`. */
2215
2266
  export const restCommentFileSchema = z.object({
2216
2267
  id: uuid,
@@ -2344,14 +2395,18 @@ export type RestConnectInput = z.infer<typeof restConnectInputSchema>;
2344
2395
  /**
2345
2396
  * What `POST /api/v1/connect` answers (ADR-0011): the code a person approves, the address of the
2346
2397
  * console's own page for it, and the secret the command claims the token with, shown nowhere.
2398
+ * Bounded, each no wider than the command's credentials file reads back (`cli/credentials.ts`),
2399
+ * since the route answers nobody and the command keeps the answer while it waits (ADR-0129):
2400
+ * a console answers a code of nine characters and a wait of a few seconds.
2347
2401
  */
2348
2402
  export const restConnectionSchema = z.object({
2349
- code: z.string(),
2350
- url: z.string(),
2351
- secret: z.string(),
2352
- expiresAt: instant,
2353
- /** How many seconds the command waits between claims. */
2354
- interval: z.int().check(z.positive()),
2403
+ code: z.string().check(z.minLength(1), z.maxLength(64)),
2404
+ url: z.string().check(z.minLength(1), z.maxLength(MAX_URL_LENGTH)),
2405
+ /** As long as the claim takes one. */
2406
+ secret: z.string().check(z.minLength(1), z.maxLength(MAX_SECRET_LENGTH)),
2407
+ expiresAt: z.iso.datetime().check(z.maxLength(40)),
2408
+ /** How many seconds the command waits between claims: ten minutes at most. */
2409
+ interval: z.int().check(z.positive(), z.lte(600)),
2355
2410
  });
2356
2411
  export type RestConnection = z.infer<typeof restConnectionSchema>;
2357
2412
 
@@ -2669,16 +2724,25 @@ export const restRulesPluginSchema = z.object({
2669
2724
  export type RestRulesPlugin = z.infer<typeof restRulesPluginSchema>;
2670
2725
 
2671
2726
  /**
2672
- * `GET /api/v1/rules`, and each half of a project's (ADR-0023): the rules that hold, and where
2673
- * they come from. `reference`: the console's own, since the organization wrote none;
2674
- * `written`: the page written, with its facts; `none`: a project that adds none.
2727
+ * `GET /api/v1/rules`, and each half of a project's (ADR-0023, ADR-0120): the rules that hold,
2728
+ * and what stands beside the console's. At the workspace, `reference`: the console's rules
2729
+ * alone, since the organization adds nothing; `written`: something is added, on its page. In
2730
+ * a project's own half, `written`: the page the project wrote; `none`: it adds none.
2675
2731
  */
2676
2732
  export const restRulesSchema = z.object({
2677
2733
  source: z.enum(RULES_SOURCES),
2678
- /** The rules as they hold, Markdown; `null` for a project that adds none. */
2734
+ /**
2735
+ * The rules as they hold, Markdown. At the workspace, whole: the console's, then what the
2736
+ * organization adds under a heading of its own, which is what a command of before prints.
2737
+ * `null` for a project that adds none.
2738
+ */
2679
2739
  body: z.nullable(z.string()),
2680
- /** The page they are written on, or `null` for the console's own and for none. */
2740
+ /** The page what is added is written on, or `null` where nothing is added. */
2681
2741
  page: z.nullable(restDocumentSummarySchema),
2742
+ /** At the workspace, from 0.5.1: the console's rules by themselves, as they always hold. */
2743
+ own: z.optional(z.string()),
2744
+ /** At the workspace, from 0.5.1: what the organization adds, with its page; `null` where it adds nothing. */
2745
+ added: z.optional(z.nullable(z.object({ body: z.string(), page: restDocumentSummarySchema }))),
2682
2746
  /** At the workspace: every plugin the asker may use, by key; left out in the halves of a project's answer. */
2683
2747
  plugins: z.optional(z.array(restRulesPluginSchema)),
2684
2748
  });
@@ -2693,7 +2757,11 @@ export const restProjectRulesSchema = z.object({
2693
2757
  });
2694
2758
  export type RestProjectRules = z.infer<typeof restProjectRulesSchema>;
2695
2759
 
2696
- /** What `PUT /api/v1/rules` is sent: the rules as they are to be. */
2760
+ /**
2761
+ * What `PUT /api/v1/rules` is sent: what the organization adds, as it is to be. A body that
2762
+ * carries the console's rules whole, as a client of before read them, is taken for what stands
2763
+ * before and after them.
2764
+ */
2697
2765
  export const restRulesInputSchema = z.object({
2698
2766
  body: paragraphs(MAX_RULES_LENGTH),
2699
2767
  /** The version the writer started from; the write is refused when the rules have moved on. */
package/src/services.ts CHANGED
@@ -32,6 +32,12 @@ export interface ServiceContext {
32
32
  readonly names: ServiceNames;
33
33
  /** What the agent's account is called at the service, where a name is put together for it. */
34
34
  readonly account: string | undefined;
35
+ /**
36
+ * The agent's own address: the one it signs in to the console with, where it signs in with an
37
+ * address. Nothing where it signs in with a login that is none: an address is then asked for,
38
+ * and never made up from the names.
39
+ */
40
+ readonly address?: string | undefined;
35
41
  }
36
42
 
37
43
  /** What one kind of service says of itself. */
@@ -80,18 +86,22 @@ export function fillTemplate(template: string, names: ServiceNames): string | un
80
86
  const called = (account: string | undefined, otherwise: string): string =>
81
87
  account === undefined ? otherwise : `\`${account}\``;
82
88
 
89
+ /** What a desk's item says last: the organization's pack may hold the skill for setting a desk up. */
90
+ const DESK_BY_THE_PACK =
91
+ 'Where the organization\'s pack has a skill for setting a desk up, go by it: console skills --search "desk setup" --limit 5.';
92
+
83
93
  /** What a service the account signs in to the console through says last: the sign-in is needed once, at the setup. */
84
94
  const SIGN_IN_AT_HAND =
85
95
  "What it signs in with, its password and its second step, at hand when its machine is set up: the setup signs in with it once, in the machine's browser.";
86
96
 
87
97
  /**
88
98
  * What a git host the account signs in to the console through says of its login: a login there
89
- * goes to whoever registers it, and until the account's first sign-in the console lets in
90
- * whoever holds the one it was added with. A Workspace makes its own addresses, and says no such
91
- * thing.
99
+ * goes to whoever registers it, and the console asks the host which account the login is when
100
+ * the agent account is added (ADR-0126), so the account is the organization's by then. A
101
+ * Workspace makes its own addresses, and says no such thing.
92
102
  */
93
103
  export const HELD_BEFORE_ADDED =
94
- "It has to be the organization's own there already, from before the agent account was added here: until its first sign-in, the console lets in whoever holds that login. Where nobody holds it yet, register it before anything else.";
104
+ "It has to be the organization's own there already, from before the agent account was added here: that is when the console asks the host which account the login is, and a login nobody holds is whoever registers it first. Where nobody holds it yet, register it before anything else.";
95
105
 
96
106
  const github: ServiceProvider = {
97
107
  kind: "github",
@@ -120,7 +130,7 @@ const github: ServiceProvider = {
120
130
  },
121
131
  {
122
132
  title: "Make your desk there and push it",
123
- body: `Make the repository \`${account ?? "<your account>"}/desk\`, private, and push the desk to it.`,
133
+ body: `Make the repository \`${account ?? "<your account>"}/desk\`, private, and push the desk to it. ${DESK_BY_THE_PACK}`,
124
134
  },
125
135
  ],
126
136
  asks: ({ service, account }) => [
@@ -176,7 +186,7 @@ const gitlab: ServiceProvider = {
176
186
  },
177
187
  {
178
188
  title: "Make your desk there and push it",
179
- body: `Your desk is ${service.group === undefined ? "a project of the group, which whoever made your account names" : `the project \`${service.group}/${names.agent}-desk\``}, private: push the desk to it. Where your role in the group does not let you make the project, ask whoever made your account to.`,
189
+ body: `Your desk is ${service.group === undefined ? "a project of the group, which whoever made your account names" : `the project \`${service.group}/${names.agent}-desk\``}, private: push the desk to it. Where your role in the group does not let you make the project, ask whoever made your account to. ${DESK_BY_THE_PACK}`,
180
190
  },
181
191
  ];
182
192
  }
@@ -187,7 +197,7 @@ const gitlab: ServiceProvider = {
187
197
  },
188
198
  {
189
199
  title: "Make your desk there and push it",
190
- body: `Make the project \`${account ?? "<your account>"}/desk\`, private, and push the desk to it.`,
200
+ body: `Make the project \`${account ?? "<your account>"}/desk\`, private, and push the desk to it. ${DESK_BY_THE_PACK}`,
191
201
  },
192
202
  ];
193
203
  },
@@ -239,6 +249,10 @@ const googleWorkspace: ServiceProvider = {
239
249
  deskRemote: () => undefined,
240
250
  };
241
251
 
252
+ /** The Slack workspace an entry names, as a line says it. */
253
+ const slackPlace = (service: RestWorkspaceService): string =>
254
+ service.workspace === undefined ? "the Slack workspace" : `\`${service.workspace}\``;
255
+
242
256
  const slack: ServiceProvider = {
243
257
  kind: "slack",
244
258
  name: "Slack",
@@ -246,23 +260,26 @@ const slack: ServiceProvider = {
246
260
  account: undefined,
247
261
  signsInThrough: undefined,
248
262
  wakeSource: "slack",
249
- guide: ({ service }) => [
250
- `An invitation for the agent's own address to ${service.workspace === undefined ? "the Slack workspace" : `\`${service.workspace}\``}, as a member: it is a member there as a person is, called by its name.`,
263
+ guide: ({ service, address }) => [
264
+ `An invitation to ${slackPlace(service)} as a member, sent to ${address === undefined ? "an address the agent reads" : `\`${address}\`, the address the agent signs in with`}: it is a member there as a person is, called by its name.`,
251
265
  ],
252
- onboarding: ({ service }) => [
266
+ onboarding: ({ service, address }) => [
253
267
  {
254
268
  title: "Join the messenger and say who you are",
255
- body: `Accept the invitation to ${service.workspace === undefined ? "the Slack workspace" : `\`${service.workspace}\``} with your own address, set your name, your title and your picture (console agent <handle> --avatar <file> writes the file), and say in your profile that you are an agent.`,
269
+ body: `Accept the invitation to ${slackPlace(service)} ${address === undefined ? "where one has reached you" : `that came to \`${address}\`, the address you sign in with`}, set your name, your title and your picture (console agent <handle> --avatar <file> writes the file), and say in your profile that you are an agent.`,
256
270
  },
257
271
  {
258
272
  title: "Connect the messenger to your product, and be woken by it",
259
273
  body: "Add the messenger's own MCP server to your product, and make the app that wakes you from the manifest your skill carries; keep its tokens in your store.",
260
274
  },
261
275
  ],
262
- asks: ({ service, names }) => [
276
+ asks: ({ service, names, address }) => [
263
277
  {
264
278
  title: `An invitation for ${names.agent} to the messenger`,
265
- body: `Where none has reached your address: an invitation to ${service.workspace === undefined ? "the Slack workspace" : `\`${service.workspace}\``} as a member, and the approval of the app you ask to install for yourself.`,
279
+ body:
280
+ address === undefined
281
+ ? `Where you hold none: ask which address an invitation to ${slackPlace(service)} is to be sent to, and name none yourself, since an address put together from your names is nobody's. Then an invitation there as a member, and the approval of the app you ask to install for yourself.`
282
+ : `Where none has come to \`${address}\`, the address you sign in with: an invitation to ${slackPlace(service)} as a member, sent there, and the approval of the app you ask to install for yourself.`,
266
283
  },
267
284
  ],
268
285
  deskRemote: () => undefined,
@@ -329,6 +346,8 @@ export function describeService(
329
346
  role: ServiceRole,
330
347
  service: RestWorkspaceService,
331
348
  names: ServiceNames,
349
+ /** The agent's own address, where it signs in to the console with one. */
350
+ address?: string,
332
351
  ): {
333
352
  readonly provider: ServiceProvider;
334
353
  readonly account: string | undefined;
@@ -338,7 +357,7 @@ export function describeService(
338
357
  } {
339
358
  const provider = serviceProviderOf(service.kind ?? "");
340
359
  const account = serviceAccountOf(service, names);
341
- const context: ServiceContext = { role, service, names, account };
360
+ const context: ServiceContext = { role, service, names, account, address };
342
361
  return {
343
362
  provider,
344
363
  account,
@@ -348,6 +367,22 @@ export function describeService(
348
367
  };
349
368
  }
350
369
 
370
+ /**
371
+ * The agent account's own address (ADR-0094): the login it signs in to the console with, where
372
+ * that is an address, as at a Workspace. A login at a git host is none, and nothing is made of
373
+ * the workspace's names in its place: an invitation sent to an address nobody reads reaches
374
+ * nobody.
375
+ */
376
+ export function agentAddressOf(
377
+ workspace: Pick<RestWorkspace, "handle" | "domain" | "services">,
378
+ agent: string,
379
+ /** The login the account signs in with, where it is known; else what the identity service makes of the names. */
380
+ login?: string,
381
+ ): string | undefined {
382
+ const signsInWith = login ?? agentLoginOf(workspace, agent)?.login;
383
+ return signsInWith?.includes("@") === true ? signsInWith : undefined;
384
+ }
385
+
351
386
  /**
352
387
  * Where an agent account's desk is cloned from, as the module of the workspace's git host says:
353
388
  * nothing where the workspace names no git host, the kind does not say, or the account's name
@@ -1,5 +1,6 @@
1
1
  import type { RestAgentSetup, RestWorkspace } from "./schemas.js";
2
2
  import {
3
+ agentAddressOf,
3
4
  describeService,
4
5
  HELD_BEFORE_ADDED,
5
6
  type ServiceItem,
@@ -103,15 +104,18 @@ function itemsOnce(items: readonly ServiceItem[], more: readonly ServiceItem[]):
103
104
  export function guideServicesOf(
104
105
  workspace: Pick<RestWorkspace, "handle" | "domain" | "services">,
105
106
  handle: string,
107
+ /** The login the account signs in with, where it is known: an address there is its own address. */
108
+ login?: string,
106
109
  ): GuideService[] {
107
110
  const names = serviceNamesOf(workspace, handle);
111
+ const address = agentAddressOf(workspace, handle, login);
108
112
  const services: GuideService[] = [];
109
113
  for (const role of SERVICE_ROLES) {
110
114
  const service = workspace.services?.[role];
111
115
  if (service === undefined) {
112
116
  continue;
113
117
  }
114
- const said = describeService(role, service, names);
118
+ const said = describeService(role, service, names, address);
115
119
  const same = services.find(
116
120
  (other) => other.kind === said.provider.kind && other.account === said.account,
117
121
  );
@@ -149,7 +153,7 @@ export function setupGuideOf(setup: RestAgentSetup, code: string): SetupGuide {
149
153
  account.name === null || account.name.length === 0
150
154
  ? `@${account.handle}`
151
155
  : `@${account.handle} (${[account.name, account.title].filter((part) => part !== null && part.length > 0).join(", ")})`;
152
- const described = guideServicesOf(workspace, account.handle);
156
+ const described = guideServicesOf(workspace, account.handle, account.login);
153
157
  const serviceTitle = (one: GuideService): string =>
154
158
  `${one.name}, ${one.roles.map((role) => ROLE_WORDS[role]).join(" and ")}`;
155
159
 
@@ -83,12 +83,22 @@ A part is a file under `parts/` and a row here, with the classes that are its ow
83
83
  | `crumbs` | `sc-crumb*`, `sc-doc-crumbs*` | | The way down to where the page is, each step a link. |
84
84
  | `links` | `sc-link*` | | Links as a list, or one with what it leads to. |
85
85
  | `filters` | `sc-filters*` | `BoardFilters` | What narrows a page: a row of choices with the count of what is left. |
86
- | `frame` | `sc-plugin-frame*` | `PluginFrame` | Where a plugin's page or widget is shown: the box, and the frame in it. |
86
+ | `frame` | `sc-plugin-frame*` | `PluginFrame` | Where a plugin's page or widget is shown, or a document a page shows in a frame: the box, and the frame in it. |
87
+ | `series` | `sc-series*` | every chart | The colour a series is drawn in: `sc-series-1` to `sc-series-6`, told apart pair by pair, also by a reader who does not tell red from green, and `sc-series-rest`, the neutral, for what is past the sixth or the rest folded into one. The class sets `color`, and a bar, a column, a line, a dot and a legend's key are drawn in it. Marks wear them, never words. |
88
+ | `legend` | `sc-legend*` | `Legend` | The key of a chart: each series' colour beside its name, a box for what is filled and a stroke (`sc-legend-key-line`) for a line, with a figure after the name where the chart is a whole in parts. For two series or more; one series is named by the chart's title. |
89
+ | `stat` | `sc-stat*`, `sc-stats` | `Stat`, `Stats` | A figure: a number under its name and, where there is one, how it changed (`sc-stat-change`, `-good` or `-bad` where the page knows which it is) and the run it came by, a sparkline. `sc-stats` is a row of them. For the few numbers a page leads with; names with words for values are `facts`. |
90
+ | `spark` | `sc-spark*` | `Sparkline` | The run of a figure in the room of a word, with no axis: a quiet line, its last amount a dot in the series' colour. |
91
+ | `bars` | `sc-bars*` | `BarList` | A ranking or a comparison: each row a name and its figure over its bar, the bars all from one edge. Bars of one kind are one colour. |
92
+ | `share` | `sc-share*` | `ShareBar` | One whole in its parts, as one bar, with each part's name, amount and share under it. Six parts are told apart; the rest is folded into one. |
93
+ | `chart` | `sc-chart*` | `Chart` | Amounts over time: columns, or lines, of one to a few series against one scale, with the scale's round amounts at the side and the points' names under it. `sc-chart-short` where it stands among other things. Its figures stand under it as a table, for a reader who cannot see it. |
94
+ | `figures` | `sc-figures*` | `FigureTable` | A table of figures: rows by columns, the names at the start, every number at the end of its column in the figures that line up, what the rows come to at the foot. What a chart shows, to be read exactly. |
87
95
 
88
96
  Some classes are named after the first page that had them (`sc-task-row` is any row, `sc-column-count` any count). Their names stay until a change renames them everywhere at once.
89
97
 
90
98
  A plugin's pages are built from these same parts: what this table lists is what a plugin may name, and a page's class under `pages/` is not.
91
99
 
100
+ The charts (`series` to `figures`, [ADR-0123](../../../../docs/adr/0123-charts-are-parts-placed-by-measures-and-drawn-by-the-stylesheet.md)) are parts like the others, with one thing of their own: a bar's length, a column's height and a line's points are measures, and a measure is an attribute of an SVG, a share of the box the part's class gives it (`width="62%"`), never a style. The components compute them with `src/charts.ts`, which is `@skillcdn/console/charts` to a plugin's bundle and depends on nothing; the colours, the widths of the strokes and the radii stay in the parts' files.
101
+
92
102
  ## Adding to a part, adding a part
93
103
 
94
104
  - **A variant** (another size, another tone) is a class of the part, in its file, named `sc-<part>-<variant>`. Say what it is for in the row.
@@ -62,6 +62,14 @@
62
62
  @import "./parts/mark.css";
63
63
  @import "./parts/progress.css";
64
64
  @import "./parts/toggle.css";
65
+ @import "./parts/series.css";
66
+ @import "./parts/legend.css";
67
+ @import "./parts/stat.css";
68
+ @import "./parts/spark.css";
69
+ @import "./parts/bars.css";
70
+ @import "./parts/share.css";
71
+ @import "./parts/chart.css";
72
+ @import "./parts/figures.css";
65
73
 
66
74
  /* The pages. */
67
75
  @import "./pages/decisions.css";
@@ -80,4 +88,5 @@
80
88
  @import "./pages/task.css";
81
89
  @import "./pages/agents.css";
82
90
  @import "./pages/work.css";
91
+ @import "./pages/desk.css";
83
92
  @import "./pages/plugins.css";
@@ -0,0 +1,126 @@
1
+ /* Sources: components/desk.tsx, desk-page.tsx, components/desk-records.tsx, desk-records-page.tsx */
2
+
3
+ /* The views of a desk stand as the people's and the agents' do. */
4
+ .sc-desk-views {
5
+ margin-bottom: var(--sc-space-5);
6
+ }
7
+
8
+ /* The lists of a desk: two side by side where each still has a reading width, one under the
9
+ other below that, as the lists of a plate are, so that their rows line up. */
10
+ .sc-desk-lists {
11
+ display: grid;
12
+ grid-template-columns: repeat(
13
+ auto-fill,
14
+ minmax(min(100%, max(24rem, calc((100% - var(--sc-space-7)) / 2))), 1fr)
15
+ );
16
+ align-items: start;
17
+ gap: var(--sc-space-6) var(--sc-space-7);
18
+ }
19
+
20
+ /* The figures, one group under the other. */
21
+ .sc-desk-figures {
22
+ display: grid;
23
+ gap: var(--sc-space-6);
24
+ }
25
+
26
+ /* Two panes of figures side by side where the window has the room. */
27
+ .sc-desk-pair {
28
+ display: grid;
29
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
30
+ align-items: start;
31
+ gap: var(--sc-space-5);
32
+ }
33
+
34
+ .sc-desk-pair .sc-panel {
35
+ margin-bottom: 0;
36
+ }
37
+
38
+ /* The archive: the words it is found by over its lists. */
39
+ .sc-desk-archive {
40
+ display: grid;
41
+ gap: var(--sc-space-5);
42
+ }
43
+
44
+ .sc-desk-search {
45
+ display: flex;
46
+ gap: var(--sc-space-2);
47
+ }
48
+
49
+ .sc-desk-search .sc-input {
50
+ flex: 1;
51
+ max-width: 32rem;
52
+ }
53
+
54
+ /* A desk of one's own on the Agents page: its words over the command, under what is above. */
55
+ .sc-desk-command {
56
+ display: grid;
57
+ gap: var(--sc-space-3);
58
+ margin-top: var(--sc-space-5);
59
+ }
60
+
61
+ /* The records: what could not be read over what could, and the way down over both. */
62
+ .sc-desk-records {
63
+ display: grid;
64
+ gap: var(--sc-space-4);
65
+ }
66
+
67
+ /* The items of a collection as cards, as many across as the window has room for. */
68
+ .sc-desk-cards {
69
+ display: grid;
70
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
71
+ align-items: start;
72
+ gap: var(--sc-space-4);
73
+ margin: 0;
74
+ padding: 0;
75
+ list-style: none;
76
+ }
77
+
78
+ .sc-desk-cards .sc-panel {
79
+ margin-bottom: 0;
80
+ }
81
+
82
+ .sc-desk-card {
83
+ display: grid;
84
+ gap: var(--sc-space-2);
85
+ min-width: 0;
86
+ }
87
+
88
+ /* A card's preview: the card's width, one shape whatever the picture's own. */
89
+ .sc-desk-card-picture {
90
+ display: block;
91
+ width: 100%;
92
+ aspect-ratio: 4 / 3;
93
+ object-fit: cover;
94
+ }
95
+
96
+ /* One item: its head over its two columns. */
97
+ .sc-desk-item {
98
+ display: grid;
99
+ gap: var(--sc-space-5);
100
+ }
101
+
102
+ .sc-desk-item-picture {
103
+ display: block;
104
+ max-width: 100%;
105
+ max-height: 28rem;
106
+ object-fit: contain;
107
+ }
108
+
109
+ /* What was written about an item keeps its own lines. */
110
+ .sc-desk-words {
111
+ white-space: pre-wrap;
112
+ overflow-wrap: anywhere;
113
+ }
114
+
115
+ /* A file shown in place takes a line of its own under its name, no taller than a reading. */
116
+ .sc-desk-file-media {
117
+ flex: 1 1 100%;
118
+ width: 100%;
119
+ max-height: 28rem;
120
+ object-fit: contain;
121
+ }
122
+
123
+ .sc-desk-file-frame {
124
+ flex: 1 1 100%;
125
+ height: 32rem;
126
+ }
@@ -248,6 +248,11 @@
248
248
  font-size: var(--sc-text-sm);
249
249
  }
250
250
 
251
+ /* What the organization adds stands off the console's rules above it (ADR-0120). */
252
+ .sc-rules-added {
253
+ margin-top: var(--sc-space-6);
254
+ }
255
+
251
256
  /* The ways to change the rules stand off the text, as a form's actions do. */
252
257
  .sc-rules-actions {
253
258
  display: flex;