@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.js CHANGED
@@ -3269,7 +3269,9 @@ function serializeAgents(agents2) {
3269
3269
  out[name] = {
3270
3270
  description: def.description,
3271
3271
  prompt: def.prompt,
3272
- ...def.model !== void 0 ? { model: def.model } : {}
3272
+ ...def.model !== void 0 ? { model: def.model } : {},
3273
+ ...def.tools !== void 0 ? { tools: def.tools } : {},
3274
+ ...def.sandbox !== void 0 ? { sandbox: def.sandbox } : {}
3273
3275
  };
3274
3276
  }
3275
3277
  return out;
@@ -6750,9 +6752,9 @@ function rejectMcp(fields, filename) {
6750
6752
  function resolveModel(fields, filename) {
6751
6753
  const modelId = asString(fields.model);
6752
6754
  const effort = asString(fields.reasoning_effort);
6753
- if (effort !== void 0 && modelId === void 0) {
6755
+ if (effort !== void 0 && (modelId === void 0 || modelId === "inherit")) {
6754
6756
  throw new ConfigurationError(
6755
- `Subagent ${filename}: reasoning_effort requires a model (effort is a model parameter)`,
6757
+ `Subagent ${filename}: reasoning_effort requires a concrete model (effort is a model parameter; an absent model or "inherit" cannot carry it)`,
6756
6758
  { code: "subagent_reasoning_effort_without_model" }
6757
6759
  );
6758
6760
  }
@@ -6771,7 +6773,9 @@ function resolveSandbox(fields, filename) {
6771
6773
  return fields.sandbox;
6772
6774
  }
6773
6775
  function asString(v) {
6774
- return typeof v === "string" ? v : void 0;
6776
+ if (typeof v !== "string") return void 0;
6777
+ const m = /^(["'])(.*)\1$/.exec(v);
6778
+ return m ? m[2] : v;
6775
6779
  }
6776
6780
  function toStringList(v) {
6777
6781
  if (Array.isArray(v)) return v.map((t) => t.trim()).filter((t) => t.length > 0);
@@ -13858,10 +13862,11 @@ ${lines.join("\n")}
13858
13862
  }
13859
13863
  function buildChildCreateOptions(spec, inherited) {
13860
13864
  const model = spec.model !== void 0 ? typeof spec.model === "string" ? { id: spec.model } : spec.model : inherited?.model;
13865
+ const sandbox = spec.sandbox ?? inherited?.sandbox;
13861
13866
  return {
13862
13867
  ...inherited?.apiKey !== void 0 ? { apiKey: inherited.apiKey } : {},
13863
13868
  ...model !== void 0 ? { model } : {},
13864
- ...spec.sandbox === true ? { local: { sandboxOptions: { enabled: true } } } : {},
13869
+ ...sandbox !== void 0 ? { local: { sandboxOptions: { enabled: sandbox } } } : {},
13865
13870
  ...inherited?.plugins !== void 0 ? { plugins: inherited.plugins } : {},
13866
13871
  systemPrompt: spec.instructions,
13867
13872
  tools: spec.tools ?? []
@@ -14037,10 +14042,12 @@ function declarativeSubagentTools(agents2, parentTools) {
14037
14042
  }
14038
14043
  function bindParentCredentials(tools, agentOptions) {
14039
14044
  const parentPlugins = Array.isArray(agentOptions.plugins) ? agentOptions.plugins : void 0;
14045
+ const parentSandbox = agentOptions.local?.sandboxOptions?.enabled;
14040
14046
  const credentials = {
14041
14047
  ...agentOptions.apiKey !== void 0 ? { apiKey: agentOptions.apiKey } : {},
14042
14048
  ...typeof agentOptions.model === "object" ? { model: agentOptions.model } : {},
14043
- ...parentPlugins !== void 0 ? { plugins: parentPlugins } : {}
14049
+ ...parentPlugins !== void 0 ? { plugins: parentPlugins } : {},
14050
+ ...parentSandbox !== void 0 ? { sandbox: parentSandbox } : {}
14044
14051
  };
14045
14052
  for (const tool of tools) inheritSubAgentCredentials(tool, credentials);
14046
14053
  }