@skaile/workspaces 3.2.1 → 3.3.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 (113) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/{asset-feeds-SEYSNNEM.js → asset-feeds-AGAH5OHC.js} +4 -4
  3. package/dist/{asset-feeds-SEYSNNEM.js.map → asset-feeds-AGAH5OHC.js.map} +1 -1
  4. package/dist/asset-manager/index.js +1 -1
  5. package/dist/{chunk-PTAUN5CY.js → chunk-33GWB3RB.js} +2 -2
  6. package/dist/{chunk-PTAUN5CY.js.map → chunk-33GWB3RB.js.map} +1 -1
  7. package/dist/{chunk-XVIFPGYH.js → chunk-3KEJ2HJY.js} +3 -3
  8. package/dist/{chunk-XVIFPGYH.js.map → chunk-3KEJ2HJY.js.map} +1 -1
  9. package/dist/{chunk-HWEW3VII.js → chunk-4GJLRYMB.js} +2 -2
  10. package/dist/{chunk-HWEW3VII.js.map → chunk-4GJLRYMB.js.map} +1 -1
  11. package/dist/{chunk-I7S6DFRU.js → chunk-5FLEP4X6.js} +3 -3
  12. package/dist/{chunk-I7S6DFRU.js.map → chunk-5FLEP4X6.js.map} +1 -1
  13. package/dist/{chunk-57RFYEVM.js → chunk-6OMKIPIE.js} +18 -5
  14. package/dist/chunk-6OMKIPIE.js.map +1 -0
  15. package/dist/{chunk-BKUANJB7.js → chunk-BOH6AG6Q.js} +7 -31
  16. package/dist/chunk-BOH6AG6Q.js.map +1 -0
  17. package/dist/{chunk-BEA7RXI3.js → chunk-E5S2WGTS.js} +130 -11
  18. package/dist/chunk-E5S2WGTS.js.map +1 -0
  19. package/dist/{chunk-F5VREBV2.js → chunk-ELPR5XBG.js} +40 -3
  20. package/dist/chunk-ELPR5XBG.js.map +1 -0
  21. package/dist/{chunk-IAIHZRG7.js → chunk-EP7VBFMN.js} +6 -6
  22. package/dist/{chunk-IAIHZRG7.js.map → chunk-EP7VBFMN.js.map} +1 -1
  23. package/dist/{chunk-FLBDLF3I.js → chunk-HGFKNJA5.js} +6 -4
  24. package/dist/chunk-HGFKNJA5.js.map +1 -0
  25. package/dist/{chunk-CH3UTJBT.js → chunk-MJ77WSJC.js} +4 -4
  26. package/dist/{chunk-CH3UTJBT.js.map → chunk-MJ77WSJC.js.map} +1 -1
  27. package/dist/{chunk-HCNVX34E.js → chunk-OD3ABXUO.js} +2 -2
  28. package/dist/{chunk-HCNVX34E.js.map → chunk-OD3ABXUO.js.map} +1 -1
  29. package/dist/{chunk-DNYE3SSL.js → chunk-PRKLFKNC.js} +3 -3
  30. package/dist/{chunk-DNYE3SSL.js.map → chunk-PRKLFKNC.js.map} +1 -1
  31. package/dist/{chunk-NWFZUQPF.js → chunk-RRCNMURJ.js} +7 -7
  32. package/dist/{chunk-NWFZUQPF.js.map → chunk-RRCNMURJ.js.map} +1 -1
  33. package/dist/{chunk-NLZYBWVH.js → chunk-S6GKHEMN.js} +6 -6
  34. package/dist/{chunk-NLZYBWVH.js.map → chunk-S6GKHEMN.js.map} +1 -1
  35. package/dist/cli/index.js +295 -283
  36. package/dist/cli/index.js.map +1 -1
  37. package/dist/cli/src/commands/complete-resolvers.d.ts +4 -0
  38. package/dist/cli/src/commands/complete-resolvers.d.ts.map +1 -1
  39. package/dist/cli/src/commands/flow.d.ts +8 -4
  40. package/dist/cli/src/commands/flow.d.ts.map +1 -1
  41. package/dist/cli/src/commands/run.d.ts.map +1 -1
  42. package/dist/cli/src/commands/validate.d.ts.map +1 -1
  43. package/dist/cli/src/flow-discovery.d.ts +26 -10
  44. package/dist/cli/src/flow-discovery.d.ts.map +1 -1
  45. package/dist/cli/src/paths.d.ts +21 -7
  46. package/dist/cli/src/paths.d.ts.map +1 -1
  47. package/dist/connectors/index.js +4 -4
  48. package/dist/{ensure-sources-IM3JMW2L.js → ensure-sources-L2276FYP.js} +4 -4
  49. package/dist/{ensure-sources-IM3JMW2L.js.map → ensure-sources-L2276FYP.js.map} +1 -1
  50. package/dist/factory-assets/connectors/box.js +4 -4
  51. package/dist/factory-assets/connectors/deploy.js +4 -4
  52. package/dist/factory-assets/connectors/devserver.js +4 -4
  53. package/dist/factory-assets/connectors/flow/CONNECTOR.md +20 -7
  54. package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
  55. package/dist/factory-assets/connectors/flow/adapter.js +4 -4
  56. package/dist/factory-assets/connectors/flow/engine/index.d.ts +1 -0
  57. package/dist/factory-assets/connectors/flow/engine/index.d.ts.map +1 -1
  58. package/dist/factory-assets/connectors/flow/engine/node-shape.d.ts +56 -0
  59. package/dist/factory-assets/connectors/flow/engine/node-shape.d.ts.map +1 -1
  60. package/dist/factory-assets/connectors/flow/engine.js +2 -2
  61. package/dist/factory-assets/connectors/flow/prompt-fragments.d.ts +4 -0
  62. package/dist/factory-assets/connectors/flow/prompt-fragments.d.ts.map +1 -1
  63. package/dist/factory-assets/connectors/flow/prompt-fragments.js +2 -2
  64. package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
  65. package/dist/factory-assets/connectors/flow/run-flow.js +5 -5
  66. package/dist/factory-assets/connectors/flow.js +4 -4
  67. package/dist/factory-assets/connectors/git.js +4 -4
  68. package/dist/factory-assets/connectors/gmail.js +4 -4
  69. package/dist/factory-assets/connectors/googledrive.js +4 -4
  70. package/dist/factory-assets/connectors/local.js +4 -4
  71. package/dist/factory-assets/connectors/mattermost.js +4 -4
  72. package/dist/factory-assets/connectors/memory.js +4 -4
  73. package/dist/factory-assets/connectors/minio.js +4 -4
  74. package/dist/factory-assets/connectors/postgres.js +4 -4
  75. package/dist/factory-assets/connectors/s3.js +4 -4
  76. package/dist/factory-assets/connectors/sharepoint.js +4 -4
  77. package/dist/factory-assets/connectors/sqlite.js +4 -4
  78. package/dist/factory-assets/connectors/static-server.js +4 -4
  79. package/dist/factory-assets/connectors/tunnel.js +4 -4
  80. package/dist/factory-assets/connectors/webdav.js +4 -4
  81. package/dist/factory-assets/connectors/xstate-store.js +4 -4
  82. package/dist/factory-assets/connectors/xstate.js +4 -4
  83. package/dist/{flows-PBNW6BEH.js → flows-7CZKSC64.js} +3 -3
  84. package/dist/{flows-PBNW6BEH.js.map → flows-7CZKSC64.js.map} +1 -1
  85. package/dist/{helpers-LJFOH4RB.js → helpers-ZWHB5JHQ.js} +4 -4
  86. package/dist/{helpers-LJFOH4RB.js.map → helpers-ZWHB5JHQ.js.map} +1 -1
  87. package/dist/{library-publish-BEFA7OCS.js → library-publish-CVYFMVGR.js} +8 -8
  88. package/dist/{library-publish-BEFA7OCS.js.map → library-publish-CVYFMVGR.js.map} +1 -1
  89. package/dist/{open-library-WJ7P7B4N.js → open-library-XB65LU3M.js} +7 -7
  90. package/dist/{open-library-WJ7P7B4N.js.map → open-library-XB65LU3M.js.map} +1 -1
  91. package/dist/{paths-2ZZMB7HU.js → paths-B52KTS7N.js} +3 -3
  92. package/dist/{paths-2ZZMB7HU.js.map → paths-B52KTS7N.js.map} +1 -1
  93. package/dist/{project-6RXDBSRV.js → project-E5LKCE7R.js} +5 -5
  94. package/dist/{project-6RXDBSRV.js.map → project-E5LKCE7R.js.map} +1 -1
  95. package/dist/runner/index.js +7 -7
  96. package/dist/sdk/asset-manager.js +1 -1
  97. package/dist/sdk/flow.js +2 -2
  98. package/dist/sdk/index.js +7 -7
  99. package/dist/sdk/runner.js +7 -7
  100. package/dist/{source-TJ457ZRQ.js → source-7BNREKGK.js} +8 -8
  101. package/dist/{source-TJ457ZRQ.js.map → source-7BNREKGK.js.map} +1 -1
  102. package/dist/{source-manifest-publish-R3Q4MT5W.js → source-manifest-publish-JGMHNADH.js} +9 -9
  103. package/dist/{source-manifest-publish-R3Q4MT5W.js.map → source-manifest-publish-JGMHNADH.js.map} +1 -1
  104. package/dist/tui/index.js +7 -7
  105. package/dist/workspace-plugin/adapters/mcp.js +1 -1
  106. package/dist/workspace-plugin/adapters/omp.js +3 -3
  107. package/dist/workspace-plugin/index.js +1 -1
  108. package/package.json +1 -1
  109. package/dist/chunk-57RFYEVM.js.map +0 -1
  110. package/dist/chunk-BEA7RXI3.js.map +0 -1
  111. package/dist/chunk-BKUANJB7.js.map +0 -1
  112. package/dist/chunk-F5VREBV2.js.map +0 -1
  113. package/dist/chunk-FLBDLF3I.js.map +0 -1
package/dist/cli/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-IAIHZRG7.js';
3
- import { makeSourceCommand, syncProjectSources } from '../chunk-NLZYBWVH.js';
4
- import { AI_RESOURCES, aiResourceRoots } from '../chunk-57RFYEVM.js';
2
+ import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-EP7VBFMN.js';
3
+ import { makeSourceCommand, syncProjectSources } from '../chunk-S6GKHEMN.js';
4
+ import { AI_RESOURCES, aiResourceRoots } from '../chunk-6OMKIPIE.js';
5
5
  import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity } from '../chunk-AM5LFRXJ.js';
6
- import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-CH3UTJBT.js';
7
- import { logErr, S, logOk, logInfo, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, logWarn, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth } from '../chunk-XVIFPGYH.js';
6
+ import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-MJ77WSJC.js';
7
+ import { logErr, S, logOk, logInfo, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, logWarn, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth } from '../chunk-3KEJ2HJY.js';
8
8
  import { LocalSecretsProvider } from '../chunk-6BEGKO2Q.js';
9
- import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-NWFZUQPF.js';
10
- import { buildClaudePluginFiles } from '../chunk-PTAUN5CY.js';
9
+ import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-RRCNMURJ.js';
10
+ import { buildClaudePluginFiles } from '../chunk-33GWB3RB.js';
11
11
  import '../chunk-X5YPJV4N.js';
12
12
  import '../chunk-W3UDISS2.js';
13
13
  import '../chunk-O7SG5PC2.js';
@@ -15,12 +15,12 @@ import '../chunk-7QBNJTTQ.js';
15
15
  import '../chunk-GTS2FODO.js';
16
16
  import '../chunk-WQ7DE5UC.js';
17
17
  import '../chunk-32NA4TVC.js';
18
- import { runFlow, resumeFlow } from '../chunk-BKUANJB7.js';
18
+ import { runFlow, resumeFlow } from '../chunk-BOH6AG6Q.js';
19
19
  import '../chunk-4R6DROGN.js';
20
20
  import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-CZZRDYT4.js';
21
21
  import '../chunk-BEAIJRVF.js';
22
22
  import '../chunk-HNBWU5RA.js';
23
- import '../chunk-BEA7RXI3.js';
23
+ import '../chunk-E5S2WGTS.js';
24
24
  import '../chunk-ZNIHTT22.js';
25
25
  import '../chunk-KPZZI2KG.js';
26
26
  import '../chunk-46LE3GNY.js';
@@ -30,12 +30,12 @@ import '../chunk-GAH4YRCI.js';
30
30
  import '../chunk-VT6HDD2L.js';
31
31
  import '../chunk-6E6PKKAD.js';
32
32
  import '../chunk-IFGTRL2I.js';
33
- import { loadFlow, loadAllFlowEntries, flowFileCandidates } from '../chunk-I7S6DFRU.js';
33
+ import { loadFlow, loadAllFlowEntries, flowFileCandidates } from '../chunk-5FLEP4X6.js';
34
34
  import '../chunk-B4J6TV4G.js';
35
- import '../chunk-FLBDLF3I.js';
36
- import '../chunk-F5VREBV2.js';
35
+ import '../chunk-HGFKNJA5.js';
36
+ import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-ELPR5XBG.js';
37
37
  import '../chunk-D4VHBAJC.js';
38
- import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-HCNVX34E.js';
38
+ import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-OD3ABXUO.js';
39
39
  import { resolveLibraryDir, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-3HVASHBF.js';
40
40
  import '../chunk-NU4E7C5I.js';
41
41
  import '../chunk-UKJMQZV6.js';
@@ -62,8 +62,8 @@ import { validatePreset } from '../chunk-IRORTHGA.js';
62
62
  import '../chunk-NSBPE2FW.js';
63
63
  import * as fs13 from 'fs';
64
64
  import fs13__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
65
- import * as path13 from 'path';
66
- import path13__default, { resolve, join } from 'path';
65
+ import * as path35 from 'path';
66
+ import path35__default, { resolve, join } from 'path';
67
67
  import { fileURLToPath } from 'url';
68
68
  import { Help, Command, Option } from 'commander';
69
69
  import { rcompare } from 'semver';
@@ -101,7 +101,7 @@ async function runSearch(kind, query, opts) {
101
101
  const showLocal = !opts.store;
102
102
  const showStore = !opts.local;
103
103
  const { resolveConfig } = await import('../library/index.js');
104
- const airGapped = resolveConfig({ projectDir: path13__default.resolve(opts.projectDir) }).catalog.cache_ttl === 0;
104
+ const airGapped = resolveConfig({ projectDir: path35__default.resolve(opts.projectDir) }).catalog.cache_ttl === 0;
105
105
  if (showLocal) {
106
106
  await searchLocal(query, kind, opts, showStore, airGapped);
107
107
  }
@@ -110,7 +110,7 @@ async function runSearch(kind, query, opts) {
110
110
  }
111
111
  }
112
112
  async function searchIndex(query, kind) {
113
- const { openLibrary: openLibrary2 } = await import('../open-library-WJ7P7B4N.js');
113
+ const { openLibrary: openLibrary2 } = await import('../open-library-XB65LU3M.js');
114
114
  const library = await openLibrary2();
115
115
  try {
116
116
  const defs = await library.listAssetDefs(kind ? { kind } : {});
@@ -142,7 +142,7 @@ async function searchIndex(query, kind) {
142
142
  }
143
143
  }
144
144
  async function searchFactory(projectDir, query, kind) {
145
- const prefixes = factoryAssetRoots().map((r) => r.endsWith(path13__default.sep) ? r : r + path13__default.sep);
145
+ const prefixes = factoryAssetRoots().map((r) => r.endsWith(path35__default.sep) ? r : r + path35__default.sep);
146
146
  const isFactoryPath = (p7) => prefixes.some((fp) => p7 === fp.slice(0, -1) || p7.startsWith(fp));
147
147
  try {
148
148
  const entries = await new AssetManager({ projectDir }).search(query, kind);
@@ -159,11 +159,11 @@ function unionEntries(indexed, factory) {
159
159
  return [...indexed, ...factory.filter((e) => !seen.has(entryDedupKey(e)))];
160
160
  }
161
161
  async function searchLocal(query, kind, opts, showStore, airGapped) {
162
- const projectDir = path13__default.resolve(opts.projectDir);
162
+ const projectDir = path35__default.resolve(opts.projectDir);
163
163
  const factory = await searchFactory(projectDir, query, kind);
164
164
  let entries = unionEntries(await searchIndex(query, kind), factory);
165
165
  if (entries.length === 0 && !query && !kind && !airGapped) {
166
- const { autoSyncForSearch } = await import('../source-TJ457ZRQ.js');
166
+ const { autoSyncForSearch } = await import('../source-7BNREKGK.js');
167
167
  if (await autoSyncForSearch(projectDir)) {
168
168
  entries = unionEntries(await searchIndex(query, kind), factory);
169
169
  }
@@ -217,9 +217,9 @@ async function searchStore(query, kind, opts, airGapped) {
217
217
  logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
218
218
  return;
219
219
  }
220
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-WJ7P7B4N.js');
220
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-XB65LU3M.js');
221
221
  try {
222
- const remote = await openCatalogSource2({ projectDir: path13__default.resolve(opts.projectDir) });
222
+ const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
223
223
  const assets = await remote.listAssets(kind ? { kind } : {});
224
224
  const results = filterCatalogAssets(assets, query);
225
225
  if (results.length > 0) {
@@ -333,7 +333,7 @@ function makeAddCommand() {
333
333
  }
334
334
  const backends = parseBackendFilter(opts.backend);
335
335
  const am2 = new AssetManager({
336
- projectDir: path13__default.resolve(opts.projectDir),
336
+ projectDir: path35__default.resolve(opts.projectDir),
337
337
  global: opts.global || backends !== void 0,
338
338
  backends,
339
339
  driverTarget: opts.target
@@ -376,7 +376,7 @@ function makeRemoveCommand() {
376
376
  ).option("--target <agent>", "Driver target", "claude-code").option("--no-soft-deps", "skip the orphaned-soft-dep prompt (don't remove, don't report)").action(async (ref, opts) => {
377
377
  const backends = parseBackendFilter(opts.backend);
378
378
  const am2 = new AssetManager({
379
- projectDir: path13__default.resolve(opts.projectDir),
379
+ projectDir: path35__default.resolve(opts.projectDir),
380
380
  global: opts.global || backends !== void 0,
381
381
  backends,
382
382
  driverTarget: opts.target
@@ -416,7 +416,7 @@ function makeListCommand() {
416
416
  return;
417
417
  }
418
418
  const am2 = new AssetManager({
419
- projectDir: path13__default.resolve(opts.projectDir),
419
+ projectDir: path35__default.resolve(opts.projectDir),
420
420
  driverTarget: opts.target
421
421
  });
422
422
  let declared;
@@ -461,7 +461,7 @@ function makeListCommand() {
461
461
  }
462
462
  function runGlobalList(kind, opts, backends) {
463
463
  const am2 = new AssetManager({
464
- projectDir: path13__default.resolve(opts.projectDir),
464
+ projectDir: path35__default.resolve(opts.projectDir),
465
465
  global: true,
466
466
  backends
467
467
  });
@@ -532,7 +532,7 @@ async function resolveInfoEntry(am2, ref, opts) {
532
532
  return { entry: match ?? deployed };
533
533
  }
534
534
  const lookup = opts.storeLookup ?? (async (filter) => {
535
- const { resolveCatalogSource } = await import('../open-library-WJ7P7B4N.js');
535
+ const { resolveCatalogSource } = await import('../open-library-XB65LU3M.js');
536
536
  const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
537
537
  try {
538
538
  return await source.listAssets(filter);
@@ -548,7 +548,7 @@ async function resolveInfoEntry(am2, ref, opts) {
548
548
  );
549
549
  return { entry: hit ? catalogAssetToEntry(hit) : null };
550
550
  } catch (err) {
551
- const { LocalCatalogDisabledError } = await import('../open-library-WJ7P7B4N.js');
551
+ const { LocalCatalogDisabledError } = await import('../open-library-XB65LU3M.js');
552
552
  const storeNote = err instanceof Error ? err.message : String(err);
553
553
  const disabled = err instanceof LocalCatalogDisabledError || /catalog\.url/i.test(storeNote);
554
554
  return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
@@ -564,7 +564,7 @@ function infoNotFoundHint(ref, lookup) {
564
564
  }
565
565
  function makeInfoCommand() {
566
566
  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) => {
567
- const projectDir = path13__default.resolve(opts.projectDir);
567
+ const projectDir = path35__default.resolve(opts.projectDir);
568
568
  const am2 = new AssetManager({ projectDir });
569
569
  const lookup = await resolveInfoEntry(am2, ref, { projectDir });
570
570
  const entry = lookup.entry;
@@ -600,7 +600,7 @@ function makeCreateCommand() {
600
600
  new Option("-k, --kind <kind>", "Asset kind").default("skill").choices([...ASSET_KINDS])
601
601
  ).option("-d, --dir <dir>", "Target directory (default: cwd)").action((name, opts) => {
602
602
  const am2 = new AssetManager({ projectDir: process.cwd() });
603
- const destDir = opts.dir ? path13__default.resolve(opts.dir) : process.cwd();
603
+ const destDir = opts.dir ? path35__default.resolve(opts.dir) : process.cwd();
604
604
  const result = am2.create(name, opts.kind, destDir);
605
605
  if (result.ok) logOk(`Created ${kindColor(opts.kind)}: ${pc5.dim(result.path)}`);
606
606
  else {
@@ -611,7 +611,7 @@ function makeCreateCommand() {
611
611
  }
612
612
  function makeDoctorCommand() {
613
613
  return new Command("doctor").description("Scan for missing dependency chains").argument("[name]", "Check a specific asset (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (name, opts) => {
614
- const am2 = new AssetManager({ projectDir: path13__default.resolve(opts.projectDir) });
614
+ const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
615
615
  const issues = await am2.doctor();
616
616
  if (issues.length === 0) {
617
617
  logOk("No missing dependencies.");
@@ -639,20 +639,20 @@ function claudeSkillRoots() {
639
639
  const roots = [];
640
640
  const override = process.env.SKAILE_CLAUDE_SKILLS_DIR;
641
641
  if (override) roots.push(override);
642
- roots.push(path13.join(os.homedir(), ".claude", "skills"));
642
+ roots.push(path35.join(os.homedir(), ".claude", "skills"));
643
643
  return roots;
644
644
  }
645
645
  function resolveImportSource(nameOrPath) {
646
- const asPath = path13.resolve(nameOrPath);
646
+ const asPath = path35.resolve(nameOrPath);
647
647
  if (fs13.existsSync(asPath)) {
648
- const dir = fs13.statSync(asPath).isDirectory() ? asPath : path13.dirname(asPath);
649
- const skillFile = path13.join(dir, "SKILL.md");
648
+ const dir = fs13.statSync(asPath).isDirectory() ? asPath : path35.dirname(asPath);
649
+ const skillFile = path35.join(dir, "SKILL.md");
650
650
  if (fs13.existsSync(skillFile)) return { dir, skillFile, via: "path" };
651
651
  }
652
- if (!nameOrPath.includes(path13.sep) && !nameOrPath.startsWith(".")) {
652
+ if (!nameOrPath.includes(path35.sep) && !nameOrPath.startsWith(".")) {
653
653
  for (const root of claudeSkillRoots()) {
654
- const dir = path13.join(root, nameOrPath);
655
- const skillFile = path13.join(dir, "SKILL.md");
654
+ const dir = path35.join(root, nameOrPath);
655
+ const skillFile = path35.join(dir, "SKILL.md");
656
656
  if (fs13.existsSync(skillFile)) return { dir, skillFile, via: "claude-skills" };
657
657
  }
658
658
  }
@@ -718,8 +718,8 @@ ${description}
718
718
  `;
719
719
  };
720
720
  function ensureDomain(libraryPath, domain, opts = {}) {
721
- const dir = path13.join(libraryPath, domain);
722
- const domainFile = path13.join(dir, "DOMAIN.md");
721
+ const dir = path35.join(libraryPath, domain);
722
+ const domainFile = path35.join(dir, "DOMAIN.md");
723
723
  const publisher = opts.publisher ?? slugifyAssetName(domain);
724
724
  if (fs13.existsSync(domainFile)) {
725
725
  return { dir, publisher, created: false };
@@ -731,7 +731,7 @@ function ensureDomain(libraryPath, domain, opts = {}) {
731
731
  }
732
732
  function listDomains(libraryPath) {
733
733
  if (!fs13.existsSync(libraryPath)) return [];
734
- return fs13.readdirSync(libraryPath, { withFileTypes: true }).filter((e) => e.isDirectory() && fs13.existsSync(path13.join(libraryPath, e.name, "DOMAIN.md"))).map((e) => e.name).sort();
734
+ return fs13.readdirSync(libraryPath, { withFileTypes: true }).filter((e) => e.isDirectory() && fs13.existsSync(path35.join(libraryPath, e.name, "DOMAIN.md"))).map((e) => e.name).sort();
735
735
  }
736
736
  function upsertManifestAsset(libraryPath, input) {
737
737
  const manifest = loadSkPublishManifest(libraryPath) ?? { assets: [] };
@@ -802,10 +802,10 @@ function makeAssetCommand() {
802
802
  }
803
803
  const rawSkill = fs13.readFileSync(src.skillFile, "utf8");
804
804
  const norm = opts.normalize ? normalizeSkillContent(rawSkill, {
805
- fallbackName: path13.basename(src.dir),
805
+ fallbackName: path35.basename(src.dir),
806
806
  version: opts.version,
807
807
  stage: opts.stage
808
- }) : { content: rawSkill, name: path13.basename(src.dir), changed: false, notes: [] };
808
+ }) : { content: rawSkill, name: path35.basename(src.dir), changed: false, notes: [] };
809
809
  if (!opts.normalize && !isValidAssetName(norm.name)) {
810
810
  logWarn(
811
811
  `Name "${norm.name}" is not canonical (kebab-case); \`skaile validate\` will reject this manifest entry. Drop --no-normalize to slugify it.`
@@ -816,17 +816,17 @@ function makeAssetCommand() {
816
816
  if (opts.domain) {
817
817
  const dom = ensureDomain(target.path, opts.domain);
818
818
  if (dom.created) logOk(`Scaffolded domain ${S.cmd(opts.domain)} \u2192 ${dom.dir}`);
819
- destParent = path13.join(dom.dir, "skills");
819
+ destParent = path35.join(dom.dir, "skills");
820
820
  publisher = dom.publisher;
821
821
  }
822
822
  fs13.mkdirSync(destParent, { recursive: true });
823
- const destDir = path13.join(destParent, norm.name);
823
+ const destDir = path35.join(destParent, norm.name);
824
824
  if (fs13.existsSync(destDir)) {
825
825
  logErr(`Destination already exists: ${destDir}`);
826
826
  process.exit(1);
827
827
  }
828
828
  fs13.cpSync(src.dir, destDir, { recursive: true });
829
- fs13.writeFileSync(path13.join(destDir, "SKILL.md"), norm.content, "utf8");
829
+ fs13.writeFileSync(path35.join(destDir, "SKILL.md"), norm.content, "utf8");
830
830
  for (const note of norm.notes) logInfo(` \u2022 ${note}`);
831
831
  const fm = parseFrontmatter(norm.content).data;
832
832
  const descRaw = fm.description;
@@ -834,7 +834,7 @@ function makeAssetCommand() {
834
834
  for (const f of checkAgentSkillConformance(fm, { dirName: norm.name })) {
835
835
  logWarn(`conformance: ${f.field} \u2014 ${f.message}`);
836
836
  }
837
- const root = path13.relative(target.path, destDir);
837
+ const root = path35.relative(target.path, destDir);
838
838
  const up = upsertManifestAsset(target.path, {
839
839
  kind: "skill",
840
840
  name: norm.name,
@@ -895,10 +895,10 @@ function makeAssetCommand() {
895
895
  );
896
896
  process.exit(1);
897
897
  }
898
- const basename2 = path13.basename(srcPath);
899
- const destDir = target.structure === "domain" && opts.domain ? path13.join(target.path, opts.domain) : target.path;
898
+ const basename2 = path35.basename(srcPath);
899
+ const destDir = target.structure === "domain" && opts.domain ? path35.join(target.path, opts.domain) : target.path;
900
900
  fs13.mkdirSync(destDir, { recursive: true });
901
- const destPath = path13.join(destDir, basename2);
901
+ const destPath = path35.join(destDir, basename2);
902
902
  if (fs13.existsSync(destPath)) {
903
903
  logErr(`Destination already exists: ${destPath}`);
904
904
  process.exit(1);
@@ -911,7 +911,7 @@ function makeAssetCommand() {
911
911
  fs13.renameSync(srcPath, destPath);
912
912
  break;
913
913
  case "link":
914
- fs13.symlinkSync(path13.resolve(srcPath), destPath);
914
+ fs13.symlinkSync(path35.resolve(srcPath), destPath);
915
915
  break;
916
916
  }
917
917
  if (target.backend === "git" && opts.commit) {
@@ -968,17 +968,17 @@ function makeAssetCommand() {
968
968
  }
969
969
  const manifestPath = def.manifest.path;
970
970
  const candidateSubpath = typeof manifestPath === "string" && manifestPath.length > 0 ? manifestPath : def.name;
971
- const srcPath = path13.join(lib.path, candidateSubpath);
971
+ const srcPath = path35.join(lib.path, candidateSubpath);
972
972
  if (!fs13.existsSync(srcPath)) {
973
973
  logErr(`Asset path not found: ${srcPath}`);
974
974
  process.exit(1);
975
975
  }
976
- const destPath = path13.join(target, candidateSubpath);
977
- fs13.mkdirSync(path13.dirname(destPath), { recursive: true });
976
+ const destPath = path35.join(target, candidateSubpath);
977
+ fs13.mkdirSync(path35.dirname(destPath), { recursive: true });
978
978
  if (opts.mode === "copy") {
979
979
  fs13.cpSync(srcPath, destPath, { recursive: true });
980
980
  } else {
981
- fs13.symlinkSync(path13.resolve(srcPath), destPath);
981
+ fs13.symlinkSync(path35.resolve(srcPath), destPath);
982
982
  }
983
983
  logOk(`Installed ${ref} \u2192 ${destPath} (${opts.mode})`);
984
984
  } finally {
@@ -1043,14 +1043,14 @@ function makeAuthCommand() {
1043
1043
  }
1044
1044
  function collectCacheTargets(scope) {
1045
1045
  const out = [];
1046
- out.push(path13__default.join(scope.projectDir, ".skaile", "cache"));
1047
- out.push(path13__default.join(scope.projectDir, ".skaile", "store-cache"));
1048
- out.push(path13__default.join(scope.projectDir, ".skaile", "repos"));
1046
+ out.push(path35__default.join(scope.projectDir, ".skaile", "cache"));
1047
+ out.push(path35__default.join(scope.projectDir, ".skaile", "store-cache"));
1048
+ out.push(path35__default.join(scope.projectDir, ".skaile", "repos"));
1049
1049
  if (scope.global) {
1050
1050
  out.push(globalCacheRoot());
1051
- const home = process.env.SKAILE_HOME ?? path13__default.join(homedir(), ".skaile");
1052
- out.push(path13__default.join(home, "repos"));
1053
- out.push(path13__default.join(home, "catalog-cache"));
1051
+ const home = process.env.SKAILE_HOME ?? path35__default.join(homedir(), ".skaile");
1052
+ out.push(path35__default.join(home, "repos"));
1053
+ out.push(path35__default.join(home, "catalog-cache"));
1054
1054
  }
1055
1055
  return out;
1056
1056
  }
@@ -1064,7 +1064,7 @@ function dirSize(target) {
1064
1064
  function dirSizeOfDir(dir) {
1065
1065
  let total = 0;
1066
1066
  for (const ent of readdirSync(dir, { withFileTypes: true })) {
1067
- const child = path13__default.join(dir, ent.name);
1067
+ const child = path35__default.join(dir, ent.name);
1068
1068
  if (ent.isSymbolicLink()) continue;
1069
1069
  if (ent.isDirectory()) total += dirSizeOfDir(child);
1070
1070
  else if (ent.isFile()) total += statSync(child).size;
@@ -1090,7 +1090,7 @@ function makeCacheCommand() {
1090
1090
  const cmd = new Command("cache").description("Inspect and reclaim the re-derivable cache");
1091
1091
  cmd.command("clean").description("Remove the project cache (.skaile/cache); --global also clears ~/.skaile/cache").option("--global", "Also clear the global cache (sources + catalog) and legacy dirs").option("--dry-run", "Show what would be removed without doing it").option("-y, --yes", "Skip confirmation prompt").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
1092
1092
  const targets = collectCacheTargets({
1093
- projectDir: path13__default.resolve(opts.projectDir),
1093
+ projectDir: path35__default.resolve(opts.projectDir),
1094
1094
  global: opts.global
1095
1095
  }).filter((t) => existsSync(t));
1096
1096
  if (targets.length === 0) {
@@ -1120,12 +1120,12 @@ function makeCacheCommand() {
1120
1120
  for (const r of removed) logOk(`Removed ${r}`);
1121
1121
  });
1122
1122
  cmd.command("dir").description("Print the resolved cache roots").option("--global", "Include the global cache root").option("--project-dir <path>", "Project directory", process.cwd()).action((opts) => {
1123
- console.log(path13__default.join(path13__default.resolve(opts.projectDir), ".skaile", "cache"));
1123
+ console.log(path35__default.join(path35__default.resolve(opts.projectDir), ".skaile", "cache"));
1124
1124
  if (opts.global) console.log(globalCacheRoot());
1125
1125
  });
1126
1126
  cmd.command("size").description("Show cache disk usage per directory").option("--global", "Include the global cache").option("--project-dir <path>", "Project directory", process.cwd()).action((opts) => {
1127
1127
  const targets = collectCacheTargets({
1128
- projectDir: path13__default.resolve(opts.projectDir),
1128
+ projectDir: path35__default.resolve(opts.projectDir),
1129
1129
  global: opts.global
1130
1130
  });
1131
1131
  console.log();
@@ -1141,7 +1141,7 @@ function makeCatalogCommand() {
1141
1141
  const catalog = new Command("catalog").description("Catalog source health and configuration");
1142
1142
  catalog.command("test").description("Probe the configured catalog source and report status").option("--project-dir <path>", "Project directory (for project-level config overlay)").option("--url <url>", "Override the catalog URL for this probe").option("--force", "Probe the network even in air-gapped mode (cache_ttl: 0)").action(async (opts) => {
1143
1143
  const { resolveConfig, isLocalCatalogUrl, trpcGetUrl } = await import('../library/index.js');
1144
- const projectDir = opts.projectDir ? path13__default.resolve(opts.projectDir) : void 0;
1144
+ const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : void 0;
1145
1145
  const cfg = resolveConfig({ projectDir });
1146
1146
  const baseUrl = opts.url ?? cfg.catalog.url;
1147
1147
  if (isLocalCatalogUrl(baseUrl)) {
@@ -1159,7 +1159,7 @@ function makeCatalogCommand() {
1159
1159
  });
1160
1160
  catalog.command("info").description("Print the resolved catalog configuration (url, framing, cacheTtlMs)").option("--project-dir <path>", "Project directory (for project-level config overlay)").action(async (opts) => {
1161
1161
  const { resolveConfig } = await import('../library/index.js');
1162
- const projectDir = opts.projectDir ? path13__default.resolve(opts.projectDir) : void 0;
1162
+ const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : void 0;
1163
1163
  const cfg = resolveConfig({ projectDir });
1164
1164
  console.log(`url: ${cfg.catalog.url}`);
1165
1165
  console.log(`framing: ${cfg.catalog.framing}`);
@@ -1168,7 +1168,7 @@ function makeCatalogCommand() {
1168
1168
  return catalog;
1169
1169
  }
1170
1170
  async function runLocalCatalogTest(projectDir) {
1171
- const { resolveCatalogSource } = await import('../open-library-WJ7P7B4N.js');
1171
+ const { resolveCatalogSource } = await import('../open-library-XB65LU3M.js');
1172
1172
  let resolved;
1173
1173
  try {
1174
1174
  resolved = await resolveCatalogSource({ projectDir });
@@ -1288,9 +1288,9 @@ complete -F _${bin}_completion ${bin}`,
1288
1288
  end
1289
1289
  complete -c ${bin} -f -a '(__${bin}_complete)'`
1290
1290
  };
1291
- function discoverFlows() {
1291
+ function discoverFlows(projectDir) {
1292
1292
  const byId = /* @__PURE__ */ new Map();
1293
- for (const root of aiResourceRoots()) {
1293
+ for (const root of aiResourceRoots(projectDir)) {
1294
1294
  for (const { flow } of loadAllFlowEntries(root)) {
1295
1295
  if (!byId.has(flow.id)) byId.set(flow.id, flow);
1296
1296
  }
@@ -1304,8 +1304,8 @@ function declaredFlowId(filePath) {
1304
1304
  return void 0;
1305
1305
  }
1306
1306
  }
1307
- function findFlowFile(flowId, priorityRoots = []) {
1308
- for (const root of [...priorityRoots, ...aiResourceRoots()]) {
1307
+ function findFlowFile(flowId, priorityRoots = [], projectDir) {
1308
+ for (const root of [...priorityRoots, ...aiResourceRoots(projectDir)]) {
1309
1309
  for (const { dir } of assetSearchDirs(root, "flows")) {
1310
1310
  for (const candidate of flowFileCandidates(dir, flowId)) {
1311
1311
  if (fs13__default.existsSync(candidate) && declaredFlowId(candidate) === flowId) return candidate;
@@ -1335,9 +1335,9 @@ function findSkills(domain) {
1335
1335
  }
1336
1336
  function walkSkills(dir, domain, out) {
1337
1337
  for (const entry of fs13__default.readdirSync(dir, { withFileTypes: true })) {
1338
- const full = path13__default.join(dir, entry.name);
1338
+ const full = path35__default.join(dir, entry.name);
1339
1339
  if (entry.isDirectory()) {
1340
- const skillMd = path13__default.join(full, "SKILL.md");
1340
+ const skillMd = path35__default.join(full, "SKILL.md");
1341
1341
  if (fs13__default.existsSync(skillMd)) {
1342
1342
  out.push({ name: entry.name, path: full, skillPath: skillMd, domain });
1343
1343
  } else {
@@ -1366,7 +1366,7 @@ function resolveFlowIds() {
1366
1366
  }
1367
1367
  }
1368
1368
  function resolveSessionIds(projectDir) {
1369
- const sessionsDir = path13__default.join(projectDir, ".skaile", "sessions");
1369
+ const sessionsDir = path35__default.join(projectDir, ".skaile", "sessions");
1370
1370
  if (!fs13__default.existsSync(sessionsDir)) return [];
1371
1371
  try {
1372
1372
  return fs13__default.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).map((f) => f.slice(0, -".json".length));
@@ -1485,7 +1485,7 @@ function printResolvedPathsSection(config) {
1485
1485
  console.log(` ${S.label("prompts:".padEnd(16))} ${config.promptsDir ?? paths.promptsDir}`);
1486
1486
  }
1487
1487
  async function showConfig(opts) {
1488
- const projectDir = opts.projectDir ? path13__default.resolve(opts.projectDir) : process.cwd();
1488
+ const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
1489
1489
  const config = await resolveSettings(projectDir);
1490
1490
  const wsDefaults = collectWorkspaceDefaults(projectDir);
1491
1491
  printEffectiveSection(config);
@@ -1498,13 +1498,13 @@ function makeConfigCommand() {
1498
1498
  const cmd = new Command("config").description("Manage personal config (.skaile/settings.json)");
1499
1499
  cmd.command("show").description("Show effective config with sources").option("--project-dir <path>", "Project directory").action((opts) => showConfig(opts));
1500
1500
  cmd.command("get <key>").description("Get an effective config value").option("--project-dir <path>", "Project directory").action(async (key, opts) => {
1501
- const projectDir = opts.projectDir ? path13__default.resolve(opts.projectDir) : process.cwd();
1501
+ const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
1502
1502
  const config = await resolveSettings(projectDir);
1503
1503
  const value = config[key];
1504
1504
  console.log(value ?? S.dim("(not set)"));
1505
1505
  });
1506
1506
  cmd.command("set <key> <value>").description("Set a personal config value (driver, model, provider, apiKey.<provider>)").option("--project-dir <path>", "Project directory").option("--global", "Write to ~/.skaile/settings.json instead of project-local").action(async (key, value, opts) => {
1507
- const projectDir = opts.projectDir ? path13__default.resolve(opts.projectDir) : process.cwd();
1507
+ const projectDir = opts.projectDir ? path35__default.resolve(opts.projectDir) : process.cwd();
1508
1508
  const isApiKey = key.startsWith(API_KEY_PREFIX);
1509
1509
  if (!PERSONAL_KEYS.has(key) && !isApiKey) {
1510
1510
  logErr(
@@ -1822,8 +1822,8 @@ function makeConnectorCommand() {
1822
1822
  async (driver, opts) => {
1823
1823
  const { installNpmPackages } = await import('../connectors/index.js');
1824
1824
  const { scanDirectory: scanDirectory2, factoryAssetRoots: factoryAssetRoots2, WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
1825
- const projectDir = path13__default.resolve(opts.projectDir);
1826
- const yamlPath = path13__default.join(projectDir, "skaile.yaml");
1825
+ const projectDir = path35__default.resolve(opts.projectDir);
1826
+ const yamlPath = path35__default.join(projectDir, "skaile.yaml");
1827
1827
  if (!existsSync(yamlPath)) {
1828
1828
  logErr("No skaile.yaml found in current directory. Run 'skaile init' first.");
1829
1829
  process.exit(1);
@@ -1883,8 +1883,8 @@ ${installResult.output}`);
1883
1883
  );
1884
1884
  cmd.command("remove <id>").option("--project-dir <path>", "Workspace directory", process.cwd()).description("Remove a connector from skaile.yaml by its instance ID").action(async (id, opts) => {
1885
1885
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
1886
- const projectDir = path13__default.resolve(opts.projectDir);
1887
- const yamlPath = path13__default.join(projectDir, "skaile.yaml");
1886
+ const projectDir = path35__default.resolve(opts.projectDir);
1887
+ const yamlPath = path35__default.join(projectDir, "skaile.yaml");
1888
1888
  if (!existsSync(yamlPath)) {
1889
1889
  logErr("No skaile.yaml found in current directory.");
1890
1890
  process.exit(1);
@@ -1901,7 +1901,7 @@ ${installResult.output}`);
1901
1901
  cmd.command("status [id]").option("--project-dir <path>", "Workspace directory", process.cwd()).description("Connect and report health status for one or all connectors").action(async (id, opts) => {
1902
1902
  const res = await import('../connectors/index.js');
1903
1903
  res.registerBuiltinConnectors();
1904
- const projectDir = path13__default.resolve(opts.projectDir);
1904
+ const projectDir = path35__default.resolve(opts.projectDir);
1905
1905
  const declarations = res.loadConnectorDeclarations(projectDir);
1906
1906
  if (declarations.length === 0) {
1907
1907
  console.log("No connectors configured in skaile.yaml.");
@@ -1925,7 +1925,7 @@ ${installResult.output}`);
1925
1925
  await manager.disconnectAll();
1926
1926
  });
1927
1927
  cmd.command("list").description("List all configured connectors").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (opts) => {
1928
- const projectDir = path13__default.resolve(opts.projectDir);
1928
+ const projectDir = path35__default.resolve(opts.projectDir);
1929
1929
  const manager = await connectConnectors(projectDir);
1930
1930
  try {
1931
1931
  console.log(JSON.stringify(manager.listConnectors(), null, 2));
@@ -1934,7 +1934,7 @@ ${installResult.output}`);
1934
1934
  }
1935
1935
  });
1936
1936
  cmd.command("sync [id]").description("Re-sync a filesystem-face connector or all of them (git pull, S3 refresh, etc.)").option("--all", "Sync all connectors").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, opts) => {
1937
- const projectDir = path13__default.resolve(opts.projectDir);
1937
+ const projectDir = path35__default.resolve(opts.projectDir);
1938
1938
  const manager = await connectConnectors(projectDir);
1939
1939
  try {
1940
1940
  if (opts.all) {
@@ -1958,7 +1958,7 @@ ${installResult.output}`);
1958
1958
  }
1959
1959
  });
1960
1960
  cmd.command("ops <id>").description("List available operations for a connector").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, opts) => {
1961
- const projectDir = path13__default.resolve(opts.projectDir);
1961
+ const projectDir = path35__default.resolve(opts.projectDir);
1962
1962
  const manager = await connectConnectors(projectDir);
1963
1963
  try {
1964
1964
  if (!manager.has(id)) {
@@ -1973,7 +1973,7 @@ ${installResult.output}`);
1973
1973
  }
1974
1974
  });
1975
1975
  cmd.command("read <id> <resource-path>").description("Read content from a connector").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, resourcePath, opts) => {
1976
- const projectDir = path13__default.resolve(opts.projectDir);
1976
+ const projectDir = path35__default.resolve(opts.projectDir);
1977
1977
  const manager = await connectConnectors(projectDir);
1978
1978
  try {
1979
1979
  const content = await manager.read(id, resourcePath);
@@ -1983,7 +1983,7 @@ ${installResult.output}`);
1983
1983
  }
1984
1984
  });
1985
1985
  cmd.command("write <id> <resource-path> <content>").description("Write content to a connector at a path").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, resourcePath, content, opts) => {
1986
- const projectDir = path13__default.resolve(opts.projectDir);
1986
+ const projectDir = path35__default.resolve(opts.projectDir);
1987
1987
  const manager = await connectConnectors(projectDir);
1988
1988
  try {
1989
1989
  await manager.write(id, resourcePath, { data: content });
@@ -1993,7 +1993,7 @@ ${installResult.output}`);
1993
1993
  }
1994
1994
  });
1995
1995
  cmd.command("entries <id> [resource-path]").description("List entries in a connector (files, keys, rows, etc)").option("--project-dir <path>", "Workspace directory", process.cwd()).option("--recursive", "Include nested entries").option("--limit <n>", "Maximum entries to return", parsePositiveIntOption).action(async (id, resourcePath, opts) => {
1996
- const projectDir = path13__default.resolve(opts.projectDir);
1996
+ const projectDir = path35__default.resolve(opts.projectDir);
1997
1997
  const manager = await connectConnectors(projectDir);
1998
1998
  try {
1999
1999
  const entries = await manager.list(id, resourcePath, {
@@ -2006,7 +2006,7 @@ ${installResult.output}`);
2006
2006
  }
2007
2007
  });
2008
2008
  cmd.command("search <id> <query>").description("Search within a connector for matching content").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, query, opts) => {
2009
- const projectDir = path13__default.resolve(opts.projectDir);
2009
+ const projectDir = path35__default.resolve(opts.projectDir);
2010
2010
  const manager = await connectConnectors(projectDir);
2011
2011
  try {
2012
2012
  const results = await manager.search(id, query);
@@ -2016,7 +2016,7 @@ ${installResult.output}`);
2016
2016
  }
2017
2017
  });
2018
2018
  cmd.command("delete <id> <resource-path>").description("Delete an entry from a connector").option("--project-dir <path>", "Workspace directory", process.cwd()).action(async (id, resourcePath, opts) => {
2019
- const projectDir = path13__default.resolve(opts.projectDir);
2019
+ const projectDir = path35__default.resolve(opts.projectDir);
2020
2020
  const manager = await connectConnectors(projectDir);
2021
2021
  try {
2022
2022
  const ok = await manager.delete(id, resourcePath);
@@ -2026,7 +2026,7 @@ ${installResult.output}`);
2026
2026
  }
2027
2027
  });
2028
2028
  cmd.command("run <id> <op> [args...]").description("Run a custom adapter operation (e.g. git log, sqlite query)").option("--project-dir <path>", "Workspace directory", process.cwd()).allowUnknownOption().action(async (id, op, args, opts) => {
2029
- const projectDir = path13__default.resolve(opts.projectDir);
2029
+ const projectDir = path35__default.resolve(opts.projectDir);
2030
2030
  const manager = await connectConnectors(projectDir);
2031
2031
  try {
2032
2032
  if (!manager.has(id)) {
@@ -2135,7 +2135,7 @@ function envRecord() {
2135
2135
  async function buildDeployContext(projectDir) {
2136
2136
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2137
2137
  const config = resolveSkWorkspaceConfig2(projectDir);
2138
- const workspaceId = config.name ?? path13__default.basename(projectDir);
2138
+ const workspaceId = config.name ?? path35__default.basename(projectDir);
2139
2139
  let log;
2140
2140
  try {
2141
2141
  const { createLogger } = await import('../core/logging.js');
@@ -2173,7 +2173,7 @@ async function ensureTargetsRegistered(projectDir) {
2173
2173
  }
2174
2174
  }
2175
2175
  async function runUp(opts) {
2176
- const projectDir = path13__default.resolve(opts.projectDir);
2176
+ const projectDir = path35__default.resolve(opts.projectDir);
2177
2177
  await ensureTargetsRegistered(projectDir);
2178
2178
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
2179
2179
  const { resolveDeployTarget, pluginRegistry } = await import('../plugin-registry/index.js');
@@ -2241,7 +2241,7 @@ async function restoreFromHandle(projectDir) {
2241
2241
  return { target, handle, ctx };
2242
2242
  }
2243
2243
  async function runDown(opts) {
2244
- const projectDir = path13__default.resolve(opts.projectDir);
2244
+ const projectDir = path35__default.resolve(opts.projectDir);
2245
2245
  const restored = await restoreFromHandle(projectDir);
2246
2246
  if (!restored) return;
2247
2247
  await restored.handle.stop();
@@ -2250,7 +2250,7 @@ async function runDown(opts) {
2250
2250
  logOk(`Stopped ${S.cmd(restored.target.id)} and cleared the handle.`);
2251
2251
  }
2252
2252
  async function runStatus(opts) {
2253
- const projectDir = path13__default.resolve(opts.projectDir);
2253
+ const projectDir = path35__default.resolve(opts.projectDir);
2254
2254
  const restored = await restoreFromHandle(projectDir);
2255
2255
  if (!restored) return;
2256
2256
  const health = await restored.handle.health();
@@ -2264,7 +2264,7 @@ async function runStatus(opts) {
2264
2264
  console.log();
2265
2265
  }
2266
2266
  async function runLogs(opts) {
2267
- const projectDir = path13__default.resolve(opts.projectDir);
2267
+ const projectDir = path35__default.resolve(opts.projectDir);
2268
2268
  const restored = await restoreFromHandle(projectDir);
2269
2269
  if (!restored) return;
2270
2270
  if (!restored.handle.logs) {
@@ -2288,7 +2288,7 @@ function makeDeployCommand() {
2288
2288
  }
2289
2289
  function makeDiffCommand() {
2290
2290
  return new Command("diff").description("Show changes between deployed and source versions").argument("<ref>", "Asset reference (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
2291
- const am2 = new AssetManager({ projectDir: path13__default.resolve(opts.projectDir) });
2291
+ const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
2292
2292
  const result = await am2.diff(ref);
2293
2293
  if (result === null) {
2294
2294
  logInfo("No differences (or asset not found).");
@@ -2299,8 +2299,8 @@ function makeDiffCommand() {
2299
2299
  }
2300
2300
  function makeFlowCommand() {
2301
2301
  const cmd = new Command("flow").description("Manage flows");
2302
- cmd.command("list").description("List available flows").action(async () => {
2303
- const flows = discoverFlows();
2302
+ cmd.command("list").description("List available flows").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
2303
+ const flows = discoverFlows(path35__default.resolve(opts.projectDir));
2304
2304
  if (flows.length === 0) {
2305
2305
  logInfo("No flows found.");
2306
2306
  return;
@@ -2314,8 +2314,8 @@ function makeFlowCommand() {
2314
2314
  }
2315
2315
  console.log();
2316
2316
  });
2317
- cmd.command("show <id>").description("Show flow details and node graph").action(async (id) => {
2318
- const flows = discoverFlows();
2317
+ cmd.command("show <id>").description("Show flow details and node graph").option("--project-dir <path>", "Project directory", process.cwd()).action(async (id, opts) => {
2318
+ const flows = discoverFlows(path35__default.resolve(opts.projectDir));
2319
2319
  const flow = flows.find((f) => f.id === id);
2320
2320
  if (!flow) {
2321
2321
  logErr(`Flow not found: ${id}`);
@@ -2324,14 +2324,20 @@ function makeFlowCommand() {
2324
2324
  console.log();
2325
2325
  console.log(` ${S.heading(flow.name)} ${S.dim(`(${flow.id} v${flow.version})`)}`);
2326
2326
  if (flow.description) console.log(` ${S.dim(flow.description)}`);
2327
- const skillNodes = flow.nodes.filter((n) => n.type === "skill");
2328
2327
  console.log(`
2329
- ${S.heading("Nodes")} ${S.dim(`(${skillNodes.length} skills)`)}`);
2328
+ ${S.heading("Nodes")} ${S.dim(`(${flow.nodes.length})`)}`);
2330
2329
  console.log(` ${S.rule(50)}`);
2331
- for (const node of skillNodes) {
2332
- const opt = node.data?.optional ? S.dim(" [optional]") : "";
2333
- const label = (node.data?.label ?? node.id).padEnd(24);
2334
- console.log(` ${label} ${S.label("skill:")} ${S.cmd(node.data?.skill ?? node.id)}${opt}`);
2330
+ const labelWidth = Math.max(24, ...flow.nodes.map((n) => nodeLabel(n).length));
2331
+ for (const node of flow.nodes) {
2332
+ const skill = nodeSkillAsset(node);
2333
+ const asset = skill ? ` ${S.label("skill:")} ${S.cmd(skill.slice("skill:".length))}` : "";
2334
+ const inert = nodeIsInert(node);
2335
+ const opt = !inert && nodeIsOptional(node) ? S.dim(" [optional]") : "";
2336
+ const tail = `${asset}${opt}`;
2337
+ const kind = inert ? "inert" : nodeRunKind(node);
2338
+ console.log(
2339
+ ` ${nodeLabel(node).padEnd(labelWidth)} ${S.dim(tail ? kind.padEnd(10) : kind)}${tail}`
2340
+ );
2335
2341
  }
2336
2342
  console.log();
2337
2343
  });
@@ -2341,7 +2347,7 @@ function makeFlowCommand() {
2341
2347
  function makeHistoryCommand() {
2342
2348
  const cmd = new Command("history").description("Show recent add/remove/update actions");
2343
2349
  cmd.argument("[limit]", "Number of entries to show", "20").option("--project-dir <path>", "Project directory", process.cwd()).action((limitStr, opts) => {
2344
- const am2 = new AssetManager({ projectDir: path13__default.resolve(opts.projectDir) });
2350
+ const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
2345
2351
  const limit = parseInt(limitStr, 10) || 20;
2346
2352
  const entries = am2.history(limit);
2347
2353
  if (entries.length === 0) {
@@ -2361,7 +2367,7 @@ function makeHistoryCommand() {
2361
2367
  console.log();
2362
2368
  });
2363
2369
  cmd.command("clear").description("Clear action history").option("--project-dir <path>", "Project directory", process.cwd()).action((opts) => {
2364
- const am2 = new AssetManager({ projectDir: path13__default.resolve(opts.projectDir) });
2370
+ const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
2365
2371
  am2.clearHistory();
2366
2372
  logOk("History cleared.");
2367
2373
  });
@@ -2374,7 +2380,7 @@ var MCP_SERVER_ENTRY = {
2374
2380
  env: {}
2375
2381
  };
2376
2382
  function pluginDir(projectDir) {
2377
- return path13__default.join(projectDir, ".claude", "plugins", "skaile");
2383
+ return path35__default.join(projectDir, ".claude", "plugins", "skaile");
2378
2384
  }
2379
2385
  async function readJsonStrict(p7) {
2380
2386
  let raw;
@@ -2392,7 +2398,7 @@ async function readJsonStrict(p7) {
2392
2398
  }
2393
2399
  }
2394
2400
  async function writeJson(p7, value) {
2395
- await fs6.mkdir(path13__default.dirname(p7), { recursive: true });
2401
+ await fs6.mkdir(path35__default.dirname(p7), { recursive: true });
2396
2402
  await fs6.writeFile(p7, `${JSON.stringify(value, null, 2)}
2397
2403
  `);
2398
2404
  }
@@ -2400,8 +2406,8 @@ async function copyDir(src, dest) {
2400
2406
  await fs6.mkdir(dest, { recursive: true });
2401
2407
  const entries = await fs6.readdir(src, { withFileTypes: true });
2402
2408
  for (const entry of entries) {
2403
- const srcPath = path13__default.join(src, entry.name);
2404
- const destPath = path13__default.join(dest, entry.name);
2409
+ const srcPath = path35__default.join(src, entry.name);
2410
+ const destPath = path35__default.join(dest, entry.name);
2405
2411
  if (entry.isDirectory()) await copyDir(srcPath, destPath);
2406
2412
  else await fs6.copyFile(srcPath, destPath);
2407
2413
  }
@@ -2410,14 +2416,14 @@ async function install(projectDir, opts) {
2410
2416
  return opts?.full ? installFullPlugin(projectDir) : installMcp(projectDir);
2411
2417
  }
2412
2418
  async function installMcp(projectDir) {
2413
- const mcpPath = path13__default.join(projectDir, ".claude", "mcp.json");
2419
+ const mcpPath = path35__default.join(projectDir, ".claude", "mcp.json");
2414
2420
  const existing = await readJsonStrict(mcpPath) ?? {};
2415
2421
  const mcpServers = { ...existing.mcpServers ?? {} };
2416
2422
  const previous = mcpServers[SKAILE_MCP_NAME];
2417
2423
  const matches = previous && JSON.stringify(previous) === JSON.stringify(MCP_SERVER_ENTRY);
2418
2424
  let warning;
2419
2425
  if (previous && !matches) {
2420
- warning = `overwrote existing ${SKAILE_MCP_NAME} entry in ${path13__default.relative(projectDir, mcpPath)}`;
2426
+ warning = `overwrote existing ${SKAILE_MCP_NAME} entry in ${path35__default.relative(projectDir, mcpPath)}`;
2421
2427
  }
2422
2428
  mcpServers[SKAILE_MCP_NAME] = MCP_SERVER_ENTRY;
2423
2429
  await writeJson(mcpPath, { ...existing, mcpServers });
@@ -2426,15 +2432,15 @@ async function installMcp(projectDir) {
2426
2432
  async function installFullPlugin(projectDir) {
2427
2433
  const dir = pluginDir(projectDir);
2428
2434
  for (const [rel, content] of Object.entries(buildClaudePluginFiles())) {
2429
- const dest = path13__default.join(dir, rel);
2430
- await fs6.mkdir(path13__default.dirname(dest), { recursive: true });
2435
+ const dest = path35__default.join(dir, rel);
2436
+ await fs6.mkdir(path35__default.dirname(dest), { recursive: true });
2431
2437
  await fs6.writeFile(dest, content);
2432
2438
  }
2433
- const projectSkillsDir = path13__default.join(projectDir, ".skaile", "skills");
2439
+ const projectSkillsDir = path35__default.join(projectDir, ".skaile", "skills");
2434
2440
  if (existsSync(projectSkillsDir)) {
2435
- await copyDir(projectSkillsDir, path13__default.join(dir, "skills"));
2441
+ await copyDir(projectSkillsDir, path35__default.join(dir, "skills"));
2436
2442
  }
2437
- const settingsPath = path13__default.join(projectDir, ".claude", "settings.json");
2443
+ const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2438
2444
  const settings = await readJsonStrict(settingsPath) ?? {};
2439
2445
  const plugins = settings.plugins ?? [];
2440
2446
  if (!plugins.includes(dir)) plugins.push(dir);
@@ -2442,8 +2448,8 @@ async function installFullPlugin(projectDir) {
2442
2448
  return { changed: true, method: "plugin" };
2443
2449
  }
2444
2450
  async function uninstall(projectDir) {
2445
- const settingsPath = path13__default.join(projectDir, ".claude", "settings.json");
2446
- const mcpPath = path13__default.join(projectDir, ".claude", "mcp.json");
2451
+ const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2452
+ const mcpPath = path35__default.join(projectDir, ".claude", "mcp.json");
2447
2453
  const dir = pluginDir(projectDir);
2448
2454
  let changed = false;
2449
2455
  const settings = await readJsonStrict(settingsPath);
@@ -2477,12 +2483,12 @@ async function uninstall(projectDir) {
2477
2483
  async function detectInstall(projectDir) {
2478
2484
  const dir = pluginDir(projectDir);
2479
2485
  const settings = await readJsonStrict(
2480
- path13__default.join(projectDir, ".claude", "settings.json")
2486
+ path35__default.join(projectDir, ".claude", "settings.json")
2481
2487
  );
2482
- if (existsSync(path13__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir)) {
2488
+ if (existsSync(path35__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir)) {
2483
2489
  return { method: "plugin", pluginPath: dir };
2484
2490
  }
2485
- const mcp = await readJsonStrict(path13__default.join(projectDir, ".claude", "mcp.json"));
2491
+ const mcp = await readJsonStrict(path35__default.join(projectDir, ".claude", "mcp.json"));
2486
2492
  if (mcp?.mcpServers && SKAILE_MCP_NAME in mcp.mcpServers) {
2487
2493
  return { method: "mcp" };
2488
2494
  }
@@ -2491,7 +2497,7 @@ async function detectInstall(projectDir) {
2491
2497
  async function enable(projectDir) {
2492
2498
  const detected = await detectInstall(projectDir);
2493
2499
  if (!detected) throw new Error("plugin not installed for claude-code");
2494
- const settingsPath = path13__default.join(projectDir, ".claude", "settings.json");
2500
+ const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2495
2501
  const settings = await readJsonStrict(settingsPath) ?? {};
2496
2502
  if (detected.method === "plugin") {
2497
2503
  const disabled2 = settings.disabledPlugins ?? [];
@@ -2513,7 +2519,7 @@ async function enable(projectDir) {
2513
2519
  async function disable(projectDir) {
2514
2520
  const detected = await detectInstall(projectDir);
2515
2521
  if (!detected) throw new Error("plugin not installed for claude-code");
2516
- const settingsPath = path13__default.join(projectDir, ".claude", "settings.json");
2522
+ const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2517
2523
  const settings = await readJsonStrict(settingsPath) ?? {};
2518
2524
  if (detected.method === "plugin") {
2519
2525
  const list2 = settings.disabledPlugins ?? [];
@@ -2533,12 +2539,12 @@ async function disable(projectDir) {
2533
2539
  return { changed: true };
2534
2540
  }
2535
2541
  async function status(projectDir) {
2536
- const settingsPath = path13__default.join(projectDir, ".claude", "settings.json");
2537
- const mcpPath = path13__default.join(projectDir, ".claude", "mcp.json");
2542
+ const settingsPath = path35__default.join(projectDir, ".claude", "settings.json");
2543
+ const mcpPath = path35__default.join(projectDir, ".claude", "mcp.json");
2538
2544
  const dir = pluginDir(projectDir);
2539
2545
  const settings = await readJsonStrict(settingsPath);
2540
2546
  const mcp = await readJsonStrict(mcpPath);
2541
- const pluginInstalled = !!(existsSync(path13__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir));
2547
+ const pluginInstalled = !!(existsSync(path35__default.join(dir, ".claude-plugin", "plugin.json")) && settings?.plugins?.includes(dir));
2542
2548
  const mcpInstalled = !!(mcp?.mcpServers && SKAILE_MCP_NAME in mcp.mcpServers);
2543
2549
  if (!pluginInstalled && !mcpInstalled) {
2544
2550
  return {
@@ -2556,7 +2562,7 @@ async function status(projectDir) {
2556
2562
  installed: "yes",
2557
2563
  enabled: disabled2 ? "no" : "yes",
2558
2564
  method: "plugin",
2559
- location: path13__default.relative(projectDir, dir)
2565
+ location: path35__default.relative(projectDir, dir)
2560
2566
  };
2561
2567
  }
2562
2568
  const disabled = settings?.disabledMcpjsonServers?.includes(SKAILE_MCP_NAME) ?? false;
@@ -2565,7 +2571,7 @@ async function status(projectDir) {
2565
2571
  installed: "yes",
2566
2572
  enabled: disabled ? "no" : "yes",
2567
2573
  method: "mcp",
2568
- location: path13__default.relative(projectDir, mcpPath)
2574
+ location: path35__default.relative(projectDir, mcpPath)
2569
2575
  };
2570
2576
  }
2571
2577
  var SKAILE_MCP_NAME2 = "skaile-workspace";
@@ -2592,7 +2598,7 @@ async function readConfig(p7) {
2592
2598
  }
2593
2599
  }
2594
2600
  async function writeConfig(p7, value) {
2595
- await fs6.mkdir(path13__default.dirname(p7), { recursive: true });
2601
+ await fs6.mkdir(path35__default.dirname(p7), { recursive: true });
2596
2602
  const cleaned = {};
2597
2603
  for (const [k, v] of Object.entries(value)) {
2598
2604
  if (v === void 0) continue;
@@ -2601,7 +2607,7 @@ async function writeConfig(p7, value) {
2601
2607
  await fs6.writeFile(p7, stringify$1(cleaned));
2602
2608
  }
2603
2609
  function configPath(projectDir) {
2604
- return path13__default.join(projectDir, ".codex", "config.toml");
2610
+ return path35__default.join(projectDir, ".codex", "config.toml");
2605
2611
  }
2606
2612
  async function install2(projectDir) {
2607
2613
  const p7 = configPath(projectDir);
@@ -2612,7 +2618,7 @@ async function install2(projectDir) {
2612
2618
  const matches = previous && JSON.stringify(previous) === JSON.stringify(next);
2613
2619
  let warning;
2614
2620
  if (previous && !matches) {
2615
- warning = `overwrote existing ${SKAILE_MCP_NAME2} entry in ${path13__default.relative(projectDir, p7)}`;
2621
+ warning = `overwrote existing ${SKAILE_MCP_NAME2} entry in ${path35__default.relative(projectDir, p7)}`;
2616
2622
  }
2617
2623
  if (matches) return { changed: false, method: "toml" };
2618
2624
  servers[SKAILE_MCP_NAME2] = next;
@@ -2653,12 +2659,12 @@ async function status2(projectDir) {
2653
2659
  installed: "yes",
2654
2660
  enabled: "n/a",
2655
2661
  method: "mcp",
2656
- location: path13__default.relative(projectDir, p7)
2662
+ location: path35__default.relative(projectDir, p7)
2657
2663
  };
2658
2664
  }
2659
2665
  async function install3(projectDir) {
2660
- const extDir = path13__default.join(projectDir, ".omp", "extensions");
2661
- const extPath = path13__default.join(extDir, "skaile.ts");
2666
+ const extDir = path35__default.join(projectDir, ".omp", "extensions");
2667
+ const extPath = path35__default.join(extDir, "skaile.ts");
2662
2668
  await fs6.mkdir(extDir, { recursive: true });
2663
2669
  const { WorkspacePlugin } = await import('../workspace-plugin/index.js');
2664
2670
  const plugin = new WorkspacePlugin({ projectDir });
@@ -2673,7 +2679,7 @@ async function install3(projectDir) {
2673
2679
  return { changed: true, method: "generated" };
2674
2680
  }
2675
2681
  async function uninstall3(projectDir) {
2676
- const extPath = path13__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2682
+ const extPath = path35__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2677
2683
  try {
2678
2684
  await fs6.unlink(extPath);
2679
2685
  return { changed: true };
@@ -2682,14 +2688,14 @@ async function uninstall3(projectDir) {
2682
2688
  }
2683
2689
  }
2684
2690
  async function status3(projectDir) {
2685
- const extPath = path13__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2691
+ const extPath = path35__default.join(projectDir, ".omp", "extensions", "skaile.ts");
2686
2692
  if (existsSync(extPath)) {
2687
2693
  return {
2688
2694
  backend: "omp",
2689
2695
  installed: "yes",
2690
2696
  enabled: "n/a",
2691
2697
  method: "extension",
2692
- location: path13__default.relative(projectDir, extPath)
2698
+ location: path35__default.relative(projectDir, extPath)
2693
2699
  };
2694
2700
  }
2695
2701
  return {
@@ -2752,7 +2758,7 @@ async function installCodex(projectDir) {
2752
2758
  console.log(` ${S.dim("\u2192")} Restart Codex CLI to pick up the change.`);
2753
2759
  }
2754
2760
  async function runInstall(opts) {
2755
- const projectDir = path13__default.resolve(opts.projectDir);
2761
+ const projectDir = path35__default.resolve(opts.projectDir);
2756
2762
  const targets = resolveDriver(opts.driver);
2757
2763
  let exitCode = 0;
2758
2764
  if (targets.includes("claude-code")) {
@@ -2786,7 +2792,7 @@ async function uninstallCodex(projectDir) {
2786
2792
  else logInfo(`codex: not installed`);
2787
2793
  }
2788
2794
  async function runUninstall(opts) {
2789
- const projectDir = path13__default.resolve(opts.projectDir);
2795
+ const projectDir = path35__default.resolve(opts.projectDir);
2790
2796
  const targets = resolveDriver(opts.driver);
2791
2797
  let exitCode = 0;
2792
2798
  if (targets.includes("claude-code")) {
@@ -2829,7 +2835,7 @@ async function toggleTarget(t, projectDir, action3) {
2829
2835
  });
2830
2836
  }
2831
2837
  async function runToggle(opts, action3) {
2832
- const projectDir = path13__default.resolve(opts.projectDir);
2838
+ const projectDir = path35__default.resolve(opts.projectDir);
2833
2839
  const requestedAll = opts.driver === "all";
2834
2840
  const targets = resolveDriver(opts.driver);
2835
2841
  const usageError = checkToggleSupported(targets, requestedAll, action3);
@@ -2841,7 +2847,7 @@ async function runToggle(opts, action3) {
2841
2847
  return exitCode;
2842
2848
  }
2843
2849
  async function runStatus2(opts) {
2844
- const projectDir = path13__default.resolve(opts.projectDir);
2850
+ const projectDir = path35__default.resolve(opts.projectDir);
2845
2851
  const targets = resolveDriver(opts.driver);
2846
2852
  const rows = [];
2847
2853
  let exitCode = 0;
@@ -2912,7 +2918,7 @@ async function runHook(event) {
2912
2918
  await plugin.shutdown();
2913
2919
  return;
2914
2920
  }
2915
- const store = new PluginStore(path13__default.join(projectDir, ".skaile", "plugin-state.json"));
2921
+ const store = new PluginStore(path35__default.join(projectDir, ".skaile", "plugin-state.json"));
2916
2922
  await store.load();
2917
2923
  const status4 = store.get("connector:status");
2918
2924
  if (status4 && typeof status4 === "object" && Object.keys(status4).length > 0) {
@@ -2988,7 +2994,7 @@ async function indexLibrary(lib, index) {
2988
2994
  }
2989
2995
  }
2990
2996
  function domainPublisher(libraryPath, domain) {
2991
- const domainFile = path13.join(libraryPath, domain, "DOMAIN.md");
2997
+ const domainFile = path35.join(libraryPath, domain, "DOMAIN.md");
2992
2998
  if (!fs13.existsSync(domainFile)) return void 0;
2993
2999
  try {
2994
3000
  const { data } = parseFrontmatter(fs13.readFileSync(domainFile, "utf8"));
@@ -3071,7 +3077,7 @@ function makeLibraryCommand() {
3071
3077
  cmd.command("init <name>").description("Create a new local library at ~/.skaile/libraries/<name>").option("--git <url>", "Initialize as a git library tracking <url>").option("--owner", "Mark as owner (default for local)").option("--contributor", "Mark as contributor").option("--reader", "Mark as reader").action(
3072
3078
  async (name, opts) => {
3073
3079
  const libDir = resolveLibraryDir();
3074
- const libPath = path13.join(libDir, name);
3080
+ const libPath = path35.join(libDir, name);
3075
3081
  const ownership = opts.contributor ? "contributor" : opts.reader ? "reader" : "owner";
3076
3082
  const { manager, close } = await openLibraryManager();
3077
3083
  try {
@@ -3143,21 +3149,21 @@ function makeLibraryCommand() {
3143
3149
  }
3144
3150
  const effectiveKind = opts.kind ?? kind;
3145
3151
  const am2 = new AssetManager({ projectDir: process.cwd() });
3146
- const destDir = opts.dir ? path13.join(target.path, opts.dir) : target.path;
3152
+ const destDir = opts.dir ? path35.join(target.path, opts.dir) : target.path;
3147
3153
  const res = am2.create(name, effectiveKind, destDir);
3148
3154
  if (!res.ok) {
3149
3155
  logErr(res.path);
3150
3156
  process.exit(1);
3151
3157
  }
3152
3158
  logOk(`Created ${effectiveKind}: ${pc5.dim(res.path)}`);
3153
- const domain2 = opts.dir ? opts.dir.split(path13.sep)[0] : void 0;
3159
+ const domain2 = opts.dir ? opts.dir.split(path35.sep)[0] : void 0;
3154
3160
  const publisher = resolveLibraryPublisher(target, opts, domain2, getStoreIdentity());
3155
3161
  stampAssetPublisher(res.path, publisher);
3156
3162
  ensureManifestPublisher(target.path, publisher);
3157
3163
  upsertManifestAsset(target.path, {
3158
3164
  kind: effectiveKind,
3159
3165
  name,
3160
- root: path13.relative(target.path, res.path) || name,
3166
+ root: path35.relative(target.path, res.path) || name,
3161
3167
  version: "0.1.0"
3162
3168
  });
3163
3169
  const idx = await indexLibrary(target, library);
@@ -3232,7 +3238,7 @@ function makeLibraryCommand() {
3232
3238
  const { manager, close } = await openLibraryManager();
3233
3239
  try {
3234
3240
  const target = await resolveTargetLibrary(manager, opts.library);
3235
- const domainFile = path13.join(target.path, name, "DOMAIN.md");
3241
+ const domainFile = path35.join(target.path, name, "DOMAIN.md");
3236
3242
  if (!existsSync(domainFile)) {
3237
3243
  logErr(`Domain "${name}" not found in "${target.name}" (no ${domainFile}).`);
3238
3244
  process.exit(1);
@@ -3255,8 +3261,8 @@ function makeLibraryCommand() {
3255
3261
  const { manager, close } = await openLibraryManager();
3256
3262
  try {
3257
3263
  const lib = await manager.requireLibrary(oldName);
3258
- const parent = path13.dirname(lib.path);
3259
- const newPath = path13.join(parent, newName);
3264
+ const parent = path35.dirname(lib.path);
3265
+ const newPath = path35.join(parent, newName);
3260
3266
  if (fs13.existsSync(newPath)) {
3261
3267
  logErr(`Target directory already exists: ${newPath}`);
3262
3268
  process.exit(1);
@@ -3416,16 +3422,16 @@ function makeLibraryCommand() {
3416
3422
  });
3417
3423
  cmd.command("publish <lib>").description("Push + register the library's manifest atomically (needs git backend)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--create-repo", "Provision + link a public github repo if the library has no remote").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; push nothing and call no store endpoint").action(
3418
3424
  async (lib, opts) => {
3419
- const { runLibraryPublish } = await import('../library-publish-BEFA7OCS.js');
3425
+ const { runLibraryPublish } = await import('../library-publish-CVYFMVGR.js');
3420
3426
  await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
3421
3427
  }
3422
3428
  );
3423
3429
  cmd.command("register <lib>").description("Register the library's manifest without pushing (bytes already on github)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; call no store endpoint").action(async (lib, opts) => {
3424
- const { runLibraryRegister } = await import('../library-publish-BEFA7OCS.js');
3430
+ const { runLibraryRegister } = await import('../library-publish-CVYFMVGR.js');
3425
3431
  await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
3426
3432
  });
3427
3433
  cmd.command("yank <lib>").description("Retract the library's published assets from the store").option("--asset <ref>", "Yank only the single asset matching this ref/name").action(async (lib, opts) => {
3428
- const { runLibraryYank } = await import('../library-publish-BEFA7OCS.js');
3434
+ const { runLibraryYank } = await import('../library-publish-CVYFMVGR.js');
3429
3435
  await withStoreErrorHandling(() => runLibraryYank(lib, opts));
3430
3436
  });
3431
3437
  return cmd;
@@ -3442,14 +3448,14 @@ function stampAssetPublisher(assetDir, publisher) {
3442
3448
  const markers = ["SKILL.md", "AGENT.md", "CONTRACT.md"];
3443
3449
  let markerFile;
3444
3450
  for (const m of markers) {
3445
- if (fs13.existsSync(path13.join(assetDir, m))) {
3446
- markerFile = path13.join(assetDir, m);
3451
+ if (fs13.existsSync(path35.join(assetDir, m))) {
3452
+ markerFile = path35.join(assetDir, m);
3447
3453
  break;
3448
3454
  }
3449
3455
  }
3450
3456
  if (!markerFile) {
3451
3457
  const promptMd = fs13.readdirSync(assetDir).find((f) => f.endsWith(".prompt.md"));
3452
- if (promptMd) markerFile = path13.join(assetDir, promptMd);
3458
+ if (promptMd) markerFile = path35.join(assetDir, promptMd);
3453
3459
  }
3454
3460
  if (!markerFile) return;
3455
3461
  try {
@@ -3476,7 +3482,7 @@ function ensureManifestPublisher(libraryPath, publisher) {
3476
3482
  async function syncManifestWithDisk(libraryPath, libraryName) {
3477
3483
  const publisher = loadSkPublishManifest(libraryPath)?.publisher ?? slugifyAssetName(libraryName);
3478
3484
  for (const e of await scanDirectory(libraryPath, publisher)) {
3479
- const root = path13.relative(libraryPath, path13.dirname(e.source)) || e.name;
3485
+ const root = path35.relative(libraryPath, path35.dirname(e.source)) || e.name;
3480
3486
  upsertManifestAsset(libraryPath, { kind: e.kind, name: e.name, root, version: e.version });
3481
3487
  }
3482
3488
  }
@@ -3518,9 +3524,9 @@ async function printOverallStatus(projectDir, asJson) {
3518
3524
  } catch {
3519
3525
  secretsStrategy = "unavailable";
3520
3526
  }
3521
- const resolvedProjectDir = path13.resolve(projectDir);
3522
- const hasWorkspaceConfig = existsSync(path13.join(resolvedProjectDir, "skaile.yaml"));
3523
- const hasLockFile = existsSync(path13.join(resolvedProjectDir, "skaile.lock.yaml"));
3527
+ const resolvedProjectDir = path35.resolve(projectDir);
3528
+ const hasWorkspaceConfig = existsSync(path35.join(resolvedProjectDir, "skaile.yaml"));
3529
+ const hasLockFile = existsSync(path35.join(resolvedProjectDir, "skaile.lock.yaml"));
3524
3530
  let assignments = [];
3525
3531
  if (hasWorkspaceConfig) {
3526
3532
  try {
@@ -4147,7 +4153,7 @@ function scheduleSoftDepPreview() {
4147
4153
  }
4148
4154
  async function loadAssets() {
4149
4155
  softDepPreviewCache.clear();
4150
- const { gatherAssetFeeds } = await import('../asset-feeds-SEYSNNEM.js');
4156
+ const { gatherAssetFeeds } = await import('../asset-feeds-AGAH5OHC.js');
4151
4157
  const { entries, domains, notes } = await gatherAssetFeeds(am, am.projectDir);
4152
4158
  if (notes.length > 0) {
4153
4159
  state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
@@ -4169,7 +4175,7 @@ function rebuildSourceTree() {
4169
4175
  rebuildVisibleSources();
4170
4176
  }
4171
4177
  function sourceOrgRepo(s) {
4172
- const parts = s.path.split(path13__default.sep).filter(Boolean);
4178
+ const parts = s.path.split(path35__default.sep).filter(Boolean);
4173
4179
  if (parts.length < 2) return null;
4174
4180
  return { org: parts[parts.length - 2], repo: parts[parts.length - 1] };
4175
4181
  }
@@ -4353,14 +4359,14 @@ function reconcileCollapsedSets(rows) {
4353
4359
  async function loadSourcesAndLibraries() {
4354
4360
  try {
4355
4361
  const [{ openLibraryManager: openLibraryManager2 }, { skaileHomeDir }, { getGlobalCacheDir: getGlobalCacheDir2 }] = await Promise.all([
4356
- import('../open-library-WJ7P7B4N.js'),
4362
+ import('../open-library-XB65LU3M.js'),
4357
4363
  import('../library/index.js'),
4358
4364
  import('../core/index.js')
4359
4365
  ]);
4360
4366
  const { manager, library, close } = await openLibraryManager2();
4361
4367
  try {
4362
4368
  const newRoot = getGlobalCacheDir2();
4363
- const legacyRoot = path13__default.join(skaileHomeDir(), "sources");
4369
+ const legacyRoot = path35__default.join(skaileHomeDir(), "sources");
4364
4370
  const isSourceRow = (l) => l.path.startsWith(newRoot) || l.path.startsWith(legacyRoot);
4365
4371
  const libs = await manager.listLibraries();
4366
4372
  const defs = await library.listAssetDefs();
@@ -5420,13 +5426,13 @@ async function run(projectDir) {
5420
5426
  }
5421
5427
  function makeManageCommand() {
5422
5428
  return new Command("manage").description("Interactive TUI for managing assets, sources, and libraries").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
5423
- await run(path13__default.resolve(opts.projectDir));
5429
+ await run(path35__default.resolve(opts.projectDir));
5424
5430
  });
5425
5431
  }
5426
5432
  function makeMcpServerCommand() {
5427
5433
  return new Command("mcp-server").description("Start skaile workspace MCP server (stdio transport)").option("--project-dir <path>", "Project directory (default: cwd)", process.cwd()).action(async (opts) => {
5428
- const path37 = await import('path');
5429
- const projectDir = path37.default.resolve(opts.projectDir);
5434
+ const path38 = await import('path');
5435
+ const projectDir = path38.default.resolve(opts.projectDir);
5430
5436
  const { LogStore, StdoutSink, registerLogStore } = await import('../core/logging.js');
5431
5437
  registerLogStore(
5432
5438
  new LogStore({
@@ -5463,8 +5469,8 @@ function makeNpxCommand() {
5463
5469
  skills.command("add <url>").description(
5464
5470
  "Clone a repo, register it in the project's skaile.yaml sources[], and install a skill from it"
5465
5471
  ).requiredOption("--skill <name>", "Skill name to install from the repo").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", "Agent framework", "claude-code").option("--global", "Deploy globally").action(async (url, opts) => {
5466
- const projectDir = path13__default.resolve(opts.projectDir);
5467
- const projYaml = path13__default.join(projectDir, "skaile.yaml");
5472
+ const projectDir = path35__default.resolve(opts.projectDir);
5473
+ const projYaml = path35__default.join(projectDir, "skaile.yaml");
5468
5474
  if (!existsSync(projYaml)) {
5469
5475
  logErr(`No skaile.yaml in ${projectDir} \u2014 run \`skaile init\` first.`);
5470
5476
  process.exit(1);
@@ -5477,11 +5483,11 @@ function makeNpxCommand() {
5477
5483
  }
5478
5484
  const spinner4 = p5.spinner();
5479
5485
  const key = sourceCacheKey(url);
5480
- const clonePath = path13__default.join(getGlobalCacheDir(), key);
5486
+ const clonePath = path35__default.join(getGlobalCacheDir(), key);
5481
5487
  spinner4.start(`Cloning ${url}`);
5482
5488
  try {
5483
5489
  if (!existsSync(clonePath)) {
5484
- mkdirSync(path13__default.dirname(clonePath), { recursive: true });
5490
+ mkdirSync(path35__default.dirname(clonePath), { recursive: true });
5485
5491
  execSync(`git clone ${url} ${clonePath}`, { stdio: "ignore" });
5486
5492
  }
5487
5493
  spinner4.stop(`Cloned to ${key}`);
@@ -5527,7 +5533,7 @@ function makeNpxCommand() {
5527
5533
  return npx;
5528
5534
  }
5529
5535
  function resolvePublisher(clonePath, url) {
5530
- const manifestPath = path13__default.join(clonePath, SKAILE_MANIFEST_FILENAME);
5536
+ const manifestPath = path35__default.join(clonePath, SKAILE_MANIFEST_FILENAME);
5531
5537
  if (existsSync(manifestPath)) {
5532
5538
  try {
5533
5539
  const { manifest } = decodeSkaileManifest(readFileSync(manifestPath, "utf8"));
@@ -5540,12 +5546,12 @@ function resolvePublisher(clonePath, url) {
5540
5546
  return url.match(/github\.com[/:]([^/]+)\/[^/]+/)?.[1];
5541
5547
  }
5542
5548
  function resolveSkillName(clonePath, requested) {
5543
- const skillsDir = path13__default.join(clonePath, "skills");
5544
- if (existsSync(path13__default.join(skillsDir, requested, "SKILL.md"))) return requested;
5549
+ const skillsDir = path35__default.join(clonePath, "skills");
5550
+ if (existsSync(path35__default.join(skillsDir, requested, "SKILL.md"))) return requested;
5545
5551
  if (!existsSync(skillsDir)) return requested;
5546
5552
  for (const entry of readdirSync(skillsDir, { withFileTypes: true })) {
5547
5553
  if (!entry.isDirectory()) continue;
5548
- const md = path13__default.join(skillsDir, entry.name, "SKILL.md");
5554
+ const md = path35__default.join(skillsDir, entry.name, "SKILL.md");
5549
5555
  if (!existsSync(md)) continue;
5550
5556
  try {
5551
5557
  const { data } = parseFrontmatter(readFileSync(md, "utf8"));
@@ -5560,7 +5566,7 @@ function makeOutdatedCommand() {
5560
5566
  new Option("--target <agent>", "Driver target").default("claude-code").choices(SUPPORTED_DRIVER_TARGETS)
5561
5567
  ).action((name, opts) => {
5562
5568
  const am2 = new AssetManager({
5563
- projectDir: path13__default.resolve(opts.projectDir),
5569
+ projectDir: path35__default.resolve(opts.projectDir),
5564
5570
  driverTarget: opts.target
5565
5571
  });
5566
5572
  const entries = am2.outdated();
@@ -5589,7 +5595,7 @@ function makeOutdatedCommand() {
5589
5595
  function makePatchCommand() {
5590
5596
  const cmd = new Command("patch").description("Patch workflow for skill improvement");
5591
5597
  cmd.command("extract <ref>").alias("start").description("Extract asset for local editing").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
5592
- const am2 = new AssetManager({ projectDir: path13__default.resolve(opts.projectDir) });
5598
+ const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5593
5599
  try {
5594
5600
  const dest = await am2.patch(ref);
5595
5601
  logOk(`Extracted to ${S.dim(dest)}`);
@@ -5600,7 +5606,7 @@ function makePatchCommand() {
5600
5606
  }
5601
5607
  });
5602
5608
  cmd.command("commit <ref>").description("Generate .patch file from edits").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
5603
- const am2 = new AssetManager({ projectDir: path13__default.resolve(opts.projectDir) });
5609
+ const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5604
5610
  try {
5605
5611
  const patchFile = await am2.patchCommit(ref);
5606
5612
  logOk(`Patch saved to ${S.dim(patchFile)}`);
@@ -5611,7 +5617,7 @@ function makePatchCommand() {
5611
5617
  }
5612
5618
  });
5613
5619
  cmd.command("submit <ref>").description("Apply patch to repo clone and prepare for PR").option("--project-dir <path>", "Project directory", process.cwd()).action(async (ref, opts) => {
5614
- const am2 = new AssetManager({ projectDir: path13__default.resolve(opts.projectDir) });
5620
+ const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5615
5621
  try {
5616
5622
  await am2.patchSubmit(ref);
5617
5623
  logOk("Patch applied to repo clone and committed.");
@@ -5624,7 +5630,7 @@ function makePatchCommand() {
5624
5630
  }
5625
5631
  });
5626
5632
  cmd.command("remove <ref>").description("Remove local patch after upstream merge").option("--project-dir <path>", "Project directory", process.cwd()).action((ref, opts) => {
5627
- const am2 = new AssetManager({ projectDir: path13__default.resolve(opts.projectDir) });
5633
+ const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
5628
5634
  am2.patchRemove(ref);
5629
5635
  logOk(`Patch removed for ${ref}`);
5630
5636
  });
@@ -5656,10 +5662,10 @@ async function reconcileAndReport(projectDir, plugins) {
5656
5662
  }
5657
5663
  }
5658
5664
  async function runInstall2(spec, opts) {
5659
- const projectDir = path13__default.resolve(opts.projectDir);
5665
+ const projectDir = path35__default.resolve(opts.projectDir);
5660
5666
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
5661
5667
  const { specName } = await import('../plugin-store-EOP3S7OU.js');
5662
- const yamlPath = path13__default.join(projectDir, "skaile.yaml");
5668
+ const yamlPath = path35__default.join(projectDir, "skaile.yaml");
5663
5669
  const editor = WorkspaceYamlEditor2.load(yamlPath);
5664
5670
  const replaced = editor.addPlugin(spec, specName);
5665
5671
  editor.save();
@@ -5668,10 +5674,10 @@ async function runInstall2(spec, opts) {
5668
5674
  await reconcileAndReport(projectDir, editor.getPlugins());
5669
5675
  }
5670
5676
  async function runRemove(name, opts) {
5671
- const projectDir = path13__default.resolve(opts.projectDir);
5677
+ const projectDir = path35__default.resolve(opts.projectDir);
5672
5678
  const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
5673
5679
  const { specName } = await import('../plugin-store-EOP3S7OU.js');
5674
- const yamlPath = path13__default.join(projectDir, "skaile.yaml");
5680
+ const yamlPath = path35__default.join(projectDir, "skaile.yaml");
5675
5681
  const editor = WorkspaceYamlEditor2.load(yamlPath);
5676
5682
  const removed = editor.removePlugin(name, specName);
5677
5683
  if (!removed) {
@@ -5683,7 +5689,7 @@ async function runRemove(name, opts) {
5683
5689
  await reconcileAndReport(projectDir, editor.getPlugins());
5684
5690
  }
5685
5691
  async function runList(opts) {
5686
- const projectDir = path13__default.resolve(opts.projectDir);
5692
+ const projectDir = path35__default.resolve(opts.projectDir);
5687
5693
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
5688
5694
  const config = resolveSkWorkspaceConfig2(projectDir);
5689
5695
  const declared = config.plugins ?? [];
@@ -5873,7 +5879,7 @@ function neededSources(config, lock) {
5873
5879
  }
5874
5880
  function sourcesWithSidecar(sources) {
5875
5881
  const dir = getStoreManifestsDir();
5876
- return sources.filter((s) => existsSync(path13.join(dir, `${storeManifestSlug(s.url)}.yaml`))).map((s) => s.url);
5882
+ return sources.filter((s) => existsSync(path35.join(dir, `${storeManifestSlug(s.url)}.yaml`))).map((s) => s.url);
5877
5883
  }
5878
5884
  function compact(obj) {
5879
5885
  const out = {};
@@ -5965,8 +5971,8 @@ function redactSecrets(preset, findings) {
5965
5971
  }
5966
5972
  return { preset: next, keys };
5967
5973
  }
5968
- function placeholderKey(itemId, path37) {
5969
- return `${itemId}_${path37}`.replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
5974
+ function placeholderKey(itemId, path38) {
5975
+ return `${itemId}_${path38}`.replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toUpperCase();
5970
5976
  }
5971
5977
  function setAtPath(root, segments, value) {
5972
5978
  let node = root;
@@ -5989,7 +5995,7 @@ function makePresetCommand() {
5989
5995
  cmd.command("init [name]").description("Scaffold a new .preset.yaml file").option("--dir <path>", "Output directory", process.cwd()).action(async (name, opts) => {
5990
5996
  const presetName = name ?? "my-preset";
5991
5997
  const filename = `${presetName}.preset.yaml`;
5992
- const outPath = path13__default.join(path13__default.resolve(opts.dir), filename);
5998
+ const outPath = path35__default.join(path35__default.resolve(opts.dir), filename);
5993
5999
  if (existsSync(outPath)) {
5994
6000
  logErr(`File already exists: ${outPath}`);
5995
6001
  logInfo("Choose a different name or remove the existing file.");
@@ -6022,7 +6028,7 @@ function makePresetCommand() {
6022
6028
  return cmd;
6023
6029
  }
6024
6030
  async function runPresetExport(name, opts) {
6025
- const projectDir = path13__default.resolve(opts.projectDir);
6031
+ const projectDir = path35__default.resolve(opts.projectDir);
6026
6032
  const file = loadSkWorkspaceConfig(projectDir);
6027
6033
  if (!file) {
6028
6034
  logErr(`No skaile.yaml found in ${projectDir}`);
@@ -6032,7 +6038,7 @@ async function runPresetExport(name, opts) {
6032
6038
  const presetName = name ?? file.config.name ?? "my-preset";
6033
6039
  let lock = null;
6034
6040
  try {
6035
- lock = readLock(path13__default.join(projectDir, "skaile.lock.yaml"));
6041
+ lock = readLock(path35__default.join(projectDir, "skaile.lock.yaml"));
6036
6042
  } catch {
6037
6043
  lock = null;
6038
6044
  }
@@ -6073,7 +6079,7 @@ async function runPresetExport(name, opts) {
6073
6079
  const contents = header ? `${header}
6074
6080
  ${body}` : body;
6075
6081
  if (opts.out && opts.dir !== process.cwd()) logWarn("--dir is ignored when --out is set.");
6076
- const outPath = opts.out ? path13__default.resolve(opts.out) : path13__default.join(path13__default.resolve(opts.dir), `${presetName}.preset.yaml`);
6082
+ const outPath = opts.out ? path35__default.resolve(opts.out) : path35__default.join(path35__default.resolve(opts.dir), `${presetName}.preset.yaml`);
6077
6083
  if (existsSync(outPath) && !opts.force) {
6078
6084
  logErr(`File already exists: ${outPath}`);
6079
6085
  logInfo("Pass --force to overwrite, or choose a different --out/--dir.");
@@ -6085,7 +6091,7 @@ ${body}` : body;
6085
6091
  logErr(`Failed to write ${outPath}: ${e.message}`);
6086
6092
  process.exit(1);
6087
6093
  }
6088
- logOk(`Exported ${S.brand(path13__default.basename(outPath))}`);
6094
+ logOk(`Exported ${S.brand(path35__default.basename(outPath))}`);
6089
6095
  logInfo(`Path: ${outPath}`);
6090
6096
  if (unresolved.length > 0) {
6091
6097
  console.error(S.err("This file is NOT safe to share."));
@@ -6126,13 +6132,13 @@ function collectInput(value, acc) {
6126
6132
  return acc;
6127
6133
  }
6128
6134
  async function runPresetApply(filePath, opts) {
6129
- const projectDir = path13__default.resolve(opts.projectDir);
6135
+ const projectDir = path35__default.resolve(opts.projectDir);
6130
6136
  const file = loadSkWorkspaceConfig(projectDir);
6131
6137
  if (!file) {
6132
6138
  logErr("No skaile.yaml \u2014 run `skaile init` first");
6133
6139
  process.exit(1);
6134
6140
  }
6135
- const resolved = path13__default.resolve(filePath);
6141
+ const resolved = path35__default.resolve(filePath);
6136
6142
  if (!existsSync(resolved)) {
6137
6143
  logErr(`File not found: ${resolved}`);
6138
6144
  process.exit(1);
@@ -6348,7 +6354,7 @@ async function reportNestedPresetRefs(preset) {
6348
6354
  }
6349
6355
  async function checkPresetCycles(preset, resolved) {
6350
6356
  const { detectCycles } = await import('../discovery/index.js');
6351
- const presetRef = path13__default.basename(resolved, ".preset.yaml");
6357
+ const presetRef = path35__default.basename(resolved, ".preset.yaml");
6352
6358
  const edges = [];
6353
6359
  for (const item of preset.items) {
6354
6360
  if (item.ref) {
@@ -6400,7 +6406,7 @@ function printPresetSummary(preset, placeholderCount, hasWarnings) {
6400
6406
  }
6401
6407
  }
6402
6408
  async function runPresetValidate(filePath) {
6403
- const resolved = path13__default.resolve(filePath);
6409
+ const resolved = path35__default.resolve(filePath);
6404
6410
  const preset = await loadPresetForValidation(resolved);
6405
6411
  await reportNestedPresetRefs(preset);
6406
6412
  await checkPresetCycles(preset, resolved);
@@ -6450,14 +6456,14 @@ items:
6450
6456
  }
6451
6457
  function makeRebuildCommand() {
6452
6458
  return new Command("rebuild").description("Re-snapshot inline-snapshot composition items and bump prompt version").argument("[agent]", "Agent name or path (defaults to current project agent)").option("--project-dir <dir>", "Project directory", process.cwd()).action(async (agentArg, opts) => {
6453
- const projectDir = path13__default.resolve(opts.projectDir);
6459
+ const projectDir = path35__default.resolve(opts.projectDir);
6454
6460
  let agentDir;
6455
6461
  if (agentArg) {
6456
6462
  if (agentArg.includes("/") || agentArg.includes("\\")) {
6457
- agentDir = path13__default.resolve(projectDir, agentArg);
6463
+ agentDir = path35__default.resolve(projectDir, agentArg);
6458
6464
  } else {
6459
6465
  const resolved = resolveAgentDir(projectDir);
6460
- agentDir = resolved ?? path13__default.resolve(projectDir, agentArg);
6466
+ agentDir = resolved ?? path35__default.resolve(projectDir, agentArg);
6461
6467
  }
6462
6468
  } else {
6463
6469
  const resolved = resolveAgentDir(projectDir);
@@ -6550,12 +6556,12 @@ function makeFlowEventHandler() {
6550
6556
  }
6551
6557
  function makeRunCommand() {
6552
6558
  const cmd = new Command("run").description("Start a flow or run a single-shot text prompt").argument("[flow-id-or-text...]", "Flow ID or text prompt").option("--project-dir <path>", "Project directory", process.cwd()).option("--driver <name>", "Driver backend (claude-sdk, codex, omp)").option("--provider <name>", "LLM provider").option("--model <name>", "Model override").option("--label <label>", "Human-readable session label").option("--dry-run", "Print plan without executing").option("--skill <name>", "Skill name (for single-shot mode)").action(async (positional, opts) => {
6553
- const projectDir = path13__default.resolve(opts.projectDir);
6559
+ const projectDir = path35__default.resolve(opts.projectDir);
6554
6560
  const cliDriver = opts.driver;
6555
6561
  const dryRun = opts.dryRun ?? false;
6556
6562
  let flowId = positional[0];
6557
6563
  if (!flowId) {
6558
- const flows = discoverFlows();
6564
+ const flows = discoverFlows(projectDir);
6559
6565
  if (flows.length === 0) {
6560
6566
  logErr("No flows available.");
6561
6567
  process.exit(1);
@@ -6585,19 +6591,19 @@ function makeRunCommand() {
6585
6591
  const priorityRoots = [];
6586
6592
  let dir = projectDir;
6587
6593
  for (let i = 0; i < 6; i++) {
6588
- const candidate = path13__default.join(dir, "ai-assets");
6594
+ const candidate = path35__default.join(dir, "ai-assets");
6589
6595
  if (fs13__default.existsSync(candidate)) {
6590
6596
  priorityRoots.push(candidate);
6591
6597
  break;
6592
6598
  }
6593
- dir = path13__default.dirname(dir);
6599
+ dir = path35__default.dirname(dir);
6594
6600
  }
6595
- const flowPath = findFlowFile(flowId, priorityRoots);
6601
+ const flowPath = findFlowFile(flowId, priorityRoots, projectDir);
6596
6602
  if (!flowPath) {
6597
6603
  const textPrompt = positional.join(" ");
6598
6604
  if (!textPrompt.trim()) {
6599
6605
  logErr(`Flow not found: ${flowId}`);
6600
- const available = discoverFlows().map((f) => f.id);
6606
+ const available = discoverFlows(projectDir).map((f) => f.id);
6601
6607
  if (available.length > 0) {
6602
6608
  console.log(` ${S.dim("Available:")} ${available.map((id) => S.cmd(id)).join(", ")}`);
6603
6609
  }
@@ -6661,7 +6667,7 @@ function makeRunCommand() {
6661
6667
  }
6662
6668
  function makeResumeCommand() {
6663
6669
  const cmd = new Command("resume").description("Resume current session").option("--project-dir <path>", "Project directory", process.cwd()).option("--session <run-id>", "Target session by runId").option("--dry-run", "Print plan without executing").action(async (opts) => {
6664
- const projectDir = path13__default.resolve(opts.projectDir);
6670
+ const projectDir = path35__default.resolve(opts.projectDir);
6665
6671
  const sessionId = opts.session;
6666
6672
  const dryRun = opts.dryRun ?? false;
6667
6673
  const session = sessionId ? await loadSessionById(projectDir, sessionId) : await loadSession(projectDir);
@@ -6688,7 +6694,7 @@ function makeResumeCommand() {
6688
6694
  }
6689
6695
  function makeStatusCommand() {
6690
6696
  return new Command("status").description("Show current session state").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
6691
- const projectDir = path13__default.resolve(opts.projectDir);
6697
+ const projectDir = path35__default.resolve(opts.projectDir);
6692
6698
  const session = await loadSession(projectDir);
6693
6699
  if (!session) {
6694
6700
  logInfo("No active session.");
@@ -6713,7 +6719,7 @@ function makeStatusCommand() {
6713
6719
  }
6714
6720
  function makeClearCommand() {
6715
6721
  return new Command("clear").description("Unset current session pointer").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
6716
- const projectDir = path13__default.resolve(opts.projectDir);
6722
+ const projectDir = path35__default.resolve(opts.projectDir);
6717
6723
  await clearSession(projectDir);
6718
6724
  logOk("Session cleared.");
6719
6725
  });
@@ -6723,7 +6729,7 @@ function makeReplCommand() {
6723
6729
  const { findWorkspaceRoot } = await import('../core/index.js');
6724
6730
  const { startRepl } = await import('../tui/index.js');
6725
6731
  const os2 = await import('os');
6726
- const userCwd = path13__default.resolve(opts.projectDir ?? process.cwd());
6732
+ const userCwd = path35__default.resolve(opts.projectDir ?? process.cwd());
6727
6733
  const workspaceRoot = findWorkspaceRoot(userCwd);
6728
6734
  let projectDir;
6729
6735
  let agentCwd;
@@ -6745,12 +6751,12 @@ function makeReplCommand() {
6745
6751
  p5.cancel("Cancelled.");
6746
6752
  process.exit(0);
6747
6753
  }
6748
- const tmpDir = fs13__default.mkdtempSync(path13__default.join(os2.tmpdir(), "skaile-repl-"));
6754
+ const tmpDir = fs13__default.mkdtempSync(path35__default.join(os2.tmpdir(), "skaile-repl-"));
6749
6755
  projectDir = tmpDir;
6750
6756
  agentCwd = userCwd;
6751
6757
  logOk(`Temporary workspace: ${S.cmd(tmpDir)}`);
6752
6758
  if (!driverOverride) {
6753
- const claudeDir = path13__default.join(os2.homedir(), ".claude");
6759
+ const claudeDir = path35__default.join(os2.homedir(), ".claude");
6754
6760
  if (fs13__default.existsSync(claudeDir)) {
6755
6761
  driverOverride = "claude-sdk";
6756
6762
  logInfo(`Detected ${S.cmd("~/.claude")} \u2192 using ${S.cmd("claude-sdk")} backend`);
@@ -6797,7 +6803,7 @@ function makeServeCommand() {
6797
6803
  );
6798
6804
  }
6799
6805
  async function ensurePluginsLoadedForServe(projectDir) {
6800
- const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-LJFOH4RB.js');
6806
+ const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-ZWHB5JHQ.js');
6801
6807
  try {
6802
6808
  const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
6803
6809
  const config = resolveSkWorkspaceConfig2(projectDir);
@@ -6816,14 +6822,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
6816
6822
  }
6817
6823
  }
6818
6824
  async function runCompileTest(opts) {
6819
- const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-LJFOH4RB.js');
6825
+ const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-ZWHB5JHQ.js');
6820
6826
  const { tmpdir } = await import('os');
6821
6827
  const { dirname: dirname4, join: join7, resolve: resolve5 } = await import('path');
6822
6828
  const { fileURLToPath: fileURLToPath2 } = await import('url');
6823
6829
  const { unlinkSync, existsSync: existsSync15 } = await import('fs');
6824
6830
  const { spawn } = await import('child_process');
6825
6831
  const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
6826
- const { MONOREPO_ROOT } = await import('../paths-2ZZMB7HU.js');
6832
+ const { MONOREPO_ROOT } = await import('../paths-B52KTS7N.js');
6827
6833
  if (MONOREPO_ROOT === null) {
6828
6834
  logErr2("--compile-test is only available inside the skaile-dev workspace.");
6829
6835
  logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
@@ -7305,7 +7311,7 @@ function resolveMode(opts) {
7305
7311
  if (opts.forceLocal && opts.forceRemote) {
7306
7312
  throw new Error("Cannot use both --local and --remote");
7307
7313
  }
7308
- const startDir = path13__default.resolve(opts.projectDir ?? process.cwd());
7314
+ const startDir = path35__default.resolve(opts.projectDir ?? process.cwd());
7309
7315
  const localDb = findLogsDb(startDir);
7310
7316
  if (opts.forceLocal) {
7311
7317
  if (!localDb) {
@@ -7338,14 +7344,14 @@ function resolveMode(opts) {
7338
7344
  function findLogsDb(startDir) {
7339
7345
  let dir = startDir;
7340
7346
  for (let i = 0; i < MAX_WALK_LEVELS; i++) {
7341
- const candidate = path13__default.join(dir, ".skaile", "logs.db");
7347
+ const candidate = path35__default.join(dir, ".skaile", "logs.db");
7342
7348
  if (existsSync(candidate)) {
7343
7349
  try {
7344
7350
  if (statSync(candidate).isFile()) return candidate;
7345
7351
  } catch {
7346
7352
  }
7347
7353
  }
7348
- const parent = path13__default.dirname(dir);
7354
+ const parent = path35__default.dirname(dir);
7349
7355
  if (parent === dir) return void 0;
7350
7356
  dir = parent;
7351
7357
  }
@@ -7371,7 +7377,7 @@ function readApiToken() {
7371
7377
  }
7372
7378
  function readGlobalSettings() {
7373
7379
  try {
7374
- const settingsPath = path13__default.join(homedir(), ".skaile", "settings.json");
7380
+ const settingsPath = path35__default.join(homedir(), ".skaile", "settings.json");
7375
7381
  if (!existsSync(settingsPath)) return {};
7376
7382
  return JSON.parse(readFileSync(settingsPath, "utf8"));
7377
7383
  } catch {
@@ -7520,7 +7526,7 @@ function parsePositiveInt(value, flag) {
7520
7526
  function makeSessionCommand() {
7521
7527
  const cmd = new Command("session").description("Manage sessions");
7522
7528
  cmd.command("list").description("List all sessions for a project").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
7523
- const projectDir = path13__default.resolve(opts.projectDir);
7529
+ const projectDir = path35__default.resolve(opts.projectDir);
7524
7530
  const sessions = await listSessions(projectDir);
7525
7531
  const current = await loadSession(projectDir);
7526
7532
  if (sessions.length === 0) {
@@ -7548,7 +7554,7 @@ function makeSessionCommand() {
7548
7554
  console.log();
7549
7555
  });
7550
7556
  cmd.command("show <run-id>").description("Show a specific session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
7551
- const projectDir = path13__default.resolve(opts.projectDir);
7557
+ const projectDir = path35__default.resolve(opts.projectDir);
7552
7558
  const session = await loadSessionById(projectDir, runId);
7553
7559
  if (!session) {
7554
7560
  logErr(`Session not found: ${runId}`);
@@ -7557,12 +7563,12 @@ function makeSessionCommand() {
7557
7563
  console.log(JSON.stringify(session, null, 2));
7558
7564
  });
7559
7565
  cmd.command("switch <run-id>").description("Switch the current session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
7560
- const projectDir = path13__default.resolve(opts.projectDir);
7566
+ const projectDir = path35__default.resolve(opts.projectDir);
7561
7567
  await setCurrentSession(projectDir, runId);
7562
7568
  logOk(`Switched to session: ${S.dim(runId.slice(0, 8))}`);
7563
7569
  });
7564
7570
  cmd.command("delete <run-id>").description("Delete a session").option("--project-dir <path>", "Project directory", process.cwd()).action(async (runId, opts) => {
7565
- const projectDir = path13__default.resolve(opts.projectDir);
7571
+ const projectDir = path35__default.resolve(opts.projectDir);
7566
7572
  await deleteSession(projectDir, runId);
7567
7573
  logOk(`Deleted session: ${S.dim(runId.slice(0, 8))}`);
7568
7574
  });
@@ -7630,7 +7636,7 @@ async function showAsset(am2, kind, name) {
7630
7636
  function makeShowCommand() {
7631
7637
  return new Command("show").description("Show deployed assets overview, or print asset content").argument("[kind]", "Asset kind (skill, agent, prompt, flow, bundle, contract)").argument("[name]", "Asset name").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", "Agent framework", "claude-code").action(async (kind, name, opts) => {
7632
7638
  const am2 = new AssetManager({
7633
- projectDir: path13__default.resolve(opts.projectDir),
7639
+ projectDir: path35__default.resolve(opts.projectDir),
7634
7640
  driverTarget: opts.target
7635
7641
  });
7636
7642
  if (!kind) {
@@ -7698,9 +7704,9 @@ function makeStoreCommand() {
7698
7704
  process.exit(2);
7699
7705
  });
7700
7706
  store.command("search <query>").description("Search the AI Asset Store catalog by name, description, or publisher").option("--kind <kind>", "Filter by asset kind (skill, agent, prompt, flow, \u2026)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
7701
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-WJ7P7B4N.js');
7707
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-XB65LU3M.js');
7702
7708
  try {
7703
- const remote = await openCatalogSource2({ projectDir: path13__default.resolve(opts.projectDir) });
7709
+ const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
7704
7710
  const assets = await remote.listAssets(opts.kind ? { kind: opts.kind } : {});
7705
7711
  const results = filterCatalogAssets(assets, query);
7706
7712
  if (results.length === 0) {
@@ -7731,10 +7737,10 @@ function makeStoreCommand() {
7731
7737
  }
7732
7738
  });
7733
7739
  store.command("show <ref>").description("Show a store asset's details + provenance (source, files, integrity)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (ref, opts) => {
7734
- const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-WJ7P7B4N.js');
7735
- const { supportsInstallManifest } = await import('../project-6RXDBSRV.js');
7740
+ const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-XB65LU3M.js');
7741
+ const { supportsInstallManifest } = await import('../project-E5LKCE7R.js');
7736
7742
  try {
7737
- const remote = await openCatalogSource2({ projectDir: path13__default.resolve(opts.projectDir) });
7743
+ const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
7738
7744
  const asset = await remote.resolve(ref);
7739
7745
  if (!asset) {
7740
7746
  logErr(`Not found in store: ${ref} (try a full ref, e.g. skill:@publisher/name#version)`);
@@ -7853,7 +7859,7 @@ function printTree(node, prefix = "", isLast = true) {
7853
7859
  }
7854
7860
  function makeTreeCommand() {
7855
7861
  return new Command("tree").description("Show full dependency tree").option("--project-dir <path>", "Project directory", process.cwd()).action(async (opts) => {
7856
- const am2 = new AssetManager({ projectDir: path13__default.resolve(opts.projectDir) });
7862
+ const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
7857
7863
  const root = am2.tree();
7858
7864
  if (root.children.length === 0) {
7859
7865
  logInfo("No dependencies in lock file. Run `skaile install` first.");
@@ -7879,7 +7885,7 @@ function makeUpdateCommand() {
7879
7885
  try {
7880
7886
  const catalogSpinner = p5.spinner();
7881
7887
  catalogSpinner.start("Refreshing catalog cache");
7882
- const remote = await openCatalogSource({ projectDir: path13__default.resolve(opts.projectDir) });
7888
+ const remote = await openCatalogSource({ projectDir: path35__default.resolve(opts.projectDir) });
7883
7889
  const result2 = await remote.refresh();
7884
7890
  catalogSpinner.stop(
7885
7891
  `Catalog refreshed: ${S.heading(String(result2.assetsCached))} assets cached`
@@ -7891,7 +7897,7 @@ function makeUpdateCommand() {
7891
7897
  }
7892
7898
  }
7893
7899
  if (opts.catalogOnly) return;
7894
- const projectDir = path13__default.resolve(opts.projectDir);
7900
+ const projectDir = path35__default.resolve(opts.projectDir);
7895
7901
  if (await shouldSyncSources(opts)) {
7896
7902
  const syncSpinner = p5.spinner();
7897
7903
  syncSpinner.start("Syncing sources");
@@ -7952,7 +7958,7 @@ function findManifestCandidates(rootPath) {
7952
7958
  return;
7953
7959
  }
7954
7960
  for (const entry of entries) {
7955
- const fullPath = path13__default.join(dir, entry.name);
7961
+ const fullPath = path35__default.join(dir, entry.name);
7956
7962
  if (entry.isDirectory()) {
7957
7963
  if (!SKIP_DIRS.has(entry.name)) walk(fullPath);
7958
7964
  } else if (entry.isFile()) {
@@ -8005,13 +8011,13 @@ function parseManifestCandidate(c, absRoot) {
8005
8011
  const parsed = c.filePath.endsWith(".json") ? JSON.parse(content) : parse(content);
8006
8012
  return { kind: "value", parsed };
8007
8013
  } catch (e) {
8008
- const relPath = path13__default.relative(absRoot, c.filePath);
8014
+ const relPath = path35__default.relative(absRoot, c.filePath);
8009
8015
  logErr(`${relPath} \u2014 parse error: ${e instanceof Error ? e.message : String(e)}`);
8010
8016
  return { kind: "error" };
8011
8017
  }
8012
8018
  }
8013
8019
  function validateManifestCandidate(c, parsed, absRoot, registry, strictConformance) {
8014
- const relPath = path13__default.relative(absRoot, c.filePath);
8020
+ const relPath = path35__default.relative(absRoot, c.filePath);
8015
8021
  let errors = 0;
8016
8022
  let warnings = 0;
8017
8023
  const identityError = checkManifestIdentity(c.kind, parsed);
@@ -8020,7 +8026,7 @@ function validateManifestCandidate(c, parsed, absRoot, registry, strictConforman
8020
8026
  errors++;
8021
8027
  }
8022
8028
  if (c.kind === "skill" && parsed && typeof parsed === "object") {
8023
- const dirName = path13__default.basename(path13__default.dirname(c.filePath));
8029
+ const dirName = path35__default.basename(path35__default.dirname(c.filePath));
8024
8030
  const findings = checkAgentSkillConformance(parsed, { dirName });
8025
8031
  for (const f of findings) {
8026
8032
  const line = `${relPath} [skill conformance] \u2014 ${f.field}: ${f.message}`;
@@ -8048,7 +8054,7 @@ function validateManifestCandidate(c, parsed, absRoot, registry, strictConforman
8048
8054
  return { errors, warnings };
8049
8055
  }
8050
8056
  function validateManifests(rootPath, strictConformance) {
8051
- const absRoot = path13__default.resolve(rootPath);
8057
+ const absRoot = path35__default.resolve(rootPath);
8052
8058
  if (!fs13__default.existsSync(absRoot)) {
8053
8059
  logErr(`Path does not exist: ${absRoot}`);
8054
8060
  return { total: 0, errors: 1, warnings: 0 };
@@ -8086,7 +8092,7 @@ function findWorkspaceManifests(rootPath) {
8086
8092
  return;
8087
8093
  }
8088
8094
  for (const entry of entries) {
8089
- const full = path13__default.join(dir, entry.name);
8095
+ const full = path35__default.join(dir, entry.name);
8090
8096
  if (entry.isDirectory()) {
8091
8097
  if (!SKIP_DIRS.has(entry.name)) walk(full);
8092
8098
  } else if (entry.isFile() && /(^|\.)skaile\.yaml$/.test(entry.name)) {
@@ -8149,11 +8155,11 @@ function validateWorkspaceAssets(parsed, relPath) {
8149
8155
  return errors;
8150
8156
  }
8151
8157
  function validateWorkspaceManifests(rootPath) {
8152
- const absRoot = path13__default.resolve(rootPath);
8158
+ const absRoot = path35__default.resolve(rootPath);
8153
8159
  const files = findWorkspaceManifests(absRoot);
8154
8160
  let errors = 0;
8155
8161
  for (const file of files) {
8156
- const relPath = path13__default.relative(absRoot, file);
8162
+ const relPath = path35__default.relative(absRoot, file);
8157
8163
  let parsed;
8158
8164
  try {
8159
8165
  parsed = parse(fs13__default.readFileSync(file, "utf-8")) ?? {};
@@ -8173,20 +8179,20 @@ function collectAssetVersions() {
8173
8179
  if (!fs13__default.existsSync(AI_RESOURCES)) return assets;
8174
8180
  const domains = fs13__default.readdirSync(AI_RESOURCES, { withFileTypes: true }).filter((d) => d.isDirectory() && !EXCLUDED_DOMAINS.has(d.name));
8175
8181
  for (const d of domains) {
8176
- const domainDir = path13__default.join(AI_RESOURCES, d.name);
8177
- const skillsDir = path13__default.join(domainDir, "skills");
8182
+ const domainDir = path35__default.join(AI_RESOURCES, d.name);
8183
+ const skillsDir = path35__default.join(domainDir, "skills");
8178
8184
  if (fs13__default.existsSync(skillsDir)) {
8179
8185
  collectSkillVersions(skillsDir, d.name, assets);
8180
8186
  }
8181
- const agentsDir = path13__default.join(domainDir, "agents");
8187
+ const agentsDir = path35__default.join(domainDir, "agents");
8182
8188
  if (fs13__default.existsSync(agentsDir)) {
8183
8189
  collectAgentVersions(agentsDir, d.name, assets);
8184
8190
  }
8185
- const flowsDir = path13__default.join(domainDir, "flows");
8191
+ const flowsDir = path35__default.join(domainDir, "flows");
8186
8192
  if (fs13__default.existsSync(flowsDir)) {
8187
8193
  collectFlowVersions(flowsDir, d.name, assets);
8188
8194
  }
8189
- const promptsDir = path13__default.join(domainDir, "prompts");
8195
+ const promptsDir = path35__default.join(domainDir, "prompts");
8190
8196
  if (fs13__default.existsSync(promptsDir)) {
8191
8197
  collectPromptVersions(promptsDir, d.name, assets);
8192
8198
  }
@@ -8196,7 +8202,7 @@ function collectAssetVersions() {
8196
8202
  function collectFlowVersions(dir, domain, out) {
8197
8203
  for (const f of fs13__default.readdirSync(dir)) {
8198
8204
  if (!f.endsWith(".flow.yaml")) continue;
8199
- const fp = path13__default.join(dir, f);
8205
+ const fp = path35__default.join(dir, f);
8200
8206
  const content = fs13__default.readFileSync(fp, "utf-8");
8201
8207
  const parsed = parse(content);
8202
8208
  out.push({
@@ -8211,7 +8217,7 @@ function collectFlowVersions(dir, domain, out) {
8211
8217
  function collectPromptVersions(dir, domain, out) {
8212
8218
  for (const f of fs13__default.readdirSync(dir)) {
8213
8219
  if (!f.endsWith(".prompt.md")) continue;
8214
- const fp = path13__default.join(dir, f);
8220
+ const fp = path35__default.join(dir, f);
8215
8221
  const content = fs13__default.readFileSync(fp, "utf-8");
8216
8222
  const fm = parseSkillFrontmatter(content);
8217
8223
  out.push({
@@ -8226,8 +8232,8 @@ function collectPromptVersions(dir, domain, out) {
8226
8232
  function collectSkillVersions(dir, domain, out) {
8227
8233
  for (const entry of fs13__default.readdirSync(dir, { withFileTypes: true })) {
8228
8234
  if (!entry.isDirectory()) continue;
8229
- const full = path13__default.join(dir, entry.name);
8230
- const skillMd = path13__default.join(full, "SKILL.md");
8235
+ const full = path35__default.join(dir, entry.name);
8236
+ const skillMd = path35__default.join(full, "SKILL.md");
8231
8237
  if (fs13__default.existsSync(skillMd)) {
8232
8238
  const content = fs13__default.readFileSync(skillMd, "utf-8");
8233
8239
  const fm = parseSkillFrontmatter(content);
@@ -8246,7 +8252,7 @@ function collectSkillVersions(dir, domain, out) {
8246
8252
  function collectAgentVersions(dir, domain, out) {
8247
8253
  for (const entry of fs13__default.readdirSync(dir, { withFileTypes: true })) {
8248
8254
  if (!entry.isDirectory()) continue;
8249
- const agentYaml = path13__default.join(dir, entry.name, "agent.yaml");
8255
+ const agentYaml = path35__default.join(dir, entry.name, "agent.yaml");
8250
8256
  if (!fs13__default.existsSync(agentYaml)) continue;
8251
8257
  const content = fs13__default.readFileSync(agentYaml, "utf-8");
8252
8258
  const parsed = parse(content);
@@ -8279,7 +8285,7 @@ function filterToChangedAssets(assets) {
8279
8285
  encoding: "utf-8"
8280
8286
  });
8281
8287
  const changedFiles = new Set(
8282
- diffOutput.trim().split("\n").filter(Boolean).map((f) => path13__default.resolve(AI_RESOURCES, f))
8288
+ diffOutput.trim().split("\n").filter(Boolean).map((f) => path35__default.resolve(AI_RESOURCES, f))
8283
8289
  );
8284
8290
  return assets.filter((a) => changedFiles.has(a.filePath));
8285
8291
  } catch {
@@ -8305,7 +8311,7 @@ function checkVersionBumps(assets) {
8305
8311
  let warnings = 0;
8306
8312
  for (const a of assets) {
8307
8313
  if (!a.version) continue;
8308
- const relPath = path13__default.relative(AI_RESOURCES, a.filePath);
8314
+ const relPath = path35__default.relative(AI_RESOURCES, a.filePath);
8309
8315
  try {
8310
8316
  const headContent = execSync(`git show HEAD:${relPath}`, {
8311
8317
  cwd: AI_RESOURCES,
@@ -8330,16 +8336,20 @@ function checkFlowVersionPins(assets) {
8330
8336
  skillVersionMap.set(a.name, a.version);
8331
8337
  }
8332
8338
  let errors = 0;
8339
+ let warnings = 0;
8333
8340
  for (const f of flows) {
8334
- const content = fs13__default.readFileSync(f.filePath, "utf-8");
8335
- const parsed = parse(content);
8336
- const nodes = (parsed?.nodes ?? []).filter((n) => n.type === "skill" && n.data?.version).map((n) => ({
8337
- nodeId: n.id,
8338
- skillId: n.data?.skill ?? n.id,
8339
- requestedVersion: n.data?.version
8340
- }));
8341
- if (nodes.length === 0) continue;
8342
- const checks = validateFlowVersions(nodes, skillVersionMap);
8341
+ let pins;
8342
+ try {
8343
+ pins = flowSkillVersionPins(loadFlow(f.filePath));
8344
+ } catch (err) {
8345
+ logWarn(
8346
+ `flow:${f.name} (${path35__default.relative(AI_RESOURCES, f.filePath)}) \u2014 could not be read: ${err instanceof Error ? err.message : err}`
8347
+ );
8348
+ warnings++;
8349
+ continue;
8350
+ }
8351
+ if (pins.length === 0) continue;
8352
+ const checks = validateFlowVersions(pins, skillVersionMap);
8343
8353
  for (const c of checks.filter((c2) => !c2.satisfied)) {
8344
8354
  logErr(
8345
8355
  `flow:${f.name} node ${c.nodeId} \u2014 wants ${c.requested}, found ${c.actual || "(none)"}`
@@ -8347,7 +8357,7 @@ function checkFlowVersionPins(assets) {
8347
8357
  errors++;
8348
8358
  }
8349
8359
  }
8350
- return errors;
8360
+ return { errors, warnings };
8351
8361
  }
8352
8362
  function runVersionsCheck(opts) {
8353
8363
  let assets = collectAssetVersions().filter((a) => !opts.domain || a.domain === opts.domain);
@@ -8360,7 +8370,9 @@ function runVersionsCheck(opts) {
8360
8370
  if (opts.changedOnly) {
8361
8371
  warnings += checkVersionBumps(assets);
8362
8372
  }
8363
- errors += checkFlowVersionPins(assets);
8373
+ const pinCheck = checkFlowVersionPins(assets);
8374
+ errors += pinCheck.errors;
8375
+ warnings += pinCheck.warnings;
8364
8376
  console.log();
8365
8377
  logInfo(`Checked ${assets.length} assets`);
8366
8378
  if (errors === 0 && warnings === 0) {
@@ -8381,7 +8393,7 @@ function makeValidateCommand() {
8381
8393
  "--strict-conformance",
8382
8394
  "Treat Agent Skills (agentskills.io) standard findings as errors"
8383
8395
  ).action((targetPath, opts) => {
8384
- const absPath = path13__default.resolve(targetPath);
8396
+ const absPath = path35__default.resolve(targetPath);
8385
8397
  logInfo(`Validating manifests in ${absPath}`);
8386
8398
  const { total, errors, warnings } = validateManifests(
8387
8399
  absPath,
@@ -8431,7 +8443,7 @@ function makeValidateCommand() {
8431
8443
  let errors = 0;
8432
8444
  for (const domain of modifiedDomains) {
8433
8445
  const changelogModified = modifiedFiles.some(
8434
- (f) => f === `${domain}/CHANGELOG.md` || f === path13__default.join(domain, "CHANGELOG.md")
8446
+ (f) => f === `${domain}/CHANGELOG.md` || f === path35__default.join(domain, "CHANGELOG.md")
8435
8447
  );
8436
8448
  if (changelogModified) {
8437
8449
  logOk(`${domain}/CHANGELOG.md updated`);
@@ -8537,7 +8549,7 @@ function whyEmptyMessage(ref, declared) {
8537
8549
  }
8538
8550
  function makeWhyCommand() {
8539
8551
  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) => {
8540
- const am2 = new AssetManager({ projectDir: path13__default.resolve(opts.projectDir) });
8552
+ const am2 = new AssetManager({ projectDir: path35__default.resolve(opts.projectDir) });
8541
8553
  const chain = am2.why(ref);
8542
8554
  if (chain.length === 0) {
8543
8555
  let declared;
@@ -8571,7 +8583,7 @@ function makeWhyCommand() {
8571
8583
  var _defaultFormatHelp = Help.prototype.formatHelp;
8572
8584
  var pkg = JSON.parse(
8573
8585
  readFileSync(
8574
- path13__default.resolve(path13__default.dirname(fileURLToPath(import.meta.url)), "../../package.json"),
8586
+ path35__default.resolve(path35__default.dirname(fileURLToPath(import.meta.url)), "../../package.json"),
8575
8587
  "utf-8"
8576
8588
  )
8577
8589
  );
@@ -8701,31 +8713,31 @@ async function runInit(projectDir, opts) {
8701
8713
  process.exitCode = 1;
8702
8714
  return;
8703
8715
  }
8704
- const resolved = path13__default.resolve(projectDir ?? ".");
8705
- const projectName = path13__default.basename(resolved);
8716
+ const resolved = path35__default.resolve(projectDir ?? ".");
8717
+ const projectName = path35__default.basename(resolved);
8706
8718
  const created = [];
8707
8719
  const { existsSync: existsSync15 } = await import('fs');
8708
8720
  if (!existsSync15(resolved)) {
8709
8721
  mkdirSync5(resolved, { recursive: true });
8710
8722
  created.push(".");
8711
8723
  }
8712
- const skaileDir = path13__default.join(resolved, ".skaile");
8724
+ const skaileDir = path35__default.join(resolved, ".skaile");
8713
8725
  if (!existsSync15(skaileDir)) {
8714
- mkdirSync5(path13__default.join(skaileDir, "sessions"), { recursive: true });
8726
+ mkdirSync5(path35__default.join(skaileDir, "sessions"), { recursive: true });
8715
8727
  created.push(".skaile/");
8716
8728
  }
8717
- const settingsPath = path13__default.join(skaileDir, "settings.json");
8729
+ const settingsPath = path35__default.join(skaileDir, "settings.json");
8718
8730
  if (!existsSync15(settingsPath)) {
8719
8731
  writeFileSync5(settingsPath, "{}\n");
8720
8732
  created.push(".skaile/settings.json");
8721
8733
  }
8722
- const wsConfigPath = path13__default.join(resolved, "skaile.yaml");
8734
+ const wsConfigPath = path35__default.join(resolved, "skaile.yaml");
8723
8735
  if (!existsSync15(wsConfigPath)) {
8724
8736
  writeFileSync5(wsConfigPath, stringify2(buildInitWorkspaceConfig(projectName, backend)));
8725
8737
  created.push("skaile.yaml");
8726
8738
  }
8727
8739
  for (const dir of new Set(Object.values(DRIVER_TARGETS[backend].local))) {
8728
- const full = path13__default.join(resolved, dir);
8740
+ const full = path35__default.join(resolved, dir);
8729
8741
  if (!existsSync15(full)) {
8730
8742
  mkdirSync5(full, { recursive: true });
8731
8743
  created.push(`${dir}/`);
@@ -8758,7 +8770,7 @@ function buildInitWorkspaceConfig(projectName, backend) {
8758
8770
  async function initGitScaffold(resolved, created) {
8759
8771
  const { execSync: execSync3 } = await import('child_process');
8760
8772
  const { existsSync: existsSync15, readFileSync: readFileSync9, writeFileSync: writeFileSync5 } = await import('fs');
8761
- const gitignorePath = path13__default.join(resolved, ".gitignore");
8773
+ const gitignorePath = path35__default.join(resolved, ".gitignore");
8762
8774
  const entries = [
8763
8775
  "node_modules/",
8764
8776
  ".skaile/sessions/",
@@ -8782,7 +8794,7 @@ async function initGitScaffold(resolved, created) {
8782
8794
  `);
8783
8795
  if (!existing) created.push(".gitignore");
8784
8796
  }
8785
- if (!existsSync15(path13__default.join(resolved, ".git"))) {
8797
+ if (!existsSync15(path35__default.join(resolved, ".git"))) {
8786
8798
  try {
8787
8799
  execSync3("git init", { cwd: resolved, stdio: "pipe" });
8788
8800
  created.push(".git/");
@@ -8812,7 +8824,7 @@ async function bootstrapUserConfig() {
8812
8824
  }
8813
8825
  async function hydrateInitSources(resolved, created) {
8814
8826
  try {
8815
- const { ensureSourcesCloned } = await import('../ensure-sources-IM3JMW2L.js');
8827
+ const { ensureSourcesCloned } = await import('../ensure-sources-L2276FYP.js');
8816
8828
  const hydrate = ensureSourcesCloned(resolved, { quiet: true });
8817
8829
  for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
8818
8830
  if (hydrate.failed.length > 0) {
@@ -8828,7 +8840,7 @@ function printInitSummary(resolved, projectDir, created) {
8828
8840
  logOk(`Initialized project at ${S.heading(resolved)}`);
8829
8841
  console.log();
8830
8842
  console.log(S.heading(" Next steps:"));
8831
- const isCurrentDir = resolved === path13__default.resolve(".");
8843
+ const isCurrentDir = resolved === path35__default.resolve(".");
8832
8844
  let step = 1;
8833
8845
  if (!isCurrentDir) {
8834
8846
  console.log(` ${S.dim(`${step}.`)} ${S.cmd(`cd ${projectDir}`)}`);