@skaile/workspaces 0.36.0 → 0.37.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.
- package/CHANGELOG.md +6 -0
- package/dist/{asset-feeds-PCLTE2W5.js → asset-feeds-W6JNAGNQ.js} +7 -7
- package/dist/{asset-feeds-PCLTE2W5.js.map → asset-feeds-W6JNAGNQ.js.map} +1 -1
- package/dist/asset-manager/index.js +5 -5
- package/dist/asset-manager/installer.js +4 -4
- package/dist/{chunk-JNH6TTIO.js → chunk-3HR6IN5B.js} +4 -4
- package/dist/{chunk-JNH6TTIO.js.map → chunk-3HR6IN5B.js.map} +1 -1
- package/dist/{chunk-WEQN6EWW.js → chunk-4A2LAEX6.js} +4 -4
- package/dist/{chunk-WEQN6EWW.js.map → chunk-4A2LAEX6.js.map} +1 -1
- package/dist/{chunk-O2OHGE4S.js → chunk-6KKNROBU.js} +2 -2
- package/dist/{chunk-O2OHGE4S.js.map → chunk-6KKNROBU.js.map} +1 -1
- package/dist/{chunk-XOBPOVFT.js → chunk-C54IAYEU.js} +3 -3
- package/dist/{chunk-XOBPOVFT.js.map → chunk-C54IAYEU.js.map} +1 -1
- package/dist/{chunk-EOCKR5TN.js → chunk-CBXZB3G5.js} +3 -3
- package/dist/{chunk-EOCKR5TN.js.map → chunk-CBXZB3G5.js.map} +1 -1
- package/dist/{chunk-MCQ4TJ3P.js → chunk-CC5ZHSHJ.js} +3 -3
- package/dist/{chunk-MCQ4TJ3P.js.map → chunk-CC5ZHSHJ.js.map} +1 -1
- package/dist/{chunk-YPRW2ROJ.js → chunk-CCQ3EMJT.js} +2 -2
- package/dist/{chunk-YPRW2ROJ.js.map → chunk-CCQ3EMJT.js.map} +1 -1
- package/dist/{chunk-5DPQ766L.js → chunk-CFCSDZYF.js} +3 -3
- package/dist/{chunk-5DPQ766L.js.map → chunk-CFCSDZYF.js.map} +1 -1
- package/dist/{chunk-FDLVPYSN.js → chunk-DAEYSPOC.js} +90 -13
- package/dist/chunk-DAEYSPOC.js.map +1 -0
- package/dist/{chunk-2Q6OY3SU.js → chunk-FBIQ4QPF.js} +3 -3
- package/dist/{chunk-2Q6OY3SU.js.map → chunk-FBIQ4QPF.js.map} +1 -1
- package/dist/{chunk-I3TERDTR.js → chunk-HAXQAC6D.js} +2 -2
- package/dist/{chunk-I3TERDTR.js.map → chunk-HAXQAC6D.js.map} +1 -1
- package/dist/{chunk-56YT6CWS.js → chunk-HL66R2P2.js} +23 -18
- package/dist/chunk-HL66R2P2.js.map +1 -0
- package/dist/{chunk-ZE5WYJVU.js → chunk-RNFNWOKZ.js} +6 -6
- package/dist/{chunk-ZE5WYJVU.js.map → chunk-RNFNWOKZ.js.map} +1 -1
- package/dist/{chunk-LY5O73Q2.js → chunk-ZSFWJAFD.js} +5 -5
- package/dist/{chunk-LY5O73Q2.js.map → chunk-ZSFWJAFD.js.map} +1 -1
- package/dist/cli/index.js +28 -28
- package/dist/connectors/config.js +4 -4
- package/dist/connectors/index.js +5 -5
- package/dist/core/index.js +3 -3
- package/dist/core/runtime-assets.js +2 -2
- package/dist/core/src/index.d.ts +1 -1
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +6 -0
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +1 -1
- package/dist/deploy/index.js +3 -3
- package/dist/{ensure-sources-HMMEQEZC.js → ensure-sources-AGORTKJC.js} +5 -5
- package/dist/{ensure-sources-HMMEQEZC.js.map → ensure-sources-AGORTKJC.js.map} +1 -1
- package/dist/factory-assets/connectors/deploy.js +5 -5
- package/dist/factory-assets/connectors/devserver.js +5 -5
- package/dist/factory-assets/connectors/flow/adapter.js +5 -5
- package/dist/factory-assets/connectors/flow/engine.js +3 -3
- package/dist/factory-assets/connectors/flow/run-flow.js +6 -6
- package/dist/factory-assets/connectors/flow.js +5 -5
- package/dist/factory-assets/connectors/git.js +5 -5
- package/dist/factory-assets/connectors/gmail.js +5 -5
- package/dist/factory-assets/connectors/googledrive.js +5 -5
- package/dist/factory-assets/connectors/local.js +5 -5
- package/dist/factory-assets/connectors/mattermost.js +5 -5
- package/dist/factory-assets/connectors/memory.js +5 -5
- package/dist/factory-assets/connectors/minio.js +5 -5
- package/dist/factory-assets/connectors/postgres.js +5 -5
- package/dist/factory-assets/connectors/s3.js +5 -5
- package/dist/factory-assets/connectors/sharepoint.js +5 -5
- package/dist/factory-assets/connectors/sqlite.js +5 -5
- package/dist/factory-assets/connectors/static-server.js +5 -5
- package/dist/factory-assets/connectors/tunnel.js +5 -5
- package/dist/factory-assets/connectors/webdav.js +5 -5
- package/dist/factory-assets/connectors/xstate-store.js +5 -5
- package/dist/factory-assets/connectors/xstate.js +5 -5
- package/dist/{flows-O7OXGFIY.js → flows-BOJMGLRI.js} +3 -3
- package/dist/{flows-O7OXGFIY.js.map → flows-BOJMGLRI.js.map} +1 -1
- package/dist/library/index.js +3 -3
- package/dist/library/install.js +3 -3
- package/dist/{open-library-5WWTBHQD.js → open-library-WTN7QLN7.js} +6 -6
- package/dist/{open-library-5WWTBHQD.js.map → open-library-WTN7QLN7.js.map} +1 -1
- package/dist/{paths-UC3ZHLKC.js → paths-66ZDGXK3.js} +6 -6
- package/dist/{paths-UC3ZHLKC.js.map → paths-66ZDGXK3.js.map} +1 -1
- package/dist/{plugin-store-R2WLXRT3.js → plugin-store-BOQXW3XV.js} +5 -5
- package/dist/{plugin-store-R2WLXRT3.js.map → plugin-store-BOQXW3XV.js.map} +1 -1
- package/dist/runner/index.js +7 -7
- package/dist/runner/src/external-mcp.d.ts +5 -0
- package/dist/runner/src/external-mcp.d.ts.map +1 -1
- package/dist/runner/src/mcp-runtime-handlers.d.ts +26 -10
- package/dist/runner/src/mcp-runtime-handlers.d.ts.map +1 -1
- package/dist/runner/src/runner-capabilities.d.ts +26 -0
- package/dist/runner/src/runner-capabilities.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +5 -5
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/flow.js +3 -3
- package/dist/sdk/index.js +7 -7
- package/dist/sdk/runner.js +7 -7
- package/dist/{setup-QQ3SNNWP.js → setup-JIGNL3O4.js} +5 -5
- package/dist/{setup-QQ3SNNWP.js.map → setup-JIGNL3O4.js.map} +1 -1
- package/dist/{store-client-4GKV4LOD.js → store-client-ODJJK5XS.js} +6 -6
- package/dist/{store-client-4GKV4LOD.js.map → store-client-ODJJK5XS.js.map} +1 -1
- package/dist/tui/index.js +7 -7
- package/dist/workspace-plugin/adapters/mcp.js +1 -1
- package/dist/workspace-plugin/adapters/omp.js +3 -3
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-56YT6CWS.js.map +0 -1
- package/dist/chunk-FDLVPYSN.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WorkspacePlugin } from './chunk-
|
|
1
|
+
import { WorkspacePlugin } from './chunk-CCQ3EMJT.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';
|
|
@@ -6,12 +6,12 @@ import { EventNormalizer } from './chunk-5IXCNMMU.js';
|
|
|
6
6
|
import { classifyClaudeSdkError } from './chunk-GAH4YRCI.js';
|
|
7
7
|
import { createDriver } from './chunk-KM6DCR7A.js';
|
|
8
8
|
import { deployCatalogEntry, undeployCatalogEntry } from './chunk-LV2HPH3C.js';
|
|
9
|
-
import { registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, ConnectorStartupError, buildSdkConnectorTools } from './chunk-
|
|
10
|
-
import { loadConnectorDeclarations, SecretProviderChain, PreMintedSecretProvider, InMemorySecretProvider } from './chunk-
|
|
9
|
+
import { registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, ConnectorStartupError, buildSdkConnectorTools } from './chunk-3HR6IN5B.js';
|
|
10
|
+
import { loadConnectorDeclarations, SecretProviderChain, PreMintedSecretProvider, InMemorySecretProvider } from './chunk-CC5ZHSHJ.js';
|
|
11
11
|
import { renderStimulusPrompt, buildOrchestratorPrompt } from './chunk-DEYYRFQU.js';
|
|
12
|
-
import { resolveSettings, resolveApiKey, providerEnvKey } from './chunk-
|
|
13
|
-
import { resolveRuntimeAssets } from './chunk-
|
|
14
|
-
import { resolveSkWorkspaceConfig, resolveAgentDir, stageMaterializedSkills, loadMcpServerDeclarations, COMPACTION_DEFAULTS, validateAssetRecipeAttr } from './chunk-
|
|
12
|
+
import { resolveSettings, resolveApiKey, providerEnvKey } from './chunk-FBIQ4QPF.js';
|
|
13
|
+
import { resolveRuntimeAssets } from './chunk-CFCSDZYF.js';
|
|
14
|
+
import { resolveSkWorkspaceConfig, resolveAgentDir, stageMaterializedSkills, loadMcpServerDeclarations, COMPACTION_DEFAULTS, validateAssetRecipeAttr, deriveSingleMaterializedMcpDeclaration } from './chunk-HL66R2P2.js';
|
|
15
15
|
import { parseAssetRef } from './chunk-BM7XANVN.js';
|
|
16
16
|
import { resolveDriverPaths } from './chunk-K5GBV4SA.js';
|
|
17
17
|
import { getLogStore, resolveLogStoreConfig, createLogStoreFromConfig, OnLogBridgeSink, WsLogSink, registerLogStore, resetLogStore, createLogger } from './chunk-JB35MVBN.js';
|
|
@@ -882,6 +882,14 @@ function validateSubstitutedPaths(command, args) {
|
|
|
882
882
|
}
|
|
883
883
|
|
|
884
884
|
// runner/src/external-mcp.ts
|
|
885
|
+
var McpServerAlreadyRegisteredError = class extends Error {
|
|
886
|
+
constructor(id) {
|
|
887
|
+
super(`MCP server '${id}' is already registered`);
|
|
888
|
+
this.id = id;
|
|
889
|
+
this.name = "McpServerAlreadyRegisteredError";
|
|
890
|
+
}
|
|
891
|
+
id;
|
|
892
|
+
};
|
|
885
893
|
function resolveRecordSecrets(record, secrets) {
|
|
886
894
|
if (!secrets) return record;
|
|
887
895
|
const resolved = {};
|
|
@@ -1086,7 +1094,7 @@ var ExternalMcpManager = class {
|
|
|
1086
1094
|
*/
|
|
1087
1095
|
async addServer(decl) {
|
|
1088
1096
|
if (this.servers.some((s) => s.id === decl.id)) {
|
|
1089
|
-
throw new
|
|
1097
|
+
throw new McpServerAlreadyRegisteredError(decl.id);
|
|
1090
1098
|
}
|
|
1091
1099
|
const client = await this.connectWithReauth(decl);
|
|
1092
1100
|
const server = { id: decl.id, decl, client, toolNames: [] };
|
|
@@ -3040,7 +3048,57 @@ function buildMcpRuntimeHandlers(deps) {
|
|
|
3040
3048
|
} catch (err) {
|
|
3041
3049
|
deps.getPreMintedSecrets()?.unset("mcp", decl.id);
|
|
3042
3050
|
const message = err instanceof Error ? err.message : String(err);
|
|
3043
|
-
const code =
|
|
3051
|
+
const code = err instanceof McpServerAlreadyRegisteredError ? "mcp_already_registered" : "mcp_connect_failed";
|
|
3052
|
+
return { ok: false, code, message };
|
|
3053
|
+
}
|
|
3054
|
+
},
|
|
3055
|
+
attachInstance: async (input) => {
|
|
3056
|
+
if (input.kind !== "mcp-server") {
|
|
3057
|
+
return {
|
|
3058
|
+
ok: false,
|
|
3059
|
+
code: "unsupported_kind",
|
|
3060
|
+
message: `attach_instance supports mcp-server only; '${input.kind}' is not yet supported`
|
|
3061
|
+
};
|
|
3062
|
+
}
|
|
3063
|
+
if (!input.name) {
|
|
3064
|
+
return { ok: false, code: "invalid_input", message: "name is required" };
|
|
3065
|
+
}
|
|
3066
|
+
if (input.name.includes("/") || input.name.includes("\\") || input.name.includes("..")) {
|
|
3067
|
+
return {
|
|
3068
|
+
ok: false,
|
|
3069
|
+
code: "invalid_input",
|
|
3070
|
+
message: "name must not contain path separators or traversal segments"
|
|
3071
|
+
};
|
|
3072
|
+
}
|
|
3073
|
+
if (!deps.getProjectDir) {
|
|
3074
|
+
return { ok: false, code: "no_project_dir", message: "getProjectDir not configured" };
|
|
3075
|
+
}
|
|
3076
|
+
const subDir = join(deps.getProjectDir(), ".skaile/assets/mcp-server", input.name);
|
|
3077
|
+
const decl = deriveSingleMaterializedMcpDeclaration(subDir, input.name);
|
|
3078
|
+
if (!decl) {
|
|
3079
|
+
return {
|
|
3080
|
+
ok: false,
|
|
3081
|
+
code: "not_materialized",
|
|
3082
|
+
message: `no materialized mcp-server at ${subDir}`
|
|
3083
|
+
};
|
|
3084
|
+
}
|
|
3085
|
+
const mgr = deps.getOrCreateMcpManager();
|
|
3086
|
+
if (!mgr) return { ok: false, code: "no_session", message: "session resources not ready" };
|
|
3087
|
+
try {
|
|
3088
|
+
const { toolNames } = await mgr.addServer(decl);
|
|
3089
|
+
deps.emitResourcesAvailable();
|
|
3090
|
+
deps.log(
|
|
3091
|
+
`[mcp-runtime] runner.attach_instance connected ${decl.id} (${toolNames.length} tools)`
|
|
3092
|
+
);
|
|
3093
|
+
return {
|
|
3094
|
+
ok: true,
|
|
3095
|
+
id: decl.id,
|
|
3096
|
+
live: deps.driverPicksUpToolsLive(),
|
|
3097
|
+
toolCount: toolNames.length
|
|
3098
|
+
};
|
|
3099
|
+
} catch (err) {
|
|
3100
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
3101
|
+
const code = err instanceof McpServerAlreadyRegisteredError ? "mcp_already_registered" : "mcp_connect_failed";
|
|
3044
3102
|
return { ok: false, code, message };
|
|
3045
3103
|
}
|
|
3046
3104
|
}
|
|
@@ -3141,6 +3199,10 @@ var addMcpServerInputSchema = z5.strictObject({
|
|
|
3141
3199
|
declaration: requiredUnknown,
|
|
3142
3200
|
preMintedToken: preMintedTokenSchema
|
|
3143
3201
|
});
|
|
3202
|
+
var attachInstanceInputSchema = z5.strictObject({
|
|
3203
|
+
kind: z5.string(),
|
|
3204
|
+
name: z5.string()
|
|
3205
|
+
});
|
|
3144
3206
|
var removeResourceInput = z5.strictObject({
|
|
3145
3207
|
id: z5.string()
|
|
3146
3208
|
});
|
|
@@ -3219,6 +3281,20 @@ function buildRunnerCapabilities(handlers) {
|
|
|
3219
3281
|
});
|
|
3220
3282
|
}
|
|
3221
3283
|
}),
|
|
3284
|
+
defineCapability({
|
|
3285
|
+
name: "runner.attach_instance",
|
|
3286
|
+
displayName: "Attach instance",
|
|
3287
|
+
description: "Materialize-then-attach-by-ref: the platform writes the asset to .skaile/assets/ then invokes this cap; the runner self-derives the declaration from disk and attaches it live.",
|
|
3288
|
+
side: "agent",
|
|
3289
|
+
origin: RUNNER_CAP_ORIGIN,
|
|
3290
|
+
audience: ["runtime"],
|
|
3291
|
+
kind: "effect",
|
|
3292
|
+
input: attachInstanceInputSchema,
|
|
3293
|
+
handler: async (input) => {
|
|
3294
|
+
if (!handlers.attachInstance) return notImplemented("runner.attach_instance");
|
|
3295
|
+
return handlers.attachInstance({ kind: input.kind, name: input.name });
|
|
3296
|
+
}
|
|
3297
|
+
}),
|
|
3222
3298
|
defineCapability({
|
|
3223
3299
|
name: "runner.remove_resource",
|
|
3224
3300
|
displayName: "Remove resource",
|
|
@@ -4294,14 +4370,15 @@ async function startAgentServer(opts) {
|
|
|
4294
4370
|
emitResourcesAvailable,
|
|
4295
4371
|
log
|
|
4296
4372
|
}),
|
|
4297
|
-
// runner.add_mcp_server — wired to the live
|
|
4298
|
-
// ExternalMcpManager + PreMintedSecretProvider.
|
|
4373
|
+
// runner.add_mcp_server + runner.attach_instance — wired to the live
|
|
4374
|
+
// session's lazily-created ExternalMcpManager + PreMintedSecretProvider.
|
|
4299
4375
|
...buildMcpRuntimeHandlers({
|
|
4300
4376
|
getOrCreateMcpManager: () => agentSession?.getOrCreateExternalMcpManager() ?? null,
|
|
4301
4377
|
getPreMintedSecrets: () => preMintedSecrets ?? null,
|
|
4302
4378
|
driverPicksUpToolsLive,
|
|
4303
4379
|
emitResourcesAvailable,
|
|
4304
|
-
log
|
|
4380
|
+
log,
|
|
4381
|
+
getProjectDir: () => opts.projectDir
|
|
4305
4382
|
}),
|
|
4306
4383
|
// setLogLevel left undefined (the cap self-falls-back to getLogStore);
|
|
4307
4384
|
// setState remains a stub (not resource hot-plug).
|
|
@@ -5195,5 +5272,5 @@ function touchSession(state) {
|
|
|
5195
5272
|
}
|
|
5196
5273
|
|
|
5197
5274
|
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 };
|
|
5198
|
-
//# sourceMappingURL=chunk-
|
|
5199
|
-
//# sourceMappingURL=chunk-
|
|
5275
|
+
//# sourceMappingURL=chunk-DAEYSPOC.js.map
|
|
5276
|
+
//# sourceMappingURL=chunk-DAEYSPOC.js.map
|