@skillcdn/console 0.4.7 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (599) hide show
  1. package/README.md +74 -14
  2. package/SKILLCDN.md +5 -3
  3. package/dist/agent-page.d.ts +44 -0
  4. package/dist/agent-page.d.ts.map +1 -0
  5. package/dist/agent-page.js +415 -0
  6. package/dist/agent-page.js.map +1 -0
  7. package/dist/agent-stream.d.ts +52 -0
  8. package/dist/agent-stream.d.ts.map +1 -0
  9. package/dist/agent-stream.js +155 -0
  10. package/dist/agent-stream.js.map +1 -0
  11. package/dist/api.d.ts +12 -6
  12. package/dist/api.d.ts.map +1 -1
  13. package/dist/api.js +11 -5
  14. package/dist/api.js.map +1 -1
  15. package/dist/avatar.d.ts +137 -0
  16. package/dist/avatar.d.ts.map +1 -0
  17. package/dist/avatar.js +1216 -0
  18. package/dist/avatar.js.map +1 -0
  19. package/dist/charts.d.ts +103 -0
  20. package/dist/charts.d.ts.map +1 -0
  21. package/dist/charts.js +182 -0
  22. package/dist/charts.js.map +1 -0
  23. package/dist/cli/cli.d.ts +39 -1
  24. package/dist/cli/cli.d.ts.map +1 -1
  25. package/dist/cli/cli.js +2424 -296
  26. package/dist/cli/cli.js.map +1 -1
  27. package/dist/cli/command-words.d.ts +20 -0
  28. package/dist/cli/command-words.d.ts.map +1 -0
  29. package/dist/cli/command-words.js +51 -0
  30. package/dist/cli/command-words.js.map +1 -0
  31. package/dist/cli/credentials.d.ts +59 -5
  32. package/dist/cli/credentials.d.ts.map +1 -1
  33. package/dist/cli/credentials.js +128 -16
  34. package/dist/cli/credentials.js.map +1 -1
  35. package/dist/cli/directory.d.ts +19 -4
  36. package/dist/cli/directory.d.ts.map +1 -1
  37. package/dist/cli/directory.js +16 -8
  38. package/dist/cli/directory.js.map +1 -1
  39. package/dist/cli/format.d.ts +91 -8
  40. package/dist/cli/format.d.ts.map +1 -1
  41. package/dist/cli/format.js +386 -57
  42. package/dist/cli/format.js.map +1 -1
  43. package/dist/cli/help.d.ts +13 -4
  44. package/dist/cli/help.d.ts.map +1 -1
  45. package/dist/cli/help.js +202 -62
  46. package/dist/cli/help.js.map +1 -1
  47. package/dist/cli/main.js +94 -0
  48. package/dist/cli/main.js.map +1 -1
  49. package/dist/cli/pack.d.ts +69 -36
  50. package/dist/cli/pack.d.ts.map +1 -1
  51. package/dist/cli/pack.js +241 -188
  52. package/dist/cli/pack.js.map +1 -1
  53. package/dist/cli/plugin-check.d.ts +42 -0
  54. package/dist/cli/plugin-check.d.ts.map +1 -1
  55. package/dist/cli/plugin-check.js +221 -36
  56. package/dist/cli/plugin-check.js.map +1 -1
  57. package/dist/cli/plugin-cli.d.ts +6 -1
  58. package/dist/cli/plugin-cli.d.ts.map +1 -1
  59. package/dist/cli/plugin-cli.js +21 -4
  60. package/dist/cli/plugin-cli.js.map +1 -1
  61. package/dist/cli/plugin-main.js +1 -0
  62. package/dist/cli/plugin-main.js.map +1 -1
  63. package/dist/cli/runner-host.d.ts +36 -0
  64. package/dist/cli/runner-host.d.ts.map +1 -0
  65. package/dist/cli/runner-host.js +154 -0
  66. package/dist/cli/runner-host.js.map +1 -0
  67. package/dist/cli/serve.d.ts +33 -1
  68. package/dist/cli/serve.d.ts.map +1 -1
  69. package/dist/cli/serve.js +275 -6
  70. package/dist/cli/serve.js.map +1 -1
  71. package/dist/cli/setup-machine.d.ts +36 -0
  72. package/dist/cli/setup-machine.d.ts.map +1 -0
  73. package/dist/cli/setup-machine.js +109 -0
  74. package/dist/cli/setup-machine.js.map +1 -0
  75. package/dist/client.d.ts +189 -10
  76. package/dist/client.d.ts.map +1 -1
  77. package/dist/client.js +192 -57
  78. package/dist/client.js.map +1 -1
  79. package/dist/compat.d.ts +1 -1
  80. package/dist/compat.js +2 -2
  81. package/dist/components/agent-page.d.ts +384 -0
  82. package/dist/components/agent-page.d.ts.map +1 -0
  83. package/dist/components/agent-page.js +985 -0
  84. package/dist/components/agent-page.js.map +1 -0
  85. package/dist/components/agents.d.ts +102 -0
  86. package/dist/components/agents.d.ts.map +1 -0
  87. package/dist/components/agents.js +246 -0
  88. package/dist/components/agents.js.map +1 -0
  89. package/dist/components/calendar.d.ts +17 -17
  90. package/dist/components/calendar.d.ts.map +1 -1
  91. package/dist/components/calendar.js +7 -2
  92. package/dist/components/calendar.js.map +1 -1
  93. package/dist/components/charts.d.ts +157 -0
  94. package/dist/components/charts.d.ts.map +1 -0
  95. package/dist/components/charts.js +182 -0
  96. package/dist/components/charts.js.map +1 -0
  97. package/dist/components/comments.d.ts +2 -0
  98. package/dist/components/comments.d.ts.map +1 -1
  99. package/dist/components/comments.js +1 -1
  100. package/dist/components/comments.js.map +1 -1
  101. package/dist/components/connect.d.ts.map +1 -1
  102. package/dist/components/connect.js +7 -2
  103. package/dist/components/connect.js.map +1 -1
  104. package/dist/components/decision-form.d.ts +21 -0
  105. package/dist/components/decision-form.d.ts.map +1 -1
  106. package/dist/components/decision-form.js +20 -6
  107. package/dist/components/decision-form.js.map +1 -1
  108. package/dist/components/decision-list.d.ts +24 -0
  109. package/dist/components/decision-list.d.ts.map +1 -1
  110. package/dist/components/decision-list.js +54 -5
  111. package/dist/components/decision-list.js.map +1 -1
  112. package/dist/components/desk-records.d.ts +102 -0
  113. package/dist/components/desk-records.d.ts.map +1 -0
  114. package/dist/components/desk-records.js +221 -0
  115. package/dist/components/desk-records.js.map +1 -0
  116. package/dist/components/desk.d.ts +85 -0
  117. package/dist/components/desk.d.ts.map +1 -0
  118. package/dist/components/desk.js +135 -0
  119. package/dist/components/desk.js.map +1 -0
  120. package/dist/components/event-feed.d.ts.map +1 -1
  121. package/dist/components/event-feed.js +26 -1
  122. package/dist/components/event-feed.js.map +1 -1
  123. package/dist/components/home.d.ts +12 -1
  124. package/dist/components/home.d.ts.map +1 -1
  125. package/dist/components/home.js +175 -16
  126. package/dist/components/home.js.map +1 -1
  127. package/dist/components/my-decisions.d.ts +5 -0
  128. package/dist/components/my-decisions.d.ts.map +1 -1
  129. package/dist/components/my-decisions.js +3 -3
  130. package/dist/components/my-decisions.js.map +1 -1
  131. package/dist/components/people.d.ts +17 -0
  132. package/dist/components/people.d.ts.map +1 -1
  133. package/dist/components/people.js +55 -19
  134. package/dist/components/people.js.map +1 -1
  135. package/dist/components/picker.d.ts +2 -0
  136. package/dist/components/picker.d.ts.map +1 -1
  137. package/dist/components/picker.js +1 -1
  138. package/dist/components/picker.js.map +1 -1
  139. package/dist/components/pictures.d.ts +38 -10
  140. package/dist/components/pictures.d.ts.map +1 -1
  141. package/dist/components/pictures.js +195 -40
  142. package/dist/components/pictures.js.map +1 -1
  143. package/dist/components/plugin-events.d.ts +29 -0
  144. package/dist/components/plugin-events.d.ts.map +1 -0
  145. package/dist/components/plugin-events.js +139 -0
  146. package/dist/components/plugin-events.js.map +1 -0
  147. package/dist/components/plugin-frame.d.ts.map +1 -1
  148. package/dist/components/plugin-frame.js +14 -37
  149. package/dist/components/plugin-frame.js.map +1 -1
  150. package/dist/components/plugin-settings.d.ts.map +1 -1
  151. package/dist/components/plugin-settings.js +58 -7
  152. package/dist/components/plugin-settings.js.map +1 -1
  153. package/dist/components/projects.d.ts.map +1 -1
  154. package/dist/components/projects.js +30 -10
  155. package/dist/components/projects.js.map +1 -1
  156. package/dist/components/rules.d.ts +8 -10
  157. package/dist/components/rules.d.ts.map +1 -1
  158. package/dist/components/rules.js +36 -14
  159. package/dist/components/rules.js.map +1 -1
  160. package/dist/components/sessions.d.ts.map +1 -1
  161. package/dist/components/sessions.js +8 -4
  162. package/dist/components/sessions.js.map +1 -1
  163. package/dist/components/setup.d.ts +59 -0
  164. package/dist/components/setup.d.ts.map +1 -0
  165. package/dist/components/setup.js +93 -0
  166. package/dist/components/setup.js.map +1 -0
  167. package/dist/components/sign-in.js +1 -1
  168. package/dist/components/sign-in.js.map +1 -1
  169. package/dist/components/task-form.d.ts.map +1 -1
  170. package/dist/components/task-form.js +2 -2
  171. package/dist/components/task-form.js.map +1 -1
  172. package/dist/components/task-list.d.ts +7 -6
  173. package/dist/components/task-list.d.ts.map +1 -1
  174. package/dist/components/task-list.js.map +1 -1
  175. package/dist/components/task-view.d.ts +3 -0
  176. package/dist/components/task-view.d.ts.map +1 -1
  177. package/dist/components/task-view.js +1 -1
  178. package/dist/components/task-view.js.map +1 -1
  179. package/dist/components/ui.d.ts +78 -8
  180. package/dist/components/ui.d.ts.map +1 -1
  181. package/dist/components/ui.js +88 -9
  182. package/dist/components/ui.js.map +1 -1
  183. package/dist/components/work.d.ts +5 -5
  184. package/dist/components/work.d.ts.map +1 -1
  185. package/dist/components/work.js.map +1 -1
  186. package/dist/components/workspace.d.ts +17 -0
  187. package/dist/components/workspace.d.ts.map +1 -1
  188. package/dist/components/workspace.js +129 -2
  189. package/dist/components/workspace.js.map +1 -1
  190. package/dist/connect-page.d.ts.map +1 -1
  191. package/dist/connect-page.js +5 -2
  192. package/dist/connect-page.js.map +1 -1
  193. package/dist/console.css +7551 -4580
  194. package/dist/console.d.ts +20 -0
  195. package/dist/console.d.ts.map +1 -1
  196. package/dist/console.js +331 -57
  197. package/dist/console.js.map +1 -1
  198. package/dist/data.d.ts +22 -1
  199. package/dist/data.d.ts.map +1 -1
  200. package/dist/data.js +62 -34
  201. package/dist/data.js.map +1 -1
  202. package/dist/desk-page.d.ts +38 -0
  203. package/dist/desk-page.d.ts.map +1 -0
  204. package/dist/desk-page.js +184 -0
  205. package/dist/desk-page.js.map +1 -0
  206. package/dist/desk-records-page.d.ts +18 -0
  207. package/dist/desk-records-page.d.ts.map +1 -0
  208. package/dist/desk-records-page.js +130 -0
  209. package/dist/desk-records-page.js.map +1 -0
  210. package/dist/desk-records.d.ts +247 -0
  211. package/dist/desk-records.d.ts.map +1 -0
  212. package/dist/desk-records.js +543 -0
  213. package/dist/desk-records.js.map +1 -0
  214. package/dist/desk.d.ts +122 -0
  215. package/dist/desk.d.ts.map +1 -0
  216. package/dist/desk.js +211 -0
  217. package/dist/desk.js.map +1 -0
  218. package/dist/feed-stream.d.ts +39 -0
  219. package/dist/feed-stream.d.ts.map +1 -0
  220. package/dist/feed-stream.js +117 -0
  221. package/dist/feed-stream.js.map +1 -0
  222. package/dist/glances.d.ts +39 -0
  223. package/dist/glances.d.ts.map +1 -0
  224. package/dist/glances.js +94 -0
  225. package/dist/glances.js.map +1 -0
  226. package/dist/home-tiles.d.ts +69 -5
  227. package/dist/home-tiles.d.ts.map +1 -1
  228. package/dist/home-tiles.js +347 -9
  229. package/dist/home-tiles.js.map +1 -1
  230. package/dist/i18n/en.d.ts +773 -3
  231. package/dist/i18n/en.d.ts.map +1 -1
  232. package/dist/i18n/en.js +770 -9
  233. package/dist/i18n/en.js.map +1 -1
  234. package/dist/i18n/ko.d.ts.map +1 -1
  235. package/dist/i18n/ko.js +736 -9
  236. package/dist/i18n/ko.js.map +1 -1
  237. package/dist/index.d.ts +19 -7
  238. package/dist/index.d.ts.map +1 -1
  239. package/dist/index.js +17 -5
  240. package/dist/index.js.map +1 -1
  241. package/dist/limits.d.ts +67 -0
  242. package/dist/limits.d.ts.map +1 -1
  243. package/dist/limits.js +67 -0
  244. package/dist/limits.js.map +1 -1
  245. package/dist/onboarding.d.ts +21 -0
  246. package/dist/onboarding.d.ts.map +1 -0
  247. package/dist/onboarding.js +43 -0
  248. package/dist/onboarding.js.map +1 -0
  249. package/dist/persona.d.ts +34 -0
  250. package/dist/persona.d.ts.map +1 -0
  251. package/dist/persona.js +71 -0
  252. package/dist/persona.js.map +1 -0
  253. package/dist/plugin/context.d.ts +42 -11
  254. package/dist/plugin/context.d.ts.map +1 -1
  255. package/dist/plugin/limits.d.ts +2 -0
  256. package/dist/plugin/limits.d.ts.map +1 -1
  257. package/dist/plugin/limits.js +2 -0
  258. package/dist/plugin/limits.js.map +1 -1
  259. package/dist/plugin/manifest.d.ts +13 -0
  260. package/dist/plugin/manifest.d.ts.map +1 -1
  261. package/dist/plugin/manifest.js +34 -4
  262. package/dist/plugin/manifest.js.map +1 -1
  263. package/dist/plugin/rest-schemas.d.ts +56 -0
  264. package/dist/plugin/rest-schemas.d.ts.map +1 -1
  265. package/dist/plugin/rest-schemas.js +42 -0
  266. package/dist/plugin/rest-schemas.js.map +1 -1
  267. package/dist/plugin/sandbox.d.ts.map +1 -1
  268. package/dist/plugin/sandbox.js +4 -1
  269. package/dist/plugin/sandbox.js.map +1 -1
  270. package/dist/plugin/testing.d.ts +6 -2
  271. package/dist/plugin/testing.d.ts.map +1 -1
  272. package/dist/plugin/testing.js +52 -10
  273. package/dist/plugin/testing.js.map +1 -1
  274. package/dist/plugin.d.ts +1 -1
  275. package/dist/plugin.d.ts.map +1 -1
  276. package/dist/plugin.js +1 -1
  277. package/dist/plugin.js.map +1 -1
  278. package/dist/records.d.ts +283 -0
  279. package/dist/records.d.ts.map +1 -0
  280. package/dist/records.js +543 -0
  281. package/dist/records.js.map +1 -0
  282. package/dist/router.d.ts +50 -3
  283. package/dist/router.d.ts.map +1 -1
  284. package/dist/router.js +78 -7
  285. package/dist/router.js.map +1 -1
  286. package/dist/routes.d.ts +12 -2
  287. package/dist/routes.d.ts.map +1 -1
  288. package/dist/routes.js +14 -1
  289. package/dist/routes.js.map +1 -1
  290. package/dist/rules.d.ts +30 -11
  291. package/dist/rules.d.ts.map +1 -1
  292. package/dist/rules.js +99 -42
  293. package/dist/rules.js.map +1 -1
  294. package/dist/runner/acp.d.ts +20 -0
  295. package/dist/runner/acp.d.ts.map +1 -0
  296. package/dist/runner/acp.js +1132 -0
  297. package/dist/runner/acp.js.map +1 -0
  298. package/dist/runner/claude.d.ts +13 -0
  299. package/dist/runner/claude.d.ts.map +1 -0
  300. package/dist/runner/claude.js +615 -0
  301. package/dist/runner/claude.js.map +1 -0
  302. package/dist/runner/codex.d.ts +19 -0
  303. package/dist/runner/codex.d.ts.map +1 -0
  304. package/dist/runner/codex.js +597 -0
  305. package/dist/runner/codex.js.map +1 -0
  306. package/dist/runner/config.d.ts +35 -0
  307. package/dist/runner/config.d.ts.map +1 -0
  308. package/dist/runner/config.js +74 -0
  309. package/dist/runner/config.js.map +1 -0
  310. package/dist/runner/desk.d.ts +81 -0
  311. package/dist/runner/desk.d.ts.map +1 -0
  312. package/dist/runner/desk.js +303 -0
  313. package/dist/runner/desk.js.map +1 -0
  314. package/dist/runner/launchd.d.ts +7 -0
  315. package/dist/runner/launchd.d.ts.map +1 -0
  316. package/dist/runner/launchd.js +78 -0
  317. package/dist/runner/launchd.js.map +1 -0
  318. package/dist/runner/message.d.ts +66 -0
  319. package/dist/runner/message.d.ts.map +1 -0
  320. package/dist/runner/message.js +181 -0
  321. package/dist/runner/message.js.map +1 -0
  322. package/dist/runner/modules.d.ts +13 -0
  323. package/dist/runner/modules.d.ts.map +1 -0
  324. package/dist/runner/modules.js +30 -0
  325. package/dist/runner/modules.js.map +1 -0
  326. package/dist/runner/process.d.ts +7 -0
  327. package/dist/runner/process.d.ts.map +1 -0
  328. package/dist/runner/process.js +65 -0
  329. package/dist/runner/process.js.map +1 -0
  330. package/dist/runner/redact.d.ts +48 -0
  331. package/dist/runner/redact.d.ts.map +1 -0
  332. package/dist/runner/redact.js +214 -0
  333. package/dist/runner/redact.js.map +1 -0
  334. package/dist/runner/registry.d.ts +37 -0
  335. package/dist/runner/registry.d.ts.map +1 -0
  336. package/dist/runner/registry.js +26 -0
  337. package/dist/runner/registry.js.map +1 -0
  338. package/dist/runner/runner.d.ts +130 -0
  339. package/dist/runner/runner.d.ts.map +1 -0
  340. package/dist/runner/runner.js +1551 -0
  341. package/dist/runner/runner.js.map +1 -0
  342. package/dist/runner/slack.d.ts +16 -0
  343. package/dist/runner/slack.d.ts.map +1 -0
  344. package/dist/runner/slack.js +157 -0
  345. package/dist/runner/slack.js.map +1 -0
  346. package/dist/runner/systemd-user.d.ts +7 -0
  347. package/dist/runner/systemd-user.d.ts.map +1 -0
  348. package/dist/runner/systemd-user.js +93 -0
  349. package/dist/runner/systemd-user.js.map +1 -0
  350. package/dist/runner/task-scheduler.d.ts +38 -0
  351. package/dist/runner/task-scheduler.d.ts.map +1 -0
  352. package/dist/runner/task-scheduler.js +216 -0
  353. package/dist/runner/task-scheduler.js.map +1 -0
  354. package/dist/runner/types.d.ts +315 -0
  355. package/dist/runner/types.d.ts.map +1 -0
  356. package/dist/runner/types.js +24 -0
  357. package/dist/runner/types.js.map +1 -0
  358. package/dist/runner.d.ts +18 -0
  359. package/dist/runner.d.ts.map +1 -0
  360. package/dist/runner.js +20 -0
  361. package/dist/runner.js.map +1 -0
  362. package/dist/schemas.d.ts +6082 -1295
  363. package/dist/schemas.d.ts.map +1 -1
  364. package/dist/schemas.js +930 -31
  365. package/dist/schemas.js.map +1 -1
  366. package/dist/services.d.ts +110 -0
  367. package/dist/services.d.ts.map +1 -0
  368. package/dist/services.js +305 -0
  369. package/dist/services.js.map +1 -0
  370. package/dist/setup-guide.d.ts +64 -0
  371. package/dist/setup-guide.d.ts.map +1 -0
  372. package/dist/setup-guide.js +256 -0
  373. package/dist/setup-guide.js.map +1 -0
  374. package/dist/setup-page.d.ts +6 -0
  375. package/dist/setup-page.d.ts.map +1 -0
  376. package/dist/setup-page.js +29 -0
  377. package/dist/setup-page.js.map +1 -0
  378. package/dist/sse.d.ts +15 -0
  379. package/dist/sse.d.ts.map +1 -0
  380. package/dist/sse.js +73 -0
  381. package/dist/sse.js.map +1 -0
  382. package/dist/tab-title.d.ts +6 -0
  383. package/dist/tab-title.d.ts.map +1 -0
  384. package/dist/tab-title.js +22 -0
  385. package/dist/tab-title.js.map +1 -0
  386. package/dist/tokens.d.ts.map +1 -1
  387. package/dist/tokens.js +3 -0
  388. package/dist/tokens.js.map +1 -1
  389. package/dist/use-action.d.ts +5 -2
  390. package/dist/use-action.d.ts.map +1 -1
  391. package/dist/use-action.js +6 -1
  392. package/dist/use-action.js.map +1 -1
  393. package/dist/vocabulary.d.ts +84 -4
  394. package/dist/vocabulary.d.ts.map +1 -1
  395. package/dist/vocabulary.js +115 -3
  396. package/dist/vocabulary.js.map +1 -1
  397. package/docs/specs/cli.md +147 -41
  398. package/docs/specs/plugins.md +37 -27
  399. package/docs/specs/records.md +113 -0
  400. package/docs/specs/rest.md +155 -20
  401. package/docs/specs/runner.md +347 -0
  402. package/package.json +12 -3
  403. package/skills/building-a-console/SKILL.md +4 -4
  404. package/skills/building-a-console/references/configuring.md +1 -0
  405. package/skills/building-a-plugin/SKILL.md +7 -7
  406. package/skills/deploying-a-console/SKILL.md +4 -4
  407. package/skills/deploying-a-console/references/resources.md +48 -8
  408. package/skills/deploying-a-console/references/running-it-again.md +3 -2
  409. package/skills/keeping-a-desk/SKILL.md +133 -0
  410. package/skills/keeping-a-desk/collections.md +96 -0
  411. package/skills/planning-the-board/SKILL.md +14 -18
  412. package/skills/planning-the-board/references/a-task.md +2 -2
  413. package/skills/planning-the-board/references/project-rules.md +13 -14
  414. package/skills/planning-the-board/references/setting-up.md +22 -9
  415. package/skills/running-an-agent/SKILL.md +107 -0
  416. package/skills/running-an-agent/references/slack-app.md +61 -0
  417. package/skills/working-the-board/SKILL.md +66 -39
  418. package/skills/working-the-board/references/terms.md +9 -5
  419. package/skills/working-the-board/references/the-pack.md +14 -9
  420. package/skills/working-the-board/references/the-sentence.md +2 -2
  421. package/src/agent-page.tsx +1039 -0
  422. package/src/agent-stream.ts +199 -0
  423. package/src/api.ts +317 -2
  424. package/src/avatar.ts +1506 -0
  425. package/src/charts.ts +250 -0
  426. package/src/cli/cli.ts +3210 -503
  427. package/src/cli/command-words.ts +56 -0
  428. package/src/cli/credentials.ts +188 -16
  429. package/src/cli/directory.ts +28 -10
  430. package/src/cli/format.ts +470 -67
  431. package/src/cli/help.ts +233 -61
  432. package/src/cli/main.ts +89 -0
  433. package/src/cli/pack.ts +332 -263
  434. package/src/cli/plugin-check.ts +275 -34
  435. package/src/cli/plugin-cli.ts +28 -4
  436. package/src/cli/plugin-main.ts +1 -0
  437. package/src/cli/runner-host.ts +188 -0
  438. package/src/cli/serve.ts +320 -5
  439. package/src/cli/setup-machine.ts +153 -0
  440. package/src/client.ts +711 -126
  441. package/src/compat.ts +2 -2
  442. package/src/components/agent-page.tsx +1946 -0
  443. package/src/components/agents.tsx +638 -0
  444. package/src/components/calendar.tsx +74 -53
  445. package/src/components/charts.tsx +680 -0
  446. package/src/components/comments.tsx +3 -0
  447. package/src/components/connect.tsx +37 -2
  448. package/src/components/decision-form.tsx +89 -51
  449. package/src/components/decision-list.tsx +140 -4
  450. package/src/components/desk-records.tsx +724 -0
  451. package/src/components/desk.tsx +471 -0
  452. package/src/components/event-feed.tsx +30 -1
  453. package/src/components/home.tsx +353 -12
  454. package/src/components/my-decisions.tsx +8 -2
  455. package/src/components/people.tsx +300 -203
  456. package/src/components/picker.tsx +3 -1
  457. package/src/components/pictures.tsx +256 -44
  458. package/src/components/plugin-events.ts +159 -0
  459. package/src/components/plugin-frame.tsx +14 -38
  460. package/src/components/plugin-settings.tsx +178 -22
  461. package/src/components/projects.tsx +33 -15
  462. package/src/components/rules.tsx +96 -36
  463. package/src/components/sessions.tsx +7 -4
  464. package/src/components/setup.tsx +252 -0
  465. package/src/components/sign-in.tsx +1 -1
  466. package/src/components/task-form.tsx +11 -2
  467. package/src/components/task-list.tsx +7 -6
  468. package/src/components/task-view.tsx +4 -0
  469. package/src/components/ui.tsx +169 -25
  470. package/src/components/work.tsx +9 -9
  471. package/src/components/workspace.tsx +345 -4
  472. package/src/connect-page.tsx +15 -2
  473. package/src/console.tsx +657 -83
  474. package/src/data.ts +109 -43
  475. package/src/desk-page.tsx +332 -0
  476. package/src/desk-records-page.tsx +256 -0
  477. package/src/desk-records.ts +808 -0
  478. package/src/desk.ts +329 -0
  479. package/src/feed-stream.ts +144 -0
  480. package/src/glances.ts +132 -0
  481. package/src/home-tiles.ts +411 -9
  482. package/src/i18n/en.ts +828 -10
  483. package/src/i18n/ko.ts +792 -10
  484. package/src/index.ts +172 -3
  485. package/src/limits.ts +67 -0
  486. package/src/onboarding.ts +84 -0
  487. package/src/persona.ts +100 -0
  488. package/src/plugin/context.ts +55 -12
  489. package/src/plugin/limits.ts +2 -0
  490. package/src/plugin/manifest.ts +42 -3
  491. package/src/plugin/rest-schemas.ts +46 -0
  492. package/src/plugin/sandbox.ts +4 -1
  493. package/src/plugin/testing.ts +63 -12
  494. package/src/plugin.ts +2 -0
  495. package/src/records.ts +702 -0
  496. package/src/router.ts +120 -10
  497. package/src/routes.ts +17 -1
  498. package/src/rules.ts +109 -44
  499. package/src/runner/acp.ts +1267 -0
  500. package/src/runner/claude.ts +695 -0
  501. package/src/runner/codex.ts +691 -0
  502. package/src/runner/config.ts +97 -0
  503. package/src/runner/desk.ts +377 -0
  504. package/src/runner/launchd.ts +86 -0
  505. package/src/runner/message.ts +232 -0
  506. package/src/runner/modules.ts +30 -0
  507. package/src/runner/process.ts +72 -0
  508. package/src/runner/redact.ts +242 -0
  509. package/src/runner/registry.ts +67 -0
  510. package/src/runner/runner.ts +1879 -0
  511. package/src/runner/slack.ts +180 -0
  512. package/src/runner/systemd-user.ts +103 -0
  513. package/src/runner/task-scheduler.ts +236 -0
  514. package/src/runner/types.ts +334 -0
  515. package/src/runner.ts +110 -0
  516. package/src/schemas.ts +1183 -30
  517. package/src/services.ts +424 -0
  518. package/src/setup-guide.ts +336 -0
  519. package/src/setup-page.tsx +46 -0
  520. package/src/sse.ts +84 -0
  521. package/src/styles/README.md +111 -0
  522. package/src/styles/base.css +130 -0
  523. package/src/styles/console.css +85 -7095
  524. package/src/styles/drawn-by-pages.json +256 -0
  525. package/src/styles/pages/agents.css +1195 -0
  526. package/src/styles/pages/board.css +380 -0
  527. package/src/styles/pages/calendar.css +214 -0
  528. package/src/styles/pages/connect.css +182 -0
  529. package/src/styles/pages/decisions.css +370 -0
  530. package/src/styles/pages/desk.css +126 -0
  531. package/src/styles/pages/documents.css +273 -0
  532. package/src/styles/pages/feed.css +118 -0
  533. package/src/styles/pages/home.css +718 -0
  534. package/src/styles/pages/people.css +90 -0
  535. package/src/styles/pages/plugins.css +212 -0
  536. package/src/styles/pages/roadmap.css +377 -0
  537. package/src/styles/pages/settings.css +171 -0
  538. package/src/styles/pages/shell.css +208 -0
  539. package/src/styles/pages/sign-in.css +178 -0
  540. package/src/styles/pages/task.css +108 -0
  541. package/src/styles/pages/thread.css +331 -0
  542. package/src/styles/pages/work.css +68 -0
  543. package/src/styles/parts/avatar.css +82 -0
  544. package/src/styles/parts/badge.css +227 -0
  545. package/src/styles/parts/bars.css +80 -0
  546. package/src/styles/parts/button.css +99 -0
  547. package/src/styles/parts/calendar.css +547 -0
  548. package/src/styles/parts/callout.css +41 -0
  549. package/src/styles/parts/category.css +8 -0
  550. package/src/styles/parts/chart.css +173 -0
  551. package/src/styles/parts/chip.css +90 -0
  552. package/src/styles/parts/code.css +48 -0
  553. package/src/styles/parts/count.css +27 -0
  554. package/src/styles/parts/crumbs.css +61 -0
  555. package/src/styles/parts/detail.css +110 -0
  556. package/src/styles/parts/empty.css +21 -0
  557. package/src/styles/parts/eyebrow.css +9 -0
  558. package/src/styles/parts/facts.css +147 -0
  559. package/src/styles/parts/figures.css +65 -0
  560. package/src/styles/parts/files.css +38 -0
  561. package/src/styles/parts/filters.css +42 -0
  562. package/src/styles/parts/form.css +109 -0
  563. package/src/styles/parts/frame.css +45 -0
  564. package/src/styles/parts/input.css +243 -0
  565. package/src/styles/parts/legend.css +48 -0
  566. package/src/styles/parts/links.css +37 -0
  567. package/src/styles/parts/mark.css +79 -0
  568. package/src/styles/parts/menu.css +147 -0
  569. package/src/styles/parts/page.css +174 -0
  570. package/src/styles/parts/pager.css +19 -0
  571. package/src/styles/parts/panel.css +33 -0
  572. package/src/styles/parts/person.css +257 -0
  573. package/src/styles/parts/picker.css +185 -0
  574. package/src/styles/parts/progress.css +25 -0
  575. package/src/styles/parts/prose.css +128 -0
  576. package/src/styles/parts/rows.css +63 -0
  577. package/src/styles/parts/series.css +32 -0
  578. package/src/styles/parts/settings.css +101 -0
  579. package/src/styles/parts/share.css +25 -0
  580. package/src/styles/parts/spark.css +23 -0
  581. package/src/styles/parts/spinner.css +29 -0
  582. package/src/styles/parts/stat.css +69 -0
  583. package/src/styles/parts/steps.css +68 -0
  584. package/src/styles/parts/tabs.css +175 -0
  585. package/src/styles/parts/text.css +61 -0
  586. package/src/styles/parts/toggle.css +71 -0
  587. package/src/styles/parts/workers.css +37 -0
  588. package/src/styles/tokens.css +295 -0
  589. package/src/tab-title.ts +25 -0
  590. package/src/tokens.ts +3 -0
  591. package/src/use-action.ts +7 -2
  592. package/src/vocabulary.ts +151 -3
  593. package/template/desk-web/README.md +8 -0
  594. package/template/desk-web/index.html +13 -0
  595. package/template/desk-web/package.json +25 -0
  596. package/template/desk-web/src/main.tsx +24 -0
  597. package/template/desk-web/src/page.tsx +51 -0
  598. package/template/desk-web/tsconfig.json +16 -0
  599. package/template/desk-web/vite.config.ts +15 -0
package/dist/cli/pack.js CHANGED
@@ -1,17 +1,31 @@
1
- import { browseBody, browseResultOf, catalogStateOf, directoryBody, directoryResultOf, fileBody, fileResultOf, findResultOf, joinSkillPages, mountSummaryOf, parseAddress, parseRepoPath, parseSkillUri, renderBrowseResult, renderDirectoryResult, renderFileResult, renderFindResult, renderInstructions, renderSkillResult, skillOutcome, skillResultOf, } from "@skillcdn/core";
2
- // The pack of the project, as the command prints it (ADR-0028, ADR-0031): the console answers
3
- // what the pack's REST API answered, in the shapes of @skillcdn/core, and the command renders
4
- // it with the functions a deployment's own tools render for a model, naming the reads as its
5
- // own commands, so that an agent reads here what it would read over MCP, or with the skillcdn
6
- // command. The pages a read came in are joined first: a skill, a folder and a file arrive whole.
7
- /** How the results name the four reads, so that an agent is told the command and not a tool. */
8
- export const CONSOLE_WORDS = {
9
- browse: "console skills <folder>",
10
- search: "console skills --search",
11
- load: "console skill",
12
- read: "console skill --file",
13
- };
1
+ import { PackError, } from "@skillcdn/cli";
2
+ import { isReadmePath, parseAddress, parseRepoPath, parseSkillUri, } from "@skillcdn/core";
3
+ import { commandLine, NO_LINE_TO_RUN } from "./command-words.js";
4
+ // The pack of the project, as the command prints it (ADR-0028, ADR-0031, ADR-0124): the console
5
+ // answers what the pack's REST API answered, in the shapes of @skillcdn/core, and the command
6
+ // hands those answers, as a pack, to the reads the skillcdn command itself prints with
7
+ // (`readPack` of @skillcdn/cli), naming the reads as its own commands. So an agent reads here
8
+ // what it would read over MCP, or with the skillcdn command, and a change of that command's text
9
+ // comes with its next version. What is here is the console's own: the pack made of the console's
10
+ // answers, the lines around a listing, and the words of a pack the console could not read,
11
+ // which is a project's or the organization's and whose token is the console's to hold.
12
+ /** How the results name the four reads of a pack read with `skills` and `skill`, so that an agent is told the command and not a tool. */
13
+ export const packWords = (skills, skill) => ({
14
+ browse: `${skills} <folder>`,
15
+ search: `${skills} --search`,
16
+ load: skill,
17
+ read: `${skill} --file`,
18
+ });
19
+ /** The words of the project's pack, and the organization's: `console skills` and `console skill`. */
20
+ export const CONSOLE_WORDS = packWords("console skills", "console skill");
14
21
  export const NO_ADDRESS = "No skills address: neither this project nor the console names one.";
22
+ const NO_ORGANIZATION_ADDRESS = "No skills address: the console names none for the organization's skills, and no project is named here.";
23
+ const noAddress = (owner) => owner === "organization" ? NO_ORGANIZATION_ADDRESS : NO_ADDRESS;
24
+ /**
25
+ * What a read of the organization's pack begins with: whose pack it is, since the command
26
+ * would otherwise read as if a project had been named, and how a project's own is read.
27
+ */
28
+ export const ORGANIZATION_PACK_LINE = "The organization's pack, since no project is named here: --project <key>, or a directory bound with console use <key>, reads a project's own.";
15
29
  /** The words of a read that did not happen, by status, with what to do about it. */
16
30
  const SKILLS_WORDS = {
17
31
  indexing: "The pack is still being indexed; ask again in a moment.",
@@ -20,104 +34,259 @@ const SKILLS_WORDS = {
20
34
  token_invalid: "The pack token the project holds no longer works at the deployment: an owner sets a new one (console project pack-token <key> --stdin).",
21
35
  unavailable: "The pack could not be reached; ask again later.",
22
36
  };
37
+ /** The same, where the pack is the organization's: the token is the workspace's, an administrator's to set. */
38
+ const ORGANIZATION_WORDS = {
39
+ not_found: "Nothing is served to the console at this address or path: it is not there, or the organization's pack is private and the workspace holds no SkillCDN token for it (console workspace pack-token --connect, for an administrator).",
40
+ token_invalid: "The SkillCDN token the workspace holds no longer works at the deployment: an administrator sets a new one (console workspace pack-token --connect).",
41
+ };
23
42
  /** The first line of an answer about the pack: what was read, where the pack is, and how it went. */
24
43
  function head(what, answer) {
25
44
  const where = answer.source === null ? "read from the console's machine" : `served by ${answer.source}`;
26
45
  return `${what} at ${answer.address}, ${where}: ${answer.status}`;
27
46
  }
28
- /** A read that did not happen: the head, the words of its status, and the pack's own refusal when it gave one. */
29
- function refused(what, answer) {
47
+ /**
48
+ * Whether a refusal is the pack's answer to one read: a path with nothing at it, a read asked
49
+ * wrong, a file it will not carry, in the pack's own code and words. The pack answered, so no
50
+ * token is what is missing, and saying so would send an agent to mend a pack that is served.
51
+ * Every other refusal is of the pack as a whole: nothing is served to the console at the
52
+ * address, the token is no good there, the index is not there to read, or it was not reached.
53
+ */
54
+ const ofOneRead = (answer) => answer.refusal !== null &&
55
+ (answer.status === "not_found" || answer.status === "failed") &&
56
+ !/^(mount|auth|index)\./.test(answer.refusal.code);
57
+ /**
58
+ * A read the console could not make, of the pack as a whole, as the command says it on standard
59
+ * error: that no address is named; or where the pack is and how it stands, the words of that
60
+ * standing with whose token is missing, and the pack's own refusal when it gave one. `what` is
61
+ * the read in a word: `skills`, `folder`, `search`, `skill`, `file`, `tables`, `code blocks`.
62
+ */
63
+ export function refusalWords(what, answer, owner = "project") {
64
+ if (answer.status === "none" || answer.address === null) {
65
+ return noAddress(owner);
66
+ }
30
67
  const lines = [head(what, answer)];
31
- if (answer.status !== "none" && answer.status !== "ready") {
32
- lines.push(SKILLS_WORDS[answer.status]);
68
+ if (answer.status === "ready") {
69
+ lines.push("Nothing was read.");
70
+ }
71
+ else {
72
+ lines.push(owner === "organization" &&
73
+ (answer.status === "not_found" || answer.status === "token_invalid")
74
+ ? ORGANIZATION_WORDS[answer.status]
75
+ : SKILLS_WORDS[answer.status]);
33
76
  }
34
77
  if (answer.refusal !== null) {
35
78
  lines.push(answer.refusal.message);
36
79
  }
37
80
  return lines.join("\n");
38
81
  }
39
- /** What the listing said the address serves, for the reads to be rendered at; nothing when it did not answer. */
40
- export function summaryOf(listing) {
41
- return listing.mount === null ? undefined : mountSummaryOf(listing.mount);
42
- }
43
- /** Every skill and document the address serves, as one listing: what `search_repo` without words answers. */
44
- function listingOf(mount, summary) {
45
- if (mount.index.status !== "ready") {
46
- return undefined;
82
+ /**
83
+ * A read of the pack as a whole that the console could not make: thrown by the pack made of the
84
+ * console's answers, for the command to say in the console's words ({@link refusalWords}). A
85
+ * refusal of one read, in the pack's own code and words, is a `PackError` instead, as the
86
+ * skillcdn command's own pack throws one.
87
+ */
88
+ export class PackRefusal extends Error {
89
+ /** The read in a word, as the first line of the refusal names it. */
90
+ what;
91
+ /** What the console answered. */
92
+ answer;
93
+ constructor(what, answer) {
94
+ super(`${what}: ${answer.status}`);
95
+ this.name = "PackRefusal";
96
+ this.what = what;
97
+ this.answer = answer;
47
98
  }
99
+ }
100
+ /**
101
+ * Every skill and document the address serves, as a search without words answers them, made
102
+ * from what the pack says of itself in the one answer the console already has (ADR-0118, point
103
+ * 5): the console's API takes no search without words, and a listing asked page by page through
104
+ * a console that may be far would be several requests for the answer one gives. A folder's
105
+ * README is marked as its overview by the rule @skillcdn/core exports.
106
+ */
107
+ function listingOf(mount) {
48
108
  const { index } = mount;
109
+ if (index.status !== "ready") {
110
+ throw new PackError(503, `index.${index.status}`, "The pack is not ready to read.");
111
+ }
49
112
  const items = [];
50
113
  for (const skill of index.skills) {
51
- const directory = parseRepoPath(skill.directory);
52
- if (!directory.ok) {
53
- continue;
54
- }
55
- const path = parseRepoPath(skill.path ?? (skill.directory === "" ? "SKILL.md" : `${skill.directory}/SKILL.md`));
56
114
  items.push({
57
115
  kind: "skill",
58
- ...(path.ok ? { path: path.value } : {}),
116
+ path: skill.path ?? (skill.directory === "" ? "SKILL.md" : `${skill.directory}/SKILL.md`),
59
117
  name: skill.name,
60
- directory: directory.value,
118
+ directory: skill.directory,
61
119
  description: skill.description,
120
+ translations: skill.translations,
62
121
  files: [],
63
122
  moreFiles: 0,
64
- // For people, and not rendered for a model.
65
- translations: {},
66
123
  });
67
124
  }
68
125
  for (const document of index.documents) {
69
126
  const path = parseRepoPath(document.path);
70
- if (path.ok) {
71
- items.push({
72
- kind: "document",
73
- path: path.value,
74
- title: document.title ?? undefined,
75
- summary: document.summary ?? undefined,
76
- skillDirectory: undefined,
77
- });
78
- }
127
+ items.push({
128
+ kind: "document",
129
+ path: document.path,
130
+ title: document.title,
131
+ summary: document.summary,
132
+ skillDirectory: null,
133
+ ...(path.ok && isReadmePath(path.value) ? { overview: true } : {}),
134
+ });
79
135
  }
80
- const state = catalogStateOf(mount);
81
136
  return {
82
- mount: summary,
83
- query: undefined,
137
+ status: "ready",
138
+ query: null,
139
+ commit: mount.commit,
84
140
  items,
141
+ diagnostics: index.diagnostics,
85
142
  // The counts stand in the instructions above; without totals here, nothing suggests a cursor.
86
- totals: undefined,
87
- diagnostics: state.status === "ready" ? state.catalog.diagnostics : [],
143
+ totals: null,
144
+ nextCursor: null,
88
145
  };
89
146
  }
90
147
  /**
91
- * The pack: where it is and how it answered; what a client is told on connect, as the
92
- * deployment tells one; every skill and document; where a person connects an agent of its own;
93
- * and where the console's own skills are on this machine.
148
+ * A document's outline with the reads of its tables and its code blocks named as commands
149
+ * (ADR-0100): where the console said an address of its own for one, the command that reads it,
150
+ * `command` being the one the pack is read with, so that an agent is told what to run. Where the
151
+ * path has no spelling both shells take whole, what to run is said in words, with why.
94
152
  */
95
- export function formatSkills(skills, ownSkills) {
96
- const own = ownSkills === undefined
97
- ? []
98
- : ["", `The console's own skills, for working the board: ${ownSkills}`];
99
- if (skills.status === "none" || skills.address === null) {
100
- return [NO_ADDRESS, ...own].join("\n");
153
+ function withDataCommands(read, command) {
154
+ const outline = read.outline;
155
+ if (outline?.data === undefined) {
156
+ return read;
101
157
  }
102
- const summary = summaryOf(skills);
103
- if (skills.status !== "ready" || skills.mount === null || summary === undefined) {
104
- return [refused("skills", skills), ...own].join("\n");
158
+ const line = (flag) => commandLine(command, [flag, outline.path]) ??
159
+ `${command} ${flag} with this file's path, quoted for your shell. ${NO_LINE_TO_RUN}`;
160
+ return {
161
+ ...read,
162
+ outline: {
163
+ ...outline,
164
+ data: {
165
+ ...(outline.data.rows === undefined ? {} : { rows: line("--rows") }),
166
+ ...(outline.data.code === undefined ? {} : { code: line("--code") }),
167
+ },
168
+ },
169
+ };
170
+ }
171
+ /**
172
+ * How many pages of a skill, of tables or of code blocks one command follows before it stops:
173
+ * far above what a pack holds, and the end of a read that would otherwise go round a console
174
+ * that names the same cursor again.
175
+ */
176
+ const MAX_PAGES = 64;
177
+ /**
178
+ * The pack `reader` reads, as the reads of the skillcdn command take one (ADR-0124): each read
179
+ * asked of the console, and the pack's own answer taken out of the console's. `listing` is the
180
+ * console's answer about the pack as a whole, which the command asks first; nothing is made of
181
+ * one that does not answer a pack, and the command says that as it stands. `url` is the console's
182
+ * origin, where a pack with no deployment of its own is read. With `dataCommand`, the outline of
183
+ * a document names the commands that read its tables and its code blocks, `dataCommand` being
184
+ * the one the pack is read with; without it, the console's addresses stay, as `--json` has them.
185
+ */
186
+ export function consolePack(reader, listing, options) {
187
+ const { mount } = listing;
188
+ const address = listing.address === null ? undefined : parseAddress(listing.address);
189
+ if (listing.status !== "ready" || mount === null || address === undefined || !address.ok) {
190
+ return undefined;
105
191
  }
106
- const lines = [
107
- head("skills", skills),
108
- "",
109
- renderInstructions(catalogStateOf(skills.mount), CONSOLE_WORDS),
110
- ];
111
- const listing = listingOf(skills.mount, summary);
112
- if (listing !== undefined) {
113
- lines.push("", renderFindResult(listing, CONSOLE_WORDS));
192
+ let last;
193
+ let pages = 0;
194
+ /** One more page of a read the command joins, within what one command follows. */
195
+ const another = (what, path) => {
196
+ pages += 1;
197
+ if (pages > MAX_PAGES) {
198
+ throw new PackError(0, "invalid_response", `The ${what} under ${path ?? "the pack"} are more than the command reads at once (${MAX_PAGES} pages): name a folder or a file under it.`);
199
+ }
200
+ };
201
+ /** The pack's own answer in the console's: a refusal of the one read as the pack's, any other as the console's. */
202
+ const taken = (what, answer) => {
203
+ last = answer;
204
+ if (answer.status === "ready" && answer.read !== null) {
205
+ return answer.read;
206
+ }
207
+ if (answer.refusal !== null && ofOneRead(answer)) {
208
+ throw new PackError(answer.status === "failed" ? 415 : 404, answer.refusal.code, answer.refusal.message, {
209
+ directories: answer.refusal.directories,
210
+ sourceUrl: answer.refusal.sourceUrl ?? undefined,
211
+ });
212
+ }
213
+ throw new PackRefusal(what, answer);
214
+ };
215
+ /** The same, of a read the pack answers with its own standing: ready, or the console says how it stands. */
216
+ const ready = (what, answer) => {
217
+ const read = taken(what, answer);
218
+ if (read.status !== "ready") {
219
+ throw new PackRefusal(what, answer);
220
+ }
221
+ return read;
222
+ };
223
+ return {
224
+ address: address.value,
225
+ source: { kind: "deployment", url: listing.source ?? options.url },
226
+ answered: () => last,
227
+ mount: async () => mount,
228
+ browse: async (query) => {
229
+ const read = ready("folder", await reader.skillBrowse(query));
230
+ return options.dataCommand === undefined ? read : withDataCommands(read, options.dataCommand);
231
+ },
232
+ find: async (query) => query.query === undefined
233
+ ? listingOf(mount)
234
+ : ready("search", await reader.skillFind(query.query, {
235
+ path: query.path,
236
+ cursor: query.cursor,
237
+ limit: query.limit,
238
+ })),
239
+ skill: async (path, cursor) => {
240
+ pages += 1;
241
+ if (pages > MAX_PAGES) {
242
+ throw new PackError(0, "invalid_response", "The pack answers more pages of a skill than one read takes.");
243
+ }
244
+ return ready("skill", await reader.skill(path, cursor));
245
+ },
246
+ file: async (query) => taken("file", await reader.skillFile(query.path, { offset: query.offset, limit: query.limit })),
247
+ rows: async (query) => {
248
+ another("tables", query.path);
249
+ return ready("tables", await reader.skillRows(query));
250
+ },
251
+ code: async (query) => {
252
+ another("code blocks", query.path);
253
+ return ready("code blocks", await reader.skillCode(query));
254
+ },
255
+ };
256
+ }
257
+ /**
258
+ * The listing of a pack as the command prints it. Where the pack answered, `text` is what the
259
+ * skillcdn command prints for it, what a client is told on connect and then every skill and
260
+ * document, between the lines of the console's own: where the pack is and how it answered,
261
+ * where a person connects an agent of their own, and where the console's own skills are on this
262
+ * machine. Where it did not, why, with that last line still.
263
+ */
264
+ export function formatSkills(skills, text, ownSkills, owner = "project", words = CONSOLE_WORDS) {
265
+ const own = ownSkills === undefined
266
+ ? []
267
+ : ["", `The console's own skills, for working the board and keeping a desk: ${ownSkills}`];
268
+ if (text === undefined || skills.status !== "ready") {
269
+ return [refusalWords("skills", skills, owner), ...own].join("\n");
114
270
  }
271
+ const lines = [head("skills", skills), "", text];
115
272
  if (skills.page !== null) {
116
- lines.push("", `A host with a SkillCDN connection of its own loads a skill by its URI, which a person makes at ${skills.page}; through the console, ${CONSOLE_WORDS.load} takes the URI too. --json adds the page of each skill, for a person.`);
273
+ lines.push("", `A host with a SkillCDN connection of its own loads a skill by its URI, which a person makes at ${skills.page}; through the console, ${words.load} takes the URI too. --json adds the page of each skill, for a person.`);
117
274
  }
118
275
  lines.push(...own);
119
276
  return lines.join("\n");
120
277
  }
278
+ /**
279
+ * The `SKILL.md` a path names: the path itself where it names one, else the one in the folder
280
+ * it names, since a skill is its folder and a listing cut short shows the folder alone; the
281
+ * root's own for the dot, as the root is everywhere.
282
+ */
283
+ function skillFileOf(given) {
284
+ const path = given.replace(/\/+$/, "");
285
+ if (path === "" || path === ".") {
286
+ return "SKILL.md";
287
+ }
288
+ return path === "SKILL.md" || path.endsWith("/SKILL.md") ? path : `${path}/SKILL.md`;
289
+ }
121
290
  /**
122
291
  * A skill's path as given, or taken out of the URI the listing names it by
123
292
  * (`skill://<host>/<owner>/<name>/<path>`); a URI of another pack would read this pack's skill
@@ -130,7 +299,7 @@ export function skillPathIn(given, packAddress) {
130
299
  ? {
131
300
  error: `Not a skill's URI the console knows: ${given}. Say the path of its SKILL.md from the repository's root, or the URI console skills lists.`,
132
301
  }
133
- : { path: given };
302
+ : { path: skillFileOf(given) };
134
303
  }
135
304
  const pack = packAddress === null ? undefined : parseAddress(packAddress);
136
305
  if (pack?.ok === true &&
@@ -143,122 +312,6 @@ export function skillPathIn(given, packAddress) {
143
312
  }
144
313
  return { path: uri.path };
145
314
  }
146
- /** The pages of a skill, as the console answered them, as the one skill they were cut from. */
147
- export function joinSkill(pages, summary) {
148
- return joinSkillPages(pages.flatMap((page) => page.read?.status === "ready" ? (skillResultOf(page.read, summary) ?? []) : []));
149
- }
150
- /** The skill whole, as the REST API answers one, for `--json`. */
151
- export function bodyOfSkill(skill) {
152
- const outcome = skillOutcome({ status: "ready", lookup: { kind: "found", skill } });
153
- if ("failure" in outcome) {
154
- throw new Error("a skill that was found has a body");
155
- }
156
- return outcome.body;
157
- }
158
- /** One skill as `load_skill` lays it out for a model: the rules, the body, the included files, its files and references. */
159
- export function formatSkillLoad(loaded, whole) {
160
- if (loaded.status === "none" || loaded.address === null) {
161
- return NO_ADDRESS;
162
- }
163
- if (loaded.status !== "ready") {
164
- return refused("skill", loaded);
165
- }
166
- if (whole === undefined) {
167
- return `${head("skill", loaded)}\nNothing was read.`;
168
- }
169
- return renderSkillResult(whole, CONSOLE_WORDS);
170
- }
171
- /** The pages of a folder, as the console answered them, as the one listing they were cut from. */
172
- export function joinFolder(pages, summary) {
173
- const results = pages.flatMap((page) => page.read?.status === "ready" ? (browseResultOf(page.read, summary) ?? []) : []);
174
- const first = results[0];
175
- const last = results[results.length - 1];
176
- if (first === undefined || last === undefined) {
177
- return undefined;
178
- }
179
- // A file's path answers its outline (SkillCDN 0.4), its headings paged as a folder's entries are.
180
- const outline = first.outline === undefined
181
- ? undefined
182
- : {
183
- ...first.outline,
184
- headings: results.flatMap((result) => result.outline?.headings ?? []),
185
- };
186
- return {
187
- ...first,
188
- mount: last.mount,
189
- entries: results.flatMap((result) => result.entries),
190
- nextCursor: last.nextCursor,
191
- ...(outline === undefined ? {} : { outline }),
192
- };
193
- }
194
- /** A folder whole, as the REST API answers one page, for `--json`. */
195
- export const bodyOfFolder = (result) => browseBody({ status: "ready", result });
196
- /** What a folder holds, as `browse_repo` lays it out for a model. */
197
- export function formatSkillBrowse(browsed, whole) {
198
- if (browsed.status === "none" || browsed.address === null) {
199
- return NO_ADDRESS;
200
- }
201
- if (browsed.status !== "ready") {
202
- return refused("folder", browsed);
203
- }
204
- if (whole === undefined) {
205
- return `${head("folder", browsed)}\nNothing was read.`;
206
- }
207
- return renderBrowseResult(whole, CONSOLE_WORDS);
208
- }
209
- /** What words found, as `search_repo` lays it out for a model, one page of it. */
210
- export function formatSkillFind(found, summary) {
211
- if (found.status === "none" || found.address === null) {
212
- return NO_ADDRESS;
213
- }
214
- if (found.status !== "ready" || found.read?.status !== "ready" || summary === undefined) {
215
- return refused("search", found);
216
- }
217
- return renderFindResult(findResultOf(found.read, summary), CONSOLE_WORDS);
218
- }
219
- /**
220
- * The pages of a file, as the console answered them, as the file whole; or the folder the path
221
- * named. With `requested`, the one page is a section read as asked (`--offset`, `--limit`): the
222
- * result carries the length asked for, so that the renderer says where the file continues rather
223
- * than asking for the rest.
224
- */
225
- export function joinFile(pages, summary, requested) {
226
- const reads = pages.flatMap((page) => (page.read === null ? [] : [page.read]));
227
- const first = reads[0];
228
- if (first === undefined) {
229
- return undefined;
230
- }
231
- if (first.kind === "directory") {
232
- return directoryResultOf(first, summary);
233
- }
234
- const files = reads.flatMap((read) => read.kind === "file" ? (fileResultOf(read, summary) ?? []) : []);
235
- const opening = files[0];
236
- const closing = files[files.length - 1];
237
- if (opening === undefined || closing === undefined) {
238
- return undefined;
239
- }
240
- return {
241
- ...opening,
242
- mount: closing.mount,
243
- content: files.map((file) => file.content).join(""),
244
- nextOffset: closing.nextOffset,
245
- totalLength: closing.totalLength,
246
- ...(requested === undefined ? {} : { requestedLength: requested }),
247
- };
248
- }
249
- /** A file whole, or a folder, as the REST API answers it, for `--json`. */
250
- export const bodyOfFile = (result) => "entries" in result ? directoryBody(result) : fileBody(result);
251
- /** A file as `read_repo_file` lays it out for a model, whole; or what the folder holds. */
252
- export function formatSkillFile(read, whole) {
253
- if (read.status === "none" || read.address === null) {
254
- return NO_ADDRESS;
255
- }
256
- if (read.status !== "ready") {
257
- return refused("file", read);
258
- }
259
- if (whole === undefined) {
260
- return `${head("file", read)}\nNothing was read.`;
261
- }
262
- return "entries" in whole ? renderDirectoryResult(whole) : renderFileResult(whole, CONSOLE_WORDS);
263
- }
315
+ /** Whether a read of data held nothing, by what the read says it holds: no table, or no code block. */
316
+ export const holdsNothing = (holds) => holds !== undefined && /(^| )0 (tables|code blocks)$/.test(holds);
264
317
  //# sourceMappingURL=pack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pack.js","sourceRoot":"","sources":["../../src/cli/pack.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,cAAc,EACd,cAAc,EAEd,aAAa,EACb,iBAAiB,EAIjB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,cAAc,EAEd,cAAc,EACd,YAAY,EACZ,aAAa,EACb,aAAa,EAKb,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAEjB,YAAY,EACZ,aAAa,GAEd,MAAM,gBAAgB,CAAC;AAUxB,8FAA8F;AAC9F,8FAA8F;AAC9F,6FAA6F;AAC7F,8FAA8F;AAC9F,iGAAiG;AAEjG,gGAAgG;AAChG,MAAM,CAAC,MAAM,aAAa,GAAc;IACtC,MAAM,EAAE,yBAAyB;IACjC,MAAM,EAAE,yBAAyB;IACjC,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,sBAAsB;CAC7B,CAAC;AAKF,MAAM,CAAC,MAAM,UAAU,GAAG,oEAAoE,CAAC;AAE/F,oFAAoF;AACpF,MAAM,YAAY,GAAsE;IACtF,QAAQ,EAAE,yDAAyD;IACnE,MAAM,EACJ,mGAAmG;IACrG,SAAS,EACP,wMAAwM;IAC1M,aAAa,EACX,yIAAyI;IAC3I,WAAW,EAAE,iDAA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AC,OAAO,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,+BAA+B,WAAW,gEAAgE;SAC5M,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;AAC5B,CAAC;AAED,uGAAuG;AACvG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAyB,EAAW,EAAE,CACjE,KAAK,KAAK,SAAS,IAAI,8BAA8B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC"}
@@ -12,8 +12,48 @@ export declare const PERMISSIVE_LICENSES: readonly string[];
12
12
  export declare function isPermissiveLicense(expression: string): boolean;
13
13
  /** True when npm's `files` list ships the path: named, under a named directory, or matched by a simple glob. */
14
14
  export declare function coveredByFiles(files: readonly string[], path: string): boolean;
15
+ /**
16
+ * The most the check reads of one file of a plugin's package, in bytes: 4 MiB. A file is read
17
+ * whole, into memory and through every reader here, and a plugin's files are a fraction of
18
+ * that: the example's server module, with everything it bundles, is under 1 MiB, the script of
19
+ * its pages a few dozen KiB. One beyond the bound is refused by its size and not read. The
20
+ * readers themselves take a time that grows with a file's size, whatever it holds: a bound on
21
+ * the size bounds nothing where a reader tries again from every place it could have begun.
22
+ */
23
+ export declare const MAX_CHECKED_FILE_BYTES: number;
15
24
  /** The classes a stylesheet styles, each once; comments and quoted strings are not read. */
16
25
  export declare function classesIn(css: string): string[];
26
+ /**
27
+ * The classes of the console's stylesheet, as the package ships its sources (ADR-0106): the
28
+ * parts, which a plugin's pages are built from as the console's own are, and the classes of the
29
+ * console's own pages, which lay one page out and are that page's alone. The list is the
30
+ * catalogue itself, `src/styles/README.md` of the package, and the pages' files beside it:
31
+ * nothing is copied, so that a part added to the catalogue is one a plugin may use at once.
32
+ */
33
+ export interface ConsoleClasses {
34
+ /** Whether a row of the catalogue names the class: `sc-button*` is `sc-button` and every `sc-button-...`. */
35
+ isPart(name: string): boolean;
36
+ /** Whether a part's class begins so, for a name a bundle finishes itself: `sc-badge-` and a tone. */
37
+ beginsPart(stem: string): boolean;
38
+ /** Whether the class is one of the console's own pages', which no part is. */
39
+ isPagesOwn(name: string): boolean;
40
+ }
41
+ /** Reads the catalogue's rows and the pages' stylesheets into the classes a plugin is held to. */
42
+ export declare function consoleClassesOf(catalogue: string, pageSheets: readonly string[]): ConsoleClasses;
43
+ /** The catalogue and the pages' files of the package whose styles are in `stylesDir`. */
44
+ export declare function readConsoleClasses(stylesDir: string): Promise<ConsoleClasses>;
45
+ /** The names in the console's prefix a script holds, each once. */
46
+ export declare function consoleNamesIn(script: string): string[];
47
+ /**
48
+ * What a file of a web bundle uses of the console's classes that is not a part (ADR-0106): a
49
+ * class of one of the console's own pages, which is that page's layout and changes with it, is
50
+ * an error; a name nothing of the console styles is said, since it draws nothing. A stylesheet
51
+ * is read by its selectors, a script by the names it holds.
52
+ */
53
+ export declare function strayConsoleClasses(file: string, text: string, classes: ConsoleClasses): {
54
+ readonly pagesOwn: string[];
55
+ readonly unknown: string[];
56
+ };
17
57
  /** What a web bundle reaches for that a frame has no business with, or imports from elsewhere. */
18
58
  export declare function webBundleProblems(source: string): string[];
19
59
  /**
@@ -24,6 +64,8 @@ export declare function sameAsEnglish(value: unknown, at?: string): string[];
24
64
  export interface CheckOptions {
25
65
  /** The version of the console this command belongs to, held against the manifest's `console`; left out, not compared. */
26
66
  readonly consoleVersion?: string | undefined;
67
+ /** The classes of the console this command belongs to, which the web bundle's are held to; left out, not held. */
68
+ readonly consoleClasses?: ConsoleClasses | undefined;
27
69
  }
28
70
  /** Reads the plugin at `root` as a console would, and says what it would refuse. */
29
71
  export declare function checkPlugin(root: string, loadServer: (file: string) => Promise<ServerLoad>, options?: CheckOptions): Promise<CheckReport>;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-check.d.ts","sourceRoot":"","sources":["../../src/cli/plugin-check.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,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