@skaile/workspaces 0.33.0 → 0.35.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 (139) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/{asset-feeds-DX5JPM76.js → asset-feeds-PCLTE2W5.js} +20 -12
  3. package/dist/asset-feeds-PCLTE2W5.js.map +1 -0
  4. package/dist/asset-manager/index.js +8 -8
  5. package/dist/asset-manager/installer.js +7 -7
  6. package/dist/{chunk-PKPUVQJP.js → chunk-2Q6OY3SU.js} +3 -3
  7. package/dist/{chunk-PKPUVQJP.js.map → chunk-2Q6OY3SU.js.map} +1 -1
  8. package/dist/{chunk-LRFZNLB2.js → chunk-52HINMW4.js} +3 -3
  9. package/dist/{chunk-LRFZNLB2.js.map → chunk-52HINMW4.js.map} +1 -1
  10. package/dist/{chunk-AZODLVKH.js → chunk-56YT6CWS.js} +5 -5
  11. package/dist/{chunk-AZODLVKH.js.map → chunk-56YT6CWS.js.map} +1 -1
  12. package/dist/{chunk-RQG5TXIR.js → chunk-5DPQ766L.js} +4 -4
  13. package/dist/{chunk-RQG5TXIR.js.map → chunk-5DPQ766L.js.map} +1 -1
  14. package/dist/{chunk-BUMDC3R2.js → chunk-6422UOMQ.js} +5 -5
  15. package/dist/{chunk-BUMDC3R2.js.map → chunk-6422UOMQ.js.map} +1 -1
  16. package/dist/{chunk-XQRAXAL5.js → chunk-7B3CL5JT.js} +7 -7
  17. package/dist/{chunk-XQRAXAL5.js.map → chunk-7B3CL5JT.js.map} +1 -1
  18. package/dist/{chunk-LFDZYCEO.js → chunk-BM7XANVN.js} +2 -2
  19. package/dist/chunk-BM7XANVN.js.map +1 -0
  20. package/dist/{chunk-QUWXW2N3.js → chunk-EOCKR5TN.js} +3 -3
  21. package/dist/{chunk-QUWXW2N3.js.map → chunk-EOCKR5TN.js.map} +1 -1
  22. package/dist/{chunk-EJZFQCQG.js → chunk-I3TERDTR.js} +2 -2
  23. package/dist/{chunk-EJZFQCQG.js.map → chunk-I3TERDTR.js.map} +1 -1
  24. package/dist/{chunk-N74UQJPN.js → chunk-KYC6JH75.js} +3 -3
  25. package/dist/{chunk-N74UQJPN.js.map → chunk-KYC6JH75.js.map} +1 -1
  26. package/dist/{chunk-4AGIEU7V.js → chunk-MAPRKFBD.js} +3 -3
  27. package/dist/{chunk-4AGIEU7V.js.map → chunk-MAPRKFBD.js.map} +1 -1
  28. package/dist/{chunk-362QBS57.js → chunk-NAMD4AIK.js} +235 -13
  29. package/dist/chunk-NAMD4AIK.js.map +1 -0
  30. package/dist/{chunk-KKERAIPQ.js → chunk-O2OHGE4S.js} +4 -4
  31. package/dist/{chunk-KKERAIPQ.js.map → chunk-O2OHGE4S.js.map} +1 -1
  32. package/dist/{chunk-7MANNJ3U.js → chunk-O4PANZI2.js} +5 -5
  33. package/dist/{chunk-7MANNJ3U.js.map → chunk-O4PANZI2.js.map} +1 -1
  34. package/dist/{chunk-H5YXL4KI.js → chunk-SAXDHVJZ.js} +3 -3
  35. package/dist/{chunk-H5YXL4KI.js.map → chunk-SAXDHVJZ.js.map} +1 -1
  36. package/dist/{chunk-R2I7RHT7.js → chunk-SKVUDDHE.js} +191 -23
  37. package/dist/chunk-SKVUDDHE.js.map +1 -0
  38. package/dist/{chunk-PWXN2KHV.js → chunk-UAYAK7N4.js} +5 -5
  39. package/dist/{chunk-PWXN2KHV.js.map → chunk-UAYAK7N4.js.map} +1 -1
  40. package/dist/{chunk-PTDVTMQL.js → chunk-WEQN6EWW.js} +4 -4
  41. package/dist/{chunk-PTDVTMQL.js.map → chunk-WEQN6EWW.js.map} +1 -1
  42. package/dist/{chunk-VXW2K4YH.js → chunk-XOBPOVFT.js} +3 -3
  43. package/dist/{chunk-VXW2K4YH.js.map → chunk-XOBPOVFT.js.map} +1 -1
  44. package/dist/{chunk-4ZVS6KV4.js → chunk-ZGJE4ZDP.js} +2 -2
  45. package/dist/{chunk-4ZVS6KV4.js.map → chunk-ZGJE4ZDP.js.map} +1 -1
  46. package/dist/cli/index.js +196 -101
  47. package/dist/cli/index.js.map +1 -1
  48. package/dist/cli/src/asset-feeds.d.ts +8 -1
  49. package/dist/cli/src/asset-feeds.d.ts.map +1 -1
  50. package/dist/cli/src/commands/manage.d.ts +33 -22
  51. package/dist/cli/src/commands/manage.d.ts.map +1 -1
  52. package/dist/connectors/config.js +7 -7
  53. package/dist/connectors/index.js +8 -8
  54. package/dist/connectors/src/connector-manager.d.ts +56 -3
  55. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  56. package/dist/connectors/src/fleet-health-gate.d.ts +86 -0
  57. package/dist/connectors/src/fleet-health-gate.d.ts.map +1 -0
  58. package/dist/connectors/src/fleet-utils.d.ts +16 -0
  59. package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
  60. package/dist/connectors/src/index.d.ts +4 -1
  61. package/dist/connectors/src/index.d.ts.map +1 -1
  62. package/dist/connectors/src/mount-placeholder.d.ts +8 -0
  63. package/dist/connectors/src/mount-placeholder.d.ts.map +1 -1
  64. package/dist/core/index.js +6 -6
  65. package/dist/core/manifest.js +2 -2
  66. package/dist/core/models.js +1 -1
  67. package/dist/core/publish-manifest.js +2 -2
  68. package/dist/core/runtime-assets.js +5 -5
  69. package/dist/core/src/index.d.ts +1 -1
  70. package/dist/core/src/index.d.ts.map +1 -1
  71. package/dist/core/src/models.d.ts +28 -0
  72. package/dist/core/src/models.d.ts.map +1 -1
  73. package/dist/core/src/workspace-config.d.ts +13 -0
  74. package/dist/core/src/workspace-config.d.ts.map +1 -1
  75. package/dist/core/workspace-config.js +4 -4
  76. package/dist/deploy/index.js +6 -6
  77. package/dist/discovery/index.js +4 -4
  78. package/dist/{ensure-sources-O6RMWP6C.js → ensure-sources-HMMEQEZC.js} +11 -11
  79. package/dist/{ensure-sources-O6RMWP6C.js.map → ensure-sources-HMMEQEZC.js.map} +1 -1
  80. package/dist/factory-assets/connectors/deploy.js +8 -8
  81. package/dist/factory-assets/connectors/devserver.js +8 -8
  82. package/dist/factory-assets/connectors/flow/adapter.js +8 -8
  83. package/dist/factory-assets/connectors/flow/engine.js +6 -6
  84. package/dist/factory-assets/connectors/flow/run-flow.js +9 -9
  85. package/dist/factory-assets/connectors/flow.js +8 -8
  86. package/dist/factory-assets/connectors/git.js +8 -8
  87. package/dist/factory-assets/connectors/gmail.js +8 -8
  88. package/dist/factory-assets/connectors/googledrive.js +8 -8
  89. package/dist/factory-assets/connectors/local.js +8 -8
  90. package/dist/factory-assets/connectors/mattermost.js +8 -8
  91. package/dist/factory-assets/connectors/memory.js +8 -8
  92. package/dist/factory-assets/connectors/minio.js +8 -8
  93. package/dist/factory-assets/connectors/postgres.js +8 -8
  94. package/dist/factory-assets/connectors/s3.js +8 -8
  95. package/dist/factory-assets/connectors/sharepoint.js +8 -8
  96. package/dist/factory-assets/connectors/sqlite.js +8 -8
  97. package/dist/factory-assets/connectors/static-server.js +8 -8
  98. package/dist/factory-assets/connectors/tunnel.js +8 -8
  99. package/dist/factory-assets/connectors/webdav.js +8 -8
  100. package/dist/factory-assets/connectors/xstate-store.js +8 -8
  101. package/dist/factory-assets/connectors/xstate.js +8 -8
  102. package/dist/{flows-QWYIUDA2.js → flows-O7OXGFIY.js} +3 -3
  103. package/dist/{flows-QWYIUDA2.js.map → flows-O7OXGFIY.js.map} +1 -1
  104. package/dist/library/index.js +9 -9
  105. package/dist/library/install.js +7 -7
  106. package/dist/open-library-5WWTBHQD.js +23 -0
  107. package/dist/{open-library-B7BLYXYK.js.map → open-library-5WWTBHQD.js.map} +1 -1
  108. package/dist/paths-UC3ZHLKC.js +15 -0
  109. package/dist/{paths-5IUR235S.js.map → paths-UC3ZHLKC.js.map} +1 -1
  110. package/dist/{plugin-store-WWOJXWG7.js → plugin-store-R2WLXRT3.js} +8 -8
  111. package/dist/{plugin-store-WWOJXWG7.js.map → plugin-store-R2WLXRT3.js.map} +1 -1
  112. package/dist/runner/index.js +10 -10
  113. package/dist/runner/src/external-mcp.d.ts +45 -4
  114. package/dist/runner/src/external-mcp.d.ts.map +1 -1
  115. package/dist/runner/src/fleet-health-flag-dispatcher.d.ts +40 -0
  116. package/dist/runner/src/fleet-health-flag-dispatcher.d.ts.map +1 -0
  117. package/dist/runner/src/resources.d.ts.map +1 -1
  118. package/dist/runner/src/serve.d.ts.map +1 -1
  119. package/dist/sdk/asset-manager.js +8 -8
  120. package/dist/sdk/core.js +6 -6
  121. package/dist/sdk/flow.js +6 -6
  122. package/dist/sdk/index.js +10 -10
  123. package/dist/sdk/runner.js +10 -10
  124. package/dist/{setup-2RD6EDBZ.js → setup-BSDHVMR6.js} +8 -8
  125. package/dist/{setup-2RD6EDBZ.js.map → setup-BSDHVMR6.js.map} +1 -1
  126. package/dist/store-client-4GKV4LOD.js +15 -0
  127. package/dist/{store-client-XQQRHYDW.js.map → store-client-4GKV4LOD.js.map} +1 -1
  128. package/dist/tui/index.js +10 -10
  129. package/dist/workspace-plugin/adapters/mcp.js +1 -1
  130. package/dist/workspace-plugin/adapters/omp.js +3 -3
  131. package/dist/workspace-plugin/index.js +1 -1
  132. package/package.json +1 -1
  133. package/dist/asset-feeds-DX5JPM76.js.map +0 -1
  134. package/dist/chunk-362QBS57.js.map +0 -1
  135. package/dist/chunk-LFDZYCEO.js.map +0 -1
  136. package/dist/chunk-R2I7RHT7.js.map +0 -1
  137. package/dist/open-library-B7BLYXYK.js +0 -23
  138. package/dist/paths-5IUR235S.js +0 -15
  139. package/dist/store-client-XQQRHYDW.js +0 -15
package/CHANGELOG.md CHANGED
@@ -1,5 +1,67 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.35.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#122](https://github.com/skaile-ai/workspaces/pull/122) [`a20ed98`](https://github.com/skaile-ai/workspaces/commit/a20ed9841a4e10c82c2039ca726159a6493d3bdd) Thanks [@mortegro](https://github.com/mortegro)! - `skaile manage` now groups assets `publisher → domain → asset`, surfacing sidecar
8
+ `DOMAIN.md` navigational domains. Repo provenance moves from a grouping level to a
9
+ dim per-asset badge. Domain headers are navigational (collapse/expand + a `[d]`
10
+ info region showing the domain description, relation badge, recommended pick, and
11
+ sidecar source) and never bulk-install. Per-asset relation glyphs (`[add]`/`▷alt`/
12
+ `⇣N`) and a `★` recommended marker render from the domain's metadata.
13
+
14
+ Adds the `CatalogDomain` type and `DomainRelation` union to `@skaile/workspaces/core`,
15
+ and a `domains` channel on the manage feed (`AssetFeedResult.domains`), populated
16
+ when the connected catalog source exposes `listDomains` and empty otherwise — so a
17
+ domain-free catalog renders exactly like the previous flat publisher list.
18
+
19
+ ### Patch Changes
20
+
21
+ - [#137](https://github.com/skaile-ai/workspaces/pull/137) [`742e6d8`](https://github.com/skaile-ai/workspaces/commit/742e6d87b3b797eaad77c3a5e1ebc8e1e55bc73b) Thanks [@peteralbert](https://github.com/peteralbert)! - fix(connectors): ungate on dispose when a gate is still in-flight
22
+
23
+ `FleetHealthGate.dispose()` now also handles the in-flight gate window. While an `establish()` is pending, `gated` is still `false` but `pendingGated` is `true`; the old guard returned the in-flight promise without enqueuing an `ungate()`, leaking the read-only barrier once the gate finished. `dispose()` now clears `pendingGated` and enqueues `ungate()`, which chains after the in-flight establish via the existing transition queue.
24
+
25
+ - [#139](https://github.com/skaile-ai/workspaces/pull/139) [`6d37639`](https://github.com/skaile-ai/workspaces/commit/6d37639bcebfd4e1fc24fe2a45c3d8c223b762ce) Thanks [@peteralbert](https://github.com/peteralbert)! - fix(connectors): tolerate a live/broken FUSE target in gate establish
26
+
27
+ `RoMountPlaceholderBarrier.establish()` no longer throws when its target is a live `:rshared` FUSE bind or a broken one. The `mkdir(target, { recursive: true })` step used to surface a raw `EEXIST` (live/broken mountpoint the kernel reports as existing but Node can't stat as a fresh dir) or `ENOTCONN` ("Transport endpoint is not connected") straight out of `establish()` and out of `FleetHealthGate.gate()`. It now tolerates `EEXIST`/`ENOTCONN`/`EBUSY`/`ENOTDIR` and proceeds to the protect step; any other mkdir failure degrades via the existing `chmodFallback` instead of throwing. The tmpfs-over-mount path already degrades to chmod (and then to a tracked, loudly-logged "unprotected" state) on failure, so a gate-establish attempt over a thrashed fleet bind can never throw a raw error or further corrupt the mount. Fail-closed semantics are preserved.
28
+
29
+ ## 0.34.0
30
+
31
+ ### Minor Changes
32
+
33
+ - [#134](https://github.com/skaile-ai/workspaces/pull/134) [`4dc5050`](https://github.com/skaile-ai/workspaces/commit/4dc5050eeafa3ea0e28c857a732df57d6a7bad2d) Thanks [@peteralbert](https://github.com/peteralbert)! - Add a health-aware read-only gate for fleet-managed mounts (B-180). A fleet
34
+ mount is bound live by the host fleet rclone and so is excluded from the
35
+ boot-time no-phantom-workspace barrier; that exclusion is only safe while the
36
+ fleet rclone is healthy. When it wedges (`EIO`, or a silently-empty-but-writable
37
+ degradation), `FleetHealthGate` now dynamically establishes the same
38
+ `MountPlaceholderBarrier` over the live target until the mount recovers,
39
+ closing the window where a wedged fleet mount would let the agent write a
40
+ divergent phantom workspace.
41
+
42
+ Two detectors feed one debounced, fail-closed gate: a self-contained local
43
+ `stat`/`readdir` probe (catches EIO / dead-bind) and a platform health signal
44
+ consumed from `<workspace>/.skaile/fleet-health/<id>` via the new
45
+ `ConnectorManager.reportFleetHealth(id, verdict)` (catches silent degradation).
46
+ Healthy fleet mounts stay writable exactly as before. Poll interval is
47
+ `SKAILE_FLEET_HEALTH_POLL_MS` (default 5000; 0 disables the local probe). See
48
+ `MIGRATION.md` for the optional platform emit-side contract.
49
+
50
+ - [#135](https://github.com/skaile-ai/workspaces/pull/135) [`6cc1a07`](https://github.com/skaile-ai/workspaces/commit/6cc1a073f73a56ae0ed5128ecc294f95b312bd6d) Thanks [@peteralbert](https://github.com/peteralbert)! - Runner-managed remote MCP servers now recover from a mid-session 401. When a
51
+ tool call (or the initial connect) on an `auth: backend` http/sse MCP server is
52
+ rejected with a 401, `ExternalMcpManager` re-mints the bearer through the
53
+ platform mediator (`host.refresh_credential { kind: 'mcp-server', reason:
54
+ 'retry-401' }`), rewrites the provisioned `MCP__<id>__AUTH` secret, rebuilds the
55
+ transport, and reconnects the client in place — then retries the call once.
56
+ Concurrent 401s for the same server share one re-mint round-trip (per-server
57
+ in-flight gate), and capability registrations stay stable across the swap.
58
+
59
+ `McpServerDeclaration` gains two optional fields — `auth` and `providerLinkId` —
60
+ modelling the remote-server credential metadata the platform already writes into
61
+ `mcp_servers` entries (additive; existing declarations are unaffected).
62
+
63
+ Pairs with the platform's real remote-MCP OAuth token-endpoint refresh.
64
+
3
65
  ## 0.33.0
4
66
 
5
67
  ### Minor Changes
@@ -1,9 +1,9 @@
1
- import './chunk-PKPUVQJP.js';
2
- import './chunk-RQG5TXIR.js';
3
- import { scanRepo } from './chunk-AZODLVKH.js';
4
- import './chunk-H5YXL4KI.js';
5
- import './chunk-4AGIEU7V.js';
6
- import './chunk-LFDZYCEO.js';
1
+ import './chunk-2Q6OY3SU.js';
2
+ import './chunk-5DPQ766L.js';
3
+ import { scanRepo } from './chunk-56YT6CWS.js';
4
+ import './chunk-SAXDHVJZ.js';
5
+ import './chunk-MAPRKFBD.js';
6
+ import './chunk-BM7XANVN.js';
7
7
  import './chunk-XGCXFX7X.js';
8
8
  import './chunk-O4JH3KUE.js';
9
9
  import './chunk-K5GBV4SA.js';
@@ -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-B7BLYXYK.js'),
20
+ import('./open-library-5WWTBHQD.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-B7BLYXYK.js');
49
+ const { resolveCatalogSource } = await import('./open-library-5WWTBHQD.js');
50
50
  const { source, close } = await resolveCatalogSource({ projectDir });
51
51
  try {
52
52
  const assets = await source.listAssets();
@@ -63,7 +63,8 @@ async function storeAssets(projectDir) {
63
63
  requires: [],
64
64
  dependencies: []
65
65
  }));
66
- return { entries, notes };
66
+ const domains = await loadDomains(source);
67
+ return { entries, domains, notes };
67
68
  } finally {
68
69
  close();
69
70
  }
@@ -72,9 +73,15 @@ async function storeAssets(projectDir) {
72
73
  if (!/local/i.test(msg)) {
73
74
  notes.push({ feed: "store", message: msg });
74
75
  }
75
- return { entries: [], notes };
76
+ return { entries: [], domains: [], notes };
76
77
  }
77
78
  }
79
+ async function loadDomains(source) {
80
+ const fn = source.listDomains;
81
+ if (typeof fn !== "function") return [];
82
+ const domains = await fn.call(source);
83
+ return Array.isArray(domains) ? domains : [];
84
+ }
78
85
  function sourceAssets(am) {
79
86
  return am.search();
80
87
  }
@@ -89,10 +96,11 @@ async function gatherAssetFeeds(am, projectDir) {
89
96
  ...tag("library", libs.entries),
90
97
  ...tag("store", store.entries)
91
98
  ],
99
+ domains: store.domains,
92
100
  notes: [...libs.notes, ...store.notes]
93
101
  };
94
102
  }
95
103
 
96
104
  export { gatherAssetFeeds };
97
- //# sourceMappingURL=asset-feeds-DX5JPM76.js.map
98
- //# sourceMappingURL=asset-feeds-DX5JPM76.js.map
105
+ //# sourceMappingURL=asset-feeds-PCLTE2W5.js.map
106
+ //# sourceMappingURL=asset-feeds-PCLTE2W5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../cli/src/asset-feeds.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AA+DA,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;A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O,EAAC;AACtC,EAAA,MAAM,OAAA,GAAU,MAAM,EAAA,CAAG,IAAA,CAAK,MAAM,CAAA;AACpC,EAAA,OAAO,KAAA,CAAM,OAAA,CAAQ,OAAO,CAAA,GAAI,UAAU,EAAC;AAC7C;AAQA,SAAS,aAAa,EAAA,EAAsD;AAC1E,EAAA,OAAO,GAAG,MAAA,EAAO;AACnB;AAGA,SAAS,GAAA,CAAI,QAAqB,OAAA,EAAwC;AACxE,EAAA,OAAO,QAAQ,GAAA,CAAI,CAAC,WAAW,EAAE,MAAA,EAAQ,OAAM,CAAE,CAAA;AACnD;AAQA,eAAsB,gBAAA,CACpB,IACA,UAAA,EAC0B;AAC1B,EAAA,MAAM,CAAC,IAAA,EAAM,KAAK,CAAA,GAAI,MAAM,OAAA,CAAQ,GAAA,CAAI,CAAC,aAAA,EAAc,EAAG,WAAA,CAAY,UAAU,CAAC,CAAC,CAAA;AAClF,EAAA,OAAO;AAAA,IACL,OAAA,EAAS;AAAA,MACP,GAAG,GAAA,CAAI,QAAA,EAAU,YAAA,CAAa,EAAE,CAAC,CAAA;AAAA,MACjC,GAAG,GAAA,CAAI,SAAA,EAAW,IAAA,CAAK,OAAO,CAAA;AAAA,MAC9B,GAAG,GAAA,CAAI,OAAA,EAAS,KAAA,CAAM,OAAO;AAAA,KAC/B;AAAA,IACA,SAAS,KAAA,CAAM,OAAA;AAAA,IACf,OAAO,CAAC,GAAG,KAAK,KAAA,EAAO,GAAG,MAAM,KAAK;AAAA,GACvC;AACF","file":"asset-feeds-PCLTE2W5.js","sourcesContent":["/**\n * asset-feeds.ts — gather installable assets from every feed the manage TUI\n * surfaces.\n *\n * Three 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 * - **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 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\";\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\" | \"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/** 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 three 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.\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 return {\n entries: [\n ...tag(\"source\", sourceAssets(am)),\n ...tag(\"library\", libs.entries),\n ...tag(\"store\", store.entries),\n ],\n domains: store.domains,\n notes: [...libs.notes, ...store.notes],\n };\n}\n"]}
@@ -1,11 +1,11 @@
1
- export { AssetManager, parseCanonicalLockKey } from '../chunk-XQRAXAL5.js';
2
- export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-PTDVTMQL.js';
3
- import '../chunk-PKPUVQJP.js';
4
- import '../chunk-RQG5TXIR.js';
5
- import '../chunk-AZODLVKH.js';
6
- import '../chunk-H5YXL4KI.js';
7
- import '../chunk-4AGIEU7V.js';
8
- import '../chunk-LFDZYCEO.js';
1
+ export { AssetManager, parseCanonicalLockKey } from '../chunk-7B3CL5JT.js';
2
+ export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-WEQN6EWW.js';
3
+ import '../chunk-2Q6OY3SU.js';
4
+ import '../chunk-5DPQ766L.js';
5
+ import '../chunk-56YT6CWS.js';
6
+ import '../chunk-SAXDHVJZ.js';
7
+ import '../chunk-MAPRKFBD.js';
8
+ import '../chunk-BM7XANVN.js';
9
9
  import '../chunk-XGCXFX7X.js';
10
10
  import '../chunk-O4JH3KUE.js';
11
11
  import '../chunk-K5GBV4SA.js';
@@ -1,10 +1,10 @@
1
- export { createScaffold, deployAll, deployAsset, removeAsset } from '../chunk-PTDVTMQL.js';
2
- import '../chunk-PKPUVQJP.js';
3
- import '../chunk-RQG5TXIR.js';
4
- import '../chunk-AZODLVKH.js';
5
- import '../chunk-H5YXL4KI.js';
6
- import '../chunk-4AGIEU7V.js';
7
- import '../chunk-LFDZYCEO.js';
1
+ export { createScaffold, deployAll, deployAsset, removeAsset } from '../chunk-WEQN6EWW.js';
2
+ import '../chunk-2Q6OY3SU.js';
3
+ import '../chunk-5DPQ766L.js';
4
+ import '../chunk-56YT6CWS.js';
5
+ import '../chunk-SAXDHVJZ.js';
6
+ import '../chunk-MAPRKFBD.js';
7
+ import '../chunk-BM7XANVN.js';
8
8
  import '../chunk-XGCXFX7X.js';
9
9
  import '../chunk-O4JH3KUE.js';
10
10
  import '../chunk-K5GBV4SA.js';
@@ -1,4 +1,4 @@
1
- import { resolveSkWorkspaceConfig } from './chunk-AZODLVKH.js';
1
+ import { resolveSkWorkspaceConfig } from './chunk-56YT6CWS.js';
2
2
  import { createHash } from 'crypto';
3
3
  import fs, { writeFileSync, existsSync, readFileSync, mkdirSync, cpSync, readdirSync } from 'fs';
4
4
  import path, { join, dirname, basename } from 'path';
@@ -818,5 +818,5 @@ var WorkspaceYamlEditor = class _WorkspaceYamlEditor {
818
818
  };
819
819
 
820
820
  export { ALL_PROVIDERS, ManifestYamlEditor, SETTINGS_DEFAULTS, WorkspaceYamlEditor, applyPatch, buildLockFile, computeHash, detectEnvApiKeys, extractForPatch, generatePatch, globalSettingsPath, listPatches, loadSettings, mapLegacyFields, maskApiKey, migrateSettings, portableSpawn, portableSpawnSync, projectSettingsPath, providerEnvKey, readLock, readPatch, readPluginsLockSlice, resolveAllKeys, resolveApiKey, resolveSettings, savePatch, saveSettings, verifyLock, walkForSettings, writeLock, writePluginsLockSlice };
821
- //# sourceMappingURL=chunk-PKPUVQJP.js.map
822
- //# sourceMappingURL=chunk-PKPUVQJP.js.map
821
+ //# sourceMappingURL=chunk-2Q6OY3SU.js.map
822
+ //# sourceMappingURL=chunk-2Q6OY3SU.js.map