@ramme-io/kernel 6.0.1 → 6.0.3
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/{AiGateway-DsVWU6ih.js → AiGateway-BmV6ypkd.js} +616 -627
- package/dist/index.es.js +12 -12
- package/dist/kernel/src/services/NeuralGateway.d.ts.map +1 -1
- package/dist/kernel/src/services/ai/models.test.d.ts +2 -0
- package/dist/kernel/src/services/ai/models.test.d.ts.map +1 -0
- package/dist/kernel/src/services/ai/providers/AnthropicAdapter.d.ts +1 -1
- package/dist/kernel/src/services/ai/providers/AnthropicAdapter.d.ts.map +1 -1
- package/dist/kernel/src/services/ai/providers/DeepSeekAdapter.d.ts +2 -2
- package/dist/kernel/src/services/ai/providers/DeepSeekAdapter.d.ts.map +1 -1
- package/dist/kernel/src/services/ai/providers/GrokAdapter.d.ts +2 -2
- package/dist/kernel/src/services/ai/providers/GrokAdapter.d.ts.map +1 -1
- package/dist/kernel/src/services/ai/providers/OllamaAdapter.d.ts +1 -1
- package/dist/kernel/src/services/ai/providers/OllamaAdapter.d.ts.map +1 -1
- package/dist/kernel/src/services/ai/providers/OpenAIAdapter.d.ts +1 -1
- package/dist/kernel/src/services/ai/providers/OpenAIAdapter.d.ts.map +1 -1
- package/dist/kernel/src/setupTests.d.ts +2 -0
- package/dist/kernel/src/setupTests.d.ts.map +1 -0
- package/dist/kernel/src/stores/useSettingsStore.test.d.ts +2 -0
- package/dist/kernel/src/stores/useSettingsStore.test.d.ts.map +1 -0
- package/dist/server.es.js +10 -9
- package/package.json +9 -3
package/dist/index.es.js
CHANGED
|
@@ -13,8 +13,8 @@ var Xr = (e, t, n, r) => ({
|
|
|
13
13
|
return W(e, t, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { S as kl, D as Zr, P as kr, a as TS, b as Tl, t as IS, A as ci, c as di, d as xS, e as RS, f as er, g as NS, F as CS, h as Qr } from "./AiGateway-
|
|
17
|
-
import { k as s0, m as l0, w as u0, i as c0, o as d0, z as p0, B as f0, r as h0, E as g0, v as m0, G as b0, q as y0, I as E0, O as S0, p as w0, y as v0, x as _0, R as A0, T as k0, W as T0, j as I0, l as x0, n as R0, u as N0, s as C0 } from "./AiGateway-
|
|
16
|
+
import { S as kl, D as Zr, P as kr, a as TS, b as Tl, t as IS, A as ci, c as di, d as xS, e as RS, f as er, g as NS, F as CS, h as Qr } from "./AiGateway-BmV6ypkd.js";
|
|
17
|
+
import { k as s0, m as l0, w as u0, i as c0, o as d0, z as p0, B as f0, r as h0, E as g0, v as m0, G as b0, q as y0, I as E0, O as S0, p as w0, y as v0, x as _0, R as A0, T as k0, W as T0, j as I0, l as x0, n as R0, u as N0, s as C0 } from "./AiGateway-BmV6ypkd.js";
|
|
18
18
|
import It, { useState as Ge, useRef as _n, useEffect as St, createContext as na, useContext as Ur, useCallback as ht, useMemo as qt, forwardRef as Jm, createElement as Qa } from "react";
|
|
19
19
|
import { Drawer as eb, FormTemplate as OS, Button as en, useToast as tb, Card as qi, Icon as vt, SearchInput as LS, DataTable as DS, formatValue as fh, Badge as MS, LineChart as FS, BarChart as PS, DeviceCard as US, StatCard as BS, THEME_TOKEN_VARS as jS, applyThemeToDom as Ja, tokensToVars as eo, isCustomTheme as nb, Sparkline as $S, CircularDial as zS, Input as On, generateFromPrompt as hh, lightToDark as GS, generateFromProfile as Qn, PageContainer as HS, PageHeader as WS, SettingsContainer as rb, ThemeLab as ib, AESTHETIC_PROFILES as ab, Label as Vi, useTheme as ob, useIsMobile as qS, RammeInspectorTrigger as VS, Sheet as KS, AIChatThread as YS, LoginPage as XS, SignupPage as ZS, Modal as QS } from "@ramme-io/ui";
|
|
20
20
|
import { Link as JS, Navigate as sb, Outlet as ew, useNavigate as lb, useLocation as tw, Route as Ia } from "react-router-dom";
|
|
@@ -11913,7 +11913,7 @@ const G_ = ({ block: e, manifest: t }) => {
|
|
|
11913
11913
|
}));
|
|
11914
11914
|
}, [r, e.type, a, e.props.columnDefs]);
|
|
11915
11915
|
return /* @__PURE__ */ V.jsx("div", { style: { gridColumn: `span ${((f = e.layout) == null ? void 0 : f.colSpan) || 1}`, gridRow: `span ${((h = e.layout) == null ? void 0 : h.rowSpan) || 1}` }, className: "relative group", children: /* @__PURE__ */ V.jsxs(z_, { children: [
|
|
11916
|
-
/* @__PURE__ */ V.jsx("div", { className: "absolute -top-3 right-0 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none translate-y-2 group-hover:translate-y-0 duration-200", children: /* @__PURE__ */ V.jsxs("div", { className: `text-
|
|
11916
|
+
/* @__PURE__ */ V.jsx("div", { className: "absolute -top-3 right-0 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none translate-y-2 group-hover:translate-y-0 duration-200", children: /* @__PURE__ */ V.jsxs("div", { className: `text-2xs px-2 py-1 rounded-md shadow-lg border border-white/10 flex items-center gap-1.5 font-mono ${o ? "bg-warning text-warning-foreground" : "bg-foreground text-background"}`, children: [
|
|
11917
11917
|
/* @__PURE__ */ V.jsx("span", { className: "font-bold", children: e.type }),
|
|
11918
11918
|
r && /* @__PURE__ */ V.jsxs(V.Fragment, { children: [
|
|
11919
11919
|
" ",
|
|
@@ -11941,7 +11941,7 @@ const G_ = ({ block: e, manifest: t }) => {
|
|
|
11941
11941
|
return (s = t.pages) == null ? void 0 : s.find((l) => l.id === e);
|
|
11942
11942
|
}, [t, e]);
|
|
11943
11943
|
if (!a)
|
|
11944
|
-
return /* @__PURE__ */ V.jsxs("div", { className: "p-8 space-y-4 flex flex-col items-center justify-center h-[
|
|
11944
|
+
return /* @__PURE__ */ V.jsxs("div", { className: "p-8 space-y-4 flex flex-col items-center justify-center h-[50dvh]", children: [
|
|
11945
11945
|
/* @__PURE__ */ V.jsx(L_, { className: "animate-spin text-primary mb-4", size: 32 }),
|
|
11946
11946
|
/* @__PURE__ */ V.jsx("p", { className: "text-muted-foreground", children: "Loading Blueprint..." })
|
|
11947
11947
|
] });
|
|
@@ -13027,10 +13027,10 @@ const al = () => {
|
|
|
13027
13027
|
}
|
|
13028
13028
|
return n ? { livePrices: t } : {};
|
|
13029
13029
|
}), Zi = requestAnimationFrame(al);
|
|
13030
|
-
}, ol = sr((
|
|
13030
|
+
}, ol = sr(() => ({
|
|
13031
13031
|
livePrices: {},
|
|
13032
|
-
updatePrice: (
|
|
13033
|
-
$i.push({ ticker:
|
|
13032
|
+
updatePrice: (e, t) => {
|
|
13033
|
+
$i.push({ ticker: e, price: t }), Zi || (Zi = requestAnimationFrame(al));
|
|
13034
13034
|
},
|
|
13035
13035
|
_messageBuffer: [],
|
|
13036
13036
|
// Exposed for inspection/testing if needed
|
|
@@ -44317,7 +44317,7 @@ function nO({ content: e }) {
|
|
|
44317
44317
|
code({ node: t, inline: n, className: r, children: a, ...i }) {
|
|
44318
44318
|
const o = /language-(\w+)/.exec(r || "");
|
|
44319
44319
|
return !n && o ? /* @__PURE__ */ V.jsxs("div", { className: "my-5 rounded-lg overflow-hidden border border-border bg-[#0d0d0d] shadow-xl", children: [
|
|
44320
|
-
/* @__PURE__ */ V.jsx("div", { className: "px-3 py-1 bg-white/5 border-b border-white/10", children: /* @__PURE__ */ V.jsx("span", { className: "text-
|
|
44320
|
+
/* @__PURE__ */ V.jsx("div", { className: "px-3 py-1 bg-white/5 border-b border-white/10", children: /* @__PURE__ */ V.jsx("span", { className: "text-2xs text-muted-foreground uppercase", children: o[1] }) }),
|
|
44321
44321
|
/* @__PURE__ */ V.jsx(
|
|
44322
44322
|
mS,
|
|
44323
44323
|
{
|
|
@@ -44329,7 +44329,7 @@ function nO({ content: e }) {
|
|
|
44329
44329
|
children: String(a).replace(/\n$/, "")
|
|
44330
44330
|
}
|
|
44331
44331
|
)
|
|
44332
|
-
] }) : /* @__PURE__ */ V.jsx("code", { className: "bg-muted px-1.5 py-0.5 rounded font-mono text-primary
|
|
44332
|
+
] }) : /* @__PURE__ */ V.jsx("code", { className: "bg-muted px-1.5 py-0.5 rounded font-mono text-primary", ...i, children: a });
|
|
44333
44333
|
}
|
|
44334
44334
|
},
|
|
44335
44335
|
children: e
|
|
@@ -44692,7 +44692,7 @@ const aO = {
|
|
|
44692
44692
|
}, oO = {
|
|
44693
44693
|
id: "usr_guest",
|
|
44694
44694
|
name: "Guest Creator",
|
|
44695
|
-
email: "guest@
|
|
44695
|
+
email: "guest@example.com",
|
|
44696
44696
|
password: "guest",
|
|
44697
44697
|
role: "admin",
|
|
44698
44698
|
status: "active",
|
|
@@ -44743,7 +44743,7 @@ const aO = {
|
|
|
44743
44743
|
return e;
|
|
44744
44744
|
}, XO = () => {
|
|
44745
44745
|
const { user: e, isLoading: t } = dh();
|
|
44746
|
-
return t ? /* @__PURE__ */ V.jsxs("div", { className: "flex h-
|
|
44746
|
+
return t ? /* @__PURE__ */ V.jsxs("div", { className: "flex h-dvh w-full flex-col items-center justify-center bg-background text-foreground", children: [
|
|
44747
44747
|
/* @__PURE__ */ V.jsx(vt, { name: "loader-circle", size: 32, className: "animate-spin text-primary mb-4" }),
|
|
44748
44748
|
/* @__PURE__ */ V.jsx("p", { className: "text-muted-foreground font-mono text-sm animate-pulse", children: "Verifying Identity..." })
|
|
44749
44749
|
] }) : e ? /* @__PURE__ */ V.jsx(ew, {}) : /* @__PURE__ */ V.jsx(sb, { to: "/auth/login", replace: !0 });
|
|
@@ -44836,7 +44836,7 @@ const aO = {
|
|
|
44836
44836
|
}, i = () => {
|
|
44837
44837
|
typeof window > "u" || confirm("Clear all API keys from vault?") && (n(), r("Vault cleared", "info"));
|
|
44838
44838
|
};
|
|
44839
|
-
return /* @__PURE__ */ V.jsx(QS, { title: "
|
|
44839
|
+
return /* @__PURE__ */ V.jsx(QS, { title: "Settings", isOpen: e, onClose: t, children: /* @__PURE__ */ V.jsxs("div", { className: "space-y-6 py-2", children: [
|
|
44840
44840
|
/* @__PURE__ */ V.jsx(ql, { compact: !0, onSaved: a }),
|
|
44841
44841
|
/* @__PURE__ */ V.jsxs("div", { className: "flex justify-between pt-4 border-t", children: [
|
|
44842
44842
|
/* @__PURE__ */ V.jsx(en, { variant: "ghost", className: "text-destructive text-xs", onClick: i, children: "Clear All Keys" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeuralGateway.d.ts","sourceRoot":"","sources":["../../../../src/services/NeuralGateway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,SAAS,EAA4C,MAAM,kBAAkB,CAAC;AA+BvF,eAAO,MAAM,aAAa;IACxB;;;;;;;;;;OAUG;mBACkB,CAAC,QAAQ;QAC5B,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,OAAO,SAAS,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC,CAAC,CAAC;IAoBd;;;;;;;;;;;OAWG;6BACsB;QACvB,QAAQ,EAAE,GAAG,EAAE,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,OAAO,SAAS,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,QAAQ;
|
|
1
|
+
{"version":3,"file":"NeuralGateway.d.ts","sourceRoot":"","sources":["../../../../src/services/NeuralGateway.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,SAAS,EAA4C,MAAM,kBAAkB,CAAC;AA+BvF,eAAO,MAAM,aAAa;IACxB;;;;;;;;;;OAUG;mBACkB,CAAC,QAAQ;QAC5B,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,OAAO,SAAS,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,OAAO,CAAC,CAAC,CAAC;IAoBd;;;;;;;;;;;OAWG;6BACsB;QACvB,QAAQ,EAAE,GAAG,EAAE,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,OAAO,SAAS,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,GAAG,QAAQ;CAiBb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.test.d.ts","sourceRoot":"","sources":["../../../../../src/services/ai/models.test.ts"],"names":[],"mappings":""}
|
|
@@ -21,7 +21,7 @@ export declare class AnthropicAdapter implements AiProviderAdapter {
|
|
|
21
21
|
* rather than sent as a parameter.
|
|
22
22
|
*/
|
|
23
23
|
generateObject<T>(prompt: string, schema: unknown, config: AiModelConfig): Promise<T>;
|
|
24
|
-
listModels(
|
|
24
|
+
listModels(_apiKey?: string, _baseUrl?: string): Promise<string[]>;
|
|
25
25
|
private normalizeError;
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=AnthropicAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnthropicAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/services/ai/providers/AnthropicAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"AnthropicAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/services/ai/providers/AnthropicAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAwBjF,qBAAa,gBAAiB,YAAW,iBAAiB;IACjD,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,kBAAkB,EAAE,GAC3B,aAAa,CAAC,WAAW,CAAC;IAwGvB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAiDnE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC;IAsF/E;;;;;;;;;;;;;;OAcG;IACG,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;IAmDrF,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQxE,OAAO,CAAC,cAAc;CA6BvB"}
|
|
@@ -5,8 +5,8 @@ export declare class DeepSeekAdapter implements AiProviderAdapter {
|
|
|
5
5
|
streamChat(messages: ChatMessage[], config: AiModelConfig, tools?: ToolDefinitionWire[]): AsyncIterable<StreamEvent>;
|
|
6
6
|
generateText(prompt: string, config: AiModelConfig): Promise<string>;
|
|
7
7
|
streamText(prompt: string, config: AiModelConfig): AsyncIterable<string>;
|
|
8
|
-
generateObject<T>(prompt: string,
|
|
9
|
-
listModels(
|
|
8
|
+
generateObject<T>(prompt: string, _schema: unknown, config: AiModelConfig): Promise<T>;
|
|
9
|
+
listModels(_apiKey?: string, _baseUrl?: string): Promise<string[]>;
|
|
10
10
|
private normalizeError;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=DeepSeekAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeepSeekAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/services/ai/providers/DeepSeekAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIjF,qBAAa,eAAgB,YAAW,iBAAiB;IAChD,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,kBAAkB,EAAE,GAC3B,aAAa,CAAC,WAAW,CAAC;IAkBvB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IA2BnE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC;IA+DzE,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"DeepSeekAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/services/ai/providers/DeepSeekAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIjF,qBAAa,eAAgB,YAAW,iBAAiB;IAChD,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,kBAAkB,EAAE,GAC3B,aAAa,CAAC,WAAW,CAAC;IAkBvB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IA2BnE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC;IA+DzE,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;IA8BtF,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAKxE,OAAO,CAAC,cAAc;CAsBvB"}
|
|
@@ -5,8 +5,8 @@ export declare class GrokAdapter implements AiProviderAdapter {
|
|
|
5
5
|
streamChat(messages: ChatMessage[], config: AiModelConfig, tools?: ToolDefinitionWire[]): AsyncIterable<StreamEvent>;
|
|
6
6
|
generateText(prompt: string, config: AiModelConfig): Promise<string>;
|
|
7
7
|
streamText(prompt: string, config: AiModelConfig): AsyncIterable<string>;
|
|
8
|
-
generateObject<T>(prompt: string,
|
|
9
|
-
listModels(
|
|
8
|
+
generateObject<T>(prompt: string, _schema: unknown, config: AiModelConfig): Promise<T>;
|
|
9
|
+
listModels(_apiKey?: string, _baseUrl?: string): Promise<string[]>;
|
|
10
10
|
private normalizeError;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=GrokAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GrokAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/services/ai/providers/GrokAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIjF,qBAAa,WAAY,YAAW,iBAAiB;IAC5C,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,kBAAkB,EAAE,GAC3B,aAAa,CAAC,WAAW,CAAC;IAkBvB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IA2BnE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC;IA+DzE,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"GrokAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/services/ai/providers/GrokAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAIjF,qBAAa,WAAY,YAAW,iBAAiB;IAC5C,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,kBAAkB,EAAE,GAC3B,aAAa,CAAC,WAAW,CAAC;IAkBvB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IA2BnE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC;IA+DzE,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;IAoCtF,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAKxE,OAAO,CAAC,cAAc;CAsBvB"}
|
|
@@ -13,6 +13,6 @@ export declare class OllamaAdapter implements AiProviderAdapter {
|
|
|
13
13
|
generateText(prompt: string, config: AiModelConfig): Promise<string>;
|
|
14
14
|
streamText(prompt: string, config: AiModelConfig): AsyncIterable<string>;
|
|
15
15
|
generateObject<T>(prompt: string, schema: unknown, config: AiModelConfig): Promise<T>;
|
|
16
|
-
listModels(
|
|
16
|
+
listModels(_apiKey?: string, baseUrl?: string): Promise<string[]>;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=OllamaAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OllamaAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/services/ai/providers/OllamaAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEjF,qBAAa,aAAc,YAAW,iBAAiB;IACrD;;;;;;OAMG;IACI,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,kBAAkB,EAAE,GAC3B,aAAa,CAAC,WAAW,CAAC;IA8DvB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAsBnE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC;IAkDzE,cAAc,CAAC,CAAC,EACpB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,CAAC,CAAC;IAWP,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"OllamaAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/services/ai/providers/OllamaAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEjF,qBAAa,aAAc,YAAW,iBAAiB;IACrD;;;;;;OAMG;IACI,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,kBAAkB,EAAE,GAC3B,aAAa,CAAC,WAAW,CAAC;IA8DvB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAsBnE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC;IAkDzE,cAAc,CAAC,CAAC,EACpB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,EACf,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,CAAC,CAAC;IAWP,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,MAAiC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAUlG"}
|
|
@@ -5,7 +5,7 @@ export declare class OpenAIAdapter implements AiProviderAdapter {
|
|
|
5
5
|
streamChat(messages: ChatMessage[], config: AiModelConfig, tools?: ToolDefinitionWire[]): AsyncIterable<StreamEvent>;
|
|
6
6
|
generateText(prompt: string, config: AiModelConfig): Promise<string>;
|
|
7
7
|
streamText(prompt: string, config: AiModelConfig): AsyncIterable<string>;
|
|
8
|
-
generateObject<T>(prompt: string,
|
|
8
|
+
generateObject<T>(prompt: string, _schema: unknown, config: AiModelConfig): Promise<T>;
|
|
9
9
|
listModels(apiKey?: string, baseUrl?: string): Promise<string[]>;
|
|
10
10
|
private normalizeError;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenAIAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/services/ai/providers/OpenAIAdapter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGjF,qBAAa,aAAc,YAAW,iBAAiB;IAC9C,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,kBAAkB,EAAE,GAC3B,aAAa,CAAC,WAAW,CAAC;IAkBvB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IA2BnE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC;IA+DzE,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"OpenAIAdapter.d.ts","sourceRoot":"","sources":["../../../../../../src/services/ai/providers/OpenAIAdapter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGjF,qBAAa,aAAc,YAAW,iBAAiB;IAC9C,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,MAAM,EAAE,aAAa,EACrB,KAAK,CAAC,EAAE,kBAAkB,EAAE,GAC3B,aAAa,CAAC,WAAW,CAAC;IAkBvB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IA2BnE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAAC,MAAM,CAAC;IA+DzE,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;IA8BtF,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAsBtE,OAAO,CAAC,cAAc;CAsBvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupTests.d.ts","sourceRoot":"","sources":["../../../src/setupTests.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSettingsStore.test.d.ts","sourceRoot":"","sources":["../../../../src/stores/useSettingsStore.test.ts"],"names":[],"mappings":""}
|
package/dist/server.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { k as J, w as b, A as k, i as x, g as L, o as M, z as Y, B as F, r as H, E as U, v as q, G as z, q as B, I as C, O as V, p as W, y as X, x as Q, R as Z, S as ee, T as te, W as ae, j as se, b as re } from "./AiGateway-
|
|
1
|
+
import { C as d, a as E, H as O, J as y, K as G, n as _, L as T } from "./AiGateway-BmV6ypkd.js";
|
|
2
|
+
import { k as J, w as b, A as k, i as x, g as L, o as M, z as Y, B as F, r as H, E as U, v as q, G as z, q as B, I as C, O as V, p as W, y as X, x as Q, R as Z, S as ee, T as te, W as ae, j as se, b as re } from "./AiGateway-BmV6ypkd.js";
|
|
3
3
|
import { streamText as w, generateObject as $ } from "ai";
|
|
4
4
|
import { createGoogleGenerativeAI as S } from "@ai-sdk/google";
|
|
5
5
|
function A(e) {
|
|
@@ -25,7 +25,7 @@ const P = {
|
|
|
25
25
|
* @param opts.apiKey - Optional client-provided key
|
|
26
26
|
*/
|
|
27
27
|
async generateSchema(e) {
|
|
28
|
-
const a = A(e.apiKey), s = S({ apiKey: a }), t = e.role ?
|
|
28
|
+
const a = A(e.apiKey), s = S({ apiKey: a }), t = e.role ? d[e.role] : null, r = e.model ?? (t == null ? void 0 : t.model) ?? O, o = e.temperature ?? (t == null ? void 0 : t.temperature) ?? 0.3;
|
|
29
29
|
return (await $({
|
|
30
30
|
model: s(r),
|
|
31
31
|
schema: e.schema,
|
|
@@ -47,11 +47,12 @@ const P = {
|
|
|
47
47
|
* @returns A Response object — directly return this from your route handler.
|
|
48
48
|
*/
|
|
49
49
|
streamChatResponse(e) {
|
|
50
|
-
const a = A(e.apiKey), s = S({ apiKey: a }), t = e.role ?
|
|
51
|
-
return
|
|
50
|
+
const a = A(e.apiKey), s = S({ apiKey: a }), t = e.role ? d[e.role] : null, r = e.model ?? (t == null ? void 0 : t.model) ?? E, o = e.temperature ?? (t == null ? void 0 : t.temperature) ?? 0.5;
|
|
51
|
+
return w({
|
|
52
52
|
model: s(r),
|
|
53
53
|
messages: e.messages,
|
|
54
|
-
system: e.system
|
|
54
|
+
system: e.system,
|
|
55
|
+
temperature: o
|
|
55
56
|
}).toTextStreamResponse();
|
|
56
57
|
}
|
|
57
58
|
};
|
|
@@ -93,11 +94,11 @@ Request: ${e}`;
|
|
|
93
94
|
Your last reply was not valid JSON. Reply with the JSON object only.`;
|
|
94
95
|
continue;
|
|
95
96
|
}
|
|
96
|
-
const
|
|
97
|
-
if (i.success &&
|
|
97
|
+
const u = _(p), i = T.safeParse(u.value);
|
|
98
|
+
if (i.success && u.issues.length === 0)
|
|
98
99
|
return { document: i.data, repairs: l };
|
|
99
100
|
c = [
|
|
100
|
-
...
|
|
101
|
+
...u.issues.map((m) => `${m.path.join(".") || "(root)"}: ${m.message}`),
|
|
101
102
|
...i.success ? [] : R(i.error)
|
|
102
103
|
], n = `${o}
|
|
103
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ramme-io/kernel",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@ai-sdk/google": ">=0.0.1",
|
|
31
|
-
"@ramme-io/ui": ">=4.1.
|
|
31
|
+
"@ramme-io/ui": ">=4.1.1",
|
|
32
32
|
"ai": ">=4.0.0",
|
|
33
33
|
"react": ">=18.2.0",
|
|
34
34
|
"react-dom": ">=18.2.0",
|
|
@@ -37,17 +37,22 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@ai-sdk/google": "^3.0.1",
|
|
40
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
41
|
+
"@testing-library/react": "^16.3.2",
|
|
40
42
|
"@types/node": "^20.14.10",
|
|
41
43
|
"@types/react": "^18.3.3",
|
|
42
44
|
"@types/react-dom": "^18.3.0",
|
|
45
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
43
46
|
"ai": "^6.0.3",
|
|
47
|
+
"jsdom": "^29.0.0",
|
|
44
48
|
"react": "^18.2.0",
|
|
45
49
|
"react-dom": "^18.2.0",
|
|
46
50
|
"react-router-dom": "^6.28.0",
|
|
47
51
|
"vite": "^5.3.1",
|
|
48
52
|
"vite-plugin-dts": "^3.9.1",
|
|
53
|
+
"vitest": "^2.1.9",
|
|
49
54
|
"zod": "^3.23.8",
|
|
50
|
-
"@ramme-io/ui": "4.1.
|
|
55
|
+
"@ramme-io/ui": "4.1.1"
|
|
51
56
|
},
|
|
52
57
|
"dependencies": {
|
|
53
58
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
@@ -62,6 +67,7 @@
|
|
|
62
67
|
},
|
|
63
68
|
"scripts": {
|
|
64
69
|
"build": "vite build",
|
|
70
|
+
"test": "vitest run",
|
|
65
71
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
66
72
|
}
|
|
67
73
|
}
|