@roomle/embedding-lib 10.0.0 → 11.0.0-alpha.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.
Files changed (76) hide show
  1. package/THIRD-PARTY-NOTICES.txt +2 -2
  2. package/ai.js +86 -17
  3. package/ai.min.js +83 -13
  4. package/{browser-D6M-d6y5.mjs → browser-Cys-y5Hy.mjs} +1 -2
  5. package/chat-model-B7BO8IhK.mjs +212 -0
  6. package/chat-model-XYf503pT.mjs +213 -0
  7. package/coerce-CuLRCRlo.mjs +6 -0
  8. package/coerce-Dup0o-HR.mjs +7 -0
  9. package/{comlink-m82YLjsS.mjs → comlink-7u13Z2ZH.mjs} +2 -3
  10. package/{comlink-BYqErFai.mjs → comlink-DKhvPU0o.mjs} +1 -1
  11. package/configurator.js +7 -7
  12. package/configurator.min.js +6 -5
  13. package/construction.js +279 -22
  14. package/construction.min.js +287 -27
  15. package/continuation-CswXtOus.mjs +10 -0
  16. package/continuation-NclHDSgS.mjs +9 -0
  17. package/{dist-DCzWWudD.mjs → dist-7-X7Xqsl.mjs} +851 -919
  18. package/{dist-CjIZv2gB.mjs → dist-BMxyw-Zs.mjs} +411 -405
  19. package/{dist-wPZpiGiu.mjs → dist-BU022PnG.mjs} +4 -9
  20. package/{dist-CGgFMwb1.mjs → dist-BY8OLJ2p.mjs} +1 -1
  21. package/{dist-6TznX-Ae.mjs → dist-BZSd56sr.mjs} +3850 -3942
  22. package/{dist-Ur4DqwwC.mjs → dist-Ba3J8AjB.mjs} +400 -390
  23. package/{dist-CnTUCpLZ.mjs → dist-CbQKC1xX.mjs} +1590 -1616
  24. package/{dist-BsVeWZ8R.mjs → dist-CiybWJvs.mjs} +44 -41
  25. package/{dist-BI_3AeI-.mjs → dist-CkZuNdCU.mjs} +6 -4
  26. package/{dist-Bt1FopV4.mjs → dist-D2ZAAHGn.mjs} +1058 -1042
  27. package/{dist-Cxe4osFc.mjs → dist-DjsS42rR.mjs} +916 -962
  28. package/{dist-Cmx_tCV5.mjs → dist-Jcq_kKKT.mjs} +403 -393
  29. package/{dist-D0XFfKEL.mjs → dist-S9sLSjZ4.mjs} +3112 -3104
  30. package/{dist-BV-32IEX.mjs → dist-XECXrV5Q.mjs} +1497 -1558
  31. package/{dist-CZbrRF4T.mjs → dist-a5_BIeaS.mjs} +45 -51
  32. package/{dist-Dr3LcjP6.mjs → dist-bQAJDeYc.mjs} +698 -748
  33. package/docs/md/web/embedding/CHANGELOG.md +20 -737
  34. package/{drag-ghost-C1WS2KmW.mjs → drag-ghost-QZelgA-_.mjs} +2 -3
  35. package/{drag-ghost-B24KVqgc.mjs → drag-ghost-VmgSWLva.mjs} +5 -7
  36. package/{drag-in-O5uwMddL.mjs → drag-in-Cd_67tzS.mjs} +4 -5
  37. package/{drag-in-CWHSbwvG.mjs → drag-in-DlDsgY4T.mjs} +3 -3
  38. package/embedding-plugins.js +1 -2
  39. package/embedding-plugins.min.js +1 -2
  40. package/{experimental-evaluation-DyONuPyk.mjs → experimental-evaluation-B4hKMgFH.mjs} +19 -38
  41. package/{experimental-evaluation-DPkDk-5A.mjs → experimental-evaluation-DmqghFSx.mjs} +1 -1
  42. package/{from-custom-view-BgmiWIEN.mjs → from-custom-view-6HMD_sPe.mjs} +5 -4
  43. package/{from-custom-view-CxmIIsHU.mjs → from-custom-view-BRFynafo.mjs} +16 -16
  44. package/{from-website-CvcnHmr2.mjs → from-website-Dl1VN4h7.mjs} +5 -6
  45. package/{from-website-B8qFEG_R.mjs → from-website-iZzauH4C.mjs} +3 -3
  46. package/hi.js +311 -186
  47. package/hi.min.js +336 -215
  48. package/mcp-tools-BLB7pCga.mjs +42 -0
  49. package/mcp-tools-BirFT2R0.mjs +41 -0
  50. package/package.json +1 -1
  51. package/packages/common/src/utils/ai-model-relay.d.ts +22 -2
  52. package/packages/embedding-lib/src/ai.d.ts +3 -1
  53. package/packages/embedding-lib/src/hi.d.ts +1 -1
  54. package/packages/embedding-lib/src/homag-intelligence/hi-planning-assistant.d.ts +40 -2
  55. package/packages/embedding-lib/src/planning-assistant/chat-model.d.ts +1 -1
  56. package/packages/web-sdk/packages/assistant.d.ts +2 -0
  57. package/packages/web-sdk/packages/common-core/src/planning-assistant/chat-model.d.ts +1 -1
  58. package/packages/web-sdk/packages/common-core/src/planning-assistant/continuation.d.ts +5 -0
  59. package/packages/web-sdk/packages/common-core/src/planning-assistant/mcp-tools.d.ts +3 -1
  60. package/packages/web-sdk/packages/common-core/src/planning-assistant/runtime.d.ts +6 -1
  61. package/packages/web-sdk/packages/common-core/src/planning-assistant/types.d.ts +5 -1
  62. package/packages/web-sdk/packages/common-core/src/planning-assistant.d.ts +3 -0
  63. package/rolldown-runtime--db92txo.mjs +10 -0
  64. package/rolldown-runtime-CyjYJMBa.mjs +11 -0
  65. package/roomle-embedding-lib.js +26 -35
  66. package/roomle-embedding-lib.min.js +4 -4
  67. package/sbom.cdx.json +5 -5
  68. package/turn-limits-9LbUeSG2.mjs +9 -0
  69. package/turn-limits-Ciq383Bd.mjs +10 -0
  70. package/{utils-BwWn6Fw4.mjs → utils-CJnKZceY.mjs} +3 -4
  71. package/{utils-BoELtcEK.mjs → utils-DdNhTbJr.mjs} +6 -6
  72. package/chat-model-CFuHw4cp.mjs +0 -322
  73. package/chat-model-JqqVnnmY.mjs +0 -327
  74. package/coerce-CqJod_GZ.mjs +0 -8
  75. package/coerce-CsI42_k0.mjs +0 -6
  76. /package/{browser-BjtSrqbu.mjs → browser-CzLpXYFF.mjs} +0 -0
@@ -1,6 +1,6 @@
1
1
 
2
- import { $ as e, A as t, Bt as n, D as r, E as i, Et as a, H as o, Ht as s, It as c, Jt as l, K as u, Kt as d, L as f, Lt as p, M as m, Mt as h, N as g, O as _, Ot as v, Pn as y, Qt as b, Rt as x, S, Sn as C, Tt as w, Vt as T, Wt as E, X as D, Yt as O, Zt as k, _ as A, _n as j, _t as M, an as N, b as P, bn as ee, bt as F, cn as te, dn as I, dt as L, en as ne, f as R, fn as z, ft as re, h as ie, ht as ae, i as oe, in as B, j as V, jn as H, jt as U, k as W, kn as se, ln as G, lt as ce, mt as K, nn as le, nt as ue, o as de, ot as q, p as fe, qt as pe, sn as J, st as me, tn as Y, v as he, w as ge, xn as _e, yt as ve, zt as ye } from "./dist-Bt1FopV4.mjs";
3
- import { t as be } from "./coerce-CsI42_k0.mjs";
2
+ import { $ as e, A as t, Bt as n, D as r, E as i, Et as a, H as o, Ht as s, It as c, Jt as l, K as u, Kt as d, L as f, Lt as p, M as m, Mt as h, N as g, O as _, Ot as v, Pn as y, Qt as b, Rt as x, S, Sn as C, Tt as w, Vt as T, Wt as E, X as D, Yt as O, Zt as k, _ as A, _n as j, _t as M, an as N, b as P, bn as ee, bt as F, cn as te, dn as I, dt as L, en as ne, f as R, fn as z, ft as re, h as ie, ht as ae, i as oe, in as B, j as V, jn as H, jt as U, k as W, kn as se, ln as G, lt as ce, mt as K, nn as le, nt as ue, o as de, ot as q, p as fe, qt as pe, sn as J, st as me, tn as Y, v as he, w as ge, xn as _e, yt as ve, zt as ye } from "./dist-D2ZAAHGn.mjs";
3
+ import { t as be } from "./coerce-CuLRCRlo.mjs";
4
4
  var xe = N({ error: N({
5
5
  message: G(),
6
6
  type: G().nullish(),
@@ -380,14 +380,16 @@ function Re(e) {
380
380
  for (let r = 0; r < e.length; r++) {
381
381
  let i = e[r];
382
382
  if (t) t = !1;
383
- else if (i !== "\\") if (i !== "[") if (i !== "]") {
384
- if (!n && i === "(" && e[r + 1] === "?") {
385
- let t = e[r + 2];
386
- if (t === "=" || t === "!" || t === "<" && (e[r + 3] === "=" || e[r + 3] === "!")) return !0;
387
- }
388
- } else n = !1;
389
- else n = !0;
390
- else t = !0;
383
+ else if (i !== "\\") {
384
+ if (i !== "[") {
385
+ if (i !== "]") {
386
+ if (!n && i === "(" && e[r + 1] === "?") {
387
+ let t = e[r + 2];
388
+ if (t === "=" || t === "!" || t === "<" && (e[r + 3] === "=" || e[r + 3] === "!")) return !0;
389
+ }
390
+ } else n = !1;
391
+ } else n = !0;
392
+ } else t = !0;
391
393
  }
392
394
  return !1;
393
395
  }(a.pattern) && (delete a.pattern, n = !0), a.properties != null && (a.properties = o(a.properties)), a.patternProperties != null && (a.patternProperties = o(a.patternProperties)), a.additionalProperties != null && (a.additionalProperties = s(a.additionalProperties)), a.additionalItems != null && (a.additionalItems = s(a.additionalItems)), a.items != null && (a.items = Array.isArray(a.items) ? a.items.map(s) : s(a.items)), a.contains != null && (a.contains = s(a.contains)), a.not != null && (a.not = s(a.not)), a.allOf != null && (a.allOf = a.allOf.map(s)), a.anyOf != null && (a.anyOf = a.anyOf.map(s)), a.oneOf != null && (a.oneOf = a.oneOf.map(s)), a.definitions != null && (a.definitions = o(a.definitions)), a.$defs != null && (a.$defs = o(a.$defs)), a.dependencies != null && (a.dependencies = Object.fromEntries(Object.entries(a.dependencies).map(([e, t]) => [e, Array.isArray(t) ? t : s(t)])));
@@ -1694,8 +1696,10 @@ var ut = {
1694
1696
  temperature: r.temperature,
1695
1697
  timestamp_granularities: r.timestampGranularities
1696
1698
  };
1697
- for (let [e, n] of Object.entries(t)) if (n != null) if (Array.isArray(n)) for (let t of n) i.append(`${e}[]`, String(t));
1698
- else i.append(e, String(n));
1699
+ for (let [e, n] of Object.entries(t)) if (n != null) {
1700
+ if (Array.isArray(n)) for (let t of n) i.append(`${e}[]`, String(t));
1701
+ else i.append(e, String(n));
1702
+ }
1699
1703
  } else s && i.append("response_format", "diarized_json");
1700
1704
  return c != null && i.append("chunking_strategy", typeof c == "string" ? c : JSON.stringify({
1701
1705
  type: c.type,
@@ -2597,7 +2601,7 @@ var qt = ne(() => I([
2597
2601
  code: G().nullish(),
2598
2602
  message: G(),
2599
2603
  param: G().nullish()
2600
- }), on = new Set([
2604
+ }), on = /* @__PURE__ */ new Set([
2601
2605
  "error",
2602
2606
  "response.apply_patch_call_operation_diff.delta",
2603
2607
  "response.apply_patch_call_operation_diff.done",
@@ -2619,7 +2623,7 @@ var qt = ne(() => I([
2619
2623
  "response.reasoning_summary_part.added",
2620
2624
  "response.reasoning_summary_part.done",
2621
2625
  "response.reasoning_summary_text.delta"
2622
- ]), sn = new Set([
2626
+ ]), sn = /* @__PURE__ */ new Set([
2623
2627
  "apply_patch_call",
2624
2628
  "code_interpreter_call",
2625
2629
  "compaction",
@@ -4260,7 +4264,7 @@ var In = {
4260
4264
  let i = r.get(e.toolCallId);
4261
4265
  i == null ? r.set(e.toolCallId, {
4262
4266
  metadata: e,
4263
- results: new Map([[e.index, t]]),
4267
+ results: /* @__PURE__ */ new Map([[e.index, t]]),
4264
4268
  invalid: !1
4265
4269
  }) : Ht(i.metadata, e) && !i.results.has(e.index) ? i.results.set(e.index, t) : i.invalid = !0;
4266
4270
  }
@@ -5783,413 +5787,416 @@ var In = {
5783
5787
  toolName: t,
5784
5788
  providerExecuted: !0
5785
5789
  });
5786
- } else if (f.item.type !== "tool_search_output" && !(f.item.type === "mcp_call" || f.item.type === "mcp_list_tools" || f.item.type === "mcp_approval_request")) if (f.item.type === "apply_patch_call") {
5787
- let { call_id: e, operation: t } = f.item;
5788
- if (x[f.output_index] = {
5789
- toolName: i.toCustomToolName("apply_patch"),
5790
- toolCallId: e,
5791
- applyPatch: {
5792
- hasDiff: t.type === "delete_file",
5793
- endEmitted: t.type === "delete_file"
5794
- }
5795
- }, d.enqueue({
5796
- type: "tool-input-start",
5797
- id: e,
5798
- toolName: i.toCustomToolName("apply_patch")
5799
- }), t.type === "delete_file") {
5800
- let n = JSON.stringify({
5801
- callId: e,
5802
- operation: t
5803
- });
5804
- d.enqueue({
5790
+ } else if (f.item.type !== "tool_search_output" && f.item.type !== "mcp_call" && f.item.type !== "mcp_list_tools" && f.item.type !== "mcp_approval_request") {
5791
+ if (f.item.type === "apply_patch_call") {
5792
+ let { call_id: e, operation: t } = f.item;
5793
+ if (x[f.output_index] = {
5794
+ toolName: i.toCustomToolName("apply_patch"),
5795
+ toolCallId: e,
5796
+ applyPatch: {
5797
+ hasDiff: t.type === "delete_file",
5798
+ endEmitted: t.type === "delete_file"
5799
+ }
5800
+ }, d.enqueue({
5801
+ type: "tool-input-start",
5802
+ id: e,
5803
+ toolName: i.toCustomToolName("apply_patch")
5804
+ }), t.type === "delete_file") {
5805
+ let n = JSON.stringify({
5806
+ callId: e,
5807
+ operation: t
5808
+ });
5809
+ d.enqueue({
5810
+ type: "tool-input-delta",
5811
+ id: e,
5812
+ delta: n
5813
+ }), d.enqueue({
5814
+ type: "tool-input-end",
5815
+ id: e
5816
+ });
5817
+ } else d.enqueue({
5805
5818
  type: "tool-input-delta",
5806
5819
  id: e,
5807
- delta: n
5808
- }), d.enqueue({
5809
- type: "tool-input-end",
5810
- id: e
5820
+ delta: `{"callId":"${$(e)}","operation":{"type":"${$(t.type)}","path":"${$(t.path)}","diff":"`
5811
5821
  });
5812
- } else d.enqueue({
5813
- type: "tool-input-delta",
5814
- id: e,
5815
- delta: `{"callId":"${$(e)}","operation":{"type":"${$(t.type)}","path":"${$(t.path)}","diff":"`
5816
- });
5817
- } else f.item.type === "shell_call" ? x[f.output_index] = {
5818
- toolName: i.toCustomToolName("shell"),
5819
- toolCallId: f.item.call_id
5820
- } : f.item.type === "shell_call_output" || (f.item.type === "message" ? (D[f.output_index] = f.item.id, C.splice(0), w = f.item.phase ?? void 0, d.enqueue({
5821
- type: "text-start",
5822
- id: f.item.id,
5823
- providerMetadata: { [s]: {
5824
- itemId: f.item.id,
5825
- ...f.item.phase != null && { phase: f.item.phase }
5826
- } }
5827
- })) : zn(f) && f.item.type === "reasoning" && (D[f.output_index] = f.item.id, E[f.item.id] = {
5828
- encryptedContent: f.item.encrypted_content,
5829
- summaryParts: { 0: "active" }
5830
- }, d.enqueue({
5831
- type: "reasoning-start",
5832
- id: `${f.item.id}:0`,
5833
- providerMetadata: { [s]: {
5834
- itemId: f.item.id,
5835
- reasoningEncryptedContent: f.item.encrypted_content ?? null
5836
- } }
5837
- })));
5822
+ } else f.item.type === "shell_call" ? x[f.output_index] = {
5823
+ toolName: i.toCustomToolName("shell"),
5824
+ toolCallId: f.item.call_id
5825
+ } : f.item.type === "shell_call_output" || (f.item.type === "message" ? (D[f.output_index] = f.item.id, C.splice(0), w = f.item.phase ?? void 0, d.enqueue({
5826
+ type: "text-start",
5827
+ id: f.item.id,
5828
+ providerMetadata: { [s]: {
5829
+ itemId: f.item.id,
5830
+ ...f.item.phase != null && { phase: f.item.phase }
5831
+ } }
5832
+ })) : zn(f) && f.item.type === "reasoning" && (D[f.output_index] = f.item.id, E[f.item.id] = {
5833
+ encryptedContent: f.item.encrypted_content,
5834
+ summaryParts: { 0: "active" }
5835
+ }, d.enqueue({
5836
+ type: "reasoning-start",
5837
+ id: `${f.item.id}:0`,
5838
+ providerMetadata: { [s]: {
5839
+ itemId: f.item.id,
5840
+ reasoningEncryptedContent: f.item.encrypted_content ?? null
5841
+ } }
5842
+ })));
5843
+ }
5838
5844
  } else if (function(e) {
5839
5845
  return e.type === "response.output_item.done";
5840
- }(f)) if (f.item.type === "message") {
5841
- let e = O({
5842
- itemId: f.item.id,
5843
- outputIndex: f.output_index
5844
- }), t = f.item.phase ?? w;
5845
- w = void 0, d.enqueue({
5846
- type: "text-end",
5847
- id: e,
5848
- providerMetadata: { [s]: {
5849
- itemId: e,
5850
- ...t != null && { phase: t },
5851
- ...C.length > 0 && { annotations: C }
5852
- } }
5853
- }), D[f.output_index] = void 0;
5854
- } else {
5855
- if (f.item.type === "function_call") {
5856
- let e = f.item, t = x[f.output_index];
5857
- x[f.output_index] = void 0, T = !0;
5858
- let n = t?.suppressInputStreaming ?? Lt({
5859
- toolName: e.name,
5860
- tools: h
5861
- }), r = () => {
5862
- if (n) {
5846
+ }(f)) {
5847
+ if (f.item.type === "message") {
5848
+ let e = O({
5849
+ itemId: f.item.id,
5850
+ outputIndex: f.output_index
5851
+ }), t = f.item.phase ?? w;
5852
+ w = void 0, d.enqueue({
5853
+ type: "text-end",
5854
+ id: e,
5855
+ providerMetadata: { [s]: {
5856
+ itemId: e,
5857
+ ...t != null && { phase: t },
5858
+ ...C.length > 0 && { annotations: C }
5859
+ } }
5860
+ }), D[f.output_index] = void 0;
5861
+ } else {
5862
+ if (f.item.type === "function_call") {
5863
+ let e = f.item, t = x[f.output_index];
5864
+ x[f.output_index] = void 0, T = !0;
5865
+ let n = t?.suppressInputStreaming ?? Lt({
5866
+ toolName: e.name,
5867
+ tools: h
5868
+ }), r = () => {
5869
+ if (n) {
5870
+ d.enqueue({
5871
+ type: "tool-input-start",
5872
+ id: e.call_id,
5873
+ toolName: e.name
5874
+ });
5875
+ let n = t?.bufferedInputDeltas ?? [];
5876
+ if (n.length > 0) for (let t of n) d.enqueue({
5877
+ type: "tool-input-delta",
5878
+ id: e.call_id,
5879
+ delta: t
5880
+ });
5881
+ else e.arguments.length > 0 && d.enqueue({
5882
+ type: "tool-input-delta",
5883
+ id: e.call_id,
5884
+ delta: e.arguments
5885
+ });
5886
+ }
5863
5887
  d.enqueue({
5864
- type: "tool-input-start",
5865
- id: e.call_id,
5866
- toolName: e.name
5867
- });
5868
- let n = t?.bufferedInputDeltas ?? [];
5869
- if (n.length > 0) for (let t of n) d.enqueue({
5870
- type: "tool-input-delta",
5888
+ type: "tool-input-end",
5871
5889
  id: e.call_id,
5872
- delta: t
5890
+ ...e.namespace != null && { providerMetadata: { [s]: { namespace: e.namespace } } }
5891
+ }), d.enqueue({
5892
+ type: "tool-call",
5893
+ toolCallId: e.call_id,
5894
+ toolName: e.name,
5895
+ input: e.arguments,
5896
+ providerMetadata: { [s]: {
5897
+ itemId: e.id,
5898
+ ...e.async == null ? t?.async == null ? {} : { async: t.async } : { async: e.async },
5899
+ ...e.namespace != null && { namespace: e.namespace },
5900
+ ...e.caller != null && { caller: e.caller.type === "program" ? {
5901
+ type: "program",
5902
+ callerId: e.caller.caller_id
5903
+ } : e.caller }
5904
+ } }
5873
5905
  });
5874
- else e.arguments.length > 0 && d.enqueue({
5906
+ };
5907
+ return n ? Rt({
5908
+ toolCall: {
5909
+ toolCallId: e.call_id,
5910
+ toolName: e.name,
5911
+ input: e.arguments
5912
+ },
5913
+ tools: h,
5914
+ providerOptionsName: s,
5915
+ itemId: e.id
5916
+ }).then((e) => {
5917
+ if (e != null) for (let t of e) d.enqueue({
5918
+ type: "tool-input-start",
5919
+ id: t.toolCallId,
5920
+ toolName: t.toolName
5921
+ }), d.enqueue({
5875
5922
  type: "tool-input-delta",
5876
- id: e.call_id,
5877
- delta: e.arguments
5878
- });
5879
- }
5923
+ id: t.toolCallId,
5924
+ delta: t.input
5925
+ }), d.enqueue({
5926
+ type: "tool-input-end",
5927
+ id: t.toolCallId
5928
+ }), d.enqueue(t);
5929
+ else r();
5930
+ }) : void r();
5931
+ }
5932
+ if (f.item.type === "program") d.enqueue({
5933
+ type: "tool-call",
5934
+ toolCallId: f.item.call_id,
5935
+ toolName: i.toCustomToolName("programmatic_tool_calling"),
5936
+ input: JSON.stringify({
5937
+ code: f.item.code,
5938
+ fingerprint: f.item.fingerprint
5939
+ }),
5940
+ providerExecuted: !0,
5941
+ providerMetadata: { [s]: { itemId: f.item.id } }
5942
+ });
5943
+ else if (f.item.type === "program_output") d.enqueue({
5944
+ type: "tool-result",
5945
+ toolCallId: f.item.call_id,
5946
+ toolName: i.toCustomToolName("programmatic_tool_calling"),
5947
+ result: {
5948
+ result: f.item.result,
5949
+ status: f.item.status
5950
+ },
5951
+ providerMetadata: { [s]: { itemId: f.item.id } }
5952
+ });
5953
+ else if (f.item.type === "custom_tool_call") {
5954
+ let e = x[f.output_index];
5955
+ x[f.output_index] = void 0, T = !0;
5956
+ let t = i.toCustomToolName(f.item.name);
5880
5957
  d.enqueue({
5881
5958
  type: "tool-input-end",
5882
- id: e.call_id,
5883
- ...e.namespace != null && { providerMetadata: { [s]: { namespace: e.namespace } } }
5959
+ id: f.item.call_id
5884
5960
  }), d.enqueue({
5885
5961
  type: "tool-call",
5886
- toolCallId: e.call_id,
5887
- toolName: e.name,
5888
- input: e.arguments,
5962
+ toolCallId: f.item.call_id,
5963
+ toolName: t,
5964
+ input: JSON.stringify(f.item.input),
5889
5965
  providerMetadata: { [s]: {
5890
- itemId: e.id,
5891
- ...e.async == null ? t?.async == null ? {} : { async: t.async } : { async: e.async },
5892
- ...e.namespace != null && { namespace: e.namespace },
5893
- ...e.caller != null && { caller: e.caller.type === "program" ? {
5894
- type: "program",
5895
- callerId: e.caller.caller_id
5896
- } : e.caller }
5966
+ itemId: f.item.id,
5967
+ ...f.item.async == null ? e?.async == null ? {} : { async: e.async } : { async: f.item.async }
5897
5968
  } }
5898
5969
  });
5899
- };
5900
- return n ? Rt({
5901
- toolCall: {
5902
- toolCallId: e.call_id,
5903
- toolName: e.name,
5904
- input: e.arguments
5905
- },
5906
- tools: h,
5907
- providerOptionsName: s,
5908
- itemId: e.id
5909
- }).then((e) => {
5910
- if (e != null) for (let t of e) d.enqueue({
5911
- type: "tool-input-start",
5912
- id: t.toolCallId,
5913
- toolName: t.toolName
5970
+ } else if (f.item.type === "web_search_call") x[f.output_index] = void 0, d.enqueue({
5971
+ type: "tool-result",
5972
+ toolCallId: f.item.id,
5973
+ toolName: i.toCustomToolName(r ?? "web_search"),
5974
+ result: Un(f.item.action)
5975
+ });
5976
+ else if (f.item.type === "computer_call") {
5977
+ if (x[f.output_index] = void 0, f.item.call_id == null) return d.enqueue({
5978
+ type: "tool-input-end",
5979
+ id: f.item.id
5914
5980
  }), d.enqueue({
5981
+ type: "tool-call",
5982
+ toolCallId: f.item.id,
5983
+ toolName: i.toCustomToolName("computer_use"),
5984
+ input: "",
5985
+ providerExecuted: !0
5986
+ }), void d.enqueue({
5987
+ type: "tool-result",
5988
+ toolCallId: f.item.id,
5989
+ toolName: i.toCustomToolName("computer_use"),
5990
+ result: {
5991
+ type: "computer_use_tool_result",
5992
+ status: f.item.status
5993
+ }
5994
+ });
5995
+ T = !0;
5996
+ let e = i.toCustomToolName("computer"), t = JSON.stringify(Fn(f.item));
5997
+ d.enqueue({
5915
5998
  type: "tool-input-delta",
5916
- id: t.toolCallId,
5917
- delta: t.input
5999
+ id: f.item.call_id,
6000
+ delta: t
5918
6001
  }), d.enqueue({
5919
6002
  type: "tool-input-end",
5920
- id: t.toolCallId
5921
- }), d.enqueue(t);
5922
- else r();
5923
- }) : void r();
5924
- }
5925
- if (f.item.type === "program") d.enqueue({
5926
- type: "tool-call",
5927
- toolCallId: f.item.call_id,
5928
- toolName: i.toCustomToolName("programmatic_tool_calling"),
5929
- input: JSON.stringify({
5930
- code: f.item.code,
5931
- fingerprint: f.item.fingerprint
5932
- }),
5933
- providerExecuted: !0,
5934
- providerMetadata: { [s]: { itemId: f.item.id } }
5935
- });
5936
- else if (f.item.type === "program_output") d.enqueue({
5937
- type: "tool-result",
5938
- toolCallId: f.item.call_id,
5939
- toolName: i.toCustomToolName("programmatic_tool_calling"),
5940
- result: {
5941
- result: f.item.result,
5942
- status: f.item.status
5943
- },
5944
- providerMetadata: { [s]: { itemId: f.item.id } }
5945
- });
5946
- else if (f.item.type === "custom_tool_call") {
5947
- let e = x[f.output_index];
5948
- x[f.output_index] = void 0, T = !0;
5949
- let t = i.toCustomToolName(f.item.name);
5950
- d.enqueue({
5951
- type: "tool-input-end",
5952
- id: f.item.call_id
5953
- }), d.enqueue({
5954
- type: "tool-call",
5955
- toolCallId: f.item.call_id,
5956
- toolName: t,
5957
- input: JSON.stringify(f.item.input),
5958
- providerMetadata: { [s]: {
5959
- itemId: f.item.id,
5960
- ...f.item.async == null ? e?.async == null ? {} : { async: e.async } : { async: f.item.async }
5961
- } }
5962
- });
5963
- } else if (f.item.type === "web_search_call") x[f.output_index] = void 0, d.enqueue({
5964
- type: "tool-result",
5965
- toolCallId: f.item.id,
5966
- toolName: i.toCustomToolName(r ?? "web_search"),
5967
- result: Un(f.item.action)
5968
- });
5969
- else if (f.item.type === "computer_call") {
5970
- if (x[f.output_index] = void 0, f.item.call_id == null) return d.enqueue({
5971
- type: "tool-input-end",
5972
- id: f.item.id
5973
- }), d.enqueue({
5974
- type: "tool-call",
5975
- toolCallId: f.item.id,
5976
- toolName: i.toCustomToolName("computer_use"),
5977
- input: "",
5978
- providerExecuted: !0
5979
- }), void d.enqueue({
6003
+ id: f.item.call_id
6004
+ }), d.enqueue({
6005
+ type: "tool-call",
6006
+ toolCallId: f.item.call_id,
6007
+ toolName: e,
6008
+ input: t,
6009
+ providerMetadata: { [s]: { itemId: f.item.id } }
6010
+ });
6011
+ } else if (f.item.type === "file_search_call") x[f.output_index] = void 0, d.enqueue({
5980
6012
  type: "tool-result",
5981
6013
  toolCallId: f.item.id,
5982
- toolName: i.toCustomToolName("computer_use"),
6014
+ toolName: i.toCustomToolName("file_search"),
5983
6015
  result: {
5984
- type: "computer_use_tool_result",
5985
- status: f.item.status
6016
+ queries: f.item.queries,
6017
+ results: f.item.results?.map((e) => ({
6018
+ attributes: e.attributes,
6019
+ fileId: e.file_id,
6020
+ filename: e.filename,
6021
+ score: e.score,
6022
+ text: e.text
6023
+ })) ?? null
5986
6024
  }
5987
6025
  });
5988
- T = !0;
5989
- let e = i.toCustomToolName("computer"), t = JSON.stringify(Fn(f.item));
5990
- d.enqueue({
5991
- type: "tool-input-delta",
5992
- id: f.item.call_id,
5993
- delta: t
5994
- }), d.enqueue({
5995
- type: "tool-input-end",
5996
- id: f.item.call_id
5997
- }), d.enqueue({
5998
- type: "tool-call",
5999
- toolCallId: f.item.call_id,
6000
- toolName: e,
6001
- input: t,
6002
- providerMetadata: { [s]: { itemId: f.item.id } }
6026
+ else if (f.item.type === "code_interpreter_call") x[f.output_index] = void 0, d.enqueue({
6027
+ type: "tool-result",
6028
+ toolCallId: f.item.id,
6029
+ toolName: i.toCustomToolName("code_interpreter"),
6030
+ result: { outputs: f.item.outputs }
6003
6031
  });
6004
- } else if (f.item.type === "file_search_call") x[f.output_index] = void 0, d.enqueue({
6005
- type: "tool-result",
6006
- toolCallId: f.item.id,
6007
- toolName: i.toCustomToolName("file_search"),
6008
- result: {
6009
- queries: f.item.queries,
6010
- results: f.item.results?.map((e) => ({
6011
- attributes: e.attributes,
6012
- fileId: e.file_id,
6013
- filename: e.filename,
6014
- score: e.score,
6015
- text: e.text
6016
- })) ?? null
6017
- }
6018
- });
6019
- else if (f.item.type === "code_interpreter_call") x[f.output_index] = void 0, d.enqueue({
6020
- type: "tool-result",
6021
- toolCallId: f.item.id,
6022
- toolName: i.toCustomToolName("code_interpreter"),
6023
- result: { outputs: f.item.outputs }
6024
- });
6025
- else if (f.item.type === "image_generation_call") d.enqueue({
6026
- type: "tool-result",
6027
- toolCallId: f.item.id,
6028
- toolName: i.toCustomToolName("image_generation"),
6029
- result: { result: f.item.result }
6030
- });
6031
- else if (f.item.type === "tool_search_call") {
6032
- let e = x[f.output_index], t = f.item.execution === "server";
6033
- if (e != null) {
6034
- let n = t ? e.toolCallId : f.item.call_id ?? f.item.id;
6035
- t ? M.push(n) : d.enqueue({
6036
- type: "tool-input-start",
6037
- id: n,
6038
- toolName: e.toolName
6032
+ else if (f.item.type === "image_generation_call") d.enqueue({
6033
+ type: "tool-result",
6034
+ toolCallId: f.item.id,
6035
+ toolName: i.toCustomToolName("image_generation"),
6036
+ result: { result: f.item.result }
6037
+ });
6038
+ else if (f.item.type === "tool_search_call") {
6039
+ let e = x[f.output_index], t = f.item.execution === "server";
6040
+ if (e != null) {
6041
+ let n = t ? e.toolCallId : f.item.call_id ?? f.item.id;
6042
+ t ? M.push(n) : d.enqueue({
6043
+ type: "tool-input-start",
6044
+ id: n,
6045
+ toolName: e.toolName
6046
+ }), d.enqueue({
6047
+ type: "tool-input-end",
6048
+ id: n
6049
+ }), d.enqueue({
6050
+ type: "tool-call",
6051
+ toolCallId: n,
6052
+ toolName: e.toolName,
6053
+ input: JSON.stringify({
6054
+ arguments: f.item.arguments,
6055
+ call_id: t ? null : n
6056
+ }),
6057
+ ...t ? { providerExecuted: !0 } : {},
6058
+ providerMetadata: { [s]: { itemId: f.item.id } }
6059
+ });
6060
+ }
6061
+ x[f.output_index] = void 0;
6062
+ } else if (f.item.type === "tool_search_output") {
6063
+ let e = f.item.call_id ?? M.shift() ?? f.item.id;
6064
+ d.enqueue({
6065
+ type: "tool-result",
6066
+ toolCallId: e,
6067
+ toolName: i.toCustomToolName("tool_search"),
6068
+ result: { tools: f.item.tools },
6069
+ providerMetadata: { [s]: { itemId: f.item.id } }
6070
+ });
6071
+ } else if (f.item.type === "mcp_call") {
6072
+ x[f.output_index] = void 0;
6073
+ let e = f.item.approval_request_id ?? void 0, t = e == null ? f.item.id : g.get(e) ?? m[e] ?? f.item.id, n = `mcp.${f.item.name}`;
6074
+ d.enqueue({
6075
+ type: "tool-call",
6076
+ toolCallId: t,
6077
+ toolName: n,
6078
+ input: f.item.arguments,
6079
+ providerExecuted: !0,
6080
+ dynamic: !0
6039
6081
  }), d.enqueue({
6040
- type: "tool-input-end",
6041
- id: n
6082
+ type: "tool-result",
6083
+ toolCallId: t,
6084
+ toolName: n,
6085
+ result: {
6086
+ type: "call",
6087
+ serverLabel: f.item.server_label,
6088
+ name: f.item.name,
6089
+ arguments: f.item.arguments,
6090
+ ...f.item.output == null ? {} : { output: f.item.output },
6091
+ ...f.item.error == null ? {} : { error: f.item.error }
6092
+ },
6093
+ providerMetadata: { [s]: { itemId: f.item.id } }
6094
+ });
6095
+ } else if (f.item.type === "mcp_list_tools") x[f.output_index] = void 0;
6096
+ else if (f.item.type === "apply_patch_call") {
6097
+ let e = x[f.output_index];
6098
+ e?.applyPatch && !e.applyPatch.endEmitted && f.item.operation.type !== "delete_file" && (e.applyPatch.hasDiff || d.enqueue({
6099
+ type: "tool-input-delta",
6100
+ id: e.toolCallId,
6101
+ delta: $(f.item.operation.diff)
6102
+ }), d.enqueue({
6103
+ type: "tool-input-delta",
6104
+ id: e.toolCallId,
6105
+ delta: "\"}}"
6042
6106
  }), d.enqueue({
6107
+ type: "tool-input-end",
6108
+ id: e.toolCallId
6109
+ }), e.applyPatch.endEmitted = !0), e && f.item.status === "completed" && (T = !0, d.enqueue({
6043
6110
  type: "tool-call",
6044
- toolCallId: n,
6045
- toolName: e.toolName,
6111
+ toolCallId: e.toolCallId,
6112
+ toolName: i.toCustomToolName("apply_patch"),
6046
6113
  input: JSON.stringify({
6047
- arguments: f.item.arguments,
6048
- call_id: t ? null : n
6114
+ callId: f.item.call_id,
6115
+ operation: f.item.operation
6049
6116
  }),
6050
- ...t ? { providerExecuted: !0 } : {},
6051
6117
  providerMetadata: { [s]: { itemId: f.item.id } }
6118
+ })), x[f.output_index] = void 0;
6119
+ } else if (f.item.type === "mcp_approval_request") {
6120
+ x[f.output_index] = void 0;
6121
+ let e = p.config.generateId?.() ?? o(), t = f.item.approval_request_id ?? f.item.id;
6122
+ g.set(t, e);
6123
+ let n = `mcp.${f.item.name}`;
6124
+ d.enqueue({
6125
+ type: "tool-call",
6126
+ toolCallId: e,
6127
+ toolName: n,
6128
+ input: f.item.arguments,
6129
+ providerExecuted: !0,
6130
+ dynamic: !0
6131
+ }), d.enqueue({
6132
+ type: "tool-approval-request",
6133
+ approvalId: t,
6134
+ toolCallId: e
6052
6135
  });
6053
- }
6054
- x[f.output_index] = void 0;
6055
- } else if (f.item.type === "tool_search_output") {
6056
- let e = f.item.call_id ?? M.shift() ?? f.item.id;
6057
- d.enqueue({
6058
- type: "tool-result",
6059
- toolCallId: e,
6060
- toolName: i.toCustomToolName("tool_search"),
6061
- result: { tools: f.item.tools },
6062
- providerMetadata: { [s]: { itemId: f.item.id } }
6063
- });
6064
- } else if (f.item.type === "mcp_call") {
6065
- x[f.output_index] = void 0;
6066
- let e = f.item.approval_request_id ?? void 0, t = e == null ? f.item.id : g.get(e) ?? m[e] ?? f.item.id, n = `mcp.${f.item.name}`;
6067
- d.enqueue({
6136
+ } else if (f.item.type === "local_shell_call") x[f.output_index] = void 0, d.enqueue({
6068
6137
  type: "tool-call",
6069
- toolCallId: t,
6070
- toolName: n,
6071
- input: f.item.arguments,
6072
- providerExecuted: !0,
6073
- dynamic: !0
6074
- }), d.enqueue({
6075
- type: "tool-result",
6076
- toolCallId: t,
6077
- toolName: n,
6078
- result: {
6079
- type: "call",
6080
- serverLabel: f.item.server_label,
6081
- name: f.item.name,
6082
- arguments: f.item.arguments,
6083
- ...f.item.output == null ? {} : { output: f.item.output },
6084
- ...f.item.error == null ? {} : { error: f.item.error }
6085
- },
6138
+ toolCallId: f.item.call_id,
6139
+ toolName: i.toCustomToolName("local_shell"),
6140
+ input: JSON.stringify({ action: {
6141
+ type: "exec",
6142
+ command: f.item.action.command,
6143
+ timeoutMs: f.item.action.timeout_ms,
6144
+ user: f.item.action.user,
6145
+ workingDirectory: f.item.action.working_directory,
6146
+ env: f.item.action.env
6147
+ } }),
6086
6148
  providerMetadata: { [s]: { itemId: f.item.id } }
6087
6149
  });
6088
- } else if (f.item.type === "mcp_list_tools") x[f.output_index] = void 0;
6089
- else if (f.item.type === "apply_patch_call") {
6090
- let e = x[f.output_index];
6091
- e?.applyPatch && !e.applyPatch.endEmitted && f.item.operation.type !== "delete_file" && (e.applyPatch.hasDiff || d.enqueue({
6092
- type: "tool-input-delta",
6093
- id: e.toolCallId,
6094
- delta: $(f.item.operation.diff)
6095
- }), d.enqueue({
6096
- type: "tool-input-delta",
6097
- id: e.toolCallId,
6098
- delta: "\"}}"
6099
- }), d.enqueue({
6100
- type: "tool-input-end",
6101
- id: e.toolCallId
6102
- }), e.applyPatch.endEmitted = !0), e && f.item.status === "completed" && (T = !0, d.enqueue({
6150
+ else if (f.item.type === "shell_call") x[f.output_index] = void 0, d.enqueue({
6103
6151
  type: "tool-call",
6104
- toolCallId: e.toolCallId,
6105
- toolName: i.toCustomToolName("apply_patch"),
6106
- input: JSON.stringify({
6107
- callId: f.item.call_id,
6108
- operation: f.item.operation
6109
- }),
6152
+ toolCallId: f.item.call_id,
6153
+ toolName: i.toCustomToolName("shell"),
6154
+ input: JSON.stringify({ action: { commands: f.item.action.commands } }),
6155
+ ...c && { providerExecuted: !0 },
6110
6156
  providerMetadata: { [s]: { itemId: f.item.id } }
6111
- })), x[f.output_index] = void 0;
6112
- } else if (f.item.type === "mcp_approval_request") {
6113
- x[f.output_index] = void 0;
6114
- let e = p.config.generateId?.() ?? o(), t = f.item.approval_request_id ?? f.item.id;
6115
- g.set(t, e);
6116
- let n = `mcp.${f.item.name}`;
6117
- d.enqueue({
6118
- type: "tool-call",
6119
- toolCallId: e,
6120
- toolName: n,
6121
- input: f.item.arguments,
6122
- providerExecuted: !0,
6123
- dynamic: !0
6124
- }), d.enqueue({
6125
- type: "tool-approval-request",
6126
- approvalId: t,
6127
- toolCallId: e
6128
6157
  });
6129
- } else if (f.item.type === "local_shell_call") x[f.output_index] = void 0, d.enqueue({
6130
- type: "tool-call",
6131
- toolCallId: f.item.call_id,
6132
- toolName: i.toCustomToolName("local_shell"),
6133
- input: JSON.stringify({ action: {
6134
- type: "exec",
6135
- command: f.item.action.command,
6136
- timeoutMs: f.item.action.timeout_ms,
6137
- user: f.item.action.user,
6138
- workingDirectory: f.item.action.working_directory,
6139
- env: f.item.action.env
6140
- } }),
6141
- providerMetadata: { [s]: { itemId: f.item.id } }
6142
- });
6143
- else if (f.item.type === "shell_call") x[f.output_index] = void 0, d.enqueue({
6144
- type: "tool-call",
6145
- toolCallId: f.item.call_id,
6146
- toolName: i.toCustomToolName("shell"),
6147
- input: JSON.stringify({ action: { commands: f.item.action.commands } }),
6148
- ...c && { providerExecuted: !0 },
6149
- providerMetadata: { [s]: { itemId: f.item.id } }
6150
- });
6151
- else if (f.item.type === "shell_call_output") d.enqueue({
6152
- type: "tool-result",
6153
- toolCallId: f.item.call_id,
6154
- toolName: i.toCustomToolName("shell"),
6155
- result: { output: f.item.output.map((e) => ({
6156
- stdout: e.stdout,
6157
- stderr: e.stderr,
6158
- outcome: e.outcome.type === "exit" ? {
6159
- type: "exit",
6160
- exitCode: e.outcome.exit_code
6161
- } : { type: "timeout" }
6162
- })) }
6163
- });
6164
- else if (f.item.type === "reasoning") {
6165
- let e = O({
6166
- itemId: f.item.id,
6167
- outputIndex: f.output_index
6168
- }), t = E[e];
6169
- if (t != null) {
6170
- let n = Object.entries(t.summaryParts).filter(([e, t]) => t === "active" || t === "can-conclude").map(([e]) => e);
6171
- for (let t of n) d.enqueue({
6172
- type: "reasoning-end",
6173
- id: `${e}:${t}`,
6174
- providerMetadata: { [s]: {
6175
- itemId: e,
6176
- reasoningEncryptedContent: f.item.encrypted_content ?? null
6177
- } }
6178
- });
6179
- delete E[e];
6180
- }
6181
- D[f.output_index] = void 0;
6182
- } else f.item.type === "compaction" && d.enqueue({
6183
- type: "custom",
6184
- kind: "openai.compaction",
6185
- providerMetadata: { [s]: {
6186
- type: "compaction",
6187
- itemId: f.item.id,
6188
- encryptedContent: f.item.encrypted_content
6189
- } }
6190
- });
6191
- }
6192
- else if (function(e) {
6158
+ else if (f.item.type === "shell_call_output") d.enqueue({
6159
+ type: "tool-result",
6160
+ toolCallId: f.item.call_id,
6161
+ toolName: i.toCustomToolName("shell"),
6162
+ result: { output: f.item.output.map((e) => ({
6163
+ stdout: e.stdout,
6164
+ stderr: e.stderr,
6165
+ outcome: e.outcome.type === "exit" ? {
6166
+ type: "exit",
6167
+ exitCode: e.outcome.exit_code
6168
+ } : { type: "timeout" }
6169
+ })) }
6170
+ });
6171
+ else if (f.item.type === "reasoning") {
6172
+ let e = O({
6173
+ itemId: f.item.id,
6174
+ outputIndex: f.output_index
6175
+ }), t = E[e];
6176
+ if (t != null) {
6177
+ let n = Object.entries(t.summaryParts).filter(([e, t]) => t === "active" || t === "can-conclude").map(([e]) => e);
6178
+ for (let t of n) d.enqueue({
6179
+ type: "reasoning-end",
6180
+ id: `${e}:${t}`,
6181
+ providerMetadata: { [s]: {
6182
+ itemId: e,
6183
+ reasoningEncryptedContent: f.item.encrypted_content ?? null
6184
+ } }
6185
+ });
6186
+ delete E[e];
6187
+ }
6188
+ D[f.output_index] = void 0;
6189
+ } else f.item.type === "compaction" && d.enqueue({
6190
+ type: "custom",
6191
+ kind: "openai.compaction",
6192
+ providerMetadata: { [s]: {
6193
+ type: "compaction",
6194
+ itemId: f.item.id,
6195
+ encryptedContent: f.item.encrypted_content
6196
+ } }
6197
+ });
6198
+ }
6199
+ } else if (function(e) {
6193
6200
  return e.type === "response.function_call_arguments.delta";
6194
6201
  }(f)) {
6195
6202
  let e = x[f.output_index];
@@ -6466,7 +6473,7 @@ function Vn(e) {
6466
6473
  return e.type === "response.in_progress";
6467
6474
  }
6468
6475
  function Hn(e) {
6469
- return !(e.type === "response.created" || e.type === "response.in_progress" || e.type === "response.failed" || e.type === "error" || e.type === "unknown_chunk");
6476
+ return e.type !== "response.created" && e.type !== "response.in_progress" && e.type !== "response.failed" && e.type !== "error" && e.type !== "unknown_chunk";
6470
6477
  }
6471
6478
  function Un(e) {
6472
6479
  if (e == null) return {};
@@ -6522,7 +6529,7 @@ var Wn = N({
6522
6529
  function qn(e) {
6523
6530
  return e.includes("deepseek-v4") || e.startsWith("deepseek-flash") || e.startsWith("deepseek-pro");
6524
6531
  }
6525
- var Jn = new Set([
6532
+ var Jn = /* @__PURE__ */ new Set([
6526
6533
  "image/gif",
6527
6534
  "image/jpeg",
6528
6535
  "image/jpg",
@@ -7408,14 +7415,17 @@ function pr(e = {}) {
7408
7415
  argument: "apiKey/tokenProvider",
7409
7416
  message: "Both apiKey and tokenProvider were provided. Please use only one authentication method."
7410
7417
  });
7411
- let n = (n = "openai") => x({
7412
- ...t ? {} : { [n === "speech" ? "Ocp-Apim-Subscription-Key" : "api-key"]: me({
7418
+ let n = (n = "openai") => {
7419
+ let r = t ? {} : { [n === "speech" ? "Ocp-Apim-Subscription-Key" : "api-key"]: me({
7413
7420
  apiKey: e.apiKey,
7414
7421
  environmentVariableName: "AZURE_API_KEY",
7415
7422
  description: n === "speech" ? "Azure Speech" : "Azure OpenAI"
7416
- }) },
7417
- ...e.headers
7418
- }, "ai-sdk-azure/4.0.85"), r = t ? async (n, r) => {
7423
+ }) };
7424
+ return x({
7425
+ ...r,
7426
+ ...e.headers
7427
+ }, "ai-sdk-azure/4.0.85");
7428
+ }, r = t ? async (n, r) => {
7419
7429
  let i = K(r?.headers);
7420
7430
  return i.authorization ??= `Bearer ${await t()}`, (e.fetch ?? globalThis.fetch)(n, {
7421
7431
  ...r,