@skaile/workspaces 6.0.0 → 6.2.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 (431) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/dist/{asset-feeds-PXUWCXVI.js → asset-feeds-KPKCE64E.js} +31 -23
  3. package/dist/asset-feeds-KPKCE64E.js.map +1 -0
  4. package/dist/asset-manager/catalog-deployer.js +10 -10
  5. package/dist/asset-manager/fragments.js +1 -1
  6. package/dist/asset-manager/index.js +19 -19
  7. package/dist/asset-manager/installer.js +13 -13
  8. package/dist/asset-manager/renderers.js +11 -11
  9. package/dist/asset-manager/src/index.d.ts +339 -19
  10. package/dist/asset-manager/src/index.d.ts.map +1 -1
  11. package/dist/asset-manager/src/installer.d.ts +40 -0
  12. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  13. package/dist/asset-manager/src/mcp-config.d.ts +21 -0
  14. package/dist/asset-manager/src/mcp-config.d.ts.map +1 -1
  15. package/dist/asset-manager/src/renderers.d.ts +7 -0
  16. package/dist/asset-manager/src/renderers.d.ts.map +1 -1
  17. package/dist/bridge/harnesses/claude-sdk.js +18 -22
  18. package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
  19. package/dist/bridge/harnesses/codex.js +24 -17
  20. package/dist/bridge/harnesses/codex.js.map +1 -1
  21. package/dist/bridge/harnesses/continue.js +14 -14
  22. package/dist/bridge/harnesses/echo.js +4 -4
  23. package/dist/bridge/harnesses/gemini.js +10 -10
  24. package/dist/bridge/harnesses/goose.js +14 -14
  25. package/dist/bridge/harnesses/omp.js +15 -8
  26. package/dist/bridge/harnesses/omp.js.map +1 -1
  27. package/dist/bridge/harnesses/opencode.js +14 -14
  28. package/dist/bridge/harnesses/qwen.js +10 -10
  29. package/dist/bridge/index.js +19 -19
  30. package/dist/bridge/src/claude-sdk-surface.d.ts +17 -0
  31. package/dist/bridge/src/claude-sdk-surface.d.ts.map +1 -0
  32. package/dist/bridge/src/harness-model-check.d.ts +30 -0
  33. package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
  34. package/dist/bridge/src/harnesses/_subprocess-cli.d.ts.map +1 -1
  35. package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -1
  36. package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
  37. package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
  38. package/dist/bridge/src/index.d.ts +2 -1
  39. package/dist/bridge/src/index.d.ts.map +1 -1
  40. package/dist/bridge/src/normalizer.d.ts +3 -1
  41. package/dist/bridge/src/normalizer.d.ts.map +1 -1
  42. package/dist/bridge/src/runner-private-env.d.ts +7 -0
  43. package/dist/bridge/src/runner-private-env.d.ts.map +1 -1
  44. package/dist/{chunk-HK7HMEPT.js → chunk-27SXN33H.js} +13 -5
  45. package/dist/chunk-27SXN33H.js.map +1 -0
  46. package/dist/{chunk-TKHJXPSB.js → chunk-2XM3ZH36.js} +183 -33
  47. package/dist/chunk-2XM3ZH36.js.map +1 -0
  48. package/dist/{chunk-E3GPGTW3.js → chunk-3HACK2Z7.js} +142 -28
  49. package/dist/chunk-3HACK2Z7.js.map +1 -0
  50. package/dist/{chunk-T2BDID2J.js → chunk-5JPW27BI.js} +10 -9
  51. package/dist/chunk-5JPW27BI.js.map +1 -0
  52. package/dist/{chunk-2UUKCROR.js → chunk-5LQ62LNT.js} +4 -4
  53. package/dist/{chunk-2UUKCROR.js.map → chunk-5LQ62LNT.js.map} +1 -1
  54. package/dist/{chunk-UL22SDGR.js → chunk-6CYKTHNT.js} +194 -127
  55. package/dist/chunk-6CYKTHNT.js.map +1 -0
  56. package/dist/{chunk-XFIEVEU7.js → chunk-6OHZUUR7.js} +5 -4
  57. package/dist/chunk-6OHZUUR7.js.map +1 -0
  58. package/dist/{chunk-E572OHGY.js → chunk-76FLBODK.js} +4 -3
  59. package/dist/chunk-76FLBODK.js.map +1 -0
  60. package/dist/{chunk-GN4VVSAA.js → chunk-7DRFKAJZ.js} +7 -7
  61. package/dist/{chunk-GN4VVSAA.js.map → chunk-7DRFKAJZ.js.map} +1 -1
  62. package/dist/chunk-7H6XRCPG.js +31 -0
  63. package/dist/chunk-7H6XRCPG.js.map +1 -0
  64. package/dist/{chunk-MCUJTNY5.js → chunk-7Y6S4XLL.js} +3 -3
  65. package/dist/{chunk-MCUJTNY5.js.map → chunk-7Y6S4XLL.js.map} +1 -1
  66. package/dist/{chunk-DHYSUJ3H.js → chunk-BEYNH2LS.js} +4 -4
  67. package/dist/{chunk-DHYSUJ3H.js.map → chunk-BEYNH2LS.js.map} +1 -1
  68. package/dist/{chunk-GEQSUC6U.js → chunk-BOT64P3U.js} +4 -4
  69. package/dist/{chunk-GEQSUC6U.js.map → chunk-BOT64P3U.js.map} +1 -1
  70. package/dist/{chunk-L4YKW5AY.js → chunk-BRK5QZKI.js} +121 -20
  71. package/dist/chunk-BRK5QZKI.js.map +1 -0
  72. package/dist/{chunk-YGRZNFRO.js → chunk-BY5WIRCU.js} +58 -5
  73. package/dist/chunk-BY5WIRCU.js.map +1 -0
  74. package/dist/{chunk-Z7ZEZZB6.js → chunk-C5HFK34M.js} +3 -3
  75. package/dist/chunk-C5HFK34M.js.map +1 -0
  76. package/dist/{chunk-DUMTLYSO.js → chunk-COAFAYBS.js} +31 -7
  77. package/dist/chunk-COAFAYBS.js.map +1 -0
  78. package/dist/{chunk-7XSAW5OC.js → chunk-E5NQRHEB.js} +30 -7
  79. package/dist/chunk-E5NQRHEB.js.map +1 -0
  80. package/dist/{chunk-BFMYYNDT.js → chunk-F3D25RGM.js} +11 -3
  81. package/dist/chunk-F3D25RGM.js.map +1 -0
  82. package/dist/{chunk-VBI7HGHB.js → chunk-GF5JXQIZ.js} +3 -3
  83. package/dist/{chunk-VBI7HGHB.js.map → chunk-GF5JXQIZ.js.map} +1 -1
  84. package/dist/{chunk-ZFUZ5AKM.js → chunk-I7LC5TDY.js} +3 -3
  85. package/dist/{chunk-ZFUZ5AKM.js.map → chunk-I7LC5TDY.js.map} +1 -1
  86. package/dist/{chunk-3IXIEHUB.js → chunk-ICSGNT5P.js} +7 -7
  87. package/dist/{chunk-3IXIEHUB.js.map → chunk-ICSGNT5P.js.map} +1 -1
  88. package/dist/{chunk-WEH33JSG.js → chunk-ITFCWMOY.js} +93 -29
  89. package/dist/chunk-ITFCWMOY.js.map +1 -0
  90. package/dist/{chunk-WDXZA7QW.js → chunk-IZQOO6MN.js} +2 -2
  91. package/dist/{chunk-WDXZA7QW.js.map → chunk-IZQOO6MN.js.map} +1 -1
  92. package/dist/{chunk-WDAIWDLK.js → chunk-JFLQICIU.js} +5 -5
  93. package/dist/{chunk-WDAIWDLK.js.map → chunk-JFLQICIU.js.map} +1 -1
  94. package/dist/{chunk-ARWKK325.js → chunk-JJJ2G4K2.js} +5 -5
  95. package/dist/{chunk-ARWKK325.js.map → chunk-JJJ2G4K2.js.map} +1 -1
  96. package/dist/{chunk-GOCWM7FN.js → chunk-JMIKGAUA.js} +43 -4
  97. package/dist/chunk-JMIKGAUA.js.map +1 -0
  98. package/dist/{chunk-X3RMRJNR.js → chunk-JRN5QF4C.js} +8 -3
  99. package/dist/chunk-JRN5QF4C.js.map +1 -0
  100. package/dist/{chunk-SNEE6UGY.js → chunk-K3R2UKG7.js} +18 -12
  101. package/dist/chunk-K3R2UKG7.js.map +1 -0
  102. package/dist/{chunk-VXEYX73S.js → chunk-KB56WBQ3.js} +4 -4
  103. package/dist/{chunk-VXEYX73S.js.map → chunk-KB56WBQ3.js.map} +1 -1
  104. package/dist/{chunk-OHNKYHRR.js → chunk-KJSC2ZD6.js} +264 -18
  105. package/dist/chunk-KJSC2ZD6.js.map +1 -0
  106. package/dist/{chunk-UQ33Y4DM.js → chunk-KPKGWXUJ.js} +4 -4
  107. package/dist/{chunk-UQ33Y4DM.js.map → chunk-KPKGWXUJ.js.map} +1 -1
  108. package/dist/{chunk-AF432MS3.js → chunk-KXJMQTOU.js} +3 -3
  109. package/dist/{chunk-AF432MS3.js.map → chunk-KXJMQTOU.js.map} +1 -1
  110. package/dist/chunk-LRBP3234.js +302 -0
  111. package/dist/chunk-LRBP3234.js.map +1 -0
  112. package/dist/{chunk-UVVVR4XO.js → chunk-M4OG2YN4.js} +4 -4
  113. package/dist/{chunk-UVVVR4XO.js.map → chunk-M4OG2YN4.js.map} +1 -1
  114. package/dist/{chunk-QOM5Z62G.js → chunk-MAZ3UXJK.js} +17 -24
  115. package/dist/chunk-MAZ3UXJK.js.map +1 -0
  116. package/dist/{chunk-Y2TO2U7W.js → chunk-MM4YO3EL.js} +3 -3
  117. package/dist/{chunk-Y2TO2U7W.js.map → chunk-MM4YO3EL.js.map} +1 -1
  118. package/dist/{chunk-OULSJRXV.js → chunk-OCQNUV4T.js} +7 -7
  119. package/dist/{chunk-OULSJRXV.js.map → chunk-OCQNUV4T.js.map} +1 -1
  120. package/dist/{chunk-SZXGRHQQ.js → chunk-PJJSBZZP.js} +4 -4
  121. package/dist/{chunk-SZXGRHQQ.js.map → chunk-PJJSBZZP.js.map} +1 -1
  122. package/dist/{chunk-OAHVKSQJ.js → chunk-PKBLJI23.js} +1471 -126
  123. package/dist/chunk-PKBLJI23.js.map +1 -0
  124. package/dist/{chunk-NOA6EJXE.js → chunk-PKE3PXOK.js} +3 -3
  125. package/dist/{chunk-NOA6EJXE.js.map → chunk-PKE3PXOK.js.map} +1 -1
  126. package/dist/{chunk-WYHQUCHR.js → chunk-PMWRM4EJ.js} +109 -48
  127. package/dist/chunk-PMWRM4EJ.js.map +1 -0
  128. package/dist/{chunk-H6UVIKQ2.js → chunk-PNUM7GUY.js} +3 -3
  129. package/dist/{chunk-H6UVIKQ2.js.map → chunk-PNUM7GUY.js.map} +1 -1
  130. package/dist/{chunk-SRODW6M2.js → chunk-Q5RN4PWV.js} +3 -3
  131. package/dist/{chunk-SRODW6M2.js.map → chunk-Q5RN4PWV.js.map} +1 -1
  132. package/dist/{chunk-LN6QB7XI.js → chunk-QIHL3YPL.js} +4 -4
  133. package/dist/{chunk-LN6QB7XI.js.map → chunk-QIHL3YPL.js.map} +1 -1
  134. package/dist/{chunk-U56GGCC2.js → chunk-QK7AG5AV.js} +4 -4
  135. package/dist/{chunk-U56GGCC2.js.map → chunk-QK7AG5AV.js.map} +1 -1
  136. package/dist/{chunk-OTIB4D2K.js → chunk-QPWR3YMY.js} +15 -5
  137. package/dist/chunk-QPWR3YMY.js.map +1 -0
  138. package/dist/{chunk-4DWBSTYA.js → chunk-QXKUFROW.js} +22 -5
  139. package/dist/chunk-QXKUFROW.js.map +1 -0
  140. package/dist/{chunk-4XWLB7JB.js → chunk-RQMIZONH.js} +95 -35
  141. package/dist/chunk-RQMIZONH.js.map +1 -0
  142. package/dist/{chunk-LSI2IVFT.js → chunk-RXGPFAMN.js} +4 -3
  143. package/dist/chunk-RXGPFAMN.js.map +1 -0
  144. package/dist/{chunk-3JKGY2YC.js → chunk-S2H3RBK7.js} +182 -33
  145. package/dist/chunk-S2H3RBK7.js.map +1 -0
  146. package/dist/{chunk-VJRTDKXS.js → chunk-SJNZ4WPA.js} +165 -106
  147. package/dist/chunk-SJNZ4WPA.js.map +1 -0
  148. package/dist/{chunk-KX2PT5Q4.js → chunk-T2VBPVWZ.js} +77 -18
  149. package/dist/chunk-T2VBPVWZ.js.map +1 -0
  150. package/dist/{chunk-6Z5KTFJT.js → chunk-TSTRH4SM.js} +3 -3
  151. package/dist/{chunk-6Z5KTFJT.js.map → chunk-TSTRH4SM.js.map} +1 -1
  152. package/dist/{chunk-7CV3HFWJ.js → chunk-TZERN27L.js} +5 -5
  153. package/dist/{chunk-7CV3HFWJ.js.map → chunk-TZERN27L.js.map} +1 -1
  154. package/dist/{chunk-JDR6ILCW.js → chunk-U673DB5U.js} +4 -4
  155. package/dist/{chunk-JDR6ILCW.js.map → chunk-U673DB5U.js.map} +1 -1
  156. package/dist/{chunk-FKU57Q5Q.js → chunk-URCJIV7T.js} +3 -3
  157. package/dist/{chunk-FKU57Q5Q.js.map → chunk-URCJIV7T.js.map} +1 -1
  158. package/dist/{chunk-ADPM6AYF.js → chunk-VSX2G7LA.js} +3 -3
  159. package/dist/{chunk-ADPM6AYF.js.map → chunk-VSX2G7LA.js.map} +1 -1
  160. package/dist/{chunk-F2GOZMRA.js → chunk-X37JUNEW.js} +49 -49
  161. package/dist/chunk-X37JUNEW.js.map +1 -0
  162. package/dist/{chunk-NMI2TWMH.js → chunk-Z3IRZBXB.js} +158 -344
  163. package/dist/chunk-Z3IRZBXB.js.map +1 -0
  164. package/dist/{chunk-7TPYPVAH.js → chunk-ZWJCRHP3.js} +3 -3
  165. package/dist/{chunk-7TPYPVAH.js.map → chunk-ZWJCRHP3.js.map} +1 -1
  166. package/dist/{claude-code-VJGYBXQR.js → claude-code-BBMNVH2J.js} +5 -5
  167. package/dist/{claude-code-VJGYBXQR.js.map → claude-code-BBMNVH2J.js.map} +1 -1
  168. package/dist/cli/index.js +964 -501
  169. package/dist/cli/index.js.map +1 -1
  170. package/dist/cli/src/agent-pins.d.ts +11 -0
  171. package/dist/cli/src/agent-pins.d.ts.map +1 -1
  172. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  173. package/dist/cli/src/commands/catalog.d.ts +1 -1
  174. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  175. package/dist/cli/src/commands/config.d.ts.map +1 -1
  176. package/dist/cli/src/commands/diff.d.ts.map +1 -1
  177. package/dist/cli/src/commands/harness.d.ts +24 -0
  178. package/dist/cli/src/commands/harness.d.ts.map +1 -0
  179. package/dist/cli/src/commands/integration.d.ts.map +1 -1
  180. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  181. package/dist/cli/src/commands/library-index.d.ts +28 -3
  182. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  183. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  184. package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -1
  185. package/dist/cli/src/commands/outdated.d.ts.map +1 -1
  186. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
  187. package/dist/cli/src/commands/project.d.ts +19 -1
  188. package/dist/cli/src/commands/project.d.ts.map +1 -1
  189. package/dist/cli/src/commands/rebuild.d.ts.map +1 -1
  190. package/dist/cli/src/commands/run.d.ts.map +1 -1
  191. package/dist/cli/src/commands/serve-preflight.d.ts +31 -1
  192. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  193. package/dist/cli/src/commands/serve.d.ts +10 -0
  194. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  195. package/dist/cli/src/commands/session-logs/local-query.d.ts +2 -0
  196. package/dist/cli/src/commands/session-logs/local-query.d.ts.map +1 -1
  197. package/dist/cli/src/commands/source-manifest-publish.d.ts.map +1 -1
  198. package/dist/cli/src/commands/source-manifest.d.ts +19 -7
  199. package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
  200. package/dist/cli/src/commands/source.d.ts +9 -2
  201. package/dist/cli/src/commands/source.d.ts.map +1 -1
  202. package/dist/cli/src/commands/store.d.ts.map +1 -1
  203. package/dist/cli/src/commands/update.d.ts.map +1 -1
  204. package/dist/cli/src/commands/validate-instances.d.ts.map +1 -1
  205. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  206. package/dist/cli/src/commands/why.d.ts.map +1 -1
  207. package/dist/cli/src/config-checks.d.ts +55 -0
  208. package/dist/cli/src/config-checks.d.ts.map +1 -0
  209. package/dist/cli/src/harness-error.d.ts +12 -1
  210. package/dist/cli/src/harness-error.d.ts.map +1 -1
  211. package/dist/cli/src/helpers.d.ts +18 -8
  212. package/dist/cli/src/helpers.d.ts.map +1 -1
  213. package/dist/cli/src/plugin-store/index.d.ts +10 -1
  214. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  215. package/dist/cli/src/plugin-store/spec.d.ts +8 -0
  216. package/dist/cli/src/plugin-store/spec.d.ts.map +1 -1
  217. package/dist/cli/src/skill-checks.d.ts +27 -0
  218. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  219. package/dist/cli/src/store-addable.d.ts +11 -0
  220. package/dist/cli/src/store-addable.d.ts.map +1 -1
  221. package/dist/connectors/config.js +5 -5
  222. package/dist/connectors/index.js +23 -23
  223. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  224. package/dist/connectors-47EM6C2P.js +48 -0
  225. package/dist/{connectors-CXZLXAFZ.js.map → connectors-47EM6C2P.js.map} +1 -1
  226. package/dist/core/framework.js +1 -1
  227. package/dist/core/index.js +9 -9
  228. package/dist/core/manifest.js +2 -2
  229. package/dist/core/models.js +1 -1
  230. package/dist/core/provider-registry-credentials.js +2 -2
  231. package/dist/core/provider-registry.js +1 -1
  232. package/dist/core/publish-manifest.js +3 -3
  233. package/dist/core/ref.js +1 -1
  234. package/dist/core/runtime-assets.js +5 -5
  235. package/dist/core/src/agent-instances.d.ts.map +1 -1
  236. package/dist/core/src/config-key-diagnostics.d.ts +9 -0
  237. package/dist/core/src/config-key-diagnostics.d.ts.map +1 -0
  238. package/dist/core/src/framework.d.ts +5 -3
  239. package/dist/core/src/framework.d.ts.map +1 -1
  240. package/dist/core/src/index.d.ts +3 -2
  241. package/dist/core/src/index.d.ts.map +1 -1
  242. package/dist/core/src/lock.d.ts +12 -0
  243. package/dist/core/src/lock.d.ts.map +1 -1
  244. package/dist/core/src/manifest.d.ts +25 -0
  245. package/dist/core/src/manifest.d.ts.map +1 -1
  246. package/dist/core/src/models.d.ts +15 -0
  247. package/dist/core/src/models.d.ts.map +1 -1
  248. package/dist/core/src/provider-registry.d.ts +6 -0
  249. package/dist/core/src/provider-registry.d.ts.map +1 -1
  250. package/dist/core/src/workspace-config.d.ts +18 -1
  251. package/dist/core/src/workspace-config.d.ts.map +1 -1
  252. package/dist/core/src/workspace-yaml-editor.d.ts +9 -2
  253. package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
  254. package/dist/core/workspace-config.js +4 -4
  255. package/dist/deploy/index.js +9 -9
  256. package/dist/discovery/index.js +5 -5
  257. package/dist/discovery/src/builtin-providers.d.ts.map +1 -1
  258. package/dist/discovery/src/parse-manifest.d.ts.map +1 -1
  259. package/dist/{ensure-sources-UPTHZKGF.js → ensure-sources-K5EFNC3L.js} +36 -22
  260. package/dist/ensure-sources-K5EFNC3L.js.map +1 -0
  261. package/dist/factory-assets/connectors/box.js +23 -23
  262. package/dist/factory-assets/connectors/deploy.js +23 -23
  263. package/dist/factory-assets/connectors/devserver.js +23 -23
  264. package/dist/factory-assets/connectors/flow/adapter.js +23 -23
  265. package/dist/factory-assets/connectors/flow/contract/normalize.d.ts.map +1 -1
  266. package/dist/factory-assets/connectors/flow/contract.js +1 -1
  267. package/dist/factory-assets/connectors/flow/engine.js +11 -11
  268. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  269. package/dist/factory-assets/connectors/flow/run-flow.js +25 -25
  270. package/dist/factory-assets/connectors/flow.js +23 -23
  271. package/dist/factory-assets/connectors/git.js +23 -23
  272. package/dist/factory-assets/connectors/gmail.js +23 -23
  273. package/dist/factory-assets/connectors/googledrive.js +23 -23
  274. package/dist/factory-assets/connectors/local.js +23 -23
  275. package/dist/factory-assets/connectors/mattermost.js +23 -23
  276. package/dist/factory-assets/connectors/memory.js +23 -23
  277. package/dist/factory-assets/connectors/minio.js +23 -23
  278. package/dist/factory-assets/connectors/postgres.js +23 -23
  279. package/dist/factory-assets/connectors/s3.js +23 -23
  280. package/dist/factory-assets/connectors/sharepoint.js +23 -23
  281. package/dist/factory-assets/connectors/sqlite.js +23 -23
  282. package/dist/factory-assets/connectors/static-server.js +23 -23
  283. package/dist/factory-assets/connectors/tunnel.js +23 -23
  284. package/dist/factory-assets/connectors/webdav.js +23 -23
  285. package/dist/factory-assets/connectors/xstate-store.js +23 -23
  286. package/dist/factory-assets/connectors/xstate.js +23 -23
  287. package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +1 -1
  288. package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +2 -2
  289. package/dist/factory-assets/skills/authoring-skaile-manifests/references/dependency-standard.md +3 -3
  290. package/dist/flows-KLBNSKLO.js +26 -0
  291. package/dist/{flows-TJQIMGUX.js.map → flows-KLBNSKLO.js.map} +1 -1
  292. package/dist/helpers-LUSV2ICC.js +52 -0
  293. package/dist/{helpers-DE53KG3E.js.map → helpers-LUSV2ICC.js.map} +1 -1
  294. package/dist/library/index.js +14 -14
  295. package/dist/library/install.js +5 -5
  296. package/dist/library/src/index.d.ts +2 -2
  297. package/dist/library/src/index.d.ts.map +1 -1
  298. package/dist/library/src/install/index.d.ts +1 -1
  299. package/dist/library/src/install/index.d.ts.map +1 -1
  300. package/dist/library/src/install/install-from-manifest.d.ts +13 -0
  301. package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
  302. package/dist/library/src/install/source-fetch-github.d.ts.map +1 -1
  303. package/dist/library/src/local/library-dir.d.ts +22 -5
  304. package/dist/library/src/local/library-dir.d.ts.map +1 -1
  305. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  306. package/dist/library/src/manifest-writer.d.ts.map +1 -1
  307. package/dist/library/src/remote/remote-catalog-source.d.ts +8 -0
  308. package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
  309. package/dist/library/src/remote/rest-catalog-source.d.ts +3 -2
  310. package/dist/library/src/remote/rest-catalog-source.d.ts.map +1 -1
  311. package/dist/{library-publish-KKQ2ULLX.js → library-publish-XMRCKRNR.js} +59 -58
  312. package/dist/library-publish-XMRCKRNR.js.map +1 -0
  313. package/dist/model-endpoint/index.js +12 -12
  314. package/dist/model-endpoint/src/openai-chat.d.ts +7 -2
  315. package/dist/model-endpoint/src/openai-chat.d.ts.map +1 -1
  316. package/dist/model-endpoint/src/openai-shared.d.ts +8 -0
  317. package/dist/model-endpoint/src/openai-shared.d.ts.map +1 -1
  318. package/dist/model-endpoint/src/server.d.ts.map +1 -1
  319. package/dist/model-endpoint/src/types.d.ts +1 -1
  320. package/dist/model-endpoint/src/types.d.ts.map +1 -1
  321. package/dist/model-endpoint/src/usage-cost.d.ts +23 -0
  322. package/dist/model-endpoint/src/usage-cost.d.ts.map +1 -0
  323. package/dist/open-library-XBR46DJL.js +56 -0
  324. package/dist/{open-library-RJGJIW5H.js.map → open-library-XBR46DJL.js.map} +1 -1
  325. package/dist/open-registry-W562DCDL.js +32 -0
  326. package/dist/{open-registry-3QS3J7KO.js.map → open-registry-W562DCDL.js.map} +1 -1
  327. package/dist/paths-2AZXB3QL.js +22 -0
  328. package/dist/{paths-QAV4C3KX.js.map → paths-2AZXB3QL.js.map} +1 -1
  329. package/dist/plugin-store-36SIL4TV.js +23 -0
  330. package/dist/{plugin-store-MSH6GK6T.js.map → plugin-store-36SIL4TV.js.map} +1 -1
  331. package/dist/project-D7GN7WLS.js +86 -0
  332. package/dist/{project-HZW2MZPA.js.map → project-D7GN7WLS.js.map} +1 -1
  333. package/dist/resolver/index.js +10 -10
  334. package/dist/runner/index.js +40 -40
  335. package/dist/runner/src/capability-roundtrip.d.ts +7 -6
  336. package/dist/runner/src/capability-roundtrip.d.ts.map +1 -1
  337. package/dist/runner/src/composition/content-source.d.ts.map +1 -1
  338. package/dist/runner/src/composition/errors.d.ts +16 -1
  339. package/dist/runner/src/composition/errors.d.ts.map +1 -1
  340. package/dist/runner/src/credential-notice.d.ts +3 -3
  341. package/dist/runner/src/credential-notice.d.ts.map +1 -1
  342. package/dist/runner/src/serve.d.ts +20 -7
  343. package/dist/runner/src/serve.d.ts.map +1 -1
  344. package/dist/sdk/asset-manager.js +19 -19
  345. package/dist/sdk/bridge.js +19 -19
  346. package/dist/sdk/core.js +9 -9
  347. package/dist/sdk/flow.js +11 -11
  348. package/dist/sdk/index.js +40 -40
  349. package/dist/sdk/resolver.js +10 -10
  350. package/dist/sdk/runner.js +40 -40
  351. package/dist/sdk/transport/ws/server.js +10 -10
  352. package/dist/sdk/transport/ws.js +10 -10
  353. package/dist/sdk/transport.js +10 -10
  354. package/dist/serve-preflight-CGA5G3AE.js +135 -0
  355. package/dist/serve-preflight-CGA5G3AE.js.map +1 -0
  356. package/dist/{setup-AGYB4PKR.js → setup-IBDNJAOU.js} +32 -32
  357. package/dist/{setup-AGYB4PKR.js.map → setup-IBDNJAOU.js.map} +1 -1
  358. package/dist/skills-CTTO7SZK.js +26 -0
  359. package/dist/{skills-2LMQ2IAD.js.map → skills-CTTO7SZK.js.map} +1 -1
  360. package/dist/source-2DJ5KNOI.js +85 -0
  361. package/dist/{source-GBMYD3RO.js.map → source-2DJ5KNOI.js.map} +1 -1
  362. package/dist/source-fetch-github-RWHV4I5Z.js +4 -0
  363. package/dist/{source-fetch-github-ST4MFL3D.js.map → source-fetch-github-RWHV4I5Z.js.map} +1 -1
  364. package/dist/{source-manifest-publish-FK22TVQT.js → source-manifest-publish-IYWUMUCY.js} +55 -57
  365. package/dist/source-manifest-publish-IYWUMUCY.js.map +1 -0
  366. package/dist/transport/index.js +10 -10
  367. package/dist/transport/ws/server.js +10 -10
  368. package/dist/transport/ws.js +10 -10
  369. package/dist/tui/index.js +48 -41
  370. package/dist/tui/index.js.map +1 -1
  371. package/dist/tui/src/repl.d.ts.map +1 -1
  372. package/dist/types/manifests.js +1 -1
  373. package/dist/types/src/install-manifest.d.ts +1 -1
  374. package/dist/types/src/install-manifest.d.ts.map +1 -1
  375. package/dist/types/src/manifests/index.d.ts +1 -1
  376. package/dist/types/src/manifests/index.d.ts.map +1 -1
  377. package/dist/types/src/manifests/scaffold-body.d.ts +2 -0
  378. package/dist/types/src/manifests/scaffold-body.d.ts.map +1 -1
  379. package/dist/workspace-plugin/adapters/mcp.js +30 -30
  380. package/dist/workspace-plugin/adapters/omp.js +15 -15
  381. package/dist/workspace-plugin/index.js +2 -2
  382. package/package.json +1 -1
  383. package/dist/asset-feeds-PXUWCXVI.js.map +0 -1
  384. package/dist/chunk-3JKGY2YC.js.map +0 -1
  385. package/dist/chunk-4DWBSTYA.js.map +0 -1
  386. package/dist/chunk-4XWLB7JB.js.map +0 -1
  387. package/dist/chunk-7XSAW5OC.js.map +0 -1
  388. package/dist/chunk-BFMYYNDT.js.map +0 -1
  389. package/dist/chunk-DUMTLYSO.js.map +0 -1
  390. package/dist/chunk-E3GPGTW3.js.map +0 -1
  391. package/dist/chunk-E572OHGY.js.map +0 -1
  392. package/dist/chunk-F2GOZMRA.js.map +0 -1
  393. package/dist/chunk-GOCWM7FN.js.map +0 -1
  394. package/dist/chunk-HK7HMEPT.js.map +0 -1
  395. package/dist/chunk-KX2PT5Q4.js.map +0 -1
  396. package/dist/chunk-L4YKW5AY.js.map +0 -1
  397. package/dist/chunk-LSI2IVFT.js.map +0 -1
  398. package/dist/chunk-NMI2TWMH.js.map +0 -1
  399. package/dist/chunk-OAHVKSQJ.js.map +0 -1
  400. package/dist/chunk-OHNKYHRR.js.map +0 -1
  401. package/dist/chunk-OTIB4D2K.js.map +0 -1
  402. package/dist/chunk-PUK7TQT4.js +0 -13
  403. package/dist/chunk-PUK7TQT4.js.map +0 -1
  404. package/dist/chunk-QOM5Z62G.js.map +0 -1
  405. package/dist/chunk-SNEE6UGY.js.map +0 -1
  406. package/dist/chunk-T2BDID2J.js.map +0 -1
  407. package/dist/chunk-TKHJXPSB.js.map +0 -1
  408. package/dist/chunk-UL22SDGR.js.map +0 -1
  409. package/dist/chunk-VJRTDKXS.js.map +0 -1
  410. package/dist/chunk-WEH33JSG.js.map +0 -1
  411. package/dist/chunk-WYHQUCHR.js.map +0 -1
  412. package/dist/chunk-X3RMRJNR.js.map +0 -1
  413. package/dist/chunk-XFIEVEU7.js.map +0 -1
  414. package/dist/chunk-YGRZNFRO.js.map +0 -1
  415. package/dist/chunk-Z7ZEZZB6.js.map +0 -1
  416. package/dist/connectors-CXZLXAFZ.js +0 -48
  417. package/dist/ensure-sources-UPTHZKGF.js.map +0 -1
  418. package/dist/flows-TJQIMGUX.js +0 -26
  419. package/dist/helpers-DE53KG3E.js +0 -38
  420. package/dist/library-publish-KKQ2ULLX.js.map +0 -1
  421. package/dist/open-library-RJGJIW5H.js +0 -42
  422. package/dist/open-registry-3QS3J7KO.js +0 -32
  423. package/dist/paths-QAV4C3KX.js +0 -22
  424. package/dist/plugin-store-MSH6GK6T.js +0 -23
  425. package/dist/project-HZW2MZPA.js +0 -84
  426. package/dist/serve-preflight-L4POEHNQ.js +0 -108
  427. package/dist/serve-preflight-L4POEHNQ.js.map +0 -1
  428. package/dist/skills-2LMQ2IAD.js +0 -26
  429. package/dist/source-GBMYD3RO.js +0 -85
  430. package/dist/source-fetch-github-ST4MFL3D.js +0 -4
  431. package/dist/source-manifest-publish-FK22TVQT.js.map +0 -1
@@ -1,256 +1,23 @@
1
- import { registeredAssetKeys, unresolvedManifestDependencies, warnIgnoredDomainFiles, warnLegacyBundleFiles, removedDomainOption, rejectRemovedDomainOption, reportLibrarySymlinks, composeRefContext, assetEntryRef, manifestPublisherProblems, manifestRootProblems, manifestEntryNameProblems, manifestRequiresProblems, findEntryManifestFile, declaredVersion, manifestVersionMismatchMessage, checkAsset, invalidPublisherMessage, invalidSemverText } from './chunk-TKHJXPSB.js';
2
- import { AI_RESOURCES } from './chunk-2UUKCROR.js';
3
- import { logErr, logInfo, logWarn, logOk } from './chunk-KX2PT5Q4.js';
4
- import { getKindRegistry } from './chunk-ARWKK325.js';
5
- import { validateFlowVersions } from './chunk-FKU57Q5Q.js';
6
- import { loadFlow } from './chunk-SZXGRHQQ.js';
1
+ import { checkAgentInstances, unknownKeyWarnings, unknownHarnessErrors } from './chunk-LRBP3234.js';
2
+ import { registeredAssetKeys, unresolvedManifestDependencies, warnIgnoredDomainFiles, warnLegacyBundleFiles, removedDomainOption, rejectRemovedDomainOption, reportLibrarySymlinks, composeRefContext, assetEntryRef, manifestPublisherProblems, manifestRootProblems, manifestFilesProblems, manifestEntryNameProblems, manifestRequiresProblems, checkAssetFile, findEntryManifestFile, declaredVersion, manifestVersionMismatchMessage, MANIFEST_GLOBS, manifestParseErrorText, checkAsset, invalidPublisherMessage, invalidSemverText } from './chunk-2XM3ZH36.js';
3
+ import { logErr, logInfo, logWarn, logOk } from './chunk-T2VBPVWZ.js';
4
+ import { getKindRegistry } from './chunk-JJJ2G4K2.js';
5
+ import { validateFlowVersions } from './chunk-URCJIV7T.js';
6
+ import { loadFlow } from './chunk-PJJSBZZP.js';
7
7
  import { flowSkillVersionPins } from './chunk-7RGTAEG6.js';
8
- import { missingRootAssets, assertManifestEditable, scanUnlistedAssets, UNLISTED_SCAN_SKIP_DIRS } from './chunk-UL22SDGR.js';
9
- import { parseManifestFile } from './chunk-QOM5Z62G.js';
10
- import { resolveRuntimeAssets } from './chunk-OTIB4D2K.js';
11
- import { decodeSkaileYaml, normalizeAgentInstances, agentBlockKeyDiagnostics, agentInstanceDiagnostics, localConnectorMountDir, symlinkEscapeOfProject, isInsideProject, resolveAgentDefinitionDir, AgentRefResolutionError } from './chunk-OHNKYHRR.js';
12
- import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, expandManifestFiles, isNonAssetPath } from './chunk-UQ33Y4DM.js';
13
- import { readAssetBody } from './chunk-GOCWM7FN.js';
14
- import { parseAssetRef, isValidPublisher, isValidAssetName, ASSET_NAME_HINT } from './chunk-WDXZA7QW.js';
8
+ import { missingRootAssets, assertManifestEditable, scanUnlistedAssets, UNLISTED_SCAN_SKIP_DIRS } from './chunk-6CYKTHNT.js';
9
+ import { parseManifestFile } from './chunk-MAZ3UXJK.js';
10
+ import { resolveRuntimeAssets } from './chunk-QPWR3YMY.js';
11
+ import { decodeSkaileYaml, localConnectorMountDir, symlinkEscapeOfProject, isInsideProject } from './chunk-KJSC2ZD6.js';
12
+ import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, isNonAssetPath } from './chunk-KPKGWXUJ.js';
13
+ import { withYamlQuotingHint, readAssetBody } from './chunk-JMIKGAUA.js';
14
+ import { parseAssetRef, isValidPublisher, isValidAssetName, ASSET_NAME_HINT } from './chunk-IZQOO6MN.js';
15
15
  import { execFileSync } from 'child_process';
16
- import fs2 from 'fs';
17
- import path2 from 'path';
16
+ import fs from 'fs';
17
+ import path from 'path';
18
18
  import { Command } from 'commander';
19
19
  import { parse } from 'yaml';
20
20
 
21
- // cli/src/type-guards.ts
22
- function isRecord(value) {
23
- return value !== null && typeof value === "object" && !Array.isArray(value);
24
- }
25
-
26
- // cli/src/commands/validate-instances.ts
27
- var AGENT_MANIFEST_FILE = "agent.yaml";
28
- var TRIGGER_REQUIRED_FIELDS = {
29
- schedule: ["cron", "prompt"],
30
- webhook: ["prompt"],
31
- channel: ["when"],
32
- event: ["event"]
33
- };
34
- var err = (code, message, at) => ({
35
- code,
36
- severity: "error",
37
- message,
38
- path: at
39
- });
40
- function readAssetFacts(manifest) {
41
- const facts = {
42
- lifecycle: manifest.lifecycle,
43
- hasIo: manifest.io !== void 0 && manifest.io !== null,
44
- connectorSlots: [],
45
- otherSlots: [],
46
- triggerIds: []
47
- };
48
- for (const item of Array.isArray(manifest.composes) ? manifest.composes : []) {
49
- if (!isRecord(item) || typeof item.id !== "string") continue;
50
- (item.kind === "connector" ? facts.connectorSlots : facts.otherSlots).push(item.id);
51
- }
52
- for (const t of Array.isArray(manifest.triggers) ? manifest.triggers : []) {
53
- if (isRecord(t) && typeof t.id === "string") facts.triggerIds.push(t.id);
54
- }
55
- return facts;
56
- }
57
- function loadAsset(projectDir, id, ref) {
58
- const at = `agents.${id}.ref`;
59
- let dir;
60
- try {
61
- dir = resolveAgentDefinitionDir(projectDir, ref);
62
- } catch (e) {
63
- if (!(e instanceof AgentRefResolutionError)) throw e;
64
- return { diagnostic: err("agent_ref_unresolved", `agents.${id}: ${e.message}`, at) };
65
- }
66
- if (dir === void 0) {
67
- return {
68
- diagnostic: err(
69
- "agent_ref_unresolved",
70
- `agents.${id}: ref "${ref}" cannot be resolved \u2014 no ai-assets/ directory above the project`,
71
- at
72
- )
73
- };
74
- }
75
- const manifestPath = path2.join(dir, AGENT_MANIFEST_FILE);
76
- let text;
77
- try {
78
- text = fs2.readFileSync(manifestPath, "utf-8");
79
- } catch {
80
- return {
81
- diagnostic: err(
82
- "agent_ref_unresolved",
83
- `agents.${id}: ref "${ref}" resolves to ${dir}, which has no ${AGENT_MANIFEST_FILE}`,
84
- at
85
- )
86
- };
87
- }
88
- let manifest;
89
- try {
90
- manifest = parse(text);
91
- } catch (e) {
92
- return {
93
- diagnostic: err(
94
- "agent_manifest_invalid",
95
- `agents.${id}: ${manifestPath} is not valid YAML: ${e instanceof Error ? e.message : String(e)}`,
96
- at
97
- )
98
- };
99
- }
100
- if (!isRecord(manifest)) {
101
- return {
102
- diagnostic: err(
103
- "agent_manifest_invalid",
104
- `agents.${id}: ${manifestPath} is not a mapping`,
105
- at
106
- )
107
- };
108
- }
109
- return { facts: readAssetFacts(manifest) };
110
- }
111
- function checkTriggers(id, triggers, assetTriggerIds) {
112
- const out = [];
113
- const seen = /* @__PURE__ */ new Set();
114
- triggers.forEach((trigger, i) => {
115
- const at = `agents.${id}.triggers[${i}]`;
116
- if (seen.has(trigger.id)) {
117
- out.push(
118
- err(
119
- "agent_trigger_duplicate",
120
- `agents.${id}: trigger id "${trigger.id}" is declared twice`,
121
- `${at}.id`
122
- )
123
- );
124
- return;
125
- }
126
- seen.add(trigger.id);
127
- if (!assetTriggerIds || assetTriggerIds.includes(trigger.id)) return;
128
- if (!trigger.kind) {
129
- out.push(
130
- err(
131
- "agent_trigger_unknown",
132
- `agents.${id}: trigger "${trigger.id}" is not declared by the agent asset (${assetTriggerIds.length > 0 ? `has: ${assetTriggerIds.join(", ")}` : "it declares no triggers"}) \u2014 add \`kind\` and the trigger's fields to declare a new one`,
133
- `${at}.id`
134
- )
135
- );
136
- return;
137
- }
138
- const missing = TRIGGER_REQUIRED_FIELDS[trigger.kind].filter(
139
- (field) => trigger[field] === void 0
140
- );
141
- if (missing.length > 0) {
142
- out.push(
143
- err(
144
- "agent_trigger_incomplete",
145
- `agents.${id}: trigger "${trigger.id}" (kind ${trigger.kind}) is not in the asset, so it must declare ${missing.join(", ")}`,
146
- at
147
- )
148
- );
149
- }
150
- });
151
- return out;
152
- }
153
- function checkConnectors(id, instance, facts, connectorIds) {
154
- const out = [];
155
- for (const [slot, connectorId] of Object.entries(instance.connectors ?? {})) {
156
- const at = `agents.${id}.connectors.${slot}`;
157
- if (!facts.connectorSlots.includes(slot)) {
158
- const hint = facts.otherSlots.includes(slot) ? `"${slot}" is a slot of a non-connector item` : facts.connectorSlots.length > 0 ? `the asset's connector slots are: ${facts.connectorSlots.join(", ")}` : "the asset declares no connector slots";
159
- out.push(
160
- err(
161
- "agent_connector_slot_unknown",
162
- `agents.${id}: connectors.${slot} is not a connector slot id of the agent asset (${hint})`,
163
- at
164
- )
165
- );
166
- }
167
- if (!connectorIds.includes(connectorId)) {
168
- out.push(
169
- err(
170
- "agent_connector_unknown",
171
- `agents.${id}: connectors.${slot} points at "${connectorId}", which is not in skaile.yaml connectors[]${connectorIds.length > 0 ? ` (has: ${connectorIds.join(", ")})` : ""}`,
172
- at
173
- )
174
- );
175
- }
176
- }
177
- return out;
178
- }
179
- function checkAgentInstances(projectDir, parsed) {
180
- const diagnostics = [];
181
- const instances = normalizeAgentInstances(parsed.agents, diagnostics);
182
- const agent = isRecord(parsed.agent) ? parsed.agent : void 0;
183
- diagnostics.push(...agentBlockKeyDiagnostics(parsed.agent));
184
- if (agent?.subagents !== void 0) {
185
- diagnostics.push(
186
- err(
187
- "agent_subagents_removed",
188
- "`agent.subagents` was removed \u2014 declare each subagent as an agent asset and bind it under `agents:` with `lifecycle: role`",
189
- "agent.subagents"
190
- )
191
- );
192
- }
193
- if (agent?.instances !== void 0) {
194
- diagnostics.push(
195
- err(
196
- "misplaced_agent_instances",
197
- "`agent.instances` is not a skaile.yaml key \u2014 declare instances under root `agents:`",
198
- "agent.instances"
199
- )
200
- );
201
- }
202
- diagnostics.push(
203
- ...agentInstanceDiagnostics({
204
- agent: {
205
- definition: typeof agent?.definition === "string" ? agent.definition : void 0,
206
- instances
207
- }
208
- })
209
- );
210
- if (!instances) return diagnostics;
211
- const connectorIds = (Array.isArray(parsed.connectors) ? parsed.connectors : []).flatMap(
212
- (c) => isRecord(c) && typeof c.id === "string" ? [c.id] : []
213
- );
214
- for (const [id, instance] of Object.entries(instances)) {
215
- const loaded = loadAsset(projectDir, id, instance.ref);
216
- if ("diagnostic" in loaded) {
217
- diagnostics.push(loaded.diagnostic, ...checkTriggers(id, instance.triggers ?? [], void 0));
218
- continue;
219
- }
220
- const { facts } = loaded;
221
- const lifecycle = instance.lifecycle ?? facts.lifecycle ?? "standing";
222
- if (lifecycle === "role" && !facts.hasIo) {
223
- diagnostics.push(
224
- err(
225
- "agent_role_missing_io",
226
- `agents.${id}: lifecycle "role" needs the agent asset to declare \`io\` ({ input, output } JSON Schemas)`,
227
- `agents.${id}.lifecycle`
228
- )
229
- );
230
- }
231
- diagnostics.push(...checkConnectors(id, instance, facts, connectorIds));
232
- diagnostics.push(...checkTriggers(id, instance.triggers ?? [], facts.triggerIds));
233
- }
234
- return diagnostics;
235
- }
236
-
237
- // cli/src/commands/validate.ts
238
- var MANIFEST_GLOBS = [
239
- { pattern: /\/SKILL\.md$/, kind: "skill" },
240
- { pattern: /\/agent\.yaml$/, kind: "agent" },
241
- { pattern: /\/AGENT\.md$/, kind: "agent" },
242
- { pattern: /\/CONTRACT\.md$/, kind: "contract" },
243
- { pattern: /\/PERSONA\.md$/, kind: "persona" },
244
- { pattern: /\/RULESET\.md$/, kind: "ruleset" },
245
- { pattern: /\.flow\.yaml$/, kind: "flow" },
246
- { pattern: /\.flow\.json$/, kind: "flow" },
247
- { pattern: /\/CONNECTOR\.md$/, kind: "connector" },
248
- { pattern: /\.prompt\.md$/, kind: "prompt" },
249
- { pattern: /\/MCP\.md$/, kind: "mcp-server" },
250
- { pattern: /\/knowledge\.yaml$/, kind: "knowledge" },
251
- { pattern: /\/knowledge\/index\.yaml$/, kind: "knowledge" },
252
- { pattern: /\.preset\.yaml$/, kind: "preset" }
253
- ];
254
21
  var HARNESS_DIRS = /* @__PURE__ */ new Set([".claude", ".codex", ".omp"]);
255
22
  var SKIP_DIRS = /* @__PURE__ */ new Set([
256
23
  "node_modules",
@@ -265,12 +32,12 @@ function findManifestCandidates(rootPath) {
265
32
  function walk(dir) {
266
33
  let entries;
267
34
  try {
268
- entries = fs2.readdirSync(dir, { withFileTypes: true });
35
+ entries = fs.readdirSync(dir, { withFileTypes: true });
269
36
  } catch {
270
37
  return;
271
38
  }
272
39
  for (const entry of entries) {
273
- const fullPath = path2.join(dir, entry.name);
40
+ const fullPath = path.join(dir, entry.name);
274
41
  if (entry.isDirectory()) {
275
42
  if (!SKIP_DIRS.has(entry.name)) walk(fullPath);
276
43
  } else if (entry.isFile()) {
@@ -287,10 +54,12 @@ function findManifestCandidates(rootPath) {
287
54
  return candidates;
288
55
  }
289
56
  function parseManifestCandidate(c, absRoot) {
290
- const content = fs2.readFileSync(c.filePath, "utf-8");
57
+ const content = fs.readFileSync(c.filePath, "utf-8");
291
58
  const res = parseManifestFile(c.filePath, content);
292
59
  if (!res.ok) {
293
- logErr(`${path2.relative(absRoot, c.filePath)} [${c.kind}] \u2014 parse error: ${res.reason}`);
60
+ logErr(
61
+ `${path.relative(absRoot, c.filePath)} [${c.kind}] \u2014 ${manifestParseErrorText(res.reason)}`
62
+ );
294
63
  return { kind: "error" };
295
64
  }
296
65
  return {
@@ -300,25 +69,25 @@ function parseManifestCandidate(c, absRoot) {
300
69
  };
301
70
  }
302
71
  function libraryRootOf(absRoot) {
303
- for (let dir = absRoot; ; dir = path2.dirname(dir)) {
304
- if (fs2.existsSync(path2.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
305
- if (path2.dirname(dir) === dir) return absRoot;
72
+ for (let dir = absRoot; ; dir = path.dirname(dir)) {
73
+ if (fs.existsSync(path.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
74
+ if (path.dirname(dir) === dir) return absRoot;
306
75
  }
307
76
  }
308
77
  function validateManifestCandidate(c, parsed, body, absRoot, registry, strictConformance, composeRefs) {
309
- const relPath = path2.relative(absRoot, c.filePath);
78
+ const relPath = path.relative(absRoot, c.filePath);
310
79
  let errors = 0;
311
80
  let warnings = 0;
312
- const dirName = path2.basename(path2.dirname(c.filePath));
81
+ const dirName = path.basename(path.dirname(c.filePath));
313
82
  const checked = checkAsset(
314
83
  c.kind,
315
84
  parsed ?? {},
316
85
  body,
317
86
  dirName,
318
87
  registry,
319
- fs2.readFileSync(c.filePath, "utf-8"),
320
- path2.basename(c.filePath),
321
- { dir: path2.dirname(c.filePath), libraryRoot: libraryRootOf(absRoot), composeRefs }
88
+ fs.readFileSync(c.filePath, "utf-8"),
89
+ path.basename(c.filePath),
90
+ { dir: path.dirname(c.filePath), libraryRoot: libraryRootOf(absRoot), composeRefs }
322
91
  );
323
92
  for (const f of checked.errors) {
324
93
  logErr(`${relPath} [${f.tag}] \u2014 ${f.text}`);
@@ -341,7 +110,7 @@ function scanIdentities(root) {
341
110
  for (const c of findManifestCandidates(root)) {
342
111
  let parsed;
343
112
  try {
344
- const res = parseManifestFile(c.filePath, fs2.readFileSync(c.filePath, "utf-8"));
113
+ const res = parseManifestFile(c.filePath, fs.readFileSync(c.filePath, "utf-8"));
345
114
  if (!res.ok) continue;
346
115
  parsed = res.data;
347
116
  } catch {
@@ -355,14 +124,14 @@ function scanIdentities(root) {
355
124
  return identities;
356
125
  }
357
126
  function validateManifests(rootPath, strictConformance, registeredAssets = /* @__PURE__ */ new Set()) {
358
- const absRoot = path2.resolve(rootPath);
359
- if (!fs2.existsSync(absRoot)) {
127
+ const absRoot = path.resolve(rootPath);
128
+ if (!fs.existsSync(absRoot)) {
360
129
  logErr(`Path does not exist: ${absRoot}`);
361
130
  return { total: 0, errors: 1, warnings: 0 };
362
131
  }
363
132
  const registry = getKindRegistry();
364
133
  const candidates = findManifestCandidates(absRoot);
365
- const isLibrary = fs2.existsSync(path2.join(absRoot, SKAILE_MANIFEST_FILENAME));
134
+ const isLibrary = fs.existsSync(path.join(absRoot, SKAILE_MANIFEST_FILENAME));
366
135
  let errors = reportLibrarySymlinks(absRoot, {
367
136
  wholeTree: isLibrary,
368
137
  skipDirs: isLibrary ? void 0 : HARNESS_DIRS
@@ -395,14 +164,14 @@ function validateManifests(rootPath, strictConformance, registeredAssets = /* @_
395
164
  const obj = parseResult.parsed;
396
165
  const identity = obj && typeof obj === "object" ? obj[c.kind === "flow" ? "id" : "name"] : null;
397
166
  if (typeof identity === "string" && identity.length > 0) {
398
- const dir = path2.dirname(c.filePath);
167
+ const dir = path.dirname(c.filePath);
399
168
  const key = `${c.kind}:${identity}`;
400
169
  const first = seenIdentity.get(key);
401
170
  if (first === void 0) {
402
171
  seenIdentity.set(key, dir);
403
172
  } else if (first !== dir) {
404
173
  logErr(
405
- `${path2.relative(absRoot, c.filePath)} [${c.kind}] \u2014 ${key} is also defined in ${path2.relative(absRoot, first) || "."}; two directories cannot share a kind and name (\`skaile library index\` keeps only the first).`
174
+ `${path.relative(absRoot, c.filePath)} [${c.kind}] \u2014 ${key} is also defined in ${path.relative(absRoot, first) || "."}; two directories cannot share a kind and name (\`skaile library index\` keeps only the first).`
406
175
  );
407
176
  errors++;
408
177
  }
@@ -415,12 +184,12 @@ function findWorkspaceManifests(rootPath) {
415
184
  function walk(dir) {
416
185
  let entries;
417
186
  try {
418
- entries = fs2.readdirSync(dir, { withFileTypes: true });
187
+ entries = fs.readdirSync(dir, { withFileTypes: true });
419
188
  } catch {
420
189
  return;
421
190
  }
422
191
  for (const entry of entries) {
423
- const full = path2.join(dir, entry.name);
192
+ const full = path.join(dir, entry.name);
424
193
  if (entry.isDirectory()) {
425
194
  if (!SKIP_DIRS.has(entry.name)) walk(full);
426
195
  } else if (entry.isFile() && /(^|\.)skaile\.yaml$/.test(entry.name)) {
@@ -500,7 +269,7 @@ function validateLocalConnectorMountPaths(projectDir, relPath, connectors) {
500
269
  const dir = localConnectorMountDir(c, projectDir);
501
270
  if (!dir) continue;
502
271
  const escapesTo = symlinkEscapeOfProject(dir, projectDir);
503
- if (!fs2.existsSync(dir)) {
272
+ if (!fs.existsSync(dir)) {
504
273
  logErr(
505
274
  `${relPath} [connectors] \u2014 connector_mount_path_missing: connectors.${c.id}.mountPath: ${dir} does not exist; create the directory or fix the path`
506
275
  );
@@ -519,22 +288,33 @@ function validateLocalConnectorMountPaths(projectDir, relPath, connectors) {
519
288
  return errors;
520
289
  }
521
290
  async function validateWorkspaceManifests(rootPath) {
522
- const absRoot = path2.resolve(rootPath);
291
+ const absRoot = path.resolve(rootPath);
523
292
  const files = findWorkspaceManifests(absRoot);
524
293
  let errors = 0;
525
294
  for (const file of files) {
526
- const relPath = path2.relative(absRoot, file);
295
+ const relPath = path.relative(absRoot, file);
527
296
  let parsed;
297
+ let text = "";
528
298
  try {
529
- parsed = parse(fs2.readFileSync(file, "utf-8")) ?? {};
299
+ text = fs.readFileSync(file, "utf-8");
300
+ parsed = parse(text) ?? {};
530
301
  } catch (e) {
531
- logErr(`${relPath} \u2014 parse error: ${e instanceof Error ? e.message : String(e)}`);
302
+ const message = e instanceof Error ? e.message : String(e);
303
+ logErr(`${relPath} \u2014 parse error: ${withYamlQuotingHint(message, text)}`);
304
+ errors++;
305
+ continue;
306
+ }
307
+ const unreadable = decodeSkaileYaml(text).diagnostics.find(
308
+ (d) => d.code === "non_object_root" || d.code === "invalid_value_shape"
309
+ );
310
+ if (unreadable) {
311
+ logErr(`${relPath} \u2014 parse error: ${unreadable.message}`);
532
312
  errors++;
533
313
  continue;
534
314
  }
535
315
  errors += validateWorkspaceRefs(collectWorkspaceRefFields(parsed), relPath);
536
316
  errors += validateWorkspaceAssets(parsed, relPath);
537
- for (const d of checkAgentInstances(path2.dirname(file), parsed)) {
317
+ for (const d of checkAgentInstances(path.dirname(file), parsed)) {
538
318
  const line = `${relPath} [agents] \u2014 ${d.code}: ${d.path ? `${d.path}: ` : ""}${d.message}`;
539
319
  if (d.severity === "error") {
540
320
  logErr(line);
@@ -543,7 +323,7 @@ async function validateWorkspaceManifests(rootPath) {
543
323
  logWarn(line);
544
324
  }
545
325
  }
546
- const decoded = decodeSkaileYaml(fs2.readFileSync(file, "utf-8"));
326
+ const decoded = decodeSkaileYaml(fs.readFileSync(file, "utf-8"));
547
327
  for (const d of decoded.diagnostics) {
548
328
  if (!CONNECTOR_ERROR_CODES.includes(d.code)) continue;
549
329
  logErr(`${relPath} [connectors] \u2014 ${d.code}: ${d.path ? `${d.path}: ` : ""}${d.message}`);
@@ -564,13 +344,18 @@ async function validateWorkspaceManifests(rootPath) {
564
344
  logWarn(line);
565
345
  }
566
346
  }
347
+ for (const line of unknownKeyWarnings(decoded.diagnostics, relPath)) logWarn(line);
348
+ for (const line of await unknownHarnessErrors(path.dirname(file), decoded.config, relPath)) {
349
+ logErr(line);
350
+ errors++;
351
+ }
567
352
  errors += validateLocalConnectorMountPaths(
568
- path2.dirname(file),
353
+ path.dirname(file),
569
354
  relPath,
570
355
  decoded.config?.connectors ?? []
571
356
  );
572
357
  if ((decoded.config?.connectors ?? []).length > 0) {
573
- const assets = await resolveRuntimeAssets(path2.dirname(file));
358
+ const assets = await resolveRuntimeAssets(path.dirname(file));
574
359
  if (!assets.warnings.some((w) => w.code === "repo_unavailable")) {
575
360
  for (const w of assets.warnings) {
576
361
  if (w.code !== "missing_driver" || !w.name) continue;
@@ -583,7 +368,7 @@ async function validateWorkspaceManifests(rootPath) {
583
368
  return { total: files.length, errors };
584
369
  }
585
370
  function validatePublishManifestRoots(rootPath) {
586
- const absRoot = path2.resolve(rootPath);
371
+ const absRoot = path.resolve(rootPath);
587
372
  const manifest = loadSkPublishManifest(absRoot);
588
373
  if (!manifest) return 0;
589
374
  const missing = missingRootAssets(absRoot, manifest);
@@ -592,40 +377,37 @@ function validatePublishManifestRoots(rootPath) {
592
377
  `${SKAILE_MANIFEST_FILENAME} [assets] \u2014 ${assetEntryRef(a, manifest)}: root "${a.root}" does not exist. Run \`skaile library index <library>\` to drop the entry, or restore the directory.`
593
378
  );
594
379
  }
595
- let unmatchedEntries = 0;
596
- if (!manifest.source) {
597
- for (const a of manifest.assets ?? []) {
598
- if (a.root || a.source || !Array.isArray(a.files) || a.files.length === 0) continue;
599
- const patterns = a.files.map((f) => typeof f === "string" ? f : f.path).filter(Boolean);
600
- const { unmatched } = expandManifestFiles(absRoot, patterns);
601
- if (unmatched.length === 0) continue;
602
- unmatchedEntries++;
603
- logErr(
604
- `${SKAILE_MANIFEST_FILENAME} [assets] \u2014 ${assetEntryRef(a, manifest)}: files: ${unmatched.join(", ")} not found. Fix the \`files:\` list or drop the entry.`
605
- );
606
- }
607
- }
608
- return missing.length + unmatchedEntries;
380
+ return missing.length;
609
381
  }
610
382
  async function validatePublishManifestUnlisted(rootPath) {
611
- const absRoot = path2.resolve(rootPath);
383
+ const absRoot = path.resolve(rootPath);
612
384
  const manifest = loadSkPublishManifest(absRoot);
613
385
  if (!manifest) return 0;
386
+ const registry = getKindRegistry();
387
+ const libraryRoot = libraryRootOf(absRoot);
388
+ const composeRefs = composeRefContext(
389
+ scanIdentities(libraryRoot),
390
+ await registeredAssetKeys(libraryRoot),
391
+ manifest.publisher
392
+ );
614
393
  const unlisted = (await scanUnlistedAssets(
615
394
  absRoot,
616
- manifest.publisher ?? path2.basename(absRoot),
617
- getKindRegistry(),
395
+ manifest.publisher ?? path.basename(absRoot),
396
+ registry,
618
397
  UNLISTED_SCAN_SKIP_DIRS
619
- )).filter((u) => !u.registeredAt && !u.parseFailure);
398
+ )).filter(
399
+ (u) => !u.registeredAt && !u.parseFailure && // a file that does not parse has its own parse error
400
+ checkAssetFile(u.entry.source, u.entry.kind, registry, absRoot, composeRefs).length === 0
401
+ );
620
402
  for (const u of unlisted) {
621
403
  logErr(
622
- `${path2.relative(absRoot, u.entry.source)} [${u.entry.kind}] \u2014 ${u.entry.kind}:${u.entry.name} is on disk but not in ${SKAILE_MANIFEST_FILENAME}, so it is not published. Run \`skaile library index <library>\` to list it, or delete the directory.`
404
+ `${path.relative(absRoot, u.entry.source)} [${u.entry.kind}] \u2014 ${u.entry.kind}:${u.entry.name} is on disk but not in ${SKAILE_MANIFEST_FILENAME}, so it is not published. Run \`skaile library index <library>\` to list it, or delete the directory.`
623
405
  );
624
406
  }
625
407
  return unlisted.length;
626
408
  }
627
409
  function validatePublishManifestRequires(rootPath) {
628
- const problems = manifestRequiresProblems(path2.resolve(rootPath));
410
+ const problems = manifestRequiresProblems(path.resolve(rootPath));
629
411
  for (const p of problems) {
630
412
  logErr(
631
413
  `${SKAILE_MANIFEST_FILENAME} [assets] \u2014 ${p.asset}: ${p.message}. Use the \`kind:@<publisher>/name[#version]\` form.`
@@ -634,29 +416,30 @@ function validatePublishManifestRequires(rootPath) {
634
416
  return problems.length;
635
417
  }
636
418
  function validatePublishManifestPublisherSlugs(rootPath) {
637
- const problems = manifestPublisherProblems(path2.resolve(rootPath));
419
+ const problems = manifestPublisherProblems(path.resolve(rootPath));
638
420
  for (const message of problems) logErr(message);
639
421
  return problems.length;
640
422
  }
641
423
  function validatePublishManifestRootPaths(rootPath) {
642
424
  const problems = [
643
- ...manifestRootProblems(path2.resolve(rootPath)),
644
- ...manifestEntryNameProblems(path2.resolve(rootPath))
425
+ ...manifestRootProblems(path.resolve(rootPath)),
426
+ ...manifestFilesProblems(path.resolve(rootPath)),
427
+ ...manifestEntryNameProblems(path.resolve(rootPath))
645
428
  ];
646
429
  for (const message of problems) logErr(message);
647
430
  return problems.length;
648
431
  }
649
432
  function validatePublishManifestParses(rootPath) {
650
433
  try {
651
- assertManifestEditable(path2.resolve(rootPath));
434
+ assertManifestEditable(path.resolve(rootPath));
652
435
  return 0;
653
- } catch (err2) {
654
- logErr(err2 instanceof Error ? err2.message : String(err2));
436
+ } catch (err) {
437
+ logErr(err instanceof Error ? err.message : String(err));
655
438
  return 1;
656
439
  }
657
440
  }
658
441
  function validatePublishManifestVersions(rootPath) {
659
- const absRoot = path2.resolve(rootPath);
442
+ const absRoot = path.resolve(rootPath);
660
443
  const manifest = loadSkPublishManifest(absRoot);
661
444
  if (!manifest || manifest.source) return 0;
662
445
  let warnings = 0;
@@ -664,7 +447,7 @@ function validatePublishManifestVersions(rootPath) {
664
447
  if (a.source || !a.version) continue;
665
448
  const file = findEntryManifestFile(absRoot, a);
666
449
  if (!file) continue;
667
- const res = parseManifestFile(file, fs2.readFileSync(file, "utf-8"));
450
+ const res = parseManifestFile(file, fs.readFileSync(file, "utf-8"));
668
451
  if (!res.ok) continue;
669
452
  const fileVersion = declaredVersion(res.data);
670
453
  if (fileVersion === void 0 || fileVersion === a.version) continue;
@@ -672,7 +455,7 @@ function validatePublishManifestVersions(rootPath) {
672
455
  manifestVersionMismatchMessage(
673
456
  assetEntryRef(a, manifest),
674
457
  a.version,
675
- toPosix(path2.relative(absRoot, file)),
458
+ toPosix(path.relative(absRoot, file)),
676
459
  fileVersion
677
460
  )
678
461
  );
@@ -681,7 +464,7 @@ function validatePublishManifestVersions(rootPath) {
681
464
  return warnings;
682
465
  }
683
466
  function validatePublishManifestPublishers(rootPath) {
684
- const absRoot = path2.resolve(rootPath);
467
+ const absRoot = path.resolve(rootPath);
685
468
  const manifest = loadSkPublishManifest(absRoot);
686
469
  if (!manifest || manifest.source) return 0;
687
470
  const bare = (p) => p.trim().replace(/^@/, "");
@@ -691,13 +474,13 @@ function validatePublishManifestPublishers(rootPath) {
691
474
  if (a.source || !resolved) continue;
692
475
  const file = findEntryManifestFile(absRoot, a);
693
476
  if (!file) continue;
694
- const res = parseManifestFile(file, fs2.readFileSync(file, "utf-8"));
477
+ const res = parseManifestFile(file, fs.readFileSync(file, "utf-8"));
695
478
  if (!res.ok) continue;
696
479
  const meta = res.data.metadata;
697
480
  const declared = meta !== null && typeof meta === "object" ? meta.publisher : null;
698
481
  if (typeof declared !== "string" || bare(declared) === bare(resolved)) continue;
699
482
  logWarn(
700
- `${toPosix(path2.relative(absRoot, file))} [publisher] \u2014 metadata.publisher "${bare(declared)}" differs from the manifest publisher "${bare(resolved)}" for ${assetEntryRef(a, manifest)}. The manifest wins and the file value is ignored: delete \`metadata.publisher\` from the file, or set the publisher in ${SKAILE_MANIFEST_FILENAME}.`
483
+ `${toPosix(path.relative(absRoot, file))} [publisher] \u2014 metadata.publisher "${bare(declared)}" differs from the manifest publisher "${bare(resolved)}" for ${assetEntryRef(a, manifest)}. The manifest wins and the file value is ignored: delete \`metadata.publisher\` from the file, or set the publisher in ${SKAILE_MANIFEST_FILENAME}.`
701
484
  );
702
485
  warnings++;
703
486
  }
@@ -705,7 +488,7 @@ function validatePublishManifestPublishers(rootPath) {
705
488
  }
706
489
  var EXCLUDED_PATHS = ["skaileup-shared/", "external/", "docs/"];
707
490
  function toPosix(p) {
708
- return p.split(path2.sep).join("/");
491
+ return p.split(path.sep).join("/");
709
492
  }
710
493
  function isExcludedPath(relPath) {
711
494
  const rel = toPosix(relPath);
@@ -721,9 +504,9 @@ var VERSIONED_KINDS = {
721
504
  };
722
505
  function readAssetVersion(c) {
723
506
  const kind = c.kind;
724
- const fileName = path2.basename(c.filePath);
725
- const dirName = path2.basename(path2.dirname(c.filePath));
726
- const content = fs2.readFileSync(c.filePath, "utf-8");
507
+ const fileName = path.basename(c.filePath);
508
+ const dirName = path.basename(path.dirname(c.filePath));
509
+ const content = fs.readFileSync(c.filePath, "utf-8");
727
510
  if (c.filePath.endsWith(".md")) {
728
511
  const res = parseManifestFile(c.filePath, content);
729
512
  const data = res.ok ? res.data : {};
@@ -756,26 +539,26 @@ function readAssetVersion(c) {
756
539
  };
757
540
  }
758
541
  function collectAssetVersions(root) {
759
- if (!fs2.existsSync(root)) return [];
542
+ if (!fs.existsSync(root)) return [];
760
543
  const assets = [];
761
544
  for (const c of findManifestCandidates(root)) {
762
545
  if (!VERSIONED_KINDS[c.kind]) continue;
763
546
  if (c.filePath.endsWith(".flow.json")) continue;
764
- if (isExcludedPath(path2.relative(root, c.filePath))) continue;
547
+ if (isExcludedPath(path.relative(root, c.filePath))) continue;
765
548
  assets.push(readAssetVersion(c));
766
549
  }
767
550
  return assets;
768
551
  }
769
552
  function assetLocation(a, root) {
770
- return toPosix(path2.relative(root, a.filePath));
553
+ return toPosix(path.relative(root, a.filePath));
771
554
  }
772
555
  function findChangelogUnit(assetRelPath, root) {
773
- let dir = path2.posix.dirname(toPosix(assetRelPath));
556
+ let dir = path.posix.dirname(toPosix(assetRelPath));
774
557
  for (; ; ) {
775
558
  const candidate = dir === "." ? "CHANGELOG.md" : `${dir}/CHANGELOG.md`;
776
- if (fs2.existsSync(path2.join(root, candidate))) return candidate;
559
+ if (fs.existsSync(path.join(root, candidate))) return candidate;
777
560
  if (dir === ".") return null;
778
- dir = path2.posix.dirname(dir);
561
+ dir = path.posix.dirname(dir);
779
562
  }
780
563
  }
781
564
  function checkChangelogUnits(modifiedFiles, root) {
@@ -825,7 +608,7 @@ function checkVersionBumps(assets, root) {
825
608
  let warnings = 0;
826
609
  for (const a of assets) {
827
610
  if (!a.version) continue;
828
- const relPath = toPosix(path2.relative(root, a.filePath));
611
+ const relPath = toPosix(path.relative(root, a.filePath));
829
612
  try {
830
613
  const headContent = execFileSync("git", ["show", `HEAD:./${relPath}`], {
831
614
  cwd: root,
@@ -856,9 +639,9 @@ function checkFlowVersionPins(assets, root) {
856
639
  let pins;
857
640
  try {
858
641
  pins = flowSkillVersionPins(loadFlow(f.filePath));
859
- } catch (err2) {
642
+ } catch (err) {
860
643
  logWarn(
861
- `flow:${f.name} (${path2.relative(root, f.filePath)}) \u2014 could not be read: ${err2 instanceof Error ? err2.message : err2}`
644
+ `flow:${f.name} (${path.relative(root, f.filePath)}) \u2014 could not be read: ${err instanceof Error ? err.message : err}`
862
645
  );
863
646
  warnings++;
864
647
  continue;
@@ -875,18 +658,32 @@ function checkFlowVersionPins(assets, root) {
875
658
  return { errors, warnings };
876
659
  }
877
660
  function resolveCheckRoot(pathArg) {
661
+ let root = process.cwd();
878
662
  if (pathArg) {
879
- const abs = path2.resolve(pathArg);
880
- if (!fs2.existsSync(abs)) {
881
- logErr(`Path does not exist: ${abs}`);
663
+ root = path.resolve(pathArg);
664
+ if (!fs.existsSync(root)) {
665
+ logErr(`Path does not exist: ${root}`);
882
666
  return null;
883
667
  }
884
- return abs;
668
+ } else {
669
+ for (let dir = root; ; dir = path.dirname(dir)) {
670
+ if (fs.existsSync(path.join(dir, SKAILE_MANIFEST_FILENAME))) {
671
+ root = dir;
672
+ break;
673
+ }
674
+ if (path.dirname(dir) === dir) break;
675
+ }
885
676
  }
886
- for (let dir = process.cwd(); ; dir = path2.dirname(dir)) {
887
- if (fs2.existsSync(path2.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
888
- if (path2.dirname(dir) === dir) return AI_RESOURCES;
677
+ if (!isCheckableRoot(root)) {
678
+ logErr(
679
+ `Nothing to check in ${root}: no ${SKAILE_MANIFEST_FILENAME} and no versioned asset (skill, agent, flow, prompt, contract or preset) found. Run it in a library or pass the library directory.`
680
+ );
681
+ return null;
889
682
  }
683
+ return root;
684
+ }
685
+ function isCheckableRoot(root) {
686
+ return fs.existsSync(path.join(root, SKAILE_MANIFEST_FILENAME)) || collectAssetVersions(root).length > 0;
890
687
  }
891
688
  function isInGitWorkTree(root) {
892
689
  try {
@@ -899,11 +696,28 @@ function isInGitWorkTree(root) {
899
696
  return false;
900
697
  }
901
698
  }
699
+ function hasCommit(root) {
700
+ try {
701
+ execFileSync("git", ["rev-parse", "--verify", "--quiet", "HEAD"], {
702
+ cwd: root,
703
+ stdio: ["ignore", "ignore", "ignore"]
704
+ });
705
+ return true;
706
+ } catch {
707
+ return false;
708
+ }
709
+ }
902
710
  function changedFiles(root, ref, what, opts = {}) {
903
711
  if (!isInGitWorkTree(root)) {
904
712
  logErr(`${what} needs a git repository: ${root} is not inside a git work tree.`);
905
713
  return null;
906
714
  }
715
+ if (ref === "HEAD" && !hasCommit(root)) {
716
+ logErr(
717
+ `${what} compares with the last commit, and ${root} has no commit yet. Commit the library first (\`skaile library commit <name>\`), then run it again.`
718
+ );
719
+ return null;
720
+ }
907
721
  try {
908
722
  const out = execFileSync(
909
723
  "git",
@@ -924,16 +738,16 @@ function changedFiles(root, ref, what, opts = {}) {
924
738
  changed.push(...fresh.trim().split("\n").filter(Boolean));
925
739
  }
926
740
  return changed;
927
- } catch (err2) {
928
- const stderr = err2 instanceof Error && "stderr" in err2 ? String(err2.stderr).trim() : "";
929
- const reason = (stderr || (err2 instanceof Error ? err2.message : String(err2))).split("\n")[0];
741
+ } catch (err) {
742
+ const stderr = err instanceof Error && "stderr" in err ? String(err.stderr).trim() : "";
743
+ const reason = (stderr || (err instanceof Error ? err.message : String(err))).split("\n")[0];
930
744
  logErr(`git diff failed in ${root}: ${reason}`);
931
745
  return null;
932
746
  }
933
747
  }
934
748
  function assetOwnDir(a) {
935
- const dir = path2.dirname(a.filePath);
936
- if (["skill", "agent", "contract"].includes(a.kind) || path2.basename(dir) === a.name) return dir;
749
+ const dir = path.dirname(a.filePath);
750
+ if (["skill", "agent", "contract"].includes(a.kind) || path.basename(dir) === a.name) return dir;
937
751
  return null;
938
752
  }
939
753
  function assetChanged(a, changedAbs) {
@@ -941,8 +755,8 @@ function assetChanged(a, changedAbs) {
941
755
  const dir = assetOwnDir(a);
942
756
  if (dir === null) return false;
943
757
  for (const f of changedAbs) {
944
- const rel = path2.relative(dir, f);
945
- if (rel.startsWith("..") || path2.isAbsolute(rel)) continue;
758
+ const rel = path.relative(dir, f);
759
+ if (rel.startsWith("..") || path.isAbsolute(rel)) continue;
946
760
  if (!isNonAssetPath(toPosix(rel))) return true;
947
761
  }
948
762
  return false;
@@ -967,7 +781,7 @@ function runVersionsCheck(pathArg, opts) {
967
781
  process.exit(1);
968
782
  return;
969
783
  }
970
- const changedAbs = new Set(changed.map((f) => path2.resolve(root, f)));
784
+ const changedAbs = new Set(changed.map((f) => path.resolve(root, f)));
971
785
  assets = assets.filter((a) => assetChanged(a, changedAbs));
972
786
  }
973
787
  logInfo(`Checking versions in ${root}`);
@@ -1000,8 +814,8 @@ function makeValidateCommand() {
1000
814
  "--strict-conformance",
1001
815
  "Treat Agent Skills (agentskills.io) standard findings as errors"
1002
816
  ).action(async (targetPath, opts) => {
1003
- const absPath = path2.resolve(targetPath);
1004
- if (fs2.existsSync(absPath) && !fs2.statSync(absPath).isDirectory()) {
817
+ const absPath = path.resolve(targetPath);
818
+ if (fs.existsSync(absPath) && !fs.statSync(absPath).isDirectory()) {
1005
819
  logErr(`${absPath} is not a directory: nothing to validate. Pass the library directory.`);
1006
820
  process.exit(1);
1007
821
  return;
@@ -1029,7 +843,7 @@ function makeValidateCommand() {
1029
843
  warnIgnoredDomainFiles(absPath);
1030
844
  warnLegacyBundleFiles(absPath);
1031
845
  logInfo(`Scanned ${total} asset manifest(s) and ${ws.total} skaile.yaml file(s)`);
1032
- if (total === 0 && ws.total === 0 && totalErrors === 0 && !fs2.existsSync(path2.join(absPath, SKAILE_MANIFEST_FILENAME))) {
846
+ if (total === 0 && ws.total === 0 && totalErrors === 0 && !fs.existsSync(path.join(absPath, SKAILE_MANIFEST_FILENAME))) {
1033
847
  logErr(
1034
848
  `Nothing to validate in ${absPath}: no asset manifest, skaile.yaml or ${SKAILE_MANIFEST_FILENAME} found.`
1035
849
  );
@@ -1077,6 +891,6 @@ function makeValidateCommand() {
1077
891
  return cmd;
1078
892
  }
1079
893
 
1080
- export { isRecord, makeValidateCommand, scanIdentities };
1081
- //# sourceMappingURL=chunk-NMI2TWMH.js.map
1082
- //# sourceMappingURL=chunk-NMI2TWMH.js.map
894
+ export { makeValidateCommand, scanIdentities };
895
+ //# sourceMappingURL=chunk-Z3IRZBXB.js.map
896
+ //# sourceMappingURL=chunk-Z3IRZBXB.js.map