@theokit/agents 4.29.1 → 4.30.0

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/bridge.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  streamAgentUIMessages,
45
45
  toAgentFactory,
46
46
  translateSdkEvent
47
- } from "./chunk-6M2HOKRH.js";
47
+ } from "./chunk-HFMH3AIP.js";
48
48
  import "./chunk-7QVYU63E.js";
49
49
  export {
50
50
  AGENT_BRAND,
@@ -1958,9 +1958,13 @@ async function* presentUIMessageStream(events, opts) {
1958
1958
  continue;
1959
1959
  }
1960
1960
  if (event.type === "error") {
1961
+ const code = event.code;
1961
1962
  yield {
1962
1963
  type: "error",
1963
- errorText: event.message
1964
+ errorText: event.message,
1965
+ ...code !== void 0 ? {
1966
+ errorCode: code
1967
+ } : {}
1964
1968
  };
1965
1969
  break;
1966
1970
  }
@@ -1970,9 +1974,13 @@ async function* presentUIMessageStream(events, opts) {
1970
1974
  }
1971
1975
  }
1972
1976
  } catch (err) {
1977
+ const code = err.code;
1973
1978
  yield {
1974
1979
  type: "error",
1975
- errorText: String(err)
1980
+ errorText: String(err),
1981
+ ...typeof code === "string" ? {
1982
+ errorCode: code
1983
+ } : {}
1976
1984
  };
1977
1985
  }
1978
1986
  yield* presenter.finish(turnMetadata);
@@ -3532,4 +3540,4 @@ export {
3532
3540
  generateAgentManifest,
3533
3541
  agentsPlugin
3534
3542
  };
3535
- //# sourceMappingURL=chunk-6M2HOKRH.js.map
3543
+ //# sourceMappingURL=chunk-HFMH3AIP.js.map