@skaile/workspaces 1.0.0 → 1.1.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 (171) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/dist/{asset-feeds-677S5NX7.js → asset-feeds-NIAABO6U.js} +11 -11
  3. package/dist/{asset-feeds-677S5NX7.js.map → asset-feeds-NIAABO6U.js.map} +1 -1
  4. package/dist/asset-manager/index.js +8 -8
  5. package/dist/asset-manager/installer.js +7 -7
  6. package/dist/asset-manager/src/index.d.ts +128 -0
  7. package/dist/asset-manager/src/index.d.ts.map +1 -1
  8. package/dist/bridge/drivers/claude-sdk.js +2 -2
  9. package/dist/bridge/drivers/codex.js +1 -1
  10. package/dist/bridge/drivers/continue.js +2 -2
  11. package/dist/bridge/drivers/echo.js +1 -1
  12. package/dist/bridge/drivers/gemini.js +3 -3
  13. package/dist/bridge/drivers/goose.js +2 -2
  14. package/dist/bridge/drivers/omp.js +1 -1
  15. package/dist/bridge/drivers/opencode.js +2 -2
  16. package/dist/bridge/drivers/qwen.js +3 -3
  17. package/dist/bridge/index.js +3 -3
  18. package/dist/{chunk-FLRHP3UC.js → chunk-35TLBMHX.js} +4 -4
  19. package/dist/{chunk-FLRHP3UC.js.map → chunk-35TLBMHX.js.map} +1 -1
  20. package/dist/{chunk-6VUP6XHK.js → chunk-52XHXSBN.js} +3 -3
  21. package/dist/{chunk-6VUP6XHK.js.map → chunk-52XHXSBN.js.map} +1 -1
  22. package/dist/{chunk-NXC6IEL4.js → chunk-5AGARSQT.js} +267 -261
  23. package/dist/chunk-5AGARSQT.js.map +1 -0
  24. package/dist/{chunk-WSQ5J7CE.js → chunk-B4IOSXRZ.js} +98 -49
  25. package/dist/chunk-B4IOSXRZ.js.map +1 -0
  26. package/dist/{chunk-EXNTTJGP.js → chunk-BCJL2UNH.js} +3 -3
  27. package/dist/{chunk-EXNTTJGP.js.map → chunk-BCJL2UNH.js.map} +1 -1
  28. package/dist/{chunk-W53D5Q52.js → chunk-BM37QD6U.js} +3 -3
  29. package/dist/{chunk-W53D5Q52.js.map → chunk-BM37QD6U.js.map} +1 -1
  30. package/dist/{chunk-PLQVAEM2.js → chunk-DMHVL5MC.js} +5 -5
  31. package/dist/{chunk-PLQVAEM2.js.map → chunk-DMHVL5MC.js.map} +1 -1
  32. package/dist/{chunk-K5JIAHDV.js → chunk-EE4NL25D.js} +29 -20
  33. package/dist/chunk-EE4NL25D.js.map +1 -0
  34. package/dist/{chunk-43JDPQJ4.js → chunk-G2X3THJV.js} +5 -5
  35. package/dist/{chunk-43JDPQJ4.js.map → chunk-G2X3THJV.js.map} +1 -1
  36. package/dist/{chunk-KSISPZV3.js → chunk-INUQVXUE.js} +2 -2
  37. package/dist/{chunk-KSISPZV3.js.map → chunk-INUQVXUE.js.map} +1 -1
  38. package/dist/{chunk-UTHEIPEY.js → chunk-KVZ6XKVN.js} +56 -14
  39. package/dist/chunk-KVZ6XKVN.js.map +1 -0
  40. package/dist/{chunk-SFVEHSCI.js → chunk-L3SLC3S4.js} +253 -14
  41. package/dist/chunk-L3SLC3S4.js.map +1 -0
  42. package/dist/{chunk-3KPNDTMR.js → chunk-MG6UIS7G.js} +3 -3
  43. package/dist/{chunk-3KPNDTMR.js.map → chunk-MG6UIS7G.js.map} +1 -1
  44. package/dist/{chunk-LKOMH3QC.js → chunk-OIGYDVCM.js} +3 -3
  45. package/dist/{chunk-LKOMH3QC.js.map → chunk-OIGYDVCM.js.map} +1 -1
  46. package/dist/{chunk-N5AE5SOC.js → chunk-QVE3ILCY.js} +2 -2
  47. package/dist/{chunk-N5AE5SOC.js.map → chunk-QVE3ILCY.js.map} +1 -1
  48. package/dist/{chunk-GYPA2Q7F.js → chunk-SHOKXRL4.js} +21 -4
  49. package/dist/chunk-SHOKXRL4.js.map +1 -0
  50. package/dist/{chunk-6AD3NS7R.js → chunk-U5J77IIZ.js} +4 -4
  51. package/dist/{chunk-6AD3NS7R.js.map → chunk-U5J77IIZ.js.map} +1 -1
  52. package/dist/{chunk-OYMSCV7T.js → chunk-UY5Q2NZH.js} +3 -3
  53. package/dist/{chunk-OYMSCV7T.js.map → chunk-UY5Q2NZH.js.map} +1 -1
  54. package/dist/{chunk-2D5YE3FL.js → chunk-VYIK5IE5.js} +85 -6
  55. package/dist/chunk-VYIK5IE5.js.map +1 -0
  56. package/dist/{chunk-DW5MIJK3.js → chunk-YI5OZ7QO.js} +2 -2
  57. package/dist/{chunk-DW5MIJK3.js.map → chunk-YI5OZ7QO.js.map} +1 -1
  58. package/dist/{chunk-XD7GYMAU.js → chunk-Z4EJOBEL.js} +7 -7
  59. package/dist/{chunk-XD7GYMAU.js.map → chunk-Z4EJOBEL.js.map} +1 -1
  60. package/dist/{chunk-2ZK7M2SG.js → chunk-ZUE2PIJ5.js} +3 -3
  61. package/dist/{chunk-2ZK7M2SG.js.map → chunk-ZUE2PIJ5.js.map} +1 -1
  62. package/dist/cli/index.js +190 -55
  63. package/dist/cli/index.js.map +1 -1
  64. package/dist/cli/src/commands/catalog.d.ts +18 -0
  65. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  66. package/dist/cli/src/commands/manage.d.ts.map +1 -1
  67. package/dist/cli/src/commands/tree.d.ts.map +1 -1
  68. package/dist/cli/src/commands/why.d.ts.map +1 -1
  69. package/dist/cli/src/helpers.d.ts +25 -0
  70. package/dist/cli/src/helpers.d.ts.map +1 -1
  71. package/dist/connectors/config.js +7 -7
  72. package/dist/connectors/index.js +8 -8
  73. package/dist/connectors/src/connector-registry.d.ts.map +1 -1
  74. package/dist/core/index.js +6 -6
  75. package/dist/core/runtime-assets.js +2 -2
  76. package/dist/core/src/index.d.ts +1 -1
  77. package/dist/core/src/index.d.ts.map +1 -1
  78. package/dist/core/src/repo-manager.d.ts +19 -1
  79. package/dist/core/src/repo-manager.d.ts.map +1 -1
  80. package/dist/core/src/walker.d.ts +7 -0
  81. package/dist/core/src/walker.d.ts.map +1 -1
  82. package/dist/core/workspace-config.js +1 -1
  83. package/dist/deploy/index.js +6 -6
  84. package/dist/discovery/index.js +1 -1
  85. package/dist/discovery/src/discover.d.ts.map +1 -1
  86. package/dist/discovery/src/index.d.ts +1 -1
  87. package/dist/discovery/src/index.d.ts.map +1 -1
  88. package/dist/discovery/src/reference-lint.d.ts +30 -0
  89. package/dist/discovery/src/reference-lint.d.ts.map +1 -1
  90. package/dist/discovery/src/tree-entries.d.ts.map +1 -1
  91. package/dist/{ensure-sources-OCMHK7LT.js → ensure-sources-MJYHZ77Y.js} +16 -9
  92. package/dist/ensure-sources-MJYHZ77Y.js.map +1 -0
  93. package/dist/factory-assets/connectors/box/CONNECTOR.md +33 -0
  94. package/dist/factory-assets/connectors/box/driver.d.ts +27 -0
  95. package/dist/factory-assets/connectors/box/driver.d.ts.map +1 -0
  96. package/dist/factory-assets/connectors/box.d.ts +2 -0
  97. package/dist/factory-assets/connectors/box.js +20 -0
  98. package/dist/factory-assets/connectors/box.js.map +1 -0
  99. package/dist/factory-assets/connectors/deploy.js +8 -8
  100. package/dist/factory-assets/connectors/devserver.js +8 -8
  101. package/dist/factory-assets/connectors/flow/adapter.js +8 -8
  102. package/dist/factory-assets/connectors/flow/engine.js +6 -6
  103. package/dist/factory-assets/connectors/flow/run-flow.js +9 -9
  104. package/dist/factory-assets/connectors/flow.js +8 -8
  105. package/dist/factory-assets/connectors/git.js +8 -8
  106. package/dist/factory-assets/connectors/gmail.js +8 -8
  107. package/dist/factory-assets/connectors/googledrive.js +8 -8
  108. package/dist/factory-assets/connectors/local.js +8 -8
  109. package/dist/factory-assets/connectors/mattermost.js +8 -8
  110. package/dist/factory-assets/connectors/memory.js +8 -8
  111. package/dist/factory-assets/connectors/minio.js +8 -8
  112. package/dist/factory-assets/connectors/postgres.js +8 -8
  113. package/dist/factory-assets/connectors/s3.js +8 -8
  114. package/dist/factory-assets/connectors/sharepoint.js +8 -8
  115. package/dist/factory-assets/connectors/sqlite.js +8 -8
  116. package/dist/factory-assets/connectors/static-server.js +8 -8
  117. package/dist/factory-assets/connectors/tunnel.js +8 -8
  118. package/dist/factory-assets/connectors/webdav.js +8 -8
  119. package/dist/factory-assets/connectors/xstate-store.js +8 -8
  120. package/dist/factory-assets/connectors/xstate.js +8 -8
  121. package/dist/factory-assets/skaile.manifest.yaml +4 -1
  122. package/dist/{flows-36PZESON.js → flows-4Z74KY2H.js} +3 -3
  123. package/dist/{flows-36PZESON.js.map → flows-4Z74KY2H.js.map} +1 -1
  124. package/dist/helpers-7KOVCMHW.js +22 -0
  125. package/dist/{helpers-F4NZ66VD.js.map → helpers-7KOVCMHW.js.map} +1 -1
  126. package/dist/library/index.js +8 -8
  127. package/dist/library/install.js +6 -6
  128. package/dist/library/src/library.d.ts +6 -0
  129. package/dist/library/src/library.d.ts.map +1 -1
  130. package/dist/library/src/local/db.d.ts.map +1 -1
  131. package/dist/library/src/local/library.d.ts +9 -0
  132. package/dist/library/src/local/library.d.ts.map +1 -1
  133. package/dist/library/src/local/local-catalog-source.d.ts +9 -0
  134. package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
  135. package/dist/library/src/local/schema.d.ts +19 -0
  136. package/dist/library/src/local/schema.d.ts.map +1 -1
  137. package/dist/open-library-PGTL332T.js +29 -0
  138. package/dist/{open-library-WRFYABFP.js.map → open-library-PGTL332T.js.map} +1 -1
  139. package/dist/{paths-EUNVMONC.js → paths-S7QNXYMB.js} +9 -9
  140. package/dist/{paths-EUNVMONC.js.map → paths-S7QNXYMB.js.map} +1 -1
  141. package/dist/{plugin-store-35KIMX6W.js → plugin-store-3DAVGKHN.js} +8 -8
  142. package/dist/{plugin-store-35KIMX6W.js.map → plugin-store-3DAVGKHN.js.map} +1 -1
  143. package/dist/runner/index.js +13 -13
  144. package/dist/runner/src/serve.d.ts.map +1 -1
  145. package/dist/sdk/asset-manager.js +8 -8
  146. package/dist/sdk/bridge.js +3 -3
  147. package/dist/sdk/core.js +6 -6
  148. package/dist/sdk/flow.js +6 -6
  149. package/dist/sdk/index.js +13 -13
  150. package/dist/sdk/runner.js +13 -13
  151. package/dist/{setup-HM6HATAC.js → setup-WBGDT2WY.js} +11 -11
  152. package/dist/{setup-HM6HATAC.js.map → setup-WBGDT2WY.js.map} +1 -1
  153. package/dist/{source-EZ5Y3CKP.js → source-FJXRQ2NU.js} +19 -13
  154. package/dist/{source-EZ5Y3CKP.js.map → source-FJXRQ2NU.js.map} +1 -1
  155. package/dist/{store-client-BUUF7BPK.js → store-client-YGDN4L2G.js} +9 -9
  156. package/dist/{store-client-BUUF7BPK.js.map → store-client-YGDN4L2G.js.map} +1 -1
  157. package/dist/tui/index.js +13 -13
  158. package/dist/workspace-plugin/adapters/mcp.js +2 -2
  159. package/dist/workspace-plugin/adapters/omp.js +3 -3
  160. package/dist/workspace-plugin/index.js +1 -1
  161. package/package.json +7 -1
  162. package/dist/chunk-2D5YE3FL.js.map +0 -1
  163. package/dist/chunk-GYPA2Q7F.js.map +0 -1
  164. package/dist/chunk-K5JIAHDV.js.map +0 -1
  165. package/dist/chunk-NXC6IEL4.js.map +0 -1
  166. package/dist/chunk-SFVEHSCI.js.map +0 -1
  167. package/dist/chunk-UTHEIPEY.js.map +0 -1
  168. package/dist/chunk-WSQ5J7CE.js.map +0 -1
  169. package/dist/ensure-sources-OCMHK7LT.js.map +0 -1
  170. package/dist/helpers-F4NZ66VD.js +0 -4
  171. package/dist/open-library-WRFYABFP.js +0 -23
package/dist/cli/index.js CHANGED
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import { makeSourceCommand, syncProjectSources } from '../chunk-XD7GYMAU.js';
3
- import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-PLQVAEM2.js';
4
- import { logErr, S, logOk, logInfo, colorRef, logWarn, kindColorPad, kindColor, formatRelativeTime, fitWidth } from '../chunk-GYPA2Q7F.js';
5
- import { getStoreConfig, storeFetch, saveStoreTokens, clearStoreTokens, isStoreAuthenticated } from '../chunk-2ZK7M2SG.js';
6
- import { AI_RESOURCES, aiResourceRoots } from '../chunk-LKOMH3QC.js';
2
+ import { makeSourceCommand, syncProjectSources } from '../chunk-Z4EJOBEL.js';
3
+ import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-DMHVL5MC.js';
4
+ import { logErr, S, logOk, logInfo, colorRef, logWarn, bareSoftDepName, kindColorPad, kindColor, formatSoftDepSection, formatRelativeTime, fitWidth, formatSoftDepRemovePreview, formatSoftDepAddPreview } from '../chunk-SHOKXRL4.js';
5
+ import { getStoreConfig, storeFetch, saveStoreTokens, clearStoreTokens, isStoreAuthenticated } from '../chunk-ZUE2PIJ5.js';
6
+ import { AI_RESOURCES, aiResourceRoots } from '../chunk-OIGYDVCM.js';
7
7
  import { LocalSecretsProvider } from '../chunk-6BEGKO2Q.js';
8
- import { resolveLibraryDir } from '../chunk-2D5YE3FL.js';
9
- import '../chunk-UTHEIPEY.js';
8
+ import { resolveLibraryDir } from '../chunk-VYIK5IE5.js';
9
+ import '../chunk-KVZ6XKVN.js';
10
10
  import '../chunk-UKJMQZV6.js';
11
11
  import '../chunk-R7FOF242.js';
12
12
  import '../chunk-JXT46QFC.js';
13
- import { runFlow, resumeFlow } from '../chunk-43JDPQJ4.js';
13
+ import { runFlow, resumeFlow } from '../chunk-G2X3THJV.js';
14
14
  import '../chunk-4R6DROGN.js';
15
15
  import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-GXC3TYMQ.js';
16
- import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-K5JIAHDV.js';
17
- import { buildClaudePluginFiles } from '../chunk-KSISPZV3.js';
16
+ import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-EE4NL25D.js';
17
+ import { buildClaudePluginFiles } from '../chunk-INUQVXUE.js';
18
18
  import '../chunk-X5YPJV4N.js';
19
19
  import '../chunk-O7SG5PC2.js';
20
20
  import '../chunk-7QBNJTTQ.js';
@@ -23,30 +23,30 @@ import '../chunk-WQ7DE5UC.js';
23
23
  import '../chunk-32NA4TVC.js';
24
24
  import '../chunk-W3UDISS2.js';
25
25
  import '../chunk-EVZKWY5J.js';
26
- import '../chunk-OYMSCV7T.js';
27
- import '../chunk-RRVQAE5D.js';
26
+ import '../chunk-UY5Q2NZH.js';
28
27
  import '../chunk-BMQKMOQY.js';
29
28
  import '../chunk-GAH4YRCI.js';
30
- import '../chunk-N5AE5SOC.js';
29
+ import '../chunk-RRVQAE5D.js';
30
+ import '../chunk-QVE3ILCY.js';
31
31
  import '../chunk-LV2HPH3C.js';
32
- import '../chunk-WSQ5J7CE.js';
33
- import '../chunk-EXNTTJGP.js';
32
+ import '../chunk-B4IOSXRZ.js';
33
+ import '../chunk-BCJL2UNH.js';
34
34
  import '../chunk-6E6PKKAD.js';
35
35
  import { loadFlow, loadAllFlows } from '../chunk-SKADPHAM.js';
36
36
  import '../chunk-DEYYRFQU.js';
37
37
  import '../chunk-IFGTRL2I.js';
38
- import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError } from '../chunk-SFVEHSCI.js';
39
- import '../chunk-FLRHP3UC.js';
40
- import { readLock, resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, portableSpawn, portableSpawnSync, WorkspaceYamlEditor, checkAgentSkillConformance } from '../chunk-3KPNDTMR.js';
41
- import '../chunk-W53D5Q52.js';
42
- import '../chunk-F3HNW354.js';
43
- import { DRIVER_DEFAULTS } from '../chunk-K5GBV4SA.js';
44
- import { assetSearchDirs, detectDomains } from '../chunk-ZAP2BDHG.js';
45
- import { globalCacheRoot, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, resolveSkWorkspaceConfig } from '../chunk-NXC6IEL4.js';
38
+ import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError } from '../chunk-L3SLC3S4.js';
39
+ import '../chunk-35TLBMHX.js';
40
+ import { readLock, resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, portableSpawn, portableSpawnSync, WorkspaceYamlEditor, checkAgentSkillConformance } from '../chunk-MG6UIS7G.js';
41
+ import '../chunk-BM37QD6U.js';
42
+ import { globalCacheRoot, sourceCacheKey, getGlobalCacheDir, resolveAgentDir, resolveSkWorkspaceConfig } from '../chunk-5AGARSQT.js';
46
43
  import { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-DZCK7GRW.js';
47
44
  import { parseFrontmatter } from '../chunk-BQCGFPHW.js';
48
45
  import { parseAssetRef, ASSET_KINDS, isValidAssetName, slugifyAssetName, ASSET_NAME_HINT, assetRefToStr } from '../chunk-GEEW6SY2.js';
46
+ import '../chunk-F3HNW354.js';
49
47
  import { SUPPORTED_DRIVER_TARGETS } from '../chunk-MENCWIHW.js';
48
+ import { DRIVER_DEFAULTS } from '../chunk-K5GBV4SA.js';
49
+ import { assetSearchDirs, detectDomains } from '../chunk-ZAP2BDHG.js';
50
50
  import { openSqlite } from '../chunk-JB35MVBN.js';
51
51
  import '../chunk-KTBKW2FI.js';
52
52
  import '../chunk-UQ6LFBPZ.js';
@@ -92,7 +92,7 @@ async function searchLocal(query, kind, opts, showStore, airGapped) {
92
92
  const projectDir = path14__default.resolve(opts.projectDir);
93
93
  let entries = new AssetManager({ projectDir }).search(query, kind);
94
94
  if (entries.length === 0 && !query && !kind && !airGapped) {
95
- const { autoSyncForSearch } = await import('../source-EZ5Y3CKP.js');
95
+ const { autoSyncForSearch } = await import('../source-FJXRQ2NU.js');
96
96
  if (await autoSyncForSearch(projectDir)) {
97
97
  entries = new AssetManager({ projectDir }).search(query, kind);
98
98
  }
@@ -145,7 +145,7 @@ async function searchStore(query, kind, opts, airGapped) {
145
145
  return;
146
146
  }
147
147
  try {
148
- const { getStoreConfig: getStoreConfig2, storeFetch: storeFetch2 } = await import('../store-client-BUUF7BPK.js');
148
+ const { getStoreConfig: getStoreConfig2, storeFetch: storeFetch2 } = await import('../store-client-YGDN4L2G.js');
149
149
  const config = getStoreConfig2();
150
150
  const params = {};
151
151
  if (query) params.q = query;
@@ -189,6 +189,33 @@ function parseBackendFilter(raw) {
189
189
  }
190
190
  return out.length > 0 ? out : void 0;
191
191
  }
192
+ async function promptSoftDepAdds(am2, ref, io) {
193
+ const edges = await am2.reportSoftDeps([ref]);
194
+ if (edges.length === 0) return;
195
+ if (!io.isTTY) {
196
+ for (const edge of edges) {
197
+ const hint = edge.toRef ? ` \u2014 run \`skaile add ${edge.toRef}\` to include it.` : "";
198
+ io.onHint(
199
+ `${bareSoftDepName(edge.from)} references ${bareSoftDepName(edge.to)} (soft dependency)${hint}`
200
+ );
201
+ }
202
+ return;
203
+ }
204
+ for (const edge of edges) {
205
+ if (!edge.toRef) continue;
206
+ const yes = await io.confirm(
207
+ `${bareSoftDepName(edge.from)} references ${bareSoftDepName(edge.to)} (soft dependency) \u2014 also add it?`
208
+ );
209
+ if (io.isCancel(yes)) break;
210
+ if (yes === true) {
211
+ try {
212
+ for (const a of await am2.add(edge.toRef, { link: io.link })) io.onAdded(a);
213
+ } catch (err) {
214
+ io.onError(`Failed to add ${edge.toRef}: ${err}`);
215
+ }
216
+ }
217
+ }
218
+ }
192
219
  function makeAddCommand() {
193
220
  return new Command("add").description("Add to skaile.yaml + deploy").argument("<ref>", "Asset reference (kind:@<publisher>/name#<version>)").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Record in ~/.skaile/skaile.yaml + deploy to every global backend").option(
194
221
  "--backend <ids>",
@@ -209,6 +236,15 @@ function makeAddCommand() {
209
236
  try {
210
237
  const added = await am2.add(ref, { link: opts.link });
211
238
  spinner5.stop("Done");
239
+ await promptSoftDepAdds(am2, ref, {
240
+ isTTY: !!process.stdin.isTTY,
241
+ link: opts.link,
242
+ confirm: (message) => p6.confirm({ message, initialValue: false }),
243
+ isCancel: p6.isCancel,
244
+ onAdded: logOk,
245
+ onError: logErr,
246
+ onHint: (line) => logInfo(S.dim(line))
247
+ });
212
248
  if (added.length === 0) {
213
249
  const kind = parseAssetRef(ref).kind;
214
250
  if (NON_DEPLOYABLE_KINDS.has(kind))
@@ -228,7 +264,7 @@ function makeRemoveCommand() {
228
264
  return new Command("remove").description("Remove from skaile.yaml + undeploy").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Remove from ~/.skaile/skaile.yaml + undeploy from every global backend").option(
229
265
  "--backend <ids>",
230
266
  "Comma-separated global backends to undeploy from (default: all resolved); implies --global"
231
- ).option("--target <agent>", "Driver target", "claude-code").action((ref, opts) => {
267
+ ).option("--target <agent>", "Driver target", "claude-code").action(async (ref, opts) => {
232
268
  const backends = parseBackendFilter(opts.backend);
233
269
  const am2 = new AssetManager({
234
270
  projectDir: path14__default.resolve(opts.projectDir),
@@ -237,8 +273,21 @@ function makeRemoveCommand() {
237
273
  driverTarget: opts.target
238
274
  });
239
275
  const ok = am2.remove(ref);
240
- if (ok) logOk(`Removed ${ref}`);
241
- else logErr(`Not deployed: ${ref}`);
276
+ if (!ok) {
277
+ logErr(`Not deployed: ${ref}`);
278
+ return;
279
+ }
280
+ logOk(`Removed ${ref}`);
281
+ for (const orphan of await am2.orphanedSoftDepsAfterRemoving([ref])) {
282
+ if (!orphan.targetRef) continue;
283
+ const name = bareSoftDepName(orphan.target);
284
+ const yes = await p6.confirm({
285
+ message: `${name} is a soft dependency of ${ref} and is no longer referenced by any installed asset \u2014 also remove it?`,
286
+ initialValue: false
287
+ });
288
+ if (p6.isCancel(yes)) break;
289
+ if (yes === true && am2.remove(orphan.targetRef)) logOk(`Removed ${orphan.targetRef}`);
290
+ }
242
291
  });
243
292
  }
244
293
  function stateLabel(s) {
@@ -345,7 +394,7 @@ function runGlobalList(kind, opts, backends) {
345
394
  console.log();
346
395
  }
347
396
  function makeInfoCommand() {
348
- return new Command("info").description("Show asset metadata, deps, deploy status").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action((ref, opts) => {
397
+ return new Command("info").description("Show asset metadata, deps, deploy status").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
349
398
  const am2 = new AssetManager({ projectDir: path14__default.resolve(opts.projectDir) });
350
399
  const entry = am2.info(ref);
351
400
  if (!entry) {
@@ -354,6 +403,7 @@ function makeInfoCommand() {
354
403
  );
355
404
  process.exit(1);
356
405
  }
406
+ const softDeps = await am2.softDepsOf([ref]);
357
407
  console.log();
358
408
  console.log(` ${S.heading(entry.name)}`);
359
409
  console.log(` ${S.rule(40)}`);
@@ -371,6 +421,8 @@ function makeInfoCommand() {
371
421
  console.log(` dependencies:`);
372
422
  for (const s of entry.dependencies) console.log(` ${S.dim("\xB7")} ${colorRef(s)}`);
373
423
  }
424
+ for (const line of formatSoftDepSection(softDeps.map((e) => bareSoftDepName(e.to))))
425
+ console.log(line);
374
426
  console.log();
375
427
  });
376
428
  }
@@ -922,7 +974,7 @@ function makeCatalogCommand() {
922
974
  return catalog;
923
975
  }
924
976
  async function runLocalCatalogTest(projectDir) {
925
- const { resolveCatalogSource } = await import('../open-library-WRFYABFP.js');
977
+ const { resolveCatalogSource } = await import('../open-library-PGTL332T.js');
926
978
  let resolved;
927
979
  try {
928
980
  resolved = await resolveCatalogSource({ projectDir });
@@ -1912,7 +1964,7 @@ async function ensureTargetsRegistered(projectDir) {
1912
1964
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
1913
1965
  const config = resolveSkWorkspaceConfig2(projectDir);
1914
1966
  if (config.plugins && config.plugins.length > 0) {
1915
- const { ensurePluginsLoaded } = await import('../plugin-store-35KIMX6W.js');
1967
+ const { ensurePluginsLoaded } = await import('../plugin-store-3DAVGKHN.js');
1916
1968
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
1917
1969
  for (const f of result.failed) logWarn(f.error);
1918
1970
  }
@@ -3591,8 +3643,44 @@ function actOnHeader(row, action3) {
3591
3643
  }
3592
3644
  return row.type === "domain-header" || row.type === "domain-info";
3593
3645
  }
3646
+ var softDepPreviewCache = /* @__PURE__ */ new Map();
3647
+ function softDepCacheKeyUnderCursor() {
3648
+ if (state.tab !== "assets" && state.tab !== "sources") return null;
3649
+ const rows = state.tab === "sources" ? state.visibleSourceRows : state.visibleRows;
3650
+ const row = rows[state.cursor];
3651
+ const ref = row?.type === "asset" ? assetRefOf(row) : null;
3652
+ if (!row || !ref) return null;
3653
+ return `${row.installed ? "remove" : "add"}:${ref}`;
3654
+ }
3655
+ async function previewSoftDepsUnderCursor() {
3656
+ if (state.tab !== "assets" && state.tab !== "sources") return;
3657
+ const rows = state.tab === "sources" ? state.visibleSourceRows : state.visibleRows;
3658
+ const row = rows[state.cursor];
3659
+ const ref = row?.type === "asset" ? assetRefOf(row) : null;
3660
+ if (!row || !ref) {
3661
+ state.message = "";
3662
+ return;
3663
+ }
3664
+ const mode = row.installed ? "remove" : "add";
3665
+ const cacheKey = `${mode}:${ref}`;
3666
+ let msg = softDepPreviewCache.get(cacheKey);
3667
+ if (msg === void 0) {
3668
+ if (mode === "remove") {
3669
+ const targets = (await am.orphanedSoftDepsAfterRemoving([ref])).map(
3670
+ (o) => bareSoftDepName(o.target)
3671
+ );
3672
+ msg = formatSoftDepRemovePreview(row.entry.name, targets);
3673
+ } else {
3674
+ const targets = (await am.reportSoftDeps([ref])).map((e) => bareSoftDepName(e.to));
3675
+ msg = formatSoftDepAddPreview(row.entry.name, targets);
3676
+ }
3677
+ softDepPreviewCache.set(cacheKey, msg);
3678
+ }
3679
+ if (softDepCacheKeyUnderCursor() === cacheKey) state.message = msg;
3680
+ }
3594
3681
  async function loadAssets() {
3595
- const { gatherAssetFeeds } = await import('../asset-feeds-677S5NX7.js');
3682
+ softDepPreviewCache.clear();
3683
+ const { gatherAssetFeeds } = await import('../asset-feeds-NIAABO6U.js');
3596
3684
  const { entries, domains, notes } = await gatherAssetFeeds(am, am.projectDir);
3597
3685
  if (notes.length > 0) {
3598
3686
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
@@ -3759,7 +3847,7 @@ function reconcileCollapsedSets(rows) {
3759
3847
  async function loadSourcesAndLibraries() {
3760
3848
  try {
3761
3849
  const [{ openLibraryManager: openLibraryManager2 }, { skaileHomeDir }, { getGlobalCacheDir: getGlobalCacheDir2 }] = await Promise.all([
3762
- import('../open-library-WRFYABFP.js'),
3850
+ import('../open-library-PGTL332T.js'),
3763
3851
  import('../library/index.js'),
3764
3852
  import('../core/index.js')
3765
3853
  ]);
@@ -4164,13 +4252,19 @@ async function applyChanges() {
4164
4252
  render();
4165
4253
  let added = 0;
4166
4254
  let removed = 0;
4255
+ const appliedAdds = [];
4256
+ const appliedRemoves = [];
4167
4257
  for (const ref of state.pendingRemoves) {
4168
- if (am.remove(ref)) removed++;
4258
+ if (am.remove(ref)) {
4259
+ removed++;
4260
+ appliedRemoves.push(ref);
4261
+ }
4169
4262
  }
4170
4263
  for (const ref of state.pendingAdds) {
4171
4264
  try {
4172
- am.add(ref);
4265
+ await am.add(ref);
4173
4266
  added++;
4267
+ appliedAdds.push(ref);
4174
4268
  } catch (err) {
4175
4269
  state.message = pc5.red(`Failed to add ${ref}: ${err}`);
4176
4270
  }
@@ -4181,6 +4275,19 @@ async function applyChanges() {
4181
4275
  const parts = [];
4182
4276
  if (added > 0) parts.push(pc5.green(`+${added} added`));
4183
4277
  if (removed > 0) parts.push(pc5.red(`-${removed} removed`));
4278
+ const softDeps = appliedAdds.length > 0 ? await am.reportSoftDeps(appliedAdds) : [];
4279
+ if (softDeps.length > 0) {
4280
+ parts.push(pc5.dim(`${softDeps.length} soft dep${softDeps.length === 1 ? "" : "s"} referenced`));
4281
+ }
4282
+ const orphans = (appliedRemoves.length > 0 ? await am.orphanedSoftDepsAfterRemoving(appliedRemoves) : []).filter((o) => o.targetRef);
4283
+ if (orphans.length > 0) {
4284
+ const names = orphans.map((o) => bareSoftDepName(o.target)).join(", ");
4285
+ parts.push(
4286
+ pc5.dim(
4287
+ `${names} no longer referenced by any installed asset \u2014 remove with \`skaile remove\``
4288
+ )
4289
+ );
4290
+ }
4184
4291
  if (parts.length) state.message = parts.join(" ");
4185
4292
  }
4186
4293
  async function syncAll() {
@@ -4458,8 +4565,20 @@ var KEYMAP = [
4458
4565
  }
4459
4566
  },
4460
4567
  { keys: [" "], run: () => void nextTab() },
4461
- { keys: ["\x1B[A", "k"], run: () => void moveCursor(-1) },
4462
- { keys: ["\x1B[B", "j"], run: () => void moveCursor(1) },
4568
+ {
4569
+ keys: ["\x1B[A", "k"],
4570
+ run: async () => {
4571
+ moveCursor(-1);
4572
+ await previewSoftDepsUnderCursor();
4573
+ }
4574
+ },
4575
+ {
4576
+ keys: ["\x1B[B", "j"],
4577
+ run: async () => {
4578
+ moveCursor(1);
4579
+ await previewSoftDepsUnderCursor();
4580
+ }
4581
+ },
4463
4582
  // Collapse / expand — assets tab
4464
4583
  { keys: ["\x1B[C"], when: TAB_ASSETS, run: expandUnderCursor },
4465
4584
  { keys: ["\x1B[D"], when: TAB_ASSETS, run: collapseOrJumpUnderCursor },
@@ -4470,13 +4589,14 @@ var KEYMAP = [
4470
4589
  {
4471
4590
  keys: ["+"],
4472
4591
  when: TAB_ASSETS,
4473
- run: () => {
4592
+ run: async () => {
4474
4593
  const row = state.visibleRows[state.cursor];
4475
4594
  if (!row) return;
4476
4595
  if (!actOnHeader(row, "add")) {
4477
4596
  const ref = assetRefOf(row);
4478
4597
  if (ref) setSelection(ref, state.pendingAdds.has(ref) ? "clear" : "add");
4479
4598
  }
4599
+ await previewSoftDepsUnderCursor();
4480
4600
  }
4481
4601
  },
4482
4602
  // Sources tab: + / - / space select (asset leaf or org/repo bulk header).
@@ -4507,13 +4627,14 @@ var KEYMAP = [
4507
4627
  {
4508
4628
  keys: ["-"],
4509
4629
  when: TAB_ASSETS,
4510
- run: () => {
4630
+ run: async () => {
4511
4631
  const row = state.visibleRows[state.cursor];
4512
4632
  if (!row) return;
4513
4633
  if (!actOnHeader(row, "remove")) {
4514
4634
  const ref = assetRefOf(row);
4515
4635
  if (ref) setSelection(ref, state.pendingRemoves.has(ref) ? "clear" : "remove");
4516
4636
  }
4637
+ await previewSoftDepsUnderCursor();
4517
4638
  }
4518
4639
  },
4519
4640
  // Space — auto-toggle (single asset or bulk header)
@@ -4812,7 +4933,7 @@ function action2(fn) {
4812
4933
  };
4813
4934
  }
4814
4935
  async function reconcileAndReport(projectDir, plugins) {
4815
- const { reconcilePlugins } = await import('../plugin-store-35KIMX6W.js');
4936
+ const { reconcilePlugins } = await import('../plugin-store-3DAVGKHN.js');
4816
4937
  if (plugins.length === 0) {
4817
4938
  logInfo("No plugins declared \u2014 nothing to reconcile.");
4818
4939
  return;
@@ -4828,7 +4949,7 @@ async function reconcileAndReport(projectDir, plugins) {
4828
4949
  async function runInstall2(spec, opts) {
4829
4950
  const projectDir = path14__default.resolve(opts.projectDir);
4830
4951
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
4831
- const { specName } = await import('../plugin-store-35KIMX6W.js');
4952
+ const { specName } = await import('../plugin-store-3DAVGKHN.js');
4832
4953
  const yamlPath = path14__default.join(projectDir, "skaile.yaml");
4833
4954
  const editor = WorkspaceYamlEditor2.load(yamlPath);
4834
4955
  const replaced = editor.addPlugin(spec, specName);
@@ -4840,7 +4961,7 @@ async function runInstall2(spec, opts) {
4840
4961
  async function runRemove(name, opts) {
4841
4962
  const projectDir = path14__default.resolve(opts.projectDir);
4842
4963
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
4843
- const { specName } = await import('../plugin-store-35KIMX6W.js');
4964
+ const { specName } = await import('../plugin-store-3DAVGKHN.js');
4844
4965
  const yamlPath = path14__default.join(projectDir, "skaile.yaml");
4845
4966
  const editor = WorkspaceYamlEditor2.load(yamlPath);
4846
4967
  const removed = editor.removePlugin(name, specName);
@@ -4868,7 +4989,7 @@ async function runList(opts) {
4868
4989
  const registry = createPluginRegistry();
4869
4990
  if (declared.length > 0) {
4870
4991
  try {
4871
- const { loadPlugins } = await import('../plugin-store-35KIMX6W.js');
4992
+ const { loadPlugins } = await import('../plugin-store-3DAVGKHN.js');
4872
4993
  const result = await loadPlugins(projectDir, declared, registry);
4873
4994
  for (const f of result.failed) logWarn(f.error);
4874
4995
  } catch (err) {
@@ -5122,7 +5243,7 @@ async function runRefInstall(ref, opts) {
5122
5243
  const spinner5 = p6.spinner();
5123
5244
  spinner5.start(`Installing ${ref}`);
5124
5245
  try {
5125
- const { openCatalogSource: openCatalogSource2, openLibrary: openLibrary2 } = await import('../open-library-WRFYABFP.js');
5246
+ const { openCatalogSource: openCatalogSource2, openLibrary: openLibrary2 } = await import('../open-library-PGTL332T.js');
5126
5247
  const catalog = await openCatalogSource2({ projectDir: path14__default.resolve(opts.projectDir) });
5127
5248
  if (!supportsInstallManifest(catalog)) {
5128
5249
  throw new Error(
@@ -5159,7 +5280,7 @@ async function runYamlInstall(opts) {
5159
5280
  return;
5160
5281
  }
5161
5282
  try {
5162
- const { ensureSourcesCloned } = await import('../ensure-sources-OCMHK7LT.js');
5283
+ const { ensureSourcesCloned } = await import('../ensure-sources-MJYHZ77Y.js');
5163
5284
  const hydrate = ensureSourcesCloned(projectDir, { quiet: true });
5164
5285
  if (hydrate.cloned.length > 0) {
5165
5286
  logOk(`Cloned source(s): ${hydrate.cloned.join(", ")}`);
@@ -5278,8 +5399,8 @@ function makeCleanCommand() {
5278
5399
  return;
5279
5400
  }
5280
5401
  if (!opts.yes) {
5281
- const confirm6 = await p6.confirm({ message: "Proceed?" });
5282
- if (p6.isCancel(confirm6) || !confirm6) {
5402
+ const confirm7 = await p6.confirm({ message: "Proceed?" });
5403
+ if (p6.isCancel(confirm7) || !confirm7) {
5283
5404
  logInfo("Cancelled.");
5284
5405
  return;
5285
5406
  }
@@ -5623,12 +5744,12 @@ function makeServeCommand() {
5623
5744
  );
5624
5745
  }
5625
5746
  async function ensurePluginsLoadedForServe(projectDir) {
5626
- const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-F4NZ66VD.js');
5747
+ const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-7KOVCMHW.js');
5627
5748
  try {
5628
5749
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
5629
5750
  const config = resolveSkWorkspaceConfig2(projectDir);
5630
5751
  if (!config.plugins || config.plugins.length === 0) return;
5631
- const { ensurePluginsLoaded } = await import('../plugin-store-35KIMX6W.js');
5752
+ const { ensurePluginsLoaded } = await import('../plugin-store-3DAVGKHN.js');
5632
5753
  const { pluginRegistry } = await import('../plugin-registry/index.js');
5633
5754
  const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
5634
5755
  if (result.loaded.length > 0) {
@@ -5642,14 +5763,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
5642
5763
  }
5643
5764
  }
5644
5765
  async function runCompileTest(opts) {
5645
- const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-F4NZ66VD.js');
5766
+ const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-7KOVCMHW.js');
5646
5767
  const { tmpdir } = await import('os');
5647
5768
  const { dirname: dirname4, join: join5, resolve: resolve5 } = await import('path');
5648
5769
  const { fileURLToPath: fileURLToPath2 } = await import('url');
5649
5770
  const { unlinkSync, existsSync: existsSync13 } = await import('fs');
5650
5771
  const { spawn } = await import('child_process');
5651
5772
  const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
5652
- const { MONOREPO_ROOT } = await import('../paths-EUNVMONC.js');
5773
+ const { MONOREPO_ROOT } = await import('../paths-S7QNXYMB.js');
5653
5774
  if (MONOREPO_ROOT === null) {
5654
5775
  logErr2("--compile-test is only available inside the skaile-dev workspace.");
5655
5776
  logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
@@ -6626,7 +6747,7 @@ function printTree(node, prefix = "", isLast = true) {
6626
6747
  }
6627
6748
  }
6628
6749
  function makeTreeCommand() {
6629
- return new Command("tree").description("Show full dependency tree").option("--project-dir <path>", "Project directory", process.cwd()).action((opts) => {
6750
+ return new Command("tree").description("Show full dependency tree").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
6630
6751
  const am2 = new AssetManager({ projectDir: path14__default.resolve(opts.projectDir) });
6631
6752
  const root = am2.tree();
6632
6753
  if (root.children.length === 0) {
@@ -6635,6 +6756,14 @@ function makeTreeCommand() {
6635
6756
  }
6636
6757
  console.log();
6637
6758
  printTree(root);
6759
+ const softDeps = await am2.softDepsOf(root.children.map((c) => c.ref));
6760
+ if (softDeps.length > 0) {
6761
+ console.log(` ${S.label("Soft dependencies (inferred)")}:`);
6762
+ for (const e of softDeps)
6763
+ console.log(
6764
+ ` ${S.dim("\xB7")} ${bareSoftDepName(e.from)} \u2192 ${bareSoftDepName(e.to)} ${S.dim("(soft)")}`
6765
+ );
6766
+ }
6638
6767
  console.log();
6639
6768
  });
6640
6769
  }
@@ -7278,7 +7407,7 @@ function makeVerifyCommand() {
7278
7407
  });
7279
7408
  }
7280
7409
  function makeWhyCommand() {
7281
- return new Command("why").description("Show why an asset is installed (dependency chain)").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action((ref, opts) => {
7410
+ return new Command("why").description("Show why an asset is installed (dependency chain)").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
7282
7411
  const am2 = new AssetManager({ projectDir: path14__default.resolve(opts.projectDir) });
7283
7412
  const chain = am2.why(ref);
7284
7413
  if (chain.length === 0) {
@@ -7292,6 +7421,12 @@ function makeWhyCommand() {
7292
7421
  const arrow = i === 0 ? "" : "\u2190 ";
7293
7422
  console.log(` ${indent}${arrow}${colorRef(chain[i])}`);
7294
7423
  }
7424
+ const softDeps = await am2.softDepsOf([ref]);
7425
+ if (softDeps.length > 0) {
7426
+ console.log(
7427
+ ` ${S.dim(`also pulls (soft): ${softDeps.map((e) => bareSoftDepName(e.to)).join(", ")}`)}`
7428
+ );
7429
+ }
7295
7430
  console.log();
7296
7431
  });
7297
7432
  }
@@ -7541,7 +7676,7 @@ async function bootstrapUserConfig() {
7541
7676
  }
7542
7677
  async function hydrateInitSources(resolved, created) {
7543
7678
  try {
7544
- const { ensureSourcesCloned } = await import('../ensure-sources-OCMHK7LT.js');
7679
+ const { ensureSourcesCloned } = await import('../ensure-sources-MJYHZ77Y.js');
7545
7680
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
7546
7681
  for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
7547
7682
  if (hydrate.failed.length > 0) {
@@ -7577,7 +7712,7 @@ function printInitSummary(resolved, projectDir, created) {
7577
7712
  console.log();
7578
7713
  }
7579
7714
  program.command("setup").description("Interactive provider setup wizard").action(async () => {
7580
- const { cmdSetup } = await import('../setup-HM6HATAC.js');
7715
+ const { cmdSetup } = await import('../setup-WBGDT2WY.js');
7581
7716
  await cmdSetup([], { projectDir: process.cwd() });
7582
7717
  });
7583
7718
  program.addCommand(makeInstallCommand());