agentbox-sdk 0.1.302 → 0.1.303

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.
@@ -250,7 +250,7 @@ declare class Sandbox<P extends SandboxProviderName = SandboxProviderName> {
250
250
  * idempotent setup that the previous run already performed (e.g.
251
251
  * `agent.setup()`). Always `false` before `findOrProvision()` resolves.
252
252
  */
253
- get wasFound(): boolean;
253
+ get isWarm(): boolean;
254
254
  /**
255
255
  * Attach to an existing tagged sandbox or create a new one. Must be
256
256
  * called before `run`, `runAsync`, `gitClone`, `uploadAndRun`,
@@ -1,6 +1,6 @@
1
- import { o as AgentProviderName, h as AgentOptions, v as AgentSetupConfig, t as AgentRunConfig, s as AgentRun, r as AgentResult, a3 as RawAgentEvent, b as AgentAttachRequest, z as AttachedRun } from '../types-Dj_HCr6Q.js';
2
- export { a as AgentApprovalMode, c as AgentCommandConfig, d as AgentCostData, e as AgentExecutionRequest, f as AgentLocalMcpConfig, g as AgentMcpConfig, i as AgentOptionsBase, j as AgentOptionsMap, k as AgentPermissionDecision, l as AgentPermissionKind, m as AgentPermissionResponse, n as AgentProviderAdapter, p as AgentReasoningEffort, q as AgentRemoteMcpConfig, u as AgentRunSink, w as AgentSetupRequest, x as AgentSkillConfig, y as AgentSubAgentConfig, C as ClaudeCodeAgentOptions, B as ClaudeCodeHookConfig, D as ClaudeCodeHookEvent, E as ClaudeCodeHookHandler, F as ClaudeCodeHookMatcherGroup, G as ClaudeCodeHooksConfig, H as ClaudeCodeProviderOptions, I as CodexAgentOptions, J as CodexCommandHook, K as CodexHookEvent, L as CodexHookMatcherGroup, M as CodexHooksConfig, N as CodexProviderOptions, O as DataContent, P as EmbeddedSkillConfig, Q as FilePart, R as ImagePart, Y as OpenCodeAgentOptions, Z as OpenCodePluginConfig, _ as OpenCodePluginEvent, $ as OpenCodePluginHookConfig, a0 as OpenCodeProviderOptions, a5 as RepoSkillConfig, ab as TextPart, af as UserContent, ag as UserContentPart } from '../types-Dj_HCr6Q.js';
3
- import { S as Sandbox } from '../Sandbox-CByFJI8X.js';
1
+ import { o as AgentProviderName, h as AgentOptions, t as AgentRunConfig, s as AgentRun, r as AgentResult, a2 as RawAgentEvent, b as AgentAttachRequest, y as AttachedRun } from '../types-Ozo1rHKs.js';
2
+ export { a as AgentApprovalMode, c as AgentCommandConfig, d as AgentCostData, e as AgentExecutionRequest, f as AgentLocalMcpConfig, g as AgentMcpConfig, i as AgentOptionsBase, j as AgentOptionsMap, k as AgentPermissionDecision, l as AgentPermissionKind, m as AgentPermissionResponse, n as AgentProviderAdapter, p as AgentReasoningEffort, q as AgentRemoteMcpConfig, u as AgentRunSink, v as AgentSetupRequest, w as AgentSkillConfig, x as AgentSubAgentConfig, C as ClaudeCodeAgentOptions, z as ClaudeCodeHookConfig, B as ClaudeCodeHookEvent, D as ClaudeCodeHookHandler, E as ClaudeCodeHookMatcherGroup, F as ClaudeCodeHooksConfig, G as ClaudeCodeProviderOptions, H as CodexAgentOptions, I as CodexCommandHook, J as CodexHookEvent, K as CodexHookMatcherGroup, L as CodexHooksConfig, M as CodexProviderOptions, N as DataContent, O as EmbeddedSkillConfig, P as FilePart, Q as ImagePart, X as OpenCodeAgentOptions, Y as OpenCodePluginConfig, Z as OpenCodePluginEvent, _ as OpenCodePluginHookConfig, $ as OpenCodeProviderOptions, a4 as RepoSkillConfig, aa as TextPart, ae as UserContent, af as UserContentPart } from '../types-Ozo1rHKs.js';
3
+ import { S as Sandbox } from '../Sandbox-K6VNqKeo.js';
4
4
  export { AgentProvider } from '../enums.js';
5
5
  import 'e2b';
6
6
  import '@vercel/sandbox';
@@ -41,7 +41,7 @@ declare class Agent<P extends AgentProviderName = AgentProviderName> {
41
41
  * second `setup()` against the same sandbox does ~one round-trip of
42
42
  * work.
43
43
  */
44
- setup(config?: AgentSetupConfig): Promise<void>;
44
+ setup(): Promise<void>;
45
45
  stream(runConfig: AgentRunConfig): AgentRun;
46
46
  run(runConfig: AgentRunConfig): Promise<AgentResult>;
47
47
  rawEvents(runConfig: AgentRunConfig): AsyncIterable<RawAgentEvent>;
@@ -85,4 +85,4 @@ declare class Agent<P extends AgentProviderName = AgentProviderName> {
85
85
  declare const AGENT_RESERVED_PORTS: Record<AgentProviderName, readonly number[]>;
86
86
  declare function collectAllAgentReservedPorts(): number[];
87
87
 
88
- export { AGENT_RESERVED_PORTS, Agent, AgentAttachRequest, AgentOptions, AgentProviderName, AgentResult, AgentRun, AgentRunConfig, AgentSetupConfig, AttachedRun, collectAllAgentReservedPorts };
88
+ export { AGENT_RESERVED_PORTS, Agent, AgentAttachRequest, AgentOptions, AgentProviderName, AgentResult, AgentRun, AgentRunConfig, AttachedRun, collectAllAgentReservedPorts };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Agent
3
- } from "../chunk-YAMFJAU6.js";
3
+ } from "../chunk-GBM7LKZF.js";
4
4
  import "../chunk-NWAXQ7UD.js";
5
5
  import {
6
6
  AGENT_RESERVED_PORTS,
@@ -998,6 +998,28 @@ var HostSetupTarget = class {
998
998
  }
999
999
  );
1000
1000
  }
1001
+ async probe(command, extraEnv) {
1002
+ return time(
1003
+ debugRuntime,
1004
+ `host probe ${shortLabel(command)}`,
1005
+ async () => {
1006
+ const handle = spawnCommand({
1007
+ command: process.env.SHELL || "sh",
1008
+ args: ["-c", command],
1009
+ cwd: this.cwd,
1010
+ env: {
1011
+ ...process.env,
1012
+ ...this.baseEnv,
1013
+ ...this.env,
1014
+ ...extraEnv ?? {}
1015
+ }
1016
+ });
1017
+ const exitCode = await handle.wait();
1018
+ return exitCode === 0;
1019
+ },
1020
+ (ok) => ({ ok })
1021
+ );
1022
+ }
1001
1023
  async cleanup() {
1002
1024
  await rm(this.layout.rootDir, { recursive: true, force: true });
1003
1025
  }
@@ -1052,13 +1074,34 @@ var SandboxSetupTarget = class {
1052
1074
  }
1053
1075
  });
1054
1076
  if (result && result.exitCode !== 0) {
1077
+ const output = result.combinedOutput?.trim();
1078
+ const detail = output ? `
1079
+ ${output}` : "";
1055
1080
  throw new Error(
1056
- `Sandbox setup command failed (${result.exitCode}): ${command}`
1081
+ `Sandbox setup command failed (${result.exitCode}): ${command}${detail}`
1057
1082
  );
1058
1083
  }
1059
1084
  }
1060
1085
  );
1061
1086
  }
1087
+ async probe(command, extraEnv) {
1088
+ return time(
1089
+ debugRuntime,
1090
+ `sandbox probe ${shortLabel(command)}`,
1091
+ async () => {
1092
+ const result = await this.options.sandbox?.run(command, {
1093
+ cwd: this.options.cwd,
1094
+ env: {
1095
+ ...this.options.env ?? {},
1096
+ ...this.env,
1097
+ ...extraEnv ?? {}
1098
+ }
1099
+ });
1100
+ return Boolean(result && result.exitCode === 0);
1101
+ },
1102
+ (ok) => ({ ok })
1103
+ );
1104
+ }
1062
1105
  async cleanup() {
1063
1106
  }
1064
1107
  };
@@ -1092,6 +1135,7 @@ import path5 from "path";
1092
1135
  var MANIFEST_FILENAME = "setup-manifest.json";
1093
1136
  var TARGET_MANIFEST_FILENAME = "setup-target.json";
1094
1137
  var INSTALL_SCRIPT_FILENAME = "install.sh";
1138
+ var SETUP_ID_FILENAME = "setup.id";
1095
1139
  var MANIFEST_VERSION = 1;
1096
1140
  function hashArtifact(artifact) {
1097
1141
  const hasher = createHash("sha256");
@@ -1110,6 +1154,74 @@ function computeTargetArtifacts(artifacts) {
1110
1154
  }
1111
1155
  return result;
1112
1156
  }
1157
+ function computeSetupId(parts) {
1158
+ const hasher = createHash("sha256");
1159
+ hasher.update(`v${MANIFEST_VERSION}
1160
+ `);
1161
+ for (const a of [...parts.artifacts ?? []].sort(
1162
+ (x, y) => x.path.localeCompare(y.path)
1163
+ )) {
1164
+ hasher.update(`a:${a.path}:${hashArtifact(a)}
1165
+ `);
1166
+ }
1167
+ for (const cmd of parts.installCommands ?? []) {
1168
+ hasher.update(`c:${hashCommand(cmd)}
1169
+ `);
1170
+ }
1171
+ if (parts.daemon) {
1172
+ hasher.update(
1173
+ `d:${parts.daemon.port}:${parts.daemon.healthPath}:${parts.daemon.expectedVersionMatch ?? ""}
1174
+ `
1175
+ );
1176
+ }
1177
+ for (const extra of parts.extras ?? []) {
1178
+ hasher.update(`x:${extra}
1179
+ `);
1180
+ }
1181
+ return hasher.digest("hex");
1182
+ }
1183
+ async function preflightSetup(target, setupId, daemon) {
1184
+ return time(
1185
+ debugSetup,
1186
+ `preflightSetup ${target.provider}`,
1187
+ async () => {
1188
+ const setupIdFile = path5.posix.join(
1189
+ target.layout.rootDir,
1190
+ SETUP_ID_FILENAME
1191
+ );
1192
+ const checks = [
1193
+ `[ -f ${shellQuote(setupIdFile)} ]`,
1194
+ `[ "$(cat ${shellQuote(setupIdFile)} 2>/dev/null)" = ${shellQuote(setupId)} ]`
1195
+ ];
1196
+ if (daemon) {
1197
+ const url = `http://127.0.0.1:${daemon.port}${daemon.healthPath}`;
1198
+ if (daemon.expectedVersionMatch) {
1199
+ checks.push(
1200
+ `curl -fsS --max-time 2 ${shellQuote(url)} 2>/dev/null | grep -q ${shellQuote(daemon.expectedVersionMatch)}`
1201
+ );
1202
+ } else {
1203
+ checks.push(
1204
+ `curl -fsS --max-time 2 ${shellQuote(url)} >/dev/null 2>&1`
1205
+ );
1206
+ }
1207
+ }
1208
+ return target.probe(checks.join(" && "));
1209
+ },
1210
+ (ok) => ({ ok })
1211
+ );
1212
+ }
1213
+ async function markSetupComplete(target, setupId) {
1214
+ await time(
1215
+ debugSetup,
1216
+ `markSetupComplete ${target.provider}`,
1217
+ () => target.runCommand(
1218
+ [
1219
+ `mkdir -p ${shellQuote(target.layout.rootDir)}`,
1220
+ `printf '%s' ${shellQuote(setupId)} > ${shellQuote(path5.posix.join(target.layout.rootDir, SETUP_ID_FILENAME))}`
1221
+ ].join(" && ")
1222
+ )
1223
+ );
1224
+ }
1113
1225
  function buildInstallScript(rootDir, installCommandsByKey) {
1114
1226
  const commandsB64 = Buffer.from(
1115
1227
  JSON.stringify(installCommandsByKey),
@@ -1935,6 +2047,11 @@ var ClaudeCodeAgentAdapter = class {
1935
2047
  /**
1936
2048
  * Sandbox-side preparation. Uploads `.claude/` artifacts and ensures
1937
2049
  * the daemon is running. `execute()` then dials the daemon directly.
2050
+ *
2051
+ * Warm-path short-circuit: a single no-upload `preflightSetup` probes
2052
+ * the `setup.id` marker + daemon `/__version` on loopback. If both
2053
+ * match what we'd produce, we skip the artifact upload AND the daemon
2054
+ * boot entirely.
1938
2055
  */
1939
2056
  async setup(request) {
1940
2057
  await time(debugClaude, "claude-code setup()", async () => {
@@ -1968,6 +2085,20 @@ var ClaudeCodeAgentAdapter = class {
1968
2085
  { path: settingsPath, content: JSON.stringify(hookSettings, null, 2) },
1969
2086
  { path: mcpConfigPath, content: mcpConfigJson }
1970
2087
  ];
2088
+ const daemonInfo = {
2089
+ port: DAEMON_PORT,
2090
+ healthPath: "/__version",
2091
+ expectedVersionMatch: DAEMON_PROTOCOL_VERSION
2092
+ };
2093
+ const setupId = computeSetupId({
2094
+ artifacts,
2095
+ installCommands,
2096
+ daemon: daemonInfo
2097
+ });
2098
+ if (await preflightSetup(target, setupId, daemonInfo)) {
2099
+ debugClaude("claude-code setup() preflight hit \u2014 skipping");
2100
+ return;
2101
+ }
1971
2102
  const env = { ...options.env ?? {}, ...target.env };
1972
2103
  await Promise.all([
1973
2104
  time(
@@ -1977,6 +2108,7 @@ var ClaudeCodeAgentAdapter = class {
1977
2108
  ),
1978
2109
  ensureClaudeCodeDaemon(options, env)
1979
2110
  ]);
2111
+ await markSetupComplete(target, setupId);
1980
2112
  });
1981
2113
  }
1982
2114
  async execute(request, sink) {
@@ -2819,7 +2951,12 @@ async function ensureCodexLoginViaConfig(request, target) {
2819
2951
  [
2820
2952
  'if [ -z "${OPENAI_API_KEY:-}" ]; then exit 0; fi',
2821
2953
  'mkdir -p "${CODEX_HOME:-$HOME/.codex}"',
2822
- "printenv OPENAI_API_KEY | env -u XDG_CONFIG_HOME codex login --with-api-key"
2954
+ // Merge stderr into stdout so providers that don't surface stderr
2955
+ // (e.g. Daytona's `executeCommand`, which collapses to a single
2956
+ // `result` field) still propagate the underlying error message
2957
+ // back to the caller — otherwise a failed login leaves us with a
2958
+ // bare "exit 1" and no diagnostic.
2959
+ "printenv OPENAI_API_KEY | env -u XDG_CONFIG_HOME codex login --with-api-key 2>&1"
2823
2960
  ].join("; "),
2824
2961
  Object.keys(extraEnv).length > 0 ? extraEnv : void 0
2825
2962
  );
@@ -2925,12 +3062,26 @@ async function setupCodex(request) {
2925
3062
  ...sharedTarget.env,
2926
3063
  ...options.provider?.env ?? {}
2927
3064
  });
3065
+ const { artifacts: serverArtifacts } = buildArtifactsFor(sharedTarget);
3066
+ const { artifacts: skillArtifacts2, installCommands: installCommands2 } = await prepareSkillArtifacts(provider, options.skills, target2.layout);
3067
+ const daemonInfo = {
3068
+ port: REMOTE_CODEX_APP_SERVER_PORT,
3069
+ healthPath: "/readyz"
3070
+ };
3071
+ const setupId2 = computeSetupId({
3072
+ artifacts: [...serverArtifacts, ...skillArtifacts2],
3073
+ installCommands: installCommands2,
3074
+ daemon: daemonInfo
3075
+ });
3076
+ if (await preflightSetup(sharedTarget, setupId2, daemonInfo)) {
3077
+ debugCodex("codex remote setup() preflight hit \u2014 skipping");
3078
+ return;
3079
+ }
2928
3080
  await time(
2929
3081
  debugCodex,
2930
3082
  "ensureCodexLogin",
2931
3083
  () => ensureCodexLoginViaConfig(request, sharedTarget)
2932
3084
  );
2933
- const { artifacts: serverArtifacts } = buildArtifactsFor(sharedTarget);
2934
3085
  await applyDifferentialSetup(sharedTarget, serverArtifacts, []);
2935
3086
  const binary = options.provider?.binary ?? "codex";
2936
3087
  const pidFilePath = path9.posix.join(
@@ -2978,28 +3129,34 @@ async function setupCodex(request) {
2978
3129
  );
2979
3130
  }
2980
3131
  try {
2981
- const { artifacts: skillArtifacts2, installCommands: installCommands2 } = await prepareSkillArtifacts(provider, options.skills, target2.layout);
2982
3132
  await applyDifferentialSetup(target2, skillArtifacts2, installCommands2);
2983
3133
  } catch (error) {
2984
3134
  await target2.cleanup().catch(() => void 0);
2985
3135
  throw error;
2986
3136
  }
3137
+ await markSetupComplete(sharedTarget, setupId2);
2987
3138
  return;
2988
3139
  }
2989
3140
  const target = await createSetupTarget(provider, "shared-setup", options);
3141
+ const { artifacts: skillArtifacts, installCommands } = await prepareSkillArtifacts(provider, options.skills, target.layout);
3142
+ const { artifacts: configArtifacts } = buildArtifactsFor(target);
3143
+ const allArtifacts = [...skillArtifacts, ...configArtifacts];
3144
+ const setupId = computeSetupId({
3145
+ artifacts: allArtifacts,
3146
+ installCommands
3147
+ });
3148
+ if (await preflightSetup(target, setupId)) {
3149
+ debugCodex("codex local setup() preflight hit \u2014 skipping");
3150
+ return;
3151
+ }
2990
3152
  try {
2991
3153
  await ensureCodexLoginViaConfig(request, target);
2992
3154
  } catch (error) {
2993
3155
  await target.cleanup().catch(() => void 0);
2994
3156
  throw error;
2995
3157
  }
2996
- const { artifacts: skillArtifacts, installCommands } = await prepareSkillArtifacts(provider, options.skills, target.layout);
2997
- const { artifacts: configArtifacts } = buildArtifactsFor(target);
2998
- await applyDifferentialSetup(
2999
- target,
3000
- [...skillArtifacts, ...configArtifacts],
3001
- installCommands
3002
- );
3158
+ await applyDifferentialSetup(target, allArtifacts, installCommands);
3159
+ await markSetupComplete(target, setupId);
3003
3160
  }
3004
3161
  async function createRuntime(request, inputParts) {
3005
3162
  const options = request.options;
@@ -3609,12 +3766,11 @@ var OPEN_CODE_REASONING_LEVELS = ["low", "medium", "high", "xhigh"];
3609
3766
  function openCodeAgentSlug(reasoning) {
3610
3767
  return reasoning ? `agentbox-${reasoning}` : "agentbox";
3611
3768
  }
3612
- function buildOpenCodeConfig(options, systemPrompt, interactiveApproval) {
3769
+ function buildOpenCodeConfig(options, interactiveApproval) {
3613
3770
  const mcpConfig = buildOpenCodeMcpConfig(options.mcps);
3614
3771
  const commandsConfig = buildOpenCodeCommandsConfig(options.commands);
3615
3772
  const baseAgent = {
3616
3773
  mode: "primary",
3617
- prompt: systemPrompt,
3618
3774
  permission: buildOpenCodePermissionConfig(interactiveApproval),
3619
3775
  tools: {
3620
3776
  write: true,
@@ -3651,19 +3807,6 @@ async function ensureSandboxOpenCodeServer(request) {
3651
3807
  const sandbox = request.options.sandbox;
3652
3808
  const options = request.options;
3653
3809
  const port = SANDBOX_OPENCODE_PORT;
3654
- const healthCheck = await time(
3655
- debugOpencode,
3656
- "health probe (warm path)",
3657
- () => sandbox.run(
3658
- `curl -fsS http://127.0.0.1:${port}/global/health >/dev/null 2>&1`,
3659
- { cwd: options.cwd, timeoutMs: 5e3 }
3660
- )
3661
- );
3662
- if (healthCheck.exitCode === 0) {
3663
- debugOpencode("opencode server already running \u2014 reusing");
3664
- return;
3665
- }
3666
- debugOpencode("opencode server not running \u2014 cold-spawning");
3667
3810
  const plugins = assertHooksSupported(request.provider, options);
3668
3811
  assertCommandsSupported(request.provider, options.commands);
3669
3812
  const interactiveApproval = isInteractiveApproval(options);
@@ -3684,26 +3827,32 @@ async function ensureSandboxOpenCodeServer(request) {
3684
3827
  const configPath = path10.join(target.layout.opencodeDir, "agentbox.json");
3685
3828
  const openCodeConfig = buildOpenCodeConfig(
3686
3829
  options,
3687
- request.config.systemPrompt ?? "",
3688
3830
  interactiveApproval
3689
3831
  );
3832
+ const allArtifacts = [
3833
+ ...skillArtifacts,
3834
+ ...pluginArtifacts,
3835
+ {
3836
+ path: configPath,
3837
+ content: JSON.stringify(openCodeConfig, null, 2)
3838
+ }
3839
+ ];
3840
+ const daemonInfo = { port, healthPath: "/global/health" };
3841
+ const setupId = computeSetupId({
3842
+ artifacts: allArtifacts,
3843
+ installCommands,
3844
+ daemon: daemonInfo
3845
+ });
3846
+ if (await preflightSetup(target, setupId, daemonInfo)) {
3847
+ debugOpencode("opencode setup() preflight hit \u2014 skipping");
3848
+ return;
3849
+ }
3690
3850
  const commonEnv = {
3691
3851
  OPENCODE_CONFIG: configPath,
3692
3852
  OPENCODE_CONFIG_DIR: target.layout.opencodeDir,
3693
3853
  OPENCODE_DISABLE_DEFAULT_PLUGINS: "true"
3694
3854
  };
3695
- await applyDifferentialSetup(
3696
- target,
3697
- [
3698
- ...skillArtifacts,
3699
- ...pluginArtifacts,
3700
- {
3701
- path: configPath,
3702
- content: JSON.stringify(openCodeConfig, null, 2)
3703
- }
3704
- ],
3705
- installCommands
3706
- );
3855
+ await applyDifferentialSetup(target, allArtifacts, installCommands);
3707
3856
  const binary = options.provider?.binary ?? "opencode";
3708
3857
  const pidFilePath = path10.posix.join(
3709
3858
  target.layout.rootDir,
@@ -3766,6 +3915,7 @@ async function ensureSandboxOpenCodeServer(request) {
3766
3915
  `OpenCode server did not become ready within ${SANDBOX_OPENCODE_READY_TIMEOUT_MS}ms.`
3767
3916
  );
3768
3917
  });
3918
+ await markSetupComplete(target, setupId);
3769
3919
  });
3770
3920
  }
3771
3921
  async function ensureLocalOpenCodeServer(request) {
@@ -3798,28 +3948,28 @@ async function ensureLocalOpenCodeServer(request) {
3798
3948
  target.layout.opencodeDir
3799
3949
  );
3800
3950
  const configPath = path10.join(target.layout.opencodeDir, "agentbox.json");
3801
- const openCodeConfig = buildOpenCodeConfig(
3802
- options,
3803
- request.config.systemPrompt ?? "",
3804
- interactiveApproval
3805
- );
3951
+ const openCodeConfig = buildOpenCodeConfig(options, interactiveApproval);
3806
3952
  const commonEnv = {
3807
3953
  OPENCODE_CONFIG: configPath,
3808
3954
  OPENCODE_CONFIG_DIR: target.layout.opencodeDir,
3809
3955
  OPENCODE_DISABLE_DEFAULT_PLUGINS: "true"
3810
3956
  };
3811
- await applyDifferentialSetup(
3812
- target,
3813
- [
3814
- ...skillArtifacts,
3815
- ...pluginArtifacts,
3816
- {
3817
- path: configPath,
3818
- content: JSON.stringify(openCodeConfig, null, 2)
3819
- }
3820
- ],
3957
+ const allArtifacts = [
3958
+ ...skillArtifacts,
3959
+ ...pluginArtifacts,
3960
+ {
3961
+ path: configPath,
3962
+ content: JSON.stringify(openCodeConfig, null, 2)
3963
+ }
3964
+ ];
3965
+ const setupId = computeSetupId({
3966
+ artifacts: allArtifacts,
3821
3967
  installCommands
3822
- );
3968
+ });
3969
+ const preflightHit = await preflightSetup(target, setupId);
3970
+ if (!preflightHit) {
3971
+ await applyDifferentialSetup(target, allArtifacts, installCommands);
3972
+ }
3823
3973
  spawnCommand({
3824
3974
  command: options.provider?.binary ?? "opencode",
3825
3975
  args: [
@@ -3841,6 +3991,7 @@ async function ensureLocalOpenCodeServer(request) {
3841
3991
  `http://127.0.0.1:${LOCAL_OPENCODE_PORT}/global/health`,
3842
3992
  { timeoutMs: LOCAL_OPENCODE_READY_TIMEOUT_MS }
3843
3993
  );
3994
+ await markSetupComplete(target, setupId);
3844
3995
  }
3845
3996
  async function setupOpenCode(request) {
3846
3997
  if (request.options.sandbox) {
@@ -4183,6 +4334,11 @@ var OpenCodeAgentAdapter = class {
4183
4334
  },
4184
4335
  body: JSON.stringify({
4185
4336
  ...request.run.model ? { model: toOpenCodeModel(request.run.model) } : {},
4337
+ // Per-message system prompt — keeps systemPrompt out of
4338
+ // the on-disk agent config so changing it doesn't
4339
+ // invalidate setupId. Sent on every dispatch (the field
4340
+ // is per-message, not session-sticky).
4341
+ ...request.run.systemPrompt ? { system: request.run.systemPrompt } : {},
4186
4342
  agent: agentSlug,
4187
4343
  parts
4188
4344
  })
@@ -4651,7 +4807,9 @@ var AgentRunController = class {
4651
4807
  }
4652
4808
  this.settled = true;
4653
4809
  this.clearPendingPermissions(
4654
- new Error("Agent run was cancelled before pending permission requests resolved.")
4810
+ new Error(
4811
+ "Agent run was cancelled before pending permission requests resolved."
4812
+ )
4655
4813
  );
4656
4814
  if (result?.text) {
4657
4815
  this.text = result.text;
@@ -4768,7 +4926,7 @@ var Agent = class {
4768
4926
  * second `setup()` against the same sandbox does ~one round-trip of
4769
4927
  * work.
4770
4928
  */
4771
- async setup(config = {}) {
4929
+ async setup() {
4772
4930
  if (this.setupPromise) {
4773
4931
  await this.setupPromise;
4774
4932
  return;
@@ -4778,8 +4936,7 @@ var Agent = class {
4778
4936
  this.setupPromise = (async () => {
4779
4937
  await this.adapter.setup({
4780
4938
  provider: this.provider,
4781
- options: this.options,
4782
- config
4939
+ options: this.options
4783
4940
  });
4784
4941
  debugAgent(
4785
4942
  "setup() returned provider=%s after %dms",
@@ -4801,14 +4958,10 @@ var Agent = class {
4801
4958
  );
4802
4959
  }
4803
4960
  if (runConfig.forkSessionId && !runConfig.forkAtMessageId) {
4804
- throw new Error(
4805
- "AgentRunConfig.forkSessionId requires forkAtMessageId."
4806
- );
4961
+ throw new Error("AgentRunConfig.forkSessionId requires forkAtMessageId.");
4807
4962
  }
4808
4963
  if (runConfig.forkAtMessageId && !runConfig.forkSessionId) {
4809
- throw new Error(
4810
- "AgentRunConfig.forkAtMessageId requires forkSessionId."
4811
- );
4964
+ throw new Error("AgentRunConfig.forkAtMessageId requires forkSessionId.");
4812
4965
  }
4813
4966
  const runId = runConfig.runId ?? randomUUID2();
4814
4967
  const streamCalledAt = Date.now();
@@ -69,7 +69,7 @@ var SandboxAdapter = class {
69
69
  * `provision()` implementations. Stays `false` until `findOrProvision()`
70
70
  * has resolved.
71
71
  */
72
- wasFoundFlag = false;
72
+ isWarmFlag = false;
73
73
  constructor(options) {
74
74
  this.options = options;
75
75
  this.baseEnv = { ...options.env ?? {} };
@@ -168,8 +168,8 @@ var SandboxAdapter = class {
168
168
  * idempotent setup that the previous run already performed (e.g.
169
169
  * `agent.setup()`). Always `false` before `findOrProvision()` resolves.
170
170
  */
171
- get wasFound() {
172
- return this.wasFoundFlag;
171
+ get isWarm() {
172
+ return this.isWarmFlag;
173
173
  }
174
174
  /**
175
175
  * Headers that callers should attach to HTTP / WebSocket requests they make
@@ -242,8 +242,9 @@ var DaytonaSandboxAdapter = class extends SandboxAdapter {
242
242
  const existing = await this.findMatchingSandbox();
243
243
  if (existing) {
244
244
  this.sandbox = existing;
245
+ const isWarm = existing.state === "started";
245
246
  await existing.start();
246
- this.wasFoundFlag = true;
247
+ this.isWarmFlag = isWarm;
247
248
  return;
248
249
  }
249
250
  const labels = this.getLabels();
@@ -518,7 +519,7 @@ var E2bSandboxAdapter = class extends SandboxAdapter {
518
519
  const existing = await this.findMatchingSandbox();
519
520
  if (existing) {
520
521
  this.sandbox = existing;
521
- this.wasFoundFlag = true;
522
+ this.isWarmFlag = true;
522
523
  return;
523
524
  }
524
525
  const template = resolveSandboxImage(this.options.image);
@@ -1352,7 +1353,7 @@ var ModalSandboxAdapter = class extends SandboxAdapter {
1352
1353
  const existing = await this.findMatchingSandbox();
1353
1354
  if (existing) {
1354
1355
  this.sandbox = existing;
1355
- this.wasFoundFlag = true;
1356
+ this.isWarmFlag = true;
1356
1357
  return;
1357
1358
  }
1358
1359
  const appName = this.options.provider?.appName ?? "agentbox";
@@ -2102,8 +2103,8 @@ var Sandbox = class {
2102
2103
  * idempotent setup that the previous run already performed (e.g.
2103
2104
  * `agent.setup()`). Always `false` before `findOrProvision()` resolves.
2104
2105
  */
2105
- get wasFound() {
2106
- return this.adapter.wasFound;
2106
+ get isWarm() {
2107
+ return this.adapter.isWarm;
2107
2108
  }
2108
2109
  /**
2109
2110
  * Attach to an existing tagged sandbox or create a new one. Must be
@@ -1,6 +1,6 @@
1
- export { A as AISDKEvent, S as MessageCompletedEvent, T as MessageInjectedEvent, U as MessageStartedEvent, V as NormalizedAgentEvent, W as NormalizedAgentEventBase, X as NormalizedAgentEventType, a1 as PermissionRequestedEvent, a2 as PermissionResolvedEvent, a3 as RawAgentEvent, a4 as ReasoningDeltaEvent, a6 as RunCancelledEvent, a7 as RunCompletedEvent, a8 as RunErrorEvent, a9 as RunStartedEvent, aa as TextDeltaEvent, ac as ToolCallCompletedEvent, ad as ToolCallDeltaEvent, ae as ToolCallStartedEvent, ah as createNormalizedEvent, ai as normalizeRawAgentEvent, aj as toAISDKEvent, ak as toAISDKStream } from '../types-Dj_HCr6Q.js';
1
+ export { A as AISDKEvent, R as MessageCompletedEvent, S as MessageInjectedEvent, T as MessageStartedEvent, U as NormalizedAgentEvent, V as NormalizedAgentEventBase, W as NormalizedAgentEventType, a0 as PermissionRequestedEvent, a1 as PermissionResolvedEvent, a2 as RawAgentEvent, a3 as ReasoningDeltaEvent, a5 as RunCancelledEvent, a6 as RunCompletedEvent, a7 as RunErrorEvent, a8 as RunStartedEvent, a9 as TextDeltaEvent, ab as ToolCallCompletedEvent, ac as ToolCallDeltaEvent, ad as ToolCallStartedEvent, ag as createNormalizedEvent, ah as normalizeRawAgentEvent, ai as toAISDKEvent, aj as toAISDKStream } from '../types-Ozo1rHKs.js';
2
2
  import { AgentProvider } from '../enums.js';
3
- import '../Sandbox-CByFJI8X.js';
3
+ import '../Sandbox-K6VNqKeo.js';
4
4
  import 'e2b';
5
5
  import '@vercel/sandbox';
6
6
  import '@daytonaio/sdk';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { A as AISDKEvent, a as AgentApprovalMode, b as AgentAttachRequest, c as AgentCommandConfig, d as AgentCostData, e as AgentExecutionRequest, f as AgentLocalMcpConfig, g as AgentMcpConfig, h as AgentOptions, i as AgentOptionsBase, j as AgentOptionsMap, k as AgentPermissionDecision, l as AgentPermissionKind, m as AgentPermissionResponse, n as AgentProviderAdapter, o as AgentProviderName, p as AgentReasoningEffort, q as AgentRemoteMcpConfig, r as AgentResult, s as AgentRun, t as AgentRunConfig, u as AgentRunSink, v as AgentSetupConfig, w as AgentSetupRequest, x as AgentSkillConfig, y as AgentSubAgentConfig, z as AttachedRun, C as ClaudeCodeAgentOptions, B as ClaudeCodeHookConfig, D as ClaudeCodeHookEvent, E as ClaudeCodeHookHandler, F as ClaudeCodeHookMatcherGroup, G as ClaudeCodeHooksConfig, H as ClaudeCodeProviderOptions, I as CodexAgentOptions, J as CodexCommandHook, K as CodexHookEvent, L as CodexHookMatcherGroup, M as CodexHooksConfig, N as CodexProviderOptions, O as DataContent, P as EmbeddedSkillConfig, Q as FilePart, R as ImagePart, S as MessageCompletedEvent, T as MessageInjectedEvent, U as MessageStartedEvent, V as NormalizedAgentEvent, W as NormalizedAgentEventBase, X as NormalizedAgentEventType, Y as OpenCodeAgentOptions, Z as OpenCodePluginConfig, _ as OpenCodePluginEvent, $ as OpenCodePluginHookConfig, a0 as OpenCodeProviderOptions, a1 as PermissionRequestedEvent, a2 as PermissionResolvedEvent, a3 as RawAgentEvent, a4 as ReasoningDeltaEvent, a5 as RepoSkillConfig, a6 as RunCancelledEvent, a7 as RunCompletedEvent, a8 as RunErrorEvent, a9 as RunStartedEvent, aa as TextDeltaEvent, ab as TextPart, ac as ToolCallCompletedEvent, ad as ToolCallDeltaEvent, ae as ToolCallStartedEvent, af as UserContent, ag as UserContentPart, ah as createNormalizedEvent, ai as normalizeRawAgentEvent, aj as toAISDKEvent, ak as toAISDKStream } from './types-Dj_HCr6Q.js';
1
+ export { A as AISDKEvent, a as AgentApprovalMode, b as AgentAttachRequest, c as AgentCommandConfig, d as AgentCostData, e as AgentExecutionRequest, f as AgentLocalMcpConfig, g as AgentMcpConfig, h as AgentOptions, i as AgentOptionsBase, j as AgentOptionsMap, k as AgentPermissionDecision, l as AgentPermissionKind, m as AgentPermissionResponse, n as AgentProviderAdapter, o as AgentProviderName, p as AgentReasoningEffort, q as AgentRemoteMcpConfig, r as AgentResult, s as AgentRun, t as AgentRunConfig, u as AgentRunSink, v as AgentSetupRequest, w as AgentSkillConfig, x as AgentSubAgentConfig, y as AttachedRun, C as ClaudeCodeAgentOptions, z as ClaudeCodeHookConfig, B as ClaudeCodeHookEvent, D as ClaudeCodeHookHandler, E as ClaudeCodeHookMatcherGroup, F as ClaudeCodeHooksConfig, G as ClaudeCodeProviderOptions, H as CodexAgentOptions, I as CodexCommandHook, J as CodexHookEvent, K as CodexHookMatcherGroup, L as CodexHooksConfig, M as CodexProviderOptions, N as DataContent, O as EmbeddedSkillConfig, P as FilePart, Q as ImagePart, R as MessageCompletedEvent, S as MessageInjectedEvent, T as MessageStartedEvent, U as NormalizedAgentEvent, V as NormalizedAgentEventBase, W as NormalizedAgentEventType, X as OpenCodeAgentOptions, Y as OpenCodePluginConfig, Z as OpenCodePluginEvent, _ as OpenCodePluginHookConfig, $ as OpenCodeProviderOptions, a0 as PermissionRequestedEvent, a1 as PermissionResolvedEvent, a2 as RawAgentEvent, a3 as ReasoningDeltaEvent, a4 as RepoSkillConfig, a5 as RunCancelledEvent, a6 as RunCompletedEvent, a7 as RunErrorEvent, a8 as RunStartedEvent, a9 as TextDeltaEvent, aa as TextPart, ab as ToolCallCompletedEvent, ac as ToolCallDeltaEvent, ad as ToolCallStartedEvent, ae as UserContent, af as UserContentPart, ag as createNormalizedEvent, ah as normalizeRawAgentEvent, ai as toAISDKEvent, aj as toAISDKStream } from './types-Ozo1rHKs.js';
2
2
  export { AGENT_RESERVED_PORTS, Agent, collectAllAgentReservedPorts } from './agents/index.js';
3
- export { A as AsyncCommandHandle, C as CommandEvent, a as CommandOptions, b as CommandResult, D as DaytonaProviderOptions, c as DaytonaSandboxOptions, E as E2bProviderOptions, d as E2bSandboxOptions, G as GitCloneOptions, L as LocalDockerProviderOptions, e as LocalDockerSandboxOptions, M as ModalProviderOptions, f as ModalSandboxOptions, S as Sandbox, g as SandboxDescriptor, h as SandboxListOptions, i as SandboxOptions, j as SandboxOptionsBase, k as SandboxOptionsMap, l as SandboxProviderName, m as SandboxRaw, n as SandboxRawMap, o as SandboxResourceSpec, T as TarballEntry, V as VercelGitSource, p as VercelProviderOptions, q as VercelSandboxOptions } from './Sandbox-CByFJI8X.js';
3
+ export { A as AsyncCommandHandle, C as CommandEvent, a as CommandOptions, b as CommandResult, D as DaytonaProviderOptions, c as DaytonaSandboxOptions, E as E2bProviderOptions, d as E2bSandboxOptions, G as GitCloneOptions, L as LocalDockerProviderOptions, e as LocalDockerSandboxOptions, M as ModalProviderOptions, f as ModalSandboxOptions, S as Sandbox, g as SandboxDescriptor, h as SandboxListOptions, i as SandboxOptions, j as SandboxOptionsBase, k as SandboxOptionsMap, l as SandboxProviderName, m as SandboxRaw, n as SandboxRawMap, o as SandboxResourceSpec, T as TarballEntry, V as VercelGitSource, p as VercelProviderOptions, q as VercelSandboxOptions } from './Sandbox-K6VNqKeo.js';
4
4
  export { SandboxAdapter, buildGitCloneCommand } from './sandboxes/index.js';
5
5
  export { ProviderLogAssembler } from './events/index.js';
6
6
  export { AgentProvider, SandboxProvider } from './enums.js';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Agent
3
- } from "./chunk-YAMFJAU6.js";
3
+ } from "./chunk-GBM7LKZF.js";
4
4
  import {
5
5
  ProviderLogAssembler,
6
6
  createNormalizedEvent,
@@ -12,7 +12,7 @@ import {
12
12
  Sandbox,
13
13
  SandboxAdapter,
14
14
  buildGitCloneCommand
15
- } from "./chunk-DDGBIACF.js";
15
+ } from "./chunk-QNNAAVJV.js";
16
16
  import {
17
17
  AGENT_RESERVED_PORTS,
18
18
  collectAllAgentReservedPorts
@@ -1,5 +1,5 @@
1
- import { l as SandboxProviderName, i as SandboxOptions, a as CommandOptions, b as CommandResult, A as AsyncCommandHandle, h as SandboxListOptions, g as SandboxDescriptor, T as TarballEntry, G as GitCloneOptions } from '../Sandbox-CByFJI8X.js';
2
- export { C as CommandEvent, D as DaytonaProviderOptions, c as DaytonaSandboxOptions, E as E2bProviderOptions, d as E2bSandboxOptions, L as LocalDockerProviderOptions, e as LocalDockerSandboxOptions, M as ModalProviderOptions, f as ModalSandboxOptions, S as Sandbox, j as SandboxOptionsBase, k as SandboxOptionsMap, m as SandboxRaw, n as SandboxRawMap, o as SandboxResourceSpec, V as VercelGitSource, p as VercelProviderOptions, q as VercelSandboxOptions } from '../Sandbox-CByFJI8X.js';
1
+ import { l as SandboxProviderName, i as SandboxOptions, a as CommandOptions, b as CommandResult, A as AsyncCommandHandle, h as SandboxListOptions, g as SandboxDescriptor, T as TarballEntry, G as GitCloneOptions } from '../Sandbox-K6VNqKeo.js';
2
+ export { C as CommandEvent, D as DaytonaProviderOptions, c as DaytonaSandboxOptions, E as E2bProviderOptions, d as E2bSandboxOptions, L as LocalDockerProviderOptions, e as LocalDockerSandboxOptions, M as ModalProviderOptions, f as ModalSandboxOptions, S as Sandbox, j as SandboxOptionsBase, k as SandboxOptionsMap, m as SandboxRaw, n as SandboxRawMap, o as SandboxResourceSpec, V as VercelGitSource, p as VercelProviderOptions, q as VercelSandboxOptions } from '../Sandbox-K6VNqKeo.js';
3
3
  export { SandboxProvider } from '../enums.js';
4
4
  import 'e2b';
5
5
  import '@vercel/sandbox';
@@ -19,7 +19,7 @@ declare abstract class SandboxAdapter<TProvider extends SandboxProviderName = Sa
19
19
  * `provision()` implementations. Stays `false` until `findOrProvision()`
20
20
  * has resolved.
21
21
  */
22
- protected wasFoundFlag: boolean;
22
+ protected isWarmFlag: boolean;
23
23
  constructor(options: TOptions);
24
24
  abstract get provider(): TProvider;
25
25
  abstract get raw(): TRaw | undefined;
@@ -74,7 +74,7 @@ declare abstract class SandboxAdapter<TProvider extends SandboxProviderName = Sa
74
74
  * idempotent setup that the previous run already performed (e.g.
75
75
  * `agent.setup()`). Always `false` before `findOrProvision()` resolves.
76
76
  */
77
- get wasFound(): boolean;
77
+ get isWarm(): boolean;
78
78
  /**
79
79
  * Headers that callers should attach to HTTP / WebSocket requests they make
80
80
  * against this sandbox's preview URL. Default is empty; providers like
@@ -2,7 +2,7 @@ import {
2
2
  Sandbox,
3
3
  SandboxAdapter,
4
4
  buildGitCloneCommand
5
- } from "../chunk-DDGBIACF.js";
5
+ } from "../chunk-QNNAAVJV.js";
6
6
  import "../chunk-AVXJMCBC.js";
7
7
  import "../chunk-NSJM57Z4.js";
8
8
  import {
@@ -1,5 +1,5 @@
1
1
  import { AgentProvider } from './enums.js';
2
- import { S as Sandbox } from './Sandbox-CByFJI8X.js';
2
+ import { S as Sandbox } from './Sandbox-K6VNqKeo.js';
3
3
 
4
4
  interface RawAgentEvent<TPayload = unknown> {
5
5
  provider: string;
@@ -333,14 +333,6 @@ interface AgentRunConfig {
333
333
  forkAtMessageId?: string;
334
334
  reasoning?: AgentReasoningEffort;
335
335
  }
336
- /**
337
- * Subset of {@link AgentRunConfig} that needs to be committed at
338
- * `agent.setup()` time so the runtime can pre-bake artifacts that
339
- * reference it (codex `model_instructions_file`, opencode agent config,
340
- * etc.). Unlike `AgentRunConfig`, this never carries per-turn input or
341
- * a resumed session id.
342
- */
343
- type AgentSetupConfig = Pick<AgentRunConfig, "systemPrompt" | "model" | "reasoning">;
344
336
  type AgentApprovalMode = "auto" | "interactive";
345
337
  type AgentPermissionKind = "bash" | "edit" | "tool" | "network" | "file-change" | "unknown";
346
338
  type AgentPermissionDecision = "allow" | "deny";
@@ -462,7 +454,6 @@ interface AgentRunSink {
462
454
  interface AgentSetupRequest<P extends AgentProviderName = AgentProviderName> {
463
455
  provider: P;
464
456
  options: AgentOptions<P>;
465
- config: AgentSetupConfig;
466
457
  }
467
458
  interface AgentExecutionRequest<P extends AgentProviderName = AgentProviderName> {
468
459
  runId: string;
@@ -554,4 +545,4 @@ interface AgentProviderAdapter<P extends AgentProviderName = AgentProviderName>
554
545
  attachSendMessage(request: AgentAttachRequest<P>, content: UserContent): Promise<void>;
555
546
  }
556
547
 
557
- export { type OpenCodePluginHookConfig as $, type AISDKEvent as A, type ClaudeCodeHookConfig as B, type ClaudeCodeAgentOptions as C, type ClaudeCodeHookEvent as D, type ClaudeCodeHookHandler as E, type ClaudeCodeHookMatcherGroup as F, type ClaudeCodeHooksConfig as G, type ClaudeCodeProviderOptions as H, type CodexAgentOptions as I, type CodexCommandHook as J, type CodexHookEvent as K, type CodexHookMatcherGroup as L, type CodexHooksConfig as M, type CodexProviderOptions as N, type DataContent as O, type EmbeddedSkillConfig as P, type FilePart as Q, type ImagePart as R, type MessageCompletedEvent as S, type MessageInjectedEvent as T, type MessageStartedEvent as U, type NormalizedAgentEvent as V, type NormalizedAgentEventBase as W, type NormalizedAgentEventType as X, type OpenCodeAgentOptions as Y, type OpenCodePluginConfig as Z, type OpenCodePluginEvent as _, type AgentApprovalMode as a, type OpenCodeProviderOptions as a0, type PermissionRequestedEvent as a1, type PermissionResolvedEvent as a2, type RawAgentEvent as a3, type ReasoningDeltaEvent as a4, type RepoSkillConfig as a5, type RunCancelledEvent as a6, type RunCompletedEvent as a7, type RunErrorEvent as a8, type RunStartedEvent as a9, type TextDeltaEvent as aa, type TextPart as ab, type ToolCallCompletedEvent as ac, type ToolCallDeltaEvent as ad, type ToolCallStartedEvent as ae, type UserContent as af, type UserContentPart as ag, createNormalizedEvent as ah, normalizeRawAgentEvent as ai, toAISDKEvent as aj, toAISDKStream as ak, type AgentAttachRequest as b, type AgentCommandConfig as c, type AgentCostData as d, type AgentExecutionRequest as e, type AgentLocalMcpConfig as f, type AgentMcpConfig as g, type AgentOptions as h, type AgentOptionsBase as i, type AgentOptionsMap as j, type AgentPermissionDecision as k, type AgentPermissionKind as l, type AgentPermissionResponse as m, type AgentProviderAdapter as n, type AgentProviderName as o, type AgentReasoningEffort as p, type AgentRemoteMcpConfig as q, type AgentResult as r, type AgentRun as s, type AgentRunConfig as t, type AgentRunSink as u, type AgentSetupConfig as v, type AgentSetupRequest as w, type AgentSkillConfig as x, type AgentSubAgentConfig as y, type AttachedRun as z };
548
+ export { type OpenCodeProviderOptions as $, type AISDKEvent as A, type ClaudeCodeHookEvent as B, type ClaudeCodeAgentOptions as C, type ClaudeCodeHookHandler as D, type ClaudeCodeHookMatcherGroup as E, type ClaudeCodeHooksConfig as F, type ClaudeCodeProviderOptions as G, type CodexAgentOptions as H, type CodexCommandHook as I, type CodexHookEvent as J, type CodexHookMatcherGroup as K, type CodexHooksConfig as L, type CodexProviderOptions as M, type DataContent as N, type EmbeddedSkillConfig as O, type FilePart as P, type ImagePart as Q, type MessageCompletedEvent as R, type MessageInjectedEvent as S, type MessageStartedEvent as T, type NormalizedAgentEvent as U, type NormalizedAgentEventBase as V, type NormalizedAgentEventType as W, type OpenCodeAgentOptions as X, type OpenCodePluginConfig as Y, type OpenCodePluginEvent as Z, type OpenCodePluginHookConfig as _, type AgentApprovalMode as a, type PermissionRequestedEvent as a0, type PermissionResolvedEvent as a1, type RawAgentEvent as a2, type ReasoningDeltaEvent as a3, type RepoSkillConfig as a4, type RunCancelledEvent as a5, type RunCompletedEvent as a6, type RunErrorEvent as a7, type RunStartedEvent as a8, type TextDeltaEvent as a9, type TextPart as aa, type ToolCallCompletedEvent as ab, type ToolCallDeltaEvent as ac, type ToolCallStartedEvent as ad, type UserContent as ae, type UserContentPart as af, createNormalizedEvent as ag, normalizeRawAgentEvent as ah, toAISDKEvent as ai, toAISDKStream as aj, type AgentAttachRequest as b, type AgentCommandConfig as c, type AgentCostData as d, type AgentExecutionRequest as e, type AgentLocalMcpConfig as f, type AgentMcpConfig as g, type AgentOptions as h, type AgentOptionsBase as i, type AgentOptionsMap as j, type AgentPermissionDecision as k, type AgentPermissionKind as l, type AgentPermissionResponse as m, type AgentProviderAdapter as n, type AgentProviderName as o, type AgentReasoningEffort as p, type AgentRemoteMcpConfig as q, type AgentResult as r, type AgentRun as s, type AgentRunConfig as t, type AgentRunSink as u, type AgentSetupRequest as v, type AgentSkillConfig as w, type AgentSubAgentConfig as x, type AttachedRun as y, type ClaudeCodeHookConfig as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentbox-sdk",
3
- "version": "0.1.302",
3
+ "version": "0.1.303",
4
4
  "description": "Swappable coding agents and sandbox providers for Bun and TypeScript.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -58,7 +58,7 @@
58
58
  "bun": ">=1.1.0"
59
59
  },
60
60
  "dependencies": {
61
- "@daytonaio/sdk": "^0.161.0",
61
+ "@daytonaio/sdk": "^0.171.0",
62
62
  "@types/debug": "^4.1.13",
63
63
  "@vercel/sandbox": "2.0.0-beta.13",
64
64
  "debug": "^4.4.3",