@skaile/workspaces 0.30.1 → 0.31.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 (119) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/{asset-feeds-IWOBYROH.js → asset-feeds-6HZDZEIT.js} +7 -7
  3. package/dist/{asset-feeds-IWOBYROH.js.map → asset-feeds-6HZDZEIT.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-VGFYUD3T.js → chunk-45RKEHPX.js} +6 -6
  20. package/dist/{chunk-VGFYUD3T.js.map → chunk-45RKEHPX.js.map} +1 -1
  21. package/dist/{chunk-6TCOYFVJ.js → chunk-4CRKROS5.js} +4 -4
  22. package/dist/{chunk-6TCOYFVJ.js.map → chunk-4CRKROS5.js.map} +1 -1
  23. package/dist/{chunk-5XAQDOMU.js → chunk-7FLLPKX3.js} +3 -3
  24. package/dist/{chunk-5XAQDOMU.js.map → chunk-7FLLPKX3.js.map} +1 -1
  25. package/dist/{chunk-TU4VZULO.js → chunk-7KOBITAP.js} +2 -2
  26. package/dist/{chunk-TU4VZULO.js.map → chunk-7KOBITAP.js.map} +1 -1
  27. package/dist/{chunk-KHZI44SS.js → chunk-BRBOC53X.js} +2 -2
  28. package/dist/{chunk-KHZI44SS.js.map → chunk-BRBOC53X.js.map} +1 -1
  29. package/dist/{chunk-2VKVWN5E.js → chunk-CBIPUBUS.js} +3 -3
  30. package/dist/{chunk-2VKVWN5E.js.map → chunk-CBIPUBUS.js.map} +1 -1
  31. package/dist/{chunk-5DQOZFWJ.js → chunk-DKAV43NI.js} +18 -5
  32. package/dist/chunk-DKAV43NI.js.map +1 -0
  33. package/dist/{chunk-YBJLYT4S.js → chunk-G247J4MC.js} +3 -3
  34. package/dist/{chunk-YBJLYT4S.js.map → chunk-G247J4MC.js.map} +1 -1
  35. package/dist/{chunk-LIK75OJ5.js → chunk-HH62ECJ7.js} +3 -3
  36. package/dist/{chunk-LIK75OJ5.js.map → chunk-HH62ECJ7.js.map} +1 -1
  37. package/dist/{chunk-XOAF5QAE.js → chunk-IENYMRZ6.js} +78 -57
  38. package/dist/chunk-IENYMRZ6.js.map +1 -0
  39. package/dist/{chunk-AKYEI3D6.js → chunk-MWAEOCU7.js} +5 -5
  40. package/dist/{chunk-AKYEI3D6.js.map → chunk-MWAEOCU7.js.map} +1 -1
  41. package/dist/{chunk-PVMAIVNL.js → chunk-NGE6PALH.js} +3 -3
  42. package/dist/{chunk-PVMAIVNL.js.map → chunk-NGE6PALH.js.map} +1 -1
  43. package/dist/{chunk-ZME3JDA6.js → chunk-NQC7ZUXE.js} +3 -3
  44. package/dist/{chunk-ZME3JDA6.js.map → chunk-NQC7ZUXE.js.map} +1 -1
  45. package/dist/{chunk-IZIFMNTI.js → chunk-OEXA7BBK.js} +2 -2
  46. package/dist/{chunk-IZIFMNTI.js.map → chunk-OEXA7BBK.js.map} +1 -1
  47. package/dist/{chunk-SCJD3FMO.js → chunk-P72K36PU.js} +4 -4
  48. package/dist/{chunk-SCJD3FMO.js.map → chunk-P72K36PU.js.map} +1 -1
  49. package/dist/{chunk-FRRTUVUM.js → chunk-QF6LBS2C.js} +4 -4
  50. package/dist/{chunk-FRRTUVUM.js.map → chunk-QF6LBS2C.js.map} +1 -1
  51. package/dist/{chunk-DAI754GK.js → chunk-VO7QQ76S.js} +3 -3
  52. package/dist/{chunk-DAI754GK.js.map → chunk-VO7QQ76S.js.map} +1 -1
  53. package/dist/{chunk-5MJJYIL4.js → chunk-ZM7UOJR2.js} +2 -2
  54. package/dist/{chunk-5MJJYIL4.js.map → chunk-ZM7UOJR2.js.map} +1 -1
  55. package/dist/cli/index.js +30 -30
  56. package/dist/connectors/config.js +4 -4
  57. package/dist/connectors/index.js +5 -5
  58. package/dist/core/index.js +3 -3
  59. package/dist/core/runtime-assets.js +2 -2
  60. package/dist/core/src/workspace-config.d.ts +8 -0
  61. package/dist/core/src/workspace-config.d.ts.map +1 -1
  62. package/dist/core/workspace-config.js +1 -1
  63. package/dist/deploy/index.js +3 -3
  64. package/dist/{ensure-sources-6GW6UBXY.js → ensure-sources-JWBUVDW6.js} +5 -5
  65. package/dist/{ensure-sources-6GW6UBXY.js.map → ensure-sources-JWBUVDW6.js.map} +1 -1
  66. package/dist/factory-assets/connectors/deploy.js +5 -5
  67. package/dist/factory-assets/connectors/devserver.js +5 -5
  68. package/dist/factory-assets/connectors/flow/adapter.js +5 -5
  69. package/dist/factory-assets/connectors/flow/engine.js +3 -3
  70. package/dist/factory-assets/connectors/flow/run-flow.js +6 -6
  71. package/dist/factory-assets/connectors/flow.js +5 -5
  72. package/dist/factory-assets/connectors/git.js +5 -5
  73. package/dist/factory-assets/connectors/gmail.js +5 -5
  74. package/dist/factory-assets/connectors/googledrive.js +5 -5
  75. package/dist/factory-assets/connectors/local.js +5 -5
  76. package/dist/factory-assets/connectors/mattermost.js +5 -5
  77. package/dist/factory-assets/connectors/memory.js +5 -5
  78. package/dist/factory-assets/connectors/minio.js +5 -5
  79. package/dist/factory-assets/connectors/postgres.js +5 -5
  80. package/dist/factory-assets/connectors/s3.js +5 -5
  81. package/dist/factory-assets/connectors/sharepoint.js +5 -5
  82. package/dist/factory-assets/connectors/sqlite.js +5 -5
  83. package/dist/factory-assets/connectors/static-server.js +5 -5
  84. package/dist/factory-assets/connectors/tunnel.js +5 -5
  85. package/dist/factory-assets/connectors/webdav.js +5 -5
  86. package/dist/factory-assets/connectors/xstate-store.js +5 -5
  87. package/dist/factory-assets/connectors/xstate.js +5 -5
  88. package/dist/{flows-JXO3KGC2.js → flows-T6RCRKCX.js} +3 -3
  89. package/dist/{flows-JXO3KGC2.js.map → flows-T6RCRKCX.js.map} +1 -1
  90. package/dist/library/index.js +3 -3
  91. package/dist/library/install.js +3 -3
  92. package/dist/library/src/config.d.ts +2 -2
  93. package/dist/{open-library-SH6NCJM2.js → open-library-ZXTSUPBJ.js} +6 -6
  94. package/dist/{open-library-SH6NCJM2.js.map → open-library-ZXTSUPBJ.js.map} +1 -1
  95. package/dist/{paths-YSXGJ7TO.js → paths-F7RHQUFL.js} +6 -6
  96. package/dist/{paths-YSXGJ7TO.js.map → paths-F7RHQUFL.js.map} +1 -1
  97. package/dist/{plugin-store-2KMDUF7R.js → plugin-store-BC3I36HA.js} +5 -5
  98. package/dist/{plugin-store-2KMDUF7R.js.map → plugin-store-BC3I36HA.js.map} +1 -1
  99. package/dist/runner/index.js +9 -9
  100. package/dist/runner/src/external-mcp.d.ts.map +1 -1
  101. package/dist/runner/src/recipe-resolver.d.ts +32 -0
  102. package/dist/runner/src/recipe-resolver.d.ts.map +1 -1
  103. package/dist/sdk/asset-manager.js +5 -5
  104. package/dist/sdk/bridge.js +2 -2
  105. package/dist/sdk/core.js +3 -3
  106. package/dist/sdk/flow.js +3 -3
  107. package/dist/sdk/index.js +9 -9
  108. package/dist/sdk/runner.js +9 -9
  109. package/dist/{setup-6MQ6QWML.js → setup-FQ3DE6J6.js} +7 -7
  110. package/dist/{setup-6MQ6QWML.js.map → setup-FQ3DE6J6.js.map} +1 -1
  111. package/dist/{store-client-LDYF4TK4.js → store-client-27YYEWMM.js} +6 -6
  112. package/dist/{store-client-LDYF4TK4.js.map → store-client-27YYEWMM.js.map} +1 -1
  113. package/dist/tui/index.js +9 -9
  114. package/dist/workspace-plugin/adapters/mcp.js +1 -1
  115. package/dist/workspace-plugin/adapters/omp.js +3 -3
  116. package/dist/workspace-plugin/index.js +1 -1
  117. package/package.json +1 -1
  118. package/dist/chunk-5DQOZFWJ.js.map +0 -1
  119. package/dist/chunk-XOAF5QAE.js.map +0 -1
@@ -1,17 +1,17 @@
1
- import { WorkspacePlugin } from './chunk-5MJJYIL4.js';
1
+ import { WorkspacePlugin } from './chunk-ZM7UOJR2.js';
2
2
  import { WebSocketServerTransport } from './chunk-WQ7DE5UC.js';
3
3
  import { assembleSystemPrompt, buildCapabilitiesPromptSection } from './chunk-W3UDISS2.js';
4
4
  import { PROTOCOL_VERSION } from './chunk-TDSRLMDB.js';
5
- import { EventNormalizer } from './chunk-5XAQDOMU.js';
5
+ import { EventNormalizer } from './chunk-7FLLPKX3.js';
6
6
  import { classifyClaudeSdkError } from './chunk-NGJ6E344.js';
7
- import { createDriver } from './chunk-IZIFMNTI.js';
7
+ import { createDriver } from './chunk-OEXA7BBK.js';
8
8
  import { deployCatalogEntry, undeployCatalogEntry } from './chunk-LV2HPH3C.js';
9
- import { registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, ConnectorStartupError, buildSdkConnectorTools } from './chunk-FRRTUVUM.js';
10
- import { loadConnectorDeclarations, PreMintedSecretProvider, InMemorySecretProvider } from './chunk-DAI754GK.js';
9
+ import { registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, ConnectorStartupError, buildSdkConnectorTools } from './chunk-QF6LBS2C.js';
10
+ import { loadConnectorDeclarations, PreMintedSecretProvider, InMemorySecretProvider } from './chunk-VO7QQ76S.js';
11
11
  import { renderStimulusPrompt, buildOrchestratorPrompt } from './chunk-DEYYRFQU.js';
12
- import { resolveSettings, resolveApiKey, providerEnvKey } from './chunk-YBJLYT4S.js';
13
- import { resolveRuntimeAssets } from './chunk-2VKVWN5E.js';
14
- import { resolveSkWorkspaceConfig, resolveAgentDir, stageMaterializedSkills, loadMcpServerDeclarations, COMPACTION_DEFAULTS, validateAssetRecipeAttr } from './chunk-5DQOZFWJ.js';
12
+ import { resolveSettings, resolveApiKey, providerEnvKey } from './chunk-G247J4MC.js';
13
+ import { resolveRuntimeAssets } from './chunk-CBIPUBUS.js';
14
+ import { resolveSkWorkspaceConfig, resolveAgentDir, stageMaterializedSkills, loadMcpServerDeclarations, COMPACTION_DEFAULTS, validateAssetRecipeAttr } from './chunk-DKAV43NI.js';
15
15
  import { parseAssetRef } from './chunk-LFDZYCEO.js';
16
16
  import { resolveDriverPaths } from './chunk-K5GBV4SA.js';
17
17
  import { getLogStore, resolveLogStoreConfig, createLogStoreFromConfig, OnLogBridgeSink, WsLogSink, registerLogStore, resetLogStore, createLogger } from './chunk-JB35MVBN.js';
@@ -774,55 +774,73 @@ function loadRecipeMap() {
774
774
  recipeMapMemo = { path: path5, mtimeMs, map };
775
775
  return map;
776
776
  }
777
- function resolveRecipePath(flakeRef, attr, cache) {
778
- const key = `${flakeRef}#${attr}`;
777
+ var MapRecipeProducer = class {
778
+ constructor(load = loadRecipeMap) {
779
+ this.load = load;
780
+ }
781
+ load;
782
+ kind = "map";
783
+ resolve(_ref, attr) {
784
+ const map = this.load();
785
+ if (!map) return null;
786
+ const hit = attr.split(".").reduce(
787
+ (o, k) => o && typeof o === "object" ? o[k] : void 0,
788
+ map
789
+ );
790
+ return typeof hit === "string" && hit.startsWith("/nix/store/") ? hit : null;
791
+ }
792
+ };
793
+ var NixRecipeProducer = class {
794
+ kind = "nix";
795
+ resolve(ref, attr) {
796
+ const result = spawnSync("nix", ["path-info", "--offline", `${ref}#${attr}`], {
797
+ encoding: "utf8"
798
+ });
799
+ if (result.error) throw new RecipeUnavailableError(ref, attr, result.error);
800
+ if (result.status !== 0) {
801
+ throw new RecipeUnavailableError(
802
+ ref,
803
+ attr,
804
+ new Error(`nix path-info exited ${result.status}: ${result.stderr.trim()}`)
805
+ );
806
+ }
807
+ const outPath = result.stdout.trim().split("\n")[0];
808
+ if (!outPath?.startsWith("/nix/store/")) {
809
+ throw new RecipeUnavailableError(ref, attr, new Error(`Unexpected output: ${result.stdout}`));
810
+ }
811
+ return outPath;
812
+ }
813
+ };
814
+ function defaultRecipeProducers() {
815
+ return [new MapRecipeProducer(), new NixRecipeProducer()];
816
+ }
817
+ function resolveViaProducers(ref, attr, cache, producers = defaultRecipeProducers()) {
818
+ const key = `${ref}#${attr}`;
779
819
  const cached = cache.get(key);
780
820
  if (cached) return cached;
781
821
  try {
782
822
  validateAssetRecipeAttr(attr);
783
823
  } catch (err) {
784
824
  throw new RecipeUnavailableError(
785
- flakeRef,
825
+ ref,
786
826
  attr,
787
827
  err instanceof Error ? err : new Error(String(err))
788
828
  );
789
829
  }
790
830
  const log = createLogger({ kind: "mcp", subkind: "recipe-resolve" });
791
- log.debug("resolving recipe", { flakeRef, attr });
792
- const map = loadRecipeMap();
793
- if (map) {
794
- const hit = attr.split(".").reduce(
795
- (o, k) => o && typeof o === "object" ? o[k] : void 0,
796
- map
797
- );
798
- if (typeof hit === "string" && hit.startsWith("/nix/store/")) {
799
- cache.set(key, hit);
800
- log.info("resolved recipe (map)", { flakeRef, attr, outPath: hit });
801
- return hit;
831
+ log.debug("resolving recipe", { flakeRef: ref, attr });
832
+ for (const producer of producers) {
833
+ const out = producer.resolve(ref, attr);
834
+ if (out) {
835
+ cache.set(key, out);
836
+ log.info("resolved recipe", { flakeRef: ref, attr, outPath: out, producer: producer.kind });
837
+ return out;
802
838
  }
803
839
  }
804
- const result = spawnSync("nix", ["path-info", "--offline", `${flakeRef}#${attr}`], {
805
- encoding: "utf8"
806
- });
807
- if (result.error) throw new RecipeUnavailableError(flakeRef, attr, result.error);
808
- if (result.status !== 0) {
809
- throw new RecipeUnavailableError(
810
- flakeRef,
811
- attr,
812
- new Error(`nix path-info exited ${result.status}: ${result.stderr.trim()}`)
813
- );
814
- }
815
- const outPath = result.stdout.trim().split("\n")[0];
816
- if (!outPath?.startsWith("/nix/store/")) {
817
- throw new RecipeUnavailableError(
818
- flakeRef,
819
- attr,
820
- new Error(`Unexpected output: ${result.stdout}`)
821
- );
822
- }
823
- cache.set(key, outPath);
824
- log.info("resolved recipe", { flakeRef, attr, outPath });
825
- return outPath;
840
+ throw new RecipeUnavailableError(ref, attr, new Error("no producer resolved the recipe"));
841
+ }
842
+ function resolveRecipePath(flakeRef, attr, cache) {
843
+ return resolveViaProducers(flakeRef, attr, cache);
826
844
  }
827
845
  var RECIPE_MARKER = /\$\{recipe:([a-z0-9_-]+)(?::([a-z0-9_/.-]+))?\}/g;
828
846
  function substituteRecipeTemplating(value, recipeOutPaths) {
@@ -893,10 +911,17 @@ function resolveExternalMcpDeclarations(projectDir, sessionId) {
893
911
  mcpLog.warn("MCP server skipped: reserved id", { id: decl.id });
894
912
  continue;
895
913
  }
896
- if (!decl.recipe) {
914
+ const wantsRecipe = decl.launcher === "recipe" || decl.launcher == null && decl.recipe != null;
915
+ if (!wantsRecipe) {
897
916
  resolved.push(decl);
898
917
  continue;
899
918
  }
919
+ if (!decl.recipe) {
920
+ mcpLog.warn("MCP server skipped: launcher 'recipe' without a recipe binding", {
921
+ id: decl.id
922
+ });
923
+ continue;
924
+ }
900
925
  const resolvedDecl = resolveRecipeDeclaration(decl, nixFlakeRef, recipeCache);
901
926
  if (resolvedDecl) resolved.push(resolvedDecl);
902
927
  }
@@ -905,6 +930,7 @@ function resolveExternalMcpDeclarations(projectDir, sessionId) {
905
930
  function resolveRecipeDeclaration(decl, nixFlakeRef, recipeCache) {
906
931
  const recipe = decl.recipe;
907
932
  const recipeLogKey = recipe.flake ? { flake: recipe.flake } : { attr: recipe.attr };
933
+ const recipeLog = createLogger({ kind: "mcp", subkind: decl.id, instance: "recipe-resolve" });
908
934
  try {
909
935
  const recipeKey = recipe.flake ? `mcps.${decl.id}` : recipe.attr ?? `mcps.${decl.id}`;
910
936
  const outPath = resolveRecipePath(nixFlakeRef, recipeKey, recipeCache);
@@ -918,11 +944,6 @@ function resolveRecipeDeclaration(decl, nixFlakeRef, recipeCache) {
918
944
  args: resolvedArgs,
919
945
  env: resolvedEnv
920
946
  };
921
- const recipeLog = createLogger({
922
- kind: "mcp",
923
- subkind: decl.id,
924
- instance: "recipe-resolve"
925
- });
926
947
  warnUnresolvedRecipeMarkers(recipeLog, decl.id, resolvedCommand, resolvedArgs, resolvedEnv);
927
948
  const missingPaths = validateSubstitutedPaths(resolvedCommand, resolvedArgs);
928
949
  if (missingPaths.length > 0) {
@@ -936,11 +957,11 @@ function resolveRecipeDeclaration(decl, nixFlakeRef, recipeCache) {
936
957
  recipeLog.info("recipe substitution complete", { ...recipeLogKey, outPath });
937
958
  return resolvedDecl;
938
959
  } catch (err) {
939
- createLogger({ kind: "mcp", subkind: decl.id, instance: "recipe-resolve" }).error(
940
- "MCP server skipped: recipe resolution failed",
941
- err,
942
- { id: decl.id, ...recipeLogKey, flakeRef: nixFlakeRef }
943
- );
960
+ recipeLog.error("MCP server skipped: recipe resolution failed", err, {
961
+ id: decl.id,
962
+ ...recipeLogKey,
963
+ flakeRef: nixFlakeRef
964
+ });
944
965
  return void 0;
945
966
  }
946
967
  }
@@ -4826,5 +4847,5 @@ function touchSession(state) {
4826
4847
  }
4827
4848
 
4828
4849
  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 };
4829
- //# sourceMappingURL=chunk-XOAF5QAE.js.map
4830
- //# sourceMappingURL=chunk-XOAF5QAE.js.map
4850
+ //# sourceMappingURL=chunk-IENYMRZ6.js.map
4851
+ //# sourceMappingURL=chunk-IENYMRZ6.js.map