@skaile/workspaces 5.12.0 → 5.14.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 (407) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/README.md +2 -2
  3. package/dist/app-sdk/index.js +1 -1
  4. package/dist/{asset-feeds-AM6PSSGM.js → asset-feeds-PAOX3FUT.js} +20 -20
  5. package/dist/{asset-feeds-AM6PSSGM.js.map → asset-feeds-PAOX3FUT.js.map} +1 -1
  6. package/dist/asset-manager/catalog-deployer.js +9 -9
  7. package/dist/asset-manager/index.js +15 -15
  8. package/dist/asset-manager/installer.js +11 -11
  9. package/dist/asset-manager/renderers.js +10 -10
  10. package/dist/asset-manager/src/index.d.ts +53 -10
  11. package/dist/asset-manager/src/index.d.ts.map +1 -1
  12. package/dist/asset-manager/src/installer.d.ts +0 -10
  13. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  14. package/dist/bridge/drivers/claude-sdk.js +155 -18
  15. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  16. package/dist/bridge/drivers/codex.js +73 -27
  17. package/dist/bridge/drivers/codex.js.map +1 -1
  18. package/dist/bridge/drivers/continue.js +12 -11
  19. package/dist/bridge/drivers/continue.js.map +1 -1
  20. package/dist/bridge/drivers/echo.js +4 -3
  21. package/dist/bridge/drivers/echo.js.map +1 -1
  22. package/dist/bridge/drivers/gemini.js +7 -6
  23. package/dist/bridge/drivers/goose.js +12 -11
  24. package/dist/bridge/drivers/goose.js.map +1 -1
  25. package/dist/bridge/drivers/omp.js +105 -29
  26. package/dist/bridge/drivers/omp.js.map +1 -1
  27. package/dist/bridge/drivers/opencode.js +12 -11
  28. package/dist/bridge/drivers/opencode.js.map +1 -1
  29. package/dist/bridge/drivers/qwen.js +7 -6
  30. package/dist/bridge/drivers/qwen.js.map +1 -1
  31. package/dist/bridge/index.js +16 -15
  32. package/dist/bridge/src/codex/config-toml.d.ts +8 -0
  33. package/dist/bridge/src/codex/config-toml.d.ts.map +1 -1
  34. package/dist/bridge/src/drivers/claude-sdk.d.ts +2 -0
  35. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  36. package/dist/bridge/src/drivers/claude-self-turns.d.ts +72 -0
  37. package/dist/bridge/src/drivers/claude-self-turns.d.ts.map +1 -0
  38. package/dist/bridge/src/drivers/codex.d.ts +6 -0
  39. package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
  40. package/dist/bridge/src/drivers/omp-models-yml.d.ts +32 -0
  41. package/dist/bridge/src/drivers/omp-models-yml.d.ts.map +1 -1
  42. package/dist/bridge/src/drivers/omp.d.ts +20 -6
  43. package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
  44. package/dist/bridge/src/normalizer.d.ts.map +1 -1
  45. package/dist/bridge/src/types.d.ts +12 -0
  46. package/dist/bridge/src/types.d.ts.map +1 -1
  47. package/dist/{chunk-QCEKGYHF.js → chunk-2BIESC6S.js} +3 -3
  48. package/dist/{chunk-QCEKGYHF.js.map → chunk-2BIESC6S.js.map} +1 -1
  49. package/dist/{chunk-P23WJCH2.js → chunk-3NNL334S.js} +23 -18
  50. package/dist/chunk-3NNL334S.js.map +1 -0
  51. package/dist/{chunk-6VLHITAM.js → chunk-57SF6W6E.js} +4 -3
  52. package/dist/chunk-57SF6W6E.js.map +1 -0
  53. package/dist/{chunk-GWD3QNVS.js → chunk-5IMGZAKH.js} +5 -5
  54. package/dist/{chunk-GWD3QNVS.js.map → chunk-5IMGZAKH.js.map} +1 -1
  55. package/dist/{chunk-NDF24LYP.js → chunk-5NVDOEWX.js} +15 -7
  56. package/dist/chunk-5NVDOEWX.js.map +1 -0
  57. package/dist/{chunk-3HUV2LJF.js → chunk-6JKIOPT3.js} +4 -4
  58. package/dist/{chunk-3HUV2LJF.js.map → chunk-6JKIOPT3.js.map} +1 -1
  59. package/dist/{chunk-MF54ZHWT.js → chunk-6VIVUBNN.js} +4 -271
  60. package/dist/chunk-6VIVUBNN.js.map +1 -0
  61. package/dist/{chunk-2X3JBVGD.js → chunk-7LGNJJ76.js} +18 -9
  62. package/dist/chunk-7LGNJJ76.js.map +1 -0
  63. package/dist/chunk-BASMWKPM.js +649 -0
  64. package/dist/chunk-BASMWKPM.js.map +1 -0
  65. package/dist/{chunk-PNOGX36L.js → chunk-CAPKENNF.js} +92 -26
  66. package/dist/chunk-CAPKENNF.js.map +1 -0
  67. package/dist/{chunk-7QWQTA5S.js → chunk-CNZI37HV.js} +4 -4
  68. package/dist/{chunk-7QWQTA5S.js.map → chunk-CNZI37HV.js.map} +1 -1
  69. package/dist/{chunk-PMECEZK3.js → chunk-D54T2F54.js} +5 -4
  70. package/dist/chunk-D54T2F54.js.map +1 -0
  71. package/dist/{chunk-F4NJDSR7.js → chunk-D5WTOVLG.js} +7 -4
  72. package/dist/chunk-D5WTOVLG.js.map +1 -0
  73. package/dist/{chunk-XZY6SBGU.js → chunk-DHUJRIQQ.js} +3 -3
  74. package/dist/{chunk-XZY6SBGU.js.map → chunk-DHUJRIQQ.js.map} +1 -1
  75. package/dist/chunk-DWRYUWOK.js +273 -0
  76. package/dist/chunk-DWRYUWOK.js.map +1 -0
  77. package/dist/{chunk-NJV5SLEK.js → chunk-FD2IPIE2.js} +46 -46
  78. package/dist/chunk-FD2IPIE2.js.map +1 -0
  79. package/dist/{chunk-POQ6PGNE.js → chunk-GJGEDWRT.js} +22 -6
  80. package/dist/chunk-GJGEDWRT.js.map +1 -0
  81. package/dist/{chunk-CPSIPIX7.js → chunk-IG5LZ3WU.js} +8 -6
  82. package/dist/chunk-IG5LZ3WU.js.map +1 -0
  83. package/dist/{chunk-3LVB3HGH.js → chunk-IPN7N2AZ.js} +3 -3
  84. package/dist/{chunk-3LVB3HGH.js.map → chunk-IPN7N2AZ.js.map} +1 -1
  85. package/dist/{chunk-NGJIVDDD.js → chunk-IQVZIVSA.js} +3 -3
  86. package/dist/{chunk-NGJIVDDD.js.map → chunk-IQVZIVSA.js.map} +1 -1
  87. package/dist/{chunk-CTP3XBMF.js → chunk-IY5E7Y5W.js} +57 -7
  88. package/dist/chunk-IY5E7Y5W.js.map +1 -0
  89. package/dist/{chunk-PNTXHTBC.js → chunk-J4OYIYFQ.js} +2 -2
  90. package/dist/{chunk-PNTXHTBC.js.map → chunk-J4OYIYFQ.js.map} +1 -1
  91. package/dist/{chunk-XTVSNWLL.js → chunk-M3P4BYRK.js} +34 -11
  92. package/dist/chunk-M3P4BYRK.js.map +1 -0
  93. package/dist/{chunk-X6LKA3TJ.js → chunk-MCLT3BJG.js} +6 -6
  94. package/dist/{chunk-X6LKA3TJ.js.map → chunk-MCLT3BJG.js.map} +1 -1
  95. package/dist/{chunk-7CR2OZPA.js → chunk-NVO6WECE.js} +9 -8
  96. package/dist/chunk-NVO6WECE.js.map +1 -0
  97. package/dist/chunk-O3Q3MOAV.js +64 -0
  98. package/dist/chunk-O3Q3MOAV.js.map +1 -0
  99. package/dist/{chunk-C3BMXXTN.js → chunk-ODQGLELI.js} +68 -24
  100. package/dist/chunk-ODQGLELI.js.map +1 -0
  101. package/dist/chunk-OKQXY6FS.js +1336 -0
  102. package/dist/chunk-OKQXY6FS.js.map +1 -0
  103. package/dist/{chunk-T5TSLSRO.js → chunk-OX2W5YF3.js} +8 -8
  104. package/dist/{chunk-T5TSLSRO.js.map → chunk-OX2W5YF3.js.map} +1 -1
  105. package/dist/{chunk-N5M2EISA.js → chunk-PAUM35HD.js} +250 -71
  106. package/dist/chunk-PAUM35HD.js.map +1 -0
  107. package/dist/{chunk-YQU2BPQD.js → chunk-PGVSOHWE.js} +2 -2
  108. package/dist/{chunk-YQU2BPQD.js.map → chunk-PGVSOHWE.js.map} +1 -1
  109. package/dist/{chunk-WI4T3KIS.js → chunk-PUG7IWFF.js} +130 -23
  110. package/dist/chunk-PUG7IWFF.js.map +1 -0
  111. package/dist/{chunk-2H73V6XR.js → chunk-PW3TYWOI.js} +3 -3
  112. package/dist/{chunk-2H73V6XR.js.map → chunk-PW3TYWOI.js.map} +1 -1
  113. package/dist/{chunk-UTKENBB6.js → chunk-PXDWTJ3P.js} +4 -4
  114. package/dist/{chunk-UTKENBB6.js.map → chunk-PXDWTJ3P.js.map} +1 -1
  115. package/dist/{chunk-TVAR4JHA.js → chunk-QAYL3PYY.js} +320 -51
  116. package/dist/chunk-QAYL3PYY.js.map +1 -0
  117. package/dist/{chunk-7XWUJC3A.js → chunk-QELQDY5K.js} +3 -3
  118. package/dist/{chunk-7XWUJC3A.js.map → chunk-QELQDY5K.js.map} +1 -1
  119. package/dist/{chunk-VRLKHL74.js → chunk-S6FZUR5H.js} +7 -6
  120. package/dist/chunk-S6FZUR5H.js.map +1 -0
  121. package/dist/{chunk-SHQMPGOL.js → chunk-TYUJPQNX.js} +10 -5
  122. package/dist/chunk-TYUJPQNX.js.map +1 -0
  123. package/dist/chunk-U27JRO5L.js +13 -0
  124. package/dist/chunk-U27JRO5L.js.map +1 -0
  125. package/dist/{chunk-ICIYSJBQ.js → chunk-UK3LRPJ5.js} +15 -7
  126. package/dist/chunk-UK3LRPJ5.js.map +1 -0
  127. package/dist/{chunk-KVSDRB35.js → chunk-UQ4SQOR6.js} +5 -5
  128. package/dist/{chunk-KVSDRB35.js.map → chunk-UQ4SQOR6.js.map} +1 -1
  129. package/dist/{chunk-G3X4MLDB.js → chunk-USHB5KEY.js} +3 -3
  130. package/dist/{chunk-G3X4MLDB.js.map → chunk-USHB5KEY.js.map} +1 -1
  131. package/dist/{chunk-HYMERG57.js → chunk-V7AWO5FL.js} +3 -3
  132. package/dist/{chunk-HYMERG57.js.map → chunk-V7AWO5FL.js.map} +1 -1
  133. package/dist/chunk-VTG5Z3KD.js +345 -0
  134. package/dist/chunk-VTG5Z3KD.js.map +1 -0
  135. package/dist/{chunk-27L6BBAT.js → chunk-VTXXBYB3.js} +10 -10
  136. package/dist/{chunk-27L6BBAT.js.map → chunk-VTXXBYB3.js.map} +1 -1
  137. package/dist/{chunk-XMAJJPA4.js → chunk-WTEYDNTR.js} +3 -3
  138. package/dist/{chunk-XMAJJPA4.js.map → chunk-WTEYDNTR.js.map} +1 -1
  139. package/dist/{chunk-NJXR5OAM.js → chunk-YFIHFJEB.js} +4 -4
  140. package/dist/{chunk-NJXR5OAM.js.map → chunk-YFIHFJEB.js.map} +1 -1
  141. package/dist/{chunk-VMKMFS2Q.js → chunk-YIDZJHY6.js} +3 -3
  142. package/dist/{chunk-VMKMFS2Q.js.map → chunk-YIDZJHY6.js.map} +1 -1
  143. package/dist/{chunk-2JFIFDDO.js → chunk-YTZFSKWL.js} +3 -3
  144. package/dist/{chunk-2JFIFDDO.js.map → chunk-YTZFSKWL.js.map} +1 -1
  145. package/dist/{chunk-SMT3LNAG.js → chunk-ZBD6EITA.js} +4 -4
  146. package/dist/{chunk-SMT3LNAG.js.map → chunk-ZBD6EITA.js.map} +1 -1
  147. package/dist/{chunk-JQ3DXNQV.js → chunk-ZDTZGEJG.js} +6 -6
  148. package/dist/{chunk-JQ3DXNQV.js.map → chunk-ZDTZGEJG.js.map} +1 -1
  149. package/dist/{chunk-X4BAYGMT.js → chunk-ZIW34FGO.js} +3 -3
  150. package/dist/{chunk-X4BAYGMT.js.map → chunk-ZIW34FGO.js.map} +1 -1
  151. package/dist/{chunk-DCHQ6BAZ.js → chunk-ZU24LWBI.js} +3 -3
  152. package/dist/{chunk-DCHQ6BAZ.js.map → chunk-ZU24LWBI.js.map} +1 -1
  153. package/dist/cli/index.js +493 -232
  154. package/dist/cli/index.js.map +1 -1
  155. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  156. package/dist/cli/src/commands/catalog-cmd.d.ts.map +1 -1
  157. package/dist/cli/src/commands/catalog.d.ts +2 -0
  158. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  159. package/dist/cli/src/commands/diff.d.ts +1 -1
  160. package/dist/cli/src/commands/diff.d.ts.map +1 -1
  161. package/dist/cli/src/commands/integration.d.ts.map +1 -1
  162. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  163. package/dist/cli/src/commands/library-index.d.ts +10 -0
  164. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  165. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  166. package/dist/cli/src/commands/plugin/claude-code.d.ts.map +1 -1
  167. package/dist/cli/src/commands/plugin/types.d.ts +2 -0
  168. package/dist/cli/src/commands/plugin/types.d.ts.map +1 -1
  169. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
  170. package/dist/cli/src/commands/preset-apply.d.ts.map +1 -1
  171. package/dist/cli/src/commands/project.d.ts +8 -0
  172. package/dist/cli/src/commands/project.d.ts.map +1 -1
  173. package/dist/cli/src/commands/run.d.ts +9 -0
  174. package/dist/cli/src/commands/run.d.ts.map +1 -1
  175. package/dist/cli/src/commands/serve-preflight.d.ts +2 -1
  176. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  177. package/dist/cli/src/commands/serve.d.ts +7 -0
  178. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  179. package/dist/cli/src/commands/source-manifest.d.ts +1 -0
  180. package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
  181. package/dist/cli/src/commands/source.d.ts +9 -1
  182. package/dist/cli/src/commands/source.d.ts.map +1 -1
  183. package/dist/cli/src/commands/store.d.ts.map +1 -1
  184. package/dist/cli/src/commands/update.d.ts.map +1 -1
  185. package/dist/cli/src/commands/validate-instances.d.ts.map +1 -1
  186. package/dist/cli/src/commands/validate.d.ts +3 -2
  187. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  188. package/dist/cli/src/driver-error.d.ts +7 -0
  189. package/dist/cli/src/driver-error.d.ts.map +1 -1
  190. package/dist/cli/src/helpers.d.ts +6 -0
  191. package/dist/cli/src/helpers.d.ts.map +1 -1
  192. package/dist/cli/src/plugin-store/index.d.ts +1 -1
  193. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  194. package/dist/cli/src/plugin-store/reconcile.d.ts +24 -4
  195. package/dist/cli/src/plugin-store/reconcile.d.ts.map +1 -1
  196. package/dist/cli/src/skill-checks.d.ts +15 -4
  197. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  198. package/dist/cli/src/store-addable.d.ts +7 -8
  199. package/dist/cli/src/store-addable.d.ts.map +1 -1
  200. package/dist/connectors/config.js +6 -6
  201. package/dist/connectors/index.js +20 -19
  202. package/dist/connectors/src/config.d.ts.map +1 -1
  203. package/dist/{connectors-UNKUKEPG.js → connectors-2TEGRRYC.js} +23 -22
  204. package/dist/{connectors-UNKUKEPG.js.map → connectors-2TEGRRYC.js.map} +1 -1
  205. package/dist/connectors-shared/index.js +2 -2
  206. package/dist/core/driver-targets.js +1 -1
  207. package/dist/core/index.js +8 -8
  208. package/dist/core/manifest.js +2 -2
  209. package/dist/core/models.js +1 -1
  210. package/dist/core/publish-manifest.js +4 -2
  211. package/dist/core/ref.js +1 -1
  212. package/dist/core/runtime-assets.js +6 -6
  213. package/dist/core/src/agent-instances.d.ts +5 -0
  214. package/dist/core/src/agent-instances.d.ts.map +1 -1
  215. package/dist/core/src/driver-targets.d.ts.map +1 -1
  216. package/dist/core/src/index.d.ts +2 -2
  217. package/dist/core/src/index.d.ts.map +1 -1
  218. package/dist/core/src/manifest.d.ts +9 -3
  219. package/dist/core/src/manifest.d.ts.map +1 -1
  220. package/dist/core/src/models.d.ts +8 -0
  221. package/dist/core/src/models.d.ts.map +1 -1
  222. package/dist/core/src/publish-manifest.d.ts +38 -1
  223. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  224. package/dist/core/src/repo-manager.d.ts +8 -3
  225. package/dist/core/src/repo-manager.d.ts.map +1 -1
  226. package/dist/core/src/runtime-assets.d.ts.map +1 -1
  227. package/dist/core/src/store.d.ts +4 -0
  228. package/dist/core/src/store.d.ts.map +1 -1
  229. package/dist/core/src/walker.d.ts +2 -0
  230. package/dist/core/src/walker.d.ts.map +1 -1
  231. package/dist/core/src/workspace-config.d.ts +40 -2
  232. package/dist/core/src/workspace-config.d.ts.map +1 -1
  233. package/dist/core/store.js +2 -2
  234. package/dist/core/workspace-config.js +5 -5
  235. package/dist/deploy/index.js +8 -8
  236. package/dist/discovery/index.js +5 -5
  237. package/dist/discovery/src/parse-manifest.d.ts.map +1 -1
  238. package/dist/discovery/src/source-config.d.ts +5 -3
  239. package/dist/discovery/src/source-config.d.ts.map +1 -1
  240. package/dist/{ensure-sources-POMEQSTM.js → ensure-sources-EG7YKKZL.js} +18 -18
  241. package/dist/{ensure-sources-POMEQSTM.js.map → ensure-sources-EG7YKKZL.js.map} +1 -1
  242. package/dist/factory-assets/README.md +1 -1
  243. package/dist/factory-assets/connectors/box.js +20 -19
  244. package/dist/factory-assets/connectors/deploy.js +20 -19
  245. package/dist/factory-assets/connectors/devserver.js +20 -19
  246. package/dist/factory-assets/connectors/flow/adapter.js +20 -19
  247. package/dist/factory-assets/connectors/flow/engine.js +9 -9
  248. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  249. package/dist/factory-assets/connectors/flow/run-flow.js +22 -21
  250. package/dist/factory-assets/connectors/flow.js +20 -19
  251. package/dist/factory-assets/connectors/git.js +20 -19
  252. package/dist/factory-assets/connectors/gmail.js +20 -19
  253. package/dist/factory-assets/connectors/googledrive.js +20 -19
  254. package/dist/factory-assets/connectors/local.js +20 -19
  255. package/dist/factory-assets/connectors/mattermost.js +20 -19
  256. package/dist/factory-assets/connectors/memory.js +20 -19
  257. package/dist/factory-assets/connectors/minio.js +20 -19
  258. package/dist/factory-assets/connectors/postgres.js +20 -19
  259. package/dist/factory-assets/connectors/s3.js +20 -19
  260. package/dist/factory-assets/connectors/sharepoint.js +20 -19
  261. package/dist/factory-assets/connectors/sqlite.js +20 -19
  262. package/dist/factory-assets/connectors/static-server.js +20 -19
  263. package/dist/factory-assets/connectors/tunnel.js +20 -19
  264. package/dist/factory-assets/connectors/webdav.js +20 -19
  265. package/dist/factory-assets/connectors/xstate-store.js +20 -19
  266. package/dist/factory-assets/connectors/xstate.js +20 -19
  267. package/dist/{flows-DVKMZKM4.js → flows-5TW3XFMH.js} +13 -13
  268. package/dist/{flows-DVKMZKM4.js.map → flows-5TW3XFMH.js.map} +1 -1
  269. package/dist/{helpers-Y4OT7VIS.js → helpers-BQGXEKRP.js} +18 -18
  270. package/dist/{helpers-Y4OT7VIS.js.map → helpers-BQGXEKRP.js.map} +1 -1
  271. package/dist/library/index.js +12 -12
  272. package/dist/library/install.js +5 -3
  273. package/dist/library/src/local/local-catalog-source.d.ts +6 -0
  274. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  275. package/dist/library/src/manifest-writer.d.ts +1 -1
  276. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  277. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  278. package/dist/library/src/user-library.d.ts +2 -0
  279. package/dist/library/src/user-library.d.ts.map +1 -1
  280. package/dist/{library-publish-DI4Q5UOG.js → library-publish-EUP524PE.js} +28 -25
  281. package/dist/library-publish-EUP524PE.js.map +1 -0
  282. package/dist/model-endpoint/index.d.ts +2 -0
  283. package/dist/model-endpoint/index.js +9 -0
  284. package/dist/model-endpoint/index.js.map +1 -0
  285. package/dist/model-endpoint/src/index.d.ts +4 -0
  286. package/dist/model-endpoint/src/index.d.ts.map +1 -0
  287. package/dist/model-endpoint/src/openai-chat.d.ts +105 -0
  288. package/dist/model-endpoint/src/openai-chat.d.ts.map +1 -0
  289. package/dist/model-endpoint/src/openai-responses.d.ts +106 -0
  290. package/dist/model-endpoint/src/openai-responses.d.ts.map +1 -0
  291. package/dist/model-endpoint/src/openai-shared.d.ts +77 -0
  292. package/dist/model-endpoint/src/openai-shared.d.ts.map +1 -0
  293. package/dist/model-endpoint/src/resolve.d.ts +36 -0
  294. package/dist/model-endpoint/src/resolve.d.ts.map +1 -0
  295. package/dist/model-endpoint/src/server.d.ts +16 -0
  296. package/dist/model-endpoint/src/server.d.ts.map +1 -0
  297. package/dist/model-endpoint/src/types.d.ts +78 -0
  298. package/dist/model-endpoint/src/types.d.ts.map +1 -0
  299. package/dist/open-library-QNMIMZYS.js +40 -0
  300. package/dist/{open-library-N6ESO6IK.js.map → open-library-QNMIMZYS.js.map} +1 -1
  301. package/dist/open-registry-BOUCBDLF.js +32 -0
  302. package/dist/{open-registry-CBZ5MWTT.js.map → open-registry-BOUCBDLF.js.map} +1 -1
  303. package/dist/paths-B6SX6J6T.js +22 -0
  304. package/dist/{paths-U6W6MQNQ.js.map → paths-B6SX6J6T.js.map} +1 -1
  305. package/dist/{plugin-store-XMZSPVBF.js → plugin-store-MLFP3WJ7.js} +62 -20
  306. package/dist/plugin-store-MLFP3WJ7.js.map +1 -0
  307. package/dist/plugins/src/catalog-source.d.ts +6 -0
  308. package/dist/plugins/src/catalog-source.d.ts.map +1 -1
  309. package/dist/project-GXCIEJGM.js +82 -0
  310. package/dist/{project-UP52HEHC.js.map → project-GXCIEJGM.js.map} +1 -1
  311. package/dist/resolver/index.js +9 -9
  312. package/dist/runner/index.js +35 -32
  313. package/dist/runner/src/agent.d.ts.map +1 -1
  314. package/dist/runner/src/composition/index.d.ts +1 -1
  315. package/dist/runner/src/composition/index.d.ts.map +1 -1
  316. package/dist/runner/src/composition/prompt-sections.d.ts +18 -6
  317. package/dist/runner/src/composition/prompt-sections.d.ts.map +1 -1
  318. package/dist/runner/src/model-endpoint-discovery.d.ts +64 -0
  319. package/dist/runner/src/model-endpoint-discovery.d.ts.map +1 -0
  320. package/dist/runner/src/serve.d.ts +6 -0
  321. package/dist/runner/src/serve.d.ts.map +1 -1
  322. package/dist/runner/src/session-builder.d.ts +8 -0
  323. package/dist/runner/src/session-builder.d.ts.map +1 -1
  324. package/dist/runner/src/session.d.ts +2 -0
  325. package/dist/runner/src/session.d.ts.map +1 -1
  326. package/dist/runner/src/ws-auth-warning.d.ts +17 -0
  327. package/dist/runner/src/ws-auth-warning.d.ts.map +1 -0
  328. package/dist/sdk/asset-manager.js +15 -15
  329. package/dist/sdk/bridge.js +16 -15
  330. package/dist/sdk/core.js +8 -8
  331. package/dist/sdk/flow.js +9 -9
  332. package/dist/sdk/index.js +35 -32
  333. package/dist/sdk/index.js.map +1 -1
  334. package/dist/sdk/resolver.js +9 -9
  335. package/dist/sdk/runner.js +35 -32
  336. package/dist/sdk/session.js +2 -2
  337. package/dist/sdk/types.js +1 -1
  338. package/dist/serve-preflight-GNBW3O4U.js +64 -0
  339. package/dist/serve-preflight-GNBW3O4U.js.map +1 -0
  340. package/dist/session/index.js +2 -2
  341. package/dist/{setup-5IRUH5OS.js → setup-HJEYEXLS.js} +26 -25
  342. package/dist/setup-HJEYEXLS.js.map +1 -0
  343. package/dist/skills-4WMYGJDL.js +26 -0
  344. package/dist/{skills-HA36RFNM.js.map → skills-4WMYGJDL.js.map} +1 -1
  345. package/dist/source-5VL6PHER.js +42 -0
  346. package/dist/{source-DX5SGWEI.js.map → source-5VL6PHER.js.map} +1 -1
  347. package/dist/{source-manifest-publish-NMRLXWVW.js → source-manifest-publish-Q66H7EJI.js} +25 -24
  348. package/dist/source-manifest-publish-Q66H7EJI.js.map +1 -0
  349. package/dist/tui/index.js +52 -39
  350. package/dist/tui/index.js.map +1 -1
  351. package/dist/tui/src/repl.d.ts.map +1 -1
  352. package/dist/types/index.js +1 -1
  353. package/dist/types/manifests.js +1 -1
  354. package/dist/types/src/delivery.d.ts.map +1 -1
  355. package/dist/types/src/events.d.ts +55 -1
  356. package/dist/types/src/events.d.ts.map +1 -1
  357. package/dist/types/src/index.d.ts +1 -1
  358. package/dist/types/src/index.d.ts.map +1 -1
  359. package/dist/types/src/lifecycle.d.ts +2 -1
  360. package/dist/types/src/lifecycle.d.ts.map +1 -1
  361. package/dist/types/src/manifests/preset.d.ts +6 -1
  362. package/dist/types/src/manifests/preset.d.ts.map +1 -1
  363. package/dist/types/src/version.d.ts +11 -1
  364. package/dist/types/src/version.d.ts.map +1 -1
  365. package/dist/workspace-plugin/adapters/mcp.js +27 -26
  366. package/dist/workspace-plugin/adapters/omp.js +14 -14
  367. package/dist/workspace-plugin/index.js +1 -1
  368. package/package.json +12 -1
  369. package/dist/chunk-2X3JBVGD.js.map +0 -1
  370. package/dist/chunk-6VLHITAM.js.map +0 -1
  371. package/dist/chunk-7CR2OZPA.js.map +0 -1
  372. package/dist/chunk-C3BMXXTN.js.map +0 -1
  373. package/dist/chunk-CPSIPIX7.js.map +0 -1
  374. package/dist/chunk-CTP3XBMF.js.map +0 -1
  375. package/dist/chunk-F4NJDSR7.js.map +0 -1
  376. package/dist/chunk-ICIYSJBQ.js.map +0 -1
  377. package/dist/chunk-ID745F3R.js +0 -625
  378. package/dist/chunk-ID745F3R.js.map +0 -1
  379. package/dist/chunk-K4VOEYOR.js +0 -21
  380. package/dist/chunk-K4VOEYOR.js.map +0 -1
  381. package/dist/chunk-MF54ZHWT.js.map +0 -1
  382. package/dist/chunk-N5M2EISA.js.map +0 -1
  383. package/dist/chunk-NDF24LYP.js.map +0 -1
  384. package/dist/chunk-NJV5SLEK.js.map +0 -1
  385. package/dist/chunk-NR7H7ZJP.js +0 -400
  386. package/dist/chunk-NR7H7ZJP.js.map +0 -1
  387. package/dist/chunk-P23WJCH2.js.map +0 -1
  388. package/dist/chunk-PMECEZK3.js.map +0 -1
  389. package/dist/chunk-PNOGX36L.js.map +0 -1
  390. package/dist/chunk-POQ6PGNE.js.map +0 -1
  391. package/dist/chunk-SHQMPGOL.js.map +0 -1
  392. package/dist/chunk-TVAR4JHA.js.map +0 -1
  393. package/dist/chunk-VRLKHL74.js.map +0 -1
  394. package/dist/chunk-WI4T3KIS.js.map +0 -1
  395. package/dist/chunk-XTVSNWLL.js.map +0 -1
  396. package/dist/library-publish-DI4Q5UOG.js.map +0 -1
  397. package/dist/open-library-N6ESO6IK.js +0 -40
  398. package/dist/open-registry-CBZ5MWTT.js +0 -32
  399. package/dist/paths-U6W6MQNQ.js +0 -22
  400. package/dist/plugin-store-XMZSPVBF.js.map +0 -1
  401. package/dist/project-UP52HEHC.js +0 -79
  402. package/dist/serve-preflight-6P2JJEJ3.js +0 -47
  403. package/dist/serve-preflight-6P2JJEJ3.js.map +0 -1
  404. package/dist/setup-5IRUH5OS.js.map +0 -1
  405. package/dist/skills-HA36RFNM.js +0 -26
  406. package/dist/source-DX5SGWEI.js +0 -41
  407. package/dist/source-manifest-publish-NMRLXWVW.js.map +0 -1
@@ -1,625 +0,0 @@
1
- import { getStoreIdentity, refFor } from './chunk-NR7H7ZJP.js';
2
- import { openLibrary } from './chunk-JQ3DXNQV.js';
3
- import { logErr, logWarn } from './chunk-POQ6PGNE.js';
4
- import { getKindRegistry } from './chunk-GWD3QNVS.js';
5
- import { parseFlowDefinition } from './chunk-X3RMRJNR.js';
6
- import { stampManifestPublisher, upsertManifestAsset, resolveIndexPath, LocalIndex } from './chunk-C3BMXXTN.js';
7
- import { SEMVER_RE, parseManifestFile, requiresSyntaxErrors } from './chunk-7CR2OZPA.js';
8
- import { composeRefTarget, SKILL_DESCRIPTION_PLACEHOLDER_PREFIX, PRESET_DESCRIPTION_PLACEHOLDER, PRESET_ITEM_PLACEHOLDER_REF, SKILL_BODY_PLACEHOLDER, CONTRACT_BODY_PLACEHOLDER, PROMPT_BODY_PLACEHOLDER, AGENT_BODY_PLACEHOLDER } from './chunk-6VLHITAM.js';
9
- import { checkAgentSkillConformance } from './chunk-T5TSLSRO.js';
10
- import { matchPin } from './chunk-PNOGX36L.js';
11
- import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest } from './chunk-CTP3XBMF.js';
12
- import { parseFrontmatter } from './chunk-XTVSNWLL.js';
13
- import { parseDep, isValidPublisher, slugifyAssetName, parseAssetRef, isValidAssetName, ASSET_NAME_HINT, PUBLISHER_HINT } from './chunk-PNTXHTBC.js';
14
- import * as fs3 from 'fs';
15
- import * as path3 from 'path';
16
- import { Option } from 'commander';
17
- import { parse, stringify } from 'yaml';
18
-
19
- var error = (text) => ({ tag: "agent", text, conformance: false });
20
- function isInside(parent, child) {
21
- const rel = path3.relative(parent, child);
22
- return rel === "" || !rel.startsWith("..") && !path3.isAbsolute(rel);
23
- }
24
- function records(value) {
25
- return Array.isArray(value) ? value.filter((v) => v !== null && typeof v === "object") : [];
26
- }
27
- function checkAgentFiles(parsed, agentDir, libraryRoot) {
28
- const out = [];
29
- records(parsed.composes).forEach((item, i) => {
30
- if (typeof item.kind !== "string" || typeof item.ref !== "string") return;
31
- const target = composeRefTarget({ kind: item.kind, ref: item.ref });
32
- if (target?.type !== "local") return;
33
- const where = `composes[${i}].ref`;
34
- const resolved = path3.resolve(agentDir, target.path);
35
- if (!fs3.existsSync(resolved)) {
36
- out.push(
37
- error(`${where}: local path "${item.ref}" does not exist (resolved from ${agentDir})`)
38
- );
39
- return;
40
- }
41
- if (!isInside(libraryRoot, resolved)) {
42
- out.push(
43
- error(`${where}: local path "${item.ref}" leaves the library and cannot be published`)
44
- );
45
- return;
46
- }
47
- const ownManifests = [
48
- agentDir,
49
- path3.join(agentDir, "agent.yaml"),
50
- path3.join(agentDir, "AGENT.md")
51
- ];
52
- if (item.kind === "agent" && ownManifests.includes(resolved)) {
53
- out.push(
54
- error(
55
- `${where}: agent composes itself (${item.ref}); an agent cannot be its own sub-agent`
56
- )
57
- );
58
- }
59
- });
60
- const blocks = records(
61
- parsed.memory !== null && typeof parsed.memory === "object" ? parsed.memory.blocks : void 0
62
- );
63
- blocks.forEach((block, i) => {
64
- if (typeof block.source !== "string" || block.source === "") return;
65
- const where = `memory.blocks[${i}].source`;
66
- const resolved = path3.resolve(agentDir, block.source);
67
- if (!isInside(agentDir, resolved)) {
68
- out.push(error(`${where}: "${block.source}" leaves the agent directory`));
69
- return;
70
- }
71
- let stat;
72
- try {
73
- stat = fs3.statSync(resolved);
74
- } catch {
75
- out.push(error(`${where}: file "${block.source}" does not exist in ${agentDir}`));
76
- return;
77
- }
78
- if (!stat.isFile()) {
79
- out.push(error(`${where}: "${block.source}" is not a file`));
80
- return;
81
- }
82
- const max = block.max_chars;
83
- if (typeof max !== "number") return;
84
- const length = [...fs3.readFileSync(resolved, "utf-8").trim()].length;
85
- if (length > max) {
86
- out.push(
87
- error(
88
- `${where}: "${block.source}" holds ${length} characters, more than memory block "${String(block.name)}" max_chars ${max}`
89
- )
90
- );
91
- }
92
- });
93
- return out;
94
- }
95
- function agentComposeRefAdvisories(parsed, hasAsset, libraryPublisher) {
96
- const out = [];
97
- records(parsed.composes).forEach((item, i) => {
98
- if (typeof item.kind !== "string" || typeof item.ref !== "string") return;
99
- const target = composeRefTarget({ kind: item.kind, ref: item.ref });
100
- if (target?.type !== "asset" || target.kind === "soul") return;
101
- if (target.publisher !== void 0 && libraryPublisher !== void 0 && target.publisher !== libraryPublisher) {
102
- return;
103
- }
104
- if (target.publisher !== void 0 && libraryPublisher === void 0) return;
105
- if (hasAsset(target.kind, target.name)) return;
106
- out.push({
107
- tag: "agent",
108
- text: `composes[${i}].ref: ${item.ref} is not in this library; \`skaile add\` fails with "requires \u2026 not found" unless the asset is published elsewhere`,
109
- conformance: false
110
- });
111
- });
112
- return out;
113
- }
114
- var BODY_PLACEHOLDER_BY_KIND = {
115
- skill: SKILL_BODY_PLACEHOLDER,
116
- agent: AGENT_BODY_PLACEHOLDER,
117
- prompt: PROMPT_BODY_PLACEHOLDER,
118
- contract: CONTRACT_BODY_PLACEHOLDER
119
- };
120
- var MARKDOWN_SCAFFOLD_KINDS = {
121
- skill: true,
122
- agent: true,
123
- prompt: true,
124
- contract: true
125
- };
126
- var FLOW_DESCRIPTION_PLACEHOLDER = "Flow description";
127
- function checkAssetManifest(kind, parsed, body, dirName) {
128
- const out = [];
129
- if (kind === "skill") {
130
- for (const f of checkAgentSkillConformance(parsed, { dirName })) {
131
- out.push({ tag: "skill conformance", text: `${f.field}: ${f.message}`, conformance: true });
132
- }
133
- }
134
- if (MARKDOWN_SCAFFOLD_KINDS[kind]) {
135
- const bodyText = body?.replace(/^#[^\n]*\n+/, "");
136
- const isPlaceholder = bodyText === SKILL_BODY_PLACEHOLDER || bodyText === BODY_PLACEHOLDER_BY_KIND[kind];
137
- if (isPlaceholder) {
138
- const noun = kind === "skill" ? "skill prompt" : kind;
139
- out.push({
140
- tag: kind,
141
- text: `body is still the scaffold placeholder; write the ${noun}`,
142
- conformance: false,
143
- scaffoldBody: true
144
- });
145
- }
146
- }
147
- return out;
148
- }
149
- function declaredVersion(parsed) {
150
- const scalar = (v) => typeof v === "string" ? v : typeof v === "number" ? String(v) : void 0;
151
- const meta = parsed.metadata;
152
- const nested = meta !== null && typeof meta === "object" ? scalar(meta.version) : void 0;
153
- return scalar(parsed.version) ?? nested;
154
- }
155
- function invalidSemverText(version) {
156
- return SEMVER_RE.test(version) ? void 0 : `version "${version}" is not valid semver`;
157
- }
158
- function rawVersionScalar(text) {
159
- const front = text.startsWith("---") ? text.split(/\n---/, 1)[0] ?? text : text;
160
- const m = /^[ \t]*version:[ \t]*([^\s#][^#\n]*?)[ \t]*(?:#.*)?$/m.exec(front);
161
- return m?.[1];
162
- }
163
- function versionProblemText(parsed, rawText) {
164
- const version = declaredVersion(parsed);
165
- const text = version === void 0 ? void 0 : invalidSemverText(version);
166
- if (text === void 0) return void 0;
167
- const meta = parsed.metadata;
168
- const nested = meta !== null && typeof meta === "object" ? meta.version : void 0;
169
- const key = parsed.version === void 0 || parsed.version === null ? "metadata.version" : "version";
170
- const written = key === "version" ? parsed.version : nested;
171
- if (typeof written !== "number") return text;
172
- const raw = (rawText === void 0 ? void 0 : rawVersionScalar(rawText)) ?? String(written);
173
- const fix = /^\d+(\.\d+)?$/.test(raw) ? `${raw}${raw.includes(".") ? "" : ".0"}.0` : DEFAULT_VERSION;
174
- return `version ${raw} is not valid semver: yaml reads an unquoted number as a number, not a string. Write it quoted with three parts: ${key}: "${fix}"`;
175
- }
176
- function duplicateAssetMessage(kind, name, dir, detail, library) {
177
- return `${kind}:${name} found in ${dir} but ${detail}. Rename or delete one of the two directories, then re-run \`skaile library index ${library}\`.`;
178
- }
179
- var DEFAULT_VERSION = "0.1.0";
180
- var SCAFFOLD_KINDS = {
181
- skill: true,
182
- agent: true,
183
- prompt: true,
184
- contract: true,
185
- flow: true,
186
- preset: true
187
- };
188
- function withManifestDefaults(kind, parsed) {
189
- if (!SCAFFOLD_KINDS[kind]) return parsed;
190
- const out = { ...parsed };
191
- if (out.metadata === null) delete out.metadata;
192
- const meta = out.metadata;
193
- const nested = typeof meta === "object" && meta !== null && "version" in meta ? meta.version : void 0;
194
- if (out.version == null && nested == null) out.version = DEFAULT_VERSION;
195
- return out;
196
- }
197
- function manifestIdentityError(kind, parsed) {
198
- const identity = kind === "flow" ? parsed.id : parsed.name;
199
- if (typeof identity !== "string" || identity.length === 0) return void 0;
200
- const publisher = typeof parsed.publisher === "string" ? parsed.publisher : void 0;
201
- if (publisher !== void 0) {
202
- try {
203
- parseAssetRef(`${kind}:@${publisher}/${identity}`);
204
- return void 0;
205
- } catch (e) {
206
- return e instanceof Error ? e.message : String(e);
207
- }
208
- }
209
- if (!isValidAssetName(identity)) {
210
- return `invalid asset ${kind === "flow" ? "id" : "name"} "${identity}" \u2014 ${ASSET_NAME_HINT}`;
211
- }
212
- return void 0;
213
- }
214
- function scaffoldDefinitionErrors(kind, parsed) {
215
- const out = [];
216
- if (kind === "flow") {
217
- if (parsed.description === FLOW_DESCRIPTION_PLACEHOLDER) {
218
- out.push("description is still the scaffold placeholder; say what the flow does");
219
- }
220
- if (parsed.nodes === void 0) {
221
- out.push("nodes is missing; a flow needs at least one node");
222
- } else if (Array.isArray(parsed.nodes) && parsed.nodes.length === 0) {
223
- out.push("nodes is still the scaffold placeholder (nodes: []); add the flow's nodes");
224
- }
225
- }
226
- if (kind === "preset") {
227
- if (parsed.description === PRESET_DESCRIPTION_PLACEHOLDER) {
228
- out.push(
229
- `description is still the scaffold placeholder ("${PRESET_DESCRIPTION_PLACEHOLDER}"); say what the preset does`
230
- );
231
- }
232
- const items = Array.isArray(parsed.items) ? parsed.items : [];
233
- const placeholderItem = items.some((item) => {
234
- const ref = typeof item === "string" ? item : item?.ref;
235
- return typeof ref === "string" && ref.trim() === PRESET_ITEM_PLACEHOLDER_REF;
236
- });
237
- if (placeholderItem) {
238
- out.push(
239
- `item ${PRESET_ITEM_PLACEHOLDER_REF} is still the scaffold placeholder; replace it with the preset's real items`
240
- );
241
- }
242
- }
243
- return out;
244
- }
245
- function checkAsset(kind, parsed, body, dirName, registry, rawText) {
246
- const errors = [];
247
- const error2 = (text) => {
248
- errors.push({ tag: kind, text, conformance: false });
249
- };
250
- const identity = manifestIdentityError(kind, parsed);
251
- if (identity) error2(identity);
252
- const semver = versionProblemText(parsed, rawText);
253
- if (semver) error2(semver);
254
- const effective = withManifestDefaults(kind, parsed);
255
- const versionKey = ["skill", "prompt", "contract"].includes(kind) ? "metadata.version" : "version";
256
- const provider = registry.getProvider(kind);
257
- if (!provider) {
258
- error2(`unknown_asset_kind: kind "${kind}" is not registered`);
259
- } else {
260
- const result = provider.validateManifest(effective);
261
- if (!result.ok) {
262
- for (const e of result.errors) {
263
- if (e.path === "version" || e.path === "metadata.version") {
264
- if (!semver) {
265
- error2(`${e.path}: must be a semver string \u2014 set ${versionKey}: ${DEFAULT_VERSION}`);
266
- }
267
- continue;
268
- }
269
- error2(`${e.path ? `${e.path}: ` : ""}${e.message}`);
270
- }
271
- }
272
- }
273
- const description = parsed.description;
274
- if (kind !== "skill" && typeof description === "string" && description.trim().startsWith(SKILL_DESCRIPTION_PLACEHOLDER_PREFIX)) {
275
- error2(
276
- `description: description is still the scaffold placeholder (${SKILL_DESCRIPTION_PLACEHOLDER_PREFIX} \u2026) \u2014 say what the ${kind} does and when to use it`
277
- );
278
- }
279
- for (const text of scaffoldDefinitionErrors(kind, parsed)) error2(text);
280
- if (kind === "flow") {
281
- const flow = parseFlowDefinition(effective);
282
- if (!flow.ok) {
283
- for (const e of flow.errors) {
284
- error2(`invalid flow definition: ${e.path || "<root>"}: ${e.message}`);
285
- }
286
- }
287
- }
288
- return { errors, advisories: checkAssetManifest(kind, parsed, body, dirName) };
289
- }
290
- function findAssetManifestFile(dir, kind, name) {
291
- const candidates = [];
292
- if (kind === "skill") candidates.push("SKILL.md");
293
- else if (kind === "agent") candidates.push("agent.yaml", "AGENT.md");
294
- else if (kind === "contract") candidates.push("CONTRACT.md");
295
- else if (kind === "prompt") candidates.push(`${name}.prompt.md`);
296
- else if (kind === "flow") candidates.push(`${name}.flow.yaml`, `${name}.flow.json`);
297
- else if (kind === "preset") candidates.push(`${name}.preset.yaml`);
298
- for (const c of candidates) {
299
- const file = path3.join(dir, c);
300
- if (fs3.existsSync(file)) return file;
301
- }
302
- const suffix = kind === "prompt" ? ".prompt.md" : kind === "flow" ? ".flow.yaml" : kind === "preset" ? ".preset.yaml" : null;
303
- if (suffix && fs3.existsSync(dir)) {
304
- const matches = fs3.readdirSync(dir).filter((f) => f.endsWith(suffix));
305
- if (matches.length === 1) return path3.join(dir, matches[0]);
306
- }
307
- return null;
308
- }
309
- function readAssetBody(file, text) {
310
- if (file.endsWith(".md")) return parseFrontmatter(text).body;
311
- if (path3.basename(file) !== "agent.yaml") return void 0;
312
- const soul = path3.join(path3.dirname(file), "SOUL.md");
313
- return fs3.existsSync(soul) ? fs3.readFileSync(soul, "utf8").trim() : void 0;
314
- }
315
- function checkAssetFile(file, kind, registry, libraryRoot) {
316
- let text;
317
- try {
318
- text = fs3.readFileSync(file, "utf8");
319
- } catch {
320
- return [];
321
- }
322
- const res = parseManifestFile(file, text);
323
- if (!res.ok) return [];
324
- const errors = checkAsset(
325
- kind,
326
- res.data,
327
- readAssetBody(file, text),
328
- path3.basename(path3.dirname(file)),
329
- registry,
330
- text
331
- ).errors;
332
- if (kind === "agent" && libraryRoot !== void 0) {
333
- errors.push(...checkAgentFiles(res.data, path3.dirname(file), libraryRoot));
334
- }
335
- return errors;
336
- }
337
- function manifestRequiresProblems(dir) {
338
- const file = path3.join(dir, "skaile.manifest.yaml");
339
- let doc;
340
- try {
341
- doc = parse(fs3.readFileSync(file, "utf-8"));
342
- } catch {
343
- return [];
344
- }
345
- const assets = doc?.assets;
346
- if (!Array.isArray(assets)) return [];
347
- const problems = [];
348
- for (const a of assets) {
349
- if (!a || typeof a !== "object") continue;
350
- const { kind, name, dependencies } = a;
351
- if (!Array.isArray(dependencies)) continue;
352
- const entries = dependencies.map((d) => typeof d === "string" ? d : String(d));
353
- for (const message of requiresSyntaxErrors(entries)) {
354
- problems.push({
355
- asset: `${String(kind)}:${String(name)}`,
356
- message: `ManifestRequiresError: ${message}`
357
- });
358
- }
359
- }
360
- return problems;
361
- }
362
- async function knownAssetVersions(dir) {
363
- const known = {};
364
- const add = (publisher, kind, name, version) => {
365
- if (!publisher) return;
366
- const key = `${publisher.replace(/^@/, "")}/${kind}:${name}`;
367
- const versions = known[key] ?? [];
368
- if (version && !versions.includes(version)) versions.push(version);
369
- known[key] = versions;
370
- };
371
- const addManifest = (libPath) => {
372
- const manifest = loadSkPublishManifest(libPath);
373
- for (const a of manifest?.assets ?? []) {
374
- add(a.publisher ?? manifest?.publisher, a.kind, a.name, a.version);
375
- }
376
- };
377
- addManifest(dir);
378
- const indexPath = resolveIndexPath();
379
- if (!fs3.existsSync(indexPath)) return known;
380
- const index = new LocalIndex({ indexPath, kindRegistry: getKindRegistry() });
381
- try {
382
- for (const def of await index.listAssetDefs())
383
- add(def.publisher, def.kind, def.name, def.version);
384
- for (const lib of await index.listSources()) {
385
- if (path3.resolve(lib.path) !== path3.resolve(dir) && fs3.existsSync(lib.path)) {
386
- addManifest(lib.path);
387
- }
388
- }
389
- } catch {
390
- } finally {
391
- index.close();
392
- }
393
- return known;
394
- }
395
- async function unresolvedManifestDependencies(dir) {
396
- let doc;
397
- try {
398
- doc = parse(fs3.readFileSync(path3.join(dir, SKAILE_MANIFEST_FILENAME), "utf-8"));
399
- } catch {
400
- return [];
401
- }
402
- const assets = doc?.assets;
403
- if (!Array.isArray(assets)) return [];
404
- const wanted = [];
405
- for (const a of assets) {
406
- if (!a || typeof a !== "object") continue;
407
- const { kind, name, dependencies } = a;
408
- if (!Array.isArray(dependencies)) continue;
409
- for (const d of dependencies) {
410
- const entry = typeof d === "string" ? d : String(d);
411
- if (requiresSyntaxErrors([entry]).length === 0) {
412
- wanted.push({ asset: `${String(kind)}:${String(name)}`, entry });
413
- }
414
- }
415
- }
416
- if (wanted.length === 0) return [];
417
- const known = await knownAssetVersions(dir);
418
- const out = [];
419
- for (const { asset, entry } of wanted) {
420
- const dep = parseDep(entry);
421
- if (!dep.publisher) continue;
422
- const versions = known[`${dep.publisher}/${dep.kind}:${dep.name}`];
423
- const prefix = `${SKAILE_MANIFEST_FILENAME} [assets] \u2014 ${asset}: dependency "${entry}"`;
424
- if (!versions) {
425
- out.push(
426
- `${prefix} is not held by any registered library (checked offline: this library and the local index; the store was not asked).`
427
- );
428
- } else if (dep.pin && versions.length > 0 && !versions.some((v) => matchPin(dep.pin, v))) {
429
- out.push(
430
- `${prefix} has no version matching "${dep.pin}" in any registered library (held: ${versions.join(", ")}).`
431
- );
432
- }
433
- }
434
- return out;
435
- }
436
- function invalidPublisherMessage(raw) {
437
- return `Invalid publisher "${raw}": ${PUBLISHER_HINT}.`;
438
- }
439
- function requireValidPublisherOrExit(raw) {
440
- const bare = raw.trim().replace(/^@/, "");
441
- if (!isValidPublisher(bare)) {
442
- logErr(invalidPublisherMessage(raw));
443
- process.exit(1);
444
- }
445
- return bare;
446
- }
447
- function manifestPublisherProblems(dir) {
448
- let doc;
449
- try {
450
- doc = parse(fs3.readFileSync(path3.join(dir, SKAILE_MANIFEST_FILENAME), "utf-8"));
451
- } catch {
452
- return [];
453
- }
454
- if (!doc || typeof doc !== "object") return [];
455
- const { publisher, assets } = doc;
456
- const problems = [];
457
- const check = (value, where) => {
458
- if (typeof value !== "string") return;
459
- if (!isValidPublisher(value.trim().replace(/^@/, ""))) {
460
- problems.push(`${SKAILE_MANIFEST_FILENAME} ${where} \u2014 ${invalidPublisherMessage(value)}`);
461
- }
462
- };
463
- check(publisher, "[publisher]");
464
- if (Array.isArray(assets)) {
465
- for (const a of assets) {
466
- if (!a || typeof a !== "object") continue;
467
- const { kind, name, publisher: assetPublisher } = a;
468
- check(assetPublisher, `[assets] ${String(kind)}:${String(name)}`);
469
- }
470
- }
471
- return problems;
472
- }
473
- function exitOnManifestPublisherProblems(dir, libName) {
474
- const problems = manifestPublisherProblems(dir);
475
- if (problems.length === 0) return;
476
- for (const message of problems) logErr(message);
477
- logErr(
478
- `Fix the publisher in ${SKAILE_MANIFEST_FILENAME} (\`skaile library set ${libName} publisher=<name>\` rewrites the library's own), then re-run.`
479
- );
480
- process.exit(1);
481
- }
482
- async function indexLibrary(lib, index, opts = {}) {
483
- const { LocalCatalogSource } = await import('./library/index.js');
484
- const own = index ?? await openLibrary();
485
- try {
486
- const source = new LocalCatalogSource(own, lib.id, lib.path, getKindRegistry());
487
- const res = await source.sync({ exclude: opts.exclude });
488
- if (res.pruned.length > 0) {
489
- const lost = new Set(res.pruned);
490
- for (const other of await own.listSources()) {
491
- if (other.id === lib.id || other.backend !== "local" || !other.path) continue;
492
- if (!fs3.existsSync(other.path)) continue;
493
- await new LocalCatalogSource(own, other.id, other.path, getKindRegistry()).sync({
494
- only: lost
495
- });
496
- }
497
- }
498
- return {
499
- assetsFound: res.assetsFound,
500
- assetsUpdated: res.assetsUpdated,
501
- errors: res.errors
502
- };
503
- } finally {
504
- if (!index) own.close();
505
- }
506
- }
507
- function resolveLibraryPublisherDetailed(lib, opts, storeIdentity) {
508
- const bare = (p) => p.startsWith("@") ? p.slice(1) : p;
509
- if (opts.publisher?.trim()) return { publisher: bare(opts.publisher.trim()), source: "flag" };
510
- const declared = loadSkPublishManifest(lib.path)?.publisher?.trim();
511
- if (declared) return { publisher: bare(declared), source: "manifest" };
512
- const identity = (storeIdentity?.githubLogin ?? storeIdentity?.username)?.trim().toLowerCase();
513
- if (identity && isValidPublisher(identity)) return { publisher: identity, source: "identity" };
514
- try {
515
- const slug = slugifyAssetName(lib.name).slice(0, 39).replace(/-+$/, "");
516
- return { publisher: slug, source: "library-name" };
517
- } catch {
518
- return { publisher: "library", source: "library-name" };
519
- }
520
- }
521
- function warnLibraryNameFallback(libName, resolved, hasPublisherFlag = false) {
522
- if (resolved.source !== "library-name") return;
523
- const setLater = `\`skaile library set ${libName} publisher=<name>\``;
524
- logWarn(
525
- `No publisher given and not signed in \u2014 using the library name "${resolved.publisher}" as the publisher. ` + (hasPublisherFlag ? `Pass --publisher <name> or run \`skaile store login\`; change it later with ${setLater}.` : `Run \`skaile store login\`, or change it later with ${setLater}.`)
526
- );
527
- }
528
- function normalizeAssetFrontmatter(assetDir) {
529
- let markerFile = ["SKILL.md", "AGENT.md", "CONTRACT.md"].map((m) => path3.join(assetDir, m)).find((f) => fs3.existsSync(f));
530
- if (!markerFile) {
531
- const promptMd = fs3.readdirSync(assetDir).find((f) => f.endsWith(".prompt.md"));
532
- if (promptMd) markerFile = path3.join(assetDir, promptMd);
533
- }
534
- if (!markerFile) return;
535
- try {
536
- const { data, body } = parseFrontmatter(fs3.readFileSync(markerFile, "utf8"));
537
- const fm = stringify(data).trimEnd();
538
- fs3.writeFileSync(markerFile, `---
539
- ${fm}
540
- ---
541
-
542
- ${body}
543
- `, "utf8");
544
- } catch {
545
- }
546
- }
547
- async function registerLibraryAsset(lib, index, input) {
548
- const { publisher, source } = resolveLibraryPublisherDetailed(
549
- lib,
550
- { publisher: input.publisher },
551
- getStoreIdentity()
552
- );
553
- warnLibraryNameFallback(lib.name, { publisher, source }, true);
554
- normalizeAssetFrontmatter(input.assetDir);
555
- stampManifestPublisher(lib.path, publisher);
556
- upsertManifestAsset(lib.path, {
557
- kind: input.kind,
558
- name: input.name,
559
- root: path3.relative(lib.path, input.assetDir) || input.name,
560
- version: input.version,
561
- publisher
562
- });
563
- const idx = await indexLibrary(lib, index);
564
- for (const e of idx.errors) logWarn(e);
565
- return { publisher, ref: refFor(input.kind, publisher, input.name, input.version) };
566
- }
567
- var LIBRARY_UPGRADE_DOCS = "https://github.com/skaile-ai/workspaces/blob/main/docs/sections/cli/commands/library.md#upgrading-a-4x-library";
568
- var DOMAIN_REMOVED_HINT = `Domains were removed in 5.0 \u2014 delete DOMAIN.md files; group assets with .claude-plugin/marketplace.json. See ${LIBRARY_UPGRADE_DOCS}`;
569
- function removedDomainOption() {
570
- return new Option("--domain <domain>", "Removed in 5.0").hideHelp();
571
- }
572
- function rejectRemovedDomainOption(opts) {
573
- if (opts.domain === void 0) return;
574
- logErr(DOMAIN_REMOVED_HINT);
575
- process.exit(1);
576
- }
577
- function findFiles(root, match) {
578
- const found = [];
579
- const walk = (dir) => {
580
- let entries;
581
- try {
582
- entries = fs3.readdirSync(dir, { withFileTypes: true });
583
- } catch {
584
- return;
585
- }
586
- for (const entry of entries) {
587
- if (entry.isDirectory()) {
588
- if (!entry.name.startsWith(".") && entry.name !== "node_modules") {
589
- walk(path3.join(dir, entry.name));
590
- }
591
- } else if (match(entry.name)) {
592
- found.push(path3.join(dir, entry.name));
593
- }
594
- }
595
- };
596
- walk(root);
597
- return found;
598
- }
599
- function countDomainFiles(root) {
600
- return findFiles(root, (name) => name === "DOMAIN.md").length;
601
- }
602
- function warnIgnoredDomainFiles(root) {
603
- const count = countDomainFiles(root);
604
- if (count > 0) {
605
- logWarn(
606
- `${count} DOMAIN.md file(s) are ignored since 5.0 (domains were removed) \u2014 delete them; group assets with .claude-plugin/marketplace.json. See ${LIBRARY_UPGRADE_DOCS}`
607
- );
608
- }
609
- return count;
610
- }
611
- function warnLegacyBundleFiles(root) {
612
- const files = findFiles(root, (name) => name.endsWith(".bundle.yaml"));
613
- if (files.length > 0) {
614
- const shown = files.slice(0, 5).map((f) => path3.relative(root, f) || f);
615
- const more = files.length > shown.length ? `, +${files.length - shown.length} more` : "";
616
- logWarn(
617
- `${files.length} *.bundle.yaml file(s) are not scanned (the bundle kind became preset): ${shown.join(", ")}${more}. Run \`skaile migrate assets ${root} --write\` to rename them to *.preset.yaml. See ${LIBRARY_UPGRADE_DOCS}`
618
- );
619
- }
620
- return files.length;
621
- }
622
-
623
- export { DOMAIN_REMOVED_HINT, agentComposeRefAdvisories, checkAgentFiles, checkAsset, checkAssetFile, declaredVersion, duplicateAssetMessage, exitOnManifestPublisherProblems, findAssetManifestFile, indexLibrary, invalidSemverText, manifestPublisherProblems, manifestRequiresProblems, readAssetBody, registerLibraryAsset, rejectRemovedDomainOption, removedDomainOption, requireValidPublisherOrExit, resolveLibraryPublisherDetailed, unresolvedManifestDependencies, warnIgnoredDomainFiles, warnLegacyBundleFiles, warnLibraryNameFallback };
624
- //# sourceMappingURL=chunk-ID745F3R.js.map
625
- //# sourceMappingURL=chunk-ID745F3R.js.map