@theokit/sdk 4.2.9 → 4.2.10

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
@@ -13729,7 +13729,7 @@ function detectPrimaryProvider() {
13729
13729
 
13730
13730
  // src/a2a/subagent.ts
13731
13731
  init_agent_factory_registry();
13732
- var INHERIT_CREDENTIALS = /* @__PURE__ */ Symbol("theokit.subagent.inheritCredentials");
13732
+ var INHERIT_CREDENTIALS = /* @__PURE__ */ Symbol.for("theokit.subagent.inheritCredentials");
13733
13733
  function inheritSubAgentCredentials(tool, creds) {
13734
13734
  const sink = tool[INHERIT_CREDENTIALS];
13735
13735
  if (typeof sink === "function") sink(creds);
@@ -13792,6 +13792,13 @@ async function runChildAgent(spec, input, signal, maxSteps, inherited) {
13792
13792
  };
13793
13793
  const run = await agent.send(input, sendOptions);
13794
13794
  const result = await run.wait();
13795
+ if (result.status === "error") {
13796
+ const cause = result.error;
13797
+ throw new Error(
13798
+ `subagent "${spec.name}" run failed: ${cause?.message ?? "unknown error"}`,
13799
+ cause !== void 0 ? { cause } : void 0
13800
+ );
13801
+ }
13795
13802
  const text = result.result ?? "(no response)";
13796
13803
  return spec.includeToolResults === true ? text + await collectChildToolResults(run) : text;
13797
13804
  } finally {