@rpcbase/agents-sdk 0.21.0 → 0.23.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.
Files changed (87) hide show
  1. package/dist/agents-sdk.css +2 -2
  2. package/dist/api/chat/handler.d.ts.map +1 -1
  3. package/dist/api/chat/runtimeConfig.d.ts +7 -0
  4. package/dist/api/chat/runtimeConfig.d.ts.map +1 -1
  5. package/dist/api/chat/toolApproval.d.ts.map +1 -1
  6. package/dist/api/chat/usageAccumulator.d.ts +3 -0
  7. package/dist/api/chat/usageAccumulator.d.ts.map +1 -0
  8. package/dist/api/chatDb.d.ts +5 -0
  9. package/dist/api/chatDb.d.ts.map +1 -1
  10. package/dist/chat-models.browser.js +1 -1
  11. package/dist/chat-models.js +1 -1
  12. package/dist/{chatDb-Cz7QrJEO.js → chatDb-BdJ9YtaF.js} +2 -2
  13. package/dist/{chatDb-DN3gG0rE.js → chatDb-LLLcarPc.js} +2 -2
  14. package/dist/client-routes.browser.js +49 -47
  15. package/dist/client-routes.d.ts +3 -1
  16. package/dist/client-routes.d.ts.map +1 -1
  17. package/dist/client-routes.js +49 -47
  18. package/dist/components/custom-rendered-tool-part.d.ts +10 -0
  19. package/dist/components/custom-rendered-tool-part.d.ts.map +1 -0
  20. package/dist/components/message.d.ts.map +1 -1
  21. package/dist/{data-stream-handler-CwI5YJZh.js → data-stream-handler-B2V3HKGV.js} +30416 -11009
  22. package/dist/{data-stream-handler-BbCmRDVC.js → data-stream-handler-Dp949DCd.js} +31475 -9945
  23. package/dist/{handler-DS4HXmLA.js → handler-B0k7hbtU.js} +577 -527
  24. package/dist/{handler-DxEfTi-F.js → handler-BKV_TbTS.js} +2 -2
  25. package/dist/{handler-DUaBZkpS.js → handler-BSG39XdY.js} +2 -2
  26. package/dist/{handler-CvmHrkz9.js → handler-BWYFYUnk.js} +2 -2
  27. package/dist/{handler-jQOdtyET.js → handler-BYacFO-Y.js} +2 -2
  28. package/dist/{handler-pmPm2R2f.js → handler-B_gQzTyu.js} +2 -2
  29. package/dist/{handler-Du7LuJB1.js → handler-BttWvqmo.js} +2 -2
  30. package/dist/{handler-moTb7fZ2.js → handler-BylXkLvi.js} +2 -2
  31. package/dist/{handler-D63zn0W5.js → handler-CNsGVuBn.js} +2 -2
  32. package/dist/{handler-DAXyqx4y.js → handler-CQ06rgy5.js} +1 -1
  33. package/dist/{handler-yu9qDThP.js → handler-CatyrM3e.js} +1 -1
  34. package/dist/{handler-DhvGNj_T.js → handler-CtaN3xX-.js} +3 -3
  35. package/dist/{handler-DkRxnOUN.js → handler-CxqZ99zm.js} +2 -2
  36. package/dist/{handler-C6oMmAvW.js → handler-DGoBAAu-.js} +2 -2
  37. package/dist/{handler-akLHP-CG.js → handler-DGw6yvzu.js} +542 -465
  38. package/dist/{handler-Do5xRfzR.js → handler-DawIiGx7.js} +2 -2
  39. package/dist/{handler-8zojwqU7.js → handler-DgGZGHdP.js} +1 -1
  40. package/dist/{handler-Clz26ndM.js → handler-HdMkAycE.js} +1 -1
  41. package/dist/{handler-DS1_E7Zc.js → handler-eE-ZIb0w.js} +2 -2
  42. package/dist/{handler-DdjrldqF.js → handler-rwSMomTA.js} +3 -3
  43. package/dist/{handler-DXYE_QcX.js → handler-w5WPgO2_.js} +2 -2
  44. package/dist/{highlighted-body-OFNGDK62-kzg9WvPK.js → highlighted-body-OFNGDK62-Bo_Nbn3N.js} +1 -1
  45. package/dist/{highlighted-body-OFNGDK62-yqCKh6K1.js → highlighted-body-OFNGDK62-kcHa9q-o.js} +1 -1
  46. package/dist/index.browser.js +3 -3
  47. package/dist/index.js +3 -3
  48. package/dist/lib/db/schema.d.ts +5 -0
  49. package/dist/lib/db/schema.d.ts.map +1 -1
  50. package/dist/mermaid-GHXKKRXX-D0w136ew.js +2 -0
  51. package/dist/mermaid-GHXKKRXX-DzX9f260.js +2 -0
  52. package/dist/message-visibility-uK3_gpMi.js +27 -0
  53. package/dist/models/RBAgentsUsageEvent.d.ts +5 -0
  54. package/dist/models/RBAgentsUsageEvent.d.ts.map +1 -1
  55. package/dist/models.browser.js +5 -0
  56. package/dist/models.js +33 -0
  57. package/dist/pages/ChatNewPage.d.ts +3 -1
  58. package/dist/pages/ChatNewPage.d.ts.map +1 -1
  59. package/dist/pages/ChatPage.d.ts +3 -1
  60. package/dist/pages/ChatPage.d.ts.map +1 -1
  61. package/dist/{resumableSse-CmmkOGyv.js → resumableSse-DtRkqH19.js} +21 -21
  62. package/dist/routes.browser.js +15 -15
  63. package/dist/routes.js +15 -15
  64. package/dist/runtime.d.ts +2 -2
  65. package/dist/runtime.d.ts.map +1 -1
  66. package/dist/runtime.js +2 -2
  67. package/dist/tailwind-source.js +1 -1
  68. package/dist/usage.d.ts +55 -0
  69. package/dist/usage.d.ts.map +1 -0
  70. package/dist/usage.js +124 -0
  71. package/package.json +9 -5
  72. package/dist/apiErrors-DKcH9vz9.js +0 -19
  73. package/dist/chunk-BO2N2NFS-BXeXbvYU.js +0 -19355
  74. package/dist/chunk-BO2N2NFS-C0c-iJhV.js +0 -21478
  75. package/dist/handler-YvSCKKjM.js +0 -18
  76. package/dist/mermaid-GHXKKRXX-BdyS-O1X.js +0 -2
  77. package/dist/mermaid-GHXKKRXX-g_KMuIEW.js +0 -2
  78. package/dist/message-visibility-zTseZa3P.js +0 -27
  79. package/dist/resumableSse-BRFonw_y.js +0 -106
  80. /package/dist/{apiErrors-Ck5tynNE.js → apiErrors-RWc9tGd8.js} +0 -0
  81. /package/dist/{chatCtx-CJF05uCy.js → chatCtx-CWJXZURe.js} +0 -0
  82. /package/dist/{chatCtx-C8Ba-LB7.js → chatCtx-epoE4Pyt.js} +0 -0
  83. /package/dist/{handler-DdF_Xz9w.js → handler-BK9cWKoI.js} +0 -0
  84. /package/dist/{handler-eWXBUnfH.js → handler-BMYOlmTp.js} +0 -0
  85. /package/dist/{handler-CtJQ0h8J.js → handler-DGWoNsXk.js} +0 -0
  86. /package/dist/{models-Bvdwv_p7.js → models-CQvbIFoQ.js} +0 -0
  87. /package/dist/{openai-reasoning-CmTuRHwM.js → openai-reasoning-BAkAwD4A.js} +0 -0
@@ -1,5 +1,5 @@
1
- import { t as e } from "./apiErrors-Ck5tynNE.js";
2
- import { d as t, w as n } from "./chatDb-DN3gG0rE.js";
1
+ import { t as e } from "./apiErrors-RWc9tGd8.js";
2
+ import { d as t, w as n } from "./chatDb-LLLcarPc.js";
3
3
  import { z as r } from "zod";
4
4
  //#region src/api/vote/index.ts
5
5
  var i = "/api/rb/agents/vote";
@@ -1,4 +1,4 @@
1
- import { t as e } from "./chatCtx-C8Ba-LB7.js";
1
+ import { t as e } from "./chatCtx-CWJXZURe.js";
2
2
  import { z as t } from "zod";
3
3
  //#region src/api/session/current/index.ts
4
4
  var n = "/api/rb/agents/session/current";
@@ -1,4 +1,4 @@
1
- import { p as e } from "./chatDb-Cz7QrJEO.js";
1
+ import { p as e } from "./chatDb-BdJ9YtaF.js";
2
2
  import { z as t } from "zod";
3
3
  //#region src/api/test/reset/index.ts
4
4
  var n = "/api/rb/agents/test/reset";
@@ -1,5 +1,5 @@
1
- import { n as e } from "./chatCtx-CJF05uCy.js";
2
- import { t } from "./apiErrors-Ck5tynNE.js";
1
+ import { n as e } from "./chatCtx-CWJXZURe.js";
2
+ import { t } from "./apiErrors-RWc9tGd8.js";
3
3
  import { z as n } from "zod";
4
4
  //#region src/api/session/tenant/index.ts
5
5
  var r = "/api/rb/agents/session/tenant", i = n.object({ tenantId: n.string().trim().min(1) }), a = n.object({
@@ -1,6 +1,6 @@
1
- import { t as e } from "./apiErrors-DKcH9vz9.js";
2
- import { t } from "./chatCtx-C8Ba-LB7.js";
3
- import { o as n, t as r } from "./chatDb-Cz7QrJEO.js";
1
+ import { t as e } from "./apiErrors-RWc9tGd8.js";
2
+ import { t } from "./chatCtx-epoE4Pyt.js";
3
+ import { o as n, t as r } from "./chatDb-BdJ9YtaF.js";
4
4
  import { z as i } from "zod";
5
5
  //#region src/api/history/index.ts
6
6
  var a = "/api/rb/agents/history";
@@ -1,5 +1,5 @@
1
- import { t as e } from "./apiErrors-DKcH9vz9.js";
2
- import { h as t, r as n, s as r } from "./chatDb-Cz7QrJEO.js";
1
+ import { t as e } from "./apiErrors-RWc9tGd8.js";
2
+ import { h as t, r as n, s as r } from "./chatDb-LLLcarPc.js";
3
3
  import { z as i } from "zod";
4
4
  //#region src/api/document/index.ts
5
5
  var a = "/api/rb/agents/document";
@@ -1,4 +1,4 @@
1
- import { i as e, n as t, t as n } from "./chunk-BO2N2NFS-BXeXbvYU.js";
1
+ import { a as e, i as t, r as n } from "./data-stream-handler-Dp949DCd.js";
2
2
  import { useContext as r, useEffect as i, useState as a } from "react";
3
3
  import { jsx as o } from "react/jsx-runtime";
4
4
  //#region ../../node_modules/streamdown/dist/highlighted-body-OFNGDK62.js
@@ -1,4 +1,4 @@
1
- import { i as e, n as t, t as n } from "./chunk-BO2N2NFS-C0c-iJhV.js";
1
+ import { a as e, i as t, r as n } from "./data-stream-handler-B2V3HKGV.js";
2
2
  import { useContext as r, useEffect as i, useState as a } from "react";
3
3
  import { jsx as o } from "react/jsx-runtime";
4
4
  //#region ../../node_modules/streamdown/dist/highlighted-body-OFNGDK62.js
@@ -1,6 +1,6 @@
1
- import { a as e, d as t, f as n, h as r, i, m as a, n as o, p as s, r as c, t as l, u } from "./data-stream-handler-BbCmRDVC.js";
2
- import { a as d, i as f, n as p, o as m, r as h, s as g, t as _ } from "./models-Bvdwv_p7.js";
1
+ import { _ as e, c as t, g as n, h as r, l as i, m as a, n as o, s, t as c, v as l, y as u } from "./data-stream-handler-B2V3HKGV.js";
2
+ import { a as d, i as f, n as p, o as m, r as h, s as g, t as _ } from "./models-CQvbIFoQ.js";
3
3
  //#region src/index.ts
4
4
  var v = () => "hello world";
5
5
  //#endregion
6
- export { e as AgentsChatHistory, t as AgentsChatNavigationProvider, c as AgentsChatRouteLayout, i as AgentsChatSidebarPanel, o as Chat, _ as DEFAULT_CHAT_MODEL, l as DataStreamHandler, u as DataStreamProvider, p as allowedModelIds, h as chatModels, n as getAgentsChatBasePath, f as getAllowedModelIds, s as getChatIdFromPathname, d as getModelsByProvider, v as helloWorld, a as joinAgentsChatPath, m as modelsByProvider, g as resolveDefaultChatModel, r as useAgentsChatNavigation };
6
+ export { i as AgentsChatHistory, r as AgentsChatNavigationProvider, s as AgentsChatRouteLayout, t as AgentsChatSidebarPanel, o as Chat, _ as DEFAULT_CHAT_MODEL, c as DataStreamHandler, a as DataStreamProvider, p as allowedModelIds, h as chatModels, n as getAgentsChatBasePath, f as getAllowedModelIds, e as getChatIdFromPathname, d as getModelsByProvider, v as helloWorld, l as joinAgentsChatPath, m as modelsByProvider, g as resolveDefaultChatModel, u as useAgentsChatNavigation };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { a as e, d as t, f as n, h as r, i, m as a, n as o, p as s, r as c, t as l, u } from "./data-stream-handler-CwI5YJZh.js";
2
- import { a as d, i as f, n as p, o as m, r as h, s as g, t as _ } from "./models-Bvdwv_p7.js";
1
+ import { _ as e, c as t, g as n, h as r, l as i, m as a, n as o, s, t as c, v as l, y as u } from "./data-stream-handler-Dp949DCd.js";
2
+ import { a as d, i as f, n as p, o as m, r as h, s as g, t as _ } from "./models-CQvbIFoQ.js";
3
3
  //#region src/index.ts
4
4
  var v = () => "hello world";
5
5
  //#endregion
6
- export { e as AgentsChatHistory, t as AgentsChatNavigationProvider, c as AgentsChatRouteLayout, i as AgentsChatSidebarPanel, o as Chat, _ as DEFAULT_CHAT_MODEL, l as DataStreamHandler, u as DataStreamProvider, p as allowedModelIds, h as chatModels, n as getAgentsChatBasePath, f as getAllowedModelIds, s as getChatIdFromPathname, d as getModelsByProvider, v as helloWorld, a as joinAgentsChatPath, m as modelsByProvider, g as resolveDefaultChatModel, r as useAgentsChatNavigation };
6
+ export { i as AgentsChatHistory, r as AgentsChatNavigationProvider, s as AgentsChatRouteLayout, t as AgentsChatSidebarPanel, o as Chat, _ as DEFAULT_CHAT_MODEL, c as DataStreamHandler, a as DataStreamProvider, p as allowedModelIds, h as chatModels, n as getAgentsChatBasePath, f as getAllowedModelIds, e as getChatIdFromPathname, d as getModelsByProvider, v as helloWorld, l as joinAgentsChatPath, m as modelsByProvider, g as resolveDefaultChatModel, u as useAgentsChatNavigation };
@@ -64,6 +64,11 @@ export type UsageEvent = {
64
64
  totalTokens?: number;
65
65
  cachedInputTokens?: number;
66
66
  reasoningTokens?: number;
67
+ billingCurrency?: string;
68
+ billingPriceVersion?: string;
69
+ inputPriceMicrosPerMillion?: number;
70
+ outputPriceMicrosPerMillion?: number;
71
+ billingAmountMicros?: number;
67
72
  rawUsage?: unknown;
68
73
  startedAt: string;
69
74
  finishedAt: string;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/lib/db/schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,OAAO,CAAA;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,WAAW,EAAE,OAAO,EAAE,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,IAAI,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,S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BAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,0BAA0B,CAAC,EAAE,MAAM,CAAA;IACnC,2BAA2B,CAAC,EAAE,MAAM,CAAA;IACpC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { o as e } from "./data-stream-handler-B2V3HKGV.js";
2
+ export { e as Mermaid };
@@ -0,0 +1,2 @@
1
+ import { o as e } from "./data-stream-handler-Dp949DCd.js";
2
+ export { e as Mermaid };
@@ -0,0 +1,27 @@
1
+ //#region src/lib/chat-streaming.ts
2
+ var e = 60 * 1e3, t = (e) => {
3
+ if (!e) return null;
4
+ let t = e instanceof Date ? e.getTime() : new Date(e).getTime();
5
+ return Number.isFinite(t) ? t : null;
6
+ }, n = (e) => t(e.streamingUpdatedAt) ?? t(e.createdAt), r = (e, t = Date.now()) => {
7
+ if (!e.isStreaming) return !1;
8
+ let r = n(e);
9
+ return r == null || (t instanceof Date ? t.getTime() : t) - r > 18e5;
10
+ }, i = (e, t = Date.now()) => {
11
+ let n = r(e, t);
12
+ return {
13
+ isStreaming: !!e.isStreaming && !n,
14
+ isStaleStreaming: n
15
+ };
16
+ }, a = (e) => typeof e == "object" && !!e, o = (e) => typeof e == "string" && (e === "dynamic-tool" || e.startsWith("tool-")), s = (e) => a(e) && o(e.type), c = /* @__PURE__ */ new Set([
17
+ "custom",
18
+ "source-url",
19
+ "source-document",
20
+ "reasoning-file"
21
+ ]), l = (e) => typeof e == "string" && (c.has(e) || e.startsWith("data-")), u = (e) => a(e) && l(e.type), d = (e) => {
22
+ if (!a(e) || e.type !== "reasoning") return !1;
23
+ let t = typeof e.text == "string" ? e.text : "", n = e.state === "streaming", r = !!e.providerMetadata;
24
+ return !!t.trim() || n || r;
25
+ }, f = (e) => a(e) ? e.type === "text" ? typeof e.text == "string" && e.text.trim() !== "" : e.type === "reasoning" ? d(e) : e.type === "file" ? typeof e.url == "string" && e.url.trim() !== "" : s(e) || u(e) : !1, p = (e) => e.role === "assistant" && (e.parts?.some((e) => f(e)) ?? !1), m = (e) => e.role === "assistant" && !p(e), h = (e) => !m(e);
26
+ //#endregion
27
+ export { h as a, r as c, o as i, d as n, e as o, m as r, i as s, p as t };
@@ -34,6 +34,11 @@ export declare const ZRBAgentsUsageEvent: import("zod").ZodObject<{
34
34
  totalTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
35
35
  cachedInputTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
36
36
  reasoningTokens: import("zod").ZodOptional<import("zod").ZodNumber>;
37
+ billingCurrency: import("zod").ZodOptional<import("zod").ZodString>;
38
+ billingPriceVersion: import("zod").ZodOptional<import("zod").ZodString>;
39
+ inputPriceMicrosPerMillion: import("zod").ZodOptional<import("zod").ZodNumber>;
40
+ outputPriceMicrosPerMillion: import("zod").ZodOptional<import("zod").ZodNumber>;
41
+ billingAmountMicros: import("zod").ZodOptional<import("zod").ZodNumber>;
37
42
  rawUsage: import("zod").ZodOptional<import("zod").ZodUnknown>;
38
43
  startedAt: import("zod").ZodDate;
39
44
  finishedAt: import("zod").ZodDate;
@@ -1 +1 @@
1
- {"version":3,"file":"RBAgentsUsageEvent.d.ts","sourceRoot":"","sources":["../../src/models/RBAgentsUsageEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAU,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAA;AAGxD,eAAO,MAAM,8BAA8B,YAAI,SAAS,EAAE,OAAO,EAAE,SAAS,CAAU,CAAA;AACtF,eAAO,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,MAAM,wBAAwB,EAAE,cAiCtC,CAAA"}
@@ -81,6 +81,11 @@ var t = e.object({
81
81
  totalTokens: e.number().optional(),
82
82
  cachedInputTokens: e.number().optional(),
83
83
  reasoningTokens: e.number().optional(),
84
+ billingCurrency: e.string().length(3).optional(),
85
+ billingPriceVersion: e.string().optional(),
86
+ inputPriceMicrosPerMillion: e.number().int().nonnegative().optional(),
87
+ outputPriceMicrosPerMillion: e.number().int().nonnegative().optional(),
88
+ billingAmountMicros: e.number().int().nonnegative().optional(),
84
89
  rawUsage: e.unknown().optional(),
85
90
  startedAt: e.date(),
86
91
  finishedAt: e.date(),
package/dist/models.js CHANGED
@@ -324,6 +324,11 @@ var f = t.object({
324
324
  totalTokens: t.number().optional(),
325
325
  cachedInputTokens: t.number().optional(),
326
326
  reasoningTokens: t.number().optional(),
327
+ billingCurrency: t.string().length(3).optional(),
328
+ billingPriceVersion: t.string().optional(),
329
+ inputPriceMicrosPerMillion: t.number().int().nonnegative().optional(),
330
+ outputPriceMicrosPerMillion: t.number().int().nonnegative().optional(),
331
+ billingAmountMicros: t.number().int().nonnegative().optional(),
327
332
  rawUsage: t.unknown().optional(),
328
333
  startedAt: t.date(),
329
334
  finishedAt: t.date(),
@@ -445,6 +450,34 @@ var f = t.object({
445
450
  required: !1,
446
451
  default: void 0
447
452
  },
453
+ billingCurrency: {
454
+ type: String,
455
+ required: !1,
456
+ default: void 0,
457
+ trim: !0,
458
+ uppercase: !0
459
+ },
460
+ billingPriceVersion: {
461
+ type: String,
462
+ required: !1,
463
+ default: void 0,
464
+ trim: !0
465
+ },
466
+ inputPriceMicrosPerMillion: {
467
+ type: Number,
468
+ required: !1,
469
+ default: void 0
470
+ },
471
+ outputPriceMicrosPerMillion: {
472
+ type: Number,
473
+ required: !1,
474
+ default: void 0
475
+ },
476
+ billingAmountMicros: {
477
+ type: Number,
478
+ required: !1,
479
+ default: void 0
480
+ },
448
481
  rawUsage: {
449
482
  type: e.Types.Mixed,
450
483
  required: !1,
@@ -1,13 +1,15 @@
1
1
  import { type ChatModel } from "@/lib/ai/models";
2
+ import type { ReasoningEffortSelection } from "@/lib/ai/openai-reasoning";
2
3
  import type { AgentsSdkRenderMessagePart } from "@/lib/types";
3
4
  type ChatNewPageProps = {
4
5
  chatModels?: readonly ChatModel[];
5
6
  defaultChatModel?: string;
7
+ defaultOpenAIReasoningEffort?: ReasoningEffortSelection;
6
8
  renderMessagePart?: AgentsSdkRenderMessagePart;
7
9
  suggestedActions?: readonly string[];
8
10
  title1?: string;
9
11
  title2?: string;
10
12
  };
11
- export default function ChatNewPage({ chatModels, defaultChatModel, renderMessagePart, suggestedActions, title1, title2, }: ChatNewPageProps): import("react").JSX.Element;
13
+ export default function ChatNewPage({ chatModels, defaultChatModel, defaultOpenAIReasoningEffort, renderMessagePart, suggestedActions, title1, title2, }: ChatNewPageProps): import("react").JSX.Element;
12
14
  export {};
13
15
  //# sourceMappingURL=ChatNewPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatNewPage.d.ts","sourceRoot":"","sources":["../../src/pages/ChatNewPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAG7D,KAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IAC/C,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,EACN,MAAM,GACP,EAAE,gBAAgB,+BA8BlB"}
1
+ {"version":3,"file":"ChatNewPage.d.ts","sourceRoot":"","sources":["../../src/pages/ChatNewPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAG7D,KAAK,gBAAgB,GAAG;IACtB,UAAU,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4BAA4B,CAAC,EAAE,wBAAwB,CAAC;IACxD,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IAC/C,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,UAAU,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,EACN,MAAM,GACP,EAAE,gBAAgB,+BA+BlB"}
@@ -1,13 +1,15 @@
1
1
  import { type ChatModel } from "@/lib/ai/models";
2
+ import type { ReasoningEffortSelection } from "@/lib/ai/openai-reasoning";
2
3
  import type { AgentsSdkRenderMessagePart } from "@/lib/types";
3
4
  type ChatPageProps = {
4
5
  chatModels?: readonly ChatModel[];
5
6
  defaultChatModel?: string;
7
+ defaultOpenAIReasoningEffort?: ReasoningEffortSelection;
6
8
  renderMessagePart?: AgentsSdkRenderMessagePart;
7
9
  suggestedActions?: readonly string[];
8
10
  title1?: string;
9
11
  title2?: string;
10
12
  };
11
- export default function ChatPage({ chatModels, defaultChatModel, renderMessagePart, suggestedActions, title1, title2, }: ChatPageProps): import("react").JSX.Element;
13
+ export default function ChatPage({ chatModels, defaultChatModel, defaultOpenAIReasoningEffort, renderMessagePart, suggestedActions, title1, title2, }: ChatPageProps): import("react").JSX.Element;
12
14
  export {};
13
15
  //# sourceMappingURL=ChatPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatPage.d.ts","sourceRoot":"","sources":["../../src/pages/ChatPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAG7D,KAAK,aAAa,GAAG;IACnB,UAAU,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IAC/C,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,EACN,MAAM,GACP,EAAE,aAAa,+BA+Bf"}
1
+ {"version":3,"file":"ChatPage.d.ts","sourceRoot":"","sources":["../../src/pages/ChatPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAEzE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAG7D,KAAK,aAAa,GAAG;IACnB,UAAU,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4BAA4B,CAAC,EAAE,wBAAwB,CAAC;IACxD,iBAAiB,CAAC,EAAE,0BAA0B,CAAC;IAC/C,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,UAAU,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,EACN,MAAM,GACP,EAAE,aAAa,+BAgCf"}
@@ -1,6 +1,6 @@
1
- var e = 1024 * 1024, t = 6e4, n = 3e4, r = /* @__PURE__ */ new Map(), i = (e) => {
1
+ var e = /* @__PURE__ */ new Map(), t = (e) => {
2
2
  e.res.status(200), e.res.setHeader("content-type", "text/event-stream"), e.res.setHeader("cache-control", "no-cache"), e.res.setHeader("connection", "keep-alive"), e.res.setHeader("x-vercel-ai-ui-message-stream", "v1"), e.res.setHeader("x-accel-buffering", "no"), e.res.flushHeaders?.();
3
- }, a = (e) => Buffer.byteLength(e, "utf8"), o = class {
3
+ }, n = (e) => Buffer.byteLength(e, "utf8"), r = class {
4
4
  chatId;
5
5
  abortController;
6
6
  #e = [];
@@ -11,14 +11,14 @@ var e = 1024 * 1024, t = 6e4, n = 3e4, r = /* @__PURE__ */ new Map(), i = (e) =>
11
11
  maxBufferBytes;
12
12
  cleanupAfterMs;
13
13
  abortWhenNoSubscribersMs;
14
- constructor({ chatId: r, abortController: i, maxBufferBytes: a = e, cleanupAfterMs: o = t, abortWhenNoSubscribersMs: s = n }) {
15
- this.chatId = r, this.abortController = i ?? new AbortController(), this.maxBufferBytes = a, this.cleanupAfterMs = o, this.abortWhenNoSubscribersMs = s;
14
+ constructor({ chatId: e, abortController: t, maxBufferBytes: n = 1048576, cleanupAfterMs: r = 6e4, abortWhenNoSubscribersMs: i = 3e4 }) {
15
+ this.chatId = e, this.abortController = t ?? new AbortController(), this.maxBufferBytes = n, this.cleanupAfterMs = r, this.abortWhenNoSubscribersMs = i;
16
16
  }
17
17
  get isDone() {
18
18
  return this.#r;
19
19
  }
20
20
  subscribe(e) {
21
- i(e);
21
+ t(e);
22
22
  for (let t of this.#e) try {
23
23
  e.res.write(t);
24
24
  } catch {
@@ -30,13 +30,13 @@ var e = 1024 * 1024, t = 6e4, n = 3e4, r = /* @__PURE__ */ new Map(), i = (e) =>
30
30
  return;
31
31
  }
32
32
  this.#a();
33
- let t = {
33
+ let n = {
34
34
  res: e.res,
35
35
  onClose: () => {
36
- this.#n.delete(t), this.#o();
36
+ this.#n.delete(n), this.#o();
37
37
  }
38
38
  };
39
- this.#n.add(t), e.res.on("close", t.onClose);
39
+ this.#n.add(n), e.res.on("close", n.onClose);
40
40
  }
41
41
  publishJson(e) {
42
42
  this.publishRaw(`data: ${JSON.stringify(e)}\n\n`);
@@ -46,10 +46,10 @@ var e = 1024 * 1024, t = 6e4, n = 3e4, r = /* @__PURE__ */ new Map(), i = (e) =>
46
46
  }
47
47
  publishRaw(e) {
48
48
  if (this.#r) return;
49
- let t = a(e);
49
+ let t = n(e);
50
50
  for (this.#e.push(e), this.#t += t; this.#t > this.maxBufferBytes && this.#e.length > 0;) {
51
51
  let e = this.#e.shift();
52
- e != null && (this.#t -= a(e));
52
+ e != null && (this.#t -= n(e));
53
53
  }
54
54
  for (let t of this.#n) try {
55
55
  t.res.write(e);
@@ -68,7 +68,7 @@ var e = 1024 * 1024, t = 6e4, n = 3e4, r = /* @__PURE__ */ new Map(), i = (e) =>
68
68
  e.res.off("close", e.onClose), e.res.end();
69
69
  } catch {}
70
70
  this.#n.clear(), setTimeout(() => {
71
- r.delete(this.chatId);
71
+ e.delete(this.chatId);
72
72
  }, this.cleanupAfterMs);
73
73
  }
74
74
  }
@@ -91,16 +91,16 @@ var e = 1024 * 1024, t = 6e4, n = 3e4, r = /* @__PURE__ */ new Map(), i = (e) =>
91
91
  this.abort("No subscribers for resumable stream.");
92
92
  }, this.abortWhenNoSubscribersMs));
93
93
  }
94
- }, s = (e) => r.get(e) ?? null, c = ({ chatId: e, maxBufferBytes: t, cleanupAfterMs: n, abortWhenNoSubscribersMs: i }) => {
95
- let a = r.get(e);
96
- a && !a.isDone && a.abort("Replaced by new chat stream.");
97
- let s = new o({
98
- chatId: e,
99
- maxBufferBytes: t,
100
- cleanupAfterMs: n,
101
- abortWhenNoSubscribersMs: i
94
+ }, i = (t) => e.get(t) ?? null, a = ({ chatId: t, maxBufferBytes: n, cleanupAfterMs: i, abortWhenNoSubscribersMs: a }) => {
95
+ let o = e.get(t);
96
+ o && !o.isDone && o.abort("Replaced by new chat stream.");
97
+ let s = new r({
98
+ chatId: t,
99
+ maxBufferBytes: n,
100
+ cleanupAfterMs: i,
101
+ abortWhenNoSubscribersMs: a
102
102
  });
103
- return r.set(e, s), s;
103
+ return e.set(t, s), s;
104
104
  };
105
105
  //#endregion
106
- export { s as n, c as t };
106
+ export { i as n, a as t };
@@ -1,19 +1,19 @@
1
1
  //#region src/routes.ts
2
- var e = Object.entries({ .../* @__PURE__ */ Object.assign({
3
- "./api/chat/handler.ts": () => import("./handler-akLHP-CG.js"),
4
- "./api/chat/messages/handler.ts": () => import("./handler-DkRxnOUN.js"),
5
- "./api/chat/messages/trailing/handler.ts": () => import("./handler-pmPm2R2f.js"),
6
- "./api/chat/stream/handler.ts": () => import("./handler-YvSCKKjM.js"),
7
- "./api/document/handler.ts": () => import("./handler-DXYE_QcX.js"),
8
- "./api/history/handler.ts": () => import("./handler-DdjrldqF.js"),
9
- "./api/ping/handler.ts": () => import("./handler-DdF_Xz9w.js"),
10
- "./api/session/current/handler.ts": () => import("./handler-8zojwqU7.js"),
11
- "./api/session/tenant/handler.ts": () => import("./handler-CvmHrkz9.js"),
12
- "./api/stream-test/handler.ts": () => import("./handler-CtJQ0h8J.js"),
13
- "./api/suggestions/handler.ts": () => import("./handler-jQOdtyET.js"),
14
- "./api/test/reset/handler.ts": () => import("./handler-Clz26ndM.js"),
15
- "./api/upload/handler.ts": () => import("./handler-eWXBUnfH.js"),
16
- "./api/vote/handler.ts": () => import("./handler-C6oMmAvW.js")
2
+ var e = Object.entries({ .../* #__PURE__ */ Object.assign({
3
+ "./api/chat/handler.ts": () => import("./handler-DGw6yvzu.js"),
4
+ "./api/chat/messages/handler.ts": () => import("./handler-CNsGVuBn.js"),
5
+ "./api/chat/messages/trailing/handler.ts": () => import("./handler-BSG39XdY.js"),
6
+ "./api/chat/stream/handler.ts": () => import("./handler-BttWvqmo.js"),
7
+ "./api/document/handler.ts": () => import("./handler-BylXkLvi.js"),
8
+ "./api/history/handler.ts": () => import("./handler-rwSMomTA.js"),
9
+ "./api/ping/handler.ts": () => import("./handler-BK9cWKoI.js"),
10
+ "./api/session/current/handler.ts": () => import("./handler-CQ06rgy5.js"),
11
+ "./api/session/tenant/handler.ts": () => import("./handler-BWYFYUnk.js"),
12
+ "./api/stream-test/handler.ts": () => import("./handler-DGWoNsXk.js"),
13
+ "./api/suggestions/handler.ts": () => import("./handler-BYacFO-Y.js"),
14
+ "./api/test/reset/handler.ts": () => import("./handler-HdMkAycE.js"),
15
+ "./api/upload/handler.ts": () => import("./handler-BMYOlmTp.js"),
16
+ "./api/vote/handler.ts": () => import("./handler-DGoBAAu-.js")
17
17
  }) }).reduce((e, [t, n]) => (e[t.replace("./api/", "@rpcbase/agents-sdk/api/")] = n, e), {});
18
18
  //#endregion
19
19
  export { e as routes };
package/dist/routes.js CHANGED
@@ -1,19 +1,19 @@
1
1
  //#region src/routes.ts
2
- var e = Object.entries({ .../* @__PURE__ */ Object.assign({
3
- "./api/chat/handler.ts": () => import("./handler-DS4HXmLA.js").then((e) => e.t),
4
- "./api/chat/messages/handler.ts": () => import("./handler-D63zn0W5.js"),
5
- "./api/chat/messages/trailing/handler.ts": () => import("./handler-DUaBZkpS.js"),
6
- "./api/chat/stream/handler.ts": () => import("./handler-Du7LuJB1.js"),
7
- "./api/document/handler.ts": () => import("./handler-moTb7fZ2.js"),
8
- "./api/history/handler.ts": () => import("./handler-DhvGNj_T.js"),
9
- "./api/ping/handler.ts": () => import("./handler-DdF_Xz9w.js"),
10
- "./api/session/current/handler.ts": () => import("./handler-DAXyqx4y.js"),
11
- "./api/session/tenant/handler.ts": () => import("./handler-DS1_E7Zc.js"),
12
- "./api/stream-test/handler.ts": () => import("./handler-CtJQ0h8J.js"),
13
- "./api/suggestions/handler.ts": () => import("./handler-DxEfTi-F.js"),
14
- "./api/test/reset/handler.ts": () => import("./handler-yu9qDThP.js"),
15
- "./api/upload/handler.ts": () => import("./handler-eWXBUnfH.js"),
16
- "./api/vote/handler.ts": () => import("./handler-Do5xRfzR.js")
2
+ var e = Object.entries({ .../* #__PURE__ */ Object.assign({
3
+ "./api/chat/handler.ts": () => import("./handler-B0k7hbtU.js").then((e) => e.t),
4
+ "./api/chat/messages/handler.ts": () => import("./handler-CxqZ99zm.js"),
5
+ "./api/chat/messages/trailing/handler.ts": () => import("./handler-B_gQzTyu.js"),
6
+ "./api/chat/stream/handler.ts": () => import("./handler-BttWvqmo.js"),
7
+ "./api/document/handler.ts": () => import("./handler-w5WPgO2_.js"),
8
+ "./api/history/handler.ts": () => import("./handler-CtaN3xX-.js"),
9
+ "./api/ping/handler.ts": () => import("./handler-BK9cWKoI.js"),
10
+ "./api/session/current/handler.ts": () => import("./handler-DgGZGHdP.js"),
11
+ "./api/session/tenant/handler.ts": () => import("./handler-eE-ZIb0w.js"),
12
+ "./api/stream-test/handler.ts": () => import("./handler-DGWoNsXk.js"),
13
+ "./api/suggestions/handler.ts": () => import("./handler-BKV_TbTS.js"),
14
+ "./api/test/reset/handler.ts": () => import("./handler-CatyrM3e.js"),
15
+ "./api/upload/handler.ts": () => import("./handler-BMYOlmTp.js"),
16
+ "./api/vote/handler.ts": () => import("./handler-DawIiGx7.js")
17
17
  }) }).reduce((e, [t, n]) => (e[t.replace("./api/", "@rpcbase/agents-sdk/api/")] = n, e), {});
18
18
  //#endregion
19
19
  export { e as routes };
package/dist/runtime.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { configureAgentRuntime, getAgentRuntimeConfig, type AgentDefinition, type AgentRuntimeChatMessage, type AgentRuntimeChatModel, type AgentRuntimeConfig, type AgentRuntimeHistoryCompactionConfig, type AgentRuntimeHistoryCompactionInput, type AgentRuntimeHistoryCompactionLimits, type AgentRuntimeHistoryCompactionResult, type AgentRuntimeHistoryCompactionState, type AgentRuntimeIdentity, type AgentRuntimeMode, type AgentRuntimeRunOptions, type AgentRuntimeRunOptionsInput, type AgentRuntimeRunState, type AgentRuntimeRunStateEvent, type AgentRuntimeToolApprovalConfig, type AgentRuntimeToolApprovalDecision, type AgentRuntimeToolApprovalDecisionEvent, type AgentRuntimeToolApprovalDecisionSource, type AgentRuntimeToolApprovalMode, type AgentRuntimeToolApprovalPolicy, type AgentRuntimeToolApprovalResolverInput, type AgentRuntimeToolApprovalReviewerInput, type AgentRuntimeToolApprovalStaticPolicy, type AgentRuntimeToolApprovalTarget, type AgentRuntimeToolRisk, type AgentRuntimeUsageContext, type AgentRuntimeUsageContextInput } from "./api/chat/runtimeConfig";
1
+ import { configureAgentRuntime, getAgentRuntimeConfig, type AgentDefinition, type AgentRuntimeChatMessage, type AgentRuntimeChatModel, type AgentRuntimeConfig, type AgentRuntimeHistoryCompactionConfig, type AgentRuntimeHistoryCompactionInput, type AgentRuntimeHistoryCompactionLimits, type AgentRuntimeHistoryCompactionResult, type AgentRuntimeHistoryCompactionState, type AgentRuntimeIdentity, type AgentRuntimeMode, type AgentRuntimeRunOptions, type AgentRuntimeRunOptionsInput, type AgentRuntimeRunState, type AgentRuntimeRunStateEvent, type AgentRuntimeToolApprovalConfig, type AgentRuntimeToolApprovalDecision, type AgentRuntimeToolApprovalDecisionEvent, type AgentRuntimeToolApprovalDecisionSource, type AgentRuntimeToolApprovalMode, type AgentRuntimeToolApprovalPolicy, type AgentRuntimeToolApprovalResolverInput, type AgentRuntimeToolApprovalReviewerInput, type AgentRuntimeToolApprovalStaticPolicy, type AgentRuntimeToolApprovalTarget, type AgentRuntimeToolRisk, type AgentRuntimeUsageContext, type AgentRuntimeUsageContextInput, type AgentRuntimeUsagePricingInput } from "./api/chat/runtimeConfig";
2
2
  import { runAgentLoop, type RunAgentLoopInput, type RunAgentLoopResult } from "./api/chat/handler";
3
3
  export type AgentRtsMessagePayload = {
4
4
  chatId: string;
@@ -16,5 +16,5 @@ export type AgentRtsMessageTransport = {
16
16
  }) => void | Promise<void>;
17
17
  };
18
18
  export declare const createRtsMessageTransport: () => AgentRtsMessageTransport;
19
- export { configureAgentRuntime, getAgentRuntimeConfig, runAgentLoop, type AgentDefinition, type AgentRuntimeChatMessage, type AgentRuntimeChatModel, type AgentRuntimeConfig, type AgentRuntimeHistoryCompactionConfig, type AgentRuntimeHistoryCompactionInput, type AgentRuntimeHistoryCompactionLimits, type AgentRuntimeHistoryCompactionResult, type AgentRuntimeHistoryCompactionState, type AgentRuntimeIdentity, type AgentRuntimeMode, type AgentRuntimeRunOptions, type AgentRuntimeRunOptionsInput, type AgentRuntimeRunState, type AgentRuntimeRunStateEvent, type AgentRuntimeToolApprovalConfig, type AgentRuntimeToolApprovalDecision, type AgentRuntimeToolApprovalDecisionEvent, type AgentRuntimeToolApprovalDecisionSource, type AgentRuntimeToolApprovalMode, type AgentRuntimeToolApprovalPolicy, type AgentRuntimeToolApprovalResolverInput, type AgentRuntimeToolApprovalReviewerInput, type AgentRuntimeToolApprovalStaticPolicy, type AgentRuntimeToolApprovalTarget, type AgentRuntimeToolRisk, type AgentRuntimeUsageContext, type AgentRuntimeUsageContextInput, type RunAgentLoopInput, type RunAgentLoopResult, };
19
+ export { configureAgentRuntime, getAgentRuntimeConfig, runAgentLoop, type AgentDefinition, type AgentRuntimeChatMessage, type AgentRuntimeChatModel, type AgentRuntimeConfig, type AgentRuntimeHistoryCompactionConfig, type AgentRuntimeHistoryCompactionInput, type AgentRuntimeHistoryCompactionLimits, type AgentRuntimeHistoryCompactionResult, type AgentRuntimeHistoryCompactionState, type AgentRuntimeIdentity, type AgentRuntimeMode, type AgentRuntimeRunOptions, type AgentRuntimeRunOptionsInput, type AgentRuntimeRunState, type AgentRuntimeRunStateEvent, type AgentRuntimeToolApprovalConfig, type AgentRuntimeToolApprovalDecision, type AgentRuntimeToolApprovalDecisionEvent, type AgentRuntimeToolApprovalDecisionSource, type AgentRuntimeToolApprovalMode, type AgentRuntimeToolApprovalPolicy, type AgentRuntimeToolApprovalResolverInput, type AgentRuntimeToolApprovalReviewerInput, type AgentRuntimeToolApprovalStaticPolicy, type AgentRuntimeToolApprovalTarget, type AgentRuntimeToolRisk, type AgentRuntimeUsageContext, type AgentRuntimeUsageContextInput, type AgentRuntimeUsagePricingInput, type RunAgentLoopInput, type RunAgentLoopResult, };
20
20
  //# sourceMappingURL=runtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACxC,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACvC,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,sCAAsC,EAC3C,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,qCAAqC,EAC1C,KAAK,qCAAqC,EAC1C,KAAK,oCAAoC,EACzC,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EACnC,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,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AAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpH,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAO,wBAK5C,CAAA;AAED,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACxC,KAAK,mCAAmC,EACxC,KAAK,kCAAkC,EACvC,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,sCAAsC,EAC3C,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,qCAAqC,EAC1C,KAAK,qCAAqC,EAC1C,KAAK,oCAAoC,EACzC,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAClC,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,GACxB,CAAA"}
package/dist/runtime.js CHANGED
@@ -1,5 +1,5 @@
1
- import { i as e, r as t } from "./chatCtx-CJF05uCy.js";
2
- import { n } from "./handler-DS4HXmLA.js";
1
+ import { i as e, r as t } from "./chatCtx-CWJXZURe.js";
2
+ import { n } from "./handler-B0k7hbtU.js";
3
3
  import { publishRtsMessage as r } from "@rpcbase/server/rts";
4
4
  //#region src/runtime.ts
5
5
  var i = () => ({