@theokit/sdk 4.6.0 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/eval.cjs CHANGED
@@ -3272,7 +3272,9 @@ function serializeAgents(agents2) {
3272
3272
  out[name] = {
3273
3273
  description: def.description,
3274
3274
  prompt: def.prompt,
3275
- ...def.model !== void 0 ? { model: def.model } : {}
3275
+ ...def.model !== void 0 ? { model: def.model } : {},
3276
+ ...def.tools !== void 0 ? { tools: def.tools } : {},
3277
+ ...def.sandbox !== void 0 ? { sandbox: def.sandbox } : {}
3276
3278
  };
3277
3279
  }
3278
3280
  return out;
@@ -6753,9 +6755,9 @@ function rejectMcp(fields, filename) {
6753
6755
  function resolveModel(fields, filename) {
6754
6756
  const modelId = asString(fields.model);
6755
6757
  const effort = asString(fields.reasoning_effort);
6756
- if (effort !== void 0 && modelId === void 0) {
6758
+ if (effort !== void 0 && (modelId === void 0 || modelId === "inherit")) {
6757
6759
  throw new ConfigurationError(
6758
- `Subagent ${filename}: reasoning_effort requires a model (effort is a model parameter)`,
6760
+ `Subagent ${filename}: reasoning_effort requires a concrete model (effort is a model parameter; an absent model or "inherit" cannot carry it)`,
6759
6761
  { code: "subagent_reasoning_effort_without_model" }
6760
6762
  );
6761
6763
  }
@@ -6774,7 +6776,9 @@ function resolveSandbox(fields, filename) {
6774
6776
  return fields.sandbox;
6775
6777
  }
6776
6778
  function asString(v) {
6777
- return typeof v === "string" ? v : void 0;
6779
+ if (typeof v !== "string") return void 0;
6780
+ const m = /^(["'])(.*)\1$/.exec(v);
6781
+ return m ? m[2] : v;
6778
6782
  }
6779
6783
  function toStringList(v) {
6780
6784
  if (Array.isArray(v)) return v.map((t) => t.trim()).filter((t) => t.length > 0);
@@ -13861,10 +13865,11 @@ ${lines.join("\n")}
13861
13865
  }
13862
13866
  function buildChildCreateOptions(spec, inherited) {
13863
13867
  const model = spec.model !== void 0 ? typeof spec.model === "string" ? { id: spec.model } : spec.model : inherited?.model;
13868
+ const sandbox = spec.sandbox ?? inherited?.sandbox;
13864
13869
  return {
13865
13870
  ...inherited?.apiKey !== void 0 ? { apiKey: inherited.apiKey } : {},
13866
13871
  ...model !== void 0 ? { model } : {},
13867
- ...spec.sandbox === true ? { local: { sandboxOptions: { enabled: true } } } : {},
13872
+ ...sandbox !== void 0 ? { local: { sandboxOptions: { enabled: sandbox } } } : {},
13868
13873
  ...inherited?.plugins !== void 0 ? { plugins: inherited.plugins } : {},
13869
13874
  systemPrompt: spec.instructions,
13870
13875
  tools: spec.tools ?? []
@@ -14040,10 +14045,12 @@ function declarativeSubagentTools(agents2, parentTools) {
14040
14045
  }
14041
14046
  function bindParentCredentials(tools, agentOptions) {
14042
14047
  const parentPlugins = Array.isArray(agentOptions.plugins) ? agentOptions.plugins : void 0;
14048
+ const parentSandbox = agentOptions.local?.sandboxOptions?.enabled;
14043
14049
  const credentials = {
14044
14050
  ...agentOptions.apiKey !== void 0 ? { apiKey: agentOptions.apiKey } : {},
14045
14051
  ...typeof agentOptions.model === "object" ? { model: agentOptions.model } : {},
14046
- ...parentPlugins !== void 0 ? { plugins: parentPlugins } : {}
14052
+ ...parentPlugins !== void 0 ? { plugins: parentPlugins } : {},
14053
+ ...parentSandbox !== void 0 ? { sandbox: parentSandbox } : {}
14047
14054
  };
14048
14055
  for (const tool of tools) inheritSubAgentCredentials(tool, credentials);
14049
14056
  }