@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
@@ -0,0 +1,305 @@
1
+ const PLACE = /\{(workspace|agent|domain)\}/g;
2
+ /**
3
+ * A name put together from a template: `{workspace}`, `{agent}` and `{domain}` filled in.
4
+ * Nothing where the template has a place the workspace has no name for: a name is never made of
5
+ * half of what it is made of.
6
+ */
7
+ export function fillTemplate(template, names) {
8
+ let missing = false;
9
+ const filled = template.replaceAll(PLACE, (_, place) => {
10
+ const value = names[place];
11
+ if (value === null || value.length === 0) {
12
+ missing = true;
13
+ return "";
14
+ }
15
+ return value;
16
+ });
17
+ return missing ? undefined : filled;
18
+ }
19
+ const called = (account, otherwise) => account === undefined ? otherwise : `\`${account}\``;
20
+ /** What a desk's item says last: the organization's pack may hold the skill for setting a desk up. */
21
+ const DESK_BY_THE_PACK = 'Where the organization\'s pack has a skill for setting a desk up, go by it: console skills --search "desk setup" --limit 5.';
22
+ /** What a service the account signs in to the console through says last: the sign-in is needed once, at the setup. */
23
+ const SIGN_IN_AT_HAND = "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.";
24
+ /**
25
+ * What a git host the account signs in to the console through says of its login: a login there
26
+ * goes to whoever registers it, and the console asks the host which account the login is when
27
+ * the agent account is added (ADR-0126), so the account is the organization's by then. A
28
+ * Workspace makes its own addresses, and says no such thing.
29
+ */
30
+ export const HELD_BEFORE_ADDED = "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.";
31
+ const github = {
32
+ kind: "github",
33
+ name: "GitHub",
34
+ roles: ["identity", "git"],
35
+ account: "{workspace}-{agent}",
36
+ signsInThrough: "gh",
37
+ wakeSource: undefined,
38
+ guide: ({ role, service, account }) => [
39
+ `The account ${called(account, "of the agent")} at GitHub, with the agent's own mailbox where it has one.`,
40
+ ...(role === "identity" ? [HELD_BEFORE_ADDED] : []),
41
+ ...(service.organization === undefined
42
+ ? []
43
+ : [
44
+ `Its invitation to the organization \`${service.organization}\`, with the rights its work needs and no more.`,
45
+ ]),
46
+ ...(role === "identity" ? [SIGN_IN_AT_HAND] : []),
47
+ ],
48
+ onboarding: ({ role, service, account }) => role !== "git"
49
+ ? []
50
+ : [
51
+ {
52
+ title: "Sign in at the git host and keep what you sign in with",
53
+ body: `Sign in at GitHub as ${called(account, "your account")}${service.organization === undefined ? "" : `, accept the invitation to \`${service.organization}\``}, make a token for git that reaches the repositories you work in and nothing else, and keep it in your store with the day it ends: console secret git.token --set --expires <day>.`,
54
+ },
55
+ {
56
+ title: "Make your desk there and push it",
57
+ body: `Make the repository \`${account ?? "<your account>"}/desk\`, private, and push the desk to it. ${DESK_BY_THE_PACK}`,
58
+ },
59
+ ],
60
+ asks: ({ service, account }) => [
61
+ {
62
+ title: `The account ${called(account, "of the agent")} at GitHub`,
63
+ body: `Where you cannot sign in at GitHub as ${called(account, "your account")}: that the account is made${service.organization === undefined ? "" : `, invited to \`${service.organization}\``}, and what it signs in with seeded where only you read it.`,
64
+ },
65
+ ],
66
+ deskRemote: ({ role, account }) => role !== "git" || account === undefined ? undefined : `https://github.com/${account}/desk.git`,
67
+ };
68
+ /** Where a GitLab is: the host an entry names, for one an organization runs itself; gitlab.com otherwise. */
69
+ const gitlabHost = (service) => service.host ?? "gitlab.com";
70
+ /**
71
+ * GitLab, as a git host. An account there has one of two forms: a person's, which a person
72
+ * makes and the agent signs in with, as at GitHub; or a service account, the form the host has
73
+ * for a machine, which signs in at no page and holds a token alone, made and seeded by whoever
74
+ * keeps the group. The second has no namespace of its own to keep a desk in: its desk is a
75
+ * project of the group.
76
+ */
77
+ const gitlab = {
78
+ kind: "gitlab",
79
+ name: "GitLab",
80
+ roles: ["git"],
81
+ account: "{workspace}-{agent}",
82
+ signsInThrough: undefined,
83
+ wakeSource: undefined,
84
+ guide: ({ service, names, account }) => service.form === "service"
85
+ ? [
86
+ `An owner of ${service.group === undefined ? "the group" : `the group \`${service.group}\``} at ${gitlabHost(service)} makes a service account for the agent, ${called(account, "under its name")}: the form of account the host has for a machine, which signs in at no page and takes no seat.`,
87
+ `They give it the role its work needs in the group and no more, make it a token that reads and writes repositories and nothing else, and seed the token where only the agent reads it, with the day it ends: console agent secret ${names.agent} git.token --expires <day>.`,
88
+ ]
89
+ : [
90
+ `The account ${called(account, "of the agent")} at ${gitlabHost(service)}, made if it is not there yet, with the agent's own mailbox where it has one.`,
91
+ ...(service.group === undefined
92
+ ? []
93
+ : [
94
+ `Its invitation to the group \`${service.group}\`, with the role its work needs and no more.`,
95
+ ]),
96
+ ],
97
+ onboarding: ({ role, service, names, account }) => {
98
+ if (role !== "git") {
99
+ return [];
100
+ }
101
+ if (service.form === "service") {
102
+ return [
103
+ {
104
+ title: "Find what you hold at the git host",
105
+ body: `Your account at GitLab is a service account${account === undefined ? "" : `, \`${account}\``}: it signs in at no page, and what it holds is the token whoever made it seeded in your store as git.token, with the day it ends. Check that it is there (console secrets), and ask for another a month before that day.`,
106
+ },
107
+ {
108
+ title: "Make your desk there and push it",
109
+ 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}`,
110
+ },
111
+ ];
112
+ }
113
+ return [
114
+ {
115
+ title: "Sign in at the git host and keep what you sign in with",
116
+ body: `Sign in at ${gitlabHost(service)} as ${called(account, "your account")}${service.group === undefined ? "" : `, accept the invitation to \`${service.group}\``}, make a token for git that reads and writes the repositories you work in and nothing else, and keep it in your store with the day it ends: console secret git.token --set --expires <day>.`,
117
+ },
118
+ {
119
+ title: "Make your desk there and push it",
120
+ body: `Make the project \`${account ?? "<your account>"}/desk\`, private, and push the desk to it. ${DESK_BY_THE_PACK}`,
121
+ },
122
+ ];
123
+ },
124
+ asks: ({ service, names, account }) => service.form === "service"
125
+ ? [
126
+ {
127
+ title: `Make a service account for ${names.agent} at GitLab`,
128
+ body: `In the settings of ${service.group === undefined ? "the group" : `the group \`${service.group}\``}, under Service accounts, add one${account === undefined ? "" : ` named \`${account}\``}, give it the role its work needs in the group and no more, and make it a token that reads and writes repositories. Seed the token where only the agent reads it, with the day it ends: console agent secret ${names.agent} git.token --expires <day>.`,
129
+ },
130
+ ]
131
+ : [
132
+ {
133
+ title: `The account ${called(account, "of the agent")} at GitLab`,
134
+ body: `Where you cannot sign in at ${gitlabHost(service)} as ${called(account, "your account")}: that the account is made${service.group === undefined ? "" : `, invited to \`${service.group}\``}, and what it signs in with seeded where only you read it.`,
135
+ },
136
+ ],
137
+ deskRemote: ({ role, service, names, account }) => {
138
+ if (role !== "git") {
139
+ return undefined;
140
+ }
141
+ if (service.form === "service") {
142
+ return service.group === undefined
143
+ ? undefined
144
+ : `https://${gitlabHost(service)}/${service.group}/${names.agent}-desk.git`;
145
+ }
146
+ return account === undefined ? undefined : `https://${gitlabHost(service)}/${account}/desk.git`;
147
+ },
148
+ };
149
+ const googleWorkspace = {
150
+ kind: "google-workspace",
151
+ name: "Google Workspace",
152
+ roles: ["identity"],
153
+ account: "{agent}@{domain}",
154
+ signsInThrough: "google",
155
+ wakeSource: undefined,
156
+ guide: ({ account }) => [
157
+ `The user ${called(account, "of the agent")} in the Workspace, with a mailbox, made if it is not there yet: the agent signs in to the console with it, and it is its address everywhere else.`,
158
+ SIGN_IN_AT_HAND,
159
+ ],
160
+ onboarding: ({ account }) => [
161
+ {
162
+ title: "Make the account your own",
163
+ body: `Sign in as ${called(account, "your account")}, change the first password and keep the new one in your store (console secret mail.password --set), and turn on a second step you can answer yourself.`,
164
+ },
165
+ ],
166
+ asks: () => [],
167
+ deskRemote: () => undefined,
168
+ };
169
+ /** The Slack workspace an entry names, as a line says it. */
170
+ const slackPlace = (service) => service.workspace === undefined ? "the Slack workspace" : `\`${service.workspace}\``;
171
+ const slack = {
172
+ kind: "slack",
173
+ name: "Slack",
174
+ roles: ["messenger"],
175
+ account: undefined,
176
+ signsInThrough: undefined,
177
+ wakeSource: "slack",
178
+ guide: ({ service, address }) => [
179
+ `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.`,
180
+ ],
181
+ onboarding: ({ service, address }) => [
182
+ {
183
+ title: "Join the messenger and say who you are",
184
+ 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.`,
185
+ },
186
+ {
187
+ title: "Connect the messenger to your product, and be woken by it",
188
+ 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.",
189
+ },
190
+ ],
191
+ asks: ({ service, names, address }) => [
192
+ {
193
+ title: `An invitation for ${names.agent} to the messenger`,
194
+ body: address === undefined
195
+ ? `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.`
196
+ : `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.`,
197
+ },
198
+ ],
199
+ deskRemote: () => undefined,
200
+ };
201
+ /** The kinds the package knows. */
202
+ export const SERVICE_PROVIDERS = [
203
+ github,
204
+ gitlab,
205
+ googleWorkspace,
206
+ slack,
207
+ ];
208
+ /** What a kind the package does not know says: the least, in words that fit any service. */
209
+ function generic(kind) {
210
+ return {
211
+ kind,
212
+ name: kind,
213
+ roles: ["identity", "git", "messenger"],
214
+ account: undefined,
215
+ signsInThrough: undefined,
216
+ wakeSource: undefined,
217
+ guide: () => [
218
+ `An account of the agent's own at ${kind}, made if it is not there yet, and what it signs in with at hand when its machine is set up.`,
219
+ ],
220
+ onboarding: () => [
221
+ {
222
+ title: `Sign in at ${kind}`,
223
+ body: `Sign in at ${kind} with your own account and keep what you sign in with in your store.`,
224
+ },
225
+ ],
226
+ asks: () => [],
227
+ deskRemote: () => undefined,
228
+ };
229
+ }
230
+ /** The module of a kind: the package's own, or the generic one for a kind it does not know. */
231
+ export function serviceProviderOf(kind) {
232
+ return SERVICE_PROVIDERS.find((provider) => provider.kind === kind) ?? generic(kind);
233
+ }
234
+ /** The names a workspace gives a name's template, for one agent account. */
235
+ export function serviceNamesOf(workspace, agent) {
236
+ return { workspace: workspace.handle ?? null, agent, domain: workspace.domain ?? null };
237
+ }
238
+ /**
239
+ * What an agent account is called at a service: the entry's own template where it names one,
240
+ * else its kind's; nothing where neither says, or a place has no name yet.
241
+ */
242
+ export function serviceAccountOf(service, names) {
243
+ const template = service.account ?? serviceProviderOf(service.kind ?? "").account;
244
+ return template === undefined ? undefined : fillTemplate(template, names);
245
+ }
246
+ /** A service of the workspace with everything its module says of it for one agent account. */
247
+ export function describeService(role, service, names,
248
+ /** The agent's own address, where it signs in to the console with one. */
249
+ address) {
250
+ const provider = serviceProviderOf(service.kind ?? "");
251
+ const account = serviceAccountOf(service, names);
252
+ const context = { role, service, names, account, address };
253
+ return {
254
+ provider,
255
+ account,
256
+ guide: provider.guide(context),
257
+ onboarding: provider.onboarding(context),
258
+ asks: provider.asks(context),
259
+ };
260
+ }
261
+ /**
262
+ * The agent account's own address (ADR-0094): the login it signs in to the console with, where
263
+ * that is an address, as at a Workspace. A login at a git host is none, and nothing is made of
264
+ * the workspace's names in its place: an invitation sent to an address nobody reads reaches
265
+ * nobody.
266
+ */
267
+ export function agentAddressOf(workspace, agent,
268
+ /** The login the account signs in with, where it is known; else what the identity service makes of the names. */
269
+ login) {
270
+ const signsInWith = login ?? agentLoginOf(workspace, agent)?.login;
271
+ return signsInWith?.includes("@") === true ? signsInWith : undefined;
272
+ }
273
+ /**
274
+ * Where an agent account's desk is cloned from, as the module of the workspace's git host says:
275
+ * nothing where the workspace names no git host, the kind does not say, or the account's name
276
+ * there cannot be put together yet.
277
+ */
278
+ export function deskRemoteOf(workspace, agent) {
279
+ const git = workspace.services?.git;
280
+ if (git === undefined) {
281
+ return undefined;
282
+ }
283
+ const names = serviceNamesOf(workspace, agent);
284
+ return serviceProviderOf(git.kind ?? "").deskRemote({
285
+ role: "git",
286
+ service: git,
287
+ names,
288
+ account: serviceAccountOf(git, names),
289
+ });
290
+ }
291
+ /**
292
+ * The account an agent signs in to the console with, as the workspace's identity service names
293
+ * it: the provider the deployment signs people in through, and the login there. Nothing where
294
+ * the workspace names no identity service, or the name cannot be put together yet.
295
+ */
296
+ export function agentLoginOf(workspace, agent) {
297
+ const identity = workspace.services?.identity;
298
+ if (identity === undefined) {
299
+ return undefined;
300
+ }
301
+ const host = serviceProviderOf(identity.kind ?? "").signsInThrough;
302
+ const login = serviceAccountOf(identity, serviceNamesOf(workspace, agent));
303
+ return host === undefined || login === undefined ? undefined : { host, login };
304
+ }
305
+ //# sourceMappingURL=services.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.js","sourceRoot":"","sources":["../src/services.ts"],"names":[],"mappings":"AAiEA,MAAM,KAAK,GAAG,+BAA+B,CAAC;AAE9C;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,KAAmB;IAChE,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,MAAM,GAAG,QAAQ,CAAC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AC,SAAS,CAAC;AACvE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,SAAgE,EAChE,KAAa;IAEb,MAAM,GAAG,GAAG,SAAS,CAAC,QAAQ,EAAE,GAAG,CAAC;IACpC,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAC/C,OAAO,iBAAiB,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,UAAU,CAAC;QAClD,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,GAAG;QACZ,KAAK;QACL,OAAO,EAAE,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC;KACtC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAC1B,SAAgE,EAChE,KAAa;IAEb,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC9C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,IAAI,GAAG,iBAAiB,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,cAAc,CAAC;IACnE,MAAM,KAAK,GAAG,gBAAgB,CAAC,QAAQ,EAAE,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IAC3E,OAAO,IAAI,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACjF,CAAC"}
@@ -0,0 +1,64 @@
1
+ import type { RestAgentSetup, RestWorkspace } from "./schemas.js";
2
+ import { type ServiceItem } from "./services.js";
3
+ import { type ServiceRole } from "./vocabulary.js";
4
+ /** How the console's command gets onto a machine. */
5
+ export declare const SETUP_INSTALL = "npm i -g @skillcdn/console";
6
+ /** The command that sets a machine up for the account a code is the invitation of. */
7
+ export declare function setupCommandOf(origin: string, code: string): string;
8
+ /**
9
+ * The sentence said to the agent's product on its machine. It carries the command as written,
10
+ * so that the product runs it and reads the guide from the command's own words.
11
+ */
12
+ export declare function setupSentenceOf(command: string): string;
13
+ /** Whose part of a setup something is (ADR-0088): whoever prepares the machine, the agent, its manager. */
14
+ export type SetupRole = "operator" | "agent" | "manager";
15
+ export interface SetupGuideStep {
16
+ /** What the step is about. */
17
+ readonly title: string;
18
+ readonly body: string;
19
+ /** What to run or to say, as written, where the step has such a line. */
20
+ readonly line?: string;
21
+ }
22
+ export interface SetupGuideSection {
23
+ readonly key: "before" | "machine" | "start" | "browser" | "asked";
24
+ readonly who: SetupRole;
25
+ readonly title: string;
26
+ readonly about: string;
27
+ readonly steps: readonly SetupGuideStep[];
28
+ }
29
+ export interface SetupGuide {
30
+ readonly title: string;
31
+ /** What the guide is and what the code is, a paragraph each. */
32
+ readonly about: readonly string[];
33
+ /** When the invitation ends, unless the account's command has signed in before. */
34
+ readonly expiresAt: string;
35
+ readonly sections: readonly SetupGuideSection[];
36
+ }
37
+ /** A service of the workspace as the guide says it: once, whatever roles it has. */
38
+ export interface GuideService {
39
+ readonly kind: string;
40
+ readonly name: string;
41
+ readonly account: string | undefined;
42
+ readonly roles: ServiceRole[];
43
+ guide: readonly string[];
44
+ onboarding: readonly ServiceItem[];
45
+ asks: readonly ServiceItem[];
46
+ }
47
+ /**
48
+ * The services a workspace names, each with what its module says of it for one account. A
49
+ * service that has two roles with one account there, a git host people also sign in through, is
50
+ * said once, with what either role adds. Nothing is asked of a person later at the service the
51
+ * account signs in through: that account comes before the line, since the agent signs in with
52
+ * it, and so does whatever a person does of it there.
53
+ */
54
+ export declare function guideServicesOf(workspace: Pick<RestWorkspace, "handle" | "domain" | "services">, handle: string,
55
+ /** The login the account signs in with, where it is known: an address there is its own address. */
56
+ login?: string): GuideService[];
57
+ /** The guide of one setup: the account it is for, the services of its workspace, and the code that opened it. */
58
+ export declare function setupGuideOf(setup: RestAgentSetup, code: string): SetupGuide;
59
+ /**
60
+ * The guide as the command prints it: Markdown, every line to run on a line of its own. `moment`
61
+ * says the invitation's day as the command says a moment; left out, as the API gives it.
62
+ */
63
+ export declare function setupGuideText(guide: SetupGuide, moment?: (iso: string) => string): string;
64
+ //# sourceMappingURL=setup-guide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-guide.d.ts","sourceRoot":"","sources":["../src/setup-guide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAIL,KAAK,WAAW,EAEjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAmC,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAWpF,qDAAqD;AACrD,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,2GAA2G;AAC3G,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACnE,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,KAAK,E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Of, describeService, HELD_BEFORE_ADDED, serviceNamesOf, } from "./services.js";
2
+ import { SERVICE_ROLES } from "./vocabulary.js";
3
+ // The guide an invitation's code opens (ADR-0088): what setting a machine up for one agent
4
+ // account takes, written for that account and the services of its workspace, in the order it is
5
+ // done and by whom. `console agent setup --code` prints it for the agent, and `/setup/<code>`
6
+ // shows it to a person: one guide, made here from what the code opens, which is nothing secret.
7
+ // It is written in English, as a skill is, for an agent to read as it is. Where the setup needs
8
+ // something the agent does not have, the account it signs in with or what that account signs in
9
+ // with, the guide has the agent ask the person at the machine for it, in words it can say as
10
+ // they are, as the console's other skills have an agent ask (ADR-0094).
11
+ /** How the console's command gets onto a machine. */
12
+ export const SETUP_INSTALL = "npm i -g @skillcdn/console";
13
+ /** The command that sets a machine up for the account a code is the invitation of. */
14
+ export function setupCommandOf(origin, code) {
15
+ return `console agent setup --console ${origin} --code ${code}`;
16
+ }
17
+ /**
18
+ * The sentence said to the agent's product on its machine. It carries the command as written,
19
+ * so that the product runs it and reads the guide from the command's own words.
20
+ */
21
+ export function setupSentenceOf(command) {
22
+ return `Run: ${command} (before it: ${SETUP_INSTALL}), then do what it prints`;
23
+ }
24
+ const SIGNS_IN_AT = { gh: "GitHub", google: "Google" };
25
+ const ROLE_WORDS = {
26
+ identity: "where the account signs in",
27
+ git: "the git host",
28
+ messenger: "the messenger",
29
+ };
30
+ /** Items said once: of two with one title, the fuller stands, since it says what the other does and more. */
31
+ function itemsOnce(items, more) {
32
+ const once = [...items];
33
+ for (const item of more) {
34
+ const at = once.findIndex((other) => other.title === item.title);
35
+ if (at === -1) {
36
+ once.push(item);
37
+ }
38
+ else if (item.body.length > (once[at]?.body.length ?? 0)) {
39
+ once[at] = item;
40
+ }
41
+ }
42
+ return once;
43
+ }
44
+ /**
45
+ * The services a workspace names, each with what its module says of it for one account. A
46
+ * service that has two roles with one account there, a git host people also sign in through, is
47
+ * said once, with what either role adds. Nothing is asked of a person later at the service the
48
+ * account signs in through: that account comes before the line, since the agent signs in with
49
+ * it, and so does whatever a person does of it there.
50
+ */
51
+ export function guideServicesOf(workspace, handle,
52
+ /** The login the account signs in with, where it is known: an address there is its own address. */
53
+ login) {
54
+ const names = serviceNamesOf(workspace, handle);
55
+ const address = agentAddressOf(workspace, handle, login);
56
+ const services = [];
57
+ for (const role of SERVICE_ROLES) {
58
+ const service = workspace.services?.[role];
59
+ if (service === undefined) {
60
+ continue;
61
+ }
62
+ const said = describeService(role, service, names, address);
63
+ const same = services.find((other) => other.kind === said.provider.kind && other.account === said.account);
64
+ if (same === undefined) {
65
+ services.push({
66
+ kind: said.provider.kind,
67
+ name: said.provider.name,
68
+ account: said.account,
69
+ roles: [role],
70
+ guide: said.guide,
71
+ onboarding: said.onboarding,
72
+ asks: said.asks,
73
+ });
74
+ continue;
75
+ }
76
+ same.roles.push(role);
77
+ same.guide = [...same.guide, ...said.guide.filter((line) => !same.guide.includes(line))];
78
+ same.onboarding = itemsOnce(same.onboarding, said.onboarding);
79
+ same.asks = itemsOnce(same.asks, said.asks);
80
+ }
81
+ for (const service of services) {
82
+ if (service.roles.includes("identity")) {
83
+ service.asks = [];
84
+ }
85
+ }
86
+ return services;
87
+ }
88
+ /** The guide of one setup: the account it is for, the services of its workspace, and the code that opened it. */
89
+ export function setupGuideOf(setup, code) {
90
+ const { account, workspace } = setup;
91
+ const provider = SIGNS_IN_AT[account.host];
92
+ const command = setupCommandOf(setup.console.url, code);
93
+ const called = account.name === null || account.name.length === 0
94
+ ? `@${account.handle}`
95
+ : `@${account.handle} (${[account.name, account.title].filter((part) => part !== null && part.length > 0).join(", ")})`;
96
+ const described = guideServicesOf(workspace, account.handle, account.login);
97
+ const serviceTitle = (one) => `${one.name}, ${one.roles.map((role) => ROLE_WORDS[role]).join(" and ")}`;
98
+ const before = [
99
+ ...described
100
+ .filter((one) => one.guide.length > 0)
101
+ .map((one) => ({ title: serviceTitle(one), body: one.guide.join(" ") })),
102
+ ...(workspace.services.identity === undefined
103
+ ? [
104
+ {
105
+ title: `${provider}, where the account signs in`,
106
+ // A git host gives a login to whoever registers it; a Workspace makes its own.
107
+ body: account.host === "gh"
108
+ ? `The account \`${account.login}\` at ${provider}. ${HELD_BEFORE_ADDED} What it signs in with is at hand when the machine is set up: the setup signs in with it once, in the machine's browser.`
109
+ : `The account \`${account.login}\` at ${provider}, made if it is not there yet, and what it signs in with at hand when the machine is set up: the setup signs in with it once, in the machine's browser.`,
110
+ },
111
+ ]
112
+ : []),
113
+ {
114
+ title: "An OS account of its own",
115
+ body: "On the machine, make an OS account for the agent, apart from anyone else's. Whether it holds an administrator's rights is for whoever keeps the machine to say.",
116
+ },
117
+ {
118
+ title: "Its product and the command",
119
+ body: "In that OS account, install the agent's product (Claude Code, Codex or another) and sign it in with the agent's own subscription. Install Node.js 24 or later, and the console's command.",
120
+ line: SETUP_INSTALL,
121
+ },
122
+ {
123
+ title: "The one line",
124
+ body: "Open a session of the product there and say this to it, or run the command it names in a terminal yourself. You act as yourself in the console, and never sign in to it on the agent's machine.",
125
+ line: setupSentenceOf(command),
126
+ },
127
+ ];
128
+ const machine = [
129
+ {
130
+ title: "Ask for the sign-in before you go on",
131
+ body: `If you are the agent, say this to the person at the machine, in these words or your own, and wait for the answer: "I am setting this machine up as @${account.handle}. The console signs me in as \`${account.login}\` through ${provider}. Is that account there? If it is not, make it now, or tell me to where I may. When the browser opens, sign in as that account yourself, or give me what it signs in with, and I type it." Go on once the account is there. Never sign in as anyone else, and never make up a login: the console takes this one and no other. If nobody is at the machine, ask whom you were set up by, and stop here until they answer.`,
132
+ },
133
+ {
134
+ title: "The command asks to be signed in as the account",
135
+ body: `After this guide the command goes on by itself, and waits. It opens an address in the machine's browser and prints it with a code: sign in there through ${provider} as \`${account.login}\`, check that the page shows the same code, and say that it is you. On a machine without a screen, open the address in any browser that is signed in as the account. If the page shows another member, sign out there first: nobody else's sign-in answers for the account, and the command gives up a sign-in that is not the account's. A password typed for the account here is the account's from then on: change it where the provider lets you, and keep the new one in your store once the command is signed in (\`console secret <name> --set\`).`,
136
+ },
137
+ {
138
+ title: "It makes the machine the agent's",
139
+ body: "Signed in, it reads the account and the services, writes the desk in the OS account's home from the template, or clones it where the account pushed one before, writes the service that keeps the runner running and starts it, and says the machine and the OS account, which the account's page shows. It needs no administrator's rights, and writes over no file of a desk that is there.",
140
+ },
141
+ {
142
+ title: "Check who the command is",
143
+ body: `It names @${account.handle}, and no person. From then on the invitation has done its work, and its code opens nothing.`,
144
+ line: "console whoami",
145
+ },
146
+ {
147
+ title: "When the services or the account change",
148
+ body: "Run this in the desk: it writes what is missing there, writes the service again where it changed, and says the services as they are now.",
149
+ line: "console agent setup --refresh",
150
+ },
151
+ ];
152
+ const start = described.flatMap((one) => one.onboarding.map((item) => ({ title: item.title, body: item.body })));
153
+ // How the agent signs in at the services it works with, said once for all of them: a sign-in
154
+ // is the agent's own, kept in the machine's own browser, and where it wants a person, a person
155
+ // signs in inside the agent's session and nothing is sent in a message.
156
+ const browser = [
157
+ {
158
+ title: "Use the machine's own browser, and keep it",
159
+ body: "Sign in at a service in the ordinary browser of your OS account, with a browser tool of your product that attaches to that browser. A sign-in stays there from one session to the next, as a person's does. A browser a tool starts anew each time keeps none, and a service takes it for a stranger each time and asks again.",
160
+ },
161
+ {
162
+ title: "Where a sign-in wants a person",
163
+ body: "A code sent to a phone, a picture to solve, a key to touch: ask for a person to sign in inside your session. They reach your OS account over a remote desktop, or sit at the machine, sign in as you in that same browser, and leave. Ask as a decision on the board, or at the messenger where it is quick, and say which service and which account. Nothing you sign in with is sent in a message, a task or a comment.",
164
+ },
165
+ {
166
+ title: "Keep what you sign in with",
167
+ body: "A password you chose or were handed goes into your store, with the day it ends where it has one: `console secret <service>.password --set --expires <day>`. Turn on a second step you can answer yourself where the service has one. `console secrets` lists what you keep, by name.",
168
+ },
169
+ ];
170
+ const asked = described.flatMap((one) => one.asks.map((item) => ({ title: item.title, body: item.body })));
171
+ const sections = [
172
+ {
173
+ key: "before",
174
+ who: "operator",
175
+ title: "Before the line",
176
+ about: "For whoever prepares the machine: a person at its screen, or an agent that administers it.",
177
+ steps: before,
178
+ },
179
+ {
180
+ key: "machine",
181
+ who: "agent",
182
+ title: "On the machine",
183
+ about: "For the agent, or whoever runs the command in its OS account. The account is entered through its own sign-in and through nothing else.",
184
+ steps: machine,
185
+ },
186
+ ...(start.length === 0
187
+ ? []
188
+ : [
189
+ {
190
+ key: "start",
191
+ who: "agent",
192
+ title: "When the agent starts",
193
+ about: "What the agent does itself, with its own sign-ins. What it signs in with it keeps in its store (console secret), never in a file or a message.",
194
+ steps: start,
195
+ },
196
+ ]),
197
+ {
198
+ key: "browser",
199
+ who: "agent",
200
+ title: "Signing in elsewhere, in a browser",
201
+ about: "For the agent, wherever its work has it sign in at a page: the git host, the mailbox, the messenger, a tool of the organization's.",
202
+ steps: browser,
203
+ },
204
+ ...(asked.length === 0
205
+ ? []
206
+ : [
207
+ {
208
+ key: "asked",
209
+ who: "manager",
210
+ title: "What the agent asks for",
211
+ about: "What the agent cannot do itself. It asks for each as a decision on the board, of whoever can do it, and of its manager where it does not know who, and goes on with the rest.",
212
+ steps: asked,
213
+ },
214
+ ]),
215
+ ];
216
+ return {
217
+ title: `Setting up ${called}`,
218
+ about: [
219
+ `This guide sets a machine up for the agent account ${called} of ${workspace.name}, whose console is at ${setup.console.url}. The account signs in there as \`${account.login}\` through ${provider}.`,
220
+ `The code that opened this guide is an invitation and no credential: it says which account the setup is for, and gives nobody the account. It ends on its day, or when the account's command has signed in.`,
221
+ "The skill running-an-agent, shipped with the console's command, says the whole of it for the three who have a part in it: whoever prepares the machine, the agent, and its manager.",
222
+ ],
223
+ expiresAt: setup.expiresAt,
224
+ sections,
225
+ };
226
+ }
227
+ const WHO = {
228
+ operator: "whoever prepares the machine",
229
+ agent: "the agent",
230
+ manager: "its manager",
231
+ };
232
+ /**
233
+ * The guide as the command prints it: Markdown, every line to run on a line of its own. `moment`
234
+ * says the invitation's day as the command says a moment; left out, as the API gives it.
235
+ */
236
+ export function setupGuideText(guide, moment = (iso) => iso) {
237
+ const lines = [
238
+ `# ${guide.title}`,
239
+ "",
240
+ ...guide.about.flatMap((one) => [one, ""]),
241
+ `The invitation is good until ${moment(guide.expiresAt)}.`,
242
+ "",
243
+ ];
244
+ for (const [index, section] of guide.sections.entries()) {
245
+ lines.push(`## ${index + 1}. ${section.title} (${WHO[section.who]})`, "", section.about, "");
246
+ for (const step of section.steps) {
247
+ lines.push(`- ${step.title}. ${step.body}`);
248
+ if (step.line !== undefined) {
249
+ lines.push(` ${step.line}`);
250
+ }
251
+ }
252
+ lines.push("");
253
+ }
254
+ return lines.join("\n").trimEnd();
255
+ }
256
+ //# sourceMappingURL=setup-guide.js.map