@ramme-io/kernel 8.0.0 → 8.1.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/index.es.js CHANGED
@@ -13,13 +13,13 @@ var Xr = (e, t, n, r) => ({
13
13
  return q(e, t, r);
14
14
  }
15
15
  });
16
- import { P as Ar, b as El, t as ES, c as kr, i as SS, l as er, a as wS } from "./AiGateway-U28yN4Mf.js";
17
- import { A as e0, r as t0, g as n0, d as r0, D as i0, G as a0, f as o0, I as s0, O as l0, e as u0, h as c0, j as d0, q as p0, m as f0, n as h0, u as g0, s as m0, k as b0, o as y0, p as E0 } from "./AiGateway-U28yN4Mf.js";
16
+ import { P as Ar, b as El, t as ES, c as kr, i as SS, l as er, a as wS } from "./AiGateway-CjamGYdA.js";
17
+ import { A as e0, r as t0, g as n0, d as r0, D as i0, G as a0, f as o0, I as s0, O as l0, e as u0, h as c0, j as d0, q as p0, m as f0, n as h0, u as g0, s as m0, k as b0, o as y0, p as E0 } from "./AiGateway-CjamGYdA.js";
18
18
  import at, { useState as Ge, useRef as _n, useEffect as wt, createContext as Ki, useContext as Ur, useCallback as gt, useMemo as qt, forwardRef as jm, createElement as Va } from "react";
19
- import { e as vS, m as Zr, D as _S, n as Yi, o as AS, p as kS, q as TS, r as Ka, s as $m, I as zm, t as ah, u as oh, v as IS, w as Gm, x as xS } from "./index-BrFe7_2L.js";
20
- import { f as w0, h as v0, B as _0, E as A0, F as k0, g as T0, P as I0, R as x0, T as R0, W as N0 } from "./index-BrFe7_2L.js";
21
- import { u as Hm, s as RS, i as Xi } from "./bodewellAdapter-Cw9brU9k.js";
22
- import { b as O0, d as L0, e as D0, a as M0, B as F0, g as P0, j as U0, k as B0, h as j0, c as $0, f as z0, t as G0 } from "./bodewellAdapter-Cw9brU9k.js";
19
+ import { S as vS, n as Zr, D as _S, o as Yi, p as AS, q as kS, r as TS, s as Ka, t as $m, I as zm, u as ah, v as oh, w as IS, x as Gm, y as xS } from "./deviceReadings-cxZE1T-0.js";
20
+ import { f as w0, h as v0, B as _0, E as A0, F as k0, g as T0, P as I0, R as x0, T as R0, W as N0, d as C0 } from "./deviceReadings-cxZE1T-0.js";
21
+ import { u as Hm, s as RS, i as Xi } from "./bodewellAdapter-PfSOdsEI.js";
22
+ import { b as L0, d as D0, e as M0, a as F0, B as P0, g as U0, j as B0, k as j0, h as $0, c as z0, f as G0, t as H0 } from "./bodewellAdapter-PfSOdsEI.js";
23
23
  import { Drawer as Wm, FormTemplate as NS, Button as en, useToast as qm, Card as Bi, Icon as _t, SearchInput as CS, DataTable as OS, formatValue as sh, Badge as LS, LineChart as DS, BarChart as MS, DeviceCard as FS, StatCard as PS, THEME_TOKEN_VARS as US, applyThemeToDom as Ya, tokensToVars as Xa, isCustomTheme as Vm, Sparkline as BS, CircularDial as jS, Input as Ln, generateFromPrompt as lh, lightToDark as $S, generateFromProfile as Qn, PageContainer as zS, PageHeader as GS, SettingsContainer as Km, ThemeLab as Ym, AESTHETIC_PROFILES as Xm, Label as ji, useTheme as Zm, useIsMobile as HS, RammeInspectorTrigger as WS, Sheet as qS, AIChatThread as VS, LoginPage as KS, SignupPage as YS, Modal as XS } from "@ramme-io/ui";
24
24
  import { Link as ZS, Navigate as Qm, Outlet as QS, useNavigate as Jm, useLocation as JS, Route as _a } from "react-router-dom";
25
25
  const eb = "RAMME_SYNC_MANIFEST", ew = "*", Sl = () => {
@@ -44885,11 +44885,11 @@ export {
44885
44885
  hS as AuthContext,
44886
44886
  qO as AuthProvider,
44887
44887
  m_ as AutoForm,
44888
- O0 as BODEWELL_HARDWARE_ONLY_FIELDS,
44889
- L0 as BODEWELL_HISTORY_FIELDS,
44890
- D0 as BODEWELL_HISTORY_FIELDS_PARAM,
44891
- M0 as BODEWELL_SIGNAL_MAP,
44892
- F0 as BaseSignalAdapter,
44888
+ L0 as BODEWELL_HARDWARE_ONLY_FIELDS,
44889
+ D0 as BODEWELL_HISTORY_FIELDS,
44890
+ M0 as BODEWELL_HISTORY_FIELDS_PARAM,
44891
+ F0 as BODEWELL_SIGNAL_MAP,
44892
+ P0 as BaseSignalAdapter,
44893
44893
  _0 as BlockSchema,
44894
44894
  G_ as DATA_LAKE_PREFIX,
44895
44895
  i0 as DeepSeekAdapter,
@@ -44929,8 +44929,9 @@ export {
44929
44929
  c0 as aiGateway,
44930
44930
  El as aiGatewayService,
44931
44931
  Gy as appColorRgb,
44932
- P0 as bodewellRigIdOf,
44932
+ U0 as bodewellRigIdOf,
44933
44933
  SS as decodeSpr,
44934
+ C0 as deviceReadingsToSignals,
44934
44935
  eA as deviceText,
44935
44936
  vO as emitManifest,
44936
44937
  d0 as encodeSpr,
@@ -44951,14 +44952,14 @@ export {
44951
44952
  g0 as sanitizeForGemini,
44952
44953
  m0 as scopePatch,
44953
44954
  RS as selectSignalById,
44954
- U0 as selectSignalsByDomain,
44955
- B0 as selectSignalsBySource,
44955
+ B0 as selectSignalsByDomain,
44956
+ j0 as selectSignalsBySource,
44956
44957
  b0 as sprByteLength,
44957
44958
  y0 as spriteToGrid,
44958
- j0 as toBodewellCalibrationCommand,
44959
- $0 as toBodewellReadingMap,
44960
- z0 as toBodewellSeries,
44961
- G0 as toBodewellSignals,
44959
+ $0 as toBodewellCalibrationCommand,
44960
+ z0 as toBodewellReadingMap,
44961
+ G0 as toBodewellSeries,
44962
+ H0 as toBodewellSignals,
44962
44963
  ES as toJsonSchema,
44963
44964
  E0 as toRgb565,
44964
44965
  HO as useAIKeyOrchestrator,
@@ -19,6 +19,7 @@ export * from './renderers/AppDocumentRenderer';
19
19
  export * from './apps/spriteGrid';
20
20
  export * from './apps/quantize';
21
21
  export * from './apps/spr';
22
+ export { deviceReadingsToSignals } from './signals/deviceReadings';
22
23
  export * from './stores/useAppStore';
23
24
  export * from './stores/useSettingsStore';
24
25
  export * from './stores/spatialStore';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAOA,c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oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AAKpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AAKnD,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC"}
package/dist/server.es.js CHANGED
@@ -1,10 +1,9 @@
1
- import { n as E } from "./AiGateway-U28yN4Mf.js";
2
- import { A as K, c as k, g as J, a as L, d as M, D as F, G as Y, f as U, I as B, O as H, e as q, h as z, b as V, i as W, j as C, s as X, k as Q } from "./AiGateway-U28yN4Mf.js";
1
+ import { n as E } from "./AiGateway-CjamGYdA.js";
2
+ import { A as k, c as x, g as J, a as L, d as M, D as F, G as Y, f as U, I as B, O as H, e as q, h as z, b as V, i as W, j as C, s as X, k as Q } from "./AiGateway-CjamGYdA.js";
3
3
  import { streamText as O, generateObject as g } from "ai";
4
4
  import { createGoogleGenerativeAI as u } from "@ai-sdk/google";
5
- import { A as S, D as G, a as f, b as y, c as T, d as _ } from "./index-BrFe7_2L.js";
6
- import { f as ee, h as te, B as ae, E as se, F as re, g as oe, P as ne, R as ce, e as ie, T as me, W as pe } from "./index-BrFe7_2L.js";
7
- import { d as de } from "./deviceReadings-3Z4nql34.js";
5
+ import { A as S, D as G, a as T, b as y, c as _, e as f } from "./deviceReadings-cxZE1T-0.js";
6
+ import { f as ee, h as te, B as ae, E as se, F as re, g as oe, P as ne, R as ce, S as ie, T as me, W as le, d as pe } from "./deviceReadings-cxZE1T-0.js";
8
7
  function h(e) {
9
8
  const a = typeof process < "u" ? process.env.GOOGLE_GENERATIVE_AI_API_KEY : void 0, s = e || a;
10
9
  if (!s)
@@ -28,7 +27,7 @@ const N = {
28
27
  * @param opts.apiKey - Optional client-provided key
29
28
  */
30
29
  async generateSchema(e) {
31
- const a = h(e.apiKey), s = u({ apiKey: a }), t = e.role ? S[e.role] : null, r = e.model ?? (t == null ? void 0 : t.model) ?? f, o = e.temperature ?? (t == null ? void 0 : t.temperature) ?? 0.3;
30
+ const a = h(e.apiKey), s = u({ apiKey: a }), t = e.role ? S[e.role] : null, r = e.model ?? (t == null ? void 0 : t.model) ?? T, o = e.temperature ?? (t == null ? void 0 : t.temperature) ?? 0.3;
32
31
  return (await g({
33
32
  model: s(r),
34
33
  schema: e.schema,
@@ -77,7 +76,7 @@ const $ = (e) => {
77
76
 
78
77
  ${r}
79
78
 
80
- ${T}
79
+ ${_}
81
80
  ${JSON.stringify(a)}
82
81
 
83
82
  Request: ${e}` : `${y}
@@ -86,20 +85,20 @@ ${r}
86
85
 
87
86
  Request: ${e}`;
88
87
  let n = o, c = [];
89
- for (let p = 0; p <= t; p += 1) {
88
+ for (let l = 0; l <= t; l += 1) {
90
89
  const A = await s(n);
91
- let l;
90
+ let p;
92
91
  try {
93
- l = JSON.parse($(A));
92
+ p = JSON.parse($(A));
94
93
  } catch {
95
94
  c = ["the reply was not JSON"], n = `${o}
96
95
 
97
96
  Your last reply was not valid JSON. Reply with the JSON object only.`;
98
97
  continue;
99
98
  }
100
- const d = E(l), i = _.safeParse(d.value);
99
+ const d = E(p), i = f.safeParse(d.value);
101
100
  if (i.success && d.issues.length === 0)
102
- return { document: i.data, repairs: p };
101
+ return { document: i.data, repairs: l };
103
102
  c = [
104
103
  ...d.issues.map((m) => `${m.path.join(".") || "(root)"}: ${m.message}`),
105
104
  ...i.success ? [] : v(i.error)
@@ -109,7 +108,7 @@ Your last reply did not validate:
109
108
  ${c.map((m) => `- ${m}`).join(`
110
109
  `)}
111
110
  Here it is:
112
- ${JSON.stringify(l)}
111
+ ${JSON.stringify(p)}
113
112
 
114
113
  Return the corrected JSON object only.`;
115
114
  }
@@ -120,9 +119,9 @@ Return the corrected JSON object only.`;
120
119
  );
121
120
  };
122
121
  export {
123
- K as AGENT_ROSTER,
122
+ k as AGENT_ROSTER,
124
123
  ee as ActionSchema,
125
- k as AiConfigResolver,
124
+ x as AiConfigResolver,
126
125
  J as AiGateway,
127
126
  L as AiGatewayService,
128
127
  M as AnthropicAdapter,
@@ -143,11 +142,11 @@ export {
143
142
  ce as ResourceSchema,
144
143
  ie as SignalSchema,
145
144
  me as TriggerSchema,
146
- pe as WorkflowSchema,
145
+ le as WorkflowSchema,
147
146
  z as aiGateway,
148
147
  V as aiGatewayService,
149
148
  W as decodeSpr,
150
- de as deviceReadingsToSignals,
149
+ pe as deviceReadingsToSignals,
151
150
  C as encodeSpr,
152
151
  b as generateAppDocument,
153
152
  X as scopePatch,
@@ -1,5 +1,5 @@
1
- import { b as o, d as s, e as l, a as d, B as L, g as E, h as i, c as B, f as S, t as _ } from "./bodewellAdapter-Cw9brU9k.js";
2
- import { d as D } from "./deviceReadings-3Z4nql34.js";
1
+ import { b as o, d as s, e as l, a as d, B as L, g as E, h as i, c as B, f as S, t as _ } from "./bodewellAdapter-PfSOdsEI.js";
2
+ import { d as D } from "./deviceReadings-cxZE1T-0.js";
3
3
  export {
4
4
  o as BODEWELL_HARDWARE_ONLY_FIELDS,
5
5
  s as BODEWELL_HISTORY_FIELDS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramme-io/kernel",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "type": "module",
@@ -1,16 +0,0 @@
1
- import { S as i } from "./index-BrFe7_2L.js";
2
- const s = Date.UTC(2024, 0, 1), u = 24 * 60 * 60 * 1e3, S = (e, n, a) => n.map((t) => {
3
- const o = t.at !== void 0 && t.at >= s && t.at <= a + u ? t.at : a;
4
- return {
5
- id: `${e}:${t.key}`,
6
- source: "http",
7
- domain: i.ENVIRONMENT,
8
- key: t.key,
9
- value: t.value,
10
- ...t.unit ? { unit: t.unit } : {},
11
- timestamp: o
12
- };
13
- });
14
- export {
15
- S as d
16
- };