@skaile/workspaces 4.21.1 → 4.22.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 +22 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-HKPNPO7N.js → asset-feeds-6TCDMWCJ.js} +4 -4
- package/dist/{asset-feeds-HKPNPO7N.js.map → asset-feeds-6TCDMWCJ.js.map} +1 -1
- package/dist/asset-manager/index.js +1 -1
- package/dist/bridge/drivers/claude-sdk.js +115 -6
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +2 -2
- package/dist/bridge/drivers/continue.js +3 -3
- package/dist/bridge/drivers/echo.js +3 -3
- package/dist/bridge/drivers/gemini.js +5 -5
- package/dist/bridge/drivers/goose.js +3 -3
- package/dist/bridge/drivers/omp.js +4 -4
- package/dist/bridge/drivers/omp.js.map +1 -1
- package/dist/bridge/drivers/opencode.js +3 -3
- package/dist/bridge/drivers/qwen.js +5 -5
- package/dist/bridge/index.js +5 -5
- package/dist/bridge/src/drivers/claude-sdk.d.ts +23 -0
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/drivers/omp.d.ts +1 -1
- package/dist/bridge/src/types.d.ts +17 -2
- package/dist/bridge/src/types.d.ts.map +1 -1
- package/dist/{chunk-HA674IQL.js → chunk-47MUF565.js} +6 -6
- package/dist/{chunk-HA674IQL.js.map → chunk-47MUF565.js.map} +1 -1
- package/dist/{chunk-ES4E6RDZ.js → chunk-52OD6PJ4.js} +3 -3
- package/dist/{chunk-ES4E6RDZ.js.map → chunk-52OD6PJ4.js.map} +1 -1
- package/dist/{chunk-TVLQTO7E.js → chunk-7LZJRVKJ.js} +9 -3
- package/dist/chunk-7LZJRVKJ.js.map +1 -0
- package/dist/{chunk-RLACUE4X.js → chunk-D3UARV3Z.js} +3 -3
- package/dist/{chunk-RLACUE4X.js.map → chunk-D3UARV3Z.js.map} +1 -1
- package/dist/{chunk-IZAN5MHL.js → chunk-F4ECQAN3.js} +165 -4
- package/dist/chunk-F4ECQAN3.js.map +1 -0
- package/dist/{chunk-S5A5MVJN.js → chunk-GRBB4CQL.js} +4 -4
- package/dist/chunk-GRBB4CQL.js.map +1 -0
- package/dist/{chunk-5FMWNSAQ.js → chunk-HMUFI3L5.js} +3 -3
- package/dist/{chunk-5FMWNSAQ.js.map → chunk-HMUFI3L5.js.map} +1 -1
- package/dist/{chunk-N5XNEKHC.js → chunk-IAWXUW6C.js} +128 -14
- package/dist/chunk-IAWXUW6C.js.map +1 -0
- package/dist/{chunk-ZDSZGV5F.js → chunk-IBUY53DN.js} +59 -12
- package/dist/chunk-IBUY53DN.js.map +1 -0
- package/dist/{chunk-XBMCUMZT.js → chunk-IN466NSZ.js} +4 -4
- package/dist/{chunk-XBMCUMZT.js.map → chunk-IN466NSZ.js.map} +1 -1
- package/dist/{chunk-RTD5KAM4.js → chunk-IRGI7Q62.js} +10 -3
- package/dist/chunk-IRGI7Q62.js.map +1 -0
- package/dist/{chunk-RBTVXXD5.js → chunk-JIPPMYOM.js} +3 -3
- package/dist/{chunk-RBTVXXD5.js.map → chunk-JIPPMYOM.js.map} +1 -1
- package/dist/{chunk-GTS2FODO.js → chunk-JKJ7XYLG.js} +35 -3
- package/dist/chunk-JKJ7XYLG.js.map +1 -0
- package/dist/{chunk-AEOHSR27.js → chunk-KVWSBQNP.js} +3 -3
- package/dist/{chunk-AEOHSR27.js.map → chunk-KVWSBQNP.js.map} +1 -1
- package/dist/{chunk-ODIJJXXB.js → chunk-NJ2AI2DR.js} +6 -6
- package/dist/{chunk-ODIJJXXB.js.map → chunk-NJ2AI2DR.js.map} +1 -1
- package/dist/{chunk-5YDCUHJI.js → chunk-PIY5NTXY.js} +3 -3
- package/dist/{chunk-5YDCUHJI.js.map → chunk-PIY5NTXY.js.map} +1 -1
- package/dist/{chunk-EUGEEYGD.js → chunk-Q6LSBAQK.js} +2 -2
- package/dist/{chunk-EUGEEYGD.js.map → chunk-Q6LSBAQK.js.map} +1 -1
- package/dist/{chunk-YEQ3BXOY.js → chunk-QCACHN2P.js} +3 -3
- package/dist/{chunk-YEQ3BXOY.js.map → chunk-QCACHN2P.js.map} +1 -1
- package/dist/{chunk-OPSKLUB4.js → chunk-R2RFFXK7.js} +2 -2
- package/dist/{chunk-OPSKLUB4.js.map → chunk-R2RFFXK7.js.map} +1 -1
- package/dist/{chunk-R3EU2FFW.js → chunk-UHYS34Z5.js} +4 -4
- package/dist/{chunk-R3EU2FFW.js.map → chunk-UHYS34Z5.js.map} +1 -1
- package/dist/{chunk-FELWDKLQ.js → chunk-WBRD2T5J.js} +3 -3
- package/dist/{chunk-FELWDKLQ.js.map → chunk-WBRD2T5J.js.map} +1 -1
- package/dist/{chunk-I4VIRPHS.js → chunk-Y6QVVKFN.js} +3 -3
- package/dist/{chunk-I4VIRPHS.js.map → chunk-Y6QVVKFN.js.map} +1 -1
- package/dist/{chunk-SY2HSULI.js → chunk-YHG3333K.js} +3 -3
- package/dist/{chunk-SY2HSULI.js.map → chunk-YHG3333K.js.map} +1 -1
- package/dist/{chunk-RZ2YIFT6.js → chunk-ZULBOMNO.js} +6 -6
- package/dist/{chunk-RZ2YIFT6.js.map → chunk-ZULBOMNO.js.map} +1 -1
- package/dist/cli/index.js +36 -36
- package/dist/connectors/index.js +7 -7
- package/dist/connectors/src/connector-manager.d.ts +15 -0
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/{ensure-sources-MUS622KB.js → ensure-sources-ONLJKK4T.js} +4 -4
- package/dist/{ensure-sources-MUS622KB.js.map → ensure-sources-ONLJKK4T.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +7 -7
- package/dist/factory-assets/connectors/deploy.js +7 -7
- package/dist/factory-assets/connectors/devserver.js +7 -7
- package/dist/factory-assets/connectors/flow/adapter.js +7 -7
- package/dist/factory-assets/connectors/flow/run-flow.js +8 -8
- package/dist/factory-assets/connectors/flow.js +7 -7
- package/dist/factory-assets/connectors/git.js +7 -7
- package/dist/factory-assets/connectors/gmail.js +7 -7
- package/dist/factory-assets/connectors/googledrive.js +7 -7
- package/dist/factory-assets/connectors/local.js +7 -7
- package/dist/factory-assets/connectors/mattermost.js +7 -7
- package/dist/factory-assets/connectors/memory.js +7 -7
- package/dist/factory-assets/connectors/minio.js +7 -7
- package/dist/factory-assets/connectors/postgres.js +7 -7
- package/dist/factory-assets/connectors/s3.js +7 -7
- package/dist/factory-assets/connectors/sharepoint.js +7 -7
- package/dist/factory-assets/connectors/sqlite.js +7 -7
- package/dist/factory-assets/connectors/static-server.js +7 -7
- package/dist/factory-assets/connectors/tunnel.js +7 -7
- package/dist/factory-assets/connectors/webdav.js +7 -7
- package/dist/factory-assets/connectors/xstate-store.js +7 -7
- package/dist/factory-assets/connectors/xstate.js +7 -7
- package/dist/{helpers-V3IJWB75.js → helpers-SGWUYZUS.js} +4 -4
- package/dist/{helpers-V3IJWB75.js.map → helpers-SGWUYZUS.js.map} +1 -1
- package/dist/{library-publish-TXJM76SD.js → library-publish-ZEZA6DAI.js} +6 -6
- package/dist/{library-publish-TXJM76SD.js.map → library-publish-ZEZA6DAI.js.map} +1 -1
- package/dist/{open-library-ORTV2RUE.js → open-library-OF377L77.js} +5 -5
- package/dist/{open-library-ORTV2RUE.js.map → open-library-OF377L77.js.map} +1 -1
- package/dist/{project-GI2A75UN.js → project-23QK7474.js} +5 -5
- package/dist/{project-GI2A75UN.js.map → project-23QK7474.js.map} +1 -1
- package/dist/runner/index.js +12 -12
- package/dist/runner/src/managed-codex-bootstrap.d.ts +1 -1
- package/dist/runner/src/reconfigure-handler.d.ts +40 -0
- package/dist/runner/src/reconfigure-handler.d.ts.map +1 -0
- package/dist/runner/src/reply-routing.d.ts +2 -0
- package/dist/runner/src/reply-routing.d.ts.map +1 -1
- package/dist/runner/src/runner-capabilities.d.ts +48 -1
- package/dist/runner/src/runner-capabilities.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts +2 -2
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/runner/src/session-capability-wiring.d.ts +5 -0
- package/dist/runner/src/session-capability-wiring.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +1 -1
- package/dist/sdk/bridge.js +5 -5
- package/dist/sdk/index.js +12 -12
- package/dist/sdk/runner.js +12 -12
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/store.js +1 -1
- package/dist/sdk/transport/ws/client.js +1 -1
- package/dist/sdk/transport/ws.js +1 -1
- package/dist/sdk/transport.js +1 -1
- package/dist/sdk/types.js +1 -1
- package/dist/session/index.js +2 -2
- package/dist/session/src/bounded-subscriber-transport.d.ts +101 -0
- package/dist/session/src/bounded-subscriber-transport.d.ts.map +1 -0
- package/dist/session/src/dispatcher.d.ts.map +1 -1
- package/dist/session/src/index.d.ts +2 -0
- package/dist/session/src/index.d.ts.map +1 -1
- package/dist/session/src/types.d.ts +10 -1
- package/dist/session/src/types.d.ts.map +1 -1
- package/dist/{setup-GLCLE36X.js → setup-WZ3SWZFQ.js} +10 -10
- package/dist/{setup-GLCLE36X.js.map → setup-WZ3SWZFQ.js.map} +1 -1
- package/dist/{source-N6EKFFH5.js → source-YMKMBOKP.js} +6 -6
- package/dist/{source-N6EKFFH5.js.map → source-YMKMBOKP.js.map} +1 -1
- package/dist/{source-manifest-publish-BDMY4B4B.js → source-manifest-publish-B3CVM4RW.js} +7 -7
- package/dist/{source-manifest-publish-BDMY4B4B.js.map → source-manifest-publish-B3CVM4RW.js.map} +1 -1
- package/dist/store/index.js +1 -1
- package/dist/store/src/store.d.ts.map +1 -1
- package/dist/transport/index.js +1 -1
- package/dist/transport/src/ws/client.d.ts +12 -0
- package/dist/transport/src/ws/client.d.ts.map +1 -1
- package/dist/transport/ws/client.js +1 -1
- package/dist/transport/ws.js +1 -1
- package/dist/tui/index.js +12 -12
- package/dist/types/index.js +1 -1
- package/dist/types/src/events.d.ts +9 -2
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/lifecycle.d.ts +1 -1
- package/dist/types/src/lifecycle.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +17 -2
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +2 -2
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-GTS2FODO.js.map +0 -1
- package/dist/chunk-IZAN5MHL.js.map +0 -1
- package/dist/chunk-N5XNEKHC.js.map +0 -1
- package/dist/chunk-RTD5KAM4.js.map +0 -1
- package/dist/chunk-S5A5MVJN.js.map +0 -1
- package/dist/chunk-TVLQTO7E.js.map +0 -1
- package/dist/chunk-ZDSZGV5F.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { WorkspacePlugin } from './chunk-
|
|
2
|
-
import { buildWorkspaceToolDefs } from './chunk-
|
|
1
|
+
import { WorkspacePlugin } from './chunk-R2RFFXK7.js';
|
|
2
|
+
import { buildWorkspaceToolDefs } from './chunk-HMUFI3L5.js';
|
|
3
3
|
import { findAiAssetsRoot } from './chunk-7IH3RKKK.js';
|
|
4
4
|
import { WebSocketServerTransport } from './chunk-73ZXUUL6.js';
|
|
5
5
|
import { assembleSystemPrompt, buildCapabilitiesPromptSection } from './chunk-W3UDISS2.js';
|
|
6
6
|
import { prepareNativePolicy, codexInstanceEnvironment, parseCodexCredential, parseCodexRefreshInput, parseCodexRefreshResult } from './chunk-PE3A6FFW.js';
|
|
7
|
-
import { resolveFlowPath } from './chunk-
|
|
7
|
+
import { resolveFlowPath } from './chunk-YHG3333K.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, driveOrchestratorTurn, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, buildSdkFlowTools } from './chunk-
|
|
9
|
+
import { registerBuiltinConnectors, buildConnectorPromptSection, findMissingPackages, installNpmPackages, ConnectorManager, buildSdkConnectorTools, buildLazySdkFlowTools, describeFlowOperations, buildConnectorToolDefs, buildFlowToolDefs, driveOrchestratorTurn, SessionNodeExecutor, SessionSubpromptRunner, ClassifierSubpromptRunner, SessionInlineSubFlowRunner, buildSdkFlowTools } from './chunk-IBUY53DN.js';
|
|
10
10
|
import { loadYamlConnectorDeclarations, withMaterializedConnectorDeclarations, SecretProviderChain, ConnectorStartupError, PreMintedSecretProvider, InMemorySecretProvider, resolvedConfigToDeclarations, isKnownSecretRef, deriveSingleMaterializedConnectorDeclaration } from './chunk-MC2MF4U5.js';
|
|
11
|
-
import { EventNormalizer } from './chunk-
|
|
11
|
+
import { EventNormalizer } from './chunk-IN466NSZ.js';
|
|
12
12
|
import { probeResumeTranscript, transcriptStoreForRuntime } from './chunk-6S5KL76M.js';
|
|
13
13
|
import { CodexNativeStateUnavailable } from './chunk-LOO5CB5M.js';
|
|
14
|
-
import { dispatchCapability } from './chunk-
|
|
14
|
+
import { dispatchCapability } from './chunk-D3UARV3Z.js';
|
|
15
15
|
import { classifyClaudeSdkError } from './chunk-BGY4KTU6.js';
|
|
16
16
|
import { agentExecRequested } from './chunk-YROR332M.js';
|
|
17
|
-
import { createDriver, catalogLayer, providerCredentialEnvName, toMergedRegistry, registryCredentialEnv, AI_PROVIDER_PRESETS } from './chunk-
|
|
17
|
+
import { toAgentEffort, createDriver, catalogLayer, providerCredentialEnvName, toMergedRegistry, registryCredentialEnv, AI_PROVIDER_PRESETS, AgentDriver } from './chunk-IRGI7Q62.js';
|
|
18
18
|
import { loadFlow } from './chunk-KTCMBEEB.js';
|
|
19
19
|
import { parseFlowDefinition } from './chunk-ALLCAFHQ.js';
|
|
20
20
|
import { renderStimulusPrompt } from './chunk-RQLL7L72.js';
|
|
21
|
-
import { withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PROTOCOL_VERSION } from './chunk-
|
|
21
|
+
import { withActivityLabelJsonSchema, TOOL_ACTIVITY_PROMPT_SECTION, SESSION_ROOT_CONNECTOR_ID, PROTOCOL_VERSION } from './chunk-GRBB4CQL.js';
|
|
22
22
|
import { resolveSettings, loadProviderRegistry } from './chunk-UWU572Q6.js';
|
|
23
23
|
import { resolveRuntimeAssets } from './chunk-5RHPNNWP.js';
|
|
24
24
|
import { resolveDriverPaths } from './chunk-K5GBV4SA.js';
|
|
@@ -2715,7 +2715,11 @@ async function createAgentSession(config) {
|
|
|
2715
2715
|
]);
|
|
2716
2716
|
logAssembledSystemPrompt(systemPrompt, sessionLog);
|
|
2717
2717
|
const thinking = config.thinking ?? wsConfig.agent_config?.default?.thinking;
|
|
2718
|
-
const
|
|
2718
|
+
const wsEffort = managed ? void 0 : wsConfig.agent_config?.default?.effort;
|
|
2719
|
+
const effort = config.effort ?? toAgentEffort(wsEffort);
|
|
2720
|
+
if (config.effort === void 0 && wsEffort !== void 0 && effort === void 0) {
|
|
2721
|
+
sessionLog.warn("ignoring unknown effort", { effort: wsEffort, source: "skaile.yaml" });
|
|
2722
|
+
}
|
|
2719
2723
|
const maxTurns = maxTurnsOverride ?? manifest?.runtime?.max_turns;
|
|
2720
2724
|
let driver;
|
|
2721
2725
|
try {
|
|
@@ -4501,6 +4505,55 @@ async function handleCredentialRotatedSignal(deps) {
|
|
|
4501
4505
|
}
|
|
4502
4506
|
}
|
|
4503
4507
|
|
|
4508
|
+
// runner/src/reconfigure-handler.ts
|
|
4509
|
+
function driverAppliesReconfigure(driver) {
|
|
4510
|
+
return typeof driver.reconfigure === "function" && driver.reconfigure !== AgentDriver.prototype.reconfigure;
|
|
4511
|
+
}
|
|
4512
|
+
function applyReconfigurePatch(config, patch) {
|
|
4513
|
+
if (patch.model !== void 0) {
|
|
4514
|
+
config.model = patch.model;
|
|
4515
|
+
if (config.modelRef !== void 0) config.modelRef = patch.model;
|
|
4516
|
+
}
|
|
4517
|
+
if (patch.thinking !== void 0) config.thinking = patch.thinking;
|
|
4518
|
+
if (patch.effort !== void 0) config.effort = patch.effort;
|
|
4519
|
+
}
|
|
4520
|
+
function carryLiveReconfigure(config, patch, wireAgentConfigChanged) {
|
|
4521
|
+
if (wireAgentConfigChanged || !patch) return void 0;
|
|
4522
|
+
applyReconfigurePatch(config, patch);
|
|
4523
|
+
return patch;
|
|
4524
|
+
}
|
|
4525
|
+
function buildReconfigureHandler(deps) {
|
|
4526
|
+
const { getDriver, rememberPatch, log } = deps;
|
|
4527
|
+
return async (patch) => {
|
|
4528
|
+
const fields = Object.keys(patch).join(", ");
|
|
4529
|
+
const driver = getDriver();
|
|
4530
|
+
if (!driver) {
|
|
4531
|
+
log(`[reconfigure] no driver is running; ${fields} not applied`);
|
|
4532
|
+
return {
|
|
4533
|
+
ok: false,
|
|
4534
|
+
code: "no_driver",
|
|
4535
|
+
message: "No agent driver is running; the change applies when the session next starts."
|
|
4536
|
+
};
|
|
4537
|
+
}
|
|
4538
|
+
const driverId = driver.driverInfo?.id ?? "unknown";
|
|
4539
|
+
if (!driverAppliesReconfigure(driver)) {
|
|
4540
|
+
log(
|
|
4541
|
+
`[reconfigure] driver ${driverId} cannot apply a live reconfigure; ${fields} not applied`
|
|
4542
|
+
);
|
|
4543
|
+
return {
|
|
4544
|
+
ok: false,
|
|
4545
|
+
code: "not_supported",
|
|
4546
|
+
message: `The ${driverId} driver cannot change ${fields} live; the change applies when the session next starts.`
|
|
4547
|
+
};
|
|
4548
|
+
}
|
|
4549
|
+
driver.reconfigure(patch);
|
|
4550
|
+
rememberPatch(patch);
|
|
4551
|
+
const model = driver.getModel() ?? null;
|
|
4552
|
+
log(`[reconfigure] driver ${driverId} took ${fields} (model=${model ?? "(default)"})`);
|
|
4553
|
+
return { ok: true, model };
|
|
4554
|
+
};
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4504
4557
|
// runner/src/runtime-session-emit.ts
|
|
4505
4558
|
function planRuntimeSessionEmit(input) {
|
|
4506
4559
|
const { driverSessionId, model, capabilitySignature, lastEmitted } = input;
|
|
@@ -4898,7 +4951,9 @@ function awaitAgentEnd(driver, prompt, timeoutMs) {
|
|
|
4898
4951
|
async function routeReply(deps) {
|
|
4899
4952
|
const current = deps.getDriver();
|
|
4900
4953
|
if (current.hasPendingQuestion()) {
|
|
4901
|
-
|
|
4954
|
+
if (!current.answerQuestion(deps.answer, deps.question, deps.requestId)) return "fresh-turn";
|
|
4955
|
+
deps.onAnswered?.();
|
|
4956
|
+
return "answered";
|
|
4902
4957
|
}
|
|
4903
4958
|
await deps.awaitSwap();
|
|
4904
4959
|
return "fresh-turn";
|
|
@@ -6793,6 +6848,13 @@ var setStateInput = z7.strictObject({
|
|
|
6793
6848
|
var lifecycleInput = z7.strictObject({
|
|
6794
6849
|
phase: z7.enum(["hibernate", "close", "compact"])
|
|
6795
6850
|
});
|
|
6851
|
+
var reconfigureInputSchema = z7.strictObject({
|
|
6852
|
+
model: z7.string().trim().min(1).optional(),
|
|
6853
|
+
thinking: z7.enum(["adaptive", "enabled", "disabled"]).optional(),
|
|
6854
|
+
effort: z7.enum(["low", "medium", "high", "xhigh", "max"]).optional()
|
|
6855
|
+
}).refine((p) => p.model !== void 0 || p.thinking !== void 0 || p.effort !== void 0, {
|
|
6856
|
+
message: "a reconfigure names at least one of model, thinking, effort"
|
|
6857
|
+
});
|
|
6796
6858
|
var VALID_LOG_STORE_LEVELS = /* @__PURE__ */ new Set(["debug", "info", "warn", "error"]);
|
|
6797
6859
|
function buildRunnerCapabilities(handlers) {
|
|
6798
6860
|
return [
|
|
@@ -6967,6 +7029,24 @@ function buildRunnerCapabilities(handlers) {
|
|
|
6967
7029
|
}
|
|
6968
7030
|
return handlers.lifecycle(input);
|
|
6969
7031
|
}
|
|
7032
|
+
}),
|
|
7033
|
+
defineCapability({
|
|
7034
|
+
name: "runner.reconfigure",
|
|
7035
|
+
displayName: "Reconfigure agent",
|
|
7036
|
+
description: "Change the running agent's model, thinking mode or effort without a restart. Applies from the next turn; a turn in progress finishes on the old settings. Answers no_driver or not_supported when the change cannot apply live.",
|
|
7037
|
+
side: "agent",
|
|
7038
|
+
origin: RUNNER_CAP_ORIGIN,
|
|
7039
|
+
audience: ["runtime"],
|
|
7040
|
+
kind: "effect",
|
|
7041
|
+
input: reconfigureInputSchema,
|
|
7042
|
+
handler: async (input) => {
|
|
7043
|
+
if (!handlers.reconfigure) return notImplemented("runner.reconfigure");
|
|
7044
|
+
const patch = {};
|
|
7045
|
+
if (input.model !== void 0) patch.model = input.model;
|
|
7046
|
+
if (input.thinking !== void 0) patch.thinking = input.thinking;
|
|
7047
|
+
if (input.effort !== void 0) patch.effort = input.effort;
|
|
7048
|
+
return handlers.reconfigure(patch);
|
|
7049
|
+
}
|
|
6970
7050
|
})
|
|
6971
7051
|
];
|
|
6972
7052
|
}
|
|
@@ -6987,6 +7067,8 @@ function wireSessionCapabilities(deps) {
|
|
|
6987
7067
|
detachSkillInstance,
|
|
6988
7068
|
registerLiveAttachedMcp,
|
|
6989
7069
|
scheduleDriverRestartForToolChanges,
|
|
7070
|
+
getDriver,
|
|
7071
|
+
rememberReconfigure,
|
|
6990
7072
|
log
|
|
6991
7073
|
} = deps;
|
|
6992
7074
|
capabilityRegistry.setRemoteInvoker(remoteCapabilityInvoker);
|
|
@@ -7044,6 +7126,11 @@ function wireSessionCapabilities(deps) {
|
|
|
7044
7126
|
getCompactionOrchestrator,
|
|
7045
7127
|
getResourceManager,
|
|
7046
7128
|
log
|
|
7129
|
+
}),
|
|
7130
|
+
reconfigure: buildReconfigureHandler({
|
|
7131
|
+
getDriver,
|
|
7132
|
+
rememberPatch: rememberReconfigure,
|
|
7133
|
+
log
|
|
7047
7134
|
})
|
|
7048
7135
|
});
|
|
7049
7136
|
for (const cap of runnerCaps) {
|
|
@@ -8217,6 +8304,13 @@ async function startAgentServer(opts) {
|
|
|
8217
8304
|
wsConfig.secrets?.timeoutMs ?? 3e4;
|
|
8218
8305
|
const diskProfileHasAgentSettings = (p) => !!p && !!(p.driver || p.model || p.thinking || p.effort);
|
|
8219
8306
|
function buildSessionConfig(secretProvider2, credentialEnv, fallbackConnectorDeclarations) {
|
|
8307
|
+
const wireEffort = toAgentEffort(wireAgentConfig?.effort);
|
|
8308
|
+
if (wireAgentConfig?.effort && !wireEffort) {
|
|
8309
|
+
serverLog.warn("ignoring unknown effort", {
|
|
8310
|
+
effort: wireAgentConfig.effort,
|
|
8311
|
+
source: "agentConfig"
|
|
8312
|
+
});
|
|
8313
|
+
}
|
|
8220
8314
|
return {
|
|
8221
8315
|
projectDir: opts.projectDir,
|
|
8222
8316
|
agentDir,
|
|
@@ -8243,7 +8337,7 @@ async function startAgentServer(opts) {
|
|
|
8243
8337
|
// entry references. Omitted entirely when nothing resolved.
|
|
8244
8338
|
...credentialEnv && Object.keys(credentialEnv).length > 0 ? { credentialEnv } : {},
|
|
8245
8339
|
...wireAgentConfig?.thinking ? { thinking: wireAgentConfig.thinking } : {},
|
|
8246
|
-
...
|
|
8340
|
+
...wireEffort ? { effort: wireEffort } : {},
|
|
8247
8341
|
// Every claude-sdk driver carries the flow tools, so a run can start mid-turn.
|
|
8248
8342
|
extraInProcessMcpServers: buildPermanentFlowMcpServers,
|
|
8249
8343
|
// Protocol v2 `<CAPABILITIES>` block — joins each registered capability's
|
|
@@ -8355,6 +8449,7 @@ async function startAgentServer(opts) {
|
|
|
8355
8449
|
let managedInitFingerprint;
|
|
8356
8450
|
let managedInitComplete = false;
|
|
8357
8451
|
let appliedWireAgentConfigKey;
|
|
8452
|
+
let liveReconfigurePatch;
|
|
8358
8453
|
let wireConnectorDeclarationsApplied = false;
|
|
8359
8454
|
const stagedSkillDirs = /* @__PURE__ */ new Map();
|
|
8360
8455
|
const withSkillFsLock = createSerialLock();
|
|
@@ -9098,6 +9193,12 @@ async function startAgentServer(opts) {
|
|
|
9098
9193
|
credentialEnv,
|
|
9099
9194
|
fallbackConnectorDeclarations
|
|
9100
9195
|
);
|
|
9196
|
+
const incomingWireAgentConfigKey = wireAgentConfig ? JSON.stringify(wireAgentConfig) : void 0;
|
|
9197
|
+
liveReconfigurePatch = carryLiveReconfigure(
|
|
9198
|
+
sessionConfig,
|
|
9199
|
+
liveReconfigurePatch,
|
|
9200
|
+
incomingWireAgentConfigKey !== appliedWireAgentConfigKey
|
|
9201
|
+
);
|
|
9101
9202
|
let needsWireFallbackRecreate = false;
|
|
9102
9203
|
const agentSessionExistedBeforeThisInit = !!agentSession;
|
|
9103
9204
|
if (!agentSession) {
|
|
@@ -9148,6 +9249,11 @@ async function startAgentServer(opts) {
|
|
|
9148
9249
|
detachSkillInstance,
|
|
9149
9250
|
registerLiveAttachedMcp,
|
|
9150
9251
|
scheduleDriverRestartForToolChanges,
|
|
9252
|
+
getDriver: () => driver ?? null,
|
|
9253
|
+
rememberReconfigure: (patch) => {
|
|
9254
|
+
liveReconfigurePatch = { ...liveReconfigurePatch, ...patch };
|
|
9255
|
+
applyReconfigurePatch(sessionConfig, patch);
|
|
9256
|
+
},
|
|
9151
9257
|
log
|
|
9152
9258
|
});
|
|
9153
9259
|
return { needsWireFallbackRecreate, needsWireAgentConfigRecreate };
|
|
@@ -9787,7 +9893,15 @@ async function startAgentServer(opts) {
|
|
|
9787
9893
|
awaitSwap: () => driverSwapGate.awaitSwap(),
|
|
9788
9894
|
answer: cmd.answer,
|
|
9789
9895
|
question: cmd.question,
|
|
9790
|
-
requestId: cmd.requestId
|
|
9896
|
+
requestId: cmd.requestId,
|
|
9897
|
+
// Tells every other attached client the question is answered, so none
|
|
9898
|
+
// keeps a stale question card or a shut status gate.
|
|
9899
|
+
onAnswered: () => sendEvent({
|
|
9900
|
+
type: "question_reply",
|
|
9901
|
+
answer: cmd.answer,
|
|
9902
|
+
...cmd.question !== void 0 ? { question: cmd.question } : {},
|
|
9903
|
+
...cmd.requestId !== void 0 ? { requestId: cmd.requestId } : {}
|
|
9904
|
+
})
|
|
9791
9905
|
});
|
|
9792
9906
|
if (routed === "answered") return;
|
|
9793
9907
|
if (!driver.acceptsReplyAsPrompt) return;
|
|
@@ -10383,5 +10497,5 @@ function touchSession(state) {
|
|
|
10383
10497
|
}
|
|
10384
10498
|
|
|
10385
10499
|
export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, 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, flowStartNeedsDriverRestart, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, handleSessionRootResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isSessionRootPathAllowed, isTerminalFlowStatus, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadManagedCodexHostConfig, loadSession, loadSessionById, mcpAuthSecretKey, newSession, nulTailPaddingLength, pickFlowToolTarget, pickRepointedManager, planFlowMutate, prepareCodexTools, reconcilePendingDecisions, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, rejectPendingCapabilityCallsOnDisconnect, resetRunnerLogStore, resolveAgentComposition, resolveAgentMixins, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, runAgentChat, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, supportsLiveToolUpdates, takeRunnerWsAuthToken, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile };
|
|
10386
|
-
//# sourceMappingURL=chunk-
|
|
10387
|
-
//# sourceMappingURL=chunk-
|
|
10500
|
+
//# sourceMappingURL=chunk-IAWXUW6C.js.map
|
|
10501
|
+
//# sourceMappingURL=chunk-IAWXUW6C.js.map
|