@skaile/workspaces 4.39.0 → 5.1.0

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 (392) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/asset-feeds-TU5CS6QL.js +131 -0
  3. package/dist/asset-feeds-TU5CS6QL.js.map +1 -0
  4. package/dist/asset-manager/catalog-deployer.js +12 -11
  5. package/dist/asset-manager/index.js +17 -16
  6. package/dist/asset-manager/installer.js +12 -11
  7. package/dist/asset-manager/src/catalog-deployer.d.ts +1 -3
  8. package/dist/asset-manager/src/catalog-deployer.d.ts.map +1 -1
  9. package/dist/asset-manager/src/index.d.ts +8 -9
  10. package/dist/asset-manager/src/index.d.ts.map +1 -1
  11. package/dist/bridge/drivers/claude-sdk.js +25 -13
  12. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  13. package/dist/bridge/drivers/codex.js +13 -12
  14. package/dist/bridge/drivers/codex.js.map +1 -1
  15. package/dist/bridge/drivers/continue.js +14 -13
  16. package/dist/bridge/drivers/continue.js.map +1 -1
  17. package/dist/bridge/drivers/echo.js +2 -2
  18. package/dist/bridge/drivers/gemini.js +6 -6
  19. package/dist/bridge/drivers/goose.js +14 -13
  20. package/dist/bridge/drivers/goose.js.map +1 -1
  21. package/dist/bridge/drivers/omp.js +3 -3
  22. package/dist/bridge/drivers/opencode.js +14 -13
  23. package/dist/bridge/drivers/opencode.js.map +1 -1
  24. package/dist/bridge/drivers/qwen.js +6 -6
  25. package/dist/bridge/index.js +15 -14
  26. package/dist/bridge/src/drivers/claude-sdk.d.ts +4 -0
  27. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  28. package/dist/bridge/src/types.d.ts +7 -0
  29. package/dist/bridge/src/types.d.ts.map +1 -1
  30. package/dist/{chunk-NLKIW2VI.js → chunk-2Y6DSR36.js} +5 -4
  31. package/dist/chunk-2Y6DSR36.js.map +1 -0
  32. package/dist/{chunk-H7N6RWNF.js → chunk-3KSAFYD4.js} +9 -5
  33. package/dist/chunk-3KSAFYD4.js.map +1 -0
  34. package/dist/{chunk-SM6EUQMY.js → chunk-3NGPZC44.js} +11 -11
  35. package/dist/chunk-3NGPZC44.js.map +1 -0
  36. package/dist/{chunk-A5EDMBFG.js → chunk-43ZBF3WH.js} +5 -8
  37. package/dist/chunk-43ZBF3WH.js.map +1 -0
  38. package/dist/{chunk-P7BU6DAC.js → chunk-55RMUF4G.js} +76 -33
  39. package/dist/chunk-55RMUF4G.js.map +1 -0
  40. package/dist/{chunk-TQ6XNACF.js → chunk-6LDUA57J.js} +25 -26
  41. package/dist/chunk-6LDUA57J.js.map +1 -0
  42. package/dist/chunk-A2ULN3KX.js +40 -0
  43. package/dist/chunk-A2ULN3KX.js.map +1 -0
  44. package/dist/{chunk-DSB6X25D.js → chunk-AG44ZJ7W.js} +3 -3
  45. package/dist/{chunk-DSB6X25D.js.map → chunk-AG44ZJ7W.js.map} +1 -1
  46. package/dist/{chunk-YCMZHL4T.js → chunk-AGWYBS2E.js} +6 -6
  47. package/dist/{chunk-YCMZHL4T.js.map → chunk-AGWYBS2E.js.map} +1 -1
  48. package/dist/{chunk-35G4M33T.js → chunk-AOMWF2OE.js} +4 -4
  49. package/dist/chunk-AOMWF2OE.js.map +1 -0
  50. package/dist/{chunk-X4DKUGV4.js → chunk-AYNPGPT5.js} +9 -15
  51. package/dist/chunk-AYNPGPT5.js.map +1 -0
  52. package/dist/{chunk-SSCPTAFJ.js → chunk-CI6FQ654.js} +3 -3
  53. package/dist/{chunk-SSCPTAFJ.js.map → chunk-CI6FQ654.js.map} +1 -1
  54. package/dist/{chunk-6X4DHKHP.js → chunk-CT6NQSA4.js} +3 -3
  55. package/dist/{chunk-6X4DHKHP.js.map → chunk-CT6NQSA4.js.map} +1 -1
  56. package/dist/{chunk-5K2VT6E2.js → chunk-DXUQCMVT.js} +3 -3
  57. package/dist/{chunk-5K2VT6E2.js.map → chunk-DXUQCMVT.js.map} +1 -1
  58. package/dist/{chunk-3C3ODIDE.js → chunk-E3ZACBHD.js} +13 -16
  59. package/dist/chunk-E3ZACBHD.js.map +1 -0
  60. package/dist/{chunk-C75VKXAM.js → chunk-E67J56FJ.js} +3 -3
  61. package/dist/{chunk-C75VKXAM.js.map → chunk-E67J56FJ.js.map} +1 -1
  62. package/dist/{chunk-B4IAZTZZ.js → chunk-EB6OPURC.js} +3 -3
  63. package/dist/{chunk-B4IAZTZZ.js.map → chunk-EB6OPURC.js.map} +1 -1
  64. package/dist/{chunk-VXPFSZDT.js → chunk-EPHQWHOH.js} +6 -6
  65. package/dist/{chunk-VXPFSZDT.js.map → chunk-EPHQWHOH.js.map} +1 -1
  66. package/dist/chunk-F7JHP7JV.js +122 -0
  67. package/dist/chunk-F7JHP7JV.js.map +1 -0
  68. package/dist/{chunk-FTPKMJFD.js → chunk-G47EV3V6.js} +2 -2
  69. package/dist/{chunk-FTPKMJFD.js.map → chunk-G47EV3V6.js.map} +1 -1
  70. package/dist/{chunk-252TK4RU.js → chunk-G4T7MYTA.js} +12 -14
  71. package/dist/chunk-G4T7MYTA.js.map +1 -0
  72. package/dist/{chunk-2EL2PBRC.js → chunk-H4EGUQ7M.js} +3 -3
  73. package/dist/{chunk-2EL2PBRC.js.map → chunk-H4EGUQ7M.js.map} +1 -1
  74. package/dist/{chunk-YV3YI3TA.js → chunk-IWCCZL7C.js} +17 -11
  75. package/dist/chunk-IWCCZL7C.js.map +1 -0
  76. package/dist/{chunk-QVLQGXT6.js → chunk-IYIIT4R3.js} +5 -5
  77. package/dist/{chunk-QVLQGXT6.js.map → chunk-IYIIT4R3.js.map} +1 -1
  78. package/dist/{chunk-YYH5EVPM.js → chunk-JUXQUZOQ.js} +12 -4
  79. package/dist/{chunk-YYH5EVPM.js.map → chunk-JUXQUZOQ.js.map} +1 -1
  80. package/dist/{chunk-BCUVRJXV.js → chunk-KAYH6AXN.js} +3 -3
  81. package/dist/{chunk-BCUVRJXV.js.map → chunk-KAYH6AXN.js.map} +1 -1
  82. package/dist/{chunk-JEPSP6XK.js → chunk-MXXKTQXJ.js} +18 -12
  83. package/dist/chunk-MXXKTQXJ.js.map +1 -0
  84. package/dist/{chunk-UDFWBALP.js → chunk-NFGRW3L7.js} +3 -3
  85. package/dist/{chunk-UDFWBALP.js.map → chunk-NFGRW3L7.js.map} +1 -1
  86. package/dist/{chunk-WCWFS36P.js → chunk-P5UQ56RA.js} +3 -3
  87. package/dist/{chunk-WCWFS36P.js.map → chunk-P5UQ56RA.js.map} +1 -1
  88. package/dist/{chunk-ORH2BZEM.js → chunk-QCI6D7E4.js} +69 -22
  89. package/dist/chunk-QCI6D7E4.js.map +1 -0
  90. package/dist/{chunk-5RWL4L3X.js → chunk-QFZFZXQW.js} +171 -28
  91. package/dist/chunk-QFZFZXQW.js.map +1 -0
  92. package/dist/{chunk-DIQDYNXZ.js → chunk-QZLWJETK.js} +3 -3
  93. package/dist/{chunk-DIQDYNXZ.js.map → chunk-QZLWJETK.js.map} +1 -1
  94. package/dist/{chunk-TSVRKUGV.js → chunk-RDTHJSGY.js} +11 -2
  95. package/dist/chunk-RDTHJSGY.js.map +1 -0
  96. package/dist/{chunk-QBQITQAM.js → chunk-RNNUYFFD.js} +3 -3
  97. package/dist/{chunk-QBQITQAM.js.map → chunk-RNNUYFFD.js.map} +1 -1
  98. package/dist/chunk-RVRB27AN.js +64 -0
  99. package/dist/chunk-RVRB27AN.js.map +1 -0
  100. package/dist/{chunk-XU7JET5Z.js → chunk-SP47UJKE.js} +37 -109
  101. package/dist/chunk-SP47UJKE.js.map +1 -0
  102. package/dist/{chunk-EB4ZTESQ.js → chunk-TOSHZX4C.js} +8 -3
  103. package/dist/chunk-TOSHZX4C.js.map +1 -0
  104. package/dist/{chunk-5NYBY6ZE.js → chunk-TVOODIZE.js} +3 -3
  105. package/dist/{chunk-5NYBY6ZE.js.map → chunk-TVOODIZE.js.map} +1 -1
  106. package/dist/{chunk-EOKAFBJ7.js → chunk-TYUJB336.js} +3 -3
  107. package/dist/{chunk-EOKAFBJ7.js.map → chunk-TYUJB336.js.map} +1 -1
  108. package/dist/{chunk-KAJH3XPW.js → chunk-U6K3I3AX.js} +3 -3
  109. package/dist/{chunk-KAJH3XPW.js.map → chunk-U6K3I3AX.js.map} +1 -1
  110. package/dist/{chunk-7RC37XFW.js → chunk-UMSWQKCY.js} +59 -12
  111. package/dist/chunk-UMSWQKCY.js.map +1 -0
  112. package/dist/{chunk-OLMNDIAU.js → chunk-UVOJSWD2.js} +95 -320
  113. package/dist/chunk-UVOJSWD2.js.map +1 -0
  114. package/dist/{chunk-DOVURNRK.js → chunk-VDJKWKH2.js} +3 -3
  115. package/dist/chunk-VDJKWKH2.js.map +1 -0
  116. package/dist/{chunk-VDBP6Y5M.js → chunk-WCQMXBO5.js} +21 -47
  117. package/dist/chunk-WCQMXBO5.js.map +1 -0
  118. package/dist/{chunk-YQEF36D5.js → chunk-WKIOWDLQ.js} +4 -4
  119. package/dist/{chunk-YQEF36D5.js.map → chunk-WKIOWDLQ.js.map} +1 -1
  120. package/dist/{chunk-5LF27VUB.js → chunk-X6E7Y4JD.js} +17 -15
  121. package/dist/chunk-X6E7Y4JD.js.map +1 -0
  122. package/dist/chunk-XUQBVK4R.js +15 -0
  123. package/dist/chunk-XUQBVK4R.js.map +1 -0
  124. package/dist/{chunk-K3IBZ2UZ.js → chunk-XUUYAS3Z.js} +3 -3
  125. package/dist/{chunk-K3IBZ2UZ.js.map → chunk-XUUYAS3Z.js.map} +1 -1
  126. package/dist/{chunk-36ML6SFP.js → chunk-YDJZRLGN.js} +4 -4
  127. package/dist/{chunk-36ML6SFP.js.map → chunk-YDJZRLGN.js.map} +1 -1
  128. package/dist/{chunk-M7GPCWEV.js → chunk-YIVB7GIP.js} +3 -3
  129. package/dist/{chunk-M7GPCWEV.js.map → chunk-YIVB7GIP.js.map} +1 -1
  130. package/dist/{chunk-VJNTB4DN.js → chunk-YMOZC2D3.js} +4 -4
  131. package/dist/{chunk-VJNTB4DN.js.map → chunk-YMOZC2D3.js.map} +1 -1
  132. package/dist/{chunk-OQRB7JUS.js → chunk-YV4J7V53.js} +3 -3
  133. package/dist/{chunk-OQRB7JUS.js.map → chunk-YV4J7V53.js.map} +1 -1
  134. package/dist/{chunk-JXT46QFC.js → chunk-ZDKJHQY2.js} +2 -2
  135. package/dist/{chunk-JXT46QFC.js.map → chunk-ZDKJHQY2.js.map} +1 -1
  136. package/dist/cli/index.js +777 -1120
  137. package/dist/cli/index.js.map +1 -1
  138. package/dist/cli/src/asset-feeds.d.ts +1 -8
  139. package/dist/cli/src/asset-feeds.d.ts.map +1 -1
  140. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  141. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  142. package/dist/cli/src/commands/flow.d.ts +5 -5
  143. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  144. package/dist/cli/src/commands/library-index.d.ts +5 -12
  145. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  146. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  147. package/dist/cli/src/commands/manage.d.ts +74 -58
  148. package/dist/cli/src/commands/manage.d.ts.map +1 -1
  149. package/dist/cli/src/commands/project.d.ts.map +1 -1
  150. package/dist/cli/src/commands/publish-core.d.ts +10 -0
  151. package/dist/cli/src/commands/publish-core.d.ts.map +1 -1
  152. package/dist/cli/src/commands/run.d.ts.map +1 -1
  153. package/dist/cli/src/commands/show.d.ts +1 -1
  154. package/dist/cli/src/commands/skailify-lib.d.ts +17 -31
  155. package/dist/cli/src/commands/skailify-lib.d.ts.map +1 -1
  156. package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
  157. package/dist/cli/src/commands/validate.d.ts +20 -2
  158. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  159. package/dist/cli/src/flow-discovery.d.ts +46 -3
  160. package/dist/cli/src/flow-discovery.d.ts.map +1 -1
  161. package/dist/cli/src/helpers.d.ts +6 -0
  162. package/dist/cli/src/helpers.d.ts.map +1 -1
  163. package/dist/cli/src/hooks/pre-commit-version.d.ts +1 -1
  164. package/dist/cli/src/open-library.d.ts +11 -0
  165. package/dist/cli/src/open-library.d.ts.map +1 -1
  166. package/dist/cli/src/skill-walker.d.ts +7 -10
  167. package/dist/cli/src/skill-walker.d.ts.map +1 -1
  168. package/dist/connectors/config.js +7 -6
  169. package/dist/connectors/index.js +23 -22
  170. package/dist/connectors/src/connector-manager.d.ts +53 -3
  171. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  172. package/dist/connectors/src/connector-prompt.d.ts +16 -2
  173. package/dist/connectors/src/connector-prompt.d.ts.map +1 -1
  174. package/dist/connectors/src/fleet-utils.d.ts +3 -4
  175. package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
  176. package/dist/connectors/src/index.d.ts +3 -3
  177. package/dist/connectors/src/index.d.ts.map +1 -1
  178. package/dist/connectors-VX7YRFFS.js +45 -0
  179. package/dist/{connectors-T57XL7EA.js.map → connectors-VX7YRFFS.js.map} +1 -1
  180. package/dist/core/discovery.js +1 -1
  181. package/dist/core/driver-targets.js +1 -1
  182. package/dist/core/index.js +11 -10
  183. package/dist/core/manifest.js +2 -2
  184. package/dist/core/models.js +1 -1
  185. package/dist/core/plugin-groupings.d.ts +2 -0
  186. package/dist/core/plugin-groupings.js +4 -0
  187. package/dist/core/plugin-groupings.js.map +1 -0
  188. package/dist/core/publish-manifest.js +2 -2
  189. package/dist/core/ref.js +1 -1
  190. package/dist/core/runtime-assets.js +7 -6
  191. package/dist/core/src/discovery.d.ts +11 -51
  192. package/dist/core/src/discovery.d.ts.map +1 -1
  193. package/dist/core/src/driver-targets.d.ts +10 -0
  194. package/dist/core/src/driver-targets.d.ts.map +1 -1
  195. package/dist/core/src/index.d.ts +5 -4
  196. package/dist/core/src/index.d.ts.map +1 -1
  197. package/dist/core/src/models.d.ts +6 -33
  198. package/dist/core/src/models.d.ts.map +1 -1
  199. package/dist/core/src/plugin-groupings.d.ts +31 -0
  200. package/dist/core/src/plugin-groupings.d.ts.map +1 -0
  201. package/dist/core/src/repo-manager.d.ts.map +1 -1
  202. package/dist/core/src/settings.d.ts +14 -1
  203. package/dist/core/src/settings.d.ts.map +1 -1
  204. package/dist/core/src/workspace-config.d.ts +1 -1
  205. package/dist/core/store.js +2 -2
  206. package/dist/core/workspace-config.js +6 -5
  207. package/dist/deploy/index.js +11 -10
  208. package/dist/deploy/index.js.map +1 -1
  209. package/dist/discovery/index.js +6 -5
  210. package/dist/discovery/src/discover.d.ts +9 -25
  211. package/dist/discovery/src/discover.d.ts.map +1 -1
  212. package/dist/discovery/src/index.d.ts +0 -2
  213. package/dist/discovery/src/index.d.ts.map +1 -1
  214. package/dist/discovery/src/source-config.d.ts +13 -9
  215. package/dist/discovery/src/source-config.d.ts.map +1 -1
  216. package/dist/discovery/src/tree-entries.d.ts +6 -11
  217. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  218. package/dist/{ensure-sources-J5CDTQ36.js → ensure-sources-2XQS32WI.js} +20 -19
  219. package/dist/ensure-sources-2XQS32WI.js.map +1 -0
  220. package/dist/factory-assets/README.md +1 -1
  221. package/dist/factory-assets/connectors/box.js +23 -22
  222. package/dist/factory-assets/connectors/deploy.js +23 -22
  223. package/dist/factory-assets/connectors/devserver.js +23 -22
  224. package/dist/factory-assets/connectors/flow/CONNECTOR.md +6 -1
  225. package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
  226. package/dist/factory-assets/connectors/flow/adapter.js +23 -22
  227. package/dist/factory-assets/connectors/flow/contract/flow.v2.schema.json +13 -3
  228. package/dist/factory-assets/connectors/flow/contract/index.d.ts +1 -0
  229. package/dist/factory-assets/connectors/flow/contract/index.d.ts.map +1 -1
  230. package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts +21 -5
  231. package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts.map +1 -1
  232. package/dist/factory-assets/connectors/flow/contract/schema.d.ts +2 -0
  233. package/dist/factory-assets/connectors/flow/contract/schema.d.ts.map +1 -1
  234. package/dist/factory-assets/connectors/flow/contract/sub-flow-output.d.ts +20 -0
  235. package/dist/factory-assets/connectors/flow/contract/sub-flow-output.d.ts.map +1 -0
  236. package/dist/factory-assets/connectors/flow/contract.js +4 -4
  237. package/dist/factory-assets/connectors/flow/engine/bindings.d.ts.map +1 -1
  238. package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts +12 -0
  239. package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts.map +1 -0
  240. package/dist/factory-assets/connectors/flow/engine/index.d.ts +1 -0
  241. package/dist/factory-assets/connectors/flow/engine/index.d.ts.map +1 -1
  242. package/dist/factory-assets/connectors/flow/engine/loader.d.ts +3 -3
  243. package/dist/factory-assets/connectors/flow/engine/locate.d.ts +2 -2
  244. package/dist/factory-assets/connectors/flow/engine/locate.d.ts.map +1 -1
  245. package/dist/factory-assets/connectors/flow/engine/types.d.ts +0 -2
  246. package/dist/factory-assets/connectors/flow/engine/types.d.ts.map +1 -1
  247. package/dist/factory-assets/connectors/flow/engine.js +15 -14
  248. package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts.map +1 -1
  249. package/dist/factory-assets/connectors/flow/prompt-fragments.js +3 -3
  250. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  251. package/dist/factory-assets/connectors/flow/run-flow.js +25 -24
  252. package/dist/factory-assets/connectors/flow/sub-flow-runner.d.ts +6 -5
  253. package/dist/factory-assets/connectors/flow/sub-flow-runner.d.ts.map +1 -1
  254. package/dist/factory-assets/connectors/flow.js +23 -22
  255. package/dist/factory-assets/connectors/git.js +23 -22
  256. package/dist/factory-assets/connectors/gmail.js +23 -22
  257. package/dist/factory-assets/connectors/googledrive.js +23 -22
  258. package/dist/factory-assets/connectors/local.js +23 -22
  259. package/dist/factory-assets/connectors/mattermost.js +23 -22
  260. package/dist/factory-assets/connectors/memory.js +23 -22
  261. package/dist/factory-assets/connectors/minio.js +23 -22
  262. package/dist/factory-assets/connectors/postgres.js +23 -22
  263. package/dist/factory-assets/connectors/s3.js +23 -22
  264. package/dist/factory-assets/connectors/sharepoint.js +23 -22
  265. package/dist/factory-assets/connectors/sqlite.js +23 -22
  266. package/dist/factory-assets/connectors/static-server.js +23 -22
  267. package/dist/factory-assets/connectors/tunnel.js +23 -22
  268. package/dist/factory-assets/connectors/webdav.js +23 -22
  269. package/dist/factory-assets/connectors/xstate-store.js +23 -22
  270. package/dist/factory-assets/connectors/xstate.js +23 -22
  271. package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +37 -26
  272. package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +2 -2
  273. package/dist/factory-assets/skills/skailify/SKILL.md +10 -19
  274. package/dist/flows-SVCCADGE.js +26 -0
  275. package/dist/{flows-PX53XFV7.js.map → flows-SVCCADGE.js.map} +1 -1
  276. package/dist/helpers-IELQGVGB.js +34 -0
  277. package/dist/{helpers-EP6H3O3S.js.map → helpers-IELQGVGB.js.map} +1 -1
  278. package/dist/library/index.js +15 -14
  279. package/dist/library/install.js +2 -2
  280. package/dist/library/src/index.d.ts +1 -1
  281. package/dist/library/src/index.d.ts.map +1 -1
  282. package/dist/library/src/local/db.d.ts.map +1 -1
  283. package/dist/library/src/local/library-manager.d.ts.map +1 -1
  284. package/dist/library/src/local/library.d.ts.map +1 -1
  285. package/dist/library/src/local/local-catalog-source.d.ts +14 -10
  286. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  287. package/dist/library/src/local/schema.d.ts +1 -20
  288. package/dist/library/src/local/schema.d.ts.map +1 -1
  289. package/dist/library/src/remote/remote-catalog-source.d.ts +1 -11
  290. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  291. package/dist/library/src/sync/manifest-writeback.d.ts +5 -5
  292. package/dist/library/src/sync/manifest-writeback.d.ts.map +1 -1
  293. package/dist/library/src/user-library.d.ts +1 -9
  294. package/dist/library/src/user-library.d.ts.map +1 -1
  295. package/dist/{library-publish-KKT73FJK.js → library-publish-TCFU3X5L.js} +39 -26
  296. package/dist/library-publish-TCFU3X5L.js.map +1 -0
  297. package/dist/open-library-SSBN4FX2.js +40 -0
  298. package/dist/{open-library-R62UBL6E.js.map → open-library-SSBN4FX2.js.map} +1 -1
  299. package/dist/open-registry-CHCWKV5W.js +32 -0
  300. package/dist/open-registry-CHCWKV5W.js.map +1 -0
  301. package/dist/paths-MKSI52PF.js +22 -0
  302. package/dist/{paths-W4LDORQQ.js.map → paths-MKSI52PF.js.map} +1 -1
  303. package/dist/{plugin-store-D45CREMJ.js → plugin-store-SVYV7L4C.js} +13 -12
  304. package/dist/plugin-store-SVYV7L4C.js.map +1 -0
  305. package/dist/plugins/index.js +1 -1
  306. package/dist/plugins/src/catalog-source.d.ts +4 -55
  307. package/dist/plugins/src/catalog-source.d.ts.map +1 -1
  308. package/dist/plugins/src/index.d.ts +1 -1
  309. package/dist/plugins/src/index.d.ts.map +1 -1
  310. package/dist/project-PJ37PM6N.js +35 -0
  311. package/dist/{project-GCW5DFAB.js.map → project-PJ37PM6N.js.map} +1 -1
  312. package/dist/resolver/index.js +12 -11
  313. package/dist/runner/index.js +35 -34
  314. package/dist/runner/src/compaction/orchestrator.d.ts +2 -1
  315. package/dist/runner/src/compaction/orchestrator.d.ts.map +1 -1
  316. package/dist/runner/src/compaction-gate.d.ts +13 -0
  317. package/dist/runner/src/compaction-gate.d.ts.map +1 -1
  318. package/dist/runner/src/fleet-health-flag-dispatcher.d.ts +14 -11
  319. package/dist/runner/src/fleet-health-flag-dispatcher.d.ts.map +1 -1
  320. package/dist/runner/src/serve.d.ts.map +1 -1
  321. package/dist/sdk/asset-manager.js +17 -16
  322. package/dist/sdk/bridge.js +15 -14
  323. package/dist/sdk/core.js +11 -10
  324. package/dist/sdk/flow.js +15 -14
  325. package/dist/sdk/index.js +35 -34
  326. package/dist/sdk/index.js.map +1 -1
  327. package/dist/sdk/resolver.js +12 -11
  328. package/dist/sdk/runner.js +35 -34
  329. package/dist/secrets/index.js +2 -2
  330. package/dist/{setup-Q3LXY5AE.js → setup-JW2ZGCUG.js} +25 -24
  331. package/dist/setup-JW2ZGCUG.js.map +1 -0
  332. package/dist/skills-7K2YO3KN.js +26 -0
  333. package/dist/{skills-R3RPIPWP.js.map → skills-7K2YO3KN.js.map} +1 -1
  334. package/dist/source-F2VO32W6.js +41 -0
  335. package/dist/{source-CFQESKJU.js.map → source-F2VO32W6.js.map} +1 -1
  336. package/dist/{source-manifest-publish-3TCBA2RV.js → source-manifest-publish-AXNII2J4.js} +29 -27
  337. package/dist/source-manifest-publish-AXNII2J4.js.map +1 -0
  338. package/dist/tui/index.js +35 -34
  339. package/dist/tui/index.js.map +1 -1
  340. package/dist/workspace-plugin/adapters/mcp.js +40 -18
  341. package/dist/workspace-plugin/adapters/omp.js +21 -21
  342. package/dist/workspace-plugin/adapters/omp.js.map +1 -1
  343. package/dist/workspace-plugin/index.js +1 -1
  344. package/dist/workspace-plugin/src/adapters/mcp.d.ts +4 -4
  345. package/dist/workspace-plugin/src/adapters/mcp.d.ts.map +1 -1
  346. package/dist/workspace-plugin/src/adapters/omp.d.ts +2 -2
  347. package/dist/workspace-plugin/src/tools/connectors.d.ts +1 -1
  348. package/dist/workspace-plugin/src/tools/connectors.d.ts.map +1 -1
  349. package/dist/workspace-plugin/src/tools/skills.d.ts +5 -17
  350. package/dist/workspace-plugin/src/tools/skills.d.ts.map +1 -1
  351. package/package.json +7 -1
  352. package/dist/asset-feeds-KXL45ALC.js +0 -210
  353. package/dist/asset-feeds-KXL45ALC.js.map +0 -1
  354. package/dist/chunk-252TK4RU.js.map +0 -1
  355. package/dist/chunk-35G4M33T.js.map +0 -1
  356. package/dist/chunk-3C3ODIDE.js.map +0 -1
  357. package/dist/chunk-5LF27VUB.js.map +0 -1
  358. package/dist/chunk-5RWL4L3X.js.map +0 -1
  359. package/dist/chunk-7RC37XFW.js.map +0 -1
  360. package/dist/chunk-A5EDMBFG.js.map +0 -1
  361. package/dist/chunk-DOVURNRK.js.map +0 -1
  362. package/dist/chunk-EB4ZTESQ.js.map +0 -1
  363. package/dist/chunk-H7N6RWNF.js.map +0 -1
  364. package/dist/chunk-JEPSP6XK.js.map +0 -1
  365. package/dist/chunk-NLKIW2VI.js.map +0 -1
  366. package/dist/chunk-OLMNDIAU.js.map +0 -1
  367. package/dist/chunk-ORH2BZEM.js.map +0 -1
  368. package/dist/chunk-P7BU6DAC.js.map +0 -1
  369. package/dist/chunk-QVZA2MDT.js +0 -81
  370. package/dist/chunk-QVZA2MDT.js.map +0 -1
  371. package/dist/chunk-SM6EUQMY.js.map +0 -1
  372. package/dist/chunk-TQ6XNACF.js.map +0 -1
  373. package/dist/chunk-TSVRKUGV.js.map +0 -1
  374. package/dist/chunk-VDBP6Y5M.js.map +0 -1
  375. package/dist/chunk-X4DKUGV4.js.map +0 -1
  376. package/dist/chunk-XU7JET5Z.js.map +0 -1
  377. package/dist/chunk-YV3YI3TA.js.map +0 -1
  378. package/dist/connectors-T57XL7EA.js +0 -5
  379. package/dist/discovery/src/domains.d.ts +0 -149
  380. package/dist/discovery/src/domains.d.ts.map +0 -1
  381. package/dist/ensure-sources-J5CDTQ36.js.map +0 -1
  382. package/dist/flows-PX53XFV7.js +0 -25
  383. package/dist/helpers-EP6H3O3S.js +0 -33
  384. package/dist/library-publish-KKT73FJK.js.map +0 -1
  385. package/dist/open-library-R62UBL6E.js +0 -38
  386. package/dist/paths-W4LDORQQ.js +0 -21
  387. package/dist/plugin-store-D45CREMJ.js.map +0 -1
  388. package/dist/project-GCW5DFAB.js +0 -34
  389. package/dist/setup-Q3LXY5AE.js.map +0 -1
  390. package/dist/skills-R3RPIPWP.js +0 -25
  391. package/dist/source-CFQESKJU.js +0 -39
  392. package/dist/source-manifest-publish-3TCBA2RV.js.map +0 -1
package/dist/cli/index.js CHANGED
@@ -1,21 +1,23 @@
1
1
  #!/usr/bin/env node
2
- import { AI_RESOURCES } from '../chunk-VJNTB4DN.js';
3
- import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-SM6EUQMY.js';
4
- import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-QVLQGXT6.js';
5
- import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity, refFor } from '../chunk-H7N6RWNF.js';
6
- import { makeSourceCommand, syncProjectSources } from '../chunk-5LF27VUB.js';
7
- import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-3C3ODIDE.js';
8
- import { logErr, S, logOk, logInfo, logWarn, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-NLKIW2VI.js';
9
- import { LocalSecretsProvider } from '../chunk-B4IAZTZZ.js';
10
- import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-P7BU6DAC.js';
11
- import { buildClaudePluginFiles } from '../chunk-FTPKMJFD.js';
12
- import '../chunk-X4DKUGV4.js';
13
- import '../chunk-QBQITQAM.js';
14
- import '../chunk-VDBP6Y5M.js';
15
- import '../chunk-EOKAFBJ7.js';
16
- import '../chunk-4ZTPYIBE.js';
17
- import '../chunk-35G4M33T.js';
2
+ import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-IYIIT4R3.js';
3
+ import { makeSourceCommand, syncProjectSources } from '../chunk-X6E7Y4JD.js';
4
+ import { AI_RESOURCES } from '../chunk-YMOZC2D3.js';
5
+ import { upsertManifestAsset, resolveImportSource, normalizeSkillContent, missingRootAssets, pruneMissingRootAssets } from '../chunk-F7JHP7JV.js';
6
+ import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity, refFor, assetEntryRef } from '../chunk-3KSAFYD4.js';
7
+ import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-3NGPZC44.js';
8
+ import { openCatalogSource, openLibraryManager, openLibrary } from '../chunk-E3ZACBHD.js';
9
+ import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-2Y6DSR36.js';
10
+ import { createFullRegistry } from '../chunk-XUQBVK4R.js';
11
+ import { LocalSecretsProvider } from '../chunk-EB6OPURC.js';
12
+ import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-55RMUF4G.js';
13
+ import { buildClaudePluginFiles } from '../chunk-G47EV3V6.js';
14
+ import '../chunk-AYNPGPT5.js';
15
+ import '../chunk-RNNUYFFD.js';
18
16
  import '../chunk-R6O6YWU7.js';
17
+ import '../chunk-WCQMXBO5.js';
18
+ import '../chunk-TYUJB336.js';
19
+ import '../chunk-4ZTPYIBE.js';
20
+ import '../chunk-AOMWF2OE.js';
19
21
  import '../chunk-X5YPJV4N.js';
20
22
  import '../chunk-O7SG5PC2.js';
21
23
  import '../chunk-7QBNJTTQ.js';
@@ -24,54 +26,55 @@ import '../chunk-5LKOAX7I.js';
24
26
  import '../chunk-32NA4TVC.js';
25
27
  import '../chunk-W3UDISS2.js';
26
28
  import '../chunk-HCYS7GFP.js';
27
- import { runFlow, resumeFlow } from '../chunk-252TK4RU.js';
29
+ import { runFlow, resumeFlow } from '../chunk-G4T7MYTA.js';
28
30
  import '../chunk-4R6DROGN.js';
29
- import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-OQRB7JUS.js';
30
- import '../chunk-DOVURNRK.js';
31
- import '../chunk-6X4DHKHP.js';
32
- import '../chunk-5RWL4L3X.js';
31
+ import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-YV4J7V53.js';
32
+ import '../chunk-VDJKWKH2.js';
33
+ import '../chunk-CT6NQSA4.js';
34
+ import '../chunk-QFZFZXQW.js';
33
35
  import '../chunk-KC3OF6B2.js';
34
- import '../chunk-YQEF36D5.js';
35
- import '../chunk-M7GPCWEV.js';
36
- import '../chunk-5NYBY6ZE.js';
36
+ import '../chunk-WKIOWDLQ.js';
37
+ import '../chunk-YIVB7GIP.js';
38
+ import '../chunk-TVOODIZE.js';
37
39
  import '../chunk-EINLFFP6.js';
38
40
  import '../chunk-LOO5CB5M.js';
39
41
  import '../chunk-RDYI4MML.js';
40
- import '../chunk-WCWFS36P.js';
42
+ import '../chunk-P5UQ56RA.js';
41
43
  import '../chunk-XBSQ4KMC.js';
42
44
  import '../chunk-YROR332M.js';
43
- import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-TSVRKUGV.js';
45
+ import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-RDTHJSGY.js';
44
46
  import '../chunk-6E6PKKAD.js';
45
47
  import '../chunk-IFGTRL2I.js';
46
- import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-7RC37XFW.js';
47
- import '../chunk-YYH5EVPM.js';
48
- import '../chunk-DIQDYNXZ.js';
49
- import '../chunk-K3IBZ2UZ.js';
50
- import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-UDFWBALP.js';
51
- import '../chunk-ORH2BZEM.js';
48
+ import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-UMSWQKCY.js';
49
+ import '../chunk-JUXQUZOQ.js';
50
+ import '../chunk-QZLWJETK.js';
51
+ import '../chunk-XUUYAS3Z.js';
52
+ import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-NFGRW3L7.js';
53
+ import '../chunk-QCI6D7E4.js';
52
54
  import '../chunk-IDEA6CYI.js';
53
- import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-TQ6XNACF.js';
54
- import { cloneOrInitGitRepo, ensureGitRepo, isGitRepo, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-XU7JET5Z.js';
55
- import { isValidDomainSlug, parseDomainMd } from '../chunk-OLMNDIAU.js';
56
- import '../chunk-2EL2PBRC.js';
55
+ import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-6LDUA57J.js';
56
+ import { cloneOrInitGitRepo, ensureGitRepo, isGitRepo, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-SP47UJKE.js';
57
+ import '../chunk-UVOJSWD2.js';
58
+ import '../chunk-H4EGUQ7M.js';
57
59
  import '../chunk-R7FOF242.js';
58
- import '../chunk-JXT46QFC.js';
59
- import '../chunk-YCMZHL4T.js';
60
+ import '../chunk-ZDKJHQY2.js';
61
+ import '../chunk-AGWYBS2E.js';
60
62
  import '../chunk-CGYEHQOX.js';
61
- import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, aiResourceRoots, readLock, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile } from '../chunk-YV3YI3TA.js';
63
+ import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, readLock, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile, aiResourceRoots } from '../chunk-IWCCZL7C.js';
62
64
  import '../chunk-4GY63JU6.js';
63
- import { factoryAssetRoots } from '../chunk-36ML6SFP.js';
64
- import '../chunk-KAJH3XPW.js';
65
+ import { factoryAssetRoots } from '../chunk-YDJZRLGN.js';
66
+ import '../chunk-U6K3I3AX.js';
65
67
  import { DRIVER_DEFAULTS } from '../chunk-K5GBV4SA.js';
66
- import { assetSearchDirs } from '../chunk-QVZA2MDT.js';
67
- import { sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-JEPSP6XK.js';
68
+ import { findKindDirs } from '../chunk-A2ULN3KX.js';
69
+ import { sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-MXXKTQXJ.js';
68
70
  import { globalCacheRoot, globalSkaileDir } from '../chunk-TLKM4M47.js';
69
- import { SUPPORTED_DRIVER_TARGETS } from '../chunk-EB4ZTESQ.js';
70
- import { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-DSB6X25D.js';
71
- import { parseFrontmatter, scanDirectory } from '../chunk-5K2VT6E2.js';
72
- import { parseAssetRef, ASSET_KINDS, isValidAssetName, slugifyAssetName, ASSET_NAME_HINT, assetRefToStr } from '../chunk-A5EDMBFG.js';
73
- import { openSqlite } from '../chunk-JMKB7IB4.js';
71
+ import { SUPPORTED_DRIVER_TARGETS } from '../chunk-TOSHZX4C.js';
72
+ import { loadSkPublishManifest, SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, saveSkPublishManifest } from '../chunk-AG44ZJ7W.js';
73
+ import { pluginTitle } from '../chunk-RVRB27AN.js';
74
+ import { parseFrontmatter, scanDirectory } from '../chunk-DXUQCMVT.js';
75
+ import { parseAssetRef, ASSET_KINDS, isValidAssetName, slugifyAssetName, ASSET_NAME_HINT, assetRefToStr } from '../chunk-43ZBF3WH.js';
74
76
  import { portableSpawn, portableSpawnSync } from '../chunk-ICSCSM5D.js';
77
+ import { openSqlite } from '../chunk-JMKB7IB4.js';
75
78
  import { parseModelRef, resolveEntryBaseUrl } from '../chunk-MJHSLODD.js';
76
79
  import '../chunk-C3CAXQMA.js';
77
80
  import '../chunk-BOFL7GIF.js';
@@ -80,22 +83,21 @@ import '../chunk-UQ6LFBPZ.js';
80
83
  import '../chunk-TNWXGHLD.js';
81
84
  import { validatePreset, SKILL_BODY_PLACEHOLDER } from '../chunk-5CYEWBPB.js';
82
85
  import '../chunk-NSBPE2FW.js';
83
- import * as fs11 from 'fs';
84
- import fs11__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
85
- import * as path35 from 'path';
86
- import path35__default, { resolve, join } from 'path';
86
+ import * as fs10 from 'fs';
87
+ import fs10__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
88
+ import * as path34 from 'path';
89
+ import path34__default, { resolve, join } from 'path';
87
90
  import { fileURLToPath } from 'url';
88
91
  import { Help, Command, Option } from 'commander';
89
92
  import { rcompare } from 'semver';
90
93
  import * as p5 from '@clack/prompts';
91
94
  import pc5 from 'picocolors';
92
- import * as os from 'os';
93
- import { parse, stringify, parseDocument } from 'yaml';
94
95
  import * as readline from 'readline';
95
96
  import { createInterface } from 'readline';
96
- import fs5 from 'fs/promises';
97
+ import fs4 from 'fs/promises';
97
98
  import { parse as parse$1, stringify as stringify$1 } from 'smol-toml';
98
99
  import { execSync, spawnSync } from 'child_process';
100
+ import { parse, stringify, parseDocument } from 'yaml';
99
101
  import * as readline2 from 'readline/promises';
100
102
  import { createTRPCUntypedClient, httpLink, httpSubscriptionLink } from '@trpc/client';
101
103
 
@@ -133,7 +135,7 @@ async function runSearch(kind, query, opts) {
133
135
  const showLocal = !opts.store;
134
136
  const showStore = !opts.local;
135
137
  const { resolveConfig } = await import('../library/index.js');
136
- const airGapped = resolveConfig({ projectDir: path35__default.resolve(opts.projectDir) }).catalog.cache_ttl === 0;
138
+ const airGapped = resolveConfig({ projectDir: path34__default.resolve(opts.projectDir) }).catalog.cache_ttl === 0;
137
139
  if (showLocal) {
138
140
  await searchLocal(query, kind, opts, showStore, airGapped);
139
141
  }
@@ -142,7 +144,7 @@ async function runSearch(kind, query, opts) {
142
144
  }
143
145
  }
144
146
  async function searchIndex(query, kind) {
145
- const { openLibrary: openLibrary2 } = await import('../open-library-R62UBL6E.js');
147
+ const { openLibrary: openLibrary2 } = await import('../open-library-SSBN4FX2.js');
146
148
  const library = await openLibrary2();
147
149
  try {
148
150
  const defs = await library.listAssetDefs(kind ? { kind } : {});
@@ -174,7 +176,7 @@ async function searchIndex(query, kind) {
174
176
  }
175
177
  }
176
178
  async function searchFactory(projectDir, query, kind) {
177
- const prefixes = factoryAssetRoots().map((r) => r.endsWith(path35__default.sep) ? r : r + path35__default.sep);
179
+ const prefixes = factoryAssetRoots().map((r) => r.endsWith(path34__default.sep) ? r : r + path34__default.sep);
178
180
  const isFactoryPath = (p7) => prefixes.some((fp) => p7 === fp.slice(0, -1) || p7.startsWith(fp));
179
181
  try {
180
182
  const entries = await new AssetManager({ projectDir }).search(query, kind);
@@ -191,11 +193,11 @@ function unionEntries(indexed, factory) {
191
193
  return [...indexed, ...factory.filter((e) => !seen.has(entryDedupKey(e)))];
192
194
  }
193
195
  async function searchLocal(query, kind, opts, showStore, airGapped) {
194
- const projectDir = path35__default.resolve(opts.projectDir);
196
+ const projectDir = path34__default.resolve(opts.projectDir);
195
197
  const factory = await searchFactory(projectDir, query, kind);
196
198
  let entries = unionEntries(await searchIndex(query, kind), factory);
197
199
  if (entries.length === 0 && !query && !kind && !airGapped) {
198
- const { autoSyncForSearch } = await import('../source-CFQESKJU.js');
200
+ const { autoSyncForSearch } = await import('../source-F2VO32W6.js');
199
201
  if (await autoSyncForSearch(projectDir)) {
200
202
  entries = unionEntries(await searchIndex(query, kind), factory);
201
203
  }
@@ -265,9 +267,9 @@ async function searchStore(query, kind, opts, airGapped) {
265
267
  logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
266
268
  return;
267
269
  }
268
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-R62UBL6E.js');
270
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-SSBN4FX2.js');
269
271
  try {
270
- const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
272
+ const remote = await openCatalogSource2({ projectDir: path34__default.resolve(opts.projectDir) });
271
273
  const assets = await remote.listAssets(kind ? { kind } : {});
272
274
  const results = filterCatalogAssets(assets, query);
273
275
  if (results.length > 0) {
@@ -370,7 +372,7 @@ function makeAddCommand() {
370
372
  return new Command("add").description("Add to skaile.yaml + deploy").argument("<ref>", "Asset reference (kind:@<publisher>/name#<version>)").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Record in ~/.skaile/skaile.yaml + deploy to every global harness").option(
371
373
  "--harness <ids>",
372
374
  "Comma-separated global harnesses to deploy into (default: all resolved); implies --global"
373
- ).option("--target <agent>", "Driver target", "claude-code").option(
375
+ ).option("--target <agent>", `Driver target (${TARGET_DEFAULT_HINT})`).option(
374
376
  "--link",
375
377
  "symlink local-path assets instead of copying (dev loop; machine-local, not for committing)"
376
378
  ).option(
@@ -383,7 +385,7 @@ function makeAddCommand() {
383
385
  }
384
386
  const harnesses = parseHarnessFilter(opts.harness);
385
387
  const am2 = new AssetManager({
386
- projectDir: path35__default.resolve(opts.projectDir),
388
+ projectDir: path34__default.resolve(opts.projectDir),
387
389
  global: opts.global || harnesses !== void 0,
388
390
  harnesses,
389
391
  driverTarget: opts.target
@@ -424,10 +426,10 @@ function makeRemoveCommand() {
424
426
  return new Command("remove").description("Remove from skaile.yaml + undeploy").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Remove from ~/.skaile/skaile.yaml + undeploy from every global harness").option(
425
427
  "--harness <ids>",
426
428
  "Comma-separated global harnesses to undeploy from (default: all resolved); implies --global"
427
- ).option("--target <agent>", "Driver target", "claude-code").option("--no-soft-deps", "skip the orphaned-soft-dep prompt (don't remove, don't report)").action(async (ref, opts) => {
429
+ ).option("--target <agent>", `Driver target (${TARGET_DEFAULT_HINT})`).option("--no-soft-deps", "skip the orphaned-soft-dep prompt (don't remove, don't report)").action(async (ref, opts) => {
428
430
  const harnesses = parseHarnessFilter(opts.harness);
429
431
  const am2 = new AssetManager({
430
- projectDir: path35__default.resolve(opts.projectDir),
432
+ projectDir: path34__default.resolve(opts.projectDir),
431
433
  global: opts.global || harnesses !== void 0,
432
434
  harnesses,
433
435
  driverTarget: opts.target
@@ -459,7 +461,9 @@ function makeListCommand() {
459
461
  "-g, --global",
460
462
  "Read the global SSOT (~/.skaile/skaile.yaml); report state per harness"
461
463
  ).option("--harness <ids>", "Comma-separated global harnesses to report (implies --global)").option("--json", "Output as JSON").addOption(
462
- new Option("--target <agent>", "Driver target").default("claude-code").choices(SUPPORTED_DRIVER_TARGETS)
464
+ new Option("--target <agent>", `Driver target (${TARGET_DEFAULT_HINT})`).choices(
465
+ SUPPORTED_DRIVER_TARGETS
466
+ )
463
467
  ).action(async (kind, opts) => {
464
468
  const harnesses = parseHarnessFilter(opts.harness);
465
469
  if (opts.global || harnesses) {
@@ -467,7 +471,7 @@ function makeListCommand() {
467
471
  return;
468
472
  }
469
473
  const am2 = new AssetManager({
470
- projectDir: path35__default.resolve(opts.projectDir),
474
+ projectDir: path34__default.resolve(opts.projectDir),
471
475
  driverTarget: opts.target
472
476
  });
473
477
  let declared;
@@ -512,7 +516,7 @@ function makeListCommand() {
512
516
  }
513
517
  function runGlobalList(kind, opts, harnesses) {
514
518
  const am2 = new AssetManager({
515
- projectDir: path35__default.resolve(opts.projectDir),
519
+ projectDir: path34__default.resolve(opts.projectDir),
516
520
  global: true,
517
521
  harnesses
518
522
  });
@@ -561,7 +565,7 @@ function catalogAssetToEntry(a) {
561
565
  // `repository: @admin` for a store hit and `admin` for a local one.
562
566
  publisher: a.publisher.replace(/^@/, ""),
563
567
  repo: a.repo,
564
- domainSlug: a.domainSlug,
568
+ plugin: a.plugin,
565
569
  category: a.category,
566
570
  version: a.version,
567
571
  requires: [],
@@ -583,7 +587,7 @@ async function resolveInfoEntry(am2, ref, opts) {
583
587
  return { entry: match ?? deployed };
584
588
  }
585
589
  const lookup = opts.storeLookup ?? (async (filter) => {
586
- const { resolveCatalogSource } = await import('../open-library-R62UBL6E.js');
590
+ const { resolveCatalogSource } = await import('../open-library-SSBN4FX2.js');
587
591
  const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
588
592
  try {
589
593
  return await source.listAssets(filter);
@@ -599,7 +603,7 @@ async function resolveInfoEntry(am2, ref, opts) {
599
603
  );
600
604
  return { entry: hit ? catalogAssetToEntry(hit) : null };
601
605
  } catch (err) {
602
- const { LocalCatalogDisabledError } = await import('../open-library-R62UBL6E.js');
606
+ const { LocalCatalogDisabledError } = await import('../open-library-SSBN4FX2.js');
603
607
  const storeNote = err instanceof Error ? err.message : String(err);
604
608
  const disabled = err instanceof LocalCatalogDisabledError || /catalog\.url/i.test(storeNote);
605
609
  return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
@@ -615,7 +619,7 @@ function infoNotFoundHint(ref, lookup) {
615
619
  }
616
620
  function makeInfoCommand() {
617
621
  return new Command("info").description("Show asset metadata, deps, deploy status").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
618
- const projectDir = path35__default.resolve(opts.projectDir);
622
+ const projectDir = path34__default.resolve(opts.projectDir);
619
623
  const am2 = new AssetManager({ projectDir });
620
624
  const lookup = await resolveInfoEntry(am2, ref, { projectDir });
621
625
  const entry = lookup.entry;
@@ -651,7 +655,7 @@ function makeCreateCommand() {
651
655
  new Option("-k, --kind <kind>", "Asset kind").default("skill").choices([...ASSET_KINDS])
652
656
  ).option("-d, --dir <dir>", "Target directory (default: cwd)").action((name, opts) => {
653
657
  const am2 = new AssetManager({ projectDir: process.cwd() });
654
- const destDir = opts.dir ? path35__default.resolve(opts.dir) : process.cwd();
658
+ const destDir = opts.dir ? path34__default.resolve(opts.dir) : process.cwd();
655
659
  const result = am2.create(name, opts.kind, destDir);
656
660
  if (result.ok) logOk(`Created ${kindColor(opts.kind)}: ${pc5.dim(result.path)}`);
657
661
  else {
@@ -662,7 +666,7 @@ function makeCreateCommand() {
662
666
  }
663
667
  function makeDoctorCommand() {
664
668
  return new Command("doctor").description("Scan for missing dependency chains").argument("[name]", "Check a specific asset (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (name, opts) => {
665
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
669
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
666
670
  const issues = await am2.doctor();
667
671
  if (issues.length === 0) {
668
672
  logOk("No missing dependencies.");
@@ -684,146 +688,6 @@ function makeDoctorCommand() {
684
688
  console.log();
685
689
  });
686
690
  }
687
- var DEFAULT_IMPORT_VERSION = "0.1.0";
688
- var DEFAULT_IMPORT_STAGE = "alpha";
689
- function claudeSkillRoots() {
690
- const roots = [];
691
- const override = process.env.SKAILE_CLAUDE_SKILLS_DIR;
692
- if (override) roots.push(override);
693
- roots.push(path35.join(os.homedir(), ".claude", "skills"));
694
- return roots;
695
- }
696
- function resolveImportSource(nameOrPath) {
697
- const asPath = path35.resolve(nameOrPath);
698
- if (fs11.existsSync(asPath)) {
699
- const dir = fs11.statSync(asPath).isDirectory() ? asPath : path35.dirname(asPath);
700
- const skillFile = path35.join(dir, "SKILL.md");
701
- if (fs11.existsSync(skillFile)) return { dir, skillFile, via: "path" };
702
- }
703
- if (!nameOrPath.includes(path35.sep) && !nameOrPath.startsWith(".")) {
704
- for (const root of claudeSkillRoots()) {
705
- const dir = path35.join(root, nameOrPath);
706
- const skillFile = path35.join(dir, "SKILL.md");
707
- if (fs11.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
708
- }
709
- }
710
- return null;
711
- }
712
- function normalizeSkillContent(raw, opts = {}) {
713
- const notes = [];
714
- const { data, body } = parseFrontmatter(raw);
715
- const rawName = typeof data.name === "string" && data.name.trim() ? data.name.trim() : void 0;
716
- const sourceName = rawName ?? opts.fallbackName ?? "";
717
- let name = sourceName;
718
- let originalName;
719
- if (!sourceName) {
720
- throw new Error("skill has no `name` in frontmatter and no fallback was provided");
721
- }
722
- if (!isValidAssetName(sourceName)) {
723
- name = slugifyAssetName(sourceName);
724
- originalName = sourceName;
725
- notes.push(`renamed "${sourceName}" \u2192 "${name}" (canonical kebab-case)`);
726
- }
727
- const existingMeta = data.metadata && typeof data.metadata === "object" && !Array.isArray(data.metadata) ? { ...data.metadata } : {};
728
- if (existingMeta.version == null) {
729
- existingMeta.version = opts.version ?? DEFAULT_IMPORT_VERSION;
730
- notes.push(`stamped metadata.version: ${existingMeta.version}`);
731
- }
732
- if (existingMeta.stage == null) {
733
- existingMeta.stage = opts.stage ?? DEFAULT_IMPORT_STAGE;
734
- notes.push(`stamped metadata.stage: ${existingMeta.stage}`);
735
- }
736
- if (existingMeta.tags == null) {
737
- const keywords = Array.isArray(data.keywords) ? data.keywords : [];
738
- existingMeta.tags = keywords.filter((k) => typeof k === "string");
739
- if (existingMeta.tags.length > 0) {
740
- notes.push("promoted top-level keywords \u2192 metadata.tags");
741
- }
742
- }
743
- const ordered = { name };
744
- if (data.description != null) ordered.description = data.description;
745
- ordered.metadata = existingMeta;
746
- for (const [k, v] of Object.entries(data)) {
747
- if (k === "name" || k === "description" || k === "metadata" || k === "keywords") continue;
748
- ordered[k] = v;
749
- }
750
- const fm = stringify(ordered).trimEnd();
751
- const content = `---
752
- ${fm}
753
- ---
754
-
755
- ${body}
756
- `;
757
- const changed = notes.length > 0;
758
- return { content, name, originalName, changed, notes };
759
- }
760
- var DOMAIN_TEMPLATE = (slug, publisher, description) => {
761
- const fm = stringify({ slug, title: slug, publisher, description }).trimEnd();
762
- return `---
763
- ${fm}
764
- ---
765
-
766
- # ${slug}
767
-
768
- ${description}
769
- `;
770
- };
771
- function ensureDomain(libraryPath, domain, opts = {}) {
772
- const dir = path35.join(libraryPath, domain);
773
- const domainFile = path35.join(dir, "DOMAIN.md");
774
- if (fs11.existsSync(domainFile)) {
775
- const existing = readDomainMd(libraryPath, domain);
776
- return {
777
- dir,
778
- publisher: existing?.publisher ?? opts.publisher ?? slugifyAssetName(domain),
779
- created: false
780
- };
781
- }
782
- if (!isValidDomainSlug(domain)) {
783
- throw new Error(
784
- `Invalid domain name "${domain}": use lowercase a-z, 0-9 and single hyphens (max 39 chars), e.g. "my-domain".`
785
- );
786
- }
787
- const publisher = opts.publisher ?? slugifyAssetName(domain);
788
- fs11.mkdirSync(dir, { recursive: true });
789
- const description = opts.description ?? `The ${domain} domain.`;
790
- fs11.writeFileSync(domainFile, DOMAIN_TEMPLATE(domain, publisher, description), "utf8");
791
- return { dir, publisher, created: true };
792
- }
793
- function readDomainMd(libraryPath, domain) {
794
- const domainFile = path35.join(libraryPath, domain, "DOMAIN.md");
795
- try {
796
- const { data } = parseFrontmatter(fs11.readFileSync(domainFile, "utf8"));
797
- return parseDomainMd(`${domain}/DOMAIN.md`, data);
798
- } catch {
799
- return void 0;
800
- }
801
- }
802
- function listDomains(libraryPath) {
803
- if (!fs11.existsSync(libraryPath)) return [];
804
- return fs11.readdirSync(libraryPath, { withFileTypes: true }).filter((e) => e.isDirectory() && fs11.existsSync(path35.join(libraryPath, e.name, "DOMAIN.md"))).map((e) => e.name).sort();
805
- }
806
- function upsertManifestAsset(libraryPath, input) {
807
- const manifest = loadSkPublishManifest(libraryPath) ?? { assets: [] };
808
- const assets = Array.isArray(manifest.assets) ? [...manifest.assets] : [];
809
- const overridesTopLevel = !!input.publisher && input.publisher !== manifest.publisher;
810
- const entry = { kind: input.kind, name: input.name, root: input.root };
811
- if (input.version) entry.version = input.version;
812
- if (overridesTopLevel) entry.publisher = input.publisher;
813
- if (input.description) entry.description = input.description;
814
- if (input.keywords && input.keywords.length > 0) entry.keywords = input.keywords;
815
- const idx = assets.findIndex((a) => a.kind === input.kind && a.name === input.name);
816
- const added = idx < 0;
817
- if (added) {
818
- assets.push(entry);
819
- } else {
820
- const merged = { ...assets[idx], ...entry };
821
- if (input.publisher && !overridesTopLevel) delete merged.publisher;
822
- assets[idx] = merged;
823
- }
824
- const manifestPath = saveSkPublishManifest(libraryPath, { ...manifest, assets });
825
- return { manifestPath, added };
826
- }
827
691
 
828
692
  // cli/src/commands/asset-cmd.ts
829
693
  async function resolveDefByRef(library, ref, opts) {
@@ -850,7 +714,7 @@ function withCanonicalRef(def) {
850
714
  }
851
715
  function makeAssetCommand() {
852
716
  const cmd = new Command("asset").description("Author and install AI assets");
853
- cmd.command("import <name-or-path>").description("Import + skailify an existing coding-agent skill into a library").option("--to <library>", "Target library (default: auto / personal)").option("--domain <name>", "Place under this domain's skills/ (created if missing)").option("--version <semver>", "Version to stamp when the skill ships none").option("--stage <stage>", "Lifecycle stage to stamp (default: alpha)").option("--no-normalize", "Copy verbatim \u2014 skip frontmatter normalization").option("--commit", "Auto-commit in git-backed libraries", false).action(
717
+ cmd.command("import <name-or-path>").description("Import + skailify an existing coding-agent skill into a library").option("--to <library>", "Target library (default: auto / personal)").option("--version <semver>", "Version to stamp when the skill ships none").option("--stage <stage>", "Lifecycle stage to stamp (default: alpha)").option("--no-normalize", "Copy verbatim \u2014 skip frontmatter normalization").option("--commit", "Auto-commit in git-backed libraries", false).action(
854
718
  async (nameOrPath, opts) => {
855
719
  const src = resolveImportSource(nameOrPath);
856
720
  if (!src) {
@@ -874,39 +738,24 @@ function makeAssetCommand() {
874
738
  logErr(`Library "${target.name}" is read-only (ownership=reader). Choose --to.`);
875
739
  process.exit(1);
876
740
  }
877
- const rawSkill = fs11.readFileSync(src.skillFile, "utf8");
741
+ const rawSkill = fs10.readFileSync(src.skillFile, "utf8");
878
742
  const norm = opts.normalize ? normalizeSkillContent(rawSkill, {
879
- fallbackName: path35.basename(src.dir),
743
+ fallbackName: path34.basename(src.dir),
880
744
  version: opts.version,
881
745
  stage: opts.stage
882
- }) : { content: rawSkill, name: path35.basename(src.dir), changed: false, notes: [] };
746
+ }) : { content: rawSkill, name: path34.basename(src.dir), changed: false, notes: [] };
883
747
  if (!opts.normalize && !isValidAssetName(norm.name)) {
884
748
  logWarn(
885
749
  `Name "${norm.name}" is not canonical (kebab-case); \`skaile validate\` will reject this manifest entry. Drop --no-normalize to slugify it.`
886
750
  );
887
751
  }
888
- let destParent = target.path;
889
- let publisher;
890
- if (opts.domain) {
891
- let dom;
892
- try {
893
- dom = ensureDomain(target.path, opts.domain);
894
- } catch (err) {
895
- logErr(err instanceof Error ? err.message : String(err));
896
- process.exit(1);
897
- }
898
- if (dom.created) logOk(`Scaffolded domain ${S.cmd(opts.domain)} \u2192 ${dom.dir}`);
899
- destParent = path35.join(dom.dir, "skills");
900
- publisher = dom.publisher;
901
- }
902
- fs11.mkdirSync(destParent, { recursive: true });
903
- const destDir = path35.join(destParent, norm.name);
904
- if (fs11.existsSync(destDir)) {
752
+ const destDir = path34.join(target.path, norm.name);
753
+ if (fs10.existsSync(destDir)) {
905
754
  logErr(`Destination already exists: ${destDir}`);
906
755
  process.exit(1);
907
756
  }
908
- fs11.cpSync(src.dir, destDir, { recursive: true });
909
- fs11.writeFileSync(path35.join(destDir, "SKILL.md"), norm.content, "utf8");
757
+ fs10.cpSync(src.dir, destDir, { recursive: true });
758
+ fs10.writeFileSync(path34.join(destDir, "SKILL.md"), norm.content, "utf8");
910
759
  for (const note of norm.notes) logInfo(` \u2022 ${note}`);
911
760
  const fm = parseFrontmatter(norm.content).data;
912
761
  const descRaw = fm.description;
@@ -914,13 +763,12 @@ function makeAssetCommand() {
914
763
  for (const f of checkAgentSkillConformance(fm, { dirName: norm.name })) {
915
764
  logWarn(`conformance: ${f.field} \u2014 ${f.message}`);
916
765
  }
917
- const root = path35.relative(target.path, destDir);
766
+ const root = path34.relative(target.path, destDir);
918
767
  const up = upsertManifestAsset(target.path, {
919
768
  kind: "skill",
920
769
  name: norm.name,
921
770
  root,
922
771
  version: opts.version,
923
- publisher,
924
772
  description
925
773
  });
926
774
  logOk(`${up.added ? "Added" : "Updated"} manifest entry skill:${norm.name}`);
@@ -942,13 +790,13 @@ function makeAssetCommand() {
942
790
  }
943
791
  }
944
792
  );
945
- cmd.command("migrate <path>").description("Move/copy/link a workspace asset into a library").option("--to <library>", "Target library (default: auto)").option("--domain <name>", "Place inside this domain (domain-structured libs)").option("--mode <mode>", "copy | move | link", "copy").option("--commit", "Auto-commit in git-backed libraries", false).action(
793
+ cmd.command("migrate <path>").description("Move/copy/link a workspace asset into a library").option("--to <library>", "Target library (default: auto)").option("--mode <mode>", "copy | move | link", "copy").option("--commit", "Auto-commit in git-backed libraries", false).action(
946
794
  async (srcPath, opts) => {
947
795
  if (!["copy", "move", "link"].includes(opts.mode)) {
948
796
  logErr(`Invalid --mode "${opts.mode}". Expected: copy | move | link.`);
949
797
  process.exit(1);
950
798
  }
951
- if (!fs11.existsSync(srcPath)) {
799
+ if (!fs10.existsSync(srcPath)) {
952
800
  logErr(`Source path does not exist: ${srcPath}`);
953
801
  process.exit(1);
954
802
  }
@@ -973,23 +821,23 @@ function makeAssetCommand() {
973
821
  );
974
822
  process.exit(1);
975
823
  }
976
- const basename2 = path35.basename(srcPath);
977
- const destDir = target.structure === "domain" && opts.domain ? path35.join(target.path, opts.domain) : target.path;
978
- fs11.mkdirSync(destDir, { recursive: true });
979
- const destPath = path35.join(destDir, basename2);
980
- if (fs11.existsSync(destPath)) {
824
+ const basename2 = path34.basename(srcPath);
825
+ const destDir = target.path;
826
+ fs10.mkdirSync(destDir, { recursive: true });
827
+ const destPath = path34.join(destDir, basename2);
828
+ if (fs10.existsSync(destPath)) {
981
829
  logErr(`Destination already exists: ${destPath}`);
982
830
  process.exit(1);
983
831
  }
984
832
  switch (opts.mode) {
985
833
  case "copy":
986
- fs11.cpSync(srcPath, destPath, { recursive: true });
834
+ fs10.cpSync(srcPath, destPath, { recursive: true });
987
835
  break;
988
836
  case "move":
989
- fs11.renameSync(srcPath, destPath);
837
+ fs10.renameSync(srcPath, destPath);
990
838
  break;
991
839
  case "link":
992
- fs11.symlinkSync(path35.resolve(srcPath), destPath);
840
+ fs10.symlinkSync(path34.resolve(srcPath), destPath);
993
841
  break;
994
842
  }
995
843
  if (target.backend === "git" && opts.commit) {
@@ -1046,17 +894,17 @@ function makeAssetCommand() {
1046
894
  }
1047
895
  const manifestPath = def.manifest.path;
1048
896
  const candidateSubpath = typeof manifestPath === "string" && manifestPath.length > 0 ? manifestPath : def.name;
1049
- const srcPath = path35.join(lib.path, candidateSubpath);
1050
- if (!fs11.existsSync(srcPath)) {
897
+ const srcPath = path34.join(lib.path, candidateSubpath);
898
+ if (!fs10.existsSync(srcPath)) {
1051
899
  logErr(`Asset path not found: ${srcPath}`);
1052
900
  process.exit(1);
1053
901
  }
1054
- const destPath = path35.join(target, candidateSubpath);
1055
- fs11.mkdirSync(path35.dirname(destPath), { recursive: true });
902
+ const destPath = path34.join(target, candidateSubpath);
903
+ fs10.mkdirSync(path34.dirname(destPath), { recursive: true });
1056
904
  if (opts.mode === "copy") {
1057
- fs11.cpSync(srcPath, destPath, { recursive: true });
905
+ fs10.cpSync(srcPath, destPath, { recursive: true });
1058
906
  } else {
1059
- fs11.symlinkSync(path35.resolve(srcPath), destPath);
907
+ fs10.symlinkSync(path34.resolve(srcPath), destPath);
1060
908
  }
1061
909
  logOk(`Installed ${catalogAssetRef(def)} \u2192 ${destPath} (${opts.mode})`);
1062
910
  } finally {
@@ -1121,14 +969,14 @@ function makeAuthCommand() {
1121
969
  }
1122
970
  function collectCacheTargets(scope) {
1123
971
  const out = [];
1124
- out.push(path35__default.join(scope.projectDir, ".skaile", "cache"));
1125
- out.push(path35__default.join(scope.projectDir, ".skaile", "store-cache"));
1126
- out.push(path35__default.join(scope.projectDir, ".skaile", "repos"));
972
+ out.push(path34__default.join(scope.projectDir, ".skaile", "cache"));
973
+ out.push(path34__default.join(scope.projectDir, ".skaile", "store-cache"));
974
+ out.push(path34__default.join(scope.projectDir, ".skaile", "repos"));
1127
975
  if (scope.global) {
1128
976
  out.push(globalCacheRoot());
1129
977
  const home = globalSkaileDir();
1130
- out.push(path35__default.join(home, "repos"));
1131
- out.push(path35__default.join(home, "catalog-cache"));
978
+ out.push(path34__default.join(home, "repos"));
979
+ out.push(path34__default.join(home, "catalog-cache"));
1132
980
  }
1133
981
  return out;
1134
982
  }
@@ -1142,7 +990,7 @@ function dirSize(target) {
1142
990
  function dirSizeOfDir(dir) {
1143
991
  let total = 0;
1144
992
  for (const ent of readdirSync(dir, { withFileTypes: true })) {
1145
- const child = path35__default.join(dir, ent.name);
993
+ const child = path34__default.join(dir, ent.name);
1146
994
  if (ent.isSymbolicLink()) continue;
1147
995
  if (ent.isDirectory()) total += dirSizeOfDir(child);
1148
996
  else if (ent.isFile()) total += statSync(child).size;
@@ -1168,7 +1016,7 @@ function makeCacheCommand() {
1168
1016
  const cmd = new Command("cache").description("Inspect and reclaim the re-derivable cache");
1169
1017
  cmd.command("clean").description("Remove the project cache (.skaile/cache); --global also clears ~/.skaile/cache").option("--global", "Also clear the global cache (sources + catalog) and legacy dirs").option("--dry-run", "Show what would be removed without doing it").option("-y, --yes", "Skip confirmation prompt").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
1170
1018
  const targets = collectCacheTargets({
1171
- projectDir: path35__default.resolve(opts.projectDir),
1019
+ projectDir: path34__default.resolve(opts.projectDir),
1172
1020
  global: opts.global
1173
1021
  }).filter((t) => existsSync(t));
1174
1022
  if (targets.length === 0) {
@@ -1198,12 +1046,12 @@ function makeCacheCommand() {
1198
1046
  for (const r of removed) logOk(`Removed ${r}`);
1199
1047
  });
1200
1048
  cmd.command("dir").description("Print the resolved cache roots").option("--global", "Include the global cache root").option("--project-dir <path>", "Project directory", process.cwd()).action((opts) => {
1201
- console.log(path35__default.join(path35__default.resolve(opts.projectDir), ".skaile", "cache"));
1049
+ console.log(path34__default.join(path34__default.resolve(opts.projectDir), ".skaile", "cache"));
1202
1050
  if (opts.global) console.log(globalCacheRoot());
1203
1051
  });
1204
1052
  cmd.command("size").description("Show cache disk usage per directory").option("--global", "Include the global cache").option("--project-dir <path>", "Project directory", process.cwd()).action((opts) => {
1205
1053
  const targets = collectCacheTargets({
1206
- projectDir: path35__default.resolve(opts.projectDir),
1054
+ projectDir: path34__default.resolve(opts.projectDir),
1207
1055
  global: opts.global
1208
1056
  });
1209
1057
  console.log();
@@ -1219,7 +1067,7 @@ function makeCatalogCommand() {
1219
1067
  const catalog = new Command("catalog").description("Catalog source health and configuration");
1220
1068
  catalog.command("test").description("Probe the configured catalog source and report status").option("--project-dir <path>", "Project directory (for project-level config overlay)").option("--url <url>", "Override the catalog URL for this probe").option("--force", "Probe the network even in air-gapped mode (cache_ttl: 0)").action(async (opts) => {
1221
1069
  const { resolveConfig, isLocalCatalogUrl, trpcGetUrl } = await import('../library/index.js');
1222
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : void 0;
1070
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : void 0;
1223
1071
  const cfg = resolveConfig({ projectDir });
1224
1072
  const baseUrl = opts.url ?? cfg.catalog.url;
1225
1073
  if (isLocalCatalogUrl(baseUrl)) {
@@ -1237,7 +1085,7 @@ function makeCatalogCommand() {
1237
1085
  });
1238
1086
  catalog.command("info").description("Print the resolved catalog configuration (url, framing, cacheTtlMs)").option("--project-dir <path>", "Project directory (for project-level config overlay)").action(async (opts) => {
1239
1087
  const { resolveConfig } = await import('../library/index.js');
1240
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : void 0;
1088
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : void 0;
1241
1089
  const cfg = resolveConfig({ projectDir });
1242
1090
  console.log(`url: ${cfg.catalog.url}`);
1243
1091
  console.log(`framing: ${cfg.catalog.framing}`);
@@ -1246,7 +1094,7 @@ function makeCatalogCommand() {
1246
1094
  return catalog;
1247
1095
  }
1248
1096
  async function runLocalCatalogTest(projectDir) {
1249
- const { resolveCatalogSource } = await import('../open-library-R62UBL6E.js');
1097
+ const { resolveCatalogSource } = await import('../open-library-SSBN4FX2.js');
1250
1098
  let resolved;
1251
1099
  try {
1252
1100
  resolved = await resolveCatalogSource({ projectDir });
@@ -1366,8 +1214,6 @@ complete -F _${bin}_completion ${bin}`,
1366
1214
  end
1367
1215
  complete -c ${bin} -f -a '(__${bin}_complete)'`
1368
1216
  };
1369
-
1370
- // cli/src/flow-discovery.ts
1371
1217
  function discoverFlows(projectDir) {
1372
1218
  const byId = /* @__PURE__ */ new Map();
1373
1219
  for (const root of aiResourceRoots(projectDir)) {
@@ -1380,11 +1226,59 @@ function discoverFlows(projectDir) {
1380
1226
  function findFlowFile(flowId, priorityRoots = [], projectDir) {
1381
1227
  return findFlowFileInRoots(flowId, [...priorityRoots, ...aiResourceRoots(projectDir)]);
1382
1228
  }
1383
- function findSkills(domain) {
1229
+ async function libraryFlowEntries() {
1230
+ const entries = [];
1231
+ try {
1232
+ const { LocalCatalogSource, LocalIndex, resolveIndexPath } = await import('../library/index.js');
1233
+ const indexPath = resolveIndexPath();
1234
+ if (!existsSync(indexPath)) return entries;
1235
+ const [{ authoringLibraries }, { createFullRegistry: createFullRegistry2 }] = await Promise.all([
1236
+ import('../open-library-SSBN4FX2.js'),
1237
+ import('../open-registry-CHCWKV5W.js')
1238
+ ]);
1239
+ const index = new LocalIndex({ indexPath });
1240
+ try {
1241
+ const registry = createFullRegistry2();
1242
+ for (const lib of authoringLibraries(await index.listSources())) {
1243
+ if (!existsSync(lib.path)) continue;
1244
+ try {
1245
+ const { assets } = new LocalCatalogSource(index, lib.id, lib.path, registry).scan();
1246
+ for (const asset of assets) {
1247
+ if (asset.kind !== "flow") continue;
1248
+ try {
1249
+ const flow = loadFlow(asset.manifestPath);
1250
+ if (flow.id) entries.push({ flow, path: asset.manifestPath });
1251
+ } catch {
1252
+ }
1253
+ }
1254
+ } catch {
1255
+ }
1256
+ }
1257
+ } finally {
1258
+ index.close();
1259
+ }
1260
+ } catch {
1261
+ }
1262
+ return entries;
1263
+ }
1264
+ async function discoverFlowsWithLibraries(projectDir) {
1265
+ const byId = /* @__PURE__ */ new Map();
1266
+ for (const flow of discoverFlows(projectDir)) byId.set(flow.id, flow);
1267
+ for (const { flow } of await libraryFlowEntries()) {
1268
+ if (!byId.has(flow.id)) byId.set(flow.id, flow);
1269
+ }
1270
+ return [...byId.values()];
1271
+ }
1272
+ async function findFlowFileWithLibraries(flowId, priorityRoots = [], projectDir) {
1273
+ const inRoots = findFlowFile(flowId, priorityRoots, projectDir);
1274
+ if (inRoots) return inRoots;
1275
+ return (await libraryFlowEntries()).find((e) => e.flow.id === flowId)?.path;
1276
+ }
1277
+ function findSkills() {
1384
1278
  const found = [];
1385
1279
  for (const root of aiResourceRoots()) {
1386
- for (const { dir, domain: dirDomain } of assetSearchDirs(root, "skills")) {
1387
- if (fs11__default.existsSync(dir)) walkSkills(dir, dirDomain, found);
1280
+ for (const dir of findKindDirs(root, "skills")) {
1281
+ walkSkills(dir, found);
1388
1282
  }
1389
1283
  }
1390
1284
  const seen = /* @__PURE__ */ new Set();
@@ -1396,15 +1290,15 @@ function findSkills(domain) {
1396
1290
  }
1397
1291
  return deduped;
1398
1292
  }
1399
- function walkSkills(dir, domain, out) {
1400
- for (const entry of fs11__default.readdirSync(dir, { withFileTypes: true })) {
1401
- const full = path35__default.join(dir, entry.name);
1293
+ function walkSkills(dir, out) {
1294
+ for (const entry of fs10__default.readdirSync(dir, { withFileTypes: true })) {
1295
+ const full = path34__default.join(dir, entry.name);
1402
1296
  if (entry.isDirectory()) {
1403
- const skillMd = path35__default.join(full, "SKILL.md");
1404
- if (fs11__default.existsSync(skillMd)) {
1405
- out.push({ name: entry.name, path: full, skillPath: skillMd, domain });
1297
+ const skillMd = path34__default.join(full, "SKILL.md");
1298
+ if (fs10__default.existsSync(skillMd)) {
1299
+ out.push({ name: entry.name, path: full, skillPath: skillMd });
1406
1300
  } else {
1407
- walkSkills(full, domain, out);
1301
+ walkSkills(full, out);
1408
1302
  }
1409
1303
  }
1410
1304
  }
@@ -1422,10 +1316,10 @@ function resolveFlowIds() {
1422
1316
  }
1423
1317
  }
1424
1318
  function resolveSessionIds(projectDir) {
1425
- const sessionsDir = path35__default.join(projectDir, ".skaile", "sessions");
1426
- if (!fs11__default.existsSync(sessionsDir)) return [];
1319
+ const sessionsDir = path34__default.join(projectDir, ".skaile", "sessions");
1320
+ if (!fs10__default.existsSync(sessionsDir)) return [];
1427
1321
  try {
1428
- return fs11__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
1322
+ return fs10__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
1429
1323
  } catch {
1430
1324
  return [];
1431
1325
  }
@@ -1564,7 +1458,7 @@ function printResolvedPathsSection(config) {
1564
1458
  console.log(` ${S.label("prompts:".padEnd(16))} ${config.promptsDir ?? paths.promptsDir}`);
1565
1459
  }
1566
1460
  async function showConfig(opts) {
1567
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
1461
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : process.cwd();
1568
1462
  let config;
1569
1463
  let wsDefaults;
1570
1464
  try {
@@ -1609,13 +1503,13 @@ function makeConfigCommand() {
1609
1503
  const cmd = new Command("config").description("Manage personal config (.skaile/settings.json)");
1610
1504
  cmd.command("show").description("Show effective config with sources").option("--project-dir <path>", "Project directory").action((opts) => showConfig(opts));
1611
1505
  cmd.command("get <key>").description("Get an effective config value").option("--project-dir <path>", "Project directory").action(async (key, opts) => {
1612
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
1506
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : process.cwd();
1613
1507
  const config = await resolveSettings(projectDir);
1614
1508
  const value = config[key];
1615
1509
  console.log(value ?? S.dim("(not set)"));
1616
1510
  });
1617
1511
  cmd.command("set <key> <value>").description("Set a personal config value (driver, model, apiKey.<provider>)").option("--project-dir <path>", "Project directory").option("--global", "Write to ~/.skaile/settings.json instead of project-local").action(async (key, value, opts) => {
1618
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
1512
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : process.cwd();
1619
1513
  if (key === "provider" || key === "cloud" || key === "cloudConfig") {
1620
1514
  logErr(
1621
1515
  `'${key}' is no longer a setting \u2014 an endpoint is an AI provider registry entry and a session selects one with a model reference.
@@ -1752,11 +1646,11 @@ function makeConnectCommand() {
1752
1646
  process.exitCode = 1;
1753
1647
  return;
1754
1648
  }
1755
- await new Promise((resolve5) => {
1649
+ await new Promise((resolve4) => {
1756
1650
  client.onMessage((event) => {
1757
1651
  console.log(formatEvent(event));
1758
1652
  if (event.type === "finished" || event.type === "debug_result") {
1759
- resolve5();
1653
+ resolve4();
1760
1654
  }
1761
1655
  });
1762
1656
  client.send(parsed);
@@ -1800,12 +1694,12 @@ function makeConnectCommand() {
1800
1694
  client.send(cmd);
1801
1695
  rl.prompt();
1802
1696
  });
1803
- await new Promise((resolve5) => {
1804
- rl.on("close", resolve5);
1697
+ await new Promise((resolve4) => {
1698
+ rl.on("close", resolve4);
1805
1699
  client.onDisconnect(() => {
1806
1700
  logErr("Server disconnected");
1807
1701
  rl.close();
1808
- resolve5();
1702
+ resolve4();
1809
1703
  });
1810
1704
  });
1811
1705
  await client.disconnect();
@@ -1887,15 +1781,15 @@ function parseOpArgs(args) {
1887
1781
  async function promptText(label, defaultVal) {
1888
1782
  const rl = createInterface({ input: process.stdin, output: process.stdout });
1889
1783
  const hint = defaultVal ? ` [${defaultVal}]` : "";
1890
- return new Promise((resolve5) => {
1784
+ return new Promise((resolve4) => {
1891
1785
  rl.question(` ${label}${hint}: `, (answer) => {
1892
1786
  rl.close();
1893
- resolve5(answer.trim() || defaultVal || "");
1787
+ resolve4(answer.trim() || defaultVal || "");
1894
1788
  });
1895
1789
  });
1896
1790
  }
1897
1791
  async function promptSecret(label) {
1898
- return new Promise((resolve5) => {
1792
+ return new Promise((resolve4) => {
1899
1793
  process.stdout.write(` ${label} (hidden): `);
1900
1794
  const stdin = process.stdin;
1901
1795
  stdin.setRawMode?.(true);
@@ -1908,7 +1802,7 @@ async function promptSecret(label) {
1908
1802
  stdin.pause();
1909
1803
  stdin.removeListener("data", onData);
1910
1804
  process.stdout.write("\n");
1911
- resolve5(value);
1805
+ resolve4(value);
1912
1806
  } else if (char === "") {
1913
1807
  process.exit(1);
1914
1808
  } else if (char === "\x7F") {
@@ -1955,8 +1849,8 @@ function makeConnectorCommand() {
1955
1849
  async (driver, opts) => {
1956
1850
  const { installNpmPackages } = await import('../connectors/index.js');
1957
1851
  const { scanDirectory: scanDirectory2, factoryAssetRoots: factoryAssetRoots2, WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
1958
- const projectDir = path35__default.resolve(opts.projectDir);
1959
- const yamlPath = path35__default.join(projectDir, "skaile.yaml");
1852
+ const projectDir = path34__default.resolve(opts.projectDir);
1853
+ const yamlPath = path34__default.join(projectDir, "skaile.yaml");
1960
1854
  if (!existsSync(yamlPath)) {
1961
1855
  logErr("No skaile.yaml found in current directory. Run 'skaile init' first.");
1962
1856
  process.exit(1);
@@ -2016,8 +1910,8 @@ ${installResult.output}`);
2016
1910
  );
2017
1911
  cmd.command("remove <id>").option("--project-dir <path>", "Workspace directory", process.cwd()).description("Remove a connector from skaile.yaml by its instance ID").action(async (id, opts) => {
2018
1912
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
2019
- const projectDir = path35__default.resolve(opts.projectDir);
2020
- const yamlPath = path35__default.join(projectDir, "skaile.yaml");
1913
+ const projectDir = path34__default.resolve(opts.projectDir);
1914
+ const yamlPath = path34__default.join(projectDir, "skaile.yaml");
2021
1915
  if (!existsSync(yamlPath)) {
2022
1916
  logErr("No skaile.yaml found in current directory.");
2023
1917
  process.exit(1);
@@ -2034,7 +1928,7 @@ ${installResult.output}`);
2034
1928
  cmd.command("status [id]").option("--project-dir <path>", "Workspace directory", process.cwd()).description("Connect and report health status for one or all connectors").action(async (id, opts) => {
2035
1929
  const res = await import('../connectors/index.js');
2036
1930
  res.registerBuiltinConnectors();
2037
- const projectDir = path35__default.resolve(opts.projectDir);
1931
+ const projectDir = path34__default.resolve(opts.projectDir);
2038
1932
  const declarations = res.loadConnectorDeclarations(projectDir);
2039
1933
  if (declarations.length === 0) {
2040
1934
  console.log("No connectors configured in skaile.yaml.");
@@ -2058,7 +1952,7 @@ ${installResult.output}`);
2058
1952
  await manager.disconnectAll();
2059
1953
  });
2060
1954
  cmd.command("list").description("List all configured connectors").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (opts) => {
2061
- const projectDir = path35__default.resolve(opts.projectDir);
1955
+ const projectDir = path34__default.resolve(opts.projectDir);
2062
1956
  const manager = await connectConnectors(projectDir);
2063
1957
  try {
2064
1958
  console.log(JSON.stringify(manager.listConnectors(), null, 2));
@@ -2067,7 +1961,7 @@ ${installResult.output}`);
2067
1961
  }
2068
1962
  });
2069
1963
  cmd.command("sync [id]").description("Re-sync a filesystem-face connector or all of them (git pull, S3 refresh, etc.)").option("--all", "Sync all connectors").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, opts) => {
2070
- const projectDir = path35__default.resolve(opts.projectDir);
1964
+ const projectDir = path34__default.resolve(opts.projectDir);
2071
1965
  const manager = await connectConnectors(projectDir);
2072
1966
  try {
2073
1967
  if (opts.all) {
@@ -2091,7 +1985,7 @@ ${installResult.output}`);
2091
1985
  }
2092
1986
  });
2093
1987
  cmd.command("ops <id>").description("List available operations for a connector").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, opts) => {
2094
- const projectDir = path35__default.resolve(opts.projectDir);
1988
+ const projectDir = path34__default.resolve(opts.projectDir);
2095
1989
  const manager = await connectConnectors(projectDir);
2096
1990
  try {
2097
1991
  if (!manager.has(id)) {
@@ -2106,7 +2000,7 @@ ${installResult.output}`);
2106
2000
  }
2107
2001
  });
2108
2002
  cmd.command("read <id> <resource-path>").description("Read content from a connector").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, resourcePath, opts) => {
2109
- const projectDir = path35__default.resolve(opts.projectDir);
2003
+ const projectDir = path34__default.resolve(opts.projectDir);
2110
2004
  const manager = await connectConnectors(projectDir);
2111
2005
  try {
2112
2006
  const content = await manager.read(id, resourcePath);
@@ -2116,7 +2010,7 @@ ${installResult.output}`);
2116
2010
  }
2117
2011
  });
2118
2012
  cmd.command("write <id> <resource-path> <content>").description("Write content to a connector at a path").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, resourcePath, content, opts) => {
2119
- const projectDir = path35__default.resolve(opts.projectDir);
2013
+ const projectDir = path34__default.resolve(opts.projectDir);
2120
2014
  const manager = await connectConnectors(projectDir);
2121
2015
  try {
2122
2016
  await manager.write(id, resourcePath, { data: content });
@@ -2126,7 +2020,7 @@ ${installResult.output}`);
2126
2020
  }
2127
2021
  });
2128
2022
  cmd.command("entries <id> [resource-path]").description("List entries in a connector (files, keys, rows, etc)").option("--project-dir <path>", "Workspace directory", process.cwd()).option("--recursive", "Include nested entries").option("--limit <n>", "Maximum entries to return", parsePositiveIntOption).action(async (id, resourcePath, opts) => {
2129
- const projectDir = path35__default.resolve(opts.projectDir);
2023
+ const projectDir = path34__default.resolve(opts.projectDir);
2130
2024
  const manager = await connectConnectors(projectDir);
2131
2025
  try {
2132
2026
  const entries = await manager.list(id, resourcePath, {
@@ -2139,7 +2033,7 @@ ${installResult.output}`);
2139
2033
  }
2140
2034
  });
2141
2035
  cmd.command("search <id> <query>").description("Search within a connector for matching content").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, query, opts) => {
2142
- const projectDir = path35__default.resolve(opts.projectDir);
2036
+ const projectDir = path34__default.resolve(opts.projectDir);
2143
2037
  const manager = await connectConnectors(projectDir);
2144
2038
  try {
2145
2039
  const results = await manager.search(id, query);
@@ -2149,7 +2043,7 @@ ${installResult.output}`);
2149
2043
  }
2150
2044
  });
2151
2045
  cmd.command("delete <id> <resource-path>").description("Delete an entry from a connector").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, resourcePath, opts) => {
2152
- const projectDir = path35__default.resolve(opts.projectDir);
2046
+ const projectDir = path34__default.resolve(opts.projectDir);
2153
2047
  const manager = await connectConnectors(projectDir);
2154
2048
  try {
2155
2049
  const ok = await manager.delete(id, resourcePath);
@@ -2159,7 +2053,7 @@ ${installResult.output}`);
2159
2053
  }
2160
2054
  });
2161
2055
  cmd.command("run <id> <op> [args...]").description("Run a custom adapter operation (e.g. git log, sqlite query)").option("--project-dir <path>", "Workspace directory", process.cwd()).allowUnknownOption().action(async (id, op, args, opts) => {
2162
- const projectDir = path35__default.resolve(opts.projectDir);
2056
+ const projectDir = path34__default.resolve(opts.projectDir);
2163
2057
  const manager = await connectConnectors(projectDir);
2164
2058
  try {
2165
2059
  if (!manager.has(id)) {
@@ -2194,17 +2088,17 @@ async function runDebugQuery(query, parentOpts, args) {
2194
2088
  process.exitCode = 1;
2195
2089
  return;
2196
2090
  }
2197
- await new Promise((resolve5) => {
2091
+ await new Promise((resolve4) => {
2198
2092
  const timeout = setTimeout(() => {
2199
2093
  logErr("Timeout: no debug_result received within 5s");
2200
2094
  process.exitCode = 1;
2201
- resolve5();
2095
+ resolve4();
2202
2096
  }, 5e3);
2203
2097
  client.onMessage((event) => {
2204
2098
  if (event.type !== "debug_result") return;
2205
2099
  clearTimeout(timeout);
2206
2100
  printDebugResult(query, event.data);
2207
- resolve5();
2101
+ resolve4();
2208
2102
  });
2209
2103
  client.send({ type: "debug", query, args });
2210
2104
  });
@@ -2268,7 +2162,7 @@ function envRecord() {
2268
2162
  async function buildDeployContext(projectDir) {
2269
2163
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2270
2164
  const config = resolveSkWorkspaceConfig2(projectDir);
2271
- const workspaceId = config.name ?? path35__default.basename(projectDir);
2165
+ const workspaceId = config.name ?? path34__default.basename(projectDir);
2272
2166
  let log;
2273
2167
  try {
2274
2168
  const { createLogger } = await import('../core/logging.js');
@@ -2300,13 +2194,13 @@ async function ensureTargetsRegistered(projectDir) {
2300
2194
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2301
2195
  const config = resolveSkWorkspaceConfig2(projectDir);
2302
2196
  if (config.plugins && config.plugins.length > 0) {
2303
- const { ensurePluginsLoaded } = await import('../plugin-store-D45CREMJ.js');
2197
+ const { ensurePluginsLoaded } = await import('../plugin-store-SVYV7L4C.js');
2304
2198
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
2305
2199
  for (const f of result.failed) logWarn(f.error);
2306
2200
  }
2307
2201
  }
2308
2202
  async function runUp(opts) {
2309
- const projectDir = path35__default.resolve(opts.projectDir);
2203
+ const projectDir = path34__default.resolve(opts.projectDir);
2310
2204
  await ensureTargetsRegistered(projectDir);
2311
2205
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2312
2206
  const { resolveDeployTarget, pluginRegistry } = await import('../plugin-registry/index.js');
@@ -2338,12 +2232,12 @@ async function runUp(opts) {
2338
2232
  await holdUntilSignal(handle, controller);
2339
2233
  }
2340
2234
  function holdUntilSignal(handle, controller) {
2341
- return new Promise((resolve5) => {
2235
+ return new Promise((resolve4) => {
2342
2236
  const onSig = () => {
2343
2237
  process.removeListener("SIGINT", onSig);
2344
2238
  controller.abort();
2345
2239
  logInfo("Stopping\u2026");
2346
- handle.stop().then(() => logOk("Stopped.")).catch((e) => logErr(`stop failed: ${e instanceof Error ? e.message : String(e)}`)).finally(() => resolve5());
2240
+ handle.stop().then(() => logOk("Stopped.")).catch((e) => logErr(`stop failed: ${e instanceof Error ? e.message : String(e)}`)).finally(() => resolve4());
2347
2241
  };
2348
2242
  process.on("SIGINT", onSig);
2349
2243
  });
@@ -2374,7 +2268,7 @@ async function restoreFromHandle(projectDir) {
2374
2268
  return { target, handle, ctx };
2375
2269
  }
2376
2270
  async function runDown(opts) {
2377
- const projectDir = path35__default.resolve(opts.projectDir);
2271
+ const projectDir = path34__default.resolve(opts.projectDir);
2378
2272
  const restored = await restoreFromHandle(projectDir);
2379
2273
  if (!restored) return;
2380
2274
  await restored.handle.stop();
@@ -2383,7 +2277,7 @@ async function runDown(opts) {
2383
2277
  logOk(`Stopped ${S.cmd(restored.target.id)} and cleared the handle.`);
2384
2278
  }
2385
2279
  async function runStatus(opts) {
2386
- const projectDir = path35__default.resolve(opts.projectDir);
2280
+ const projectDir = path34__default.resolve(opts.projectDir);
2387
2281
  const restored = await restoreFromHandle(projectDir);
2388
2282
  if (!restored) return;
2389
2283
  const health = await restored.handle.health();
@@ -2397,7 +2291,7 @@ async function runStatus(opts) {
2397
2291
  console.log();
2398
2292
  }
2399
2293
  async function runLogs(opts) {
2400
- const projectDir = path35__default.resolve(opts.projectDir);
2294
+ const projectDir = path34__default.resolve(opts.projectDir);
2401
2295
  const restored = await restoreFromHandle(projectDir);
2402
2296
  if (!restored) return;
2403
2297
  if (!restored.handle.logs) {
@@ -2421,7 +2315,7 @@ function makeDeployCommand() {
2421
2315
  }
2422
2316
  function makeDiffCommand() {
2423
2317
  return new Command("diff").description("Show changes between deployed and source versions").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
2424
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
2318
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
2425
2319
  const result = await am2.diff(ref);
2426
2320
  switch (result.status) {
2427
2321
  case "not-found":
@@ -2443,7 +2337,7 @@ function makeDiffCommand() {
2443
2337
  function makeFlowCommand() {
2444
2338
  const cmd = new Command("flow").description("Manage flows");
2445
2339
  cmd.command("list").description("List available flows").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
2446
- const flows = discoverFlows(path35__default.resolve(opts.projectDir));
2340
+ const flows = await discoverFlowsWithLibraries(path34__default.resolve(opts.projectDir));
2447
2341
  if (flows.length === 0) {
2448
2342
  logInfo("No flows found.");
2449
2343
  return;
@@ -2458,7 +2352,7 @@ function makeFlowCommand() {
2458
2352
  console.log();
2459
2353
  });
2460
2354
  cmd.command("show <id>").description("Show flow details and node graph").option("--project-dir <path>", "Project directory", process.cwd()).action(async (id, opts) => {
2461
- const flows = discoverFlows(path35__default.resolve(opts.projectDir));
2355
+ const flows = await discoverFlowsWithLibraries(path34__default.resolve(opts.projectDir));
2462
2356
  const flow = flows.find((f) => f.id === id);
2463
2357
  if (!flow) {
2464
2358
  logErr(`Flow not found: ${id}`);
@@ -2490,7 +2384,7 @@ function makeFlowCommand() {
2490
2384
  function makeHistoryCommand() {
2491
2385
  const cmd = new Command("history").description("Show recent add/remove/update actions");
2492
2386
  cmd.argument("[limit]", "Number of entries to show", "20").option("--project-dir <path>", "Project directory", process.cwd()).action((limitStr, opts) => {
2493
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
2387
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
2494
2388
  const limit = parseInt(limitStr, 10) || 20;
2495
2389
  const entries = am2.history(limit);
2496
2390
  if (entries.length === 0) {
@@ -2510,7 +2404,7 @@ function makeHistoryCommand() {
2510
2404
  console.log();
2511
2405
  });
2512
2406
  cmd.command("clear").description("Clear action history").option("--project-dir <path>", "Project directory", process.cwd()).action((opts) => {
2513
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
2407
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
2514
2408
  am2.clearHistory();
2515
2409
  logOk("History cleared.");
2516
2410
  });
@@ -2523,12 +2417,12 @@ var MCP_SERVER_ENTRY = {
2523
2417
  env: {}
2524
2418
  };
2525
2419
  function pluginDir(projectDir) {
2526
- return path35__default.join(projectDir, ".claude", "plugins", "skaile");
2420
+ return path34__default.join(projectDir, ".claude", "plugins", "skaile");
2527
2421
  }
2528
2422
  async function readJsonStrict(p7) {
2529
2423
  let raw;
2530
2424
  try {
2531
- raw = await fs5.readFile(p7, "utf-8");
2425
+ raw = await fs4.readFile(p7, "utf-8");
2532
2426
  } catch {
2533
2427
  return null;
2534
2428
  }
@@ -2541,32 +2435,32 @@ async function readJsonStrict(p7) {
2541
2435
  }
2542
2436
  }
2543
2437
  async function writeJson(p7, value) {
2544
- await fs5.mkdir(path35__default.dirname(p7), { recursive: true });
2545
- await fs5.writeFile(p7, `${JSON.stringify(value, null, 2)}
2438
+ await fs4.mkdir(path34__default.dirname(p7), { recursive: true });
2439
+ await fs4.writeFile(p7, `${JSON.stringify(value, null, 2)}
2546
2440
  `);
2547
2441
  }
2548
2442
  async function copyDir(src, dest) {
2549
- await fs5.mkdir(dest, { recursive: true });
2550
- const entries = await fs5.readdir(src, { withFileTypes: true });
2443
+ await fs4.mkdir(dest, { recursive: true });
2444
+ const entries = await fs4.readdir(src, { withFileTypes: true });
2551
2445
  for (const entry of entries) {
2552
- const srcPath = path35__default.join(src, entry.name);
2553
- const destPath = path35__default.join(dest, entry.name);
2446
+ const srcPath = path34__default.join(src, entry.name);
2447
+ const destPath = path34__default.join(dest, entry.name);
2554
2448
  if (entry.isDirectory()) await copyDir(srcPath, destPath);
2555
- else await fs5.copyFile(srcPath, destPath);
2449
+ else await fs4.copyFile(srcPath, destPath);
2556
2450
  }
2557
2451
  }
2558
2452
  async function install(projectDir, opts) {
2559
2453
  return opts?.full ? installFullPlugin(projectDir) : installMcp(projectDir);
2560
2454
  }
2561
2455
  async function installMcp(projectDir) {
2562
- const mcpPath = path35__default.join(projectDir, ".claude", "mcp.json");
2456
+ const mcpPath = path34__default.join(projectDir, ".claude", "mcp.json");
2563
2457
  const existing = await readJsonStrict(mcpPath) ?? {};
2564
2458
  const mcpServers = { ...existing.mcpServers ?? {} };
2565
2459
  const previous = mcpServers[SKAILE_MCP_NAME];
2566
2460
  const matches = previous && JSON.stringify(previous) === JSON.stringify(MCP_SERVER_ENTRY);
2567
2461
  let warning;
2568
2462
  if (previous && !matches) {
2569
- warning = `overwrote existing ${SKAILE_MCP_NAME} entry in ${path35__default.relative(projectDir, mcpPath)}`;
2463
+ warning = `overwrote existing ${SKAILE_MCP_NAME} entry in ${path34__default.relative(projectDir, mcpPath)}`;
2570
2464
  }
2571
2465
  mcpServers[SKAILE_MCP_NAME] = MCP_SERVER_ENTRY;
2572
2466
  await writeJson(mcpPath, { ...existing, mcpServers });
@@ -2575,15 +2469,15 @@ async function installMcp(projectDir) {
2575
2469
  async function installFullPlugin(projectDir) {
2576
2470
  const dir = pluginDir(projectDir);
2577
2471
  for (const [rel, content] of Object.entries(buildClaudePluginFiles())) {
2578
- const dest = path35__default.join(dir, rel);
2579
- await fs5.mkdir(path35__default.dirname(dest), { recursive: true });
2580
- await fs5.writeFile(dest, content);
2472
+ const dest = path34__default.join(dir, rel);
2473
+ await fs4.mkdir(path34__default.dirname(dest), { recursive: true });
2474
+ await fs4.writeFile(dest, content);
2581
2475
  }
2582
- const projectSkillsDir = path35__default.join(projectDir, ".skaile", "skills");
2476
+ const projectSkillsDir = path34__default.join(projectDir, ".skaile", "skills");
2583
2477
  if (existsSync(projectSkillsDir)) {
2584
- await copyDir(projectSkillsDir, path35__default.join(dir, "skills"));
2478
+ await copyDir(projectSkillsDir, path34__default.join(dir, "skills"));
2585
2479
  }
2586
- const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2480
+ const settingsPath = path34__default.join(projectDir, ".claude", "settings.json");
2587
2481
  const settings = await readJsonStrict(settingsPath) ?? {};
2588
2482
  const plugins = settings.plugins ?? [];
2589
2483
  if (!plugins.includes(dir)) plugins.push(dir);
@@ -2591,8 +2485,8 @@ async function installFullPlugin(projectDir) {
2591
2485
  return { changed: true, method: "plugin" };
2592
2486
  }
2593
2487
  async function uninstall(projectDir) {
2594
- const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2595
- const mcpPath = path35__default.join(projectDir, ".claude", "mcp.json");
2488
+ const settingsPath = path34__default.join(projectDir, ".claude", "settings.json");
2489
+ const mcpPath = path34__default.join(projectDir, ".claude", "mcp.json");
2596
2490
  const dir = pluginDir(projectDir);
2597
2491
  let changed = false;
2598
2492
  const settings = await readJsonStrict(settingsPath);
@@ -2606,7 +2500,7 @@ async function uninstall(projectDir) {
2606
2500
  }
2607
2501
  }
2608
2502
  if (existsSync(dir)) {
2609
- await fs5.rm(dir, { recursive: true, force: true });
2503
+ await fs4.rm(dir, { recursive: true, force: true });
2610
2504
  changed = true;
2611
2505
  }
2612
2506
  const mcp = await readJsonStrict(mcpPath);
@@ -2616,7 +2510,7 @@ async function uninstall(projectDir) {
2616
2510
  const updated = { ...mcp, mcpServers: rest };
2617
2511
  if (Object.keys(rest).length === 0) delete updated.mcpServers;
2618
2512
  if (Object.keys(updated).length === 0) {
2619
- await fs5.unlink(mcpPath);
2513
+ await fs4.unlink(mcpPath);
2620
2514
  } else {
2621
2515
  await writeJson(mcpPath, updated);
2622
2516
  }
@@ -2626,12 +2520,12 @@ async function uninstall(projectDir) {
2626
2520
  async function detectInstall(projectDir) {
2627
2521
  const dir = pluginDir(projectDir);
2628
2522
  const settings = await readJsonStrict(
2629
- path35__default.join(projectDir, ".claude", "settings.json")
2523
+ path34__default.join(projectDir, ".claude", "settings.json")
2630
2524
  );
2631
- if (existsSync(path35__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir)) {
2525
+ if (existsSync(path34__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir)) {
2632
2526
  return { method: "plugin", pluginPath: dir };
2633
2527
  }
2634
- const mcp = await readJsonStrict(path35__default.join(projectDir, ".claude", "mcp.json"));
2528
+ const mcp = await readJsonStrict(path34__default.join(projectDir, ".claude", "mcp.json"));
2635
2529
  if (mcp?.mcpServers && SKAILE_MCP_NAME in mcp.mcpServers) {
2636
2530
  return { method: "mcp" };
2637
2531
  }
@@ -2640,7 +2534,7 @@ async function detectInstall(projectDir) {
2640
2534
  async function enable(projectDir) {
2641
2535
  const detected = await detectInstall(projectDir);
2642
2536
  if (!detected) throw new Error("plugin not installed for claude-code");
2643
- const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2537
+ const settingsPath = path34__default.join(projectDir, ".claude", "settings.json");
2644
2538
  const settings = await readJsonStrict(settingsPath) ?? {};
2645
2539
  if (detected.method === "plugin") {
2646
2540
  const disabled2 = settings.disabledPlugins ?? [];
@@ -2662,7 +2556,7 @@ async function enable(projectDir) {
2662
2556
  async function disable(projectDir) {
2663
2557
  const detected = await detectInstall(projectDir);
2664
2558
  if (!detected) throw new Error("plugin not installed for claude-code");
2665
- const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2559
+ const settingsPath = path34__default.join(projectDir, ".claude", "settings.json");
2666
2560
  const settings = await readJsonStrict(settingsPath) ?? {};
2667
2561
  if (detected.method === "plugin") {
2668
2562
  const list2 = settings.disabledPlugins ?? [];
@@ -2682,12 +2576,12 @@ async function disable(projectDir) {
2682
2576
  return { changed: true };
2683
2577
  }
2684
2578
  async function status(projectDir) {
2685
- const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2686
- const mcpPath = path35__default.join(projectDir, ".claude", "mcp.json");
2579
+ const settingsPath = path34__default.join(projectDir, ".claude", "settings.json");
2580
+ const mcpPath = path34__default.join(projectDir, ".claude", "mcp.json");
2687
2581
  const dir = pluginDir(projectDir);
2688
2582
  const settings = await readJsonStrict(settingsPath);
2689
2583
  const mcp = await readJsonStrict(mcpPath);
2690
- const pluginInstalled = !!(existsSync(path35__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir));
2584
+ const pluginInstalled = !!(existsSync(path34__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir));
2691
2585
  const mcpInstalled = !!(mcp?.mcpServers && SKAILE_MCP_NAME in mcp.mcpServers);
2692
2586
  if (!pluginInstalled && !mcpInstalled) {
2693
2587
  return {
@@ -2705,7 +2599,7 @@ async function status(projectDir) {
2705
2599
  installed: "yes",
2706
2600
  enabled: disabled2 ? "no" : "yes",
2707
2601
  method: "plugin",
2708
- location: path35__default.relative(projectDir, dir)
2602
+ location: path34__default.relative(projectDir, dir)
2709
2603
  };
2710
2604
  }
2711
2605
  const disabled = settings?.disabledMcpjsonServers?.includes(SKAILE_MCP_NAME) ?? false;
@@ -2714,7 +2608,7 @@ async function status(projectDir) {
2714
2608
  installed: "yes",
2715
2609
  enabled: disabled ? "no" : "yes",
2716
2610
  method: "mcp",
2717
- location: path35__default.relative(projectDir, mcpPath)
2611
+ location: path34__default.relative(projectDir, mcpPath)
2718
2612
  };
2719
2613
  }
2720
2614
  var SKAILE_MCP_NAME2 = "skaile-workspace";
@@ -2728,7 +2622,7 @@ function buildEntry(projectDir) {
2728
2622
  async function readConfig(p7) {
2729
2623
  let raw;
2730
2624
  try {
2731
- raw = await fs5.readFile(p7, "utf-8");
2625
+ raw = await fs4.readFile(p7, "utf-8");
2732
2626
  } catch {
2733
2627
  return null;
2734
2628
  }
@@ -2741,16 +2635,16 @@ async function readConfig(p7) {
2741
2635
  }
2742
2636
  }
2743
2637
  async function writeConfig(p7, value) {
2744
- await fs5.mkdir(path35__default.dirname(p7), { recursive: true });
2638
+ await fs4.mkdir(path34__default.dirname(p7), { recursive: true });
2745
2639
  const cleaned = {};
2746
2640
  for (const [k, v] of Object.entries(value)) {
2747
2641
  if (v === void 0) continue;
2748
2642
  cleaned[k] = v;
2749
2643
  }
2750
- await fs5.writeFile(p7, stringify$1(cleaned));
2644
+ await fs4.writeFile(p7, stringify$1(cleaned));
2751
2645
  }
2752
2646
  function configPath(projectDir) {
2753
- return path35__default.join(projectDir, ".codex", "config.toml");
2647
+ return path34__default.join(projectDir, ".codex", "config.toml");
2754
2648
  }
2755
2649
  async function install2(projectDir) {
2756
2650
  const p7 = configPath(projectDir);
@@ -2761,7 +2655,7 @@ async function install2(projectDir) {
2761
2655
  const matches = previous && JSON.stringify(previous) === JSON.stringify(next);
2762
2656
  let warning;
2763
2657
  if (previous && !matches) {
2764
- warning = `overwrote existing ${SKAILE_MCP_NAME2} entry in ${path35__default.relative(projectDir, p7)}`;
2658
+ warning = `overwrote existing ${SKAILE_MCP_NAME2} entry in ${path34__default.relative(projectDir, p7)}`;
2765
2659
  }
2766
2660
  if (matches) return { changed: false, method: "toml" };
2767
2661
  servers[SKAILE_MCP_NAME2] = next;
@@ -2778,7 +2672,7 @@ async function uninstall2(projectDir) {
2778
2672
  const updated = { ...cfg, mcp_servers: rest };
2779
2673
  if (Object.keys(rest).length === 0) delete updated.mcp_servers;
2780
2674
  if (Object.keys(updated).length === 0) {
2781
- await fs5.unlink(p7);
2675
+ await fs4.unlink(p7);
2782
2676
  } else {
2783
2677
  await writeConfig(p7, updated);
2784
2678
  }
@@ -2802,43 +2696,43 @@ async function status2(projectDir) {
2802
2696
  installed: "yes",
2803
2697
  enabled: "n/a",
2804
2698
  method: "mcp",
2805
- location: path35__default.relative(projectDir, p7)
2699
+ location: path34__default.relative(projectDir, p7)
2806
2700
  };
2807
2701
  }
2808
2702
  async function install3(projectDir) {
2809
- const extDir = path35__default.join(projectDir, ".omp", "extensions");
2810
- const extPath = path35__default.join(extDir, "skaile.ts");
2811
- await fs5.mkdir(extDir, { recursive: true });
2703
+ const extDir = path34__default.join(projectDir, ".omp", "extensions");
2704
+ const extPath = path34__default.join(extDir, "skaile.ts");
2705
+ await fs4.mkdir(extDir, { recursive: true });
2812
2706
  const { WorkspacePlugin } = await import('../workspace-plugin/index.js');
2813
2707
  const plugin = new WorkspacePlugin({ projectDir });
2814
2708
  const nextSrc = await plugin.buildOmpExtensionSource();
2815
2709
  let prevSrc = null;
2816
2710
  try {
2817
- prevSrc = await fs5.readFile(extPath, "utf-8");
2711
+ prevSrc = await fs4.readFile(extPath, "utf-8");
2818
2712
  } catch {
2819
2713
  }
2820
2714
  if (prevSrc === nextSrc) return { changed: false, method: "generated" };
2821
- await fs5.writeFile(extPath, nextSrc);
2715
+ await fs4.writeFile(extPath, nextSrc);
2822
2716
  return { changed: true, method: "generated" };
2823
2717
  }
2824
2718
  async function uninstall3(projectDir) {
2825
- const extPath = path35__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2719
+ const extPath = path34__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2826
2720
  try {
2827
- await fs5.unlink(extPath);
2721
+ await fs4.unlink(extPath);
2828
2722
  return { changed: true };
2829
2723
  } catch {
2830
2724
  return { changed: false };
2831
2725
  }
2832
2726
  }
2833
2727
  async function status3(projectDir) {
2834
- const extPath = path35__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2728
+ const extPath = path34__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2835
2729
  if (existsSync(extPath)) {
2836
2730
  return {
2837
2731
  harness: "omp",
2838
2732
  installed: "yes",
2839
2733
  enabled: "n/a",
2840
2734
  method: "extension",
2841
- location: path35__default.relative(projectDir, extPath)
2735
+ location: path34__default.relative(projectDir, extPath)
2842
2736
  };
2843
2737
  }
2844
2738
  return {
@@ -2901,7 +2795,7 @@ async function installCodex(projectDir) {
2901
2795
  console.log(` ${S.dim("\u2192")} Restart Codex CLI to pick up the change.`);
2902
2796
  }
2903
2797
  async function runInstall(opts) {
2904
- const projectDir = path35__default.resolve(opts.projectDir);
2798
+ const projectDir = path34__default.resolve(opts.projectDir);
2905
2799
  const targets = resolveDriver(opts.driver);
2906
2800
  let exitCode = 0;
2907
2801
  if (targets.includes("claude-code")) {
@@ -2935,7 +2829,7 @@ async function uninstallCodex(projectDir) {
2935
2829
  else logInfo(`codex: not installed`);
2936
2830
  }
2937
2831
  async function runUninstall(opts) {
2938
- const projectDir = path35__default.resolve(opts.projectDir);
2832
+ const projectDir = path34__default.resolve(opts.projectDir);
2939
2833
  const targets = resolveDriver(opts.driver);
2940
2834
  let exitCode = 0;
2941
2835
  if (targets.includes("claude-code")) {
@@ -2978,7 +2872,7 @@ async function toggleTarget(t, projectDir, action3) {
2978
2872
  });
2979
2873
  }
2980
2874
  async function runToggle(opts, action3) {
2981
- const projectDir = path35__default.resolve(opts.projectDir);
2875
+ const projectDir = path34__default.resolve(opts.projectDir);
2982
2876
  const requestedAll = opts.driver === "all";
2983
2877
  const targets = resolveDriver(opts.driver);
2984
2878
  const usageError = checkToggleSupported(targets, requestedAll, action3);
@@ -2990,7 +2884,7 @@ async function runToggle(opts, action3) {
2990
2884
  return exitCode;
2991
2885
  }
2992
2886
  async function runStatus2(opts) {
2993
- const projectDir = path35__default.resolve(opts.projectDir);
2887
+ const projectDir = path34__default.resolve(opts.projectDir);
2994
2888
  const targets = resolveDriver(opts.driver);
2995
2889
  const rows = [];
2996
2890
  let exitCode = 0;
@@ -3061,7 +2955,7 @@ async function runHook(event) {
3061
2955
  await plugin.shutdown();
3062
2956
  return;
3063
2957
  }
3064
- const store = new PluginStore(path35__default.join(projectDir, ".skaile", "plugin-state.json"));
2958
+ const store = new PluginStore(path34__default.join(projectDir, ".skaile", "plugin-state.json"));
3065
2959
  await store.load();
3066
2960
  const status4 = store.get("connector:status");
3067
2961
  if (status4 && typeof status4 === "object" && Object.keys(status4).length > 0) {
@@ -3138,15 +3032,10 @@ async function indexLibrary(lib, index) {
3138
3032
  if (!index) own.close();
3139
3033
  }
3140
3034
  }
3141
- function domainPublisher(libraryPath, domain) {
3142
- return readDomainMd(libraryPath, domain)?.publisher;
3143
- }
3144
- function resolveLibraryPublisher(lib, opts, domain, storeIdentity) {
3035
+ function resolveLibraryPublisher(lib, opts, storeIdentity) {
3145
3036
  if (opts.publisher?.trim()) return opts.publisher.trim();
3146
- if (domain) {
3147
- const fromDomain = domainPublisher(lib.path, domain);
3148
- if (fromDomain) return fromDomain;
3149
- }
3037
+ const declared = loadSkPublishManifest(lib.path)?.publisher?.trim();
3038
+ if (declared) return declared.startsWith("@") ? declared.slice(1) : declared;
3150
3039
  const identity = (storeIdentity?.githubLogin ?? storeIdentity?.username)?.trim();
3151
3040
  if (identity) return identity;
3152
3041
  try {
@@ -3163,7 +3052,7 @@ function exitOnSyncError(err) {
3163
3052
  }
3164
3053
  async function assertLibraryPathFree(manager, dir, exceptId) {
3165
3054
  const clash = (await manager.listLibraries()).find(
3166
- (l) => l.id !== exceptId && path35.resolve(l.path) === dir
3055
+ (l) => l.id !== exceptId && path34.resolve(l.path) === dir
3167
3056
  );
3168
3057
  if (clash) throw new Error(`${dir} is already registered as library "${clash.name}".`);
3169
3058
  }
@@ -3196,9 +3085,9 @@ by the same ref.
3196
3085
  ];
3197
3086
  const written = [];
3198
3087
  for (const [file, content] of files) {
3199
- const target = path35.join(dir, file);
3200
- if (fs11.existsSync(target)) continue;
3201
- fs11.writeFileSync(target, content, "utf8");
3088
+ const target = path34.join(dir, file);
3089
+ if (fs10.existsSync(target)) continue;
3090
+ fs10.writeFileSync(target, content, "utf8");
3202
3091
  written.push(file);
3203
3092
  }
3204
3093
  return written;
@@ -3251,7 +3140,6 @@ function makeLibraryCommand() {
3251
3140
  console.log(` ${S.label("backend")} ${l.backend}`);
3252
3141
  console.log(` ${S.label("ownership")} ${l.ownership}`);
3253
3142
  console.log(` ${S.label("path")} ${l.path}`);
3254
- console.log(` ${S.label("structure")} ${l.structure ?? "(undetected)"}`);
3255
3143
  console.log(` ${S.label("isDefault")} ${l.isDefault}`);
3256
3144
  console.log(` ${S.label("manifestGen")} ${l.manifestGenerated}`);
3257
3145
  console.log(` ${S.label("backendConfig")} ${JSON.stringify(l.backendConfig)}`);
@@ -3274,8 +3162,8 @@ function makeLibraryCommand() {
3274
3162
  );
3275
3163
  process.exit(1);
3276
3164
  }
3277
- const libPath = opts.path ? path35.resolve(opts.path) : path35.join(resolveLibraryDir(), name);
3278
- if (fs11.existsSync(libPath) && !fs11.statSync(libPath).isDirectory()) {
3165
+ const libPath = opts.path ? path34.resolve(opts.path) : path34.join(resolveLibraryDir(), name);
3166
+ if (fs10.existsSync(libPath) && !fs10.statSync(libPath).isDirectory()) {
3279
3167
  logErr(`${libPath} exists and is not a directory.`);
3280
3168
  process.exit(1);
3281
3169
  }
@@ -3299,9 +3187,9 @@ function makeLibraryCommand() {
3299
3187
  backend = "git";
3300
3188
  backendConfig = { url: opts.git, branch, authHint: "ssh" };
3301
3189
  } else {
3302
- fs11.mkdirSync(libPath, { recursive: true });
3190
+ fs10.mkdirSync(libPath, { recursive: true });
3303
3191
  }
3304
- const blank = fs11.readdirSync(libPath).every((entry) => entry === ".git");
3192
+ const blank = fs10.readdirSync(libPath).every((entry) => entry === ".git");
3305
3193
  const isDefault = !hasDefault && ownership !== "reader";
3306
3194
  await manager.addLibrary({
3307
3195
  name,
@@ -3309,7 +3197,6 @@ function makeLibraryCommand() {
3309
3197
  backend,
3310
3198
  backendConfig,
3311
3199
  ownership,
3312
- structure: backend === "local" && blank ? "domain" : void 0,
3313
3200
  isDefault
3314
3201
  });
3315
3202
  const scaffolded = blank ? scaffoldLibraryFiles(libPath, name) : [];
@@ -3367,7 +3254,7 @@ function makeLibraryCommand() {
3367
3254
  const target = await resolveTargetLibrary(manager, opts.library);
3368
3255
  const effectiveKind = opts.kind ?? kind;
3369
3256
  const am2 = new AssetManager({ projectDir: process.cwd() });
3370
- const destDir = opts.dir ? path35.join(target.path, opts.dir) : target.path;
3257
+ const destDir = opts.dir ? path34.join(target.path, opts.dir) : target.path;
3371
3258
  const res = am2.create(name, effectiveKind, destDir, { description: opts.description });
3372
3259
  if (!res.ok) {
3373
3260
  logErr(res.path);
@@ -3379,14 +3266,13 @@ function makeLibraryCommand() {
3379
3266
  "Description is a TODO placeholder \u2014 edit it (what the skill does and when to use it) or `skaile validate` will fail."
3380
3267
  );
3381
3268
  }
3382
- const domain2 = opts.dir ? opts.dir.split(path35.sep)[0] : void 0;
3383
- const publisher = resolveLibraryPublisher(target, opts, domain2, getStoreIdentity());
3269
+ const publisher = resolveLibraryPublisher(target, opts, getStoreIdentity());
3384
3270
  stampAssetPublisher(res.path, publisher);
3385
3271
  ensureManifestPublisher(target.path, publisher);
3386
3272
  upsertManifestAsset(target.path, {
3387
3273
  kind: effectiveKind,
3388
3274
  name,
3389
- root: path35.relative(target.path, res.path) || name,
3275
+ root: path34.relative(target.path, res.path) || name,
3390
3276
  version: "0.1.0",
3391
3277
  publisher
3392
3278
  });
@@ -3400,7 +3286,6 @@ function makeLibraryCommand() {
3400
3286
  }
3401
3287
  }
3402
3288
  );
3403
- const domain = cmd.command("domain").description("Manage domains (publisher namespaces) inside a library");
3404
3289
  async function resolveTargetLibrary(manager, libraryName) {
3405
3290
  if (libraryName) return manager.requireLibrary(libraryName);
3406
3291
  const def = await manager.findDefaultLibrary();
@@ -3412,72 +3297,6 @@ function makeLibraryCommand() {
3412
3297
  logErr("No default library set. Run `skaile library default <name>` or pass --library.");
3413
3298
  process.exit(1);
3414
3299
  }
3415
- domain.command("create <name>").description("Scaffold a domain dir + DOMAIN.md inside a library").option("--library <name>", "Target library (default: the default-marked one)").option("--publisher <p>", "Publisher slug (default: the domain name kebab-cased)").option("--description <text>", "Domain description for DOMAIN.md").action(
3416
- async (name, opts) => {
3417
- const { manager, close } = await openLibraryManager();
3418
- try {
3419
- const target = await resolveTargetLibrary(manager, opts.library);
3420
- if (target.ownership === "reader") {
3421
- logErr(`Library "${target.name}" is read-only (ownership=reader).`);
3422
- process.exit(1);
3423
- }
3424
- let res;
3425
- try {
3426
- res = ensureDomain(target.path, name, {
3427
- publisher: opts.publisher,
3428
- description: opts.description
3429
- });
3430
- } catch (err) {
3431
- logErr(err instanceof Error ? err.message : String(err));
3432
- process.exit(1);
3433
- }
3434
- if (target.structure !== "domain") {
3435
- await manager.updateLibrary(target.id, { structure: "domain" });
3436
- }
3437
- if (res.created) {
3438
- logOk(`Created domain ${S.cmd(name)} (publisher @${res.publisher}) \u2192 ${res.dir}`);
3439
- } else {
3440
- logInfo(`Domain ${S.cmd(name)} already exists at ${res.dir}`);
3441
- }
3442
- } finally {
3443
- close();
3444
- }
3445
- }
3446
- );
3447
- domain.command("list").description("List domains in a library").option("--library <name>", "Target library (default: the default-marked one)").option("--json", "Output as JSON").action(async (opts) => {
3448
- const { manager, close } = await openLibraryManager();
3449
- try {
3450
- const target = await resolveTargetLibrary(manager, opts.library);
3451
- const domains = listDomains(target.path);
3452
- if (opts.json) return console.log(JSON.stringify(domains, null, 2));
3453
- if (domains.length === 0) {
3454
- logInfo(
3455
- `No domains in "${target.name}". Create one: \`skaile library domain create <name>\`.`
3456
- );
3457
- return;
3458
- }
3459
- for (const d of domains) console.log(` ${S.cmd(d)}`);
3460
- console.log(`
3461
- ${S.dim(`${domains.length} domain(s) in ${target.name}`)}
3462
- `);
3463
- } finally {
3464
- close();
3465
- }
3466
- });
3467
- domain.command("show <name>").description("Print a domain's DOMAIN.md").option("--library <name>", "Target library (default: the default-marked one)").action(async (name, opts) => {
3468
- const { manager, close } = await openLibraryManager();
3469
- try {
3470
- const target = await resolveTargetLibrary(manager, opts.library);
3471
- const domainFile = path35.join(target.path, name, "DOMAIN.md");
3472
- if (!existsSync(domainFile)) {
3473
- logErr(`Domain "${name}" not found in "${target.name}" (no ${domainFile}).`);
3474
- process.exit(1);
3475
- }
3476
- console.log(fs11.readFileSync(domainFile, "utf8"));
3477
- } finally {
3478
- close();
3479
- }
3480
- });
3481
3300
  cmd.command("default <name>").description("Set <name> as the default library").action(async (name) => {
3482
3301
  const { manager, close } = await openLibraryManager();
3483
3302
  try {
@@ -3491,22 +3310,20 @@ function makeLibraryCommand() {
3491
3310
  const { manager, close } = await openLibraryManager();
3492
3311
  try {
3493
3312
  const lib = await manager.requireLibrary(oldName);
3494
- const parent = path35.dirname(lib.path);
3495
- const newPath = path35.join(parent, newName);
3496
- if (fs11.existsSync(newPath)) {
3313
+ const parent = path34.dirname(lib.path);
3314
+ const newPath = path34.join(parent, newName);
3315
+ if (fs10.existsSync(newPath)) {
3497
3316
  logErr(`Target directory already exists: ${newPath}`);
3498
3317
  process.exit(1);
3499
3318
  }
3500
- fs11.renameSync(lib.path, newPath);
3319
+ fs10.renameSync(lib.path, newPath);
3501
3320
  await manager.updateLibrary(lib.id, { name: newName, path: newPath });
3502
3321
  logOk(`Renamed ${oldName} \u2192 ${newName}`);
3503
3322
  } finally {
3504
3323
  close();
3505
3324
  }
3506
3325
  });
3507
- cmd.command("set <name> <field=value>").description(
3508
- "Update a single library field (ownership, structure, isDefault, path, backendConfig.<key>)"
3509
- ).action(async (name, expr) => {
3326
+ cmd.command("set <name> <field=value>").description("Update a single library field (ownership, isDefault, path, backendConfig.<key>)").action(async (name, expr) => {
3510
3327
  const [field, ...rest] = expr.split("=");
3511
3328
  const value = rest.join("=");
3512
3329
  const { manager, close } = await openLibraryManager();
@@ -3514,11 +3331,10 @@ function makeLibraryCommand() {
3514
3331
  const lib = await manager.requireLibrary(name);
3515
3332
  const patch = {};
3516
3333
  if (field === "ownership") patch.ownership = value;
3517
- else if (field === "structure") patch.structure = value;
3518
3334
  else if (field === "isDefault") patch.isDefault = value === "true";
3519
3335
  else if (field === "path") {
3520
- const dir = path35.resolve(value);
3521
- if (!fs11.existsSync(dir) || !fs11.statSync(dir).isDirectory()) {
3336
+ const dir = path34.resolve(value);
3337
+ if (!fs10.existsSync(dir) || !fs10.statSync(dir).isDirectory()) {
3522
3338
  logErr(`Directory does not exist: ${dir}. \`library set path=\` does not move files.`);
3523
3339
  process.exit(1);
3524
3340
  }
@@ -3588,7 +3404,12 @@ function makeLibraryCommand() {
3588
3404
  const { manager, library, close } = await openLibraryManager();
3589
3405
  try {
3590
3406
  const lib = await manager.requireLibrary(name);
3591
- await syncManifestWithDisk(lib);
3407
+ const removed = await syncManifestWithDisk(lib);
3408
+ const manifest = loadSkPublishManifest(lib.path);
3409
+ for (const a of removed) {
3410
+ const ref = manifest ? assetEntryRef(a, manifest) : `${a.kind}:${a.name}`;
3411
+ logInfo(`Removed manifest entry ${ref} (root ${a.root} is gone)`);
3412
+ }
3592
3413
  const res = await indexLibrary(lib, library);
3593
3414
  for (const e of res.errors) logWarn(e);
3594
3415
  logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
@@ -3700,16 +3521,16 @@ function makeLibraryCommand() {
3700
3521
  "With --create-repo: create the repo private (the store only accepts public repos)"
3701
3522
  ).option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; push nothing and call no store endpoint").action(
3702
3523
  async (lib, opts) => {
3703
- const { runLibraryPublish } = await import('../library-publish-KKT73FJK.js');
3524
+ const { runLibraryPublish } = await import('../library-publish-TCFU3X5L.js');
3704
3525
  await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
3705
3526
  }
3706
3527
  );
3707
3528
  cmd.command("register <lib>").description("Register the library's manifest without pushing (bytes already on github)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; call no store endpoint").action(async (lib, opts) => {
3708
- const { runLibraryRegister } = await import('../library-publish-KKT73FJK.js');
3529
+ const { runLibraryRegister } = await import('../library-publish-TCFU3X5L.js');
3709
3530
  await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
3710
3531
  });
3711
3532
  cmd.command("yank <lib>").description("Retract the library's published assets from the store").option("--asset <ref>", "Yank only the single asset matching this ref/name").action(async (lib, opts) => {
3712
- const { runLibraryYank } = await import('../library-publish-KKT73FJK.js');
3533
+ const { runLibraryYank } = await import('../library-publish-TCFU3X5L.js');
3713
3534
  await withStoreErrorHandling(() => runLibraryYank(lib, opts));
3714
3535
  });
3715
3536
  return cmd;
@@ -3726,24 +3547,24 @@ function stampAssetPublisher(assetDir, publisher) {
3726
3547
  const markers = ["SKILL.md", "AGENT.md", "CONTRACT.md"];
3727
3548
  let markerFile;
3728
3549
  for (const m of markers) {
3729
- if (fs11.existsSync(path35.join(assetDir, m))) {
3730
- markerFile = path35.join(assetDir, m);
3550
+ if (fs10.existsSync(path34.join(assetDir, m))) {
3551
+ markerFile = path34.join(assetDir, m);
3731
3552
  break;
3732
3553
  }
3733
3554
  }
3734
3555
  if (!markerFile) {
3735
- const promptMd = fs11.readdirSync(assetDir).find((f) => f.endsWith(".prompt.md"));
3736
- if (promptMd) markerFile = path35.join(assetDir, promptMd);
3556
+ const promptMd = fs10.readdirSync(assetDir).find((f) => f.endsWith(".prompt.md"));
3557
+ if (promptMd) markerFile = path34.join(assetDir, promptMd);
3737
3558
  }
3738
3559
  if (!markerFile) return;
3739
3560
  try {
3740
- const { data, body } = parseFrontmatter(fs11.readFileSync(markerFile, "utf8"));
3561
+ const { data, body } = parseFrontmatter(fs10.readFileSync(markerFile, "utf8"));
3741
3562
  const meta = data.metadata && typeof data.metadata === "object" && !Array.isArray(data.metadata) ? { ...data.metadata } : {};
3742
3563
  if (meta.publisher != null) return;
3743
3564
  meta.publisher = publisher;
3744
3565
  data.metadata = meta;
3745
3566
  const fm = stringify(data).trimEnd();
3746
- fs11.writeFileSync(markerFile, `---
3567
+ fs10.writeFileSync(markerFile, `---
3747
3568
  ${fm}
3748
3569
  ---
3749
3570
 
@@ -3760,26 +3581,21 @@ function ensureManifestPublisher(libraryPath, publisher) {
3760
3581
  async function syncManifestWithDisk(lib) {
3761
3582
  const libraryPath = lib.path;
3762
3583
  if (!loadSkPublishManifest(libraryPath)?.publisher) {
3763
- ensureManifestPublisher(
3764
- libraryPath,
3765
- resolveLibraryPublisher(lib, {}, void 0, getStoreIdentity())
3766
- );
3584
+ ensureManifestPublisher(libraryPath, resolveLibraryPublisher(lib, {}, getStoreIdentity()));
3767
3585
  }
3586
+ const removed = pruneMissingRootAssets(libraryPath);
3768
3587
  const manifest = loadSkPublishManifest(libraryPath);
3769
3588
  const repoName = manifest?.publisher ?? slugifyAssetName(lib.name);
3770
3589
  for (const e of await scanDirectory(libraryPath, repoName)) {
3771
- const root = path35.relative(libraryPath, path35.dirname(e.source)) || e.name;
3772
- const existing = manifest?.assets?.find((a) => a.kind === e.kind && a.name === e.name);
3773
- const segments = root.split(/[\\/]/);
3774
- const publisher = existing?.publisher || segments.length < 2 ? void 0 : domainPublisher(libraryPath, segments[0]);
3590
+ const root = path34.relative(libraryPath, path34.dirname(e.source)) || e.name;
3775
3591
  upsertManifestAsset(libraryPath, {
3776
3592
  kind: e.kind,
3777
3593
  name: e.name,
3778
3594
  root,
3779
- version: e.version,
3780
- publisher
3595
+ version: e.version
3781
3596
  });
3782
3597
  }
3598
+ return removed;
3783
3599
  }
3784
3600
  async function printPerLibraryStatus(name, asJson) {
3785
3601
  const { manager, close } = await openLibraryManager();
@@ -3819,9 +3635,9 @@ async function printOverallStatus(projectDir, asJson) {
3819
3635
  } catch {
3820
3636
  secretsStrategy = "unavailable";
3821
3637
  }
3822
- const resolvedProjectDir = path35.resolve(projectDir);
3823
- const hasWorkspaceConfig = existsSync(path35.join(resolvedProjectDir, "skaile.yaml"));
3824
- const hasLockFile = existsSync(path35.join(resolvedProjectDir, "skaile.lock.yaml"));
3638
+ const resolvedProjectDir = path34.resolve(projectDir);
3639
+ const hasWorkspaceConfig = existsSync(path34.join(resolvedProjectDir, "skaile.yaml"));
3640
+ const hasLockFile = existsSync(path34.join(resolvedProjectDir, "skaile.lock.yaml"));
3825
3641
  let assignments = [];
3826
3642
  if (hasWorkspaceConfig) {
3827
3643
  try {
@@ -4038,29 +3854,41 @@ var ORIGIN_META = {
4038
3854
  };
4039
3855
  var ORIGIN_ORDER = ["library", "source", "factory", "store"];
4040
3856
  var srcKey = (origin, publisher) => `${origin}:${publisher}`;
4041
- var domainKey = (origin, publisher, slug) => `${origin}:${publisher}:dom:${slug}`;
3857
+ var pluginKey = (origin, group, plugin) => `${origin}:${group}:plugin:${plugin}`;
4042
3858
  var repoKey = (org, repo) => `${org}/${repo}`;
4043
- var srcDomainKey = (org, repo, slug) => `${org}/${repo}:dom:${slug}`;
4044
- var libDomainKey = (group, slug) => `${group}:dom:${slug}`;
4045
- var NO_DOMAIN = "";
4046
- var domainRegistry = /* @__PURE__ */ new Map();
4047
- function relationBadge(relation) {
4048
- if (relation === "additions") return pc5.dim("[") + pc5.green("add") + pc5.dim("]");
4049
- if (relation === "alternatives") return pc5.dim("[") + pc5.yellow("alt") + pc5.dim("]");
4050
- if (relation === "sequence") return pc5.dim("[") + pc5.blue("seq") + pc5.dim("]");
4051
- return "";
4052
- }
4053
- function relationGlyph(relation, seq) {
4054
- if (relation === "additions") return pc5.green("[add]");
4055
- if (relation === "alternatives") return pc5.yellow("\u25B7alt");
4056
- if (relation === "sequence") return pc5.blue(`\u21E3${seq ?? "?"}`);
4057
- return "";
4058
- }
4059
- function relationGlyphText(relation, seq) {
4060
- if (relation === "additions") return "[add]";
4061
- if (relation === "alternatives") return "\u25B7alt";
4062
- if (relation === "sequence") return `\u21E3${seq ?? "?"}`;
4063
- return "";
3859
+ var srcPluginKey = (org, repo, plugin) => `${org}/${repo}:plugin:${plugin}`;
3860
+ var libPluginKey = (group, plugin) => `${group}:plugin:${plugin}`;
3861
+ var OTHER_PLUGIN = "(other)";
3862
+ function pluginLabel(plugin) {
3863
+ return plugin === OTHER_PLUGIN ? "Other" : pluginTitle(plugin);
3864
+ }
3865
+ function layoutPluginBand(items, pluginOf, emit) {
3866
+ const byPlugin = /* @__PURE__ */ new Map();
3867
+ const unlisted = [];
3868
+ for (const item of items) {
3869
+ const plugin = pluginOf(item);
3870
+ if (!plugin) {
3871
+ unlisted.push(item);
3872
+ continue;
3873
+ }
3874
+ const members = byPlugin.get(plugin);
3875
+ if (members) members.push(item);
3876
+ else byPlugin.set(plugin, [item]);
3877
+ }
3878
+ const plugins = [...byPlugin.keys()].sort(
3879
+ (a, b) => pluginTitle(a).localeCompare(pluginTitle(b)) || a.localeCompare(b)
3880
+ );
3881
+ for (const plugin of plugins) {
3882
+ emit.header(plugin);
3883
+ for (const item of byPlugin.get(plugin)) emit.item(item, plugin);
3884
+ }
3885
+ if (plugins.length === 0) {
3886
+ for (const item of unlisted) emit.item(item, void 0);
3887
+ return;
3888
+ }
3889
+ if (unlisted.length === 0) return;
3890
+ emit.header(OTHER_PLUGIN);
3891
+ for (const item of unlisted) emit.item(item, OTHER_PLUGIN);
4064
3892
  }
4065
3893
  var am;
4066
3894
  var state = {
@@ -4078,18 +3906,15 @@ var state = {
4078
3906
  pendingRemoves: /* @__PURE__ */ new Set(),
4079
3907
  collapsedOrigins: /* @__PURE__ */ new Set(),
4080
3908
  collapsedSources: /* @__PURE__ */ new Set(),
4081
- collapsedDomains: /* @__PURE__ */ new Set(),
4082
- expandedDomainInfo: /* @__PURE__ */ new Set(),
4083
- seenDomains: /* @__PURE__ */ new Set(),
3909
+ collapsedPlugins: /* @__PURE__ */ new Set(),
3910
+ seenPlugins: /* @__PURE__ */ new Set(),
4084
3911
  collapsedSourceOrgs: /* @__PURE__ */ new Set(),
4085
3912
  collapsedSourceRepos: /* @__PURE__ */ new Set(),
4086
- collapsedSourceDomains: /* @__PURE__ */ new Set(),
4087
- expandedSourceDomainInfo: /* @__PURE__ */ new Set(),
4088
- seenSourceDomains: /* @__PURE__ */ new Set(),
3913
+ collapsedSourcePlugins: /* @__PURE__ */ new Set(),
3914
+ seenSourcePlugins: /* @__PURE__ */ new Set(),
4089
3915
  collapsedLibraryGroups: /* @__PURE__ */ new Set(),
4090
- collapsedLibraryDomains: /* @__PURE__ */ new Set(),
4091
- expandedLibraryDomainInfo: /* @__PURE__ */ new Set(),
4092
- seenLibraryDomains: /* @__PURE__ */ new Set(),
3916
+ collapsedLibraryPlugins: /* @__PURE__ */ new Set(),
3917
+ seenLibraryPlugins: /* @__PURE__ */ new Set(),
4093
3918
  seenOrigins: /* @__PURE__ */ new Set(),
4094
3919
  originFilter: null,
4095
3920
  query: "",
@@ -4098,27 +3923,27 @@ var state = {
4098
3923
  cols: 80,
4099
3924
  awaitingExitConfirm: false
4100
3925
  };
4101
- function buildVisibleRows(rows, collapsedOrigins, collapsedSources, collapsedDomains, originFilter = null, query = "") {
3926
+ function buildVisibleRows(rows, collapsedOrigins, collapsedSources, collapsedPlugins, originFilter = null, query = "") {
4102
3927
  const q = query.trim().toLowerCase();
4103
3928
  if (q) {
4104
3929
  const origins = /* @__PURE__ */ new Set();
4105
3930
  const groups = /* @__PURE__ */ new Set();
4106
- const domains = /* @__PURE__ */ new Set();
3931
+ const plugins = /* @__PURE__ */ new Set();
4107
3932
  for (const row of rows) {
4108
3933
  if (row.type !== "asset" || !matchesQuery(row, q)) continue;
4109
3934
  const origin = rowOrigin(row);
4110
3935
  if (originFilter && origin !== originFilter) continue;
4111
3936
  origins.add(origin);
4112
3937
  groups.add(srcKey(origin, rowGroup(row)));
4113
- domains.add(domainKey(origin, rowGroup(row), rowDomain(row)));
3938
+ if (row.plugin !== void 0) plugins.add(pluginKey(origin, rowGroup(row), row.plugin));
4114
3939
  }
4115
3940
  return rows.filter((row) => {
4116
3941
  const origin = rowOrigin(row);
4117
3942
  if (originFilter && origin !== originFilter) return false;
4118
3943
  if (row.type === "origin-header") return origins.has(origin);
4119
3944
  if (row.type === "publisher-header") return groups.has(srcKey(origin, row.source));
4120
- if (row.type === "domain-header" || row.type === "domain-info") {
4121
- return domains.has(domainKey(origin, row.source, row.domainSlug ?? NO_DOMAIN));
3945
+ if (row.type === "plugin-header") {
3946
+ return plugins.has(pluginKey(origin, row.source, row.plugin));
4122
3947
  }
4123
3948
  return row.type === "asset" && matchesQuery(row, q);
4124
3949
  });
@@ -4130,12 +3955,9 @@ function buildVisibleRows(rows, collapsedOrigins, collapsedSources, collapsedDom
4130
3955
  if (collapsedOrigins.has(origin)) return false;
4131
3956
  if (row.type === "publisher-header") return true;
4132
3957
  if (collapsedSources.has(srcKey(origin, rowGroup(row)))) return false;
4133
- if (row.type === "domain-header") return true;
4134
- if (row.type === "domain-info") {
4135
- return !collapsedDomains.has(domainKey(origin, row.source, row.domainSlug ?? NO_DOMAIN));
4136
- }
4137
- if (row.underDomain) {
4138
- return !collapsedDomains.has(domainKey(origin, rowGroup(row), rowDomain(row)));
3958
+ if (row.type === "plugin-header") return true;
3959
+ if (row.plugin !== void 0) {
3960
+ return !collapsedPlugins.has(pluginKey(origin, rowGroup(row), row.plugin));
4139
3961
  }
4140
3962
  return true;
4141
3963
  });
@@ -4164,8 +3986,8 @@ function splitKeys(chunk) {
4164
3986
  function originAssetRefs(rows, origin) {
4165
3987
  return refsOf(rows.filter((r) => isAsset(r) && rowOrigin(r) === origin));
4166
3988
  }
4167
- function domainAssetRefs(rows, origin, publisher, slug) {
4168
- return refsOf(rows.filter((r) => isAsset(r) && inDomain(r, origin, publisher, slug)));
3989
+ function pluginAssetRefs(rows, origin, group, plugin) {
3990
+ return refsOf(rows.filter((r) => isAsset(r) && inPlugin(r, origin, group, plugin)));
4169
3991
  }
4170
3992
  function sourceAssetRefs(rows, origin, source) {
4171
3993
  return refsOf(rows.filter((r) => isAsset(r) && inSource(r, origin, source)));
@@ -4175,17 +3997,12 @@ function buildSourceTreeRows(assetRows, registered = []) {
4175
3997
  const ensure = (org, repo) => {
4176
3998
  if (!byOrg.has(org)) byOrg.set(org, /* @__PURE__ */ new Map());
4177
3999
  const byRepo = byOrg.get(org);
4178
- if (!byRepo.has(repo)) byRepo.set(repo, /* @__PURE__ */ new Map());
4000
+ if (!byRepo.has(repo)) byRepo.set(repo, []);
4179
4001
  return byRepo.get(repo);
4180
4002
  };
4181
4003
  for (const r of assetRows) {
4182
4004
  if (!isAsset(r) || rowOrigin(r) !== "source") continue;
4183
- const org = rowOrg(r);
4184
- const repo = rowGroup(r);
4185
- const slug = rowDomain(r);
4186
- const byDomain = ensure(org, repo);
4187
- if (!byDomain.has(slug)) byDomain.set(slug, []);
4188
- byDomain.get(slug).push(r);
4005
+ ensure(rowOrg(r), rowGroup(r)).push(r);
4189
4006
  }
4190
4007
  for (const { org, repo } of registered) ensure(org, repo);
4191
4008
  if (byOrg.size === 0) return [];
@@ -4195,34 +4012,24 @@ function buildSourceTreeRows(assetRows, registered = []) {
4195
4012
  const byRepo = byOrg.get(org);
4196
4013
  for (const repo of [...byRepo.keys()].sort((a, b) => a.localeCompare(b))) {
4197
4014
  rows.push({ type: "repo-header", origin: "source", org, source: repo });
4198
- const byDomain = byRepo.get(repo);
4199
- const loose = byDomain.get(NO_DOMAIN);
4200
- if (loose) for (const a of loose) rows.push({ ...a, org });
4201
- for (const slug of sortedDomainSlugs([...byDomain.keys()])) {
4202
- const meta = domainRegistry.get(slug);
4203
- rows.push({ type: "domain-header", origin: "source", org, source: repo, domainSlug: slug });
4204
- if (meta?.description) {
4205
- rows.push({ type: "domain-info", origin: "source", org, source: repo, domainSlug: slug });
4206
- }
4207
- for (const a of byDomain.get(slug)) rows.push({ ...a, org });
4208
- }
4015
+ layoutPluginBand(byRepo.get(repo), (a) => a.entry?.plugin, {
4016
+ header: (plugin) => rows.push({ type: "plugin-header", origin: "source", org, source: repo, plugin }),
4017
+ item: (a, plugin) => rows.push({ ...a, org, plugin })
4018
+ });
4209
4019
  }
4210
4020
  }
4211
4021
  return rows;
4212
4022
  }
4213
- function buildVisibleSourceRows(rows, collapsedOrgs, collapsedRepos, collapsedDomains) {
4023
+ function buildVisibleSourceRows(rows, collapsedOrgs, collapsedRepos, collapsedPlugins) {
4214
4024
  return rows.filter((row) => {
4215
4025
  if (row.type === "source-root" || row.type === "org-header") return true;
4216
4026
  const org = row.org ?? UNKNOWN_ORG;
4217
4027
  if (collapsedOrgs.has(org)) return false;
4218
4028
  if (row.type === "repo-header") return true;
4219
4029
  if (collapsedRepos.has(repoKey(org, row.source))) return false;
4220
- if (row.type === "domain-header") return true;
4221
- if (row.type === "domain-info") {
4222
- return !collapsedDomains.has(srcDomainKey(org, row.source, row.domainSlug ?? NO_DOMAIN));
4223
- }
4224
- if (row.underDomain) {
4225
- return !collapsedDomains.has(srcDomainKey(org, rowGroup(row), rowDomain(row)));
4030
+ if (row.type === "plugin-header") return true;
4031
+ if (row.plugin !== void 0) {
4032
+ return !collapsedPlugins.has(srcPluginKey(org, rowGroup(row), row.plugin));
4226
4033
  }
4227
4034
  return true;
4228
4035
  });
@@ -4237,57 +4044,43 @@ function sourceRepoRefs(rows, org, repo) {
4237
4044
  )
4238
4045
  );
4239
4046
  }
4240
- function sourceDomainRefs(rows, org, repo, slug) {
4047
+ function sourcePluginRefs(rows, org, repo, plugin) {
4241
4048
  return refsOf(
4242
4049
  rows.filter(
4243
- (r) => isAsset(r) && rowOrigin(r) === "source" && rowOrg(r) === org && rowGroup(r) === repo && rowDomain(r) === slug
4050
+ (r) => isAsset(r) && rowOrigin(r) === "source" && rowOrg(r) === org && rowGroup(r) === repo && r.plugin === plugin
4244
4051
  )
4245
4052
  );
4246
4053
  }
4247
4054
  function buildLibraryTreeRows(assetRows, registered = []) {
4248
4055
  const byGroup = /* @__PURE__ */ new Map();
4249
4056
  const ensure = (group) => {
4250
- if (!byGroup.has(group)) byGroup.set(group, /* @__PURE__ */ new Map());
4057
+ if (!byGroup.has(group)) byGroup.set(group, []);
4251
4058
  return byGroup.get(group);
4252
4059
  };
4253
4060
  for (const r of assetRows) {
4254
4061
  if (!isAsset(r) || rowOrigin(r) !== "library") continue;
4255
- const group = rowGroup(r);
4256
- const slug = rowDomain(r);
4257
- const byDomain = ensure(group);
4258
- if (!byDomain.has(slug)) byDomain.set(slug, []);
4259
- byDomain.get(slug).push(r);
4062
+ ensure(rowGroup(r)).push(r);
4260
4063
  }
4261
4064
  for (const group of registered) ensure(group);
4262
4065
  if (byGroup.size === 0) return [];
4263
4066
  const rows = [{ type: "library-root" }];
4264
4067
  for (const group of [...byGroup.keys()].sort((a, b) => a.localeCompare(b))) {
4265
4068
  rows.push({ type: "library-header", origin: "library", source: group });
4266
- const byDomain = byGroup.get(group);
4267
- const loose = byDomain.get(NO_DOMAIN);
4268
- if (loose) for (const a of loose) rows.push({ ...a });
4269
- for (const slug of sortedDomainSlugs([...byDomain.keys()])) {
4270
- const meta = domainRegistry.get(slug);
4271
- rows.push({ type: "domain-header", origin: "library", source: group, domainSlug: slug });
4272
- if (meta?.description) {
4273
- rows.push({ type: "domain-info", origin: "library", source: group, domainSlug: slug });
4274
- }
4275
- for (const a of byDomain.get(slug)) rows.push({ ...a });
4276
- }
4069
+ layoutPluginBand(byGroup.get(group), (a) => a.entry?.plugin, {
4070
+ header: (plugin) => rows.push({ type: "plugin-header", origin: "library", source: group, plugin }),
4071
+ item: (a, plugin) => rows.push({ ...a, plugin })
4072
+ });
4277
4073
  }
4278
4074
  return rows;
4279
4075
  }
4280
- function buildVisibleLibraryRows(rows, collapsedGroups, collapsedDomains) {
4076
+ function buildVisibleLibraryRows(rows, collapsedGroups, collapsedPlugins) {
4281
4077
  return rows.filter((row) => {
4282
4078
  if (row.type === "library-root" || row.type === "library-header") return true;
4283
4079
  const group = row.source ?? rowGroup(row);
4284
4080
  if (collapsedGroups.has(group)) return false;
4285
- if (row.type === "domain-header") return true;
4286
- if (row.type === "domain-info") {
4287
- return !collapsedDomains.has(libDomainKey(group, row.domainSlug ?? NO_DOMAIN));
4288
- }
4289
- if (row.underDomain) {
4290
- return !collapsedDomains.has(libDomainKey(rowGroup(row), rowDomain(row)));
4081
+ if (row.type === "plugin-header") return true;
4082
+ if (row.plugin !== void 0) {
4083
+ return !collapsedPlugins.has(libPluginKey(rowGroup(row), row.plugin));
4291
4084
  }
4292
4085
  return true;
4293
4086
  });
@@ -4309,9 +4102,6 @@ function rowPublisher(r) {
4309
4102
  function rowGroup(r) {
4310
4103
  return r.source ?? rowPublisher(r);
4311
4104
  }
4312
- function rowDomain(r) {
4313
- return r.entry?.domainSlug || NO_DOMAIN;
4314
- }
4315
4105
  function matchesQuery(r, q) {
4316
4106
  const e = r.entry;
4317
4107
  if (!e) return false;
@@ -4330,9 +4120,8 @@ function refsOf(rows) {
4330
4120
  function inSource(r, origin, source) {
4331
4121
  return rowOrigin(r) === origin && rowGroup(r) === source;
4332
4122
  }
4333
- function inDomain(r, origin, publisher, slug) {
4334
- if (!inSource(r, origin, publisher)) return false;
4335
- return rowDomain(r) === slug;
4123
+ function inPlugin(r, origin, group, plugin) {
4124
+ return inSource(r, origin, group) && r.plugin === plugin;
4336
4125
  }
4337
4126
  function assetRefOf(r) {
4338
4127
  if (!isAsset(r) || !r.entry?.publisher) return null;
@@ -4386,7 +4175,14 @@ function actOnHeader(row, action3) {
4386
4175
  bulkSelection(sourceAssetRefs(state.assetRows, rowOrigin(row), row.source), action3);
4387
4176
  return true;
4388
4177
  }
4389
- return row.type === "domain-header" || row.type === "domain-info";
4178
+ if (row.type === "plugin-header") {
4179
+ bulkSelection(
4180
+ pluginAssetRefs(state.assetRows, rowOrigin(row), row.source, row.plugin),
4181
+ action3
4182
+ );
4183
+ return true;
4184
+ }
4185
+ return false;
4390
4186
  }
4391
4187
  var softDepPreviewCache = /* @__PURE__ */ new Map();
4392
4188
  function softDepCacheKeyUnderCursor() {
@@ -4448,15 +4244,13 @@ function scheduleSoftDepPreview() {
4448
4244
  }
4449
4245
  async function loadAssets() {
4450
4246
  softDepPreviewCache.clear();
4451
- const { gatherAssetFeeds } = await import('../asset-feeds-KXL45ALC.js');
4452
- const { entries, domains, notes } = await gatherAssetFeeds(am, am.projectDir);
4247
+ const { gatherAssetFeeds } = await import('../asset-feeds-TU5CS6QL.js');
4248
+ const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
4453
4249
  if (notes.length > 0) {
4454
4250
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
4455
4251
  }
4456
- domainRegistry = new Map(domains.map((d) => [d.slug, d]));
4457
4252
  const installed = new Set(am.listDeployed().map((e) => `${e.kind}:${e.name}`));
4458
- const byOrigin = groupEntriesByOriginPublisherDomain(entries);
4459
- const rows = buildAssetRowsFromGroups(byOrigin, installed);
4253
+ const rows = buildAssetRows(entries, installed);
4460
4254
  state.assetRows = rows;
4461
4255
  reconcileCollapsedSets(rows);
4462
4256
  rebuildVisible();
@@ -4470,7 +4264,7 @@ function rebuildSourceTree() {
4470
4264
  rebuildVisibleSources();
4471
4265
  }
4472
4266
  function sourceOrgRepo(s) {
4473
- const parts = s.path.split(path35__default.sep).filter(Boolean);
4267
+ const parts = s.path.split(path34__default.sep).filter(Boolean);
4474
4268
  if (parts.length < 2) return null;
4475
4269
  return { org: parts[parts.length - 2], repo: parts[parts.length - 1] };
4476
4270
  }
@@ -4479,35 +4273,32 @@ function reconcileSourceCollapsedSets(rows) {
4479
4273
  const repoKeys = new Set(
4480
4274
  rows.filter((r) => r.type === "repo-header").map((r) => repoKey(r.org, r.source))
4481
4275
  );
4482
- const domainKeys = new Set(
4483
- rows.filter((r) => r.type === "domain-header").map((r) => srcDomainKey(r.org, r.source, r.domainSlug ?? NO_DOMAIN))
4276
+ const pluginKeys = new Set(
4277
+ rows.filter((r) => r.type === "plugin-header").map((r) => srcPluginKey(r.org, r.source, r.plugin))
4484
4278
  );
4485
4279
  for (const k of state.collapsedSourceOrgs)
4486
4280
  if (!orgKeys.has(k)) state.collapsedSourceOrgs.delete(k);
4487
4281
  for (const k of state.collapsedSourceRepos) {
4488
4282
  if (!repoKeys.has(k)) state.collapsedSourceRepos.delete(k);
4489
4283
  }
4490
- for (const k of domainKeys) {
4491
- if (!state.seenSourceDomains.has(k)) {
4492
- state.collapsedSourceDomains.add(k);
4493
- state.seenSourceDomains.add(k);
4284
+ for (const k of pluginKeys) {
4285
+ if (!state.seenSourcePlugins.has(k)) {
4286
+ state.collapsedSourcePlugins.add(k);
4287
+ state.seenSourcePlugins.add(k);
4494
4288
  }
4495
4289
  }
4496
- for (const k of state.collapsedSourceDomains) {
4497
- if (!domainKeys.has(k)) state.collapsedSourceDomains.delete(k);
4290
+ for (const k of state.collapsedSourcePlugins) {
4291
+ if (!pluginKeys.has(k)) state.collapsedSourcePlugins.delete(k);
4498
4292
  }
4499
- for (const k of state.expandedSourceDomainInfo) {
4500
- if (!domainKeys.has(k)) state.expandedSourceDomainInfo.delete(k);
4501
- }
4502
- for (const k of state.seenSourceDomains)
4503
- if (!domainKeys.has(k)) state.seenSourceDomains.delete(k);
4293
+ for (const k of state.seenSourcePlugins)
4294
+ if (!pluginKeys.has(k)) state.seenSourcePlugins.delete(k);
4504
4295
  }
4505
4296
  function rebuildVisibleSources() {
4506
4297
  state.visibleSourceRows = buildVisibleSourceRows(
4507
4298
  state.sourceTreeRows,
4508
4299
  state.collapsedSourceOrgs,
4509
4300
  state.collapsedSourceRepos,
4510
- state.collapsedSourceDomains
4301
+ state.collapsedSourcePlugins
4511
4302
  );
4512
4303
  clampCursor();
4513
4304
  }
@@ -4521,95 +4312,64 @@ function rebuildLibraryTree() {
4521
4312
  }
4522
4313
  function reconcileLibraryCollapsedSets(rows) {
4523
4314
  const groupKeys = new Set(rows.filter((r) => r.type === "library-header").map((r) => r.source));
4524
- const domainKeys = new Set(
4525
- rows.filter((r) => r.type === "domain-header").map((r) => libDomainKey(r.source, r.domainSlug ?? NO_DOMAIN))
4315
+ const pluginKeys = new Set(
4316
+ rows.filter((r) => r.type === "plugin-header").map((r) => libPluginKey(r.source, r.plugin))
4526
4317
  );
4527
4318
  for (const k of state.collapsedLibraryGroups)
4528
4319
  if (!groupKeys.has(k)) state.collapsedLibraryGroups.delete(k);
4529
- for (const k of domainKeys) {
4530
- if (!state.seenLibraryDomains.has(k)) {
4531
- state.collapsedLibraryDomains.add(k);
4532
- state.seenLibraryDomains.add(k);
4320
+ for (const k of pluginKeys) {
4321
+ if (!state.seenLibraryPlugins.has(k)) {
4322
+ state.collapsedLibraryPlugins.add(k);
4323
+ state.seenLibraryPlugins.add(k);
4533
4324
  }
4534
4325
  }
4535
- for (const k of state.collapsedLibraryDomains) {
4536
- if (!domainKeys.has(k)) state.collapsedLibraryDomains.delete(k);
4537
- }
4538
- for (const k of state.expandedLibraryDomainInfo) {
4539
- if (!domainKeys.has(k)) state.expandedLibraryDomainInfo.delete(k);
4326
+ for (const k of state.collapsedLibraryPlugins) {
4327
+ if (!pluginKeys.has(k)) state.collapsedLibraryPlugins.delete(k);
4540
4328
  }
4541
- for (const k of state.seenLibraryDomains)
4542
- if (!domainKeys.has(k)) state.seenLibraryDomains.delete(k);
4329
+ for (const k of state.seenLibraryPlugins)
4330
+ if (!pluginKeys.has(k)) state.seenLibraryPlugins.delete(k);
4543
4331
  }
4544
4332
  function rebuildVisibleLibraries() {
4545
4333
  state.visibleLibraryRows = buildVisibleLibraryRows(
4546
4334
  state.libraryTreeRows,
4547
4335
  state.collapsedLibraryGroups,
4548
- state.collapsedLibraryDomains
4336
+ state.collapsedLibraryPlugins
4549
4337
  );
4550
4338
  clampCursor();
4551
4339
  }
4552
- function groupEntriesByOriginPublisherDomain(entries) {
4340
+ function buildAssetRows(entries, installed) {
4553
4341
  const byOrigin = /* @__PURE__ */ new Map();
4554
4342
  for (const { origin, entry, group } of entries) {
4555
4343
  const publisher = group || entry.publisher || "other";
4556
- const slug = entry.domainSlug || NO_DOMAIN;
4557
4344
  if (!byOrigin.has(origin)) byOrigin.set(origin, /* @__PURE__ */ new Map());
4558
4345
  const byPublisher = byOrigin.get(origin);
4559
- if (!byPublisher.has(publisher)) byPublisher.set(publisher, /* @__PURE__ */ new Map());
4560
- const byDomain = byPublisher.get(publisher);
4561
- if (!byDomain.has(slug)) byDomain.set(slug, []);
4562
- byDomain.get(slug).push(entry);
4346
+ if (!byPublisher.has(publisher)) byPublisher.set(publisher, []);
4347
+ byPublisher.get(publisher).push(entry);
4563
4348
  }
4564
- return byOrigin;
4565
- }
4566
- function sortedDomainSlugs(slugs) {
4567
- return slugs.filter((s) => s !== NO_DOMAIN).sort((a, b) => {
4568
- const oa = domainRegistry.get(a)?.order ?? Number.MAX_SAFE_INTEGER;
4569
- const ob = domainRegistry.get(b)?.order ?? Number.MAX_SAFE_INTEGER;
4570
- return oa !== ob ? oa - ob : a.localeCompare(b);
4571
- });
4572
- }
4573
- function buildAssetRowsFromGroups(byOrigin, installed) {
4574
4349
  const rows = [];
4575
4350
  const sortItems = (items) => items.sort(
4576
4351
  (a, b) => a.kind !== b.kind ? a.kind.localeCompare(b.kind) : a.name.localeCompare(b.name)
4577
4352
  );
4578
- const pushAsset = (origin, group, entry, underDomain, seq) => {
4579
- const ref = `${entry.kind}:${entry.name}`;
4580
- rows.push({
4581
- type: "asset",
4582
- origin,
4583
- source: group,
4584
- org: entry.repo?.includes("/") ? entry.repo.slice(0, entry.repo.indexOf("/")) : void 0,
4585
- entry,
4586
- installed: installed.has(ref),
4587
- underDomain,
4588
- seq
4589
- });
4590
- };
4591
4353
  for (const origin of ORIGIN_ORDER) {
4592
4354
  const byGroup = byOrigin.get(origin);
4593
4355
  if (!byGroup || byGroup.size === 0) continue;
4594
4356
  rows.push({ type: "origin-header", origin });
4595
- for (const [group, byDomain] of [...byGroup.entries()].sort(
4596
- (a, b) => a[0].localeCompare(b[0])
4597
- )) {
4357
+ for (const [group, items] of [...byGroup.entries()].sort((a, b) => a[0].localeCompare(b[0]))) {
4598
4358
  rows.push({ type: "publisher-header", origin, source: group });
4599
- const loose = byDomain.get(NO_DOMAIN);
4600
- if (loose) for (const entry of sortItems(loose)) pushAsset(origin, group, entry, false);
4601
- for (const slug of sortedDomainSlugs([...byDomain.keys()])) {
4602
- const meta = domainRegistry.get(slug);
4603
- rows.push({ type: "domain-header", origin, source: group, domainSlug: slug });
4604
- if (meta?.description) {
4605
- rows.push({ type: "domain-info", origin, source: group, domainSlug: slug });
4359
+ layoutPluginBand(sortItems(items), (entry) => entry.plugin, {
4360
+ header: (plugin) => rows.push({ type: "plugin-header", origin, source: group, plugin }),
4361
+ item: (entry, plugin) => {
4362
+ rows.push({
4363
+ type: "asset",
4364
+ origin,
4365
+ source: group,
4366
+ org: entry.repo?.includes("/") ? entry.repo.slice(0, entry.repo.indexOf("/")) : void 0,
4367
+ entry,
4368
+ installed: installed.has(`${entry.kind}:${entry.name}`),
4369
+ plugin
4370
+ });
4606
4371
  }
4607
- const items = sortItems(byDomain.get(slug));
4608
- const sequenced = meta?.relation === "sequence";
4609
- items.forEach(
4610
- (entry, i) => pushAsset(origin, group, entry, true, sequenced ? i + 1 : void 0)
4611
- );
4612
- }
4372
+ });
4613
4373
  }
4614
4374
  }
4615
4375
  return rows;
@@ -4632,35 +4392,32 @@ function reconcileCollapsedSets(rows) {
4632
4392
  for (const s of state.collapsedSources) {
4633
4393
  if (!newSources.has(s)) state.collapsedSources.delete(s);
4634
4394
  }
4635
- const newDomainKeys = new Set(
4636
- rows.filter((r) => r.type === "domain-header").map((r) => domainKey(rowOrigin(r), r.source, r.domainSlug ?? NO_DOMAIN))
4395
+ const newPluginKeys = new Set(
4396
+ rows.filter((r) => r.type === "plugin-header").map((r) => pluginKey(rowOrigin(r), r.source, r.plugin))
4637
4397
  );
4638
- for (const k of newDomainKeys) {
4639
- if (!state.seenDomains.has(k)) {
4640
- state.collapsedDomains.add(k);
4641
- state.seenDomains.add(k);
4398
+ for (const k of newPluginKeys) {
4399
+ if (!state.seenPlugins.has(k)) {
4400
+ state.collapsedPlugins.add(k);
4401
+ state.seenPlugins.add(k);
4642
4402
  }
4643
4403
  }
4644
- for (const d of state.collapsedDomains) {
4645
- if (!newDomainKeys.has(d)) state.collapsedDomains.delete(d);
4646
- }
4647
- for (const d of state.expandedDomainInfo) {
4648
- if (!newDomainKeys.has(d)) state.expandedDomainInfo.delete(d);
4404
+ for (const k of state.collapsedPlugins) {
4405
+ if (!newPluginKeys.has(k)) state.collapsedPlugins.delete(k);
4649
4406
  }
4650
- for (const d of state.seenDomains) {
4651
- if (!newDomainKeys.has(d)) state.seenDomains.delete(d);
4407
+ for (const k of state.seenPlugins) {
4408
+ if (!newPluginKeys.has(k)) state.seenPlugins.delete(k);
4652
4409
  }
4653
4410
  }
4654
4411
  async function loadSourcesAndLibraries() {
4655
4412
  try {
4656
4413
  const [{ openLibraryManager: openLibraryManager2 }, { getGlobalCacheDir: getGlobalCacheDir2, globalSkaileDir: globalSkaileDir2 }] = await Promise.all([
4657
- import('../open-library-R62UBL6E.js'),
4414
+ import('../open-library-SSBN4FX2.js'),
4658
4415
  import('../core/index.js')
4659
4416
  ]);
4660
4417
  const { manager, library, close } = await openLibraryManager2();
4661
4418
  try {
4662
4419
  const newRoot = getGlobalCacheDir2();
4663
- const legacyRoot = path35__default.join(globalSkaileDir2(), "sources");
4420
+ const legacyRoot = path34__default.join(globalSkaileDir2(), "sources");
4664
4421
  const isSourceRow = (l) => l.path.startsWith(newRoot) || l.path.startsWith(legacyRoot);
4665
4422
  const libs = await manager.listLibraries();
4666
4423
  const defs = await library.listAssetDefs();
@@ -4697,7 +4454,7 @@ function rebuildVisible() {
4697
4454
  state.assetRows,
4698
4455
  state.collapsedOrigins,
4699
4456
  state.collapsedSources,
4700
- state.collapsedDomains,
4457
+ state.collapsedPlugins,
4701
4458
  state.originFilter,
4702
4459
  state.query
4703
4460
  );
@@ -4723,7 +4480,7 @@ var TABS = {
4723
4480
  rowCount: () => state.visibleRows.length,
4724
4481
  selectableCount: () => state.assetRows.filter(isAsset).length,
4725
4482
  renderRow: (i, sel) => renderAssetRow(state.visibleRows[i], sel),
4726
- footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [d] domain info [/] search [i] info [1]lib [2]src [3]factory [4]store [0]all Tab [q] quit"
4483
+ footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [/] search [i] info [1]lib [2]src [3]factory [4]store [0]all Tab [q] quit"
4727
4484
  },
4728
4485
  sources: {
4729
4486
  label: "Sources",
@@ -4731,7 +4488,7 @@ var TABS = {
4731
4488
  selectableCount: () => state.sourceTreeRows.filter(isAsset).length,
4732
4489
  emptyMsg: " No sources registered. Run `skaile source add <git-url>` from the shell to track a github repo.",
4733
4490
  renderRow: (i, sel) => renderSourceTreeRow(state.visibleSourceRows[i], sel),
4734
- footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [d] domain info [i] info Tab [q] quit"
4491
+ footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [i] info Tab [q] quit"
4735
4492
  },
4736
4493
  libraries: {
4737
4494
  label: "Libraries",
@@ -4739,7 +4496,7 @@ var TABS = {
4739
4496
  selectableCount: () => state.libraryTreeRows.filter(isAsset).length,
4740
4497
  emptyMsg: " No libraries registered. Run `skaile library init <name>` from the shell to author your own.",
4741
4498
  renderRow: (i, sel) => renderLibraryTreeRow(state.visibleLibraryRows[i], sel),
4742
- footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [d] domain info [i] info Tab [q] quit"
4499
+ footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [i] info Tab [q] quit"
4743
4500
  },
4744
4501
  pending: {
4745
4502
  label: "Pending",
@@ -4831,37 +4588,23 @@ function renderAssetRow(row, selected) {
4831
4588
  selected
4832
4589
  });
4833
4590
  }
4834
- if (row.type === "domain-header") {
4591
+ if (row.type === "plugin-header") {
4835
4592
  const origin = rowOrigin(row);
4836
- const slug = row.domainSlug ?? NO_DOMAIN;
4837
- const meta = domainRegistry.get(slug);
4838
- const title = meta?.title || slug || "(no domain)";
4839
- const badge = relationBadge(meta?.relation);
4840
- const label = `${pc5.magenta("\u25C8")} ${pc5.bold(title)}${badge ? ` ${badge}` : ""}`;
4593
+ const plugin = row.plugin;
4841
4594
  return renderHeaderLine({
4842
4595
  indent: " ".repeat(5),
4843
- collapsed: state.collapsedDomains.has(domainKey(origin, row.source, slug)),
4844
- match: (r) => isAsset(r) && inDomain(r, origin, row.source, slug),
4845
- refs: domainAssetRefs(state.assetRows, origin, row.source, slug),
4846
- label,
4596
+ collapsed: state.collapsedPlugins.has(pluginKey(origin, row.source, plugin)),
4597
+ match: (r) => isAsset(r) && inPlugin(r, origin, row.source, plugin),
4598
+ refs: pluginAssetRefs(state.assetRows, origin, row.source, plugin),
4599
+ label: pluginHeaderLabel(plugin),
4847
4600
  selected
4848
4601
  });
4849
4602
  }
4850
- if (row.type === "domain-info") {
4851
- const origin = rowOrigin(row);
4852
- const slug = row.domainSlug ?? NO_DOMAIN;
4853
- const key = domainKey(origin, row.source, slug);
4854
- const line = renderDomainInfoLine(
4855
- domainRegistry.get(slug),
4856
- origin,
4857
- row.source,
4858
- slug,
4859
- state.expandedDomainInfo.has(key)
4860
- );
4861
- return selected ? pc5.inverse(line.padEnd(state.cols)) : line;
4862
- }
4863
4603
  return renderAssetLeaf(row, selected);
4864
4604
  }
4605
+ function pluginHeaderLabel(plugin) {
4606
+ return `${pc5.magenta("\u25C8")} ${pc5.bold(pluginLabel(plugin))}`;
4607
+ }
4865
4608
  function renderAssetLeaf(row, selected, looseIndent = 5) {
4866
4609
  const e = row.entry;
4867
4610
  const ref = assetRefOf(row) ?? "";
@@ -4870,12 +4613,6 @@ function renderAssetLeaf(row, selected, looseIndent = 5) {
4870
4613
  else if (state.pendingRemoves.has(ref)) status4 = pc5.red("- ");
4871
4614
  else if (row.installed) status4 = pc5.green("\u2713 ");
4872
4615
  else status4 = pc5.dim("\xB7 ");
4873
- const dm = row.underDomain ? domainRegistry.get(rowDomain(row)) : void 0;
4874
- const recommended = !!dm?.recommendedRef && dm.recommendedRef === ref;
4875
- const hintStr = [relationGlyph(dm?.relation, row.seq), recommended ? pc5.yellow("\u2605") : ""].filter(Boolean).join(" ");
4876
- const hintWidthText = [relationGlyphText(dm?.relation, row.seq), recommended ? "\u2605" : ""].filter(Boolean).join(" ");
4877
- const hint = hintStr ? `${hintStr} ` : "";
4878
- const hintWidth = hintWidthText ? hintWidthText.length + 1 : 0;
4879
4616
  const kind = kindColorPad(e.kind);
4880
4617
  const name = fitWidth(e.name, 30);
4881
4618
  const badge = e.category ? `${pc5.dim("[")}${pc5.cyan(e.category)}${pc5.dim("]")} ` : "";
@@ -4883,9 +4620,9 @@ function renderAssetLeaf(row, selected, looseIndent = 5) {
4883
4620
  const repoBare = e.repo ? e.repo.includes("/") ? e.repo.slice(e.repo.indexOf("/") + 1) : e.repo : "";
4884
4621
  const repoBadge = repoBare ? pc5.dim(` \xB7${repoBare}`) : "";
4885
4622
  const repoWidth = repoBare ? repoBare.length + 2 : 0;
4886
- const desc = e.description?.slice(0, Math.max(0, state.cols - 56 - badgeWidth - hintWidth - repoWidth)) ?? "";
4887
- const indent = " ".repeat(looseIndent + (row.underDomain ? 2 : 0));
4888
- const line = `${indent}${status4} ${hint}${kind} ${name} ${badge}${pc5.dim(desc)}${repoBadge}`;
4623
+ const desc = e.description?.slice(0, Math.max(0, state.cols - 56 - badgeWidth - repoWidth)) ?? "";
4624
+ const indent = " ".repeat(looseIndent + (row.plugin !== void 0 ? 2 : 0));
4625
+ const line = `${indent}${status4} ${kind} ${name} ${badge}${pc5.dim(desc)}${repoBadge}`;
4889
4626
  return selected ? pc5.inverse(line.padEnd(state.cols)) : line;
4890
4627
  }
4891
4628
  function renderSourceTreeRow(row, selected) {
@@ -4920,32 +4657,20 @@ function renderSourceTreeRow(row, selected) {
4920
4657
  rows: state.sourceTreeRows
4921
4658
  });
4922
4659
  }
4923
- if (row.type === "domain-header") {
4660
+ if (row.type === "plugin-header") {
4924
4661
  const org = row.org;
4925
4662
  const repo = row.source;
4926
- const slug = row.domainSlug ?? NO_DOMAIN;
4927
- const meta = domainRegistry.get(slug);
4928
- const title = meta?.title || slug || "(no domain)";
4929
- const badge = relationBadge(meta?.relation);
4930
- const label = `${pc5.magenta("\u25C8")} ${pc5.bold(title)}${badge ? ` ${badge}` : ""}`;
4663
+ const plugin = row.plugin;
4931
4664
  return renderHeaderLine({
4932
4665
  indent: " ".repeat(7),
4933
- collapsed: state.collapsedSourceDomains.has(srcDomainKey(org, repo, slug)),
4934
- match: (r) => isAsset(r) && rowOrigin(r) === "source" && rowOrg(r) === org && rowGroup(r) === repo && rowDomain(r) === slug,
4935
- refs: sourceDomainRefs(state.sourceTreeRows, org, repo, slug),
4936
- label,
4666
+ collapsed: state.collapsedSourcePlugins.has(srcPluginKey(org, repo, plugin)),
4667
+ match: (r) => isAsset(r) && rowOrigin(r) === "source" && rowOrg(r) === org && rowGroup(r) === repo && r.plugin === plugin,
4668
+ refs: sourcePluginRefs(state.sourceTreeRows, org, repo, plugin),
4669
+ label: pluginHeaderLabel(plugin),
4937
4670
  selected,
4938
4671
  rows: state.sourceTreeRows
4939
4672
  });
4940
4673
  }
4941
- if (row.type === "domain-info") {
4942
- const slug = row.domainSlug ?? NO_DOMAIN;
4943
- const meta = domainRegistry.get(slug);
4944
- const members = sourceDomainRefs(state.sourceTreeRows, row.org, row.source, slug).length;
4945
- const key = srcDomainKey(row.org, row.source, slug);
4946
- const line = renderSourceDomainInfoLine(meta, members, state.expandedSourceDomainInfo.has(key));
4947
- return selected ? pc5.inverse(line.padEnd(state.cols)) : line;
4948
- }
4949
4674
  return renderAssetLeaf(row, selected, 7);
4950
4675
  }
4951
4676
  function renderLibraryTreeRow(row, selected) {
@@ -4967,71 +4692,21 @@ function renderLibraryTreeRow(row, selected) {
4967
4692
  rows: state.libraryTreeRows
4968
4693
  });
4969
4694
  }
4970
- if (row.type === "domain-header") {
4695
+ if (row.type === "plugin-header") {
4971
4696
  const group = row.source;
4972
- const slug = row.domainSlug ?? NO_DOMAIN;
4973
- const meta = domainRegistry.get(slug);
4974
- const title = meta?.title || slug || "(no domain)";
4975
- const badge = relationBadge(meta?.relation);
4976
- const label = `${pc5.magenta("\u25C8")} ${pc5.bold(title)}${badge ? ` ${badge}` : ""}`;
4697
+ const plugin = row.plugin;
4977
4698
  return renderHeaderLine({
4978
4699
  indent: " ".repeat(5),
4979
- collapsed: state.collapsedLibraryDomains.has(libDomainKey(group, slug)),
4980
- match: (r) => isAsset(r) && inDomain(r, "library", group, slug),
4981
- refs: domainAssetRefs(state.libraryTreeRows, "library", group, slug),
4982
- label,
4700
+ collapsed: state.collapsedLibraryPlugins.has(libPluginKey(group, plugin)),
4701
+ match: (r) => isAsset(r) && inPlugin(r, "library", group, plugin),
4702
+ refs: pluginAssetRefs(state.libraryTreeRows, "library", group, plugin),
4703
+ label: pluginHeaderLabel(plugin),
4983
4704
  selected,
4984
4705
  rows: state.libraryTreeRows
4985
4706
  });
4986
4707
  }
4987
- if (row.type === "domain-info") {
4988
- const group = row.source;
4989
- const slug = row.domainSlug ?? NO_DOMAIN;
4990
- const meta = domainRegistry.get(slug);
4991
- const members = domainAssetRefs(state.libraryTreeRows, "library", group, slug).length;
4992
- const key = libDomainKey(group, slug);
4993
- const line = renderSourceDomainInfoLine(
4994
- meta,
4995
- members,
4996
- state.expandedLibraryDomainInfo.has(key)
4997
- );
4998
- return selected ? pc5.inverse(line.padEnd(state.cols)) : line;
4999
- }
5000
4708
  return renderAssetLeaf(row, selected, 5);
5001
4709
  }
5002
- function renderSourceDomainInfoLine(meta, members, expanded) {
5003
- const indent = " ".repeat(9);
5004
- const desc = meta?.description ?? "";
5005
- if (!expanded) {
5006
- const budget2 = Math.max(0, state.cols - indent.length - 12);
5007
- const shown2 = desc.length > budget2 ? `${desc.slice(0, Math.max(0, budget2 - 1))}\u2026` : desc;
5008
- return pc5.dim(`${indent}\u24D8 ${shown2} [d]`);
5009
- }
5010
- const parts = [desc, `${members} members`];
5011
- if (meta?.recommendedRef) parts.push(`\u2605 ${meta.recommendedRef}`);
5012
- if (meta?.sidecarSource) parts.push(`sidecar ${meta.sidecarSource}`);
5013
- const full = parts.join(" \xB7 ");
5014
- const budget = Math.max(0, state.cols - indent.length - 3);
5015
- const shown = full.length > budget ? `${full.slice(0, Math.max(0, budget - 1))}\u2026` : full;
5016
- return pc5.dim(`${indent}\u24D8 ${shown}`);
5017
- }
5018
- function renderDomainInfoLine(meta, origin, publisher, slug, expanded) {
5019
- const indent = " ".repeat(7);
5020
- const desc = meta?.description ?? "";
5021
- if (!expanded) {
5022
- const budget2 = Math.max(0, state.cols - indent.length - 12);
5023
- const shown2 = desc.length > budget2 ? `${desc.slice(0, Math.max(0, budget2 - 1))}\u2026` : desc;
5024
- return pc5.dim(`${indent}\u24D8 ${shown2} [d]`);
5025
- }
5026
- const members = domainAssetRefs(state.assetRows, origin, publisher, slug).length;
5027
- const parts = [desc, `${members} members`];
5028
- if (meta?.recommendedRef) parts.push(`\u2605 ${meta.recommendedRef}`);
5029
- if (meta?.sidecarSource) parts.push(`sidecar ${meta.sidecarSource}`);
5030
- const full = parts.join(" \xB7 ");
5031
- const budget = Math.max(0, state.cols - indent.length - 3);
5032
- const shown = full.length > budget ? `${full.slice(0, Math.max(0, budget - 1))}\u2026` : full;
5033
- return pc5.dim(`${indent}\u24D8 ${shown}`);
5034
- }
5035
4710
  function computeMaxBodyRows() {
5036
4711
  const pendingLines = state.pendingAdds.size > 0 || state.pendingRemoves.size > 0 ? 1 + (state.pendingAdds.size > 0 ? 1 : 0) + (state.pendingRemoves.size > 0 ? 1 : 0) : 0;
5037
4712
  const msgLines = state.message ? 2 : 0;
@@ -5179,10 +4854,10 @@ async function showInfo() {
5179
4854
  }
5180
4855
  console.log();
5181
4856
  console.log(pc5.dim(" Press any key to return..."));
5182
- await new Promise((resolve5) => {
4857
+ await new Promise((resolve4) => {
5183
4858
  const onData = () => {
5184
4859
  process.stdin.removeListener("data", onData);
5185
- resolve5();
4860
+ resolve4();
5186
4861
  };
5187
4862
  process.stdin.once("data", onData);
5188
4863
  });
@@ -5211,10 +4886,10 @@ function expandUnderCursor() {
5211
4886
  } else if (row.type === "publisher-header" && state.collapsedSources.has(srcKey(origin, row.source))) {
5212
4887
  state.collapsedSources.delete(srcKey(origin, row.source));
5213
4888
  rebuildVisible();
5214
- } else if (row.type === "domain-header") {
5215
- const dk = domainKey(origin, row.source, row.domainSlug ?? NO_DOMAIN);
5216
- if (state.collapsedDomains.has(dk)) {
5217
- state.collapsedDomains.delete(dk);
4889
+ } else if (row.type === "plugin-header") {
4890
+ const pk = pluginKey(origin, row.source, row.plugin);
4891
+ if (state.collapsedPlugins.has(pk)) {
4892
+ state.collapsedPlugins.delete(pk);
5218
4893
  rebuildVisible();
5219
4894
  }
5220
4895
  }
@@ -5245,10 +4920,10 @@ function collapseOrJumpUnderCursor() {
5245
4920
  }
5246
4921
  return;
5247
4922
  }
5248
- if (row.type === "domain-header") {
5249
- const dk = domainKey(origin, row.source, row.domainSlug ?? NO_DOMAIN);
5250
- if (!state.collapsedDomains.has(dk)) {
5251
- state.collapsedDomains.add(dk);
4923
+ if (row.type === "plugin-header") {
4924
+ const pk = pluginKey(origin, row.source, row.plugin);
4925
+ if (!state.collapsedPlugins.has(pk)) {
4926
+ state.collapsedPlugins.add(pk);
5252
4927
  rebuildVisible();
5253
4928
  } else {
5254
4929
  const idx2 = findLastIndex(
@@ -5263,28 +4938,10 @@ function collapseOrJumpUnderCursor() {
5263
4938
  const idx = findLastIndex(
5264
4939
  state.visibleRows,
5265
4940
  state.cursor,
5266
- (r) => r.type === "domain-header" || r.type === "publisher-header" || r.type === "origin-header"
4941
+ (r) => r.type === "plugin-header" || r.type === "publisher-header" || r.type === "origin-header"
5267
4942
  );
5268
4943
  if (idx >= 0) state.cursor = idx;
5269
4944
  }
5270
- function toggleDomainInfoUnderCursor() {
5271
- const row = state.visibleRows[state.cursor];
5272
- if (!row) return;
5273
- const origin = rowOrigin(row);
5274
- let key = null;
5275
- if (row.type === "domain-header" || row.type === "domain-info") {
5276
- key = domainKey(origin, row.source, row.domainSlug ?? NO_DOMAIN);
5277
- } else if (row.type === "asset" && row.underDomain) {
5278
- key = domainKey(origin, rowPublisher(row), rowDomain(row));
5279
- }
5280
- if (!key) {
5281
- state.message = pc5.dim("No domain here \u2014 [d] opens a domain's info region.");
5282
- return;
5283
- }
5284
- if (state.expandedDomainInfo.has(key)) state.expandedDomainInfo.delete(key);
5285
- else state.expandedDomainInfo.add(key);
5286
- rebuildVisible();
5287
- }
5288
4945
  function actOnSourceHeader(row, action3) {
5289
4946
  if (row.type === "org-header") {
5290
4947
  bulkSelection(sourceOrgRefs(state.sourceTreeRows, row.org), action3);
@@ -5294,7 +4951,14 @@ function actOnSourceHeader(row, action3) {
5294
4951
  bulkSelection(sourceRepoRefs(state.sourceTreeRows, row.org, row.source), action3);
5295
4952
  return true;
5296
4953
  }
5297
- return row.type === "source-root" || row.type === "domain-header" || row.type === "domain-info";
4954
+ if (row.type === "plugin-header") {
4955
+ bulkSelection(
4956
+ sourcePluginRefs(state.sourceTreeRows, row.org, row.source, row.plugin),
4957
+ action3
4958
+ );
4959
+ return true;
4960
+ }
4961
+ return row.type === "source-root";
5298
4962
  }
5299
4963
  function selectSourceUnderCursor(action3) {
5300
4964
  const row = state.visibleSourceRows[state.cursor];
@@ -5322,10 +4986,10 @@ function expandSourceUnderCursor() {
5322
4986
  state.collapsedSourceRepos.delete(k);
5323
4987
  rebuildVisibleSources();
5324
4988
  }
5325
- } else if (row.type === "domain-header") {
5326
- const k = srcDomainKey(row.org, row.source, row.domainSlug ?? NO_DOMAIN);
5327
- if (state.collapsedSourceDomains.has(k)) {
5328
- state.collapsedSourceDomains.delete(k);
4989
+ } else if (row.type === "plugin-header") {
4990
+ const k = srcPluginKey(row.org, row.source, row.plugin);
4991
+ if (state.collapsedSourcePlugins.has(k)) {
4992
+ state.collapsedSourcePlugins.delete(k);
5329
4993
  rebuildVisibleSources();
5330
4994
  }
5331
4995
  }
@@ -5355,10 +5019,10 @@ function collapseOrJumpSourceUnderCursor() {
5355
5019
  }
5356
5020
  return;
5357
5021
  }
5358
- if (row.type === "domain-header") {
5359
- const k = srcDomainKey(row.org, row.source, row.domainSlug ?? NO_DOMAIN);
5360
- if (!state.collapsedSourceDomains.has(k)) {
5361
- state.collapsedSourceDomains.add(k);
5022
+ if (row.type === "plugin-header") {
5023
+ const k = srcPluginKey(row.org, row.source, row.plugin);
5024
+ if (!state.collapsedSourcePlugins.has(k)) {
5025
+ state.collapsedSourcePlugins.add(k);
5362
5026
  rebuildVisibleSources();
5363
5027
  } else {
5364
5028
  const idx2 = findLastIndex(
@@ -5373,33 +5037,23 @@ function collapseOrJumpSourceUnderCursor() {
5373
5037
  const idx = findLastIndex(
5374
5038
  state.visibleSourceRows,
5375
5039
  state.cursor,
5376
- (r) => r.type === "domain-header" || r.type === "repo-header" || r.type === "org-header"
5040
+ (r) => r.type === "plugin-header" || r.type === "repo-header" || r.type === "org-header"
5377
5041
  );
5378
5042
  if (idx >= 0) state.cursor = idx;
5379
5043
  }
5380
- function toggleSourceDomainInfoUnderCursor() {
5381
- const row = state.visibleSourceRows[state.cursor];
5382
- if (!row) return;
5383
- let key = null;
5384
- if (row.type === "domain-header" || row.type === "domain-info") {
5385
- key = srcDomainKey(row.org, row.source, row.domainSlug ?? NO_DOMAIN);
5386
- } else if (row.type === "asset" && row.underDomain) {
5387
- key = srcDomainKey(rowOrg(row), rowGroup(row), rowDomain(row));
5388
- }
5389
- if (!key) {
5390
- state.message = pc5.dim("No domain here \u2014 [d] opens a domain's info region.");
5391
- return;
5392
- }
5393
- if (state.expandedSourceDomainInfo.has(key)) state.expandedSourceDomainInfo.delete(key);
5394
- else state.expandedSourceDomainInfo.add(key);
5395
- rebuildVisibleSources();
5396
- }
5397
5044
  function actOnLibraryHeader(row, action3) {
5398
5045
  if (row.type === "library-header") {
5399
5046
  bulkSelection(libraryGroupRefs(state.libraryTreeRows, row.source), action3);
5400
5047
  return true;
5401
5048
  }
5402
- return row.type === "library-root" || row.type === "domain-header" || row.type === "domain-info";
5049
+ if (row.type === "plugin-header") {
5050
+ bulkSelection(
5051
+ pluginAssetRefs(state.libraryTreeRows, "library", row.source, row.plugin),
5052
+ action3
5053
+ );
5054
+ return true;
5055
+ }
5056
+ return row.type === "library-root";
5403
5057
  }
5404
5058
  function selectLibraryUnderCursor(action3) {
5405
5059
  const row = state.visibleLibraryRows[state.cursor];
@@ -5421,10 +5075,10 @@ function expandLibraryUnderCursor() {
5421
5075
  if (row.type === "library-header" && state.collapsedLibraryGroups.has(row.source)) {
5422
5076
  state.collapsedLibraryGroups.delete(row.source);
5423
5077
  rebuildVisibleLibraries();
5424
- } else if (row.type === "domain-header") {
5425
- const k = libDomainKey(row.source, row.domainSlug ?? NO_DOMAIN);
5426
- if (state.collapsedLibraryDomains.has(k)) {
5427
- state.collapsedLibraryDomains.delete(k);
5078
+ } else if (row.type === "plugin-header") {
5079
+ const k = libPluginKey(row.source, row.plugin);
5080
+ if (state.collapsedLibraryPlugins.has(k)) {
5081
+ state.collapsedLibraryPlugins.delete(k);
5428
5082
  rebuildVisibleLibraries();
5429
5083
  }
5430
5084
  }
@@ -5446,10 +5100,10 @@ function collapseOrJumpLibraryUnderCursor() {
5446
5100
  }
5447
5101
  return;
5448
5102
  }
5449
- if (row.type === "domain-header") {
5450
- const k = libDomainKey(row.source, row.domainSlug ?? NO_DOMAIN);
5451
- if (!state.collapsedLibraryDomains.has(k)) {
5452
- state.collapsedLibraryDomains.add(k);
5103
+ if (row.type === "plugin-header") {
5104
+ const k = libPluginKey(row.source, row.plugin);
5105
+ if (!state.collapsedLibraryPlugins.has(k)) {
5106
+ state.collapsedLibraryPlugins.add(k);
5453
5107
  rebuildVisibleLibraries();
5454
5108
  } else {
5455
5109
  const idx2 = findLastIndex(
@@ -5464,27 +5118,10 @@ function collapseOrJumpLibraryUnderCursor() {
5464
5118
  const idx = findLastIndex(
5465
5119
  state.visibleLibraryRows,
5466
5120
  state.cursor,
5467
- (r) => r.type === "domain-header" || r.type === "library-header"
5121
+ (r) => r.type === "plugin-header" || r.type === "library-header"
5468
5122
  );
5469
5123
  if (idx >= 0) state.cursor = idx;
5470
5124
  }
5471
- function toggleLibraryDomainInfoUnderCursor() {
5472
- const row = state.visibleLibraryRows[state.cursor];
5473
- if (!row) return;
5474
- let key = null;
5475
- if (row.type === "domain-header" || row.type === "domain-info") {
5476
- key = libDomainKey(row.source, row.domainSlug ?? NO_DOMAIN);
5477
- } else if (row.type === "asset" && row.underDomain) {
5478
- key = libDomainKey(rowGroup(row), rowDomain(row));
5479
- }
5480
- if (!key) {
5481
- state.message = pc5.dim("No domain here \u2014 [d] opens a domain's info region.");
5482
- return;
5483
- }
5484
- if (state.expandedLibraryDomainInfo.has(key)) state.expandedLibraryDomainInfo.delete(key);
5485
- else state.expandedLibraryDomainInfo.add(key);
5486
- rebuildVisibleLibraries();
5487
- }
5488
5125
  function findLastIndex(arr, endExclusive, pred) {
5489
5126
  for (let i = Math.min(endExclusive, arr.length) - 1; i >= 0; i--) {
5490
5127
  if (pred(arr[i])) return i;
@@ -5585,14 +5222,12 @@ var KEYMAP = [
5585
5222
  { keys: [" "], when: TAB_SOURCES, run: () => selectSourceUnderCursor("toggle") },
5586
5223
  { keys: ["a", "\r", "\n"], when: TAB_SOURCES, run: applyChanges },
5587
5224
  { keys: ["i"], when: TAB_SOURCES, run: showInfo },
5588
- { keys: ["d"], when: TAB_SOURCES, run: toggleSourceDomainInfoUnderCursor },
5589
5225
  // Libraries tab: + / - / space select (asset leaf or library bulk header).
5590
5226
  { keys: ["+"], when: TAB_LIBRARIES, run: () => selectLibraryUnderCursor("add") },
5591
5227
  { keys: ["-"], when: TAB_LIBRARIES, run: () => selectLibraryUnderCursor("remove") },
5592
5228
  { keys: [" "], when: TAB_LIBRARIES, run: () => selectLibraryUnderCursor("toggle") },
5593
5229
  { keys: ["a", "\r", "\n"], when: TAB_LIBRARIES, run: applyChanges },
5594
5230
  { keys: ["i"], when: TAB_LIBRARIES, run: showInfo },
5595
- { keys: ["d"], when: TAB_LIBRARIES, run: toggleLibraryDomainInfoUnderCursor },
5596
5231
  // - : assets → bulk-remove or single-remove toggle
5597
5232
  {
5598
5233
  keys: ["-"],
@@ -5628,8 +5263,6 @@ var KEYMAP = [
5628
5263
  { keys: ["\r", "\n"], when: TAB_ASSETS, run: applyChanges },
5629
5264
  // Info — assets only
5630
5265
  { keys: ["i"], when: TAB_ASSETS, run: showInfo },
5631
- // Domain info region — assets only. Toggles the ⓘ line truncated ↔ full.
5632
- { keys: ["d"], when: TAB_ASSETS, run: toggleDomainInfoUnderCursor },
5633
5266
  // / — assets only. Opens the incremental search prompt (see handleSearchKey).
5634
5267
  {
5635
5268
  keys: ["/"],
@@ -5720,13 +5353,13 @@ async function run(projectDir) {
5720
5353
  }
5721
5354
  function makeManageCommand() {
5722
5355
  return new Command("manage").description("Interactive TUI for managing assets, sources, and libraries").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
5723
- await run(path35__default.resolve(opts.projectDir));
5356
+ await run(path34__default.resolve(opts.projectDir));
5724
5357
  });
5725
5358
  }
5726
5359
  function makeMcpServerCommand() {
5727
5360
  return new Command("mcp-server").description("Start skaile workspace MCP server (stdio transport)").option("--project-dir <path>", "Project directory (default: cwd)", process.cwd()).action(async (opts) => {
5728
- const path38 = await import('path');
5729
- const projectDir = path38.default.resolve(opts.projectDir);
5361
+ const path37 = await import('path');
5362
+ const projectDir = path37.default.resolve(opts.projectDir);
5730
5363
  const { LogStore, StdoutSink, registerLogStore } = await import('../core/logging.js');
5731
5364
  registerLogStore(
5732
5365
  new LogStore({
@@ -5896,7 +5529,7 @@ function workspaceConfigFiles(dir) {
5896
5529
  } catch {
5897
5530
  return [];
5898
5531
  }
5899
- return names.filter((name) => isWorkspaceConfigFilename(name)).sort().map((name) => path35__default.join(dir, name));
5532
+ return names.filter((name) => isWorkspaceConfigFilename(name)).sort().map((name) => path34__default.join(dir, name));
5900
5533
  }
5901
5534
  function readAgentConfigBlock(raw) {
5902
5535
  const key = AGENT_CONFIG_KEYS.find((candidate) => raw[candidate] !== void 0);
@@ -5908,7 +5541,7 @@ function readAgentConfigBlock(raw) {
5908
5541
  return flat ? { key, profiles: { default: profiles }, flat } : { key, profiles, flat };
5909
5542
  }
5910
5543
  function planProviderMigration(options) {
5911
- const projectDir = path35__default.resolve(options.projectDir);
5544
+ const projectDir = path34__default.resolve(options.projectDir);
5912
5545
  const registryPath = options.workspace ? workspaceProviderRegistryPath(projectDir) : userProviderRegistryPath();
5913
5546
  const plan = {
5914
5547
  registryPath,
@@ -5924,7 +5557,7 @@ function planProviderMigration(options) {
5924
5557
  raw = parseDocument(readFileSync(file, "utf-8")).toJS() ?? {};
5925
5558
  } catch (error) {
5926
5559
  plan.warnings.push(
5927
- `${path35__default.basename(file)}: not valid YAML (${error instanceof Error ? error.message : String(error)}) \u2014 skipped`
5560
+ `${path34__default.basename(file)}: not valid YAML (${error instanceof Error ? error.message : String(error)}) \u2014 skipped`
5928
5561
  );
5929
5562
  continue;
5930
5563
  }
@@ -5973,7 +5606,7 @@ function planProviderMigration(options) {
5973
5606
  });
5974
5607
  if (!model) {
5975
5608
  plan.warnings.push(
5976
- `${path35__default.basename(file)}: profile '${profile}' had no model: \u2014 it now resolves against registry order. Pin it with 'model: ${providerId}/<modelId>'.`
5609
+ `${path34__default.basename(file)}: profile '${profile}' had no model: \u2014 it now resolves against registry order. Pin it with 'model: ${providerId}/<modelId>'.`
5977
5610
  );
5978
5611
  }
5979
5612
  touched = true;
@@ -6040,7 +5673,7 @@ function printPlan(plan) {
6040
5673
  for (const entry of plan.entries) {
6041
5674
  const base = entry.entry.base_url ?? S.dim("(transport-derived)");
6042
5675
  console.log(
6043
- ` ${S.label(`${path35__default.basename(entry.file)} ${entry.profile}`)} provider: ${entry.legacy.provider}, cloud: ${entry.legacy.cloud}`
5676
+ ` ${S.label(`${path34__default.basename(entry.file)} ${entry.profile}`)} provider: ${entry.legacy.provider}, cloud: ${entry.legacy.cloud}`
6044
5677
  );
6045
5678
  console.log(` \u2192 providers.yml ${S.bold(entry.providerId)} ${base}`);
6046
5679
  console.log(
@@ -6056,7 +5689,7 @@ function printPlan(plan) {
6056
5689
  console.log();
6057
5690
  }
6058
5691
  async function runMigrateProviders(opts) {
6059
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
5692
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : process.cwd();
6060
5693
  const plan = planProviderMigration({ projectDir, workspace: opts.workspace });
6061
5694
  for (const warning of plan.warnings) logWarn(warning);
6062
5695
  if (plan.entries.length === 0 && Object.keys(plan.providers).length === 0) {
@@ -6115,9 +5748,9 @@ function makeNpxCommand() {
6115
5748
  const skills = npx.command("skills").description("Skill installation from external repos");
6116
5749
  skills.command("add <url>").description(
6117
5750
  "Clone a repo, register it in the project's skaile.yaml sources[], and install a skill from it"
6118
- ).requiredOption("--skill <name>", "Skill name to install from the repo").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", "Agent framework", "claude-code").option("--global", "Deploy globally").action(async (url, opts) => {
6119
- const projectDir = path35__default.resolve(opts.projectDir);
6120
- const projYaml = path35__default.join(projectDir, "skaile.yaml");
5751
+ ).requiredOption("--skill <name>", "Skill name to install from the repo").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", `Agent framework (${TARGET_DEFAULT_HINT})`).option("--global", "Deploy globally").action(async (url, opts) => {
5752
+ const projectDir = path34__default.resolve(opts.projectDir);
5753
+ const projYaml = path34__default.join(projectDir, "skaile.yaml");
6121
5754
  if (!existsSync(projYaml)) {
6122
5755
  logErr(`No skaile.yaml in ${projectDir} \u2014 run \`skaile init\` first.`);
6123
5756
  process.exit(1);
@@ -6130,11 +5763,11 @@ function makeNpxCommand() {
6130
5763
  }
6131
5764
  const spinner4 = p5.spinner();
6132
5765
  const key = sourceCacheKey(url);
6133
- const clonePath = path35__default.join(getGlobalCacheDir(), key);
5766
+ const clonePath = path34__default.join(getGlobalCacheDir(), key);
6134
5767
  spinner4.start(`Cloning ${url}`);
6135
5768
  try {
6136
5769
  if (!existsSync(clonePath)) {
6137
- mkdirSync(path35__default.dirname(clonePath), { recursive: true });
5770
+ mkdirSync(path34__default.dirname(clonePath), { recursive: true });
6138
5771
  execSync(`git clone ${url} ${clonePath}`, { stdio: "ignore" });
6139
5772
  }
6140
5773
  spinner4.stop(`Cloned to ${key}`);
@@ -6180,7 +5813,7 @@ function makeNpxCommand() {
6180
5813
  return npx;
6181
5814
  }
6182
5815
  function resolvePublisher(clonePath, url) {
6183
- const manifestPath = path35__default.join(clonePath, SKAILE_MANIFEST_FILENAME);
5816
+ const manifestPath = path34__default.join(clonePath, SKAILE_MANIFEST_FILENAME);
6184
5817
  if (existsSync(manifestPath)) {
6185
5818
  try {
6186
5819
  const { manifest } = decodeSkaileManifest(readFileSync(manifestPath, "utf8"));
@@ -6193,12 +5826,12 @@ function resolvePublisher(clonePath, url) {
6193
5826
  return url.match(/github\.com[/:]([^/]+)\/[^/]+/)?.[1];
6194
5827
  }
6195
5828
  function resolveSkillName(clonePath, requested) {
6196
- const skillsDir = path35__default.join(clonePath, "skills");
6197
- if (existsSync(path35__default.join(skillsDir, requested, "SKILL.md"))) return requested;
5829
+ const skillsDir = path34__default.join(clonePath, "skills");
5830
+ if (existsSync(path34__default.join(skillsDir, requested, "SKILL.md"))) return requested;
6198
5831
  if (!existsSync(skillsDir)) return requested;
6199
5832
  for (const entry of readdirSync(skillsDir, { withFileTypes: true })) {
6200
5833
  if (!entry.isDirectory()) continue;
6201
- const md = path35__default.join(skillsDir, entry.name, "SKILL.md");
5834
+ const md = path34__default.join(skillsDir, entry.name, "SKILL.md");
6202
5835
  if (!existsSync(md)) continue;
6203
5836
  try {
6204
5837
  const { data } = parseFrontmatter(readFileSync(md, "utf8"));
@@ -6223,10 +5856,12 @@ function matchesOutdatedFilter(e, filter) {
6223
5856
  }
6224
5857
  function makeOutdatedCommand() {
6225
5858
  return new Command("outdated").description("Check for assets behind their repo or library").argument("[ref]", "Check a specific asset (kind:@publisher/name)").option("--project-dir <path>", "Project directory", process.cwd()).addOption(
6226
- new Option("--target <agent>", "Driver target").default("claude-code").choices(SUPPORTED_DRIVER_TARGETS)
5859
+ new Option("--target <agent>", `Driver target (${TARGET_DEFAULT_HINT})`).choices(
5860
+ SUPPORTED_DRIVER_TARGETS
5861
+ )
6227
5862
  ).action(async (filter, opts) => {
6228
5863
  const am2 = new AssetManager({
6229
- projectDir: path35__default.resolve(opts.projectDir),
5864
+ projectDir: path34__default.resolve(opts.projectDir),
6230
5865
  driverTarget: opts.target
6231
5866
  });
6232
5867
  const entries = await am2.outdated();
@@ -6256,7 +5891,7 @@ function makeOutdatedCommand() {
6256
5891
  function makePatchCommand() {
6257
5892
  const cmd = new Command("patch").description("Patch workflow for skill improvement");
6258
5893
  cmd.command("extract <ref>").alias("start").description("Extract asset for local editing").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
6259
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5894
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
6260
5895
  try {
6261
5896
  const dest = await am2.patch(ref);
6262
5897
  logOk(`Extracted to ${S.dim(dest)}`);
@@ -6267,7 +5902,7 @@ function makePatchCommand() {
6267
5902
  }
6268
5903
  });
6269
5904
  cmd.command("commit <ref>").description("Generate .patch file from edits").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
6270
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5905
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
6271
5906
  try {
6272
5907
  const patchFile = await am2.patchCommit(ref);
6273
5908
  logOk(`Patch saved to ${S.dim(patchFile)}`);
@@ -6278,7 +5913,7 @@ function makePatchCommand() {
6278
5913
  }
6279
5914
  });
6280
5915
  cmd.command("submit <ref>").description("Apply patch to repo clone and prepare for PR").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
6281
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5916
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
6282
5917
  try {
6283
5918
  await am2.patchSubmit(ref);
6284
5919
  logOk("Patch applied to repo clone and committed.");
@@ -6291,7 +5926,7 @@ function makePatchCommand() {
6291
5926
  }
6292
5927
  });
6293
5928
  cmd.command("remove <ref>").description("Remove local patch after upstream merge").option("--project-dir <path>", "Project directory", process.cwd()).action((ref, opts) => {
6294
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5929
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
6295
5930
  am2.patchRemove(ref);
6296
5931
  logOk(`Patch removed for ${ref}`);
6297
5932
  });
@@ -6309,7 +5944,7 @@ function action2(fn) {
6309
5944
  };
6310
5945
  }
6311
5946
  async function reconcileAndReport(projectDir, plugins) {
6312
- const { reconcilePlugins } = await import('../plugin-store-D45CREMJ.js');
5947
+ const { reconcilePlugins } = await import('../plugin-store-SVYV7L4C.js');
6313
5948
  if (plugins.length === 0) {
6314
5949
  logInfo("No plugins declared \u2014 nothing to reconcile.");
6315
5950
  return;
@@ -6323,10 +5958,10 @@ async function reconcileAndReport(projectDir, plugins) {
6323
5958
  }
6324
5959
  }
6325
5960
  async function runInstall2(spec, opts) {
6326
- const projectDir = path35__default.resolve(opts.projectDir);
5961
+ const projectDir = path34__default.resolve(opts.projectDir);
6327
5962
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
6328
- const { specName } = await import('../plugin-store-D45CREMJ.js');
6329
- const yamlPath = path35__default.join(projectDir, "skaile.yaml");
5963
+ const { specName } = await import('../plugin-store-SVYV7L4C.js');
5964
+ const yamlPath = path34__default.join(projectDir, "skaile.yaml");
6330
5965
  const editor = WorkspaceYamlEditor2.load(yamlPath);
6331
5966
  const replaced = editor.addPlugin(spec, specName);
6332
5967
  editor.save();
@@ -6335,10 +5970,10 @@ async function runInstall2(spec, opts) {
6335
5970
  await reconcileAndReport(projectDir, editor.getPlugins());
6336
5971
  }
6337
5972
  async function runRemove(name, opts) {
6338
- const projectDir = path35__default.resolve(opts.projectDir);
5973
+ const projectDir = path34__default.resolve(opts.projectDir);
6339
5974
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
6340
- const { specName } = await import('../plugin-store-D45CREMJ.js');
6341
- const yamlPath = path35__default.join(projectDir, "skaile.yaml");
5975
+ const { specName } = await import('../plugin-store-SVYV7L4C.js');
5976
+ const yamlPath = path34__default.join(projectDir, "skaile.yaml");
6342
5977
  const editor = WorkspaceYamlEditor2.load(yamlPath);
6343
5978
  const removed = editor.removePlugin(name, specName);
6344
5979
  if (!removed) {
@@ -6350,7 +5985,7 @@ async function runRemove(name, opts) {
6350
5985
  await reconcileAndReport(projectDir, editor.getPlugins());
6351
5986
  }
6352
5987
  async function runList(opts) {
6353
- const projectDir = path35__default.resolve(opts.projectDir);
5988
+ const projectDir = path34__default.resolve(opts.projectDir);
6354
5989
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
6355
5990
  const config = resolveSkWorkspaceConfig2(projectDir);
6356
5991
  const declared = config.plugins ?? [];
@@ -6365,7 +6000,7 @@ async function runList(opts) {
6365
6000
  const registry = createPluginRegistry();
6366
6001
  if (declared.length > 0) {
6367
6002
  try {
6368
- const { loadPlugins } = await import('../plugin-store-D45CREMJ.js');
6003
+ const { loadPlugins } = await import('../plugin-store-SVYV7L4C.js');
6369
6004
  const result = await loadPlugins(projectDir, declared, registry);
6370
6005
  for (const f of result.failed) logWarn(f.error);
6371
6006
  } catch (err) {
@@ -6446,11 +6081,11 @@ function presetItemsToWorkspace(preset, values) {
6446
6081
  }
6447
6082
  function resolveItemConfig(item, preset, values, envVarsToSet) {
6448
6083
  const byKey = placeholderIndex(item, preset);
6449
- const resolve5 = (key) => {
6084
+ const resolve4 = (key) => {
6450
6085
  const ph = byKey.get(key) ?? { key, type: "text", required: true };
6451
6086
  return resolvePlaceholderValue(ph, values[key]);
6452
6087
  };
6453
- return substituteNode(item.config ?? {}, resolve5, envVarsToSet);
6088
+ return substituteNode(item.config ?? {}, resolve4, envVarsToSet);
6454
6089
  }
6455
6090
  function placeholderIndex(item, preset) {
6456
6091
  const map = /* @__PURE__ */ new Map();
@@ -6458,20 +6093,20 @@ function placeholderIndex(item, preset) {
6458
6093
  for (const ph of item.placeholders ?? []) map.set(ph.key, ph);
6459
6094
  return map;
6460
6095
  }
6461
- function substituteNode(node, resolve5, envVarsToSet) {
6462
- if (typeof node === "string") return substituteString(node, resolve5, envVarsToSet);
6463
- if (Array.isArray(node)) return node.map((el) => substituteNode(el, resolve5, envVarsToSet));
6096
+ function substituteNode(node, resolve4, envVarsToSet) {
6097
+ if (typeof node === "string") return substituteString(node, resolve4, envVarsToSet);
6098
+ if (Array.isArray(node)) return node.map((el) => substituteNode(el, resolve4, envVarsToSet));
6464
6099
  if (node && typeof node === "object") {
6465
6100
  const out = {};
6466
- for (const [k, v] of Object.entries(node)) out[k] = substituteNode(v, resolve5, envVarsToSet);
6101
+ for (const [k, v] of Object.entries(node)) out[k] = substituteNode(v, resolve4, envVarsToSet);
6467
6102
  return out;
6468
6103
  }
6469
6104
  return node;
6470
6105
  }
6471
- function substituteString(value, resolve5, envVarsToSet) {
6106
+ function substituteString(value, resolve4, envVarsToSet) {
6472
6107
  const tokens = [...value.matchAll(TOKEN_RE)];
6473
6108
  if (tokens.length === 0) return value;
6474
- const secret = tokens.find(([, ns]) => ns === "SECRET") ?? tokens.find(([, , key]) => "envRef" in resolve5(key));
6109
+ const secret = tokens.find(([, ns]) => ns === "SECRET") ?? tokens.find(([, , key]) => "envRef" in resolve4(key));
6475
6110
  if (secret) {
6476
6111
  const [full, , key] = secret;
6477
6112
  if (tokens.length > 1 || full !== value) {
@@ -6483,7 +6118,7 @@ function substituteString(value, resolve5, envVarsToSet) {
6483
6118
  return `env:${key}`;
6484
6119
  }
6485
6120
  return value.replace(TOKEN_RE, (_m, _ns, key) => {
6486
- const resolved = resolve5(key);
6121
+ const resolved = resolve4(key);
6487
6122
  return "envRef" in resolved ? resolved.envRef : resolved.value;
6488
6123
  });
6489
6124
  }
@@ -6540,7 +6175,7 @@ function neededSources(config, lock) {
6540
6175
  }
6541
6176
  function sourcesWithSidecar(sources) {
6542
6177
  const dir = getStoreManifestsDir();
6543
- return sources.filter((s) => existsSync(path35.join(dir, `${storeManifestSlug(s.url)}.yaml`))).map((s) => s.url);
6178
+ return sources.filter((s) => existsSync(path34.join(dir, `${storeManifestSlug(s.url)}.yaml`))).map((s) => s.url);
6544
6179
  }
6545
6180
  function compact(obj) {
6546
6181
  const out = {};
@@ -6632,8 +6267,8 @@ function redactSecrets(preset, findings) {
6632
6267
  }
6633
6268
  return { preset: next, keys };
6634
6269
  }
6635
- function placeholderKey(itemId, path38) {
6636
- return `${itemId}_${path38}`.replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
6270
+ function placeholderKey(itemId, path37) {
6271
+ return `${itemId}_${path37}`.replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
6637
6272
  }
6638
6273
  function setAtPath(root, segments, value) {
6639
6274
  let node = root;
@@ -6656,7 +6291,7 @@ function makePresetCommand() {
6656
6291
  cmd.command("init [name]").description("Scaffold a new .preset.yaml file").option("--dir <path>", "Output directory", process.cwd()).action(async (name, opts) => {
6657
6292
  const presetName = name ?? "my-preset";
6658
6293
  const filename = `${presetName}.preset.yaml`;
6659
- const outPath = path35__default.join(path35__default.resolve(opts.dir), filename);
6294
+ const outPath = path34__default.join(path34__default.resolve(opts.dir), filename);
6660
6295
  if (existsSync(outPath)) {
6661
6296
  logErr(`File already exists: ${outPath}`);
6662
6297
  logInfo("Choose a different name or remove the existing file.");
@@ -6689,7 +6324,7 @@ function makePresetCommand() {
6689
6324
  return cmd;
6690
6325
  }
6691
6326
  async function runPresetExport(name, opts) {
6692
- const projectDir = path35__default.resolve(opts.projectDir);
6327
+ const projectDir = path34__default.resolve(opts.projectDir);
6693
6328
  const file = loadSkWorkspaceConfig(projectDir);
6694
6329
  if (!file) {
6695
6330
  logErr(`No skaile.yaml found in ${projectDir}`);
@@ -6699,7 +6334,7 @@ async function runPresetExport(name, opts) {
6699
6334
  const presetName = name ?? file.config.name ?? "my-preset";
6700
6335
  let lock = null;
6701
6336
  try {
6702
- lock = readLock(path35__default.join(projectDir, "skaile.lock.yaml"));
6337
+ lock = readLock(path34__default.join(projectDir, "skaile.lock.yaml"));
6703
6338
  } catch {
6704
6339
  lock = null;
6705
6340
  }
@@ -6740,7 +6375,7 @@ async function runPresetExport(name, opts) {
6740
6375
  const contents = header ? `${header}
6741
6376
  ${body}` : body;
6742
6377
  if (opts.out && opts.dir !== process.cwd()) logWarn("--dir is ignored when --out is set.");
6743
- const outPath = opts.out ? path35__default.resolve(opts.out) : path35__default.join(path35__default.resolve(opts.dir), `${presetName}.preset.yaml`);
6378
+ const outPath = opts.out ? path34__default.resolve(opts.out) : path34__default.join(path34__default.resolve(opts.dir), `${presetName}.preset.yaml`);
6744
6379
  if (existsSync(outPath) && !opts.force) {
6745
6380
  logErr(`File already exists: ${outPath}`);
6746
6381
  logInfo("Pass --force to overwrite, or choose a different --out/--dir.");
@@ -6752,7 +6387,7 @@ ${body}` : body;
6752
6387
  logErr(`Failed to write ${outPath}: ${e.message}`);
6753
6388
  process.exit(1);
6754
6389
  }
6755
- logOk(`Exported ${S.brand(path35__default.basename(outPath))}`);
6390
+ logOk(`Exported ${S.brand(path34__default.basename(outPath))}`);
6756
6391
  logInfo(`Path: ${outPath}`);
6757
6392
  if (unresolved.length > 0) {
6758
6393
  console.error(S.err("This file is NOT safe to share."));
@@ -6793,13 +6428,13 @@ function collectInput(value, acc) {
6793
6428
  return acc;
6794
6429
  }
6795
6430
  async function runPresetApply(filePath, opts) {
6796
- const projectDir = path35__default.resolve(opts.projectDir);
6431
+ const projectDir = path34__default.resolve(opts.projectDir);
6797
6432
  const file = loadSkWorkspaceConfig(projectDir);
6798
6433
  if (!file) {
6799
6434
  logErr("No skaile.yaml \u2014 run `skaile init` first");
6800
6435
  process.exit(1);
6801
6436
  }
6802
- const resolved = path35__default.resolve(filePath);
6437
+ const resolved = path34__default.resolve(filePath);
6803
6438
  if (!existsSync(resolved)) {
6804
6439
  logErr(`File not found: ${resolved}`);
6805
6440
  process.exit(1);
@@ -7015,7 +6650,7 @@ async function reportNestedPresetRefs(preset) {
7015
6650
  }
7016
6651
  async function checkPresetCycles(preset, resolved) {
7017
6652
  const { detectCycles } = await import('../discovery/index.js');
7018
- const presetRef = path35__default.basename(resolved, ".preset.yaml");
6653
+ const presetRef = path34__default.basename(resolved, ".preset.yaml");
7019
6654
  const edges = [];
7020
6655
  for (const item of preset.items) {
7021
6656
  if (item.ref) {
@@ -7067,7 +6702,7 @@ function printPresetSummary(preset, placeholderCount, hasWarnings) {
7067
6702
  }
7068
6703
  }
7069
6704
  async function runPresetValidate(filePath) {
7070
- const resolved = path35__default.resolve(filePath);
6705
+ const resolved = path34__default.resolve(filePath);
7071
6706
  const preset = await loadPresetForValidation(resolved);
7072
6707
  await reportNestedPresetRefs(preset);
7073
6708
  await checkPresetCycles(preset, resolved);
@@ -7117,11 +6752,11 @@ items:
7117
6752
  }
7118
6753
  function makeRebuildCommand() {
7119
6754
  return new Command("rebuild").description("Re-snapshot inline-snapshot composition items and bump prompt version").argument("[agent]", "Agent name or path (defaults to current project agent)").option("--project-dir <dir>", "Project directory", process.cwd()).action(async (agentArg, opts) => {
7120
- const projectDir = path35__default.resolve(opts.projectDir);
6755
+ const projectDir = path34__default.resolve(opts.projectDir);
7121
6756
  let agentDir;
7122
6757
  if (agentArg) {
7123
6758
  if (agentArg.includes("/") || agentArg.includes("\\")) {
7124
- agentDir = path35__default.resolve(projectDir, agentArg);
6759
+ agentDir = path34__default.resolve(projectDir, agentArg);
7125
6760
  } else {
7126
6761
  let resolved;
7127
6762
  try {
@@ -7130,7 +6765,7 @@ function makeRebuildCommand() {
7130
6765
  if (!(err instanceof AgentRefResolutionError)) throw err;
7131
6766
  logWarn(`${err.message} \u2014 using "${agentArg}"`);
7132
6767
  }
7133
- agentDir = resolved ?? path35__default.resolve(projectDir, agentArg);
6768
+ agentDir = resolved ?? path34__default.resolve(projectDir, agentArg);
7134
6769
  }
7135
6770
  } else {
7136
6771
  let resolved;
@@ -7231,12 +6866,12 @@ function makeFlowEventHandler() {
7231
6866
  }
7232
6867
  function makeRunCommand() {
7233
6868
  const cmd = new Command("run").description("Start a flow or run a single-shot text prompt").argument("[flow-id-or-text...]", "Flow ID or text prompt").option("--project-dir <path>", "Project directory", process.cwd()).option("--driver <name>", "Harness to run (claude-sdk, codex, omp)").option("--model <name>", "Model override").option("--label <label>", "Human-readable session label").option("--dry-run", "Print plan without executing").option("--skill <name>", "Skill name (for single-shot mode)").action(async (positional, opts) => {
7234
- const projectDir = path35__default.resolve(opts.projectDir);
6869
+ const projectDir = path34__default.resolve(opts.projectDir);
7235
6870
  const cliDriver = opts.driver;
7236
6871
  const dryRun = opts.dryRun ?? false;
7237
6872
  let flowId = positional[0];
7238
6873
  if (!flowId) {
7239
- const flows = discoverFlows(projectDir);
6874
+ const flows = await discoverFlowsWithLibraries(projectDir);
7240
6875
  if (flows.length === 0) {
7241
6876
  logErr("No flows available.");
7242
6877
  process.exit(1);
@@ -7261,12 +6896,16 @@ function makeRunCommand() {
7261
6896
  });
7262
6897
  const driver = config.driver ?? "omp";
7263
6898
  const model = config.model;
7264
- const flowPath = findFlowFile(flowId, projectAiAssetsRoots(projectDir), projectDir);
6899
+ const flowPath = await findFlowFileWithLibraries(
6900
+ flowId,
6901
+ projectAiAssetsRoots(projectDir),
6902
+ projectDir
6903
+ );
7265
6904
  if (!flowPath) {
7266
6905
  const textPrompt = positional.join(" ");
7267
6906
  if (!textPrompt.trim()) {
7268
6907
  logErr(`Flow not found: ${flowId}`);
7269
- const available = discoverFlows(projectDir).map((f) => f.id);
6908
+ const available = (await discoverFlowsWithLibraries(projectDir)).map((f) => f.id);
7270
6909
  if (available.length > 0) {
7271
6910
  console.log(` ${S.dim("Available:")} ${available.map((id) => S.cmd(id)).join(", ")}`);
7272
6911
  }
@@ -7328,7 +6967,7 @@ function makeRunCommand() {
7328
6967
  }
7329
6968
  function makeResumeCommand() {
7330
6969
  const cmd = new Command("resume").description("Resume current session").option("--project-dir <path>", "Project directory", process.cwd()).option("--session <run-id>", "Target session by runId").option("--dry-run", "Print plan without executing").action(async (opts) => {
7331
- const projectDir = path35__default.resolve(opts.projectDir);
6970
+ const projectDir = path34__default.resolve(opts.projectDir);
7332
6971
  const sessionId = opts.session;
7333
6972
  const dryRun = opts.dryRun ?? false;
7334
6973
  const session = sessionId ? await loadSessionById(projectDir, sessionId) : await loadSession(projectDir);
@@ -7355,7 +6994,7 @@ function makeResumeCommand() {
7355
6994
  }
7356
6995
  function makeStatusCommand() {
7357
6996
  return new Command("status").description("Show current session state").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
7358
- const projectDir = path35__default.resolve(opts.projectDir);
6997
+ const projectDir = path34__default.resolve(opts.projectDir);
7359
6998
  const session = await loadSession(projectDir);
7360
6999
  if (!session) {
7361
7000
  logInfo("No active session.");
@@ -7380,7 +7019,7 @@ function makeStatusCommand() {
7380
7019
  }
7381
7020
  function makeClearCommand() {
7382
7021
  return new Command("clear").description("Unset current session pointer").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
7383
- const projectDir = path35__default.resolve(opts.projectDir);
7022
+ const projectDir = path34__default.resolve(opts.projectDir);
7384
7023
  await clearSession(projectDir);
7385
7024
  logOk("Session cleared.");
7386
7025
  });
@@ -7389,8 +7028,8 @@ function makeReplCommand() {
7389
7028
  return new Command("repl").description("Start an interactive agent session").option("--project-dir <path>", "Project directory").option("--driver <name>", "Harness to run (claude-sdk, omp)").option("--model <name>", "Model override").option("--resume", "Resume last session").option("--resume-session <id>", "Resume specific session").action(async (opts) => {
7390
7029
  const { findWorkspaceRoot } = await import('../core/index.js');
7391
7030
  const { startRepl } = await import('../tui/index.js');
7392
- const os2 = await import('os');
7393
- const userCwd = path35__default.resolve(opts.projectDir ?? process.cwd());
7031
+ const os = await import('os');
7032
+ const userCwd = path34__default.resolve(opts.projectDir ?? process.cwd());
7394
7033
  const workspaceRoot = findWorkspaceRoot(userCwd);
7395
7034
  let projectDir;
7396
7035
  let agentCwd;
@@ -7412,13 +7051,13 @@ function makeReplCommand() {
7412
7051
  p5.cancel("Cancelled.");
7413
7052
  process.exit(0);
7414
7053
  }
7415
- const tmpDir = fs11__default.mkdtempSync(path35__default.join(os2.tmpdir(), "skaile-repl-"));
7054
+ const tmpDir = fs10__default.mkdtempSync(path34__default.join(os.tmpdir(), "skaile-repl-"));
7416
7055
  projectDir = tmpDir;
7417
7056
  agentCwd = userCwd;
7418
7057
  logOk(`Temporary workspace: ${S.cmd(tmpDir)}`);
7419
7058
  if (!driverOverride) {
7420
- const claudeDir = path35__default.join(os2.homedir(), ".claude");
7421
- if (fs11__default.existsSync(claudeDir)) {
7059
+ const claudeDir = path34__default.join(os.homedir(), ".claude");
7060
+ if (fs10__default.existsSync(claudeDir)) {
7422
7061
  driverOverride = "claude-sdk";
7423
7062
  logInfo(`Detected ${S.cmd("~/.claude")} \u2192 using ${S.cmd("claude-sdk")} harness`);
7424
7063
  } else {
@@ -7490,12 +7129,12 @@ function makeServeCommand() {
7490
7129
  );
7491
7130
  }
7492
7131
  async function ensurePluginsLoadedForServe(projectDir) {
7493
- const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-EP6H3O3S.js');
7132
+ const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-IELQGVGB.js');
7494
7133
  try {
7495
7134
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
7496
7135
  const config = resolveSkWorkspaceConfig2(projectDir);
7497
7136
  if (!config.plugins || config.plugins.length === 0) return;
7498
- const { ensurePluginsLoaded } = await import('../plugin-store-D45CREMJ.js');
7137
+ const { ensurePluginsLoaded } = await import('../plugin-store-SVYV7L4C.js');
7499
7138
  const { pluginRegistry } = await import('../plugin-registry/index.js');
7500
7139
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
7501
7140
  if (result.loaded.length > 0) {
@@ -7509,23 +7148,23 @@ async function ensurePluginsLoadedForServe(projectDir) {
7509
7148
  }
7510
7149
  }
7511
7150
  async function runCompileTest(opts) {
7512
- const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-EP6H3O3S.js');
7151
+ const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-IELQGVGB.js');
7513
7152
  const { tmpdir } = await import('os');
7514
- const { dirname: dirname4, join: join6, resolve: resolve5 } = await import('path');
7153
+ const { dirname: dirname3, join: join5, resolve: resolve4 } = await import('path');
7515
7154
  const { fileURLToPath: fileURLToPath2 } = await import('url');
7516
7155
  const { unlinkSync, existsSync: existsSync14 } = await import('fs');
7517
7156
  const { spawn } = await import('child_process');
7518
7157
  const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
7519
- const { MONOREPO_ROOT } = await import('../paths-W4LDORQQ.js');
7158
+ const { MONOREPO_ROOT } = await import('../paths-MKSI52PF.js');
7520
7159
  if (MONOREPO_ROOT === null) {
7521
7160
  logErr2("--compile-test is only available inside the skaile-dev workspace.");
7522
7161
  logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
7523
7162
  process.exitCode = 2;
7524
7163
  return;
7525
7164
  }
7526
- const outfile = join6(tmpdir(), `skaile-compile-test-${Date.now()}`);
7165
+ const outfile = join5(tmpdir(), `skaile-compile-test-${Date.now()}`);
7527
7166
  const __thisFile = fileURLToPath2(import.meta.url);
7528
- const entryPoint = resolve5(dirname4(__thisFile), "..", "index.ts");
7167
+ const entryPoint = resolve4(dirname3(__thisFile), "..", "index.ts");
7529
7168
  logInfo2(`Building compiled binary...`);
7530
7169
  logInfo2(`Entry: ${S2.dim(entryPoint)}`);
7531
7170
  logInfo2(`Output: ${S2.dim(outfile)}`);
@@ -7831,19 +7470,19 @@ function buildTailSelect(q) {
7831
7470
  return { sql, params };
7832
7471
  }
7833
7472
  function sleepUnlessAborted(ms, signal) {
7834
- return new Promise((resolve5) => {
7473
+ return new Promise((resolve4) => {
7835
7474
  if (signal?.aborted) {
7836
- resolve5();
7475
+ resolve4();
7837
7476
  return;
7838
7477
  }
7839
7478
  const timer = setTimeout(() => {
7840
7479
  signal?.removeEventListener("abort", onAbort);
7841
- resolve5();
7480
+ resolve4();
7842
7481
  }, ms);
7843
7482
  const onAbort = () => {
7844
7483
  clearTimeout(timer);
7845
7484
  signal?.removeEventListener("abort", onAbort);
7846
- resolve5();
7485
+ resolve4();
7847
7486
  };
7848
7487
  signal?.addEventListener("abort", onAbort, { once: true });
7849
7488
  });
@@ -7930,7 +7569,7 @@ async function remoteTail(opts) {
7930
7569
  ]
7931
7570
  });
7932
7571
  const filter = makeFilter(opts.query);
7933
- return new Promise((resolve5, reject) => {
7572
+ return new Promise((resolve4, reject) => {
7934
7573
  let settled = false;
7935
7574
  const finish = (err) => {
7936
7575
  if (settled) return;
@@ -7941,11 +7580,11 @@ async function remoteTail(opts) {
7941
7580
  }
7942
7581
  opts.signal?.removeEventListener("abort", onAbort);
7943
7582
  if (err) reject(err);
7944
- else resolve5();
7583
+ else resolve4();
7945
7584
  };
7946
7585
  const onAbort = () => finish();
7947
7586
  if (opts.signal?.aborted) {
7948
- resolve5();
7587
+ resolve4();
7949
7588
  return;
7950
7589
  }
7951
7590
  opts.signal?.addEventListener("abort", onAbort, { once: true });
@@ -7999,7 +7638,7 @@ function resolveMode(opts) {
7999
7638
  if (opts.forceLocal && opts.forceRemote) {
8000
7639
  throw new Error("Cannot use both --local and --remote");
8001
7640
  }
8002
- const startDir = path35__default.resolve(opts.projectDir ?? process.cwd());
7641
+ const startDir = path34__default.resolve(opts.projectDir ?? process.cwd());
8003
7642
  const localDb = findLogsDb(startDir);
8004
7643
  if (opts.forceLocal) {
8005
7644
  if (!localDb) {
@@ -8032,14 +7671,14 @@ function resolveMode(opts) {
8032
7671
  function findLogsDb(startDir) {
8033
7672
  let dir = startDir;
8034
7673
  for (let i = 0; i < MAX_WALK_LEVELS; i++) {
8035
- const candidate = path35__default.join(dir, ".skaile", "logs.db");
7674
+ const candidate = path34__default.join(dir, ".skaile", "logs.db");
8036
7675
  if (existsSync(candidate)) {
8037
7676
  try {
8038
7677
  if (statSync(candidate).isFile()) return candidate;
8039
7678
  } catch {
8040
7679
  }
8041
7680
  }
8042
- const parent = path35__default.dirname(dir);
7681
+ const parent = path34__default.dirname(dir);
8043
7682
  if (parent === dir) return void 0;
8044
7683
  dir = parent;
8045
7684
  }
@@ -8214,7 +7853,7 @@ function parsePositiveInt(value, flag) {
8214
7853
  function makeSessionCommand() {
8215
7854
  const cmd = new Command("session").description("Manage sessions");
8216
7855
  cmd.command("list").description("List all sessions for a project").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
8217
- const projectDir = path35__default.resolve(opts.projectDir);
7856
+ const projectDir = path34__default.resolve(opts.projectDir);
8218
7857
  const sessions = await listSessions(projectDir);
8219
7858
  const current = await loadSession(projectDir);
8220
7859
  if (sessions.length === 0) {
@@ -8242,7 +7881,7 @@ function makeSessionCommand() {
8242
7881
  console.log();
8243
7882
  });
8244
7883
  cmd.command("show <run-id>").description("Show a specific session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
8245
- const projectDir = path35__default.resolve(opts.projectDir);
7884
+ const projectDir = path34__default.resolve(opts.projectDir);
8246
7885
  const session = await loadSessionById(projectDir, runId);
8247
7886
  if (!session) {
8248
7887
  logErr(`Session not found: ${runId}`);
@@ -8251,12 +7890,12 @@ function makeSessionCommand() {
8251
7890
  console.log(JSON.stringify(session, null, 2));
8252
7891
  });
8253
7892
  cmd.command("switch <run-id>").description("Switch the current session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
8254
- const projectDir = path35__default.resolve(opts.projectDir);
7893
+ const projectDir = path34__default.resolve(opts.projectDir);
8255
7894
  await setCurrentSession(projectDir, runId);
8256
7895
  logOk(`Switched to session: ${S.dim(runId.slice(0, 8))}`);
8257
7896
  });
8258
7897
  cmd.command("delete <run-id>").description("Delete a session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
8259
- const projectDir = path35__default.resolve(opts.projectDir);
7898
+ const projectDir = path34__default.resolve(opts.projectDir);
8260
7899
  await deleteSession(projectDir, runId);
8261
7900
  logOk(`Deleted session: ${S.dim(runId.slice(0, 8))}`);
8262
7901
  });
@@ -8280,12 +7919,12 @@ function printOverviewRepos(repos) {
8280
7919
  console.log(` ${icon} ${S.cmd(r.name)} ${pc5.dim(`[${r.kind}]`)} ${status4}`);
8281
7920
  }
8282
7921
  }
8283
- function printOverviewDomains(byDomain) {
8284
- const nameW = Math.max(4, ...[...byDomain.values()].flat().map((e) => e.name.length));
7922
+ function printOverviewPublishers(byPublisher) {
7923
+ const nameW = Math.max(4, ...[...byPublisher.values()].flat().map((e) => e.name.length));
8285
7924
  const kindW = 8;
8286
- for (const [domain, entries] of byDomain) {
7925
+ for (const [publisher, entries] of byPublisher) {
8287
7926
  console.log();
8288
- console.log(` ${S.heading(domain)} ${pc5.dim(`(${entries.length})`)}`);
7927
+ console.log(` ${S.heading(publisher)} ${pc5.dim(`(${entries.length})`)}`);
8289
7928
  console.log(` ${S.rule(nameW + kindW + 20)}`);
8290
7929
  for (const e of entries) {
8291
7930
  const sync = SYNC_ICONS[e.syncStatus] ?? SYNC_ICONS.unknown;
@@ -8303,28 +7942,28 @@ function showOverview(am2) {
8303
7942
  console.log();
8304
7943
  console.log(S.heading(" Asset Overview"));
8305
7944
  printOverviewRepos(result.repos);
8306
- printOverviewDomains(result.byDomain);
7945
+ printOverviewPublishers(result.byPublisher);
8307
7946
  console.log();
8308
7947
  console.log(` ${pc5.dim(`${result.total} assets deployed`)}`);
8309
7948
  console.log();
8310
7949
  }
8311
7950
  async function showAsset(am2, kind, name) {
8312
7951
  const entry = await am2.info(`${kind}:${name}`);
8313
- if (entry?.source && fs11__default.existsSync(entry.source)) {
7952
+ if (entry?.source && fs10__default.existsSync(entry.source)) {
8314
7953
  console.log();
8315
7954
  console.log(` ${kindColor(entry.kind)} ${S.heading(entry.name)}`);
8316
7955
  console.log(` ${S.rule(40)}`);
8317
7956
  console.log();
8318
- console.log(fs11__default.readFileSync(entry.source, "utf-8"));
7957
+ console.log(fs10__default.readFileSync(entry.source, "utf-8"));
8319
7958
  return;
8320
7959
  }
8321
7960
  logErr(`Asset not found: ${kind}:${name}`);
8322
7961
  process.exit(1);
8323
7962
  }
8324
7963
  function makeShowCommand() {
8325
- return new Command("show").description("Show deployed assets overview, or print asset content").argument("[kind]", "Asset kind (skill, agent, prompt, flow, bundle, contract)").argument("[name]", "Asset name").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", "Agent framework", "claude-code").action(async (kind, name, opts) => {
7964
+ return new Command("show").description("Show deployed assets overview, or print asset content").argument("[kind]", "Asset kind (skill, agent, prompt, flow, bundle, contract)").argument("[name]", "Asset name").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", `Agent framework (${TARGET_DEFAULT_HINT})`).action(async (kind, name, opts) => {
8326
7965
  const am2 = new AssetManager({
8327
- projectDir: path35__default.resolve(opts.projectDir),
7966
+ projectDir: path34__default.resolve(opts.projectDir),
8328
7967
  driverTarget: opts.target
8329
7968
  });
8330
7969
  if (!kind) {
@@ -8392,9 +8031,9 @@ function makeStoreCommand() {
8392
8031
  process.exit(2);
8393
8032
  });
8394
8033
  store.command("search <query>").description("Search the AI Asset Store catalog by name, description, or publisher").option("--kind <kind>", "Filter by asset kind (skill, agent, prompt, flow, \u2026)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
8395
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-R62UBL6E.js');
8034
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-SSBN4FX2.js');
8396
8035
  try {
8397
- const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
8036
+ const remote = await openCatalogSource2({ projectDir: path34__default.resolve(opts.projectDir) });
8398
8037
  const assets = await remote.listAssets(opts.kind ? { kind: opts.kind } : {});
8399
8038
  const results = filterCatalogAssets(assets, query);
8400
8039
  if (results.length === 0) {
@@ -8420,10 +8059,10 @@ function makeStoreCommand() {
8420
8059
  }
8421
8060
  });
8422
8061
  store.command("show <ref>").description("Show a store asset's details + provenance (source, files, integrity)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (ref, opts) => {
8423
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-R62UBL6E.js');
8424
- const { supportsInstallManifest } = await import('../project-GCW5DFAB.js');
8062
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-SSBN4FX2.js');
8063
+ const { supportsInstallManifest } = await import('../project-PJ37PM6N.js');
8425
8064
  try {
8426
- const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
8065
+ const remote = await openCatalogSource2({ projectDir: path34__default.resolve(opts.projectDir) });
8427
8066
  const asset = await remote.resolve(ref);
8428
8067
  if (!asset) {
8429
8068
  logErr(`Not found in store: ${ref} (try a full ref, e.g. skill:@publisher/name#version)`);
@@ -8545,7 +8184,7 @@ function printTree(node, prefix = "", isLast = true) {
8545
8184
  }
8546
8185
  function makeTreeCommand() {
8547
8186
  return new Command("tree").description("Show full dependency tree").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
8548
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
8187
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
8549
8188
  const root = am2.tree();
8550
8189
  if (root.children.length === 0) {
8551
8190
  logInfo("No dependencies in lock file. Run `skaile install` first.");
@@ -8571,7 +8210,7 @@ function makeUpdateCommand() {
8571
8210
  const catalogSpinner = p5.spinner();
8572
8211
  catalogSpinner.start("Refreshing catalog cache");
8573
8212
  try {
8574
- const remote = await openCatalogSource({ projectDir: path35__default.resolve(opts.projectDir) });
8213
+ const remote = await openCatalogSource({ projectDir: path34__default.resolve(opts.projectDir) });
8575
8214
  const result2 = await remote.refresh();
8576
8215
  catalogSpinner.stop(
8577
8216
  `Catalog refreshed: ${S.heading(String(result2.assetsCached))} assets cached`
@@ -8584,7 +8223,7 @@ function makeUpdateCommand() {
8584
8223
  }
8585
8224
  }
8586
8225
  if (opts.catalogOnly) return;
8587
- const projectDir = path35__default.resolve(opts.projectDir);
8226
+ const projectDir = path34__default.resolve(opts.projectDir);
8588
8227
  if (await shouldSyncSources(opts)) {
8589
8228
  const syncSpinner = p5.spinner();
8590
8229
  syncSpinner.start("Syncing sources");
@@ -8640,12 +8279,12 @@ function findManifestCandidates(rootPath) {
8640
8279
  function walk(dir) {
8641
8280
  let entries;
8642
8281
  try {
8643
- entries = fs11__default.readdirSync(dir, { withFileTypes: true });
8282
+ entries = fs10__default.readdirSync(dir, { withFileTypes: true });
8644
8283
  } catch {
8645
8284
  return;
8646
8285
  }
8647
8286
  for (const entry of entries) {
8648
- const fullPath = path35__default.join(dir, entry.name);
8287
+ const fullPath = path34__default.join(dir, entry.name);
8649
8288
  if (entry.isDirectory()) {
8650
8289
  if (!SKIP_DIRS.has(entry.name)) walk(fullPath);
8651
8290
  } else if (entry.isFile()) {
@@ -8686,7 +8325,7 @@ function checkManifestIdentity(kind, parsed) {
8686
8325
  return null;
8687
8326
  }
8688
8327
  function parseManifestCandidate(c, absRoot) {
8689
- const content = fs11__default.readFileSync(c.filePath, "utf-8");
8328
+ const content = fs10__default.readFileSync(c.filePath, "utf-8");
8690
8329
  if (c.filePath.endsWith(".md")) {
8691
8330
  const md = parseMdFrontmatter(content);
8692
8331
  if (md === null) {
@@ -8698,13 +8337,13 @@ function parseManifestCandidate(c, absRoot) {
8698
8337
  const parsed = c.filePath.endsWith(".json") ? JSON.parse(content) : parse(content);
8699
8338
  return { kind: "value", parsed };
8700
8339
  } catch (e) {
8701
- const relPath = path35__default.relative(absRoot, c.filePath);
8340
+ const relPath = path34__default.relative(absRoot, c.filePath);
8702
8341
  logErr(`${relPath} \u2014 parse error: ${e instanceof Error ? e.message : String(e)}`);
8703
8342
  return { kind: "error" };
8704
8343
  }
8705
8344
  }
8706
8345
  function validateManifestCandidate(c, parsed, body, absRoot, registry, strictConformance) {
8707
- const relPath = path35__default.relative(absRoot, c.filePath);
8346
+ const relPath = path34__default.relative(absRoot, c.filePath);
8708
8347
  let errors = 0;
8709
8348
  let warnings = 0;
8710
8349
  const identityError = checkManifestIdentity(c.kind, parsed);
@@ -8713,7 +8352,7 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
8713
8352
  errors++;
8714
8353
  }
8715
8354
  if (c.kind === "skill" && parsed && typeof parsed === "object") {
8716
- const dirName = path35__default.basename(path35__default.dirname(c.filePath));
8355
+ const dirName = path34__default.basename(path34__default.dirname(c.filePath));
8717
8356
  const findings = checkAgentSkillConformance(parsed, { dirName });
8718
8357
  for (const f of findings) {
8719
8358
  const line = `${relPath} [skill conformance] \u2014 ${f.field}: ${f.message}`;
@@ -8745,8 +8384,8 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
8745
8384
  return { errors, warnings };
8746
8385
  }
8747
8386
  function validateManifests(rootPath, strictConformance) {
8748
- const absRoot = path35__default.resolve(rootPath);
8749
- if (!fs11__default.existsSync(absRoot)) {
8387
+ const absRoot = path34__default.resolve(rootPath);
8388
+ if (!fs10__default.existsSync(absRoot)) {
8750
8389
  logErr(`Path does not exist: ${absRoot}`);
8751
8390
  return { total: 0, errors: 1, warnings: 0 };
8752
8391
  }
@@ -8779,12 +8418,12 @@ function findWorkspaceManifests(rootPath) {
8779
8418
  function walk(dir) {
8780
8419
  let entries;
8781
8420
  try {
8782
- entries = fs11__default.readdirSync(dir, { withFileTypes: true });
8421
+ entries = fs10__default.readdirSync(dir, { withFileTypes: true });
8783
8422
  } catch {
8784
8423
  return;
8785
8424
  }
8786
8425
  for (const entry of entries) {
8787
- const full = path35__default.join(dir, entry.name);
8426
+ const full = path34__default.join(dir, entry.name);
8788
8427
  if (entry.isDirectory()) {
8789
8428
  if (!SKIP_DIRS.has(entry.name)) walk(full);
8790
8429
  } else if (entry.isFile() && /(^|\.)skaile\.yaml$/.test(entry.name)) {
@@ -8847,14 +8486,14 @@ function validateWorkspaceAssets(parsed, relPath) {
8847
8486
  return errors;
8848
8487
  }
8849
8488
  function validateWorkspaceManifests(rootPath) {
8850
- const absRoot = path35__default.resolve(rootPath);
8489
+ const absRoot = path34__default.resolve(rootPath);
8851
8490
  const files = findWorkspaceManifests(absRoot);
8852
8491
  let errors = 0;
8853
8492
  for (const file of files) {
8854
- const relPath = path35__default.relative(absRoot, file);
8493
+ const relPath = path34__default.relative(absRoot, file);
8855
8494
  let parsed;
8856
8495
  try {
8857
- parsed = parse(fs11__default.readFileSync(file, "utf-8")) ?? {};
8496
+ parsed = parse(fs10__default.readFileSync(file, "utf-8")) ?? {};
8858
8497
  } catch (e) {
8859
8498
  logErr(`${relPath} \u2014 parse error: ${e instanceof Error ? e.message : String(e)}`);
8860
8499
  errors++;
@@ -8865,98 +8504,128 @@ function validateWorkspaceManifests(rootPath) {
8865
8504
  }
8866
8505
  return { total: files.length, errors };
8867
8506
  }
8868
- var EXCLUDED_DOMAINS = /* @__PURE__ */ new Set(["skaileup-shared", "external", "docs"]);
8507
+ function validatePublishManifestRoots(rootPath) {
8508
+ const absRoot = path34__default.resolve(rootPath);
8509
+ const manifest = loadSkPublishManifest(absRoot);
8510
+ if (!manifest) return 0;
8511
+ const missing = missingRootAssets(absRoot, manifest);
8512
+ for (const a of missing) {
8513
+ logErr(
8514
+ `${SKAILE_MANIFEST_FILENAME} [assets] \u2014 ${assetEntryRef(a, manifest)}: root "${a.root}" does not exist. Run \`skaile library index <library>\` to drop the entry, or restore the directory.`
8515
+ );
8516
+ }
8517
+ return missing.length;
8518
+ }
8519
+ var EXCLUDED_PATHS = ["skaileup-shared/", "external/", "docs/"];
8520
+ function toPosix(p7) {
8521
+ return p7.split(path34__default.sep).join("/");
8522
+ }
8523
+ function isExcludedPath(relPath) {
8524
+ const rel = toPosix(relPath);
8525
+ return EXCLUDED_PATHS.some((prefix) => rel.startsWith(prefix));
8526
+ }
8869
8527
  function collectAssetVersions() {
8870
8528
  const assets = [];
8871
- if (!fs11__default.existsSync(AI_RESOURCES)) return assets;
8872
- const domains = fs11__default.readdirSync(AI_RESOURCES, { withFileTypes: true }).filter((d) => d.isDirectory() && !EXCLUDED_DOMAINS.has(d.name));
8873
- for (const d of domains) {
8874
- const domainDir = path35__default.join(AI_RESOURCES, d.name);
8875
- const skillsDir = path35__default.join(domainDir, "skills");
8876
- if (fs11__default.existsSync(skillsDir)) {
8877
- collectSkillVersions(skillsDir, d.name, assets);
8878
- }
8879
- const agentsDir = path35__default.join(domainDir, "agents");
8880
- if (fs11__default.existsSync(agentsDir)) {
8881
- collectAgentVersions(agentsDir, d.name, assets);
8882
- }
8883
- const flowsDir = path35__default.join(domainDir, "flows");
8884
- if (fs11__default.existsSync(flowsDir)) {
8885
- collectFlowVersions(flowsDir, d.name, assets);
8886
- }
8887
- const promptsDir = path35__default.join(domainDir, "prompts");
8888
- if (fs11__default.existsSync(promptsDir)) {
8889
- collectPromptVersions(promptsDir, d.name, assets);
8890
- }
8891
- }
8892
- return assets;
8529
+ if (!fs10__default.existsSync(AI_RESOURCES)) return assets;
8530
+ const kindDirs = (kindDirName) => findKindDirs(AI_RESOURCES, kindDirName).filter(
8531
+ (dir) => !isExcludedPath(path34__default.relative(AI_RESOURCES, dir))
8532
+ );
8533
+ for (const dir of kindDirs("skills")) collectSkillVersions(dir, assets);
8534
+ for (const dir of kindDirs("agents")) collectAgentVersions(dir, assets);
8535
+ for (const dir of kindDirs("flows")) collectFlowVersions(dir, assets);
8536
+ for (const dir of kindDirs("prompts")) collectPromptVersions(dir, assets);
8537
+ const seen = /* @__PURE__ */ new Set();
8538
+ return assets.filter((a) => !seen.has(a.filePath) && seen.add(a.filePath));
8893
8539
  }
8894
- function collectFlowVersions(dir, domain, out) {
8895
- for (const f of fs11__default.readdirSync(dir)) {
8540
+ function collectFlowVersions(dir, out) {
8541
+ for (const f of fs10__default.readdirSync(dir)) {
8896
8542
  if (!f.endsWith(".flow.yaml")) continue;
8897
- const fp = path35__default.join(dir, f);
8898
- const content = fs11__default.readFileSync(fp, "utf-8");
8543
+ const fp = path34__default.join(dir, f);
8544
+ const content = fs10__default.readFileSync(fp, "utf-8");
8899
8545
  const parsed = parse(content);
8900
8546
  out.push({
8901
8547
  kind: "flow",
8902
8548
  name: parsed?.id ?? f.replace(".flow.yaml", ""),
8903
- domain,
8904
8549
  version: parsed?.version ?? "",
8905
8550
  filePath: fp
8906
8551
  });
8907
8552
  }
8908
8553
  }
8909
- function collectPromptVersions(dir, domain, out) {
8910
- for (const f of fs11__default.readdirSync(dir)) {
8554
+ function collectPromptVersions(dir, out) {
8555
+ for (const f of fs10__default.readdirSync(dir)) {
8911
8556
  if (!f.endsWith(".prompt.md")) continue;
8912
- const fp = path35__default.join(dir, f);
8913
- const content = fs11__default.readFileSync(fp, "utf-8");
8557
+ const fp = path34__default.join(dir, f);
8558
+ const content = fs10__default.readFileSync(fp, "utf-8");
8914
8559
  const fm = parseSkillFrontmatter(content);
8915
8560
  out.push({
8916
8561
  kind: "prompt",
8917
8562
  name: fm?.name ?? f.replace(".prompt.md", ""),
8918
- domain,
8919
8563
  version: fm?.metadata?.version ?? "",
8920
8564
  filePath: fp
8921
8565
  });
8922
8566
  }
8923
8567
  }
8924
- function collectSkillVersions(dir, domain, out) {
8925
- for (const entry of fs11__default.readdirSync(dir, { withFileTypes: true })) {
8568
+ function collectSkillVersions(dir, out) {
8569
+ for (const entry of fs10__default.readdirSync(dir, { withFileTypes: true })) {
8926
8570
  if (!entry.isDirectory()) continue;
8927
- const full = path35__default.join(dir, entry.name);
8928
- const skillMd = path35__default.join(full, "SKILL.md");
8929
- if (fs11__default.existsSync(skillMd)) {
8930
- const content = fs11__default.readFileSync(skillMd, "utf-8");
8571
+ const full = path34__default.join(dir, entry.name);
8572
+ const skillMd = path34__default.join(full, "SKILL.md");
8573
+ if (fs10__default.existsSync(skillMd)) {
8574
+ const content = fs10__default.readFileSync(skillMd, "utf-8");
8931
8575
  const fm = parseSkillFrontmatter(content);
8932
8576
  out.push({
8933
8577
  kind: "skill",
8934
8578
  name: fm?.name ?? entry.name,
8935
- domain,
8936
8579
  version: fm?.metadata?.version ?? "",
8937
8580
  filePath: skillMd
8938
8581
  });
8939
8582
  } else {
8940
- collectSkillVersions(full, domain, out);
8583
+ collectSkillVersions(full, out);
8941
8584
  }
8942
8585
  }
8943
8586
  }
8944
- function collectAgentVersions(dir, domain, out) {
8945
- for (const entry of fs11__default.readdirSync(dir, { withFileTypes: true })) {
8587
+ function collectAgentVersions(dir, out) {
8588
+ for (const entry of fs10__default.readdirSync(dir, { withFileTypes: true })) {
8946
8589
  if (!entry.isDirectory()) continue;
8947
- const agentYaml = path35__default.join(dir, entry.name, "agent.yaml");
8948
- if (!fs11__default.existsSync(agentYaml)) continue;
8949
- const content = fs11__default.readFileSync(agentYaml, "utf-8");
8590
+ const agentYaml = path34__default.join(dir, entry.name, "agent.yaml");
8591
+ if (!fs10__default.existsSync(agentYaml)) continue;
8592
+ const content = fs10__default.readFileSync(agentYaml, "utf-8");
8950
8593
  const parsed = parse(content);
8951
8594
  out.push({
8952
8595
  kind: "agent",
8953
8596
  name: parsed?.name ?? entry.name,
8954
- domain,
8955
8597
  version: parsed?.version ?? "",
8956
8598
  filePath: agentYaml
8957
8599
  });
8958
8600
  }
8959
8601
  }
8602
+ function assetLocation(a) {
8603
+ return toPosix(path34__default.relative(AI_RESOURCES, a.filePath));
8604
+ }
8605
+ function findChangelogUnit(assetRelPath, root) {
8606
+ let dir = path34__default.posix.dirname(toPosix(assetRelPath));
8607
+ for (; ; ) {
8608
+ const candidate = dir === "." ? "CHANGELOG.md" : `${dir}/CHANGELOG.md`;
8609
+ if (fs10__default.existsSync(path34__default.join(root, candidate))) return candidate;
8610
+ if (dir === ".") return null;
8611
+ dir = path34__default.posix.dirname(dir);
8612
+ }
8613
+ }
8614
+ function checkChangelogUnits(modifiedFiles, root) {
8615
+ const modified = new Set(modifiedFiles.map(toPosix));
8616
+ const assetPattern = /(SKILL\.md|agent\.yaml|\.flow\.yaml|\.prompt\.md)$/;
8617
+ const units = /* @__PURE__ */ new Set();
8618
+ const orphans = [];
8619
+ for (const f of modified) {
8620
+ if (!assetPattern.test(f) || isExcludedPath(f)) continue;
8621
+ const unit = findChangelogUnit(f, root);
8622
+ if (unit) units.add(unit);
8623
+ else orphans.push(f);
8624
+ }
8625
+ const updated = [...units].filter((u) => modified.has(u));
8626
+ const stale = [...units].filter((u) => !modified.has(u));
8627
+ return { updated, stale, orphans };
8628
+ }
8960
8629
  function isValidSemver(v) {
8961
8630
  return /^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/.test(v);
8962
8631
  }
@@ -8977,7 +8646,7 @@ function filterToChangedAssets(assets) {
8977
8646
  encoding: "utf-8"
8978
8647
  });
8979
8648
  const changedFiles = new Set(
8980
- diffOutput.trim().split("\n").filter(Boolean).map((f) => path35__default.resolve(AI_RESOURCES, f))
8649
+ diffOutput.trim().split("\n").filter(Boolean).map((f) => path34__default.resolve(AI_RESOURCES, f))
8981
8650
  );
8982
8651
  return assets.filter((a) => changedFiles.has(a.filePath));
8983
8652
  } catch {
@@ -8990,10 +8659,12 @@ function checkAssetVersions(assets) {
8990
8659
  let warnings = 0;
8991
8660
  for (const a of assets) {
8992
8661
  if (!a.version) {
8993
- logErr(`${a.kind}:${a.name} (${a.domain}) \u2014 missing version`);
8662
+ logErr(`${a.kind}:${a.name} (${assetLocation(a)}) \u2014 missing version`);
8994
8663
  errors++;
8995
8664
  } else if (!isValidSemver(a.version)) {
8996
- logWarn(`${a.kind}:${a.name} (${a.domain}) \u2014 version "${a.version}" is not valid semver`);
8665
+ logWarn(
8666
+ `${a.kind}:${a.name} (${assetLocation(a)}) \u2014 version "${a.version}" is not valid semver`
8667
+ );
8997
8668
  warnings++;
8998
8669
  }
8999
8670
  }
@@ -9003,7 +8674,7 @@ function checkVersionBumps(assets) {
9003
8674
  let warnings = 0;
9004
8675
  for (const a of assets) {
9005
8676
  if (!a.version) continue;
9006
- const relPath = path35__default.relative(AI_RESOURCES, a.filePath);
8677
+ const relPath = path34__default.relative(AI_RESOURCES, a.filePath);
9007
8678
  try {
9008
8679
  const headContent = execSync(`git show HEAD:${relPath}`, {
9009
8680
  cwd: AI_RESOURCES,
@@ -9012,7 +8683,7 @@ function checkVersionBumps(assets) {
9012
8683
  const headVersion = extractVersionFromContent(a.filePath, headContent);
9013
8684
  if (headVersion && headVersion === a.version) {
9014
8685
  logWarn(
9015
- `${a.kind}:${a.name} (${a.domain}) \u2014 file changed but version not bumped (${a.version})`
8686
+ `${a.kind}:${a.name} (${assetLocation(a)}) \u2014 file changed but version not bumped (${a.version})`
9016
8687
  );
9017
8688
  warnings++;
9018
8689
  }
@@ -9035,7 +8706,7 @@ function checkFlowVersionPins(assets) {
9035
8706
  pins = flowSkillVersionPins(loadFlow(f.filePath));
9036
8707
  } catch (err) {
9037
8708
  logWarn(
9038
- `flow:${f.name} (${path35__default.relative(AI_RESOURCES, f.filePath)}) \u2014 could not be read: ${err instanceof Error ? err.message : err}`
8709
+ `flow:${f.name} (${path34__default.relative(AI_RESOURCES, f.filePath)}) \u2014 could not be read: ${err instanceof Error ? err.message : err}`
9039
8710
  );
9040
8711
  warnings++;
9041
8712
  continue;
@@ -9052,7 +8723,7 @@ function checkFlowVersionPins(assets) {
9052
8723
  return { errors, warnings };
9053
8724
  }
9054
8725
  function runVersionsCheck(opts) {
9055
- let assets = collectAssetVersions().filter((a) => !opts.domain || a.domain === opts.domain);
8726
+ let assets = collectAssetVersions();
9056
8727
  if (opts.changedOnly) {
9057
8728
  assets = filterToChangedAssets(assets);
9058
8729
  }
@@ -9085,14 +8756,15 @@ function makeValidateCommand() {
9085
8756
  "--strict-conformance",
9086
8757
  "Treat Agent Skills (agentskills.io) standard findings as errors"
9087
8758
  ).action((targetPath, opts) => {
9088
- const absPath = path35__default.resolve(targetPath);
8759
+ const absPath = path34__default.resolve(targetPath);
9089
8760
  logInfo(`Validating manifests in ${absPath}`);
9090
8761
  const { total, errors, warnings } = validateManifests(
9091
8762
  absPath,
9092
8763
  opts.strictConformance ?? false
9093
8764
  );
9094
8765
  const ws = validateWorkspaceManifests(absPath);
9095
- const totalErrors = errors + ws.errors;
8766
+ const rootErrors = validatePublishManifestRoots(absPath);
8767
+ const totalErrors = errors + ws.errors + rootErrors;
9096
8768
  console.log();
9097
8769
  logInfo(`Scanned ${total} asset manifest(s) and ${ws.total} skaile.yaml file(s)`);
9098
8770
  if (warnings > 0) logWarn(`${warnings} warning(s)`);
@@ -9103,13 +8775,13 @@ function makeValidateCommand() {
9103
8775
  process.exit(1);
9104
8776
  }
9105
8777
  });
9106
- cmd.command("versions").description("Check version fields and flow version pins").option("--domain <name>", "Scope to one domain").option("--changed-only", "Only check assets modified since last commit").option("--strict", "Exit 1 on warnings (for CI)").action((opts) => {
8778
+ cmd.command("versions").description("Check version fields and flow version pins").option("--changed-only", "Only check assets modified since last commit").option("--strict", "Exit 1 on warnings (for CI)").action((opts) => {
9107
8779
  runVersionsCheck(opts);
9108
8780
  });
9109
- cmd.command("changelog").description("Check that modified domains have updated changelogs").option("--base <ref>", "Git base ref for diff", "HEAD").action((opts) => {
8781
+ cmd.command("changelog").description("Check that modified assets have an updated nearest CHANGELOG.md").option("--base <ref>", "Git base ref for diff", "HEAD").action((opts) => {
9110
8782
  let diffOutput;
9111
8783
  try {
9112
- diffOutput = execSync(`git diff --name-only ${opts.base}`, {
8784
+ diffOutput = execSync(`git diff --name-only --relative ${opts.base}`, {
9113
8785
  cwd: AI_RESOURCES,
9114
8786
  encoding: "utf-8"
9115
8787
  });
@@ -9119,32 +8791,17 @@ function makeValidateCommand() {
9119
8791
  return;
9120
8792
  }
9121
8793
  const modifiedFiles = diffOutput.trim().split("\n").filter(Boolean);
9122
- const assetPattern = /(SKILL\.md|agent\.yaml|\.flow\.yaml|\.prompt\.md)$/;
9123
- const modifiedAssets = modifiedFiles.filter((f) => assetPattern.test(f));
9124
- const modifiedDomains = /* @__PURE__ */ new Set();
9125
- for (const f of modifiedAssets) {
9126
- const parts = f.split("/");
9127
- if (parts.length >= 1 && !EXCLUDED_DOMAINS.has(parts[0])) {
9128
- modifiedDomains.add(parts[0]);
9129
- }
9130
- }
9131
- if (modifiedDomains.size === 0) {
8794
+ const { updated, stale, orphans } = checkChangelogUnits(modifiedFiles, AI_RESOURCES);
8795
+ if (updated.length + stale.length + orphans.length === 0) {
9132
8796
  logOk("No modified assets found");
9133
8797
  return;
9134
8798
  }
9135
- let errors = 0;
9136
- for (const domain of modifiedDomains) {
9137
- const changelogModified = modifiedFiles.some(
9138
- (f) => f === `${domain}/CHANGELOG.md` || f === path35__default.join(domain, "CHANGELOG.md")
9139
- );
9140
- if (changelogModified) {
9141
- logOk(`${domain}/CHANGELOG.md updated`);
9142
- } else {
9143
- logErr(`${domain}/CHANGELOG.md not updated (assets were modified)`);
9144
- errors++;
9145
- }
8799
+ for (const unit of updated) logOk(`${unit} updated`);
8800
+ for (const unit of stale) logErr(`${unit} not updated (assets were modified)`);
8801
+ for (const asset of orphans) {
8802
+ logErr(`${asset} \u2014 no CHANGELOG.md in any ancestor directory up to the asset root`);
9146
8803
  }
9147
- if (errors > 0) process.exit(1);
8804
+ if (stale.length + orphans.length > 0) process.exit(1);
9148
8805
  });
9149
8806
  return cmd;
9150
8807
  }
@@ -9241,7 +8898,7 @@ function whyEmptyMessage(ref, declared) {
9241
8898
  }
9242
8899
  function makeWhyCommand() {
9243
8900
  return new Command("why").description("Show why an asset is installed (dependency chain)").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
9244
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
8901
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
9245
8902
  const chain = am2.why(ref);
9246
8903
  if (chain.length === 0) {
9247
8904
  let declared;
@@ -9275,7 +8932,7 @@ function makeWhyCommand() {
9275
8932
  var _defaultFormatHelp = Help.prototype.formatHelp;
9276
8933
  var pkg = JSON.parse(
9277
8934
  readFileSync(
9278
- path35__default.resolve(path35__default.dirname(fileURLToPath(import.meta.url)), "../../package.json"),
8935
+ path34__default.resolve(path34__default.dirname(fileURLToPath(import.meta.url)), "../../package.json"),
9279
8936
  "utf-8"
9280
8937
  )
9281
8938
  );
@@ -9297,7 +8954,7 @@ Assets (skill, agent, prompt, flow, bundle, contract):
9297
8954
  add <ref> [--global] Add to skaile.yaml + deploy
9298
8955
  remove <ref> [--global] Remove from skaile.yaml + undeploy
9299
8956
  list [kind] List deployed assets
9300
- show Installed assets by domain with sync status
8957
+ show Installed assets by publisher with sync status
9301
8958
  show <kind> <name> Print raw asset content
9302
8959
  search [kind] [query] Search across all repos
9303
8960
  info <ref> Metadata, deps, deploy status
@@ -9345,7 +9002,7 @@ Execution:
9345
9002
  Validation:
9346
9003
  validate [path] Check manifest schemas + canonical asset names/refs
9347
9004
  validate versions Check asset version fields and flow pins
9348
- validate changelog Check changelogs for modified domains
9005
+ validate changelog Check each modified asset's nearest CHANGELOG.md was updated
9349
9006
 
9350
9007
  Sources (github repos of AI assets):
9351
9008
  source add <git-url> Clone + register a github source
@@ -9360,7 +9017,7 @@ Libraries (your authoring workspaces):
9360
9017
  library create <kind> <name> Scaffold a new asset in a library
9361
9018
  library list / show / status Library inspection
9362
9019
  library default <name> Set the default library
9363
- library domain / index Domains (publisher namespaces), re-index assets
9020
+ library index Re-index assets
9364
9021
  library rename / set / remove
9365
9022
  library commit / pull / push / propose / git Git ops (git backend only)
9366
9023
  library sync <name> Pull then push (as backend permits)
@@ -9397,7 +9054,7 @@ program.command("init [project-dir]").description("Initialize a project director
9397
9054
  (projectDir, opts) => runInit(projectDir, opts)
9398
9055
  );
9399
9056
  async function runInit(projectDir, opts) {
9400
- const { mkdirSync: mkdirSync5, writeFileSync: writeFileSync6 } = await import('fs');
9057
+ const { mkdirSync: mkdirSync4, writeFileSync: writeFileSync5 } = await import('fs');
9401
9058
  const { stringify: stringify2 } = await import('yaml');
9402
9059
  const { DRIVER_TARGETS, SUPPORTED_DRIVER_TARGETS: SUPPORTED_DRIVER_TARGETS2 } = await import('../core/index.js');
9403
9060
  const harness = opts.harness;
@@ -9406,33 +9063,33 @@ async function runInit(projectDir, opts) {
9406
9063
  process.exitCode = 1;
9407
9064
  return;
9408
9065
  }
9409
- const resolved = path35__default.resolve(projectDir ?? ".");
9410
- const projectName = path35__default.basename(resolved);
9066
+ const resolved = path34__default.resolve(projectDir ?? ".");
9067
+ const projectName = path34__default.basename(resolved);
9411
9068
  const created = [];
9412
9069
  const { existsSync: existsSync14 } = await import('fs');
9413
9070
  if (!existsSync14(resolved)) {
9414
- mkdirSync5(resolved, { recursive: true });
9071
+ mkdirSync4(resolved, { recursive: true });
9415
9072
  created.push(".");
9416
9073
  }
9417
- const skaileDir = path35__default.join(resolved, ".skaile");
9074
+ const skaileDir = path34__default.join(resolved, ".skaile");
9418
9075
  if (!existsSync14(skaileDir)) {
9419
- mkdirSync5(path35__default.join(skaileDir, "sessions"), { recursive: true });
9076
+ mkdirSync4(path34__default.join(skaileDir, "sessions"), { recursive: true });
9420
9077
  created.push(".skaile/");
9421
9078
  }
9422
- const settingsPath = path35__default.join(skaileDir, "settings.json");
9079
+ const settingsPath = path34__default.join(skaileDir, "settings.json");
9423
9080
  if (!existsSync14(settingsPath)) {
9424
- writeFileSync6(settingsPath, "{}\n");
9081
+ writeFileSync5(settingsPath, "{}\n");
9425
9082
  created.push(".skaile/settings.json");
9426
9083
  }
9427
- const wsConfigPath = path35__default.join(resolved, "skaile.yaml");
9084
+ const wsConfigPath = path34__default.join(resolved, "skaile.yaml");
9428
9085
  if (!existsSync14(wsConfigPath)) {
9429
- writeFileSync6(wsConfigPath, stringify2(buildInitWorkspaceConfig(projectName, harness)));
9086
+ writeFileSync5(wsConfigPath, stringify2(buildInitWorkspaceConfig(projectName, harness)));
9430
9087
  created.push("skaile.yaml");
9431
9088
  }
9432
9089
  for (const dir of new Set(Object.values(DRIVER_TARGETS[harness].local))) {
9433
- const full = path35__default.join(resolved, dir);
9090
+ const full = path34__default.join(resolved, dir);
9434
9091
  if (!existsSync14(full)) {
9435
- mkdirSync5(full, { recursive: true });
9092
+ mkdirSync4(full, { recursive: true });
9436
9093
  created.push(`${dir}/`);
9437
9094
  }
9438
9095
  }
@@ -9461,8 +9118,8 @@ function buildInitWorkspaceConfig(projectName, harness) {
9461
9118
  }
9462
9119
  async function initGitScaffold(resolved, created) {
9463
9120
  const { execSync: execSync3 } = await import('child_process');
9464
- const { existsSync: existsSync14, readFileSync: readFileSync10, writeFileSync: writeFileSync6 } = await import('fs');
9465
- const gitignorePath = path35__default.join(resolved, ".gitignore");
9121
+ const { existsSync: existsSync14, readFileSync: readFileSync9, writeFileSync: writeFileSync5 } = await import('fs');
9122
+ const gitignorePath = path34__default.join(resolved, ".gitignore");
9466
9123
  const entries = [
9467
9124
  "node_modules/",
9468
9125
  ".skaile/sessions/",
@@ -9479,16 +9136,16 @@ async function initGitScaffold(resolved, created) {
9479
9136
  ".env",
9480
9137
  ".env.local"
9481
9138
  ];
9482
- const existing = existsSync14(gitignorePath) ? readFileSync10(gitignorePath, "utf-8") : "";
9139
+ const existing = existsSync14(gitignorePath) ? readFileSync9(gitignorePath, "utf-8") : "";
9483
9140
  const have = new Set(existing.split("\n").map((l) => l.trim()));
9484
9141
  const append = entries.filter((e) => !have.has(e));
9485
9142
  if (append.length > 0) {
9486
9143
  const prefix = existing && !existing.endsWith("\n") ? "\n" : "";
9487
- writeFileSync6(gitignorePath, `${existing + prefix}${append.join("\n")}
9144
+ writeFileSync5(gitignorePath, `${existing + prefix}${append.join("\n")}
9488
9145
  `);
9489
9146
  if (!existing) created.push(".gitignore");
9490
9147
  }
9491
- if (!existsSync14(path35__default.join(resolved, ".git"))) {
9148
+ if (!existsSync14(path34__default.join(resolved, ".git"))) {
9492
9149
  try {
9493
9150
  execSync3("git init", { cwd: resolved, stdio: "pipe" });
9494
9151
  created.push(".git/");
@@ -9500,10 +9157,10 @@ async function initGitScaffold(resolved, created) {
9500
9157
  }
9501
9158
  async function bootstrapUserConfig() {
9502
9159
  try {
9503
- const fs12 = await import('fs');
9160
+ const fs11 = await import('fs');
9504
9161
  const { userConfigPath, saveConfig, getConfigDefaults } = await import('../library/index.js');
9505
9162
  const userCfgPath = userConfigPath();
9506
- if (!fs12.existsSync(userCfgPath)) {
9163
+ if (!fs11.existsSync(userCfgPath)) {
9507
9164
  const defaults = getConfigDefaults();
9508
9165
  saveConfig(userCfgPath, {
9509
9166
  catalog: { url: defaults.catalog.url, cache_ttl: defaults.catalog.cache_ttl }
@@ -9518,7 +9175,7 @@ async function bootstrapUserConfig() {
9518
9175
  }
9519
9176
  async function hydrateInitSources(resolved, created) {
9520
9177
  try {
9521
- const { ensureSourcesCloned } = await import('../ensure-sources-J5CDTQ36.js');
9178
+ const { ensureSourcesCloned } = await import('../ensure-sources-2XQS32WI.js');
9522
9179
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
9523
9180
  for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
9524
9181
  if (hydrate.failed.length > 0) {
@@ -9534,7 +9191,7 @@ function printInitSummary(resolved, projectDir, created) {
9534
9191
  logOk(`Initialized project at ${S.heading(resolved)}`);
9535
9192
  console.log();
9536
9193
  console.log(S.heading(" Next steps:"));
9537
- const isCurrentDir = resolved === path35__default.resolve(".");
9194
+ const isCurrentDir = resolved === path34__default.resolve(".");
9538
9195
  let step = 1;
9539
9196
  if (!isCurrentDir) {
9540
9197
  console.log(` ${S.dim(`${step}.`)} ${S.cmd(`cd ${projectDir}`)}`);
@@ -9558,7 +9215,7 @@ function printInitSummary(resolved, projectDir, created) {
9558
9215
  console.log();
9559
9216
  }
9560
9217
  program.command("setup").description("Interactive provider setup wizard").action(async () => {
9561
- const { cmdSetup } = await import('../setup-Q3LXY5AE.js');
9218
+ const { cmdSetup } = await import('../setup-JW2ZGCUG.js');
9562
9219
  await cmdSetup([], { projectDir: process.cwd() });
9563
9220
  });
9564
9221
  program.addCommand(makeInstallCommand());