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