@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/index.js CHANGED
@@ -16332,7 +16332,7 @@ function detectPrimaryProvider() {
16332
16332
 
16333
16333
  // src/a2a/subagent.ts
16334
16334
  init_agent_factory_registry();
16335
- var INHERIT_CREDENTIALS = /* @__PURE__ */ Symbol("theokit.subagent.inheritCredentials");
16335
+ var INHERIT_CREDENTIALS = /* @__PURE__ */ Symbol.for("theokit.subagent.inheritCredentials");
16336
16336
  function inheritSubAgentCredentials(tool, creds) {
16337
16337
  const sink = tool[INHERIT_CREDENTIALS];
16338
16338
  if (typeof sink === "function") sink(creds);
@@ -16395,6 +16395,13 @@ async function runChildAgent(spec, input, signal, maxSteps, inherited) {
16395
16395
  };
16396
16396
  const run = await agent.send(input, sendOptions);
16397
16397
  const result = await run.wait();
16398
+ if (result.status === "error") {
16399
+ const cause = result.error;
16400
+ throw new Error(
16401
+ `subagent "${spec.name}" run failed: ${cause?.message ?? "unknown error"}`,
16402
+ cause !== void 0 ? { cause } : void 0
16403
+ );
16404
+ }
16398
16405
  const text = result.result ?? "(no response)";
16399
16406
  return spec.includeToolResults === true ? text + await collectChildToolResults(run) : text;
16400
16407
  } finally {