@rpcbase/agents-sdk 0.6.0 → 0.8.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/agents-sdk.css +1 -1
- package/dist/api/chat/handler.d.ts +3 -3
- 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 +2 -2
- package/dist/api/chat/runtimeConfig.d.ts +39 -0
- package/dist/api/chat/runtimeConfig.d.ts.map +1 -1
- package/dist/api/chat/tools.d.ts +1835 -65
- package/dist/api/chat/tools.d.ts.map +1 -1
- package/dist/api/chatDb.d.ts +4 -0
- package/dist/api/chatDb.d.ts.map +1 -1
- package/dist/{chatDb-DdX0Vtyt.js → chatDb-BSiHIyn9.js} +25 -18
- package/dist/{chatDb-CcAjAGX7.js → chatDb-YfeABtn-.js} +25 -18
- package/dist/{chunk-BO2N2NFS-DQxiNvU-.js → chunk-BO2N2NFS-BDR8fnNb.js} +3967 -1844
- package/dist/client-routes.browser.js +1 -1
- package/dist/client-routes.js +1 -1
- package/dist/{data-stream-handler-Cs_bYM94.js → data-stream-handler-BW4eCG7d.js} +8513 -7111
- package/dist/{data-stream-handler-DdafwSP0.js → data-stream-handler-Bd_oM4r9.js} +8512 -7110
- 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-ClWOGjB_.js → handler-C06ydMqf.js} +422 -261
- package/dist/{handler-BeWk8pDD.js → handler-C0MO52d9.js} +1 -1
- package/dist/{handler-mbDBRYl8.js → handler-C8gaYgmy.js} +1 -1
- package/dist/{handler-B_ogBIj4.js → handler-DGbBgIt2.js} +347 -186
- package/dist/{handler-CEk1hut1.js → handler-DMwBT4bK.js} +1 -1
- 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/{highlighted-body-OFNGDK62-DRz4wOlV.js → highlighted-body-OFNGDK62-ChEBPTZ3.js} +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mermaid-GHXKKRXX-fqlMH1Mi.js +2 -0
- 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 +22 -19
- package/dist/mermaid-GHXKKRXX-BE7_kWMj.js +0 -2
|
@@ -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";
|