@skaile/workspaces 4.30.1 → 4.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.
- package/CHANGELOG.md +18 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-YB5ROSAE.js → asset-feeds-TOJQTJYS.js} +7 -7
- package/dist/{asset-feeds-YB5ROSAE.js.map → asset-feeds-TOJQTJYS.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +3 -3
- package/dist/asset-manager/index.js +6 -6
- package/dist/asset-manager/installer.js +4 -4
- package/dist/bridge/drivers/claude-sdk.js +9 -9
- package/dist/bridge/drivers/codex.js +6 -6
- package/dist/bridge/drivers/continue.js +6 -6
- package/dist/bridge/drivers/echo.js +5 -5
- package/dist/bridge/drivers/gemini.js +7 -7
- package/dist/bridge/drivers/goose.js +6 -6
- package/dist/bridge/drivers/omp.js +7 -7
- package/dist/bridge/drivers/opencode.js +6 -6
- package/dist/bridge/drivers/qwen.js +7 -7
- package/dist/bridge/index.js +10 -10
- package/dist/{chunk-NQCQTAMQ.js → chunk-223FKFTC.js} +9 -9
- package/dist/{chunk-NQCQTAMQ.js.map → chunk-223FKFTC.js.map} +1 -1
- package/dist/{chunk-MX7LCQUQ.js → chunk-34ZVTPDV.js} +4 -4
- package/dist/chunk-34ZVTPDV.js.map +1 -0
- package/dist/{chunk-UKIL4XH5.js → chunk-3DZGPJU5.js} +4 -4
- package/dist/{chunk-UKIL4XH5.js.map → chunk-3DZGPJU5.js.map} +1 -1
- package/dist/{chunk-DDCRSE5P.js → chunk-3GMRVUDA.js} +7 -7
- package/dist/{chunk-DDCRSE5P.js.map → chunk-3GMRVUDA.js.map} +1 -1
- package/dist/{chunk-IJTEDXWQ.js → chunk-3ZE7X5Y6.js} +3 -3
- package/dist/{chunk-IJTEDXWQ.js.map → chunk-3ZE7X5Y6.js.map} +1 -1
- package/dist/{chunk-UQ3JFN4N.js → chunk-54A5QAIV.js} +2 -2
- package/dist/{chunk-UQ3JFN4N.js.map → chunk-54A5QAIV.js.map} +1 -1
- package/dist/{chunk-UFWADBG6.js → chunk-BR2IXOWX.js} +3 -3
- package/dist/{chunk-UFWADBG6.js.map → chunk-BR2IXOWX.js.map} +1 -1
- package/dist/{chunk-RXTKWTZV.js → chunk-BU53MUL5.js} +4 -4
- package/dist/{chunk-RXTKWTZV.js.map → chunk-BU53MUL5.js.map} +1 -1
- package/dist/{chunk-L2GKM47Q.js → chunk-CYESHAXV.js} +7 -7
- package/dist/{chunk-L2GKM47Q.js.map → chunk-CYESHAXV.js.map} +1 -1
- package/dist/{chunk-VYNIZDAD.js → chunk-DMNYWLED.js} +3 -3
- package/dist/{chunk-VYNIZDAD.js.map → chunk-DMNYWLED.js.map} +1 -1
- package/dist/{chunk-LUC6OEWM.js → chunk-E2IZD74W.js} +5 -5
- package/dist/{chunk-LUC6OEWM.js.map → chunk-E2IZD74W.js.map} +1 -1
- package/dist/{chunk-TJRNJVGU.js → chunk-EINLFFP6.js} +3 -3
- package/dist/{chunk-TJRNJVGU.js.map → chunk-EINLFFP6.js.map} +1 -1
- package/dist/{chunk-7VQGUNXJ.js → chunk-G3N2ZCOJ.js} +5 -5
- package/dist/{chunk-7VQGUNXJ.js.map → chunk-G3N2ZCOJ.js.map} +1 -1
- package/dist/{chunk-PE3A6FFW.js → chunk-HCYS7GFP.js} +3 -3
- package/dist/{chunk-PE3A6FFW.js.map → chunk-HCYS7GFP.js.map} +1 -1
- package/dist/{chunk-XFWB3KFV.js → chunk-HL6SZ7Z3.js} +3 -3
- package/dist/{chunk-XFWB3KFV.js.map → chunk-HL6SZ7Z3.js.map} +1 -1
- package/dist/{chunk-DPLIN2RA.js → chunk-ICSCSM5D.js} +3 -3
- package/dist/{chunk-DPLIN2RA.js.map → chunk-ICSCSM5D.js.map} +1 -1
- package/dist/{chunk-ECTQR7IM.js → chunk-IT7ZHRCK.js} +8 -8
- package/dist/{chunk-ECTQR7IM.js.map → chunk-IT7ZHRCK.js.map} +1 -1
- package/dist/{chunk-NP3WH7JF.js → chunk-IXGNQP7Z.js} +3 -3
- package/dist/{chunk-NP3WH7JF.js.map → chunk-IXGNQP7Z.js.map} +1 -1
- package/dist/{chunk-YVWUHPQW.js → chunk-JULFGNQN.js} +3 -3
- package/dist/{chunk-YVWUHPQW.js.map → chunk-JULFGNQN.js.map} +1 -1
- package/dist/{chunk-ZVVZ67EH.js → chunk-JYWEWJ46.js} +2 -2
- package/dist/{chunk-ZVVZ67EH.js.map → chunk-JYWEWJ46.js.map} +1 -1
- package/dist/{chunk-6S5KL76M.js → chunk-LX3FKVLL.js} +3 -3
- package/dist/{chunk-6S5KL76M.js.map → chunk-LX3FKVLL.js.map} +1 -1
- package/dist/{chunk-GZZPKAV5.js → chunk-MJHSLODD.js} +20 -3
- package/dist/chunk-MJHSLODD.js.map +1 -0
- package/dist/{chunk-FRX2BO3V.js → chunk-MJUDVEFN.js} +288 -37
- package/dist/chunk-MJUDVEFN.js.map +1 -0
- package/dist/{chunk-PM6DO25W.js → chunk-MNA22VPT.js} +4 -4
- package/dist/{chunk-PM6DO25W.js.map → chunk-MNA22VPT.js.map} +1 -1
- package/dist/{chunk-FAQRNZ44.js → chunk-MVSF6AB4.js} +4 -4
- package/dist/{chunk-FAQRNZ44.js.map → chunk-MVSF6AB4.js.map} +1 -1
- package/dist/{chunk-3AX5PZRA.js → chunk-NJVXDRQY.js} +3 -3
- package/dist/{chunk-3AX5PZRA.js.map → chunk-NJVXDRQY.js.map} +1 -1
- package/dist/{chunk-7HJ3YLRF.js → chunk-SMZT7QMT.js} +5 -5
- package/dist/{chunk-7HJ3YLRF.js.map → chunk-SMZT7QMT.js.map} +1 -1
- package/dist/{chunk-2ICKARYU.js → chunk-TGLCW25T.js} +4 -4
- package/dist/{chunk-2ICKARYU.js.map → chunk-TGLCW25T.js.map} +1 -1
- package/dist/{chunk-SM3UPDXE.js → chunk-U2I2BRCP.js} +6 -6
- package/dist/{chunk-SM3UPDXE.js.map → chunk-U2I2BRCP.js.map} +1 -1
- package/dist/{chunk-M42SMH7V.js → chunk-UNUQGYCW.js} +3 -3
- package/dist/{chunk-M42SMH7V.js.map → chunk-UNUQGYCW.js.map} +1 -1
- package/dist/{chunk-UWU572Q6.js → chunk-WPISSDEI.js} +3 -3
- package/dist/{chunk-UWU572Q6.js.map → chunk-WPISSDEI.js.map} +1 -1
- package/dist/{chunk-FF5L6IV3.js → chunk-XVGB3K4B.js} +3 -3
- package/dist/{chunk-FF5L6IV3.js.map → chunk-XVGB3K4B.js.map} +1 -1
- package/dist/{chunk-3TK7CZVL.js → chunk-ZRE4N6ZA.js} +4 -4
- package/dist/{chunk-3TK7CZVL.js.map → chunk-ZRE4N6ZA.js.map} +1 -1
- package/dist/cli/index.js +64 -55
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/serve.d.ts +5 -0
- package/dist/cli/src/commands/serve.d.ts.map +1 -1
- package/dist/connectors/index.js +13 -13
- package/dist/connectors-shared/index.js +2 -2
- package/dist/core/index.js +3 -3
- package/dist/core/provider-registry-credentials.js +2 -2
- package/dist/core/provider-registry.js +1 -1
- package/dist/core/src/index.d.ts +1 -1
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/provider-registry.d.ts +10 -0
- package/dist/core/src/provider-registry.d.ts.map +1 -1
- package/dist/deploy/index.js +3 -3
- package/dist/{ensure-sources-3VOIO6IM.js → ensure-sources-UJBLBTXI.js} +9 -9
- package/dist/{ensure-sources-3VOIO6IM.js.map → ensure-sources-UJBLBTXI.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +13 -13
- package/dist/factory-assets/connectors/deploy.js +13 -13
- package/dist/factory-assets/connectors/devserver.js +13 -13
- package/dist/factory-assets/connectors/flow/adapter.js +13 -13
- package/dist/factory-assets/connectors/flow/engine.js +4 -4
- package/dist/factory-assets/connectors/flow/run-flow.js +14 -14
- package/dist/factory-assets/connectors/flow.js +13 -13
- package/dist/factory-assets/connectors/git.js +13 -13
- package/dist/factory-assets/connectors/gmail.js +13 -13
- package/dist/factory-assets/connectors/googledrive.js +13 -13
- package/dist/factory-assets/connectors/local.js +13 -13
- package/dist/factory-assets/connectors/mattermost.js +13 -13
- package/dist/factory-assets/connectors/memory.js +13 -13
- package/dist/factory-assets/connectors/minio.js +13 -13
- package/dist/factory-assets/connectors/postgres.js +13 -13
- package/dist/factory-assets/connectors/s3.js +13 -13
- package/dist/factory-assets/connectors/sharepoint.js +13 -13
- package/dist/factory-assets/connectors/sqlite.js +13 -13
- package/dist/factory-assets/connectors/static-server.js +13 -13
- package/dist/factory-assets/connectors/tunnel.js +13 -13
- package/dist/factory-assets/connectors/webdav.js +13 -13
- package/dist/factory-assets/connectors/xstate-store.js +13 -13
- package/dist/factory-assets/connectors/xstate.js +13 -13
- package/dist/{flows-6WUQ2J4X.js → flows-QTUSWYKY.js} +6 -6
- package/dist/{flows-6WUQ2J4X.js.map → flows-QTUSWYKY.js.map} +1 -1
- package/dist/{helpers-G7AQV3NN.js → helpers-QSRBM6LP.js} +9 -9
- package/dist/{helpers-G7AQV3NN.js.map → helpers-QSRBM6LP.js.map} +1 -1
- package/dist/library/index.js +4 -4
- package/dist/{library-publish-YOF75HVC.js → library-publish-JTS2PA2P.js} +13 -13
- package/dist/{library-publish-YOF75HVC.js.map → library-publish-JTS2PA2P.js.map} +1 -1
- package/dist/{open-library-DAIEAPNR.js → open-library-PIUYBOZI.js} +11 -11
- package/dist/{open-library-DAIEAPNR.js.map → open-library-PIUYBOZI.js.map} +1 -1
- package/dist/{paths-6VH76QLZ.js → paths-IOOMNHTC.js} +5 -5
- package/dist/{paths-6VH76QLZ.js.map → paths-IOOMNHTC.js.map} +1 -1
- package/dist/{plugin-store-4MXOIEHP.js → plugin-store-OIIPB2MQ.js} +5 -5
- package/dist/{plugin-store-4MXOIEHP.js.map → plugin-store-OIIPB2MQ.js.map} +1 -1
- package/dist/{project-IKHGSG4I.js → project-Y2BU3TSB.js} +10 -10
- package/dist/{project-IKHGSG4I.js.map → project-Y2BU3TSB.js.map} +1 -1
- package/dist/resolver/index.js +3 -3
- package/dist/runner/index.js +19 -19
- package/dist/runner/src/resource-handler.d.ts +8 -0
- package/dist/runner/src/resource-handler.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts +6 -0
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts +7 -1
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/runner/src/skill-staging.d.ts +39 -1
- package/dist/runner/src/skill-staging.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +6 -6
- package/dist/sdk/bridge.js +10 -10
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/flow.js +4 -4
- package/dist/sdk/index.js +19 -19
- package/dist/sdk/resolver.js +3 -3
- package/dist/sdk/runner.js +19 -19
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/types.js +1 -1
- package/dist/session/index.js +2 -2
- package/dist/{setup-234UBMJX.js → setup-VY5L44XZ.js} +17 -17
- package/dist/{setup-234UBMJX.js.map → setup-VY5L44XZ.js.map} +1 -1
- package/dist/{skills-FA4VQEO7.js → skills-DH75K326.js} +5 -5
- package/dist/{skills-FA4VQEO7.js.map → skills-DH75K326.js.map} +1 -1
- package/dist/{source-VAKNCLQY.js → source-CKD4YPK4.js} +12 -12
- package/dist/{source-VAKNCLQY.js.map → source-CKD4YPK4.js.map} +1 -1
- package/dist/{source-manifest-publish-FEFRWILI.js → source-manifest-publish-KTSEBNHY.js} +14 -14
- package/dist/{source-manifest-publish-FEFRWILI.js.map → source-manifest-publish-KTSEBNHY.js.map} +1 -1
- package/dist/tui/index.js +19 -19
- package/dist/types/index.js +1 -1
- package/dist/types/src/events.d.ts +53 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +11 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +6 -6
- package/dist/workspace-plugin/adapters/omp.js +7 -7
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-FRX2BO3V.js.map +0 -1
- package/dist/chunk-GZZPKAV5.js.map +0 -1
- package/dist/chunk-MX7LCQUQ.js.map +0 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { WorkspacePlugin } from './chunk-
|
|
2
|
-
import { buildWorkspaceToolDefs } from './chunk-
|
|
1
|
+
import { WorkspacePlugin } from './chunk-JYWEWJ46.js';
|
|
2
|
+
import { buildWorkspaceToolDefs } from './chunk-BU53MUL5.js';
|
|
3
3
|
import { findAiAssetsRoot } from './chunk-7IH3RKKK.js';
|
|
4
4
|
import { WebSocketServerTransport } from './chunk-5LKOAX7I.js';
|
|
5
5
|
import { assembleSystemPrompt, buildCapabilitiesPromptSection } from './chunk-W3UDISS2.js';
|
|
6
|
-
import { prepareNativePolicy, codexInstanceEnvironment, parseCodexCredential, parseCodexRefreshInput, parseCodexRefreshResult } from './chunk-
|
|
7
|
-
import { resolveFlowPath } from './chunk-
|
|
6
|
+
import { prepareNativePolicy, codexInstanceEnvironment, parseCodexCredential, parseCodexRefreshInput, parseCodexRefreshResult } from './chunk-HCYS7GFP.js';
|
|
7
|
+
import { resolveFlowPath } from './chunk-SMZT7QMT.js';
|
|
8
8
|
import { findAiAssetsRoot as findAiAssetsRoot$1, deployCatalogEntry, undeployCatalogEntry } from './chunk-Q6NDQ6BH.js';
|
|
9
|
-
import { registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, buildFlowToolDefs, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, driveOrchestratorTurn, buildSdkFlowTools } from './chunk-
|
|
9
|
+
import { registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, buildFlowToolDefs, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, driveOrchestratorTurn, buildSdkFlowTools } from './chunk-223FKFTC.js';
|
|
10
10
|
import { loadYamlConnectorDeclarations, withMaterializedConnectorDeclarations, SecretProviderChain, ConnectorStartupError, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, isKnownSecretRef, deriveSingleMaterializedConnectorDeclaration } from './chunk-2JANXYTJ.js';
|
|
11
|
-
import { EventNormalizer } from './chunk-
|
|
12
|
-
import { probeResumeTranscript, transcriptStoreForRuntime } from './chunk-
|
|
13
|
-
import { scopeReconfigureModel } from './chunk-
|
|
11
|
+
import { EventNormalizer } from './chunk-MNA22VPT.js';
|
|
12
|
+
import { probeResumeTranscript, transcriptStoreForRuntime } from './chunk-LX3FKVLL.js';
|
|
13
|
+
import { scopeReconfigureModel } from './chunk-EINLFFP6.js';
|
|
14
14
|
import { CodexNativeStateUnavailable } from './chunk-LOO5CB5M.js';
|
|
15
|
-
import { dispatchCapability } from './chunk-
|
|
15
|
+
import { dispatchCapability } from './chunk-XVGB3K4B.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-MVSF6AB4.js';
|
|
19
|
+
import { loadFlow } from './chunk-JULFGNQN.js';
|
|
20
20
|
import { parseFlowDefinition } from './chunk-DIQDYNXZ.js';
|
|
21
21
|
import { renderStimulusPrompt } from './chunk-K3IBZ2UZ.js';
|
|
22
|
-
import { withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PROTOCOL_VERSION } from './chunk-
|
|
23
|
-
import { resolveSettings, loadProviderRegistry } from './chunk-
|
|
22
|
+
import { withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PROTOCOL_VERSION } from './chunk-34ZVTPDV.js';
|
|
23
|
+
import { resolveSettings, loadProviderRegistry } from './chunk-WPISSDEI.js';
|
|
24
24
|
import { resolveRuntimeAssets } from './chunk-5RHPNNWP.js';
|
|
25
25
|
import { resolveDriverPaths } from './chunk-K5GBV4SA.js';
|
|
26
|
-
import { resolveSkWorkspaceConfig, resolveAgentDir, loadMcpServerDeclarations, COMPACTION_DEFAULTS, resolveCompactionThresholdPercent, validateAssetRecipeAttr, deriveSingleMaterializedMcpDeclaration, stageMaterializedSkills, readSkillAllowList, isStagedSkillMarkerFor, unstageSkill } from './chunk-DF7C3KZK.js';
|
|
26
|
+
import { resolveSkWorkspaceConfig, resolveAgentDir, loadMcpServerDeclarations, COMPACTION_DEFAULTS, resolveCompactionThresholdPercent, validateAssetRecipeAttr, deriveSingleMaterializedMcpDeclaration, stageMaterializedSkills, readSkillAllowList, isStagedSkillMarkerFor, unstageSkill, STAGED_SKILL_MARKER } from './chunk-DF7C3KZK.js';
|
|
27
27
|
import { withFsDeadline, FsDeadlineError, fsDeadlineMs, parseFrontmatter, tryWithFsDeadline } from './chunk-2FBPAR2V.js';
|
|
28
28
|
import { parseAssetRef } from './chunk-GEEW6SY2.js';
|
|
29
29
|
import { resolveLogStoreConfig, createLogStoreFromConfig, OnLogBridgeSink, WsLogSink, resolveLogsRetention, enforceLogsRetention } from './chunk-JMKB7IB4.js';
|
|
30
|
-
import { registryEntries, resolveEntryBaseUrl, parseModelRef, isEntryEnabled, parseCredentialRef } from './chunk-
|
|
30
|
+
import { pickRegistryEntries, registryEntries, resolveEntryBaseUrl, parseModelRef, isEntryEnabled, parseCredentialRef } from './chunk-MJHSLODD.js';
|
|
31
31
|
import { getLogStore, registerLogStore, createLogger, resetLogStore, isUnwritableStreamError, markStreamBroken, isBrokenPipeError, redactCredentials } from './chunk-BOFL7GIF.js';
|
|
32
32
|
import { __require } from './chunk-NSBPE2FW.js';
|
|
33
33
|
import pc from 'picocolors';
|
|
@@ -36,7 +36,7 @@ import { Marked } from 'marked';
|
|
|
36
36
|
import { markedTerminal } from 'marked-terminal';
|
|
37
37
|
import fs4, { readFile, readdir, lstat, stat, rm, unlink, mkdir, writeFile, realpath, rename, open, readlink, mkdtemp } from 'fs/promises';
|
|
38
38
|
import { createHash, randomBytes, timingSafeEqual, randomUUID } from 'crypto';
|
|
39
|
-
import { unlinkSync, readFileSync, existsSync, lstatSync, realpathSync, mkdirSync, writeFileSync, watch, chmodSync, accessSync
|
|
39
|
+
import { constants, unlinkSync, readFileSync, existsSync, lstatSync, realpathSync, mkdirSync, writeFileSync, watch, chmodSync, accessSync } from 'fs';
|
|
40
40
|
import { homedir } from 'os';
|
|
41
41
|
import * as z7 from 'zod';
|
|
42
42
|
import { z } from 'zod';
|
|
@@ -2622,7 +2622,7 @@ async function createAgentSession(config) {
|
|
|
2622
2622
|
});
|
|
2623
2623
|
const driverType = managed ? "codex" : settings.driver ?? "omp";
|
|
2624
2624
|
const model = managed ? config.model : settings.model;
|
|
2625
|
-
const registry = loadSessionRegistry(projectDir, config.registry, sessionLog);
|
|
2625
|
+
const registry = loadSessionRegistry(projectDir, config.registry, config.providers, sessionLog);
|
|
2626
2626
|
const modelRef = config.modelRef?.trim() || model?.trim() || void 0;
|
|
2627
2627
|
const credentialEnv = { ...config.credentialEnv };
|
|
2628
2628
|
const manifest = agentDir ? await loadAgentManifest(agentDir) : void 0;
|
|
@@ -2813,7 +2813,7 @@ function createManagedCodexSubpromptDriver(config, model, cwd, privateDirectory)
|
|
|
2813
2813
|
}
|
|
2814
2814
|
});
|
|
2815
2815
|
}
|
|
2816
|
-
function loadSessionRegistry(projectDir, sessionRegistry, log) {
|
|
2816
|
+
function loadSessionRegistry(projectDir, sessionRegistry, providers, log) {
|
|
2817
2817
|
const extraLayers = [];
|
|
2818
2818
|
if (sessionRegistry && Object.keys(sessionRegistry).length > 0)
|
|
2819
2819
|
extraLayers.push({ layer: "session", providers: sessionRegistry });
|
|
@@ -2825,7 +2825,14 @@ function loadSessionRegistry(projectDir, sessionRegistry, log) {
|
|
|
2825
2825
|
if (diagnostic.severity === "error") log.error(message, void 0, { code: diagnostic.code });
|
|
2826
2826
|
else log.warn(message, { code: diagnostic.code });
|
|
2827
2827
|
}
|
|
2828
|
-
return final.registry;
|
|
2828
|
+
if (providers === void 0 || providers.length === 0) return final.registry;
|
|
2829
|
+
for (const id of providers) {
|
|
2830
|
+
if (final.registry.providers[id] === void 0)
|
|
2831
|
+
log.warn(`providers registry: --providers names '${id}' which no layer defines`, {
|
|
2832
|
+
code: "unknown_provider"
|
|
2833
|
+
});
|
|
2834
|
+
}
|
|
2835
|
+
return pickRegistryEntries(final.registry, providers);
|
|
2829
2836
|
}
|
|
2830
2837
|
async function loadPromptExtensions(paths, projectDir, log) {
|
|
2831
2838
|
if (!paths?.length) return [];
|
|
@@ -3659,6 +3666,74 @@ var MOUNT_LIST_MAX_DEPTH = 32;
|
|
|
3659
3666
|
var MOUNT_LIST_MAX_ENTRIES = 1e4;
|
|
3660
3667
|
var MOUNT_TREE_OP_DEADLINE_FACTOR = 4;
|
|
3661
3668
|
var MOUNT_READ_DEADLINE_FACTOR = 4;
|
|
3669
|
+
var MOUNT_READ_MAX_CHUNK_BYTES = 8 * 1024 * 1024;
|
|
3670
|
+
function parseReadRange(options) {
|
|
3671
|
+
const offset = options?.offset;
|
|
3672
|
+
const length = options?.length;
|
|
3673
|
+
if (offset === void 0 && length === void 0) return null;
|
|
3674
|
+
for (const [name, value] of [
|
|
3675
|
+
["offset", offset],
|
|
3676
|
+
["length", length]
|
|
3677
|
+
]) {
|
|
3678
|
+
if (value !== void 0 && !(Number.isSafeInteger(value) && value >= 0)) {
|
|
3679
|
+
throw new ResourceOperationError(
|
|
3680
|
+
`Invalid read range: ${name} must be a non-negative integer`,
|
|
3681
|
+
"invalid_range"
|
|
3682
|
+
);
|
|
3683
|
+
}
|
|
3684
|
+
}
|
|
3685
|
+
return {
|
|
3686
|
+
offset: offset ?? 0,
|
|
3687
|
+
length: Math.min(length ?? MOUNT_READ_MAX_CHUNK_BYTES, MOUNT_READ_MAX_CHUNK_BYTES)
|
|
3688
|
+
};
|
|
3689
|
+
}
|
|
3690
|
+
async function readMountRange(targetPath, range, authoritativeSize) {
|
|
3691
|
+
const authSize = authoritativeSize ? await authoritativeSize() : null;
|
|
3692
|
+
const opening = open(targetPath, "r");
|
|
3693
|
+
let fh;
|
|
3694
|
+
try {
|
|
3695
|
+
fh = await withFsDeadline(`open ${targetPath}`, () => opening);
|
|
3696
|
+
} catch (err) {
|
|
3697
|
+
void opening.then((h) => h.close()).catch(() => {
|
|
3698
|
+
});
|
|
3699
|
+
throw err;
|
|
3700
|
+
}
|
|
3701
|
+
try {
|
|
3702
|
+
const st = await withFsDeadline(`fstat ${targetPath}`, () => fh.stat());
|
|
3703
|
+
if (!st.isFile()) {
|
|
3704
|
+
throw new Error(`Not a file: ${targetPath}`);
|
|
3705
|
+
}
|
|
3706
|
+
let size = st.size;
|
|
3707
|
+
if (authSize !== null && authSize >= 0 && authSize < size) size = authSize;
|
|
3708
|
+
const want = Math.max(0, Math.min(range.length, size - range.offset));
|
|
3709
|
+
const buf = Buffer.alloc(want);
|
|
3710
|
+
let filled = 0;
|
|
3711
|
+
await withFsDeadline(
|
|
3712
|
+
`read ${targetPath} @${range.offset}+${want}`,
|
|
3713
|
+
async () => {
|
|
3714
|
+
while (filled < want) {
|
|
3715
|
+
const { bytesRead } = await fh.read(buf, filled, want - filled, range.offset + filled);
|
|
3716
|
+
if (bytesRead === 0) break;
|
|
3717
|
+
filled += bytesRead;
|
|
3718
|
+
}
|
|
3719
|
+
},
|
|
3720
|
+
fsDeadlineMs() * MOUNT_READ_DEADLINE_FACTOR
|
|
3721
|
+
);
|
|
3722
|
+
const modifiedAt = isoTime(st.mtime);
|
|
3723
|
+
return {
|
|
3724
|
+
bytes: buf.subarray(0, filled),
|
|
3725
|
+
range: {
|
|
3726
|
+
offset: range.offset,
|
|
3727
|
+
length: filled,
|
|
3728
|
+
size,
|
|
3729
|
+
...modifiedAt ? { modifiedAt } : {}
|
|
3730
|
+
}
|
|
3731
|
+
};
|
|
3732
|
+
} finally {
|
|
3733
|
+
void fh.close().catch(() => {
|
|
3734
|
+
});
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3662
3737
|
var MOUNT_STAT_MAX_ENTRIES = 5e4;
|
|
3663
3738
|
var MOUNT_STAT_BUDGET_MS = 1e4;
|
|
3664
3739
|
var MOUNT_STAT_CONCURRENCY = 16;
|
|
@@ -3824,6 +3899,22 @@ async function handleMountResourceRequest(command, manager, emit) {
|
|
|
3824
3899
|
}
|
|
3825
3900
|
case "read": {
|
|
3826
3901
|
const contentType = getMimeType(basename(targetPath));
|
|
3902
|
+
const readRange = parseReadRange(options);
|
|
3903
|
+
if (readRange) {
|
|
3904
|
+
const sizeFn2 = getAuthoritativeSize(entry.handle.state);
|
|
3905
|
+
const chunk = await readMountRange(
|
|
3906
|
+
targetPath,
|
|
3907
|
+
readRange,
|
|
3908
|
+
sizeFn2 ? () => sizeFn2(reqPath ?? "") : void 0
|
|
3909
|
+
);
|
|
3910
|
+
data = {
|
|
3911
|
+
data: chunk.bytes.toString("base64"),
|
|
3912
|
+
contentType,
|
|
3913
|
+
encoding: "binary",
|
|
3914
|
+
range: chunk.range
|
|
3915
|
+
};
|
|
3916
|
+
break;
|
|
3917
|
+
}
|
|
3827
3918
|
const buf = await withFsDeadline(
|
|
3828
3919
|
`readFile ${targetPath}`,
|
|
3829
3920
|
() => readFile(targetPath),
|
|
@@ -4953,13 +5044,88 @@ async function isStillOurs(record2, path6, timeoutMs) {
|
|
|
4953
5044
|
const st = await tryWithFsDeadline(`lstat ${path6}`, () => lstat(path6), null, timeoutMs);
|
|
4954
5045
|
return st?.isDirectory() === true && st.dev === record2.dev && st.ino === record2.ino && st.birthtimeMs === record2.birthtimeMs;
|
|
4955
5046
|
}
|
|
5047
|
+
async function recordLoadedSkillDigests(loaded, projectDir, skillsDir, names, opts) {
|
|
5048
|
+
for (const name of names) {
|
|
5049
|
+
if (opts.driverUp && opts.previouslyStaged.has(name)) continue;
|
|
5050
|
+
const path6 = join(projectDir, skillsDir, name);
|
|
5051
|
+
loaded.set(name, { path: path6, digest: await stagedSkillDigest(path6) });
|
|
5052
|
+
}
|
|
5053
|
+
}
|
|
5054
|
+
var DIGEST_DEADLINE_FACTOR = 4;
|
|
5055
|
+
var DIGEST_MAX_BYTES = 64 * 1024 * 1024;
|
|
5056
|
+
var DIGEST_CHUNK_BYTES = 64 * 1024;
|
|
5057
|
+
var DIGEST_OPEN_FLAGS = constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK;
|
|
5058
|
+
async function stagedSkillDigest(dir, timeoutMs) {
|
|
5059
|
+
return tryWithFsDeadline(
|
|
5060
|
+
`digest ${dir}`,
|
|
5061
|
+
async () => {
|
|
5062
|
+
const hash = createHash("sha256");
|
|
5063
|
+
let budget = DIGEST_MAX_BYTES;
|
|
5064
|
+
const hashFile = async (path6) => {
|
|
5065
|
+
const fh = await open(path6, DIGEST_OPEN_FLAGS);
|
|
5066
|
+
try {
|
|
5067
|
+
const st = await fh.stat();
|
|
5068
|
+
if (!st.isFile()) throw new Error(`not a regular file: ${path6}`);
|
|
5069
|
+
if (st.size > budget) throw new Error("skill too large to digest");
|
|
5070
|
+
const buf = Buffer.alloc(DIGEST_CHUNK_BYTES);
|
|
5071
|
+
let total = 0;
|
|
5072
|
+
for (; ; ) {
|
|
5073
|
+
const { bytesRead } = await fh.read(buf, 0, buf.length, null);
|
|
5074
|
+
if (bytesRead === 0) break;
|
|
5075
|
+
total += bytesRead;
|
|
5076
|
+
if (total > budget) throw new Error("skill too large to digest");
|
|
5077
|
+
hash.update(buf.subarray(0, bytesRead));
|
|
5078
|
+
}
|
|
5079
|
+
budget -= total;
|
|
5080
|
+
hash.update(`\0${total}\0`);
|
|
5081
|
+
} finally {
|
|
5082
|
+
await fh.close();
|
|
5083
|
+
}
|
|
5084
|
+
};
|
|
5085
|
+
const walk = async (rel) => {
|
|
5086
|
+
const here = rel ? join(dir, rel) : dir;
|
|
5087
|
+
if (rel && !(await lstat(here)).isDirectory()) throw new Error(`not a dir: ${here}`);
|
|
5088
|
+
const entries = await readdir(here, { withFileTypes: true });
|
|
5089
|
+
entries.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
|
|
5090
|
+
for (const entry of entries) {
|
|
5091
|
+
if (!rel && entry.name === STAGED_SKILL_MARKER) continue;
|
|
5092
|
+
const path6 = rel ? `${rel}/${entry.name}` : entry.name;
|
|
5093
|
+
if (entry.isDirectory()) {
|
|
5094
|
+
hash.update(`d\0${path6}\0`);
|
|
5095
|
+
await walk(path6);
|
|
5096
|
+
} else if (entry.isSymbolicLink()) {
|
|
5097
|
+
hash.update(`l\0${path6}\0${await readlink(join(dir, path6))}\0`);
|
|
5098
|
+
} else if (entry.isFile()) {
|
|
5099
|
+
hash.update(`f\0${path6}\0`);
|
|
5100
|
+
await hashFile(join(dir, path6));
|
|
5101
|
+
} else {
|
|
5102
|
+
hash.update(`o\0${path6}\0`);
|
|
5103
|
+
}
|
|
5104
|
+
}
|
|
5105
|
+
};
|
|
5106
|
+
await walk("");
|
|
5107
|
+
return hash.digest("hex");
|
|
5108
|
+
},
|
|
5109
|
+
null,
|
|
5110
|
+
fsDeadlineMs() * DIGEST_DEADLINE_FACTOR
|
|
5111
|
+
);
|
|
5112
|
+
}
|
|
4956
5113
|
async function attachStagedSkill(deps, name) {
|
|
4957
5114
|
try {
|
|
4958
5115
|
const skillsDir = deps.skillsDir();
|
|
4959
|
-
const
|
|
5116
|
+
const dirName = name.includes("/") ? name.split("/").pop() : name;
|
|
5117
|
+
const { staged, unchanged } = await deps.withSkillFsLock(async () => {
|
|
5118
|
+
const dest = join(deps.projectDir, skillsDir, dirName);
|
|
5119
|
+
const loaded = deps.stagedSkillDirs.has(dirName) ? deps.loadedSkillDigests.get(dirName) : void 0;
|
|
4960
5120
|
const names = await stageMaterializedSkills(deps.projectDir, skillsDir, { declared: [name] });
|
|
5121
|
+
let same = false;
|
|
5122
|
+
if (names.includes(dirName)) {
|
|
5123
|
+
const digest = await stagedSkillDigest(dest);
|
|
5124
|
+
same = digest !== null && loaded?.path === dest && loaded.digest === digest;
|
|
5125
|
+
if (!same) deps.loadedSkillDigests.set(dirName, { path: dest, digest });
|
|
5126
|
+
}
|
|
4961
5127
|
await recordStagedSkills(deps.stagedSkillDirs, deps.projectDir, skillsDir, names);
|
|
4962
|
-
return names;
|
|
5128
|
+
return { staged: names, unchanged: same ? dirName : null };
|
|
4963
5129
|
});
|
|
4964
5130
|
if (staged.length === 0) {
|
|
4965
5131
|
return {
|
|
@@ -4968,9 +5134,16 @@ async function attachStagedSkill(deps, name) {
|
|
|
4968
5134
|
message: `no materialized skill matching "${name}" under .skaile/assets/skill`
|
|
4969
5135
|
};
|
|
4970
5136
|
}
|
|
4971
|
-
deps.log(`[serve] runner.attach_instance staged skill(s): ${staged.join(", ")}`);
|
|
4972
5137
|
const live = deps.driverStarted();
|
|
4973
|
-
|
|
5138
|
+
const toRestart = staged.filter((s) => s !== unchanged);
|
|
5139
|
+
if (toRestart.length === 0) {
|
|
5140
|
+
deps.log(
|
|
5141
|
+
`[serve] runner.attach_instance: skill ${staged.join(", ")} already staged and unchanged \u2014 no driver restart`
|
|
5142
|
+
);
|
|
5143
|
+
return { ok: true, id: name, live, toolCount: 0 };
|
|
5144
|
+
}
|
|
5145
|
+
deps.log(`[serve] runner.attach_instance staged skill(s): ${toRestart.join(", ")}`);
|
|
5146
|
+
deps.scheduleSkillRestart(toRestart.map((s) => ({ name: s, action: "add" })));
|
|
4974
5147
|
return { ok: true, id: name, live, toolCount: 0 };
|
|
4975
5148
|
} catch (err) {
|
|
4976
5149
|
return {
|
|
@@ -8640,6 +8813,9 @@ async function startAgentServer(opts) {
|
|
|
8640
8813
|
// The control-plane registry layer, normalized to the bare `id → entry`
|
|
8641
8814
|
// map the session builder layers `providers.yml` under.
|
|
8642
8815
|
...wireAgentConfig?.registry ? { registry: toMergedRegistry(wireAgentConfig.registry).providers } : {},
|
|
8816
|
+
// `--providers`: narrow the registry to these entry ids. Managed codex
|
|
8817
|
+
// runs on the host's own credentials, so it never takes the filter.
|
|
8818
|
+
...!managedCodex && opts.providers && opts.providers.length > 0 ? { providers: opts.providers } : {},
|
|
8643
8819
|
...wireAgentConfig?.modelRef ? { modelRef: wireAgentConfig.modelRef } : {},
|
|
8644
8820
|
promptsDir: opts.promptsDir,
|
|
8645
8821
|
sessionId,
|
|
@@ -8777,7 +8953,10 @@ async function startAgentServer(opts) {
|
|
|
8777
8953
|
let appliedWireAgentConfigKey;
|
|
8778
8954
|
let liveReconfigurePatch;
|
|
8779
8955
|
let wireConnectorDeclarationsApplied = false;
|
|
8956
|
+
let lastInitSharedState;
|
|
8780
8957
|
const stagedSkillDirs = /* @__PURE__ */ new Map();
|
|
8958
|
+
const loadedSkillDigests = /* @__PURE__ */ new Map();
|
|
8959
|
+
let bootRestageDone = false;
|
|
8781
8960
|
const withSkillFsLock = createSerialLock();
|
|
8782
8961
|
const stageDeclaredSkills = createCoalescedTask(
|
|
8783
8962
|
withSkillFsLock,
|
|
@@ -8787,11 +8966,17 @@ async function startAgentServer(opts) {
|
|
|
8787
8966
|
skillsDir
|
|
8788
8967
|
);
|
|
8789
8968
|
const names = declared.length > 0 ? await stageMaterializedSkills(opts.projectDir, skillsDir, { declared }) : [];
|
|
8969
|
+
const previouslyStaged = new Set(stagedSkillDirs.keys());
|
|
8970
|
+
await recordLoadedSkillDigests(loadedSkillDigests, opts.projectDir, skillsDir, names, {
|
|
8971
|
+
driverUp: bootRestageDone && driverStarted,
|
|
8972
|
+
previouslyStaged
|
|
8973
|
+
});
|
|
8790
8974
|
await recordStagedSkills(stagedSkillDirs, opts.projectDir, skillsDir, names);
|
|
8791
8975
|
return { removed, staged: names };
|
|
8792
8976
|
}
|
|
8793
8977
|
);
|
|
8794
8978
|
await restageMaterializedSkills(false);
|
|
8979
|
+
bootRestageDone = true;
|
|
8795
8980
|
async function restageMaterializedSkills(allowRestart) {
|
|
8796
8981
|
if (managedHost) return;
|
|
8797
8982
|
try {
|
|
@@ -8819,10 +9004,15 @@ async function startAgentServer(opts) {
|
|
|
8819
9004
|
}
|
|
8820
9005
|
if (removed.length === 0 && newlyStaged.length === 0) return;
|
|
8821
9006
|
if (allowRestart && driverStarted) {
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
9007
|
+
try {
|
|
9008
|
+
await restartDriverForSkillChanges([
|
|
9009
|
+
...removed.map((s) => ({ name: s, action: "remove" })),
|
|
9010
|
+
...newlyStaged.map((s) => ({ name: s, action: "add" }))
|
|
9011
|
+
]);
|
|
9012
|
+
} catch (err) {
|
|
9013
|
+
for (const s of newlyStaged) loadedSkillDigests.delete(s);
|
|
9014
|
+
throw err;
|
|
9015
|
+
}
|
|
8826
9016
|
}
|
|
8827
9017
|
} catch (err) {
|
|
8828
9018
|
log(
|
|
@@ -9639,6 +9829,7 @@ async function startAgentServer(opts) {
|
|
|
9639
9829
|
}
|
|
9640
9830
|
async function rebuildAgentSession(overrides) {
|
|
9641
9831
|
const disposedManager = agentSession.resourceManager;
|
|
9832
|
+
const sharedStateSnapshots = await snapshotInitSharedState();
|
|
9642
9833
|
const disposeStartedAt = Date.now();
|
|
9643
9834
|
await agentSession.dispose();
|
|
9644
9835
|
if (managedHost && managedBootstrapClosed) throw new Error("CODEX_RUNTIME_UNSUPPORTED");
|
|
@@ -9663,14 +9854,67 @@ async function startAgentServer(opts) {
|
|
|
9663
9854
|
resourceManager,
|
|
9664
9855
|
disposedManager
|
|
9665
9856
|
);
|
|
9666
|
-
if (resourceManager !== null && resourceManager !== disposedManager && repointed !== resourceManager) {
|
|
9667
|
-
log(
|
|
9668
|
-
"[serve] WARNING: recreate displaced a lazily-created sharedState resource manager \u2014 registered shared-state stores were dropped and must be re-registered"
|
|
9669
|
-
);
|
|
9670
|
-
}
|
|
9671
9857
|
resourceManager = repointed;
|
|
9858
|
+
await reRegisterInitSharedState(sharedStateSnapshots);
|
|
9672
9859
|
agentSession.startWatching();
|
|
9673
9860
|
}
|
|
9861
|
+
async function snapshotInitSharedState() {
|
|
9862
|
+
const snapshots = /* @__PURE__ */ new Map();
|
|
9863
|
+
if (!lastInitSharedState || !resourceManager) return snapshots;
|
|
9864
|
+
for (const stateConfig of lastInitSharedState) {
|
|
9865
|
+
if (!resourceManager.has(stateConfig.id)) continue;
|
|
9866
|
+
try {
|
|
9867
|
+
const raw = await resourceManager.executeOp(stateConfig.id, "get", {});
|
|
9868
|
+
const state = raw ? JSON.parse(raw) : {};
|
|
9869
|
+
if (state && typeof state === "object" && !Array.isArray(state)) {
|
|
9870
|
+
snapshots.set(stateConfig.id, state);
|
|
9871
|
+
}
|
|
9872
|
+
} catch (err) {
|
|
9873
|
+
serverLog.warn("shared-state store could not be read before the driver recreate", {
|
|
9874
|
+
id: stateConfig.id,
|
|
9875
|
+
error: err instanceof Error ? err.message : String(err)
|
|
9876
|
+
});
|
|
9877
|
+
}
|
|
9878
|
+
}
|
|
9879
|
+
return snapshots;
|
|
9880
|
+
}
|
|
9881
|
+
async function reRegisterInitSharedState(snapshots) {
|
|
9882
|
+
if (!lastInitSharedState) return;
|
|
9883
|
+
const missing = lastInitSharedState.filter((c) => !resourceManager?.has(c.id));
|
|
9884
|
+
if (missing.length === 0 || !ensureResourceManagerForSharedState()) return;
|
|
9885
|
+
const ids = [];
|
|
9886
|
+
const restored = [];
|
|
9887
|
+
for (const stateConfig of missing) {
|
|
9888
|
+
if (!await registerSharedStateStore(stateConfig)) continue;
|
|
9889
|
+
ids.push(stateConfig.id);
|
|
9890
|
+
const snapshot = snapshots.get(stateConfig.id);
|
|
9891
|
+
if (snapshot && await restoreSharedStateSnapshot(stateConfig, snapshot)) {
|
|
9892
|
+
restored.push(stateConfig.id);
|
|
9893
|
+
}
|
|
9894
|
+
}
|
|
9895
|
+
if (ids.length > 0) {
|
|
9896
|
+
serverLog.info("shared-state stores re-registered after the driver recreate", {
|
|
9897
|
+
ids,
|
|
9898
|
+
restored
|
|
9899
|
+
});
|
|
9900
|
+
}
|
|
9901
|
+
await rebuildMcpToolsForNewStores(ids.length);
|
|
9902
|
+
}
|
|
9903
|
+
async function restoreSharedStateSnapshot(stateConfig, snapshot) {
|
|
9904
|
+
try {
|
|
9905
|
+
await resourceManager.executeOp(stateConfig.id, "merge", { data: snapshot });
|
|
9906
|
+
for (const key of Object.keys(stateConfig.initialState ?? {})) {
|
|
9907
|
+
if (!(key in snapshot)) await resourceManager.executeOp(stateConfig.id, "delete", { key });
|
|
9908
|
+
}
|
|
9909
|
+
return true;
|
|
9910
|
+
} catch (err) {
|
|
9911
|
+
serverLog.warn("shared-state store state could not be restored after the driver recreate", {
|
|
9912
|
+
id: stateConfig.id,
|
|
9913
|
+
error: err instanceof Error ? err.message : String(err)
|
|
9914
|
+
});
|
|
9915
|
+
return false;
|
|
9916
|
+
}
|
|
9917
|
+
}
|
|
9674
9918
|
async function recreateSessionForInit(pendingResumeSessionId) {
|
|
9675
9919
|
await recreateAgentSession({
|
|
9676
9920
|
...aiProviderConfigId ? { aiProviderConfigId } : {},
|
|
@@ -9680,6 +9924,7 @@ async function startAgentServer(opts) {
|
|
|
9680
9924
|
});
|
|
9681
9925
|
}
|
|
9682
9926
|
async function applyInitSharedState(sharedState) {
|
|
9927
|
+
lastInitSharedState = sharedState;
|
|
9683
9928
|
if (!ensureResourceManagerForSharedState()) {
|
|
9684
9929
|
sendEvent({ type: "configured" });
|
|
9685
9930
|
return false;
|
|
@@ -9834,8 +10079,12 @@ async function startAgentServer(opts) {
|
|
|
9834
10079
|
projectDir: opts.projectDir,
|
|
9835
10080
|
skillsDir: () => activeSkillsDir(),
|
|
9836
10081
|
stagedSkillDirs,
|
|
10082
|
+
loadedSkillDigests,
|
|
9837
10083
|
withSkillFsLock,
|
|
9838
|
-
|
|
10084
|
+
// A failed restart never loaded the new copy; forget it so a re-attach restarts.
|
|
10085
|
+
scheduleSkillRestart: (actions) => scheduleDriverRestartForSkillChanges(actions, () => {
|
|
10086
|
+
for (const a of actions) loadedSkillDigests.delete(a.name);
|
|
10087
|
+
}),
|
|
9839
10088
|
driverStarted: () => driverStarted,
|
|
9840
10089
|
log
|
|
9841
10090
|
};
|
|
@@ -9885,8 +10134,9 @@ async function startAgentServer(opts) {
|
|
|
9885
10134
|
}))
|
|
9886
10135
|
});
|
|
9887
10136
|
}
|
|
9888
|
-
function scheduleDriverRestartForSkillChanges(catalogActions) {
|
|
10137
|
+
function scheduleDriverRestartForSkillChanges(catalogActions, onFailed) {
|
|
9889
10138
|
void restartDriverForSkillChanges(catalogActions).catch((err) => {
|
|
10139
|
+
onFailed?.();
|
|
9890
10140
|
serverLog.warn(
|
|
9891
10141
|
`[serve] background driver restart for skill changes failed: ${err instanceof Error ? err.message : String(err)}`
|
|
9892
10142
|
);
|
|
@@ -10069,6 +10319,7 @@ async function startAgentServer(opts) {
|
|
|
10069
10319
|
log(
|
|
10070
10320
|
`[serve] configure cfg keys=${Object.keys(cfg).join(",")} sharedState=${cfg.sharedState ? cfg.sharedState.length : "undefined"} resourceManager=${resourceManager ? "set" : "null"}`
|
|
10071
10321
|
);
|
|
10322
|
+
if (cfg.sharedState) lastInitSharedState = cfg.sharedState;
|
|
10072
10323
|
if (!managedCodex && aiProviderConfigId) {
|
|
10073
10324
|
aiCredentialRefreshScheduler.ensureArmed();
|
|
10074
10325
|
}
|
|
@@ -10867,6 +11118,6 @@ function touchSession(state) {
|
|
|
10867
11118
|
return { ...state, updatedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
10868
11119
|
}
|
|
10869
11120
|
|
|
10870
|
-
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_STAT_BUDGET_MS, MOUNT_STAT_MAX_ENTRIES, MOUNT_TREE_OP_DEADLINE_FACTOR, MarkdownStreamer, PreInitRingSink, ResourceOperationError, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, WS_AUTH_TOKEN_ENV, WS_AUTH_TOKEN_FILE_ENV, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, computeDirectoryTotals, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createManagedCodexSubpromptDriver, createSessionStimulusBus, defineCapability, deleteSession, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, 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, 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 };
|
|
10871
|
-
//# sourceMappingURL=chunk-
|
|
10872
|
-
//# sourceMappingURL=chunk-
|
|
11121
|
+
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, MarkdownStreamer, PreInitRingSink, ResourceOperationError, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, WS_AUTH_TOKEN_ENV, WS_AUTH_TOKEN_FILE_ENV, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, computeDirectoryTotals, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createManagedCodexSubpromptDriver, createSessionStimulusBus, defineCapability, deleteSession, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, 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, 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 };
|
|
11122
|
+
//# sourceMappingURL=chunk-MJUDVEFN.js.map
|
|
11123
|
+
//# sourceMappingURL=chunk-MJUDVEFN.js.map
|