@skaile/workspaces 0.43.0 → 0.44.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 (160) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/{asset-feeds-3PSV57NT.js → asset-feeds-EGSG4FUB.js} +15 -11
  3. package/dist/asset-feeds-EGSG4FUB.js.map +1 -0
  4. package/dist/asset-manager/index.js +5 -5
  5. package/dist/asset-manager/installer.js +4 -4
  6. package/dist/asset-manager/src/index.d.ts +102 -4
  7. package/dist/asset-manager/src/index.d.ts.map +1 -1
  8. package/dist/{chunk-XMKBIVG3.js → chunk-5LHPKVGR.js} +9 -9
  9. package/dist/{chunk-XMKBIVG3.js.map → chunk-5LHPKVGR.js.map} +1 -1
  10. package/dist/{chunk-4UTJNFUS.js → chunk-7NQXVBCQ.js} +5 -5
  11. package/dist/{chunk-4UTJNFUS.js.map → chunk-7NQXVBCQ.js.map} +1 -1
  12. package/dist/{chunk-KYQNWFJV.js → chunk-BLGHFVXE.js} +3 -3
  13. package/dist/{chunk-KYQNWFJV.js.map → chunk-BLGHFVXE.js.map} +1 -1
  14. package/dist/{chunk-R4H6EJW5.js → chunk-CBZEIFU4.js} +3 -3
  15. package/dist/{chunk-R4H6EJW5.js.map → chunk-CBZEIFU4.js.map} +1 -1
  16. package/dist/{chunk-GJI6FZ56.js → chunk-COSTF7QW.js} +60 -8
  17. package/dist/chunk-COSTF7QW.js.map +1 -0
  18. package/dist/{chunk-NYMRKIOR.js → chunk-CVWA4RIK.js} +4 -4
  19. package/dist/{chunk-NYMRKIOR.js.map → chunk-CVWA4RIK.js.map} +1 -1
  20. package/dist/{chunk-BXYMGZCI.js → chunk-ETDXTGDF.js} +3 -3
  21. package/dist/{chunk-BXYMGZCI.js.map → chunk-ETDXTGDF.js.map} +1 -1
  22. package/dist/{chunk-TDSRLMDB.js → chunk-EVZKWY5J.js} +2 -2
  23. package/dist/chunk-EVZKWY5J.js.map +1 -0
  24. package/dist/{chunk-3HUUP3JC.js → chunk-FYLIR4AV.js} +107 -7
  25. package/dist/chunk-FYLIR4AV.js.map +1 -0
  26. package/dist/{chunk-G6FJZG4C.js → chunk-GM3BV6JK.js} +2 -2
  27. package/dist/{chunk-G6FJZG4C.js.map → chunk-GM3BV6JK.js.map} +1 -1
  28. package/dist/{chunk-R2SKIYU2.js → chunk-JUZLVRI4.js} +265 -38
  29. package/dist/chunk-JUZLVRI4.js.map +1 -0
  30. package/dist/{chunk-F5Q2RMH4.js → chunk-LMRO2QNF.js} +177 -135
  31. package/dist/chunk-LMRO2QNF.js.map +1 -0
  32. package/dist/{chunk-JZQFZ55W.js → chunk-NHLXS2CH.js} +2 -2
  33. package/dist/{chunk-JZQFZ55W.js.map → chunk-NHLXS2CH.js.map} +1 -1
  34. package/dist/{chunk-CIEKKLMG.js → chunk-PCXU2CVW.js} +3 -3
  35. package/dist/{chunk-CIEKKLMG.js.map → chunk-PCXU2CVW.js.map} +1 -1
  36. package/dist/{chunk-HVCZLD5Z.js → chunk-VPXV2Z5E.js} +5 -7
  37. package/dist/chunk-VPXV2Z5E.js.map +1 -0
  38. package/dist/{chunk-2BEDUMTA.js → chunk-XF2BBX6P.js} +3 -3
  39. package/dist/{chunk-2BEDUMTA.js.map → chunk-XF2BBX6P.js.map} +1 -1
  40. package/dist/{chunk-3K2CYDBT.js → chunk-Z5Z3MYDL.js} +8 -4
  41. package/dist/chunk-Z5Z3MYDL.js.map +1 -0
  42. package/dist/{chunk-M54RYUXY.js → chunk-ZAEJ33Y6.js} +19 -7
  43. package/dist/chunk-ZAEJ33Y6.js.map +1 -0
  44. package/dist/cli/index.js +395 -286
  45. package/dist/cli/index.js.map +1 -1
  46. package/dist/cli/src/asset-feeds.d.ts.map +1 -1
  47. package/dist/cli/src/commands/cache.d.ts +27 -0
  48. package/dist/cli/src/commands/cache.d.ts.map +1 -0
  49. package/dist/cli/src/commands/catalog.d.ts.map +1 -1
  50. package/dist/cli/src/commands/manage.d.ts.map +1 -1
  51. package/dist/cli/src/commands/npx.d.ts +1 -1
  52. package/dist/cli/src/commands/source.d.ts +3 -1
  53. package/dist/cli/src/commands/source.d.ts.map +1 -1
  54. package/dist/cli/src/commands/update.d.ts +1 -1
  55. package/dist/cli/src/ensure-sources.d.ts +2 -2
  56. package/dist/cli/src/ensure-sources.d.ts.map +1 -1
  57. package/dist/connectors/config.js +4 -4
  58. package/dist/connectors/index.js +6 -6
  59. package/dist/connectors/rclone.js +1 -1
  60. package/dist/connectors/src/connector-manager.d.ts +21 -4
  61. package/dist/connectors/src/connector-manager.d.ts.map +1 -1
  62. package/dist/connectors/src/fleet-health-gate.d.ts +2 -0
  63. package/dist/connectors/src/fleet-health-gate.d.ts.map +1 -1
  64. package/dist/connectors/src/fleet-utils.d.ts +10 -0
  65. package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
  66. package/dist/connectors/src/mount-placeholder.d.ts +11 -0
  67. package/dist/connectors/src/mount-placeholder.d.ts.map +1 -1
  68. package/dist/connectors/src/rclone-process-manager.d.ts +57 -2
  69. package/dist/connectors/src/rclone-process-manager.d.ts.map +1 -1
  70. package/dist/core/index.js +3 -3
  71. package/dist/core/runtime-assets.js +2 -2
  72. package/dist/core/src/cache-paths.d.ts +25 -0
  73. package/dist/core/src/cache-paths.d.ts.map +1 -0
  74. package/dist/core/src/index.d.ts +1 -0
  75. package/dist/core/src/index.d.ts.map +1 -1
  76. package/dist/core/src/repo-manager.d.ts +11 -8
  77. package/dist/core/src/repo-manager.d.ts.map +1 -1
  78. package/dist/core/src/runtime-assets.d.ts.map +1 -1
  79. package/dist/core/src/workspace-config.d.ts +2 -2
  80. package/dist/core/src/workspace-config.d.ts.map +1 -1
  81. package/dist/core/workspace-config.js +1 -1
  82. package/dist/deploy/index.js +3 -3
  83. package/dist/{ensure-sources-VQDZB7NT.js → ensure-sources-NSDMTAWN.js} +6 -12
  84. package/dist/ensure-sources-NSDMTAWN.js.map +1 -0
  85. package/dist/factory-assets/connectors/deploy.js +6 -6
  86. package/dist/factory-assets/connectors/devserver.js +6 -6
  87. package/dist/factory-assets/connectors/flow/adapter.js +6 -6
  88. package/dist/factory-assets/connectors/flow/engine.js +3 -3
  89. package/dist/factory-assets/connectors/flow/run-flow.js +7 -7
  90. package/dist/factory-assets/connectors/flow.js +6 -6
  91. package/dist/factory-assets/connectors/git.js +6 -6
  92. package/dist/factory-assets/connectors/gmail.js +6 -6
  93. package/dist/factory-assets/connectors/googledrive.js +6 -6
  94. package/dist/factory-assets/connectors/local.js +6 -6
  95. package/dist/factory-assets/connectors/mattermost.js +6 -6
  96. package/dist/factory-assets/connectors/memory.js +6 -6
  97. package/dist/factory-assets/connectors/minio.js +6 -6
  98. package/dist/factory-assets/connectors/postgres.js +6 -6
  99. package/dist/factory-assets/connectors/s3.js +6 -6
  100. package/dist/factory-assets/connectors/sharepoint.js +6 -6
  101. package/dist/factory-assets/connectors/sqlite.js +6 -6
  102. package/dist/factory-assets/connectors/static-server.js +6 -6
  103. package/dist/factory-assets/connectors/tunnel.js +6 -6
  104. package/dist/factory-assets/connectors/webdav.js +6 -6
  105. package/dist/factory-assets/connectors/xstate-store.js +6 -6
  106. package/dist/factory-assets/connectors/xstate.js +6 -6
  107. package/dist/{flows-KTBCZ5GQ.js → flows-WELXQ7IG.js} +3 -3
  108. package/dist/{flows-KTBCZ5GQ.js.map → flows-WELXQ7IG.js.map} +1 -1
  109. package/dist/library/index.js +4 -4
  110. package/dist/library/install.js +3 -3
  111. package/dist/library/src/local/local-catalog-source.d.ts +1 -1
  112. package/dist/library/src/local/sidecar-git.d.ts +2 -2
  113. package/dist/library/src/local/sidecar-paths.d.ts +12 -10
  114. package/dist/library/src/local/sidecar-paths.d.ts.map +1 -1
  115. package/dist/library/src/local/store-paths.d.ts +2 -2
  116. package/dist/library/src/remote/cache.d.ts +8 -2
  117. package/dist/library/src/remote/cache.d.ts.map +1 -1
  118. package/dist/library/src/remote/remote-catalog-source.d.ts +1 -1
  119. package/dist/library/src/remote/rest-catalog-source.d.ts +1 -1
  120. package/dist/{open-library-FHUXOCN7.js → open-library-362BZ6OW.js} +7 -7
  121. package/dist/{open-library-FHUXOCN7.js.map → open-library-362BZ6OW.js.map} +1 -1
  122. package/dist/{paths-7H5CSBLQ.js → paths-4SSFMX5Z.js} +6 -6
  123. package/dist/{paths-7H5CSBLQ.js.map → paths-4SSFMX5Z.js.map} +1 -1
  124. package/dist/{plugin-store-LGLN2QUX.js → plugin-store-RBCDBO7K.js} +5 -5
  125. package/dist/{plugin-store-LGLN2QUX.js.map → plugin-store-RBCDBO7K.js.map} +1 -1
  126. package/dist/runner/index.js +9 -9
  127. package/dist/sdk/asset-manager.js +5 -5
  128. package/dist/sdk/core.js +3 -3
  129. package/dist/sdk/flow.js +3 -3
  130. package/dist/sdk/index.js +9 -9
  131. package/dist/sdk/runner.js +9 -9
  132. package/dist/sdk/session.js +2 -2
  133. package/dist/sdk/types.js +1 -1
  134. package/dist/session/index.js +2 -2
  135. package/dist/session/src/index.d.ts +1 -1
  136. package/dist/session/src/index.d.ts.map +1 -1
  137. package/dist/session/src/mentions.d.ts +11 -0
  138. package/dist/session/src/mentions.d.ts.map +1 -1
  139. package/dist/{setup-EVNPECSY.js → setup-VGZTFQ32.js} +5 -5
  140. package/dist/{setup-EVNPECSY.js.map → setup-VGZTFQ32.js.map} +1 -1
  141. package/dist/{store-client-4XN7IB3R.js → store-client-XFZFKY3W.js} +6 -6
  142. package/dist/{store-client-4XN7IB3R.js.map → store-client-XFZFKY3W.js.map} +1 -1
  143. package/dist/tui/index.js +9 -9
  144. package/dist/types/index.js +1 -1
  145. package/dist/types/src/mentions.d.ts +12 -0
  146. package/dist/types/src/mentions.d.ts.map +1 -1
  147. package/dist/workspace-plugin/adapters/mcp.js +1 -1
  148. package/dist/workspace-plugin/adapters/omp.js +3 -3
  149. package/dist/workspace-plugin/index.js +1 -1
  150. package/package.json +1 -1
  151. package/dist/asset-feeds-3PSV57NT.js.map +0 -1
  152. package/dist/chunk-3HUUP3JC.js.map +0 -1
  153. package/dist/chunk-3K2CYDBT.js.map +0 -1
  154. package/dist/chunk-F5Q2RMH4.js.map +0 -1
  155. package/dist/chunk-GJI6FZ56.js.map +0 -1
  156. package/dist/chunk-HVCZLD5Z.js.map +0 -1
  157. package/dist/chunk-M54RYUXY.js.map +0 -1
  158. package/dist/chunk-R2SKIYU2.js.map +0 -1
  159. package/dist/chunk-TDSRLMDB.js.map +0 -1
  160. package/dist/ensure-sources-VQDZB7NT.js.map +0 -1
@@ -1,15 +1,15 @@
1
- export { WebDAVConnector, createConnector17 as createConnector } from '../../chunk-F5Q2RMH4.js';
1
+ export { WebDAVConnector, createConnector17 as createConnector } from '../../chunk-LMRO2QNF.js';
2
2
  import '../../chunk-OVRSNIKJ.js';
3
- import '../../chunk-R4H6EJW5.js';
4
- import '../../chunk-3HUUP3JC.js';
3
+ import '../../chunk-CBZEIFU4.js';
4
+ import '../../chunk-FYLIR4AV.js';
5
5
  import '../../chunk-6E6PKKAD.js';
6
6
  import '../../chunk-X46FY45B.js';
7
7
  import '../../chunk-DEYYRFQU.js';
8
8
  import '../../chunk-IFGTRL2I.js';
9
- import '../../chunk-KYQNWFJV.js';
9
+ import '../../chunk-BLGHFVXE.js';
10
10
  import '../../chunk-ZAP2BDHG.js';
11
- import '../../chunk-HVCZLD5Z.js';
12
- import '../../chunk-GJI6FZ56.js';
11
+ import '../../chunk-VPXV2Z5E.js';
12
+ import '../../chunk-COSTF7QW.js';
13
13
  import '../../chunk-DZCK7GRW.js';
14
14
  import '../../chunk-6IDBWPK2.js';
15
15
  import '../../chunk-GEEW6SY2.js';
@@ -1,15 +1,15 @@
1
- export { XStateStoreConnector, createConnector19 as createConnector } from '../../chunk-F5Q2RMH4.js';
1
+ export { XStateStoreConnector, createConnector19 as createConnector } from '../../chunk-LMRO2QNF.js';
2
2
  import '../../chunk-OVRSNIKJ.js';
3
- import '../../chunk-R4H6EJW5.js';
4
- import '../../chunk-3HUUP3JC.js';
3
+ import '../../chunk-CBZEIFU4.js';
4
+ import '../../chunk-FYLIR4AV.js';
5
5
  import '../../chunk-6E6PKKAD.js';
6
6
  import '../../chunk-X46FY45B.js';
7
7
  import '../../chunk-DEYYRFQU.js';
8
8
  import '../../chunk-IFGTRL2I.js';
9
- import '../../chunk-KYQNWFJV.js';
9
+ import '../../chunk-BLGHFVXE.js';
10
10
  import '../../chunk-ZAP2BDHG.js';
11
- import '../../chunk-HVCZLD5Z.js';
12
- import '../../chunk-GJI6FZ56.js';
11
+ import '../../chunk-VPXV2Z5E.js';
12
+ import '../../chunk-COSTF7QW.js';
13
13
  import '../../chunk-DZCK7GRW.js';
14
14
  import '../../chunk-6IDBWPK2.js';
15
15
  import '../../chunk-GEEW6SY2.js';
@@ -1,15 +1,15 @@
1
- export { XStateConnector, createConnector18 as createConnector } from '../../chunk-F5Q2RMH4.js';
1
+ export { XStateConnector, createConnector18 as createConnector } from '../../chunk-LMRO2QNF.js';
2
2
  import '../../chunk-OVRSNIKJ.js';
3
- import '../../chunk-R4H6EJW5.js';
4
- import '../../chunk-3HUUP3JC.js';
3
+ import '../../chunk-CBZEIFU4.js';
4
+ import '../../chunk-FYLIR4AV.js';
5
5
  import '../../chunk-6E6PKKAD.js';
6
6
  import '../../chunk-X46FY45B.js';
7
7
  import '../../chunk-DEYYRFQU.js';
8
8
  import '../../chunk-IFGTRL2I.js';
9
- import '../../chunk-KYQNWFJV.js';
9
+ import '../../chunk-BLGHFVXE.js';
10
10
  import '../../chunk-ZAP2BDHG.js';
11
- import '../../chunk-HVCZLD5Z.js';
12
- import '../../chunk-GJI6FZ56.js';
11
+ import '../../chunk-VPXV2Z5E.js';
12
+ import '../../chunk-COSTF7QW.js';
13
13
  import '../../chunk-DZCK7GRW.js';
14
14
  import '../../chunk-6IDBWPK2.js';
15
15
  import '../../chunk-GEEW6SY2.js';
@@ -1,7 +1,7 @@
1
- export { flowFindFlowForSession, flowGetSession, flowList, flowListSessions, flowShow } from './chunk-G6FJZG4C.js';
1
+ export { flowFindFlowForSession, flowGetSession, flowList, flowListSessions, flowShow } from './chunk-GM3BV6JK.js';
2
2
  import './chunk-R6O6YWU7.js';
3
3
  import './chunk-XCBG2KDC.js';
4
4
  import './chunk-X5YPJV4N.js';
5
5
  import './chunk-NSBPE2FW.js';
6
- //# sourceMappingURL=flows-KTBCZ5GQ.js.map
7
- //# sourceMappingURL=flows-KTBCZ5GQ.js.map
6
+ //# sourceMappingURL=flows-WELXQ7IG.js.map
7
+ //# sourceMappingURL=flows-WELXQ7IG.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"flows-KTBCZ5GQ.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"flows-WELXQ7IG.js"}
@@ -1,12 +1,12 @@
1
- export { AssignmentNotFoundError, CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateAssignmentError, DuplicateLibraryNameError, GitSyncDriver, InstanceHasConsumersError, InstanceNotFoundError, InterpolationError, KNOWN_ASSET_KINDS, KnowledgeManifestSchema, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LIBRARY_STRUCTURES, LOCAL_CATALOG_URL, LibraryConfigSchema, LibraryError, LibraryInstanceRefSchema, LibraryManager, LibrarySectionSchema, LibrarySyncError, LocalCatalogSource, LocalIndex, LocalSyncDriver, LockAssignmentSchema, LockFileSchema, OfflineError, OperationNotPermittedError, PIN_POLICIES, PinPolicySchema, PresetAppliedSchema, PresetExpandedSchema, RemoteCatalogSource, RequiresEdgeSchema, RestCatalogSource, SidecarGit, SkaileConfigSchema, SourceNotFoundError, TarballHashMismatchError, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, classifyRef, createEmptyLockFile, deriveSlug, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, interpolate, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, queryInstancePickerChoices, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolveLibraryDir, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, sha256Hex, skaileHomeDir, storeSecrets, trpcGetUrl, userConfigPath, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeManifestIfMissing } from '../chunk-M54RYUXY.js';
1
+ export { AssignmentNotFoundError, CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateAssignmentError, DuplicateLibraryNameError, GitSyncDriver, InstanceHasConsumersError, InstanceNotFoundError, InterpolationError, KNOWN_ASSET_KINDS, KnowledgeManifestSchema, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LIBRARY_STRUCTURES, LOCAL_CATALOG_URL, LibraryConfigSchema, LibraryError, LibraryInstanceRefSchema, LibraryManager, LibrarySectionSchema, LibrarySyncError, LocalCatalogSource, LocalIndex, LocalSyncDriver, LockAssignmentSchema, LockFileSchema, OfflineError, OperationNotPermittedError, PIN_POLICIES, PinPolicySchema, PresetAppliedSchema, PresetExpandedSchema, RemoteCatalogSource, RequiresEdgeSchema, RestCatalogSource, SidecarGit, SkaileConfigSchema, SourceNotFoundError, TarballHashMismatchError, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, classifyRef, createEmptyLockFile, deriveSlug, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, interpolate, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, queryInstancePickerChoices, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolveLibraryDir, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, sha256Hex, skaileHomeDir, storeSecrets, trpcGetUrl, userConfigPath, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeManifestIfMissing } from '../chunk-ZAEJ33Y6.js';
2
2
  import '../chunk-5FVJXQDP.js';
3
3
  import '../chunk-JXT46QFC.js';
4
4
  export { installFromManifest } from '../chunk-UKJMQZV6.js';
5
5
  export { GITHUB_PAT_ENV, fetchAssetFilesFromGitHub } from '../chunk-R7FOF242.js';
6
- import '../chunk-KYQNWFJV.js';
6
+ import '../chunk-BLGHFVXE.js';
7
7
  import '../chunk-ZAP2BDHG.js';
8
- import '../chunk-HVCZLD5Z.js';
9
- import '../chunk-GJI6FZ56.js';
8
+ import '../chunk-VPXV2Z5E.js';
9
+ import '../chunk-COSTF7QW.js';
10
10
  import '../chunk-DZCK7GRW.js';
11
11
  import '../chunk-6IDBWPK2.js';
12
12
  import '../chunk-GEEW6SY2.js';
@@ -1,9 +1,9 @@
1
1
  export { installFromManifest, longestCommonDirPrefix } from '../chunk-UKJMQZV6.js';
2
2
  export { GITHUB_PAT_ENV, fetchAssetFilesFromGitHub } from '../chunk-R7FOF242.js';
3
- import '../chunk-KYQNWFJV.js';
3
+ import '../chunk-BLGHFVXE.js';
4
4
  import '../chunk-ZAP2BDHG.js';
5
- import '../chunk-HVCZLD5Z.js';
6
- import '../chunk-GJI6FZ56.js';
5
+ import '../chunk-VPXV2Z5E.js';
6
+ import '../chunk-COSTF7QW.js';
7
7
  import '../chunk-DZCK7GRW.js';
8
8
  import '../chunk-6IDBWPK2.js';
9
9
  import '../chunk-GEEW6SY2.js';
@@ -20,7 +20,7 @@ import type { LocalIndex } from "./library.js";
20
20
  export interface LocalCatalogSourceOptions {
21
21
  /**
22
22
  * Absolute path to a sidecar directory carrying a local-overlay manifest
23
- * (`~/.skaile/sources/<slug>/`). When set, discovery merges the sidecar's
23
+ * (`~/.skaile/sidecars/<slug>/`). When set, discovery merges the sidecar's
24
24
  * `skaile.manifest.yaml` on top of the in-repo config before dispatch.
25
25
  *
26
26
  * Typically populated by `openLibrary()`-based callers reading
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Sidecar git helper — manages the single shared git repo at
3
- * `~/.skaile/sources/` (PR-3 § D.5).
3
+ * `~/.skaile/sidecars/` (PR-3 § D.5).
4
4
  *
5
5
  * Each sidecar lives in its own subdirectory under `<rootDir>`. All sidecars
6
6
  * share one `.git/` so users can push the entire root to a personal remote
@@ -90,7 +90,7 @@ export declare class SidecarGit {
90
90
  * captured stdout/stderr + exit code.
91
91
  *
92
92
  * Used by `skaile source sidecar git -- <args>` so users don't have to
93
- * `cd ~/.skaile/sources` to operate the repo manually.
93
+ * `cd ~/.skaile/sidecars` to operate the repo manually.
94
94
  *
95
95
  * @param args - Git arguments (no leading `git` token)
96
96
  * @returns Combined output + exit code; never throws on non-zero exit
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Sidecar path resolver — locations under `~/.skaile/sources/` (PR-3 § D.1).
2
+ * Sidecar path resolver — locations under `~/.skaile/sidecars/` (PR-3 § D.1).
3
3
  *
4
- * `~/.skaile/sources/` is a single git repo containing one subdirectory per
4
+ * `~/.skaile/sidecars/` is a single git repo containing one subdirectory per
5
5
  * registered sidecar. Each subdirectory carries the local-overlay manifest
6
6
  * (`skaile.manifest.yaml`), a provenance README, and a lock file.
7
7
  *
@@ -20,7 +20,7 @@ import type { SourceConfig } from "@skaile/workspaces/discovery";
20
20
  * @docLink packages/library/concepts#sidecar-paths
21
21
  */
22
22
  export interface SidecarPaths {
23
- /** Root sidecar directory, `~/.skaile/sources` (or `$SKAILE_HOME/sources`). */
23
+ /** Root sidecar directory, `~/.skaile/sidecars` (or `$SKAILE_HOME/sidecars`). */
24
24
  rootDir: string;
25
25
  /** Per-source sidecar dir: `<rootDir>/<slug>`. */
26
26
  sidecarDir: string;
@@ -32,23 +32,25 @@ export interface SidecarPaths {
32
32
  lockFile: string;
33
33
  }
34
34
  /**
35
- * Resolve the absolute path to the sidecar root directory.
36
- *
37
- * Resolution order:
38
- * 1. `$SKAILE_HOME/sources` if `SKAILE_HOME` is set
39
- * 2. `~/.skaile/sources` (default)
35
+ * Sidecar root: `$SKAILE_HOME/sidecars` (default `~/.skaile/sidecars`). Renamed
36
+ * from the old `~/.skaile/sources` (which collided with the clone cache). On first
37
+ * call it migrates the legacy `~/.skaile/sources` namespace by splitting it: source
38
+ * clones (own `.git`) are claimed by the clone cache (`getGlobalCacheDir`), and the
39
+ * remainder — the sidecar git repo (root `.git`, `README.md`, `.gitattributes`,
40
+ * slug subdirs) — moves here. Authored content: a failed move leaves the legacy
41
+ * entry in place rather than masking it.
40
42
  *
41
43
  * Does **not** create the directory — callers (e.g. `SidecarGit.ensureInitialized`)
42
44
  * are responsible for materialising it.
43
45
  *
44
- * @returns Absolute path to `~/.skaile/sources` (or env override)
46
+ * @returns Absolute path to `~/.skaile/sidecars` (or env override)
45
47
  * @docLink packages/library/concepts#sidecar-paths
46
48
  */
47
49
  export declare function getSidecarRoot(): string;
48
50
  /**
49
51
  * Resolve all sidecar paths for a given slug.
50
52
  *
51
- * @param slug - Sidecar slug (subdirectory name under `~/.skaile/sources/`)
53
+ * @param slug - Sidecar slug (subdirectory name under `~/.skaile/sidecars/`)
52
54
  * @returns Bundle of all relevant absolute paths
53
55
  * @docLink packages/library/concepts#sidecar-paths
54
56
  */
@@ -1 +1 @@
1
- {"version":3,"file":"sidecar-paths.d.ts","sourceRoot":"","sources":["../../../../library/src/local/sidecar-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8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AmB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAU9D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CACxB,YAAY,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI,EAC7C,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,GAC9B,MAAM,CAoBR;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,EAAE,CAUjD"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * The store is symmetric to a remote catalog (skaile.store) but lives on the
5
5
  * user's machine. It holds *manifests* (pointer triples) only — never bytes.
6
- * Bytes live under `~/.skaile/sources/` (third-party clones) or
6
+ * Bytes live under `~/.skaile/cache/sources/` (third-party clones) or
7
7
  * `~/.skaile/libraries/<name>/` (user authoring).
8
8
  *
9
9
  * Layout:
@@ -27,7 +27,7 @@ export declare function getStoreRoot(): string;
27
27
  /** Manifests subdir: `<store>/manifests/`. */
28
28
  export declare function getStoreManifestsDir(): string;
29
29
  /**
30
- * Move every `~/.skaile/sources/<slug>/skaile.manifest.yaml` (or the legacy
30
+ * Move every `~/.skaile/sidecars/<slug>/skaile.manifest.yaml` (or the legacy
31
31
  * `.skaile-source.yaml` for sidecars minted before the file-split rename) into
32
32
  * `~/.skaile/store/manifests/<slug>.yaml`, initialise the store as a git repo,
33
33
  * and write a marker so the migration is a no-op on subsequent runs.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Filesystem cache for {@link RemoteCatalogSource}.
3
3
  *
4
- * Cache layout (default `~/.skaile/catalog-cache/`):
4
+ * Cache layout (default `<cacheRoot>/catalog/`, see `defaultCatalogCacheDir`):
5
5
  *
6
6
  * <dir>/
7
7
  * index.json — JSON map of metadata entries with TTL bookkeeping
@@ -65,13 +65,19 @@ export interface CatalogCacheIndex {
65
65
  * @docLink packages/library/api-reference#catalog-cache
66
66
  */
67
67
  export interface CatalogCacheOptions {
68
- /** Cache directory. Default: `~/.skaile/catalog-cache/`. */
68
+ /** Cache directory. Default: `<cacheRoot>/catalog` (see `defaultCatalogCacheDir`). */
69
69
  dir?: string;
70
70
  /** TTL in milliseconds. `0` disables network and forces cache-only reads. */
71
71
  ttlMs: number;
72
72
  /** Override clock for tests. */
73
73
  now?: () => number;
74
74
  }
75
+ /**
76
+ * Catalog metadata cache dir: `<cacheRoot>/catalog`. Migrates the pre-consolidation
77
+ * `~/.skaile/catalog-cache/`. NOTE: this now honours `SKAILE_CACHE_DIR`/`SKAILE_HOME`
78
+ * (it previously keyed off `os.homedir()` directly) — see MIGRATION.md.
79
+ */
80
+ export declare function defaultCatalogCacheDir(): string;
75
81
  /**
76
82
  * Filesystem-backed cache for catalog metadata + tarballs.
77
83
  *
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../../library/src/remote/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAMnF;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,OAAO,EAAE,CAAC,CAAC;IACX,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC3C,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CACtC;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,GAAG,CAAC,EAAE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AC,MAAM,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAS7D;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAInD"}
@@ -61,7 +61,7 @@ export interface RemoteCatalogSourceOptions {
61
61
  cacheTtlMs?: number;
62
62
  /** Override `fetch` for tests. */
63
63
  httpClient?: HttpClient;
64
- /** Override the cache directory. Default is `~/.skaile/catalog-cache/`. */
64
+ /** Override the cache directory. Default is `~/.skaile/cache/catalog/`. */
65
65
  cacheDir?: string;
66
66
  /** Override clock for tests. */
67
67
  now?: () => number;
@@ -39,7 +39,7 @@ export interface RestCatalogSourceOptions {
39
39
  cacheTtlMs?: number;
40
40
  /** Override `fetch` for tests. */
41
41
  httpClient?: HttpClient;
42
- /** Override the cache directory. Default is `~/.skaile/catalog-cache/`. */
42
+ /** Override the cache directory. Default is `~/.skaile/cache/catalog/`. */
43
43
  cacheDir?: string;
44
44
  /** Override clock for tests. */
45
45
  now?: () => number;
@@ -1,15 +1,15 @@
1
- export { openCatalogSource, openLibrary, openLibraryManager, resolveCatalogSource } from './chunk-CIEKKLMG.js';
1
+ export { openCatalogSource, openLibrary, openLibraryManager, resolveCatalogSource } from './chunk-PCXU2CVW.js';
2
2
  import './chunk-GYPA2Q7F.js';
3
- import './chunk-M54RYUXY.js';
3
+ import './chunk-ZAEJ33Y6.js';
4
4
  import './chunk-5FVJXQDP.js';
5
5
  import './chunk-JXT46QFC.js';
6
6
  import './chunk-UKJMQZV6.js';
7
7
  import './chunk-R7FOF242.js';
8
8
  import './chunk-X46FY45B.js';
9
- import './chunk-KYQNWFJV.js';
9
+ import './chunk-BLGHFVXE.js';
10
10
  import './chunk-ZAP2BDHG.js';
11
- import './chunk-HVCZLD5Z.js';
12
- import './chunk-GJI6FZ56.js';
11
+ import './chunk-VPXV2Z5E.js';
12
+ import './chunk-COSTF7QW.js';
13
13
  import './chunk-DZCK7GRW.js';
14
14
  import './chunk-6IDBWPK2.js';
15
15
  import './chunk-GEEW6SY2.js';
@@ -19,5 +19,5 @@ import './chunk-K5GBV4SA.js';
19
19
  import './chunk-JB35MVBN.js';
20
20
  import './chunk-RGPBEGP2.js';
21
21
  import './chunk-NSBPE2FW.js';
22
- //# sourceMappingURL=open-library-FHUXOCN7.js.map
23
- //# sourceMappingURL=open-library-FHUXOCN7.js.map
22
+ //# sourceMappingURL=open-library-362BZ6OW.js.map
23
+ //# sourceMappingURL=open-library-362BZ6OW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"open-library-FHUXOCN7.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"open-library-362BZ6OW.js"}
@@ -1,8 +1,8 @@
1
- export { AI_RESOURCES, MONOREPO_ROOT, aiResourceRoots } from './chunk-BXYMGZCI.js';
2
- import './chunk-KYQNWFJV.js';
1
+ export { AI_RESOURCES, MONOREPO_ROOT, aiResourceRoots } from './chunk-ETDXTGDF.js';
2
+ import './chunk-BLGHFVXE.js';
3
3
  import './chunk-ZAP2BDHG.js';
4
- import './chunk-HVCZLD5Z.js';
5
- import './chunk-GJI6FZ56.js';
4
+ import './chunk-VPXV2Z5E.js';
5
+ import './chunk-COSTF7QW.js';
6
6
  import './chunk-DZCK7GRW.js';
7
7
  import './chunk-6IDBWPK2.js';
8
8
  import './chunk-GEEW6SY2.js';
@@ -11,5 +11,5 @@ import './chunk-O4JH3KUE.js';
11
11
  import './chunk-K5GBV4SA.js';
12
12
  import './chunk-JB35MVBN.js';
13
13
  import './chunk-NSBPE2FW.js';
14
- //# sourceMappingURL=paths-7H5CSBLQ.js.map
15
- //# sourceMappingURL=paths-7H5CSBLQ.js.map
14
+ //# sourceMappingURL=paths-4SSFMX5Z.js.map
15
+ //# sourceMappingURL=paths-4SSFMX5Z.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"paths-7H5CSBLQ.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"paths-4SSFMX5Z.js"}
@@ -1,8 +1,8 @@
1
1
  import { pluginRegistry } from './chunk-6E6PKKAD.js';
2
- import { readPluginsLockSlice } from './chunk-KYQNWFJV.js';
2
+ import { readPluginsLockSlice } from './chunk-BLGHFVXE.js';
3
3
  import './chunk-ZAP2BDHG.js';
4
- import './chunk-HVCZLD5Z.js';
5
- import './chunk-GJI6FZ56.js';
4
+ import './chunk-VPXV2Z5E.js';
5
+ import './chunk-COSTF7QW.js';
6
6
  import './chunk-DZCK7GRW.js';
7
7
  import './chunk-6IDBWPK2.js';
8
8
  import './chunk-GEEW6SY2.js';
@@ -138,5 +138,5 @@ async function ensurePluginsLoaded(projectDir, plugins, registry = pluginRegistr
138
138
  }
139
139
 
140
140
  export { ensurePluginsLoaded, loadPlugins, reconcilePlugins, specName };
141
- //# sourceMappingURL=plugin-store-LGLN2QUX.js.map
142
- //# sourceMappingURL=plugin-store-LGLN2QUX.js.map
141
+ //# sourceMappingURL=plugin-store-RBCDBO7K.js.map
142
+ //# sourceMappingURL=plugin-store-RBCDBO7K.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../cli/src/plugin-store/paths.ts","../cli/src/plugin-store/spec.ts","../cli/src/plugin-store/load.ts","../cli/src/plugin-store/reconcile.ts","../cli/src/plugin-store/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAUO,SAAS,WAAW,UAAA,EAA4B;AACrD,EAAA,OAAO,IAAA,CAAK,UAAA,EAAY,SAAA,EAAW,SAAS,CAAA;AAC9C;AAGO,SAAS,eAAe,UAAA,EAA4B;AACzD,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,cAAc,CAAA;AACpD;AAGO,SAAS,eAAe,UAAA,EAA4B;AACzD,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,cAAc,CAAA;AACpD;AAGO,SAAS,kBAAkB,UAAA,EAA4B;AAC5D,EAAA,OAAO,IAAA,CAAK,UAAA,C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MAAM,CAAA,CAAE,CAAA;AAAA,EAC5D;AAEA,EAAA,aAAA,CAAc,UAAU,QAAQ,CAAA;AAChC,EAAA,OAAO,EAAE,OAAA,EAAS,IAAA,EAAM,MAAA,EAAQ,YAAA,EAAa;AAC/C;;;ACxFA,eAAsB,oBACpB,UAAA,EACA,OAAA,EACA,WAA2B,cAAA,EAC3B,IAAA,GAA6B,EAAC,EACT;AACrB,EAAA,IAAI,CAAC,OAAA,IAAW,OAAA,CAAQ,MAAA,KAAW,CAAA,EAAG;AACpC,IAAA,OAAO,EAAE,MAAA,EAAQ,EAAC,EAAG,MAAA,EAAQ,EAAC,EAAE;AAAA,EAClC;AACA,EAAA,MAAM,gBAAA,CAAiB,UAAA,EAAY,OAAA,EAAS,IAAI,CAAA;AAChD,EAAA,OAAO,WAAA,CAAY,YAAY,OAAA,EAAS,QAAA,EAAU,EAAE,GAAA,EAAK,IAAA,CAAK,KAAK,CAAA;AACrE","file":"plugin-store-LGLN2QUX.js","sourcesContent":["/**\n * Pure path helpers for the project-local plugin store.\n *\n * The store is a self-contained npm workspace owned by the CLI under\n * `<projectDir>/.skaile/plugins/`. Nothing here touches the filesystem.\n */\n\nimport { join } from \"node:path\";\n\n/** `<projectDir>/.skaile/plugins` — the store root. */\nexport function pluginsDir(projectDir: string): string {\n return join(projectDir, \".skaile\", \"plugins\");\n}\n\n/** `<store>/package.json` — generated, never user-edited. */\nexport function pluginsPkgJson(projectDir: string): string {\n return join(pluginsDir(projectDir), \"package.json\");\n}\n\n/** `<store>/node_modules` — where reconciled plugin packages land. */\nexport function nodeModulesDir(projectDir: string): string {\n return join(pluginsDir(projectDir), \"node_modules\");\n}\n\n/** `<store>/.reconcile-hash` — SHA of plugins-list + lock slice; skip reinstall when unchanged. */\nexport function reconcileHashFile(projectDir: string): string {\n return join(pluginsDir(projectDir), \".reconcile-hash\");\n}\n\n/**\n * Absolute path to a plugin package's entry directory under the store's\n * `node_modules`. Dynamic `import()` against this absolute path works inside\n * compiled binaries via `pathToFileURL`.\n */\nexport function resolvePluginEntry(projectDir: string, pkgName: string): string {\n return join(nodeModulesDir(projectDir), pkgName);\n}\n","/**\n * Parse npm package specifiers from the `plugins:` list into name + range.\n *\n * The leading `@` of a scope is NOT a separator: only the last `@` at a\n * non-zero index splits the package name from its semver range.\n * \"@skaile/provider-fly@^0.1.0\" → { name: \"@skaile/provider-fly\", range: \"^0.1.0\" }\n * \"@skaile/connector-redis\" → { name: \"@skaile/connector-redis\", range: \"*\" }\n * \"lodash@^4\" → { name: \"lodash\", range: \"^4\" }\n */\n\n/** A parsed plugin specifier: package name plus a semver range (`\"*\"` when omitted). */\nexport interface PluginSpec {\n name: string;\n range: string;\n}\n\n/**\n * Parse a single plugin specifier into `{ name, range }`.\n *\n * @param spec - An npm specifier, e.g. `\"@skaile/provider-fly@^0.1.0\"` or `\"lodash\"`.\n * @returns The package name and semver range (range defaults to `\"*\"`).\n * @throws Error when the specifier is empty.\n */\nexport function parseSpec(spec: string): PluginSpec {\n const trimmed = spec.trim();\n if (!trimmed) throw new Error(\"parseSpec: empty specifier\");\n\n // Find the version-separating `@` — the last one that is not the scope `@`\n // at index 0. A bare `@scope/name` has its only `@` at index 0 (no range).\n const at = trimmed.lastIndexOf(\"@\");\n if (at <= 0) {\n return { name: trimmed, range: \"*\" };\n }\n const name = trimmed.slice(0, at);\n const range = trimmed.slice(at + 1);\n return { name, range: range.length > 0 ? range : \"*\" };\n}\n\n/** Convenience: just the package name of a specifier. */\nexport function specName(spec: string): string {\n return parseSpec(spec).name;\n}\n","/**\n * Runtime plugin loader: dynamic-import each reconciled plugin and let it\n * self-register into the `pluginRegistry`.\n *\n * Each plugin specifier resolves to an absolute path under the store's\n * `node_modules`; we import it via a `file://` URL so the import works inside\n * `bun --compile` binaries (which bundle only the literal-string switches, but\n * can still execute a `file://` import against the unpacked store on disk).\n * Failures are caught per-plugin so one broken plugin never aborts the rest.\n */\n\nimport { pathToFileURL } from \"node:url\";\nimport { type PluginRegistry, pluginRegistry } from \"@skaile/workspaces/plugin-registry\";\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { resolvePluginEntry } from \"./paths.js\";\nimport { parseSpec } from \"./spec.js\";\n\n/** Options for {@link loadPlugins}. */\nexport interface LoadOptions {\n log?: Logger;\n}\n\n/** Result of a load pass: which specs registered and which failed. */\nexport interface LoadResult {\n loaded: string[];\n failed: { spec: string; error: string }[];\n}\n\n/** The self-registration entrypoint a plugin module is expected to export. */\ntype PluginModule = { register?: (registry: PluginRegistry) => void };\n\n/**\n * Load and register each plugin in `plugins` into `registry`.\n *\n * @param projectDir - Project root holding `.skaile/plugins/node_modules`.\n * @param plugins - The `skaile.yaml` `plugins:` list (npm specifiers).\n * @param registry - Registry to register into. Defaults to the process-wide `pluginRegistry`.\n * @param opts - Optional logger.\n * @returns Loaded specs + per-plugin failures (never throws).\n */\nexport async function loadPlugins(\n projectDir: string,\n plugins: string[],\n registry: PluginRegistry = pluginRegistry,\n opts: LoadOptions = {},\n): Promise<LoadResult> {\n const loaded: string[] = [];\n const failed: { spec: string; error: string }[] = [];\n\n for (const spec of plugins) {\n try {\n const { name } = parseSpec(spec);\n const entry = resolvePluginEntry(projectDir, name);\n const mod = (await import(pathToFileURL(entry).href)) as PluginModule;\n if (typeof mod.register !== \"function\") {\n throw new Error(`plugin \"${name}\" does not export a register() function`);\n }\n mod.register(registry);\n loaded.push(spec);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n failed.push({ spec, error: `failed to load plugin \"${spec}\": ${message}` });\n opts.log?.warn(`plugin load failed: ${spec}`, { error: message });\n }\n }\n\n return { loaded, failed };\n}\n","/**\n * Reconcile the project-local plugin store (`<projectDir>/.skaile/plugins/`).\n *\n * The reconciler is hash-skipped: it computes a SHA-256 over the sorted plugin\n * list plus the lock file's `plugins` slice and compares it to the stored\n * `.reconcile-hash`. On a match it returns with zero further I/O; otherwise it\n * regenerates the store's `package.json` and runs `bun install` against it.\n *\n * The install step is injectable (`InstallFn`) so tests stay hermetic — they\n * pass a fake installer that records calls and writes a stub `node_modules`.\n */\n\nimport { createHash } from \"node:crypto\";\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { readPluginsLockSlice } from \"@skaile/workspaces/core\";\nimport { pluginsDir, pluginsPkgJson, reconcileHashFile } from \"./paths.js\";\nimport { parseSpec } from \"./spec.js\";\n\n/**\n * Installs the store's dependencies. Returns `ok: false` (never throws) on a\n * failed install so the reconciler can surface the captured `output`.\n */\nexport type InstallFn = (pluginsDir: string) => Promise<{ ok: boolean; output: string }>;\n\n/** Options for {@link reconcilePlugins}. */\nexport interface ReconcileOptions {\n /** Injectable installer. Defaults to a real `bun install` of the store. */\n runInstall?: InstallFn;\n /**\n * Lock slice to fold into the reconcile-hash. Defaults to\n * `readPluginsLockSlice(projectDir)` so a lock edit invalidates the hash.\n */\n lockSlice?: unknown;\n}\n\n/** Result of a reconcile pass. */\nexport interface ReconcileResult {\n changed: boolean;\n reason: \"no-plugins\" | \"up-to-date\" | \"reconciled\";\n}\n\n/**\n * The default real installer: `bun install` inside the store directory.\n * Frozen on subsequent runs (a `bun.lock`/`bun.lockb` already exists), and\n * non-frozen on the first run so a lock can be generated.\n */\nexport const defaultInstall: InstallFn = async (dir) => {\n const { portableSpawn } = await import(\"@skaile/workspaces/core\");\n const hasLock =\n existsSync(`${dir}/bun.lock`) ||\n existsSync(`${dir}/bun.lockb`) ||\n existsSync(`${dir}/package-lock.json`);\n const args = hasLock ? [\"bun\", \"install\", \"--frozen-lockfile\"] : [\"bun\", \"install\"];\n const proc = portableSpawn(args, { cwd: dir });\n const chunks: string[] = [];\n const decoder = new TextDecoder();\n const pump = async (stream: ReadableStream<Uint8Array>) => {\n const reader = stream.getReader();\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n if (value) chunks.push(decoder.decode(value, { stream: true }));\n }\n };\n await Promise.all([pump(proc.stdout), pump(proc.stderr)]);\n const code = await proc.exited;\n return { ok: code === 0, output: chunks.join(\"\") };\n};\n\n/** Generate the store's `package.json` from the plugin specs. */\nfunction writePackageJson(projectDir: string, plugins: string[]): void {\n const dependencies: Record<string, string> = {};\n for (const spec of plugins) {\n const { name, range } = parseSpec(spec);\n dependencies[name] = range;\n }\n const pkg = {\n name: \"skaile-project-plugins\",\n private: true,\n dependencies,\n };\n mkdirSync(pluginsDir(projectDir), { recursive: true });\n writeFileSync(pluginsPkgJson(projectDir), `${JSON.stringify(pkg, null, 2)}\\n`);\n}\n\n/**\n * Reconcile the plugin store for a project.\n *\n * @param projectDir - Project root containing `skaile.yaml` / `skaile.lock.yaml`.\n * @param plugins - The `skaile.yaml` `plugins:` list (npm specifiers).\n * @param opts - Optional injectable installer + lock slice override.\n * @returns Whether the store changed and why.\n */\nexport async function reconcilePlugins(\n projectDir: string,\n plugins: string[],\n opts: ReconcileOptions = {},\n): Promise<ReconcileResult> {\n if (plugins.length === 0) {\n return { changed: false, reason: \"no-plugins\" };\n }\n\n const lockSlice = opts.lockSlice ?? readPluginsLockSlice(projectDir);\n const wantHash = createHash(\"sha256\")\n .update(JSON.stringify({ plugins: [...plugins].sort(), lock: lockSlice }))\n .digest(\"hex\");\n\n const hashFile = reconcileHashFile(projectDir);\n if (existsSync(hashFile)) {\n const have = readFileSync(hashFile, \"utf8\").trim();\n if (have === wantHash) {\n return { changed: false, reason: \"up-to-date\" };\n }\n }\n\n writePackageJson(projectDir, plugins);\n\n const install = opts.runInstall ?? defaultInstall;\n const result = await install(pluginsDir(projectDir));\n if (!result.ok) {\n throw new Error(`plugin install failed:\\n${result.output}`);\n }\n\n writeFileSync(hashFile, wantHash);\n return { changed: true, reason: \"reconciled\" };\n}\n","/**\n * The project-local plugin store: reconcile (`<projectDir>/.skaile/plugins/`)\n * then load the reconciled plugins into the `pluginRegistry`.\n *\n * `ensurePluginsLoaded` is the single entrypoint commands wire in. It is a\n * guarded no-op when `plugins` is empty/undefined — zero overhead for the\n * common case where no project declares `plugins:` in `skaile.yaml`.\n */\n\nimport { type PluginRegistry, pluginRegistry } from \"@skaile/workspaces/plugin-registry\";\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { type LoadResult, loadPlugins } from \"./load.js\";\nimport { type ReconcileOptions, reconcilePlugins } from \"./reconcile.js\";\n\nexport type { LoadResult } from \"./load.js\";\nexport { loadPlugins } from \"./load.js\";\nexport type { ReconcileOptions } from \"./reconcile.js\";\nexport { reconcilePlugins } from \"./reconcile.js\";\nexport { specName } from \"./spec.js\";\n\n/** Options for {@link ensurePluginsLoaded}. */\nexport interface EnsurePluginsOptions extends ReconcileOptions {\n log?: Logger;\n}\n\n/**\n * Reconcile the plugin store then load each plugin into `registry`.\n *\n * No-op (returns immediately) when `plugins` is empty/undefined, so the common\n * no-plugins path costs nothing.\n *\n * @param projectDir - Project root.\n * @param plugins - The `skaile.yaml` `plugins:` list (may be undefined).\n * @param registry - Registry to register into. Defaults to `pluginRegistry`.\n * @param opts - Injectable installer / lock slice + optional logger.\n * @returns The load result, or an empty result when there are no plugins.\n */\nexport async function ensurePluginsLoaded(\n projectDir: string,\n plugins: string[] | undefined,\n registry: PluginRegistry = pluginRegistry,\n opts: EnsurePluginsOptions = {},\n): Promise<LoadResult> {\n if (!plugins || plugins.length === 0) {\n return { loaded: [], failed: [] };\n }\n await reconcilePlugins(projectDir, plugins, opts);\n return loadPlugins(projectDir, plugins, registry, { log: opts.log });\n}\n"]}
1
+ {"version":3,"sources":["../cli/src/plugin-store/paths.ts","../cli/src/plugin-store/spec.ts","../cli/src/plugin-store/load.ts","../cli/src/plugin-store/reconcile.ts","../cli/src/plugin-store/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAUO,SAAS,WAAW,UAAA,EAA4B;AACrD,EAAA,OAAO,IAAA,CAAK,UAAA,EAAY,SAAA,EAAW,SAAS,CAAA;AAC9C;AAGO,SAAS,eAAe,UAAA,EAA4B;AACzD,EAAA,OAAO,IAAA,CAAK,UAAA,CAAW,UAAU,CAAA,EAAG,cAAc,CAAA;AACpD;AAG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A,MAAM,MAAA,GAAS,MAAM,OAAA,CAAQ,UAAA,CAAW,UAAU,CAAC,CAAA;AACnD,EAAA,IAAI,CAAC,OAAO,EAAA,EAAI;AACd,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA;AAAA,EAA2B,MAAA,CAAO,MAAM,CAAA,CAAE,CAAA;AAAA,EAC5D;AAEA,EAAA,aAAA,CAAc,UAAU,QAAQ,CAAA;AAChC,EAAA,OAAO,EAAE,OAAA,EAAS,IAAA,EAAM,MAAA,EAAQ,YAAA,EAAa;AAC/C;;;ACxFA,eAAsB,oBACpB,UAAA,EACA,OAAA,EACA,WAA2B,cAAA,EAC3B,IAAA,GAA6B,EAAC,EACT;AACrB,EAAA,IAAI,CAAC,OAAA,IAAW,OAAA,CAAQ,MAAA,KAAW,CAAA,EAAG;AACpC,IAAA,OAAO,EAAE,MAAA,EAAQ,EAAC,EAAG,MAAA,EAAQ,EAAC,EAAE;AAAA,EAClC;AACA,EAAA,MAAM,gBAAA,CAAiB,UAAA,EAAY,OAAA,EAAS,IAAI,CAAA;AAChD,EAAA,OAAO,WAAA,CAAY,YAAY,OAAA,EAAS,QAAA,EAAU,EAAE,GAAA,EAAK,IAAA,CAAK,KAAK,CAAA;AACrE","file":"plugin-store-RBCDBO7K.js","sourcesContent":["/**\n * Pure path helpers for the project-local plugin store.\n *\n * The store is a self-contained npm workspace owned by the CLI under\n * `<projectDir>/.skaile/plugins/`. Nothing here touches the filesystem.\n */\n\nimport { join } from \"node:path\";\n\n/** `<projectDir>/.skaile/plugins` — the store root. */\nexport function pluginsDir(projectDir: string): string {\n return join(projectDir, \".skaile\", \"plugins\");\n}\n\n/** `<store>/package.json` — generated, never user-edited. */\nexport function pluginsPkgJson(projectDir: string): string {\n return join(pluginsDir(projectDir), \"package.json\");\n}\n\n/** `<store>/node_modules` — where reconciled plugin packages land. */\nexport function nodeModulesDir(projectDir: string): string {\n return join(pluginsDir(projectDir), \"node_modules\");\n}\n\n/** `<store>/.reconcile-hash` — SHA of plugins-list + lock slice; skip reinstall when unchanged. */\nexport function reconcileHashFile(projectDir: string): string {\n return join(pluginsDir(projectDir), \".reconcile-hash\");\n}\n\n/**\n * Absolute path to a plugin package's entry directory under the store's\n * `node_modules`. Dynamic `import()` against this absolute path works inside\n * compiled binaries via `pathToFileURL`.\n */\nexport function resolvePluginEntry(projectDir: string, pkgName: string): string {\n return join(nodeModulesDir(projectDir), pkgName);\n}\n","/**\n * Parse npm package specifiers from the `plugins:` list into name + range.\n *\n * The leading `@` of a scope is NOT a separator: only the last `@` at a\n * non-zero index splits the package name from its semver range.\n * \"@skaile/provider-fly@^0.1.0\" → { name: \"@skaile/provider-fly\", range: \"^0.1.0\" }\n * \"@skaile/connector-redis\" → { name: \"@skaile/connector-redis\", range: \"*\" }\n * \"lodash@^4\" → { name: \"lodash\", range: \"^4\" }\n */\n\n/** A parsed plugin specifier: package name plus a semver range (`\"*\"` when omitted). */\nexport interface PluginSpec {\n name: string;\n range: string;\n}\n\n/**\n * Parse a single plugin specifier into `{ name, range }`.\n *\n * @param spec - An npm specifier, e.g. `\"@skaile/provider-fly@^0.1.0\"` or `\"lodash\"`.\n * @returns The package name and semver range (range defaults to `\"*\"`).\n * @throws Error when the specifier is empty.\n */\nexport function parseSpec(spec: string): PluginSpec {\n const trimmed = spec.trim();\n if (!trimmed) throw new Error(\"parseSpec: empty specifier\");\n\n // Find the version-separating `@` — the last one that is not the scope `@`\n // at index 0. A bare `@scope/name` has its only `@` at index 0 (no range).\n const at = trimmed.lastIndexOf(\"@\");\n if (at <= 0) {\n return { name: trimmed, range: \"*\" };\n }\n const name = trimmed.slice(0, at);\n const range = trimmed.slice(at + 1);\n return { name, range: range.length > 0 ? range : \"*\" };\n}\n\n/** Convenience: just the package name of a specifier. */\nexport function specName(spec: string): string {\n return parseSpec(spec).name;\n}\n","/**\n * Runtime plugin loader: dynamic-import each reconciled plugin and let it\n * self-register into the `pluginRegistry`.\n *\n * Each plugin specifier resolves to an absolute path under the store's\n * `node_modules`; we import it via a `file://` URL so the import works inside\n * `bun --compile` binaries (which bundle only the literal-string switches, but\n * can still execute a `file://` import against the unpacked store on disk).\n * Failures are caught per-plugin so one broken plugin never aborts the rest.\n */\n\nimport { pathToFileURL } from \"node:url\";\nimport { type PluginRegistry, pluginRegistry } from \"@skaile/workspaces/plugin-registry\";\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { resolvePluginEntry } from \"./paths.js\";\nimport { parseSpec } from \"./spec.js\";\n\n/** Options for {@link loadPlugins}. */\nexport interface LoadOptions {\n log?: Logger;\n}\n\n/** Result of a load pass: which specs registered and which failed. */\nexport interface LoadResult {\n loaded: string[];\n failed: { spec: string; error: string }[];\n}\n\n/** The self-registration entrypoint a plugin module is expected to export. */\ntype PluginModule = { register?: (registry: PluginRegistry) => void };\n\n/**\n * Load and register each plugin in `plugins` into `registry`.\n *\n * @param projectDir - Project root holding `.skaile/plugins/node_modules`.\n * @param plugins - The `skaile.yaml` `plugins:` list (npm specifiers).\n * @param registry - Registry to register into. Defaults to the process-wide `pluginRegistry`.\n * @param opts - Optional logger.\n * @returns Loaded specs + per-plugin failures (never throws).\n */\nexport async function loadPlugins(\n projectDir: string,\n plugins: string[],\n registry: PluginRegistry = pluginRegistry,\n opts: LoadOptions = {},\n): Promise<LoadResult> {\n const loaded: string[] = [];\n const failed: { spec: string; error: string }[] = [];\n\n for (const spec of plugins) {\n try {\n const { name } = parseSpec(spec);\n const entry = resolvePluginEntry(projectDir, name);\n const mod = (await import(pathToFileURL(entry).href)) as PluginModule;\n if (typeof mod.register !== \"function\") {\n throw new Error(`plugin \"${name}\" does not export a register() function`);\n }\n mod.register(registry);\n loaded.push(spec);\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n failed.push({ spec, error: `failed to load plugin \"${spec}\": ${message}` });\n opts.log?.warn(`plugin load failed: ${spec}`, { error: message });\n }\n }\n\n return { loaded, failed };\n}\n","/**\n * Reconcile the project-local plugin store (`<projectDir>/.skaile/plugins/`).\n *\n * The reconciler is hash-skipped: it computes a SHA-256 over the sorted plugin\n * list plus the lock file's `plugins` slice and compares it to the stored\n * `.reconcile-hash`. On a match it returns with zero further I/O; otherwise it\n * regenerates the store's `package.json` and runs `bun install` against it.\n *\n * The install step is injectable (`InstallFn`) so tests stay hermetic — they\n * pass a fake installer that records calls and writes a stub `node_modules`.\n */\n\nimport { createHash } from \"node:crypto\";\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { readPluginsLockSlice } from \"@skaile/workspaces/core\";\nimport { pluginsDir, pluginsPkgJson, reconcileHashFile } from \"./paths.js\";\nimport { parseSpec } from \"./spec.js\";\n\n/**\n * Installs the store's dependencies. Returns `ok: false` (never throws) on a\n * failed install so the reconciler can surface the captured `output`.\n */\nexport type InstallFn = (pluginsDir: string) => Promise<{ ok: boolean; output: string }>;\n\n/** Options for {@link reconcilePlugins}. */\nexport interface ReconcileOptions {\n /** Injectable installer. Defaults to a real `bun install` of the store. */\n runInstall?: InstallFn;\n /**\n * Lock slice to fold into the reconcile-hash. Defaults to\n * `readPluginsLockSlice(projectDir)` so a lock edit invalidates the hash.\n */\n lockSlice?: unknown;\n}\n\n/** Result of a reconcile pass. */\nexport interface ReconcileResult {\n changed: boolean;\n reason: \"no-plugins\" | \"up-to-date\" | \"reconciled\";\n}\n\n/**\n * The default real installer: `bun install` inside the store directory.\n * Frozen on subsequent runs (a `bun.lock`/`bun.lockb` already exists), and\n * non-frozen on the first run so a lock can be generated.\n */\nexport const defaultInstall: InstallFn = async (dir) => {\n const { portableSpawn } = await import(\"@skaile/workspaces/core\");\n const hasLock =\n existsSync(`${dir}/bun.lock`) ||\n existsSync(`${dir}/bun.lockb`) ||\n existsSync(`${dir}/package-lock.json`);\n const args = hasLock ? [\"bun\", \"install\", \"--frozen-lockfile\"] : [\"bun\", \"install\"];\n const proc = portableSpawn(args, { cwd: dir });\n const chunks: string[] = [];\n const decoder = new TextDecoder();\n const pump = async (stream: ReadableStream<Uint8Array>) => {\n const reader = stream.getReader();\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n if (value) chunks.push(decoder.decode(value, { stream: true }));\n }\n };\n await Promise.all([pump(proc.stdout), pump(proc.stderr)]);\n const code = await proc.exited;\n return { ok: code === 0, output: chunks.join(\"\") };\n};\n\n/** Generate the store's `package.json` from the plugin specs. */\nfunction writePackageJson(projectDir: string, plugins: string[]): void {\n const dependencies: Record<string, string> = {};\n for (const spec of plugins) {\n const { name, range } = parseSpec(spec);\n dependencies[name] = range;\n }\n const pkg = {\n name: \"skaile-project-plugins\",\n private: true,\n dependencies,\n };\n mkdirSync(pluginsDir(projectDir), { recursive: true });\n writeFileSync(pluginsPkgJson(projectDir), `${JSON.stringify(pkg, null, 2)}\\n`);\n}\n\n/**\n * Reconcile the plugin store for a project.\n *\n * @param projectDir - Project root containing `skaile.yaml` / `skaile.lock.yaml`.\n * @param plugins - The `skaile.yaml` `plugins:` list (npm specifiers).\n * @param opts - Optional injectable installer + lock slice override.\n * @returns Whether the store changed and why.\n */\nexport async function reconcilePlugins(\n projectDir: string,\n plugins: string[],\n opts: ReconcileOptions = {},\n): Promise<ReconcileResult> {\n if (plugins.length === 0) {\n return { changed: false, reason: \"no-plugins\" };\n }\n\n const lockSlice = opts.lockSlice ?? readPluginsLockSlice(projectDir);\n const wantHash = createHash(\"sha256\")\n .update(JSON.stringify({ plugins: [...plugins].sort(), lock: lockSlice }))\n .digest(\"hex\");\n\n const hashFile = reconcileHashFile(projectDir);\n if (existsSync(hashFile)) {\n const have = readFileSync(hashFile, \"utf8\").trim();\n if (have === wantHash) {\n return { changed: false, reason: \"up-to-date\" };\n }\n }\n\n writePackageJson(projectDir, plugins);\n\n const install = opts.runInstall ?? defaultInstall;\n const result = await install(pluginsDir(projectDir));\n if (!result.ok) {\n throw new Error(`plugin install failed:\\n${result.output}`);\n }\n\n writeFileSync(hashFile, wantHash);\n return { changed: true, reason: \"reconciled\" };\n}\n","/**\n * The project-local plugin store: reconcile (`<projectDir>/.skaile/plugins/`)\n * then load the reconciled plugins into the `pluginRegistry`.\n *\n * `ensurePluginsLoaded` is the single entrypoint commands wire in. It is a\n * guarded no-op when `plugins` is empty/undefined — zero overhead for the\n * common case where no project declares `plugins:` in `skaile.yaml`.\n */\n\nimport { type PluginRegistry, pluginRegistry } from \"@skaile/workspaces/plugin-registry\";\nimport type { Logger } from \"@skaile/workspaces/types\";\nimport { type LoadResult, loadPlugins } from \"./load.js\";\nimport { type ReconcileOptions, reconcilePlugins } from \"./reconcile.js\";\n\nexport type { LoadResult } from \"./load.js\";\nexport { loadPlugins } from \"./load.js\";\nexport type { ReconcileOptions } from \"./reconcile.js\";\nexport { reconcilePlugins } from \"./reconcile.js\";\nexport { specName } from \"./spec.js\";\n\n/** Options for {@link ensurePluginsLoaded}. */\nexport interface EnsurePluginsOptions extends ReconcileOptions {\n log?: Logger;\n}\n\n/**\n * Reconcile the plugin store then load each plugin into `registry`.\n *\n * No-op (returns immediately) when `plugins` is empty/undefined, so the common\n * no-plugins path costs nothing.\n *\n * @param projectDir - Project root.\n * @param plugins - The `skaile.yaml` `plugins:` list (may be undefined).\n * @param registry - Registry to register into. Defaults to `pluginRegistry`.\n * @param opts - Injectable installer / lock slice + optional logger.\n * @returns The load result, or an empty result when there are no plugins.\n */\nexport async function ensurePluginsLoaded(\n projectDir: string,\n plugins: string[] | undefined,\n registry: PluginRegistry = pluginRegistry,\n opts: EnsurePluginsOptions = {},\n): Promise<LoadResult> {\n if (!plugins || plugins.length === 0) {\n return { loaded: [], failed: [] };\n }\n await reconcilePlugins(projectDir, plugins, opts);\n return loadPlugins(projectDir, plugins, registry, { log: opts.log });\n}\n"]}
@@ -1,5 +1,5 @@
1
- export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, builtinCapabilities, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, createAgentSession, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, installPreInitRingSink, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveMixin, runAgentChat, saveSession, setCurrentSession, startAgentServer, touchSession, writeClaudeCodeCredentialsFile } from '../chunk-XMKBIVG3.js';
2
- import '../chunk-JZQFZ55W.js';
1
+ export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, MarkdownStreamer, PreInitRingSink, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, builtinCapabilities, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, createAgentSession, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, installPreInitRingSink, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, mcpAuthSecretKey, newSession, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveMixin, runAgentChat, saveSession, setCurrentSession, startAgentServer, touchSession, writeClaudeCodeCredentialsFile } from '../chunk-5LHPKVGR.js';
2
+ import '../chunk-NHLXS2CH.js';
3
3
  import '../chunk-X5YPJV4N.js';
4
4
  import '../chunk-O7SG5PC2.js';
5
5
  import '../chunk-7QBNJTTQ.js';
@@ -7,25 +7,25 @@ import '../chunk-GTS2FODO.js';
7
7
  import '../chunk-WQ7DE5UC.js';
8
8
  import '../chunk-32NA4TVC.js';
9
9
  export { assembleSystemPrompt, buildCapabilitiesPromptSection, buildLinkedPeersPromptSection } from '../chunk-W3UDISS2.js';
10
- import '../chunk-TDSRLMDB.js';
10
+ import '../chunk-EVZKWY5J.js';
11
11
  import '../chunk-5C3QJSOD.js';
12
12
  import '../chunk-RRVQAE5D.js';
13
13
  import '../chunk-BMQKMOQY.js';
14
14
  import '../chunk-GAH4YRCI.js';
15
15
  import '../chunk-OCAQH66V.js';
16
16
  import '../chunk-LV2HPH3C.js';
17
- import '../chunk-F5Q2RMH4.js';
17
+ import '../chunk-LMRO2QNF.js';
18
18
  import '../chunk-OVRSNIKJ.js';
19
- import '../chunk-R4H6EJW5.js';
20
- import '../chunk-3HUUP3JC.js';
19
+ import '../chunk-CBZEIFU4.js';
20
+ import '../chunk-FYLIR4AV.js';
21
21
  import '../chunk-6E6PKKAD.js';
22
22
  import '../chunk-X46FY45B.js';
23
23
  import '../chunk-DEYYRFQU.js';
24
24
  import '../chunk-IFGTRL2I.js';
25
- export { globalSettingsPath, loadSettings, mapLegacyFields, projectSettingsPath, resolveSettings, saveSettings } from '../chunk-KYQNWFJV.js';
25
+ export { globalSettingsPath, loadSettings, mapLegacyFields, projectSettingsPath, resolveSettings, saveSettings } from '../chunk-BLGHFVXE.js';
26
26
  import '../chunk-ZAP2BDHG.js';
27
- import '../chunk-HVCZLD5Z.js';
28
- import '../chunk-GJI6FZ56.js';
27
+ import '../chunk-VPXV2Z5E.js';
28
+ import '../chunk-COSTF7QW.js';
29
29
  import '../chunk-DZCK7GRW.js';
30
30
  import '../chunk-6IDBWPK2.js';
31
31
  import '../chunk-GEEW6SY2.js';
@@ -1,9 +1,9 @@
1
- export { AssetManager, parseCanonicalLockKey } from '../chunk-R2SKIYU2.js';
2
- export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-NYMRKIOR.js';
3
- import '../chunk-KYQNWFJV.js';
1
+ export { AssetManager, NON_DEPLOYABLE_KINDS, parseCanonicalLockKey } from '../chunk-JUZLVRI4.js';
2
+ export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-CVWA4RIK.js';
3
+ import '../chunk-BLGHFVXE.js';
4
4
  import '../chunk-ZAP2BDHG.js';
5
- import '../chunk-HVCZLD5Z.js';
6
- import '../chunk-GJI6FZ56.js';
5
+ import '../chunk-VPXV2Z5E.js';
6
+ import '../chunk-COSTF7QW.js';
7
7
  import '../chunk-DZCK7GRW.js';
8
8
  import '../chunk-6IDBWPK2.js';
9
9
  import '../chunk-GEEW6SY2.js';
package/dist/sdk/core.js CHANGED
@@ -1,7 +1,7 @@
1
- export { ALL_PROVIDERS, ManifestYamlEditor, SETTINGS_DEFAULTS, WorkspaceYamlEditor, applyPatch, buildLockFile, computeHash, detectEnvApiKeys, extractForPatch, generatePatch, globalSettingsPath, listPatches, loadSettings, mapLegacyFields, maskApiKey, migrateSettings, portableSpawn, portableSpawnSync, projectSettingsPath, providerEnvKey, readLock, readPatch, readPluginsLockSlice, resolveAllKeys, resolveApiKey, resolveSettings, savePatch, saveSettings, verifyLock, walkForSettings, writeLock, writePluginsLockSlice } from '../chunk-KYQNWFJV.js';
1
+ export { ALL_PROVIDERS, ManifestYamlEditor, SETTINGS_DEFAULTS, WorkspaceYamlEditor, applyPatch, buildLockFile, computeHash, detectEnvApiKeys, extractForPatch, generatePatch, globalSettingsPath, listPatches, loadSettings, mapLegacyFields, maskApiKey, migrateSettings, portableSpawn, portableSpawnSync, projectSettingsPath, providerEnvKey, readLock, readPatch, readPluginsLockSlice, resolveAllKeys, resolveApiKey, resolveSettings, savePatch, saveSettings, verifyLock, walkForSettings, writeLock, writePluginsLockSlice } from '../chunk-BLGHFVXE.js';
2
2
  export { ASSET_KIND_DIRS, assetSearchDirs, detectAiResources, detectDomains, detectMonorepoRoot } from '../chunk-ZAP2BDHG.js';
3
- export { FACTORY_ASSETS_REPO_NAME, factoryAssetRoots, resolveFactoryAssetsRoot, resolveFactoryAssetsRootOrNull, resolvePackagedAssetsDir, resolveRuntimeAssets, resolveWorkspacesPackageRoot } from '../chunk-HVCZLD5Z.js';
4
- export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, deriveSingleMaterializedMcpDeclaration, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, mergeSkWorkspaceConfigs, normalizeConfig, pullRepo, readLinks, resolveAgentDir, resolveAll, resolveAsset, resolveSkWorkspaceConfig, saveSkWorkspaceConfig, scanRepo, stageMaterializedSkills, unlinkRepo, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, writeLinks } from '../chunk-GJI6FZ56.js';
3
+ export { FACTORY_ASSETS_REPO_NAME, factoryAssetRoots, resolveFactoryAssetsRoot, resolveFactoryAssetsRootOrNull, resolvePackagedAssetsDir, resolveRuntimeAssets, resolveWorkspacesPackageRoot } from '../chunk-VPXV2Z5E.js';
4
+ export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, __resetCacheMigrationMemo, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, deriveSingleMaterializedMcpDeclaration, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, globalCacheRoot, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, mergeLegacyEntriesInto, mergeSkWorkspaceConfigs, migrateLegacyDir, normalizeConfig, pullRepo, readLinks, resolveAgentDir, resolveAll, resolveAsset, resolveSkWorkspaceConfig, saveSkWorkspaceConfig, scanRepo, stageMaterializedSkills, unlinkRepo, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, writeLinks } from '../chunk-COSTF7QW.js';
5
5
  export { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, encodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-DZCK7GRW.js';
6
6
  export { bundleDepRefs, fromAgentMd, fromAgentYaml, fromBundleYaml, fromConnectorMd, fromContractMd, fromFlowYaml, fromMcpServerMd, fromMcpServerMdContent, fromPromptMd, fromSkillMd, parseFrontmatter, parseRequires, scanDirectory, walkDir } from '../chunk-6IDBWPK2.js';
7
7
  export { ASSET_KINDS, ASSET_NAME_HINT, INDIVIDUAL_KINDS, assetRefToDep, assetRefToStr, depToStr, entryFromRaw, entryToRaw, isValidAssetName, parseAssetRef, parseDep, repositoryFromRaw, repositoryToRaw, slugifyAssetName } from '../chunk-GEEW6SY2.js';
package/dist/sdk/flow.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export { FlowManifestSchema, computeFlowState, computeFlowStateFromSnapshots, computeSkippable, flowKindProvider, isBlocking, loadAllFlows, loadFlow, loadFlowsFromDir, resolveNextNodes, validateFlow } from '../chunk-X46FY45B.js';
2
- import '../chunk-KYQNWFJV.js';
2
+ import '../chunk-BLGHFVXE.js';
3
3
  import '../chunk-ZAP2BDHG.js';
4
- import '../chunk-HVCZLD5Z.js';
5
- import '../chunk-GJI6FZ56.js';
4
+ import '../chunk-VPXV2Z5E.js';
5
+ import '../chunk-COSTF7QW.js';
6
6
  import '../chunk-DZCK7GRW.js';
7
7
  import '../chunk-6IDBWPK2.js';
8
8
  import '../chunk-GEEW6SY2.js';
package/dist/sdk/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AgentClient } from '../chunk-SZ3SIVZQ.js';
2
- import { startAgentServer } from '../chunk-XMKBIVG3.js';
3
- import '../chunk-JZQFZ55W.js';
2
+ import { startAgentServer } from '../chunk-5LHPKVGR.js';
3
+ import '../chunk-NHLXS2CH.js';
4
4
  import '../chunk-X5YPJV4N.js';
5
5
  import '../chunk-O7SG5PC2.js';
6
6
  import '../chunk-7QBNJTTQ.js';
@@ -8,25 +8,25 @@ import { WebSocketClientTransport } from '../chunk-GTS2FODO.js';
8
8
  import '../chunk-WQ7DE5UC.js';
9
9
  import '../chunk-32NA4TVC.js';
10
10
  import '../chunk-W3UDISS2.js';
11
- import '../chunk-TDSRLMDB.js';
11
+ import '../chunk-EVZKWY5J.js';
12
12
  import '../chunk-5C3QJSOD.js';
13
13
  import '../chunk-RRVQAE5D.js';
14
14
  import '../chunk-BMQKMOQY.js';
15
15
  import '../chunk-GAH4YRCI.js';
16
16
  import '../chunk-OCAQH66V.js';
17
17
  import '../chunk-LV2HPH3C.js';
18
- import '../chunk-F5Q2RMH4.js';
18
+ import '../chunk-LMRO2QNF.js';
19
19
  import '../chunk-OVRSNIKJ.js';
20
- import '../chunk-R4H6EJW5.js';
21
- import '../chunk-3HUUP3JC.js';
20
+ import '../chunk-CBZEIFU4.js';
21
+ import '../chunk-FYLIR4AV.js';
22
22
  import '../chunk-6E6PKKAD.js';
23
23
  import '../chunk-X46FY45B.js';
24
24
  import '../chunk-DEYYRFQU.js';
25
25
  import '../chunk-IFGTRL2I.js';
26
- import '../chunk-KYQNWFJV.js';
26
+ import '../chunk-BLGHFVXE.js';
27
27
  import '../chunk-ZAP2BDHG.js';
28
- import '../chunk-HVCZLD5Z.js';
29
- import '../chunk-GJI6FZ56.js';
28
+ import '../chunk-VPXV2Z5E.js';
29
+ import '../chunk-COSTF7QW.js';
30
30
  import '../chunk-DZCK7GRW.js';
31
31
  import '../chunk-6IDBWPK2.js';
32
32
  import '../chunk-GEEW6SY2.js';