@skaile/workspaces 1.16.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/CHANGELOG.md +265 -0
  2. package/dist/{asset-feeds-WIBEP37F.js → asset-feeds-7VQVISDI.js} +25 -24
  3. package/dist/asset-feeds-7VQVISDI.js.map +1 -0
  4. package/dist/asset-manager/catalog-deployer.js +13 -1
  5. package/dist/asset-manager/index.js +10 -9
  6. package/dist/asset-manager/installer.js +7 -6
  7. package/dist/asset-manager/src/catalog-deployer.d.ts +70 -5
  8. package/dist/asset-manager/src/catalog-deployer.d.ts.map +1 -1
  9. package/dist/asset-manager/src/index.d.ts +22 -17
  10. package/dist/asset-manager/src/index.d.ts.map +1 -1
  11. package/dist/bridge/drivers/claude-sdk.js +108 -56
  12. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  13. package/dist/bridge/drivers/codex.js +3 -2
  14. package/dist/bridge/drivers/codex.js.map +1 -1
  15. package/dist/bridge/drivers/continue.js +4 -3
  16. package/dist/bridge/drivers/continue.js.map +1 -1
  17. package/dist/bridge/drivers/echo.js +3 -2
  18. package/dist/bridge/drivers/echo.js.map +1 -1
  19. package/dist/bridge/drivers/gemini.js +5 -4
  20. package/dist/bridge/drivers/goose.js +4 -3
  21. package/dist/bridge/drivers/goose.js.map +1 -1
  22. package/dist/bridge/drivers/omp.js +3 -2
  23. package/dist/bridge/drivers/omp.js.map +1 -1
  24. package/dist/bridge/drivers/opencode.js +4 -3
  25. package/dist/bridge/drivers/opencode.js.map +1 -1
  26. package/dist/bridge/drivers/qwen.js +5 -4
  27. package/dist/bridge/drivers/qwen.js.map +1 -1
  28. package/dist/bridge/index.js +4 -3
  29. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  30. package/dist/bridge/src/drivers/scrub-transcript.d.ts +21 -1
  31. package/dist/bridge/src/drivers/scrub-transcript.d.ts.map +1 -1
  32. package/dist/{chunk-344DEXZS.js → chunk-35ELAMQ5.js} +4 -4
  33. package/dist/{chunk-344DEXZS.js.map → chunk-35ELAMQ5.js.map} +1 -1
  34. package/dist/{chunk-WSTY3AWY.js → chunk-6FJH63NN.js} +4 -4
  35. package/dist/{chunk-WSTY3AWY.js.map → chunk-6FJH63NN.js.map} +1 -1
  36. package/dist/{chunk-ISA7R7PK.js → chunk-72EOJJOM.js} +82 -38
  37. package/dist/chunk-72EOJJOM.js.map +1 -0
  38. package/dist/chunk-7GOCNYUV.js +300 -0
  39. package/dist/chunk-7GOCNYUV.js.map +1 -0
  40. package/dist/{chunk-TFIFNDT2.js → chunk-A5OYCQGT.js} +4 -4
  41. package/dist/{chunk-TFIFNDT2.js.map → chunk-A5OYCQGT.js.map} +1 -1
  42. package/dist/{chunk-KY5NY7LB.js → chunk-BCTU4TN7.js} +11 -11
  43. package/dist/chunk-BCTU4TN7.js.map +1 -0
  44. package/dist/chunk-BEAIJRVF.js +159 -0
  45. package/dist/chunk-BEAIJRVF.js.map +1 -0
  46. package/dist/chunk-BK3WL3QK.js +10 -0
  47. package/dist/chunk-BK3WL3QK.js.map +1 -0
  48. package/dist/{chunk-BI2NKPA4.js → chunk-CA5CWLGN.js} +3 -2
  49. package/dist/chunk-CA5CWLGN.js.map +1 -0
  50. package/dist/{chunk-2TSSCHCQ.js → chunk-CKVIN4H3.js} +5 -5
  51. package/dist/{chunk-2TSSCHCQ.js.map → chunk-CKVIN4H3.js.map} +1 -1
  52. package/dist/{chunk-GXC3TYMQ.js → chunk-CZZRDYT4.js} +70 -32
  53. package/dist/chunk-CZZRDYT4.js.map +1 -0
  54. package/dist/{chunk-MNKUZUN2.js → chunk-DRXDEL3A.js} +3 -3
  55. package/dist/{chunk-MNKUZUN2.js.map → chunk-DRXDEL3A.js.map} +1 -1
  56. package/dist/{chunk-BYS6JDZB.js → chunk-DY2AK577.js} +3 -3
  57. package/dist/{chunk-BYS6JDZB.js.map → chunk-DY2AK577.js.map} +1 -1
  58. package/dist/chunk-DYMWJAL4.js +552 -0
  59. package/dist/chunk-DYMWJAL4.js.map +1 -0
  60. package/dist/{chunk-ACXLKNIM.js → chunk-E7HKNQTH.js} +10 -4
  61. package/dist/chunk-E7HKNQTH.js.map +1 -0
  62. package/dist/{chunk-O5VCUU6D.js → chunk-KUZEIKZH.js} +4 -4
  63. package/dist/{chunk-O5VCUU6D.js.map → chunk-KUZEIKZH.js.map} +1 -1
  64. package/dist/{chunk-YULV7UTU.js → chunk-KYLWY3A7.js} +10 -10
  65. package/dist/{chunk-YULV7UTU.js.map → chunk-KYLWY3A7.js.map} +1 -1
  66. package/dist/{chunk-2BQBWWFX.js → chunk-LBZP2IYG.js} +6 -6
  67. package/dist/chunk-LBZP2IYG.js.map +1 -0
  68. package/dist/{chunk-MZV6WCF3.js → chunk-MAN7AGQJ.js} +3 -3
  69. package/dist/{chunk-MZV6WCF3.js.map → chunk-MAN7AGQJ.js.map} +1 -1
  70. package/dist/{chunk-7J7LQP6T.js → chunk-MMD2KQ3A.js} +31 -19
  71. package/dist/chunk-MMD2KQ3A.js.map +1 -0
  72. package/dist/{chunk-FIUGSIKC.js → chunk-NYCJ7B27.js} +19 -11
  73. package/dist/chunk-NYCJ7B27.js.map +1 -0
  74. package/dist/{chunk-ACWCVB5Q.js → chunk-ORZW7MMO.js} +3 -3
  75. package/dist/{chunk-ACWCVB5Q.js.map → chunk-ORZW7MMO.js.map} +1 -1
  76. package/dist/{chunk-M5GJT3D7.js → chunk-OYX22NJL.js} +3 -3
  77. package/dist/{chunk-M5GJT3D7.js.map → chunk-OYX22NJL.js.map} +1 -1
  78. package/dist/{chunk-C4KVFALU.js → chunk-QIQTYN7F.js} +3 -3
  79. package/dist/{chunk-C4KVFALU.js.map → chunk-QIQTYN7F.js.map} +1 -1
  80. package/dist/{chunk-2IJFUAZB.js → chunk-RK3HU3H3.js} +123 -18
  81. package/dist/chunk-RK3HU3H3.js.map +1 -0
  82. package/dist/{chunk-5NZ56R63.js → chunk-ST3DLLNZ.js} +18 -6
  83. package/dist/chunk-ST3DLLNZ.js.map +1 -0
  84. package/dist/{chunk-6POODADP.js → chunk-SVL4EZJT.js} +453 -250
  85. package/dist/chunk-SVL4EZJT.js.map +1 -0
  86. package/dist/{chunk-JB35MVBN.js → chunk-U5POE4BA.js} +4 -298
  87. package/dist/chunk-U5POE4BA.js.map +1 -0
  88. package/dist/{chunk-MO43URUI.js → chunk-UAQVFATZ.js} +7 -7
  89. package/dist/{chunk-MO43URUI.js.map → chunk-UAQVFATZ.js.map} +1 -1
  90. package/dist/{chunk-A22KZ7GZ.js → chunk-UVW3R6S7.js} +72 -37
  91. package/dist/chunk-UVW3R6S7.js.map +1 -0
  92. package/dist/{chunk-STQOPWPS.js → chunk-VCU4NPUS.js} +4 -4
  93. package/dist/{chunk-STQOPWPS.js.map → chunk-VCU4NPUS.js.map} +1 -1
  94. package/dist/{chunk-MB6563TL.js → chunk-WCWXDW22.js} +3 -3
  95. package/dist/{chunk-MB6563TL.js.map → chunk-WCWXDW22.js.map} +1 -1
  96. package/dist/{chunk-BG4XVMG2.js → chunk-WZPADAE7.js} +254 -135
  97. package/dist/chunk-WZPADAE7.js.map +1 -0
  98. package/dist/{chunk-EPWY2ABE.js → chunk-Y3JVBJ3Y.js} +5 -5
  99. package/dist/{chunk-EPWY2ABE.js.map → chunk-Y3JVBJ3Y.js.map} +1 -1
  100. package/dist/cli/index.js +347 -127
  101. package/dist/cli/index.js.map +1 -1
  102. package/dist/cli/src/asset-feeds.d.ts +2 -2
  103. package/dist/cli/src/asset-feeds.d.ts.map +1 -1
  104. package/dist/cli/src/commands/catalog.d.ts +51 -2
  105. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  106. package/dist/cli/src/commands/connector.d.ts +1 -1
  107. package/dist/cli/src/commands/connector.d.ts.map +1 -1
  108. package/dist/cli/src/commands/logs.d.ts.map +1 -1
  109. package/dist/cli/src/commands/manage.d.ts +30 -3
  110. package/dist/cli/src/commands/manage.d.ts.map +1 -1
  111. package/dist/cli/src/commands/project.d.ts +5 -2
  112. package/dist/cli/src/commands/project.d.ts.map +1 -1
  113. package/dist/connectors/config.js +7 -6
  114. package/dist/connectors/index.js +8 -7
  115. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  116. package/dist/connectors/src/watcher.d.ts.map +1 -1
  117. package/dist/connectors/src/worktree.d.ts +20 -2
  118. package/dist/connectors/src/worktree.d.ts.map +1 -1
  119. package/dist/core/index.js +6 -5
  120. package/dist/core/logging.js +2 -1
  121. package/dist/core/manifest.js +2 -1
  122. package/dist/core/runtime-assets.js +4 -3
  123. package/dist/core/src/fs-deadline.d.ts +84 -0
  124. package/dist/core/src/fs-deadline.d.ts.map +1 -0
  125. package/dist/core/src/index.d.ts +4 -3
  126. package/dist/core/src/index.d.ts.map +1 -1
  127. package/dist/core/src/manifest.d.ts +142 -18
  128. package/dist/core/src/manifest.d.ts.map +1 -1
  129. package/dist/core/src/repo-manager.d.ts +2 -2
  130. package/dist/core/src/repo-manager.d.ts.map +1 -1
  131. package/dist/core/src/runtime-assets.d.ts.map +1 -1
  132. package/dist/core/src/subprocess.d.ts +33 -1
  133. package/dist/core/src/subprocess.d.ts.map +1 -1
  134. package/dist/core/src/walker.d.ts +1 -1
  135. package/dist/core/src/walker.d.ts.map +1 -1
  136. package/dist/core/src/workspace-config.d.ts +9 -2
  137. package/dist/core/src/workspace-config.d.ts.map +1 -1
  138. package/dist/core/workspace-config.js +3 -2
  139. package/dist/deploy/index.js +12 -7
  140. package/dist/deploy/index.js.map +1 -1
  141. package/dist/deploy/src/targets/container-runtime.d.ts.map +1 -1
  142. package/dist/discovery/index.js +3 -2
  143. package/dist/{ensure-sources-RSTZONIE.js → ensure-sources-JLVHHZI2.js} +13 -12
  144. package/dist/ensure-sources-JLVHHZI2.js.map +1 -0
  145. package/dist/factory-assets/connectors/box.js +8 -7
  146. package/dist/factory-assets/connectors/deploy/CONNECTOR.md +19 -0
  147. package/dist/factory-assets/connectors/deploy/adapter.d.ts.map +1 -1
  148. package/dist/factory-assets/connectors/deploy.js +8 -7
  149. package/dist/factory-assets/connectors/devserver/adapter.d.ts.map +1 -1
  150. package/dist/factory-assets/connectors/devserver.js +8 -7
  151. package/dist/factory-assets/connectors/flow/adapter.js +8 -7
  152. package/dist/factory-assets/connectors/flow/engine.js +6 -5
  153. package/dist/factory-assets/connectors/flow/run-flow.js +10 -9
  154. package/dist/factory-assets/connectors/flow.js +8 -7
  155. package/dist/factory-assets/connectors/git/driver.d.ts +12 -1
  156. package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
  157. package/dist/factory-assets/connectors/git.js +8 -7
  158. package/dist/factory-assets/connectors/gmail.js +8 -7
  159. package/dist/factory-assets/connectors/googledrive.js +8 -7
  160. package/dist/factory-assets/connectors/local/driver.d.ts +25 -1
  161. package/dist/factory-assets/connectors/local/driver.d.ts.map +1 -1
  162. package/dist/factory-assets/connectors/local.js +8 -7
  163. package/dist/factory-assets/connectors/mattermost.js +8 -7
  164. package/dist/factory-assets/connectors/memory.js +8 -7
  165. package/dist/factory-assets/connectors/minio.js +8 -7
  166. package/dist/factory-assets/connectors/postgres.js +8 -7
  167. package/dist/factory-assets/connectors/s3/driver.d.ts +15 -0
  168. package/dist/factory-assets/connectors/s3/driver.d.ts.map +1 -1
  169. package/dist/factory-assets/connectors/s3.js +8 -7
  170. package/dist/factory-assets/connectors/sharepoint.js +8 -7
  171. package/dist/factory-assets/connectors/sqlite/adapter.d.ts +8 -1
  172. package/dist/factory-assets/connectors/sqlite/adapter.d.ts.map +1 -1
  173. package/dist/factory-assets/connectors/sqlite.js +8 -7
  174. package/dist/factory-assets/connectors/static-server/adapter.d.ts.map +1 -1
  175. package/dist/factory-assets/connectors/static-server.js +8 -7
  176. package/dist/factory-assets/connectors/tunnel.js +8 -7
  177. package/dist/factory-assets/connectors/webdav.js +8 -7
  178. package/dist/factory-assets/connectors/xstate/adapter.d.ts +6 -0
  179. package/dist/factory-assets/connectors/xstate/adapter.d.ts.map +1 -1
  180. package/dist/factory-assets/connectors/xstate-store.js +8 -7
  181. package/dist/factory-assets/connectors/xstate.js +8 -7
  182. package/dist/flows-LV5WYJ2I.js +20 -0
  183. package/dist/{flows-FHWBCLXF.js.map → flows-LV5WYJ2I.js.map} +1 -1
  184. package/dist/{helpers-GUUWPPAX.js → helpers-PJ3CPUUL.js} +13 -12
  185. package/dist/{helpers-GUUWPPAX.js.map → helpers-PJ3CPUUL.js.map} +1 -1
  186. package/dist/library/index.js +8 -7
  187. package/dist/library/install.js +6 -5
  188. package/dist/{library-publish-UKKSJP7V.js → library-publish-HVZRCE3C.js} +16 -15
  189. package/dist/library-publish-HVZRCE3C.js.map +1 -0
  190. package/dist/{open-library-VALRYGFV.js → open-library-RMI2FTQ4.js} +14 -13
  191. package/dist/{open-library-VALRYGFV.js.map → open-library-RMI2FTQ4.js.map} +1 -1
  192. package/dist/{paths-5QJJBAND.js → paths-JSVTQAVW.js} +11 -10
  193. package/dist/{paths-5QJJBAND.js.map → paths-JSVTQAVW.js.map} +1 -1
  194. package/dist/plugin-registry/src/deploy-helpers.d.ts +1 -1
  195. package/dist/{plugin-store-ZBJZ7F6D.js → plugin-store-7TVJB2TS.js} +8 -7
  196. package/dist/plugin-store-7TVJB2TS.js.map +1 -0
  197. package/dist/{project-IRUJLIVX.js → project-P636MSYT.js} +14 -13
  198. package/dist/{project-IRUJLIVX.js.map → project-P636MSYT.js.map} +1 -1
  199. package/dist/resolver/index.js +13 -1
  200. package/dist/resolver/src/types.d.ts +7 -0
  201. package/dist/resolver/src/types.d.ts.map +1 -1
  202. package/dist/resolver/src/validator.d.ts +8 -1
  203. package/dist/resolver/src/validator.d.ts.map +1 -1
  204. package/dist/runner/index.js +13 -12
  205. package/dist/runner/src/external-mcp.d.ts +1 -1
  206. package/dist/runner/src/external-mcp.d.ts.map +1 -1
  207. package/dist/runner/src/mcp-prompt.d.ts +7 -3
  208. package/dist/runner/src/mcp-prompt.d.ts.map +1 -1
  209. package/dist/runner/src/mcp-runtime-handlers.d.ts +12 -0
  210. package/dist/runner/src/mcp-runtime-handlers.d.ts.map +1 -1
  211. package/dist/runner/src/mixin-resolver.d.ts.map +1 -1
  212. package/dist/runner/src/recipe-resolver.d.ts +20 -6
  213. package/dist/runner/src/recipe-resolver.d.ts.map +1 -1
  214. package/dist/runner/src/resource-handler.d.ts +43 -0
  215. package/dist/runner/src/resource-handler.d.ts.map +1 -1
  216. package/dist/runner/src/resources.d.ts +12 -5
  217. package/dist/runner/src/resources.d.ts.map +1 -1
  218. package/dist/runner/src/serve.d.ts +5 -5
  219. package/dist/runner/src/serve.d.ts.map +1 -1
  220. package/dist/runner/src/session-builder.d.ts +9 -0
  221. package/dist/runner/src/session-builder.d.ts.map +1 -1
  222. package/dist/runner/src/session-capability-wiring.d.ts +5 -0
  223. package/dist/runner/src/session-capability-wiring.d.ts.map +1 -1
  224. package/dist/runner/src/workspace-migration.d.ts +37 -3
  225. package/dist/runner/src/workspace-migration.d.ts.map +1 -1
  226. package/dist/sdk/asset-manager.js +10 -9
  227. package/dist/sdk/bridge.js +4 -3
  228. package/dist/sdk/core.js +6 -5
  229. package/dist/sdk/flow.js +6 -5
  230. package/dist/sdk/index.js +13 -12
  231. package/dist/sdk/index.js.map +1 -1
  232. package/dist/sdk/resolver.js +13 -1
  233. package/dist/sdk/runner.js +13 -12
  234. package/dist/sdk/session.js +1 -1
  235. package/dist/sdk/store.js +1 -1
  236. package/dist/session/index.js +1 -1
  237. package/dist/session/src/dispatcher.d.ts.map +1 -1
  238. package/dist/{setup-WJPNUE32.js → setup-OYW3W3XK.js} +10 -9
  239. package/dist/setup-OYW3W3XK.js.map +1 -0
  240. package/dist/skills-QY5PHBD3.js +20 -0
  241. package/dist/{skills-BMI6H7HI.js.map → skills-QY5PHBD3.js.map} +1 -1
  242. package/dist/{source-5KDURFBS.js → source-63CHWDC2.js} +15 -14
  243. package/dist/{source-5KDURFBS.js.map → source-63CHWDC2.js.map} +1 -1
  244. package/dist/{source-manifest-publish-DPQI44D3.js → source-manifest-publish-DLASGDK5.js} +17 -16
  245. package/dist/source-manifest-publish-DLASGDK5.js.map +1 -0
  246. package/dist/store/index.js +1 -1
  247. package/dist/store/src/store.d.ts +9 -0
  248. package/dist/store/src/store.d.ts.map +1 -1
  249. package/dist/tui/index.js +13 -12
  250. package/dist/tui/index.js.map +1 -1
  251. package/dist/validator-RN64BKFW.js +5 -0
  252. package/dist/{validator-VF5M764T.js.map → validator-RN64BKFW.js.map} +1 -1
  253. package/dist/workspace-plugin/adapters/mcp.js +18 -5
  254. package/dist/workspace-plugin/adapters/mcp.js.map +1 -1
  255. package/dist/workspace-plugin/adapters/omp.js +10 -10
  256. package/dist/workspace-plugin/index.js +3 -2
  257. package/dist/workspace-plugin/src/tools/validator.d.ts.map +1 -1
  258. package/dist/workspace-plugin/src/utils/ai-assets.d.ts +11 -6
  259. package/dist/workspace-plugin/src/utils/ai-assets.d.ts.map +1 -1
  260. package/package.json +1 -1
  261. package/dist/asset-feeds-WIBEP37F.js.map +0 -1
  262. package/dist/chunk-2BQBWWFX.js.map +0 -1
  263. package/dist/chunk-2IJFUAZB.js.map +0 -1
  264. package/dist/chunk-5NZ56R63.js.map +0 -1
  265. package/dist/chunk-6POODADP.js.map +0 -1
  266. package/dist/chunk-7J7LQP6T.js.map +0 -1
  267. package/dist/chunk-A22KZ7GZ.js.map +0 -1
  268. package/dist/chunk-ACXLKNIM.js.map +0 -1
  269. package/dist/chunk-BG4XVMG2.js.map +0 -1
  270. package/dist/chunk-BI2NKPA4.js.map +0 -1
  271. package/dist/chunk-BQCGFPHW.js +0 -345
  272. package/dist/chunk-BQCGFPHW.js.map +0 -1
  273. package/dist/chunk-FIUGSIKC.js.map +0 -1
  274. package/dist/chunk-GXC3TYMQ.js.map +0 -1
  275. package/dist/chunk-ISA7R7PK.js.map +0 -1
  276. package/dist/chunk-JB35MVBN.js.map +0 -1
  277. package/dist/chunk-KY5NY7LB.js.map +0 -1
  278. package/dist/chunk-LV2HPH3C.js +0 -73
  279. package/dist/chunk-LV2HPH3C.js.map +0 -1
  280. package/dist/chunk-XCBG2KDC.js +0 -23
  281. package/dist/chunk-XCBG2KDC.js.map +0 -1
  282. package/dist/ensure-sources-RSTZONIE.js.map +0 -1
  283. package/dist/flows-FHWBCLXF.js +0 -7
  284. package/dist/library-publish-UKKSJP7V.js.map +0 -1
  285. package/dist/plugin-store-ZBJZ7F6D.js.map +0 -1
  286. package/dist/setup-WJPNUE32.js.map +0 -1
  287. package/dist/skills-BMI6H7HI.js +0 -7
  288. package/dist/source-manifest-publish-DPQI44D3.js.map +0 -1
  289. package/dist/validator-VF5M764T.js +0 -5
package/dist/cli/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
- import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-FIUGSIKC.js';
3
- import { makeSourceCommand, syncProjectSources } from '../chunk-YULV7UTU.js';
4
- import { AI_RESOURCES, aiResourceRoots } from '../chunk-TFIFNDT2.js';
5
- import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity } from '../chunk-MB6563TL.js';
6
- import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-EPWY2ABE.js';
7
- import { logErr, S, logOk, logInfo, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, logWarn, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth } from '../chunk-BYS6JDZB.js';
2
+ import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-NYCJ7B27.js';
3
+ import { makeSourceCommand, syncProjectSources } from '../chunk-KYLWY3A7.js';
4
+ import { AI_RESOURCES, aiResourceRoots } from '../chunk-A5OYCQGT.js';
5
+ import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity } from '../chunk-WCWXDW22.js';
6
+ import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-Y3JVBJ3Y.js';
7
+ import { logErr, S, logOk, logInfo, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, logWarn, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth } from '../chunk-DY2AK577.js';
8
8
  import { LocalSecretsProvider } from '../chunk-6BEGKO2Q.js';
9
- import { runFlow, resumeFlow } from '../chunk-MO43URUI.js';
9
+ import { runFlow, resumeFlow } from '../chunk-UAQVFATZ.js';
10
10
  import '../chunk-4R6DROGN.js';
11
- import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-GXC3TYMQ.js';
12
- import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-BG4XVMG2.js';
13
- import { buildClaudePluginFiles } from '../chunk-C4KVFALU.js';
11
+ import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-CZZRDYT4.js';
12
+ import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-WZPADAE7.js';
13
+ import { buildClaudePluginFiles } from '../chunk-QIQTYN7F.js';
14
14
  import '../chunk-X5YPJV4N.js';
15
15
  import '../chunk-W3UDISS2.js';
16
16
  import '../chunk-O7SG5PC2.js';
@@ -18,39 +18,40 @@ import '../chunk-7QBNJTTQ.js';
18
18
  import '../chunk-WQ7DE5UC.js';
19
19
  import '../chunk-GTS2FODO.js';
20
20
  import '../chunk-32NA4TVC.js';
21
- import '../chunk-M5GJT3D7.js';
21
+ import '../chunk-OYX22NJL.js';
22
22
  import '../chunk-ISQWMBKD.js';
23
23
  import '../chunk-RRVQAE5D.js';
24
24
  import '../chunk-BMQKMOQY.js';
25
25
  import '../chunk-GAH4YRCI.js';
26
- import '../chunk-ACWCVB5Q.js';
27
- import '../chunk-LV2HPH3C.js';
28
- import '../chunk-6POODADP.js';
29
- import '../chunk-2TSSCHCQ.js';
26
+ import '../chunk-ORZW7MMO.js';
27
+ import '../chunk-BEAIJRVF.js';
28
+ import '../chunk-SVL4EZJT.js';
29
+ import '../chunk-CKVIN4H3.js';
30
30
  import '../chunk-6E6PKKAD.js';
31
31
  import { loadFlow, loadAllFlows } from '../chunk-HPGV54O4.js';
32
32
  import '../chunk-Y662DNQQ.js';
33
33
  import '../chunk-IFGTRL2I.js';
34
34
  import '../chunk-RDE43ORT.js';
35
- import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-A22KZ7GZ.js';
36
- import { resolveLibraryDir, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-344DEXZS.js';
35
+ import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-UVW3R6S7.js';
36
+ import { resolveLibraryDir, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-35ELAMQ5.js';
37
37
  import '../chunk-UKJMQZV6.js';
38
38
  import '../chunk-R7FOF242.js';
39
- import '../chunk-MZV6WCF3.js';
39
+ import '../chunk-MAN7AGQJ.js';
40
40
  import '../chunk-JXT46QFC.js';
41
- import '../chunk-STQOPWPS.js';
41
+ import '../chunk-VCU4NPUS.js';
42
42
  import '../chunk-CGYEHQOX.js';
43
- import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, portableSpawn, portableSpawnSync, WorkspaceYamlEditor, checkAgentSkillConformance, readLock } from '../chunk-5NZ56R63.js';
43
+ import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, portableSpawn, portableSpawnSync, WorkspaceYamlEditor, checkAgentSkillConformance, readLock } from '../chunk-ST3DLLNZ.js';
44
44
  import { DRIVER_DEFAULTS } from '../chunk-K5GBV4SA.js';
45
45
  import { assetSearchDirs, detectDomains } from '../chunk-ZAP2BDHG.js';
46
- import { factoryAssetRoots } from '../chunk-7J7LQP6T.js';
47
- import { globalCacheRoot, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug } from '../chunk-ISA7R7PK.js';
46
+ import { factoryAssetRoots } from '../chunk-MMD2KQ3A.js';
47
+ import { globalCacheRoot, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug } from '../chunk-72EOJJOM.js';
48
48
  import { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-P4VHQA4N.js';
49
- import { parseFrontmatter, scanDirectory } from '../chunk-BQCGFPHW.js';
49
+ import { parseFrontmatter, scanDirectory } from '../chunk-DYMWJAL4.js';
50
50
  import { parseAssetRef, ASSET_KINDS, isValidAssetName, slugifyAssetName, ASSET_NAME_HINT, assetRefToStr } from '../chunk-GEEW6SY2.js';
51
51
  import '../chunk-F3HNW354.js';
52
52
  import { SUPPORTED_DRIVER_TARGETS } from '../chunk-MENCWIHW.js';
53
- import { openSqlite } from '../chunk-JB35MVBN.js';
53
+ import { openSqlite } from '../chunk-U5POE4BA.js';
54
+ import '../chunk-7GOCNYUV.js';
54
55
  import '../chunk-KTBKW2FI.js';
55
56
  import '../chunk-UQ6LFBPZ.js';
56
57
  import '../chunk-IEX5YV4R.js';
@@ -106,7 +107,7 @@ async function runSearch(kind, query, opts) {
106
107
  }
107
108
  }
108
109
  async function searchIndex(query, kind) {
109
- const { openLibrary: openLibrary2 } = await import('../open-library-VALRYGFV.js');
110
+ const { openLibrary: openLibrary2 } = await import('../open-library-RMI2FTQ4.js');
110
111
  const library = await openLibrary2();
111
112
  try {
112
113
  const defs = await library.listAssetDefs(kind ? { kind } : {});
@@ -137,11 +138,12 @@ async function searchIndex(query, kind) {
137
138
  library.close();
138
139
  }
139
140
  }
140
- function searchFactory(projectDir, query, kind) {
141
+ async function searchFactory(projectDir, query, kind) {
141
142
  const prefixes = factoryAssetRoots().map((r) => r.endsWith(path14__default.sep) ? r : r + path14__default.sep);
142
143
  const isFactoryPath = (p7) => prefixes.some((fp) => p7 === fp.slice(0, -1) || p7.startsWith(fp));
143
144
  try {
144
- return new AssetManager({ projectDir }).search(query, kind).filter((e) => isFactoryPath(e.source));
145
+ const entries = await new AssetManager({ projectDir }).search(query, kind);
146
+ return entries.filter((e) => isFactoryPath(e.source));
145
147
  } catch {
146
148
  return [];
147
149
  }
@@ -155,10 +157,10 @@ function unionEntries(indexed, factory) {
155
157
  }
156
158
  async function searchLocal(query, kind, opts, showStore, airGapped) {
157
159
  const projectDir = path14__default.resolve(opts.projectDir);
158
- const factory = searchFactory(projectDir, query, kind);
160
+ const factory = await searchFactory(projectDir, query, kind);
159
161
  let entries = unionEntries(await searchIndex(query, kind), factory);
160
162
  if (entries.length === 0 && !query && !kind && !airGapped) {
161
- const { autoSyncForSearch } = await import('../source-5KDURFBS.js');
163
+ const { autoSyncForSearch } = await import('../source-63CHWDC2.js');
162
164
  if (await autoSyncForSearch(projectDir)) {
163
165
  entries = unionEntries(await searchIndex(query, kind), factory);
164
166
  }
@@ -212,7 +214,7 @@ async function searchStore(query, kind, opts, airGapped) {
212
214
  logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
213
215
  return;
214
216
  }
215
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-VALRYGFV.js');
217
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-RMI2FTQ4.js');
216
218
  try {
217
219
  const remote = await openCatalogSource2({ projectDir: path14__default.resolve(opts.projectDir) });
218
220
  const assets = await remote.listAssets(kind ? { kind } : {});
@@ -353,7 +355,7 @@ function makeAddCommand() {
353
355
  const kind = parseAssetRef(ref).kind;
354
356
  if (NON_DEPLOYABLE_KINDS.has(kind))
355
357
  logInfo(
356
- `Recorded in skaile.yaml. ${kind} assets are not deployed into the driver target \u2014 they are wired when skaile runs the agent.`
358
+ `Recorded in skaile.yaml${kind === "mcp-server" ? " (bytes fetched + verified into .skaile/cache/store)" : ""}. ${kind} assets are not deployed into the driver target \u2014 they are wired when skaile runs the agent.`
357
359
  );
358
360
  else logInfo("Nothing to deploy (already up to date).");
359
361
  } else for (const a of added) logOk(a);
@@ -404,7 +406,7 @@ function makeListCommand() {
404
406
  "Read the global SSOT (~/.skaile/skaile.yaml); report state per backend"
405
407
  ).option("--backend <ids>", "Comma-separated global backends to report (implies --global)").option("--json", "Output as JSON").addOption(
406
408
  new Option("--target <agent>", "Driver target").default("claude-code").choices(SUPPORTED_DRIVER_TARGETS)
407
- ).action((kind, opts) => {
409
+ ).action(async (kind, opts) => {
408
410
  const backends = parseBackendFilter(opts.backend);
409
411
  if (opts.global || backends) {
410
412
  runGlobalList(kind, opts, backends);
@@ -416,7 +418,7 @@ function makeListCommand() {
416
418
  });
417
419
  let declared;
418
420
  try {
419
- declared = am2.listDeclared(kind);
421
+ declared = await am2.listDeclared(kind);
420
422
  } catch (err) {
421
423
  if (err instanceof MissingManifestError)
422
424
  logErr(`No ${S.cmd("skaile.yaml")} found. Run ${S.cmd("skaile init")} to create one.`);
@@ -495,14 +497,76 @@ function runGlobalList(kind, opts, backends) {
495
497
  logInfo(`${drift} with drift \u2014 run ${S.cmd("skaile install --global")} to materialize.`);
496
498
  console.log();
497
499
  }
500
+ function catalogAssetToEntry(a) {
501
+ return {
502
+ name: a.name,
503
+ kind: a.kind ?? "skill",
504
+ description: a.description ?? "",
505
+ source: `store://${a.id}`,
506
+ // Bare, like every other leg — a stored `@publisher` must not render as
507
+ // `repository: @admin` for a store hit and `admin` for a local one.
508
+ publisher: a.publisher.replace(/^@/, ""),
509
+ repo: a.repo,
510
+ domainSlug: a.domainSlug,
511
+ category: a.category,
512
+ version: a.version,
513
+ requires: [],
514
+ dependencies: []
515
+ };
516
+ }
517
+ async function resolveInfoEntry(am2, ref, opts) {
518
+ const local = await am2.info(ref);
519
+ if (local) return { entry: local };
520
+ const parsed = parseRefTolerant(ref);
521
+ if (!parsed) return { entry: null };
522
+ const deployed = am2.listDeployed(parsed.kind).find((e) => e.name === parsed.name && e.kind === parsed.kind);
523
+ if (deployed) {
524
+ const scanned = await scanDirectory(deployed.source, deployed.publisher ?? "");
525
+ const match = scanned.find((e) => e.kind === deployed.kind && e.name === deployed.name) ?? // A manifest whose `name:` differs from the deploy dir still matches on
526
+ // kind. Never fall back across kinds — a nested manifest of another kind
527
+ // is a different asset, not this one.
528
+ scanned.find((e) => e.kind === deployed.kind);
529
+ return { entry: match ?? deployed };
530
+ }
531
+ const lookup = opts.storeLookup ?? (async (filter) => {
532
+ const { resolveCatalogSource } = await import('../open-library-RMI2FTQ4.js');
533
+ const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
534
+ try {
535
+ return await source.listAssets(filter);
536
+ } finally {
537
+ close();
538
+ }
539
+ });
540
+ try {
541
+ const assets = await lookup({ kind: parsed.kind });
542
+ const wanted = parsed.publisher?.replace(/^@/, "");
543
+ const hit = assets.find(
544
+ (a) => a.kind === parsed.kind && a.name === parsed.name && (!wanted || a.publisher.replace(/^@/, "") === wanted)
545
+ );
546
+ return { entry: hit ? catalogAssetToEntry(hit) : null };
547
+ } catch (err) {
548
+ const { LocalCatalogDisabledError } = await import('../open-library-RMI2FTQ4.js');
549
+ const storeNote = err instanceof Error ? err.message : String(err);
550
+ const disabled = err instanceof LocalCatalogDisabledError || /catalog\.url/i.test(storeNote);
551
+ return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
552
+ }
553
+ }
554
+ function infoNotFoundHint(ref, lookup) {
555
+ const sync = `Run ${S.cmd("skaile source sync")} for source-backed assets`;
556
+ if (!lookup.storeNote)
557
+ return `'${ref}' not found in local sources, deployed assets, or the store. ${sync}, or ${S.cmd("skaile search --store")} to browse the store.`;
558
+ if (lookup.storeDisabled)
559
+ return `'${ref}' not found in local sources or deployed assets, and the remote store is disabled (${lookup.storeNote}). ${sync}, or set ${S.cmd("catalog.url")} in ~/.skaile/config.yaml to query the store.`;
560
+ return `'${ref}' not found locally and the store could not be queried (${lookup.storeNote}). ${sync}, or retry when the store is reachable.`;
561
+ }
498
562
  function makeInfoCommand() {
499
563
  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) => {
500
- const am2 = new AssetManager({ projectDir: path14__default.resolve(opts.projectDir) });
501
- const entry = am2.info(ref);
564
+ const projectDir = path14__default.resolve(opts.projectDir);
565
+ const am2 = new AssetManager({ projectDir });
566
+ const lookup = await resolveInfoEntry(am2, ref, { projectDir });
567
+ const entry = lookup.entry;
502
568
  if (!entry) {
503
- logErr(
504
- `'${ref}' not found. Run ${S.cmd("skaile source sync")} then ${S.cmd("skaile search")}.`
505
- );
569
+ logErr(infoNotFoundHint(ref, lookup));
506
570
  process.exit(1);
507
571
  }
508
572
  const softDeps = await am2.softDepsOf([ref]);
@@ -543,9 +607,9 @@ function makeCreateCommand() {
543
607
  });
544
608
  }
545
609
  function makeDoctorCommand() {
546
- 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((name, opts) => {
610
+ 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) => {
547
611
  const am2 = new AssetManager({ projectDir: path14__default.resolve(opts.projectDir) });
548
- const issues = am2.doctor();
612
+ const issues = await am2.doctor();
549
613
  if (issues.length === 0) {
550
614
  logOk("No missing dependencies.");
551
615
  return;
@@ -1101,7 +1165,7 @@ function makeCatalogCommand() {
1101
1165
  return catalog;
1102
1166
  }
1103
1167
  async function runLocalCatalogTest(projectDir) {
1104
- const { resolveCatalogSource } = await import('../open-library-VALRYGFV.js');
1168
+ const { resolveCatalogSource } = await import('../open-library-RMI2FTQ4.js');
1105
1169
  let resolved;
1106
1170
  try {
1107
1171
  resolved = await resolveCatalogSource({ projectDir });
@@ -1609,10 +1673,10 @@ function parsePositiveIntOption(value) {
1609
1673
  }
1610
1674
  return n;
1611
1675
  }
1612
- function scanFactoryConnectors(scanDirectory2, roots) {
1676
+ async function scanFactoryConnectors(scanDirectory2, roots) {
1613
1677
  const byName = /* @__PURE__ */ new Map();
1614
1678
  for (const dir of roots) {
1615
- for (const e of scanDirectory2(dir, "factory-assets")) {
1679
+ for (const e of await scanDirectory2(dir, "factory-assets")) {
1616
1680
  if (e.kind === "connector" && !byName.has(e.name)) byName.set(e.name, e);
1617
1681
  }
1618
1682
  }
@@ -1721,7 +1785,7 @@ function makeConnectorCommand() {
1721
1785
  const cmd = new Command("connector").description("Operate on connectors in a workspace");
1722
1786
  cmd.command("catalog").description("List all available connector drivers and their dependencies").action(async () => {
1723
1787
  const { scanDirectory: scanDirectory2, factoryAssetRoots: factoryAssetRoots2 } = await import('../core/index.js');
1724
- const entries = scanFactoryConnectors(scanDirectory2, factoryAssetRoots2());
1788
+ const entries = await scanFactoryConnectors(scanDirectory2, factoryAssetRoots2());
1725
1789
  if (entries.length === 0) {
1726
1790
  console.log("No connector descriptors found.");
1727
1791
  return;
@@ -1752,7 +1816,7 @@ function makeConnectorCommand() {
1752
1816
  logErr("No skaile.yaml found in current directory. Run 'skaile init' first.");
1753
1817
  process.exit(1);
1754
1818
  }
1755
- const entries = scanFactoryConnectors(scanDirectory2, factoryAssetRoots2());
1819
+ const entries = await scanFactoryConnectors(scanDirectory2, factoryAssetRoots2());
1756
1820
  const entry = entries.find((e) => e.name === driver);
1757
1821
  if (!entry) {
1758
1822
  logErr(
@@ -2091,7 +2155,7 @@ async function ensureTargetsRegistered(projectDir) {
2091
2155
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2092
2156
  const config = resolveSkWorkspaceConfig2(projectDir);
2093
2157
  if (config.plugins && config.plugins.length > 0) {
2094
- const { ensurePluginsLoaded } = await import('../plugin-store-ZBJZ7F6D.js');
2158
+ const { ensurePluginsLoaded } = await import('../plugin-store-7TVJB2TS.js');
2095
2159
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
2096
2160
  for (const f of result.failed) logWarn(f.error);
2097
2161
  }
@@ -2211,9 +2275,9 @@ function makeDeployCommand() {
2211
2275
  return cmd;
2212
2276
  }
2213
2277
  function makeDiffCommand() {
2214
- 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((ref, opts) => {
2278
+ 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) => {
2215
2279
  const am2 = new AssetManager({ projectDir: path14__default.resolve(opts.projectDir) });
2216
- const result = am2.diff(ref);
2280
+ const result = await am2.diff(ref);
2217
2281
  if (result === null) {
2218
2282
  logInfo("No differences (or asset not found).");
2219
2283
  return;
@@ -3255,7 +3319,7 @@ function makeLibraryCommand() {
3255
3319
  const { manager, library, close } = await openLibraryManager();
3256
3320
  try {
3257
3321
  const lib = await manager.requireLibrary(name);
3258
- syncManifestWithDisk(lib.path, lib.name);
3322
+ await syncManifestWithDisk(lib.path, lib.name);
3259
3323
  const res = await indexLibrary(lib, library);
3260
3324
  for (const e of res.errors) logWarn(e);
3261
3325
  logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
@@ -3340,16 +3404,16 @@ function makeLibraryCommand() {
3340
3404
  });
3341
3405
  cmd.command("publish <lib>").description("Push + register the library's manifest atomically (needs git backend)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--create-repo", "Provision + link a public github repo if the library has no remote").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(
3342
3406
  async (lib, opts) => {
3343
- const { runLibraryPublish } = await import('../library-publish-UKKSJP7V.js');
3407
+ const { runLibraryPublish } = await import('../library-publish-HVZRCE3C.js');
3344
3408
  await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
3345
3409
  }
3346
3410
  );
3347
3411
  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) => {
3348
- const { runLibraryRegister } = await import('../library-publish-UKKSJP7V.js');
3412
+ const { runLibraryRegister } = await import('../library-publish-HVZRCE3C.js');
3349
3413
  await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
3350
3414
  });
3351
3415
  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) => {
3352
- const { runLibraryYank } = await import('../library-publish-UKKSJP7V.js');
3416
+ const { runLibraryYank } = await import('../library-publish-HVZRCE3C.js');
3353
3417
  await withStoreErrorHandling(() => runLibraryYank(lib, opts));
3354
3418
  });
3355
3419
  return cmd;
@@ -3397,9 +3461,9 @@ function ensureManifestPublisher(libraryPath, publisher) {
3397
3461
  if (manifest.publisher) return;
3398
3462
  saveSkPublishManifest(libraryPath, { ...manifest, publisher });
3399
3463
  }
3400
- function syncManifestWithDisk(libraryPath, libraryName) {
3464
+ async function syncManifestWithDisk(libraryPath, libraryName) {
3401
3465
  const publisher = loadSkPublishManifest(libraryPath)?.publisher ?? slugifyAssetName(libraryName);
3402
- for (const e of scanDirectory(libraryPath, publisher)) {
3466
+ for (const e of await scanDirectory(libraryPath, publisher)) {
3403
3467
  const root = path14.relative(libraryPath, path14.dirname(e.source)) || e.name;
3404
3468
  upsertManifestAsset(libraryPath, { kind: e.kind, name: e.name, root, version: e.version });
3405
3469
  }
@@ -3545,18 +3609,24 @@ function colorLine(line) {
3545
3609
  if (/\[serve\]/.test(line)) return pc5.dim(line);
3546
3610
  return line;
3547
3611
  }
3612
+ var DOCKER_PROBE_TIMEOUT_MS = 1e4;
3613
+ var DOCKER_PS_TIMEOUT_MS = 15e3;
3614
+ var DOCKER_LOGS_TIMEOUT_MS = 6e4;
3548
3615
  function dockerAvailable() {
3549
- return portableSpawnSync(["docker", "info"]).exitCode === 0;
3616
+ return portableSpawnSync(["docker", "info"], { timeoutMs: DOCKER_PROBE_TIMEOUT_MS }).exitCode === 0;
3550
3617
  }
3551
3618
  function listContainers() {
3552
- const result = portableSpawnSync([
3553
- "docker",
3554
- "ps",
3555
- "--filter",
3556
- "label=skaile.managed=true",
3557
- "--format",
3558
- '{{.Names}} {{.Label "skaile.project-slug"}} {{.Status}} {{.CreatedAt}}'
3559
- ]);
3619
+ const result = portableSpawnSync(
3620
+ [
3621
+ "docker",
3622
+ "ps",
3623
+ "--filter",
3624
+ "label=skaile.managed=true",
3625
+ "--format",
3626
+ '{{.Names}} {{.Label "skaile.project-slug"}} {{.Status}} {{.CreatedAt}}'
3627
+ ],
3628
+ { timeoutMs: DOCKER_PS_TIMEOUT_MS }
3629
+ );
3560
3630
  return parseContainers(result.stdout);
3561
3631
  }
3562
3632
  function makeLogsCommand() {
@@ -3634,7 +3704,7 @@ function makeLogsCommand() {
3634
3704
  }
3635
3705
  await Promise.all([pipeStream(proc.stdout), pipeStream(proc.stderr)]);
3636
3706
  } else {
3637
- const result = portableSpawnSync(args);
3707
+ const result = portableSpawnSync(args, { timeoutMs: DOCKER_LOGS_TIMEOUT_MS });
3638
3708
  const combined = result.stdout + result.stderr;
3639
3709
  const lines = combined.split("\n");
3640
3710
  for (const line of lines) {
@@ -3709,11 +3779,37 @@ var state = {
3709
3779
  seenLibraryDomains: /* @__PURE__ */ new Set(),
3710
3780
  seenOrigins: /* @__PURE__ */ new Set(),
3711
3781
  originFilter: null,
3782
+ query: "",
3783
+ searchMode: false,
3712
3784
  message: "",
3713
3785
  cols: 80,
3714
3786
  awaitingExitConfirm: false
3715
3787
  };
3716
- function buildVisibleRows(rows, collapsedOrigins, collapsedSources, collapsedDomains, originFilter = null) {
3788
+ function buildVisibleRows(rows, collapsedOrigins, collapsedSources, collapsedDomains, originFilter = null, query = "") {
3789
+ const q = query.trim().toLowerCase();
3790
+ if (q) {
3791
+ const origins = /* @__PURE__ */ new Set();
3792
+ const groups = /* @__PURE__ */ new Set();
3793
+ const domains = /* @__PURE__ */ new Set();
3794
+ for (const row of rows) {
3795
+ if (row.type !== "asset" || !matchesQuery(row, q)) continue;
3796
+ const origin = rowOrigin(row);
3797
+ if (originFilter && origin !== originFilter) continue;
3798
+ origins.add(origin);
3799
+ groups.add(srcKey(origin, rowGroup(row)));
3800
+ domains.add(domainKey(origin, rowGroup(row), rowDomain(row)));
3801
+ }
3802
+ return rows.filter((row) => {
3803
+ const origin = rowOrigin(row);
3804
+ if (originFilter && origin !== originFilter) return false;
3805
+ if (row.type === "origin-header") return origins.has(origin);
3806
+ if (row.type === "publisher-header") return groups.has(srcKey(origin, row.source));
3807
+ if (row.type === "domain-header" || row.type === "domain-info") {
3808
+ return domains.has(domainKey(origin, row.source, row.domainSlug ?? NO_DOMAIN));
3809
+ }
3810
+ return row.type === "asset" && matchesQuery(row, q);
3811
+ });
3812
+ }
3717
3813
  return rows.filter((row) => {
3718
3814
  const origin = rowOrigin(row);
3719
3815
  if (originFilter && origin !== originFilter) return false;
@@ -3731,6 +3827,27 @@ function buildVisibleRows(rows, collapsedOrigins, collapsedSources, collapsedDom
3731
3827
  return true;
3732
3828
  });
3733
3829
  }
3830
+ function splitKeys(chunk) {
3831
+ const keys = [];
3832
+ let i = 0;
3833
+ while (i < chunk.length) {
3834
+ if (chunk[i] === "\x1B" && chunk[i + 1] === "[") {
3835
+ let j = i + 2;
3836
+ while (j < chunk.length && /[0-9;]/.test(chunk[j])) j++;
3837
+ keys.push(chunk.slice(i, j + 1));
3838
+ i = j + 1;
3839
+ } else if (chunk[i] === "\x1B" && chunk[i + 1] === "O") {
3840
+ keys.push(chunk.slice(i, i + 3));
3841
+ i += 3;
3842
+ } else if (chunk[i] === "\x1B" && i > 0 && i === chunk.length - 1) {
3843
+ break;
3844
+ } else {
3845
+ keys.push(chunk[i]);
3846
+ i++;
3847
+ }
3848
+ }
3849
+ return keys;
3850
+ }
3734
3851
  function originAssetRefs(rows, origin) {
3735
3852
  return refsOf(rows.filter((r) => isAsset(r) && rowOrigin(r) === origin));
3736
3853
  }
@@ -3882,6 +3999,11 @@ function rowGroup(r) {
3882
3999
  function rowDomain(r) {
3883
4000
  return r.entry?.domainSlug || NO_DOMAIN;
3884
4001
  }
4002
+ function matchesQuery(r, q) {
4003
+ const e = r.entry;
4004
+ if (!e) return false;
4005
+ return e.name.toLowerCase().includes(q) || !!e.publisher?.toLowerCase().includes(q) || !!e.description?.toLowerCase().includes(q);
4006
+ }
3885
4007
  var UNKNOWN_ORG = "(unknown)";
3886
4008
  function rowOrg(r) {
3887
4009
  if (r.org) return r.org;
@@ -3988,9 +4110,32 @@ async function previewSoftDepsUnderCursor() {
3988
4110
  }
3989
4111
  if (softDepCacheKeyUnderCursor() === cacheKey) state.message = msg;
3990
4112
  }
4113
+ var softDepPreviewTimer = null;
4114
+ var frameOwnsScreen = false;
4115
+ function scheduleSoftDepPreview() {
4116
+ if (state.tab !== "assets" && state.tab !== "sources") return;
4117
+ if (softDepPreviewTimer) clearTimeout(softDepPreviewTimer);
4118
+ softDepPreviewTimer = null;
4119
+ const cacheKey = softDepCacheKeyUnderCursor();
4120
+ if (!cacheKey) {
4121
+ state.message = "";
4122
+ return;
4123
+ }
4124
+ const cached = softDepPreviewCache.get(cacheKey);
4125
+ if (cached !== void 0) {
4126
+ state.message = cached;
4127
+ return;
4128
+ }
4129
+ softDepPreviewTimer = setTimeout(() => {
4130
+ softDepPreviewTimer = null;
4131
+ void previewSoftDepsUnderCursor().then(() => {
4132
+ if (frameOwnsScreen && !state.awaitingExitConfirm && state.message) render();
4133
+ });
4134
+ }, 80);
4135
+ }
3991
4136
  async function loadAssets() {
3992
4137
  softDepPreviewCache.clear();
3993
- const { gatherAssetFeeds } = await import('../asset-feeds-WIBEP37F.js');
4138
+ const { gatherAssetFeeds } = await import('../asset-feeds-7VQVISDI.js');
3994
4139
  const { entries, domains, notes } = await gatherAssetFeeds(am, am.projectDir);
3995
4140
  if (notes.length > 0) {
3996
4141
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
@@ -4196,7 +4341,7 @@ function reconcileCollapsedSets(rows) {
4196
4341
  async function loadSourcesAndLibraries() {
4197
4342
  try {
4198
4343
  const [{ openLibraryManager: openLibraryManager2 }, { skaileHomeDir }, { getGlobalCacheDir: getGlobalCacheDir2 }] = await Promise.all([
4199
- import('../open-library-VALRYGFV.js'),
4344
+ import('../open-library-RMI2FTQ4.js'),
4200
4345
  import('../library/index.js'),
4201
4346
  import('../core/index.js')
4202
4347
  ]);
@@ -4241,7 +4386,8 @@ function rebuildVisible() {
4241
4386
  state.collapsedOrigins,
4242
4387
  state.collapsedSources,
4243
4388
  state.collapsedDomains,
4244
- state.originFilter
4389
+ state.originFilter,
4390
+ state.query
4245
4391
  );
4246
4392
  clampCursor();
4247
4393
  }
@@ -4265,7 +4411,7 @@ var TABS = {
4265
4411
  rowCount: () => state.visibleRows.length,
4266
4412
  selectableCount: () => state.assetRows.filter(isAsset).length,
4267
4413
  renderRow: (i, sel) => renderAssetRow(state.visibleRows[i], sel),
4268
- footer: " \u2191\u2193/jk nav \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [d] domain info [i] info [1]lib [2]src [3]factory [4]store [0]all Tab [q] quit"
4414
+ footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [d] domain info [/] search [i] info [1]lib [2]src [3]factory [4]store [0]all Tab [q] quit"
4269
4415
  },
4270
4416
  sources: {
4271
4417
  label: "Sources",
@@ -4273,7 +4419,7 @@ var TABS = {
4273
4419
  selectableCount: () => state.sourceTreeRows.filter(isAsset).length,
4274
4420
  emptyMsg: " No sources registered. Run `skaile source add <git-url>` from the shell to track a github repo.",
4275
4421
  renderRow: (i, sel) => renderSourceTreeRow(state.visibleSourceRows[i], sel),
4276
- footer: " \u2191\u2193/jk nav \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [d] domain info [i] info Tab [q] quit"
4422
+ footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [d] domain info [i] info Tab [q] quit"
4277
4423
  },
4278
4424
  libraries: {
4279
4425
  label: "Libraries",
@@ -4281,7 +4427,7 @@ var TABS = {
4281
4427
  selectableCount: () => state.libraryTreeRows.filter(isAsset).length,
4282
4428
  emptyMsg: " No libraries registered. Run `skaile library init <name>` from the shell to author your own.",
4283
4429
  renderRow: (i, sel) => renderLibraryTreeRow(state.visibleLibraryRows[i], sel),
4284
- footer: " \u2191\u2193/jk nav \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [d] domain info [i] info Tab [q] quit"
4430
+ footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [d] domain info [i] info Tab [q] quit"
4285
4431
  },
4286
4432
  pending: {
4287
4433
  label: "Pending",
@@ -4577,54 +4723,57 @@ function renderDomainInfoLine(meta, origin, publisher, slug, expanded) {
4577
4723
  function computeMaxBodyRows() {
4578
4724
  const pendingLines = state.pendingAdds.size > 0 || state.pendingRemoves.size > 0 ? 1 + (state.pendingAdds.size > 0 ? 1 : 0) + (state.pendingRemoves.size > 0 ? 1 : 0) : 0;
4579
4725
  const msgLines = state.message ? 2 : 0;
4580
- const overhead = 5 + pendingLines + msgLines;
4726
+ const footerLines = Math.ceil(TABS[state.tab].footer.length / Math.max(1, state.cols));
4727
+ const overhead = 4 + footerLines + pendingLines + msgLines;
4581
4728
  return Math.max(5, (process.stdout.rows || 30) - overhead);
4582
4729
  }
4583
- function renderHeader() {
4584
- console.log();
4730
+ function renderHeader(out) {
4731
+ out.push("");
4585
4732
  const filterTag = state.tab === "assets" && state.originFilter ? ` ${pc5.bgYellow(pc5.black(` filter: ${ORIGIN_META[state.originFilter].label} `))} ${pc5.dim("[0] clear")}` : "";
4586
- console.log(` ${pc5.bold("skaile manage")} ${renderTabs()}${filterTag}`);
4587
- console.log(` ${S.rule(state.cols - 4)}`);
4733
+ const queryTag = state.tab === "assets" && (state.searchMode || state.query) ? ` ${pc5.bgCyan(pc5.black(` / ${state.query}${state.searchMode ? "_" : ""} `))} ${pc5.dim(state.searchMode ? "[\u21B5] done [Esc] clear" : "[/] edit")}` : "";
4734
+ out.push(` ${pc5.bold("skaile manage")} ${renderTabs()}${filterTag}${queryTag}`);
4735
+ out.push(` ${S.rule(state.cols - 4)}`);
4588
4736
  }
4589
- function renderBody(spec, maxRows) {
4737
+ function renderBody(out, spec, maxRows) {
4590
4738
  const total = spec.rowCount();
4591
4739
  if (total === 0 && spec.emptyMsg) {
4592
- console.log(pc5.dim(spec.emptyMsg));
4740
+ out.push(pc5.dim(spec.emptyMsg));
4593
4741
  } else {
4594
4742
  const start = Math.max(0, state.cursor - maxRows + 3);
4595
4743
  const end = Math.min(total, start + maxRows);
4596
4744
  for (let i = start; i < end; i++) {
4597
- console.log(spec.renderRow(i, i === state.cursor));
4745
+ out.push(spec.renderRow(i, i === state.cursor));
4598
4746
  }
4599
4747
  }
4600
4748
  }
4601
- function renderPendingSummary() {
4749
+ function renderPendingSummary(out) {
4602
4750
  if (state.pendingAdds.size > 0 || state.pendingRemoves.size > 0) {
4603
- console.log();
4604
- if (state.pendingAdds.size > 0)
4605
- console.log(` ${pc5.blue(`+ ${state.pendingAdds.size} to add`)}`);
4751
+ out.push("");
4752
+ if (state.pendingAdds.size > 0) out.push(` ${pc5.blue(`+ ${state.pendingAdds.size} to add`)}`);
4606
4753
  if (state.pendingRemoves.size > 0)
4607
- console.log(` ${pc5.red(`- ${state.pendingRemoves.size} to remove`)}`);
4754
+ out.push(` ${pc5.red(`- ${state.pendingRemoves.size} to remove`)}`);
4608
4755
  }
4609
4756
  }
4610
- function renderMessage() {
4757
+ function renderMessage(out) {
4611
4758
  if (state.message) {
4612
- console.log();
4613
- console.log(` ${state.message}`);
4759
+ out.push("");
4760
+ out.push(` ${state.message}`);
4614
4761
  state.message = "";
4615
4762
  }
4616
4763
  }
4617
4764
  function render() {
4618
- clearScreen();
4619
4765
  state.cols = process.stdout.columns || 80;
4620
4766
  const maxRows = computeMaxBodyRows();
4621
4767
  const spec = TABS[state.tab];
4622
- renderHeader();
4623
- renderBody(spec, maxRows);
4624
- renderPendingSummary();
4625
- renderMessage();
4626
- console.log();
4627
- console.log(pc5.dim(spec.footer));
4768
+ const out = [];
4769
+ renderHeader(out);
4770
+ renderBody(out, spec, maxRows);
4771
+ renderPendingSummary(out);
4772
+ renderMessage(out);
4773
+ out.push("");
4774
+ out.push(pc5.dim(spec.footer));
4775
+ process.stdout.write(`\x1B[2J\x1B[H${out.join("\n")}
4776
+ `);
4628
4777
  }
4629
4778
  function renderExitPrompt() {
4630
4779
  clearScreen();
@@ -4697,6 +4846,7 @@ async function showInfo() {
4697
4846
  const row = rows[state.cursor];
4698
4847
  if (row?.type !== "asset") return;
4699
4848
  const e = row.entry;
4849
+ frameOwnsScreen = false;
4700
4850
  clearScreen();
4701
4851
  console.log();
4702
4852
  console.log(` ${kindColor(e.kind)} ${pc5.bold(e.name)}`);
@@ -4724,6 +4874,7 @@ async function showInfo() {
4724
4874
  };
4725
4875
  process.stdin.once("data", onData);
4726
4876
  });
4877
+ frameOwnsScreen = true;
4727
4878
  }
4728
4879
  function setOriginFilter(origin) {
4729
4880
  if (origin === null || state.originFilter === origin) {
@@ -5047,18 +5198,50 @@ var KEYMAP = [
5047
5198
  }
5048
5199
  },
5049
5200
  { keys: [" "], run: () => void nextTab() },
5201
+ // Navigation. The soft-dep preview is *scheduled*, never awaited — an index
5202
+ // read per cursor move is what made holding a key lag.
5050
5203
  {
5051
5204
  keys: ["\x1B[A", "k"],
5052
- run: async () => {
5205
+ run: () => {
5053
5206
  moveCursor(-1);
5054
- await previewSoftDepsUnderCursor();
5207
+ scheduleSoftDepPreview();
5055
5208
  }
5056
5209
  },
5057
5210
  {
5058
5211
  keys: ["\x1B[B", "j"],
5059
- run: async () => {
5212
+ run: () => {
5060
5213
  moveCursor(1);
5061
- await previewSoftDepsUnderCursor();
5214
+ scheduleSoftDepPreview();
5215
+ }
5216
+ },
5217
+ // Paging / jumping. No `when` predicate: maxCursor() clamps to 0 on the
5218
+ // row-less Pending/Sync tabs, so these are naturally inert there.
5219
+ {
5220
+ keys: ["\x1B[5~"],
5221
+ run: () => {
5222
+ moveCursor(-computeMaxBodyRows());
5223
+ scheduleSoftDepPreview();
5224
+ }
5225
+ },
5226
+ {
5227
+ keys: ["\x1B[6~"],
5228
+ run: () => {
5229
+ moveCursor(computeMaxBodyRows());
5230
+ scheduleSoftDepPreview();
5231
+ }
5232
+ },
5233
+ {
5234
+ keys: ["\x1B[H", "\x1B[1~", "\x1BOH"],
5235
+ run: () => {
5236
+ state.cursor = 0;
5237
+ scheduleSoftDepPreview();
5238
+ }
5239
+ },
5240
+ {
5241
+ keys: ["\x1B[F", "\x1B[4~", "\x1BOF"],
5242
+ run: () => {
5243
+ state.cursor = Math.max(0, maxCursor());
5244
+ scheduleSoftDepPreview();
5062
5245
  }
5063
5246
  },
5064
5247
  // Collapse / expand — assets tab
@@ -5135,6 +5318,14 @@ var KEYMAP = [
5135
5318
  { keys: ["i"], when: TAB_ASSETS, run: showInfo },
5136
5319
  // Domain info region — assets only. Toggles the ⓘ line truncated ↔ full.
5137
5320
  { keys: ["d"], when: TAB_ASSETS, run: toggleDomainInfoUnderCursor },
5321
+ // / — assets only. Opens the incremental search prompt (see handleSearchKey).
5322
+ {
5323
+ keys: ["/"],
5324
+ when: TAB_ASSETS,
5325
+ run: () => {
5326
+ state.searchMode = true;
5327
+ }
5328
+ },
5138
5329
  // Origin filter — assets only. 1/2/3/4 isolate one origin, 0 clears.
5139
5330
  { keys: ["1"], when: TAB_ASSETS, run: () => setOriginFilter("library") },
5140
5331
  { keys: ["2"], when: TAB_ASSETS, run: () => setOriginFilter("source") },
@@ -5142,7 +5333,25 @@ var KEYMAP = [
5142
5333
  { keys: ["4"], when: TAB_ASSETS, run: () => setOriginFilter("store") },
5143
5334
  { keys: ["0"], when: TAB_ASSETS, run: () => setOriginFilter(null) }
5144
5335
  ];
5336
+ function handleSearchKey(key) {
5337
+ if (key === "\x1B") {
5338
+ state.searchMode = false;
5339
+ state.query = "";
5340
+ } else if (key === "\r" || key === "\n") {
5341
+ state.searchMode = false;
5342
+ return;
5343
+ } else if (key === "\x7F" || key === "\b") {
5344
+ state.query = state.query.slice(0, -1);
5345
+ } else if (key.length === 1 && key >= " ") {
5346
+ state.query += key;
5347
+ } else {
5348
+ return "skip-render";
5349
+ }
5350
+ state.cursor = 0;
5351
+ rebuildVisible();
5352
+ }
5145
5353
  async function dispatchKey(key) {
5354
+ if (state.searchMode && key !== "") return handleSearchKey(key);
5146
5355
  for (const b of KEYMAP) {
5147
5356
  if (!b.keys.includes(key)) continue;
5148
5357
  if (b.when && !b.when(state.tab)) continue;
@@ -5166,7 +5375,9 @@ async function handleExitConfirm(key) {
5166
5375
  }
5167
5376
  async function run(projectDir) {
5168
5377
  if (!process.stdin.isTTY || typeof process.stdin.setRawMode !== "function") {
5169
- console.error("skaile manage requires an interactive terminal (TTY). Run it directly in your shell.");
5378
+ console.error(
5379
+ "skaile manage requires an interactive terminal (TTY). Run it directly in your shell."
5380
+ );
5170
5381
  process.exit(1);
5171
5382
  }
5172
5383
  am = new AssetManager({ projectDir });
@@ -5175,14 +5386,21 @@ async function run(projectDir) {
5175
5386
  hideCursor();
5176
5387
  process.stdin.setRawMode(true);
5177
5388
  process.stdin.resume();
5389
+ frameOwnsScreen = true;
5178
5390
  render();
5179
5391
  for await (const chunk of process.stdin) {
5180
- const key = chunk.toString();
5181
- const result = state.awaitingExitConfirm ? await handleExitConfirm(key) : await dispatchKey(key);
5392
+ let result = "skip-render";
5393
+ for (const key of splitKeys(chunk.toString())) {
5394
+ result = state.awaitingExitConfirm ? await handleExitConfirm(key) : await dispatchKey(key);
5395
+ if (result === "break") break;
5396
+ }
5182
5397
  if (result === "break") break;
5183
5398
  if (result === "skip-render") continue;
5184
5399
  render();
5185
5400
  }
5401
+ frameOwnsScreen = false;
5402
+ if (softDepPreviewTimer) clearTimeout(softDepPreviewTimer);
5403
+ softDepPreviewTimer = null;
5186
5404
  showCursor();
5187
5405
  process.stdin.setRawMode(false);
5188
5406
  process.stdin.pause();
@@ -5358,10 +5576,10 @@ function makeOutdatedCommand() {
5358
5576
  }
5359
5577
  function makePatchCommand() {
5360
5578
  const cmd = new Command("patch").description("Patch workflow for skill improvement");
5361
- cmd.command("extract <ref>").alias("start").description("Extract asset for local editing").option("--project-dir <path>", "Project directory", process.cwd()).action((ref, opts) => {
5579
+ cmd.command("extract <ref>").alias("start").description("Extract asset for local editing").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
5362
5580
  const am2 = new AssetManager({ projectDir: path14__default.resolve(opts.projectDir) });
5363
5581
  try {
5364
- const dest = am2.patch(ref);
5582
+ const dest = await am2.patch(ref);
5365
5583
  logOk(`Extracted to ${S.dim(dest)}`);
5366
5584
  console.log(` Edit the files, then run ${S.cmd(`skaile patch commit ${ref}`)}`);
5367
5585
  } catch (err) {
@@ -5369,10 +5587,10 @@ function makePatchCommand() {
5369
5587
  process.exit(1);
5370
5588
  }
5371
5589
  });
5372
- cmd.command("commit <ref>").description("Generate .patch file from edits").option("--project-dir <path>", "Project directory", process.cwd()).action((ref, opts) => {
5590
+ cmd.command("commit <ref>").description("Generate .patch file from edits").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
5373
5591
  const am2 = new AssetManager({ projectDir: path14__default.resolve(opts.projectDir) });
5374
5592
  try {
5375
- const patchFile = am2.patchCommit(ref);
5593
+ const patchFile = await am2.patchCommit(ref);
5376
5594
  logOk(`Patch saved to ${S.dim(patchFile)}`);
5377
5595
  console.log(` Add to skaile.yaml patches section, then run ${S.cmd("skaile install")}`);
5378
5596
  } catch (err) {
@@ -5380,10 +5598,10 @@ function makePatchCommand() {
5380
5598
  process.exit(1);
5381
5599
  }
5382
5600
  });
5383
- cmd.command("submit <ref>").description("Apply patch to repo clone and prepare for PR").option("--project-dir <path>", "Project directory", process.cwd()).action((ref, opts) => {
5601
+ 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) => {
5384
5602
  const am2 = new AssetManager({ projectDir: path14__default.resolve(opts.projectDir) });
5385
5603
  try {
5386
- am2.patchSubmit(ref);
5604
+ await am2.patchSubmit(ref);
5387
5605
  logOk("Patch applied to repo clone and committed.");
5388
5606
  console.log(
5389
5607
  ` Push upstream from the source repo directly \u2014 the legacy ${S.cmd("skaile repo contrib push")} command was removed on 2026-05-12.`
@@ -5412,7 +5630,7 @@ function action2(fn) {
5412
5630
  };
5413
5631
  }
5414
5632
  async function reconcileAndReport(projectDir, plugins) {
5415
- const { reconcilePlugins } = await import('../plugin-store-ZBJZ7F6D.js');
5633
+ const { reconcilePlugins } = await import('../plugin-store-7TVJB2TS.js');
5416
5634
  if (plugins.length === 0) {
5417
5635
  logInfo("No plugins declared \u2014 nothing to reconcile.");
5418
5636
  return;
@@ -5428,7 +5646,7 @@ async function reconcileAndReport(projectDir, plugins) {
5428
5646
  async function runInstall2(spec, opts) {
5429
5647
  const projectDir = path14__default.resolve(opts.projectDir);
5430
5648
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
5431
- const { specName } = await import('../plugin-store-ZBJZ7F6D.js');
5649
+ const { specName } = await import('../plugin-store-7TVJB2TS.js');
5432
5650
  const yamlPath = path14__default.join(projectDir, "skaile.yaml");
5433
5651
  const editor = WorkspaceYamlEditor2.load(yamlPath);
5434
5652
  const replaced = editor.addPlugin(spec, specName);
@@ -5440,7 +5658,7 @@ async function runInstall2(spec, opts) {
5440
5658
  async function runRemove(name, opts) {
5441
5659
  const projectDir = path14__default.resolve(opts.projectDir);
5442
5660
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
5443
- const { specName } = await import('../plugin-store-ZBJZ7F6D.js');
5661
+ const { specName } = await import('../plugin-store-7TVJB2TS.js');
5444
5662
  const yamlPath = path14__default.join(projectDir, "skaile.yaml");
5445
5663
  const editor = WorkspaceYamlEditor2.load(yamlPath);
5446
5664
  const removed = editor.removePlugin(name, specName);
@@ -5468,7 +5686,7 @@ async function runList(opts) {
5468
5686
  const registry = createPluginRegistry();
5469
5687
  if (declared.length > 0) {
5470
5688
  try {
5471
- const { loadPlugins } = await import('../plugin-store-ZBJZ7F6D.js');
5689
+ const { loadPlugins } = await import('../plugin-store-7TVJB2TS.js');
5472
5690
  const result = await loadPlugins(projectDir, declared, registry);
5473
5691
  for (const f of result.failed) logWarn(f.error);
5474
5692
  } catch (err) {
@@ -6567,12 +6785,12 @@ function makeServeCommand() {
6567
6785
  );
6568
6786
  }
6569
6787
  async function ensurePluginsLoadedForServe(projectDir) {
6570
- const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-GUUWPPAX.js');
6788
+ const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-PJ3CPUUL.js');
6571
6789
  try {
6572
6790
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
6573
6791
  const config = resolveSkWorkspaceConfig2(projectDir);
6574
6792
  if (!config.plugins || config.plugins.length === 0) return;
6575
- const { ensurePluginsLoaded } = await import('../plugin-store-ZBJZ7F6D.js');
6793
+ const { ensurePluginsLoaded } = await import('../plugin-store-7TVJB2TS.js');
6576
6794
  const { pluginRegistry } = await import('../plugin-registry/index.js');
6577
6795
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
6578
6796
  if (result.loaded.length > 0) {
@@ -6586,14 +6804,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
6586
6804
  }
6587
6805
  }
6588
6806
  async function runCompileTest(opts) {
6589
- const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-GUUWPPAX.js');
6807
+ const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-PJ3CPUUL.js');
6590
6808
  const { tmpdir } = await import('os');
6591
6809
  const { dirname: dirname4, join: join7, resolve: resolve5 } = await import('path');
6592
6810
  const { fileURLToPath: fileURLToPath2 } = await import('url');
6593
6811
  const { unlinkSync, existsSync: existsSync15 } = await import('fs');
6594
6812
  const { spawn } = await import('child_process');
6595
6813
  const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
6596
- const { MONOREPO_ROOT } = await import('../paths-5QJJBAND.js');
6814
+ const { MONOREPO_ROOT } = await import('../paths-JSVTQAVW.js');
6597
6815
  if (MONOREPO_ROOT === null) {
6598
6816
  logErr2("--compile-test is only available inside the skaile-dev workspace.");
6599
6817
  logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
@@ -6622,9 +6840,11 @@ async function runCompileTest(opts) {
6622
6840
  "--define:__INCLUDE_CLAUDE_SDK__=true",
6623
6841
  opts.withCodex ? "--define:__INCLUDE_CODEX__=true" : "--define:__INCLUDE_CODEX__=false"
6624
6842
  ];
6843
+ const COMPILE_TIMEOUT_MS = 6e5;
6625
6844
  const buildProc = portableSpawnSync2(buildArgs, {
6626
6845
  cwd: MONOREPO_ROOT,
6627
- env: { ...process.env }
6846
+ env: { ...process.env },
6847
+ timeoutMs: COMPILE_TIMEOUT_MS
6628
6848
  });
6629
6849
  if (buildProc.exitCode !== 0) {
6630
6850
  logErr2("Build failed:");
@@ -7382,8 +7602,8 @@ function showOverview(am2) {
7382
7602
  console.log(` ${pc5.dim(`${result.total} assets deployed`)}`);
7383
7603
  console.log();
7384
7604
  }
7385
- function showAsset(am2, kind, name) {
7386
- const entry = am2.info(`${kind}:${name}`);
7605
+ async function showAsset(am2, kind, name) {
7606
+ const entry = await am2.info(`${kind}:${name}`);
7387
7607
  if (entry?.source && fs13__default.existsSync(entry.source)) {
7388
7608
  console.log();
7389
7609
  console.log(` ${kindColor(entry.kind)} ${S.heading(entry.name)}`);
@@ -7396,7 +7616,7 @@ function showAsset(am2, kind, name) {
7396
7616
  process.exit(1);
7397
7617
  }
7398
7618
  function makeShowCommand() {
7399
- 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((kind, name, opts) => {
7619
+ 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) => {
7400
7620
  const am2 = new AssetManager({
7401
7621
  projectDir: path14__default.resolve(opts.projectDir),
7402
7622
  driverTarget: opts.target
@@ -7406,13 +7626,13 @@ function makeShowCommand() {
7406
7626
  } else if (!name) {
7407
7627
  if (kind.includes(":")) {
7408
7628
  const [k, n] = kind.split(":");
7409
- showAsset(am2, k, n);
7629
+ await showAsset(am2, k, n);
7410
7630
  } else {
7411
7631
  logErr("Usage: skaile show [kind name] or skaile show (no args for overview)");
7412
7632
  process.exit(1);
7413
7633
  }
7414
7634
  } else {
7415
- showAsset(am2, kind, name);
7635
+ await showAsset(am2, kind, name);
7416
7636
  }
7417
7637
  });
7418
7638
  }
@@ -7466,7 +7686,7 @@ function makeStoreCommand() {
7466
7686
  process.exit(2);
7467
7687
  });
7468
7688
  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) => {
7469
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-VALRYGFV.js');
7689
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-RMI2FTQ4.js');
7470
7690
  try {
7471
7691
  const remote = await openCatalogSource2({ projectDir: path14__default.resolve(opts.projectDir) });
7472
7692
  const assets = await remote.listAssets(opts.kind ? { kind: opts.kind } : {});
@@ -7499,8 +7719,8 @@ function makeStoreCommand() {
7499
7719
  }
7500
7720
  });
7501
7721
  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) => {
7502
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-VALRYGFV.js');
7503
- const { supportsInstallManifest } = await import('../project-IRUJLIVX.js');
7722
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-RMI2FTQ4.js');
7723
+ const { supportsInstallManifest } = await import('../project-P636MSYT.js');
7504
7724
  try {
7505
7725
  const remote = await openCatalogSource2({ projectDir: path14__default.resolve(opts.projectDir) });
7506
7726
  const asset = await remote.resolve(ref);
@@ -8310,7 +8530,7 @@ function makeWhyCommand() {
8310
8530
  if (chain.length === 0) {
8311
8531
  let declared;
8312
8532
  try {
8313
- declared = am2.listDeclared();
8533
+ declared = await am2.listDeclared();
8314
8534
  } catch {
8315
8535
  logErr(`${ref} not found in lock file. Run \`skaile install\` first.`);
8316
8536
  return;
@@ -8580,7 +8800,7 @@ async function bootstrapUserConfig() {
8580
8800
  }
8581
8801
  async function hydrateInitSources(resolved, created) {
8582
8802
  try {
8583
- const { ensureSourcesCloned } = await import('../ensure-sources-RSTZONIE.js');
8803
+ const { ensureSourcesCloned } = await import('../ensure-sources-JLVHHZI2.js');
8584
8804
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
8585
8805
  for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
8586
8806
  if (hydrate.failed.length > 0) {
@@ -8620,7 +8840,7 @@ function printInitSummary(resolved, projectDir, created) {
8620
8840
  console.log();
8621
8841
  }
8622
8842
  program.command("setup").description("Interactive provider setup wizard").action(async () => {
8623
- const { cmdSetup } = await import('../setup-WJPNUE32.js');
8843
+ const { cmdSetup } = await import('../setup-OYW3W3XK.js');
8624
8844
  await cmdSetup([], { projectDir: process.cwd() });
8625
8845
  });
8626
8846
  program.addCommand(makeInstallCommand());