@skaile/workspaces 0.30.1 → 0.32.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 (133) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/{asset-feeds-IWOBYROH.js → asset-feeds-2LQIGNUF.js} +7 -7
  3. package/dist/{asset-feeds-IWOBYROH.js.map → asset-feeds-2LQIGNUF.js.map} +1 -1
  4. package/dist/asset-manager/index.js +5 -5
  5. package/dist/asset-manager/installer.js +4 -4
  6. package/dist/bridge/drivers/claude-sdk.js +33 -1
  7. package/dist/bridge/drivers/claude-sdk.js.map +1 -1
  8. package/dist/bridge/drivers/codex.js +1 -1
  9. package/dist/bridge/drivers/continue.js +2 -2
  10. package/dist/bridge/drivers/echo.js +1 -1
  11. package/dist/bridge/drivers/gemini.js +3 -3
  12. package/dist/bridge/drivers/goose.js +2 -2
  13. package/dist/bridge/drivers/omp.js +1 -1
  14. package/dist/bridge/drivers/opencode.js +2 -2
  15. package/dist/bridge/drivers/qwen.js +3 -3
  16. package/dist/bridge/index.js +2 -2
  17. package/dist/bridge/src/drivers/claude-sdk.d.ts +4 -0
  18. package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
  19. package/dist/{chunk-DAI754GK.js → chunk-2RQ3KLY3.js} +3 -3
  20. package/dist/{chunk-DAI754GK.js.map → chunk-2RQ3KLY3.js.map} +1 -1
  21. package/dist/{chunk-5XAQDOMU.js → chunk-7FLLPKX3.js} +3 -3
  22. package/dist/{chunk-5XAQDOMU.js.map → chunk-7FLLPKX3.js.map} +1 -1
  23. package/dist/{chunk-YBJLYT4S.js → chunk-7WHBI3I6.js} +3 -3
  24. package/dist/{chunk-YBJLYT4S.js.map → chunk-7WHBI3I6.js.map} +1 -1
  25. package/dist/{chunk-AKYEI3D6.js → chunk-AOWKMINN.js} +5 -5
  26. package/dist/{chunk-AKYEI3D6.js.map → chunk-AOWKMINN.js.map} +1 -1
  27. package/dist/{chunk-ZME3JDA6.js → chunk-BR7RPEHW.js} +3 -3
  28. package/dist/{chunk-ZME3JDA6.js.map → chunk-BR7RPEHW.js.map} +1 -1
  29. package/dist/{chunk-VGFYUD3T.js → chunk-CPYXJJOD.js} +6 -6
  30. package/dist/{chunk-VGFYUD3T.js.map → chunk-CPYXJJOD.js.map} +1 -1
  31. package/dist/{chunk-5DQOZFWJ.js → chunk-DTJNHYFE.js} +18 -5
  32. package/dist/chunk-DTJNHYFE.js.map +1 -0
  33. package/dist/{chunk-FRRTUVUM.js → chunk-GXHJDQ37.js} +78 -24
  34. package/dist/chunk-GXHJDQ37.js.map +1 -0
  35. package/dist/{chunk-6TCOYFVJ.js → chunk-LO7QEIHT.js} +4 -4
  36. package/dist/{chunk-6TCOYFVJ.js.map → chunk-LO7QEIHT.js.map} +1 -1
  37. package/dist/{chunk-5MJJYIL4.js → chunk-MA7HSL5S.js} +2 -2
  38. package/dist/{chunk-5MJJYIL4.js.map → chunk-MA7HSL5S.js.map} +1 -1
  39. package/dist/{chunk-LIK75OJ5.js → chunk-MG4KFVGV.js} +3 -3
  40. package/dist/{chunk-LIK75OJ5.js.map → chunk-MG4KFVGV.js.map} +1 -1
  41. package/dist/{chunk-WDMH4UMD.js → chunk-N74UQJPN.js} +45 -3
  42. package/dist/chunk-N74UQJPN.js.map +1 -0
  43. package/dist/{chunk-PVMAIVNL.js → chunk-NGE6PALH.js} +3 -3
  44. package/dist/{chunk-PVMAIVNL.js.map → chunk-NGE6PALH.js.map} +1 -1
  45. package/dist/{chunk-KHZI44SS.js → chunk-NZJDQYNB.js} +2 -2
  46. package/dist/{chunk-KHZI44SS.js.map → chunk-NZJDQYNB.js.map} +1 -1
  47. package/dist/{chunk-IZIFMNTI.js → chunk-OEXA7BBK.js} +2 -2
  48. package/dist/{chunk-IZIFMNTI.js.map → chunk-OEXA7BBK.js.map} +1 -1
  49. package/dist/{chunk-SCJD3FMO.js → chunk-P72K36PU.js} +4 -4
  50. package/dist/{chunk-SCJD3FMO.js.map → chunk-P72K36PU.js.map} +1 -1
  51. package/dist/{chunk-LA2YSXEE.js → chunk-PWXN2KHV.js} +3 -3
  52. package/dist/{chunk-LA2YSXEE.js.map → chunk-PWXN2KHV.js.map} +1 -1
  53. package/dist/{chunk-XOAF5QAE.js → chunk-SIW5I47F.js} +78 -57
  54. package/dist/chunk-SIW5I47F.js.map +1 -0
  55. package/dist/{chunk-2VKVWN5E.js → chunk-SN2RWSB3.js} +3 -3
  56. package/dist/{chunk-2VKVWN5E.js.map → chunk-SN2RWSB3.js.map} +1 -1
  57. package/dist/{chunk-TU4VZULO.js → chunk-YHGJBGFU.js} +3 -3
  58. package/dist/{chunk-TU4VZULO.js.map → chunk-YHGJBGFU.js.map} +1 -1
  59. package/dist/cli/index.js +32 -32
  60. package/dist/connectors/config.js +4 -4
  61. package/dist/connectors/index.js +5 -5
  62. package/dist/connectors/src/connector-types.d.ts +8 -0
  63. package/dist/connectors/src/connector-types.d.ts.map +1 -1
  64. package/dist/core/index.js +3 -3
  65. package/dist/core/runtime-assets.js +2 -2
  66. package/dist/core/src/workspace-config.d.ts +16 -0
  67. package/dist/core/src/workspace-config.d.ts.map +1 -1
  68. package/dist/core/workspace-config.js +1 -1
  69. package/dist/deploy/index.js +3 -3
  70. package/dist/{ensure-sources-6GW6UBXY.js → ensure-sources-CRUZDVPG.js} +7 -7
  71. package/dist/{ensure-sources-6GW6UBXY.js.map → ensure-sources-CRUZDVPG.js.map} +1 -1
  72. package/dist/factory-assets/connectors/deploy.js +5 -5
  73. package/dist/factory-assets/connectors/devserver.js +5 -5
  74. package/dist/factory-assets/connectors/flow/adapter.js +5 -5
  75. package/dist/factory-assets/connectors/flow/engine.js +3 -3
  76. package/dist/factory-assets/connectors/flow/run-flow.js +6 -6
  77. package/dist/factory-assets/connectors/flow.js +5 -5
  78. package/dist/factory-assets/connectors/git/driver.d.ts +54 -0
  79. package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
  80. package/dist/factory-assets/connectors/git.js +5 -5
  81. package/dist/factory-assets/connectors/gmail.js +5 -5
  82. package/dist/factory-assets/connectors/googledrive.js +5 -5
  83. package/dist/factory-assets/connectors/local.js +5 -5
  84. package/dist/factory-assets/connectors/mattermost.js +5 -5
  85. package/dist/factory-assets/connectors/memory.js +5 -5
  86. package/dist/factory-assets/connectors/minio.js +5 -5
  87. package/dist/factory-assets/connectors/postgres.js +5 -5
  88. package/dist/factory-assets/connectors/s3.js +5 -5
  89. package/dist/factory-assets/connectors/sharepoint.js +5 -5
  90. package/dist/factory-assets/connectors/sqlite.js +5 -5
  91. package/dist/factory-assets/connectors/static-server.js +5 -5
  92. package/dist/factory-assets/connectors/tunnel.js +5 -5
  93. package/dist/factory-assets/connectors/webdav.js +5 -5
  94. package/dist/factory-assets/connectors/xstate-store.js +5 -5
  95. package/dist/factory-assets/connectors/xstate.js +5 -5
  96. package/dist/{flows-JXO3KGC2.js → flows-W7L2576K.js} +3 -3
  97. package/dist/{flows-JXO3KGC2.js.map → flows-W7L2576K.js.map} +1 -1
  98. package/dist/library/index.js +5 -5
  99. package/dist/library/install.js +4 -4
  100. package/dist/library/src/config.d.ts +2 -2
  101. package/dist/library/src/install/index.d.ts +1 -1
  102. package/dist/library/src/install/index.d.ts.map +1 -1
  103. package/dist/library/src/install/install-from-manifest.d.ts +25 -1
  104. package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
  105. package/dist/{open-library-SH6NCJM2.js → open-library-XZZXXVBP.js} +8 -8
  106. package/dist/{open-library-SH6NCJM2.js.map → open-library-XZZXXVBP.js.map} +1 -1
  107. package/dist/{paths-YSXGJ7TO.js → paths-RH5CIFX2.js} +6 -6
  108. package/dist/{paths-YSXGJ7TO.js.map → paths-RH5CIFX2.js.map} +1 -1
  109. package/dist/{plugin-store-2KMDUF7R.js → plugin-store-2UZGNS6M.js} +5 -5
  110. package/dist/{plugin-store-2KMDUF7R.js.map → plugin-store-2UZGNS6M.js.map} +1 -1
  111. package/dist/runner/index.js +9 -9
  112. package/dist/runner/src/external-mcp.d.ts.map +1 -1
  113. package/dist/runner/src/recipe-resolver.d.ts +32 -0
  114. package/dist/runner/src/recipe-resolver.d.ts.map +1 -1
  115. package/dist/sdk/asset-manager.js +5 -5
  116. package/dist/sdk/bridge.js +2 -2
  117. package/dist/sdk/core.js +3 -3
  118. package/dist/sdk/flow.js +3 -3
  119. package/dist/sdk/index.js +9 -9
  120. package/dist/sdk/runner.js +9 -9
  121. package/dist/{setup-6MQ6QWML.js → setup-G5UATRCX.js} +7 -7
  122. package/dist/{setup-6MQ6QWML.js.map → setup-G5UATRCX.js.map} +1 -1
  123. package/dist/{store-client-LDYF4TK4.js → store-client-TUC7VSOU.js} +6 -6
  124. package/dist/{store-client-LDYF4TK4.js.map → store-client-TUC7VSOU.js.map} +1 -1
  125. package/dist/tui/index.js +9 -9
  126. package/dist/workspace-plugin/adapters/mcp.js +1 -1
  127. package/dist/workspace-plugin/adapters/omp.js +3 -3
  128. package/dist/workspace-plugin/index.js +1 -1
  129. package/package.json +1 -1
  130. package/dist/chunk-5DQOZFWJ.js.map +0 -1
  131. package/dist/chunk-FRRTUVUM.js.map +0 -1
  132. package/dist/chunk-WDMH4UMD.js.map +0 -1
  133. package/dist/chunk-XOAF5QAE.js.map +0 -1
@@ -1,14 +1,14 @@
1
- export { WebDAVConnector, createConnector17 as createConnector } from '../../chunk-FRRTUVUM.js';
1
+ export { WebDAVConnector, createConnector17 as createConnector } from '../../chunk-GXHJDQ37.js';
2
2
  import '../../chunk-OVRSNIKJ.js';
3
- import '../../chunk-DAI754GK.js';
3
+ import '../../chunk-2RQ3KLY3.js';
4
4
  import '../../chunk-74UKG2LA.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-YBJLYT4S.js';
10
- import '../../chunk-2VKVWN5E.js';
11
- import '../../chunk-5DQOZFWJ.js';
9
+ import '../../chunk-7WHBI3I6.js';
10
+ import '../../chunk-SN2RWSB3.js';
11
+ import '../../chunk-DTJNHYFE.js';
12
12
  import '../../chunk-H5YXL4KI.js';
13
13
  import '../../chunk-4AGIEU7V.js';
14
14
  import '../../chunk-LFDZYCEO.js';
@@ -1,14 +1,14 @@
1
- export { XStateStoreConnector, createConnector19 as createConnector } from '../../chunk-FRRTUVUM.js';
1
+ export { XStateStoreConnector, createConnector19 as createConnector } from '../../chunk-GXHJDQ37.js';
2
2
  import '../../chunk-OVRSNIKJ.js';
3
- import '../../chunk-DAI754GK.js';
3
+ import '../../chunk-2RQ3KLY3.js';
4
4
  import '../../chunk-74UKG2LA.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-YBJLYT4S.js';
10
- import '../../chunk-2VKVWN5E.js';
11
- import '../../chunk-5DQOZFWJ.js';
9
+ import '../../chunk-7WHBI3I6.js';
10
+ import '../../chunk-SN2RWSB3.js';
11
+ import '../../chunk-DTJNHYFE.js';
12
12
  import '../../chunk-H5YXL4KI.js';
13
13
  import '../../chunk-4AGIEU7V.js';
14
14
  import '../../chunk-LFDZYCEO.js';
@@ -1,14 +1,14 @@
1
- export { XStateConnector, createConnector18 as createConnector } from '../../chunk-FRRTUVUM.js';
1
+ export { XStateConnector, createConnector18 as createConnector } from '../../chunk-GXHJDQ37.js';
2
2
  import '../../chunk-OVRSNIKJ.js';
3
- import '../../chunk-DAI754GK.js';
3
+ import '../../chunk-2RQ3KLY3.js';
4
4
  import '../../chunk-74UKG2LA.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-YBJLYT4S.js';
10
- import '../../chunk-2VKVWN5E.js';
11
- import '../../chunk-5DQOZFWJ.js';
9
+ import '../../chunk-7WHBI3I6.js';
10
+ import '../../chunk-SN2RWSB3.js';
11
+ import '../../chunk-DTJNHYFE.js';
12
12
  import '../../chunk-H5YXL4KI.js';
13
13
  import '../../chunk-4AGIEU7V.js';
14
14
  import '../../chunk-LFDZYCEO.js';
@@ -1,7 +1,7 @@
1
- export { flowFindFlowForSession, flowGetSession, flowList, flowListSessions, flowShow } from './chunk-KHZI44SS.js';
1
+ export { flowFindFlowForSession, flowGetSession, flowList, flowListSessions, flowShow } from './chunk-NZJDQYNB.js';
2
2
  import './chunk-XCBG2KDC.js';
3
3
  import './chunk-R6O6YWU7.js';
4
4
  import './chunk-X5YPJV4N.js';
5
5
  import './chunk-NSBPE2FW.js';
6
- //# sourceMappingURL=flows-JXO3KGC2.js.map
7
- //# sourceMappingURL=flows-JXO3KGC2.js.map
6
+ //# sourceMappingURL=flows-W7L2576K.js.map
7
+ //# sourceMappingURL=flows-W7L2576K.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"flows-JXO3KGC2.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"flows-W7L2576K.js"}
@@ -1,11 +1,11 @@
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-LA2YSXEE.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-PWXN2KHV.js';
2
2
  import '../chunk-7MANNJ3U.js';
3
- export { installFromManifest } from '../chunk-WDMH4UMD.js';
3
+ export { installFromManifest } from '../chunk-N74UQJPN.js';
4
4
  export { GITHUB_PAT_ENV, fetchAssetFilesFromGitHub } from '../chunk-R7FOF242.js';
5
5
  import '../chunk-ZDKJHQY2.js';
6
- import '../chunk-YBJLYT4S.js';
7
- import '../chunk-2VKVWN5E.js';
8
- import '../chunk-5DQOZFWJ.js';
6
+ import '../chunk-7WHBI3I6.js';
7
+ import '../chunk-SN2RWSB3.js';
8
+ import '../chunk-DTJNHYFE.js';
9
9
  import '../chunk-H5YXL4KI.js';
10
10
  import '../chunk-4AGIEU7V.js';
11
11
  import '../chunk-LFDZYCEO.js';
@@ -1,8 +1,8 @@
1
- export { installFromManifest } from '../chunk-WDMH4UMD.js';
1
+ export { installFromManifest, longestCommonDirPrefix } from '../chunk-N74UQJPN.js';
2
2
  export { GITHUB_PAT_ENV, fetchAssetFilesFromGitHub } from '../chunk-R7FOF242.js';
3
- import '../chunk-YBJLYT4S.js';
4
- import '../chunk-2VKVWN5E.js';
5
- import '../chunk-5DQOZFWJ.js';
3
+ import '../chunk-7WHBI3I6.js';
4
+ import '../chunk-SN2RWSB3.js';
5
+ import '../chunk-DTJNHYFE.js';
6
6
  import '../chunk-H5YXL4KI.js';
7
7
  import '../chunk-4AGIEU7V.js';
8
8
  import '../chunk-LFDZYCEO.js';
@@ -51,8 +51,8 @@ export declare const CatalogConfigSchema: z.ZodObject<{
51
51
  url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<"local", string>>]>>;
52
52
  cache_ttl: z.ZodOptional<z.ZodNumber>;
53
53
  framing: z.ZodOptional<z.ZodEnum<{
54
- trpc: "trpc";
55
54
  rest: "rest";
55
+ trpc: "trpc";
56
56
  }>>;
57
57
  }, z.core.$strip>;
58
58
  /**
@@ -78,8 +78,8 @@ export declare const SkaileConfigSchema: z.ZodObject<{
78
78
  url: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<"local", string>>]>>;
79
79
  cache_ttl: z.ZodOptional<z.ZodNumber>;
80
80
  framing: z.ZodOptional<z.ZodEnum<{
81
- trpc: "trpc";
82
81
  rest: "rest";
82
+ trpc: "trpc";
83
83
  }>>;
84
84
  }, z.core.$strip>>;
85
85
  library: z.ZodOptional<z.ZodObject<{
@@ -1,3 +1,3 @@
1
- export { type AssetFetcher, type InstallOpts, type InstallResult, installFromManifest, } from "./install-from-manifest.js";
1
+ export { type AssetFetcher, type InstallOpts, type InstallResult, installFromManifest, longestCommonDirPrefix, } from "./install-from-manifest.js";
2
2
  export { type FetchOpts, fetchAssetFilesFromGitHub, GITHUB_PAT_ENV, } from "./source-fetch-github.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../library/src/install/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,KAAK,SAAS,EACd,yBAAyB,EACzB,cAAc,GACf,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../library/src/install/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,KAAK,SAAS,EACd,yBAAyB,EACzB,cAAc,GACf,MAAM,0BAA0B,CAAC"}
@@ -17,6 +17,19 @@
17
17
  * @docLink packages/library/concepts#install
18
18
  */
19
19
  import type { InstallManifest } from "@skaile/workspaces/types";
20
+ /**
21
+ * Longest common **directory** prefix across manifest paths, compared by whole
22
+ * slash-delimited segments (never raw-string — so `app/` and `app-data/` never
23
+ * collide). Each path's basename is excluded, so the result is always a
24
+ * directory prefix and every path keeps a non-empty remainder after stripping.
25
+ *
26
+ * Used by flat mode to reproduce the platform pointer-installer's asset-rooting:
27
+ * the store persists repo-root-relative paths (e.g. `skaile-platform/mcpo/xls/MCP.md`)
28
+ * but the runner scans `.skaile/assets/<kind>/<name>/` for immediate-child files,
29
+ * so this prefix is stripped from the WRITE path while the fetch keeps the full
30
+ * repo path. Returns `''` when there is no common directory (a no-op strip).
31
+ */
32
+ export declare function longestCommonDirPrefix(paths: readonly string[]): string;
20
33
  /**
21
34
  * Fetcher signature — fetches `{ path → Buffer }` for the requested paths at
22
35
  * a pinned upstream commit. {@link fetchAssetFilesFromGitHub} is the default
@@ -33,13 +46,24 @@ export type AssetFetcher = (opts: {
33
46
  export interface InstallOpts {
34
47
  /** The pointer-only install manifest from the Catalog. */
35
48
  manifest: InstallManifest;
36
- /** Filesystem root the asset is installed under. */
49
+ /** Filesystem root the asset is installed under (ref-derived mode). */
37
50
  libraryRoot: string;
38
51
  /**
39
52
  * Pluggable fetcher so tests can inject mock data. Defaults to
40
53
  * {@link fetchAssetFilesFromGitHub} in production.
41
54
  */
42
55
  fetcher?: AssetFetcher;
56
+ /**
57
+ * Flat-layout mode. When set, install-core reproduces the platform
58
+ * pointer-installer's behavior: it ignores `libraryRoot`/ref-derivation, does
59
+ * NOT parse `manifest.ref` and does NOT verify the composite sha256, strips
60
+ * the longest-common-dir prefix from each path, per-file sha256-verifies, and
61
+ * writes the stripped paths as immediate children of `targetDir` (what the
62
+ * runner's `.skaile/assets/<kind>/<name>/` scan requires). `installPath` is
63
+ * `targetDir`. Absent → unchanged ref-derived `@<pub>/name/version/<path>`
64
+ * layout with composite verify.
65
+ */
66
+ targetDir?: string;
43
67
  }
44
68
  /**
45
69
  * Result of a successful {@link installFromManifest} call.
@@ -1 +1 @@
1
- {"version":3,"file":"install-from-manifest.d.ts","sourceRoot":"","sources":["../../../../library/src/install/install-from-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AA0DhE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,QAAQ,EAAE,eAAe,CAAC;IAC1B,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAwFnF"}
1
+ {"version":3,"file":"install-from-manifest.d.ts","sourceRoot":"","sources":["../../../../library/src/install/install-from-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AA0DhE;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAWvE;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,QAAQ,EAAE,eAAe,CAAC;IAC1B,uEAAuE;IACvE,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CA+FnF"}
@@ -1,14 +1,14 @@
1
- export { openCatalogSource, openLibrary, openLibraryManager, resolveCatalogSource } from './chunk-TU4VZULO.js';
1
+ export { openCatalogSource, openLibrary, openLibraryManager, resolveCatalogSource } from './chunk-YHGJBGFU.js';
2
2
  import './chunk-GYPA2Q7F.js';
3
- import './chunk-LA2YSXEE.js';
3
+ import './chunk-PWXN2KHV.js';
4
4
  import './chunk-7MANNJ3U.js';
5
- import './chunk-WDMH4UMD.js';
5
+ import './chunk-N74UQJPN.js';
6
6
  import './chunk-R7FOF242.js';
7
7
  import './chunk-ZDKJHQY2.js';
8
8
  import './chunk-X46FY45B.js';
9
- import './chunk-YBJLYT4S.js';
10
- import './chunk-2VKVWN5E.js';
11
- import './chunk-5DQOZFWJ.js';
9
+ import './chunk-7WHBI3I6.js';
10
+ import './chunk-SN2RWSB3.js';
11
+ import './chunk-DTJNHYFE.js';
12
12
  import './chunk-H5YXL4KI.js';
13
13
  import './chunk-4AGIEU7V.js';
14
14
  import './chunk-LFDZYCEO.js';
@@ -19,5 +19,5 @@ import './chunk-ZAP2BDHG.js';
19
19
  import './chunk-JB35MVBN.js';
20
20
  import './chunk-HRKB2ATT.js';
21
21
  import './chunk-NSBPE2FW.js';
22
- //# sourceMappingURL=open-library-SH6NCJM2.js.map
23
- //# sourceMappingURL=open-library-SH6NCJM2.js.map
22
+ //# sourceMappingURL=open-library-XZZXXVBP.js.map
23
+ //# sourceMappingURL=open-library-XZZXXVBP.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"open-library-SH6NCJM2.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"open-library-XZZXXVBP.js"}
@@ -1,7 +1,7 @@
1
- export { AI_RESOURCES, MONOREPO_ROOT, aiResourceRoots } from './chunk-ZME3JDA6.js';
2
- import './chunk-YBJLYT4S.js';
3
- import './chunk-2VKVWN5E.js';
4
- import './chunk-5DQOZFWJ.js';
1
+ export { AI_RESOURCES, MONOREPO_ROOT, aiResourceRoots } from './chunk-BR7RPEHW.js';
2
+ import './chunk-7WHBI3I6.js';
3
+ import './chunk-SN2RWSB3.js';
4
+ import './chunk-DTJNHYFE.js';
5
5
  import './chunk-H5YXL4KI.js';
6
6
  import './chunk-4AGIEU7V.js';
7
7
  import './chunk-LFDZYCEO.js';
@@ -11,5 +11,5 @@ import './chunk-K5GBV4SA.js';
11
11
  import './chunk-ZAP2BDHG.js';
12
12
  import './chunk-JB35MVBN.js';
13
13
  import './chunk-NSBPE2FW.js';
14
- //# sourceMappingURL=paths-YSXGJ7TO.js.map
15
- //# sourceMappingURL=paths-YSXGJ7TO.js.map
14
+ //# sourceMappingURL=paths-RH5CIFX2.js.map
15
+ //# sourceMappingURL=paths-RH5CIFX2.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"paths-YSXGJ7TO.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"paths-RH5CIFX2.js"}
@@ -1,7 +1,7 @@
1
1
  import { pluginRegistry } from './chunk-6E6PKKAD.js';
2
- import { readPluginsLockSlice } from './chunk-YBJLYT4S.js';
3
- import './chunk-2VKVWN5E.js';
4
- import './chunk-5DQOZFWJ.js';
2
+ import { readPluginsLockSlice } from './chunk-7WHBI3I6.js';
3
+ import './chunk-SN2RWSB3.js';
4
+ import './chunk-DTJNHYFE.js';
5
5
  import './chunk-H5YXL4KI.js';
6
6
  import './chunk-4AGIEU7V.js';
7
7
  import './chunk-LFDZYCEO.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-2KMDUF7R.js.map
142
- //# sourceMappingURL=plugin-store-2KMDUF7R.js.map
141
+ //# sourceMappingURL=plugin-store-2UZGNS6M.js.map
142
+ //# sourceMappingURL=plugin-store-2UZGNS6M.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,EA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A,EAAS,KAAA,EAAO,MAAA,EAAQ,YAAA,EAAa;AAAA,IAChD;AAAA,EACF;AAEA,EAAA,gBAAA,CAAiB,YAAY,OAAO,CAAA;AAEpC,EAAA,MAAM,OAAA,GAAU,KAAK,UAAA,IAAc,cAAA;AACnC,EAAA,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-2KMDUF7R.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;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,CAAW,UAAU,CAAA,EAAG,iBAAiB,CAAA;AACvD;AAOO,SAAS,kBAAA,CAAmB,YAAoB,OAAA,EAAyB;AAC9E,EAAA,OAAO,IAAA,CAAK,cAAA,CAAe,UAAU,CAAA,EAAG,OAAO,CAAA;AACjD;;;ACbO,SAAS,UAAU,IAAA,EAA0B;AAClD,EAAA,MAAM,OAAA,GAAU,KAAK,IAAA,EAAK;AAC1B,EAAA,IAAI,CAAC,OAAA,EAAS,MAAM,IAAI,MAAM,4BAA4B,CAAA;AAI1D,EAAA,MAAM,EAAA,GAAK,OAAA,CAAQ,WAAA,CAAY,GAAG,CAAA;AAClC,EAAA,IAAI,MAAM,CAAA,EAAG;AACX,IAAA,OAAO,EAAE,IAAA,EAAM,OAAA,EAAS,KAAA,EAAO,GAAA,EAAI;AAAA,EACrC;AACA,EAAA,MAAM,IAAA,GAAO,OAAA,CAAQ,KAAA,CAAM,CAAA,EAAG,EAAE,CAAA;AAChC,EAAA,MAAM,KAAA,GAAQ,OAAA,CAAQ,KAAA,CAAM,EAAA,GAAK,CAAC,CAAA;AAClC,EAAA,OAAO,EAAE,IAAA,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AAI,UAAA,CAAW,QAAQ,CAAA,EAAG;AACxB,IAAA,MAAM,IAAA,GAAO,YAAA,CAAa,QAAA,EAAU,MAAM,EAAE,IAAA,EAAK;AACjD,IAAA,IAAI,SAAS,QAAA,EAAU;AACrB,MAAA,OAAO,EAAE,OAAA,EAAS,KAAA,EAAO,MAAA,EAAQ,YAAA,EAAa;AAAA,IAChD;AAAA,EACF;AAEA,EAAA,gBAAA,CAAiB,YAAY,OAAO,CAAA;AAEpC,EAAA,MAAM,OAAA,GAAU,KAAK,UAAA,IAAc,cAAA;AACnC,EAAA,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-2UZGNS6M.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, builtinCapabilities, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, createAgentSession, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, installPreInitRingSink, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, newSession, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveMixin, runAgentChat, saveSession, setCurrentSession, startAgentServer, touchSession, writeClaudeCodeCredentialsFile } from '../chunk-XOAF5QAE.js';
2
- import '../chunk-5MJJYIL4.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, builtinCapabilities, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, createAgentSession, createSessionStimulusBus, defineCapability, deleteSession, dispatchRunnerCapabilityInvocation, emitSystemPromptComposed, ensureGitConfigInclude, extractClaudeAiOauthExpiresAt, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, installPreInitRingSink, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadSession, loadSessionById, newSession, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveMixin, runAgentChat, saveSession, setCurrentSession, startAgentServer, touchSession, writeClaudeCodeCredentialsFile } from '../chunk-SIW5I47F.js';
2
+ import '../chunk-MA7HSL5S.js';
3
3
  import '../chunk-X5YPJV4N.js';
4
4
  import '../chunk-O7SG5PC2.js';
5
5
  import '../chunk-7QBNJTTQ.js';
@@ -8,23 +8,23 @@ import '../chunk-WQ7DE5UC.js';
8
8
  import '../chunk-32NA4TVC.js';
9
9
  export { assembleSystemPrompt, buildCapabilitiesPromptSection, buildLinkedPeersPromptSection } from '../chunk-W3UDISS2.js';
10
10
  import '../chunk-TDSRLMDB.js';
11
- import '../chunk-5XAQDOMU.js';
11
+ import '../chunk-7FLLPKX3.js';
12
12
  import '../chunk-RRVQAE5D.js';
13
13
  import '../chunk-BMQKMOQY.js';
14
14
  import '../chunk-NGJ6E344.js';
15
- import '../chunk-IZIFMNTI.js';
15
+ import '../chunk-OEXA7BBK.js';
16
16
  import '../chunk-LV2HPH3C.js';
17
- import '../chunk-FRRTUVUM.js';
17
+ import '../chunk-GXHJDQ37.js';
18
18
  import '../chunk-OVRSNIKJ.js';
19
- import '../chunk-DAI754GK.js';
19
+ import '../chunk-2RQ3KLY3.js';
20
20
  import '../chunk-74UKG2LA.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-YBJLYT4S.js';
26
- import '../chunk-2VKVWN5E.js';
27
- import '../chunk-5DQOZFWJ.js';
25
+ export { globalSettingsPath, loadSettings, mapLegacyFields, projectSettingsPath, resolveSettings, saveSettings } from '../chunk-7WHBI3I6.js';
26
+ import '../chunk-SN2RWSB3.js';
27
+ import '../chunk-DTJNHYFE.js';
28
28
  import '../chunk-H5YXL4KI.js';
29
29
  import '../chunk-4AGIEU7V.js';
30
30
  import '../chunk-LFDZYCEO.js';
@@ -1 +1 @@
1
- {"version":3,"file":"external-mcp.d.ts","sourceRoot":"","sources":["../../../runner/src/external-mcp.ts"],"names":[],"mappings":"AAmCA,OAAO,EAA6B,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAanE;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,OAAO,EAAE,kBAAkB,GAAG,SAAS,GACtC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOxB;AAaD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,GACjB,oBAAoB,EAAE,CAkCxB;AAgHD,gEAAgE;AAChE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,IAAI,OAAO,CAAC;QAAE,KAAK,EAAE,iB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,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,oBAAoB,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;AAiExF;;;;;;;;;;;;GAYG;AACH,qBAAa,kBAAkB;IAe3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAd3B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAE7C;;;;;;;;OAQG;gBAEgB,QAAQ,EAAE,kBAAkB,EAC7C,OAAO,EAAE,kBAAkB,GAAG,SAAS,EACvC,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,kBAAkB;IAU9B,6EAA6E;IAC7E,UAAU,IAAI,OAAO;IAIrB;;;OAGG;IACG,KAAK,CAAC,YAAY,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;YAclD,WAAW;IAiCzB;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;IA8C3B;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAgB/B"}
@@ -12,9 +12,41 @@ export type RecipeResolutionCache = Map<string, string>;
12
12
  export declare function createRecipeCache(): RecipeResolutionCache;
13
13
  /** Test-only: clears the (path, mtime) recipe-map memo so module-level state does not leak between cases. */
14
14
  export declare function __resetRecipeMapMemoForTest(): void;
15
+ /** A pluggable strategy mapping a flake/asset ref + attr to an absolute store path. */
16
+ export interface RecipeProducer {
17
+ /**
18
+ * Returns the resolved store path, or `null` to defer to the next producer.
19
+ * A producer may instead THROW (e.g. `NixRecipeProducer` throws
20
+ * `RecipeUnavailableError`) to signal a terminal failure — `resolveViaProducers`
21
+ * does not catch mid-chain, so a throw skips any producers registered after it.
22
+ * Put deferring producers (those that return `null` on a miss) BEFORE any
23
+ * throwing producer in the chain.
24
+ */
25
+ resolve(ref: string, attr: string): string | null;
26
+ readonly kind: string;
27
+ }
28
+ /** Content-addressed store-path map producer. Nix is one PRODUCER of this map,
29
+ * not the only one. Generic; no nix knowledge. */
30
+ export declare class MapRecipeProducer implements RecipeProducer {
31
+ private readonly load;
32
+ readonly kind = "map";
33
+ constructor(load?: () => Record<string, unknown> | null);
34
+ resolve(_ref: string, attr: string): string | null;
35
+ }
36
+ /** Nix flake producer — locates/builds the closure via `nix path-info --offline`. */
37
+ export declare class NixRecipeProducer implements RecipeProducer {
38
+ readonly kind = "nix";
39
+ resolve(ref: string, attr: string): string | null;
40
+ }
41
+ /** Default chain: content-addressed map first, then nix build. */
42
+ export declare function defaultRecipeProducers(): RecipeProducer[];
43
+ /** Try each producer in order; cache the first non-null by `ref#attr`. */
44
+ export declare function resolveViaProducers(ref: string, attr: string, cache: RecipeResolutionCache, producers?: RecipeProducer[]): string;
15
45
  /**
16
46
  * Resolves a flake attribute to its /nix/store out-path.
17
47
  * Throws RecipeUnavailableError on missing closure / nix failure.
48
+ *
49
+ * Thin back-compat wrapper over the default producer chain (map → nix).
18
50
  */
19
51
  export declare function resolveRecipePath(flakeRef: string, attr: string, cache: RecipeResolutionCache): string;
20
52
  //# sourceMappingURL=recipe-resolver.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipe-resolver.d.ts","sourceRoot":"","sources":["../../../runner/src/recipe-resolver.ts"],"names":[],"mappings":"AAaA,qBAAa,sBAAuB,SAAQ,KAAK;aAE7B,QAAQ,EAAE,MAAM;aAChB,IAAI,EAAE,MAAM;gBADZ,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EAC5B,KAAK,CAAC,EAAE,OAAO;CAOlB;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAExD,wBAAgB,iBAAiB,IAAI,qBAAqB,CAEzD;AAiBD,6GAA6G;AAC7G,wBAAgB,2BAA2B,IAAI,IAAI,CAElD;AAiDD;;;GAGG;AACH,wBAAgB,i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B,sBAAsB,IAAI,cAAc,EAAE,CAEzD;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,qBAAqB,EAC5B,SAAS,GAAE,cAAc,EAA6B,GACrD,MAAM,CA6BR;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,qBAAqB,GAC3B,MAAM,CAER"}
@@ -1,8 +1,8 @@
1
- export { AssetManager, parseCanonicalLockKey } from '../chunk-VGFYUD3T.js';
2
- export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-6TCOYFVJ.js';
3
- import '../chunk-YBJLYT4S.js';
4
- import '../chunk-2VKVWN5E.js';
5
- import '../chunk-5DQOZFWJ.js';
1
+ export { AssetManager, parseCanonicalLockKey } from '../chunk-CPYXJJOD.js';
2
+ export { createScaffold, deployAll, installAgent, removeAsset } from '../chunk-LO7QEIHT.js';
3
+ import '../chunk-7WHBI3I6.js';
4
+ import '../chunk-SN2RWSB3.js';
5
+ import '../chunk-DTJNHYFE.js';
6
6
  import '../chunk-H5YXL4KI.js';
7
7
  import '../chunk-4AGIEU7V.js';
8
8
  import '../chunk-LFDZYCEO.js';
@@ -1,8 +1,8 @@
1
- export { BridgeRuntime, EventNormalizer, createRuntime, detectFileChange, detectFileChanges, summarizeToolCall, summarizeToolResult, validateApiKey } from '../chunk-5XAQDOMU.js';
1
+ export { BridgeRuntime, EventNormalizer, createRuntime, detectFileChange, detectFileChanges, summarizeToolCall, summarizeToolResult, validateApiKey } from '../chunk-7FLLPKX3.js';
2
2
  export { dispatchCapability, filterRenderCapabilities, renderFallback } from '../chunk-RRVQAE5D.js';
3
3
  export { STATIC_MODELS, fetchProviderModels, getModels, getStaticModels } from '../chunk-BMQKMOQY.js';
4
4
  export { AuthError, classifyClaudeSdkError } from '../chunk-NGJ6E344.js';
5
- export { AgentDriver, BUILTIN_DRIVER_CATALOG, DRIVER_CATALOG, createDriver, getBridgeLogger, listDrivers, listModelsForDriver, registerBuiltinDrivers } from '../chunk-IZIFMNTI.js';
5
+ export { AgentDriver, BUILTIN_DRIVER_CATALOG, DRIVER_CATALOG, createDriver, getBridgeLogger, listDrivers, listModelsForDriver, registerBuiltinDrivers } from '../chunk-OEXA7BBK.js';
6
6
  import '../chunk-6E6PKKAD.js';
7
7
  import '../chunk-JB35MVBN.js';
8
8
  import '../chunk-NSBPE2FW.js';
package/dist/sdk/core.js CHANGED
@@ -1,6 +1,6 @@
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-YBJLYT4S.js';
2
- export { FACTORY_ASSETS_REPO_NAME, factoryAssetRoots, resolveFactoryAssetsRoot, resolveFactoryAssetsRootOrNull, resolvePackagedAssetsDir, resolveRuntimeAssets, resolveWorkspacesPackageRoot } from '../chunk-2VKVWN5E.js';
3
- export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, 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-5DQOZFWJ.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-7WHBI3I6.js';
2
+ export { FACTORY_ASSETS_REPO_NAME, factoryAssetRoots, resolveFactoryAssetsRoot, resolveFactoryAssetsRootOrNull, resolvePackagedAssetsDir, resolveRuntimeAssets, resolveWorkspacesPackageRoot } from '../chunk-SN2RWSB3.js';
3
+ export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, 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-DTJNHYFE.js';
4
4
  export { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, encodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-H5YXL4KI.js';
5
5
  export { bundleDepRefs, fromAgentMd, fromAgentYaml, fromBundleYaml, fromConnectorMd, fromContractMd, fromFlowYaml, fromMcpServerMd, fromPromptMd, fromSkillMd, parseFrontmatter, parseRequires, scanDirectory, walkDir } from '../chunk-4AGIEU7V.js';
6
6
  export { ASSET_KINDS, ASSET_NAME_HINT, INDIVIDUAL_KINDS, assetRefToDep, assetRefToStr, depToStr, entryFromRaw, entryToRaw, isValidAssetName, parseAssetRef, parseDep, repositoryFromRaw, repositoryToRaw } from '../chunk-LFDZYCEO.js';
package/dist/sdk/flow.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { FlowManifestSchema, computeFlowState, computeFlowStateFromSnapshots, computeSkippable, flowKindProvider, isBlocking, loadAllFlows, loadFlow, loadFlowsFromDir, resolveNextNodes, validateFlow } from '../chunk-X46FY45B.js';
2
- import '../chunk-YBJLYT4S.js';
3
- import '../chunk-2VKVWN5E.js';
4
- import '../chunk-5DQOZFWJ.js';
2
+ import '../chunk-7WHBI3I6.js';
3
+ import '../chunk-SN2RWSB3.js';
4
+ import '../chunk-DTJNHYFE.js';
5
5
  import '../chunk-H5YXL4KI.js';
6
6
  import '../chunk-4AGIEU7V.js';
7
7
  import '../chunk-LFDZYCEO.js';
package/dist/sdk/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AgentClient } from '../chunk-SZ3SIVZQ.js';
2
- import { startAgentServer } from '../chunk-XOAF5QAE.js';
3
- import '../chunk-5MJJYIL4.js';
2
+ import { startAgentServer } from '../chunk-SIW5I47F.js';
3
+ import '../chunk-MA7HSL5S.js';
4
4
  import '../chunk-X5YPJV4N.js';
5
5
  import '../chunk-O7SG5PC2.js';
6
6
  import '../chunk-7QBNJTTQ.js';
@@ -9,23 +9,23 @@ import '../chunk-WQ7DE5UC.js';
9
9
  import '../chunk-32NA4TVC.js';
10
10
  import '../chunk-W3UDISS2.js';
11
11
  import '../chunk-TDSRLMDB.js';
12
- import '../chunk-5XAQDOMU.js';
12
+ import '../chunk-7FLLPKX3.js';
13
13
  import '../chunk-RRVQAE5D.js';
14
14
  import '../chunk-BMQKMOQY.js';
15
15
  import '../chunk-NGJ6E344.js';
16
- import '../chunk-IZIFMNTI.js';
16
+ import '../chunk-OEXA7BBK.js';
17
17
  import '../chunk-LV2HPH3C.js';
18
- import '../chunk-FRRTUVUM.js';
18
+ import '../chunk-GXHJDQ37.js';
19
19
  import '../chunk-OVRSNIKJ.js';
20
- import '../chunk-DAI754GK.js';
20
+ import '../chunk-2RQ3KLY3.js';
21
21
  import '../chunk-74UKG2LA.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-YBJLYT4S.js';
27
- import '../chunk-2VKVWN5E.js';
28
- import '../chunk-5DQOZFWJ.js';
26
+ import '../chunk-7WHBI3I6.js';
27
+ import '../chunk-SN2RWSB3.js';
28
+ import '../chunk-DTJNHYFE.js';
29
29
  import '../chunk-H5YXL4KI.js';
30
30
  import '../chunk-4AGIEU7V.js';
31
31
  import '../chunk-LFDZYCEO.js';