botmux 3.11.0 → 3.12.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 (343) hide show
  1. package/dist/.runtime-build-id +1 -1
  2. package/dist/adapters/backend/riff-backend.d.ts +18 -0
  3. package/dist/adapters/backend/riff-backend.d.ts.map +1 -1
  4. package/dist/adapters/backend/riff-backend.js +154 -2
  5. package/dist/adapters/backend/riff-backend.js.map +1 -1
  6. package/dist/adapters/cli/coco.js +3 -3
  7. package/dist/adapters/cli/coco.js.map +1 -1
  8. package/dist/adapters/cli/codex.js +2 -2
  9. package/dist/adapters/cli/codex.js.map +1 -1
  10. package/dist/adapters/cli/kimi.d.ts.map +1 -1
  11. package/dist/adapters/cli/kimi.js +22 -8
  12. package/dist/adapters/cli/kimi.js.map +1 -1
  13. package/dist/adapters/cli/pi.d.ts.map +1 -1
  14. package/dist/adapters/cli/pi.js +3 -1
  15. package/dist/adapters/cli/pi.js.map +1 -1
  16. package/dist/bot-registry.d.ts.map +1 -1
  17. package/dist/bot-registry.js +4 -1
  18. package/dist/bot-registry.js.map +1 -1
  19. package/dist/cli/dashboard-command.d.ts +23 -0
  20. package/dist/cli/dashboard-command.d.ts.map +1 -0
  21. package/dist/cli/dashboard-command.js +61 -0
  22. package/dist/cli/dashboard-command.js.map +1 -0
  23. package/dist/cli/dashboard-endpoint.d.ts +3 -3
  24. package/dist/cli/dashboard-endpoint.d.ts.map +1 -1
  25. package/dist/cli/dashboard-endpoint.js +1 -1
  26. package/dist/cli.d.ts.map +1 -1
  27. package/dist/cli.js +101 -49
  28. package/dist/cli.js.map +1 -1
  29. package/dist/codex-rpc-engine.d.ts +33 -3
  30. package/dist/codex-rpc-engine.d.ts.map +1 -1
  31. package/dist/codex-rpc-engine.js +182 -20
  32. package/dist/codex-rpc-engine.js.map +1 -1
  33. package/dist/codex-rpc-lifecycle.d.ts +42 -7
  34. package/dist/codex-rpc-lifecycle.d.ts.map +1 -1
  35. package/dist/codex-rpc-lifecycle.js +73 -7
  36. package/dist/codex-rpc-lifecycle.js.map +1 -1
  37. package/dist/config.d.ts +1 -1
  38. package/dist/config.js +1 -1
  39. package/dist/core/command-handler.d.ts +3 -2
  40. package/dist/core/command-handler.d.ts.map +1 -1
  41. package/dist/core/command-handler.js +19 -4
  42. package/dist/core/command-handler.js.map +1 -1
  43. package/dist/core/dashboard-ipc-server.d.ts.map +1 -1
  44. package/dist/core/dashboard-ipc-server.js +16 -11
  45. package/dist/core/dashboard-ipc-server.js.map +1 -1
  46. package/dist/core/dashboard-rows.d.ts +17 -1
  47. package/dist/core/dashboard-rows.d.ts.map +1 -1
  48. package/dist/core/dashboard-rows.js +13 -1
  49. package/dist/core/dashboard-rows.js.map +1 -1
  50. package/dist/core/dispatch.d.ts +9 -10
  51. package/dist/core/dispatch.d.ts.map +1 -1
  52. package/dist/core/dispatch.js +17 -10
  53. package/dist/core/dispatch.js.map +1 -1
  54. package/dist/core/maintenance.d.ts.map +1 -1
  55. package/dist/core/maintenance.js +5 -0
  56. package/dist/core/maintenance.js.map +1 -1
  57. package/dist/core/role-resolver.d.ts +5 -2
  58. package/dist/core/role-resolver.d.ts.map +1 -1
  59. package/dist/core/role-resolver.js +55 -23
  60. package/dist/core/role-resolver.js.map +1 -1
  61. package/dist/core/session-manager.d.ts +2 -0
  62. package/dist/core/session-manager.d.ts.map +1 -1
  63. package/dist/core/session-manager.js +20 -18
  64. package/dist/core/session-manager.js.map +1 -1
  65. package/dist/core/skills/cli-admin-command.d.ts.map +1 -1
  66. package/dist/core/skills/cli-admin-command.js +142 -3
  67. package/dist/core/skills/cli-admin-command.js.map +1 -1
  68. package/dist/core/skills/frontmatter.d.ts.map +1 -1
  69. package/dist/core/skills/frontmatter.js +44 -7
  70. package/dist/core/skills/frontmatter.js.map +1 -1
  71. package/dist/core/skills/im-command.d.ts +6 -0
  72. package/dist/core/skills/im-command.d.ts.map +1 -1
  73. package/dist/core/skills/im-command.js +34 -7
  74. package/dist/core/skills/im-command.js.map +1 -1
  75. package/dist/core/skills/install-command.d.ts +4 -0
  76. package/dist/core/skills/install-command.d.ts.map +1 -0
  77. package/dist/core/skills/install-command.js +89 -0
  78. package/dist/core/skills/install-command.js.map +1 -0
  79. package/dist/core/skills/package.d.ts.map +1 -1
  80. package/dist/core/skills/package.js +10 -3
  81. package/dist/core/skills/package.js.map +1 -1
  82. package/dist/core/skills/policy.d.ts +5 -1
  83. package/dist/core/skills/policy.d.ts.map +1 -1
  84. package/dist/core/skills/policy.js +66 -3
  85. package/dist/core/skills/policy.js.map +1 -1
  86. package/dist/core/skills/references.d.ts +9 -1
  87. package/dist/core/skills/references.d.ts.map +1 -1
  88. package/dist/core/skills/references.js +35 -2
  89. package/dist/core/skills/references.js.map +1 -1
  90. package/dist/core/skills/registry-paths.d.ts +1 -0
  91. package/dist/core/skills/registry-paths.d.ts.map +1 -1
  92. package/dist/core/skills/registry-paths.js +3 -0
  93. package/dist/core/skills/registry-paths.js.map +1 -1
  94. package/dist/core/skills/session-resolver.d.ts +2 -1
  95. package/dist/core/skills/session-resolver.d.ts.map +1 -1
  96. package/dist/core/skills/session-resolver.js +1 -0
  97. package/dist/core/skills/session-resolver.js.map +1 -1
  98. package/dist/core/skills/session-runtime.d.ts.map +1 -1
  99. package/dist/core/skills/session-runtime.js +2 -0
  100. package/dist/core/skills/session-runtime.js.map +1 -1
  101. package/dist/core/skills/sources.d.ts +23 -0
  102. package/dist/core/skills/sources.d.ts.map +1 -1
  103. package/dist/core/skills/sources.js +128 -12
  104. package/dist/core/skills/sources.js.map +1 -1
  105. package/dist/core/skills/types.d.ts +22 -1
  106. package/dist/core/skills/types.d.ts.map +1 -1
  107. package/dist/core/terminal-write-auth.d.ts +4 -4
  108. package/dist/core/terminal-write-auth.d.ts.map +1 -1
  109. package/dist/core/terminal-write-auth.js +18 -6
  110. package/dist/core/terminal-write-auth.js.map +1 -1
  111. package/dist/core/types.d.ts +2 -0
  112. package/dist/core/types.d.ts.map +1 -1
  113. package/dist/core/types.js.map +1 -1
  114. package/dist/core/worker-pool.d.ts.map +1 -1
  115. package/dist/core/worker-pool.js +52 -1
  116. package/dist/core/worker-pool.js.map +1 -1
  117. package/dist/daemon.d.ts +1 -0
  118. package/dist/daemon.d.ts.map +1 -1
  119. package/dist/daemon.js +101 -12
  120. package/dist/daemon.js.map +1 -1
  121. package/dist/dashboard/auth.d.ts +21 -11
  122. package/dist/dashboard/auth.d.ts.map +1 -1
  123. package/dist/dashboard/auth.js +39 -25
  124. package/dist/dashboard/auth.js.map +1 -1
  125. package/dist/dashboard/bot-onboarding.d.ts.map +1 -1
  126. package/dist/dashboard/bot-onboarding.js +2 -114
  127. package/dist/dashboard/bot-onboarding.js.map +1 -1
  128. package/dist/dashboard/bot-payload.d.ts +0 -1
  129. package/dist/dashboard/bot-payload.d.ts.map +1 -1
  130. package/dist/dashboard/bot-payload.js +0 -1
  131. package/dist/dashboard/bot-payload.js.map +1 -1
  132. package/dist/dashboard/connector-api.d.ts.map +1 -1
  133. package/dist/dashboard/connector-api.js +66 -6
  134. package/dist/dashboard/connector-api.js.map +1 -1
  135. package/dist/dashboard/dashboard-summary-endpoint.d.ts +39 -0
  136. package/dist/dashboard/dashboard-summary-endpoint.d.ts.map +1 -0
  137. package/dist/dashboard/dashboard-summary-endpoint.js +50 -0
  138. package/dist/dashboard/dashboard-summary-endpoint.js.map +1 -0
  139. package/dist/dashboard/dashboard-summary.d.ts +62 -0
  140. package/dist/dashboard/dashboard-summary.d.ts.map +1 -0
  141. package/dist/dashboard/dashboard-summary.js +106 -0
  142. package/dist/dashboard/dashboard-summary.js.map +1 -0
  143. package/dist/dashboard/public-redact.d.ts.map +1 -1
  144. package/dist/dashboard/public-redact.js +3 -0
  145. package/dist/dashboard/public-redact.js.map +1 -1
  146. package/dist/dashboard/skill-install-request.js +10 -11
  147. package/dist/dashboard/skill-install-request.js.map +1 -1
  148. package/dist/dashboard/skill-pack-response.d.ts +15 -0
  149. package/dist/dashboard/skill-pack-response.d.ts.map +1 -0
  150. package/dist/dashboard/skill-pack-response.js +32 -0
  151. package/dist/dashboard/skill-pack-response.js.map +1 -0
  152. package/dist/dashboard/web/connectors-page.d.ts +69 -0
  153. package/dist/dashboard/web/connectors-page.d.ts.map +1 -1
  154. package/dist/dashboard/web/connectors-page.js +47 -7
  155. package/dist/dashboard/web/connectors-page.js.map +1 -1
  156. package/dist/dashboard/web/feed-group-picker.d.ts +13 -0
  157. package/dist/dashboard/web/feed-group-picker.d.ts.map +1 -0
  158. package/dist/dashboard/web/feed-group-picker.js +45 -0
  159. package/dist/dashboard/web/feed-group-picker.js.map +1 -0
  160. package/dist/dashboard/web/groups-page.d.ts.map +1 -1
  161. package/dist/dashboard/web/groups-page.js +2 -5
  162. package/dist/dashboard/web/groups-page.js.map +1 -1
  163. package/dist/dashboard/web/i18n.d.ts.map +1 -1
  164. package/dist/dashboard/web/i18n.js +309 -40
  165. package/dist/dashboard/web/i18n.js.map +1 -1
  166. package/dist/dashboard/web/preferences.d.ts +4 -2
  167. package/dist/dashboard/web/preferences.d.ts.map +1 -1
  168. package/dist/dashboard/web/preferences.js +14 -6
  169. package/dist/dashboard/web/preferences.js.map +1 -1
  170. package/dist/dashboard/web/roles-page.d.ts.map +1 -1
  171. package/dist/dashboard/web/roles-page.js +36 -4
  172. package/dist/dashboard/web/roles-page.js.map +1 -1
  173. package/dist/dashboard/web/roles.d.ts +3 -1
  174. package/dist/dashboard/web/roles.d.ts.map +1 -1
  175. package/dist/dashboard/web/roles.js +10 -2
  176. package/dist/dashboard/web/roles.js.map +1 -1
  177. package/dist/dashboard/web/schedules-page.d.ts.map +1 -1
  178. package/dist/dashboard/web/schedules-page.js +8 -2
  179. package/dist/dashboard/web/schedules-page.js.map +1 -1
  180. package/dist/dashboard/web/sessions-page.d.ts.map +1 -1
  181. package/dist/dashboard/web/sessions-page.js +101 -5
  182. package/dist/dashboard/web/sessions-page.js.map +1 -1
  183. package/dist/dashboard/web/sessions.d.ts +3 -1
  184. package/dist/dashboard/web/sessions.d.ts.map +1 -1
  185. package/dist/dashboard/web/sessions.js +13 -6
  186. package/dist/dashboard/web/sessions.js.map +1 -1
  187. package/dist/dashboard/web/skills/bot-assignments-tab.d.ts +27 -0
  188. package/dist/dashboard/web/skills/bot-assignments-tab.d.ts.map +1 -0
  189. package/dist/dashboard/web/skills/bot-assignments-tab.js +257 -0
  190. package/dist/dashboard/web/skills/bot-assignments-tab.js.map +1 -0
  191. package/dist/dashboard/web/skills/delivery-settings-tab.d.ts +25 -0
  192. package/dist/dashboard/web/skills/delivery-settings-tab.d.ts.map +1 -0
  193. package/dist/dashboard/web/skills/delivery-settings-tab.js +20 -0
  194. package/dist/dashboard/web/skills/delivery-settings-tab.js.map +1 -0
  195. package/dist/dashboard/web/skills/shared.d.ts +86 -0
  196. package/dist/dashboard/web/skills/shared.d.ts.map +1 -0
  197. package/dist/dashboard/web/skills/shared.js +178 -0
  198. package/dist/dashboard/web/skills/shared.js.map +1 -0
  199. package/dist/dashboard/web/skills/skill-library-tab.d.ts +75 -0
  200. package/dist/dashboard/web/skills/skill-library-tab.d.ts.map +1 -0
  201. package/dist/dashboard/web/skills/skill-library-tab.js +108 -0
  202. package/dist/dashboard/web/skills/skill-library-tab.js.map +1 -0
  203. package/dist/dashboard/web/skills/skill-packs-tab.d.ts +21 -0
  204. package/dist/dashboard/web/skills/skill-packs-tab.d.ts.map +1 -0
  205. package/dist/dashboard/web/skills/skill-packs-tab.js +185 -0
  206. package/dist/dashboard/web/skills/skill-packs-tab.js.map +1 -0
  207. package/dist/dashboard/web/skills/types.d.ts +95 -0
  208. package/dist/dashboard/web/skills/types.d.ts.map +1 -0
  209. package/dist/dashboard/web/skills/types.js +2 -0
  210. package/dist/dashboard/web/skills/types.js.map +1 -0
  211. package/dist/dashboard/web/skills/use-skills-data.d.ts +31 -0
  212. package/dist/dashboard/web/skills/use-skills-data.d.ts.map +1 -0
  213. package/dist/dashboard/web/skills/use-skills-data.js +86 -0
  214. package/dist/dashboard/web/skills/use-skills-data.js.map +1 -0
  215. package/dist/dashboard/web/skills-page.d.ts +34 -31
  216. package/dist/dashboard/web/skills-page.d.ts.map +1 -1
  217. package/dist/dashboard/web/skills-page.js +321 -176
  218. package/dist/dashboard/web/skills-page.js.map +1 -1
  219. package/dist/dashboard/webhook-routes.d.ts +18 -0
  220. package/dist/dashboard/webhook-routes.d.ts.map +1 -1
  221. package/dist/dashboard/webhook-routes.js +35 -1
  222. package/dist/dashboard/webhook-routes.js.map +1 -1
  223. package/dist/dashboard-web/app.js +1 -1
  224. package/dist/dashboard-web/chunks/{bot-defaults-page-GED4FEMS.js → bot-defaults-page-HL655CNR.js} +1 -1
  225. package/dist/dashboard-web/chunks/{chunk-HK7NIBJG.js → chunk-5PAYQ3KT.js} +1 -1
  226. package/dist/dashboard-web/chunks/{chunk-KRHWZEXU.js → chunk-5ZL7NLR5.js} +1 -1
  227. package/dist/dashboard-web/chunks/chunk-6ALR252E.js +1 -0
  228. package/dist/dashboard-web/chunks/{chunk-VBXJOJFH.js → chunk-BFUTTYVK.js} +1 -1
  229. package/dist/dashboard-web/chunks/chunk-ELL53D62.js +55 -0
  230. package/dist/dashboard-web/chunks/connectors-page-3QQACF23.js +1 -0
  231. package/dist/dashboard-web/chunks/groups-page-SDZMJ7UV.js +8 -0
  232. package/dist/dashboard-web/chunks/{insights-page-54UBPPOC.js → insights-page-ZZ3JEJ6L.js} +1 -1
  233. package/dist/dashboard-web/chunks/{monitor-room-PORHVKRH.js → monitor-room-ROJ5GZ4N.js} +1 -1
  234. package/dist/dashboard-web/chunks/{monitoring-page-XGA7AXNL.js → monitoring-page-IATV7KJF.js} +1 -1
  235. package/dist/dashboard-web/chunks/{office-page-AO3AFG45.js → office-page-TYO5OIIT.js} +1 -1
  236. package/dist/dashboard-web/chunks/{overview-page-F5BUTYR6.js → overview-page-VJUULZF2.js} +1 -1
  237. package/dist/dashboard-web/chunks/roles-page-7RJJKZGK.js +1 -0
  238. package/dist/dashboard-web/chunks/schedules-page-JTEJ5IXW.js +1 -0
  239. package/dist/dashboard-web/chunks/sessions-page-KD7HDT3U.js +8 -0
  240. package/dist/dashboard-web/chunks/{settings-page-OJAZLZQT.js → settings-page-7CTTFBRS.js} +1 -1
  241. package/dist/dashboard-web/chunks/skills-page-57NZECJ3.js +4 -0
  242. package/dist/dashboard-web/chunks/{team-federation-page-ZJVAP7HW.js → team-federation-page-6YYIMJG3.js} +1 -1
  243. package/dist/dashboard-web/chunks/{v3-page-GYWTRGO2.js → v3-page-ZGKBSBK3.js} +1 -1
  244. package/dist/dashboard-web/chunks/{whiteboards-page-MSDAG6P7.js → whiteboards-page-AACJF6DB.js} +1 -1
  245. package/dist/dashboard-web/style.css +1952 -377
  246. package/dist/dashboard.js +316 -47
  247. package/dist/dashboard.js.map +1 -1
  248. package/dist/desktop/main/ipc.js +1 -1
  249. package/dist/desktop/main/runtime-service.js +2 -2
  250. package/dist/desktop/main/runtime-service.js.map +1 -1
  251. package/dist/desktop/shared/types.d.ts +1 -1
  252. package/dist/i18n/en.d.ts.map +1 -1
  253. package/dist/i18n/en.js +5 -1
  254. package/dist/i18n/en.js.map +1 -1
  255. package/dist/i18n/zh.d.ts.map +1 -1
  256. package/dist/i18n/zh.js +5 -1
  257. package/dist/i18n/zh.js.map +1 -1
  258. package/dist/index-daemon.js +6 -1
  259. package/dist/index-daemon.js.map +1 -1
  260. package/dist/services/adopt-input-sequence.d.ts +52 -0
  261. package/dist/services/adopt-input-sequence.d.ts.map +1 -0
  262. package/dist/services/adopt-input-sequence.js +50 -0
  263. package/dist/services/adopt-input-sequence.js.map +1 -0
  264. package/dist/services/bridge-fallback-gate.d.ts.map +1 -1
  265. package/dist/services/bridge-fallback-gate.js +34 -11
  266. package/dist/services/bridge-fallback-gate.js.map +1 -1
  267. package/dist/services/codex-bridge-queue.d.ts +103 -7
  268. package/dist/services/codex-bridge-queue.d.ts.map +1 -1
  269. package/dist/services/codex-bridge-queue.js +291 -17
  270. package/dist/services/codex-bridge-queue.js.map +1 -1
  271. package/dist/services/codex-transcript.d.ts +4 -3
  272. package/dist/services/codex-transcript.d.ts.map +1 -1
  273. package/dist/services/codex-transcript.js.map +1 -1
  274. package/dist/services/connector-store.d.ts +14 -1
  275. package/dist/services/connector-store.d.ts.map +1 -1
  276. package/dist/services/connector-store.js.map +1 -1
  277. package/dist/services/connector-topic-template.d.ts +7 -0
  278. package/dist/services/connector-topic-template.d.ts.map +1 -0
  279. package/dist/services/connector-topic-template.js +210 -0
  280. package/dist/services/connector-topic-template.js.map +1 -0
  281. package/dist/services/project-scanner.d.ts +33 -0
  282. package/dist/services/project-scanner.d.ts.map +1 -1
  283. package/dist/services/project-scanner.js +40 -1
  284. package/dist/services/project-scanner.js.map +1 -1
  285. package/dist/services/skill-pack-store.d.ts +50 -0
  286. package/dist/services/skill-pack-store.d.ts.map +1 -0
  287. package/dist/services/skill-pack-store.js +270 -0
  288. package/dist/services/skill-pack-store.js.map +1 -0
  289. package/dist/services/skill-registry-store.d.ts +8 -0
  290. package/dist/services/skill-registry-store.d.ts.map +1 -1
  291. package/dist/services/skill-registry-store.js +100 -68
  292. package/dist/services/skill-registry-store.js.map +1 -1
  293. package/dist/services/structured-bridge-clis.d.ts +8 -1
  294. package/dist/services/structured-bridge-clis.d.ts.map +1 -1
  295. package/dist/services/structured-bridge-clis.js +13 -0
  296. package/dist/services/structured-bridge-clis.js.map +1 -1
  297. package/dist/services/submit-confirmation.d.ts +50 -0
  298. package/dist/services/submit-confirmation.d.ts.map +1 -1
  299. package/dist/services/submit-confirmation.js +82 -0
  300. package/dist/services/submit-confirmation.js.map +1 -1
  301. package/dist/services/todo-state.d.ts +74 -0
  302. package/dist/services/todo-state.d.ts.map +1 -0
  303. package/dist/services/todo-state.js +351 -0
  304. package/dist/services/todo-state.js.map +1 -0
  305. package/dist/setup/agent-preset.d.ts.map +1 -1
  306. package/dist/setup/agent-preset.js +2 -0
  307. package/dist/setup/agent-preset.js.map +1 -1
  308. package/dist/setup/owner-identity.d.ts +47 -0
  309. package/dist/setup/owner-identity.d.ts.map +1 -0
  310. package/dist/setup/owner-identity.js +196 -0
  311. package/dist/setup/owner-identity.js.map +1 -0
  312. package/dist/setup/register-app.d.ts +4 -3
  313. package/dist/setup/register-app.d.ts.map +1 -1
  314. package/dist/setup/register-app.js.map +1 -1
  315. package/dist/setup/setup-args.d.ts +1 -1
  316. package/dist/setup/setup-args.d.ts.map +1 -1
  317. package/dist/setup/setup-args.js +7 -3
  318. package/dist/setup/setup-args.js.map +1 -1
  319. package/dist/types.d.ts +11 -0
  320. package/dist/types.d.ts.map +1 -1
  321. package/dist/utils/async-serial-queue.d.ts +9 -0
  322. package/dist/utils/async-serial-queue.d.ts.map +1 -0
  323. package/dist/utils/async-serial-queue.js +13 -0
  324. package/dist/utils/async-serial-queue.js.map +1 -0
  325. package/dist/utils/child-env.d.ts +25 -0
  326. package/dist/utils/child-env.d.ts.map +1 -1
  327. package/dist/utils/child-env.js +47 -0
  328. package/dist/utils/child-env.js.map +1 -1
  329. package/dist/utils/runtime-screen-status.d.ts +52 -0
  330. package/dist/utils/runtime-screen-status.d.ts.map +1 -0
  331. package/dist/utils/runtime-screen-status.js +60 -0
  332. package/dist/utils/runtime-screen-status.js.map +1 -0
  333. package/dist/worker.js +1697 -468
  334. package/dist/worker.js.map +1 -1
  335. package/dist/workflows/definition.d.ts +44 -44
  336. package/package.json +1 -1
  337. package/dist/dashboard-web/chunks/chunk-6J5LS5AU.js +0 -51
  338. package/dist/dashboard-web/chunks/connectors-page-EELM66G3.js +0 -1
  339. package/dist/dashboard-web/chunks/groups-page-WKUV6E42.js +0 -8
  340. package/dist/dashboard-web/chunks/roles-page-M5GIASJU.js +0 -1
  341. package/dist/dashboard-web/chunks/schedules-page-O232WQRR.js +0 -1
  342. package/dist/dashboard-web/chunks/sessions-page-YFRPSTIL.js +0 -6
  343. package/dist/dashboard-web/chunks/skills-page-EFZQPWV4.js +0 -4
@@ -0,0 +1,270 @@
1
+ import { existsSync, mkdirSync, readFileSync } from 'node:fs';
2
+ import { dirname } from 'node:path';
3
+ import { atomicWriteFileSync } from '../utils/atomic-write.js';
4
+ import { withFileLockSync } from '../utils/file-lock.js';
5
+ import { skillPackRegistryPath } from '../core/skills/registry-paths.js';
6
+ const MAX_NAME_LENGTH = 80;
7
+ const MAX_DESCRIPTION_LENGTH = 500;
8
+ const MAX_TAGS = 20;
9
+ const MAX_TAG_LENGTH = 40;
10
+ const MAX_INCLUDE = 100;
11
+ const LOCK_WAIT_MS = 30_000;
12
+ export class SkillPackStoreError extends Error {
13
+ detail;
14
+ constructor(detail) {
15
+ super(detail.code);
16
+ this.detail = detail;
17
+ this.name = 'SkillPackStoreError';
18
+ }
19
+ }
20
+ function emptyRegistry() {
21
+ return { schemaVersion: 1, packs: {} };
22
+ }
23
+ function normalizeStoredTimestamp(value) {
24
+ if (typeof value !== 'string' || !value.trim() || Number.isNaN(Date.parse(value))) {
25
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'timestamps must be date strings' });
26
+ }
27
+ return value;
28
+ }
29
+ function normalizeStoredPack(key, raw) {
30
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw))
31
+ return undefined;
32
+ const value = raw;
33
+ try {
34
+ const id = validateId(value.id);
35
+ if (id !== key || validateId(key) !== key)
36
+ return undefined;
37
+ const revision = value.revision;
38
+ if (!Number.isSafeInteger(revision) || revision < 1) {
39
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'revision must be a positive integer' });
40
+ }
41
+ return {
42
+ id,
43
+ name: validateName(value.name),
44
+ description: validateDescription(value.description),
45
+ tags: normalizeTags(value.tags),
46
+ include: normalizeInclude(value.include),
47
+ revision: revision,
48
+ createdAt: normalizeStoredTimestamp(value.createdAt),
49
+ updatedAt: normalizeStoredTimestamp(value.updatedAt),
50
+ };
51
+ }
52
+ catch {
53
+ return undefined;
54
+ }
55
+ }
56
+ export function readSkillPackRegistry() {
57
+ return readSkillPackRegistryInternal(false);
58
+ }
59
+ /** Read-time callers stay tolerant so a damaged optional registry cannot take
60
+ * down session startup. Mutations must fail closed, however: treating an
61
+ * existing malformed file as empty and then writing it back would erase every
62
+ * recoverable pack on the next create/update/delete. */
63
+ function readSkillPackRegistryInternal(strict) {
64
+ const file = skillPackRegistryPath();
65
+ if (!existsSync(file))
66
+ return emptyRegistry();
67
+ let parsed;
68
+ try {
69
+ parsed = JSON.parse(readFileSync(file, 'utf-8'));
70
+ }
71
+ catch {
72
+ // Malformed JSON or an unreadable file must not take down the whole skill
73
+ // pipeline; bots keep working and invalid packs resolve to nothing.
74
+ if (strict) {
75
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'existing packs registry is unreadable or malformed' });
76
+ }
77
+ return emptyRegistry();
78
+ }
79
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
80
+ if (strict)
81
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'existing packs registry must be an object' });
82
+ return emptyRegistry();
83
+ }
84
+ const registry = parsed;
85
+ if (registry.schemaVersion !== 1 || !registry.packs || typeof registry.packs !== 'object' || Array.isArray(registry.packs)) {
86
+ if (strict)
87
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'existing packs registry schema is invalid' });
88
+ return emptyRegistry();
89
+ }
90
+ const packs = {};
91
+ for (const [key, raw] of Object.entries(registry.packs)) {
92
+ const pack = normalizeStoredPack(key, raw);
93
+ if (!pack) {
94
+ if (strict)
95
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: `stored pack "${key}" is invalid` });
96
+ continue;
97
+ }
98
+ packs[key] = pack;
99
+ }
100
+ return { schemaVersion: 1, packs };
101
+ }
102
+ function writeSkillPackRegistry(registry) {
103
+ mkdirSync(dirname(skillPackRegistryPath()), { recursive: true });
104
+ atomicWriteFileSync(skillPackRegistryPath(), JSON.stringify(registry, null, 2) + '\n', { mode: 0o600 });
105
+ }
106
+ function withSkillPackMutation(mutate) {
107
+ const file = skillPackRegistryPath();
108
+ mkdirSync(dirname(file), { recursive: true });
109
+ return withFileLockSync(file, () => {
110
+ const registry = readSkillPackRegistryInternal(true);
111
+ const result = mutate(registry);
112
+ writeSkillPackRegistry(registry);
113
+ return result;
114
+ }, { maxWaitMs: LOCK_WAIT_MS });
115
+ }
116
+ function isSkillSelector(value) {
117
+ return typeof value === 'string' && /^skill:.+$/.test(value);
118
+ }
119
+ function normalizeInclude(raw) {
120
+ if (!Array.isArray(raw))
121
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'include must be an array' });
122
+ const seen = new Set();
123
+ const out = [];
124
+ for (const item of raw) {
125
+ if (!isSkillSelector(item)) {
126
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID_SELECTOR', selector: String(item) });
127
+ }
128
+ if (seen.has(item))
129
+ continue;
130
+ seen.add(item);
131
+ out.push(item);
132
+ }
133
+ if (out.length === 0)
134
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'include must contain at least one skill' });
135
+ if (out.length > MAX_INCLUDE)
136
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: `include exceeds ${MAX_INCLUDE} skills` });
137
+ return out;
138
+ }
139
+ function normalizeTags(raw) {
140
+ if (raw === undefined || raw === null)
141
+ return undefined;
142
+ if (!Array.isArray(raw))
143
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'tags must be an array' });
144
+ const out = [];
145
+ for (const tag of raw) {
146
+ if (typeof tag !== 'string')
147
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'tags must be strings' });
148
+ const trimmed = tag.trim();
149
+ if (!trimmed)
150
+ continue;
151
+ if (trimmed.length > MAX_TAG_LENGTH)
152
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: `tag exceeds ${MAX_TAG_LENGTH} chars` });
153
+ if (!out.includes(trimmed))
154
+ out.push(trimmed);
155
+ }
156
+ if (out.length > MAX_TAGS)
157
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: `tags exceed ${MAX_TAGS}` });
158
+ return out.length > 0 ? out : undefined;
159
+ }
160
+ function validateId(id) {
161
+ if (typeof id !== 'string' || !/^[a-z0-9][a-z0-9-]*$/.test(id)) {
162
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'id must be a lowercase slug (a-z, 0-9, -)' });
163
+ }
164
+ return id;
165
+ }
166
+ function validateName(name) {
167
+ if (typeof name !== 'string' || !name.trim()) {
168
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'name is required' });
169
+ }
170
+ const trimmed = name.trim();
171
+ if (trimmed.length > MAX_NAME_LENGTH) {
172
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: `name exceeds ${MAX_NAME_LENGTH} chars` });
173
+ }
174
+ return trimmed;
175
+ }
176
+ function validateDescription(description) {
177
+ if (description === undefined || description === null)
178
+ return undefined;
179
+ if (typeof description !== 'string') {
180
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: 'description must be a string' });
181
+ }
182
+ const trimmed = description.trim();
183
+ if (!trimmed)
184
+ return undefined;
185
+ if (trimmed.length > MAX_DESCRIPTION_LENGTH) {
186
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_INVALID', reason: `description exceeds ${MAX_DESCRIPTION_LENGTH} chars` });
187
+ }
188
+ return trimmed;
189
+ }
190
+ export function listSkillPacks() {
191
+ return Object.values(readSkillPackRegistry().packs).sort((a, b) => a.name.localeCompare(b.name));
192
+ }
193
+ export function getSkillPack(id) {
194
+ const packs = readSkillPackRegistry().packs;
195
+ return Object.hasOwn(packs, id) ? packs[id] : undefined;
196
+ }
197
+ export function createSkillPack(input) {
198
+ const id = validateId(input.id);
199
+ return withSkillPackMutation((registry) => {
200
+ if (Object.hasOwn(registry.packs, id)) {
201
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_ID_CONFLICT', id });
202
+ }
203
+ const now = new Date().toISOString();
204
+ const pack = {
205
+ id,
206
+ name: validateName(input.name),
207
+ description: validateDescription(input.description),
208
+ tags: normalizeTags(input.tags),
209
+ include: normalizeInclude(input.include),
210
+ revision: 1,
211
+ createdAt: now,
212
+ updatedAt: now,
213
+ };
214
+ registry.packs[id] = pack;
215
+ return pack;
216
+ });
217
+ }
218
+ export function updateSkillPack(id, input) {
219
+ return withSkillPackMutation((registry) => {
220
+ if (!Object.hasOwn(registry.packs, id))
221
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_NOT_FOUND', id });
222
+ const existing = registry.packs[id];
223
+ if (input.expectedRevision !== undefined && input.expectedRevision !== existing.revision) {
224
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_REVISION_CONFLICT', id, current: existing.revision });
225
+ }
226
+ const updated = {
227
+ ...existing,
228
+ name: input.name !== undefined ? validateName(input.name) : existing.name,
229
+ description: input.description !== undefined ? validateDescription(input.description) : existing.description,
230
+ tags: input.tags !== undefined ? normalizeTags(input.tags) : existing.tags,
231
+ include: input.include !== undefined ? normalizeInclude(input.include) : existing.include,
232
+ revision: existing.revision + 1,
233
+ updatedAt: new Date().toISOString(),
234
+ };
235
+ registry.packs[id] = updated;
236
+ return updated;
237
+ });
238
+ }
239
+ export function deleteSkillPack(id) {
240
+ withSkillPackMutation((registry) => {
241
+ if (!Object.hasOwn(registry.packs, id))
242
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_NOT_FOUND', id });
243
+ delete registry.packs[id];
244
+ });
245
+ }
246
+ export function cloneSkillPack(id, newId) {
247
+ const targetId = validateId(newId);
248
+ return withSkillPackMutation((registry) => {
249
+ if (!Object.hasOwn(registry.packs, id))
250
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_NOT_FOUND', id });
251
+ const source = registry.packs[id];
252
+ if (Object.hasOwn(registry.packs, targetId)) {
253
+ throw new SkillPackStoreError({ code: 'SKILL_PACK_ID_CONFLICT', id: targetId });
254
+ }
255
+ const now = new Date().toISOString();
256
+ const clone = {
257
+ id: targetId,
258
+ name: validateName(`${source.name} (copy)`),
259
+ description: source.description,
260
+ tags: source.tags ? [...source.tags] : undefined,
261
+ include: [...source.include],
262
+ revision: 1,
263
+ createdAt: now,
264
+ updatedAt: now,
265
+ };
266
+ registry.packs[targetId] = clone;
267
+ return clone;
268
+ });
269
+ }
270
+ //# sourceMappingURL=skill-pack-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-pack-store.js","sourceRoot":"","sources":["../../src/services/skill-pack-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAGzE,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,sBAAsB,GAAG,GAAG,CAAC;AACnC,MAAM,QAAQ,GAAG,EAAE,CAAC;AACpB,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,WAAW,GAAG,GAAG,CAAC;AACxB,MAAM,YAAY,GAAG,MAAM,CAAC;AA6B5B,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAChB;IAA5B,YAA4B,MAAiC;QAC3D,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QADO,WAAM,GAAN,MAAM,CAA2B;QAE3D,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AAED,SAAS,aAAa;IACpB,OAAO,EAAE,aAAa,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AACzC,CAAC;AAED,SAAS,wBAAwB,CAAC,KAAc;IAC9C,IAAI,OAAO,KAAK,KAAK,QAAQ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CAAC,CAAC;QAC5G,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClC,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC;YAC5C,MAAM,IAAI,mBAAmB,CAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAClF,CAAC;QACD,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACrC,MAAM,KAAK,GAAc;YACvB,EAAE,EAAE,QAAQ;YACZ,IAAI,EAAE,YAAY,CAAC,GAAG,MAAM,CAAC,IAAI,SAAS,CAAC;YAC3C,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;YAChD,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;YAC5B,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;SACf,CAAC;QACF,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC;QACjC,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -14,6 +14,9 @@ export interface SkillSourceDiscovery {
14
14
  /** True when the source resolves its own skill set (agentbuddy) — the dashboard
15
15
  * installs it directly, skipping the discover-then-select step. */
16
16
  directInstall?: boolean;
17
+ /** True when discovery fell back to a full-depth recursive scan. The UI
18
+ * surfaces this so the deeper (slower) scan is visible rather than silent. */
19
+ deepScanned?: boolean;
17
20
  }
18
21
  export interface SkillInstallSelection {
19
22
  skillNames?: string[];
@@ -47,6 +50,7 @@ export declare function installLocalSkill(dir: string, opts: {
47
50
  export declare function installLocalSkillLinks(dirs: readonly string[]): SkillPackage[];
48
51
  export declare function discoverLocalSkillCandidates(rootDir: string, opts?: {
49
52
  fullDepth?: boolean;
53
+ fallbackToFullDepth?: boolean;
50
54
  }): SkillSourceDiscovery;
51
55
  export declare function installLocalSkillsFromSource(rootDir: string, opts: {
52
56
  link: boolean;
@@ -56,12 +60,16 @@ export declare function discoverGitSkillCandidates(opts: {
56
60
  ref?: string;
57
61
  path?: string;
58
62
  fullDepth?: boolean;
63
+ fallbackToFullDepth?: boolean;
59
64
  }): SkillSourceDiscovery;
60
65
  export declare function discoverGitSkillCandidatesAsync(opts: {
61
66
  url: string;
62
67
  ref?: string;
63
68
  path?: string;
64
69
  fullDepth?: boolean;
70
+ /** Retry recursively against the same checkout so mixed repository layouts
71
+ * produce the same candidate set during discovery and installation. */
72
+ fallbackToFullDepth?: boolean;
65
73
  }): Promise<SkillSourceDiscovery>;
66
74
  export declare function installGitSkill(opts: {
67
75
  url: string;
@@ -1 +1 @@
1
- {"version":3,"file":"skill-registry-store.d.ts","sourceRoot":"","sources":["../../src/services/skill-registry-store.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAMlE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,wBAAwB,EAAE,CAAC;IACnC;wEACoE;IACpE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,E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AE,MAAM,EAAE,CAAA;CAAE,GAC/B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAepD;AAYD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA+BpH;AAED,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CA+BxI"}
@@ -8,23 +8,32 @@ import { withFileLock, withFileLockSync } from '../utils/file-lock.js';
8
8
  import { githubGitAuthEnv } from '../core/github-auth.js';
9
9
  import { loadSkillPackage } from '../core/skills/package.js';
10
10
  import { skillRegistryPath, skillSourcesDir, skillStoreDir } from '../core/skills/registry-paths.js';
11
- import { assertAllowedGitProtocol, assertNoGitUrlCredentials, assertSafeGitRef, assertSafeGitSkillPath, githubToGitUrl, redactGitUrlCredentials } from '../core/skills/sources.js';
11
+ import { assertAllowedGitProtocol, assertNoGitUrlCredentials, assertSafeGitRef, assertSafeGitSkillPath, formatAgentbuddyIdentifier, githubToGitUrl, redactGitUrlCredentials } from '../core/skills/sources.js';
12
12
  const DEFAULT_GIT_TIMEOUT_MS = 60_000;
13
13
  const execFileAsync = promisify(execFile);
14
14
  const gitSourceLocks = new Map();
15
+ function emptySkillRegistryMap() {
16
+ return Object.create(null);
17
+ }
15
18
  export function readSkillRegistry() {
16
19
  const file = skillRegistryPath();
17
20
  if (!existsSync(file))
18
- return { schemaVersion: 1, skills: {} };
21
+ return { schemaVersion: 1, skills: emptySkillRegistryMap() };
19
22
  try {
20
23
  const parsed = JSON.parse(readFileSync(file, 'utf-8'));
24
+ const skills = emptySkillRegistryMap();
25
+ if (parsed?.skills && typeof parsed.skills === 'object' && !Array.isArray(parsed.skills)) {
26
+ for (const [name, skill] of Object.entries(parsed.skills)) {
27
+ skills[name] = skill;
28
+ }
29
+ }
21
30
  return {
22
31
  schemaVersion: 1,
23
- skills: parsed?.skills && typeof parsed.skills === 'object' ? parsed.skills : {},
32
+ skills,
24
33
  };
25
34
  }
26
35
  catch {
27
- return { schemaVersion: 1, skills: {} };
36
+ return { schemaVersion: 1, skills: emptySkillRegistryMap() };
28
37
  }
29
38
  }
30
39
  function writeSkillRegistry(registry) {
@@ -230,17 +239,34 @@ function dedupeAndSortCandidates(candidates) {
230
239
  byPath.set(candidate.path, candidate);
231
240
  return [...byPath.values()].sort((a, b) => a.path.localeCompare(b.path));
232
241
  }
233
- function walkSkillDirs(parentDir, dir, out, depth) {
242
+ const INCIDENTAL_DISCOVERY_DIRS = new Set([
243
+ 'assets',
244
+ 'example',
245
+ 'examples',
246
+ 'fixtures',
247
+ 'images',
248
+ 'test',
249
+ 'tests',
250
+ ]);
251
+ function walkSkillDirs(parentDir, dir, out, depth, opts = {}) {
234
252
  if (depth > 4)
235
253
  return;
236
254
  for (const child of listChildDirs(dir)) {
237
- const name = child.split('/').pop() ?? '';
255
+ const name = basename(child);
238
256
  if (name === '.git' || name === 'node_modules')
239
257
  continue;
240
258
  const candidate = candidateFromDir(parentDir, child);
241
- if (candidate)
259
+ if (candidate) {
242
260
  out.push(candidate);
243
- walkSkillDirs(parentDir, child, out, depth + 1);
261
+ // A discovered skill is a package boundary. During automatic fallback,
262
+ // do not mistake bundled examples or fixtures for sibling skills.
263
+ if (opts.skipIncidental)
264
+ continue;
265
+ }
266
+ else if (opts.skipIncidental && INCIDENTAL_DISCOVERY_DIRS.has(name.toLowerCase())) {
267
+ continue;
268
+ }
269
+ walkSkillDirs(parentDir, child, out, depth + 1, opts);
244
270
  }
245
271
  }
246
272
  export function discoverLocalSkillCandidates(rootDir, opts = {}) {
@@ -250,31 +276,39 @@ export function discoverLocalSkillCandidates(rootDir, opts = {}) {
250
276
  const rootCandidate = candidateFromDir(sourceDir, sourceDir);
251
277
  if (rootCandidate) {
252
278
  candidates.push(rootCandidate);
253
- if (!opts.fullDepth)
279
+ if (!opts.fullDepth && !opts.fallbackToFullDepth) {
254
280
  return { skills: dedupeAndSortCandidates(candidates) };
281
+ }
255
282
  }
256
283
  // Native CLI libraries are themselves named `skills` (for example
257
284
  // ~/.claude/skills). When callers pass that library root directly, scan its
258
285
  // immediate children instead of looking for a redundant skills/skills layer.
259
286
  // Check both the requested and canonical paths so a symlink named `skills`
260
287
  // still gets the expected behavior after realpath resolution.
261
- if (basename(requestedDir) === 'skills' || basename(sourceDir) === 'skills') {
262
- for (const child of listChildDirs(sourceDir)) {
288
+ const scanShallowRoot = (libraryRoot) => {
289
+ for (const child of listChildDirs(libraryRoot)) {
263
290
  const candidate = candidateFromDir(sourceDir, child);
264
291
  if (candidate)
265
292
  candidates.push(candidate);
266
293
  }
294
+ };
295
+ if (basename(requestedDir) === 'skills' || basename(sourceDir) === 'skills') {
296
+ scanShallowRoot(sourceDir);
267
297
  }
268
298
  for (const relativeRoot of ['skills', '.agents/skills', '.botmux/skills']) {
269
- for (const child of listChildDirs(join(sourceDir, relativeRoot))) {
270
- const candidate = candidateFromDir(sourceDir, child);
271
- if (candidate)
272
- candidates.push(candidate);
273
- }
299
+ scanShallowRoot(join(sourceDir, relativeRoot));
274
300
  }
275
- if (opts.fullDepth)
301
+ const useFallback = !opts.fullDepth && opts.fallbackToFullDepth === true;
302
+ if (opts.fullDepth) {
276
303
  walkSkillDirs(sourceDir, sourceDir, candidates, 0);
277
- return { skills: dedupeAndSortCandidates(candidates) };
304
+ }
305
+ else if (useFallback) {
306
+ walkSkillDirs(sourceDir, sourceDir, candidates, 0, { skipIncidental: true });
307
+ }
308
+ return {
309
+ skills: dedupeAndSortCandidates(candidates),
310
+ ...(useFallback ? { deepScanned: true } : {}),
311
+ };
278
312
  }
279
313
  function selectDiscoveredSkills(candidates, selection = {}) {
280
314
  if (candidates.length === 0)
@@ -300,7 +334,10 @@ function selectDiscoveredSkills(candidates, selection = {}) {
300
334
  }
301
335
  export function installLocalSkillsFromSource(rootDir, opts) {
302
336
  const sourceDir = resolve(rootDir);
303
- const discovery = discoverLocalSkillCandidates(sourceDir, { fullDepth: opts.fullDepth });
337
+ const discovery = discoverLocalSkillCandidates(sourceDir, {
338
+ fullDepth: opts.fullDepth,
339
+ fallbackToFullDepth: !opts.fullDepth,
340
+ });
304
341
  return selectDiscoveredSkills(discovery.skills, opts).map(candidate => {
305
342
  const skillDir = candidate.path === '.' ? sourceDir : join(sourceDir, candidate.path);
306
343
  return installLocalSkill(skillDir, { link: opts.link });
@@ -614,7 +651,10 @@ function discoverCheckedOutGitSource(sourceDir, commit, opts) {
614
651
  }
615
652
  return {
616
653
  commit,
617
- skills: discoverLocalSkillCandidates(sourceDir, { fullDepth: opts.fullDepth }).skills,
654
+ ...discoverLocalSkillCandidates(sourceDir, {
655
+ fullDepth: opts.fullDepth,
656
+ fallbackToFullDepth: opts.fallbackToFullDepth,
657
+ }),
618
658
  };
619
659
  }
620
660
  function checkoutTemporaryGitSource(url, refValue) {
@@ -695,47 +735,43 @@ export function installGitSkill(opts) {
695
735
  return withGitSourceLockSync(opts.url, () => installGitSkillLocked(opts));
696
736
  }
697
737
  function installGitSkillLocked(opts) {
698
- const { sourceDir, ref, commit } = checkoutGitSource(opts.url, opts.ref);
738
+ const checkout = checkoutGitSource(opts.url, opts.ref);
739
+ return persistInstalledGitSkills([
740
+ copyGitSkillFromCheckout({ ...opts, ...checkout }),
741
+ ])[0];
742
+ }
743
+ function copyGitSkillFromCheckout(opts) {
699
744
  const source = opts.sourceOverride
700
745
  ? opts.sourceOverride.type === 'git' || opts.sourceOverride.type === 'github'
701
- ? { ...opts.sourceOverride, commit }
746
+ ? { ...opts.sourceOverride, commit: opts.commit }
702
747
  : opts.sourceOverride
703
- : { type: 'git', url: opts.url, path: opts.path, ref, commit };
704
- const skillDir = gitSkillDir(sourceDir, opts.path);
748
+ : { type: 'git', url: opts.url, path: opts.path, ref: opts.ref, commit: opts.commit };
749
+ const skillDir = gitSkillDir(opts.sourceDir, opts.path);
705
750
  const provisional = loadSkillPackage(skillDir, { source });
706
751
  const rootDir = join(skillStoreDir(), provisional.name);
707
752
  rmSync(rootDir, { recursive: true, force: true });
708
753
  mkdirSync(dirname(rootDir), { recursive: true });
709
754
  cpSync(skillDir, rootDir, { recursive: true });
710
- const pkg = loadSkillPackage(rootDir, { source, id: provisional.id });
755
+ return loadSkillPackage(rootDir, { source, id: provisional.id });
756
+ }
757
+ function persistInstalledGitSkills(packages) {
711
758
  const now = new Date().toISOString();
712
759
  const registry = readSkillRegistry();
713
- registry.skills[pkg.name] = { ...pkg, installedAt: now, updatedAt: now };
760
+ const installed = packages.map((pkg) => {
761
+ registry.skills[pkg.name] = { ...pkg, installedAt: now, updatedAt: now };
762
+ return registry.skills[pkg.name];
763
+ });
714
764
  writeSkillRegistry(registry);
715
- return registry.skills[pkg.name];
765
+ return installed;
716
766
  }
717
767
  export async function installGitSkillAsync(opts) {
718
768
  return withGitSourceLock(opts.url, () => installGitSkillAsyncLocked(opts));
719
769
  }
720
770
  async function installGitSkillAsyncLocked(opts) {
721
- const { sourceDir, ref, commit } = await checkoutGitSourceAsync(opts.url, opts.ref);
722
- const source = opts.sourceOverride
723
- ? opts.sourceOverride.type === 'git' || opts.sourceOverride.type === 'github'
724
- ? { ...opts.sourceOverride, commit }
725
- : opts.sourceOverride
726
- : { type: 'git', url: opts.url, path: opts.path, ref, commit };
727
- const skillDir = gitSkillDir(sourceDir, opts.path);
728
- const provisional = loadSkillPackage(skillDir, { source });
729
- const rootDir = join(skillStoreDir(), provisional.name);
730
- rmSync(rootDir, { recursive: true, force: true });
731
- mkdirSync(dirname(rootDir), { recursive: true });
732
- cpSync(skillDir, rootDir, { recursive: true });
733
- const pkg = loadSkillPackage(rootDir, { source, id: provisional.id });
734
- const now = new Date().toISOString();
735
- const registry = readSkillRegistry();
736
- registry.skills[pkg.name] = { ...pkg, installedAt: now, updatedAt: now };
737
- writeSkillRegistry(registry);
738
- return registry.skills[pkg.name];
771
+ const checkout = await checkoutGitSourceAsync(opts.url, opts.ref);
772
+ return persistInstalledGitSkills([
773
+ copyGitSkillFromCheckout({ ...opts, ...checkout }),
774
+ ])[0];
739
775
  }
740
776
  function sourceOverrideForCandidate(source, candidate) {
741
777
  if (!source)
@@ -749,31 +785,33 @@ function sourceOverrideForCandidate(source, candidate) {
749
785
  export function installGitSkillsFromSource(opts) {
750
786
  return withGitSourceLockSync(opts.url, () => {
751
787
  const checkout = checkoutGitSource(opts.url, opts.ref);
752
- const discovery = discoverCheckedOutGitSource(checkout.sourceDir, checkout.commit, { fullDepth: opts.fullDepth });
788
+ const discovery = discoverCheckedOutGitSource(checkout.sourceDir, checkout.commit, {
789
+ fullDepth: opts.fullDepth,
790
+ fallbackToFullDepth: !opts.fullDepth,
791
+ });
753
792
  const selected = selectDiscoveredSkills(discovery.skills, opts);
754
- return selected.map(candidate => installGitSkillLocked({
793
+ return persistInstalledGitSkills(selected.map(candidate => copyGitSkillFromCheckout({
794
+ ...checkout,
755
795
  url: opts.url,
756
796
  path: candidate.path,
757
- ref: opts.ref,
758
797
  sourceOverride: sourceOverrideForCandidate(opts.sourceOverride, candidate),
759
- }));
798
+ })));
760
799
  });
761
800
  }
762
801
  export async function installGitSkillsFromSourceAsync(opts) {
763
802
  return withGitSourceLock(opts.url, async () => {
764
803
  const checkout = await checkoutGitSourceAsync(opts.url, opts.ref);
765
- const discovery = discoverCheckedOutGitSource(checkout.sourceDir, checkout.commit, { fullDepth: opts.fullDepth });
804
+ const discovery = discoverCheckedOutGitSource(checkout.sourceDir, checkout.commit, {
805
+ fullDepth: opts.fullDepth,
806
+ fallbackToFullDepth: !opts.fullDepth,
807
+ });
766
808
  const selected = selectDiscoveredSkills(discovery.skills, opts);
767
- const installed = [];
768
- for (const candidate of selected) {
769
- installed.push(await installGitSkillAsyncLocked({
770
- url: opts.url,
771
- path: candidate.path,
772
- ref: opts.ref,
773
- sourceOverride: sourceOverrideForCandidate(opts.sourceOverride, candidate),
774
- }));
775
- }
776
- return installed;
809
+ return persistInstalledGitSkills(selected.map(candidate => copyGitSkillFromCheckout({
810
+ ...checkout,
811
+ url: opts.url,
812
+ path: candidate.path,
813
+ sourceOverride: sourceOverrideForCandidate(opts.sourceOverride, candidate),
814
+ })));
777
815
  });
778
816
  }
779
817
  // --- agentbuddy (external CLI) skill source ---------------------------------
@@ -961,12 +999,6 @@ function findSkillDirs(root) {
961
999
  walk(root);
962
1000
  return found;
963
1001
  }
964
- function agentbuddyIdentifier(opts) {
965
- const protocol = opts.protocol ?? 'skill';
966
- return opts.collection
967
- ? `${protocol}/collection/${opts.collection}`
968
- : `${protocol}/${opts.group}/${opts.skill}${opts.version ? `@${opts.version}` : ''}`;
969
- }
970
1002
  /** Register the skill dir(s) agentbuddy wrote into the staging tree into the
971
1003
  * botmux store. Shared by the sync (CLI) and async (dashboard job) install
972
1004
  * paths so they stay behaviourally identical.
@@ -1086,7 +1118,7 @@ async function runAgentbuddyCliAsync(args, cwd, failCode) {
1086
1118
  });
1087
1119
  }
1088
1120
  export function installAgentbuddySkill(opts, requireSkillName) {
1089
- const identifier = agentbuddyIdentifier(opts);
1121
+ const identifier = formatAgentbuddyIdentifier(opts);
1090
1122
  return withAgentbuddyLockSync(identifier, () => {
1091
1123
  const staging = join(skillSourcesDir(), 'agentbuddy', sourceId(identifier));
1092
1124
  rmSync(staging, { recursive: true, force: true });
@@ -1107,7 +1139,7 @@ export function installAgentbuddySkill(opts, requireSkillName) {
1107
1139
  * behaviour, but awaits the (minutes-long, network-bound) agentbuddy calls off
1108
1140
  * the daemon event loop instead of blocking it with execFileSync. */
1109
1141
  export async function installAgentbuddySkillAsync(opts, requireSkillName) {
1110
- const identifier = agentbuddyIdentifier(opts);
1142
+ const identifier = formatAgentbuddyIdentifier(opts);
1111
1143
  return withAgentbuddyLock(identifier, async () => {
1112
1144
  const staging = join(skillSourcesDir(), 'agentbuddy', sourceId(identifier));
1113
1145
  rmSync(staging, { recursive: true, force: true });