@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/index.js CHANGED
@@ -6124,7 +6124,9 @@ function serializeAgents(agents2) {
6124
6124
  out[name] = {
6125
6125
  description: def.description,
6126
6126
  prompt: def.prompt,
6127
- ...def.model !== void 0 ? { model: def.model } : {}
6127
+ ...def.model !== void 0 ? { model: def.model } : {},
6128
+ ...def.tools !== void 0 ? { tools: def.tools } : {},
6129
+ ...def.sandbox !== void 0 ? { sandbox: def.sandbox } : {}
6128
6130
  };
6129
6131
  }
6130
6132
  return out;
@@ -9332,9 +9334,9 @@ function rejectMcp(fields, filename) {
9332
9334
  function resolveModel(fields, filename) {
9333
9335
  const modelId = asString(fields.model);
9334
9336
  const effort = asString(fields.reasoning_effort);
9335
- if (effort !== void 0 && modelId === void 0) {
9337
+ if (effort !== void 0 && (modelId === void 0 || modelId === "inherit")) {
9336
9338
  throw new ConfigurationError(
9337
- `Subagent ${filename}: reasoning_effort requires a model (effort is a model parameter)`,
9339
+ `Subagent ${filename}: reasoning_effort requires a concrete model (effort is a model parameter; an absent model or "inherit" cannot carry it)`,
9338
9340
  { code: "subagent_reasoning_effort_without_model" }
9339
9341
  );
9340
9342
  }
@@ -9353,7 +9355,9 @@ function resolveSandbox(fields, filename) {
9353
9355
  return fields.sandbox;
9354
9356
  }
9355
9357
  function asString(v) {
9356
- return typeof v === "string" ? v : void 0;
9358
+ if (typeof v !== "string") return void 0;
9359
+ const m = /^(["'])(.*)\1$/.exec(v);
9360
+ return m ? m[2] : v;
9357
9361
  }
9358
9362
  function toStringList(v) {
9359
9363
  if (Array.isArray(v)) return v.map((t) => t.trim()).filter((t) => t.length > 0);
@@ -16461,10 +16465,11 @@ ${lines.join("\n")}
16461
16465
  }
16462
16466
  function buildChildCreateOptions(spec, inherited) {
16463
16467
  const model = spec.model !== void 0 ? typeof spec.model === "string" ? { id: spec.model } : spec.model : inherited?.model;
16468
+ const sandbox = spec.sandbox ?? inherited?.sandbox;
16464
16469
  return {
16465
16470
  ...inherited?.apiKey !== void 0 ? { apiKey: inherited.apiKey } : {},
16466
16471
  ...model !== void 0 ? { model } : {},
16467
- ...spec.sandbox === true ? { local: { sandboxOptions: { enabled: true } } } : {},
16472
+ ...sandbox !== void 0 ? { local: { sandboxOptions: { enabled: sandbox } } } : {},
16468
16473
  ...inherited?.plugins !== void 0 ? { plugins: inherited.plugins } : {},
16469
16474
  systemPrompt: spec.instructions,
16470
16475
  tools: spec.tools ?? []
@@ -16640,10 +16645,12 @@ function declarativeSubagentTools(agents2, parentTools) {
16640
16645
  }
16641
16646
  function bindParentCredentials(tools, agentOptions) {
16642
16647
  const parentPlugins = Array.isArray(agentOptions.plugins) ? agentOptions.plugins : void 0;
16648
+ const parentSandbox = agentOptions.local?.sandboxOptions?.enabled;
16643
16649
  const credentials = {
16644
16650
  ...agentOptions.apiKey !== void 0 ? { apiKey: agentOptions.apiKey } : {},
16645
16651
  ...typeof agentOptions.model === "object" ? { model: agentOptions.model } : {},
16646
- ...parentPlugins !== void 0 ? { plugins: parentPlugins } : {}
16652
+ ...parentPlugins !== void 0 ? { plugins: parentPlugins } : {},
16653
+ ...parentSandbox !== void 0 ? { sandbox: parentSandbox } : {}
16647
16654
  };
16648
16655
  for (const tool of tools) inheritSubAgentCredentials(tool, credentials);
16649
16656
  }