@skaile/workspaces 6.3.0 → 6.5.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 (399) hide show
  1. package/CHANGELOG.md +72 -1
  2. package/README.md +4 -0
  3. package/dist/ai-sdk.js +74 -32
  4. package/dist/ai-sdk.js.map +1 -1
  5. package/dist/app-sdk/index.js +1 -1
  6. package/dist/{asset-feeds-3YO2352Y.js → asset-feeds-4I6Z4OI3.js} +21 -21
  7. package/dist/{asset-feeds-3YO2352Y.js.map → asset-feeds-4I6Z4OI3.js.map} +1 -1
  8. package/dist/asset-manager/catalog-deployer.js +7 -7
  9. package/dist/asset-manager/index.js +13 -13
  10. package/dist/asset-manager/installer.js +9 -9
  11. package/dist/asset-manager/renderers.js +8 -8
  12. package/dist/asset-manager/src/index.d.ts +156 -27
  13. package/dist/asset-manager/src/index.d.ts.map +1 -1
  14. package/dist/asset-manager/src/install-instances.d.ts +2 -0
  15. package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
  16. package/dist/asset-manager/src/installer.d.ts +6 -0
  17. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  18. package/dist/bridge/harnesses/claude-sdk.js +23 -18
  19. package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
  20. package/dist/bridge/harnesses/codex.js +36 -34
  21. package/dist/bridge/harnesses/codex.js.map +1 -1
  22. package/dist/bridge/harnesses/continue.js +11 -12
  23. package/dist/bridge/harnesses/continue.js.map +1 -1
  24. package/dist/bridge/harnesses/echo.js +4 -5
  25. package/dist/bridge/harnesses/echo.js.map +1 -1
  26. package/dist/bridge/harnesses/gemini.js +8 -9
  27. package/dist/bridge/harnesses/goose.js +11 -12
  28. package/dist/bridge/harnesses/goose.js.map +1 -1
  29. package/dist/bridge/harnesses/omp.js +16 -11
  30. package/dist/bridge/harnesses/omp.js.map +1 -1
  31. package/dist/bridge/harnesses/opencode.js +11 -12
  32. package/dist/bridge/harnesses/opencode.js.map +1 -1
  33. package/dist/bridge/harnesses/qwen.js +8 -9
  34. package/dist/bridge/harnesses/qwen.js.map +1 -1
  35. package/dist/bridge/index.js +19 -20
  36. package/dist/bridge/src/ai-sdk.d.ts +5 -2
  37. package/dist/bridge/src/ai-sdk.d.ts.map +1 -1
  38. package/dist/bridge/src/codex/login-fallback.d.ts +39 -0
  39. package/dist/bridge/src/codex/login-fallback.d.ts.map +1 -0
  40. package/dist/bridge/src/error-classifier.d.ts +6 -0
  41. package/dist/bridge/src/error-classifier.d.ts.map +1 -1
  42. package/dist/bridge/src/harness-model-check.d.ts +11 -7
  43. package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
  44. package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -1
  45. package/dist/bridge/src/harnesses/codex.d.ts +0 -6
  46. package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
  47. package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
  48. package/dist/bridge/src/index.d.ts +1 -0
  49. package/dist/bridge/src/index.d.ts.map +1 -1
  50. package/dist/{chunk-XEVFSDIF.js → chunk-22ZX33H6.js} +6 -6
  51. package/dist/{chunk-XEVFSDIF.js.map → chunk-22ZX33H6.js.map} +1 -1
  52. package/dist/{chunk-KPKGWXUJ.js → chunk-23SG4JRV.js} +4 -4
  53. package/dist/{chunk-KPKGWXUJ.js.map → chunk-23SG4JRV.js.map} +1 -1
  54. package/dist/{chunk-MYXFR27L.js → chunk-2HS357RA.js} +77 -37
  55. package/dist/chunk-2HS357RA.js.map +1 -0
  56. package/dist/{chunk-7TSNR5H5.js → chunk-2IAWVUW3.js} +4 -4
  57. package/dist/{chunk-7TSNR5H5.js.map → chunk-2IAWVUW3.js.map} +1 -1
  58. package/dist/{chunk-6GWSDPBP.js → chunk-2M3VLKT2.js} +3 -3
  59. package/dist/{chunk-6GWSDPBP.js.map → chunk-2M3VLKT2.js.map} +1 -1
  60. package/dist/{chunk-PNUM7GUY.js → chunk-3DA74PLW.js} +3 -3
  61. package/dist/{chunk-PNUM7GUY.js.map → chunk-3DA74PLW.js.map} +1 -1
  62. package/dist/{chunk-7RH6E332.js → chunk-3KSLUVKB.js} +7 -7
  63. package/dist/{chunk-7RH6E332.js.map → chunk-3KSLUVKB.js.map} +1 -1
  64. package/dist/{chunk-6OHZUUR7.js → chunk-5DE3DGVR.js} +11 -5
  65. package/dist/chunk-5DE3DGVR.js.map +1 -0
  66. package/dist/{chunk-32FYVSSW.js → chunk-6EKQENAP.js} +6 -6
  67. package/dist/{chunk-32FYVSSW.js.map → chunk-6EKQENAP.js.map} +1 -1
  68. package/dist/{chunk-QK7AG5AV.js → chunk-6Y3SC7O4.js} +4 -4
  69. package/dist/{chunk-QK7AG5AV.js.map → chunk-6Y3SC7O4.js.map} +1 -1
  70. package/dist/{chunk-ROVZCGTN.js → chunk-7EMS2GZO.js} +40 -37
  71. package/dist/chunk-7EMS2GZO.js.map +1 -0
  72. package/dist/{chunk-COUJOTAJ.js → chunk-7H4GTP7V.js} +3 -3
  73. package/dist/{chunk-COUJOTAJ.js.map → chunk-7H4GTP7V.js.map} +1 -1
  74. package/dist/{chunk-VUWRGMT6.js → chunk-AFTZNR2W.js} +3 -3
  75. package/dist/{chunk-VUWRGMT6.js.map → chunk-AFTZNR2W.js.map} +1 -1
  76. package/dist/{chunk-JMIKGAUA.js → chunk-AVFRFGM2.js} +16 -6
  77. package/dist/chunk-AVFRFGM2.js.map +1 -0
  78. package/dist/{chunk-7MV3NHPT.js → chunk-B436SG5P.js} +42 -25
  79. package/dist/chunk-B436SG5P.js.map +1 -0
  80. package/dist/{chunk-ZEH4WFEG.js → chunk-B4BLJUYN.js} +69 -26
  81. package/dist/chunk-B4BLJUYN.js.map +1 -0
  82. package/dist/{chunk-LEJQAX7G.js → chunk-DNXPXJ3X.js} +82 -50
  83. package/dist/chunk-DNXPXJ3X.js.map +1 -0
  84. package/dist/{chunk-HDVLBEEX.js → chunk-E6UWI3TP.js} +3 -3
  85. package/dist/{chunk-HDVLBEEX.js.map → chunk-E6UWI3TP.js.map} +1 -1
  86. package/dist/{chunk-2TFKXSB5.js → chunk-EN5REMWV.js} +4 -4
  87. package/dist/{chunk-2TFKXSB5.js.map → chunk-EN5REMWV.js.map} +1 -1
  88. package/dist/{chunk-QFFMFZIR.js → chunk-EO7KGX6P.js} +4 -4
  89. package/dist/{chunk-QFFMFZIR.js.map → chunk-EO7KGX6P.js.map} +1 -1
  90. package/dist/{chunk-KIPCBIFJ.js → chunk-ETF6Q3R3.js} +23 -80
  91. package/dist/chunk-ETF6Q3R3.js.map +1 -0
  92. package/dist/{chunk-6WH2WE4B.js → chunk-G4NCSYWR.js} +9 -8
  93. package/dist/chunk-G4NCSYWR.js.map +1 -0
  94. package/dist/{chunk-JCPD4QRM.js → chunk-G5SYFFMD.js} +2 -2
  95. package/dist/{chunk-JCPD4QRM.js.map → chunk-G5SYFFMD.js.map} +1 -1
  96. package/dist/{chunk-Q7CU5GQO.js → chunk-HPA3RP5E.js} +4 -4
  97. package/dist/{chunk-Q7CU5GQO.js.map → chunk-HPA3RP5E.js.map} +1 -1
  98. package/dist/{chunk-KGHYXXXV.js → chunk-IS3NIZBX.js} +588 -133
  99. package/dist/chunk-IS3NIZBX.js.map +1 -0
  100. package/dist/{chunk-XBQTXGY4.js → chunk-IWKKTCXY.js} +98 -17
  101. package/dist/chunk-IWKKTCXY.js.map +1 -0
  102. package/dist/{chunk-HH2H2ZV7.js → chunk-J5JWLKLB.js} +35 -20
  103. package/dist/chunk-J5JWLKLB.js.map +1 -0
  104. package/dist/chunk-J6YPKMMY.js +83 -0
  105. package/dist/chunk-J6YPKMMY.js.map +1 -0
  106. package/dist/{chunk-TGV2EWGL.js → chunk-K4DHYTUM.js} +4 -4
  107. package/dist/{chunk-TGV2EWGL.js.map → chunk-K4DHYTUM.js.map} +1 -1
  108. package/dist/{chunk-72NT2TJU.js → chunk-KA2GLAPS.js} +7 -8
  109. package/dist/chunk-KA2GLAPS.js.map +1 -0
  110. package/dist/{chunk-VUJXZDCY.js → chunk-KSH5CFQS.js} +3 -3
  111. package/dist/{chunk-VUJXZDCY.js.map → chunk-KSH5CFQS.js.map} +1 -1
  112. package/dist/{chunk-BIRW3HOG.js → chunk-KSUT5KAE.js} +3 -3
  113. package/dist/{chunk-BIRW3HOG.js.map → chunk-KSUT5KAE.js.map} +1 -1
  114. package/dist/{chunk-AMJ6KEV7.js → chunk-KUADKMNX.js} +4 -4
  115. package/dist/{chunk-AMJ6KEV7.js.map → chunk-KUADKMNX.js.map} +1 -1
  116. package/dist/{chunk-TSTRH4SM.js → chunk-KYNCY3F3.js} +3 -3
  117. package/dist/{chunk-TSTRH4SM.js.map → chunk-KYNCY3F3.js.map} +1 -1
  118. package/dist/{chunk-V5BPDB4J.js → chunk-LE6QS4PG.js} +3 -3
  119. package/dist/{chunk-V5BPDB4J.js.map → chunk-LE6QS4PG.js.map} +1 -1
  120. package/dist/{chunk-6UP2EDFN.js → chunk-NSIOBKDX.js} +313 -4
  121. package/dist/chunk-NSIOBKDX.js.map +1 -0
  122. package/dist/{chunk-MD3FUZS3.js → chunk-OBZ5WQ32.js} +3 -3
  123. package/dist/{chunk-MD3FUZS3.js.map → chunk-OBZ5WQ32.js.map} +1 -1
  124. package/dist/{chunk-ELSGFI3I.js → chunk-OLHHN3NO.js} +31 -7
  125. package/dist/chunk-OLHHN3NO.js.map +1 -0
  126. package/dist/{chunk-JGH7NB47.js → chunk-S7DVT2BV.js} +4 -4
  127. package/dist/{chunk-JGH7NB47.js.map → chunk-S7DVT2BV.js.map} +1 -1
  128. package/dist/{chunk-PHAMYCZH.js → chunk-SN663FCA.js} +5 -5
  129. package/dist/{chunk-PHAMYCZH.js.map → chunk-SN663FCA.js.map} +1 -1
  130. package/dist/{serve-preflight-H2AYMGJ6.js → chunk-SRTWKZP2.js} +30 -61
  131. package/dist/chunk-SRTWKZP2.js.map +1 -0
  132. package/dist/{chunk-H622YULS.js → chunk-SZTHSPRC.js} +3 -4
  133. package/dist/chunk-SZTHSPRC.js.map +1 -0
  134. package/dist/{chunk-LD6O6QKU.js → chunk-T7HGEMNB.js} +4 -4
  135. package/dist/{chunk-LD6O6QKU.js.map → chunk-T7HGEMNB.js.map} +1 -1
  136. package/dist/{chunk-4QRJBY2P.js → chunk-TDPQOR3C.js} +2 -2
  137. package/dist/{chunk-4QRJBY2P.js.map → chunk-TDPQOR3C.js.map} +1 -1
  138. package/dist/{chunk-Y3I4KGLX.js → chunk-TGUMN5G7.js} +310 -175
  139. package/dist/chunk-TGUMN5G7.js.map +1 -0
  140. package/dist/{chunk-TO5SSMRI.js → chunk-THX5EE3K.js} +67 -19
  141. package/dist/chunk-THX5EE3K.js.map +1 -0
  142. package/dist/{chunk-QTLUZUF2.js → chunk-TNQLDEM6.js} +86 -34
  143. package/dist/chunk-TNQLDEM6.js.map +1 -0
  144. package/dist/{chunk-EQNIBBB6.js → chunk-TROEC2Z2.js} +34 -20
  145. package/dist/chunk-TROEC2Z2.js.map +1 -0
  146. package/dist/{chunk-E5NQRHEB.js → chunk-U6KRTCNA.js} +4 -4
  147. package/dist/{chunk-E5NQRHEB.js.map → chunk-U6KRTCNA.js.map} +1 -1
  148. package/dist/{chunk-J5JRGBKK.js → chunk-UMLCKKIA.js} +64 -32
  149. package/dist/chunk-UMLCKKIA.js.map +1 -0
  150. package/dist/{chunk-DU26AVK2.js → chunk-USVUS4DJ.js} +8 -8
  151. package/dist/{chunk-DU26AVK2.js.map → chunk-USVUS4DJ.js.map} +1 -1
  152. package/dist/{chunk-HGOJEVHY.js → chunk-UZET67SO.js} +4 -4
  153. package/dist/{chunk-HGOJEVHY.js.map → chunk-UZET67SO.js.map} +1 -1
  154. package/dist/{chunk-IZQOO6MN.js → chunk-V5KG6CCV.js} +2 -2
  155. package/dist/{chunk-IZQOO6MN.js.map → chunk-V5KG6CCV.js.map} +1 -1
  156. package/dist/{chunk-76FLBODK.js → chunk-VT6G5AJV.js} +10 -7
  157. package/dist/chunk-VT6G5AJV.js.map +1 -0
  158. package/dist/{chunk-URCJIV7T.js → chunk-W5KCAWGN.js} +3 -3
  159. package/dist/{chunk-URCJIV7T.js.map → chunk-W5KCAWGN.js.map} +1 -1
  160. package/dist/{chunk-YW4ASEUP.js → chunk-WFLQMAR5.js} +5 -5
  161. package/dist/{chunk-YW4ASEUP.js.map → chunk-WFLQMAR5.js.map} +1 -1
  162. package/dist/{chunk-RFQONXET.js → chunk-X44XKBZX.js} +3 -3
  163. package/dist/{chunk-RFQONXET.js.map → chunk-X44XKBZX.js.map} +1 -1
  164. package/dist/{chunk-BPTWWKGF.js → chunk-YBEJCQE5.js} +3 -3
  165. package/dist/{chunk-BPTWWKGF.js.map → chunk-YBEJCQE5.js.map} +1 -1
  166. package/dist/{chunk-PL52CI4U.js → chunk-YRC2EFOU.js} +4 -4
  167. package/dist/{chunk-PL52CI4U.js.map → chunk-YRC2EFOU.js.map} +1 -1
  168. package/dist/{chunk-7QG2WRSN.js → chunk-Z2X7UZEZ.js} +25 -8
  169. package/dist/chunk-Z2X7UZEZ.js.map +1 -0
  170. package/dist/{chunk-U3SXCVR7.js → chunk-ZUU2PLA3.js} +4 -4
  171. package/dist/{chunk-U3SXCVR7.js.map → chunk-ZUU2PLA3.js.map} +1 -1
  172. package/dist/{claude-code-EUKDGOOO.js → claude-code-JY6CYEG7.js} +4 -4
  173. package/dist/{claude-code-EUKDGOOO.js.map → claude-code-JY6CYEG7.js.map} +1 -1
  174. package/dist/cli/index.js +322 -162
  175. package/dist/cli/index.js.map +1 -1
  176. package/dist/cli/src/commands/cache.d.ts.map +1 -1
  177. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  178. package/dist/cli/src/commands/config.d.ts.map +1 -1
  179. package/dist/cli/src/commands/connector.d.ts.map +1 -1
  180. package/dist/cli/src/commands/deploy.d.ts.map +1 -1
  181. package/dist/cli/src/commands/harness.d.ts +5 -4
  182. package/dist/cli/src/commands/harness.d.ts.map +1 -1
  183. package/dist/cli/src/commands/integration.d.ts.map +1 -1
  184. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  185. package/dist/cli/src/commands/library-index.d.ts +6 -0
  186. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  187. package/dist/cli/src/commands/migrate-files.d.ts +3 -6
  188. package/dist/cli/src/commands/migrate-files.d.ts.map +1 -1
  189. package/dist/cli/src/commands/migrate-harness.d.ts +4 -3
  190. package/dist/cli/src/commands/migrate-harness.d.ts.map +1 -1
  191. package/dist/cli/src/commands/migrate.d.ts +2 -2
  192. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  193. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
  194. package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
  195. package/dist/cli/src/commands/project.d.ts +7 -1
  196. package/dist/cli/src/commands/project.d.ts.map +1 -1
  197. package/dist/cli/src/commands/run.d.ts.map +1 -1
  198. package/dist/cli/src/commands/serve-preflight.d.ts +21 -0
  199. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  200. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  201. package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
  202. package/dist/cli/src/commands/source.d.ts +8 -0
  203. package/dist/cli/src/commands/source.d.ts.map +1 -1
  204. package/dist/cli/src/commands/update.d.ts.map +1 -1
  205. package/dist/cli/src/commands/validate-instances.d.ts +6 -0
  206. package/dist/cli/src/commands/validate-instances.d.ts.map +1 -1
  207. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  208. package/dist/cli/src/commands/verify.d.ts.map +1 -1
  209. package/dist/cli/src/config-checks.d.ts +8 -0
  210. package/dist/cli/src/config-checks.d.ts.map +1 -1
  211. package/dist/cli/src/ensure-sources.d.ts.map +1 -1
  212. package/dist/cli/src/helpers.d.ts +13 -4
  213. package/dist/cli/src/helpers.d.ts.map +1 -1
  214. package/dist/cli/src/plugin-store/index.d.ts +1 -1
  215. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  216. package/dist/cli/src/plugin-store/reconcile.d.ts.map +1 -1
  217. package/dist/cli/src/plugin-store/spec.d.ts +20 -14
  218. package/dist/cli/src/plugin-store/spec.d.ts.map +1 -1
  219. package/dist/cli/src/setup.d.ts.map +1 -1
  220. package/dist/cli/src/skill-checks.d.ts +2 -0
  221. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  222. package/dist/connectors/config.js +5 -5
  223. package/dist/connectors/index.js +23 -24
  224. package/dist/connectors/src/index.d.ts +2 -2
  225. package/dist/connectors/src/index.d.ts.map +1 -1
  226. package/dist/connectors/src/managed-gitconfig.d.ts +22 -0
  227. package/dist/connectors/src/managed-gitconfig.d.ts.map +1 -1
  228. package/dist/connectors/src/npm-installer.d.ts +11 -3
  229. package/dist/connectors/src/npm-installer.d.ts.map +1 -1
  230. package/dist/connectors-VLFOQNS6.js +49 -0
  231. package/dist/{connectors-XYPE2DCQ.js.map → connectors-VLFOQNS6.js.map} +1 -1
  232. package/dist/connectors-shared/index.js +2 -2
  233. package/dist/core/index.js +6 -6
  234. package/dist/core/manifest.js +2 -2
  235. package/dist/core/models.js +1 -1
  236. package/dist/core/publish-manifest.js +3 -3
  237. package/dist/core/ref.js +1 -1
  238. package/dist/core/runtime-assets.js +5 -5
  239. package/dist/core/src/agent-instances.d.ts +6 -0
  240. package/dist/core/src/agent-instances.d.ts.map +1 -1
  241. package/dist/core/src/config-key-diagnostics.d.ts +2 -1
  242. package/dist/core/src/config-key-diagnostics.d.ts.map +1 -1
  243. package/dist/core/src/index.d.ts +5 -5
  244. package/dist/core/src/index.d.ts.map +1 -1
  245. package/dist/core/src/lock.d.ts +20 -1
  246. package/dist/core/src/lock.d.ts.map +1 -1
  247. package/dist/core/src/manifest-yaml-editor.d.ts +4 -1
  248. package/dist/core/src/manifest-yaml-editor.d.ts.map +1 -1
  249. package/dist/core/src/manifest.d.ts +9 -3
  250. package/dist/core/src/manifest.d.ts.map +1 -1
  251. package/dist/core/src/models.d.ts +10 -0
  252. package/dist/core/src/models.d.ts.map +1 -1
  253. package/dist/core/src/repo-manager.d.ts +11 -0
  254. package/dist/core/src/repo-manager.d.ts.map +1 -1
  255. package/dist/core/src/runtime-assets.d.ts +12 -1
  256. package/dist/core/src/runtime-assets.d.ts.map +1 -1
  257. package/dist/core/src/walker.d.ts +3 -0
  258. package/dist/core/src/walker.d.ts.map +1 -1
  259. package/dist/core/src/workspace-config.d.ts +19 -2
  260. package/dist/core/src/workspace-config.d.ts.map +1 -1
  261. package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
  262. package/dist/core/workspace-config.js +4 -4
  263. package/dist/deploy/index.js +6 -6
  264. package/dist/discovery/index.js +5 -5
  265. package/dist/{ensure-sources-IN3VKHUA.js → ensure-sources-6O54DUQB.js} +31 -31
  266. package/dist/ensure-sources-6O54DUQB.js.map +1 -0
  267. package/dist/factory-assets/connectors/box.js +23 -24
  268. package/dist/factory-assets/connectors/deploy.js +23 -24
  269. package/dist/factory-assets/connectors/devserver.js +23 -24
  270. package/dist/factory-assets/connectors/flow/adapter.js +23 -24
  271. package/dist/factory-assets/connectors/flow/engine.js +7 -7
  272. package/dist/factory-assets/connectors/flow/run-flow.js +25 -26
  273. package/dist/factory-assets/connectors/flow.js +23 -24
  274. package/dist/factory-assets/connectors/git.js +23 -24
  275. package/dist/factory-assets/connectors/gmail.js +23 -24
  276. package/dist/factory-assets/connectors/googledrive.js +23 -24
  277. package/dist/factory-assets/connectors/local.js +23 -24
  278. package/dist/factory-assets/connectors/mattermost.js +23 -24
  279. package/dist/factory-assets/connectors/memory.js +23 -24
  280. package/dist/factory-assets/connectors/minio.js +23 -24
  281. package/dist/factory-assets/connectors/postgres.js +23 -24
  282. package/dist/factory-assets/connectors/s3.js +23 -24
  283. package/dist/factory-assets/connectors/sharepoint.js +23 -24
  284. package/dist/factory-assets/connectors/sqlite.js +23 -24
  285. package/dist/factory-assets/connectors/static-server.js +23 -24
  286. package/dist/factory-assets/connectors/tunnel.js +23 -24
  287. package/dist/factory-assets/connectors/webdav.js +23 -24
  288. package/dist/factory-assets/connectors/xstate-store.js +23 -24
  289. package/dist/factory-assets/connectors/xstate.js +23 -24
  290. package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +2 -1
  291. package/dist/{flows-QAO63TDV.js → flows-CIUPK7SB.js} +11 -11
  292. package/dist/{flows-QAO63TDV.js.map → flows-CIUPK7SB.js.map} +1 -1
  293. package/dist/{helpers-HDVGCF3M.js → helpers-YHDQHQEQ.js} +28 -29
  294. package/dist/{helpers-HDVGCF3M.js.map → helpers-YHDQHQEQ.js.map} +1 -1
  295. package/dist/library/index.js +10 -10
  296. package/dist/library/install.js +4 -4
  297. package/dist/library/src/manifest-writer.d.ts +9 -0
  298. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  299. package/dist/library/src/remote/remote-catalog-source.d.ts +9 -0
  300. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  301. package/dist/library/src/remote/rest-catalog-source.d.ts +1 -0
  302. package/dist/library/src/remote/rest-catalog-source.d.ts.map +1 -1
  303. package/dist/{library-publish-62OWCNB5.js → library-publish-MUGUST43.js} +53 -53
  304. package/dist/{library-publish-62OWCNB5.js.map → library-publish-MUGUST43.js.map} +1 -1
  305. package/dist/model-endpoint/index.js +9 -10
  306. package/dist/open-library-BVQCB37E.js +57 -0
  307. package/dist/{open-library-TZ7OSDEJ.js.map → open-library-BVQCB37E.js.map} +1 -1
  308. package/dist/{open-registry-RLZKTJG3.js → open-registry-JCSIAKEC.js} +14 -14
  309. package/dist/{open-registry-RLZKTJG3.js.map → open-registry-JCSIAKEC.js.map} +1 -1
  310. package/dist/{paths-D6LBQETQ.js → paths-XLKCAFRZ.js} +9 -9
  311. package/dist/{paths-D6LBQETQ.js.map → paths-XLKCAFRZ.js.map} +1 -1
  312. package/dist/{plugin-store-A5J4TLCH.js → plugin-store-NGRUTCJI.js} +9 -9
  313. package/dist/{plugin-store-A5J4TLCH.js.map → plugin-store-NGRUTCJI.js.map} +1 -1
  314. package/dist/project-BGYMLAS6.js +88 -0
  315. package/dist/{project-4AVRES3M.js.map → project-BGYMLAS6.js.map} +1 -1
  316. package/dist/resolver/index.js +7 -7
  317. package/dist/runner/index.js +38 -39
  318. package/dist/runner/src/capability-roundtrip.d.ts +4 -1
  319. package/dist/runner/src/capability-roundtrip.d.ts.map +1 -1
  320. package/dist/runner/src/composition/resolve-instance.d.ts.map +1 -1
  321. package/dist/runner/src/composition/resolve.d.ts +6 -0
  322. package/dist/runner/src/composition/resolve.d.ts.map +1 -1
  323. package/dist/runner/src/credential-notice.d.ts +3 -2
  324. package/dist/runner/src/credential-notice.d.ts.map +1 -1
  325. package/dist/runner/src/resources.d.ts.map +1 -1
  326. package/dist/runner/src/serve.d.ts.map +1 -1
  327. package/dist/sdk/asset-manager.js +13 -13
  328. package/dist/sdk/bridge.js +19 -20
  329. package/dist/sdk/core.js +6 -6
  330. package/dist/sdk/flow.js +7 -7
  331. package/dist/sdk/index.js +38 -39
  332. package/dist/sdk/index.js.map +1 -1
  333. package/dist/sdk/resolver.js +7 -7
  334. package/dist/sdk/runner.js +38 -39
  335. package/dist/sdk/session.js +2 -2
  336. package/dist/sdk/transport/ws/server.js +7 -7
  337. package/dist/sdk/transport/ws.js +7 -7
  338. package/dist/sdk/transport.js +7 -7
  339. package/dist/sdk/types.js +1 -1
  340. package/dist/serve-preflight-GQY5DZX6.js +56 -0
  341. package/dist/serve-preflight-GQY5DZX6.js.map +1 -0
  342. package/dist/session/index.js +2 -2
  343. package/dist/{setup-NSPQD4V4.js → setup-2NWSKSCO.js} +34 -32
  344. package/dist/setup-2NWSKSCO.js.map +1 -0
  345. package/dist/{skills-B533SRVZ.js → skills-PXZOL2FZ.js} +12 -12
  346. package/dist/{skills-B533SRVZ.js.map → skills-PXZOL2FZ.js.map} +1 -1
  347. package/dist/source-XA3L4H6I.js +86 -0
  348. package/dist/{source-VTECABUO.js.map → source-XA3L4H6I.js.map} +1 -1
  349. package/dist/{source-manifest-publish-YORI42MN.js → source-manifest-publish-QEGMTS33.js} +50 -51
  350. package/dist/source-manifest-publish-QEGMTS33.js.map +1 -0
  351. package/dist/transport/index.js +7 -7
  352. package/dist/transport/ws/server.js +7 -7
  353. package/dist/transport/ws.js +7 -7
  354. package/dist/tui/index.js +38 -39
  355. package/dist/tui/index.js.map +1 -1
  356. package/dist/types/index.js +1 -1
  357. package/dist/types/manifests.js +1 -1
  358. package/dist/types/src/capabilities.d.ts +9 -1
  359. package/dist/types/src/capabilities.d.ts.map +1 -1
  360. package/dist/types/src/manifests/agent.d.ts +2 -2
  361. package/dist/types/src/manifests/agent.d.ts.map +1 -1
  362. package/dist/types/src/version.d.ts +8 -8
  363. package/dist/workspace-plugin/adapters/mcp.js +30 -31
  364. package/dist/workspace-plugin/adapters/omp.js +14 -14
  365. package/dist/workspace-plugin/index.js +1 -1
  366. package/package.json +1 -1
  367. package/dist/chunk-6OHZUUR7.js.map +0 -1
  368. package/dist/chunk-6UP2EDFN.js.map +0 -1
  369. package/dist/chunk-6WH2WE4B.js.map +0 -1
  370. package/dist/chunk-72NT2TJU.js.map +0 -1
  371. package/dist/chunk-76FLBODK.js.map +0 -1
  372. package/dist/chunk-7MV3NHPT.js.map +0 -1
  373. package/dist/chunk-7QG2WRSN.js.map +0 -1
  374. package/dist/chunk-ELSGFI3I.js.map +0 -1
  375. package/dist/chunk-EQNIBBB6.js.map +0 -1
  376. package/dist/chunk-H622YULS.js.map +0 -1
  377. package/dist/chunk-HH2H2ZV7.js.map +0 -1
  378. package/dist/chunk-J5JRGBKK.js.map +0 -1
  379. package/dist/chunk-JMIKGAUA.js.map +0 -1
  380. package/dist/chunk-KGHYXXXV.js.map +0 -1
  381. package/dist/chunk-KIPCBIFJ.js.map +0 -1
  382. package/dist/chunk-LEJQAX7G.js.map +0 -1
  383. package/dist/chunk-MYXFR27L.js.map +0 -1
  384. package/dist/chunk-QTLUZUF2.js.map +0 -1
  385. package/dist/chunk-ROVZCGTN.js.map +0 -1
  386. package/dist/chunk-S6KZHPR4.js +0 -315
  387. package/dist/chunk-S6KZHPR4.js.map +0 -1
  388. package/dist/chunk-TO5SSMRI.js.map +0 -1
  389. package/dist/chunk-XBQTXGY4.js.map +0 -1
  390. package/dist/chunk-Y3I4KGLX.js.map +0 -1
  391. package/dist/chunk-ZEH4WFEG.js.map +0 -1
  392. package/dist/connectors-XYPE2DCQ.js +0 -50
  393. package/dist/ensure-sources-IN3VKHUA.js.map +0 -1
  394. package/dist/open-library-TZ7OSDEJ.js +0 -58
  395. package/dist/project-4AVRES3M.js +0 -88
  396. package/dist/serve-preflight-H2AYMGJ6.js.map +0 -1
  397. package/dist/setup-NSPQD4V4.js.map +0 -1
  398. package/dist/source-VTECABUO.js +0 -87
  399. package/dist/source-manifest-publish-YORI42MN.js.map +0 -1
@@ -1,15 +1,15 @@
1
- import { requireValidPublisherOrExit } from './chunk-ROVZCGTN.js';
2
- import { openLibraryManager } from './chunk-PL52CI4U.js';
3
- import { getKindRegistry, getKnownKinds } from './chunk-YW4ASEUP.js';
4
- import { S, logErr, logWarn, logInfo, logOk } from './chunk-7QG2WRSN.js';
5
- import { AssetManager } from './chunk-KGHYXXXV.js';
6
- import { getStoreManifestsDir, storeManifestFile, LocalCatalogSource, curatedManifestOverlay, writeCuratedManifest, commitStoreManifest } from './chunk-Y3I4KGLX.js';
7
- import { computeDeterministicHash, discoverAssetsInTree } from './chunk-XEVFSDIF.js';
8
- import { WorkspaceYamlEditor } from './chunk-J5JRGBKK.js';
9
- import { findWorkspaceRoot, workspaceConfigFilename, sourceShortName, sourceCacheKey, getGlobalCacheDir, attachToBranch, resolveSourcePublisher, resolveSkWorkspaceConfig, priorSourceCacheKeys, buildProvenanceIndex, getRepoCommit } from './chunk-XBQTXGY4.js';
10
- import { globalCacheRoot } from './chunk-L5VSIPQD.js';
11
- import { decodeSkaileManifest, encodeSkaileManifest } from './chunk-KPKGWXUJ.js';
12
- import { parseAssetRef } from './chunk-IZQOO6MN.js';
1
+ import { requireValidPublisherOrExit } from './chunk-7EMS2GZO.js';
2
+ import { openLibraryManager } from './chunk-YRC2EFOU.js';
3
+ import { getKindRegistry, getKnownKinds } from './chunk-WFLQMAR5.js';
4
+ import { S, logErr, logWarn, logInfo, logOk, logNoProject } from './chunk-Z2X7UZEZ.js';
5
+ import { AssetManager } from './chunk-IS3NIZBX.js';
6
+ import { getStoreManifestsDir, storeManifestFile, LocalCatalogSource, curatedManifestOverlay, writeCuratedManifest, commitStoreManifest } from './chunk-TGUMN5G7.js';
7
+ import { computeDeterministicHash, discoverAssetsInTree } from './chunk-22ZX33H6.js';
8
+ import { WorkspaceYamlEditor } from './chunk-UMLCKKIA.js';
9
+ import { workspaceConfigFilename, sourceShortName, sourceCacheKey, getGlobalCacheDir, isSourceCloned, discardUnclonedSourceDir, attachToBranch, resolveSourcePublisher, resolveSkWorkspaceConfig, priorSourceCacheKeys, buildProvenanceIndex, getRepoCommit } from './chunk-IWKKTCXY.js';
10
+ import { globalSkaileDir, globalCacheRoot } from './chunk-L5VSIPQD.js';
11
+ import { decodeSkaileManifest, encodeSkaileManifest } from './chunk-23SG4JRV.js';
12
+ import { parseAssetRef } from './chunk-V5KG6CCV.js';
13
13
  import { spawnSync } from 'child_process';
14
14
  import { existsSync, realpathSync, rmSync, renameSync, mkdirSync, statSync, readdirSync, rmdirSync, readFileSync, writeFileSync } from 'fs';
15
15
  import * as os from 'os';
@@ -23,8 +23,9 @@ function notWired(verb) {
23
23
  process.exit(2);
24
24
  }
25
25
  function resolveSourceArg(arg, projectDir, opts = {}) {
26
- const root = findWorkspaceRoot(projectDir);
27
- const registered = root ? readProjectSources(path2.join(root, workspaceConfigFilename())) : [];
26
+ const registered = readProjectSources(
27
+ path2.join(path2.resolve(projectDir), workspaceConfigFilename())
28
+ );
28
29
  const match = registered.find((e) => sourceMatchesKey(e, arg));
29
30
  const found = !match ? resolveByStoreSlug(arg, opts.byName ?? true) : void 0;
30
31
  const bySlug = found && "url" in found ? found : void 0;
@@ -380,12 +381,12 @@ function addSourceManifestCommands(src) {
380
381
  ).option("-C, --project-dir <dir>", "Project directory", process.cwd()).option("--publisher <name>", "Override the publisher (--overwrite only)").option("--dev", "Include assets under the source's dev_paths", false).option("--overwrite", "Discard curation and re-scan the full inventory", false).action((arg, opts) => runRebuild(arg, opts));
381
382
  manifest.command("verify <src>").description("Verify hashes, deps, and schema (read-only)").option("-C, --project-dir <dir>", "Project directory", process.cwd()).option("--strict", "Fail on advisory checks (warnings force a nonzero exit)", false).action((arg, opts) => runVerify(arg, opts));
382
383
  manifest.command("publish <src>").description("Push the curated sidecar manifest and publish it to the store").option("-C, --project-dir <dir>", "Project directory", process.cwd()).option("--as <namespace>", "Publisher namespace (default: your store username)").option("--sidecar-repo <url>", "Public GitHub repo you own to hold the curated manifest").option("--ref <gitref>", "Foreign source ref to ingest (branch/sha; default: main)").option("--dry-run", "Print the publish plan without pushing or calling the store", false).action(async (arg, opts) => {
383
- const { runPublish } = await import('./source-manifest-publish-YORI42MN.js');
384
+ const { runPublish } = await import('./source-manifest-publish-QEGMTS33.js');
384
385
  await runPublish(arg, opts);
385
386
  });
386
387
  manifest.command("propose <src>").description("Open a PR to upstream with the sidecar manifest").action(() => notWired("propose"));
387
388
  manifest.command("yank <src>").description("Retract the source's published assets from the store").option("-C, --project-dir <dir>", "Project directory", process.cwd()).option("--asset <ref>", "Yank only the asset matching this ref/name").action(async (arg, opts) => {
388
- const { runYank } = await import('./source-manifest-publish-YORI42MN.js');
389
+ const { runYank } = await import('./source-manifest-publish-QEGMTS33.js');
389
390
  await runYank(arg, opts);
390
391
  });
391
392
  }
@@ -411,10 +412,14 @@ function canonicalGitUrl(spec) {
411
412
  const noSlash = spec.replace(/\/+$/, "");
412
413
  const url = /^([a-z][a-z0-9+.-]*):\/\/([^/]*)(.*)$/i.exec(noSlash);
413
414
  if (url) {
415
+ const scheme = (url[1] ?? "").toLowerCase();
416
+ if (scheme === "file" && url[2] === "" && /(?:^|\/)\.\.?(?:\/|$)|\/\//.test(url[3] ?? "")) {
417
+ return `file://${path2.posix.normalize(url[3] ?? "")}`;
418
+ }
414
419
  const authority = url[2] ?? "";
415
420
  const at = authority.lastIndexOf("@");
416
421
  const host = authority.slice(at + 1).toLowerCase();
417
- return `${(url[1] ?? "").toLowerCase()}://${authority.slice(0, at + 1)}${host}${url[3] ?? ""}`;
422
+ return `${scheme}://${authority.slice(0, at + 1)}${host}${url[3] ?? ""}`;
418
423
  }
419
424
  const scp = /^(git@)([^:]+):(.*)$/.exec(noSlash);
420
425
  return scp ? `${scp[1]}${(scp[2] ?? "").toLowerCase()}:${scp[3] ?? ""}` : noSlash;
@@ -497,12 +502,14 @@ function realLocalCacheKey(url) {
497
502
  }
498
503
  return sourceCacheKey(url);
499
504
  }
500
- function requireProjectYamlPath() {
501
- const root = findWorkspaceRoot(process.cwd());
505
+ function projectRootOf(projectDir) {
506
+ const dir = path2.resolve(projectDir);
507
+ return existsSync(path2.join(dir, workspaceConfigFilename())) ? dir : void 0;
508
+ }
509
+ function requireProjectYamlPath(projectDir) {
510
+ const root = projectRootOf(projectDir);
502
511
  if (!root) {
503
- logErr(
504
- "No skaile.yaml found in the current directory or any parent. Run `skaile init` first."
505
- );
512
+ logNoProject(projectDir);
506
513
  process.exit(1);
507
514
  }
508
515
  return path2.join(root, workspaceConfigFilename());
@@ -540,7 +547,8 @@ function pruneEmptyCloneParents(dest) {
540
547
  function ensureClone(entry, opts = {}) {
541
548
  const dest = sourceClonePath(sourceCacheKey(entry.url));
542
549
  let backup;
543
- if (existsSync(dest)) {
550
+ if (!isSourceCloned(dest)) discardUnclonedSourceDir(dest);
551
+ if (isSourceCloned(dest)) {
544
552
  if (!opts.force) return false;
545
553
  backup = `${dest}.bak`;
546
554
  rmSync(backup, { recursive: true, force: true });
@@ -642,10 +650,8 @@ async function refreshManifestCache(entry, includeDev = false) {
642
650
  });
643
651
  const cfg = added.backendConfig;
644
652
  const recorded = "url" in cfg ? cfg.publisher : void 0;
645
- const publisher = entry.publisher ?? recorded;
646
- const lib = entry.publisher === void 0 || recorded === entry.publisher ? added : await manager.updateLibrary(added.id, {
647
- backendConfig: { ...added.backendConfig, publisher: entry.publisher }
648
- });
653
+ const publisher = existing || legacyRow ? recorded : entry.publisher;
654
+ const lib = added;
649
655
  const catalog = new LocalCatalogSource(library, lib.id, dest, getKindRegistry(), {
650
656
  sidecarManifestFile: curatedManifestOverlay(entry.url),
651
657
  publisher
@@ -658,10 +664,10 @@ async function refreshManifestCache(entry, includeDev = false) {
658
664
  }
659
665
  }
660
666
  async function restoreSourceReaders(projectDir) {
661
- const root = findWorkspaceRoot(projectDir);
667
+ const root = projectRootOf(projectDir);
662
668
  if (!root) return [];
663
669
  const sources = readProjectSources(path2.join(root, workspaceConfigFilename()));
664
- const cached = sources.filter((s) => existsSync(sourceClonePath(sourceCacheKey(s.url))));
670
+ const cached = sources.filter((s) => isSourceCloned(sourceClonePath(sourceCacheKey(s.url))));
665
671
  if (cached.length === 0) return [];
666
672
  const { manager, close } = await openLibraryManager();
667
673
  let missing;
@@ -689,7 +695,7 @@ async function restoreSourceReaders(projectDir) {
689
695
  return restored;
690
696
  }
691
697
  async function autoSyncForSearch(projectDir) {
692
- const root = findWorkspaceRoot(projectDir);
698
+ const root = projectRootOf(projectDir);
693
699
  if (!root) return false;
694
700
  if (readProjectSources(path2.join(root, workspaceConfigFilename())).length === 0) return false;
695
701
  logInfo("sources not synced \u2014 syncing now\u2026");
@@ -697,7 +703,7 @@ async function autoSyncForSearch(projectDir) {
697
703
  return synced > 0;
698
704
  }
699
705
  async function syncProjectSources(projectDir, opts = {}) {
700
- const root = findWorkspaceRoot(projectDir) ?? projectDir;
706
+ const root = path2.resolve(projectDir);
701
707
  const sources = readProjectSources(path2.join(root, workspaceConfigFilename()));
702
708
  let synced = 0;
703
709
  let failed = 0;
@@ -705,12 +711,14 @@ async function syncProjectSources(projectDir, opts = {}) {
705
711
  const slug = sourceShortName(entry.url);
706
712
  const dest = sourceClonePath(sourceCacheKey(entry.url));
707
713
  try {
708
- if (!existsSync(dest)) {
714
+ if (!isSourceCloned(dest)) {
715
+ discardUnclonedSourceDir(dest);
709
716
  mkdirSync(path2.dirname(dest), { recursive: true });
710
717
  const args = ["clone", entry.url, dest];
711
718
  if (entry.pin) args.splice(1, 0, "--branch", entry.pin);
712
719
  const clone = spawnSync("git", args, { stdio: "ignore" });
713
720
  if (clone.status !== 0) {
721
+ discardUnclonedSourceDir(dest);
714
722
  logWarn(`${slug}: git clone failed, skipping.`);
715
723
  failed++;
716
724
  continue;
@@ -735,7 +743,7 @@ async function syncProjectSources(projectDir, opts = {}) {
735
743
  return { total: sources.length, synced, failed };
736
744
  }
737
745
  function divergedSourceClones(projectDir) {
738
- const root = findWorkspaceRoot(projectDir) ?? projectDir;
746
+ const root = path2.resolve(projectDir);
739
747
  const diverged = [];
740
748
  for (const entry of readProjectSources(path2.join(root, workspaceConfigFilename()))) {
741
749
  const dest = sourceClonePath(sourceCacheKey(entry.url));
@@ -798,6 +806,24 @@ async function localPathNotASource(source) {
798
806
  }
799
807
  return void 0;
800
808
  }
809
+ async function remoteOfRegisteredLibrary(url) {
810
+ const key = sourceCacheKey(url);
811
+ const cloneRoots = [getGlobalCacheDir(), path2.join(globalSkaileDir(), "sources")].map(
812
+ (d) => path2.resolve(d)
813
+ );
814
+ const { manager, close } = await openLibraryManager();
815
+ try {
816
+ const lib = (await manager.listLibraries()).find((l) => {
817
+ const remote = "url" in l.backendConfig ? l.backendConfig.url : void 0;
818
+ if (typeof remote !== "string" || sourceCacheKey(remote) !== key) return false;
819
+ const at = path2.resolve(l.path);
820
+ return !cloneRoots.some((root) => at.startsWith(root + path2.sep));
821
+ });
822
+ return lib ? `${url} is the remote of the library "${lib.name}"; it needs no source \u2014 \`skaile library list\` shows it and its assets are already searchable.` : void 0;
823
+ } finally {
824
+ close();
825
+ }
826
+ }
801
827
  function makeSourceCommand() {
802
828
  const cmd = new Command("source").description(
803
829
  "Manage github sources for the current project (recorded in skaile.yaml)"
@@ -811,7 +837,7 @@ function makeSourceCommand() {
811
837
  ).option(
812
838
  "--publisher <name>",
813
839
  "Publisher of the source's assets when its skaile.manifest.yaml declares none (required for a non-GitHub URL)"
814
- ).option("--dev", "Also index dev-only assets under the source's dev_paths", false).option("--verbose", "List every referenced file outside the asset filter", false).action(
840
+ ).option("--dev", "Also index dev-only assets under the source's dev_paths", false).option("--verbose", "List every referenced file outside the asset filter", false).option("--project-dir <path>", "Project directory", process.cwd()).action(
815
841
  async (source, opts) => {
816
842
  if (/^[\w.-]+$/.test(source.trim().replace(/\.git$/, ""))) {
817
843
  logErr(
@@ -827,7 +853,13 @@ function makeSourceCommand() {
827
853
  return;
828
854
  }
829
855
  let url = normalizeSourceUrl(source);
830
- const yamlPath = requireProjectYamlPath();
856
+ const ownLibrary = await remoteOfRegisteredLibrary(url);
857
+ if (ownLibrary) {
858
+ logErr(ownLibrary);
859
+ process.exitCode = 1;
860
+ return;
861
+ }
862
+ const yamlPath = requireProjectYamlPath(opts.projectDir);
831
863
  const collision = findCacheKeyCollision(readProjectSources(yamlPath), url);
832
864
  if (collision && isLocalSourceUrl(collision.url) && isLocalSourceUrl(url)) {
833
865
  url = collision.url;
@@ -868,7 +900,7 @@ function makeSourceCommand() {
868
900
  return;
869
901
  }
870
902
  const dest = sourceClonePath(sourceCacheKey(url));
871
- const preexisting = existsSync(dest);
903
+ const preexisting = isSourceCloned(dest);
872
904
  const cloned = ensureClone(entry, { force: opts.force });
873
905
  const noPublisher = await publisherProblem(entry, dest);
874
906
  if (noPublisher) {
@@ -913,8 +945,8 @@ function makeSourceCommand() {
913
945
  }
914
946
  }
915
947
  );
916
- cmd.command("list").description("List sources registered in this project's skaile.yaml").option("--json", "Output as JSON").action(async (opts) => {
917
- const yamlPath = requireProjectYamlPath();
948
+ cmd.command("list").description("List sources registered in this project's skaile.yaml").option("--json", "Output as JSON").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
949
+ const yamlPath = requireProjectYamlPath(opts.projectDir);
918
950
  const sources = readProjectSources(yamlPath);
919
951
  if (opts.json) return console.log(JSON.stringify(sources, null, 2));
920
952
  if (sources.length === 0) {
@@ -925,15 +957,15 @@ function makeSourceCommand() {
925
957
  console.log(S.heading(" Sources"));
926
958
  for (const s of sources) {
927
959
  const slug = sourceLabel(s, sources);
928
- const cached = existsSync(sourceClonePath(sourceCacheKey(s.url))) ? "" : S.warn(" (not cached)");
960
+ const cached = isSourceCloned(sourceClonePath(sourceCacheKey(s.url))) ? "" : S.warn(" (not cached)");
929
961
  console.log(` ${S.cmd(slug.padEnd(24))} ${S.dim(s.url)}${cached}`);
930
962
  }
931
963
  console.log(`
932
964
  ${S.dim(`${sources.length} source(s)`)}
933
965
  `);
934
966
  });
935
- cmd.command("show <name-or-url>").description("Show details for a source (matched by URL or derived slug)").action(async (key) => {
936
- const yamlPath = requireProjectYamlPath();
967
+ cmd.command("show <name-or-url>").description("Show details for a source (matched by URL or derived slug)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (key, opts) => {
968
+ const yamlPath = requireProjectYamlPath(opts.projectDir);
937
969
  const all = readProjectSources(yamlPath);
938
970
  const resolved = resolveSource(all, key);
939
971
  if (resolved.kind === "none") {
@@ -950,7 +982,7 @@ function makeSourceCommand() {
950
982
  ...entry,
951
983
  slug,
952
984
  clonePath,
953
- cached: existsSync(clonePath)
985
+ cached: isSourceCloned(clonePath)
954
986
  },
955
987
  null,
956
988
  2
@@ -961,8 +993,8 @@ function makeSourceCommand() {
961
993
  "--purge",
962
994
  `Also delete the cached clone from ${path2.join(globalCacheRoot(), "sources")}${path2.sep}`,
963
995
  false
964
- ).option("--force", "Remove the source although a locked asset still comes from it", false).action(async (key, opts) => {
965
- const yamlPath = requireProjectYamlPath();
996
+ ).option("--force", "Remove the source although a locked asset still comes from it", false).option("--project-dir <path>", "Project directory", process.cwd()).action(async (key, opts) => {
997
+ const yamlPath = requireProjectYamlPath(opts.projectDir);
966
998
  const editor = loadProjectEditor(yamlPath);
967
999
  const all = editor.getSources();
968
1000
  const resolved = resolveSource(all, key);
@@ -990,9 +1022,9 @@ function makeSourceCommand() {
990
1022
  opts.purge ? `Removed source "${slug}" and purged its clone.` : `Removed source "${slug}" from skaile.yaml (clone left in ${path2.join(globalCacheRoot(), "sources")} \u2014 pass --purge to remove it, or run \`skaile cache clean --global\`).`
991
1023
  );
992
1024
  });
993
- cmd.command("sync [name]").description("Pull upstream changes and refresh the manifest cache").option("--dev", "Also index dev-only assets under each source's dev_paths", false).option("--verbose", "List every referenced file outside the asset filter", false).option("--all", "Sync every source without prompting", false).action(
1025
+ cmd.command("sync [name]").description("Pull upstream changes and refresh the manifest cache").option("--dev", "Also index dev-only assets under each source's dev_paths", false).option("--verbose", "List every referenced file outside the asset filter", false).option("--all", "Sync every source without prompting", false).option("--project-dir <path>", "Project directory", process.cwd()).action(
994
1026
  async (key, opts) => {
995
- const yamlPath = requireProjectYamlPath();
1027
+ const yamlPath = requireProjectYamlPath(opts.projectDir);
996
1028
  const sources = readProjectSources(yamlPath);
997
1029
  if (sources.length === 0) {
998
1030
  logInfo("No sources in skaile.yaml.");
@@ -1029,7 +1061,7 @@ function makeSourceCommand() {
1029
1061
  for (const entry of targets) {
1030
1062
  const slug = sourceLabel(entry, sources);
1031
1063
  const dest = sourceClonePath(sourceCacheKey(entry.url));
1032
- if (!existsSync(dest)) {
1064
+ if (!isSourceCloned(dest)) {
1033
1065
  ensureClone(entry);
1034
1066
  logOk(`${slug}: cloned to ${dest}.`);
1035
1067
  } else {
@@ -1072,6 +1104,6 @@ function makeSourceCommand() {
1072
1104
  return cmd;
1073
1105
  }
1074
1106
 
1075
- export { autoSyncForSearch, divergedSourceClones, ensureClone, findCacheKeyCollision, indexingHadFailures, legacySourceConfigHint, loadProjectEditor, localPathNotASource, makeSourceCommand, missingManifestMessage, normalizeSourceUrl, pullSourceClone, readProjectSources, resolveSource, resolveSourceArg, restoreSourceReaders, sourceClonePath, sourceLabel, sourceMatchesKey, syncProjectSources };
1076
- //# sourceMappingURL=chunk-LEJQAX7G.js.map
1077
- //# sourceMappingURL=chunk-LEJQAX7G.js.map
1107
+ export { autoSyncForSearch, divergedSourceClones, ensureClone, findCacheKeyCollision, indexingHadFailures, legacySourceConfigHint, loadProjectEditor, localPathNotASource, makeSourceCommand, missingManifestMessage, normalizeSourceUrl, pullSourceClone, readProjectSources, remoteOfRegisteredLibrary, resolveSource, resolveSourceArg, restoreSourceReaders, sourceClonePath, sourceLabel, sourceMatchesKey, syncProjectSources };
1108
+ //# sourceMappingURL=chunk-DNXPXJ3X.js.map
1109
+ //# sourceMappingURL=chunk-DNXPXJ3X.js.map