@skaile/workspaces 6.14.0 → 6.16.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 (447) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/agent-file-refresh-76NNFB4W.js +89 -0
  3. package/dist/agent-file-refresh-76NNFB4W.js.map +1 -0
  4. package/dist/ai-sdk.js +8 -7
  5. package/dist/ai-sdk.js.map +1 -1
  6. package/dist/app-sdk/index.js +1 -1
  7. package/dist/{asset-feeds-DOG5FK7T.js → asset-feeds-ON7FYHHF.js} +25 -23
  8. package/dist/asset-feeds-ON7FYHHF.js.map +1 -0
  9. package/dist/asset-manager/catalog-deployer.js +8 -7
  10. package/dist/asset-manager/history.js +7 -6
  11. package/dist/asset-manager/index.js +17 -15
  12. package/dist/asset-manager/installer.js +16 -9
  13. package/dist/asset-manager/renderers.js +8 -8
  14. package/dist/asset-manager/src/add-remove/add.d.ts +134 -0
  15. package/dist/asset-manager/src/add-remove/add.d.ts.map +1 -0
  16. package/dist/asset-manager/src/add-remove/remove.d.ts +329 -0
  17. package/dist/asset-manager/src/add-remove/remove.d.ts.map +1 -0
  18. package/dist/asset-manager/src/agent-render.d.ts +116 -0
  19. package/dist/asset-manager/src/agent-render.d.ts.map +1 -0
  20. package/dist/asset-manager/src/composed-blocks.d.ts +40 -0
  21. package/dist/asset-manager/src/composed-blocks.d.ts.map +1 -0
  22. package/dist/asset-manager/src/config/core.d.ts +297 -0
  23. package/dist/asset-manager/src/config/core.d.ts.map +1 -0
  24. package/dist/asset-manager/src/config/edit.d.ts +161 -0
  25. package/dist/asset-manager/src/config/edit.d.ts.map +1 -0
  26. package/dist/asset-manager/src/index.d.ts +31 -2961
  27. package/dist/asset-manager/src/index.d.ts.map +1 -1
  28. package/dist/asset-manager/src/install/clone-commit-fetcher.d.ts +11 -0
  29. package/dist/asset-manager/src/install/clone-commit-fetcher.d.ts.map +1 -0
  30. package/dist/asset-manager/src/install/install.d.ts +151 -0
  31. package/dist/asset-manager/src/install/install.d.ts.map +1 -0
  32. package/dist/asset-manager/src/install/restore.d.ts +76 -0
  33. package/dist/asset-manager/src/install/restore.d.ts.map +1 -0
  34. package/dist/asset-manager/src/install-agent.d.ts +52 -4
  35. package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
  36. package/dist/asset-manager/src/install-instances.d.ts +70 -2
  37. package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
  38. package/dist/asset-manager/src/installer.d.ts +54 -4
  39. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  40. package/dist/asset-manager/src/lock/copies.d.ts +156 -0
  41. package/dist/asset-manager/src/lock/copies.d.ts.map +1 -0
  42. package/dist/asset-manager/src/lock/library.d.ts +261 -0
  43. package/dist/asset-manager/src/lock/library.d.ts.map +1 -0
  44. package/dist/asset-manager/src/mcp-render.d.ts +86 -0
  45. package/dist/asset-manager/src/mcp-render.d.ts.map +1 -0
  46. package/dist/asset-manager/src/omp-sweep.d.ts +25 -0
  47. package/dist/asset-manager/src/omp-sweep.d.ts.map +1 -0
  48. package/dist/asset-manager/src/read/diff.d.ts +109 -0
  49. package/dist/asset-manager/src/read/diff.d.ts.map +1 -0
  50. package/dist/asset-manager/src/read/doctor.d.ts +116 -0
  51. package/dist/asset-manager/src/read/doctor.d.ts.map +1 -0
  52. package/dist/asset-manager/src/read/gaps.d.ts +120 -0
  53. package/dist/asset-manager/src/read/gaps.d.ts.map +1 -0
  54. package/dist/asset-manager/src/read/graph.d.ts +69 -0
  55. package/dist/asset-manager/src/read/graph.d.ts.map +1 -0
  56. package/dist/asset-manager/src/read/outdated.d.ts +152 -0
  57. package/dist/asset-manager/src/read/outdated.d.ts.map +1 -0
  58. package/dist/asset-manager/src/read/state.d.ts +265 -0
  59. package/dist/asset-manager/src/read/state.d.ts.map +1 -0
  60. package/dist/asset-manager/src/renderers.d.ts +11 -1
  61. package/dist/asset-manager/src/renderers.d.ts.map +1 -1
  62. package/dist/asset-manager/src/resolve/guards.d.ts +167 -0
  63. package/dist/asset-manager/src/resolve/guards.d.ts.map +1 -0
  64. package/dist/asset-manager/src/resolve/scan.d.ts +222 -0
  65. package/dist/asset-manager/src/resolve/scan.d.ts.map +1 -0
  66. package/dist/asset-manager/src/resolve/stores.d.ts +176 -0
  67. package/dist/asset-manager/src/resolve/stores.d.ts.map +1 -0
  68. package/dist/asset-manager/src/shared/files.d.ts +42 -0
  69. package/dist/asset-manager/src/shared/files.d.ts.map +1 -0
  70. package/dist/asset-manager/src/shared/library-hooks.d.ts +16 -0
  71. package/dist/asset-manager/src/shared/library-hooks.d.ts.map +1 -0
  72. package/dist/asset-manager/src/shared/library.d.ts +96 -0
  73. package/dist/asset-manager/src/shared/library.d.ts.map +1 -0
  74. package/dist/asset-manager/src/shared/refs.d.ts +101 -0
  75. package/dist/asset-manager/src/shared/refs.d.ts.map +1 -0
  76. package/dist/asset-manager/src/shared/types.d.ts +399 -0
  77. package/dist/asset-manager/src/shared/types.d.ts.map +1 -0
  78. package/dist/bridge/harnesses/claude-sdk.js +13 -19
  79. package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
  80. package/dist/bridge/harnesses/codex.js +10 -10
  81. package/dist/bridge/harnesses/continue.js +12 -16
  82. package/dist/bridge/harnesses/continue.js.map +1 -1
  83. package/dist/bridge/harnesses/echo.js +5 -10
  84. package/dist/bridge/harnesses/echo.js.map +1 -1
  85. package/dist/bridge/harnesses/gemini.js +5 -5
  86. package/dist/bridge/harnesses/goose.js +13 -17
  87. package/dist/bridge/harnesses/goose.js.map +1 -1
  88. package/dist/bridge/harnesses/omp.js +7 -13
  89. package/dist/bridge/harnesses/omp.js.map +1 -1
  90. package/dist/bridge/harnesses/opencode.js +13 -17
  91. package/dist/bridge/harnesses/opencode.js.map +1 -1
  92. package/dist/bridge/harnesses/qwen.js +6 -11
  93. package/dist/bridge/harnesses/qwen.js.map +1 -1
  94. package/dist/bridge/index.js +18 -18
  95. package/dist/bridge/src/codex/managed-harness.d.ts.map +1 -1
  96. package/dist/bridge/src/driver-contract.d.ts +72 -0
  97. package/dist/bridge/src/driver-contract.d.ts.map +1 -0
  98. package/dist/bridge/src/harness-model-check.d.ts +1 -1
  99. package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
  100. package/dist/bridge/src/harnesses/_subprocess-cli.d.ts +8 -0
  101. package/dist/bridge/src/harnesses/_subprocess-cli.d.ts.map +1 -1
  102. package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -1
  103. package/dist/bridge/src/harnesses/codex.d.ts +2 -0
  104. package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
  105. package/dist/bridge/src/harnesses/continue.d.ts.map +1 -1
  106. package/dist/bridge/src/harnesses/echo.d.ts.map +1 -1
  107. package/dist/bridge/src/harnesses/gemini.d.ts.map +1 -1
  108. package/dist/bridge/src/harnesses/goose.d.ts.map +1 -1
  109. package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
  110. package/dist/bridge/src/harnesses/opencode.d.ts.map +1 -1
  111. package/dist/bridge/src/harnesses/qwen.d.ts.map +1 -1
  112. package/dist/bridge/src/index.d.ts +2 -0
  113. package/dist/bridge/src/index.d.ts.map +1 -1
  114. package/dist/bridge/src/preflight.d.ts +114 -0
  115. package/dist/bridge/src/preflight.d.ts.map +1 -0
  116. package/dist/bridge/src/registry.d.ts +12 -0
  117. package/dist/bridge/src/registry.d.ts.map +1 -1
  118. package/dist/{chunk-7UBCUKJO.js → chunk-2JUCWMIS.js} +8808 -8337
  119. package/dist/chunk-2JUCWMIS.js.map +1 -0
  120. package/dist/{chunk-VS6XC5JE.js → chunk-2MTRRK37.js} +3 -3
  121. package/dist/{chunk-VS6XC5JE.js.map → chunk-2MTRRK37.js.map} +1 -1
  122. package/dist/chunk-2PJYJPDE.js +3 -0
  123. package/dist/chunk-2PJYJPDE.js.map +1 -0
  124. package/dist/{chunk-ZQL6HGTW.js → chunk-2SSG5B24.js} +4 -4
  125. package/dist/{chunk-ZQL6HGTW.js.map → chunk-2SSG5B24.js.map} +1 -1
  126. package/dist/{chunk-WDG5IVEA.js → chunk-2ZDZJ7XQ.js} +3 -3
  127. package/dist/{chunk-WDG5IVEA.js.map → chunk-2ZDZJ7XQ.js.map} +1 -1
  128. package/dist/{chunk-V2VDTQ7A.js → chunk-3A7JUOY2.js} +3 -3
  129. package/dist/{chunk-V2VDTQ7A.js.map → chunk-3A7JUOY2.js.map} +1 -1
  130. package/dist/chunk-3LAJJURV.js +26 -0
  131. package/dist/chunk-3LAJJURV.js.map +1 -0
  132. package/dist/{chunk-X66KSHZF.js → chunk-3UYKT62L.js} +5 -5
  133. package/dist/{chunk-X66KSHZF.js.map → chunk-3UYKT62L.js.map} +1 -1
  134. package/dist/{chunk-J3FJTH3V.js → chunk-4X5WXQV7.js} +4 -4
  135. package/dist/{chunk-J3FJTH3V.js.map → chunk-4X5WXQV7.js.map} +1 -1
  136. package/dist/chunk-4ZNKEDYH.js +887 -0
  137. package/dist/chunk-4ZNKEDYH.js.map +1 -0
  138. package/dist/{chunk-DYH3VSPU.js → chunk-65SOXO7I.js} +20 -14
  139. package/dist/chunk-65SOXO7I.js.map +1 -0
  140. package/dist/{chunk-MVUXBWNW.js → chunk-6HTN2UIJ.js} +3 -3
  141. package/dist/{chunk-MVUXBWNW.js.map → chunk-6HTN2UIJ.js.map} +1 -1
  142. package/dist/{chunk-4SSTREBO.js → chunk-6KV34G6A.js} +8 -8
  143. package/dist/{chunk-4SSTREBO.js.map → chunk-6KV34G6A.js.map} +1 -1
  144. package/dist/{chunk-YNQRVTXH.js → chunk-6M44OQKH.js} +40 -44
  145. package/dist/chunk-6M44OQKH.js.map +1 -0
  146. package/dist/{chunk-B6W5DCH5.js → chunk-72DYHOO2.js} +24 -25
  147. package/dist/chunk-72DYHOO2.js.map +1 -0
  148. package/dist/{chunk-RRAXV5LE.js → chunk-7IW5E6LB.js} +43 -48
  149. package/dist/chunk-7IW5E6LB.js.map +1 -0
  150. package/dist/{chunk-BNLXZXZN.js → chunk-BRAOB37W.js} +97 -47
  151. package/dist/chunk-BRAOB37W.js.map +1 -0
  152. package/dist/{chunk-ZLDAPZIX.js → chunk-BTMSHGN3.js} +4 -4
  153. package/dist/{chunk-ZLDAPZIX.js.map → chunk-BTMSHGN3.js.map} +1 -1
  154. package/dist/{chunk-7K73MCI6.js → chunk-CU5WY6HN.js} +3 -3
  155. package/dist/{chunk-7K73MCI6.js.map → chunk-CU5WY6HN.js.map} +1 -1
  156. package/dist/{chunk-G2ZWIYZR.js → chunk-DFFJKGCW.js} +3 -3
  157. package/dist/{chunk-G2ZWIYZR.js.map → chunk-DFFJKGCW.js.map} +1 -1
  158. package/dist/{chunk-CG63XGVV.js → chunk-EGKCKWWE.js} +3 -3
  159. package/dist/{chunk-CG63XGVV.js.map → chunk-EGKCKWWE.js.map} +1 -1
  160. package/dist/{chunk-CJO3XKO7.js → chunk-ETGC2MEM.js} +4 -4
  161. package/dist/{chunk-CJO3XKO7.js.map → chunk-ETGC2MEM.js.map} +1 -1
  162. package/dist/{chunk-CFRHYD4C.js → chunk-FPG36VC4.js} +8 -13
  163. package/dist/chunk-FPG36VC4.js.map +1 -0
  164. package/dist/{chunk-SBAUZ7XH.js → chunk-H3PY5DFL.js} +4 -4
  165. package/dist/{chunk-SBAUZ7XH.js.map → chunk-H3PY5DFL.js.map} +1 -1
  166. package/dist/{chunk-7HRZACI4.js → chunk-HW4BDJPC.js} +17 -6
  167. package/dist/chunk-HW4BDJPC.js.map +1 -0
  168. package/dist/{chunk-GJT2Q5XD.js → chunk-HXST2IYJ.js} +3 -3
  169. package/dist/{chunk-GJT2Q5XD.js.map → chunk-HXST2IYJ.js.map} +1 -1
  170. package/dist/{chunk-7VBD5XUM.js → chunk-IG4YQ7ER.js} +32 -90
  171. package/dist/chunk-IG4YQ7ER.js.map +1 -0
  172. package/dist/{chunk-DWPQBMCY.js → chunk-JPV4WE5L.js} +2 -2
  173. package/dist/{chunk-DWPQBMCY.js.map → chunk-JPV4WE5L.js.map} +1 -1
  174. package/dist/{chunk-OC3AIMZH.js → chunk-KDRA6FYE.js} +120 -211
  175. package/dist/chunk-KDRA6FYE.js.map +1 -0
  176. package/dist/{chunk-KOI7QFDH.js → chunk-M7XIYHWB.js} +3 -3
  177. package/dist/{chunk-KOI7QFDH.js.map → chunk-M7XIYHWB.js.map} +1 -1
  178. package/dist/{chunk-7LJUK5JK.js → chunk-MG6QD7GE.js} +201 -43
  179. package/dist/chunk-MG6QD7GE.js.map +1 -0
  180. package/dist/{chunk-XHLRMUMO.js → chunk-NAQXDTF3.js} +3 -3
  181. package/dist/{chunk-XHLRMUMO.js.map → chunk-NAQXDTF3.js.map} +1 -1
  182. package/dist/{chunk-YJAKSCCN.js → chunk-NJ6UCY2B.js} +3 -3
  183. package/dist/{chunk-YJAKSCCN.js.map → chunk-NJ6UCY2B.js.map} +1 -1
  184. package/dist/{chunk-OKPITFE3.js → chunk-NNJQQYHY.js} +2 -2
  185. package/dist/{chunk-OKPITFE3.js.map → chunk-NNJQQYHY.js.map} +1 -1
  186. package/dist/{chunk-QNHW26AT.js → chunk-OD4N5O7V.js} +4 -4
  187. package/dist/{chunk-QNHW26AT.js.map → chunk-OD4N5O7V.js.map} +1 -1
  188. package/dist/{chunk-F7WMHDTV.js → chunk-P6FJDT35.js} +27 -7
  189. package/dist/chunk-P6FJDT35.js.map +1 -0
  190. package/dist/{chunk-IOXFT5D7.js → chunk-PD42JZWI.js} +3 -3
  191. package/dist/{chunk-IOXFT5D7.js.map → chunk-PD42JZWI.js.map} +1 -1
  192. package/dist/{chunk-MS2IXLTC.js → chunk-PMXTBWFD.js} +27 -7
  193. package/dist/chunk-PMXTBWFD.js.map +1 -0
  194. package/dist/{chunk-NAAFRZTA.js → chunk-PPSSDUN6.js} +3 -3
  195. package/dist/{chunk-NAAFRZTA.js.map → chunk-PPSSDUN6.js.map} +1 -1
  196. package/dist/{chunk-LMUNQYJQ.js → chunk-PRB67LCK.js} +127 -18
  197. package/dist/chunk-PRB67LCK.js.map +1 -0
  198. package/dist/{chunk-RLV3FF4I.js → chunk-QUIK7L3Z.js} +11 -11
  199. package/dist/{chunk-RLV3FF4I.js.map → chunk-QUIK7L3Z.js.map} +1 -1
  200. package/dist/{chunk-DRUAQ7IY.js → chunk-QUPZKTF3.js} +9 -8
  201. package/dist/chunk-QUPZKTF3.js.map +1 -0
  202. package/dist/{chunk-7FXOOUOC.js → chunk-RPRMD7XV.js} +27 -11
  203. package/dist/chunk-RPRMD7XV.js.map +1 -0
  204. package/dist/{chunk-3BRBTQ6M.js → chunk-S3UOZBGE.js} +20 -3
  205. package/dist/chunk-S3UOZBGE.js.map +1 -0
  206. package/dist/{chunk-LQWOU7S2.js → chunk-SFBLZOV5.js} +3 -3
  207. package/dist/{chunk-LQWOU7S2.js.map → chunk-SFBLZOV5.js.map} +1 -1
  208. package/dist/{chunk-EB2LKPI6.js → chunk-SMFZ5YGN.js} +4 -4
  209. package/dist/{chunk-EB2LKPI6.js.map → chunk-SMFZ5YGN.js.map} +1 -1
  210. package/dist/{chunk-243Z3BNB.js → chunk-SX54OQQT.js} +4 -4
  211. package/dist/{chunk-243Z3BNB.js.map → chunk-SX54OQQT.js.map} +1 -1
  212. package/dist/{chunk-2PVYDAFN.js → chunk-T65N4CIZ.js} +3 -3
  213. package/dist/{chunk-2PVYDAFN.js.map → chunk-T65N4CIZ.js.map} +1 -1
  214. package/dist/{chunk-QBLS7X3Z.js → chunk-TVRL3IPZ.js} +3 -3
  215. package/dist/{chunk-QBLS7X3Z.js.map → chunk-TVRL3IPZ.js.map} +1 -1
  216. package/dist/{chunk-2URJ7W5X.js → chunk-TW5AP6IF.js} +5 -5
  217. package/dist/{chunk-2URJ7W5X.js.map → chunk-TW5AP6IF.js.map} +1 -1
  218. package/dist/{chunk-F6LDWA2N.js → chunk-TYK752MU.js} +3 -3
  219. package/dist/{chunk-F6LDWA2N.js.map → chunk-TYK752MU.js.map} +1 -1
  220. package/dist/{chunk-HPQ2WDYC.js → chunk-U2WPJHRA.js} +5 -5
  221. package/dist/{chunk-HPQ2WDYC.js.map → chunk-U2WPJHRA.js.map} +1 -1
  222. package/dist/{chunk-MEU2HHGV.js → chunk-U7P22GEB.js} +386 -46
  223. package/dist/chunk-U7P22GEB.js.map +1 -0
  224. package/dist/{chunk-6ISJMEDX.js → chunk-VFEZUSB6.js} +4 -4
  225. package/dist/{chunk-6ISJMEDX.js.map → chunk-VFEZUSB6.js.map} +1 -1
  226. package/dist/{chunk-5FO4U3OL.js → chunk-WW22FS74.js} +75 -67
  227. package/dist/chunk-WW22FS74.js.map +1 -0
  228. package/dist/{chunk-WCUT3EQR.js → chunk-Z23I2JA6.js} +7 -7
  229. package/dist/{chunk-WCUT3EQR.js.map → chunk-Z23I2JA6.js.map} +1 -1
  230. package/dist/{chunk-VKGNMXGZ.js → chunk-Z7HLX4V2.js} +4 -4
  231. package/dist/{chunk-VKGNMXGZ.js.map → chunk-Z7HLX4V2.js.map} +1 -1
  232. package/dist/{chunk-LZCX2TCZ.js → chunk-ZII54C3E.js} +355 -1075
  233. package/dist/chunk-ZII54C3E.js.map +1 -0
  234. package/dist/{chunk-CVUMZTNO.js → chunk-ZQPBYLCS.js} +4 -4
  235. package/dist/{chunk-CVUMZTNO.js.map → chunk-ZQPBYLCS.js.map} +1 -1
  236. package/dist/{claude-code-LFAOJ3UQ.js → claude-code-VL6UM7BZ.js} +4 -4
  237. package/dist/{claude-code-LFAOJ3UQ.js.map → claude-code-VL6UM7BZ.js.map} +1 -1
  238. package/dist/cli/index.js +494 -301
  239. package/dist/cli/index.js.map +1 -1
  240. package/dist/cli/src/agent-file-refresh.d.ts +25 -0
  241. package/dist/cli/src/agent-file-refresh.d.ts.map +1 -0
  242. package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
  243. package/dist/cli/src/commands/catalog.d.ts +9 -2
  244. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  245. package/dist/cli/src/commands/config.d.ts.map +1 -1
  246. package/dist/cli/src/commands/harness.d.ts +1 -1
  247. package/dist/cli/src/commands/harness.d.ts.map +1 -1
  248. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  249. package/dist/cli/src/commands/library-index.d.ts +5 -7
  250. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  251. package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
  252. package/dist/cli/src/commands/preset-export.d.ts.map +1 -1
  253. package/dist/cli/src/commands/project.d.ts.map +1 -1
  254. package/dist/cli/src/commands/run.d.ts.map +1 -1
  255. package/dist/cli/src/commands/serve-preflight.d.ts +27 -48
  256. package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
  257. package/dist/cli/src/commands/serve.d.ts.map +1 -1
  258. package/dist/cli/src/commands/source.d.ts +6 -9
  259. package/dist/cli/src/commands/source.d.ts.map +1 -1
  260. package/dist/cli/src/commands/validate.d.ts +6 -0
  261. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  262. package/dist/cli/src/config-checks.d.ts.map +1 -1
  263. package/dist/cli/src/harness-error.d.ts +11 -9
  264. package/dist/cli/src/harness-error.d.ts.map +1 -1
  265. package/dist/cli/src/skill-checks.d.ts +48 -74
  266. package/dist/cli/src/skill-checks.d.ts.map +1 -1
  267. package/dist/connectors/config.js +5 -5
  268. package/dist/connectors/index.js +22 -22
  269. package/dist/{connectors-KPF4UUDS.js → connectors-7EPJRVLJ.js} +25 -25
  270. package/dist/{connectors-KPF4UUDS.js.map → connectors-7EPJRVLJ.js.map} +1 -1
  271. package/dist/connectors-shared/index.js +2 -2
  272. package/dist/core/index.js +7 -6
  273. package/dist/core/manifest.js +2 -2
  274. package/dist/core/models.js +1 -1
  275. package/dist/core/publish-manifest.js +3 -3
  276. package/dist/core/ref.js +1 -1
  277. package/dist/core/runtime-assets.js +5 -5
  278. package/dist/core/src/agent-prompt-sections.d.ts +96 -4
  279. package/dist/core/src/agent-prompt-sections.d.ts.map +1 -1
  280. package/dist/core/src/check-asset.d.ts +115 -0
  281. package/dist/core/src/check-asset.d.ts.map +1 -0
  282. package/dist/core/src/harness-model.d.ts +20 -0
  283. package/dist/core/src/harness-model.d.ts.map +1 -0
  284. package/dist/core/src/index.d.ts +10 -6
  285. package/dist/core/src/index.d.ts.map +1 -1
  286. package/dist/core/src/lock.d.ts +12 -10
  287. package/dist/core/src/lock.d.ts.map +1 -1
  288. package/dist/core/src/models.d.ts +42 -11
  289. package/dist/core/src/models.d.ts.map +1 -1
  290. package/dist/core/src/publish-manifest.d.ts +17 -0
  291. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  292. package/dist/core/src/repo-identity.d.ts +41 -0
  293. package/dist/core/src/repo-identity.d.ts.map +1 -0
  294. package/dist/core/src/repo-manager.d.ts +3 -9
  295. package/dist/core/src/repo-manager.d.ts.map +1 -1
  296. package/dist/core/src/walker.d.ts.map +1 -1
  297. package/dist/core/src/workspace-config.d.ts.map +1 -1
  298. package/dist/core/workspace-config.js +4 -4
  299. package/dist/deploy/index.js +7 -6
  300. package/dist/deploy/index.js.map +1 -1
  301. package/dist/discovery/index.js +5 -5
  302. package/dist/discovery/src/source-config.d.ts.map +1 -1
  303. package/dist/{ensure-sources-FOMEGCQ5.js → ensure-sources-CI3JQJST.js} +32 -30
  304. package/dist/ensure-sources-CI3JQJST.js.map +1 -0
  305. package/dist/factory-assets/connectors/box.js +22 -22
  306. package/dist/factory-assets/connectors/deploy.js +22 -22
  307. package/dist/factory-assets/connectors/devserver.js +22 -22
  308. package/dist/factory-assets/connectors/flow/adapter.js +22 -22
  309. package/dist/factory-assets/connectors/flow/engine.js +8 -7
  310. package/dist/factory-assets/connectors/flow/run-flow.js +24 -24
  311. package/dist/factory-assets/connectors/flow.js +22 -22
  312. package/dist/factory-assets/connectors/git.js +22 -22
  313. package/dist/factory-assets/connectors/gmail.js +22 -22
  314. package/dist/factory-assets/connectors/googledrive.js +22 -22
  315. package/dist/factory-assets/connectors/local.js +22 -22
  316. package/dist/factory-assets/connectors/mattermost.js +22 -22
  317. package/dist/factory-assets/connectors/memory.js +22 -22
  318. package/dist/factory-assets/connectors/minio.js +22 -22
  319. package/dist/factory-assets/connectors/postgres.js +22 -22
  320. package/dist/factory-assets/connectors/s3.js +22 -22
  321. package/dist/factory-assets/connectors/sharepoint.js +22 -22
  322. package/dist/factory-assets/connectors/sqlite.js +22 -22
  323. package/dist/factory-assets/connectors/static-server.js +22 -22
  324. package/dist/factory-assets/connectors/tunnel.js +22 -22
  325. package/dist/factory-assets/connectors/webdav.js +22 -22
  326. package/dist/factory-assets/connectors/xstate-store.js +22 -22
  327. package/dist/factory-assets/connectors/xstate.js +22 -22
  328. package/dist/{flows-J64L5MGJ.js → flows-6XQAYQS4.js} +12 -11
  329. package/dist/{flows-J64L5MGJ.js.map → flows-6XQAYQS4.js.map} +1 -1
  330. package/dist/{helpers-ZJ67FO3Z.js → helpers-26MR5QPO.js} +32 -30
  331. package/dist/{helpers-ZJ67FO3Z.js.map → helpers-26MR5QPO.js.map} +1 -1
  332. package/dist/library/index.js +10 -10
  333. package/dist/library/install.js +4 -4
  334. package/dist/library/src/index.d.ts +1 -1
  335. package/dist/library/src/index.d.ts.map +1 -1
  336. package/dist/library/src/local/db.d.ts.map +1 -1
  337. package/dist/library/src/local/library-manager.d.ts.map +1 -1
  338. package/dist/library/src/local/library.d.ts.map +1 -1
  339. package/dist/library/src/local/schema.d.ts +19 -0
  340. package/dist/library/src/local/schema.d.ts.map +1 -1
  341. package/dist/library/src/user-library.d.ts +18 -0
  342. package/dist/library/src/user-library.d.ts.map +1 -1
  343. package/dist/{library-publish-RGVXGTY4.js → library-publish-F3AKF66O.js} +74 -68
  344. package/dist/library-publish-F3AKF66O.js.map +1 -0
  345. package/dist/model-endpoint/index.js +10 -9
  346. package/dist/{open-library-I5JHL37T.js → open-library-FVV6GG4I.js} +35 -33
  347. package/dist/{open-library-I5JHL37T.js.map → open-library-FVV6GG4I.js.map} +1 -1
  348. package/dist/{open-registry-4HNCWOCN.js → open-registry-VX2BVMS5.js} +16 -16
  349. package/dist/{open-registry-4HNCWOCN.js.map → open-registry-VX2BVMS5.js.map} +1 -1
  350. package/dist/{paths-PXBWY532.js → paths-PIWSSUUG.js} +10 -9
  351. package/dist/{paths-PXBWY532.js.map → paths-PIWSSUUG.js.map} +1 -1
  352. package/dist/{plugin-store-ZC3EGZ3D.js → plugin-store-MVTW6G7J.js} +10 -9
  353. package/dist/{plugin-store-ZC3EGZ3D.js.map → plugin-store-MVTW6G7J.js.map} +1 -1
  354. package/dist/{project-K5JWPIJ6.js → project-GFQP4TW6.js} +50 -48
  355. package/dist/{project-K5JWPIJ6.js.map → project-GFQP4TW6.js.map} +1 -1
  356. package/dist/resolver/index.js +8 -7
  357. package/dist/runner/composition-content.d.ts +2 -0
  358. package/dist/runner/composition-content.js +29 -0
  359. package/dist/runner/composition-content.js.map +1 -0
  360. package/dist/runner/index.js +40 -39
  361. package/dist/runner/src/compaction/prompt.d.ts.map +1 -1
  362. package/dist/runner/src/composition/content-entry.d.ts +15 -0
  363. package/dist/runner/src/composition/content-entry.d.ts.map +1 -0
  364. package/dist/runner/src/composition/content-source.d.ts +7 -0
  365. package/dist/runner/src/composition/content-source.d.ts.map +1 -1
  366. package/dist/runner/src/composition/dry-run.d.ts +5 -1
  367. package/dist/runner/src/composition/dry-run.d.ts.map +1 -1
  368. package/dist/runner/src/composition/index.d.ts +1 -1
  369. package/dist/runner/src/composition/index.d.ts.map +1 -1
  370. package/dist/runner/src/composition/prompt-sections.d.ts +47 -20
  371. package/dist/runner/src/composition/prompt-sections.d.ts.map +1 -1
  372. package/dist/runner/src/context-usage/compose.d.ts.map +1 -1
  373. package/dist/runner/src/session-builder.d.ts +3 -8
  374. package/dist/runner/src/session-builder.d.ts.map +1 -1
  375. package/dist/runner/src/work-practices.d.ts +9 -0
  376. package/dist/runner/src/work-practices.d.ts.map +1 -0
  377. package/dist/sdk/asset-manager.js +17 -15
  378. package/dist/sdk/bridge.js +18 -18
  379. package/dist/sdk/core.js +7 -6
  380. package/dist/sdk/flow.js +8 -7
  381. package/dist/sdk/index.js +40 -39
  382. package/dist/sdk/index.js.map +1 -1
  383. package/dist/sdk/resolver.js +8 -7
  384. package/dist/sdk/runner.js +40 -39
  385. package/dist/sdk/session.js +2 -2
  386. package/dist/sdk/transport/ws/server.js +8 -7
  387. package/dist/sdk/transport/ws.js +8 -7
  388. package/dist/sdk/transport.js +8 -7
  389. package/dist/sdk/types.js +1 -1
  390. package/dist/serve-preflight-XJS5OZML.js +138 -0
  391. package/dist/serve-preflight-XJS5OZML.js.map +1 -0
  392. package/dist/session/index.js +2 -2
  393. package/dist/{setup-RXTNGML5.js → setup-BFEBJLYF.js} +33 -31
  394. package/dist/setup-BFEBJLYF.js.map +1 -0
  395. package/dist/{skills-5D4KDVPJ.js → skills-OCG7B5CL.js} +13 -12
  396. package/dist/{skills-5D4KDVPJ.js.map → skills-OCG7B5CL.js.map} +1 -1
  397. package/dist/source-P6JPZYWP.js +93 -0
  398. package/dist/{source-2LP5W3ST.js.map → source-P6JPZYWP.js.map} +1 -1
  399. package/dist/{source-manifest-publish-EZNCTSQF.js → source-manifest-publish-XBFHEURV.js} +54 -52
  400. package/dist/source-manifest-publish-XBFHEURV.js.map +1 -0
  401. package/dist/transport/index.js +8 -7
  402. package/dist/transport/ws/server.js +8 -7
  403. package/dist/transport/ws.js +8 -7
  404. package/dist/tui/index.js +40 -39
  405. package/dist/tui/index.js.map +1 -1
  406. package/dist/types/index.js +1 -1
  407. package/dist/types/src/context-usage.d.ts +1 -1
  408. package/dist/types/src/events.d.ts +3 -2
  409. package/dist/types/src/events.d.ts.map +1 -1
  410. package/dist/types/src/runtime.d.ts +6 -0
  411. package/dist/types/src/runtime.d.ts.map +1 -1
  412. package/dist/workspace-plugin/adapters/mcp.js +29 -29
  413. package/dist/workspace-plugin/adapters/omp.js +14 -14
  414. package/dist/workspace-plugin/index.js +1 -1
  415. package/package.json +7 -1
  416. package/dist/asset-feeds-DOG5FK7T.js.map +0 -1
  417. package/dist/chunk-3BRBTQ6M.js.map +0 -1
  418. package/dist/chunk-5FO4U3OL.js.map +0 -1
  419. package/dist/chunk-7FXOOUOC.js.map +0 -1
  420. package/dist/chunk-7HRZACI4.js.map +0 -1
  421. package/dist/chunk-7LJUK5JK.js.map +0 -1
  422. package/dist/chunk-7UBCUKJO.js.map +0 -1
  423. package/dist/chunk-7VBD5XUM.js.map +0 -1
  424. package/dist/chunk-A7TM4PZZ.js +0 -110
  425. package/dist/chunk-A7TM4PZZ.js.map +0 -1
  426. package/dist/chunk-B6W5DCH5.js.map +0 -1
  427. package/dist/chunk-BNLXZXZN.js.map +0 -1
  428. package/dist/chunk-CFRHYD4C.js.map +0 -1
  429. package/dist/chunk-DRUAQ7IY.js.map +0 -1
  430. package/dist/chunk-DYH3VSPU.js.map +0 -1
  431. package/dist/chunk-F7WMHDTV.js.map +0 -1
  432. package/dist/chunk-LMUNQYJQ.js.map +0 -1
  433. package/dist/chunk-LZCX2TCZ.js.map +0 -1
  434. package/dist/chunk-MEU2HHGV.js.map +0 -1
  435. package/dist/chunk-MS2IXLTC.js.map +0 -1
  436. package/dist/chunk-OC3AIMZH.js.map +0 -1
  437. package/dist/chunk-RRAXV5LE.js.map +0 -1
  438. package/dist/chunk-YNQRVTXH.js.map +0 -1
  439. package/dist/cli/src/commands/harness-preflight.d.ts +0 -40
  440. package/dist/cli/src/commands/harness-preflight.d.ts.map +0 -1
  441. package/dist/ensure-sources-FOMEGCQ5.js.map +0 -1
  442. package/dist/library-publish-RGVXGTY4.js.map +0 -1
  443. package/dist/serve-preflight-L6VVCDM5.js +0 -61
  444. package/dist/serve-preflight-L6VVCDM5.js.map +0 -1
  445. package/dist/setup-RXTNGML5.js.map +0 -1
  446. package/dist/source-2LP5W3ST.js +0 -91
  447. package/dist/source-manifest-publish-EZNCTSQF.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,88 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1160](https://github.com/skaile-ai/workspaces/pull/1160) [`4a18e49`](https://github.com/skaile-ai/workspaces/commit/4a18e492596b351cc49623d6ac546ba3fe87721b) Thanks [@mortegro](https://github.com/mortegro)! - One publisher grammar and one per-asset check pipeline for every command that reads or writes an asset (mechanism M2).
8
+
9
+ - New `parsePublisher()` (`@skaile/workspaces/core`) replaces the six `isValidPublisher` checks. A flag (`--publisher`), `library set <lib> publisher=`, a `skaile.manifest.yaml` (top level and per asset), an asset file, a `skaile.yaml` `sources:` entry, a source repo manifest and a ref now give the same verdict and the same sentence: `invalid publisher "<value>" — publishers must be a bare name ...`. One leading `@` is dropped. An empty value, a number, a list or `null` is refused with that sentence, not read as "no publisher". `source add --publisher ""` is refused too.
10
+ - New `checkAsset()` (`@skaile/workspaces/core`, `check-asset.ts`) with one check set per command (`create`, `import`, `migrate`, `validate`, `publish`, `index`). The CLI's `runAssetChecks`, `checkAssetFile` and `libraryAssetRefusals` call it.
11
+ - `skaile asset migrate` now runs the checks of `validate` on the source before it copies. An asset `validate` refuses (bad name or version, untouched scaffold, a file that does not parse, a flow whose `id` differs from its file name, a bad agent cron) exits 1 and copies nothing.
12
+ - `skaile asset import --no-normalize` of a `SKILL.md` that does not parse prints the one parse-error line `validate` prints.
13
+ - `skaile library index` prints a version error and the warnings of the per-asset checks as the same `<file> [<tag>] - <text>` line `validate` prints (it printed `skill:x skipped: version ...` and no warning).
14
+ - `skaile library create --dir <d>` refuses a `<d>` through a folder `validate` and `library index` skip (`.git`, `node_modules`, `dist`, `.skaile`, `__pycache__`, `.claude`, `.codex`, `.omp`), and so does a `root:` of the manifest (p14).
15
+ - A skill description over 1024 characters is a warning in every command that reads an asset; only `--strict-conformance` makes it an error (v15-D11 retired). An untouched `library create` scaffold of any of the six kinds is an error in all six commands (p1020).
16
+
17
+ - [#1160](https://github.com/skaile-ai/workspaces/pull/1160) [`4a18e49`](https://github.com/skaile-ai/workspaces/commit/4a18e492596b351cc49623d6ac546ba3fe87721b) Thanks [@mortegro](https://github.com/mortegro)! - CLI output (decisions v16-D5, v16-D6):
18
+
19
+ - `skaile search --local`: when a long ref leaves no room for the description beside it, the description is stacked under the ref and now uses the full terminal width. It is wrapped at word boundaries instead of cut to a few words with `…`. The version and library follow the text on its last line, or on their own line when the text fills it.
20
+ - `skaile library pull` and `library sync`: a manifest entry whose folder is missing now gets a next step after its warning. Owner and contributor clones are told to run `skaile library index <name>`; a reader clone is told to ask the owner (the wording `library init` uses when it adopts a reader clone). The exit code stays 0.
21
+
22
+ - [#1160](https://github.com/skaile-ai/workspaces/pull/1160) [`4a18e49`](https://github.com/skaile-ai/workspaces/commit/4a18e492596b351cc49623d6ac546ba3fe87721b) Thanks [@mortegro](https://github.com/mortegro)! - Every harness now ends a failed or cancelled turn the way ADR 0012 says, and the start checks of `run`, `serve`, `config set` and `validate` are one function.
23
+
24
+ - New contract `bridge/src/driver-contract.ts` and a conformance suite (`bridge/tests/driver-conformance/`) that runs the real runner against every harness with a scripted fake backend: a good turn, 401, 429, a refused model, a crash at start and mid-turn, a missing SDK or program, and a cancel each end with one `error` (when it failed), one `finished` and one `status: idle`.
25
+ - gemini, qwen, goose, opencode and continue read a 401, 429 or "model not found" from stderr into `category` `auth`, `rate_limit` or `model` (it was `process`). An error in the event stream of gemini, qwen or goose is held until the process exits and becomes the turn's one fatal `error`; a CLI that exits 0 after an error with no result is a failed turn, not an ok one.
26
+ - codex (standalone): a cancelled turn now ends with `finished` and `status: idle`. codex (managed): `CODEX_MODEL_UNAVAILABLE` has `category: "model"`.
27
+ - `@skaile/workspaces/bridge` exports `preflight(project, harness, model, agentRef, options?)`. `skaile run`, `repl`, `resume`, `serve`, `config set harness|model` and `validate` call it in place of their own checks. Text and exit codes are unchanged. An unregistered `provider/` prefix is refused for every harness, echo and plugin harnesses included.
28
+
29
+ - [#1160](https://github.com/skaile-ai/workspaces/pull/1160) [`4a18e49`](https://github.com/skaile-ai/workspaces/commit/4a18e492596b351cc49623d6ac546ba3fe87721b) Thanks [@mortegro](https://github.com/mortegro)! - qwen, opencode, goose and continue are marked experimental: the release tests only smoke-check them (`run --dry-run`).
30
+
31
+ - New `skaile harness list [--json]` prints every harness `run`, `repl` and `config set harness` take, with a `stability` column (`supported` | `experimental`). `--json` is `[{ id, name, stability }]`.
32
+ - `run --harness <x>`, `repl --harness <x>` and `config set harness <x>` print `experimental: not covered by the release tests` once on stderr for an experimental harness. Exit codes and stdout do not change.
33
+ - `HarnessInfo` (`@skaile/workspaces/types`) gains the optional `stability` field; every built-in harness in `BUILTIN_HARNESS_CATALOG` sets it, so `listHarnesses()` rows carry it. A harness a plugin registers has none (`HarnessTarget` has no such field).
34
+ - New `harnessInfoFor(id)` (`@skaile/workspaces/bridge`): the `harnessInfo` of a built-in harness instance, read from the catalog row, so an instance and `listHarnesses()` cannot differ.
35
+ - Docs: `Experimental harnesses` in the bridge harness page says what smoke only means.
36
+
37
+ - [#1160](https://github.com/skaile-ai/workspaces/pull/1160) [`4a18e49`](https://github.com/skaile-ai/workspaces/commit/4a18e492596b351cc49623d6ac546ba3fe87721b) Thanks [@mortegro](https://github.com/mortegro)! - Lock schema 5: a library is found by a stable `id`, and every source entry keeps its own commit (RDH i-rdh-lock-identity; n06, p893, p2366, p21, p2400, p57).
38
+
39
+ - A library-origin lock entry now records `library.id`, the library's own id on this machine. `library rename`, a rename back, and another library registered under the old name no longer change which library the lock means. A lock without an `id` still finds the library by name, then by remote URL, then by the bytes it holds; the next `install` or `update` that finds it writes the `id`.
40
+ - `sources:` holds one row per source URL and commit of a source asset (a store asset sets a row only for a URL no source asset points at). `install --locked` restores each source asset from its own commit and file hashes, not from the commit the shared source clone is on, so two assets of one source at different commits both restore (a store asset next to a registered source of the same repo no longer fails with `drifted`). The clone's checkout is only read.
41
+ - `skaile remove` deletes a deployed folder only when its own lock entry owns it. When a merged lock holds the same `kind:name` under two publishers, removing one keeps the folder the other entry's bytes are on, and names the owner.
42
+ - `skaile add` no longer moves the other assets of a source to the new commit (ADR 0006: only `update` moves a lock). The new asset gets the source's current commit and the others keep theirs; a pinned sibling no longer blocks the add.
43
+ - A schema 3 or 4 lock is still read by every command, and `install --locked` restores byte-identical files from it. The first command that writes the lock upgrades it to schema 5 in place. A 6.13 or older CLI reads a schema 5 lock as no lock: `install --locked` and `check` report a missing lock (exit 1); `install` and `add` exit 0 and rewrite the lock as schema 4 at the upstream HEAD, dropping `library.id` and the per-entry commits. Upgrade the CLI on every machine that shares the lock.
44
+ - `install` keeps every source entry at its own locked commit and restores it from that commit when the shared clone sits on another; only `update` moves an entry. `run`, `check` and `print-prompt` read an entry whose commit the clone has left from the clone's git objects and stage the verified files under `.skaile/cache/source-commits/<commit>/` (also on `--dry-run`). `update` on a machine that registered a library under another name keeps the lock's library name and id.
45
+
46
+ - [#1160](https://github.com/skaile-ai/workspaces/pull/1160) [`4a18e49`](https://github.com/skaile-ai/workspaces/commit/4a18e492596b351cc49623d6ac546ba3fe87721b) Thanks [@mortegro](https://github.com/mortegro)! - Every harness refuses a `provider/model` whose provider is not registered (ADR 0014, v16-D3).
47
+
48
+ `skaile run --model nosuch/foo` (also `--dry-run`, `resume`, `serve` and `config set model`) now exits 1 with `provider 'nosuch' is not configured: run skaile providers list` for `gemini`, `qwen`, `goose`, `continue`, `echo` and the harnesses of plugins, as it did for `codex`, `claude-sdk` and `omp`. A bare id without `/` is still passed on as typed. The others need a registry entry (`skaile providers add`). `opencode` names providers by its own ids and is not checked until the owner decides.
49
+
50
+ `checkModelProvider` and `checkHarnessModel` from `@skaile/workspaces/bridge` answer the refusal for any harness id; `skaile run` judges `echo` and plugin harnesses by their model prefix in the preflight.
51
+
52
+ - [#1160](https://github.com/skaile-ai/workspaces/pull/1160) [`4a18e49`](https://github.com/skaile-ai/workspaces/commit/4a18e492596b351cc49623d6ac546ba3fe87721b) Thanks [@mortegro](https://github.com/mortegro)! - One prompt assembler for the native agent file and `skaile run` (ADR 0018, decision v5-X3; findings p416, p417, p423, p981):
53
+
54
+ - New `skaile run --dry-run --print-prompt` prints the agent prompt a run assembles on stdout and nothing else, exit 0; `--json` wraps it as `{agent, harness, prompt}`. Without `--dry-run`, or without an agent definition, it exits 1.
55
+ - The body of the native agent file (`.claude/agents/<instance>.md`, `.codex/skaile-agents/<instance>.md`, `.omp/agents/<instance>/SOUL.md`) now equals that printed text. The file now also holds the composed inline blocks (rulesets, prompts) in `composes:` order and the seeds of memory blocks that nothing stores (`memory.scope: none`). Host-backed memory stays dynamic: the file leaves those blocks out, the print shows their seed. A composed item the install cannot read is named at install and added by the runner after the file text. Run `skaile install` to rewrite an older file; until then the runner adds what the file lacks.
56
+ - `skaile run --dry-run` names how each harness carries a composed item (`native file`, `native file (runner adds it when the file lacks it)`, `runner only`, `not sent`) instead of `system prompt` for all. The harness docs table of what each harness carries is generated from the same list.
57
+ - `core` exports `assembleAgent`, `AGENT_PROMPT_CARRIERS`, `renderAgentPromptCarrierTable` and `modelForHarness`; the Claude model alias map is applied only in `modelForHarness` (p981). `buildRunnerAgentSections` takes `{ harness, nativeFile }` instead of `{ includeSoul }`.
58
+ - New subpath export `@skaile/workspaces/runner/composition-content` (the composition content source and `resolveBinding`), so the install step bakes a composed block with the loader `skaile run` uses; a ruleset pinned in the lock or held by a registered library is baked like a local one. `installAgent`, `installAgentInstances`, `deployAsset`, `deployAll`, `diffDeployedAgent` and `prepareAgentRender` of `asset-manager` now return a promise.
59
+
60
+ - [#1160](https://github.com/skaile-ai/workspaces/pull/1160) [`4a18e49`](https://github.com/skaile-ai/workspaces/commit/4a18e492596b351cc49623d6ac546ba3fe87721b) Thanks [@mortegro](https://github.com/mortegro)! - One repository is one source, however it is spelled (RDH i-rdh-repo-identity; p321, p499, p722, p855, p1890, p1993).
61
+
62
+ - `skaile source add` of a repository that is registered under another spelling (`.git`, a trailing slash, `git@host:o/r`, `ssh://`, `http://`, upper case on GitHub) exits 1 and names the registered spelling: `"<given>" is the same repository as already-registered "<registered>"`. Before, `ssh://`, `http://` and upper-case spellings registered a second entry and a second clone. The identical string and the spellings of a local repository (path, symlink, `file://`) behave as before.
63
+ - `source add --publisher B` for the other spelling of a source registered as A is refused, as for the exact spelling. `source add` and `library init --git` of a remote a registered library or source already holds are refused for every spelling, also a symlinked or `file://` one.
64
+ - A project that declares a repository under another spelling than the first one (a symlinked path, say) now sees its clone in `search --local`, and `add` and `search` name the same version. `check`, `outdated` and `source sync` no longer call a clone whose `origin` is another spelling of the same repository "another repository".
65
+ - New `repoIdentity(url)` and `sameRepo(a, b)` in `@skaile/workspaces/core`. They replace `normalizeRepoUrl` (`@skaile/workspaces/asset-manager`), `isSameRemote` (`@skaile/workspaces/core`) and the compares in `source add` and the runner.
66
+ - The libraries table has a `scope` column (`machine` or `project`). The clone of a source is `project`; every other library is `machine`.
67
+
68
+ ### Patch Changes
69
+
70
+ - [#1160](https://github.com/skaile-ai/workspaces/pull/1160) [`4a18e49`](https://github.com/skaile-ai/workspaces/commit/4a18e492596b351cc49623d6ac546ba3fe87721b) Thanks [@mortegro](https://github.com/mortegro)! - internal: asset-manager split into modules, no behaviour change.
71
+
72
+ `asset-manager/src/index.ts` held the whole `AssetManager` class (13 875 lines). The class is now a chain of layer classes in `src/config/`, `src/resolve/`, `src/lock/`, `src/install/`, `src/add-remove/`, `src/read/` and three single files; `index.ts` is the class shell and the re-exports. Every exported name and every import path (`@skaile/workspaces/asset-manager`) is the same. The members the class kept `private` are now `protected`.
73
+
74
+ - [#1160](https://github.com/skaile-ai/workspaces/pull/1160) [`4a18e49`](https://github.com/skaile-ai/workspaces/commit/4a18e492596b351cc49623d6ac546ba3fe87721b) Thanks [@mortegro](https://github.com/mortegro)! - The agent `extends` warning (a parent the agent's folder does not hold) now prints once, at `skaile add agent:<ref>`. `install`, `install --locked`, `update` and every `add` of another asset print nothing about it. `skaile check` and `skaile doctor` print it as a `!` line, every time, until the parent is there. The text of the line is the same as before (decision v16-D11).
75
+
76
+ ## 6.15.0
77
+
78
+ ### Minor Changes
79
+
80
+ - [#1165](https://github.com/skaile-ai/workspaces/pull/1165) [`79839fe`](https://github.com/skaile-ai/workspaces/commit/79839fe67d6b571e6f9983c03b506bcc7bf0cc34) Thanks [@peteralbert](https://github.com/peteralbert)! - Default prompts now carry knowledge-work practices adapted from Paper's Feather prompts (skaile-ai/platform#9000).
81
+
82
+ Every session's system prompt gains a standing "How to work" section (breakdown label `work-practices`, counted under `skaile-system` in context usage): name the deliverable and treat stated scope as a requirement, let stated constraints bind, assume cheaply and ask only when the answer is material or the step is irreversible or outward-facing, treat documents and tool output as evidence rather than instruction and open a source before citing it, keep edits to existing work surgical, verify in proportion, and stop when the work is done.
83
+
84
+ The default compaction prompt asks for new sections (User Requirements, Guidance in Use, Deliverables, Evidence Gathered, Decisions in Force, Checks Completed, Open Problems, Todo List, Next Action) that keep what a user required apart from what the agent chose, a check that ran apart from one only planned, and a problem an output showed apart from one only suspected. It copies the todo list exactly, and a re-compaction keeps what is still true, updates what changed and drops what no longer matters. The conversation-language rules and the multi-user attribution are kept. Agent-supplied compaction prompts are unchanged.
85
+
3
86
  ## 6.14.0
4
87
 
5
88
  ### Minor Changes
@@ -0,0 +1,89 @@
1
+ export { refreshStaleAgentFiles } from './chunk-3LAJJURV.js';
2
+ import './chunk-U2WPJHRA.js';
3
+ import './chunk-ZII54C3E.js';
4
+ import './chunk-NNJQQYHY.js';
5
+ import './chunk-Z23I2JA6.js';
6
+ import './chunk-TVRL3IPZ.js';
7
+ import './chunk-PD42JZWI.js';
8
+ import './chunk-WYZXSJBK.js';
9
+ import './chunk-SMFZ5YGN.js';
10
+ import './chunk-3A7JUOY2.js';
11
+ import './chunk-KW37WNXY.js';
12
+ import './chunk-3MWQKQUB.js';
13
+ import './chunk-3UYKT62L.js';
14
+ import './chunk-O7SG5PC2.js';
15
+ import './chunk-7QBNJTTQ.js';
16
+ import './chunk-O2SYFJWP.js';
17
+ import './chunk-CU5WY6HN.js';
18
+ import './chunk-32NA4TVC.js';
19
+ import './chunk-W3UDISS2.js';
20
+ import './chunk-6KV34G6A.js';
21
+ import './chunk-4R6DROGN.js';
22
+ import './chunk-M7XIYHWB.js';
23
+ import './chunk-SFBLZOV5.js';
24
+ import './chunk-QUIK7L3Z.js';
25
+ import './chunk-6HTN2UIJ.js';
26
+ import './chunk-H3PY5DFL.js';
27
+ import './chunk-PRB67LCK.js';
28
+ import './chunk-2SSG5B24.js';
29
+ import './chunk-OD4N5O7V.js';
30
+ import './chunk-72DYHOO2.js';
31
+ import './chunk-5KSGZP3E.js';
32
+ import './chunk-7EKQDY2T.js';
33
+ import './chunk-HXST2IYJ.js';
34
+ import './chunk-U7EZ2WSC.js';
35
+ import './chunk-VFEZUSB6.js';
36
+ import './chunk-NBAGV6L2.js';
37
+ import './chunk-PPSSDUN6.js';
38
+ import './chunk-YKD2MYLU.js';
39
+ import './chunk-5DE3DGVR.js';
40
+ import './chunk-7DN6JKP2.js';
41
+ import './chunk-NAQXDTF3.js';
42
+ import './chunk-S3UOZBGE.js';
43
+ import './chunk-G5SUWZEU.js';
44
+ import './chunk-EGKCKWWE.js';
45
+ import './chunk-6UP2EDFN.js';
46
+ import './chunk-IFGTRL2I.js';
47
+ import './chunk-2ZDZJ7XQ.js';
48
+ import './chunk-WD3L5QSU.js';
49
+ import './chunk-7RGTAEG6.js';
50
+ import './chunk-JPV4WE5L.js';
51
+ import './chunk-2JUCWMIS.js';
52
+ import './chunk-ISHJITXJ.js';
53
+ import './chunk-LNFKL23K.js';
54
+ import './chunk-JRN5QF4C.js';
55
+ import './chunk-NUELZWCF.js';
56
+ import './chunk-MG6QD7GE.js';
57
+ import './chunk-2PJYJPDE.js';
58
+ import './chunk-PKE3PXOK.js';
59
+ import './chunk-4ZNKEDYH.js';
60
+ import './chunk-RPRMD7XV.js';
61
+ import './chunk-QUPZKTF3.js';
62
+ import './chunk-ZQPBYLCS.js';
63
+ import './chunk-F3D25RGM.js';
64
+ import './chunk-3TXEJN4W.js';
65
+ import './chunk-LKBRBVVS.js';
66
+ import './chunk-UQ6LFBPZ.js';
67
+ import './chunk-IG4YQ7ER.js';
68
+ import './chunk-U7P22GEB.js';
69
+ import './chunk-4GY63JU6.js';
70
+ import './chunk-ETGC2MEM.js';
71
+ import './chunk-5KRMNUL4.js';
72
+ import './chunk-C5HFK34M.js';
73
+ import './chunk-MWXYN6NY.js';
74
+ import './chunk-BRAOB37W.js';
75
+ import './chunk-L5VSIPQD.js';
76
+ import './chunk-VTETQCR6.js';
77
+ import './chunk-PMXTBWFD.js';
78
+ import './chunk-2MTRRK37.js';
79
+ import './chunk-RVRB27AN.js';
80
+ import './chunk-HW4BDJPC.js';
81
+ import './chunk-LCXQ4LVP.js';
82
+ import './chunk-VSX2G7LA.js';
83
+ import './chunk-RXGPFAMN.js';
84
+ import './chunk-RZL4TOK3.js';
85
+ import './chunk-C3CAXQMA.js';
86
+ import './chunk-BOFL7GIF.js';
87
+ import './chunk-NSBPE2FW.js';
88
+ //# sourceMappingURL=agent-file-refresh-76NNFB4W.js.map
89
+ //# sourceMappingURL=agent-file-refresh-76NNFB4W.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-file-refresh-76NNFB4W.js"}
package/dist/ai-sdk.js CHANGED
@@ -1,18 +1,19 @@
1
- import { loadMergedProviderRegistry } from './chunk-CG63XGVV.js';
1
+ import { loadMergedProviderRegistry } from './chunk-EGKCKWWE.js';
2
2
  import { buildCredentialHeaders } from './chunk-6UP2EDFN.js';
3
- import { installCommandFor } from './chunk-MEU2HHGV.js';
3
+ import { installCommandFor } from './chunk-U7P22GEB.js';
4
4
  import './chunk-4GY63JU6.js';
5
- import './chunk-CJO3XKO7.js';
5
+ import './chunk-ETGC2MEM.js';
6
6
  import './chunk-5KRMNUL4.js';
7
7
  import './chunk-C5HFK34M.js';
8
8
  import './chunk-MWXYN6NY.js';
9
- import './chunk-BNLXZXZN.js';
9
+ import './chunk-BRAOB37W.js';
10
10
  import './chunk-L5VSIPQD.js';
11
11
  import './chunk-VTETQCR6.js';
12
- import './chunk-MS2IXLTC.js';
13
- import './chunk-VS6XC5JE.js';
12
+ import './chunk-PMXTBWFD.js';
13
+ import './chunk-2MTRRK37.js';
14
14
  import './chunk-RVRB27AN.js';
15
- import './chunk-7HRZACI4.js';
15
+ import './chunk-HW4BDJPC.js';
16
+ import './chunk-LCXQ4LVP.js';
16
17
  import { resolveCredential } from './chunk-VSX2G7LA.js';
17
18
  import { parseModelRef, registryEntries, isEntryEnabled, normalizeEntryBaseUrl, resolveEntryBaseUrl, normalizeAnthropicBaseUrl } from './chunk-RXGPFAMN.js';
18
19
  import './chunk-RZL4TOK3.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../bridge/src/ai-sdk.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAM,yBAAA,GAA4B,0BAAA;AAuClC,eAAsB,oBAAA,CACpB,QAAA,EACA,IAAA,GAAoC,EAAC,EACL;AAChC,EAAA,MAAM,EAAE,MAAA,EAAQ,WAAA,EAAY,GAAI,0BAAA,CAA2B;AAAA,IACzD,UAAA,EAAY,IAAA,CAAK,UAAA,IAAc,OAAA,CAAQ,GAAA;AAAI,GAC5C,CAAA;AACD,EAAA,MAAM,MAAA,GAAS,YACZ,MAAA,CAAO,CAAC,MAAM,CAAA,CAAE,QAAA,KAAa,OAAO,CAAA,CACpC,GAAA,CAAI,CAAC,MAAO,CAAA,CAAE,IAAA,GAAO,GAAG,CAAA,CAAE,IAAI,KAAK,CAAA,CAAE,OAAO,CAAA,CAAA,GAAK,CAAA,CAAE,OAAQ,CAAA;AAC9D,EAAA,IAAI,MAAA,CAAO,MAAA,GAAS,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,CAAA,oBAAA,EAAuB,MAAA,CAAO,IAAA,CAAK,IAAI,CAAC,CAAA,CAAE,CAAA;AAEjF,EAAA,MAAM,GAAA,GAAM,aAAA,CAAc,QAAA,EAAU,MAAA,EAAQ,KAAK,KAAK,CAAA;AACtD,EAAA,IAAI,CAAC,GAAA,EAAK;AACR,IAAA,MAAM,IAAI,KAAA;AAAA,MACR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O,gBAAgB,CAAA;AAAA,QAC7B,gBAAA;AAAA,QACA,UAAA;AAAA,QACA,OAAA;AAAA,QACA;AAAA,OACF;AAGA,MAAA,OAAO,aAAa,EAAE,OAAA,EAAS,QAAQ,MAAA,IAAU,yBAAA,EAA2B,SAAS,CAAA;AAAA,QACnF;AAAA,OACF;AAAA,IACF;AAAA,IACA,KAAK,oBAAA,EAAsB;AACzB,MAAA,MAAM,EAAE,sBAAA,EAAuB,GAAI,MAAM,eAAA;AAAA,QACvC,MAAM,OAAO,2BAA2B,CAAA;AAAA,QACxC,2BAAA;AAAA,QACA,UAAA;AAAA,QACA,OAAA;AAAA,QACA;AAAA,OACF;AAEA,MAAA,OAAO,sBAAA,CAAuB;AAAA,QAC5B,IAAA,EAAM,UAAA;AAAA,QACN,OAAA;AAAA,QACA,MAAA,EAAQ,MAAA;AAAA,QACR;AAAA,OACD,CAAA,CAAE,SAAA,CAAU,OAAO,CAAA;AAAA,IACtB;AAAA,IACA;AACE,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAA,UAAA,EAAa,UAAU,CAAA,YAAA,EAAe,OAAO,CAAA,sFAAA;AAAA,OAC/C;AAAA;AAEN","file":"ai-sdk.js","sourcesContent":["/**\n * `@skaile/workspaces/ai-sdk` — a provider-registry selector as a Vercel AI SDK\n * `LanguageModel`.\n *\n * Any AI-SDK host (a Nuxt route, a script) names a model the way the CLI does —\n * `<providerId>/<modelId>` or a bare model id — and gets a model object wired\n * to the merged `providers.yml` registry: endpoint, headers and credential\n * (`env:` refs read at call time). The provider SDKs (`@ai-sdk/anthropic`,\n * `@ai-sdk/openai`, `@ai-sdk/openai-compatible`) are optional peers, loaded\n * only for the surface the selected entry speaks.\n */\n\nimport {\n type AIProviderLlmEntry,\n installCommandFor,\n isEntryEnabled,\n normalizeAnthropicBaseUrl,\n normalizeEntryBaseUrl,\n parseModelRef,\n registryEntries,\n resolveCredential,\n resolveEntryBaseUrl,\n} from \"@skaile/workspaces/core\";\nimport type { LanguageModel } from \"ai\";\nimport { buildCredentialHeaders } from \"./provider-catalog.js\";\nimport { loadMergedProviderRegistry } from \"./provider-registry-load.js\";\n\n/**\n * Passed as the SDK `apiKey` where the entry carries no key, so the SDK never\n * falls back to an ambient `OPENAI_API_KEY` / `ANTHROPIC_API_KEY`.\n */\nconst NO_CREDENTIAL_PLACEHOLDER = \"no-credential-configured\";\n\n/** A model object (never the bare-string gateway selector `LanguageModel` also admits). */\ntype ModelObject = Exclude<LanguageModel, string>;\n\n/** The result of {@link resolveLanguageModel}. */\nexport interface ResolvedLanguageModel {\n /** The AI SDK model, ready for `streamText` / `generateText` / `wrapLanguageModel`. */\n model: ModelObject;\n /** Registry entry the selector routed to. */\n providerId: string;\n /** Provider-side model id the request carries (`model_map` applied). */\n modelId: string;\n /** Endpoint the model talks to; for `anthropic-messages` the host root without `/v1`. */\n baseUrl: string;\n /** The role name, when the selector was `@role`. */\n role?: string;\n /** Non-fatal notes from resolving the selector (a dangling role, …). */\n warnings: string[];\n}\n\nexport interface ResolveLanguageModelOptions {\n /** Project whose `.skaile/providers.yml` is the workspace layer. Default: `process.cwd()`. */\n projectDir?: string;\n /** Where `env:` credential references are read from. Default: `process.env`. */\n env?: Record<string, string | undefined>;\n /**\n * Role → model-ref map `@role` selectors resolve against (the session\n * config's `roles`). Without it every `@role` selector fails.\n */\n roles?: Record<string, string>;\n}\n\n/**\n * The AI SDK model for `selector`, or an error naming the fix. Throws when the\n * registry has errors, no entry matches, the credential is unresolved, the\n * entry's surface has no AI SDK factory, or the provider SDK it needs is not\n * installed.\n */\nexport async function resolveLanguageModel(\n selector: string,\n opts: ResolveLanguageModelOptions = {},\n): Promise<ResolvedLanguageModel> {\n const { merged, diagnostics } = loadMergedProviderRegistry({\n projectDir: opts.projectDir ?? process.cwd(),\n });\n const errors = diagnostics\n .filter((d) => d.severity === \"error\")\n .map((d) => (d.path ? `${d.path}: ${d.message}` : d.message));\n if (errors.length > 0) throw new Error(`providers registry: ${errors.join(\"; \")}`);\n\n const ref = parseModelRef(selector, merged, opts.roles);\n if (!ref) {\n throw new Error(\n `no provider for '${selector}': run \\`skaile providers add openrouter --credential env:OPENROUTER_API_KEY --workspace\\``,\n );\n }\n const providerId = ref.providerId;\n const warnings = [...ref.warnings];\n // `<x>/<y>` where `<x>` is no entry and no entry maps the whole string: `parseModelRef` took the\n // first entry only because something has to carry the id. That would send the credential to an\n // entry the caller never named (a typo'd provider id), so it is refused for every registry, as\n // the model endpoint of `serve` does (404). A model of an open entry is named\n // `<entry>/<id>` (`openrouter/meta-llama/x`). A bare id (no `/`) goes to the first entry.\n const slash = ref.modelId?.indexOf(\"/\") ?? -1;\n const vendorHead = ref.fallback && slash > 0 ? ref.modelId?.slice(0, slash) : undefined;\n if (vendorHead) {\n const llm = registryEntries(merged).filter(\n (pair): pair is [string, AIProviderLlmEntry] =>\n pair[1].kind === \"llm\" && isEntryEnabled(pair[1]),\n );\n throw new Error(\n `'${vendorHead}' is not a provider of this registry (providers: ${llm.map(([id]) => id).join(\", \") || \"none\"}). ` +\n `Write <provider>/<model> with one of them; a model id that contains a slash goes after the provider id (<provider>/${ref.modelId}).`,\n );\n }\n const entry = merged.providers[providerId];\n if (!entry || entry.kind !== \"llm\") {\n throw new Error(`provider '${providerId}' is not an llm entry`);\n }\n const modelId = ref.providerModelId ?? ref.modelId;\n if (!modelId) {\n throw new Error(\n `'${selector}' names no model${ref.warnings.length > 0 ? ` (${ref.warnings.join(\"; \")})` : \"\"}`,\n );\n }\n const baseUrl = normalizeEntryBaseUrl(resolveEntryBaseUrl(entry), entry.surface);\n if (!baseUrl) throw new Error(`provider '${providerId}' has no base_url`);\n const credential = resolveCredential(entry, { env: opts.env });\n if (credential.error) throw new Error(`provider '${providerId}': ${credential.error}`);\n\n const model = await createModel(\n entry,\n providerId,\n modelId,\n baseUrl,\n credential.value,\n opts.projectDir ?? process.cwd(),\n );\n return {\n model,\n providerId,\n modelId,\n baseUrl,\n ...(ref.role !== undefined ? { role: ref.role } : {}),\n warnings,\n };\n}\n\n/** `import(pkg)` with a missing-package error that names the package and the surface. */\nasync function loadProviderSdk<T>(\n load: () => Promise<T>,\n pkg: string,\n providerId: string,\n surface: string,\n projectDir: string,\n): Promise<T> {\n try {\n return await load();\n } catch (cause) {\n throw new Error(\n `provider '${providerId}' needs ${pkg} installed (surface '${surface}'). ` +\n `Run in the project: ${installCommandFor(pkg, projectDir)}`,\n { cause },\n );\n }\n}\n\nasync function createModel(\n entry: AIProviderLlmEntry,\n providerId: string,\n modelId: string,\n baseURL: string,\n secret: string | undefined,\n projectDir: string,\n): Promise<ModelObject> {\n // Same merge as model discovery (`models.ts`): static headers, then the\n // credential carrier the preset / credential kind names.\n const credentialHeaders = buildCredentialHeaders(entry, secret);\n const headers = { ...entry.headers, ...credentialHeaders };\n const bearer = credentialHeaders.Authorization !== undefined ? secret : undefined;\n const surface = entry.surface ?? \"openai-completions\";\n switch (surface) {\n case \"anthropic-messages\": {\n const { createAnthropic } = await loadProviderSdk(\n () => import(\"@ai-sdk/anthropic\"),\n \"@ai-sdk/anthropic\",\n providerId,\n surface,\n projectDir,\n );\n // `@ai-sdk/anthropic` wants the versioned base; the registry stores the host root.\n // Bearer credentials go through `authToken` (the SDK's only `Authorization` path);\n // everything else through `apiKey`, with a placeholder when the entry carries none so\n // the SDK never reads `ANTHROPIC_API_KEY` from the process environment.\n return createAnthropic({\n baseURL: `${normalizeAnthropicBaseUrl(baseURL) ?? baseURL}/v1`,\n ...(bearer !== undefined\n ? { authToken: bearer }\n : { apiKey: credentialHeaders[\"x-api-key\"] ?? NO_CREDENTIAL_PLACEHOLDER }),\n headers,\n })(modelId);\n }\n case \"openai-responses\": {\n const { createOpenAI } = await loadProviderSdk(\n () => import(\"@ai-sdk/openai\"),\n \"@ai-sdk/openai\",\n providerId,\n surface,\n projectDir,\n );\n // A placeholder `apiKey` keeps the SDK off `OPENAI_API_KEY`; the real credential\n // header (when any) is in `headers`, which the SDK applies last.\n return createOpenAI({ baseURL, apiKey: bearer ?? NO_CREDENTIAL_PLACEHOLDER, headers })(\n modelId,\n );\n }\n case \"openai-completions\": {\n const { createOpenAICompatible } = await loadProviderSdk(\n () => import(\"@ai-sdk/openai-compatible\"),\n \"@ai-sdk/openai-compatible\",\n providerId,\n surface,\n projectDir,\n );\n // No env fallback in this SDK: an absent `apiKey` sends no `Authorization` header.\n return createOpenAICompatible({\n name: providerId,\n baseURL,\n apiKey: bearer,\n headers,\n }).chatModel(modelId);\n }\n default:\n throw new Error(\n `provider '${providerId}': surface '${surface}' has no AI SDK factory yet (openai-completions, openai-responses, anthropic-messages)`,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../bridge/src/ai-sdk.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAM,yBAAA,GAA4B,0BAAA;AAuClC,eAAsB,oBAAA,CACpB,QAAA,EACA,IAAA,GAAoC,EAAC,EACL;AAChC,EAAA,MAAM,EAAE,MAAA,EAAQ,WAAA,EAAY,GAAI,0BAAA,CAA2B;AAAA,IACzD,UAAA,EAAY,IAAA,CAAK,UAAA,IAAc,OAAA,CAAQ,GAAA;AAAI,GAC5C,CAAA;AACD,EAAA,MAAM,MAAA,GAAS,YACZ,MAAA,CAAO,CAAC,MAAM,CAAA,CAAE,QAAA,KAAa,OAAO,CAAA,CACpC,GAAA,CAAI,CAAC,MAAO,CAAA,CAAE,IAAA,GAAO,GAAG,CAAA,CAAE,IAAI,KAAK,CAAA,CAAE,OAAO,CAAA,CAAA,GAAK,CAAA,CAAE,OAAQ,CAAA;AAC9D,EAAA,IAAI,MAAA,CAAO,MAAA,GAAS,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,CAAA,oBAAA,EAAuB,MAAA,CAAO,IAAA,CAAK,IAAI,CAAC,CAAA,CAAE,CAAA;AAEjF,EAAA,MAAM,GAAA,GAAM,aAAA,CAAc,QAAA,EAAU,MAAA,EAAQ,KAAK,KAAK,CAAA;AACtD,EAAA,IAAI,CAAC,GAAA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AAa,GAAI,MAAM,eAAA;AAAA,QAC7B,MAAM,OAAO,gBAAgB,CAAA;AAAA,QAC7B,gBAAA;AAAA,QACA,UAAA;AAAA,QACA,OAAA;AAAA,QACA;AAAA,OACF;AAGA,MAAA,OAAO,aAAa,EAAE,OAAA,EAAS,QAAQ,MAAA,IAAU,yBAAA,EAA2B,SAAS,CAAA;AAAA,QACnF;AAAA,OACF;AAAA,IACF;AAAA,IACA,KAAK,oBAAA,EAAsB;AACzB,MAAA,MAAM,EAAE,sBAAA,EAAuB,GAAI,MAAM,eAAA;AAAA,QACvC,MAAM,OAAO,2BAA2B,CAAA;AAAA,QACxC,2BAAA;AAAA,QACA,UAAA;AAAA,QACA,OAAA;AAAA,QACA;AAAA,OACF;AAEA,MAAA,OAAO,sBAAA,CAAuB;AAAA,QAC5B,IAAA,EAAM,UAAA;AAAA,QACN,OAAA;AAAA,QACA,MAAA,EAAQ,MAAA;AAAA,QACR;AAAA,OACD,CAAA,CAAE,SAAA,CAAU,OAAO,CAAA;AAAA,IACtB;AAAA,IACA;AACE,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAA,UAAA,EAAa,UAAU,CAAA,YAAA,EAAe,OAAO,CAAA,sFAAA;AAAA,OAC/C;AAAA;AAEN","file":"ai-sdk.js","sourcesContent":["/**\n * `@skaile/workspaces/ai-sdk` — a provider-registry selector as a Vercel AI SDK\n * `LanguageModel`.\n *\n * Any AI-SDK host (a Nuxt route, a script) names a model the way the CLI does —\n * `<providerId>/<modelId>` or a bare model id — and gets a model object wired\n * to the merged `providers.yml` registry: endpoint, headers and credential\n * (`env:` refs read at call time). The provider SDKs (`@ai-sdk/anthropic`,\n * `@ai-sdk/openai`, `@ai-sdk/openai-compatible`) are optional peers, loaded\n * only for the surface the selected entry speaks.\n */\n\nimport {\n type AIProviderLlmEntry,\n installCommandFor,\n isEntryEnabled,\n normalizeAnthropicBaseUrl,\n normalizeEntryBaseUrl,\n parseModelRef,\n registryEntries,\n resolveCredential,\n resolveEntryBaseUrl,\n} from \"@skaile/workspaces/core\";\nimport type { LanguageModel } from \"ai\";\nimport { buildCredentialHeaders } from \"./provider-catalog.js\";\nimport { loadMergedProviderRegistry } from \"./provider-registry-load.js\";\n\n/**\n * Passed as the SDK `apiKey` where the entry carries no key, so the SDK never\n * falls back to an ambient `OPENAI_API_KEY` / `ANTHROPIC_API_KEY`.\n */\nconst NO_CREDENTIAL_PLACEHOLDER = \"no-credential-configured\";\n\n/** A model object (never the bare-string gateway selector `LanguageModel` also admits). */\ntype ModelObject = Exclude<LanguageModel, string>;\n\n/** The result of {@link resolveLanguageModel}. */\nexport interface ResolvedLanguageModel {\n /** The AI SDK model, ready for `streamText` / `generateText` / `wrapLanguageModel`. */\n model: ModelObject;\n /** Registry entry the selector routed to. */\n providerId: string;\n /** Provider-side model id the request carries (`model_map` applied). */\n modelId: string;\n /** Endpoint the model talks to; for `anthropic-messages` the host root without `/v1`. */\n baseUrl: string;\n /** The role name, when the selector was `@role`. */\n role?: string;\n /** Non-fatal notes from resolving the selector (a dangling role, …). */\n warnings: string[];\n}\n\nexport interface ResolveLanguageModelOptions {\n /** Project whose `.skaile/providers.yml` is the workspace layer. Default: `process.cwd()`. */\n projectDir?: string;\n /** Where `env:` credential references are read from. Default: `process.env`. */\n env?: Record<string, string | undefined>;\n /**\n * Role → model-ref map `@role` selectors resolve against (the session\n * config's `roles`). Without it every `@role` selector fails.\n */\n roles?: Record<string, string>;\n}\n\n/**\n * The AI SDK model for `selector`, or an error naming the fix. Throws when the\n * registry has errors, no entry matches, the credential is unresolved, the\n * entry's surface has no AI SDK factory, or the provider SDK it needs is not\n * installed.\n */\nexport async function resolveLanguageModel(\n selector: string,\n opts: ResolveLanguageModelOptions = {},\n): Promise<ResolvedLanguageModel> {\n const { merged, diagnostics } = loadMergedProviderRegistry({\n projectDir: opts.projectDir ?? process.cwd(),\n });\n const errors = diagnostics\n .filter((d) => d.severity === \"error\")\n .map((d) => (d.path ? `${d.path}: ${d.message}` : d.message));\n if (errors.length > 0) throw new Error(`providers registry: ${errors.join(\"; \")}`);\n\n const ref = parseModelRef(selector, merged, opts.roles);\n if (!ref) {\n throw new Error(\n `no provider for '${selector}': run \\`skaile providers add openrouter --credential env:OPENROUTER_API_KEY --workspace\\``,\n );\n }\n const providerId = ref.providerId;\n const warnings = [...ref.warnings];\n // `<x>/<y>` where `<x>` is no entry and no entry maps the whole string: `parseModelRef` took the\n // first entry only because something has to carry the id. That would send the credential to an\n // entry the caller never named (a typo'd provider id), so it is refused for every registry, as\n // the model endpoint of `serve` does (404). A model of an open entry is named\n // `<entry>/<id>` (`openrouter/meta-llama/x`). A bare id (no `/`) goes to the first entry.\n const slash = ref.modelId?.indexOf(\"/\") ?? -1;\n const vendorHead = ref.fallback && slash > 0 ? ref.modelId?.slice(0, slash) : undefined;\n if (vendorHead) {\n const llm = registryEntries(merged).filter(\n (pair): pair is [string, AIProviderLlmEntry] =>\n pair[1].kind === \"llm\" && isEntryEnabled(pair[1]),\n );\n throw new Error(\n `'${vendorHead}' is not a provider of this registry (providers: ${llm.map(([id]) => id).join(\", \") || \"none\"}). ` +\n `Write <provider>/<model> with one of them; a model id that contains a slash goes after the provider id (<provider>/${ref.modelId}).`,\n );\n }\n const entry = merged.providers[providerId];\n if (!entry || entry.kind !== \"llm\") {\n throw new Error(`provider '${providerId}' is not an llm entry`);\n }\n const modelId = ref.providerModelId ?? ref.modelId;\n if (!modelId) {\n throw new Error(\n `'${selector}' names no model${ref.warnings.length > 0 ? ` (${ref.warnings.join(\"; \")})` : \"\"}`,\n );\n }\n const baseUrl = normalizeEntryBaseUrl(resolveEntryBaseUrl(entry), entry.surface);\n if (!baseUrl) throw new Error(`provider '${providerId}' has no base_url`);\n const credential = resolveCredential(entry, { env: opts.env });\n if (credential.error) throw new Error(`provider '${providerId}': ${credential.error}`);\n\n const model = await createModel(\n entry,\n providerId,\n modelId,\n baseUrl,\n credential.value,\n opts.projectDir ?? process.cwd(),\n );\n return {\n model,\n providerId,\n modelId,\n baseUrl,\n ...(ref.role !== undefined ? { role: ref.role } : {}),\n warnings,\n };\n}\n\n/** `import(pkg)` with a missing-package error that names the package and the surface. */\nasync function loadProviderSdk<T>(\n load: () => Promise<T>,\n pkg: string,\n providerId: string,\n surface: string,\n projectDir: string,\n): Promise<T> {\n try {\n return await load();\n } catch (cause) {\n throw new Error(\n `provider '${providerId}' needs ${pkg} installed (surface '${surface}'). ` +\n `Run in the project: ${installCommandFor(pkg, projectDir)}`,\n { cause },\n );\n }\n}\n\nasync function createModel(\n entry: AIProviderLlmEntry,\n providerId: string,\n modelId: string,\n baseURL: string,\n secret: string | undefined,\n projectDir: string,\n): Promise<ModelObject> {\n // Same merge as model discovery (`models.ts`): static headers, then the\n // credential carrier the preset / credential kind names.\n const credentialHeaders = buildCredentialHeaders(entry, secret);\n const headers = { ...entry.headers, ...credentialHeaders };\n const bearer = credentialHeaders.Authorization !== undefined ? secret : undefined;\n const surface = entry.surface ?? \"openai-completions\";\n switch (surface) {\n case \"anthropic-messages\": {\n const { createAnthropic } = await loadProviderSdk(\n () => import(\"@ai-sdk/anthropic\"),\n \"@ai-sdk/anthropic\",\n providerId,\n surface,\n projectDir,\n );\n // `@ai-sdk/anthropic` wants the versioned base; the registry stores the host root.\n // Bearer credentials go through `authToken` (the SDK's only `Authorization` path);\n // everything else through `apiKey`, with a placeholder when the entry carries none so\n // the SDK never reads `ANTHROPIC_API_KEY` from the process environment.\n return createAnthropic({\n baseURL: `${normalizeAnthropicBaseUrl(baseURL) ?? baseURL}/v1`,\n ...(bearer !== undefined\n ? { authToken: bearer }\n : { apiKey: credentialHeaders[\"x-api-key\"] ?? NO_CREDENTIAL_PLACEHOLDER }),\n headers,\n })(modelId);\n }\n case \"openai-responses\": {\n const { createOpenAI } = await loadProviderSdk(\n () => import(\"@ai-sdk/openai\"),\n \"@ai-sdk/openai\",\n providerId,\n surface,\n projectDir,\n );\n // A placeholder `apiKey` keeps the SDK off `OPENAI_API_KEY`; the real credential\n // header (when any) is in `headers`, which the SDK applies last.\n return createOpenAI({ baseURL, apiKey: bearer ?? NO_CREDENTIAL_PLACEHOLDER, headers })(\n modelId,\n );\n }\n case \"openai-completions\": {\n const { createOpenAICompatible } = await loadProviderSdk(\n () => import(\"@ai-sdk/openai-compatible\"),\n \"@ai-sdk/openai-compatible\",\n providerId,\n surface,\n projectDir,\n );\n // No env fallback in this SDK: an absent `apiKey` sends no `Authorization` header.\n return createOpenAICompatible({\n name: providerId,\n baseURL,\n apiKey: bearer,\n headers,\n }).chatModel(modelId);\n }\n default:\n throw new Error(\n `provider '${providerId}': surface '${surface}' has no AI SDK factory yet (openai-completions, openai-responses, anthropic-messages)`,\n );\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { PROTOCOL_VERSION_STRING } from '../chunk-DWPQBMCY.js';
1
+ import { PROTOCOL_VERSION_STRING } from '../chunk-JPV4WE5L.js';
2
2
  import '../chunk-NSBPE2FW.js';
3
3
  import * as z from 'zod';
4
4
 
@@ -1,36 +1,38 @@
1
- import { storeNotInstallableReason } from './chunk-J3FJTH3V.js';
2
- import { getKnownKinds } from './chunk-HPQ2WDYC.js';
3
- import './chunk-WDG5IVEA.js';
1
+ import { storeNotInstallableReason } from './chunk-4X5WXQV7.js';
2
+ import { getKnownKinds } from './chunk-U2WPJHRA.js';
3
+ import './chunk-2ZDZJ7XQ.js';
4
4
  import './chunk-7RGTAEG6.js';
5
- import './chunk-7UBCUKJO.js';
6
- import './chunk-7FXOOUOC.js';
7
- import './chunk-DRUAQ7IY.js';
8
- import './chunk-CVUMZTNO.js';
9
- import './chunk-F3D25RGM.js';
10
- import './chunk-3TXEJN4W.js';
5
+ import './chunk-2JUCWMIS.js';
11
6
  import './chunk-ISHJITXJ.js';
12
7
  import './chunk-LNFKL23K.js';
13
8
  import './chunk-JRN5QF4C.js';
14
9
  import './chunk-NUELZWCF.js';
15
- import './chunk-7LJUK5JK.js';
10
+ import './chunk-MG6QD7GE.js';
11
+ import './chunk-2PJYJPDE.js';
16
12
  import './chunk-PKE3PXOK.js';
13
+ import './chunk-4ZNKEDYH.js';
14
+ import './chunk-RPRMD7XV.js';
15
+ import './chunk-QUPZKTF3.js';
16
+ import './chunk-ZQPBYLCS.js';
17
+ import './chunk-F3D25RGM.js';
18
+ import './chunk-3TXEJN4W.js';
17
19
  import './chunk-LKBRBVVS.js';
18
20
  import './chunk-UQ6LFBPZ.js';
19
- import './chunk-7VBD5XUM.js';
20
- import './chunk-LCXQ4LVP.js';
21
- import './chunk-MEU2HHGV.js';
21
+ import './chunk-IG4YQ7ER.js';
22
+ import './chunk-U7P22GEB.js';
22
23
  import './chunk-4GY63JU6.js';
23
- import { factoryAssetRoots } from './chunk-CJO3XKO7.js';
24
+ import { factoryAssetRoots } from './chunk-ETGC2MEM.js';
24
25
  import './chunk-5KRMNUL4.js';
25
26
  import './chunk-C5HFK34M.js';
26
27
  import './chunk-MWXYN6NY.js';
27
- import { scanRepo } from './chunk-BNLXZXZN.js';
28
+ import { scanRepo } from './chunk-BRAOB37W.js';
28
29
  import './chunk-L5VSIPQD.js';
29
30
  import './chunk-VTETQCR6.js';
30
- import './chunk-MS2IXLTC.js';
31
- import { parseRequires } from './chunk-VS6XC5JE.js';
31
+ import './chunk-PMXTBWFD.js';
32
+ import { parseRequires } from './chunk-2MTRRK37.js';
32
33
  import './chunk-RVRB27AN.js';
33
- import './chunk-7HRZACI4.js';
34
+ import './chunk-HW4BDJPC.js';
35
+ import './chunk-LCXQ4LVP.js';
34
36
  import './chunk-VSX2G7LA.js';
35
37
  import './chunk-RXGPFAMN.js';
36
38
  import './chunk-RZL4TOK3.js';
@@ -60,8 +62,8 @@ function libraryEntryOf(asset) {
60
62
  async function libraryAssets() {
61
63
  const notes = [];
62
64
  try {
63
- const { openLibraryManager } = await import('./open-library-I5JHL37T.js');
64
- const { getKindRegistry } = await import('./open-registry-4HNCWOCN.js');
65
+ const { openLibraryManager } = await import('./open-library-FVV6GG4I.js');
66
+ const { getKindRegistry } = await import('./open-registry-VX2BVMS5.js');
65
67
  const { scanAuthoringLibraries } = await import('./library/index.js');
66
68
  const { library: index, close } = await openLibraryManager();
67
69
  try {
@@ -94,7 +96,7 @@ async function libraryAssets() {
94
96
  async function storeAssets(projectDir) {
95
97
  const notes = [];
96
98
  try {
97
- const { resolveCatalogSource } = await import('./open-library-I5JHL37T.js');
99
+ const { resolveCatalogSource } = await import('./open-library-FVV6GG4I.js');
98
100
  const { source, close } = await resolveCatalogSource({ projectDir });
99
101
  try {
100
102
  const assets = (await source.listAssets()).filter(
@@ -175,5 +177,5 @@ async function gatherAssetFeeds(am, projectDir) {
175
177
  }
176
178
 
177
179
  export { gatherAssetFeeds };
178
- //# sourceMappingURL=asset-feeds-DOG5FK7T.js.map
179
- //# sourceMappingURL=asset-feeds-DOG5FK7T.js.map
180
+ //# sourceMappingURL=asset-feeds-ON7FYHHF.js.map
181
+ //# sourceMappingURL=asset-feeds-ON7FYHHF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../cli/src/asset-feeds.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,SAAS,eAAe,KAAA,EAAsC;AAC5D,EAAA,MAAM,EAAE,UAAS,GAAI,KAAA;AACrB,EAAA,MAAM,MAAA,GAAU,SAAS,QAAA,EAAkD,QAAA;AAC3E,EAAA,MAAM,WAAA,GAAc,SAAS,QAAA,IAAY,MAAA;AACzC,EAAA,MAAM,cACJ,OAAO,WAAA,KAAgB,QAAA,GACnB,WAAA,GACA,MAAM,OAAA,CAAQ,WAAW,CAAA,GACvB,WAAA,CAAY,OAAO,CAAC,CAAA,KAAmB,OAAO,CAAA,KAAM,QAAQ,CAAA,GAC5D,MAAA;AACR,EAAA,MAAM,OAAO,QAAA,CAAS,YAAA;AACtB,EAAA,OAAO;AAAA,IACL,MAAM,KAAA,CAAM,IAAA;AAAA,IACZ,MAAM,KAAA,CAAM,IAAA;AAAA,IACZ,aAAa,OAAO,QAAA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,CAAA;AAAA,IAC3F;AACA,IAAA,OAAO,EAAE,SAAS,KAAA,EAAM;AAAA,EAC1B,SAAS,GAAA,EAAK;AACZ,IAAA,KAAA,CAAM,IAAA,CAAK;AAAA,MACT,IAAA,EAAM,SAAA;AAAA,MACN,SAAS,GAAA,YAAe,KAAA,GAAQ,GAAA,CAAI,OAAA,GAAU,OAAO,GAAG;AAAA,KACzD,CAAA;AACD,IAAA,OAAO,EAAE,OAAA,EAAS,EAAC,EAAG,KAAA,EAAM;AAAA,EAC9B;AACF;AAGA,SAAS,GAAA,CAAI,QAAqB,OAAA,EAAwC;AACxE,EAAA,OAAO,QAAQ,GAAA,CAAI,CAAC,WAAW,EAAE,MAAA,EAAQ,OAAM,CAAE,CAAA;AACnD;AASA,eAAsB,gBAAA,CACpB,IACA,UAAA,EAC0B;AAC1B,EAAA,MAAM,CAAC,IAAA,EAAM,KAAK,CAAA,GAAI,MAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,aAAA,EAAc,EAAG,WAAA,CAAY,UAAU,CAAC,CAAC,CAAA;AAClF,EAAA,MAAM,OAAA,GAAU,MAAM,aAAA,EAAc;AACpC,EAAA,MAAM,GAAA,GAAM,MAAM,YAAA,CAAa,EAAE,CAAA;AACjC,EAAA,OAAO;AAAA,IACL,OAAA,EAAS;AAAA,MACP,GAAG,GAAA;AAAA,MACH,GAAG,IAAA,CAAK,OAAA;AAAA,MACR,GAAG,GAAA,CAAI,SAAA,EAAW,OAAA,CAAQ,OAAO,CAAA;AAAA,MACjC,GAAG,GAAA,CAAI,OAAA,EAAS,KAAA,CAAM,OAAO;AAAA,KAC/B;AAAA,IACA,KAAA,EAAO,CAAC,GAAG,IAAA,CAAK,KAAA,EAAO,GAAG,KAAA,CAAM,KAAA,EAAO,GAAG,OAAA,CAAQ,KAAK;AAAA,GACzD;AACF","file":"asset-feeds-ON7FYHHF.js","sourcesContent":["/**\n * asset-feeds.ts — gather installable assets from every feed the manage TUI\n * surfaces.\n *\n * Four feeds, normalized into `CatalogEntry`:\n * - **Project sources** — `skaile.yaml` `sources:` entries (scanned via\n * `AssetManager.search()`; the new `sources:` field is merged into the\n * legacy repositories map in `AssetManager.loadConfig`).\n * - **Local libraries** — user authoring places from `LocalIndex`, read through\n * `scanAuthoringLibraries` (`@skaile/workspaces/library`): the same scan\n * `library index` / `search --local` use, so publishers and refs match them\n * (per-asset `publisher_overrides` honoured), `dev_paths` assets are left out,\n * and a library that fails to scan becomes one note while the rest stay listed.\n * - **Factory assets** — the bundled first-party `factory-assets` tree\n * (`factoryAssetRoots()`), scanned from disk. Always present; no network.\n * - **Remote store** — the configured catalog source when `catalog.url` is\n * not `local`. Failures are non-fatal — they surface as notes.\n */\n\nimport * as path from \"node:path\";\nimport {\n type AssetKind,\n type CatalogEntry,\n factoryAssetRoots,\n parseRequires,\n scanRepo,\n} from \"@skaile/workspaces/core\";\nimport { getKnownKinds } from \"./open-registry.ts\";\nimport { storeNotInstallableReason } from \"./store-addable.ts\";\nimport type { DiscoveredAsset } from \"@skaile/workspaces/discovery\";\n\n/** One non-fatal note returned to the caller for surfacing in the UI. */\nexport interface FeedNote {\n feed: \"sources\" | \"libraries\" | \"store\" | \"factory\";\n message: string;\n}\n\n/**\n * Which feed an asset came from. This is the top-level grouping axis in the\n * manage TUI (\"where is this skill coming from?\") and is intentionally distinct\n * from `publisher` (asset-intrinsic identity): the same publisher can legitimately\n * appear under more than one origin (e.g. a github repo you added as a `source`\n * that is also listed in the remote `store`).\n */\nexport type AssetOrigin = \"source\" | \"library\" | \"factory\" | \"store\";\n\n/** A catalog entry tagged with the feed it was gathered from. */\nexport interface OriginEntry {\n origin: AssetOrigin;\n entry: CatalogEntry;\n /**\n * Second-level grouping label for the manage tree. Defaults (when unset) to the\n * entry's `publisher`; the source feed sets it to the source's short repo name\n * so the Sources band groups by source — \"which repo did this come from\" — not\n * by the asset-intrinsic publisher.\n */\n group?: string;\n}\n\nexport interface AssetFeedResult {\n entries: OriginEntry[];\n notes: FeedNote[];\n}\n\n/**\n * Map one discovered library asset to the `CatalogEntry` the manage rows read.\n * `publisher` is the bare per-asset publisher (what `search --local` prints),\n * `source` the manifest path. `repo` is left unset: it only feeds the Sources-tree\n * org grouping. `requires` / `dependencies` come from the manifest the way the\n * scanner fills them — string `requires:` refs parsed to `{kind, name}`, a bundle's\n * string `dependencies:` list verbatim.\n */\nfunction libraryEntryOf(asset: DiscoveredAsset): CatalogEntry {\n const { manifest } = asset;\n const nested = (manifest.metadata as Record<string, unknown> | undefined)?.requires;\n const rawRequires = manifest.requires ?? nested;\n const requireRefs =\n typeof rawRequires === \"string\"\n ? rawRequires\n : Array.isArray(rawRequires)\n ? rawRequires.filter((r): r is string => typeof r === \"string\")\n : undefined;\n const deps = manifest.dependencies;\n return {\n name: asset.name,\n kind: asset.kind as AssetKind,\n description: typeof manifest.description === \"string\" ? manifest.description : \"\",\n source: asset.manifestPath,\n publisher: asset.publisher,\n ...(asset.plugin ? { plugin: asset.plugin } : {}),\n version: asset.version,\n requires: requireRefs === undefined ? [] : parseRequires({ requires: requireRefs }),\n dependencies:\n asset.kind === \"bundle\" && Array.isArray(deps)\n ? deps.filter((d): d is string => typeof d === \"string\" && d.length > 0)\n : [],\n };\n}\n\n/**\n * Pull assets from local libraries (the authoring places under\n * `~/.skaile/libraries/<name>/`, not the `~/.skaile/cache/sources/` cache) through\n * `scanAuthoringLibraries`, grouped under the bare library name\n * (`group: <name>`) so the manage TUI shows a clean `<name>` band — no\n * `library:` prefix (mirrors the source feed). Plugin grouping (`entry.plugin`)\n * comes from `DiscoveredAsset.plugin`. A library whose scan fails becomes one\n * `FeedNote`; the outer `catch` covers only opening the index.\n */\nasync function libraryAssets(): Promise<{\n entries: OriginEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n // Lazy: the library subpath pulls in SQLite, which the other feeds never need.\n const { openLibraryManager } = await import(\"./open-library.ts\");\n const { getKindRegistry } = await import(\"./open-registry.ts\");\n const { scanAuthoringLibraries } = await import(\"@skaile/workspaces/library\");\n const { library: index, close } = await openLibraryManager();\n try {\n const entries: OriginEntry[] = [];\n for (const scan of await scanAuthoringLibraries(index, getKindRegistry())) {\n if (scan.error !== undefined) {\n notes.push({ feed: \"libraries\", message: `${scan.library.name}: ${scan.error}` });\n continue;\n }\n for (const asset of scan.assets) {\n entries.push({\n origin: \"library\",\n entry: libraryEntryOf(asset),\n group: scan.library.name,\n });\n }\n }\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n notes.push({\n feed: \"libraries\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/**\n * Pull a (best-effort) snapshot of the connected remote store catalog.\n *\n * - Returns no entries when the resolved catalog is local-only or the host\n * is unreachable (the failure becomes a note, not an exception).\n * - Maps `CatalogAsset` → `CatalogEntry`, carrying `publisher`, `repo`, and\n * `category` straight through and using `source = \"store://<id>\"`; per-file\n * `source` paths are not available for remote assets so the canonical ref is\n * a stable placeholder.\n */\nasync function storeAssets(projectDir: string): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const { resolveCatalogSource } = await import(\"./open-library.ts\");\n const { source, close } = await resolveCatalogSource({ projectDir });\n try {\n // The store lists only what `skaile add` can install (see store-addable.ts).\n const assets = (await source.listAssets()).filter(\n (a) => storeNotInstallableReason(a) === undefined,\n );\n const entries: CatalogEntry[] = assets.map((a) => ({\n name: a.name,\n kind: (a.kind as AssetKind) ?? \"skill\",\n description: a.description ?? \"\",\n source: `store://${a.id}`,\n publisher: a.publisher,\n repo: a.repo,\n plugin: a.plugin,\n category: a.category,\n version: a.version,\n requires: [],\n dependencies: [],\n }));\n return { entries, notes };\n } finally {\n close();\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err);\n // Local-only catalog throws a recognizable message — silence it; absence\n // is the user's choice, not an error.\n if (!/local/i.test(msg)) {\n notes.push({ feed: \"store\", message: msg });\n }\n return { entries: [], notes };\n }\n}\n\n/** The slice of `AssetManager` the source feed needs (kept narrow for tests). */\ninterface AssetManagerLike {\n search: () => Promise<CatalogEntry[]>;\n searchRepoRoots: () => { repoName: string; root: string }[];\n}\n\n/**\n * Project-source feed: leans on `AssetManager.search()`, which merges\n * `skaile.yaml`'s `sources:` field into the repositories map. Plugin grouping\n * (`entry.plugin`) is stamped by the scanner, so entries pass through as-is.\n */\nasync function sourceAssets(am: AssetManagerLike): Promise<OriginEntry[]> {\n // The bundled factory tree is injected into the repositories map as an implicit\n // source, so `am.search()` returns it too. It has its own `factory` origin band,\n // so drop it here — otherwise the same first-party skills list twice under Sources.\n const factoryPrefixes = factoryAssetRoots().map((r) => (r.endsWith(path.sep) ? r : r + path.sep));\n const isFactoryPath = (p: string) =>\n factoryPrefixes.some((fp) => p === fp.slice(0, -1) || p.startsWith(fp));\n\n const all = (await am.search()).filter((e) => !isFactoryPath(e.source));\n const entries: OriginEntry[] = [];\n // Group each source's entries under the source node (its short repo name), not\n // the publisher: under Sources the navigational question is \"which repo did\n // this come from\". Each entry's `source` (absolute manifest path) lives under\n // exactly one declared root, so group by prefix. The cache slug is\n // URL-keyed `github.com/<org>/<repo>` — take the trailing segment.\n for (const { repoName, root } of am.searchRepoRoots()) {\n if (isFactoryPath(root)) continue;\n const prefix = root.endsWith(path.sep) ? root : root + path.sep;\n const owned = all.filter((e) => e.source === root || e.source.startsWith(prefix));\n if (owned.length === 0) continue;\n const sourceName = repoName.split(\"/\").pop() || repoName;\n for (const entry of owned) entries.push({ origin: \"source\", entry, group: sourceName });\n }\n return entries;\n}\n\n/**\n * Factory-asset feed: scan the bundled first-party `factory-assets` tree(s)\n * resolved by `factoryAssetRoots()` (the `SKAILE_FACTORY_ASSETS_DIR` override\n * layer ahead of the bundled tree). Local disk only, no network — the entries are\n * the built-in skills / connectors / bundles that ship with `@skaile/workspaces`.\n * `factoryAssetRoots()` already dedupes, so the env override pointing at the\n * bundled dir collapses to one root.\n */\nasync function factoryAssets(): Promise<{\n entries: CatalogEntry[];\n notes: FeedNote[];\n}> {\n const notes: FeedNote[] = [];\n try {\n const entries: CatalogEntry[] = [];\n for (const root of factoryAssetRoots()) {\n entries.push(...(await scanRepo(root, \"skaile-factory\", { knownKinds: getKnownKinds() })));\n }\n return { entries, notes };\n } catch (err) {\n notes.push({\n feed: \"factory\",\n message: err instanceof Error ? err.message : String(err),\n });\n return { entries: [], notes };\n }\n}\n\n/** Tag a flat entry list with a single origin. */\nfunction tag(origin: AssetOrigin, entries: CatalogEntry[]): OriginEntry[] {\n return entries.map((entry) => ({ origin, entry }));\n}\n\n/**\n * Run all feeds and return a single normalized result.\n *\n * Feeds run in parallel where possible — the store fetch is the slow one\n * (one HTTP call) and is fired alongside the local library walk. The factory\n * scan is local disk only, so it runs inline.\n */\nexport async function gatherAssetFeeds(\n am: AssetManagerLike,\n projectDir: string,\n): Promise<AssetFeedResult> {\n const [libs, store] = await Promise.all([libraryAssets(), storeAssets(projectDir)]);\n const factory = await factoryAssets();\n const src = await sourceAssets(am);\n return {\n entries: [\n ...src,\n ...libs.entries,\n ...tag(\"factory\", factory.entries),\n ...tag(\"store\", store.entries),\n ],\n notes: [...libs.notes, ...store.notes, ...factory.notes],\n };\n}\n"]}
@@ -1,17 +1,18 @@
1
- export { WORKSPACE_MOUNT_ENV_VAR, deployAll, deployCatalogEntry, findAiAssetsRoot, isUnderWorkspaceMount, resolveFlowSkills, undeployCatalogEntry, workspaceMountDirs } from '../chunk-LQWOU7S2.js';
2
- import '../chunk-MEU2HHGV.js';
1
+ export { WORKSPACE_MOUNT_ENV_VAR, deployAll, deployCatalogEntry, findAiAssetsRoot, isUnderWorkspaceMount, resolveFlowSkills, undeployCatalogEntry, workspaceMountDirs } from '../chunk-SFBLZOV5.js';
2
+ import '../chunk-U7P22GEB.js';
3
3
  import '../chunk-4GY63JU6.js';
4
- import '../chunk-CJO3XKO7.js';
4
+ import '../chunk-ETGC2MEM.js';
5
5
  import '../chunk-5KRMNUL4.js';
6
6
  import '../chunk-C5HFK34M.js';
7
7
  import '../chunk-MWXYN6NY.js';
8
- import '../chunk-BNLXZXZN.js';
8
+ import '../chunk-BRAOB37W.js';
9
9
  import '../chunk-L5VSIPQD.js';
10
10
  import '../chunk-VTETQCR6.js';
11
- import '../chunk-MS2IXLTC.js';
12
- import '../chunk-VS6XC5JE.js';
11
+ import '../chunk-PMXTBWFD.js';
12
+ import '../chunk-2MTRRK37.js';
13
13
  import '../chunk-RVRB27AN.js';
14
- import '../chunk-7HRZACI4.js';
14
+ import '../chunk-HW4BDJPC.js';
15
+ import '../chunk-LCXQ4LVP.js';
15
16
  import '../chunk-VSX2G7LA.js';
16
17
  import '../chunk-RXGPFAMN.js';
17
18
  import '../chunk-RZL4TOK3.js';
@@ -1,17 +1,18 @@
1
1
  export { appendHistory, clearHistory, getRecentHistory, loadHistory } from '../chunk-LKBRBVVS.js';
2
- import '../chunk-MEU2HHGV.js';
2
+ import '../chunk-U7P22GEB.js';
3
3
  import '../chunk-4GY63JU6.js';
4
- import '../chunk-CJO3XKO7.js';
4
+ import '../chunk-ETGC2MEM.js';
5
5
  import '../chunk-5KRMNUL4.js';
6
6
  import '../chunk-C5HFK34M.js';
7
7
  import '../chunk-MWXYN6NY.js';
8
- import '../chunk-BNLXZXZN.js';
8
+ import '../chunk-BRAOB37W.js';
9
9
  import '../chunk-L5VSIPQD.js';
10
10
  import '../chunk-VTETQCR6.js';
11
- import '../chunk-MS2IXLTC.js';
12
- import '../chunk-VS6XC5JE.js';
11
+ import '../chunk-PMXTBWFD.js';
12
+ import '../chunk-2MTRRK37.js';
13
13
  import '../chunk-RVRB27AN.js';
14
- import '../chunk-7HRZACI4.js';
14
+ import '../chunk-HW4BDJPC.js';
15
+ import '../chunk-LCXQ4LVP.js';
15
16
  import '../chunk-VSX2G7LA.js';
16
17
  import '../chunk-RXGPFAMN.js';
17
18
  import '../chunk-RZL4TOK3.js';
@@ -1,32 +1,34 @@
1
- export { AssetManager, LibraryEntryError, MissingManifestError, harnessSwitchKeptKey, harnessSwitchStateFile, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, readHarnessSwitchState, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName, writeHarnessSwitchState } from '../chunk-7UBCUKJO.js';
2
- import '../chunk-7FXOOUOC.js';
3
- import '../chunk-DRUAQ7IY.js';
4
- import '../chunk-CVUMZTNO.js';
5
- import '../chunk-F3D25RGM.js';
6
- import '../chunk-3TXEJN4W.js';
1
+ export { AssetManager, LibraryEntryError, MissingManifestError, harnessSwitchKeptKey, harnessSwitchStateFile, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, parseCanonicalLockKey, parseRefTolerant, readHarnessSwitchState, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName, writeHarnessSwitchState } from '../chunk-2JUCWMIS.js';
7
2
  import '../chunk-ISHJITXJ.js';
8
3
  import '../chunk-LNFKL23K.js';
9
4
  import '../chunk-JRN5QF4C.js';
10
5
  import '../chunk-NUELZWCF.js';
11
- export { SCAFFOLD_KINDS, createScaffold, deployAll, installAgent, installTargetOf, removeAsset } from '../chunk-7LJUK5JK.js';
6
+ export { SCAFFOLD_KINDS, createScaffold, deployAll, installAgent, installTargetOf, removeAsset } from '../chunk-MG6QD7GE.js';
7
+ import '../chunk-2PJYJPDE.js';
12
8
  export { BUILT_IN_FRAGMENTS, loadPromptExtensions, resolveFragments } from '../chunk-PKE3PXOK.js';
9
+ import '../chunk-4ZNKEDYH.js';
10
+ import '../chunk-RPRMD7XV.js';
11
+ import '../chunk-QUPZKTF3.js';
12
+ import '../chunk-ZQPBYLCS.js';
13
+ import '../chunk-F3D25RGM.js';
14
+ import '../chunk-3TXEJN4W.js';
13
15
  export { appendHistory, clearHistory, getRecentHistory, loadHistory } from '../chunk-LKBRBVVS.js';
14
16
  import '../chunk-UQ6LFBPZ.js';
15
- export { AGENT_RENDERERS, claudeCodeRenderer, codexRenderer, harnessTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-7VBD5XUM.js';
16
- import '../chunk-LCXQ4LVP.js';
17
- export { FACTORY_SOURCE_URL } from '../chunk-MEU2HHGV.js';
17
+ export { AGENT_RENDERERS, claudeCodeRenderer, codexRenderer, harnessTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-IG4YQ7ER.js';
18
+ export { FACTORY_SOURCE_URL } from '../chunk-U7P22GEB.js';
18
19
  import '../chunk-4GY63JU6.js';
19
- import '../chunk-CJO3XKO7.js';
20
+ import '../chunk-ETGC2MEM.js';
20
21
  import '../chunk-5KRMNUL4.js';
21
22
  import '../chunk-C5HFK34M.js';
22
23
  import '../chunk-MWXYN6NY.js';
23
- import '../chunk-BNLXZXZN.js';
24
+ import '../chunk-BRAOB37W.js';
24
25
  import '../chunk-L5VSIPQD.js';
25
26
  import '../chunk-VTETQCR6.js';
26
- import '../chunk-MS2IXLTC.js';
27
- import '../chunk-VS6XC5JE.js';
27
+ import '../chunk-PMXTBWFD.js';
28
+ import '../chunk-2MTRRK37.js';
28
29
  import '../chunk-RVRB27AN.js';
29
- import '../chunk-7HRZACI4.js';
30
+ import '../chunk-HW4BDJPC.js';
31
+ import '../chunk-LCXQ4LVP.js';
30
32
  import '../chunk-VSX2G7LA.js';
31
33
  import '../chunk-RXGPFAMN.js';
32
34
  import '../chunk-RZL4TOK3.js';
@@ -1,20 +1,27 @@
1
- export { SCAFFOLD_KINDS, assertNoLibrarySymlinks, cachedComposedFiles, canonicalEntryRef, composedDriftRefs, createScaffold, deployAll, deployAsset, deployedAssetDrift, diffDeployedAgent, entriesNeedingDeploy, installTargetOf, readKeptLegacyCopies, removeAsset, sourceComposedFiles, writeKeptLegacyCopies } from '../chunk-7LJUK5JK.js';
1
+ export { SCAFFOLD_KINDS, assembleAgentPrompt, assertNoLibrarySymlinks, cachedComposedFiles, canonicalEntryRef, composedDriftRefs, createScaffold, deployAll, deployAsset, deployEach, deployedAssetDrift, diffDeployedAgent, entriesNeedingDeploy, installTargetOf, readKeptLegacyCopies, removeAsset, sourceComposedFiles, writeKeptLegacyCopies } from '../chunk-MG6QD7GE.js';
2
+ import '../chunk-2PJYJPDE.js';
2
3
  import '../chunk-PKE3PXOK.js';
3
- import '../chunk-7VBD5XUM.js';
4
- import '../chunk-LCXQ4LVP.js';
5
- import '../chunk-MEU2HHGV.js';
4
+ import '../chunk-4ZNKEDYH.js';
5
+ import '../chunk-RPRMD7XV.js';
6
+ import '../chunk-QUPZKTF3.js';
7
+ import '../chunk-ZQPBYLCS.js';
8
+ import '../chunk-F3D25RGM.js';
9
+ import '../chunk-3TXEJN4W.js';
10
+ import '../chunk-IG4YQ7ER.js';
11
+ import '../chunk-U7P22GEB.js';
6
12
  import '../chunk-4GY63JU6.js';
7
- import '../chunk-CJO3XKO7.js';
13
+ import '../chunk-ETGC2MEM.js';
8
14
  import '../chunk-5KRMNUL4.js';
9
15
  import '../chunk-C5HFK34M.js';
10
16
  import '../chunk-MWXYN6NY.js';
11
- import '../chunk-BNLXZXZN.js';
17
+ import '../chunk-BRAOB37W.js';
12
18
  import '../chunk-L5VSIPQD.js';
13
19
  import '../chunk-VTETQCR6.js';
14
- import '../chunk-MS2IXLTC.js';
15
- import '../chunk-VS6XC5JE.js';
20
+ import '../chunk-PMXTBWFD.js';
21
+ import '../chunk-2MTRRK37.js';
16
22
  import '../chunk-RVRB27AN.js';
17
- import '../chunk-7HRZACI4.js';
23
+ import '../chunk-HW4BDJPC.js';
24
+ import '../chunk-LCXQ4LVP.js';
18
25
  import '../chunk-VSX2G7LA.js';
19
26
  import '../chunk-RXGPFAMN.js';
20
27
  import '../chunk-RZL4TOK3.js';
@@ -1,18 +1,18 @@
1
- export { AGENT_RENDERERS, CODEX_IDENTITY_DIR, agentRenderFiles, claudeCodeRenderer, codexRenderer, harnessTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-7VBD5XUM.js';
2
- import '../chunk-LCXQ4LVP.js';
3
- import '../chunk-MEU2HHGV.js';
1
+ export { AGENT_RENDERERS, CODEX_IDENTITY_DIR, agentPromptInput, agentRenderFiles, claudeCodeRenderer, codexRenderer, harnessTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-IG4YQ7ER.js';
2
+ import '../chunk-U7P22GEB.js';
4
3
  import '../chunk-4GY63JU6.js';
5
- import '../chunk-CJO3XKO7.js';
4
+ import '../chunk-ETGC2MEM.js';
6
5
  import '../chunk-5KRMNUL4.js';
7
6
  import '../chunk-C5HFK34M.js';
8
7
  import '../chunk-MWXYN6NY.js';
9
- import '../chunk-BNLXZXZN.js';
8
+ import '../chunk-BRAOB37W.js';
10
9
  import '../chunk-L5VSIPQD.js';
11
10
  import '../chunk-VTETQCR6.js';
12
- import '../chunk-MS2IXLTC.js';
13
- import '../chunk-VS6XC5JE.js';
11
+ import '../chunk-PMXTBWFD.js';
12
+ import '../chunk-2MTRRK37.js';
14
13
  import '../chunk-RVRB27AN.js';
15
- import '../chunk-7HRZACI4.js';
14
+ import '../chunk-HW4BDJPC.js';
15
+ import '../chunk-LCXQ4LVP.js';
16
16
  import '../chunk-VSX2G7LA.js';
17
17
  import '../chunk-RXGPFAMN.js';
18
18
  import '../chunk-RZL4TOK3.js';