@skaile/workspaces 5.0.0 → 5.1.1
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 +20 -0
- package/dist/{asset-feeds-HIWT4DVT.js → asset-feeds-TU5CS6QL.js} +10 -17
- package/dist/asset-feeds-TU5CS6QL.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +5 -5
- package/dist/asset-manager/index.js +8 -8
- package/dist/asset-manager/installer.js +6 -6
- package/dist/asset-manager/src/index.d.ts +2 -1
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +7 -7
- package/dist/bridge/drivers/codex.js +7 -7
- package/dist/bridge/drivers/continue.js +8 -8
- package/dist/bridge/drivers/echo.js +1 -1
- package/dist/bridge/drivers/gemini.js +5 -5
- package/dist/bridge/drivers/goose.js +8 -8
- package/dist/bridge/drivers/omp.js +2 -2
- package/dist/bridge/drivers/opencode.js +8 -8
- package/dist/bridge/drivers/qwen.js +5 -5
- package/dist/bridge/index.js +8 -8
- package/dist/{chunk-GFPG27HK.js → chunk-2EOPGGLY.js} +6 -6
- package/dist/{chunk-GFPG27HK.js.map → chunk-2EOPGGLY.js.map} +1 -1
- package/dist/{chunk-WOJ4AK3Q.js → chunk-2Y6DSR36.js} +5 -4
- package/dist/chunk-2Y6DSR36.js.map +1 -0
- package/dist/{chunk-I7Z4FN52.js → chunk-3KSAFYD4.js} +9 -5
- package/dist/chunk-3KSAFYD4.js.map +1 -0
- package/dist/{chunk-32DMH2GD.js → chunk-3NGPZC44.js} +10 -10
- package/dist/chunk-3NGPZC44.js.map +1 -0
- package/dist/{chunk-YOWFUJO7.js → chunk-57DVX53V.js} +84 -20
- package/dist/chunk-57DVX53V.js.map +1 -0
- package/dist/{chunk-LHFZTVIM.js → chunk-6LDUA57J.js} +9 -9
- package/dist/chunk-6LDUA57J.js.map +1 -0
- package/dist/{chunk-7QMRP6BC.js → chunk-AGWYBS2E.js} +6 -6
- package/dist/{chunk-7QMRP6BC.js.map → chunk-AGWYBS2E.js.map} +1 -1
- package/dist/{chunk-35G4M33T.js → chunk-AOMWF2OE.js} +4 -4
- package/dist/chunk-AOMWF2OE.js.map +1 -0
- package/dist/{chunk-RSHMAEK3.js → chunk-AYNPGPT5.js} +5 -5
- package/dist/{chunk-RSHMAEK3.js.map → chunk-AYNPGPT5.js.map} +1 -1
- package/dist/{chunk-CFL5IJHV.js → chunk-CI6FQ654.js} +3 -3
- package/dist/{chunk-CFL5IJHV.js.map → chunk-CI6FQ654.js.map} +1 -1
- package/dist/{chunk-MX7IRKTO.js → chunk-E3ZACBHD.js} +13 -16
- package/dist/chunk-E3ZACBHD.js.map +1 -0
- package/dist/{chunk-HD5K3BYW.js → chunk-E67J56FJ.js} +3 -3
- package/dist/{chunk-HD5K3BYW.js.map → chunk-E67J56FJ.js.map} +1 -1
- package/dist/{chunk-JFVEX4G5.js → chunk-EPHQWHOH.js} +6 -6
- package/dist/{chunk-JFVEX4G5.js.map → chunk-EPHQWHOH.js.map} +1 -1
- package/dist/chunk-F7JHP7JV.js +122 -0
- package/dist/chunk-F7JHP7JV.js.map +1 -0
- package/dist/{chunk-TVYLXZTT.js → chunk-G47EV3V6.js} +2 -2
- package/dist/{chunk-TVYLXZTT.js.map → chunk-G47EV3V6.js.map} +1 -1
- package/dist/{chunk-MBVNMPG7.js → chunk-IWCCZL7C.js} +17 -11
- package/dist/chunk-IWCCZL7C.js.map +1 -0
- package/dist/{chunk-I3ITSUWS.js → chunk-IYIIT4R3.js} +5 -5
- package/dist/{chunk-I3ITSUWS.js.map → chunk-IYIIT4R3.js.map} +1 -1
- package/dist/{chunk-XWLEXD34.js → chunk-KAYH6AXN.js} +3 -3
- package/dist/{chunk-XWLEXD34.js.map → chunk-KAYH6AXN.js.map} +1 -1
- package/dist/{chunk-HWE3FXF4.js → chunk-MXXKTQXJ.js} +3 -3
- package/dist/{chunk-HWE3FXF4.js.map → chunk-MXXKTQXJ.js.map} +1 -1
- package/dist/{chunk-IGXKUCLI.js → chunk-P5UQ56RA.js} +3 -3
- package/dist/{chunk-IGXKUCLI.js.map → chunk-P5UQ56RA.js.map} +1 -1
- package/dist/{chunk-53WMBXSL.js → chunk-QFZFZXQW.js} +118 -21
- package/dist/chunk-QFZFZXQW.js.map +1 -0
- package/dist/{chunk-RP4B4HVX.js → chunk-RDTHJSGY.js} +2 -2
- package/dist/{chunk-RP4B4HVX.js.map → chunk-RDTHJSGY.js.map} +1 -1
- package/dist/{chunk-PV4OBVA3.js → chunk-RNNUYFFD.js} +2 -2
- package/dist/{chunk-PV4OBVA3.js.map → chunk-RNNUYFFD.js.map} +1 -1
- package/dist/{chunk-X7MHVL4R.js → chunk-SP47UJKE.js} +28 -16
- package/dist/{chunk-X7MHVL4R.js.map → chunk-SP47UJKE.js.map} +1 -1
- package/dist/{chunk-EB4ZTESQ.js → chunk-TOSHZX4C.js} +8 -3
- package/dist/chunk-TOSHZX4C.js.map +1 -0
- package/dist/{chunk-KAJH3XPW.js → chunk-U6K3I3AX.js} +3 -3
- package/dist/{chunk-KAJH3XPW.js.map → chunk-U6K3I3AX.js.map} +1 -1
- package/dist/{chunk-22DN3DB2.js → chunk-UMSWQKCY.js} +3 -3
- package/dist/{chunk-22DN3DB2.js.map → chunk-UMSWQKCY.js.map} +1 -1
- package/dist/{chunk-H5G3OYY6.js → chunk-WKIOWDLQ.js} +3 -3
- package/dist/{chunk-H5G3OYY6.js.map → chunk-WKIOWDLQ.js.map} +1 -1
- package/dist/{chunk-ODT7HSLI.js → chunk-X6E7Y4JD.js} +10 -9
- package/dist/chunk-X6E7Y4JD.js.map +1 -0
- package/dist/chunk-XUQBVK4R.js +15 -0
- package/dist/chunk-XUQBVK4R.js.map +1 -0
- package/dist/{chunk-CGJ7B6MZ.js → chunk-YDJZRLGN.js} +3 -3
- package/dist/{chunk-CGJ7B6MZ.js.map → chunk-YDJZRLGN.js.map} +1 -1
- package/dist/{chunk-KREXWKVX.js → chunk-YIVB7GIP.js} +3 -3
- package/dist/{chunk-KREXWKVX.js.map → chunk-YIVB7GIP.js.map} +1 -1
- package/dist/{chunk-HTBGJCKP.js → chunk-YMOZC2D3.js} +4 -4
- package/dist/{chunk-HTBGJCKP.js.map → chunk-YMOZC2D3.js.map} +1 -1
- package/dist/cli/index.js +460 -479
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/asset-feeds.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/flow.d.ts +5 -5
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/publish-core.d.ts +10 -0
- package/dist/cli/src/commands/publish-core.d.ts.map +1 -1
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/commands/skailify-lib.d.ts +17 -0
- package/dist/cli/src/commands/skailify-lib.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/flow-discovery.d.ts +44 -1
- package/dist/cli/src/flow-discovery.d.ts.map +1 -1
- package/dist/cli/src/helpers.d.ts +6 -0
- package/dist/cli/src/helpers.d.ts.map +1 -1
- package/dist/cli/src/open-library.d.ts +11 -0
- package/dist/cli/src/open-library.d.ts.map +1 -1
- package/dist/connectors/config.js +3 -3
- package/dist/connectors/index.js +11 -11
- package/dist/connectors/src/connector-manager.d.ts +53 -3
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors/src/connector-prompt.d.ts +16 -2
- package/dist/connectors/src/connector-prompt.d.ts.map +1 -1
- package/dist/connectors/src/fleet-utils.d.ts +3 -4
- package/dist/connectors/src/fleet-utils.d.ts.map +1 -1
- package/dist/connectors/src/index.d.ts +3 -3
- package/dist/connectors/src/index.d.ts.map +1 -1
- package/dist/connectors-VX7YRFFS.js +45 -0
- package/dist/{connectors-T57XL7EA.js.map → connectors-VX7YRFFS.js.map} +1 -1
- package/dist/core/driver-targets.js +1 -1
- package/dist/core/index.js +5 -5
- package/dist/core/runtime-assets.js +3 -3
- package/dist/core/src/driver-targets.d.ts +10 -0
- package/dist/core/src/driver-targets.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +2 -2
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/settings.d.ts +13 -0
- package/dist/core/src/settings.d.ts.map +1 -1
- package/dist/core/store.js +2 -2
- package/dist/core/workspace-config.js +2 -2
- package/dist/deploy/index.js +5 -5
- package/dist/{ensure-sources-G4FXTJDB.js → ensure-sources-2XQS32WI.js} +11 -11
- package/dist/{ensure-sources-G4FXTJDB.js.map → ensure-sources-2XQS32WI.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +11 -11
- package/dist/factory-assets/connectors/deploy.js +11 -11
- package/dist/factory-assets/connectors/devserver.js +11 -11
- package/dist/factory-assets/connectors/flow/adapter.js +11 -11
- package/dist/factory-assets/connectors/flow/engine.js +6 -6
- package/dist/factory-assets/connectors/flow/run-flow.js +12 -12
- package/dist/factory-assets/connectors/flow.js +11 -11
- package/dist/factory-assets/connectors/git.js +11 -11
- package/dist/factory-assets/connectors/gmail.js +11 -11
- package/dist/factory-assets/connectors/googledrive.js +11 -11
- package/dist/factory-assets/connectors/local.js +11 -11
- package/dist/factory-assets/connectors/mattermost.js +11 -11
- package/dist/factory-assets/connectors/memory.js +11 -11
- package/dist/factory-assets/connectors/minio.js +11 -11
- package/dist/factory-assets/connectors/postgres.js +11 -11
- package/dist/factory-assets/connectors/s3.js +11 -11
- package/dist/factory-assets/connectors/sharepoint.js +11 -11
- package/dist/factory-assets/connectors/sqlite.js +11 -11
- package/dist/factory-assets/connectors/static-server.js +11 -11
- package/dist/factory-assets/connectors/tunnel.js +11 -11
- package/dist/factory-assets/connectors/webdav.js +11 -11
- package/dist/factory-assets/connectors/xstate-store.js +11 -11
- package/dist/factory-assets/connectors/xstate.js +11 -11
- package/dist/{flows-7E2GVW5L.js → flows-SVCCADGE.js} +8 -8
- package/dist/{flows-7E2GVW5L.js.map → flows-SVCCADGE.js.map} +1 -1
- package/dist/{helpers-EVPKJXGS.js → helpers-IELQGVGB.js} +11 -11
- package/dist/{helpers-EVPKJXGS.js.map → helpers-IELQGVGB.js.map} +1 -1
- package/dist/library/index.js +6 -6
- package/dist/library/src/local/local-catalog-source.d.ts +14 -1
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/{library-publish-SBEWWTPM.js → library-publish-TCFU3X5L.js} +27 -15
- package/dist/library-publish-TCFU3X5L.js.map +1 -0
- package/dist/{open-library-UAZIGZUQ.js → open-library-SSBN4FX2.js} +14 -13
- package/dist/{open-library-UAZIGZUQ.js.map → open-library-SSBN4FX2.js.map} +1 -1
- package/dist/open-registry-CHCWKV5W.js +32 -0
- package/dist/open-registry-CHCWKV5W.js.map +1 -0
- package/dist/{paths-U7TA7MTE.js → paths-MKSI52PF.js} +8 -8
- package/dist/{paths-U7TA7MTE.js.map → paths-MKSI52PF.js.map} +1 -1
- package/dist/{plugin-store-TT45MGQZ.js → plugin-store-SVYV7L4C.js} +7 -7
- package/dist/{plugin-store-TT45MGQZ.js.map → plugin-store-SVYV7L4C.js.map} +1 -1
- package/dist/{project-JLD5RCVK.js → project-PJ37PM6N.js} +12 -12
- package/dist/{project-JLD5RCVK.js.map → project-PJ37PM6N.js.map} +1 -1
- package/dist/resolver/index.js +5 -5
- package/dist/runner/index.js +17 -17
- package/dist/runner/src/external-mcp.d.ts +9 -1
- package/dist/runner/src/external-mcp.d.ts.map +1 -1
- package/dist/runner/src/fleet-health-flag-dispatcher.d.ts +14 -11
- package/dist/runner/src/fleet-health-flag-dispatcher.d.ts.map +1 -1
- package/dist/runner/src/late-mcp-rebuild.d.ts +39 -0
- package/dist/runner/src/late-mcp-rebuild.d.ts.map +1 -0
- package/dist/runner/src/resources.d.ts +8 -0
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts +7 -0
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +8 -8
- package/dist/sdk/bridge.js +8 -8
- package/dist/sdk/core.js +5 -5
- package/dist/sdk/flow.js +6 -6
- package/dist/sdk/index.js +17 -17
- package/dist/sdk/resolver.js +5 -5
- package/dist/sdk/runner.js +17 -17
- package/dist/{setup-PGZM4SOO.js → setup-JW2ZGCUG.js} +15 -15
- package/dist/{setup-PGZM4SOO.js.map → setup-JW2ZGCUG.js.map} +1 -1
- package/dist/{skills-7QVYPIXI.js → skills-7K2YO3KN.js} +7 -7
- package/dist/{skills-7QVYPIXI.js.map → skills-7K2YO3KN.js.map} +1 -1
- package/dist/{source-SDZYXVVV.js → source-F2VO32W6.js} +15 -14
- package/dist/{source-SDZYXVVV.js.map → source-F2VO32W6.js.map} +1 -1
- package/dist/{source-manifest-publish-UDLTYV6Y.js → source-manifest-publish-AXNII2J4.js} +17 -16
- package/dist/source-manifest-publish-AXNII2J4.js.map +1 -0
- package/dist/tui/index.js +17 -17
- package/dist/workspace-plugin/adapters/mcp.js +29 -8
- package/dist/workspace-plugin/adapters/omp.js +15 -15
- package/dist/workspace-plugin/adapters/omp.js.map +1 -1
- package/dist/workspace-plugin/index.js +1 -1
- package/dist/workspace-plugin/src/tools/connectors.d.ts +1 -1
- package/dist/workspace-plugin/src/tools/connectors.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/asset-feeds-HIWT4DVT.js.map +0 -1
- package/dist/chunk-32DMH2GD.js.map +0 -1
- package/dist/chunk-35G4M33T.js.map +0 -1
- package/dist/chunk-53WMBXSL.js.map +0 -1
- package/dist/chunk-EB4ZTESQ.js.map +0 -1
- package/dist/chunk-I7Z4FN52.js.map +0 -1
- package/dist/chunk-LHFZTVIM.js.map +0 -1
- package/dist/chunk-MBVNMPG7.js.map +0 -1
- package/dist/chunk-MX7IRKTO.js.map +0 -1
- package/dist/chunk-ODT7HSLI.js.map +0 -1
- package/dist/chunk-WOJ4AK3Q.js.map +0 -1
- package/dist/chunk-YOWFUJO7.js.map +0 -1
- package/dist/connectors-T57XL7EA.js +0 -5
- package/dist/library-publish-SBEWWTPM.js.map +0 -1
- package/dist/source-manifest-publish-UDLTYV6Y.js.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { WorkspacePlugin } from './chunk-
|
|
2
|
-
import { buildWorkspaceToolDefs } from './chunk-
|
|
1
|
+
import { WorkspacePlugin } from './chunk-G47EV3V6.js';
|
|
2
|
+
import { buildWorkspaceToolDefs } from './chunk-AYNPGPT5.js';
|
|
3
3
|
import { findAiAssetsRoot } from './chunk-TYUJB336.js';
|
|
4
4
|
import { WebSocketServerTransport } from './chunk-5LKOAX7I.js';
|
|
5
5
|
import { assembleSystemPrompt, buildCapabilitiesPromptSection } from './chunk-W3UDISS2.js';
|
|
6
6
|
import { prepareNativePolicy, codexInstanceEnvironment, parseCodexCredential, parseCodexRefreshInput, parseCodexRefreshResult } from './chunk-HCYS7GFP.js';
|
|
7
|
-
import { resolveFlowPath } from './chunk-
|
|
7
|
+
import { resolveFlowPath } from './chunk-2EOPGGLY.js';
|
|
8
8
|
import { findAiAssetsRoot as findAiAssetsRoot$1, deployCatalogEntry, undeployCatalogEntry } from './chunk-VDJKWKH2.js';
|
|
9
|
-
import { ConnectFailureCarryOver, registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, buildFlowToolDefs, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, driveOrchestratorTurn, buildSdkFlowTools } from './chunk-
|
|
10
|
-
import { loadYamlConnectorDeclarations, withMaterializedConnectorDeclarations, SecretProviderChain, ConnectorStartupError, isKnownSecretRef, EnvSecretProvider, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, deriveSingleMaterializedConnectorDeclaration } from './chunk-
|
|
11
|
-
import { EventNormalizer } from './chunk-
|
|
9
|
+
import { ConnectFailureCarryOver, registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, buildFlowToolDefs, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, driveOrchestratorTurn, buildSdkFlowTools } from './chunk-QFZFZXQW.js';
|
|
10
|
+
import { loadYamlConnectorDeclarations, withMaterializedConnectorDeclarations, SecretProviderChain, ConnectorStartupError, isKnownSecretRef, EnvSecretProvider, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, deriveSingleMaterializedConnectorDeclaration } from './chunk-WKIOWDLQ.js';
|
|
11
|
+
import { EventNormalizer } from './chunk-YIVB7GIP.js';
|
|
12
12
|
import { probeResumeTranscript, transcriptStoreForRuntime } from './chunk-TVOODIZE.js';
|
|
13
13
|
import { scopeReconfigureModel } from './chunk-EINLFFP6.js';
|
|
14
14
|
import { CodexNativeStateUnavailable } from './chunk-LOO5CB5M.js';
|
|
15
15
|
import { dispatchCapability } from './chunk-RDYI4MML.js';
|
|
16
16
|
import { classifyClaudeSdkError } from './chunk-XBSQ4KMC.js';
|
|
17
17
|
import { agentExecRequested } from './chunk-YROR332M.js';
|
|
18
|
-
import { toAgentEffort, createDriver, catalogLayer, providerCredentialEnvName, toMergedRegistry, registryCredentialEnv, AI_PROVIDER_PRESETS, AgentDriver } from './chunk-
|
|
19
|
-
import { loadFlow } from './chunk-
|
|
18
|
+
import { toAgentEffort, createDriver, catalogLayer, providerCredentialEnvName, toMergedRegistry, registryCredentialEnv, AI_PROVIDER_PRESETS, AgentDriver } from './chunk-RDTHJSGY.js';
|
|
19
|
+
import { loadFlow } from './chunk-UMSWQKCY.js';
|
|
20
20
|
import { parseFlowDefinition } from './chunk-QZLWJETK.js';
|
|
21
21
|
import { renderStimulusPrompt } from './chunk-XUUYAS3Z.js';
|
|
22
22
|
import { withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PROTOCOL_VERSION } from './chunk-IDEA6CYI.js';
|
|
23
|
-
import { resolveLibraryDir, resolveSettings, loadProviderRegistry } from './chunk-
|
|
24
|
-
import { resolveRuntimeAssets } from './chunk-
|
|
23
|
+
import { resolveLibraryDir, resolveSettings, loadProviderRegistry } from './chunk-IWCCZL7C.js';
|
|
24
|
+
import { resolveRuntimeAssets } from './chunk-YDJZRLGN.js';
|
|
25
25
|
import { resolveDriverPaths } from './chunk-K5GBV4SA.js';
|
|
26
|
-
import { resolveSkWorkspaceConfig, resolveAgentDir, loadMcpServerDeclarations, COMPACTION_DEFAULTS, resolveCompactionThresholdPercent, validateAssetRecipeAttr, deriveSingleMaterializedMcpDeclaration, stageMaterializedSkills, readSkillAllowList, isStagedSkillMarkerFor, unstageSkill, STAGED_SKILL_MARKER } from './chunk-
|
|
26
|
+
import { resolveSkWorkspaceConfig, resolveAgentDir, loadMcpServerDeclarations, COMPACTION_DEFAULTS, resolveCompactionThresholdPercent, validateAssetRecipeAttr, deriveSingleMaterializedMcpDeclaration, stageMaterializedSkills, readSkillAllowList, isStagedSkillMarkerFor, unstageSkill, STAGED_SKILL_MARKER } from './chunk-MXXKTQXJ.js';
|
|
27
27
|
import { globalSkaileDir } from './chunk-TLKM4M47.js';
|
|
28
28
|
import { withFsDeadline, FsDeadlineError, fsDeadlineMs, parseFrontmatter, tryWithFsDeadline } from './chunk-DXUQCMVT.js';
|
|
29
29
|
import { parseAssetRef } from './chunk-43ZBF3WH.js';
|
|
@@ -1828,13 +1828,14 @@ var RESERVED_MCP_SERVER_IDS = /* @__PURE__ */ new Set([
|
|
|
1828
1828
|
"skaile-workspace",
|
|
1829
1829
|
"skaile-capabilities"
|
|
1830
1830
|
]);
|
|
1831
|
-
async function resolveExternalMcpDeclarations(projectDir, sessionId, managedCodex = false) {
|
|
1831
|
+
async function resolveExternalMcpDeclarations(projectDir, sessionId, managedCodex = false, loadedIds) {
|
|
1832
1832
|
const mcpLog = createLogger({
|
|
1833
1833
|
kind: "mcp",
|
|
1834
1834
|
subkind: "wiring",
|
|
1835
1835
|
instance: sessionId ?? "no-session"
|
|
1836
1836
|
});
|
|
1837
1837
|
const mcpDeclarations = await loadMcpServerDeclarations(projectDir);
|
|
1838
|
+
for (const decl of mcpDeclarations) loadedIds?.add(decl.id);
|
|
1838
1839
|
if (managedCodex && mcpDeclarations.length > 0)
|
|
1839
1840
|
throw new Error("CODEX_MANAGED_PROJECT_MCP_UNSUPPORTED");
|
|
1840
1841
|
mcpLog.debug("loaded MCP declarations", { count: mcpDeclarations.length });
|
|
@@ -1867,6 +1868,10 @@ async function resolveExternalMcpDeclarations(projectDir, sessionId, managedCode
|
|
|
1867
1868
|
env: substituteWorkspaceTokenMap(decl.env, projectDir)
|
|
1868
1869
|
}));
|
|
1869
1870
|
}
|
|
1871
|
+
async function findUnknownMcpDeclarationIds(projectDir, known) {
|
|
1872
|
+
const declared = await loadMcpServerDeclarations(projectDir);
|
|
1873
|
+
return declared.map((decl) => decl.id).filter((id) => !RESERVED_MCP_SERVER_IDS.has(id) && !known.has(id));
|
|
1874
|
+
}
|
|
1870
1875
|
async function resolveRecipeDeclaration(decl, nixFlakeRef, recipeCache) {
|
|
1871
1876
|
const recipe = decl.recipe;
|
|
1872
1877
|
const recipeLogKey = recipe.flake ? { flake: recipe.flake } : { attr: recipe.attr };
|
|
@@ -2345,7 +2350,8 @@ async function buildAgentResources(projectDir, driverType, _onLog, watch, secret
|
|
|
2345
2350
|
throw new Error("external MCP manager unavailable \u2014 no capability registry (CLI/flow mode)");
|
|
2346
2351
|
},
|
|
2347
2352
|
getExternalMcpManager: () => null,
|
|
2348
|
-
mcpPromptSection: ""
|
|
2353
|
+
mcpPromptSection: "",
|
|
2354
|
+
unloadedMcpDeclarationIds: async () => []
|
|
2349
2355
|
};
|
|
2350
2356
|
try {
|
|
2351
2357
|
registerBuiltinConnectors();
|
|
@@ -2388,6 +2394,7 @@ async function buildAgentResources(projectDir, driverType, _onLog, watch, secret
|
|
|
2388
2394
|
let workspacePluginToShutdown = null;
|
|
2389
2395
|
let externalMcpManager = null;
|
|
2390
2396
|
let externalMcpDeclarations;
|
|
2397
|
+
const loadedMcpIds = /* @__PURE__ */ new Set();
|
|
2391
2398
|
const mcpSecretChain = preMintedSecrets ? new SecretProviderChain(
|
|
2392
2399
|
[preMintedSecrets, secretProvider].filter(
|
|
2393
2400
|
Boolean
|
|
@@ -2420,9 +2427,15 @@ async function buildAgentResources(projectDir, driverType, _onLog, watch, secret
|
|
|
2420
2427
|
}
|
|
2421
2428
|
if (capabilityRegistry) {
|
|
2422
2429
|
externalMcpDeclarations = mergeExtraMcpDeclarations(
|
|
2423
|
-
managedProjectMcp ?? await resolveExternalMcpDeclarations(
|
|
2430
|
+
managedProjectMcp ?? await resolveExternalMcpDeclarations(
|
|
2431
|
+
projectDir,
|
|
2432
|
+
sessionMeta?.sessionId,
|
|
2433
|
+
false,
|
|
2434
|
+
loadedMcpIds
|
|
2435
|
+
),
|
|
2424
2436
|
extraMcpDeclarations
|
|
2425
2437
|
);
|
|
2438
|
+
for (const decl of externalMcpDeclarations) loadedMcpIds.add(decl.id);
|
|
2426
2439
|
externalMcpManager = await startExternalMcpServers(
|
|
2427
2440
|
capabilityRegistry,
|
|
2428
2441
|
externalMcpDeclarations,
|
|
@@ -2499,7 +2512,13 @@ async function buildAgentResources(projectDir, driverType, _onLog, watch, secret
|
|
|
2499
2512
|
startWatching,
|
|
2500
2513
|
getOrCreateExternalMcpManager,
|
|
2501
2514
|
getExternalMcpManager: () => externalMcpManager,
|
|
2502
|
-
mcpPromptSection
|
|
2515
|
+
mcpPromptSection,
|
|
2516
|
+
unloadedMcpDeclarationIds: async () => {
|
|
2517
|
+
if (!capabilityRegistry || sessionMeta?.managedCodex) return [];
|
|
2518
|
+
const known = new Set(loadedMcpIds);
|
|
2519
|
+
for (const server of externalMcpManager?.listServers() ?? []) known.add(server.id);
|
|
2520
|
+
return findUnknownMcpDeclarationIds(projectDir, known);
|
|
2521
|
+
}
|
|
2503
2522
|
};
|
|
2504
2523
|
} catch {
|
|
2505
2524
|
return noopResult;
|
|
@@ -2759,7 +2778,8 @@ async function createAgentSession(config) {
|
|
|
2759
2778
|
startWatching,
|
|
2760
2779
|
getOrCreateExternalMcpManager,
|
|
2761
2780
|
getExternalMcpManager,
|
|
2762
|
-
mcpPromptSection
|
|
2781
|
+
mcpPromptSection,
|
|
2782
|
+
unloadedMcpDeclarationIds
|
|
2763
2783
|
} = await buildAgentResources(
|
|
2764
2784
|
projectDir,
|
|
2765
2785
|
driverType,
|
|
@@ -2895,6 +2915,8 @@ async function createAgentSession(config) {
|
|
|
2895
2915
|
startWatching,
|
|
2896
2916
|
getOrCreateExternalMcpManager,
|
|
2897
2917
|
getExternalMcpManager,
|
|
2918
|
+
unloadedMcpDeclarationIds,
|
|
2919
|
+
resumeSessionId,
|
|
2898
2920
|
telemetry,
|
|
2899
2921
|
systemPromptSections
|
|
2900
2922
|
};
|
|
@@ -6519,6 +6541,28 @@ function rewriteFileChangedPath(event, cwd, mounts) {
|
|
|
6519
6541
|
return event;
|
|
6520
6542
|
}
|
|
6521
6543
|
|
|
6544
|
+
// runner/src/late-mcp-rebuild.ts
|
|
6545
|
+
async function rebuildForLateMcpDeclarations(deps) {
|
|
6546
|
+
if (deps.driverStarted()) return false;
|
|
6547
|
+
let late;
|
|
6548
|
+
try {
|
|
6549
|
+
late = await deps.unloadedMcpDeclarationIds();
|
|
6550
|
+
} catch (err) {
|
|
6551
|
+
deps.warn(
|
|
6552
|
+
`[serve] late MCP declaration check failed (non-fatal): ${err instanceof Error ? err.message : String(err)}`
|
|
6553
|
+
);
|
|
6554
|
+
return false;
|
|
6555
|
+
}
|
|
6556
|
+
if (late.length === 0) return false;
|
|
6557
|
+
return deps.recreate(() => {
|
|
6558
|
+
if (deps.driverStarted()) return null;
|
|
6559
|
+
deps.log(
|
|
6560
|
+
`[serve] rebuilding the session before the first turn for MCP server(s) declared after the build: ${late.join(", ")}`
|
|
6561
|
+
);
|
|
6562
|
+
return { resumeSessionId: deps.resumeSessionId() };
|
|
6563
|
+
});
|
|
6564
|
+
}
|
|
6565
|
+
|
|
6522
6566
|
// runner/src/process-safety-net.ts
|
|
6523
6567
|
var BROKEN_PIPE_EXIT_CODE = 141;
|
|
6524
6568
|
function resolveOptions(opts) {
|
|
@@ -6612,11 +6656,16 @@ function parseFleetHealthBody(body) {
|
|
|
6612
6656
|
async function dispatchFleetHealthFlag(dir, fileName, manager, log) {
|
|
6613
6657
|
if (!manager) return;
|
|
6614
6658
|
const connectorId = fileName;
|
|
6615
|
-
if (!connectorId || connectorId.startsWith(".")) return;
|
|
6659
|
+
if (!connectorId || connectorId.startsWith(".") || connectorId.endsWith(".tmp")) return;
|
|
6616
6660
|
let verdict;
|
|
6617
6661
|
try {
|
|
6618
6662
|
verdict = parseFleetHealthBody(await readFile(join(dir, connectorId), "utf8"));
|
|
6619
|
-
} catch {
|
|
6663
|
+
} catch (err) {
|
|
6664
|
+
if (err.code === "ENOENT" && manager.clearFleetHealth) {
|
|
6665
|
+
manager.clearFleetHealth(connectorId);
|
|
6666
|
+
log.debug("fleet-health flag removed", { connectorId });
|
|
6667
|
+
return;
|
|
6668
|
+
}
|
|
6620
6669
|
verdict = "error";
|
|
6621
6670
|
}
|
|
6622
6671
|
try {
|
|
@@ -11226,6 +11275,21 @@ async function startAgentServer(opts) {
|
|
|
11226
11275
|
await driverSwapGate.awaitSwap();
|
|
11227
11276
|
if (!await awaitCompactionIdle("prompt")) return;
|
|
11228
11277
|
await restageMaterializedSkills(true);
|
|
11278
|
+
try {
|
|
11279
|
+
await rebuildForLateMcpDeclarations({
|
|
11280
|
+
driverStarted: () => driverStarted,
|
|
11281
|
+
unloadedMcpDeclarationIds: () => agentSession.unloadedMcpDeclarationIds(),
|
|
11282
|
+
resumeSessionId: () => agentSession.resumeSessionId,
|
|
11283
|
+
recreate: (overrides) => recreateAgentSession(overrides),
|
|
11284
|
+
log,
|
|
11285
|
+
warn: (line) => serverLog.warn(line)
|
|
11286
|
+
});
|
|
11287
|
+
} catch (err) {
|
|
11288
|
+
const errMsg = err instanceof Error ? err.message : String(err);
|
|
11289
|
+
serverLog.warn(`[serve] session rebuild for late MCP servers failed: ${errMsg}`);
|
|
11290
|
+
sendEvent({ type: "error", message: `Session rebuild failed: ${errMsg}`, fatal: true });
|
|
11291
|
+
return;
|
|
11292
|
+
}
|
|
11229
11293
|
const activeFlow = pickChatFlowTarget(activeFlows.values());
|
|
11230
11294
|
if (activeFlow) {
|
|
11231
11295
|
leaveQueue();
|
|
@@ -11931,5 +11995,5 @@ function touchSession(state) {
|
|
|
11931
11995
|
}
|
|
11932
11996
|
|
|
11933
11997
|
export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CONNECTOR_MUTATE_NOT_READY, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_READ_MAX_CHUNK_BYTES, MOUNT_STAT_BUDGET_MS, MOUNT_STAT_MAX_ENTRIES, MOUNT_TREE_OP_DEADLINE_FACTOR, MOUNT_WRITE_MAX_CHUNK_BYTES, MarkdownStreamer, PreInitRingSink, ResourceOperationError, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, WRITE_RANGE_PARTIAL_TTL_MS, WS_AUTH_TOKEN_ENV, WS_AUTH_TOKEN_FILE_ENV, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, capabilitySignatureInputs, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, computeDirectoryTotals, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createManagedCodexSubpromptDriver, createSessionStimulusBus, defineCapability, deleteSession, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, driverActiveAfterTurnEnd, emitSystemPromptComposed, ensureClaudeSettingsDisablesConnectors, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, flowRunDrivesTurns, flowStartNeedsDriverRestart, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, handleSessionRootResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isSessionRootPathAllowed, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadManagedCodexHostConfig, loadSession, loadSessionById, mcpAuthSecretKey, newSession, nulTailPaddingLength, pickChatFlowTarget, pickFlowToolTarget, pickRepointedManager, planFlowMutate, prepareCodexTools, reconcilePendingDecisions, reconnectedRunNeedsAgentTurn, recreateKeepingLiveFlows, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, rejectPendingCapabilityCallsOnDisconnect, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, restoredRunHasWorkToResume, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, supportsLiveToolUpdates, takeRunnerWsAuthToken, toActiveFlowTarget, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile, writeRangeChunk, writeRangePartialPath };
|
|
11934
|
-
//# sourceMappingURL=chunk-
|
|
11935
|
-
//# sourceMappingURL=chunk-
|
|
11998
|
+
//# sourceMappingURL=chunk-57DVX53V.js.map
|
|
11999
|
+
//# sourceMappingURL=chunk-57DVX53V.js.map
|