@skaile/workspaces 6.3.0 → 6.4.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 (268) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/ai-sdk.js +28 -16
  3. package/dist/ai-sdk.js.map +1 -1
  4. package/dist/app-sdk/index.js +1 -1
  5. package/dist/{asset-feeds-3YO2352Y.js → asset-feeds-UJSYGKCX.js} +19 -19
  6. package/dist/{asset-feeds-3YO2352Y.js.map → asset-feeds-UJSYGKCX.js.map} +1 -1
  7. package/dist/asset-manager/catalog-deployer.js +6 -6
  8. package/dist/asset-manager/index.js +11 -11
  9. package/dist/asset-manager/installer.js +7 -7
  10. package/dist/asset-manager/renderers.js +6 -6
  11. package/dist/asset-manager/src/index.d.ts +42 -15
  12. package/dist/asset-manager/src/index.d.ts.map +1 -1
  13. package/dist/asset-manager/src/install-instances.d.ts +2 -0
  14. package/dist/asset-manager/src/install-instances.d.ts.map +1 -1
  15. package/dist/asset-manager/src/installer.d.ts.map +1 -1
  16. package/dist/bridge/harnesses/claude-sdk.js +10 -10
  17. package/dist/bridge/harnesses/codex.js +8 -8
  18. package/dist/bridge/harnesses/continue.js +9 -9
  19. package/dist/bridge/harnesses/echo.js +4 -4
  20. package/dist/bridge/harnesses/gemini.js +5 -5
  21. package/dist/bridge/harnesses/goose.js +9 -9
  22. package/dist/bridge/harnesses/omp.js +6 -6
  23. package/dist/bridge/harnesses/opencode.js +9 -9
  24. package/dist/bridge/harnesses/qwen.js +5 -5
  25. package/dist/bridge/index.js +15 -15
  26. package/dist/bridge/src/ai-sdk.d.ts +5 -0
  27. package/dist/bridge/src/ai-sdk.d.ts.map +1 -1
  28. package/dist/bridge/src/harness-model-check.d.ts +11 -7
  29. package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
  30. package/dist/{chunk-72NT2TJU.js → chunk-24D7IW5O.js} +6 -6
  31. package/dist/{chunk-72NT2TJU.js.map → chunk-24D7IW5O.js.map} +1 -1
  32. package/dist/{chunk-HH2H2ZV7.js → chunk-2WOA3TKK.js} +12 -12
  33. package/dist/chunk-2WOA3TKK.js.map +1 -0
  34. package/dist/{chunk-6WH2WE4B.js → chunk-3ENE6ZOF.js} +4 -4
  35. package/dist/{chunk-6WH2WE4B.js.map → chunk-3ENE6ZOF.js.map} +1 -1
  36. package/dist/{chunk-32FYVSSW.js → chunk-45KLCFQB.js} +5 -5
  37. package/dist/{chunk-32FYVSSW.js.map → chunk-45KLCFQB.js.map} +1 -1
  38. package/dist/{chunk-BPTWWKGF.js → chunk-5NHBLKKU.js} +3 -3
  39. package/dist/{chunk-BPTWWKGF.js.map → chunk-5NHBLKKU.js.map} +1 -1
  40. package/dist/{chunk-7MV3NHPT.js → chunk-5T3DTK7A.js} +41 -23
  41. package/dist/chunk-5T3DTK7A.js.map +1 -0
  42. package/dist/{chunk-XBQTXGY4.js → chunk-6WQGJF65.js} +18 -6
  43. package/dist/chunk-6WQGJF65.js.map +1 -0
  44. package/dist/{chunk-H622YULS.js → chunk-6X3GDPCB.js} +3 -3
  45. package/dist/{chunk-H622YULS.js.map → chunk-6X3GDPCB.js.map} +1 -1
  46. package/dist/{chunk-7QG2WRSN.js → chunk-76WSWPOB.js} +15 -7
  47. package/dist/{chunk-7QG2WRSN.js.map → chunk-76WSWPOB.js.map} +1 -1
  48. package/dist/{chunk-J5JRGBKK.js → chunk-ABVWUM2E.js} +27 -17
  49. package/dist/chunk-ABVWUM2E.js.map +1 -0
  50. package/dist/{chunk-V5BPDB4J.js → chunk-ACBL7X62.js} +3 -3
  51. package/dist/{chunk-V5BPDB4J.js.map → chunk-ACBL7X62.js.map} +1 -1
  52. package/dist/{chunk-VUJXZDCY.js → chunk-BOS7P2Y4.js} +3 -3
  53. package/dist/{chunk-VUJXZDCY.js.map → chunk-BOS7P2Y4.js.map} +1 -1
  54. package/dist/{chunk-PNUM7GUY.js → chunk-BUU2DLPC.js} +3 -3
  55. package/dist/{chunk-PNUM7GUY.js.map → chunk-BUU2DLPC.js.map} +1 -1
  56. package/dist/{chunk-PL52CI4U.js → chunk-BX7PSWJA.js} +4 -4
  57. package/dist/{chunk-PL52CI4U.js.map → chunk-BX7PSWJA.js.map} +1 -1
  58. package/dist/{chunk-URCJIV7T.js → chunk-C7TQARGC.js} +3 -3
  59. package/dist/{chunk-URCJIV7T.js.map → chunk-C7TQARGC.js.map} +1 -1
  60. package/dist/{chunk-E5NQRHEB.js → chunk-CK3CJSRY.js} +3 -3
  61. package/dist/{chunk-E5NQRHEB.js.map → chunk-CK3CJSRY.js.map} +1 -1
  62. package/dist/{chunk-4QRJBY2P.js → chunk-DCJ4BION.js} +2 -2
  63. package/dist/{chunk-4QRJBY2P.js.map → chunk-DCJ4BION.js.map} +1 -1
  64. package/dist/{chunk-HGOJEVHY.js → chunk-DF5WJC3Q.js} +4 -4
  65. package/dist/{chunk-HGOJEVHY.js.map → chunk-DF5WJC3Q.js.map} +1 -1
  66. package/dist/{chunk-QK7AG5AV.js → chunk-E237FGGX.js} +4 -4
  67. package/dist/{chunk-QK7AG5AV.js.map → chunk-E237FGGX.js.map} +1 -1
  68. package/dist/{chunk-ZEH4WFEG.js → chunk-EXRQKOY6.js} +11 -11
  69. package/dist/{chunk-ZEH4WFEG.js.map → chunk-EXRQKOY6.js.map} +1 -1
  70. package/dist/{chunk-QFFMFZIR.js → chunk-G63KOHFS.js} +3 -3
  71. package/dist/{chunk-QFFMFZIR.js.map → chunk-G63KOHFS.js.map} +1 -1
  72. package/dist/{chunk-Y3I4KGLX.js → chunk-GBXQFJ4G.js} +8 -8
  73. package/dist/{chunk-Y3I4KGLX.js.map → chunk-GBXQFJ4G.js.map} +1 -1
  74. package/dist/{chunk-6GWSDPBP.js → chunk-GTMANMBZ.js} +3 -3
  75. package/dist/{chunk-6GWSDPBP.js.map → chunk-GTMANMBZ.js.map} +1 -1
  76. package/dist/{chunk-YW4ASEUP.js → chunk-HSF665NV.js} +5 -5
  77. package/dist/{chunk-YW4ASEUP.js.map → chunk-HSF665NV.js.map} +1 -1
  78. package/dist/{chunk-LEJQAX7G.js → chunk-HXZ3FQQN.js} +14 -14
  79. package/dist/{chunk-LEJQAX7G.js.map → chunk-HXZ3FQQN.js.map} +1 -1
  80. package/dist/{chunk-ROVZCGTN.js → chunk-IYZAJ2J2.js} +16 -13
  81. package/dist/chunk-IYZAJ2J2.js.map +1 -0
  82. package/dist/{chunk-PHAMYCZH.js → chunk-IZV3HDVG.js} +5 -5
  83. package/dist/{chunk-PHAMYCZH.js.map → chunk-IZV3HDVG.js.map} +1 -1
  84. package/dist/{chunk-ELSGFI3I.js → chunk-JSWMRYLM.js} +3 -3
  85. package/dist/{chunk-ELSGFI3I.js.map → chunk-JSWMRYLM.js.map} +1 -1
  86. package/dist/{chunk-TSTRH4SM.js → chunk-L45IHRDH.js} +3 -3
  87. package/dist/{chunk-TSTRH4SM.js.map → chunk-L45IHRDH.js.map} +1 -1
  88. package/dist/{chunk-Q7CU5GQO.js → chunk-L4OYPFLB.js} +3 -3
  89. package/dist/{chunk-Q7CU5GQO.js.map → chunk-L4OYPFLB.js.map} +1 -1
  90. package/dist/{chunk-7TSNR5H5.js → chunk-O7KAQQAI.js} +4 -4
  91. package/dist/{chunk-7TSNR5H5.js.map → chunk-O7KAQQAI.js.map} +1 -1
  92. package/dist/{chunk-EQNIBBB6.js → chunk-P7EL7QRD.js} +14 -14
  93. package/dist/{chunk-EQNIBBB6.js.map → chunk-P7EL7QRD.js.map} +1 -1
  94. package/dist/{chunk-2TFKXSB5.js → chunk-PTBX55QF.js} +4 -4
  95. package/dist/{chunk-2TFKXSB5.js.map → chunk-PTBX55QF.js.map} +1 -1
  96. package/dist/{chunk-DU26AVK2.js → chunk-Q4XWCVFA.js} +7 -7
  97. package/dist/{chunk-DU26AVK2.js.map → chunk-Q4XWCVFA.js.map} +1 -1
  98. package/dist/{chunk-S6KZHPR4.js → chunk-QJQQNBVT.js} +2 -2
  99. package/dist/{chunk-S6KZHPR4.js.map → chunk-QJQQNBVT.js.map} +1 -1
  100. package/dist/{chunk-HDVLBEEX.js → chunk-QSIFEHSN.js} +3 -3
  101. package/dist/{chunk-HDVLBEEX.js.map → chunk-QSIFEHSN.js.map} +1 -1
  102. package/dist/{chunk-VUWRGMT6.js → chunk-RKI35EAN.js} +3 -3
  103. package/dist/{chunk-VUWRGMT6.js.map → chunk-RKI35EAN.js.map} +1 -1
  104. package/dist/{chunk-7RH6E332.js → chunk-SISUT7VR.js} +7 -7
  105. package/dist/{chunk-7RH6E332.js.map → chunk-SISUT7VR.js.map} +1 -1
  106. package/dist/{chunk-TGV2EWGL.js → chunk-TDKZL5ZC.js} +3 -3
  107. package/dist/{chunk-TGV2EWGL.js.map → chunk-TDKZL5ZC.js.map} +1 -1
  108. package/dist/{chunk-KIPCBIFJ.js → chunk-TF5CWJQZ.js} +5 -5
  109. package/dist/{chunk-KIPCBIFJ.js.map → chunk-TF5CWJQZ.js.map} +1 -1
  110. package/dist/{chunk-KGHYXXXV.js → chunk-TGB4E5Z6.js} +188 -52
  111. package/dist/chunk-TGB4E5Z6.js.map +1 -0
  112. package/dist/{chunk-AMJ6KEV7.js → chunk-TPQKFX6X.js} +4 -4
  113. package/dist/{chunk-AMJ6KEV7.js.map → chunk-TPQKFX6X.js.map} +1 -1
  114. package/dist/{chunk-KPKGWXUJ.js → chunk-U6S5CXKB.js} +3 -3
  115. package/dist/{chunk-KPKGWXUJ.js.map → chunk-U6S5CXKB.js.map} +1 -1
  116. package/dist/{chunk-JGH7NB47.js → chunk-UAOHR6AL.js} +4 -4
  117. package/dist/{chunk-JGH7NB47.js.map → chunk-UAOHR6AL.js.map} +1 -1
  118. package/dist/{chunk-COUJOTAJ.js → chunk-UBLZALKP.js} +3 -3
  119. package/dist/{chunk-COUJOTAJ.js.map → chunk-UBLZALKP.js.map} +1 -1
  120. package/dist/{chunk-BIRW3HOG.js → chunk-UUKCPPTQ.js} +3 -3
  121. package/dist/{chunk-BIRW3HOG.js.map → chunk-UUKCPPTQ.js.map} +1 -1
  122. package/dist/{chunk-TO5SSMRI.js → chunk-UVTN4O7N.js} +42 -17
  123. package/dist/chunk-UVTN4O7N.js.map +1 -0
  124. package/dist/{chunk-LD6O6QKU.js → chunk-V4OXHEWY.js} +3 -3
  125. package/dist/{chunk-LD6O6QKU.js.map → chunk-V4OXHEWY.js.map} +1 -1
  126. package/dist/{chunk-QTLUZUF2.js → chunk-VSCLUPGZ.js} +28 -26
  127. package/dist/chunk-VSCLUPGZ.js.map +1 -0
  128. package/dist/{chunk-JMIKGAUA.js → chunk-VV2DJT4I.js} +15 -5
  129. package/dist/chunk-VV2DJT4I.js.map +1 -0
  130. package/dist/{chunk-JCPD4QRM.js → chunk-VZU67OKK.js} +2 -2
  131. package/dist/{chunk-JCPD4QRM.js.map → chunk-VZU67OKK.js.map} +1 -1
  132. package/dist/{chunk-XEVFSDIF.js → chunk-WENTJ5KP.js} +4 -4
  133. package/dist/{chunk-XEVFSDIF.js.map → chunk-WENTJ5KP.js.map} +1 -1
  134. package/dist/{chunk-MD3FUZS3.js → chunk-YFGXYQW4.js} +3 -3
  135. package/dist/{chunk-MD3FUZS3.js.map → chunk-YFGXYQW4.js.map} +1 -1
  136. package/dist/{chunk-MYXFR27L.js → chunk-YJNE4V2M.js} +16 -9
  137. package/dist/chunk-YJNE4V2M.js.map +1 -0
  138. package/dist/{chunk-RFQONXET.js → chunk-ZWCGJYR7.js} +3 -3
  139. package/dist/{chunk-RFQONXET.js.map → chunk-ZWCGJYR7.js.map} +1 -1
  140. package/dist/{claude-code-EUKDGOOO.js → claude-code-UBT4ZME7.js} +4 -4
  141. package/dist/{claude-code-EUKDGOOO.js.map → claude-code-UBT4ZME7.js.map} +1 -1
  142. package/dist/cli/index.js +103 -89
  143. package/dist/cli/index.js.map +1 -1
  144. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  145. package/dist/cli/src/commands/library-index.d.ts.map +1 -1
  146. package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
  147. package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
  148. package/dist/cli/src/helpers.d.ts +10 -2
  149. package/dist/cli/src/helpers.d.ts.map +1 -1
  150. package/dist/cli/src/plugin-store/index.d.ts +1 -1
  151. package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
  152. package/dist/cli/src/plugin-store/reconcile.d.ts.map +1 -1
  153. package/dist/cli/src/plugin-store/spec.d.ts +19 -14
  154. package/dist/cli/src/plugin-store/spec.d.ts.map +1 -1
  155. package/dist/cli/src/setup.d.ts.map +1 -1
  156. package/dist/connectors/config.js +4 -4
  157. package/dist/connectors/index.js +19 -19
  158. package/dist/{connectors-XYPE2DCQ.js → connectors-4WH32NK2.js} +22 -22
  159. package/dist/{connectors-XYPE2DCQ.js.map → connectors-4WH32NK2.js.map} +1 -1
  160. package/dist/connectors-shared/index.js +2 -2
  161. package/dist/core/index.js +5 -5
  162. package/dist/core/manifest.js +1 -1
  163. package/dist/core/publish-manifest.js +2 -2
  164. package/dist/core/runtime-assets.js +4 -4
  165. package/dist/core/src/index.d.ts +1 -1
  166. package/dist/core/src/index.d.ts.map +1 -1
  167. package/dist/core/src/lock.d.ts.map +1 -1
  168. package/dist/core/src/manifest.d.ts +9 -3
  169. package/dist/core/src/manifest.d.ts.map +1 -1
  170. package/dist/core/src/workspace-config.d.ts +15 -0
  171. package/dist/core/src/workspace-config.d.ts.map +1 -1
  172. package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
  173. package/dist/core/workspace-config.js +3 -3
  174. package/dist/deploy/index.js +5 -5
  175. package/dist/discovery/index.js +3 -3
  176. package/dist/{ensure-sources-IN3VKHUA.js → ensure-sources-UC2RBYMP.js} +24 -24
  177. package/dist/{ensure-sources-IN3VKHUA.js.map → ensure-sources-UC2RBYMP.js.map} +1 -1
  178. package/dist/factory-assets/connectors/box.js +19 -19
  179. package/dist/factory-assets/connectors/deploy.js +19 -19
  180. package/dist/factory-assets/connectors/devserver.js +19 -19
  181. package/dist/factory-assets/connectors/flow/adapter.js +19 -19
  182. package/dist/factory-assets/connectors/flow/engine.js +6 -6
  183. package/dist/factory-assets/connectors/flow/run-flow.js +21 -21
  184. package/dist/factory-assets/connectors/flow.js +19 -19
  185. package/dist/factory-assets/connectors/git.js +19 -19
  186. package/dist/factory-assets/connectors/gmail.js +19 -19
  187. package/dist/factory-assets/connectors/googledrive.js +19 -19
  188. package/dist/factory-assets/connectors/local.js +19 -19
  189. package/dist/factory-assets/connectors/mattermost.js +19 -19
  190. package/dist/factory-assets/connectors/memory.js +19 -19
  191. package/dist/factory-assets/connectors/minio.js +19 -19
  192. package/dist/factory-assets/connectors/postgres.js +19 -19
  193. package/dist/factory-assets/connectors/s3.js +19 -19
  194. package/dist/factory-assets/connectors/sharepoint.js +19 -19
  195. package/dist/factory-assets/connectors/sqlite.js +19 -19
  196. package/dist/factory-assets/connectors/static-server.js +19 -19
  197. package/dist/factory-assets/connectors/tunnel.js +19 -19
  198. package/dist/factory-assets/connectors/webdav.js +19 -19
  199. package/dist/factory-assets/connectors/xstate-store.js +19 -19
  200. package/dist/factory-assets/connectors/xstate.js +19 -19
  201. package/dist/{flows-QAO63TDV.js → flows-LYTKNGKE.js} +10 -10
  202. package/dist/{flows-QAO63TDV.js.map → flows-LYTKNGKE.js.map} +1 -1
  203. package/dist/{helpers-HDVGCF3M.js → helpers-SSSKT5XK.js} +24 -24
  204. package/dist/{helpers-HDVGCF3M.js.map → helpers-SSSKT5XK.js.map} +1 -1
  205. package/dist/library/index.js +8 -8
  206. package/dist/library/install.js +3 -3
  207. package/dist/{library-publish-62OWCNB5.js → library-publish-GQMNTAKK.js} +48 -48
  208. package/dist/{library-publish-62OWCNB5.js.map → library-publish-GQMNTAKK.js.map} +1 -1
  209. package/dist/model-endpoint/index.js +8 -8
  210. package/dist/{open-library-TZ7OSDEJ.js → open-library-XGUCUJYE.js} +27 -27
  211. package/dist/{open-library-TZ7OSDEJ.js.map → open-library-XGUCUJYE.js.map} +1 -1
  212. package/dist/{open-registry-RLZKTJG3.js → open-registry-DIFEPDF6.js} +12 -12
  213. package/dist/{open-registry-RLZKTJG3.js.map → open-registry-DIFEPDF6.js.map} +1 -1
  214. package/dist/{paths-D6LBQETQ.js → paths-G4GFJLE2.js} +8 -8
  215. package/dist/{paths-D6LBQETQ.js.map → paths-G4GFJLE2.js.map} +1 -1
  216. package/dist/{plugin-store-A5J4TLCH.js → plugin-store-BBLDFD3L.js} +8 -8
  217. package/dist/{plugin-store-A5J4TLCH.js.map → plugin-store-BBLDFD3L.js.map} +1 -1
  218. package/dist/{project-4AVRES3M.js → project-LB745WVZ.js} +44 -44
  219. package/dist/{project-4AVRES3M.js.map → project-LB745WVZ.js.map} +1 -1
  220. package/dist/resolver/index.js +6 -6
  221. package/dist/runner/index.js +34 -34
  222. package/dist/runner/src/capability-roundtrip.d.ts +4 -1
  223. package/dist/runner/src/capability-roundtrip.d.ts.map +1 -1
  224. package/dist/sdk/asset-manager.js +11 -11
  225. package/dist/sdk/bridge.js +15 -15
  226. package/dist/sdk/core.js +5 -5
  227. package/dist/sdk/flow.js +6 -6
  228. package/dist/sdk/index.js +34 -34
  229. package/dist/sdk/resolver.js +6 -6
  230. package/dist/sdk/runner.js +34 -34
  231. package/dist/sdk/session.js +2 -2
  232. package/dist/sdk/transport/ws/server.js +6 -6
  233. package/dist/sdk/transport/ws.js +6 -6
  234. package/dist/sdk/transport.js +6 -6
  235. package/dist/sdk/types.js +1 -1
  236. package/dist/{serve-preflight-H2AYMGJ6.js → serve-preflight-NPWI4MV6.js} +25 -25
  237. package/dist/{serve-preflight-H2AYMGJ6.js.map → serve-preflight-NPWI4MV6.js.map} +1 -1
  238. package/dist/session/index.js +2 -2
  239. package/dist/{setup-NSPQD4V4.js → setup-X6ZYH2MW.js} +30 -27
  240. package/dist/setup-X6ZYH2MW.js.map +1 -0
  241. package/dist/{skills-B533SRVZ.js → skills-62PXDBPJ.js} +11 -11
  242. package/dist/{skills-B533SRVZ.js.map → skills-62PXDBPJ.js.map} +1 -1
  243. package/dist/{source-VTECABUO.js → source-LAYCTRHP.js} +44 -44
  244. package/dist/{source-VTECABUO.js.map → source-LAYCTRHP.js.map} +1 -1
  245. package/dist/{source-manifest-publish-YORI42MN.js → source-manifest-publish-3S6PJ25W.js} +46 -46
  246. package/dist/{source-manifest-publish-YORI42MN.js.map → source-manifest-publish-3S6PJ25W.js.map} +1 -1
  247. package/dist/transport/index.js +6 -6
  248. package/dist/transport/ws/server.js +6 -6
  249. package/dist/transport/ws.js +6 -6
  250. package/dist/tui/index.js +34 -34
  251. package/dist/types/index.js +1 -1
  252. package/dist/types/src/capabilities.d.ts +9 -1
  253. package/dist/types/src/capabilities.d.ts.map +1 -1
  254. package/dist/workspace-plugin/adapters/mcp.js +26 -26
  255. package/dist/workspace-plugin/adapters/omp.js +14 -14
  256. package/dist/workspace-plugin/index.js +1 -1
  257. package/package.json +1 -1
  258. package/dist/chunk-7MV3NHPT.js.map +0 -1
  259. package/dist/chunk-HH2H2ZV7.js.map +0 -1
  260. package/dist/chunk-J5JRGBKK.js.map +0 -1
  261. package/dist/chunk-JMIKGAUA.js.map +0 -1
  262. package/dist/chunk-KGHYXXXV.js.map +0 -1
  263. package/dist/chunk-MYXFR27L.js.map +0 -1
  264. package/dist/chunk-QTLUZUF2.js.map +0 -1
  265. package/dist/chunk-ROVZCGTN.js.map +0 -1
  266. package/dist/chunk-TO5SSMRI.js.map +0 -1
  267. package/dist/chunk-XBQTXGY4.js.map +0 -1
  268. package/dist/setup-NSPQD4V4.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1110](https://github.com/skaile-ai/workspaces/pull/1110) [`18b5cb5`](https://github.com/skaile-ai/workspaces/commit/18b5cb5ccd1388f2c9cd37ba32bb801373025adf) Thanks [@mortegro](https://github.com/mortegro)! - Review fixes on the 6.2.0 RDC round:
8
+
9
+ - A `capability_result` failure carries `error` again, next to `{ok:false, code, message}`, so hosts that reject on `result.error` see failed hibernate, close and compact calls (p1736).
10
+ - The `serve --harness omp --model` preflight strips a `:<thinking level>` suffix and refuses only a bare id or provider omp does not know (p1334).
11
+ - Factory lock rows keep their `commit` while the asset hash is unchanged, so a CLI upgrade alone no longer rewrites `skaile.lock.yaml` (p1755).
12
+ - A plain `install` after a library-less restore exits 0 and resolves new declarations normally; the restore notice names the store (p1655). A 644 script copy becomes 755 on `install` (p1657). The `--project-dir` advice uses the full command path (p1656).
13
+ - `install` and `update` refuse a declared, never locked placeholder asset (p223). A reader adoption indexes a manifest-less clone under the adoption publisher (p1600). The quote hint only appears for an unquoted `@` on the error line (p1750).
14
+ - `check` names a hand-edited file when the library changed at the same version, and gives `update --force` for an edited rendered agent file (p1641).
15
+ - `config set`, `connector list`, `preset apply` and `preset export` print one parse-error line for a wrong-typed `skaile.yaml`; new core exports `ConfigParseError`, `configParseErrorOf` (p1620).
16
+ - `plugin install` accepts any range after a package name and refuses nameless specs; a relative `file:` path is stored relative to the project (p1737). The codex delegate warning prints only when an instance file was written (p1673).
17
+
18
+ ### Patch Changes
19
+
20
+ - [#1111](https://github.com/skaile-ai/workspaces/pull/1111) [`60d6c5d`](https://github.com/skaile-ai/workspaces/commit/60d6c5db43044e3020001883ba4736d4fd7a7b63) Thanks [@mortegro](https://github.com/mortegro)! - `@skaile/workspaces/ai-sdk` `resolveLanguageModel`: credentials and `@role` selectors.
21
+
22
+ - The credential is now presented the way the entry says (`buildCredentialHeaders`): an `anthropic-messages` entry with a `bearer` credential sends `Authorization: Bearer` (SDK `authToken`) instead of `x-api-key`, and a preset's `auth_header` (Azure `api-key`, …) is applied. An entry with no credential value no longer lets `@ai-sdk/openai` / `@ai-sdk/anthropic` fall back to the ambient `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` and send that key to the entry's endpoint.
23
+ - New `roles` option (`Record<string, string>`, the session config's `roles`): `@role` selectors resolve against it and `role` is set on the result. A dangling role fails with the parse warning in the message.
24
+
3
25
  ## 6.3.0
4
26
 
5
27
  ### Minor Changes
package/dist/ai-sdk.js CHANGED
@@ -1,16 +1,16 @@
1
- import { loadMergedProviderRegistry } from './chunk-QFFMFZIR.js';
2
- import './chunk-6UP2EDFN.js';
3
- import './chunk-J5JRGBKK.js';
1
+ import { loadMergedProviderRegistry } from './chunk-G63KOHFS.js';
2
+ import { buildCredentialHeaders } from './chunk-6UP2EDFN.js';
3
+ import './chunk-ABVWUM2E.js';
4
4
  import './chunk-4GY63JU6.js';
5
- import './chunk-6WH2WE4B.js';
5
+ import './chunk-3ENE6ZOF.js';
6
6
  import './chunk-5KRMNUL4.js';
7
7
  import './chunk-C5HFK34M.js';
8
8
  import './chunk-MWXYN6NY.js';
9
- import './chunk-XBQTXGY4.js';
9
+ import './chunk-6WQGJF65.js';
10
10
  import './chunk-L5VSIPQD.js';
11
11
  import './chunk-VTETQCR6.js';
12
- import './chunk-KPKGWXUJ.js';
13
- import './chunk-JMIKGAUA.js';
12
+ import './chunk-U6S5CXKB.js';
13
+ import './chunk-VV2DJT4I.js';
14
14
  import './chunk-RVRB27AN.js';
15
15
  import './chunk-IZQOO6MN.js';
16
16
  import { resolveCredential } from './chunk-VSX2G7LA.js';
@@ -21,13 +21,14 @@ import './chunk-BOFL7GIF.js';
21
21
  import './chunk-NSBPE2FW.js';
22
22
 
23
23
  // bridge/src/ai-sdk.ts
24
+ var NO_CREDENTIAL_PLACEHOLDER = "no-credential-configured";
24
25
  async function resolveLanguageModel(selector, opts = {}) {
25
26
  const { merged, diagnostics } = loadMergedProviderRegistry({
26
27
  projectDir: opts.projectDir ?? process.cwd()
27
28
  });
28
29
  const errors = diagnostics.filter((d) => d.severity === "error").map((d) => d.path ? `${d.path}: ${d.message}` : d.message);
29
30
  if (errors.length > 0) throw new Error(`providers registry: ${errors.join("; ")}`);
30
- const ref = parseModelRef(selector, merged);
31
+ const ref = parseModelRef(selector, merged, opts.roles);
31
32
  if (!ref) {
32
33
  throw new Error(
33
34
  `no provider for '${selector}': run \`skaile providers add openrouter --credential env:OPENROUTER_API_KEY --workspace\``
@@ -38,7 +39,11 @@ async function resolveLanguageModel(selector, opts = {}) {
38
39
  throw new Error(`provider '${ref.providerId}' is not an llm entry`);
39
40
  }
40
41
  const modelId = ref.providerModelId ?? ref.modelId;
41
- if (!modelId) throw new Error(`'${selector}' names no model`);
42
+ if (!modelId) {
43
+ throw new Error(
44
+ `'${selector}' names no model${ref.warnings.length > 0 ? ` (${ref.warnings.join("; ")})` : ""}`
45
+ );
46
+ }
42
47
  const baseUrl = normalizeEntryBaseUrl(resolveEntryBaseUrl(entry), entry.surface);
43
48
  if (!baseUrl) throw new Error(`provider '${ref.providerId}' has no base_url`);
44
49
  const credential = resolveCredential(entry, { env: opts.env });
@@ -62,8 +67,10 @@ async function loadProviderSdk(load, pkg, providerId, surface) {
62
67
  });
63
68
  }
64
69
  }
65
- async function createModel(entry, providerId, modelId, baseURL, apiKey) {
66
- const headers = entry.headers;
70
+ async function createModel(entry, providerId, modelId, baseURL, secret) {
71
+ const credentialHeaders = buildCredentialHeaders(entry, secret);
72
+ const headers = { ...entry.headers, ...credentialHeaders };
73
+ const bearer = credentialHeaders.Authorization !== void 0 ? secret : void 0;
67
74
  const surface = entry.surface ?? "openai-completions";
68
75
  switch (surface) {
69
76
  case "anthropic-messages": {
@@ -75,7 +82,7 @@ async function createModel(entry, providerId, modelId, baseURL, apiKey) {
75
82
  );
76
83
  return createAnthropic({
77
84
  baseURL: `${normalizeAnthropicBaseUrl(baseURL) ?? baseURL}/v1`,
78
- apiKey,
85
+ ...bearer !== void 0 ? { authToken: bearer } : { apiKey: credentialHeaders["x-api-key"] ?? NO_CREDENTIAL_PLACEHOLDER },
79
86
  headers
80
87
  })(modelId);
81
88
  }
@@ -86,7 +93,9 @@ async function createModel(entry, providerId, modelId, baseURL, apiKey) {
86
93
  providerId,
87
94
  surface
88
95
  );
89
- return createOpenAI({ baseURL, apiKey, headers })(modelId);
96
+ return createOpenAI({ baseURL, apiKey: bearer ?? NO_CREDENTIAL_PLACEHOLDER, headers })(
97
+ modelId
98
+ );
90
99
  }
91
100
  case "openai-completions": {
92
101
  const { createOpenAICompatible } = await loadProviderSdk(
@@ -95,9 +104,12 @@ async function createModel(entry, providerId, modelId, baseURL, apiKey) {
95
104
  providerId,
96
105
  surface
97
106
  );
98
- return createOpenAICompatible({ name: providerId, baseURL, apiKey, headers }).chatModel(
99
- modelId
100
- );
107
+ return createOpenAICompatible({
108
+ name: providerId,
109
+ baseURL,
110
+ apiKey: bearer,
111
+ headers
112
+ }).chatModel(modelId);
101
113
  }
102
114
  default:
103
115
  throw new Error(
@@ -1 +1 @@
1
- {"version":3,"sources":["../bridge/src/ai-sdk.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyDA,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,MAAM,CAAA;AAC1C,EAAA,IAAI,CAAC,GAAA,EAAK;AACR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,EAAS,QAAQ,OAAA,EAAS,EAAE,OAAO,CAAA;AAAA,IAC3D;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;AAAA,OACF;AACA,MAAA,OAAO,sBAAA,CAAuB,EAAE,IAAA,EAAM,UAAA,EAAY,SAAS,MAAA,EAAQ,OAAA,EAAS,CAAA,CAAE,SAAA;AAAA,QAC5E;AAAA,OACF;AAAA,IACF;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 * @see PROVIDER-CONFIG-PLAN.md §1.6\n */\n\nimport {\n type AIProviderLlmEntry,\n normalizeAnthropicBaseUrl,\n normalizeEntryBaseUrl,\n parseModelRef,\n resolveCredential,\n resolveEntryBaseUrl,\n} from \"@skaile/workspaces/core\";\nimport type { LanguageModel } from \"ai\";\nimport { loadMergedProviderRegistry } from \"./provider-registry-load.js\";\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\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);\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 entry = merged.providers[ref.providerId];\n if (!entry || entry.kind !== \"llm\") {\n throw new Error(`provider '${ref.providerId}' is not an llm entry`);\n }\n const modelId = ref.providerModelId ?? ref.modelId;\n if (!modelId) throw new Error(`'${selector}' names no model`);\n const baseUrl = normalizeEntryBaseUrl(resolveEntryBaseUrl(entry), entry.surface);\n if (!baseUrl) throw new Error(`provider '${ref.providerId}' has no base_url`);\n const credential = resolveCredential(entry, { env: opts.env });\n if (credential.error) throw new Error(`provider '${ref.providerId}': ${credential.error}`);\n\n const model = await createModel(entry, ref.providerId, modelId, baseUrl, credential.value);\n return {\n model,\n providerId: ref.providerId,\n modelId,\n baseUrl,\n ...(ref.role !== undefined ? { role: ref.role } : {}),\n warnings: ref.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): Promise<T> {\n try {\n return await load();\n } catch (cause) {\n throw new Error(`provider '${providerId}' needs ${pkg} installed (surface '${surface}')`, {\n cause,\n });\n }\n}\n\nasync function createModel(\n entry: AIProviderLlmEntry,\n providerId: string,\n modelId: string,\n baseURL: string,\n apiKey: string | undefined,\n): Promise<ModelObject> {\n const headers = entry.headers;\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 );\n // `@ai-sdk/anthropic` wants the versioned base; the registry stores the host root.\n return createAnthropic({\n baseURL: `${normalizeAnthropicBaseUrl(baseURL) ?? baseURL}/v1`,\n apiKey,\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 );\n return createOpenAI({ baseURL, apiKey, headers })(modelId);\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 );\n return createOpenAICompatible({ name: providerId, baseURL, apiKey, headers }).chatModel(\n modelId,\n );\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":";;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAM,yBAAA,GA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E,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;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 * @see PROVIDER-CONFIG-PLAN.md §1.6\n */\n\nimport {\n type AIProviderLlmEntry,\n normalizeAnthropicBaseUrl,\n normalizeEntryBaseUrl,\n parseModelRef,\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 entry = merged.providers[ref.providerId];\n if (!entry || entry.kind !== \"llm\") {\n throw new Error(`provider '${ref.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 '${ref.providerId}' has no base_url`);\n const credential = resolveCredential(entry, { env: opts.env });\n if (credential.error) throw new Error(`provider '${ref.providerId}': ${credential.error}`);\n\n const model = await createModel(entry, ref.providerId, modelId, baseUrl, credential.value);\n return {\n model,\n providerId: ref.providerId,\n modelId,\n baseUrl,\n ...(ref.role !== undefined ? { role: ref.role } : {}),\n warnings: ref.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): Promise<T> {\n try {\n return await load();\n } catch (cause) {\n throw new Error(`provider '${providerId}' needs ${pkg} installed (surface '${surface}')`, {\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): 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 );\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 );\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 );\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-JCPD4QRM.js';
1
+ import { PROTOCOL_VERSION_STRING } from '../chunk-VZU67OKK.js';
2
2
  import '../chunk-NSBPE2FW.js';
3
3
  import * as z from 'zod';
4
4
 
@@ -1,34 +1,34 @@
1
- import { storeNotInstallableReason } from './chunk-TGV2EWGL.js';
2
- import { getKnownKinds } from './chunk-YW4ASEUP.js';
3
- import './chunk-RFQONXET.js';
1
+ import { storeNotInstallableReason } from './chunk-TDKZL5ZC.js';
2
+ import { getKnownKinds } from './chunk-HSF665NV.js';
3
+ import './chunk-ZWCGJYR7.js';
4
4
  import './chunk-7RGTAEG6.js';
5
- import './chunk-KGHYXXXV.js';
6
- import './chunk-Y3I4KGLX.js';
7
- import './chunk-XEVFSDIF.js';
8
- import './chunk-E5NQRHEB.js';
5
+ import './chunk-TGB4E5Z6.js';
6
+ import './chunk-GBXQFJ4G.js';
7
+ import './chunk-WENTJ5KP.js';
8
+ import './chunk-CK3CJSRY.js';
9
9
  import './chunk-F3D25RGM.js';
10
10
  import './chunk-3TXEJN4W.js';
11
11
  import './chunk-ISHJITXJ.js';
12
12
  import './chunk-LNFKL23K.js';
13
13
  import './chunk-JRN5QF4C.js';
14
14
  import './chunk-NUELZWCF.js';
15
- import './chunk-MYXFR27L.js';
15
+ import './chunk-YJNE4V2M.js';
16
16
  import './chunk-PKE3PXOK.js';
17
17
  import './chunk-KTBKW2FI.js';
18
18
  import './chunk-UQ6LFBPZ.js';
19
- import './chunk-LD6O6QKU.js';
19
+ import './chunk-V4OXHEWY.js';
20
20
  import './chunk-76FLBODK.js';
21
- import './chunk-J5JRGBKK.js';
21
+ import './chunk-ABVWUM2E.js';
22
22
  import './chunk-4GY63JU6.js';
23
- import { factoryAssetRoots } from './chunk-6WH2WE4B.js';
23
+ import { factoryAssetRoots } from './chunk-3ENE6ZOF.js';
24
24
  import './chunk-5KRMNUL4.js';
25
25
  import './chunk-C5HFK34M.js';
26
26
  import './chunk-MWXYN6NY.js';
27
- import { scanRepo } from './chunk-XBQTXGY4.js';
27
+ import { scanRepo } from './chunk-6WQGJF65.js';
28
28
  import './chunk-L5VSIPQD.js';
29
29
  import './chunk-VTETQCR6.js';
30
- import './chunk-KPKGWXUJ.js';
31
- import { parseRequires } from './chunk-JMIKGAUA.js';
30
+ import './chunk-U6S5CXKB.js';
31
+ import { parseRequires } from './chunk-VV2DJT4I.js';
32
32
  import './chunk-RVRB27AN.js';
33
33
  import './chunk-IZQOO6MN.js';
34
34
  import './chunk-VSX2G7LA.js';
@@ -60,8 +60,8 @@ function libraryEntryOf(asset) {
60
60
  async function libraryAssets() {
61
61
  const notes = [];
62
62
  try {
63
- const { openLibraryManager } = await import('./open-library-TZ7OSDEJ.js');
64
- const { getKindRegistry } = await import('./open-registry-RLZKTJG3.js');
63
+ const { openLibraryManager } = await import('./open-library-XGUCUJYE.js');
64
+ const { getKindRegistry } = await import('./open-registry-DIFEPDF6.js');
65
65
  const { scanAuthoringLibraries } = await import('./library/index.js');
66
66
  const { library: index, close } = await openLibraryManager();
67
67
  try {
@@ -94,7 +94,7 @@ async function libraryAssets() {
94
94
  async function storeAssets(projectDir) {
95
95
  const notes = [];
96
96
  try {
97
- const { resolveCatalogSource } = await import('./open-library-TZ7OSDEJ.js');
97
+ const { resolveCatalogSource } = await import('./open-library-XGUCUJYE.js');
98
98
  const { source, close } = await resolveCatalogSource({ projectDir });
99
99
  try {
100
100
  const assets = (await source.listAssets()).filter(
@@ -175,5 +175,5 @@ async function gatherAssetFeeds(am, projectDir) {
175
175
  }
176
176
 
177
177
  export { gatherAssetFeeds };
178
- //# sourceMappingURL=asset-feeds-3YO2352Y.js.map
179
- //# sourceMappingURL=asset-feeds-3YO2352Y.js.map
178
+ //# sourceMappingURL=asset-feeds-UJSYGKCX.js.map
179
+ //# sourceMappingURL=asset-feeds-UJSYGKCX.js.map
@@ -1 +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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AA,CAAM,KAAA,EAAO,GAAG,OAAA,CAAQ,KAAK;AAAA,GACzD;AACF","file":"asset-feeds-3YO2352Y.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
+ {"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,WA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AAO,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-UJSYGKCX.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,15 +1,15 @@
1
- export { WORKSPACE_MOUNT_ENV_VAR, deployAll, deployCatalogEntry, findAiAssetsRoot, isUnderWorkspaceMount, resolveFlowSkills, undeployCatalogEntry, workspaceMountDirs } from '../chunk-PNUM7GUY.js';
2
- import '../chunk-J5JRGBKK.js';
1
+ export { WORKSPACE_MOUNT_ENV_VAR, deployAll, deployCatalogEntry, findAiAssetsRoot, isUnderWorkspaceMount, resolveFlowSkills, undeployCatalogEntry, workspaceMountDirs } from '../chunk-BUU2DLPC.js';
2
+ import '../chunk-ABVWUM2E.js';
3
3
  import '../chunk-4GY63JU6.js';
4
- import '../chunk-6WH2WE4B.js';
4
+ import '../chunk-3ENE6ZOF.js';
5
5
  import '../chunk-5KRMNUL4.js';
6
6
  import '../chunk-C5HFK34M.js';
7
7
  import '../chunk-MWXYN6NY.js';
8
- import '../chunk-XBQTXGY4.js';
8
+ import '../chunk-6WQGJF65.js';
9
9
  import '../chunk-L5VSIPQD.js';
10
10
  import '../chunk-VTETQCR6.js';
11
- import '../chunk-KPKGWXUJ.js';
12
- import '../chunk-JMIKGAUA.js';
11
+ import '../chunk-U6S5CXKB.js';
12
+ import '../chunk-VV2DJT4I.js';
13
13
  import '../chunk-RVRB27AN.js';
14
14
  import '../chunk-IZQOO6MN.js';
15
15
  import '../chunk-VSX2G7LA.js';
@@ -1,30 +1,30 @@
1
- export { AssetManager, LibraryEntryError, MissingManifestError, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName } from '../chunk-KGHYXXXV.js';
2
- import '../chunk-Y3I4KGLX.js';
3
- import '../chunk-XEVFSDIF.js';
4
- import '../chunk-E5NQRHEB.js';
1
+ export { AssetManager, LibraryEntryError, MissingManifestError, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName } from '../chunk-TGB4E5Z6.js';
2
+ import '../chunk-GBXQFJ4G.js';
3
+ import '../chunk-WENTJ5KP.js';
4
+ import '../chunk-CK3CJSRY.js';
5
5
  import '../chunk-F3D25RGM.js';
6
6
  import '../chunk-3TXEJN4W.js';
7
7
  import '../chunk-ISHJITXJ.js';
8
8
  import '../chunk-LNFKL23K.js';
9
9
  import '../chunk-JRN5QF4C.js';
10
10
  import '../chunk-NUELZWCF.js';
11
- export { SCAFFOLD_KINDS, createScaffold, deployAll, installAgent, installTargetOf, removeAsset } from '../chunk-MYXFR27L.js';
11
+ export { SCAFFOLD_KINDS, createScaffold, deployAll, installAgent, installTargetOf, removeAsset } from '../chunk-YJNE4V2M.js';
12
12
  export { BUILT_IN_FRAGMENTS, loadPromptExtensions, resolveFragments } from '../chunk-PKE3PXOK.js';
13
13
  export { appendHistory, clearHistory, getRecentHistory, loadHistory } from '../chunk-KTBKW2FI.js';
14
14
  import '../chunk-UQ6LFBPZ.js';
15
- export { AGENT_RENDERERS, claudeCodeRenderer, codexRenderer, harnessTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-LD6O6QKU.js';
15
+ export { AGENT_RENDERERS, claudeCodeRenderer, codexRenderer, harnessTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-V4OXHEWY.js';
16
16
  import '../chunk-76FLBODK.js';
17
- export { FACTORY_SOURCE_URL } from '../chunk-J5JRGBKK.js';
17
+ export { FACTORY_SOURCE_URL } from '../chunk-ABVWUM2E.js';
18
18
  import '../chunk-4GY63JU6.js';
19
- import '../chunk-6WH2WE4B.js';
19
+ import '../chunk-3ENE6ZOF.js';
20
20
  import '../chunk-5KRMNUL4.js';
21
21
  import '../chunk-C5HFK34M.js';
22
22
  import '../chunk-MWXYN6NY.js';
23
- import '../chunk-XBQTXGY4.js';
23
+ import '../chunk-6WQGJF65.js';
24
24
  import '../chunk-L5VSIPQD.js';
25
25
  import '../chunk-VTETQCR6.js';
26
- import '../chunk-KPKGWXUJ.js';
27
- import '../chunk-JMIKGAUA.js';
26
+ import '../chunk-U6S5CXKB.js';
27
+ import '../chunk-VV2DJT4I.js';
28
28
  import '../chunk-RVRB27AN.js';
29
29
  import '../chunk-IZQOO6MN.js';
30
30
  import '../chunk-VSX2G7LA.js';
@@ -1,18 +1,18 @@
1
- export { SCAFFOLD_KINDS, assertNoLibrarySymlinks, cachedComposedFiles, canonicalEntryRef, composedDriftRefs, createScaffold, deployAll, deployAsset, deployedAssetDrift, diffDeployedAgent, installTargetOf, readKeptLegacyCopies, removeAsset, sourceComposedFiles, writeKeptLegacyCopies } from '../chunk-MYXFR27L.js';
1
+ export { SCAFFOLD_KINDS, assertNoLibrarySymlinks, cachedComposedFiles, canonicalEntryRef, composedDriftRefs, createScaffold, deployAll, deployAsset, deployedAssetDrift, diffDeployedAgent, installTargetOf, readKeptLegacyCopies, removeAsset, sourceComposedFiles, writeKeptLegacyCopies } from '../chunk-YJNE4V2M.js';
2
2
  import '../chunk-PKE3PXOK.js';
3
- import '../chunk-LD6O6QKU.js';
3
+ import '../chunk-V4OXHEWY.js';
4
4
  import '../chunk-76FLBODK.js';
5
- import '../chunk-J5JRGBKK.js';
5
+ import '../chunk-ABVWUM2E.js';
6
6
  import '../chunk-4GY63JU6.js';
7
- import '../chunk-6WH2WE4B.js';
7
+ import '../chunk-3ENE6ZOF.js';
8
8
  import '../chunk-5KRMNUL4.js';
9
9
  import '../chunk-C5HFK34M.js';
10
10
  import '../chunk-MWXYN6NY.js';
11
- import '../chunk-XBQTXGY4.js';
11
+ import '../chunk-6WQGJF65.js';
12
12
  import '../chunk-L5VSIPQD.js';
13
13
  import '../chunk-VTETQCR6.js';
14
- import '../chunk-KPKGWXUJ.js';
15
- import '../chunk-JMIKGAUA.js';
14
+ import '../chunk-U6S5CXKB.js';
15
+ import '../chunk-VV2DJT4I.js';
16
16
  import '../chunk-RVRB27AN.js';
17
17
  import '../chunk-IZQOO6MN.js';
18
18
  import '../chunk-VSX2G7LA.js';
@@ -1,16 +1,16 @@
1
- export { AGENT_RENDERERS, CODEX_IDENTITY_DIR, agentRenderFiles, claudeCodeRenderer, codexRenderer, harnessTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-LD6O6QKU.js';
1
+ export { AGENT_RENDERERS, CODEX_IDENTITY_DIR, agentRenderFiles, claudeCodeRenderer, codexRenderer, harnessTargetSupportsAgents, ompRenderer, renderAgentToFramework } from '../chunk-V4OXHEWY.js';
2
2
  import '../chunk-76FLBODK.js';
3
- import '../chunk-J5JRGBKK.js';
3
+ import '../chunk-ABVWUM2E.js';
4
4
  import '../chunk-4GY63JU6.js';
5
- import '../chunk-6WH2WE4B.js';
5
+ import '../chunk-3ENE6ZOF.js';
6
6
  import '../chunk-5KRMNUL4.js';
7
7
  import '../chunk-C5HFK34M.js';
8
8
  import '../chunk-MWXYN6NY.js';
9
- import '../chunk-XBQTXGY4.js';
9
+ import '../chunk-6WQGJF65.js';
10
10
  import '../chunk-L5VSIPQD.js';
11
11
  import '../chunk-VTETQCR6.js';
12
- import '../chunk-KPKGWXUJ.js';
13
- import '../chunk-JMIKGAUA.js';
12
+ import '../chunk-U6S5CXKB.js';
13
+ import '../chunk-VV2DJT4I.js';
14
14
  import '../chunk-RVRB27AN.js';
15
15
  import '../chunk-IZQOO6MN.js';
16
16
  import '../chunk-VSX2G7LA.js';
@@ -408,8 +408,8 @@ export interface InstallResult {
408
408
  restored?: RestoredAsset[];
409
409
  /**
410
410
  * One line per locked library that is not registered here but whose assets `install --locked`
411
- * restored from the lock `url:` with the locked hash: the notice that the library is not
412
- * registered, and how to register it. Not a failure: `missing` stays empty (OQ8, p1655).
411
+ * restored from a store that serves the locked hash (every file SHA-verified): the notice that
412
+ * the library is not registered, where the bytes came from, and how to register it. Not a failure: `missing` stays empty (OQ8, p1655).
413
413
  */
414
414
  libraryNotices?: string[];
415
415
  /**
@@ -444,6 +444,12 @@ export interface InstallResult {
444
444
  * harnesses without a native agent format.
445
445
  */
446
446
  agentInstances?: InstalledAgentInstance[];
447
+ /**
448
+ * Ids of the `agentInstances` whose native agent files changed in this run (a new file,
449
+ * other bytes). An instance that rendered the same bytes again is not listed: `install`
450
+ * re-renders every instance each run (p1673).
451
+ */
452
+ agentInstancesChanged?: string[];
447
453
  /**
448
454
  * Workspace-relative native agent files removed because their instance left
449
455
  * `skaile.yaml` (only files an earlier `skaile install` rendered are ever removed).
@@ -1261,6 +1267,12 @@ export declare class AssetManager {
1261
1267
  * library renamed on this machine with `library rename` is locked under its new name.
1262
1268
  */
1263
1269
  private libraryLockEntries;
1270
+ /**
1271
+ * Whether every declared ref is locked and no declared pin differs from the locked version:
1272
+ * `skaile.yaml` asks for nothing the lock does not hold. A declared preset counts when the
1273
+ * lock records it.
1274
+ */
1275
+ private declaredMatchesLock;
1264
1276
  /**
1265
1277
  * Lock keys that `skaile.yaml` still wants: the entries a declared ref names, plus every
1266
1278
  * entry such an asset requires, transitively. All keys when a `preset:` is declared.
@@ -1271,7 +1283,12 @@ export declare class AssetManager {
1271
1283
  * assets on this machine (not registered, or registered with its directory gone). Plain
1272
1284
  * `install` stops on a non-empty list, the same lines `install --locked` prints: it must
1273
1285
  * not re-resolve a locked asset from another origin. The ONE function that decides "the
1274
- * locked library is not here", so a lock-recorded URL fallback extends it in one place.
1286
+ * locked library is not here", so a store-restore fallback extends it in one place.
1287
+ *
1288
+ * An entry `install --locked` already restored from a store (its library is not registered
1289
+ * here and the store cache holds the locked version, see {@link restoredFromStoreCache}) is no
1290
+ * line: it is returned in `restored`, and plain `install` then restores the lock as
1291
+ * `install --locked` does instead of re-resolving it from another origin (OQ8, p1655).
1275
1292
  *
1276
1293
  * Only entries `skaile.yaml` still declares, or that a declared asset requires
1277
1294
  * (transitively, read from the deployed copy), count. A stale entry nothing declares is
@@ -1289,25 +1306,33 @@ export declare class AssetManager {
1289
1306
  * version; anything else is reported in `missing` with the reason.
1290
1307
  *
1291
1308
  * @param opts.storeFallback - `install --locked` only: an entry whose library is not registered
1292
- * here is restored from a store that serves the locked sha256 (OQ15, p1490). Reads such as
1293
- * the drift check never ask a store.
1309
+ * here is restored from a store that serves the locked sha256 (OQ8, OQ15, p1490, p1655). The
1310
+ * lock records the library's remote and hash but no commit and no file list, so the library
1311
+ * remote itself cannot be fetched at a locked commit; the store pointer names the upstream
1312
+ * repository and commit that hold exactly the hashed bytes. Reads such as the drift check
1313
+ * never ask a store.
1294
1314
  */
1295
1315
  private restoreLibraryLockEntries;
1296
1316
  /**
1297
- * Whether a library-origin lock entry was restored from its lock url: its library is not
1317
+ * Whether a library-origin lock entry was restored from a store: its library is not
1298
1318
  * registered here, and the project's store cache holds the locked version (`install --locked`
1299
- * fetched and SHA-verified it there against the sha256 the lock recorded). Such an entry is
1300
- * as restorable as a source- or store-origin one: `check` and `doctor` read its requirements
1301
- * from the deployed copy and do not ask for the library (OQ8, p1655). An unregistered library
1302
- * that never restored anything here stays a gap.
1319
+ * fetched it there and SHA-verified every file against the sha256 the lock recorded). Such an
1320
+ * entry is as restorable as a source- or store-origin one: `check`, `doctor` and plain
1321
+ * `install` read its requirements from the deployed copy and do not ask for the library (OQ8,
1322
+ * p1655). An unregistered library that never restored anything here stays a gap.
1323
+ *
1324
+ * This only checks that the cache directory of the locked version is not empty: the bytes were
1325
+ * verified when they were fetched, and a later edit of the deployed copy is the `modified`
1326
+ * drift check's job, not this one's.
1303
1327
  */
1304
- private restoredFromLockUrl;
1328
+ private restoredFromStoreCache;
1305
1329
  /**
1306
1330
  * The store's copy of a library-origin lock entry whose library is not registered here: a
1307
1331
  * store (project `stores:` or the global catalog) that serves `kind:@publisher/name#version`
1308
1332
  * under the very sha256 the lock recorded holds the same bytes. The entry is fetched and
1309
1333
  * verified like any store asset; the lock stays as it is. `null` when the lock has no hash,
1310
- * no store answers, or the hash differs (OQ15, p1490).
1334
+ * no store answers, or the hash differs (OQ15, p1490). `from` names the store and the
1335
+ * upstream repository and commit its pointer gives, for the notice.
1311
1336
  */
1312
1337
  private storeEntryForLockedLibraryAsset;
1313
1338
  /**
@@ -1661,10 +1686,12 @@ export declare class AssetManager {
1661
1686
  private installLocked;
1662
1687
  /**
1663
1688
  * One notice line per locked library that is not registered here and whose assets
1664
- * `install --locked` restored from the lock url: names the library, how many assets came from
1665
- * the url, and how to register the library to move the lock later (OQ8, p1655).
1689
+ * `install --locked` restored from a store: names the library, how many assets came from
1690
+ * which store (and the upstream repository and commit its pointer names), and how to register
1691
+ * the library to move the lock later (OQ8, p1655). Every file was SHA-verified against the
1692
+ * hash the lock recorded.
1666
1693
  */
1667
- private lockUrlRestoreNotices;
1694
+ private storeRestoreNotices;
1668
1695
  /**
1669
1696
  * The versions of `parsed`'s name that a source, a library or a store holds, newest first,
1670
1697
  * for the `Asset not found` of a pinned ref. Empty for an unpinned ref (nothing was ruled