@skaile/workspaces 5.0.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/{asset-feeds-HIWT4DVT.js → asset-feeds-TU5CS6QL.js} +10 -17
  3. package/dist/asset-feeds-TU5CS6QL.js.map +1 -0
  4. package/dist/asset-manager/catalog-deployer.js +5 -5
  5. package/dist/asset-manager/index.js +8 -8
  6. package/dist/asset-manager/installer.js +6 -6
  7. package/dist/asset-manager/src/index.d.ts +2 -1
  8. package/dist/asset-manager/src/index.d.ts.map +1 -1
  9. package/dist/bridge/drivers/claude-sdk.js +7 -7
  10. package/dist/bridge/drivers/codex.js +7 -7
  11. package/dist/bridge/drivers/continue.js +8 -8
  12. package/dist/bridge/drivers/echo.js +1 -1
  13. package/dist/bridge/drivers/gemini.js +5 -5
  14. package/dist/bridge/drivers/goose.js +8 -8
  15. package/dist/bridge/drivers/omp.js +2 -2
  16. package/dist/bridge/drivers/opencode.js +8 -8
  17. package/dist/bridge/drivers/qwen.js +5 -5
  18. package/dist/bridge/index.js +8 -8
  19. package/dist/{chunk-GFPG27HK.js → chunk-2EOPGGLY.js} +6 -6
  20. package/dist/{chunk-GFPG27HK.js.map → chunk-2EOPGGLY.js.map} +1 -1
  21. package/dist/{chunk-WOJ4AK3Q.js → chunk-2Y6DSR36.js} +5 -4
  22. package/dist/chunk-2Y6DSR36.js.map +1 -0
  23. package/dist/{chunk-I7Z4FN52.js → chunk-3KSAFYD4.js} +9 -5
  24. package/dist/chunk-3KSAFYD4.js.map +1 -0
  25. package/dist/{chunk-32DMH2GD.js → chunk-3NGPZC44.js} +10 -10
  26. package/dist/chunk-3NGPZC44.js.map +1 -0
  27. package/dist/{chunk-YOWFUJO7.js → chunk-57DVX53V.js} +84 -20
  28. package/dist/chunk-57DVX53V.js.map +1 -0
  29. package/dist/{chunk-LHFZTVIM.js → chunk-6LDUA57J.js} +9 -9
  30. package/dist/chunk-6LDUA57J.js.map +1 -0
  31. package/dist/{chunk-7QMRP6BC.js → chunk-AGWYBS2E.js} +6 -6
  32. package/dist/{chunk-7QMRP6BC.js.map → chunk-AGWYBS2E.js.map} +1 -1
  33. package/dist/{chunk-35G4M33T.js → chunk-AOMWF2OE.js} +4 -4
  34. package/dist/chunk-AOMWF2OE.js.map +1 -0
  35. package/dist/{chunk-RSHMAEK3.js → chunk-AYNPGPT5.js} +5 -5
  36. package/dist/{chunk-RSHMAEK3.js.map → chunk-AYNPGPT5.js.map} +1 -1
  37. package/dist/{chunk-CFL5IJHV.js → chunk-CI6FQ654.js} +3 -3
  38. package/dist/{chunk-CFL5IJHV.js.map → chunk-CI6FQ654.js.map} +1 -1
  39. package/dist/{chunk-MX7IRKTO.js → chunk-E3ZACBHD.js} +13 -16
  40. package/dist/chunk-E3ZACBHD.js.map +1 -0
  41. package/dist/{chunk-HD5K3BYW.js → chunk-E67J56FJ.js} +3 -3
  42. package/dist/{chunk-HD5K3BYW.js.map → chunk-E67J56FJ.js.map} +1 -1
  43. package/dist/{chunk-JFVEX4G5.js → chunk-EPHQWHOH.js} +6 -6
  44. package/dist/{chunk-JFVEX4G5.js.map → chunk-EPHQWHOH.js.map} +1 -1
  45. package/dist/chunk-F7JHP7JV.js +122 -0
  46. package/dist/chunk-F7JHP7JV.js.map +1 -0
  47. package/dist/{chunk-TVYLXZTT.js → chunk-G47EV3V6.js} +2 -2
  48. package/dist/{chunk-TVYLXZTT.js.map → chunk-G47EV3V6.js.map} +1 -1
  49. package/dist/{chunk-MBVNMPG7.js → chunk-IWCCZL7C.js} +17 -11
  50. package/dist/chunk-IWCCZL7C.js.map +1 -0
  51. package/dist/{chunk-I3ITSUWS.js → chunk-IYIIT4R3.js} +5 -5
  52. package/dist/{chunk-I3ITSUWS.js.map → chunk-IYIIT4R3.js.map} +1 -1
  53. package/dist/{chunk-XWLEXD34.js → chunk-KAYH6AXN.js} +3 -3
  54. package/dist/{chunk-XWLEXD34.js.map → chunk-KAYH6AXN.js.map} +1 -1
  55. package/dist/{chunk-HWE3FXF4.js → chunk-MXXKTQXJ.js} +3 -3
  56. package/dist/{chunk-HWE3FXF4.js.map → chunk-MXXKTQXJ.js.map} +1 -1
  57. package/dist/{chunk-IGXKUCLI.js → chunk-P5UQ56RA.js} +3 -3
  58. package/dist/{chunk-IGXKUCLI.js.map → chunk-P5UQ56RA.js.map} +1 -1
  59. package/dist/{chunk-53WMBXSL.js → chunk-QFZFZXQW.js} +118 -21
  60. package/dist/chunk-QFZFZXQW.js.map +1 -0
  61. package/dist/{chunk-RP4B4HVX.js → chunk-RDTHJSGY.js} +2 -2
  62. package/dist/{chunk-RP4B4HVX.js.map → chunk-RDTHJSGY.js.map} +1 -1
  63. package/dist/{chunk-PV4OBVA3.js → chunk-RNNUYFFD.js} +2 -2
  64. package/dist/{chunk-PV4OBVA3.js.map → chunk-RNNUYFFD.js.map} +1 -1
  65. package/dist/{chunk-X7MHVL4R.js → chunk-SP47UJKE.js} +28 -16
  66. package/dist/{chunk-X7MHVL4R.js.map → chunk-SP47UJKE.js.map} +1 -1
  67. package/dist/{chunk-EB4ZTESQ.js → chunk-TOSHZX4C.js} +8 -3
  68. package/dist/chunk-TOSHZX4C.js.map +1 -0
  69. package/dist/{chunk-KAJH3XPW.js → chunk-U6K3I3AX.js} +3 -3
  70. package/dist/{chunk-KAJH3XPW.js.map → chunk-U6K3I3AX.js.map} +1 -1
  71. package/dist/{chunk-22DN3DB2.js → chunk-UMSWQKCY.js} +3 -3
  72. package/dist/{chunk-22DN3DB2.js.map → chunk-UMSWQKCY.js.map} +1 -1
  73. package/dist/{chunk-H5G3OYY6.js → chunk-WKIOWDLQ.js} +3 -3
  74. package/dist/{chunk-H5G3OYY6.js.map → chunk-WKIOWDLQ.js.map} +1 -1
  75. package/dist/{chunk-ODT7HSLI.js → chunk-X6E7Y4JD.js} +10 -9
  76. package/dist/chunk-X6E7Y4JD.js.map +1 -0
  77. package/dist/chunk-XUQBVK4R.js +15 -0
  78. package/dist/chunk-XUQBVK4R.js.map +1 -0
  79. package/dist/{chunk-CGJ7B6MZ.js → chunk-YDJZRLGN.js} +3 -3
  80. package/dist/{chunk-CGJ7B6MZ.js.map → chunk-YDJZRLGN.js.map} +1 -1
  81. package/dist/{chunk-KREXWKVX.js → chunk-YIVB7GIP.js} +3 -3
  82. package/dist/{chunk-KREXWKVX.js.map → chunk-YIVB7GIP.js.map} +1 -1
  83. package/dist/{chunk-HTBGJCKP.js → chunk-YMOZC2D3.js} +4 -4
  84. package/dist/{chunk-HTBGJCKP.js.map → chunk-YMOZC2D3.js.map} +1 -1
  85. package/dist/cli/index.js +460 -479
  86. package/dist/cli/index.js.map +1 -1
  87. package/dist/cli/src/asset-feeds.d.ts.map +1 -1
  88. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  89. package/dist/cli/src/commands/flow.d.ts +5 -5
  90. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  91. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  92. package/dist/cli/src/commands/project.d.ts.map +1 -1
  93. package/dist/cli/src/commands/publish-core.d.ts +10 -0
  94. package/dist/cli/src/commands/publish-core.d.ts.map +1 -1
  95. package/dist/cli/src/commands/run.d.ts.map +1 -1
  96. package/dist/cli/src/commands/skailify-lib.d.ts +17 -0
  97. package/dist/cli/src/commands/skailify-lib.d.ts.map +1 -1
  98. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  99. package/dist/cli/src/flow-discovery.d.ts +44 -1
  100. package/dist/cli/src/flow-discovery.d.ts.map +1 -1
  101. package/dist/cli/src/helpers.d.ts +6 -0
  102. package/dist/cli/src/helpers.d.ts.map +1 -1
  103. package/dist/cli/src/open-library.d.ts +11 -0
  104. package/dist/cli/src/open-library.d.ts.map +1 -1
  105. package/dist/connectors/config.js +3 -3
  106. package/dist/connectors/index.js +11 -11
  107. package/dist/connectors/src/connector-manager.d.ts +53 -3
  108. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  109. package/dist/connectors/src/connector-prompt.d.ts +16 -2
  110. package/dist/connectors/src/connector-prompt.d.ts.map +1 -1
  111. package/dist/connectors/src/fleet-utils.d.ts +3 -4
  112. package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
  113. package/dist/connectors/src/index.d.ts +3 -3
  114. package/dist/connectors/src/index.d.ts.map +1 -1
  115. package/dist/connectors-VX7YRFFS.js +45 -0
  116. package/dist/{connectors-T57XL7EA.js.map → connectors-VX7YRFFS.js.map} +1 -1
  117. package/dist/core/driver-targets.js +1 -1
  118. package/dist/core/index.js +5 -5
  119. package/dist/core/runtime-assets.js +3 -3
  120. package/dist/core/src/driver-targets.d.ts +10 -0
  121. package/dist/core/src/driver-targets.d.ts.map +1 -1
  122. package/dist/core/src/index.d.ts +2 -2
  123. package/dist/core/src/index.d.ts.map +1 -1
  124. package/dist/core/src/settings.d.ts +13 -0
  125. package/dist/core/src/settings.d.ts.map +1 -1
  126. package/dist/core/store.js +2 -2
  127. package/dist/core/workspace-config.js +2 -2
  128. package/dist/deploy/index.js +5 -5
  129. package/dist/{ensure-sources-G4FXTJDB.js → ensure-sources-2XQS32WI.js} +11 -11
  130. package/dist/{ensure-sources-G4FXTJDB.js.map → ensure-sources-2XQS32WI.js.map} +1 -1
  131. package/dist/factory-assets/connectors/box.js +11 -11
  132. package/dist/factory-assets/connectors/deploy.js +11 -11
  133. package/dist/factory-assets/connectors/devserver.js +11 -11
  134. package/dist/factory-assets/connectors/flow/adapter.js +11 -11
  135. package/dist/factory-assets/connectors/flow/engine.js +6 -6
  136. package/dist/factory-assets/connectors/flow/run-flow.js +12 -12
  137. package/dist/factory-assets/connectors/flow.js +11 -11
  138. package/dist/factory-assets/connectors/git.js +11 -11
  139. package/dist/factory-assets/connectors/gmail.js +11 -11
  140. package/dist/factory-assets/connectors/googledrive.js +11 -11
  141. package/dist/factory-assets/connectors/local.js +11 -11
  142. package/dist/factory-assets/connectors/mattermost.js +11 -11
  143. package/dist/factory-assets/connectors/memory.js +11 -11
  144. package/dist/factory-assets/connectors/minio.js +11 -11
  145. package/dist/factory-assets/connectors/postgres.js +11 -11
  146. package/dist/factory-assets/connectors/s3.js +11 -11
  147. package/dist/factory-assets/connectors/sharepoint.js +11 -11
  148. package/dist/factory-assets/connectors/sqlite.js +11 -11
  149. package/dist/factory-assets/connectors/static-server.js +11 -11
  150. package/dist/factory-assets/connectors/tunnel.js +11 -11
  151. package/dist/factory-assets/connectors/webdav.js +11 -11
  152. package/dist/factory-assets/connectors/xstate-store.js +11 -11
  153. package/dist/factory-assets/connectors/xstate.js +11 -11
  154. package/dist/{flows-7E2GVW5L.js → flows-SVCCADGE.js} +8 -8
  155. package/dist/{flows-7E2GVW5L.js.map → flows-SVCCADGE.js.map} +1 -1
  156. package/dist/{helpers-EVPKJXGS.js → helpers-IELQGVGB.js} +11 -11
  157. package/dist/{helpers-EVPKJXGS.js.map → helpers-IELQGVGB.js.map} +1 -1
  158. package/dist/library/index.js +6 -6
  159. package/dist/library/src/local/local-catalog-source.d.ts +14 -1
  160. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  161. package/dist/{library-publish-SBEWWTPM.js → library-publish-TCFU3X5L.js} +27 -15
  162. package/dist/library-publish-TCFU3X5L.js.map +1 -0
  163. package/dist/{open-library-UAZIGZUQ.js → open-library-SSBN4FX2.js} +14 -13
  164. package/dist/{open-library-UAZIGZUQ.js.map → open-library-SSBN4FX2.js.map} +1 -1
  165. package/dist/open-registry-CHCWKV5W.js +32 -0
  166. package/dist/open-registry-CHCWKV5W.js.map +1 -0
  167. package/dist/{paths-U7TA7MTE.js → paths-MKSI52PF.js} +8 -8
  168. package/dist/{paths-U7TA7MTE.js.map → paths-MKSI52PF.js.map} +1 -1
  169. package/dist/{plugin-store-TT45MGQZ.js → plugin-store-SVYV7L4C.js} +7 -7
  170. package/dist/{plugin-store-TT45MGQZ.js.map → plugin-store-SVYV7L4C.js.map} +1 -1
  171. package/dist/{project-JLD5RCVK.js → project-PJ37PM6N.js} +12 -12
  172. package/dist/{project-JLD5RCVK.js.map → project-PJ37PM6N.js.map} +1 -1
  173. package/dist/resolver/index.js +5 -5
  174. package/dist/runner/index.js +17 -17
  175. package/dist/runner/src/external-mcp.d.ts +9 -1
  176. package/dist/runner/src/external-mcp.d.ts.map +1 -1
  177. package/dist/runner/src/fleet-health-flag-dispatcher.d.ts +14 -11
  178. package/dist/runner/src/fleet-health-flag-dispatcher.d.ts.map +1 -1
  179. package/dist/runner/src/late-mcp-rebuild.d.ts +39 -0
  180. package/dist/runner/src/late-mcp-rebuild.d.ts.map +1 -0
  181. package/dist/runner/src/resources.d.ts +8 -0
  182. package/dist/runner/src/resources.d.ts.map +1 -1
  183. package/dist/runner/src/serve.d.ts.map +1 -1
  184. package/dist/runner/src/session-builder.d.ts +7 -0
  185. package/dist/runner/src/session-builder.d.ts.map +1 -1
  186. package/dist/sdk/asset-manager.js +8 -8
  187. package/dist/sdk/bridge.js +8 -8
  188. package/dist/sdk/core.js +5 -5
  189. package/dist/sdk/flow.js +6 -6
  190. package/dist/sdk/index.js +17 -17
  191. package/dist/sdk/resolver.js +5 -5
  192. package/dist/sdk/runner.js +17 -17
  193. package/dist/{setup-PGZM4SOO.js → setup-JW2ZGCUG.js} +15 -15
  194. package/dist/{setup-PGZM4SOO.js.map → setup-JW2ZGCUG.js.map} +1 -1
  195. package/dist/{skills-7QVYPIXI.js → skills-7K2YO3KN.js} +7 -7
  196. package/dist/{skills-7QVYPIXI.js.map → skills-7K2YO3KN.js.map} +1 -1
  197. package/dist/{source-SDZYXVVV.js → source-F2VO32W6.js} +15 -14
  198. package/dist/{source-SDZYXVVV.js.map → source-F2VO32W6.js.map} +1 -1
  199. package/dist/{source-manifest-publish-UDLTYV6Y.js → source-manifest-publish-AXNII2J4.js} +17 -16
  200. package/dist/source-manifest-publish-AXNII2J4.js.map +1 -0
  201. package/dist/tui/index.js +17 -17
  202. package/dist/workspace-plugin/adapters/mcp.js +29 -8
  203. package/dist/workspace-plugin/adapters/omp.js +15 -15
  204. package/dist/workspace-plugin/adapters/omp.js.map +1 -1
  205. package/dist/workspace-plugin/index.js +1 -1
  206. package/dist/workspace-plugin/src/tools/connectors.d.ts +1 -1
  207. package/dist/workspace-plugin/src/tools/connectors.d.ts.map +1 -1
  208. package/package.json +1 -1
  209. package/dist/asset-feeds-HIWT4DVT.js.map +0 -1
  210. package/dist/chunk-32DMH2GD.js.map +0 -1
  211. package/dist/chunk-35G4M33T.js.map +0 -1
  212. package/dist/chunk-53WMBXSL.js.map +0 -1
  213. package/dist/chunk-EB4ZTESQ.js.map +0 -1
  214. package/dist/chunk-I7Z4FN52.js.map +0 -1
  215. package/dist/chunk-LHFZTVIM.js.map +0 -1
  216. package/dist/chunk-MBVNMPG7.js.map +0 -1
  217. package/dist/chunk-MX7IRKTO.js.map +0 -1
  218. package/dist/chunk-ODT7HSLI.js.map +0 -1
  219. package/dist/chunk-WOJ4AK3Q.js.map +0 -1
  220. package/dist/chunk-YOWFUJO7.js.map +0 -1
  221. package/dist/connectors-T57XL7EA.js +0 -5
  222. package/dist/library-publish-SBEWWTPM.js.map +0 -1
  223. package/dist/source-manifest-publish-UDLTYV6Y.js.map +0 -1
package/dist/cli/index.js CHANGED
@@ -1,21 +1,23 @@
1
1
  #!/usr/bin/env node
2
- import { AI_RESOURCES } from '../chunk-HTBGJCKP.js';
3
- import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-32DMH2GD.js';
4
- import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-I3ITSUWS.js';
5
- import { makeSourceCommand, syncProjectSources } from '../chunk-ODT7HSLI.js';
6
- import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity, refFor } from '../chunk-I7Z4FN52.js';
7
- import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-MX7IRKTO.js';
8
- import { logErr, S, logOk, logInfo, logWarn, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-WOJ4AK3Q.js';
2
+ import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-IYIIT4R3.js';
3
+ import { makeSourceCommand, syncProjectSources } from '../chunk-X6E7Y4JD.js';
4
+ import { AI_RESOURCES } from '../chunk-YMOZC2D3.js';
5
+ import { upsertManifestAsset, resolveImportSource, normalizeSkillContent, missingRootAssets, pruneMissingRootAssets } from '../chunk-F7JHP7JV.js';
6
+ import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity, refFor, assetEntryRef } from '../chunk-3KSAFYD4.js';
7
+ import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-3NGPZC44.js';
8
+ import { openCatalogSource, openLibraryManager, openLibrary } from '../chunk-E3ZACBHD.js';
9
+ import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-2Y6DSR36.js';
10
+ import { createFullRegistry } from '../chunk-XUQBVK4R.js';
9
11
  import { LocalSecretsProvider } from '../chunk-EB6OPURC.js';
10
- import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-YOWFUJO7.js';
11
- import { buildClaudePluginFiles } from '../chunk-TVYLXZTT.js';
12
- import '../chunk-RSHMAEK3.js';
13
- import '../chunk-PV4OBVA3.js';
12
+ import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-57DVX53V.js';
13
+ import { buildClaudePluginFiles } from '../chunk-G47EV3V6.js';
14
+ import '../chunk-AYNPGPT5.js';
15
+ import '../chunk-RNNUYFFD.js';
14
16
  import '../chunk-R6O6YWU7.js';
15
17
  import '../chunk-WCQMXBO5.js';
16
18
  import '../chunk-TYUJB336.js';
17
19
  import '../chunk-4ZTPYIBE.js';
18
- import '../chunk-35G4M33T.js';
20
+ import '../chunk-AOMWF2OE.js';
19
21
  import '../chunk-X5YPJV4N.js';
20
22
  import '../chunk-O7SG5PC2.js';
21
23
  import '../chunk-7QBNJTTQ.js';
@@ -24,50 +26,50 @@ import '../chunk-5LKOAX7I.js';
24
26
  import '../chunk-32NA4TVC.js';
25
27
  import '../chunk-W3UDISS2.js';
26
28
  import '../chunk-HCYS7GFP.js';
27
- import { runFlow, resumeFlow } from '../chunk-GFPG27HK.js';
29
+ import { runFlow, resumeFlow } from '../chunk-2EOPGGLY.js';
28
30
  import '../chunk-4R6DROGN.js';
29
31
  import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-YV4J7V53.js';
30
32
  import '../chunk-VDJKWKH2.js';
31
33
  import '../chunk-CT6NQSA4.js';
32
- import '../chunk-53WMBXSL.js';
34
+ import '../chunk-QFZFZXQW.js';
33
35
  import '../chunk-KC3OF6B2.js';
34
- import '../chunk-H5G3OYY6.js';
35
- import '../chunk-KREXWKVX.js';
36
+ import '../chunk-WKIOWDLQ.js';
37
+ import '../chunk-YIVB7GIP.js';
36
38
  import '../chunk-TVOODIZE.js';
37
39
  import '../chunk-EINLFFP6.js';
38
40
  import '../chunk-LOO5CB5M.js';
39
41
  import '../chunk-RDYI4MML.js';
40
- import '../chunk-IGXKUCLI.js';
42
+ import '../chunk-P5UQ56RA.js';
41
43
  import '../chunk-XBSQ4KMC.js';
42
44
  import '../chunk-YROR332M.js';
43
- import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-RP4B4HVX.js';
45
+ import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-RDTHJSGY.js';
44
46
  import '../chunk-6E6PKKAD.js';
45
47
  import '../chunk-IFGTRL2I.js';
46
- import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-22DN3DB2.js';
48
+ import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-UMSWQKCY.js';
47
49
  import '../chunk-JUXQUZOQ.js';
48
50
  import '../chunk-QZLWJETK.js';
49
51
  import '../chunk-XUUYAS3Z.js';
50
52
  import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-NFGRW3L7.js';
51
53
  import '../chunk-QCI6D7E4.js';
52
54
  import '../chunk-IDEA6CYI.js';
53
- import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-LHFZTVIM.js';
54
- import { cloneOrInitGitRepo, ensureGitRepo, isGitRepo, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-X7MHVL4R.js';
55
+ import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-6LDUA57J.js';
56
+ import { cloneOrInitGitRepo, ensureGitRepo, isGitRepo, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-SP47UJKE.js';
55
57
  import '../chunk-UVOJSWD2.js';
56
58
  import '../chunk-H4EGUQ7M.js';
57
59
  import '../chunk-R7FOF242.js';
58
60
  import '../chunk-ZDKJHQY2.js';
59
- import '../chunk-7QMRP6BC.js';
61
+ import '../chunk-AGWYBS2E.js';
60
62
  import '../chunk-CGYEHQOX.js';
61
- import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, aiResourceRoots, readLock, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile } from '../chunk-MBVNMPG7.js';
63
+ import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, readLock, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile, aiResourceRoots } from '../chunk-IWCCZL7C.js';
62
64
  import '../chunk-4GY63JU6.js';
63
- import { factoryAssetRoots } from '../chunk-CGJ7B6MZ.js';
64
- import '../chunk-KAJH3XPW.js';
65
+ import { factoryAssetRoots } from '../chunk-YDJZRLGN.js';
66
+ import '../chunk-U6K3I3AX.js';
65
67
  import { DRIVER_DEFAULTS } from '../chunk-K5GBV4SA.js';
66
68
  import { findKindDirs } from '../chunk-A2ULN3KX.js';
67
- import { sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-HWE3FXF4.js';
69
+ import { sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-MXXKTQXJ.js';
68
70
  import { globalCacheRoot, globalSkaileDir } from '../chunk-TLKM4M47.js';
69
- import { SUPPORTED_DRIVER_TARGETS } from '../chunk-EB4ZTESQ.js';
70
- import { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-AG44ZJ7W.js';
71
+ import { SUPPORTED_DRIVER_TARGETS } from '../chunk-TOSHZX4C.js';
72
+ import { loadSkPublishManifest, SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, saveSkPublishManifest } from '../chunk-AG44ZJ7W.js';
71
73
  import { pluginTitle } from '../chunk-RVRB27AN.js';
72
74
  import { parseFrontmatter, scanDirectory } from '../chunk-DXUQCMVT.js';
73
75
  import { parseAssetRef, ASSET_KINDS, isValidAssetName, slugifyAssetName, ASSET_NAME_HINT, assetRefToStr } from '../chunk-43ZBF3WH.js';
@@ -81,22 +83,21 @@ import '../chunk-UQ6LFBPZ.js';
81
83
  import '../chunk-TNWXGHLD.js';
82
84
  import { validatePreset, SKILL_BODY_PLACEHOLDER } from '../chunk-5CYEWBPB.js';
83
85
  import '../chunk-NSBPE2FW.js';
84
- import * as fs11 from 'fs';
85
- import fs11__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
86
- import * as path35 from 'path';
87
- import path35__default, { resolve, join } from 'path';
86
+ import * as fs10 from 'fs';
87
+ import fs10__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
88
+ import * as path34 from 'path';
89
+ import path34__default, { resolve, join } from 'path';
88
90
  import { fileURLToPath } from 'url';
89
91
  import { Help, Command, Option } from 'commander';
90
92
  import { rcompare } from 'semver';
91
93
  import * as p5 from '@clack/prompts';
92
94
  import pc5 from 'picocolors';
93
- import * as os from 'os';
94
- import { parse, stringify, parseDocument } from 'yaml';
95
95
  import * as readline from 'readline';
96
96
  import { createInterface } from 'readline';
97
- import fs5 from 'fs/promises';
97
+ import fs4 from 'fs/promises';
98
98
  import { parse as parse$1, stringify as stringify$1 } from 'smol-toml';
99
99
  import { execSync, spawnSync } from 'child_process';
100
+ import { parse, stringify, parseDocument } from 'yaml';
100
101
  import * as readline2 from 'readline/promises';
101
102
  import { createTRPCUntypedClient, httpLink, httpSubscriptionLink } from '@trpc/client';
102
103
 
@@ -134,7 +135,7 @@ async function runSearch(kind, query, opts) {
134
135
  const showLocal = !opts.store;
135
136
  const showStore = !opts.local;
136
137
  const { resolveConfig } = await import('../library/index.js');
137
- const airGapped = resolveConfig({ projectDir: path35__default.resolve(opts.projectDir) }).catalog.cache_ttl === 0;
138
+ const airGapped = resolveConfig({ projectDir: path34__default.resolve(opts.projectDir) }).catalog.cache_ttl === 0;
138
139
  if (showLocal) {
139
140
  await searchLocal(query, kind, opts, showStore, airGapped);
140
141
  }
@@ -143,7 +144,7 @@ async function runSearch(kind, query, opts) {
143
144
  }
144
145
  }
145
146
  async function searchIndex(query, kind) {
146
- const { openLibrary: openLibrary2 } = await import('../open-library-UAZIGZUQ.js');
147
+ const { openLibrary: openLibrary2 } = await import('../open-library-SSBN4FX2.js');
147
148
  const library = await openLibrary2();
148
149
  try {
149
150
  const defs = await library.listAssetDefs(kind ? { kind } : {});
@@ -175,7 +176,7 @@ async function searchIndex(query, kind) {
175
176
  }
176
177
  }
177
178
  async function searchFactory(projectDir, query, kind) {
178
- const prefixes = factoryAssetRoots().map((r) => r.endsWith(path35__default.sep) ? r : r + path35__default.sep);
179
+ const prefixes = factoryAssetRoots().map((r) => r.endsWith(path34__default.sep) ? r : r + path34__default.sep);
179
180
  const isFactoryPath = (p7) => prefixes.some((fp) => p7 === fp.slice(0, -1) || p7.startsWith(fp));
180
181
  try {
181
182
  const entries = await new AssetManager({ projectDir }).search(query, kind);
@@ -192,11 +193,11 @@ function unionEntries(indexed, factory) {
192
193
  return [...indexed, ...factory.filter((e) => !seen.has(entryDedupKey(e)))];
193
194
  }
194
195
  async function searchLocal(query, kind, opts, showStore, airGapped) {
195
- const projectDir = path35__default.resolve(opts.projectDir);
196
+ const projectDir = path34__default.resolve(opts.projectDir);
196
197
  const factory = await searchFactory(projectDir, query, kind);
197
198
  let entries = unionEntries(await searchIndex(query, kind), factory);
198
199
  if (entries.length === 0 && !query && !kind && !airGapped) {
199
- const { autoSyncForSearch } = await import('../source-SDZYXVVV.js');
200
+ const { autoSyncForSearch } = await import('../source-F2VO32W6.js');
200
201
  if (await autoSyncForSearch(projectDir)) {
201
202
  entries = unionEntries(await searchIndex(query, kind), factory);
202
203
  }
@@ -266,9 +267,9 @@ async function searchStore(query, kind, opts, airGapped) {
266
267
  logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
267
268
  return;
268
269
  }
269
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-UAZIGZUQ.js');
270
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-SSBN4FX2.js');
270
271
  try {
271
- const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
272
+ const remote = await openCatalogSource2({ projectDir: path34__default.resolve(opts.projectDir) });
272
273
  const assets = await remote.listAssets(kind ? { kind } : {});
273
274
  const results = filterCatalogAssets(assets, query);
274
275
  if (results.length > 0) {
@@ -371,7 +372,7 @@ function makeAddCommand() {
371
372
  return new Command("add").description("Add to skaile.yaml + deploy").argument("<ref>", "Asset reference (kind:@<publisher>/name#<version>)").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Record in ~/.skaile/skaile.yaml + deploy to every global harness").option(
372
373
  "--harness <ids>",
373
374
  "Comma-separated global harnesses to deploy into (default: all resolved); implies --global"
374
- ).option("--target <agent>", "Driver target", "claude-code").option(
375
+ ).option("--target <agent>", `Driver target (${TARGET_DEFAULT_HINT})`).option(
375
376
  "--link",
376
377
  "symlink local-path assets instead of copying (dev loop; machine-local, not for committing)"
377
378
  ).option(
@@ -384,7 +385,7 @@ function makeAddCommand() {
384
385
  }
385
386
  const harnesses = parseHarnessFilter(opts.harness);
386
387
  const am2 = new AssetManager({
387
- projectDir: path35__default.resolve(opts.projectDir),
388
+ projectDir: path34__default.resolve(opts.projectDir),
388
389
  global: opts.global || harnesses !== void 0,
389
390
  harnesses,
390
391
  driverTarget: opts.target
@@ -425,10 +426,10 @@ function makeRemoveCommand() {
425
426
  return new Command("remove").description("Remove from skaile.yaml + undeploy").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Remove from ~/.skaile/skaile.yaml + undeploy from every global harness").option(
426
427
  "--harness <ids>",
427
428
  "Comma-separated global harnesses to undeploy from (default: all resolved); implies --global"
428
- ).option("--target <agent>", "Driver target", "claude-code").option("--no-soft-deps", "skip the orphaned-soft-dep prompt (don't remove, don't report)").action(async (ref, opts) => {
429
+ ).option("--target <agent>", `Driver target (${TARGET_DEFAULT_HINT})`).option("--no-soft-deps", "skip the orphaned-soft-dep prompt (don't remove, don't report)").action(async (ref, opts) => {
429
430
  const harnesses = parseHarnessFilter(opts.harness);
430
431
  const am2 = new AssetManager({
431
- projectDir: path35__default.resolve(opts.projectDir),
432
+ projectDir: path34__default.resolve(opts.projectDir),
432
433
  global: opts.global || harnesses !== void 0,
433
434
  harnesses,
434
435
  driverTarget: opts.target
@@ -460,7 +461,9 @@ function makeListCommand() {
460
461
  "-g, --global",
461
462
  "Read the global SSOT (~/.skaile/skaile.yaml); report state per harness"
462
463
  ).option("--harness <ids>", "Comma-separated global harnesses to report (implies --global)").option("--json", "Output as JSON").addOption(
463
- new Option("--target <agent>", "Driver target").default("claude-code").choices(SUPPORTED_DRIVER_TARGETS)
464
+ new Option("--target <agent>", `Driver target (${TARGET_DEFAULT_HINT})`).choices(
465
+ SUPPORTED_DRIVER_TARGETS
466
+ )
464
467
  ).action(async (kind, opts) => {
465
468
  const harnesses = parseHarnessFilter(opts.harness);
466
469
  if (opts.global || harnesses) {
@@ -468,7 +471,7 @@ function makeListCommand() {
468
471
  return;
469
472
  }
470
473
  const am2 = new AssetManager({
471
- projectDir: path35__default.resolve(opts.projectDir),
474
+ projectDir: path34__default.resolve(opts.projectDir),
472
475
  driverTarget: opts.target
473
476
  });
474
477
  let declared;
@@ -513,7 +516,7 @@ function makeListCommand() {
513
516
  }
514
517
  function runGlobalList(kind, opts, harnesses) {
515
518
  const am2 = new AssetManager({
516
- projectDir: path35__default.resolve(opts.projectDir),
519
+ projectDir: path34__default.resolve(opts.projectDir),
517
520
  global: true,
518
521
  harnesses
519
522
  });
@@ -584,7 +587,7 @@ async function resolveInfoEntry(am2, ref, opts) {
584
587
  return { entry: match ?? deployed };
585
588
  }
586
589
  const lookup = opts.storeLookup ?? (async (filter) => {
587
- const { resolveCatalogSource } = await import('../open-library-UAZIGZUQ.js');
590
+ const { resolveCatalogSource } = await import('../open-library-SSBN4FX2.js');
588
591
  const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
589
592
  try {
590
593
  return await source.listAssets(filter);
@@ -600,7 +603,7 @@ async function resolveInfoEntry(am2, ref, opts) {
600
603
  );
601
604
  return { entry: hit ? catalogAssetToEntry(hit) : null };
602
605
  } catch (err) {
603
- const { LocalCatalogDisabledError } = await import('../open-library-UAZIGZUQ.js');
606
+ const { LocalCatalogDisabledError } = await import('../open-library-SSBN4FX2.js');
604
607
  const storeNote = err instanceof Error ? err.message : String(err);
605
608
  const disabled = err instanceof LocalCatalogDisabledError || /catalog\.url/i.test(storeNote);
606
609
  return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
@@ -616,7 +619,7 @@ function infoNotFoundHint(ref, lookup) {
616
619
  }
617
620
  function makeInfoCommand() {
618
621
  return new Command("info").description("Show asset metadata, deps, deploy status").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
619
- const projectDir = path35__default.resolve(opts.projectDir);
622
+ const projectDir = path34__default.resolve(opts.projectDir);
620
623
  const am2 = new AssetManager({ projectDir });
621
624
  const lookup = await resolveInfoEntry(am2, ref, { projectDir });
622
625
  const entry = lookup.entry;
@@ -652,7 +655,7 @@ function makeCreateCommand() {
652
655
  new Option("-k, --kind <kind>", "Asset kind").default("skill").choices([...ASSET_KINDS])
653
656
  ).option("-d, --dir <dir>", "Target directory (default: cwd)").action((name, opts) => {
654
657
  const am2 = new AssetManager({ projectDir: process.cwd() });
655
- const destDir = opts.dir ? path35__default.resolve(opts.dir) : process.cwd();
658
+ const destDir = opts.dir ? path34__default.resolve(opts.dir) : process.cwd();
656
659
  const result = am2.create(name, opts.kind, destDir);
657
660
  if (result.ok) logOk(`Created ${kindColor(opts.kind)}: ${pc5.dim(result.path)}`);
658
661
  else {
@@ -663,7 +666,7 @@ function makeCreateCommand() {
663
666
  }
664
667
  function makeDoctorCommand() {
665
668
  return new Command("doctor").description("Scan for missing dependency chains").argument("[name]", "Check a specific asset (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (name, opts) => {
666
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
669
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
667
670
  const issues = await am2.doctor();
668
671
  if (issues.length === 0) {
669
672
  logOk("No missing dependencies.");
@@ -685,100 +688,6 @@ function makeDoctorCommand() {
685
688
  console.log();
686
689
  });
687
690
  }
688
- var DEFAULT_IMPORT_VERSION = "0.1.0";
689
- var DEFAULT_IMPORT_STAGE = "alpha";
690
- function claudeSkillRoots() {
691
- const roots = [];
692
- const override = process.env.SKAILE_CLAUDE_SKILLS_DIR;
693
- if (override) roots.push(override);
694
- roots.push(path35.join(os.homedir(), ".claude", "skills"));
695
- return roots;
696
- }
697
- function resolveImportSource(nameOrPath) {
698
- const asPath = path35.resolve(nameOrPath);
699
- if (fs11.existsSync(asPath)) {
700
- const dir = fs11.statSync(asPath).isDirectory() ? asPath : path35.dirname(asPath);
701
- const skillFile = path35.join(dir, "SKILL.md");
702
- if (fs11.existsSync(skillFile)) return { dir, skillFile, via: "path" };
703
- }
704
- if (!nameOrPath.includes(path35.sep) && !nameOrPath.startsWith(".")) {
705
- for (const root of claudeSkillRoots()) {
706
- const dir = path35.join(root, nameOrPath);
707
- const skillFile = path35.join(dir, "SKILL.md");
708
- if (fs11.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
709
- }
710
- }
711
- return null;
712
- }
713
- function normalizeSkillContent(raw, opts = {}) {
714
- const notes = [];
715
- const { data, body } = parseFrontmatter(raw);
716
- const rawName = typeof data.name === "string" && data.name.trim() ? data.name.trim() : void 0;
717
- const sourceName = rawName ?? opts.fallbackName ?? "";
718
- let name = sourceName;
719
- let originalName;
720
- if (!sourceName) {
721
- throw new Error("skill has no `name` in frontmatter and no fallback was provided");
722
- }
723
- if (!isValidAssetName(sourceName)) {
724
- name = slugifyAssetName(sourceName);
725
- originalName = sourceName;
726
- notes.push(`renamed "${sourceName}" \u2192 "${name}" (canonical kebab-case)`);
727
- }
728
- const existingMeta = data.metadata && typeof data.metadata === "object" && !Array.isArray(data.metadata) ? { ...data.metadata } : {};
729
- if (existingMeta.version == null) {
730
- existingMeta.version = opts.version ?? DEFAULT_IMPORT_VERSION;
731
- notes.push(`stamped metadata.version: ${existingMeta.version}`);
732
- }
733
- if (existingMeta.stage == null) {
734
- existingMeta.stage = opts.stage ?? DEFAULT_IMPORT_STAGE;
735
- notes.push(`stamped metadata.stage: ${existingMeta.stage}`);
736
- }
737
- if (existingMeta.tags == null) {
738
- const keywords = Array.isArray(data.keywords) ? data.keywords : [];
739
- existingMeta.tags = keywords.filter((k) => typeof k === "string");
740
- if (existingMeta.tags.length > 0) {
741
- notes.push("promoted top-level keywords \u2192 metadata.tags");
742
- }
743
- }
744
- const ordered = { name };
745
- if (data.description != null) ordered.description = data.description;
746
- ordered.metadata = existingMeta;
747
- for (const [k, v] of Object.entries(data)) {
748
- if (k === "name" || k === "description" || k === "metadata" || k === "keywords") continue;
749
- ordered[k] = v;
750
- }
751
- const fm = stringify(ordered).trimEnd();
752
- const content = `---
753
- ${fm}
754
- ---
755
-
756
- ${body}
757
- `;
758
- const changed = notes.length > 0;
759
- return { content, name, originalName, changed, notes };
760
- }
761
- function upsertManifestAsset(libraryPath, input) {
762
- const manifest = loadSkPublishManifest(libraryPath) ?? { assets: [] };
763
- const assets = Array.isArray(manifest.assets) ? [...manifest.assets] : [];
764
- const overridesTopLevel = !!input.publisher && input.publisher !== manifest.publisher;
765
- const entry = { kind: input.kind, name: input.name, root: input.root };
766
- if (input.version) entry.version = input.version;
767
- if (overridesTopLevel) entry.publisher = input.publisher;
768
- if (input.description) entry.description = input.description;
769
- if (input.keywords && input.keywords.length > 0) entry.keywords = input.keywords;
770
- const idx = assets.findIndex((a) => a.kind === input.kind && a.name === input.name);
771
- const added = idx < 0;
772
- if (added) {
773
- assets.push(entry);
774
- } else {
775
- const merged = { ...assets[idx], ...entry };
776
- if (input.publisher && !overridesTopLevel) delete merged.publisher;
777
- assets[idx] = merged;
778
- }
779
- const manifestPath = saveSkPublishManifest(libraryPath, { ...manifest, assets });
780
- return { manifestPath, added };
781
- }
782
691
 
783
692
  // cli/src/commands/asset-cmd.ts
784
693
  async function resolveDefByRef(library, ref, opts) {
@@ -829,24 +738,24 @@ function makeAssetCommand() {
829
738
  logErr(`Library "${target.name}" is read-only (ownership=reader). Choose --to.`);
830
739
  process.exit(1);
831
740
  }
832
- const rawSkill = fs11.readFileSync(src.skillFile, "utf8");
741
+ const rawSkill = fs10.readFileSync(src.skillFile, "utf8");
833
742
  const norm = opts.normalize ? normalizeSkillContent(rawSkill, {
834
- fallbackName: path35.basename(src.dir),
743
+ fallbackName: path34.basename(src.dir),
835
744
  version: opts.version,
836
745
  stage: opts.stage
837
- }) : { content: rawSkill, name: path35.basename(src.dir), changed: false, notes: [] };
746
+ }) : { content: rawSkill, name: path34.basename(src.dir), changed: false, notes: [] };
838
747
  if (!opts.normalize && !isValidAssetName(norm.name)) {
839
748
  logWarn(
840
749
  `Name "${norm.name}" is not canonical (kebab-case); \`skaile validate\` will reject this manifest entry. Drop --no-normalize to slugify it.`
841
750
  );
842
751
  }
843
- const destDir = path35.join(target.path, norm.name);
844
- if (fs11.existsSync(destDir)) {
752
+ const destDir = path34.join(target.path, norm.name);
753
+ if (fs10.existsSync(destDir)) {
845
754
  logErr(`Destination already exists: ${destDir}`);
846
755
  process.exit(1);
847
756
  }
848
- fs11.cpSync(src.dir, destDir, { recursive: true });
849
- fs11.writeFileSync(path35.join(destDir, "SKILL.md"), norm.content, "utf8");
757
+ fs10.cpSync(src.dir, destDir, { recursive: true });
758
+ fs10.writeFileSync(path34.join(destDir, "SKILL.md"), norm.content, "utf8");
850
759
  for (const note of norm.notes) logInfo(` \u2022 ${note}`);
851
760
  const fm = parseFrontmatter(norm.content).data;
852
761
  const descRaw = fm.description;
@@ -854,7 +763,7 @@ function makeAssetCommand() {
854
763
  for (const f of checkAgentSkillConformance(fm, { dirName: norm.name })) {
855
764
  logWarn(`conformance: ${f.field} \u2014 ${f.message}`);
856
765
  }
857
- const root = path35.relative(target.path, destDir);
766
+ const root = path34.relative(target.path, destDir);
858
767
  const up = upsertManifestAsset(target.path, {
859
768
  kind: "skill",
860
769
  name: norm.name,
@@ -887,7 +796,7 @@ function makeAssetCommand() {
887
796
  logErr(`Invalid --mode "${opts.mode}". Expected: copy | move | link.`);
888
797
  process.exit(1);
889
798
  }
890
- if (!fs11.existsSync(srcPath)) {
799
+ if (!fs10.existsSync(srcPath)) {
891
800
  logErr(`Source path does not exist: ${srcPath}`);
892
801
  process.exit(1);
893
802
  }
@@ -912,23 +821,23 @@ function makeAssetCommand() {
912
821
  );
913
822
  process.exit(1);
914
823
  }
915
- const basename2 = path35.basename(srcPath);
824
+ const basename2 = path34.basename(srcPath);
916
825
  const destDir = target.path;
917
- fs11.mkdirSync(destDir, { recursive: true });
918
- const destPath = path35.join(destDir, basename2);
919
- if (fs11.existsSync(destPath)) {
826
+ fs10.mkdirSync(destDir, { recursive: true });
827
+ const destPath = path34.join(destDir, basename2);
828
+ if (fs10.existsSync(destPath)) {
920
829
  logErr(`Destination already exists: ${destPath}`);
921
830
  process.exit(1);
922
831
  }
923
832
  switch (opts.mode) {
924
833
  case "copy":
925
- fs11.cpSync(srcPath, destPath, { recursive: true });
834
+ fs10.cpSync(srcPath, destPath, { recursive: true });
926
835
  break;
927
836
  case "move":
928
- fs11.renameSync(srcPath, destPath);
837
+ fs10.renameSync(srcPath, destPath);
929
838
  break;
930
839
  case "link":
931
- fs11.symlinkSync(path35.resolve(srcPath), destPath);
840
+ fs10.symlinkSync(path34.resolve(srcPath), destPath);
932
841
  break;
933
842
  }
934
843
  if (target.backend === "git" && opts.commit) {
@@ -985,17 +894,17 @@ function makeAssetCommand() {
985
894
  }
986
895
  const manifestPath = def.manifest.path;
987
896
  const candidateSubpath = typeof manifestPath === "string" && manifestPath.length > 0 ? manifestPath : def.name;
988
- const srcPath = path35.join(lib.path, candidateSubpath);
989
- if (!fs11.existsSync(srcPath)) {
897
+ const srcPath = path34.join(lib.path, candidateSubpath);
898
+ if (!fs10.existsSync(srcPath)) {
990
899
  logErr(`Asset path not found: ${srcPath}`);
991
900
  process.exit(1);
992
901
  }
993
- const destPath = path35.join(target, candidateSubpath);
994
- fs11.mkdirSync(path35.dirname(destPath), { recursive: true });
902
+ const destPath = path34.join(target, candidateSubpath);
903
+ fs10.mkdirSync(path34.dirname(destPath), { recursive: true });
995
904
  if (opts.mode === "copy") {
996
- fs11.cpSync(srcPath, destPath, { recursive: true });
905
+ fs10.cpSync(srcPath, destPath, { recursive: true });
997
906
  } else {
998
- fs11.symlinkSync(path35.resolve(srcPath), destPath);
907
+ fs10.symlinkSync(path34.resolve(srcPath), destPath);
999
908
  }
1000
909
  logOk(`Installed ${catalogAssetRef(def)} \u2192 ${destPath} (${opts.mode})`);
1001
910
  } finally {
@@ -1060,14 +969,14 @@ function makeAuthCommand() {
1060
969
  }
1061
970
  function collectCacheTargets(scope) {
1062
971
  const out = [];
1063
- out.push(path35__default.join(scope.projectDir, ".skaile", "cache"));
1064
- out.push(path35__default.join(scope.projectDir, ".skaile", "store-cache"));
1065
- out.push(path35__default.join(scope.projectDir, ".skaile", "repos"));
972
+ out.push(path34__default.join(scope.projectDir, ".skaile", "cache"));
973
+ out.push(path34__default.join(scope.projectDir, ".skaile", "store-cache"));
974
+ out.push(path34__default.join(scope.projectDir, ".skaile", "repos"));
1066
975
  if (scope.global) {
1067
976
  out.push(globalCacheRoot());
1068
977
  const home = globalSkaileDir();
1069
- out.push(path35__default.join(home, "repos"));
1070
- out.push(path35__default.join(home, "catalog-cache"));
978
+ out.push(path34__default.join(home, "repos"));
979
+ out.push(path34__default.join(home, "catalog-cache"));
1071
980
  }
1072
981
  return out;
1073
982
  }
@@ -1081,7 +990,7 @@ function dirSize(target) {
1081
990
  function dirSizeOfDir(dir) {
1082
991
  let total = 0;
1083
992
  for (const ent of readdirSync(dir, { withFileTypes: true })) {
1084
- const child = path35__default.join(dir, ent.name);
993
+ const child = path34__default.join(dir, ent.name);
1085
994
  if (ent.isSymbolicLink()) continue;
1086
995
  if (ent.isDirectory()) total += dirSizeOfDir(child);
1087
996
  else if (ent.isFile()) total += statSync(child).size;
@@ -1107,7 +1016,7 @@ function makeCacheCommand() {
1107
1016
  const cmd = new Command("cache").description("Inspect and reclaim the re-derivable cache");
1108
1017
  cmd.command("clean").description("Remove the project cache (.skaile/cache); --global also clears ~/.skaile/cache").option("--global", "Also clear the global cache (sources + catalog) and legacy dirs").option("--dry-run", "Show what would be removed without doing it").option("-y, --yes", "Skip confirmation prompt").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
1109
1018
  const targets = collectCacheTargets({
1110
- projectDir: path35__default.resolve(opts.projectDir),
1019
+ projectDir: path34__default.resolve(opts.projectDir),
1111
1020
  global: opts.global
1112
1021
  }).filter((t) => existsSync(t));
1113
1022
  if (targets.length === 0) {
@@ -1137,12 +1046,12 @@ function makeCacheCommand() {
1137
1046
  for (const r of removed) logOk(`Removed ${r}`);
1138
1047
  });
1139
1048
  cmd.command("dir").description("Print the resolved cache roots").option("--global", "Include the global cache root").option("--project-dir <path>", "Project directory", process.cwd()).action((opts) => {
1140
- console.log(path35__default.join(path35__default.resolve(opts.projectDir), ".skaile", "cache"));
1049
+ console.log(path34__default.join(path34__default.resolve(opts.projectDir), ".skaile", "cache"));
1141
1050
  if (opts.global) console.log(globalCacheRoot());
1142
1051
  });
1143
1052
  cmd.command("size").description("Show cache disk usage per directory").option("--global", "Include the global cache").option("--project-dir <path>", "Project directory", process.cwd()).action((opts) => {
1144
1053
  const targets = collectCacheTargets({
1145
- projectDir: path35__default.resolve(opts.projectDir),
1054
+ projectDir: path34__default.resolve(opts.projectDir),
1146
1055
  global: opts.global
1147
1056
  });
1148
1057
  console.log();
@@ -1158,7 +1067,7 @@ function makeCatalogCommand() {
1158
1067
  const catalog = new Command("catalog").description("Catalog source health and configuration");
1159
1068
  catalog.command("test").description("Probe the configured catalog source and report status").option("--project-dir <path>", "Project directory (for project-level config overlay)").option("--url <url>", "Override the catalog URL for this probe").option("--force", "Probe the network even in air-gapped mode (cache_ttl: 0)").action(async (opts) => {
1160
1069
  const { resolveConfig, isLocalCatalogUrl, trpcGetUrl } = await import('../library/index.js');
1161
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : void 0;
1070
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : void 0;
1162
1071
  const cfg = resolveConfig({ projectDir });
1163
1072
  const baseUrl = opts.url ?? cfg.catalog.url;
1164
1073
  if (isLocalCatalogUrl(baseUrl)) {
@@ -1176,7 +1085,7 @@ function makeCatalogCommand() {
1176
1085
  });
1177
1086
  catalog.command("info").description("Print the resolved catalog configuration (url, framing, cacheTtlMs)").option("--project-dir <path>", "Project directory (for project-level config overlay)").action(async (opts) => {
1178
1087
  const { resolveConfig } = await import('../library/index.js');
1179
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : void 0;
1088
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : void 0;
1180
1089
  const cfg = resolveConfig({ projectDir });
1181
1090
  console.log(`url: ${cfg.catalog.url}`);
1182
1091
  console.log(`framing: ${cfg.catalog.framing}`);
@@ -1185,7 +1094,7 @@ function makeCatalogCommand() {
1185
1094
  return catalog;
1186
1095
  }
1187
1096
  async function runLocalCatalogTest(projectDir) {
1188
- const { resolveCatalogSource } = await import('../open-library-UAZIGZUQ.js');
1097
+ const { resolveCatalogSource } = await import('../open-library-SSBN4FX2.js');
1189
1098
  let resolved;
1190
1099
  try {
1191
1100
  resolved = await resolveCatalogSource({ projectDir });
@@ -1305,8 +1214,6 @@ complete -F _${bin}_completion ${bin}`,
1305
1214
  end
1306
1215
  complete -c ${bin} -f -a '(__${bin}_complete)'`
1307
1216
  };
1308
-
1309
- // cli/src/flow-discovery.ts
1310
1217
  function discoverFlows(projectDir) {
1311
1218
  const byId = /* @__PURE__ */ new Map();
1312
1219
  for (const root of aiResourceRoots(projectDir)) {
@@ -1319,6 +1226,54 @@ function discoverFlows(projectDir) {
1319
1226
  function findFlowFile(flowId, priorityRoots = [], projectDir) {
1320
1227
  return findFlowFileInRoots(flowId, [...priorityRoots, ...aiResourceRoots(projectDir)]);
1321
1228
  }
1229
+ async function libraryFlowEntries() {
1230
+ const entries = [];
1231
+ try {
1232
+ const { LocalCatalogSource, LocalIndex, resolveIndexPath } = await import('../library/index.js');
1233
+ const indexPath = resolveIndexPath();
1234
+ if (!existsSync(indexPath)) return entries;
1235
+ const [{ authoringLibraries }, { createFullRegistry: createFullRegistry2 }] = await Promise.all([
1236
+ import('../open-library-SSBN4FX2.js'),
1237
+ import('../open-registry-CHCWKV5W.js')
1238
+ ]);
1239
+ const index = new LocalIndex({ indexPath });
1240
+ try {
1241
+ const registry = createFullRegistry2();
1242
+ for (const lib of authoringLibraries(await index.listSources())) {
1243
+ if (!existsSync(lib.path)) continue;
1244
+ try {
1245
+ const { assets } = new LocalCatalogSource(index, lib.id, lib.path, registry).scan();
1246
+ for (const asset of assets) {
1247
+ if (asset.kind !== "flow") continue;
1248
+ try {
1249
+ const flow = loadFlow(asset.manifestPath);
1250
+ if (flow.id) entries.push({ flow, path: asset.manifestPath });
1251
+ } catch {
1252
+ }
1253
+ }
1254
+ } catch {
1255
+ }
1256
+ }
1257
+ } finally {
1258
+ index.close();
1259
+ }
1260
+ } catch {
1261
+ }
1262
+ return entries;
1263
+ }
1264
+ async function discoverFlowsWithLibraries(projectDir) {
1265
+ const byId = /* @__PURE__ */ new Map();
1266
+ for (const flow of discoverFlows(projectDir)) byId.set(flow.id, flow);
1267
+ for (const { flow } of await libraryFlowEntries()) {
1268
+ if (!byId.has(flow.id)) byId.set(flow.id, flow);
1269
+ }
1270
+ return [...byId.values()];
1271
+ }
1272
+ async function findFlowFileWithLibraries(flowId, priorityRoots = [], projectDir) {
1273
+ const inRoots = findFlowFile(flowId, priorityRoots, projectDir);
1274
+ if (inRoots) return inRoots;
1275
+ return (await libraryFlowEntries()).find((e) => e.flow.id === flowId)?.path;
1276
+ }
1322
1277
  function findSkills() {
1323
1278
  const found = [];
1324
1279
  for (const root of aiResourceRoots()) {
@@ -1336,11 +1291,11 @@ function findSkills() {
1336
1291
  return deduped;
1337
1292
  }
1338
1293
  function walkSkills(dir, out) {
1339
- for (const entry of fs11__default.readdirSync(dir, { withFileTypes: true })) {
1340
- const full = path35__default.join(dir, entry.name);
1294
+ for (const entry of fs10__default.readdirSync(dir, { withFileTypes: true })) {
1295
+ const full = path34__default.join(dir, entry.name);
1341
1296
  if (entry.isDirectory()) {
1342
- const skillMd = path35__default.join(full, "SKILL.md");
1343
- if (fs11__default.existsSync(skillMd)) {
1297
+ const skillMd = path34__default.join(full, "SKILL.md");
1298
+ if (fs10__default.existsSync(skillMd)) {
1344
1299
  out.push({ name: entry.name, path: full, skillPath: skillMd });
1345
1300
  } else {
1346
1301
  walkSkills(full, out);
@@ -1361,10 +1316,10 @@ function resolveFlowIds() {
1361
1316
  }
1362
1317
  }
1363
1318
  function resolveSessionIds(projectDir) {
1364
- const sessionsDir = path35__default.join(projectDir, ".skaile", "sessions");
1365
- if (!fs11__default.existsSync(sessionsDir)) return [];
1319
+ const sessionsDir = path34__default.join(projectDir, ".skaile", "sessions");
1320
+ if (!fs10__default.existsSync(sessionsDir)) return [];
1366
1321
  try {
1367
- return fs11__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
1322
+ return fs10__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
1368
1323
  } catch {
1369
1324
  return [];
1370
1325
  }
@@ -1503,7 +1458,7 @@ function printResolvedPathsSection(config) {
1503
1458
  console.log(` ${S.label("prompts:".padEnd(16))} ${config.promptsDir ?? paths.promptsDir}`);
1504
1459
  }
1505
1460
  async function showConfig(opts) {
1506
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
1461
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : process.cwd();
1507
1462
  let config;
1508
1463
  let wsDefaults;
1509
1464
  try {
@@ -1548,13 +1503,13 @@ function makeConfigCommand() {
1548
1503
  const cmd = new Command("config").description("Manage personal config (.skaile/settings.json)");
1549
1504
  cmd.command("show").description("Show effective config with sources").option("--project-dir <path>", "Project directory").action((opts) => showConfig(opts));
1550
1505
  cmd.command("get <key>").description("Get an effective config value").option("--project-dir <path>", "Project directory").action(async (key, opts) => {
1551
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
1506
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : process.cwd();
1552
1507
  const config = await resolveSettings(projectDir);
1553
1508
  const value = config[key];
1554
1509
  console.log(value ?? S.dim("(not set)"));
1555
1510
  });
1556
1511
  cmd.command("set <key> <value>").description("Set a personal config value (driver, model, apiKey.<provider>)").option("--project-dir <path>", "Project directory").option("--global", "Write to ~/.skaile/settings.json instead of project-local").action(async (key, value, opts) => {
1557
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
1512
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : process.cwd();
1558
1513
  if (key === "provider" || key === "cloud" || key === "cloudConfig") {
1559
1514
  logErr(
1560
1515
  `'${key}' is no longer a setting \u2014 an endpoint is an AI provider registry entry and a session selects one with a model reference.
@@ -1691,11 +1646,11 @@ function makeConnectCommand() {
1691
1646
  process.exitCode = 1;
1692
1647
  return;
1693
1648
  }
1694
- await new Promise((resolve5) => {
1649
+ await new Promise((resolve4) => {
1695
1650
  client.onMessage((event) => {
1696
1651
  console.log(formatEvent(event));
1697
1652
  if (event.type === "finished" || event.type === "debug_result") {
1698
- resolve5();
1653
+ resolve4();
1699
1654
  }
1700
1655
  });
1701
1656
  client.send(parsed);
@@ -1739,12 +1694,12 @@ function makeConnectCommand() {
1739
1694
  client.send(cmd);
1740
1695
  rl.prompt();
1741
1696
  });
1742
- await new Promise((resolve5) => {
1743
- rl.on("close", resolve5);
1697
+ await new Promise((resolve4) => {
1698
+ rl.on("close", resolve4);
1744
1699
  client.onDisconnect(() => {
1745
1700
  logErr("Server disconnected");
1746
1701
  rl.close();
1747
- resolve5();
1702
+ resolve4();
1748
1703
  });
1749
1704
  });
1750
1705
  await client.disconnect();
@@ -1826,15 +1781,15 @@ function parseOpArgs(args) {
1826
1781
  async function promptText(label, defaultVal) {
1827
1782
  const rl = createInterface({ input: process.stdin, output: process.stdout });
1828
1783
  const hint = defaultVal ? ` [${defaultVal}]` : "";
1829
- return new Promise((resolve5) => {
1784
+ return new Promise((resolve4) => {
1830
1785
  rl.question(` ${label}${hint}: `, (answer) => {
1831
1786
  rl.close();
1832
- resolve5(answer.trim() || defaultVal || "");
1787
+ resolve4(answer.trim() || defaultVal || "");
1833
1788
  });
1834
1789
  });
1835
1790
  }
1836
1791
  async function promptSecret(label) {
1837
- return new Promise((resolve5) => {
1792
+ return new Promise((resolve4) => {
1838
1793
  process.stdout.write(` ${label} (hidden): `);
1839
1794
  const stdin = process.stdin;
1840
1795
  stdin.setRawMode?.(true);
@@ -1847,7 +1802,7 @@ async function promptSecret(label) {
1847
1802
  stdin.pause();
1848
1803
  stdin.removeListener("data", onData);
1849
1804
  process.stdout.write("\n");
1850
- resolve5(value);
1805
+ resolve4(value);
1851
1806
  } else if (char === "") {
1852
1807
  process.exit(1);
1853
1808
  } else if (char === "\x7F") {
@@ -1894,8 +1849,8 @@ function makeConnectorCommand() {
1894
1849
  async (driver, opts) => {
1895
1850
  const { installNpmPackages } = await import('../connectors/index.js');
1896
1851
  const { scanDirectory: scanDirectory2, factoryAssetRoots: factoryAssetRoots2, WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
1897
- const projectDir = path35__default.resolve(opts.projectDir);
1898
- const yamlPath = path35__default.join(projectDir, "skaile.yaml");
1852
+ const projectDir = path34__default.resolve(opts.projectDir);
1853
+ const yamlPath = path34__default.join(projectDir, "skaile.yaml");
1899
1854
  if (!existsSync(yamlPath)) {
1900
1855
  logErr("No skaile.yaml found in current directory. Run 'skaile init' first.");
1901
1856
  process.exit(1);
@@ -1955,8 +1910,8 @@ ${installResult.output}`);
1955
1910
  );
1956
1911
  cmd.command("remove <id>").option("--project-dir <path>", "Workspace directory", process.cwd()).description("Remove a connector from skaile.yaml by its instance ID").action(async (id, opts) => {
1957
1912
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
1958
- const projectDir = path35__default.resolve(opts.projectDir);
1959
- const yamlPath = path35__default.join(projectDir, "skaile.yaml");
1913
+ const projectDir = path34__default.resolve(opts.projectDir);
1914
+ const yamlPath = path34__default.join(projectDir, "skaile.yaml");
1960
1915
  if (!existsSync(yamlPath)) {
1961
1916
  logErr("No skaile.yaml found in current directory.");
1962
1917
  process.exit(1);
@@ -1973,7 +1928,7 @@ ${installResult.output}`);
1973
1928
  cmd.command("status [id]").option("--project-dir <path>", "Workspace directory", process.cwd()).description("Connect and report health status for one or all connectors").action(async (id, opts) => {
1974
1929
  const res = await import('../connectors/index.js');
1975
1930
  res.registerBuiltinConnectors();
1976
- const projectDir = path35__default.resolve(opts.projectDir);
1931
+ const projectDir = path34__default.resolve(opts.projectDir);
1977
1932
  const declarations = res.loadConnectorDeclarations(projectDir);
1978
1933
  if (declarations.length === 0) {
1979
1934
  console.log("No connectors configured in skaile.yaml.");
@@ -1997,7 +1952,7 @@ ${installResult.output}`);
1997
1952
  await manager.disconnectAll();
1998
1953
  });
1999
1954
  cmd.command("list").description("List all configured connectors").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (opts) => {
2000
- const projectDir = path35__default.resolve(opts.projectDir);
1955
+ const projectDir = path34__default.resolve(opts.projectDir);
2001
1956
  const manager = await connectConnectors(projectDir);
2002
1957
  try {
2003
1958
  console.log(JSON.stringify(manager.listConnectors(), null, 2));
@@ -2006,7 +1961,7 @@ ${installResult.output}`);
2006
1961
  }
2007
1962
  });
2008
1963
  cmd.command("sync [id]").description("Re-sync a filesystem-face connector or all of them (git pull, S3 refresh, etc.)").option("--all", "Sync all connectors").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, opts) => {
2009
- const projectDir = path35__default.resolve(opts.projectDir);
1964
+ const projectDir = path34__default.resolve(opts.projectDir);
2010
1965
  const manager = await connectConnectors(projectDir);
2011
1966
  try {
2012
1967
  if (opts.all) {
@@ -2030,7 +1985,7 @@ ${installResult.output}`);
2030
1985
  }
2031
1986
  });
2032
1987
  cmd.command("ops <id>").description("List available operations for a connector").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, opts) => {
2033
- const projectDir = path35__default.resolve(opts.projectDir);
1988
+ const projectDir = path34__default.resolve(opts.projectDir);
2034
1989
  const manager = await connectConnectors(projectDir);
2035
1990
  try {
2036
1991
  if (!manager.has(id)) {
@@ -2045,7 +2000,7 @@ ${installResult.output}`);
2045
2000
  }
2046
2001
  });
2047
2002
  cmd.command("read <id> <resource-path>").description("Read content from a connector").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, resourcePath, opts) => {
2048
- const projectDir = path35__default.resolve(opts.projectDir);
2003
+ const projectDir = path34__default.resolve(opts.projectDir);
2049
2004
  const manager = await connectConnectors(projectDir);
2050
2005
  try {
2051
2006
  const content = await manager.read(id, resourcePath);
@@ -2055,7 +2010,7 @@ ${installResult.output}`);
2055
2010
  }
2056
2011
  });
2057
2012
  cmd.command("write <id> <resource-path> <content>").description("Write content to a connector at a path").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, resourcePath, content, opts) => {
2058
- const projectDir = path35__default.resolve(opts.projectDir);
2013
+ const projectDir = path34__default.resolve(opts.projectDir);
2059
2014
  const manager = await connectConnectors(projectDir);
2060
2015
  try {
2061
2016
  await manager.write(id, resourcePath, { data: content });
@@ -2065,7 +2020,7 @@ ${installResult.output}`);
2065
2020
  }
2066
2021
  });
2067
2022
  cmd.command("entries <id> [resource-path]").description("List entries in a connector (files, keys, rows, etc)").option("--project-dir <path>", "Workspace directory", process.cwd()).option("--recursive", "Include nested entries").option("--limit <n>", "Maximum entries to return", parsePositiveIntOption).action(async (id, resourcePath, opts) => {
2068
- const projectDir = path35__default.resolve(opts.projectDir);
2023
+ const projectDir = path34__default.resolve(opts.projectDir);
2069
2024
  const manager = await connectConnectors(projectDir);
2070
2025
  try {
2071
2026
  const entries = await manager.list(id, resourcePath, {
@@ -2078,7 +2033,7 @@ ${installResult.output}`);
2078
2033
  }
2079
2034
  });
2080
2035
  cmd.command("search <id> <query>").description("Search within a connector for matching content").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, query, opts) => {
2081
- const projectDir = path35__default.resolve(opts.projectDir);
2036
+ const projectDir = path34__default.resolve(opts.projectDir);
2082
2037
  const manager = await connectConnectors(projectDir);
2083
2038
  try {
2084
2039
  const results = await manager.search(id, query);
@@ -2088,7 +2043,7 @@ ${installResult.output}`);
2088
2043
  }
2089
2044
  });
2090
2045
  cmd.command("delete <id> <resource-path>").description("Delete an entry from a connector").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, resourcePath, opts) => {
2091
- const projectDir = path35__default.resolve(opts.projectDir);
2046
+ const projectDir = path34__default.resolve(opts.projectDir);
2092
2047
  const manager = await connectConnectors(projectDir);
2093
2048
  try {
2094
2049
  const ok = await manager.delete(id, resourcePath);
@@ -2098,7 +2053,7 @@ ${installResult.output}`);
2098
2053
  }
2099
2054
  });
2100
2055
  cmd.command("run <id> <op> [args...]").description("Run a custom adapter operation (e.g. git log, sqlite query)").option("--project-dir <path>", "Workspace directory", process.cwd()).allowUnknownOption().action(async (id, op, args, opts) => {
2101
- const projectDir = path35__default.resolve(opts.projectDir);
2056
+ const projectDir = path34__default.resolve(opts.projectDir);
2102
2057
  const manager = await connectConnectors(projectDir);
2103
2058
  try {
2104
2059
  if (!manager.has(id)) {
@@ -2133,17 +2088,17 @@ async function runDebugQuery(query, parentOpts, args) {
2133
2088
  process.exitCode = 1;
2134
2089
  return;
2135
2090
  }
2136
- await new Promise((resolve5) => {
2091
+ await new Promise((resolve4) => {
2137
2092
  const timeout = setTimeout(() => {
2138
2093
  logErr("Timeout: no debug_result received within 5s");
2139
2094
  process.exitCode = 1;
2140
- resolve5();
2095
+ resolve4();
2141
2096
  }, 5e3);
2142
2097
  client.onMessage((event) => {
2143
2098
  if (event.type !== "debug_result") return;
2144
2099
  clearTimeout(timeout);
2145
2100
  printDebugResult(query, event.data);
2146
- resolve5();
2101
+ resolve4();
2147
2102
  });
2148
2103
  client.send({ type: "debug", query, args });
2149
2104
  });
@@ -2207,7 +2162,7 @@ function envRecord() {
2207
2162
  async function buildDeployContext(projectDir) {
2208
2163
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2209
2164
  const config = resolveSkWorkspaceConfig2(projectDir);
2210
- const workspaceId = config.name ?? path35__default.basename(projectDir);
2165
+ const workspaceId = config.name ?? path34__default.basename(projectDir);
2211
2166
  let log;
2212
2167
  try {
2213
2168
  const { createLogger } = await import('../core/logging.js');
@@ -2239,13 +2194,13 @@ async function ensureTargetsRegistered(projectDir) {
2239
2194
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2240
2195
  const config = resolveSkWorkspaceConfig2(projectDir);
2241
2196
  if (config.plugins && config.plugins.length > 0) {
2242
- const { ensurePluginsLoaded } = await import('../plugin-store-TT45MGQZ.js');
2197
+ const { ensurePluginsLoaded } = await import('../plugin-store-SVYV7L4C.js');
2243
2198
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
2244
2199
  for (const f of result.failed) logWarn(f.error);
2245
2200
  }
2246
2201
  }
2247
2202
  async function runUp(opts) {
2248
- const projectDir = path35__default.resolve(opts.projectDir);
2203
+ const projectDir = path34__default.resolve(opts.projectDir);
2249
2204
  await ensureTargetsRegistered(projectDir);
2250
2205
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2251
2206
  const { resolveDeployTarget, pluginRegistry } = await import('../plugin-registry/index.js');
@@ -2277,12 +2232,12 @@ async function runUp(opts) {
2277
2232
  await holdUntilSignal(handle, controller);
2278
2233
  }
2279
2234
  function holdUntilSignal(handle, controller) {
2280
- return new Promise((resolve5) => {
2235
+ return new Promise((resolve4) => {
2281
2236
  const onSig = () => {
2282
2237
  process.removeListener("SIGINT", onSig);
2283
2238
  controller.abort();
2284
2239
  logInfo("Stopping\u2026");
2285
- handle.stop().then(() => logOk("Stopped.")).catch((e) => logErr(`stop failed: ${e instanceof Error ? e.message : String(e)}`)).finally(() => resolve5());
2240
+ handle.stop().then(() => logOk("Stopped.")).catch((e) => logErr(`stop failed: ${e instanceof Error ? e.message : String(e)}`)).finally(() => resolve4());
2286
2241
  };
2287
2242
  process.on("SIGINT", onSig);
2288
2243
  });
@@ -2313,7 +2268,7 @@ async function restoreFromHandle(projectDir) {
2313
2268
  return { target, handle, ctx };
2314
2269
  }
2315
2270
  async function runDown(opts) {
2316
- const projectDir = path35__default.resolve(opts.projectDir);
2271
+ const projectDir = path34__default.resolve(opts.projectDir);
2317
2272
  const restored = await restoreFromHandle(projectDir);
2318
2273
  if (!restored) return;
2319
2274
  await restored.handle.stop();
@@ -2322,7 +2277,7 @@ async function runDown(opts) {
2322
2277
  logOk(`Stopped ${S.cmd(restored.target.id)} and cleared the handle.`);
2323
2278
  }
2324
2279
  async function runStatus(opts) {
2325
- const projectDir = path35__default.resolve(opts.projectDir);
2280
+ const projectDir = path34__default.resolve(opts.projectDir);
2326
2281
  const restored = await restoreFromHandle(projectDir);
2327
2282
  if (!restored) return;
2328
2283
  const health = await restored.handle.health();
@@ -2336,7 +2291,7 @@ async function runStatus(opts) {
2336
2291
  console.log();
2337
2292
  }
2338
2293
  async function runLogs(opts) {
2339
- const projectDir = path35__default.resolve(opts.projectDir);
2294
+ const projectDir = path34__default.resolve(opts.projectDir);
2340
2295
  const restored = await restoreFromHandle(projectDir);
2341
2296
  if (!restored) return;
2342
2297
  if (!restored.handle.logs) {
@@ -2360,7 +2315,7 @@ function makeDeployCommand() {
2360
2315
  }
2361
2316
  function makeDiffCommand() {
2362
2317
  return new Command("diff").description("Show changes between deployed and source versions").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
2363
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
2318
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
2364
2319
  const result = await am2.diff(ref);
2365
2320
  switch (result.status) {
2366
2321
  case "not-found":
@@ -2382,7 +2337,7 @@ function makeDiffCommand() {
2382
2337
  function makeFlowCommand() {
2383
2338
  const cmd = new Command("flow").description("Manage flows");
2384
2339
  cmd.command("list").description("List available flows").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
2385
- const flows = discoverFlows(path35__default.resolve(opts.projectDir));
2340
+ const flows = await discoverFlowsWithLibraries(path34__default.resolve(opts.projectDir));
2386
2341
  if (flows.length === 0) {
2387
2342
  logInfo("No flows found.");
2388
2343
  return;
@@ -2397,7 +2352,7 @@ function makeFlowCommand() {
2397
2352
  console.log();
2398
2353
  });
2399
2354
  cmd.command("show <id>").description("Show flow details and node graph").option("--project-dir <path>", "Project directory", process.cwd()).action(async (id, opts) => {
2400
- const flows = discoverFlows(path35__default.resolve(opts.projectDir));
2355
+ const flows = await discoverFlowsWithLibraries(path34__default.resolve(opts.projectDir));
2401
2356
  const flow = flows.find((f) => f.id === id);
2402
2357
  if (!flow) {
2403
2358
  logErr(`Flow not found: ${id}`);
@@ -2429,7 +2384,7 @@ function makeFlowCommand() {
2429
2384
  function makeHistoryCommand() {
2430
2385
  const cmd = new Command("history").description("Show recent add/remove/update actions");
2431
2386
  cmd.argument("[limit]", "Number of entries to show", "20").option("--project-dir <path>", "Project directory", process.cwd()).action((limitStr, opts) => {
2432
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
2387
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
2433
2388
  const limit = parseInt(limitStr, 10) || 20;
2434
2389
  const entries = am2.history(limit);
2435
2390
  if (entries.length === 0) {
@@ -2449,7 +2404,7 @@ function makeHistoryCommand() {
2449
2404
  console.log();
2450
2405
  });
2451
2406
  cmd.command("clear").description("Clear action history").option("--project-dir <path>", "Project directory", process.cwd()).action((opts) => {
2452
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
2407
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
2453
2408
  am2.clearHistory();
2454
2409
  logOk("History cleared.");
2455
2410
  });
@@ -2462,12 +2417,12 @@ var MCP_SERVER_ENTRY = {
2462
2417
  env: {}
2463
2418
  };
2464
2419
  function pluginDir(projectDir) {
2465
- return path35__default.join(projectDir, ".claude", "plugins", "skaile");
2420
+ return path34__default.join(projectDir, ".claude", "plugins", "skaile");
2466
2421
  }
2467
2422
  async function readJsonStrict(p7) {
2468
2423
  let raw;
2469
2424
  try {
2470
- raw = await fs5.readFile(p7, "utf-8");
2425
+ raw = await fs4.readFile(p7, "utf-8");
2471
2426
  } catch {
2472
2427
  return null;
2473
2428
  }
@@ -2480,32 +2435,32 @@ async function readJsonStrict(p7) {
2480
2435
  }
2481
2436
  }
2482
2437
  async function writeJson(p7, value) {
2483
- await fs5.mkdir(path35__default.dirname(p7), { recursive: true });
2484
- await fs5.writeFile(p7, `${JSON.stringify(value, null, 2)}
2438
+ await fs4.mkdir(path34__default.dirname(p7), { recursive: true });
2439
+ await fs4.writeFile(p7, `${JSON.stringify(value, null, 2)}
2485
2440
  `);
2486
2441
  }
2487
2442
  async function copyDir(src, dest) {
2488
- await fs5.mkdir(dest, { recursive: true });
2489
- const entries = await fs5.readdir(src, { withFileTypes: true });
2443
+ await fs4.mkdir(dest, { recursive: true });
2444
+ const entries = await fs4.readdir(src, { withFileTypes: true });
2490
2445
  for (const entry of entries) {
2491
- const srcPath = path35__default.join(src, entry.name);
2492
- const destPath = path35__default.join(dest, entry.name);
2446
+ const srcPath = path34__default.join(src, entry.name);
2447
+ const destPath = path34__default.join(dest, entry.name);
2493
2448
  if (entry.isDirectory()) await copyDir(srcPath, destPath);
2494
- else await fs5.copyFile(srcPath, destPath);
2449
+ else await fs4.copyFile(srcPath, destPath);
2495
2450
  }
2496
2451
  }
2497
2452
  async function install(projectDir, opts) {
2498
2453
  return opts?.full ? installFullPlugin(projectDir) : installMcp(projectDir);
2499
2454
  }
2500
2455
  async function installMcp(projectDir) {
2501
- const mcpPath = path35__default.join(projectDir, ".claude", "mcp.json");
2456
+ const mcpPath = path34__default.join(projectDir, ".claude", "mcp.json");
2502
2457
  const existing = await readJsonStrict(mcpPath) ?? {};
2503
2458
  const mcpServers = { ...existing.mcpServers ?? {} };
2504
2459
  const previous = mcpServers[SKAILE_MCP_NAME];
2505
2460
  const matches = previous && JSON.stringify(previous) === JSON.stringify(MCP_SERVER_ENTRY);
2506
2461
  let warning;
2507
2462
  if (previous && !matches) {
2508
- warning = `overwrote existing ${SKAILE_MCP_NAME} entry in ${path35__default.relative(projectDir, mcpPath)}`;
2463
+ warning = `overwrote existing ${SKAILE_MCP_NAME} entry in ${path34__default.relative(projectDir, mcpPath)}`;
2509
2464
  }
2510
2465
  mcpServers[SKAILE_MCP_NAME] = MCP_SERVER_ENTRY;
2511
2466
  await writeJson(mcpPath, { ...existing, mcpServers });
@@ -2514,15 +2469,15 @@ async function installMcp(projectDir) {
2514
2469
  async function installFullPlugin(projectDir) {
2515
2470
  const dir = pluginDir(projectDir);
2516
2471
  for (const [rel, content] of Object.entries(buildClaudePluginFiles())) {
2517
- const dest = path35__default.join(dir, rel);
2518
- await fs5.mkdir(path35__default.dirname(dest), { recursive: true });
2519
- await fs5.writeFile(dest, content);
2472
+ const dest = path34__default.join(dir, rel);
2473
+ await fs4.mkdir(path34__default.dirname(dest), { recursive: true });
2474
+ await fs4.writeFile(dest, content);
2520
2475
  }
2521
- const projectSkillsDir = path35__default.join(projectDir, ".skaile", "skills");
2476
+ const projectSkillsDir = path34__default.join(projectDir, ".skaile", "skills");
2522
2477
  if (existsSync(projectSkillsDir)) {
2523
- await copyDir(projectSkillsDir, path35__default.join(dir, "skills"));
2478
+ await copyDir(projectSkillsDir, path34__default.join(dir, "skills"));
2524
2479
  }
2525
- const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2480
+ const settingsPath = path34__default.join(projectDir, ".claude", "settings.json");
2526
2481
  const settings = await readJsonStrict(settingsPath) ?? {};
2527
2482
  const plugins = settings.plugins ?? [];
2528
2483
  if (!plugins.includes(dir)) plugins.push(dir);
@@ -2530,8 +2485,8 @@ async function installFullPlugin(projectDir) {
2530
2485
  return { changed: true, method: "plugin" };
2531
2486
  }
2532
2487
  async function uninstall(projectDir) {
2533
- const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2534
- const mcpPath = path35__default.join(projectDir, ".claude", "mcp.json");
2488
+ const settingsPath = path34__default.join(projectDir, ".claude", "settings.json");
2489
+ const mcpPath = path34__default.join(projectDir, ".claude", "mcp.json");
2535
2490
  const dir = pluginDir(projectDir);
2536
2491
  let changed = false;
2537
2492
  const settings = await readJsonStrict(settingsPath);
@@ -2545,7 +2500,7 @@ async function uninstall(projectDir) {
2545
2500
  }
2546
2501
  }
2547
2502
  if (existsSync(dir)) {
2548
- await fs5.rm(dir, { recursive: true, force: true });
2503
+ await fs4.rm(dir, { recursive: true, force: true });
2549
2504
  changed = true;
2550
2505
  }
2551
2506
  const mcp = await readJsonStrict(mcpPath);
@@ -2555,7 +2510,7 @@ async function uninstall(projectDir) {
2555
2510
  const updated = { ...mcp, mcpServers: rest };
2556
2511
  if (Object.keys(rest).length === 0) delete updated.mcpServers;
2557
2512
  if (Object.keys(updated).length === 0) {
2558
- await fs5.unlink(mcpPath);
2513
+ await fs4.unlink(mcpPath);
2559
2514
  } else {
2560
2515
  await writeJson(mcpPath, updated);
2561
2516
  }
@@ -2565,12 +2520,12 @@ async function uninstall(projectDir) {
2565
2520
  async function detectInstall(projectDir) {
2566
2521
  const dir = pluginDir(projectDir);
2567
2522
  const settings = await readJsonStrict(
2568
- path35__default.join(projectDir, ".claude", "settings.json")
2523
+ path34__default.join(projectDir, ".claude", "settings.json")
2569
2524
  );
2570
- if (existsSync(path35__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir)) {
2525
+ if (existsSync(path34__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir)) {
2571
2526
  return { method: "plugin", pluginPath: dir };
2572
2527
  }
2573
- const mcp = await readJsonStrict(path35__default.join(projectDir, ".claude", "mcp.json"));
2528
+ const mcp = await readJsonStrict(path34__default.join(projectDir, ".claude", "mcp.json"));
2574
2529
  if (mcp?.mcpServers && SKAILE_MCP_NAME in mcp.mcpServers) {
2575
2530
  return { method: "mcp" };
2576
2531
  }
@@ -2579,7 +2534,7 @@ async function detectInstall(projectDir) {
2579
2534
  async function enable(projectDir) {
2580
2535
  const detected = await detectInstall(projectDir);
2581
2536
  if (!detected) throw new Error("plugin not installed for claude-code");
2582
- const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2537
+ const settingsPath = path34__default.join(projectDir, ".claude", "settings.json");
2583
2538
  const settings = await readJsonStrict(settingsPath) ?? {};
2584
2539
  if (detected.method === "plugin") {
2585
2540
  const disabled2 = settings.disabledPlugins ?? [];
@@ -2601,7 +2556,7 @@ async function enable(projectDir) {
2601
2556
  async function disable(projectDir) {
2602
2557
  const detected = await detectInstall(projectDir);
2603
2558
  if (!detected) throw new Error("plugin not installed for claude-code");
2604
- const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2559
+ const settingsPath = path34__default.join(projectDir, ".claude", "settings.json");
2605
2560
  const settings = await readJsonStrict(settingsPath) ?? {};
2606
2561
  if (detected.method === "plugin") {
2607
2562
  const list2 = settings.disabledPlugins ?? [];
@@ -2621,12 +2576,12 @@ async function disable(projectDir) {
2621
2576
  return { changed: true };
2622
2577
  }
2623
2578
  async function status(projectDir) {
2624
- const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2625
- const mcpPath = path35__default.join(projectDir, ".claude", "mcp.json");
2579
+ const settingsPath = path34__default.join(projectDir, ".claude", "settings.json");
2580
+ const mcpPath = path34__default.join(projectDir, ".claude", "mcp.json");
2626
2581
  const dir = pluginDir(projectDir);
2627
2582
  const settings = await readJsonStrict(settingsPath);
2628
2583
  const mcp = await readJsonStrict(mcpPath);
2629
- const pluginInstalled = !!(existsSync(path35__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir));
2584
+ const pluginInstalled = !!(existsSync(path34__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir));
2630
2585
  const mcpInstalled = !!(mcp?.mcpServers && SKAILE_MCP_NAME in mcp.mcpServers);
2631
2586
  if (!pluginInstalled && !mcpInstalled) {
2632
2587
  return {
@@ -2644,7 +2599,7 @@ async function status(projectDir) {
2644
2599
  installed: "yes",
2645
2600
  enabled: disabled2 ? "no" : "yes",
2646
2601
  method: "plugin",
2647
- location: path35__default.relative(projectDir, dir)
2602
+ location: path34__default.relative(projectDir, dir)
2648
2603
  };
2649
2604
  }
2650
2605
  const disabled = settings?.disabledMcpjsonServers?.includes(SKAILE_MCP_NAME) ?? false;
@@ -2653,7 +2608,7 @@ async function status(projectDir) {
2653
2608
  installed: "yes",
2654
2609
  enabled: disabled ? "no" : "yes",
2655
2610
  method: "mcp",
2656
- location: path35__default.relative(projectDir, mcpPath)
2611
+ location: path34__default.relative(projectDir, mcpPath)
2657
2612
  };
2658
2613
  }
2659
2614
  var SKAILE_MCP_NAME2 = "skaile-workspace";
@@ -2667,7 +2622,7 @@ function buildEntry(projectDir) {
2667
2622
  async function readConfig(p7) {
2668
2623
  let raw;
2669
2624
  try {
2670
- raw = await fs5.readFile(p7, "utf-8");
2625
+ raw = await fs4.readFile(p7, "utf-8");
2671
2626
  } catch {
2672
2627
  return null;
2673
2628
  }
@@ -2680,16 +2635,16 @@ async function readConfig(p7) {
2680
2635
  }
2681
2636
  }
2682
2637
  async function writeConfig(p7, value) {
2683
- await fs5.mkdir(path35__default.dirname(p7), { recursive: true });
2638
+ await fs4.mkdir(path34__default.dirname(p7), { recursive: true });
2684
2639
  const cleaned = {};
2685
2640
  for (const [k, v] of Object.entries(value)) {
2686
2641
  if (v === void 0) continue;
2687
2642
  cleaned[k] = v;
2688
2643
  }
2689
- await fs5.writeFile(p7, stringify$1(cleaned));
2644
+ await fs4.writeFile(p7, stringify$1(cleaned));
2690
2645
  }
2691
2646
  function configPath(projectDir) {
2692
- return path35__default.join(projectDir, ".codex", "config.toml");
2647
+ return path34__default.join(projectDir, ".codex", "config.toml");
2693
2648
  }
2694
2649
  async function install2(projectDir) {
2695
2650
  const p7 = configPath(projectDir);
@@ -2700,7 +2655,7 @@ async function install2(projectDir) {
2700
2655
  const matches = previous && JSON.stringify(previous) === JSON.stringify(next);
2701
2656
  let warning;
2702
2657
  if (previous && !matches) {
2703
- warning = `overwrote existing ${SKAILE_MCP_NAME2} entry in ${path35__default.relative(projectDir, p7)}`;
2658
+ warning = `overwrote existing ${SKAILE_MCP_NAME2} entry in ${path34__default.relative(projectDir, p7)}`;
2704
2659
  }
2705
2660
  if (matches) return { changed: false, method: "toml" };
2706
2661
  servers[SKAILE_MCP_NAME2] = next;
@@ -2717,7 +2672,7 @@ async function uninstall2(projectDir) {
2717
2672
  const updated = { ...cfg, mcp_servers: rest };
2718
2673
  if (Object.keys(rest).length === 0) delete updated.mcp_servers;
2719
2674
  if (Object.keys(updated).length === 0) {
2720
- await fs5.unlink(p7);
2675
+ await fs4.unlink(p7);
2721
2676
  } else {
2722
2677
  await writeConfig(p7, updated);
2723
2678
  }
@@ -2741,43 +2696,43 @@ async function status2(projectDir) {
2741
2696
  installed: "yes",
2742
2697
  enabled: "n/a",
2743
2698
  method: "mcp",
2744
- location: path35__default.relative(projectDir, p7)
2699
+ location: path34__default.relative(projectDir, p7)
2745
2700
  };
2746
2701
  }
2747
2702
  async function install3(projectDir) {
2748
- const extDir = path35__default.join(projectDir, ".omp", "extensions");
2749
- const extPath = path35__default.join(extDir, "skaile.ts");
2750
- await fs5.mkdir(extDir, { recursive: true });
2703
+ const extDir = path34__default.join(projectDir, ".omp", "extensions");
2704
+ const extPath = path34__default.join(extDir, "skaile.ts");
2705
+ await fs4.mkdir(extDir, { recursive: true });
2751
2706
  const { WorkspacePlugin } = await import('../workspace-plugin/index.js');
2752
2707
  const plugin = new WorkspacePlugin({ projectDir });
2753
2708
  const nextSrc = await plugin.buildOmpExtensionSource();
2754
2709
  let prevSrc = null;
2755
2710
  try {
2756
- prevSrc = await fs5.readFile(extPath, "utf-8");
2711
+ prevSrc = await fs4.readFile(extPath, "utf-8");
2757
2712
  } catch {
2758
2713
  }
2759
2714
  if (prevSrc === nextSrc) return { changed: false, method: "generated" };
2760
- await fs5.writeFile(extPath, nextSrc);
2715
+ await fs4.writeFile(extPath, nextSrc);
2761
2716
  return { changed: true, method: "generated" };
2762
2717
  }
2763
2718
  async function uninstall3(projectDir) {
2764
- const extPath = path35__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2719
+ const extPath = path34__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2765
2720
  try {
2766
- await fs5.unlink(extPath);
2721
+ await fs4.unlink(extPath);
2767
2722
  return { changed: true };
2768
2723
  } catch {
2769
2724
  return { changed: false };
2770
2725
  }
2771
2726
  }
2772
2727
  async function status3(projectDir) {
2773
- const extPath = path35__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2728
+ const extPath = path34__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2774
2729
  if (existsSync(extPath)) {
2775
2730
  return {
2776
2731
  harness: "omp",
2777
2732
  installed: "yes",
2778
2733
  enabled: "n/a",
2779
2734
  method: "extension",
2780
- location: path35__default.relative(projectDir, extPath)
2735
+ location: path34__default.relative(projectDir, extPath)
2781
2736
  };
2782
2737
  }
2783
2738
  return {
@@ -2840,7 +2795,7 @@ async function installCodex(projectDir) {
2840
2795
  console.log(` ${S.dim("\u2192")} Restart Codex CLI to pick up the change.`);
2841
2796
  }
2842
2797
  async function runInstall(opts) {
2843
- const projectDir = path35__default.resolve(opts.projectDir);
2798
+ const projectDir = path34__default.resolve(opts.projectDir);
2844
2799
  const targets = resolveDriver(opts.driver);
2845
2800
  let exitCode = 0;
2846
2801
  if (targets.includes("claude-code")) {
@@ -2874,7 +2829,7 @@ async function uninstallCodex(projectDir) {
2874
2829
  else logInfo(`codex: not installed`);
2875
2830
  }
2876
2831
  async function runUninstall(opts) {
2877
- const projectDir = path35__default.resolve(opts.projectDir);
2832
+ const projectDir = path34__default.resolve(opts.projectDir);
2878
2833
  const targets = resolveDriver(opts.driver);
2879
2834
  let exitCode = 0;
2880
2835
  if (targets.includes("claude-code")) {
@@ -2917,7 +2872,7 @@ async function toggleTarget(t, projectDir, action3) {
2917
2872
  });
2918
2873
  }
2919
2874
  async function runToggle(opts, action3) {
2920
- const projectDir = path35__default.resolve(opts.projectDir);
2875
+ const projectDir = path34__default.resolve(opts.projectDir);
2921
2876
  const requestedAll = opts.driver === "all";
2922
2877
  const targets = resolveDriver(opts.driver);
2923
2878
  const usageError = checkToggleSupported(targets, requestedAll, action3);
@@ -2929,7 +2884,7 @@ async function runToggle(opts, action3) {
2929
2884
  return exitCode;
2930
2885
  }
2931
2886
  async function runStatus2(opts) {
2932
- const projectDir = path35__default.resolve(opts.projectDir);
2887
+ const projectDir = path34__default.resolve(opts.projectDir);
2933
2888
  const targets = resolveDriver(opts.driver);
2934
2889
  const rows = [];
2935
2890
  let exitCode = 0;
@@ -3000,7 +2955,7 @@ async function runHook(event) {
3000
2955
  await plugin.shutdown();
3001
2956
  return;
3002
2957
  }
3003
- const store = new PluginStore(path35__default.join(projectDir, ".skaile", "plugin-state.json"));
2958
+ const store = new PluginStore(path34__default.join(projectDir, ".skaile", "plugin-state.json"));
3004
2959
  await store.load();
3005
2960
  const status4 = store.get("connector:status");
3006
2961
  if (status4 && typeof status4 === "object" && Object.keys(status4).length > 0) {
@@ -3097,7 +3052,7 @@ function exitOnSyncError(err) {
3097
3052
  }
3098
3053
  async function assertLibraryPathFree(manager, dir, exceptId) {
3099
3054
  const clash = (await manager.listLibraries()).find(
3100
- (l) => l.id !== exceptId && path35.resolve(l.path) === dir
3055
+ (l) => l.id !== exceptId && path34.resolve(l.path) === dir
3101
3056
  );
3102
3057
  if (clash) throw new Error(`${dir} is already registered as library "${clash.name}".`);
3103
3058
  }
@@ -3130,9 +3085,9 @@ by the same ref.
3130
3085
  ];
3131
3086
  const written = [];
3132
3087
  for (const [file, content] of files) {
3133
- const target = path35.join(dir, file);
3134
- if (fs11.existsSync(target)) continue;
3135
- fs11.writeFileSync(target, content, "utf8");
3088
+ const target = path34.join(dir, file);
3089
+ if (fs10.existsSync(target)) continue;
3090
+ fs10.writeFileSync(target, content, "utf8");
3136
3091
  written.push(file);
3137
3092
  }
3138
3093
  return written;
@@ -3207,8 +3162,8 @@ function makeLibraryCommand() {
3207
3162
  );
3208
3163
  process.exit(1);
3209
3164
  }
3210
- const libPath = opts.path ? path35.resolve(opts.path) : path35.join(resolveLibraryDir(), name);
3211
- if (fs11.existsSync(libPath) && !fs11.statSync(libPath).isDirectory()) {
3165
+ const libPath = opts.path ? path34.resolve(opts.path) : path34.join(resolveLibraryDir(), name);
3166
+ if (fs10.existsSync(libPath) && !fs10.statSync(libPath).isDirectory()) {
3212
3167
  logErr(`${libPath} exists and is not a directory.`);
3213
3168
  process.exit(1);
3214
3169
  }
@@ -3232,9 +3187,9 @@ function makeLibraryCommand() {
3232
3187
  backend = "git";
3233
3188
  backendConfig = { url: opts.git, branch, authHint: "ssh" };
3234
3189
  } else {
3235
- fs11.mkdirSync(libPath, { recursive: true });
3190
+ fs10.mkdirSync(libPath, { recursive: true });
3236
3191
  }
3237
- const blank = fs11.readdirSync(libPath).every((entry) => entry === ".git");
3192
+ const blank = fs10.readdirSync(libPath).every((entry) => entry === ".git");
3238
3193
  const isDefault = !hasDefault && ownership !== "reader";
3239
3194
  await manager.addLibrary({
3240
3195
  name,
@@ -3299,7 +3254,7 @@ function makeLibraryCommand() {
3299
3254
  const target = await resolveTargetLibrary(manager, opts.library);
3300
3255
  const effectiveKind = opts.kind ?? kind;
3301
3256
  const am2 = new AssetManager({ projectDir: process.cwd() });
3302
- const destDir = opts.dir ? path35.join(target.path, opts.dir) : target.path;
3257
+ const destDir = opts.dir ? path34.join(target.path, opts.dir) : target.path;
3303
3258
  const res = am2.create(name, effectiveKind, destDir, { description: opts.description });
3304
3259
  if (!res.ok) {
3305
3260
  logErr(res.path);
@@ -3317,7 +3272,7 @@ function makeLibraryCommand() {
3317
3272
  upsertManifestAsset(target.path, {
3318
3273
  kind: effectiveKind,
3319
3274
  name,
3320
- root: path35.relative(target.path, res.path) || name,
3275
+ root: path34.relative(target.path, res.path) || name,
3321
3276
  version: "0.1.0",
3322
3277
  publisher
3323
3278
  });
@@ -3355,13 +3310,13 @@ function makeLibraryCommand() {
3355
3310
  const { manager, close } = await openLibraryManager();
3356
3311
  try {
3357
3312
  const lib = await manager.requireLibrary(oldName);
3358
- const parent = path35.dirname(lib.path);
3359
- const newPath = path35.join(parent, newName);
3360
- if (fs11.existsSync(newPath)) {
3313
+ const parent = path34.dirname(lib.path);
3314
+ const newPath = path34.join(parent, newName);
3315
+ if (fs10.existsSync(newPath)) {
3361
3316
  logErr(`Target directory already exists: ${newPath}`);
3362
3317
  process.exit(1);
3363
3318
  }
3364
- fs11.renameSync(lib.path, newPath);
3319
+ fs10.renameSync(lib.path, newPath);
3365
3320
  await manager.updateLibrary(lib.id, { name: newName, path: newPath });
3366
3321
  logOk(`Renamed ${oldName} \u2192 ${newName}`);
3367
3322
  } finally {
@@ -3378,8 +3333,8 @@ function makeLibraryCommand() {
3378
3333
  if (field === "ownership") patch.ownership = value;
3379
3334
  else if (field === "isDefault") patch.isDefault = value === "true";
3380
3335
  else if (field === "path") {
3381
- const dir = path35.resolve(value);
3382
- if (!fs11.existsSync(dir) || !fs11.statSync(dir).isDirectory()) {
3336
+ const dir = path34.resolve(value);
3337
+ if (!fs10.existsSync(dir) || !fs10.statSync(dir).isDirectory()) {
3383
3338
  logErr(`Directory does not exist: ${dir}. \`library set path=\` does not move files.`);
3384
3339
  process.exit(1);
3385
3340
  }
@@ -3449,7 +3404,12 @@ function makeLibraryCommand() {
3449
3404
  const { manager, library, close } = await openLibraryManager();
3450
3405
  try {
3451
3406
  const lib = await manager.requireLibrary(name);
3452
- await syncManifestWithDisk(lib);
3407
+ const removed = await syncManifestWithDisk(lib);
3408
+ const manifest = loadSkPublishManifest(lib.path);
3409
+ for (const a of removed) {
3410
+ const ref = manifest ? assetEntryRef(a, manifest) : `${a.kind}:${a.name}`;
3411
+ logInfo(`Removed manifest entry ${ref} (root ${a.root} is gone)`);
3412
+ }
3453
3413
  const res = await indexLibrary(lib, library);
3454
3414
  for (const e of res.errors) logWarn(e);
3455
3415
  logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
@@ -3561,16 +3521,16 @@ function makeLibraryCommand() {
3561
3521
  "With --create-repo: create the repo private (the store only accepts public repos)"
3562
3522
  ).option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; push nothing and call no store endpoint").action(
3563
3523
  async (lib, opts) => {
3564
- const { runLibraryPublish } = await import('../library-publish-SBEWWTPM.js');
3524
+ const { runLibraryPublish } = await import('../library-publish-TCFU3X5L.js');
3565
3525
  await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
3566
3526
  }
3567
3527
  );
3568
3528
  cmd.command("register <lib>").description("Register the library's manifest without pushing (bytes already on github)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; call no store endpoint").action(async (lib, opts) => {
3569
- const { runLibraryRegister } = await import('../library-publish-SBEWWTPM.js');
3529
+ const { runLibraryRegister } = await import('../library-publish-TCFU3X5L.js');
3570
3530
  await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
3571
3531
  });
3572
3532
  cmd.command("yank <lib>").description("Retract the library's published assets from the store").option("--asset <ref>", "Yank only the single asset matching this ref/name").action(async (lib, opts) => {
3573
- const { runLibraryYank } = await import('../library-publish-SBEWWTPM.js');
3533
+ const { runLibraryYank } = await import('../library-publish-TCFU3X5L.js');
3574
3534
  await withStoreErrorHandling(() => runLibraryYank(lib, opts));
3575
3535
  });
3576
3536
  return cmd;
@@ -3587,24 +3547,24 @@ function stampAssetPublisher(assetDir, publisher) {
3587
3547
  const markers = ["SKILL.md", "AGENT.md", "CONTRACT.md"];
3588
3548
  let markerFile;
3589
3549
  for (const m of markers) {
3590
- if (fs11.existsSync(path35.join(assetDir, m))) {
3591
- markerFile = path35.join(assetDir, m);
3550
+ if (fs10.existsSync(path34.join(assetDir, m))) {
3551
+ markerFile = path34.join(assetDir, m);
3592
3552
  break;
3593
3553
  }
3594
3554
  }
3595
3555
  if (!markerFile) {
3596
- const promptMd = fs11.readdirSync(assetDir).find((f) => f.endsWith(".prompt.md"));
3597
- if (promptMd) markerFile = path35.join(assetDir, promptMd);
3556
+ const promptMd = fs10.readdirSync(assetDir).find((f) => f.endsWith(".prompt.md"));
3557
+ if (promptMd) markerFile = path34.join(assetDir, promptMd);
3598
3558
  }
3599
3559
  if (!markerFile) return;
3600
3560
  try {
3601
- const { data, body } = parseFrontmatter(fs11.readFileSync(markerFile, "utf8"));
3561
+ const { data, body } = parseFrontmatter(fs10.readFileSync(markerFile, "utf8"));
3602
3562
  const meta = data.metadata && typeof data.metadata === "object" && !Array.isArray(data.metadata) ? { ...data.metadata } : {};
3603
3563
  if (meta.publisher != null) return;
3604
3564
  meta.publisher = publisher;
3605
3565
  data.metadata = meta;
3606
3566
  const fm = stringify(data).trimEnd();
3607
- fs11.writeFileSync(markerFile, `---
3567
+ fs10.writeFileSync(markerFile, `---
3608
3568
  ${fm}
3609
3569
  ---
3610
3570
 
@@ -3623,10 +3583,11 @@ async function syncManifestWithDisk(lib) {
3623
3583
  if (!loadSkPublishManifest(libraryPath)?.publisher) {
3624
3584
  ensureManifestPublisher(libraryPath, resolveLibraryPublisher(lib, {}, getStoreIdentity()));
3625
3585
  }
3586
+ const removed = pruneMissingRootAssets(libraryPath);
3626
3587
  const manifest = loadSkPublishManifest(libraryPath);
3627
3588
  const repoName = manifest?.publisher ?? slugifyAssetName(lib.name);
3628
3589
  for (const e of await scanDirectory(libraryPath, repoName)) {
3629
- const root = path35.relative(libraryPath, path35.dirname(e.source)) || e.name;
3590
+ const root = path34.relative(libraryPath, path34.dirname(e.source)) || e.name;
3630
3591
  upsertManifestAsset(libraryPath, {
3631
3592
  kind: e.kind,
3632
3593
  name: e.name,
@@ -3634,6 +3595,7 @@ async function syncManifestWithDisk(lib) {
3634
3595
  version: e.version
3635
3596
  });
3636
3597
  }
3598
+ return removed;
3637
3599
  }
3638
3600
  async function printPerLibraryStatus(name, asJson) {
3639
3601
  const { manager, close } = await openLibraryManager();
@@ -3673,9 +3635,9 @@ async function printOverallStatus(projectDir, asJson) {
3673
3635
  } catch {
3674
3636
  secretsStrategy = "unavailable";
3675
3637
  }
3676
- const resolvedProjectDir = path35.resolve(projectDir);
3677
- const hasWorkspaceConfig = existsSync(path35.join(resolvedProjectDir, "skaile.yaml"));
3678
- const hasLockFile = existsSync(path35.join(resolvedProjectDir, "skaile.lock.yaml"));
3638
+ const resolvedProjectDir = path34.resolve(projectDir);
3639
+ const hasWorkspaceConfig = existsSync(path34.join(resolvedProjectDir, "skaile.yaml"));
3640
+ const hasLockFile = existsSync(path34.join(resolvedProjectDir, "skaile.lock.yaml"));
3679
3641
  let assignments = [];
3680
3642
  if (hasWorkspaceConfig) {
3681
3643
  try {
@@ -4282,7 +4244,7 @@ function scheduleSoftDepPreview() {
4282
4244
  }
4283
4245
  async function loadAssets() {
4284
4246
  softDepPreviewCache.clear();
4285
- const { gatherAssetFeeds } = await import('../asset-feeds-HIWT4DVT.js');
4247
+ const { gatherAssetFeeds } = await import('../asset-feeds-TU5CS6QL.js');
4286
4248
  const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
4287
4249
  if (notes.length > 0) {
4288
4250
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
@@ -4302,7 +4264,7 @@ function rebuildSourceTree() {
4302
4264
  rebuildVisibleSources();
4303
4265
  }
4304
4266
  function sourceOrgRepo(s) {
4305
- const parts = s.path.split(path35__default.sep).filter(Boolean);
4267
+ const parts = s.path.split(path34__default.sep).filter(Boolean);
4306
4268
  if (parts.length < 2) return null;
4307
4269
  return { org: parts[parts.length - 2], repo: parts[parts.length - 1] };
4308
4270
  }
@@ -4449,13 +4411,13 @@ function reconcileCollapsedSets(rows) {
4449
4411
  async function loadSourcesAndLibraries() {
4450
4412
  try {
4451
4413
  const [{ openLibraryManager: openLibraryManager2 }, { getGlobalCacheDir: getGlobalCacheDir2, globalSkaileDir: globalSkaileDir2 }] = await Promise.all([
4452
- import('../open-library-UAZIGZUQ.js'),
4414
+ import('../open-library-SSBN4FX2.js'),
4453
4415
  import('../core/index.js')
4454
4416
  ]);
4455
4417
  const { manager, library, close } = await openLibraryManager2();
4456
4418
  try {
4457
4419
  const newRoot = getGlobalCacheDir2();
4458
- const legacyRoot = path35__default.join(globalSkaileDir2(), "sources");
4420
+ const legacyRoot = path34__default.join(globalSkaileDir2(), "sources");
4459
4421
  const isSourceRow = (l) => l.path.startsWith(newRoot) || l.path.startsWith(legacyRoot);
4460
4422
  const libs = await manager.listLibraries();
4461
4423
  const defs = await library.listAssetDefs();
@@ -4892,10 +4854,10 @@ async function showInfo() {
4892
4854
  }
4893
4855
  console.log();
4894
4856
  console.log(pc5.dim(" Press any key to return..."));
4895
- await new Promise((resolve5) => {
4857
+ await new Promise((resolve4) => {
4896
4858
  const onData = () => {
4897
4859
  process.stdin.removeListener("data", onData);
4898
- resolve5();
4860
+ resolve4();
4899
4861
  };
4900
4862
  process.stdin.once("data", onData);
4901
4863
  });
@@ -5391,13 +5353,13 @@ async function run(projectDir) {
5391
5353
  }
5392
5354
  function makeManageCommand() {
5393
5355
  return new Command("manage").description("Interactive TUI for managing assets, sources, and libraries").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
5394
- await run(path35__default.resolve(opts.projectDir));
5356
+ await run(path34__default.resolve(opts.projectDir));
5395
5357
  });
5396
5358
  }
5397
5359
  function makeMcpServerCommand() {
5398
5360
  return new Command("mcp-server").description("Start skaile workspace MCP server (stdio transport)").option("--project-dir <path>", "Project directory (default: cwd)", process.cwd()).action(async (opts) => {
5399
- const path38 = await import('path');
5400
- const projectDir = path38.default.resolve(opts.projectDir);
5361
+ const path37 = await import('path');
5362
+ const projectDir = path37.default.resolve(opts.projectDir);
5401
5363
  const { LogStore, StdoutSink, registerLogStore } = await import('../core/logging.js');
5402
5364
  registerLogStore(
5403
5365
  new LogStore({
@@ -5567,7 +5529,7 @@ function workspaceConfigFiles(dir) {
5567
5529
  } catch {
5568
5530
  return [];
5569
5531
  }
5570
- return names.filter((name) => isWorkspaceConfigFilename(name)).sort().map((name) => path35__default.join(dir, name));
5532
+ return names.filter((name) => isWorkspaceConfigFilename(name)).sort().map((name) => path34__default.join(dir, name));
5571
5533
  }
5572
5534
  function readAgentConfigBlock(raw) {
5573
5535
  const key = AGENT_CONFIG_KEYS.find((candidate) => raw[candidate] !== void 0);
@@ -5579,7 +5541,7 @@ function readAgentConfigBlock(raw) {
5579
5541
  return flat ? { key, profiles: { default: profiles }, flat } : { key, profiles, flat };
5580
5542
  }
5581
5543
  function planProviderMigration(options) {
5582
- const projectDir = path35__default.resolve(options.projectDir);
5544
+ const projectDir = path34__default.resolve(options.projectDir);
5583
5545
  const registryPath = options.workspace ? workspaceProviderRegistryPath(projectDir) : userProviderRegistryPath();
5584
5546
  const plan = {
5585
5547
  registryPath,
@@ -5595,7 +5557,7 @@ function planProviderMigration(options) {
5595
5557
  raw = parseDocument(readFileSync(file, "utf-8")).toJS() ?? {};
5596
5558
  } catch (error) {
5597
5559
  plan.warnings.push(
5598
- `${path35__default.basename(file)}: not valid YAML (${error instanceof Error ? error.message : String(error)}) \u2014 skipped`
5560
+ `${path34__default.basename(file)}: not valid YAML (${error instanceof Error ? error.message : String(error)}) \u2014 skipped`
5599
5561
  );
5600
5562
  continue;
5601
5563
  }
@@ -5644,7 +5606,7 @@ function planProviderMigration(options) {
5644
5606
  });
5645
5607
  if (!model) {
5646
5608
  plan.warnings.push(
5647
- `${path35__default.basename(file)}: profile '${profile}' had no model: \u2014 it now resolves against registry order. Pin it with 'model: ${providerId}/<modelId>'.`
5609
+ `${path34__default.basename(file)}: profile '${profile}' had no model: \u2014 it now resolves against registry order. Pin it with 'model: ${providerId}/<modelId>'.`
5648
5610
  );
5649
5611
  }
5650
5612
  touched = true;
@@ -5711,7 +5673,7 @@ function printPlan(plan) {
5711
5673
  for (const entry of plan.entries) {
5712
5674
  const base = entry.entry.base_url ?? S.dim("(transport-derived)");
5713
5675
  console.log(
5714
- ` ${S.label(`${path35__default.basename(entry.file)} ${entry.profile}`)} provider: ${entry.legacy.provider}, cloud: ${entry.legacy.cloud}`
5676
+ ` ${S.label(`${path34__default.basename(entry.file)} ${entry.profile}`)} provider: ${entry.legacy.provider}, cloud: ${entry.legacy.cloud}`
5715
5677
  );
5716
5678
  console.log(` \u2192 providers.yml ${S.bold(entry.providerId)} ${base}`);
5717
5679
  console.log(
@@ -5727,7 +5689,7 @@ function printPlan(plan) {
5727
5689
  console.log();
5728
5690
  }
5729
5691
  async function runMigrateProviders(opts) {
5730
- const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
5692
+ const projectDir = opts.projectDir ? path34__default.resolve(opts.projectDir) : process.cwd();
5731
5693
  const plan = planProviderMigration({ projectDir, workspace: opts.workspace });
5732
5694
  for (const warning of plan.warnings) logWarn(warning);
5733
5695
  if (plan.entries.length === 0 && Object.keys(plan.providers).length === 0) {
@@ -5786,9 +5748,9 @@ function makeNpxCommand() {
5786
5748
  const skills = npx.command("skills").description("Skill installation from external repos");
5787
5749
  skills.command("add <url>").description(
5788
5750
  "Clone a repo, register it in the project's skaile.yaml sources[], and install a skill from it"
5789
- ).requiredOption("--skill <name>", "Skill name to install from the repo").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", "Agent framework", "claude-code").option("--global", "Deploy globally").action(async (url, opts) => {
5790
- const projectDir = path35__default.resolve(opts.projectDir);
5791
- const projYaml = path35__default.join(projectDir, "skaile.yaml");
5751
+ ).requiredOption("--skill <name>", "Skill name to install from the repo").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", `Agent framework (${TARGET_DEFAULT_HINT})`).option("--global", "Deploy globally").action(async (url, opts) => {
5752
+ const projectDir = path34__default.resolve(opts.projectDir);
5753
+ const projYaml = path34__default.join(projectDir, "skaile.yaml");
5792
5754
  if (!existsSync(projYaml)) {
5793
5755
  logErr(`No skaile.yaml in ${projectDir} \u2014 run \`skaile init\` first.`);
5794
5756
  process.exit(1);
@@ -5801,11 +5763,11 @@ function makeNpxCommand() {
5801
5763
  }
5802
5764
  const spinner4 = p5.spinner();
5803
5765
  const key = sourceCacheKey(url);
5804
- const clonePath = path35__default.join(getGlobalCacheDir(), key);
5766
+ const clonePath = path34__default.join(getGlobalCacheDir(), key);
5805
5767
  spinner4.start(`Cloning ${url}`);
5806
5768
  try {
5807
5769
  if (!existsSync(clonePath)) {
5808
- mkdirSync(path35__default.dirname(clonePath), { recursive: true });
5770
+ mkdirSync(path34__default.dirname(clonePath), { recursive: true });
5809
5771
  execSync(`git clone ${url} ${clonePath}`, { stdio: "ignore" });
5810
5772
  }
5811
5773
  spinner4.stop(`Cloned to ${key}`);
@@ -5851,7 +5813,7 @@ function makeNpxCommand() {
5851
5813
  return npx;
5852
5814
  }
5853
5815
  function resolvePublisher(clonePath, url) {
5854
- const manifestPath = path35__default.join(clonePath, SKAILE_MANIFEST_FILENAME);
5816
+ const manifestPath = path34__default.join(clonePath, SKAILE_MANIFEST_FILENAME);
5855
5817
  if (existsSync(manifestPath)) {
5856
5818
  try {
5857
5819
  const { manifest } = decodeSkaileManifest(readFileSync(manifestPath, "utf8"));
@@ -5864,12 +5826,12 @@ function resolvePublisher(clonePath, url) {
5864
5826
  return url.match(/github\.com[/:]([^/]+)\/[^/]+/)?.[1];
5865
5827
  }
5866
5828
  function resolveSkillName(clonePath, requested) {
5867
- const skillsDir = path35__default.join(clonePath, "skills");
5868
- if (existsSync(path35__default.join(skillsDir, requested, "SKILL.md"))) return requested;
5829
+ const skillsDir = path34__default.join(clonePath, "skills");
5830
+ if (existsSync(path34__default.join(skillsDir, requested, "SKILL.md"))) return requested;
5869
5831
  if (!existsSync(skillsDir)) return requested;
5870
5832
  for (const entry of readdirSync(skillsDir, { withFileTypes: true })) {
5871
5833
  if (!entry.isDirectory()) continue;
5872
- const md = path35__default.join(skillsDir, entry.name, "SKILL.md");
5834
+ const md = path34__default.join(skillsDir, entry.name, "SKILL.md");
5873
5835
  if (!existsSync(md)) continue;
5874
5836
  try {
5875
5837
  const { data } = parseFrontmatter(readFileSync(md, "utf8"));
@@ -5894,10 +5856,12 @@ function matchesOutdatedFilter(e, filter) {
5894
5856
  }
5895
5857
  function makeOutdatedCommand() {
5896
5858
  return new Command("outdated").description("Check for assets behind their repo or library").argument("[ref]", "Check a specific asset (kind:@publisher/name)").option("--project-dir <path>", "Project directory", process.cwd()).addOption(
5897
- new Option("--target <agent>", "Driver target").default("claude-code").choices(SUPPORTED_DRIVER_TARGETS)
5859
+ new Option("--target <agent>", `Driver target (${TARGET_DEFAULT_HINT})`).choices(
5860
+ SUPPORTED_DRIVER_TARGETS
5861
+ )
5898
5862
  ).action(async (filter, opts) => {
5899
5863
  const am2 = new AssetManager({
5900
- projectDir: path35__default.resolve(opts.projectDir),
5864
+ projectDir: path34__default.resolve(opts.projectDir),
5901
5865
  driverTarget: opts.target
5902
5866
  });
5903
5867
  const entries = await am2.outdated();
@@ -5927,7 +5891,7 @@ function makeOutdatedCommand() {
5927
5891
  function makePatchCommand() {
5928
5892
  const cmd = new Command("patch").description("Patch workflow for skill improvement");
5929
5893
  cmd.command("extract <ref>").alias("start").description("Extract asset for local editing").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
5930
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5894
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
5931
5895
  try {
5932
5896
  const dest = await am2.patch(ref);
5933
5897
  logOk(`Extracted to ${S.dim(dest)}`);
@@ -5938,7 +5902,7 @@ function makePatchCommand() {
5938
5902
  }
5939
5903
  });
5940
5904
  cmd.command("commit <ref>").description("Generate .patch file from edits").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
5941
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5905
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
5942
5906
  try {
5943
5907
  const patchFile = await am2.patchCommit(ref);
5944
5908
  logOk(`Patch saved to ${S.dim(patchFile)}`);
@@ -5949,7 +5913,7 @@ function makePatchCommand() {
5949
5913
  }
5950
5914
  });
5951
5915
  cmd.command("submit <ref>").description("Apply patch to repo clone and prepare for PR").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
5952
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5916
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
5953
5917
  try {
5954
5918
  await am2.patchSubmit(ref);
5955
5919
  logOk("Patch applied to repo clone and committed.");
@@ -5962,7 +5926,7 @@ function makePatchCommand() {
5962
5926
  }
5963
5927
  });
5964
5928
  cmd.command("remove <ref>").description("Remove local patch after upstream merge").option("--project-dir <path>", "Project directory", process.cwd()).action((ref, opts) => {
5965
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5929
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
5966
5930
  am2.patchRemove(ref);
5967
5931
  logOk(`Patch removed for ${ref}`);
5968
5932
  });
@@ -5980,7 +5944,7 @@ function action2(fn) {
5980
5944
  };
5981
5945
  }
5982
5946
  async function reconcileAndReport(projectDir, plugins) {
5983
- const { reconcilePlugins } = await import('../plugin-store-TT45MGQZ.js');
5947
+ const { reconcilePlugins } = await import('../plugin-store-SVYV7L4C.js');
5984
5948
  if (plugins.length === 0) {
5985
5949
  logInfo("No plugins declared \u2014 nothing to reconcile.");
5986
5950
  return;
@@ -5994,10 +5958,10 @@ async function reconcileAndReport(projectDir, plugins) {
5994
5958
  }
5995
5959
  }
5996
5960
  async function runInstall2(spec, opts) {
5997
- const projectDir = path35__default.resolve(opts.projectDir);
5961
+ const projectDir = path34__default.resolve(opts.projectDir);
5998
5962
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
5999
- const { specName } = await import('../plugin-store-TT45MGQZ.js');
6000
- const yamlPath = path35__default.join(projectDir, "skaile.yaml");
5963
+ const { specName } = await import('../plugin-store-SVYV7L4C.js');
5964
+ const yamlPath = path34__default.join(projectDir, "skaile.yaml");
6001
5965
  const editor = WorkspaceYamlEditor2.load(yamlPath);
6002
5966
  const replaced = editor.addPlugin(spec, specName);
6003
5967
  editor.save();
@@ -6006,10 +5970,10 @@ async function runInstall2(spec, opts) {
6006
5970
  await reconcileAndReport(projectDir, editor.getPlugins());
6007
5971
  }
6008
5972
  async function runRemove(name, opts) {
6009
- const projectDir = path35__default.resolve(opts.projectDir);
5973
+ const projectDir = path34__default.resolve(opts.projectDir);
6010
5974
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
6011
- const { specName } = await import('../plugin-store-TT45MGQZ.js');
6012
- const yamlPath = path35__default.join(projectDir, "skaile.yaml");
5975
+ const { specName } = await import('../plugin-store-SVYV7L4C.js');
5976
+ const yamlPath = path34__default.join(projectDir, "skaile.yaml");
6013
5977
  const editor = WorkspaceYamlEditor2.load(yamlPath);
6014
5978
  const removed = editor.removePlugin(name, specName);
6015
5979
  if (!removed) {
@@ -6021,7 +5985,7 @@ async function runRemove(name, opts) {
6021
5985
  await reconcileAndReport(projectDir, editor.getPlugins());
6022
5986
  }
6023
5987
  async function runList(opts) {
6024
- const projectDir = path35__default.resolve(opts.projectDir);
5988
+ const projectDir = path34__default.resolve(opts.projectDir);
6025
5989
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
6026
5990
  const config = resolveSkWorkspaceConfig2(projectDir);
6027
5991
  const declared = config.plugins ?? [];
@@ -6036,7 +6000,7 @@ async function runList(opts) {
6036
6000
  const registry = createPluginRegistry();
6037
6001
  if (declared.length > 0) {
6038
6002
  try {
6039
- const { loadPlugins } = await import('../plugin-store-TT45MGQZ.js');
6003
+ const { loadPlugins } = await import('../plugin-store-SVYV7L4C.js');
6040
6004
  const result = await loadPlugins(projectDir, declared, registry);
6041
6005
  for (const f of result.failed) logWarn(f.error);
6042
6006
  } catch (err) {
@@ -6117,11 +6081,11 @@ function presetItemsToWorkspace(preset, values) {
6117
6081
  }
6118
6082
  function resolveItemConfig(item, preset, values, envVarsToSet) {
6119
6083
  const byKey = placeholderIndex(item, preset);
6120
- const resolve5 = (key) => {
6084
+ const resolve4 = (key) => {
6121
6085
  const ph = byKey.get(key) ?? { key, type: "text", required: true };
6122
6086
  return resolvePlaceholderValue(ph, values[key]);
6123
6087
  };
6124
- return substituteNode(item.config ?? {}, resolve5, envVarsToSet);
6088
+ return substituteNode(item.config ?? {}, resolve4, envVarsToSet);
6125
6089
  }
6126
6090
  function placeholderIndex(item, preset) {
6127
6091
  const map = /* @__PURE__ */ new Map();
@@ -6129,20 +6093,20 @@ function placeholderIndex(item, preset) {
6129
6093
  for (const ph of item.placeholders ?? []) map.set(ph.key, ph);
6130
6094
  return map;
6131
6095
  }
6132
- function substituteNode(node, resolve5, envVarsToSet) {
6133
- if (typeof node === "string") return substituteString(node, resolve5, envVarsToSet);
6134
- if (Array.isArray(node)) return node.map((el) => substituteNode(el, resolve5, envVarsToSet));
6096
+ function substituteNode(node, resolve4, envVarsToSet) {
6097
+ if (typeof node === "string") return substituteString(node, resolve4, envVarsToSet);
6098
+ if (Array.isArray(node)) return node.map((el) => substituteNode(el, resolve4, envVarsToSet));
6135
6099
  if (node && typeof node === "object") {
6136
6100
  const out = {};
6137
- for (const [k, v] of Object.entries(node)) out[k] = substituteNode(v, resolve5, envVarsToSet);
6101
+ for (const [k, v] of Object.entries(node)) out[k] = substituteNode(v, resolve4, envVarsToSet);
6138
6102
  return out;
6139
6103
  }
6140
6104
  return node;
6141
6105
  }
6142
- function substituteString(value, resolve5, envVarsToSet) {
6106
+ function substituteString(value, resolve4, envVarsToSet) {
6143
6107
  const tokens = [...value.matchAll(TOKEN_RE)];
6144
6108
  if (tokens.length === 0) return value;
6145
- const secret = tokens.find(([, ns]) => ns === "SECRET") ?? tokens.find(([, , key]) => "envRef" in resolve5(key));
6109
+ const secret = tokens.find(([, ns]) => ns === "SECRET") ?? tokens.find(([, , key]) => "envRef" in resolve4(key));
6146
6110
  if (secret) {
6147
6111
  const [full, , key] = secret;
6148
6112
  if (tokens.length > 1 || full !== value) {
@@ -6154,7 +6118,7 @@ function substituteString(value, resolve5, envVarsToSet) {
6154
6118
  return `env:${key}`;
6155
6119
  }
6156
6120
  return value.replace(TOKEN_RE, (_m, _ns, key) => {
6157
- const resolved = resolve5(key);
6121
+ const resolved = resolve4(key);
6158
6122
  return "envRef" in resolved ? resolved.envRef : resolved.value;
6159
6123
  });
6160
6124
  }
@@ -6211,7 +6175,7 @@ function neededSources(config, lock) {
6211
6175
  }
6212
6176
  function sourcesWithSidecar(sources) {
6213
6177
  const dir = getStoreManifestsDir();
6214
- return sources.filter((s) => existsSync(path35.join(dir, `${storeManifestSlug(s.url)}.yaml`))).map((s) => s.url);
6178
+ return sources.filter((s) => existsSync(path34.join(dir, `${storeManifestSlug(s.url)}.yaml`))).map((s) => s.url);
6215
6179
  }
6216
6180
  function compact(obj) {
6217
6181
  const out = {};
@@ -6303,8 +6267,8 @@ function redactSecrets(preset, findings) {
6303
6267
  }
6304
6268
  return { preset: next, keys };
6305
6269
  }
6306
- function placeholderKey(itemId, path38) {
6307
- return `${itemId}_${path38}`.replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
6270
+ function placeholderKey(itemId, path37) {
6271
+ return `${itemId}_${path37}`.replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
6308
6272
  }
6309
6273
  function setAtPath(root, segments, value) {
6310
6274
  let node = root;
@@ -6327,7 +6291,7 @@ function makePresetCommand() {
6327
6291
  cmd.command("init [name]").description("Scaffold a new .preset.yaml file").option("--dir <path>", "Output directory", process.cwd()).action(async (name, opts) => {
6328
6292
  const presetName = name ?? "my-preset";
6329
6293
  const filename = `${presetName}.preset.yaml`;
6330
- const outPath = path35__default.join(path35__default.resolve(opts.dir), filename);
6294
+ const outPath = path34__default.join(path34__default.resolve(opts.dir), filename);
6331
6295
  if (existsSync(outPath)) {
6332
6296
  logErr(`File already exists: ${outPath}`);
6333
6297
  logInfo("Choose a different name or remove the existing file.");
@@ -6360,7 +6324,7 @@ function makePresetCommand() {
6360
6324
  return cmd;
6361
6325
  }
6362
6326
  async function runPresetExport(name, opts) {
6363
- const projectDir = path35__default.resolve(opts.projectDir);
6327
+ const projectDir = path34__default.resolve(opts.projectDir);
6364
6328
  const file = loadSkWorkspaceConfig(projectDir);
6365
6329
  if (!file) {
6366
6330
  logErr(`No skaile.yaml found in ${projectDir}`);
@@ -6370,7 +6334,7 @@ async function runPresetExport(name, opts) {
6370
6334
  const presetName = name ?? file.config.name ?? "my-preset";
6371
6335
  let lock = null;
6372
6336
  try {
6373
- lock = readLock(path35__default.join(projectDir, "skaile.lock.yaml"));
6337
+ lock = readLock(path34__default.join(projectDir, "skaile.lock.yaml"));
6374
6338
  } catch {
6375
6339
  lock = null;
6376
6340
  }
@@ -6411,7 +6375,7 @@ async function runPresetExport(name, opts) {
6411
6375
  const contents = header ? `${header}
6412
6376
  ${body}` : body;
6413
6377
  if (opts.out && opts.dir !== process.cwd()) logWarn("--dir is ignored when --out is set.");
6414
- const outPath = opts.out ? path35__default.resolve(opts.out) : path35__default.join(path35__default.resolve(opts.dir), `${presetName}.preset.yaml`);
6378
+ const outPath = opts.out ? path34__default.resolve(opts.out) : path34__default.join(path34__default.resolve(opts.dir), `${presetName}.preset.yaml`);
6415
6379
  if (existsSync(outPath) && !opts.force) {
6416
6380
  logErr(`File already exists: ${outPath}`);
6417
6381
  logInfo("Pass --force to overwrite, or choose a different --out/--dir.");
@@ -6423,7 +6387,7 @@ ${body}` : body;
6423
6387
  logErr(`Failed to write ${outPath}: ${e.message}`);
6424
6388
  process.exit(1);
6425
6389
  }
6426
- logOk(`Exported ${S.brand(path35__default.basename(outPath))}`);
6390
+ logOk(`Exported ${S.brand(path34__default.basename(outPath))}`);
6427
6391
  logInfo(`Path: ${outPath}`);
6428
6392
  if (unresolved.length > 0) {
6429
6393
  console.error(S.err("This file is NOT safe to share."));
@@ -6464,13 +6428,13 @@ function collectInput(value, acc) {
6464
6428
  return acc;
6465
6429
  }
6466
6430
  async function runPresetApply(filePath, opts) {
6467
- const projectDir = path35__default.resolve(opts.projectDir);
6431
+ const projectDir = path34__default.resolve(opts.projectDir);
6468
6432
  const file = loadSkWorkspaceConfig(projectDir);
6469
6433
  if (!file) {
6470
6434
  logErr("No skaile.yaml \u2014 run `skaile init` first");
6471
6435
  process.exit(1);
6472
6436
  }
6473
- const resolved = path35__default.resolve(filePath);
6437
+ const resolved = path34__default.resolve(filePath);
6474
6438
  if (!existsSync(resolved)) {
6475
6439
  logErr(`File not found: ${resolved}`);
6476
6440
  process.exit(1);
@@ -6686,7 +6650,7 @@ async function reportNestedPresetRefs(preset) {
6686
6650
  }
6687
6651
  async function checkPresetCycles(preset, resolved) {
6688
6652
  const { detectCycles } = await import('../discovery/index.js');
6689
- const presetRef = path35__default.basename(resolved, ".preset.yaml");
6653
+ const presetRef = path34__default.basename(resolved, ".preset.yaml");
6690
6654
  const edges = [];
6691
6655
  for (const item of preset.items) {
6692
6656
  if (item.ref) {
@@ -6738,7 +6702,7 @@ function printPresetSummary(preset, placeholderCount, hasWarnings) {
6738
6702
  }
6739
6703
  }
6740
6704
  async function runPresetValidate(filePath) {
6741
- const resolved = path35__default.resolve(filePath);
6705
+ const resolved = path34__default.resolve(filePath);
6742
6706
  const preset = await loadPresetForValidation(resolved);
6743
6707
  await reportNestedPresetRefs(preset);
6744
6708
  await checkPresetCycles(preset, resolved);
@@ -6788,11 +6752,11 @@ items:
6788
6752
  }
6789
6753
  function makeRebuildCommand() {
6790
6754
  return new Command("rebuild").description("Re-snapshot inline-snapshot composition items and bump prompt version").argument("[agent]", "Agent name or path (defaults to current project agent)").option("--project-dir <dir>", "Project directory", process.cwd()).action(async (agentArg, opts) => {
6791
- const projectDir = path35__default.resolve(opts.projectDir);
6755
+ const projectDir = path34__default.resolve(opts.projectDir);
6792
6756
  let agentDir;
6793
6757
  if (agentArg) {
6794
6758
  if (agentArg.includes("/") || agentArg.includes("\\")) {
6795
- agentDir = path35__default.resolve(projectDir, agentArg);
6759
+ agentDir = path34__default.resolve(projectDir, agentArg);
6796
6760
  } else {
6797
6761
  let resolved;
6798
6762
  try {
@@ -6801,7 +6765,7 @@ function makeRebuildCommand() {
6801
6765
  if (!(err instanceof AgentRefResolutionError)) throw err;
6802
6766
  logWarn(`${err.message} \u2014 using "${agentArg}"`);
6803
6767
  }
6804
- agentDir = resolved ?? path35__default.resolve(projectDir, agentArg);
6768
+ agentDir = resolved ?? path34__default.resolve(projectDir, agentArg);
6805
6769
  }
6806
6770
  } else {
6807
6771
  let resolved;
@@ -6902,12 +6866,12 @@ function makeFlowEventHandler() {
6902
6866
  }
6903
6867
  function makeRunCommand() {
6904
6868
  const cmd = new Command("run").description("Start a flow or run a single-shot text prompt").argument("[flow-id-or-text...]", "Flow ID or text prompt").option("--project-dir <path>", "Project directory", process.cwd()).option("--driver <name>", "Harness to run (claude-sdk, codex, omp)").option("--model <name>", "Model override").option("--label <label>", "Human-readable session label").option("--dry-run", "Print plan without executing").option("--skill <name>", "Skill name (for single-shot mode)").action(async (positional, opts) => {
6905
- const projectDir = path35__default.resolve(opts.projectDir);
6869
+ const projectDir = path34__default.resolve(opts.projectDir);
6906
6870
  const cliDriver = opts.driver;
6907
6871
  const dryRun = opts.dryRun ?? false;
6908
6872
  let flowId = positional[0];
6909
6873
  if (!flowId) {
6910
- const flows = discoverFlows(projectDir);
6874
+ const flows = await discoverFlowsWithLibraries(projectDir);
6911
6875
  if (flows.length === 0) {
6912
6876
  logErr("No flows available.");
6913
6877
  process.exit(1);
@@ -6932,12 +6896,16 @@ function makeRunCommand() {
6932
6896
  });
6933
6897
  const driver = config.driver ?? "omp";
6934
6898
  const model = config.model;
6935
- const flowPath = findFlowFile(flowId, projectAiAssetsRoots(projectDir), projectDir);
6899
+ const flowPath = await findFlowFileWithLibraries(
6900
+ flowId,
6901
+ projectAiAssetsRoots(projectDir),
6902
+ projectDir
6903
+ );
6936
6904
  if (!flowPath) {
6937
6905
  const textPrompt = positional.join(" ");
6938
6906
  if (!textPrompt.trim()) {
6939
6907
  logErr(`Flow not found: ${flowId}`);
6940
- const available = discoverFlows(projectDir).map((f) => f.id);
6908
+ const available = (await discoverFlowsWithLibraries(projectDir)).map((f) => f.id);
6941
6909
  if (available.length > 0) {
6942
6910
  console.log(` ${S.dim("Available:")} ${available.map((id) => S.cmd(id)).join(", ")}`);
6943
6911
  }
@@ -6999,7 +6967,7 @@ function makeRunCommand() {
6999
6967
  }
7000
6968
  function makeResumeCommand() {
7001
6969
  const cmd = new Command("resume").description("Resume current session").option("--project-dir <path>", "Project directory", process.cwd()).option("--session <run-id>", "Target session by runId").option("--dry-run", "Print plan without executing").action(async (opts) => {
7002
- const projectDir = path35__default.resolve(opts.projectDir);
6970
+ const projectDir = path34__default.resolve(opts.projectDir);
7003
6971
  const sessionId = opts.session;
7004
6972
  const dryRun = opts.dryRun ?? false;
7005
6973
  const session = sessionId ? await loadSessionById(projectDir, sessionId) : await loadSession(projectDir);
@@ -7026,7 +6994,7 @@ function makeResumeCommand() {
7026
6994
  }
7027
6995
  function makeStatusCommand() {
7028
6996
  return new Command("status").description("Show current session state").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
7029
- const projectDir = path35__default.resolve(opts.projectDir);
6997
+ const projectDir = path34__default.resolve(opts.projectDir);
7030
6998
  const session = await loadSession(projectDir);
7031
6999
  if (!session) {
7032
7000
  logInfo("No active session.");
@@ -7051,7 +7019,7 @@ function makeStatusCommand() {
7051
7019
  }
7052
7020
  function makeClearCommand() {
7053
7021
  return new Command("clear").description("Unset current session pointer").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
7054
- const projectDir = path35__default.resolve(opts.projectDir);
7022
+ const projectDir = path34__default.resolve(opts.projectDir);
7055
7023
  await clearSession(projectDir);
7056
7024
  logOk("Session cleared.");
7057
7025
  });
@@ -7060,8 +7028,8 @@ function makeReplCommand() {
7060
7028
  return new Command("repl").description("Start an interactive agent session").option("--project-dir <path>", "Project directory").option("--driver <name>", "Harness to run (claude-sdk, omp)").option("--model <name>", "Model override").option("--resume", "Resume last session").option("--resume-session <id>", "Resume specific session").action(async (opts) => {
7061
7029
  const { findWorkspaceRoot } = await import('../core/index.js');
7062
7030
  const { startRepl } = await import('../tui/index.js');
7063
- const os2 = await import('os');
7064
- const userCwd = path35__default.resolve(opts.projectDir ?? process.cwd());
7031
+ const os = await import('os');
7032
+ const userCwd = path34__default.resolve(opts.projectDir ?? process.cwd());
7065
7033
  const workspaceRoot = findWorkspaceRoot(userCwd);
7066
7034
  let projectDir;
7067
7035
  let agentCwd;
@@ -7083,13 +7051,13 @@ function makeReplCommand() {
7083
7051
  p5.cancel("Cancelled.");
7084
7052
  process.exit(0);
7085
7053
  }
7086
- const tmpDir = fs11__default.mkdtempSync(path35__default.join(os2.tmpdir(), "skaile-repl-"));
7054
+ const tmpDir = fs10__default.mkdtempSync(path34__default.join(os.tmpdir(), "skaile-repl-"));
7087
7055
  projectDir = tmpDir;
7088
7056
  agentCwd = userCwd;
7089
7057
  logOk(`Temporary workspace: ${S.cmd(tmpDir)}`);
7090
7058
  if (!driverOverride) {
7091
- const claudeDir = path35__default.join(os2.homedir(), ".claude");
7092
- if (fs11__default.existsSync(claudeDir)) {
7059
+ const claudeDir = path34__default.join(os.homedir(), ".claude");
7060
+ if (fs10__default.existsSync(claudeDir)) {
7093
7061
  driverOverride = "claude-sdk";
7094
7062
  logInfo(`Detected ${S.cmd("~/.claude")} \u2192 using ${S.cmd("claude-sdk")} harness`);
7095
7063
  } else {
@@ -7161,12 +7129,12 @@ function makeServeCommand() {
7161
7129
  );
7162
7130
  }
7163
7131
  async function ensurePluginsLoadedForServe(projectDir) {
7164
- const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-EVPKJXGS.js');
7132
+ const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-IELQGVGB.js');
7165
7133
  try {
7166
7134
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
7167
7135
  const config = resolveSkWorkspaceConfig2(projectDir);
7168
7136
  if (!config.plugins || config.plugins.length === 0) return;
7169
- const { ensurePluginsLoaded } = await import('../plugin-store-TT45MGQZ.js');
7137
+ const { ensurePluginsLoaded } = await import('../plugin-store-SVYV7L4C.js');
7170
7138
  const { pluginRegistry } = await import('../plugin-registry/index.js');
7171
7139
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
7172
7140
  if (result.loaded.length > 0) {
@@ -7180,23 +7148,23 @@ async function ensurePluginsLoadedForServe(projectDir) {
7180
7148
  }
7181
7149
  }
7182
7150
  async function runCompileTest(opts) {
7183
- const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-EVPKJXGS.js');
7151
+ const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-IELQGVGB.js');
7184
7152
  const { tmpdir } = await import('os');
7185
- const { dirname: dirname4, join: join6, resolve: resolve5 } = await import('path');
7153
+ const { dirname: dirname3, join: join5, resolve: resolve4 } = await import('path');
7186
7154
  const { fileURLToPath: fileURLToPath2 } = await import('url');
7187
7155
  const { unlinkSync, existsSync: existsSync14 } = await import('fs');
7188
7156
  const { spawn } = await import('child_process');
7189
7157
  const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
7190
- const { MONOREPO_ROOT } = await import('../paths-U7TA7MTE.js');
7158
+ const { MONOREPO_ROOT } = await import('../paths-MKSI52PF.js');
7191
7159
  if (MONOREPO_ROOT === null) {
7192
7160
  logErr2("--compile-test is only available inside the skaile-dev workspace.");
7193
7161
  logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
7194
7162
  process.exitCode = 2;
7195
7163
  return;
7196
7164
  }
7197
- const outfile = join6(tmpdir(), `skaile-compile-test-${Date.now()}`);
7165
+ const outfile = join5(tmpdir(), `skaile-compile-test-${Date.now()}`);
7198
7166
  const __thisFile = fileURLToPath2(import.meta.url);
7199
- const entryPoint = resolve5(dirname4(__thisFile), "..", "index.ts");
7167
+ const entryPoint = resolve4(dirname3(__thisFile), "..", "index.ts");
7200
7168
  logInfo2(`Building compiled binary...`);
7201
7169
  logInfo2(`Entry: ${S2.dim(entryPoint)}`);
7202
7170
  logInfo2(`Output: ${S2.dim(outfile)}`);
@@ -7502,19 +7470,19 @@ function buildTailSelect(q) {
7502
7470
  return { sql, params };
7503
7471
  }
7504
7472
  function sleepUnlessAborted(ms, signal) {
7505
- return new Promise((resolve5) => {
7473
+ return new Promise((resolve4) => {
7506
7474
  if (signal?.aborted) {
7507
- resolve5();
7475
+ resolve4();
7508
7476
  return;
7509
7477
  }
7510
7478
  const timer = setTimeout(() => {
7511
7479
  signal?.removeEventListener("abort", onAbort);
7512
- resolve5();
7480
+ resolve4();
7513
7481
  }, ms);
7514
7482
  const onAbort = () => {
7515
7483
  clearTimeout(timer);
7516
7484
  signal?.removeEventListener("abort", onAbort);
7517
- resolve5();
7485
+ resolve4();
7518
7486
  };
7519
7487
  signal?.addEventListener("abort", onAbort, { once: true });
7520
7488
  });
@@ -7601,7 +7569,7 @@ async function remoteTail(opts) {
7601
7569
  ]
7602
7570
  });
7603
7571
  const filter = makeFilter(opts.query);
7604
- return new Promise((resolve5, reject) => {
7572
+ return new Promise((resolve4, reject) => {
7605
7573
  let settled = false;
7606
7574
  const finish = (err) => {
7607
7575
  if (settled) return;
@@ -7612,11 +7580,11 @@ async function remoteTail(opts) {
7612
7580
  }
7613
7581
  opts.signal?.removeEventListener("abort", onAbort);
7614
7582
  if (err) reject(err);
7615
- else resolve5();
7583
+ else resolve4();
7616
7584
  };
7617
7585
  const onAbort = () => finish();
7618
7586
  if (opts.signal?.aborted) {
7619
- resolve5();
7587
+ resolve4();
7620
7588
  return;
7621
7589
  }
7622
7590
  opts.signal?.addEventListener("abort", onAbort, { once: true });
@@ -7670,7 +7638,7 @@ function resolveMode(opts) {
7670
7638
  if (opts.forceLocal && opts.forceRemote) {
7671
7639
  throw new Error("Cannot use both --local and --remote");
7672
7640
  }
7673
- const startDir = path35__default.resolve(opts.projectDir ?? process.cwd());
7641
+ const startDir = path34__default.resolve(opts.projectDir ?? process.cwd());
7674
7642
  const localDb = findLogsDb(startDir);
7675
7643
  if (opts.forceLocal) {
7676
7644
  if (!localDb) {
@@ -7703,14 +7671,14 @@ function resolveMode(opts) {
7703
7671
  function findLogsDb(startDir) {
7704
7672
  let dir = startDir;
7705
7673
  for (let i = 0; i < MAX_WALK_LEVELS; i++) {
7706
- const candidate = path35__default.join(dir, ".skaile", "logs.db");
7674
+ const candidate = path34__default.join(dir, ".skaile", "logs.db");
7707
7675
  if (existsSync(candidate)) {
7708
7676
  try {
7709
7677
  if (statSync(candidate).isFile()) return candidate;
7710
7678
  } catch {
7711
7679
  }
7712
7680
  }
7713
- const parent = path35__default.dirname(dir);
7681
+ const parent = path34__default.dirname(dir);
7714
7682
  if (parent === dir) return void 0;
7715
7683
  dir = parent;
7716
7684
  }
@@ -7885,7 +7853,7 @@ function parsePositiveInt(value, flag) {
7885
7853
  function makeSessionCommand() {
7886
7854
  const cmd = new Command("session").description("Manage sessions");
7887
7855
  cmd.command("list").description("List all sessions for a project").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
7888
- const projectDir = path35__default.resolve(opts.projectDir);
7856
+ const projectDir = path34__default.resolve(opts.projectDir);
7889
7857
  const sessions = await listSessions(projectDir);
7890
7858
  const current = await loadSession(projectDir);
7891
7859
  if (sessions.length === 0) {
@@ -7913,7 +7881,7 @@ function makeSessionCommand() {
7913
7881
  console.log();
7914
7882
  });
7915
7883
  cmd.command("show <run-id>").description("Show a specific session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
7916
- const projectDir = path35__default.resolve(opts.projectDir);
7884
+ const projectDir = path34__default.resolve(opts.projectDir);
7917
7885
  const session = await loadSessionById(projectDir, runId);
7918
7886
  if (!session) {
7919
7887
  logErr(`Session not found: ${runId}`);
@@ -7922,12 +7890,12 @@ function makeSessionCommand() {
7922
7890
  console.log(JSON.stringify(session, null, 2));
7923
7891
  });
7924
7892
  cmd.command("switch <run-id>").description("Switch the current session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
7925
- const projectDir = path35__default.resolve(opts.projectDir);
7893
+ const projectDir = path34__default.resolve(opts.projectDir);
7926
7894
  await setCurrentSession(projectDir, runId);
7927
7895
  logOk(`Switched to session: ${S.dim(runId.slice(0, 8))}`);
7928
7896
  });
7929
7897
  cmd.command("delete <run-id>").description("Delete a session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
7930
- const projectDir = path35__default.resolve(opts.projectDir);
7898
+ const projectDir = path34__default.resolve(opts.projectDir);
7931
7899
  await deleteSession(projectDir, runId);
7932
7900
  logOk(`Deleted session: ${S.dim(runId.slice(0, 8))}`);
7933
7901
  });
@@ -7981,21 +7949,21 @@ function showOverview(am2) {
7981
7949
  }
7982
7950
  async function showAsset(am2, kind, name) {
7983
7951
  const entry = await am2.info(`${kind}:${name}`);
7984
- if (entry?.source && fs11__default.existsSync(entry.source)) {
7952
+ if (entry?.source && fs10__default.existsSync(entry.source)) {
7985
7953
  console.log();
7986
7954
  console.log(` ${kindColor(entry.kind)} ${S.heading(entry.name)}`);
7987
7955
  console.log(` ${S.rule(40)}`);
7988
7956
  console.log();
7989
- console.log(fs11__default.readFileSync(entry.source, "utf-8"));
7957
+ console.log(fs10__default.readFileSync(entry.source, "utf-8"));
7990
7958
  return;
7991
7959
  }
7992
7960
  logErr(`Asset not found: ${kind}:${name}`);
7993
7961
  process.exit(1);
7994
7962
  }
7995
7963
  function makeShowCommand() {
7996
- return new Command("show").description("Show deployed assets overview, or print asset content").argument("[kind]", "Asset kind (skill, agent, prompt, flow, bundle, contract)").argument("[name]", "Asset name").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", "Agent framework", "claude-code").action(async (kind, name, opts) => {
7964
+ return new Command("show").description("Show deployed assets overview, or print asset content").argument("[kind]", "Asset kind (skill, agent, prompt, flow, bundle, contract)").argument("[name]", "Asset name").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", `Agent framework (${TARGET_DEFAULT_HINT})`).action(async (kind, name, opts) => {
7997
7965
  const am2 = new AssetManager({
7998
- projectDir: path35__default.resolve(opts.projectDir),
7966
+ projectDir: path34__default.resolve(opts.projectDir),
7999
7967
  driverTarget: opts.target
8000
7968
  });
8001
7969
  if (!kind) {
@@ -8063,9 +8031,9 @@ function makeStoreCommand() {
8063
8031
  process.exit(2);
8064
8032
  });
8065
8033
  store.command("search <query>").description("Search the AI Asset Store catalog by name, description, or publisher").option("--kind <kind>", "Filter by asset kind (skill, agent, prompt, flow, \u2026)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
8066
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-UAZIGZUQ.js');
8034
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-SSBN4FX2.js');
8067
8035
  try {
8068
- const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
8036
+ const remote = await openCatalogSource2({ projectDir: path34__default.resolve(opts.projectDir) });
8069
8037
  const assets = await remote.listAssets(opts.kind ? { kind: opts.kind } : {});
8070
8038
  const results = filterCatalogAssets(assets, query);
8071
8039
  if (results.length === 0) {
@@ -8091,10 +8059,10 @@ function makeStoreCommand() {
8091
8059
  }
8092
8060
  });
8093
8061
  store.command("show <ref>").description("Show a store asset's details + provenance (source, files, integrity)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (ref, opts) => {
8094
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-UAZIGZUQ.js');
8095
- const { supportsInstallManifest } = await import('../project-JLD5RCVK.js');
8062
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-SSBN4FX2.js');
8063
+ const { supportsInstallManifest } = await import('../project-PJ37PM6N.js');
8096
8064
  try {
8097
- const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
8065
+ const remote = await openCatalogSource2({ projectDir: path34__default.resolve(opts.projectDir) });
8098
8066
  const asset = await remote.resolve(ref);
8099
8067
  if (!asset) {
8100
8068
  logErr(`Not found in store: ${ref} (try a full ref, e.g. skill:@publisher/name#version)`);
@@ -8216,7 +8184,7 @@ function printTree(node, prefix = "", isLast = true) {
8216
8184
  }
8217
8185
  function makeTreeCommand() {
8218
8186
  return new Command("tree").description("Show full dependency tree").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
8219
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
8187
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
8220
8188
  const root = am2.tree();
8221
8189
  if (root.children.length === 0) {
8222
8190
  logInfo("No dependencies in lock file. Run `skaile install` first.");
@@ -8242,7 +8210,7 @@ function makeUpdateCommand() {
8242
8210
  const catalogSpinner = p5.spinner();
8243
8211
  catalogSpinner.start("Refreshing catalog cache");
8244
8212
  try {
8245
- const remote = await openCatalogSource({ projectDir: path35__default.resolve(opts.projectDir) });
8213
+ const remote = await openCatalogSource({ projectDir: path34__default.resolve(opts.projectDir) });
8246
8214
  const result2 = await remote.refresh();
8247
8215
  catalogSpinner.stop(
8248
8216
  `Catalog refreshed: ${S.heading(String(result2.assetsCached))} assets cached`
@@ -8255,7 +8223,7 @@ function makeUpdateCommand() {
8255
8223
  }
8256
8224
  }
8257
8225
  if (opts.catalogOnly) return;
8258
- const projectDir = path35__default.resolve(opts.projectDir);
8226
+ const projectDir = path34__default.resolve(opts.projectDir);
8259
8227
  if (await shouldSyncSources(opts)) {
8260
8228
  const syncSpinner = p5.spinner();
8261
8229
  syncSpinner.start("Syncing sources");
@@ -8311,12 +8279,12 @@ function findManifestCandidates(rootPath) {
8311
8279
  function walk(dir) {
8312
8280
  let entries;
8313
8281
  try {
8314
- entries = fs11__default.readdirSync(dir, { withFileTypes: true });
8282
+ entries = fs10__default.readdirSync(dir, { withFileTypes: true });
8315
8283
  } catch {
8316
8284
  return;
8317
8285
  }
8318
8286
  for (const entry of entries) {
8319
- const fullPath = path35__default.join(dir, entry.name);
8287
+ const fullPath = path34__default.join(dir, entry.name);
8320
8288
  if (entry.isDirectory()) {
8321
8289
  if (!SKIP_DIRS.has(entry.name)) walk(fullPath);
8322
8290
  } else if (entry.isFile()) {
@@ -8357,7 +8325,7 @@ function checkManifestIdentity(kind, parsed) {
8357
8325
  return null;
8358
8326
  }
8359
8327
  function parseManifestCandidate(c, absRoot) {
8360
- const content = fs11__default.readFileSync(c.filePath, "utf-8");
8328
+ const content = fs10__default.readFileSync(c.filePath, "utf-8");
8361
8329
  if (c.filePath.endsWith(".md")) {
8362
8330
  const md = parseMdFrontmatter(content);
8363
8331
  if (md === null) {
@@ -8369,13 +8337,13 @@ function parseManifestCandidate(c, absRoot) {
8369
8337
  const parsed = c.filePath.endsWith(".json") ? JSON.parse(content) : parse(content);
8370
8338
  return { kind: "value", parsed };
8371
8339
  } catch (e) {
8372
- const relPath = path35__default.relative(absRoot, c.filePath);
8340
+ const relPath = path34__default.relative(absRoot, c.filePath);
8373
8341
  logErr(`${relPath} \u2014 parse error: ${e instanceof Error ? e.message : String(e)}`);
8374
8342
  return { kind: "error" };
8375
8343
  }
8376
8344
  }
8377
8345
  function validateManifestCandidate(c, parsed, body, absRoot, registry, strictConformance) {
8378
- const relPath = path35__default.relative(absRoot, c.filePath);
8346
+ const relPath = path34__default.relative(absRoot, c.filePath);
8379
8347
  let errors = 0;
8380
8348
  let warnings = 0;
8381
8349
  const identityError = checkManifestIdentity(c.kind, parsed);
@@ -8384,7 +8352,7 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
8384
8352
  errors++;
8385
8353
  }
8386
8354
  if (c.kind === "skill" && parsed && typeof parsed === "object") {
8387
- const dirName = path35__default.basename(path35__default.dirname(c.filePath));
8355
+ const dirName = path34__default.basename(path34__default.dirname(c.filePath));
8388
8356
  const findings = checkAgentSkillConformance(parsed, { dirName });
8389
8357
  for (const f of findings) {
8390
8358
  const line = `${relPath} [skill conformance] \u2014 ${f.field}: ${f.message}`;
@@ -8416,8 +8384,8 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
8416
8384
  return { errors, warnings };
8417
8385
  }
8418
8386
  function validateManifests(rootPath, strictConformance) {
8419
- const absRoot = path35__default.resolve(rootPath);
8420
- if (!fs11__default.existsSync(absRoot)) {
8387
+ const absRoot = path34__default.resolve(rootPath);
8388
+ if (!fs10__default.existsSync(absRoot)) {
8421
8389
  logErr(`Path does not exist: ${absRoot}`);
8422
8390
  return { total: 0, errors: 1, warnings: 0 };
8423
8391
  }
@@ -8450,12 +8418,12 @@ function findWorkspaceManifests(rootPath) {
8450
8418
  function walk(dir) {
8451
8419
  let entries;
8452
8420
  try {
8453
- entries = fs11__default.readdirSync(dir, { withFileTypes: true });
8421
+ entries = fs10__default.readdirSync(dir, { withFileTypes: true });
8454
8422
  } catch {
8455
8423
  return;
8456
8424
  }
8457
8425
  for (const entry of entries) {
8458
- const full = path35__default.join(dir, entry.name);
8426
+ const full = path34__default.join(dir, entry.name);
8459
8427
  if (entry.isDirectory()) {
8460
8428
  if (!SKIP_DIRS.has(entry.name)) walk(full);
8461
8429
  } else if (entry.isFile() && /(^|\.)skaile\.yaml$/.test(entry.name)) {
@@ -8518,14 +8486,14 @@ function validateWorkspaceAssets(parsed, relPath) {
8518
8486
  return errors;
8519
8487
  }
8520
8488
  function validateWorkspaceManifests(rootPath) {
8521
- const absRoot = path35__default.resolve(rootPath);
8489
+ const absRoot = path34__default.resolve(rootPath);
8522
8490
  const files = findWorkspaceManifests(absRoot);
8523
8491
  let errors = 0;
8524
8492
  for (const file of files) {
8525
- const relPath = path35__default.relative(absRoot, file);
8493
+ const relPath = path34__default.relative(absRoot, file);
8526
8494
  let parsed;
8527
8495
  try {
8528
- parsed = parse(fs11__default.readFileSync(file, "utf-8")) ?? {};
8496
+ parsed = parse(fs10__default.readFileSync(file, "utf-8")) ?? {};
8529
8497
  } catch (e) {
8530
8498
  logErr(`${relPath} \u2014 parse error: ${e instanceof Error ? e.message : String(e)}`);
8531
8499
  errors++;
@@ -8536,9 +8504,21 @@ function validateWorkspaceManifests(rootPath) {
8536
8504
  }
8537
8505
  return { total: files.length, errors };
8538
8506
  }
8507
+ function validatePublishManifestRoots(rootPath) {
8508
+ const absRoot = path34__default.resolve(rootPath);
8509
+ const manifest = loadSkPublishManifest(absRoot);
8510
+ if (!manifest) return 0;
8511
+ const missing = missingRootAssets(absRoot, manifest);
8512
+ for (const a of missing) {
8513
+ logErr(
8514
+ `${SKAILE_MANIFEST_FILENAME} [assets] \u2014 ${assetEntryRef(a, manifest)}: root "${a.root}" does not exist. Run \`skaile library index <library>\` to drop the entry, or restore the directory.`
8515
+ );
8516
+ }
8517
+ return missing.length;
8518
+ }
8539
8519
  var EXCLUDED_PATHS = ["skaileup-shared/", "external/", "docs/"];
8540
8520
  function toPosix(p7) {
8541
- return p7.split(path35__default.sep).join("/");
8521
+ return p7.split(path34__default.sep).join("/");
8542
8522
  }
8543
8523
  function isExcludedPath(relPath) {
8544
8524
  const rel = toPosix(relPath);
@@ -8546,9 +8526,9 @@ function isExcludedPath(relPath) {
8546
8526
  }
8547
8527
  function collectAssetVersions() {
8548
8528
  const assets = [];
8549
- if (!fs11__default.existsSync(AI_RESOURCES)) return assets;
8529
+ if (!fs10__default.existsSync(AI_RESOURCES)) return assets;
8550
8530
  const kindDirs = (kindDirName) => findKindDirs(AI_RESOURCES, kindDirName).filter(
8551
- (dir) => !isExcludedPath(path35__default.relative(AI_RESOURCES, dir))
8531
+ (dir) => !isExcludedPath(path34__default.relative(AI_RESOURCES, dir))
8552
8532
  );
8553
8533
  for (const dir of kindDirs("skills")) collectSkillVersions(dir, assets);
8554
8534
  for (const dir of kindDirs("agents")) collectAgentVersions(dir, assets);
@@ -8558,10 +8538,10 @@ function collectAssetVersions() {
8558
8538
  return assets.filter((a) => !seen.has(a.filePath) && seen.add(a.filePath));
8559
8539
  }
8560
8540
  function collectFlowVersions(dir, out) {
8561
- for (const f of fs11__default.readdirSync(dir)) {
8541
+ for (const f of fs10__default.readdirSync(dir)) {
8562
8542
  if (!f.endsWith(".flow.yaml")) continue;
8563
- const fp = path35__default.join(dir, f);
8564
- const content = fs11__default.readFileSync(fp, "utf-8");
8543
+ const fp = path34__default.join(dir, f);
8544
+ const content = fs10__default.readFileSync(fp, "utf-8");
8565
8545
  const parsed = parse(content);
8566
8546
  out.push({
8567
8547
  kind: "flow",
@@ -8572,10 +8552,10 @@ function collectFlowVersions(dir, out) {
8572
8552
  }
8573
8553
  }
8574
8554
  function collectPromptVersions(dir, out) {
8575
- for (const f of fs11__default.readdirSync(dir)) {
8555
+ for (const f of fs10__default.readdirSync(dir)) {
8576
8556
  if (!f.endsWith(".prompt.md")) continue;
8577
- const fp = path35__default.join(dir, f);
8578
- const content = fs11__default.readFileSync(fp, "utf-8");
8557
+ const fp = path34__default.join(dir, f);
8558
+ const content = fs10__default.readFileSync(fp, "utf-8");
8579
8559
  const fm = parseSkillFrontmatter(content);
8580
8560
  out.push({
8581
8561
  kind: "prompt",
@@ -8586,12 +8566,12 @@ function collectPromptVersions(dir, out) {
8586
8566
  }
8587
8567
  }
8588
8568
  function collectSkillVersions(dir, out) {
8589
- for (const entry of fs11__default.readdirSync(dir, { withFileTypes: true })) {
8569
+ for (const entry of fs10__default.readdirSync(dir, { withFileTypes: true })) {
8590
8570
  if (!entry.isDirectory()) continue;
8591
- const full = path35__default.join(dir, entry.name);
8592
- const skillMd = path35__default.join(full, "SKILL.md");
8593
- if (fs11__default.existsSync(skillMd)) {
8594
- const content = fs11__default.readFileSync(skillMd, "utf-8");
8571
+ const full = path34__default.join(dir, entry.name);
8572
+ const skillMd = path34__default.join(full, "SKILL.md");
8573
+ if (fs10__default.existsSync(skillMd)) {
8574
+ const content = fs10__default.readFileSync(skillMd, "utf-8");
8595
8575
  const fm = parseSkillFrontmatter(content);
8596
8576
  out.push({
8597
8577
  kind: "skill",
@@ -8605,11 +8585,11 @@ function collectSkillVersions(dir, out) {
8605
8585
  }
8606
8586
  }
8607
8587
  function collectAgentVersions(dir, out) {
8608
- for (const entry of fs11__default.readdirSync(dir, { withFileTypes: true })) {
8588
+ for (const entry of fs10__default.readdirSync(dir, { withFileTypes: true })) {
8609
8589
  if (!entry.isDirectory()) continue;
8610
- const agentYaml = path35__default.join(dir, entry.name, "agent.yaml");
8611
- if (!fs11__default.existsSync(agentYaml)) continue;
8612
- const content = fs11__default.readFileSync(agentYaml, "utf-8");
8590
+ const agentYaml = path34__default.join(dir, entry.name, "agent.yaml");
8591
+ if (!fs10__default.existsSync(agentYaml)) continue;
8592
+ const content = fs10__default.readFileSync(agentYaml, "utf-8");
8613
8593
  const parsed = parse(content);
8614
8594
  out.push({
8615
8595
  kind: "agent",
@@ -8620,15 +8600,15 @@ function collectAgentVersions(dir, out) {
8620
8600
  }
8621
8601
  }
8622
8602
  function assetLocation(a) {
8623
- return toPosix(path35__default.relative(AI_RESOURCES, a.filePath));
8603
+ return toPosix(path34__default.relative(AI_RESOURCES, a.filePath));
8624
8604
  }
8625
8605
  function findChangelogUnit(assetRelPath, root) {
8626
- let dir = path35__default.posix.dirname(toPosix(assetRelPath));
8606
+ let dir = path34__default.posix.dirname(toPosix(assetRelPath));
8627
8607
  for (; ; ) {
8628
8608
  const candidate = dir === "." ? "CHANGELOG.md" : `${dir}/CHANGELOG.md`;
8629
- if (fs11__default.existsSync(path35__default.join(root, candidate))) return candidate;
8609
+ if (fs10__default.existsSync(path34__default.join(root, candidate))) return candidate;
8630
8610
  if (dir === ".") return null;
8631
- dir = path35__default.posix.dirname(dir);
8611
+ dir = path34__default.posix.dirname(dir);
8632
8612
  }
8633
8613
  }
8634
8614
  function checkChangelogUnits(modifiedFiles, root) {
@@ -8666,7 +8646,7 @@ function filterToChangedAssets(assets) {
8666
8646
  encoding: "utf-8"
8667
8647
  });
8668
8648
  const changedFiles = new Set(
8669
- diffOutput.trim().split("\n").filter(Boolean).map((f) => path35__default.resolve(AI_RESOURCES, f))
8649
+ diffOutput.trim().split("\n").filter(Boolean).map((f) => path34__default.resolve(AI_RESOURCES, f))
8670
8650
  );
8671
8651
  return assets.filter((a) => changedFiles.has(a.filePath));
8672
8652
  } catch {
@@ -8694,7 +8674,7 @@ function checkVersionBumps(assets) {
8694
8674
  let warnings = 0;
8695
8675
  for (const a of assets) {
8696
8676
  if (!a.version) continue;
8697
- const relPath = path35__default.relative(AI_RESOURCES, a.filePath);
8677
+ const relPath = path34__default.relative(AI_RESOURCES, a.filePath);
8698
8678
  try {
8699
8679
  const headContent = execSync(`git show HEAD:${relPath}`, {
8700
8680
  cwd: AI_RESOURCES,
@@ -8726,7 +8706,7 @@ function checkFlowVersionPins(assets) {
8726
8706
  pins = flowSkillVersionPins(loadFlow(f.filePath));
8727
8707
  } catch (err) {
8728
8708
  logWarn(
8729
- `flow:${f.name} (${path35__default.relative(AI_RESOURCES, f.filePath)}) \u2014 could not be read: ${err instanceof Error ? err.message : err}`
8709
+ `flow:${f.name} (${path34__default.relative(AI_RESOURCES, f.filePath)}) \u2014 could not be read: ${err instanceof Error ? err.message : err}`
8730
8710
  );
8731
8711
  warnings++;
8732
8712
  continue;
@@ -8776,14 +8756,15 @@ function makeValidateCommand() {
8776
8756
  "--strict-conformance",
8777
8757
  "Treat Agent Skills (agentskills.io) standard findings as errors"
8778
8758
  ).action((targetPath, opts) => {
8779
- const absPath = path35__default.resolve(targetPath);
8759
+ const absPath = path34__default.resolve(targetPath);
8780
8760
  logInfo(`Validating manifests in ${absPath}`);
8781
8761
  const { total, errors, warnings } = validateManifests(
8782
8762
  absPath,
8783
8763
  opts.strictConformance ?? false
8784
8764
  );
8785
8765
  const ws = validateWorkspaceManifests(absPath);
8786
- const totalErrors = errors + ws.errors;
8766
+ const rootErrors = validatePublishManifestRoots(absPath);
8767
+ const totalErrors = errors + ws.errors + rootErrors;
8787
8768
  console.log();
8788
8769
  logInfo(`Scanned ${total} asset manifest(s) and ${ws.total} skaile.yaml file(s)`);
8789
8770
  if (warnings > 0) logWarn(`${warnings} warning(s)`);
@@ -8917,7 +8898,7 @@ function whyEmptyMessage(ref, declared) {
8917
8898
  }
8918
8899
  function makeWhyCommand() {
8919
8900
  return new Command("why").description("Show why an asset is installed (dependency chain)").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
8920
- const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
8901
+ const am2 = new AssetManager({ projectDir: path34__default.resolve(opts.projectDir) });
8921
8902
  const chain = am2.why(ref);
8922
8903
  if (chain.length === 0) {
8923
8904
  let declared;
@@ -8951,7 +8932,7 @@ function makeWhyCommand() {
8951
8932
  var _defaultFormatHelp = Help.prototype.formatHelp;
8952
8933
  var pkg = JSON.parse(
8953
8934
  readFileSync(
8954
- path35__default.resolve(path35__default.dirname(fileURLToPath(import.meta.url)), "../../package.json"),
8935
+ path34__default.resolve(path34__default.dirname(fileURLToPath(import.meta.url)), "../../package.json"),
8955
8936
  "utf-8"
8956
8937
  )
8957
8938
  );
@@ -9082,31 +9063,31 @@ async function runInit(projectDir, opts) {
9082
9063
  process.exitCode = 1;
9083
9064
  return;
9084
9065
  }
9085
- const resolved = path35__default.resolve(projectDir ?? ".");
9086
- const projectName = path35__default.basename(resolved);
9066
+ const resolved = path34__default.resolve(projectDir ?? ".");
9067
+ const projectName = path34__default.basename(resolved);
9087
9068
  const created = [];
9088
9069
  const { existsSync: existsSync14 } = await import('fs');
9089
9070
  if (!existsSync14(resolved)) {
9090
9071
  mkdirSync4(resolved, { recursive: true });
9091
9072
  created.push(".");
9092
9073
  }
9093
- const skaileDir = path35__default.join(resolved, ".skaile");
9074
+ const skaileDir = path34__default.join(resolved, ".skaile");
9094
9075
  if (!existsSync14(skaileDir)) {
9095
- mkdirSync4(path35__default.join(skaileDir, "sessions"), { recursive: true });
9076
+ mkdirSync4(path34__default.join(skaileDir, "sessions"), { recursive: true });
9096
9077
  created.push(".skaile/");
9097
9078
  }
9098
- const settingsPath = path35__default.join(skaileDir, "settings.json");
9079
+ const settingsPath = path34__default.join(skaileDir, "settings.json");
9099
9080
  if (!existsSync14(settingsPath)) {
9100
9081
  writeFileSync5(settingsPath, "{}\n");
9101
9082
  created.push(".skaile/settings.json");
9102
9083
  }
9103
- const wsConfigPath = path35__default.join(resolved, "skaile.yaml");
9084
+ const wsConfigPath = path34__default.join(resolved, "skaile.yaml");
9104
9085
  if (!existsSync14(wsConfigPath)) {
9105
9086
  writeFileSync5(wsConfigPath, stringify2(buildInitWorkspaceConfig(projectName, harness)));
9106
9087
  created.push("skaile.yaml");
9107
9088
  }
9108
9089
  for (const dir of new Set(Object.values(DRIVER_TARGETS[harness].local))) {
9109
- const full = path35__default.join(resolved, dir);
9090
+ const full = path34__default.join(resolved, dir);
9110
9091
  if (!existsSync14(full)) {
9111
9092
  mkdirSync4(full, { recursive: true });
9112
9093
  created.push(`${dir}/`);
@@ -9138,7 +9119,7 @@ function buildInitWorkspaceConfig(projectName, harness) {
9138
9119
  async function initGitScaffold(resolved, created) {
9139
9120
  const { execSync: execSync3 } = await import('child_process');
9140
9121
  const { existsSync: existsSync14, readFileSync: readFileSync9, writeFileSync: writeFileSync5 } = await import('fs');
9141
- const gitignorePath = path35__default.join(resolved, ".gitignore");
9122
+ const gitignorePath = path34__default.join(resolved, ".gitignore");
9142
9123
  const entries = [
9143
9124
  "node_modules/",
9144
9125
  ".skaile/sessions/",
@@ -9164,7 +9145,7 @@ async function initGitScaffold(resolved, created) {
9164
9145
  `);
9165
9146
  if (!existing) created.push(".gitignore");
9166
9147
  }
9167
- if (!existsSync14(path35__default.join(resolved, ".git"))) {
9148
+ if (!existsSync14(path34__default.join(resolved, ".git"))) {
9168
9149
  try {
9169
9150
  execSync3("git init", { cwd: resolved, stdio: "pipe" });
9170
9151
  created.push(".git/");
@@ -9176,10 +9157,10 @@ async function initGitScaffold(resolved, created) {
9176
9157
  }
9177
9158
  async function bootstrapUserConfig() {
9178
9159
  try {
9179
- const fs12 = await import('fs');
9160
+ const fs11 = await import('fs');
9180
9161
  const { userConfigPath, saveConfig, getConfigDefaults } = await import('../library/index.js');
9181
9162
  const userCfgPath = userConfigPath();
9182
- if (!fs12.existsSync(userCfgPath)) {
9163
+ if (!fs11.existsSync(userCfgPath)) {
9183
9164
  const defaults = getConfigDefaults();
9184
9165
  saveConfig(userCfgPath, {
9185
9166
  catalog: { url: defaults.catalog.url, cache_ttl: defaults.catalog.cache_ttl }
@@ -9194,7 +9175,7 @@ async function bootstrapUserConfig() {
9194
9175
  }
9195
9176
  async function hydrateInitSources(resolved, created) {
9196
9177
  try {
9197
- const { ensureSourcesCloned } = await import('../ensure-sources-G4FXTJDB.js');
9178
+ const { ensureSourcesCloned } = await import('../ensure-sources-2XQS32WI.js');
9198
9179
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
9199
9180
  for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
9200
9181
  if (hydrate.failed.length > 0) {
@@ -9210,7 +9191,7 @@ function printInitSummary(resolved, projectDir, created) {
9210
9191
  logOk(`Initialized project at ${S.heading(resolved)}`);
9211
9192
  console.log();
9212
9193
  console.log(S.heading(" Next steps:"));
9213
- const isCurrentDir = resolved === path35__default.resolve(".");
9194
+ const isCurrentDir = resolved === path34__default.resolve(".");
9214
9195
  let step = 1;
9215
9196
  if (!isCurrentDir) {
9216
9197
  console.log(` ${S.dim(`${step}.`)} ${S.cmd(`cd ${projectDir}`)}`);
@@ -9234,7 +9215,7 @@ function printInitSummary(resolved, projectDir, created) {
9234
9215
  console.log();
9235
9216
  }
9236
9217
  program.command("setup").description("Interactive provider setup wizard").action(async () => {
9237
- const { cmdSetup } = await import('../setup-PGZM4SOO.js');
9218
+ const { cmdSetup } = await import('../setup-JW2ZGCUG.js');
9238
9219
  await cmdSetup([], { projectDir: process.cwd() });
9239
9220
  });
9240
9221
  program.addCommand(makeInstallCommand());