@skaile/workspaces 0.40.2 → 0.41.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 (123) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/{asset-feeds-NOHUJ4XZ.js → asset-feeds-B3YOVIX6.js} +11 -11
  3. package/dist/{asset-feeds-NOHUJ4XZ.js.map → asset-feeds-B3YOVIX6.js.map} +1 -1
  4. package/dist/asset-manager/index.js +9 -9
  5. package/dist/asset-manager/installer.js +8 -8
  6. package/dist/{chunk-HL66R2P2.js → chunk-2PXSZYKV.js} +17 -8
  7. package/dist/chunk-2PXSZYKV.js.map +1 -0
  8. package/dist/{chunk-XZNPKJXU.js → chunk-4ZDA6Q5A.js} +4 -4
  9. package/dist/{chunk-XZNPKJXU.js.map → chunk-4ZDA6Q5A.js.map} +1 -1
  10. package/dist/{chunk-HAXQAC6D.js → chunk-54PBADZO.js} +3 -3
  11. package/dist/{chunk-HAXQAC6D.js.map → chunk-54PBADZO.js.map} +1 -1
  12. package/dist/{chunk-O66LT7UI.js → chunk-5PGFAYN3.js} +5 -5
  13. package/dist/{chunk-O66LT7UI.js.map → chunk-5PGFAYN3.js.map} +1 -1
  14. package/dist/{chunk-MAPRKFBD.js → chunk-B5PEERRZ.js} +18 -3
  15. package/dist/chunk-B5PEERRZ.js.map +1 -0
  16. package/dist/{chunk-CFCSDZYF.js → chunk-DUAB2AFV.js} +4 -4
  17. package/dist/{chunk-CFCSDZYF.js.map → chunk-DUAB2AFV.js.map} +1 -1
  18. package/dist/{chunk-SAXDHVJZ.js → chunk-DZCK7GRW.js} +3 -3
  19. package/dist/{chunk-SAXDHVJZ.js.map → chunk-DZCK7GRW.js.map} +1 -1
  20. package/dist/{chunk-BM7XANVN.js → chunk-GEEW6SY2.js} +10 -3
  21. package/dist/chunk-GEEW6SY2.js.map +1 -0
  22. package/dist/{chunk-USEFGACS.js → chunk-HUSXT2BN.js} +7 -7
  23. package/dist/{chunk-USEFGACS.js.map → chunk-HUSXT2BN.js.map} +1 -1
  24. package/dist/{chunk-XNMABEHH.js → chunk-IGNSNZPG.js} +5 -5
  25. package/dist/{chunk-XNMABEHH.js.map → chunk-IGNSNZPG.js.map} +1 -1
  26. package/dist/{chunk-2DYJ7BJG.js → chunk-LCJNBABB.js} +9 -9
  27. package/dist/{chunk-2DYJ7BJG.js.map → chunk-LCJNBABB.js.map} +1 -1
  28. package/dist/{chunk-23WP47VA.js → chunk-NXNBX56J.js} +2 -2
  29. package/dist/{chunk-23WP47VA.js.map → chunk-NXNBX56J.js.map} +1 -1
  30. package/dist/{chunk-WLWHOA3S.js → chunk-QGDCLTK2.js} +4 -4
  31. package/dist/{chunk-WLWHOA3S.js.map → chunk-QGDCLTK2.js.map} +1 -1
  32. package/dist/{chunk-CBXZB3G5.js → chunk-RVXP5KN5.js} +3 -3
  33. package/dist/{chunk-CBXZB3G5.js.map → chunk-RVXP5KN5.js.map} +1 -1
  34. package/dist/{chunk-EAWENE2K.js → chunk-SC3YNS4W.js} +4 -4
  35. package/dist/{chunk-EAWENE2K.js.map → chunk-SC3YNS4W.js.map} +1 -1
  36. package/dist/{chunk-C54IAYEU.js → chunk-TRVTY5AF.js} +3 -3
  37. package/dist/{chunk-C54IAYEU.js.map → chunk-TRVTY5AF.js.map} +1 -1
  38. package/dist/{chunk-KYC6JH75.js → chunk-UKJMQZV6.js} +3 -3
  39. package/dist/{chunk-KYC6JH75.js.map → chunk-UKJMQZV6.js.map} +1 -1
  40. package/dist/{chunk-J5DB4KHE.js → chunk-V2OSYOWR.js} +5 -5
  41. package/dist/{chunk-J5DB4KHE.js.map → chunk-V2OSYOWR.js.map} +1 -1
  42. package/dist/{chunk-FBIQ4QPF.js → chunk-VIA64TYP.js} +3 -3
  43. package/dist/{chunk-FBIQ4QPF.js.map → chunk-VIA64TYP.js.map} +1 -1
  44. package/dist/{chunk-4A2LAEX6.js → chunk-VMX4DA65.js} +4 -4
  45. package/dist/{chunk-4A2LAEX6.js.map → chunk-VMX4DA65.js.map} +1 -1
  46. package/dist/cli/index.js +36 -36
  47. package/dist/connectors/config.js +8 -8
  48. package/dist/connectors/index.js +9 -9
  49. package/dist/core/index.js +7 -7
  50. package/dist/core/manifest.js +2 -2
  51. package/dist/core/models.js +1 -1
  52. package/dist/core/publish-manifest.js +2 -2
  53. package/dist/core/ref.d.ts +2 -0
  54. package/dist/core/ref.js +29 -0
  55. package/dist/core/ref.js.map +1 -0
  56. package/dist/core/runtime-assets.js +5 -5
  57. package/dist/core/src/index.d.ts +1 -1
  58. package/dist/core/src/index.d.ts.map +1 -1
  59. package/dist/core/src/manifest.d.ts +0 -14
  60. package/dist/core/src/manifest.d.ts.map +1 -1
  61. package/dist/core/src/models.d.ts +20 -0
  62. package/dist/core/src/models.d.ts.map +1 -1
  63. package/dist/core/src/ref.d.ts +25 -0
  64. package/dist/core/src/ref.d.ts.map +1 -0
  65. package/dist/core/src/walker.d.ts.map +1 -1
  66. package/dist/core/workspace-config.js +4 -4
  67. package/dist/deploy/index.js +7 -7
  68. package/dist/discovery/index.js +4 -4
  69. package/dist/{ensure-sources-XITKRBLU.js → ensure-sources-EEH3DWH5.js} +13 -13
  70. package/dist/{ensure-sources-XITKRBLU.js.map → ensure-sources-EEH3DWH5.js.map} +1 -1
  71. package/dist/factory-assets/connectors/deploy.js +9 -9
  72. package/dist/factory-assets/connectors/devserver.js +9 -9
  73. package/dist/factory-assets/connectors/flow/adapter.js +9 -9
  74. package/dist/factory-assets/connectors/flow/engine.js +7 -7
  75. package/dist/factory-assets/connectors/flow/run-flow.js +10 -10
  76. package/dist/factory-assets/connectors/flow.js +9 -9
  77. package/dist/factory-assets/connectors/git.js +9 -9
  78. package/dist/factory-assets/connectors/gmail.js +9 -9
  79. package/dist/factory-assets/connectors/googledrive.js +9 -9
  80. package/dist/factory-assets/connectors/local.js +9 -9
  81. package/dist/factory-assets/connectors/mattermost.js +9 -9
  82. package/dist/factory-assets/connectors/memory.js +9 -9
  83. package/dist/factory-assets/connectors/minio.js +9 -9
  84. package/dist/factory-assets/connectors/postgres.js +9 -9
  85. package/dist/factory-assets/connectors/s3.js +9 -9
  86. package/dist/factory-assets/connectors/sharepoint.js +9 -9
  87. package/dist/factory-assets/connectors/sqlite.js +9 -9
  88. package/dist/factory-assets/connectors/static-server.js +9 -9
  89. package/dist/factory-assets/connectors/tunnel.js +9 -9
  90. package/dist/factory-assets/connectors/webdav.js +9 -9
  91. package/dist/factory-assets/connectors/xstate-store.js +9 -9
  92. package/dist/factory-assets/connectors/xstate.js +9 -9
  93. package/dist/{flows-BOJMGLRI.js → flows-ZYWYM5HR.js} +4 -4
  94. package/dist/{flows-BOJMGLRI.js.map → flows-ZYWYM5HR.js.map} +1 -1
  95. package/dist/library/index.js +11 -11
  96. package/dist/library/install.js +8 -8
  97. package/dist/open-library-5M67A7BN.js +23 -0
  98. package/dist/{open-library-5KJOZHG7.js.map → open-library-5M67A7BN.js.map} +1 -1
  99. package/dist/paths-RTD4IMYN.js +15 -0
  100. package/dist/{paths-66ZDGXK3.js.map → paths-RTD4IMYN.js.map} +1 -1
  101. package/dist/{plugin-store-BOQXW3XV.js → plugin-store-YEHJFGJS.js} +9 -9
  102. package/dist/{plugin-store-BOQXW3XV.js.map → plugin-store-YEHJFGJS.js.map} +1 -1
  103. package/dist/runner/index.js +11 -11
  104. package/dist/sdk/asset-manager.js +9 -9
  105. package/dist/sdk/core.js +7 -7
  106. package/dist/sdk/flow.js +7 -7
  107. package/dist/sdk/index.js +11 -11
  108. package/dist/sdk/runner.js +11 -11
  109. package/dist/{setup-JIGNL3O4.js → setup-VNS4I3OF.js} +9 -9
  110. package/dist/{setup-JIGNL3O4.js.map → setup-VNS4I3OF.js.map} +1 -1
  111. package/dist/store-client-GBWSRUZR.js +15 -0
  112. package/dist/{store-client-ODJJK5XS.js.map → store-client-GBWSRUZR.js.map} +1 -1
  113. package/dist/tui/index.js +11 -11
  114. package/dist/workspace-plugin/adapters/mcp.js +2 -2
  115. package/dist/workspace-plugin/adapters/omp.js +3 -3
  116. package/dist/workspace-plugin/index.js +1 -1
  117. package/package.json +7 -1
  118. package/dist/chunk-BM7XANVN.js.map +0 -1
  119. package/dist/chunk-HL66R2P2.js.map +0 -1
  120. package/dist/chunk-MAPRKFBD.js.map +0 -1
  121. package/dist/open-library-5KJOZHG7.js +0 -23
  122. package/dist/paths-66ZDGXK3.js +0 -15
  123. package/dist/store-client-ODJJK5XS.js +0 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.41.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#167](https://github.com/skaile-ai/workspaces/pull/167) [`971e789`](https://github.com/skaile-ai/workspaces/commit/971e78952bab2e3bc6430bccad799c5feca9fbdd) Thanks [@peteralbert](https://github.com/peteralbert)! - Add `@skaile/workspaces/core/ref` — the single source of truth for the catalog **wire** ref grammar `[kind:]publisher/name#version` (`@` = scope sigil, `#` = the only version delimiter; spec `2026-06-02-scoped-asset-ref-grammar`).
8
+
9
+ - `parseCatalogRef(ref)` — lenient parse (optional `kind:`, optional leading `@`) to `{ kind, publisher, name, version }`; returns `null` on malformed input and on a legacy `@version` ref (`@` is scope-only).
10
+ - `toCatalogWireRef(ref)` — normalize a loose ref (incl. an internal `@version` form) to the wire string: strip a leading `@`, rewrite a post-name `@version` to `#version`; idempotent.
11
+ - Re-exports the strict graph/lock parser (`parseAssetRef` / `assetRefToStr` / `isValidAssetName` / `ASSET_NAME_HINT`) so a consumer needs one import for either need.
12
+
13
+ The module is pure (only `semver`, no native deps), so DB-free consumers — the public store's catalog routes and the platform's store client — can value-import it and retire their duplicated local parsers (`parseStoreRef`, `toStoreRef`).
14
+
15
+ - [#165](https://github.com/skaile-ai/workspaces/pull/165) [`c639bc5`](https://github.com/skaile-ai/workspaces/commit/c639bc5625f075b0d801c0ca54eb9b7fadb5fad7) Thanks [@mortegro](https://github.com/mortegro)! - Tolerate non-canonical asset names from third-party sources we don't control.
16
+ The ingestion boundary (`scanDirectory`, the provenance walker) now slugifies a
17
+ human-styled identity (`"Complex App"` → `"complex-app"`) into a canonical
18
+ kebab-case name instead of crashing on `parseAssetRef`. The original is preserved
19
+ on `CatalogEntry.metadata.displayName` for display; identity uses the slug.
20
+
21
+ Adds a `slugifyAssetName(raw)` export to `@skaile/workspaces/core` (the inverse
22
+ companion to `isValidAssetName`). Authoring-time validation (`skaile validate`)
23
+ still rejects non-canonical names on raw frontmatter, so first-party typos surface
24
+ there rather than being silently rewritten.
25
+
3
26
  ## 0.40.2
4
27
 
5
28
  ### Patch Changes
@@ -1,13 +1,13 @@
1
- import './chunk-FBIQ4QPF.js';
2
- import { factoryAssetRoots } from './chunk-CFCSDZYF.js';
3
- import { scanRepo } from './chunk-HL66R2P2.js';
4
- import './chunk-SAXDHVJZ.js';
5
- import './chunk-MAPRKFBD.js';
6
- import './chunk-BM7XANVN.js';
1
+ import './chunk-VIA64TYP.js';
2
+ import './chunk-ZAP2BDHG.js';
3
+ import { factoryAssetRoots } from './chunk-DUAB2AFV.js';
4
+ import { scanRepo } from './chunk-2PXSZYKV.js';
5
+ import './chunk-DZCK7GRW.js';
6
+ import './chunk-B5PEERRZ.js';
7
+ import './chunk-GEEW6SY2.js';
7
8
  import './chunk-XGCXFX7X.js';
8
9
  import './chunk-O4JH3KUE.js';
9
10
  import './chunk-K5GBV4SA.js';
10
- import './chunk-ZAP2BDHG.js';
11
11
  import './chunk-JB35MVBN.js';
12
12
  import './chunk-NSBPE2FW.js';
13
13
  import { existsSync } from 'fs';
@@ -17,7 +17,7 @@ async function libraryAssets() {
17
17
  const notes = [];
18
18
  try {
19
19
  const [{ openLibraryManager }, { skaileHomeDir }] = await Promise.all([
20
- import('./open-library-5KJOZHG7.js'),
20
+ import('./open-library-5M67A7BN.js'),
21
21
  import('./library/index.js')
22
22
  ]);
23
23
  const { manager, close } = await openLibraryManager();
@@ -46,7 +46,7 @@ async function libraryAssets() {
46
46
  async function storeAssets(projectDir) {
47
47
  const notes = [];
48
48
  try {
49
- const { resolveCatalogSource } = await import('./open-library-5KJOZHG7.js');
49
+ const { resolveCatalogSource } = await import('./open-library-5M67A7BN.js');
50
50
  const { source, close } = await resolveCatalogSource({ projectDir });
51
51
  try {
52
52
  const assets = await source.listAssets();
@@ -120,5 +120,5 @@ async function gatherAssetFeeds(am, projectDir) {
120
120
  }
121
121
 
122
122
  export { gatherAssetFeeds };
123
- //# sourceMappingURL=asset-feeds-NOHUJ4XZ.js.map
124
- //# sourceMappingURL=asset-feeds-NOHUJ4XZ.js.map
123
+ //# sourceMappingURL=asset-feeds-B3YOVIX6.js.map
124
+ //# sourceMappingURL=asset-feeds-B3YOVIX6.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../cli/src/asset-feeds.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAkEA,eAAe,aAAA,GAAyE;AACtF,EAAA,MAAM,QAAoB,EAAC;AAC3B,EAAA,IAAI;AACF,IAAA,MAAM,CAAC,EAAE,kBAAA,EAAmB,EAAG,EAAE,eAAe,CAAA,GAAI,MAAM,OAAA,CAAQ,GAAA,CAAI;AAAA,MACpE,OAAO,4BAAmB,CAAA;AAAA,MAC1B,OAAO,oBAA4B;AAAA,KACpC,CAAA;AACD,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAM,GAAI,MAAM,kBAAA,EAAmB;AACpD,IAAA,IAAI;AACF,MAAA,MAAM,UAAA,GAAkB,IAAA,CAAA,IAAA,CAAK,aAAA,EAAc,EAAG,SAAS,CAAA;AACvD,MAAA,MAAM,IAAA,GAAA,CAAQ,MAAM,OAAA,CAAQ,aAAA,EAAc,EAAG,MAAA,CAAO,CAAC,CAAA,KAAM,CAAC,CAAA,CAAE,IAAA,CAAK,UAAA,CAAW,UAAU,CAAC,CAAA;AACzF,MAAA,MAAM,UAA0B,EAAC;AACjC,MAAA,KAAA,MAAW,OAAO,IAAA,EAAM;AACtB,QAAA,IAAI,CAAC,UAAA,CAAW,G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AA,CAAM,KAAA,EAAO,GAAG,OAAA,CAAQ,KAAK;AAAA,GACzD;AACF","file":"asset-feeds-NOHUJ4XZ.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` (filesystem\n * scan of each library's `path`).\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 { existsSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport {\n type AssetKind,\n type CatalogDomain,\n type CatalogEntry,\n factoryAssetRoots,\n scanRepo,\n} from \"@skaile/workspaces/core\";\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\nexport interface AssetFeedResult {\n entries: OriginEntry[];\n /**\n * Display-only domain metadata, keyed (by the consumer) on `slug`. Populated\n * from the store's `catalog.listDomains` when the connected catalog source\n * exposes it; empty otherwise. The manage TUI joins `entry.domainSlug` → a\n * domain for grouping headers, descriptions, and relation badges.\n */\n domains: CatalogDomain[];\n notes: FeedNote[];\n}\n\n/**\n * Pull assets from local libraries (the authoring places under\n * `~/.skaile/libraries/<name>/`, not the `~/.skaile/sources/` cache). Each\n * library's `path` is scanned with `scanRepo` and tagged with\n * `repository = \"library:<name>\"` so the manage TUI groups them into their\n * own headers.\n */\nasync function libraryAssets(): Promise<{ entries: CatalogEntry[]; notes: FeedNote[] }> {\n const notes: FeedNote[] = [];\n try {\n const [{ openLibraryManager }, { skaileHomeDir }] = await Promise.all([\n import(\"./open-library.ts\"),\n import(\"@skaile/workspaces/library\"),\n ]);\n const { manager, close } = await openLibraryManager();\n try {\n const sourcesDir = path.join(skaileHomeDir(), \"sources\");\n const libs = (await manager.listLibraries()).filter((l) => !l.path.startsWith(sourcesDir));\n const entries: CatalogEntry[] = [];\n for (const lib of libs) {\n if (!existsSync(lib.path)) continue;\n for (const e of scanRepo(lib.path, `library:${lib.name}`)) {\n entries.push(e);\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 domains: CatalogDomain[];\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 const assets = await source.listAssets();\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 domainSlug: a.domainSlug,\n category: a.category,\n version: a.version,\n requires: [],\n dependencies: [],\n }));\n // Domains are optional on the catalog source — only the store backend\n // (post Part 4 `catalog.listDomains`) exposes them. Duck-type the call so\n // older sources and the local catalog degrade to no domains, not an error.\n const domains = await loadDomains(source);\n return { entries, domains, 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: [], domains: [], notes };\n }\n}\n\n/** Optional `listDomains` capability — returns `[]` when the source lacks it. */\nasync function loadDomains(source: unknown): Promise<CatalogDomain[]> {\n const fn = (source as { listDomains?: () => Promise<CatalogDomain[]> }).listDomains;\n if (typeof fn !== \"function\") return [];\n const domains = await fn.call(source);\n return Array.isArray(domains) ? domains : [];\n}\n\n/**\n * Project-source feed: leans on `AssetManager.search()`, which now merges\n * `skaile.yaml`'s `sources:` field into the repositories map. Provided as a\n * function rather than an inline call so the caller can supply a fresh\n * `AssetManager` instance.\n */\nfunction sourceAssets(am: { search: () => CatalogEntry[] }): CatalogEntry[] {\n return am.search();\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). Synchronous, 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 */\nfunction factoryAssets(): { entries: CatalogEntry[]; notes: FeedNote[] } {\n const notes: FeedNote[] = [];\n try {\n const entries: CatalogEntry[] = [];\n for (const root of factoryAssetRoots()) {\n for (const e of scanRepo(root, \"skaile-factory\")) entries.push(e);\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 + synchronous, so it runs inline.\n */\nexport async function gatherAssetFeeds(\n am: { search: () => CatalogEntry[] },\n projectDir: string,\n): Promise<AssetFeedResult> {\n const [libs, store] = await Promise.all([libraryAssets(), storeAssets(projectDir)]);\n const factory = factoryAssets();\n return {\n entries: [\n ...tag(\"source\", sourceAssets(am)),\n ...tag(\"library\", libs.entries),\n ...tag(\"factory\", factory.entries),\n ...tag(\"store\", store.entries),\n ],\n domains: store.domains,\n notes: [...libs.notes, ...store.notes, ...factory.notes],\n };\n}\n"]}
1
+ {"version":3,"sources":["../cli/src/asset-feeds.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAkEA,eAAe,aAAA,GAAyE;AACtF,EAAA,MAAM,QAAoB,EAAC;AAC3B,EAAA,IAAI;AACF,IAAA,MAAM,CAAC,EAAE,kBAAA,EAAmB,EAAG,EAAE,eAAe,CAAA,GAAI,MAAM,OAAA,CAAQ,GAAA,CAAI;AAAA,MACpE,OAAO,4BAAmB,CAAA;AAAA,MAC1B,OAAO,oBAA4B;AAAA,KACpC,CAAA;AACD,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAM,GAAI,MAAM,kBAAA,EAAmB;AACpD,IAAA,IAAI;AACF,MAAA,MAAM,UAAA,GAAkB,IAAA,CAAA,IAAA,CAAK,aAAA,EAAc,EAAG,SAAS,CAAA;AACvD,MAAA,MAAM,IAAA,GAAA,CAAQ,MAAM,OAAA,CAAQ,aAAA,EAAc,EAAG,MAAA,CAAO,CAAC,CAAA,KAAM,CAAC,CAAA,CAAE,IAAA,CAAK,UAAA,CAAW,UAAU,CAAC,CAAA;AACzF,MAAA,MAAM,UAA0B,EAAC;AACjC,MAAA,KAAA,M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ACf,KAAA,EAAO,CAAC,GAAG,IAAA,CAAK,KAAA,EAAO,GAAG,KAAA,CAAM,KAAA,EAAO,GAAG,OAAA,CAAQ,KAAK;AAAA,GACzD;AACF","file":"asset-feeds-B3YOVIX6.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` (filesystem\n * scan of each library's `path`).\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 { existsSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport {\n type AssetKind,\n type CatalogDomain,\n type CatalogEntry,\n factoryAssetRoots,\n scanRepo,\n} from \"@skaile/workspaces/core\";\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\nexport interface AssetFeedResult {\n entries: OriginEntry[];\n /**\n * Display-only domain metadata, keyed (by the consumer) on `slug`. Populated\n * from the store's `catalog.listDomains` when the connected catalog source\n * exposes it; empty otherwise. The manage TUI joins `entry.domainSlug` → a\n * domain for grouping headers, descriptions, and relation badges.\n */\n domains: CatalogDomain[];\n notes: FeedNote[];\n}\n\n/**\n * Pull assets from local libraries (the authoring places under\n * `~/.skaile/libraries/<name>/`, not the `~/.skaile/sources/` cache). Each\n * library's `path` is scanned with `scanRepo` and tagged with\n * `repository = \"library:<name>\"` so the manage TUI groups them into their\n * own headers.\n */\nasync function libraryAssets(): Promise<{ entries: CatalogEntry[]; notes: FeedNote[] }> {\n const notes: FeedNote[] = [];\n try {\n const [{ openLibraryManager }, { skaileHomeDir }] = await Promise.all([\n import(\"./open-library.ts\"),\n import(\"@skaile/workspaces/library\"),\n ]);\n const { manager, close } = await openLibraryManager();\n try {\n const sourcesDir = path.join(skaileHomeDir(), \"sources\");\n const libs = (await manager.listLibraries()).filter((l) => !l.path.startsWith(sourcesDir));\n const entries: CatalogEntry[] = [];\n for (const lib of libs) {\n if (!existsSync(lib.path)) continue;\n for (const e of scanRepo(lib.path, `library:${lib.name}`)) {\n entries.push(e);\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 domains: CatalogDomain[];\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 const assets = await source.listAssets();\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 domainSlug: a.domainSlug,\n category: a.category,\n version: a.version,\n requires: [],\n dependencies: [],\n }));\n // Domains are optional on the catalog source — only the store backend\n // (post Part 4 `catalog.listDomains`) exposes them. Duck-type the call so\n // older sources and the local catalog degrade to no domains, not an error.\n const domains = await loadDomains(source);\n return { entries, domains, 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: [], domains: [], notes };\n }\n}\n\n/** Optional `listDomains` capability — returns `[]` when the source lacks it. */\nasync function loadDomains(source: unknown): Promise<CatalogDomain[]> {\n const fn = (source as { listDomains?: () => Promise<CatalogDomain[]> }).listDomains;\n if (typeof fn !== \"function\") return [];\n const domains = await fn.call(source);\n return Array.isArray(domains) ? domains : [];\n}\n\n/**\n * Project-source feed: leans on `AssetManager.search()`, which now merges\n * `skaile.yaml`'s `sources:` field into the repositories map. Provided as a\n * function rather than an inline call so the caller can supply a fresh\n * `AssetManager` instance.\n */\nfunction sourceAssets(am: { search: () => CatalogEntry[] }): CatalogEntry[] {\n return am.search();\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). Synchronous, 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 */\nfunction factoryAssets(): { entries: CatalogEntry[]; notes: FeedNote[] } {\n const notes: FeedNote[] = [];\n try {\n const entries: CatalogEntry[] = [];\n for (const root of factoryAssetRoots()) {\n for (const e of scanRepo(root, \"skaile-factory\")) entries.push(e);\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 + synchronous, so it runs inline.\n */\nexport async function gatherAssetFeeds(\n am: { search: () => CatalogEntry[] },\n projectDir: string,\n): Promise<AssetFeedResult> {\n const [libs, store] = await Promise.all([libraryAssets(), storeAssets(projectDir)]);\n const factory = factoryAssets();\n return {\n entries: [\n ...tag(\"source\", sourceAssets(am)),\n ...tag(\"library\", libs.entries),\n ...tag(\"factory\", factory.entries),\n ...tag(\"store\", store.entries),\n ],\n domains: store.domains,\n notes: [...libs.notes, ...store.notes, ...factory.notes],\n };\n}\n"]}
@@ -1,15 +1,15 @@
1
- export { AssetManager, parseCanonicalLockKey } from '../chunk-USEFGACS.js';
2
- export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-4A2LAEX6.js';
3
- import '../chunk-FBIQ4QPF.js';
4
- import '../chunk-CFCSDZYF.js';
5
- import '../chunk-HL66R2P2.js';
6
- import '../chunk-SAXDHVJZ.js';
7
- import '../chunk-MAPRKFBD.js';
8
- import '../chunk-BM7XANVN.js';
1
+ export { AssetManager, parseCanonicalLockKey } from '../chunk-HUSXT2BN.js';
2
+ export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-VMX4DA65.js';
3
+ import '../chunk-VIA64TYP.js';
4
+ import '../chunk-ZAP2BDHG.js';
5
+ import '../chunk-DUAB2AFV.js';
6
+ import '../chunk-2PXSZYKV.js';
7
+ import '../chunk-DZCK7GRW.js';
8
+ import '../chunk-B5PEERRZ.js';
9
+ import '../chunk-GEEW6SY2.js';
9
10
  import '../chunk-XGCXFX7X.js';
10
11
  import '../chunk-O4JH3KUE.js';
11
12
  import '../chunk-K5GBV4SA.js';
12
- import '../chunk-ZAP2BDHG.js';
13
13
  import '../chunk-JB35MVBN.js';
14
14
  export { appendHistory, clearHistory, getRecentHistory, loadHistory } from '../chunk-KTBKW2FI.js';
15
15
  import '../chunk-UQ6LFBPZ.js';
@@ -1,14 +1,14 @@
1
- export { createScaffold, deployAll, deployAsset, removeAsset } from '../chunk-4A2LAEX6.js';
2
- import '../chunk-FBIQ4QPF.js';
3
- import '../chunk-CFCSDZYF.js';
4
- import '../chunk-HL66R2P2.js';
5
- import '../chunk-SAXDHVJZ.js';
6
- import '../chunk-MAPRKFBD.js';
7
- import '../chunk-BM7XANVN.js';
1
+ export { createScaffold, deployAll, deployAsset, removeAsset } from '../chunk-VMX4DA65.js';
2
+ import '../chunk-VIA64TYP.js';
3
+ import '../chunk-ZAP2BDHG.js';
4
+ import '../chunk-DUAB2AFV.js';
5
+ import '../chunk-2PXSZYKV.js';
6
+ import '../chunk-DZCK7GRW.js';
7
+ import '../chunk-B5PEERRZ.js';
8
+ import '../chunk-GEEW6SY2.js';
8
9
  import '../chunk-XGCXFX7X.js';
9
10
  import '../chunk-O4JH3KUE.js';
10
11
  import '../chunk-K5GBV4SA.js';
11
- import '../chunk-ZAP2BDHG.js';
12
12
  import '../chunk-JB35MVBN.js';
13
13
  import '../chunk-67MFR5LS.js';
14
14
  import '../chunk-HRKB2ATT.js';
@@ -1,6 +1,6 @@
1
- import { decodeSkaileManifest, SKAILE_MANIFEST_FILENAME } from './chunk-SAXDHVJZ.js';
2
- import { scanDirectory, parseFrontmatter, bundleDepRefs, fromMcpServerMd } from './chunk-MAPRKFBD.js';
3
- import { parseAssetRef, assetRefToStr } from './chunk-BM7XANVN.js';
1
+ import { decodeSkaileManifest, SKAILE_MANIFEST_FILENAME } from './chunk-DZCK7GRW.js';
2
+ import { scanDirectory, parseFrontmatter, bundleDepRefs, fromMcpServerMd } from './chunk-B5PEERRZ.js';
3
+ import { isValidAssetName, slugifyAssetName, parseAssetRef, assetRefToStr } from './chunk-GEEW6SY2.js';
4
4
  import { mkdirSync, existsSync, readFileSync, writeFileSync, lstatSync, symlinkSync, rmSync, readdirSync, cpSync } from 'fs';
5
5
  import { homedir } from 'os';
6
6
  import { join, resolve, relative, dirname, parse as parse$1, basename } from 'path';
@@ -567,12 +567,13 @@ function walkWithManifest(clone, manifestPath, index) {
567
567
  }
568
568
  const curatedSource = a.source ?? manifest.source;
569
569
  const version = a.version ?? manifestVersion;
570
+ const name = canonicalAssetName(a.name);
570
571
  const resolved = resolveAssetBytes(clone, repoRoot, a, curatedSource);
571
572
  const { files } = resolved;
572
573
  const candidate = {
573
574
  publisher: assetPublisher,
574
575
  kind: a.kind,
575
- name: a.name,
576
+ name,
576
577
  version,
577
578
  sourceUrl: resolved.sourceUrl,
578
579
  commit: resolved.commit,
@@ -582,10 +583,18 @@ function walkWithManifest(clone, manifestPath, index) {
582
583
  deps: a.dependencies ?? bundleDeps(repoRoot, files, a.kind)
583
584
  };
584
585
  applyStoreListingMetadata(candidate, a, manifest, resolved.frontmatter);
585
- push(index, `${assetPublisher}/${a.kind}:${a.name}`, candidate);
586
+ push(index, `${assetPublisher}/${a.kind}:${name}`, candidate);
586
587
  }
587
588
  return true;
588
589
  }
590
+ function canonicalAssetName(raw) {
591
+ if (isValidAssetName(raw)) return raw;
592
+ try {
593
+ return slugifyAssetName(raw);
594
+ } catch {
595
+ return raw;
596
+ }
597
+ }
589
598
  function resolveAssetBytes(clone, repoRoot, a, curatedSource) {
590
599
  if (curatedSource) {
591
600
  return {
@@ -703,7 +712,7 @@ function verifyNameMatch(repoRoot, files, expectedName, kind) {
703
712
  if (!md) return;
704
713
  const { data } = parseFrontmatter(readFileSync(join(repoRoot, md.path), "utf8"));
705
714
  const declared = typeof data.name === "string" ? data.name : void 0;
706
- if (declared && declared !== expectedName) {
715
+ if (declared && canonicalAssetName(declared) !== canonicalAssetName(expectedName)) {
707
716
  throw new Error(
708
717
  `name mismatch: ${mdName} says "${declared}", skaile.manifest.yaml says "${expectedName}" \u2014 index-time hard error.`
709
718
  );
@@ -1639,5 +1648,5 @@ function resolveAgentDir(projectDir) {
1639
1648
  }
1640
1649
 
1641
1650
  export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SKAILE_YAML_DEFAULT, SKAILE_YAML_SUFFIX, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, deriveSingleMaterializedMcpDeclaration, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, isWorkspaceConfigFilename, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, mergeSkWorkspaceConfigs, normalizeConfig, pullRepo, readLinks, resolveAgentDir, resolveAll, resolveAsset, resolveSkWorkspaceConfig, saveSkWorkspaceConfig, scanRepo, stageMaterializedSkills, unlinkRepo, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, workspaceNameFromFilename, writeLinks };
1642
- //# sourceMappingURL=chunk-HL66R2P2.js.map
1643
- //# sourceMappingURL=chunk-HL66R2P2.js.map
1651
+ //# sourceMappingURL=chunk-2PXSZYKV.js.map
1652
+ //# sourceMappingURL=chunk-2PXSZYKV.js.map