@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.
- package/dist/api/chat/handler.d.ts.map +1 -1
- package/dist/api/chat/historyCompaction.d.ts +29 -0
- package/dist/api/chat/historyCompaction.d.ts.map +1 -0
- package/dist/api/chat/models.d.ts +1 -0
- package/dist/api/chat/models.d.ts.map +1 -1
- package/dist/api/chat/runtimeConfig.d.ts +43 -0
- package/dist/api/chat/runtimeConfig.d.ts.map +1 -1
- package/dist/api/chatDb.d.ts +4 -0
- package/dist/api/chatDb.d.ts.map +1 -1
- package/dist/chat-models.browser.js +2 -2
- package/dist/chat-models.d.ts +1 -1
- package/dist/chat-models.d.ts.map +1 -1
- package/dist/chat-models.js +2 -2
- package/dist/{chatDb-DdX0Vtyt.js → chatDb-BSiHIyn9.js} +25 -18
- package/dist/{chatDb-CcAjAGX7.js → chatDb-YfeABtn-.js} +25 -18
- package/dist/client-routes.browser.js +94 -75
- package/dist/client-routes.d.ts +7 -1
- package/dist/client-routes.d.ts.map +1 -1
- package/dist/client-routes.js +94 -75
- package/dist/components/agents-chat-route-layout.d.ts +5 -2
- package/dist/components/agents-chat-route-layout.d.ts.map +1 -1
- package/dist/components/artifact-messages.d.ts +3 -2
- package/dist/components/artifact-messages.d.ts.map +1 -1
- package/dist/components/artifact.d.ts +6 -2
- package/dist/components/artifact.d.ts.map +1 -1
- package/dist/components/chat.d.ts +6 -2
- package/dist/components/chat.d.ts.map +1 -1
- package/dist/components/message.d.ts +3 -2
- package/dist/components/message.d.ts.map +1 -1
- package/dist/components/messages.d.ts +3 -2
- package/dist/components/messages.d.ts.map +1 -1
- package/dist/components/multimodal-input.d.ts +4 -1
- package/dist/components/multimodal-input.d.ts.map +1 -1
- package/dist/components/sidebar-history-item.d.ts +4 -5
- package/dist/components/sidebar-history-item.d.ts.map +1 -1
- package/dist/components/sidebar-history.d.ts +6 -3
- package/dist/components/sidebar-history.d.ts.map +1 -1
- package/dist/{data-stream-handler-BW4eCG7d.js → data-stream-handler-DXAHFC5k.js} +462 -427
- package/dist/{data-stream-handler-Bd_oM4r9.js → data-stream-handler-lr4wJ3vt.js} +462 -427
- package/dist/{handler-D7f8iAy5.js → handler-5n-YwiF3.js} +1 -1
- package/dist/{handler-CGV7uuUA.js → handler-B3uUDuTR.js} +1 -1
- package/dist/{handler-BLG0AYVC.js → handler-BMeUL2iE.js} +1 -1
- package/dist/{handler-C6u7vLAb.js → handler-BgYHL3BZ.js} +9 -9
- package/dist/{handler-dVlpopfq.js → handler-By86dyTJ.js} +1 -1
- package/dist/{handler-BeWk8pDD.js → handler-C0MO52d9.js} +1 -1
- package/dist/{handler-mbDBRYl8.js → handler-C8gaYgmy.js} +1 -1
- package/dist/{handler-ClWOGjB_.js → handler-DE8agLBS.js} +438 -268
- package/dist/{handler-CEk1hut1.js → handler-DMwBT4bK.js} +1 -1
- package/dist/{handler-DPuJK6ft.js → handler-DSncMeo4.js} +352 -182
- package/dist/{handler-BY5bgBEh.js → handler-DdKB5P3H.js} +1 -1
- package/dist/{handler-BBCbPLLC.js → handler-Dy536I3-.js} +1 -1
- package/dist/{handler-BKT8Hl0a.js → handler-Jua6SU39.js} +9 -9
- package/dist/{handler-CZSMkZnQ.js → handler-YmuAR8ei.js} +1 -1
- package/dist/{handler-P40GjJry.js → handler-hah8tVEE.js} +1 -1
- package/dist/{handler-DbjPd3w4.js → handler-svaSKC2q.js} +1 -1
- package/dist/index.browser.js +4 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/lib/ai/models.d.ts +6 -0
- package/dist/lib/ai/models.d.ts.map +1 -1
- package/dist/lib/types.d.ts +23 -0
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/{models-DUt7W9lV.js → models-DphUIx22.js} +13 -2
- package/dist/pages/ChatNewPage.d.ts +6 -1
- package/dist/pages/ChatNewPage.d.ts.map +1 -1
- package/dist/pages/ChatPage.d.ts +6 -1
- package/dist/pages/ChatPage.d.ts.map +1 -1
- package/dist/routes.browser.js +8 -8
- package/dist/routes.js +8 -8
- package/dist/runtime.d.ts +2 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +1 -1
- package/dist/tailwind-source.js +1 -1
- 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-
|
|
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-
|
|
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-FdS4Eh1H.js";
|
|
2
|
-
import {
|
|
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 (
|
|
12
|
+
}, o = async (t, r) => {
|
|
13
13
|
let i = a(r.req);
|
|
14
|
-
return i ?
|
|
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,
|
|
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
|
-
|
|
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
|
|
39
|
+
await t({
|
|
40
40
|
req: e,
|
|
41
|
-
res:
|
|
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),
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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";
|