@rpcbase/agents-sdk 0.7.0 → 0.9.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 (75) hide show
  1. package/dist/api/chat/handler.d.ts.map +1 -1
  2. package/dist/api/chat/historyCompaction.d.ts +29 -0
  3. package/dist/api/chat/historyCompaction.d.ts.map +1 -0
  4. package/dist/api/chat/models.d.ts +1 -0
  5. package/dist/api/chat/models.d.ts.map +1 -1
  6. package/dist/api/chat/runtimeConfig.d.ts +43 -0
  7. package/dist/api/chat/runtimeConfig.d.ts.map +1 -1
  8. package/dist/api/chatDb.d.ts +4 -0
  9. package/dist/api/chatDb.d.ts.map +1 -1
  10. package/dist/chat-models.browser.js +2 -2
  11. package/dist/chat-models.d.ts +1 -1
  12. package/dist/chat-models.d.ts.map +1 -1
  13. package/dist/chat-models.js +2 -2
  14. package/dist/{chatDb-DdX0Vtyt.js → chatDb-BSiHIyn9.js} +25 -18
  15. package/dist/{chatDb-CcAjAGX7.js → chatDb-YfeABtn-.js} +25 -18
  16. package/dist/client-routes.browser.js +94 -75
  17. package/dist/client-routes.d.ts +7 -1
  18. package/dist/client-routes.d.ts.map +1 -1
  19. package/dist/client-routes.js +94 -75
  20. package/dist/components/agents-chat-route-layout.d.ts +5 -2
  21. package/dist/components/agents-chat-route-layout.d.ts.map +1 -1
  22. package/dist/components/artifact-messages.d.ts +3 -2
  23. package/dist/components/artifact-messages.d.ts.map +1 -1
  24. package/dist/components/artifact.d.ts +6 -2
  25. package/dist/components/artifact.d.ts.map +1 -1
  26. package/dist/components/chat.d.ts +6 -2
  27. package/dist/components/chat.d.ts.map +1 -1
  28. package/dist/components/message.d.ts +3 -2
  29. package/dist/components/message.d.ts.map +1 -1
  30. package/dist/components/messages.d.ts +3 -2
  31. package/dist/components/messages.d.ts.map +1 -1
  32. package/dist/components/multimodal-input.d.ts +4 -1
  33. package/dist/components/multimodal-input.d.ts.map +1 -1
  34. package/dist/components/sidebar-history-item.d.ts +4 -5
  35. package/dist/components/sidebar-history-item.d.ts.map +1 -1
  36. package/dist/components/sidebar-history.d.ts +6 -3
  37. package/dist/components/sidebar-history.d.ts.map +1 -1
  38. package/dist/{data-stream-handler-BW4eCG7d.js → data-stream-handler-DXAHFC5k.js} +462 -427
  39. package/dist/{data-stream-handler-Bd_oM4r9.js → data-stream-handler-lr4wJ3vt.js} +462 -427
  40. package/dist/{handler-D7f8iAy5.js → handler-5n-YwiF3.js} +1 -1
  41. package/dist/{handler-CGV7uuUA.js → handler-B3uUDuTR.js} +1 -1
  42. package/dist/{handler-BLG0AYVC.js → handler-BMeUL2iE.js} +1 -1
  43. package/dist/{handler-C6u7vLAb.js → handler-BgYHL3BZ.js} +9 -9
  44. package/dist/{handler-dVlpopfq.js → handler-By86dyTJ.js} +1 -1
  45. package/dist/{handler-BeWk8pDD.js → handler-C0MO52d9.js} +1 -1
  46. package/dist/{handler-mbDBRYl8.js → handler-C8gaYgmy.js} +1 -1
  47. package/dist/{handler-ClWOGjB_.js → handler-DE8agLBS.js} +438 -268
  48. package/dist/{handler-CEk1hut1.js → handler-DMwBT4bK.js} +1 -1
  49. package/dist/{handler-DPuJK6ft.js → handler-DSncMeo4.js} +352 -182
  50. package/dist/{handler-BY5bgBEh.js → handler-DdKB5P3H.js} +1 -1
  51. package/dist/{handler-BBCbPLLC.js → handler-Dy536I3-.js} +1 -1
  52. package/dist/{handler-BKT8Hl0a.js → handler-Jua6SU39.js} +9 -9
  53. package/dist/{handler-CZSMkZnQ.js → handler-YmuAR8ei.js} +1 -1
  54. package/dist/{handler-P40GjJry.js → handler-hah8tVEE.js} +1 -1
  55. package/dist/{handler-DbjPd3w4.js → handler-svaSKC2q.js} +1 -1
  56. package/dist/index.browser.js +4 -3
  57. package/dist/index.d.ts +2 -0
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +4 -3
  60. package/dist/lib/ai/models.d.ts +6 -0
  61. package/dist/lib/ai/models.d.ts.map +1 -1
  62. package/dist/lib/types.d.ts +23 -0
  63. package/dist/lib/types.d.ts.map +1 -1
  64. package/dist/{models-DUt7W9lV.js → models-DphUIx22.js} +13 -2
  65. package/dist/pages/ChatNewPage.d.ts +6 -1
  66. package/dist/pages/ChatNewPage.d.ts.map +1 -1
  67. package/dist/pages/ChatPage.d.ts +6 -1
  68. package/dist/pages/ChatPage.d.ts.map +1 -1
  69. package/dist/routes.browser.js +8 -8
  70. package/dist/routes.js +8 -8
  71. package/dist/runtime.d.ts +2 -2
  72. package/dist/runtime.d.ts.map +1 -1
  73. package/dist/runtime.js +1 -1
  74. package/dist/tailwind-source.js +1 -1
  75. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./apiErrors-FdS4Eh1H.js";
2
- import { a as t, l as n } from "./chatDb-DdX0Vtyt.js";
2
+ import { a as t, l as n } from "./chatDb-BSiHIyn9.js";
3
3
  import { z as r } from "zod";
4
4
  //#region src/api/chat/messages/index.ts
5
5
  var i = "/api/rb/agents/chat/messages";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./apiErrors-CFUx-UrE.js";
2
2
  import { t } from "./chatCtx-DSgD1fix.js";
3
- import { o as n, t as r } from "./chatDb-CcAjAGX7.js";
3
+ import { o as n, t as r } from "./chatDb-YfeABtn-.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
1
  import { t as e } from "./apiErrors-CFUx-UrE.js";
2
- import { u as t } from "./chatDb-CcAjAGX7.js";
2
+ import { u as t } from "./chatDb-YfeABtn-.js";
3
3
  import { z as n } from "zod";
4
4
  //#region src/api/suggestions/index.ts
5
5
  var r = "/api/rb/agents/suggestions";
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./apiErrors-FdS4Eh1H.js";
2
- import { d as t, x as n } from "./chatDb-DdX0Vtyt.js";
2
+ import { S as t, d as n } from "./chatDb-BSiHIyn9.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";
@@ -9,9 +9,9 @@ r.any(), r.any();
9
9
  var a = (e) => {
10
10
  let t = e.query?.chatId, n = Array.isArray(t) ? t[0] : t;
11
11
  return typeof n == "string" && n.trim() !== "" ? n : null;
12
- }, o = async (n, r) => {
12
+ }, o = async (t, r) => {
13
13
  let i = a(r.req);
14
- return i ? t(r, i) : e(r, "bad_request:api", "Parameter chatId is required.");
14
+ return i ? n(r, i) : e(r, "bad_request:api", "Parameter chatId is required.");
15
15
  }, s = (e) => {
16
16
  if (e && typeof e == "object") return e;
17
17
  if (typeof e == "string" && e.trim() !== "") try {
@@ -21,14 +21,14 @@ var a = (e) => {
21
21
  }
22
22
  return null;
23
23
  }, c = (e) => {
24
- e.get(i, o), e.use(i, async (e, t, r) => {
24
+ e.get(i, o), e.use(i, async (e, n, r) => {
25
25
  if (e.method !== "PATCH") {
26
26
  r();
27
27
  return;
28
28
  }
29
29
  let i = s(e.body), a = typeof i?.chatId == "string" ? i.chatId : null, o = typeof i?.messageId == "string" ? i.messageId : null, c = i?.type === "up" || i?.type === "down" ? i.type : null;
30
30
  if (!a || !o || !c) {
31
- t.status(400).json({
31
+ n.status(400).json({
32
32
  code: "bad_request:api",
33
33
  message: "bad_request:api",
34
34
  cause: "Parameters chatId, messageId, and type are required."
@@ -36,23 +36,23 @@ var a = (e) => {
36
36
  return;
37
37
  }
38
38
  try {
39
- await n({
39
+ await t({
40
40
  req: e,
41
- res: t
41
+ res: n
42
42
  }, {
43
43
  chatId: a,
44
44
  messageId: o,
45
45
  type: c
46
46
  });
47
47
  } catch (e) {
48
- console.error(e), t.status(500).json({
48
+ console.error(e), n.status(500).json({
49
49
  code: "internal:api",
50
50
  message: "internal:api",
51
51
  cause: "Failed to vote message."
52
52
  });
53
53
  return;
54
54
  }
55
- t.status(200).send("Message voted");
55
+ n.status(200).send("Message voted");
56
56
  });
57
57
  };
58
58
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./apiErrors-CFUx-UrE.js";
2
- import { a as t, c as n, i as r } from "./chatDb-CcAjAGX7.js";
2
+ import { a as t, c as n, i as r } from "./chatDb-YfeABtn-.js";
3
3
  import { z as i } from "zod";
4
4
  //#region src/api/chat/messages/trailing/index.ts
5
5
  var a = "/api/rb/agents/chat/messages/trailing";
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./apiErrors-CFUx-UrE.js";
2
- import { m as t, r as n, s as r } from "./chatDb-CcAjAGX7.js";
2
+ import { m as t, r as n, s as r } from "./chatDb-YfeABtn-.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,5 +1,5 @@
1
1
  import { t as e } from "./apiErrors-CFUx-UrE.js";
2
- import { a as t, l as n } from "./chatDb-CcAjAGX7.js";
2
+ import { a as t, l as n } from "./chatDb-YfeABtn-.js";
3
3
  import { z as r } from "zod";
4
4
  //#region src/api/chat/messages/index.ts
5
5
  var i = "/api/rb/agents/chat/messages";