@rpcbase/agents-sdk 0.4.0 → 0.6.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 (68) hide show
  1. package/dist/chat-models.js +1 -1
  2. package/dist/{chatDb-DfmUbQT2.js → chatDb-DdX0Vtyt.js} +1 -1
  3. package/dist/chunk-BO2N2NFS-DQxiNvU-.js +19355 -0
  4. package/dist/{chunk-BO2N2NFS-DAcOISTD.js → chunk-BO2N2NFS-DRhdPgDj.js} +335 -335
  5. package/dist/client-routes.browser.js +31 -17
  6. package/dist/client-routes.d.ts +4 -1
  7. package/dist/client-routes.d.ts.map +1 -1
  8. package/dist/client-routes.js +32 -18
  9. package/dist/components/agents-chat-route-layout.d.ts.map +1 -1
  10. package/dist/components/agents-session-context.d.ts +11 -0
  11. package/dist/components/agents-session-context.d.ts.map +1 -0
  12. package/dist/components/artifact.d.ts +2 -1
  13. package/dist/components/artifact.d.ts.map +1 -1
  14. package/dist/components/chat.d.ts +4 -1
  15. package/dist/components/chat.d.ts.map +1 -1
  16. package/dist/components/document-preview.d.ts.map +1 -1
  17. package/dist/components/greeting.d.ts +6 -1
  18. package/dist/components/greeting.d.ts.map +1 -1
  19. package/dist/components/message-actions.d.ts.map +1 -1
  20. package/dist/components/messages.d.ts +3 -1
  21. package/dist/components/messages.d.ts.map +1 -1
  22. package/dist/components/multimodal-input.d.ts +2 -1
  23. package/dist/components/multimodal-input.d.ts.map +1 -1
  24. package/dist/components/suggested-actions.d.ts +2 -1
  25. package/dist/components/suggested-actions.d.ts.map +1 -1
  26. package/dist/components/version-footer.d.ts.map +1 -1
  27. package/dist/{data-stream-handler-D9R15ZTc.js → data-stream-handler-Cs_bYM94.js} +10087 -7474
  28. package/dist/{data-stream-handler-eapMI8kQ.js → data-stream-handler-DdafwSP0.js} +11035 -8442
  29. package/dist/{handler-hV65_Dui.js → handler-6yb49c5-.js} +2 -2
  30. package/dist/{handler-klwfX3CY.js → handler-B8Twsrmo.js} +1 -1
  31. package/dist/{handler-BUvspcpX.js → handler-BBCbPLLC.js} +3 -3
  32. package/dist/{handler-B6kVyUoS.js → handler-BY5bgBEh.js} +2 -2
  33. package/dist/{handler-BgRhcxRI.js → handler-B_ogBIj4.js} +6 -6
  34. package/dist/{handler-PkV1nrcU.js → handler-C6u7vLAb.js} +2 -2
  35. package/dist/{handler-CKmHOFMG.js → handler-CZSMkZnQ.js} +2 -2
  36. package/dist/{handler-BgY0anAs.js → handler-D7f8iAy5.js} +2 -2
  37. package/dist/{handler-BqHuBA6Q.js → handler-DbjPd3w4.js} +1 -1
  38. package/dist/{handler-BQZNf9EG.js → handler-P40GjJry.js} +2 -2
  39. package/dist/{handler-Cj0HdsW_.js → handler-lUriE7jY.js} +2 -2
  40. package/dist/{highlighted-body-OFNGDK62-BCO3VeMz.js → highlighted-body-OFNGDK62-255wLBzG.js} +1 -1
  41. package/dist/highlighted-body-OFNGDK62-DRz4wOlV.js +36 -0
  42. package/dist/hooks/use-artifact.d.ts +3 -1
  43. package/dist/hooks/use-artifact.d.ts.map +1 -1
  44. package/dist/hooks/use-chat-documents.d.ts +17 -0
  45. package/dist/hooks/use-chat-documents.d.ts.map +1 -0
  46. package/dist/hooks/use-chat-votes.d.ts +14 -0
  47. package/dist/hooks/use-chat-votes.d.ts.map +1 -0
  48. package/dist/index.browser.js +1 -1
  49. package/dist/index.js +1 -1
  50. package/dist/mermaid-GHXKKRXX-BE7_kWMj.js +2 -0
  51. package/dist/mermaid-GHXKKRXX-BqT9Nt_j.js +2 -0
  52. package/dist/pages/ChatNewPage.d.ts +7 -1
  53. package/dist/pages/ChatNewPage.d.ts.map +1 -1
  54. package/dist/pages/ChatPage.d.ts +7 -1
  55. package/dist/pages/ChatPage.d.ts.map +1 -1
  56. package/dist/routes.js +14 -14
  57. package/dist/runtime.js +2 -2
  58. package/dist/tailwind-source.js +1 -1
  59. package/package.json +5 -7
  60. package/dist/handler-BdEE0--D.js +0 -71
  61. package/dist/handler-CDFg5cLB.js +0 -11
  62. package/dist/handler-jpHBMoww.js +0 -19
  63. package/dist/mermaid-GHXKKRXX-DbugXfLN.js +0 -2
  64. package/dist/models-CF61gMjU.js +0 -29
  65. package/dist/openai-reasoning-CLjhz1V1.js +0 -19
  66. /package/dist/{apiErrors-mOJbPi7h.js → apiErrors-FdS4Eh1H.js} +0 -0
  67. /package/dist/{chatCtx-BsPi6PAE.js → chatCtx-BWOFI93u.js} +0 -0
  68. /package/dist/{resumableSse-DnlE4O7h.js → resumableSse-BprFOR5Q.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/agents-sdk",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -151,7 +151,6 @@
151
151
  "@ai-sdk/openai": "3.0.73",
152
152
  "@ai-sdk/react": "3.0.210",
153
153
  "@ai-sdk/xai": "3.0.96",
154
- "@base-ui/react": "1.6.0",
155
154
  "@codemirror/lang-python": "6.2.1",
156
155
  "@codemirror/state": "6.6.0",
157
156
  "@codemirror/theme-one-dark": "6.1.3",
@@ -167,14 +166,11 @@
167
166
  "class-variance-authority": "0.7.1",
168
167
  "classnames": "2.5.1",
169
168
  "codemirror": "6.0.2",
170
- "date-fns": "4.4.0",
171
169
  "diff-match-patch": "1.0.5",
172
170
  "embla-carousel-react": "8.6.0",
173
171
  "fast-deep-equal": "3.1.3",
174
172
  "framer-motion": "12.41.0",
175
- "lucide-react": "0.562.0",
176
173
  "mongodb": "7.3.0",
177
- "motion": "12.41.0",
178
174
  "nanoid": "5.1.14",
179
175
  "orderedmap": "2.1.1",
180
176
  "papaparse": "5.5.4",
@@ -189,12 +185,11 @@
189
185
  "react-data-grid": "7.0.0-beta.59",
190
186
  "react-syntax-highlighter": "16.1.1",
191
187
  "shiki": "4.2.0",
192
- "streamdown": "2.5.0",
193
- "swr": "2.4.1",
194
188
  "use-stick-to-bottom": "1.1.6",
195
189
  "usehooks-ts": "3.1.1"
196
190
  },
197
191
  "devDependencies": {
192
+ "@base-ui/react": "1.6.0",
198
193
  "@playwright/test": "1.61.0",
199
194
  "@rpcbase/vite": "latest",
200
195
  "@tailwindcss/typography": "0.5.20",
@@ -203,9 +198,12 @@
203
198
  "@types/papaparse": "5.5.2",
204
199
  "@types/react-syntax-highlighter": "15.5.13",
205
200
  "@vitejs/plugin-react": "6.0.2",
201
+ "date-fns": "^4",
202
+ "lucide-react": ">0.560",
206
203
  "react": "19.2.7",
207
204
  "react-dom": "19.2.7",
208
205
  "rollup": "4.62.2",
206
+ "streamdown": "2.5.0",
209
207
  "tailwindcss": "4.3.1",
210
208
  "tw-animate-css": "1.4.0",
211
209
  "typescript": "6.0.3",
@@ -1,71 +0,0 @@
1
- import { z as e } from "zod";
2
- //#region src/api/stream-test/index.ts
3
- var t = "/api/rb/agents/stream-test";
4
- e.any(), e.any();
5
- //#endregion
6
- //#region src/api/stream-test/handler.ts
7
- var n = async (e) => new Promise((t) => setTimeout(t, e)), r = (e) => {
8
- 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?.();
9
- }, i = (e, t) => {
10
- e.res.write(`data: ${JSON.stringify(t)}\n\n`);
11
- }, a = (e) => {
12
- e.res.write("data: [DONE]\n\n"), e.res.end();
13
- }, o = async (e, t) => {
14
- r(t);
15
- let o = !1, s = () => {
16
- o = !0;
17
- };
18
- t.req.on("aborted", s), t.res.on("close", s), i(t, { type: "start" });
19
- let c = "reasoning-1";
20
- i(t, {
21
- type: "reasoning-start",
22
- id: c
23
- });
24
- for (let e of [
25
- "Streaming",
26
- "reasoning",
27
- "works",
28
- "here."
29
- ]) {
30
- if (o) break;
31
- i(t, {
32
- type: "reasoning-delta",
33
- id: c,
34
- delta: `${e} `
35
- }), await n(40);
36
- }
37
- o || i(t, {
38
- type: "reasoning-end",
39
- id: c
40
- });
41
- let l = "text-1";
42
- i(t, {
43
- type: "text-start",
44
- id: l
45
- });
46
- for (let e of [
47
- "And",
48
- "this",
49
- "is",
50
- "streamed",
51
- "text."
52
- ]) {
53
- if (o) break;
54
- i(t, {
55
- type: "text-delta",
56
- id: l,
57
- delta: `${e} `
58
- }), await n(40);
59
- }
60
- return o || (i(t, {
61
- type: "text-end",
62
- id: l
63
- }), i(t, {
64
- type: "finish",
65
- finishReason: "stop"
66
- })), a(t), {};
67
- }, s = (e) => {
68
- e.get(t, o);
69
- };
70
- //#endregion
71
- export { s as default };
@@ -1,11 +0,0 @@
1
- import { z as e } from "zod";
2
- //#region src/api/ping/index.ts
3
- var t = "/api/rb/agents/ping";
4
- e.any(), e.object({ status: e.literal("ok") });
5
- //#endregion
6
- //#region src/api/ping/handler.ts
7
- var n = async (e, t) => ({ status: "ok" }), r = (e) => {
8
- e.get(t, n);
9
- };
10
- //#endregion
11
- export { r as default };
@@ -1,19 +0,0 @@
1
- import { randomUUID as e } from "node:crypto";
2
- import { z as t } from "zod";
3
- //#region src/api/upload/index.ts
4
- var n = "/api/rb/files/upload";
5
- t.any(), t.any();
6
- //#endregion
7
- //#region src/api/upload/handler.ts
8
- var r = async (t) => {
9
- let n = e();
10
- return {
11
- url: `http://localhost:9292/uploads/${n}`,
12
- pathname: `upload-${n}.png`,
13
- contentType: "image/png"
14
- };
15
- }, i = (e) => {
16
- e.post(n, r);
17
- };
18
- //#endregion
19
- export { i as default };
@@ -1,2 +0,0 @@
1
- import { a as e } from "./chunk-BO2N2NFS-DAcOISTD.js";
2
- export { e as Mermaid };
@@ -1,29 +0,0 @@
1
- //#region src/lib/ai/models.ts
2
- var e = "openai/gpt-5.4-mini", t = [
3
- {
4
- id: "openai/gpt-5.4-mini",
5
- name: "GPT-5.4 Mini",
6
- provider: "openai",
7
- description: "Latest OpenAI mini model for fast agentic and coding tasks"
8
- },
9
- {
10
- id: "openai/gpt-5.5",
11
- name: "GPT-5.5",
12
- provider: "openai",
13
- description: "Latest OpenAI frontier model for complex reasoning and coding"
14
- },
15
- {
16
- id: "google/gemini-3.5-flash",
17
- name: "Gemini 3.5 Flash",
18
- provider: "google",
19
- description: "Stable Gemini model for fast agentic workflows"
20
- },
21
- {
22
- id: "xai/grok-4.3-thinking",
23
- name: "Grok 4.3 (Reasoning)",
24
- provider: "reasoning",
25
- description: "Latest xAI flagship model with configurable reasoning"
26
- }
27
- ], n = new Set(t.map((e) => e.id)), r = t.reduce((e, t) => (e[t.provider] || (e[t.provider] = []), e[t.provider].push(t), e), {});
28
- //#endregion
29
- export { r as i, n, t as r, e as t };
@@ -1,19 +0,0 @@
1
- //#region src/lib/ai/openai-reasoning.ts
2
- var e = "default", t = [
3
- "none",
4
- "low",
5
- "medium",
6
- "high",
7
- "xhigh"
8
- ], n = [
9
- "minimal",
10
- "low",
11
- "medium",
12
- "high"
13
- ], r = [
14
- "low",
15
- "medium",
16
- "high"
17
- ], i = (e) => e === "openai/gpt-5.5" ? t : e.startsWith("xai/") && e.endsWith("-thinking") ? r : e.startsWith("openai/gpt-5") ? n : [], a = (e) => i(e).length > 0, o = (e) => e === "openai/gpt-5.5" || e.startsWith("xai/") && e.endsWith("-thinking") || e.startsWith("openai/gpt-5") ? "medium" : null;
18
- //#endregion
19
- export { a as i, o as n, i as r, e as t };