@skaile/workspaces 1.3.0 → 1.5.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 (269) hide show
  1. package/CHANGELOG.md +395 -0
  2. package/README.md +1 -1
  3. package/dist/app-sdk/index.d.ts +2 -0
  4. package/dist/app-sdk/index.js +481 -0
  5. package/dist/app-sdk/index.js.map +1 -0
  6. package/dist/app-sdk/src/app.d.ts +152 -0
  7. package/dist/app-sdk/src/app.d.ts.map +1 -0
  8. package/dist/app-sdk/src/connection-params.d.ts +117 -0
  9. package/dist/app-sdk/src/connection-params.d.ts.map +1 -0
  10. package/dist/app-sdk/src/define-app-capability.d.ts +139 -0
  11. package/dist/app-sdk/src/define-app-capability.d.ts.map +1 -0
  12. package/dist/app-sdk/src/index.d.ts +17 -0
  13. package/dist/app-sdk/src/index.d.ts.map +1 -0
  14. package/dist/app-sdk/src/logger.d.ts +26 -0
  15. package/dist/app-sdk/src/logger.d.ts.map +1 -0
  16. package/dist/app-sdk/src/transport.d.ts +93 -0
  17. package/dist/app-sdk/src/transport.d.ts.map +1 -0
  18. package/dist/app-sdk/src/ws-transport.d.ts +79 -0
  19. package/dist/app-sdk/src/ws-transport.d.ts.map +1 -0
  20. package/dist/{asset-feeds-NEZKG6YS.js → asset-feeds-T35ELX2O.js} +11 -11
  21. package/dist/{asset-feeds-NEZKG6YS.js.map → asset-feeds-T35ELX2O.js.map} +1 -1
  22. package/dist/asset-manager/index.js +15 -10
  23. package/dist/asset-manager/installer.js +9 -9
  24. package/dist/asset-manager/renderers.js +2 -2
  25. package/dist/asset-manager/src/index.d.ts +42 -6
  26. package/dist/asset-manager/src/index.d.ts.map +1 -1
  27. package/dist/bridge/drivers/claude-sdk.js +2 -2
  28. package/dist/bridge/drivers/codex.js +1 -1
  29. package/dist/bridge/drivers/continue.js +2 -2
  30. package/dist/bridge/drivers/echo.js +1 -1
  31. package/dist/bridge/drivers/gemini.js +3 -3
  32. package/dist/bridge/drivers/goose.js +2 -2
  33. package/dist/bridge/drivers/omp.js +1 -1
  34. package/dist/bridge/drivers/opencode.js +2 -2
  35. package/dist/bridge/drivers/qwen.js +3 -3
  36. package/dist/bridge/index.js +3 -3
  37. package/dist/{chunk-YOPSHV7V.js → chunk-2DWXGUZA.js} +3 -3
  38. package/dist/{chunk-YOPSHV7V.js.map → chunk-2DWXGUZA.js.map} +1 -1
  39. package/dist/{chunk-XBG2YDQQ.js → chunk-2ZMO4CFG.js} +3 -3
  40. package/dist/{chunk-XBG2YDQQ.js.map → chunk-2ZMO4CFG.js.map} +1 -1
  41. package/dist/{chunk-OBSSORCE.js → chunk-3CHARYD4.js} +84 -12
  42. package/dist/chunk-3CHARYD4.js.map +1 -0
  43. package/dist/{chunk-SKADPHAM.js → chunk-4N5XR5DQ.js} +2 -2
  44. package/dist/chunk-4N5XR5DQ.js.map +1 -0
  45. package/dist/{chunk-WFEPI5LA.js → chunk-6NR2BEIY.js} +6 -6
  46. package/dist/{chunk-WFEPI5LA.js.map → chunk-6NR2BEIY.js.map} +1 -1
  47. package/dist/{chunk-7CNIRF42.js → chunk-BGIC25VK.js} +26 -15
  48. package/dist/chunk-BGIC25VK.js.map +1 -0
  49. package/dist/{chunk-YXEPZ7LP.js → chunk-CNSNN7N6.js} +6 -6
  50. package/dist/{chunk-YXEPZ7LP.js.map → chunk-CNSNN7N6.js.map} +1 -1
  51. package/dist/{chunk-PSMW5HLX.js → chunk-DMG6NJH7.js} +5 -5
  52. package/dist/{chunk-PSMW5HLX.js.map → chunk-DMG6NJH7.js.map} +1 -1
  53. package/dist/{chunk-P3MJYPZE.js → chunk-FDE7XRQA.js} +57 -9
  54. package/dist/chunk-FDE7XRQA.js.map +1 -0
  55. package/dist/{chunk-K5SD7FSF.js → chunk-HKX5VSWQ.js} +3 -3
  56. package/dist/{chunk-K5SD7FSF.js.map → chunk-HKX5VSWQ.js.map} +1 -1
  57. package/dist/{chunk-AZAS3FKN.js → chunk-HY33RMEA.js} +49 -3
  58. package/dist/chunk-HY33RMEA.js.map +1 -0
  59. package/dist/{chunk-XKARS6EE.js → chunk-IEX5YV4R.js} +3 -3
  60. package/dist/{chunk-XKARS6EE.js.map → chunk-IEX5YV4R.js.map} +1 -1
  61. package/dist/{chunk-GB4SEEK4.js → chunk-IRORTHGA.js} +10 -4
  62. package/dist/chunk-IRORTHGA.js.map +1 -0
  63. package/dist/chunk-J5TI55E7.js +203 -0
  64. package/dist/chunk-J5TI55E7.js.map +1 -0
  65. package/dist/chunk-JIDKX7GC.js +122 -0
  66. package/dist/chunk-JIDKX7GC.js.map +1 -0
  67. package/dist/{chunk-BDUANIAR.js → chunk-KEQ4GLVM.js} +3 -3
  68. package/dist/{chunk-BDUANIAR.js.map → chunk-KEQ4GLVM.js.map} +1 -1
  69. package/dist/{chunk-5XS3BFJS.js → chunk-KMY7HVQ6.js} +3 -3
  70. package/dist/{chunk-5XS3BFJS.js.map → chunk-KMY7HVQ6.js.map} +1 -1
  71. package/dist/{chunk-BZMTR5WW.js → chunk-MZV6WCF3.js} +83 -51
  72. package/dist/chunk-MZV6WCF3.js.map +1 -0
  73. package/dist/{chunk-QK5JDAFF.js → chunk-NKTFEV7Q.js} +4 -4
  74. package/dist/{chunk-QK5JDAFF.js.map → chunk-NKTFEV7Q.js.map} +1 -1
  75. package/dist/{chunk-DZCK7GRW.js → chunk-P4VHQA4N.js} +22 -6
  76. package/dist/chunk-P4VHQA4N.js.map +1 -0
  77. package/dist/{chunk-EVZKWY5J.js → chunk-PK7Q7MC7.js} +5 -4
  78. package/dist/chunk-PK7Q7MC7.js.map +1 -0
  79. package/dist/{chunk-ETYDLXI5.js → chunk-RDYOU6N6.js} +2 -2
  80. package/dist/{chunk-ETYDLXI5.js.map → chunk-RDYOU6N6.js.map} +1 -1
  81. package/dist/{chunk-RHMQPLIK.js → chunk-RSYV7XEN.js} +14 -8
  82. package/dist/chunk-RSYV7XEN.js.map +1 -0
  83. package/dist/{chunk-SUOGVHGJ.js → chunk-TNSCHS4I.js} +2 -2
  84. package/dist/{chunk-SUOGVHGJ.js.map → chunk-TNSCHS4I.js.map} +1 -1
  85. package/dist/{chunk-Z5Z3MYDL.js → chunk-UPZGQZEJ.js} +3 -3
  86. package/dist/{chunk-Z5Z3MYDL.js.map → chunk-UPZGQZEJ.js.map} +1 -1
  87. package/dist/{chunk-RJ3HUSBC.js → chunk-UQ5FK2AB.js} +3 -3
  88. package/dist/{chunk-RJ3HUSBC.js.map → chunk-UQ5FK2AB.js.map} +1 -1
  89. package/dist/{chunk-OUWNTFDG.js → chunk-UQKYT4V6.js} +38 -6
  90. package/dist/chunk-UQKYT4V6.js.map +1 -0
  91. package/dist/chunk-WYGXYGJH.js +688 -0
  92. package/dist/chunk-WYGXYGJH.js.map +1 -0
  93. package/dist/{chunk-TJRWGMD2.js → chunk-ZBZQC5R7.js} +3 -3
  94. package/dist/{chunk-TJRWGMD2.js.map → chunk-ZBZQC5R7.js.map} +1 -1
  95. package/dist/cli/index.js +1022 -374
  96. package/dist/cli/index.js.map +1 -1
  97. package/dist/cli/src/commands/catalog.d.ts +18 -0
  98. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  99. package/dist/cli/src/commands/library-cmd.d.ts +2 -2
  100. package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
  101. package/dist/cli/src/commands/library-publish.d.ts +53 -0
  102. package/dist/cli/src/commands/library-publish.d.ts.map +1 -0
  103. package/dist/cli/src/commands/preset-apply.d.ts +59 -0
  104. package/dist/cli/src/commands/preset-apply.d.ts.map +1 -0
  105. package/dist/cli/src/commands/preset-cmd.d.ts +8 -2
  106. package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
  107. package/dist/cli/src/commands/preset-export.d.ts +102 -0
  108. package/dist/cli/src/commands/preset-export.d.ts.map +1 -0
  109. package/dist/cli/src/commands/project.d.ts.map +1 -1
  110. package/dist/cli/src/commands/publish-core.d.ts +75 -0
  111. package/dist/cli/src/commands/publish-core.d.ts.map +1 -0
  112. package/dist/cli/src/commands/run.d.ts.map +1 -1
  113. package/dist/cli/src/commands/source-manifest-publish.d.ts +82 -0
  114. package/dist/cli/src/commands/source-manifest-publish.d.ts.map +1 -0
  115. package/dist/cli/src/commands/source-manifest.d.ts +65 -6
  116. package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
  117. package/dist/cli/src/commands/source.d.ts +13 -0
  118. package/dist/cli/src/commands/source.d.ts.map +1 -1
  119. package/dist/cli/src/commands/store.d.ts.map +1 -1
  120. package/dist/cli/src/commands/why.d.ts +18 -0
  121. package/dist/cli/src/commands/why.d.ts.map +1 -1
  122. package/dist/cli/src/driver-error.d.ts +12 -0
  123. package/dist/cli/src/driver-error.d.ts.map +1 -0
  124. package/dist/cli/src/open-library.d.ts +4 -0
  125. package/dist/cli/src/open-library.d.ts.map +1 -1
  126. package/dist/cli/src/store-auth.d.ts +42 -0
  127. package/dist/cli/src/store-auth.d.ts.map +1 -0
  128. package/dist/cli/src/store-client.d.ts +20 -22
  129. package/dist/cli/src/store-client.d.ts.map +1 -1
  130. package/dist/cli/src/store-publisher.d.ts +91 -0
  131. package/dist/cli/src/store-publisher.d.ts.map +1 -0
  132. package/dist/connectors/config.js +6 -6
  133. package/dist/connectors/index.js +8 -8
  134. package/dist/core/index.js +5 -5
  135. package/dist/core/publish-manifest.js +1 -1
  136. package/dist/core/runtime-assets.js +3 -3
  137. package/dist/core/src/cache-paths.d.ts +17 -0
  138. package/dist/core/src/cache-paths.d.ts.map +1 -1
  139. package/dist/core/src/index.d.ts +2 -2
  140. package/dist/core/src/index.d.ts.map +1 -1
  141. package/dist/core/src/publish-manifest.d.ts.map +1 -1
  142. package/dist/core/src/repo-manager.d.ts +13 -2
  143. package/dist/core/src/repo-manager.d.ts.map +1 -1
  144. package/dist/core/src/walker.d.ts +10 -0
  145. package/dist/core/src/walker.d.ts.map +1 -1
  146. package/dist/core/src/workspace-yaml-editor.d.ts +14 -1
  147. package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
  148. package/dist/core/workspace-config.js +2 -2
  149. package/dist/deploy/index.js +5 -5
  150. package/dist/discovery/index.js +3 -3
  151. package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
  152. package/dist/discovery/src/discover.d.ts +17 -4
  153. package/dist/discovery/src/discover.d.ts.map +1 -1
  154. package/dist/discovery/src/index.d.ts +1 -1
  155. package/dist/discovery/src/index.d.ts.map +1 -1
  156. package/dist/discovery/src/reference-lint.d.ts +7 -0
  157. package/dist/discovery/src/reference-lint.d.ts.map +1 -1
  158. package/dist/discovery/src/source-config.d.ts +28 -0
  159. package/dist/discovery/src/source-config.d.ts.map +1 -1
  160. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  161. package/dist/{ensure-sources-4BAJGJRK.js → ensure-sources-QDVFUIUP.js} +18 -13
  162. package/dist/ensure-sources-QDVFUIUP.js.map +1 -0
  163. package/dist/factory-assets/connectors/box.js +8 -8
  164. package/dist/factory-assets/connectors/deploy.js +8 -8
  165. package/dist/factory-assets/connectors/devserver.js +8 -8
  166. package/dist/factory-assets/connectors/flow/adapter.js +8 -8
  167. package/dist/factory-assets/connectors/flow/engine/engine.d.ts +4 -1
  168. package/dist/factory-assets/connectors/flow/engine/engine.d.ts.map +1 -1
  169. package/dist/factory-assets/connectors/flow/engine/types.d.ts +41 -6
  170. package/dist/factory-assets/connectors/flow/engine/types.d.ts.map +1 -1
  171. package/dist/factory-assets/connectors/flow/engine.js +6 -6
  172. package/dist/factory-assets/connectors/flow/run-flow.js +9 -9
  173. package/dist/factory-assets/connectors/flow.js +8 -8
  174. package/dist/factory-assets/connectors/git.js +8 -8
  175. package/dist/factory-assets/connectors/gmail.js +8 -8
  176. package/dist/factory-assets/connectors/googledrive.js +8 -8
  177. package/dist/factory-assets/connectors/local.js +8 -8
  178. package/dist/factory-assets/connectors/mattermost.js +8 -8
  179. package/dist/factory-assets/connectors/memory.js +8 -8
  180. package/dist/factory-assets/connectors/minio.js +8 -8
  181. package/dist/factory-assets/connectors/postgres.js +8 -8
  182. package/dist/factory-assets/connectors/s3.js +8 -8
  183. package/dist/factory-assets/connectors/sharepoint.js +8 -8
  184. package/dist/factory-assets/connectors/sqlite.js +8 -8
  185. package/dist/factory-assets/connectors/static-server.js +8 -8
  186. package/dist/factory-assets/connectors/tunnel.js +8 -8
  187. package/dist/factory-assets/connectors/webdav.js +8 -8
  188. package/dist/factory-assets/connectors/xstate-store.js +8 -8
  189. package/dist/factory-assets/connectors/xstate.js +8 -8
  190. package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +1 -1
  191. package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +1 -1
  192. package/dist/{flows-UFCOGAAM.js → flows-MRVXTYWC.js} +4 -4
  193. package/dist/{flows-UFCOGAAM.js.map → flows-MRVXTYWC.js.map} +1 -1
  194. package/dist/helpers-TF7GCBRQ.js +27 -0
  195. package/dist/{helpers-2OL4FRFB.js.map → helpers-TF7GCBRQ.js.map} +1 -1
  196. package/dist/library/index.js +9 -9
  197. package/dist/library/install.js +5 -5
  198. package/dist/library/src/index.d.ts +2 -2
  199. package/dist/library/src/index.d.ts.map +1 -1
  200. package/dist/library/src/local/local-catalog-source.d.ts +12 -1
  201. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  202. package/dist/library/src/sync/manifest-writeback.d.ts +36 -0
  203. package/dist/library/src/sync/manifest-writeback.d.ts.map +1 -1
  204. package/dist/library-publish-K5IBE44D.js +249 -0
  205. package/dist/library-publish-K5IBE44D.js.map +1 -0
  206. package/dist/open-library-4HMIDK3N.js +29 -0
  207. package/dist/{open-library-RPV2LIKL.js.map → open-library-4HMIDK3N.js.map} +1 -1
  208. package/dist/{paths-ML33B5SB.js → paths-P3DWFUPS.js} +8 -8
  209. package/dist/{paths-ML33B5SB.js.map → paths-P3DWFUPS.js.map} +1 -1
  210. package/dist/{plugin-store-G4HKWCTU.js → plugin-store-S7OMGI7N.js} +7 -7
  211. package/dist/{plugin-store-G4HKWCTU.js.map → plugin-store-S7OMGI7N.js.map} +1 -1
  212. package/dist/runner/index.js +14 -14
  213. package/dist/runner/src/agent.d.ts.map +1 -1
  214. package/dist/runner/src/capability-registry.d.ts +15 -4
  215. package/dist/runner/src/capability-registry.d.ts.map +1 -1
  216. package/dist/sdk/asset-manager.js +15 -10
  217. package/dist/sdk/bridge.js +3 -3
  218. package/dist/sdk/core.js +5 -5
  219. package/dist/sdk/flow.js +6 -6
  220. package/dist/sdk/index.js +14 -14
  221. package/dist/sdk/runner.js +14 -14
  222. package/dist/sdk/session.js +2 -2
  223. package/dist/sdk/types.js +1 -1
  224. package/dist/session/index.js +2 -2
  225. package/dist/{setup-WS6PF6JQ.js → setup-2CCS63L6.js} +10 -10
  226. package/dist/{setup-WS6PF6JQ.js.map → setup-2CCS63L6.js.map} +1 -1
  227. package/dist/source-LOAM7IIQ.js +30 -0
  228. package/dist/{source-22U5NOY4.js.map → source-LOAM7IIQ.js.map} +1 -1
  229. package/dist/source-manifest-publish-TGVZ6KMC.js +228 -0
  230. package/dist/source-manifest-publish-TGVZ6KMC.js.map +1 -0
  231. package/dist/tui/index.js +14 -14
  232. package/dist/types/index.js +1 -1
  233. package/dist/types/manifests.js +1 -1
  234. package/dist/types/src/capabilities.d.ts +8 -2
  235. package/dist/types/src/capabilities.d.ts.map +1 -1
  236. package/dist/types/src/logging.d.ts +3 -2
  237. package/dist/types/src/logging.d.ts.map +1 -1
  238. package/dist/types/src/manifests/_shared.d.ts +4 -4
  239. package/dist/types/src/manifests/index.d.ts +2 -2
  240. package/dist/types/src/manifests/index.d.ts.map +1 -1
  241. package/dist/types/src/manifests/preset.d.ts +10 -0
  242. package/dist/types/src/manifests/preset.d.ts.map +1 -1
  243. package/dist/types/src/version.d.ts +11 -1
  244. package/dist/types/src/version.d.ts.map +1 -1
  245. package/dist/workspace-plugin/adapters/mcp.js +2 -2
  246. package/dist/workspace-plugin/adapters/omp.js +3 -3
  247. package/dist/workspace-plugin/index.js +1 -1
  248. package/package.json +7 -1
  249. package/dist/chunk-7CNIRF42.js.map +0 -1
  250. package/dist/chunk-AZAS3FKN.js.map +0 -1
  251. package/dist/chunk-BZMTR5WW.js.map +0 -1
  252. package/dist/chunk-DZCK7GRW.js.map +0 -1
  253. package/dist/chunk-EVZKWY5J.js.map +0 -1
  254. package/dist/chunk-GB4SEEK4.js.map +0 -1
  255. package/dist/chunk-JQMIG7D3.js +0 -93
  256. package/dist/chunk-JQMIG7D3.js.map +0 -1
  257. package/dist/chunk-OBSSORCE.js.map +0 -1
  258. package/dist/chunk-OUWNTFDG.js.map +0 -1
  259. package/dist/chunk-P3MJYPZE.js.map +0 -1
  260. package/dist/chunk-RHMQPLIK.js.map +0 -1
  261. package/dist/chunk-RYRJEVQ4.js +0 -377
  262. package/dist/chunk-RYRJEVQ4.js.map +0 -1
  263. package/dist/chunk-SKADPHAM.js.map +0 -1
  264. package/dist/ensure-sources-4BAJGJRK.js.map +0 -1
  265. package/dist/helpers-2OL4FRFB.js +0 -22
  266. package/dist/open-library-RPV2LIKL.js +0 -29
  267. package/dist/source-22U5NOY4.js +0 -30
  268. package/dist/store-client-YLMBH5MF.js +0 -15
  269. package/dist/store-client-YLMBH5MF.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import { AssetKindRegistryFrozenError, AssetKindConflictError, AssetKindPatternConflictError, AssetKindPathAmbiguityError } from './chunk-JXT46QFC.js';
2
- import { decodeSkaileManifest, SKAILE_MANIFEST_FILENAME } from './chunk-DZCK7GRW.js';
2
+ import { decodeSkaileManifest, SKAILE_MANIFEST_FILENAME } from './chunk-P4VHQA4N.js';
3
3
  import { parseFrontmatter } from './chunk-BQCGFPHW.js';
4
4
  import { isValidAssetName } from './chunk-GEEW6SY2.js';
5
- import { validatePersona, validateRuleset, validateSkill, validateAgent, validateConnector, validateMcpServer, validateContract, validatePrompt, validatePreset } from './chunk-GB4SEEK4.js';
5
+ import { validatePersona, validateRuleset, validateSkill, validateAgent, validateConnector, validateMcpServer, validateContract, validatePrompt, validatePreset } from './chunk-IRORTHGA.js';
6
6
  import * as fs from 'fs';
7
7
  import * as path from 'path';
8
8
  import * as yaml from 'js-yaml';
@@ -597,7 +597,7 @@ var SourceConfigSchema = z.object({
597
597
  * project itself (e.g. `ai-assets-dev/`). Excluded from a normal discovery
598
598
  * run; re-included only when discovery is invoked with `includeDev` (the
599
599
  * `--dev` flag on `skaile source sync` / `source add`). Conventionally a
600
- * single top-level folder. See `docs/discovery/dev-assets.md`.
600
+ * single top-level folder. See `docs/sections/discovery/dev-assets.md`.
601
601
  */
602
602
  dev_paths: z.array(z.string().min(1)).default([]),
603
603
  /** Optional sync configuration for the catalog backend. */
@@ -656,6 +656,9 @@ function collectWarnings(config) {
656
656
  }
657
657
  return warnings;
658
658
  }
659
+ function barePublisher(publisher) {
660
+ return publisher.startsWith("@") ? publisher.slice(1) : publisher;
661
+ }
659
662
  function atPublisher(publisher) {
660
663
  return publisher.startsWith("@") ? publisher : `@${publisher}`;
661
664
  }
@@ -768,13 +771,19 @@ function mergeSourceConfigs(base, overlay) {
768
771
  return merged;
769
772
  }
770
773
  function loadMergedSourceConfig(rootPath, sidecarPath) {
774
+ return loadMergedSourceConfigFromFile(
775
+ rootPath,
776
+ sidecarPath ? path.join(sidecarPath, SKAILE_MANIFEST_FILENAME) : void 0
777
+ );
778
+ }
779
+ function loadMergedSourceConfigFromFile(rootPath, overlayManifestFile) {
771
780
  const baseResult = loadSourceConfigFromDir(rootPath);
772
781
  if (baseResult && !baseResult.ok) return baseResult;
773
782
  const base = baseResult?.ok ? baseResult.config : void 0;
774
783
  let overlay;
775
784
  const overlayWarnings = [];
776
- if (sidecarPath) {
777
- const overlayResult = loadSourceConfigFromDir(sidecarPath);
785
+ if (overlayManifestFile) {
786
+ const overlayResult = loadSourceConfigFromFile(overlayManifestFile);
778
787
  if (overlayResult && !overlayResult.ok) return overlayResult;
779
788
  if (overlayResult?.ok) {
780
789
  overlay = overlayResult.config;
@@ -799,7 +808,9 @@ function loadMergedSourceConfig(rootPath, sidecarPath) {
799
808
  return warnings.length > 0 ? { ok: true, config: merged, warnings } : { ok: true, config: merged };
800
809
  }
801
810
  function loadSourceConfigFromDir(dir) {
802
- const filePath = path.join(dir, SKAILE_MANIFEST_FILENAME);
811
+ return loadSourceConfigFromFile(path.join(dir, SKAILE_MANIFEST_FILENAME));
812
+ }
813
+ function loadSourceConfigFromFile(filePath) {
803
814
  if (!fs.existsSync(filePath)) return void 0;
804
815
  try {
805
816
  const text = fs.readFileSync(filePath, "utf-8");
@@ -821,12 +832,14 @@ function loadSourceConfigFromDir(dir) {
821
832
  function discoverFromManifest(rootPath, sourceConfig, registry, includeDev = false) {
822
833
  const assets = [];
823
834
  const errors = [];
835
+ const warnings = [];
824
836
  const allEdges = [];
825
837
  const devPaths = sourceConfig.dev_paths ?? [];
826
838
  const sortedEntries = [...sourceConfig.assets].sort((a, b) => a.path < b.path ? -1 : 1);
827
839
  for (const entry of sortedEntries) {
828
840
  if (!includeDev && isExcludedDevPath(entry.path, devPaths)) continue;
829
841
  const result = processEntry(rootPath, entry, registry);
842
+ warnings.push(...result.warnings);
830
843
  if (result.errors.length > 0) {
831
844
  errors.push(...result.errors);
832
845
  if (!result.asset) continue;
@@ -837,10 +850,11 @@ function discoverFromManifest(rootPath, sourceConfig, registry, includeDev = fal
837
850
  }
838
851
  }
839
852
  const graph = buildRequiresGraph(allEdges);
840
- return { assets, graph, errors, warnings: [] };
853
+ return { assets, graph, errors, warnings };
841
854
  }
842
855
  function processEntry(rootPath, entry, registry) {
843
856
  const errors = [];
857
+ const warnings = [];
844
858
  const assetRoot = path.resolve(rootPath, entry.path);
845
859
  const assetRootRelative = entry.path;
846
860
  const files = entry.files ?? expandRootFiles(assetRoot);
@@ -849,7 +863,7 @@ function processEntry(rootPath, entry, registry) {
849
863
  path: assetRootRelative,
850
864
  error: `ManifestFileMissing: root "${entry.root ?? entry.path}" contains no files`
851
865
  });
852
- return { asset: null, errors };
866
+ return { asset: null, errors, warnings };
853
867
  }
854
868
  const manifestFileRel = pickManifestFile(entry.path, files, entry.kind, registry);
855
869
  const manifestAbsPath = path.join(assetRoot, manifestFileRel);
@@ -864,7 +878,7 @@ function processEntry(rootPath, entry, registry) {
864
878
  path: assetRootRelative,
865
879
  error: `ManifestFileMissing: ${missing.join(", ")}`
866
880
  });
867
- return { asset: null, errors };
881
+ return { asset: null, errors, warnings };
868
882
  }
869
883
  const manifest = parseManifest(manifestAbsPath);
870
884
  if (!manifest) {
@@ -872,12 +886,12 @@ function processEntry(rootPath, entry, registry) {
872
886
  path: assetRootRelative,
873
887
  error: `ManifestSchemaError: failed to parse manifest file ${manifestFileRel}`
874
888
  });
875
- return { asset: null, errors };
889
+ return { asset: null, errors, warnings };
876
890
  }
877
891
  if (!registry.getProvider(entry.kind)) {
878
- errors.push({
892
+ warnings.push({
879
893
  path: assetRootRelative,
880
- error: `Unknown asset kind "${entry.kind}" \u2014 ghost-installing without provider validation`
894
+ warning: `Unknown asset kind "${entry.kind}" \u2014 ghost-installing without provider validation`
881
895
  });
882
896
  }
883
897
  const requiresErrors = validateRequiresSyntax(entry.requires);
@@ -886,7 +900,7 @@ function processEntry(rootPath, entry, registry) {
886
900
  path: assetRootRelative,
887
901
  error: `ManifestRequiresError: ${requiresErrors.join("; ")}`
888
902
  });
889
- return { asset: null, errors };
903
+ return { asset: null, errors, warnings };
890
904
  }
891
905
  const { sha256: computedHash, missing: hashMissing } = computeDeterministicHashDetailed(
892
906
  assetRoot,
@@ -897,22 +911,24 @@ function processEntry(rootPath, entry, registry) {
897
911
  path: assetRootRelative,
898
912
  error: `ManifestFileMissing: ${hashMissing.join(", ")} (became unreadable during hashing)`
899
913
  });
900
- return { asset: null, errors };
914
+ return { asset: null, errors, warnings };
901
915
  }
902
916
  if (entry.sha256 && entry.sha256 !== computedHash) {
903
917
  errors.push({
904
918
  path: assetRootRelative,
905
919
  error: `ManifestHashMismatch: declared ${entry.sha256}, computed ${computedHash}`
906
920
  });
907
- return { asset: null, errors };
921
+ return { asset: null, errors, warnings };
908
922
  }
909
923
  if (!entry.sha256) {
910
- errors.push({
924
+ warnings.push({
911
925
  path: assetRootRelative,
912
- error: `Missing sha256 \u2014 computed ${computedHash}. Re-run \`skaile source build-manifest --write\` to pin it.`
926
+ warning: "Missing sha256 \u2014 auto-computed locally (only needed for store publish).",
927
+ code: "missing_sha256"
913
928
  });
914
929
  }
915
- const ref = `${entry.publisher}/${entry.name}@${entry.version}`;
930
+ const publisher = barePublisher(entry.publisher);
931
+ const ref = `@${publisher}/${entry.name}@${entry.version}`;
916
932
  const requires = entry.requires.map((to) => ({
917
933
  from: ref,
918
934
  to,
@@ -925,7 +941,7 @@ function processEntry(rootPath, entry, registry) {
925
941
  const asset = {
926
942
  ref,
927
943
  kind: entry.kind,
928
- publisher: entry.publisher,
944
+ publisher,
929
945
  name: entry.name,
930
946
  version: entry.version,
931
947
  manifest: mergedManifest,
@@ -938,7 +954,7 @@ function processEntry(rootPath, entry, registry) {
938
954
  sha256: computedHash,
939
955
  requires
940
956
  };
941
- return { asset, errors };
957
+ return { asset, errors, warnings };
942
958
  }
943
959
  var MANIFEST_FILENAMES = /* @__PURE__ */ new Set([
944
960
  "SKILL.md",
@@ -1461,13 +1477,15 @@ function normalizeDiscoveryArgs(rootPath, optionsOrSourceConfig) {
1461
1477
  let sourceConfig;
1462
1478
  let registry;
1463
1479
  let sidecarPath;
1480
+ let sidecarManifestFile;
1464
1481
  let includeDev = false;
1465
1482
  let domainFiles;
1466
1483
  let atomization = DEFAULT_ATOMIZATION_POLICY;
1467
- if (optionsOrSourceConfig && ("registry" in optionsOrSourceConfig || "sourceConfig" in optionsOrSourceConfig || "sidecarPath" in optionsOrSourceConfig || "domainFiles" in optionsOrSourceConfig || "atomization" in optionsOrSourceConfig || "includeDev" in optionsOrSourceConfig)) {
1484
+ if (optionsOrSourceConfig && ("registry" in optionsOrSourceConfig || "sourceConfig" in optionsOrSourceConfig || "sidecarPath" in optionsOrSourceConfig || "sidecarManifestFile" in optionsOrSourceConfig || "domainFiles" in optionsOrSourceConfig || "atomization" in optionsOrSourceConfig || "includeDev" in optionsOrSourceConfig)) {
1468
1485
  sourceConfig = optionsOrSourceConfig.sourceConfig;
1469
1486
  registry = optionsOrSourceConfig.registry;
1470
1487
  sidecarPath = optionsOrSourceConfig.sidecarPath;
1488
+ sidecarManifestFile = optionsOrSourceConfig.sidecarManifestFile;
1471
1489
  includeDev = optionsOrSourceConfig.includeDev ?? false;
1472
1490
  domainFiles = optionsOrSourceConfig.domainFiles;
1473
1491
  atomization = optionsOrSourceConfig.atomization ?? DEFAULT_ATOMIZATION_POLICY;
@@ -1477,13 +1495,21 @@ function normalizeDiscoveryArgs(rootPath, optionsOrSourceConfig) {
1477
1495
  if (!registry) {
1478
1496
  registry = createDefaultRegistry();
1479
1497
  }
1480
- if (!sourceConfig && sidecarPath) {
1481
- const merged = loadMergedSourceConfig(rootPath, sidecarPath);
1498
+ if (!sourceConfig && (sidecarManifestFile || sidecarPath)) {
1499
+ const merged = sidecarManifestFile ? loadMergedSourceConfigFromFile(rootPath, sidecarManifestFile) : loadMergedSourceConfig(rootPath, sidecarPath);
1482
1500
  if (merged.ok) {
1483
1501
  sourceConfig = merged.config;
1484
1502
  }
1485
1503
  }
1486
- return { sourceConfig, registry, includeDev, sidecarPath, domainFiles, atomization };
1504
+ return {
1505
+ sourceConfig,
1506
+ registry,
1507
+ includeDev,
1508
+ sidecarPath,
1509
+ sidecarManifestFile,
1510
+ domainFiles,
1511
+ atomization
1512
+ };
1487
1513
  }
1488
1514
  function processDiscoveredEntry(entry, ctx, acc) {
1489
1515
  const { absPath, relativePath, kind } = entry;
@@ -1497,7 +1523,7 @@ function processDiscoveredEntry(entry, ctx, acc) {
1497
1523
  const publisher = resolvePublisher(relativePath, sourceConfig);
1498
1524
  const name = deriveName(relativePath, kind, manifest);
1499
1525
  const version = coerceVersion(manifest);
1500
- const ref = `${publisher}/${name}@${version}`;
1526
+ const ref = `@${publisher}/${name}@${version}`;
1501
1527
  const fileFilter = registry.defaultFileFilter(kind, absPath) ?? {
1502
1528
  assetRoot: path.dirname(absPath),
1503
1529
  files: [path.basename(absPath)]
@@ -1630,19 +1656,19 @@ function parseManifest2(absPath) {
1630
1656
  function resolvePublisher(relativePath, sourceConfig) {
1631
1657
  if (!sourceConfig) {
1632
1658
  const domain = relativePath.split("/")[0] ?? "unknown";
1633
- return `@${domain}`;
1659
+ return domain;
1634
1660
  }
1635
1661
  for (const override of sourceConfig.publisher_overrides) {
1636
1662
  if (relativePath.startsWith(override.path)) {
1637
- return override.publisher;
1663
+ return barePublisher(override.publisher);
1638
1664
  }
1639
1665
  }
1640
1666
  const template = sourceConfig.publisher_default;
1641
1667
  if (template.includes("<domain>")) {
1642
1668
  const domain = relativePath.split("/")[0] ?? "unknown";
1643
- return template.replace("<domain>", domain);
1669
+ return barePublisher(template.replace("<domain>", domain));
1644
1670
  }
1645
- return template;
1671
+ return barePublisher(template);
1646
1672
  }
1647
1673
  function coerceVersion(manifest) {
1648
1674
  const scalar = (v) => typeof v === "string" ? v : typeof v === "number" ? String(v) : null;
@@ -1813,7 +1839,7 @@ async function buildAssetFromBlob(relativePath, kind, blobByPath, fetchBlob, res
1813
1839
  const publisher = resolvePublisher2(relativePath, resolvedSourceConfig);
1814
1840
  const name = deriveName2(relativePath, kind, manifest);
1815
1841
  const version = coerceVersion2(manifest);
1816
- const ref = `${publisher}/${name}@${version}`;
1842
+ const ref = `@${publisher}/${name}@${version}`;
1817
1843
  const fileFilter = computeFileFilter(kind, relativePath, blobByPath);
1818
1844
  warnings.push(
1819
1845
  ...await applyAtomizationPolicyTree(
@@ -1878,19 +1904,19 @@ function parseManifestText(relativePath, text) {
1878
1904
  function resolvePublisher2(relativePath, sourceConfig) {
1879
1905
  if (!sourceConfig) {
1880
1906
  const domain = relativePath.split("/")[0] ?? "unknown";
1881
- return `@${domain}`;
1907
+ return domain;
1882
1908
  }
1883
1909
  for (const override of sourceConfig.publisher_overrides) {
1884
1910
  if (relativePath.startsWith(override.path)) {
1885
- return override.publisher;
1911
+ return barePublisher(override.publisher);
1886
1912
  }
1887
1913
  }
1888
1914
  const template = sourceConfig.publisher_default;
1889
1915
  if (template.includes("<domain>")) {
1890
1916
  const domain = relativePath.split("/")[0] ?? "unknown";
1891
- return template.replace("<domain>", domain);
1917
+ return barePublisher(template.replace("<domain>", domain));
1892
1918
  }
1893
- return template;
1919
+ return barePublisher(template);
1894
1920
  }
1895
1921
  function coerceVersion2(manifest) {
1896
1922
  const scalar = (v) => typeof v === "string" ? v : typeof v === "number" ? String(v) : null;
@@ -2156,12 +2182,14 @@ async function resolveSourceConfigFromTree(explicit, blobByPath, fetchBlob) {
2156
2182
  async function discoverFromManifestTree(sourceConfig, blobByPath, fetchBlob, registry, includeDev = false) {
2157
2183
  const assets = [];
2158
2184
  const errors = [];
2185
+ const warnings = [];
2159
2186
  const allEdges = [];
2160
2187
  const devPaths = sourceConfig.dev_paths ?? [];
2161
2188
  const sortedEntries = [...sourceConfig.assets].sort((a, b) => a.path < b.path ? -1 : 1);
2162
2189
  for (const entry of sortedEntries) {
2163
2190
  if (!includeDev && isExcludedDevPath(entry.path, devPaths)) continue;
2164
2191
  const result = await processManifestEntryTree(entry, blobByPath, fetchBlob, registry);
2192
+ warnings.push(...result.warnings);
2165
2193
  if (result.errors.length > 0) {
2166
2194
  errors.push(...result.errors);
2167
2195
  if (!result.asset) continue;
@@ -2172,13 +2200,14 @@ async function discoverFromManifestTree(sourceConfig, blobByPath, fetchBlob, reg
2172
2200
  }
2173
2201
  }
2174
2202
  const graph = buildRequiresGraph(allEdges);
2175
- return { assets, graph, errors, warnings: [] };
2203
+ return { assets, graph, errors, warnings };
2176
2204
  }
2177
2205
  async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry) {
2178
2206
  const errors = [];
2207
+ const warnings = [];
2179
2208
  const assetRootRelative = entry.path;
2180
2209
  const files = resolveEntryFilesTree(entry, blobByPath, errors);
2181
- if (!files) return { asset: null, errors };
2210
+ if (!files) return { asset: null, errors, warnings };
2182
2211
  const manifestFileRel = pickManifestFileTree(entry.path, files, entry.kind, registry);
2183
2212
  const manifestFull = joinPosix(entry.path, manifestFileRel);
2184
2213
  const manifest = await fetchAndParseManifestTree(
@@ -2189,11 +2218,11 @@ async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry)
2189
2218
  fetchBlob,
2190
2219
  errors
2191
2220
  );
2192
- if (!manifest) return { asset: null, errors };
2221
+ if (!manifest) return { asset: null, errors, warnings };
2193
2222
  if (!registry.getProvider(entry.kind)) {
2194
- errors.push({
2223
+ warnings.push({
2195
2224
  path: assetRootRelative,
2196
- error: `Unknown asset kind "${entry.kind}" \u2014 ghost-installing without provider validation`
2225
+ warning: `Unknown asset kind "${entry.kind}" \u2014 ghost-installing without provider validation`
2197
2226
  });
2198
2227
  }
2199
2228
  const requiresErrors = validateRequiresSyntax2(entry.requires);
@@ -2202,7 +2231,7 @@ async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry)
2202
2231
  path: assetRootRelative,
2203
2232
  error: `ManifestRequiresError: ${requiresErrors.join("; ")}`
2204
2233
  });
2205
- return { asset: null, errors };
2234
+ return { asset: null, errors, warnings };
2206
2235
  }
2207
2236
  const computedHash = await computeAndVerifyHashTree(
2208
2237
  entry,
@@ -2210,10 +2239,12 @@ async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry)
2210
2239
  assetRootRelative,
2211
2240
  blobByPath,
2212
2241
  fetchBlob,
2213
- errors
2242
+ errors,
2243
+ warnings
2214
2244
  );
2215
- if (computedHash === null) return { asset: null, errors };
2216
- const ref = `${entry.publisher}/${entry.name}@${entry.version}`;
2245
+ if (computedHash === null) return { asset: null, errors, warnings };
2246
+ const publisher = barePublisher(entry.publisher);
2247
+ const ref = `@${publisher}/${entry.name}@${entry.version}`;
2217
2248
  const requires = entry.requires.map((to) => ({
2218
2249
  from: ref,
2219
2250
  to,
@@ -2226,7 +2257,7 @@ async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry)
2226
2257
  const asset = {
2227
2258
  ref,
2228
2259
  kind: entry.kind,
2229
- publisher: entry.publisher,
2260
+ publisher,
2230
2261
  name: entry.name,
2231
2262
  version: entry.version,
2232
2263
  manifest: mergedManifest,
@@ -2239,7 +2270,7 @@ async function processManifestEntryTree(entry, blobByPath, fetchBlob, registry)
2239
2270
  sha256: computedHash,
2240
2271
  requires
2241
2272
  };
2242
- return { asset, errors };
2273
+ return { asset, errors, warnings };
2243
2274
  }
2244
2275
  function resolveEntryFilesTree(entry, blobByPath, errors) {
2245
2276
  const assetRootRelative = entry.path;
@@ -2294,7 +2325,7 @@ async function fetchAndParseManifestTree(manifestFull, manifestFileRel, assetRoo
2294
2325
  }
2295
2326
  return manifest;
2296
2327
  }
2297
- async function computeAndVerifyHashTree(entry, files, assetRootRelative, blobByPath, fetchBlob, errors) {
2328
+ async function computeAndVerifyHashTree(entry, files, assetRootRelative, blobByPath, fetchBlob, errors, warnings) {
2298
2329
  let computedHash;
2299
2330
  try {
2300
2331
  computedHash = await computeManifestHashTree(entry.path, files, blobByPath, fetchBlob);
@@ -2313,9 +2344,10 @@ async function computeAndVerifyHashTree(entry, files, assetRootRelative, blobByP
2313
2344
  return null;
2314
2345
  }
2315
2346
  if (!entry.sha256) {
2316
- errors.push({
2347
+ warnings.push({
2317
2348
  path: assetRootRelative,
2318
- error: `Missing sha256 \u2014 computed ${computedHash}. Re-run \`skaile source build-manifest --write\` to pin it.`
2349
+ warning: "Missing sha256 \u2014 auto-computed locally (only needed for store publish).",
2350
+ code: "missing_sha256"
2319
2351
  });
2320
2352
  }
2321
2353
  return computedHash;
@@ -2385,6 +2417,6 @@ function validateRequiresSyntax2(requires) {
2385
2417
  // discovery/src/index.ts
2386
2418
  var VERSION = "0.0.0";
2387
2419
 
2388
- export { AGENT_COMPANION_DIRS, AssetKindRegistry, BUILTIN_PROVIDERS, DEFAULT_ATOMIZATION_POLICY, DOMAIN_MD_FILENAME, SEMVER_RE, SKILL_COMPANION_DIRS, SourceConfigSchema, VERSION, agentProvider, assignDomain, buildDomainIndex, buildRequiresGraph, closeOverReferences, computeDeterministicHash, computeDeterministicHashDetailed, connectorProvider, contractProvider, createDefaultRegistry, createNodeAssetFs, decodeManifestSourceConfig, detectCycles, discoverAssetsInTree, discoverAssetsInTreeEntries, discoverFromManifest, extractPathCandidates, extractRequires, extractSlashCommands, isDomainMdPath, isExcludedDevPath, isManifestMode, lintUncoveredReferences, loadMergedSourceConfig, loadSourceConfig, manifestToSourceConfig, mcpServerProvider, mergeSourceConfigs, parseDomainMd, parseSourceConfig, personaProvider, presetProvider, promptProvider, readManifestSourceConfig, rulesetProvider, scanAssetReferences, scanSlashCommandNames, skillProvider, validateDomains, validateSourceConfig };
2389
- //# sourceMappingURL=chunk-BZMTR5WW.js.map
2390
- //# sourceMappingURL=chunk-BZMTR5WW.js.map
2420
+ export { AGENT_COMPANION_DIRS, AssetKindRegistry, BUILTIN_PROVIDERS, DEFAULT_ATOMIZATION_POLICY, DOMAIN_MD_FILENAME, SEMVER_RE, SKILL_COMPANION_DIRS, SourceConfigSchema, VERSION, agentProvider, assignDomain, barePublisher, buildDomainIndex, buildRequiresGraph, closeOverReferences, computeDeterministicHash, computeDeterministicHashDetailed, connectorProvider, contractProvider, createDefaultRegistry, createNodeAssetFs, decodeManifestSourceConfig, detectCycles, discoverAssetsInTree, discoverAssetsInTreeEntries, discoverFromManifest, extractPathCandidates, extractRequires, extractSlashCommands, isDomainMdPath, isExcludedDevPath, isManifestMode, lintUncoveredReferences, loadMergedSourceConfig, loadMergedSourceConfigFromFile, loadSourceConfig, manifestToSourceConfig, mcpServerProvider, mergeSourceConfigs, parseDomainMd, parseSourceConfig, personaProvider, presetProvider, promptProvider, readManifestSourceConfig, rulesetProvider, scanAssetReferences, scanSlashCommandNames, skillProvider, validateDomains, validateSourceConfig };
2421
+ //# sourceMappingURL=chunk-MZV6WCF3.js.map
2422
+ //# sourceMappingURL=chunk-MZV6WCF3.js.map