@elizaos/plugin-inbox 2.0.3-beta.5 → 2.0.3-beta.7
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/actions/inbox.d.ts +69 -0
- package/dist/actions/inbox.d.ts.map +1 -0
- package/dist/actions/inbox.js +345 -0
- package/dist/actions/inbox.js.map +1 -0
- package/dist/components/inbox/InboxSpatialView.d.ts +54 -0
- package/dist/components/inbox/InboxSpatialView.d.ts.map +1 -0
- package/dist/components/inbox/InboxSpatialView.js +171 -0
- package/dist/components/inbox/InboxSpatialView.js.map +1 -0
- package/dist/components/inbox/InboxView.d.ts +64 -0
- package/dist/components/inbox/InboxView.d.ts.map +1 -0
- package/dist/components/inbox/InboxView.js +169 -0
- package/dist/components/inbox/InboxView.js.map +1 -0
- package/dist/components/inbox/inbox-view-bundle.d.ts +2 -0
- package/dist/components/inbox/inbox-view-bundle.d.ts.map +1 -0
- package/dist/components/inbox/inbox-view-bundle.js +5 -0
- package/dist/components/inbox/inbox-view-bundle.js.map +1 -0
- package/dist/db/index.d.ts +3 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +3 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/schema.d.ts +1729 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +79 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/db/sql.d.ts +32 -0
- package/dist/db/sql.d.ts.map +1 -0
- package/dist/db/sql.js +130 -0
- package/dist/db/sql.js.map +1 -0
- package/dist/inbox/channel-deep-links.d.ts +7 -0
- package/dist/inbox/channel-deep-links.d.ts.map +1 -0
- package/dist/inbox/channel-deep-links.js +97 -0
- package/dist/inbox/channel-deep-links.js.map +1 -0
- package/dist/inbox/config.d.ts +7 -0
- package/dist/inbox/config.d.ts.map +1 -0
- package/dist/inbox/config.js +61 -0
- package/dist/inbox/config.js.map +1 -0
- package/dist/inbox/email-curation.d.ts +174 -0
- package/dist/inbox/email-curation.d.ts.map +1 -0
- package/dist/inbox/email-curation.js +1056 -0
- package/dist/inbox/email-curation.js.map +1 -0
- package/dist/inbox/email-unsubscribe-types.d.ts +71 -0
- package/dist/inbox/email-unsubscribe-types.d.ts.map +1 -0
- package/dist/inbox/email-unsubscribe-types.js +1 -0
- package/dist/inbox/email-unsubscribe-types.js.map +1 -0
- package/dist/inbox/gmail-normalize.d.ts +99 -0
- package/dist/inbox/gmail-normalize.d.ts.map +1 -0
- package/dist/inbox/gmail-normalize.js +937 -0
- package/dist/inbox/gmail-normalize.js.map +1 -0
- package/dist/inbox/google-gmail-seam.d.ts +52 -0
- package/dist/inbox/google-gmail-seam.d.ts.map +1 -0
- package/dist/inbox/google-gmail-seam.js +263 -0
- package/dist/inbox/google-gmail-seam.js.map +1 -0
- package/dist/inbox/message-fetcher.d.ts +47 -0
- package/dist/inbox/message-fetcher.d.ts.map +1 -0
- package/dist/inbox/message-fetcher.js +461 -0
- package/dist/inbox/message-fetcher.js.map +1 -0
- package/dist/inbox/migration.d.ts +46 -0
- package/dist/inbox/migration.d.ts.map +1 -0
- package/dist/inbox/migration.js +114 -0
- package/dist/inbox/migration.js.map +1 -0
- package/dist/inbox/reflection.d.ts +40 -0
- package/dist/inbox/reflection.d.ts.map +1 -0
- package/dist/inbox/reflection.js +142 -0
- package/dist/inbox/reflection.js.map +1 -0
- package/dist/inbox/repository.d.ts +58 -0
- package/dist/inbox/repository.d.ts.map +1 -0
- package/dist/inbox/repository.js +376 -0
- package/dist/inbox/repository.js.map +1 -0
- package/dist/inbox/service.d.ts +149 -0
- package/dist/inbox/service.d.ts.map +1 -0
- package/dist/inbox/service.js +247 -0
- package/dist/inbox/service.js.map +1 -0
- package/dist/inbox/triage-classifier.d.ts +28 -0
- package/dist/inbox/triage-classifier.d.ts.map +1 -0
- package/dist/inbox/triage-classifier.js +306 -0
- package/dist/inbox/triage-classifier.js.map +1 -0
- package/dist/inbox/types.d.ts +124 -0
- package/dist/inbox/types.d.ts.map +1 -0
- package/dist/inbox/types.js +1 -0
- package/dist/inbox/types.js.map +1 -0
- package/dist/inbox/unsubscribe-repository.d.ts +14 -0
- package/dist/inbox/unsubscribe-repository.d.ts.map +1 -0
- package/dist/inbox/unsubscribe-repository.js +112 -0
- package/dist/inbox/unsubscribe-repository.js.map +1 -0
- package/dist/inbox/unsubscribe-service.d.ts +41 -0
- package/dist/inbox/unsubscribe-service.d.ts.map +1 -0
- package/dist/inbox/unsubscribe-service.js +351 -0
- package/dist/inbox/unsubscribe-service.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +70 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +4 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +38 -0
- package/dist/plugin.js.map +1 -0
- package/dist/providers/cross-channel-context.d.ts +21 -0
- package/dist/providers/cross-channel-context.d.ts.map +1 -0
- package/dist/providers/cross-channel-context.js +96 -0
- package/dist/providers/cross-channel-context.js.map +1 -0
- package/dist/providers/inbox-triage.d.ts +12 -0
- package/dist/providers/inbox-triage.d.ts.map +1 -0
- package/dist/providers/inbox-triage.js +98 -0
- package/dist/providers/inbox-triage.js.map +1 -0
- package/dist/register-terminal-view.d.ts +15 -0
- package/dist/register-terminal-view.d.ts.map +1 -0
- package/dist/register-terminal-view.js +21 -0
- package/dist/register-terminal-view.js.map +1 -0
- package/dist/register.d.ts +9 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +5 -0
- package/dist/register.js.map +1 -0
- package/dist/types.d.ts +42 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +25 -0
- package/dist/types.js.map +1 -0
- package/dist/views/bundle.js +315 -0
- package/dist/views/bundle.js.map +1 -0
- package/package.json +9 -9
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { client as e } from "@elizaos/ui";
|
|
2
|
+
import { Button as t, Card as n, Divider as r, HStack as i, List as a, SpatialSurface as o, Text as s, VStack as c } from "@elizaos/ui/spatial";
|
|
3
|
+
import { useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
4
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
5
|
+
//#region src/types.ts
|
|
6
|
+
var _ = [
|
|
7
|
+
"gmail",
|
|
8
|
+
"x_dm",
|
|
9
|
+
"discord",
|
|
10
|
+
"telegram",
|
|
11
|
+
"signal",
|
|
12
|
+
"imessage",
|
|
13
|
+
"whatsapp",
|
|
14
|
+
"sms"
|
|
15
|
+
], v = {
|
|
16
|
+
gmail: "Email",
|
|
17
|
+
x_dm: "X",
|
|
18
|
+
discord: "Discord",
|
|
19
|
+
telegram: "Telegram",
|
|
20
|
+
signal: "Signal",
|
|
21
|
+
imessage: "iMessage",
|
|
22
|
+
whatsapp: "WhatsApp",
|
|
23
|
+
sms: "SMS"
|
|
24
|
+
};
|
|
25
|
+
_.map((e) => ({
|
|
26
|
+
channel: e,
|
|
27
|
+
label: v[e],
|
|
28
|
+
active: !1
|
|
29
|
+
}));
|
|
30
|
+
function y(e) {
|
|
31
|
+
let t = [];
|
|
32
|
+
for (let n of _) {
|
|
33
|
+
let r = e.filter((e) => e.channel === n);
|
|
34
|
+
r.length !== 0 && t.push({
|
|
35
|
+
channel: n,
|
|
36
|
+
label: v[n],
|
|
37
|
+
items: r
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return t;
|
|
41
|
+
}
|
|
42
|
+
function b(e) {
|
|
43
|
+
let t = new Date(e);
|
|
44
|
+
return Number.isNaN(t.getTime()) ? e : t.toLocaleString(void 0, {
|
|
45
|
+
month: "short",
|
|
46
|
+
day: "numeric",
|
|
47
|
+
hour: "numeric",
|
|
48
|
+
minute: "2-digit"
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function x({ snapshot: e, onAction: t }) {
|
|
52
|
+
let r = (e) => () => t?.(e);
|
|
53
|
+
return /* @__PURE__ */ g(n, {
|
|
54
|
+
gap: 1,
|
|
55
|
+
padding: 1,
|
|
56
|
+
children: [/* @__PURE__ */ h(S, {
|
|
57
|
+
filters: e.filters,
|
|
58
|
+
dispatch: r
|
|
59
|
+
}), /* @__PURE__ */ h(C, {
|
|
60
|
+
snapshot: e,
|
|
61
|
+
dispatch: r
|
|
62
|
+
})]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function S({ filters: e, dispatch: n }) {
|
|
66
|
+
return /* @__PURE__ */ h(i, {
|
|
67
|
+
gap: 1,
|
|
68
|
+
wrap: !0,
|
|
69
|
+
align: "center",
|
|
70
|
+
children: e.map((e) => /* @__PURE__ */ h(t, {
|
|
71
|
+
variant: e.active ? "solid" : "outline",
|
|
72
|
+
tone: e.active ? "primary" : "default",
|
|
73
|
+
agent: `inbox-channel-${e.channel}`,
|
|
74
|
+
onPress: n(`channel:${e.channel}`),
|
|
75
|
+
children: e.active ? `* ${e.label}` : e.label
|
|
76
|
+
}, e.channel))
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function C({ snapshot: e, dispatch: n }) {
|
|
80
|
+
return e.status === "loading" ? /* @__PURE__ */ h(s, {
|
|
81
|
+
tone: "muted",
|
|
82
|
+
align: "center",
|
|
83
|
+
style: "caption",
|
|
84
|
+
children: "Loading inbox"
|
|
85
|
+
}) : e.status === "error" ? /* @__PURE__ */ g(c, {
|
|
86
|
+
gap: 1,
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ h(s, {
|
|
89
|
+
bold: !0,
|
|
90
|
+
children: "Couldn't load inbox"
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ h(s, {
|
|
93
|
+
tone: "danger",
|
|
94
|
+
style: "caption",
|
|
95
|
+
children: e.error ?? "Could not load inbox."
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ h(t, {
|
|
98
|
+
width: "100%",
|
|
99
|
+
agent: "retry",
|
|
100
|
+
onPress: n("retry"),
|
|
101
|
+
children: "Retry"
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
}) : e.status === "empty" || e.items.length === 0 ? /* @__PURE__ */ h(w, {
|
|
105
|
+
snapshot: e,
|
|
106
|
+
dispatch: n
|
|
107
|
+
}) : /* @__PURE__ */ h(T, {
|
|
108
|
+
snapshot: e,
|
|
109
|
+
dispatch: n
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function w({ snapshot: e, dispatch: n }) {
|
|
113
|
+
return !e.hasConnectedChannels && e.activeFilterCount === 0 ? /* @__PURE__ */ g(c, {
|
|
114
|
+
gap: 1,
|
|
115
|
+
children: [/* @__PURE__ */ h(s, {
|
|
116
|
+
bold: !0,
|
|
117
|
+
children: "None"
|
|
118
|
+
}), /* @__PURE__ */ h(t, {
|
|
119
|
+
width: "100%",
|
|
120
|
+
agent: "connect",
|
|
121
|
+
onPress: n("connect"),
|
|
122
|
+
children: "Connect"
|
|
123
|
+
})]
|
|
124
|
+
}) : /* @__PURE__ */ h(c, {
|
|
125
|
+
gap: 1,
|
|
126
|
+
children: /* @__PURE__ */ h(s, {
|
|
127
|
+
bold: !0,
|
|
128
|
+
children: "Inbox zero"
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
function T({ snapshot: e, dispatch: t }) {
|
|
133
|
+
let n = y(e.items);
|
|
134
|
+
return /* @__PURE__ */ g(m, { children: [e.nudge ? /* @__PURE__ */ h(s, {
|
|
135
|
+
tone: "muted",
|
|
136
|
+
style: "caption",
|
|
137
|
+
children: e.nudge
|
|
138
|
+
}) : null, n.map((e) => /* @__PURE__ */ h(E, {
|
|
139
|
+
group: e,
|
|
140
|
+
dispatch: t
|
|
141
|
+
}, e.channel))] });
|
|
142
|
+
}
|
|
143
|
+
function E({ group: e, dispatch: n }) {
|
|
144
|
+
return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(r, { label: `${e.label} (${e.items.length})` }), /* @__PURE__ */ h(a, {
|
|
145
|
+
gap: 1,
|
|
146
|
+
children: e.items.slice(0, 12).map((e) => {
|
|
147
|
+
let r = e.subject ?? e.sender, a = e.preview ? `${e.sender} - ${e.preview}` : e.sender;
|
|
148
|
+
return /* @__PURE__ */ g(c, {
|
|
149
|
+
gap: 0,
|
|
150
|
+
children: [/* @__PURE__ */ g(i, {
|
|
151
|
+
gap: 1,
|
|
152
|
+
align: "center",
|
|
153
|
+
children: [/* @__PURE__ */ h(s, {
|
|
154
|
+
tone: "primary",
|
|
155
|
+
wrap: !1,
|
|
156
|
+
children: e.unread ? "●" : "○"
|
|
157
|
+
}), /* @__PURE__ */ h(s, {
|
|
158
|
+
bold: !0,
|
|
159
|
+
grow: 1,
|
|
160
|
+
children: r
|
|
161
|
+
})]
|
|
162
|
+
}), /* @__PURE__ */ g(i, {
|
|
163
|
+
gap: 1,
|
|
164
|
+
align: "center",
|
|
165
|
+
children: [/* @__PURE__ */ g(s, {
|
|
166
|
+
style: "caption",
|
|
167
|
+
tone: "muted",
|
|
168
|
+
grow: 1,
|
|
169
|
+
wrap: !1,
|
|
170
|
+
children: [
|
|
171
|
+
a,
|
|
172
|
+
" • ",
|
|
173
|
+
b(e.receivedAt)
|
|
174
|
+
]
|
|
175
|
+
}), /* @__PURE__ */ h(t, {
|
|
176
|
+
variant: "outline",
|
|
177
|
+
tone: "default",
|
|
178
|
+
agent: `open:${e.id}`,
|
|
179
|
+
onPress: n(`open:${e.id}`),
|
|
180
|
+
children: "Open"
|
|
181
|
+
})]
|
|
182
|
+
})]
|
|
183
|
+
}, e.id);
|
|
184
|
+
})
|
|
185
|
+
})] });
|
|
186
|
+
}
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region src/components/inbox/InboxView.tsx
|
|
189
|
+
async function D(t) {
|
|
190
|
+
let n = new URLSearchParams();
|
|
191
|
+
t.length > 0 && n.set("channels", t.join(","));
|
|
192
|
+
let r = n.toString(), i = `/api/lifeops/inbox${r ? `?${r}` : ""}`, a = await fetch(`${e.getBaseUrl()}${i}`);
|
|
193
|
+
if (!a.ok) throw Error(`Inbox request failed (${a.status})`);
|
|
194
|
+
return await a.json();
|
|
195
|
+
}
|
|
196
|
+
var O = { fetchInbox: D }, k = 2e4, A = new Set(_);
|
|
197
|
+
function j(e) {
|
|
198
|
+
return A.has(e);
|
|
199
|
+
}
|
|
200
|
+
function M(e) {
|
|
201
|
+
return j(e.channel) ? {
|
|
202
|
+
id: e.id,
|
|
203
|
+
channel: e.channel,
|
|
204
|
+
sender: e.sender.displayName,
|
|
205
|
+
subject: e.subject,
|
|
206
|
+
preview: e.snippet,
|
|
207
|
+
receivedAt: e.receivedAt,
|
|
208
|
+
unread: e.unread,
|
|
209
|
+
threadId: e.threadId ?? null
|
|
210
|
+
} : null;
|
|
211
|
+
}
|
|
212
|
+
function N(e) {
|
|
213
|
+
return _.filter((t) => {
|
|
214
|
+
let n = e[t];
|
|
215
|
+
return n !== void 0 && n.total > 0;
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
function P(e) {
|
|
219
|
+
let t = e.reduce((e, t) => t.unread ? e + 1 : e, 0);
|
|
220
|
+
return t === 0 ? null : `${t} thread${t === 1 ? " still needs" : "s still need"} a reply.`;
|
|
221
|
+
}
|
|
222
|
+
function F(t) {
|
|
223
|
+
e.sendChatMessage?.(t);
|
|
224
|
+
}
|
|
225
|
+
function I() {
|
|
226
|
+
F("Connect a messaging channel so you can triage my inbox.");
|
|
227
|
+
}
|
|
228
|
+
function L(e) {
|
|
229
|
+
if (!e) return;
|
|
230
|
+
let t = e.subject ?? e.sender;
|
|
231
|
+
F(`Open the inbox thread from ${e.sender}${t ? ` — "${t}"` : ""}.`);
|
|
232
|
+
}
|
|
233
|
+
var R = [];
|
|
234
|
+
function z(e = {}) {
|
|
235
|
+
let t = e.fetchers ?? O, [n, r] = p({ kind: "loading" }), [i, a] = p(() => /* @__PURE__ */ new Set()), s = f(t);
|
|
236
|
+
s.current = t;
|
|
237
|
+
let c = l((e, t = !1) => {
|
|
238
|
+
let n = !1;
|
|
239
|
+
return t || r({ kind: "loading" }), s.current.fetchInbox(e).then((e) => {
|
|
240
|
+
n || r({
|
|
241
|
+
kind: "ready",
|
|
242
|
+
data: {
|
|
243
|
+
items: e.messages.map(M).filter((e) => e !== null),
|
|
244
|
+
connected: N(e.channelCounts)
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}).catch((e) => {
|
|
248
|
+
n || r({
|
|
249
|
+
kind: "error",
|
|
250
|
+
message: e instanceof Error ? e.message : "Could not load inbox."
|
|
251
|
+
});
|
|
252
|
+
}), () => {
|
|
253
|
+
n = !0;
|
|
254
|
+
};
|
|
255
|
+
}, []), m = d(() => _.filter((e) => i.has(e)), [i]);
|
|
256
|
+
u(() => {
|
|
257
|
+
let e = c(m), t = setInterval(() => c(m, !0), k);
|
|
258
|
+
return () => {
|
|
259
|
+
e(), clearInterval(t);
|
|
260
|
+
};
|
|
261
|
+
}, [c, m]);
|
|
262
|
+
let g = n.kind === "ready" ? n.data.items : R, y = l((e) => {
|
|
263
|
+
if (e.startsWith("channel:")) {
|
|
264
|
+
let t = e.slice(8);
|
|
265
|
+
if (!j(t)) return;
|
|
266
|
+
a((e) => {
|
|
267
|
+
let n = new Set(e);
|
|
268
|
+
return n.has(t) ? n.delete(t) : n.add(t), n;
|
|
269
|
+
});
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
if (e.startsWith("open:")) {
|
|
273
|
+
let t = e.slice(5);
|
|
274
|
+
L(g.find((e) => e.id === t));
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
switch (e) {
|
|
278
|
+
case "retry":
|
|
279
|
+
c(m);
|
|
280
|
+
return;
|
|
281
|
+
case "connect":
|
|
282
|
+
I();
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
}, [
|
|
286
|
+
g,
|
|
287
|
+
c,
|
|
288
|
+
m
|
|
289
|
+
]), b = d(() => _.map((e) => ({
|
|
290
|
+
channel: e,
|
|
291
|
+
label: v[e],
|
|
292
|
+
active: i.has(e)
|
|
293
|
+
})), [i]);
|
|
294
|
+
return /* @__PURE__ */ h(o, { children: /* @__PURE__ */ h(x, {
|
|
295
|
+
snapshot: d(() => ({
|
|
296
|
+
status: n.kind === "loading" ? "loading" : n.kind === "error" ? "error" : g.length === 0 ? "empty" : "ready",
|
|
297
|
+
items: g,
|
|
298
|
+
filters: b,
|
|
299
|
+
activeFilterCount: i.size,
|
|
300
|
+
hasConnectedChannels: n.kind === "ready" && n.data.connected.length > 0,
|
|
301
|
+
nudge: P(g),
|
|
302
|
+
error: n.kind === "error" ? n.message : null
|
|
303
|
+
}), [
|
|
304
|
+
n,
|
|
305
|
+
g,
|
|
306
|
+
b,
|
|
307
|
+
i
|
|
308
|
+
]),
|
|
309
|
+
onAction: y
|
|
310
|
+
}) });
|
|
311
|
+
}
|
|
312
|
+
//#endregion
|
|
313
|
+
export { z as InboxView };
|
|
314
|
+
|
|
315
|
+
//# sourceMappingURL=bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle.js","names":[],"sources":["../../src/types.ts","../../src/components/inbox/InboxSpatialView.tsx","../../src/components/inbox/InboxView.tsx"],"sourcesContent":["/**\n * View-facing type surface for @elizaos/plugin-inbox.\n *\n * These are the display contract the `InboxView` renders against. The triage\n * back-end types (TriageEntry, TriageClassification, InboundMessage, …) live in\n * `./inbox/types.ts`; the INBOX action's fan-out types live in\n * `./actions/inbox.ts`. This plugin must not import from\n * @elizaos/plugin-personal-assistant.\n */\n\n/**\n * Channels the unified inbox aggregates. These mirror the wire channel ids the\n * inbox route emits (`LIFEOPS_INBOX_CHANNELS` in @elizaos/shared) so the view\n * can group the real payload without a translation table. Defined locally —\n * this plugin must not import from @elizaos/plugin-personal-assistant.\n */\nexport const INBOX_CHANNELS = [\n \"gmail\",\n \"x_dm\",\n \"discord\",\n \"telegram\",\n \"signal\",\n \"imessage\",\n \"whatsapp\",\n \"sms\",\n] as const;\nexport type InboxChannel = (typeof INBOX_CHANNELS)[number];\n\n/** Human-readable label per channel, in display order. */\nexport const INBOX_CHANNEL_LABELS: Record<InboxChannel, string> = {\n gmail: \"Email\",\n x_dm: \"X\",\n discord: \"Discord\",\n telegram: \"Telegram\",\n signal: \"Signal\",\n imessage: \"iMessage\",\n whatsapp: \"WhatsApp\",\n sms: \"SMS\",\n};\n\n/**\n * One triage item rendered by the InboxView. This is the view's local display\n * DTO, mapped at the fetch boundary from a `LifeOpsInboxMessage` on the wire\n * (`GET /api/lifeops/inbox`). It is intentionally a flat, display-only shape —\n * the view reads these fields and formats them, it never computes.\n */\nexport interface InboxItem {\n /** Channel-prefixed, globally unique message id. */\n id: string;\n channel: InboxChannel;\n /** Display name of the sender. */\n sender: string;\n /** Gmail-style subject; null for chat channels. */\n subject: string | null;\n /** One-line preview of the latest message. */\n preview: string;\n /** ISO-8601 timestamp the message was received. */\n receivedAt: string;\n unread: boolean;\n /** Stable per-conversation key, when the wire supplies one. */\n threadId: string | null;\n}\n","/**\n * InboxSpatialView — the cross-channel inbox authored once with the spatial\n * vocabulary so it renders correctly wherever it is displayed:\n *\n * - GUI / XR — mounted in `<SpatialSurface>` (DOM; XR scales up).\n * - TUI — rendered to real terminal lines by the agent terminal, via\n * `registerSpatialTerminalView` (see `register-terminal-view.tsx`).\n *\n * It is purely presentational (a snapshot + an action callback in, primitives\n * out) and imports ONLY the cross-modality primitives plus the view's local\n * display types, so it is safe to render in the Node agent process where the\n * terminal lives (no `@elizaos/ui` renderer barrel, no fetch).\n *\n * The live data wrapper {@link InboxView} owns the `/api/lifeops/inbox` fetch,\n * the background poll, and the channel-filter state; it builds an\n * {@link InboxSnapshot} and dispatches user intent back through `onAction`.\n */\n\nimport {\n Button,\n Card,\n Divider,\n HStack,\n List,\n Text,\n VStack,\n} from \"@elizaos/ui/spatial\";\nimport {\n INBOX_CHANNEL_LABELS,\n INBOX_CHANNELS,\n type InboxChannel,\n type InboxItem,\n} from \"../../types.ts\";\n\n/** Which fetch state the inbox surface is currently in. */\nexport type InboxStatus = \"loading\" | \"error\" | \"empty\" | \"ready\";\n\n/** One channel chip's display state in the filter row. */\nexport interface InboxChannelFilter {\n channel: InboxChannel;\n label: string;\n active: boolean;\n}\n\nexport interface InboxSnapshot {\n /** Current fetch state. */\n status: InboxStatus;\n /** Triage items (already filtered to the active channel selection). */\n items: InboxItem[];\n /** Channel filter chips in display order. */\n filters: InboxChannelFilter[];\n /** Number of active channel filters (drives the empty-state copy). */\n activeFilterCount: number;\n /** True when at least one channel reported messages in the payload. */\n hasConnectedChannels: boolean;\n /** Proactive one-liner (\"N threads still need a reply\"); absent when zero. */\n nudge?: string | null;\n /** Error text for the error state. */\n error?: string | null;\n}\n\nconst DEFAULT_FILTERS: InboxChannelFilter[] = INBOX_CHANNELS.map((channel) => ({\n channel,\n label: INBOX_CHANNEL_LABELS[channel],\n active: false,\n}));\n\n/** A snapshot every surface can render before live data arrives. */\nexport const EMPTY_INBOX_SNAPSHOT: InboxSnapshot = {\n status: \"loading\",\n items: [],\n filters: DEFAULT_FILTERS,\n activeFilterCount: 0,\n hasConnectedChannels: false,\n nudge: null,\n error: null,\n};\n\ninterface InboxChannelGroup {\n channel: InboxChannel;\n label: string;\n items: InboxItem[];\n}\n\n/** Group items by channel in display order; only channels with items appear. */\nfunction groupByChannel(items: InboxItem[]): InboxChannelGroup[] {\n const groups: InboxChannelGroup[] = [];\n for (const channel of INBOX_CHANNELS) {\n const channelItems = items.filter((item) => item.channel === channel);\n if (channelItems.length === 0) continue;\n groups.push({\n channel,\n label: INBOX_CHANNEL_LABELS[channel],\n items: channelItems,\n });\n }\n return groups;\n}\n\nfunction formatTime(value: string): string {\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) return value;\n return date.toLocaleString(undefined, {\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n}\n\nexport interface InboxSpatialViewProps {\n snapshot: InboxSnapshot;\n /**\n * Dispatch by agent id: `retry`, `connect`, `channel:<id>` (toggle a channel\n * filter), and `open:<messageId>` (open a triage item).\n */\n onAction?: (action: string) => void;\n}\n\nexport function InboxSpatialView({\n snapshot,\n onAction,\n}: InboxSpatialViewProps) {\n const dispatch = (action: string) => () => onAction?.(action);\n\n return (\n <Card gap={1} padding={1}>\n <InboxChannelFilters filters={snapshot.filters} dispatch={dispatch} />\n <InboxBody snapshot={snapshot} dispatch={dispatch} />\n </Card>\n );\n}\n\nfunction InboxChannelFilters({\n filters,\n dispatch,\n}: {\n filters: InboxChannelFilter[];\n dispatch: (action: string) => () => void;\n}) {\n return (\n <HStack gap={1} wrap align=\"center\">\n {filters.map((filter) => (\n <Button\n key={filter.channel}\n variant={filter.active ? \"solid\" : \"outline\"}\n tone={filter.active ? \"primary\" : \"default\"}\n agent={`inbox-channel-${filter.channel}`}\n onPress={dispatch(`channel:${filter.channel}`)}\n >\n {filter.active ? `* ${filter.label}` : filter.label}\n </Button>\n ))}\n </HStack>\n );\n}\n\nfunction InboxBody({\n snapshot,\n dispatch,\n}: {\n snapshot: InboxSnapshot;\n dispatch: (action: string) => () => void;\n}) {\n if (snapshot.status === \"loading\") {\n return (\n <Text tone=\"muted\" align=\"center\" style=\"caption\">\n Loading inbox\n </Text>\n );\n }\n\n if (snapshot.status === \"error\") {\n return (\n <VStack gap={1}>\n <Text bold>Couldn't load inbox</Text>\n <Text tone=\"danger\" style=\"caption\">\n {snapshot.error ?? \"Could not load inbox.\"}\n </Text>\n <Button width=\"100%\" agent=\"retry\" onPress={dispatch(\"retry\")}>\n Retry\n </Button>\n </VStack>\n );\n }\n\n if (snapshot.status === \"empty\" || snapshot.items.length === 0) {\n return <InboxEmptyBody snapshot={snapshot} dispatch={dispatch} />;\n }\n\n return <InboxReadyBody snapshot={snapshot} dispatch={dispatch} />;\n}\n\nfunction InboxEmptyBody({\n snapshot,\n dispatch,\n}: {\n snapshot: InboxSnapshot;\n dispatch: (action: string) => () => void;\n}) {\n const noChannels =\n !snapshot.hasConnectedChannels && snapshot.activeFilterCount === 0;\n if (noChannels) {\n return (\n <VStack gap={1}>\n <Text bold>None</Text>\n <Button width=\"100%\" agent=\"connect\" onPress={dispatch(\"connect\")}>\n Connect\n </Button>\n </VStack>\n );\n }\n return (\n <VStack gap={1}>\n <Text bold>Inbox zero</Text>\n </VStack>\n );\n}\n\nfunction InboxReadyBody({\n snapshot,\n dispatch,\n}: {\n snapshot: InboxSnapshot;\n dispatch: (action: string) => () => void;\n}) {\n const groups = groupByChannel(snapshot.items);\n return (\n <>\n {snapshot.nudge ? (\n <Text tone=\"muted\" style=\"caption\">\n {snapshot.nudge}\n </Text>\n ) : null}\n {groups.map((group) => (\n <InboxChannelGroupBody\n key={group.channel}\n group={group}\n dispatch={dispatch}\n />\n ))}\n </>\n );\n}\n\nfunction InboxChannelGroupBody({\n group,\n dispatch,\n}: {\n group: InboxChannelGroup;\n dispatch: (action: string) => () => void;\n}) {\n return (\n <>\n <Divider label={`${group.label} (${group.items.length})`} />\n <List gap={1}>\n {group.items.slice(0, 12).map((item) => {\n const title = item.subject ?? item.sender;\n const meta = item.preview\n ? `${item.sender} - ${item.preview}`\n : item.sender;\n return (\n // The title gets its own full-width line so a long subject is never\n // truncated by a sibling control; the sender/preview meta and the\n // Open action share the second line under the unread dot.\n <VStack key={item.id} gap={0}>\n <HStack gap={1} align=\"center\">\n <Text tone=\"primary\" wrap={false}>\n {item.unread ? \"●\" : \"○\"}\n </Text>\n <Text bold grow={1}>\n {title}\n </Text>\n </HStack>\n <HStack gap={1} align=\"center\">\n <Text style=\"caption\" tone=\"muted\" grow={1} wrap={false}>\n {meta} • {formatTime(item.receivedAt)}\n </Text>\n <Button\n variant=\"outline\"\n tone=\"default\"\n agent={`open:${item.id}`}\n onPress={dispatch(`open:${item.id}`)}\n >\n Open\n </Button>\n </HStack>\n </VStack>\n );\n })}\n </List>\n </>\n );\n}\n","/**\n * InboxView — the single GUI/XR data wrapper for the cross-channel inbox.\n *\n * It owns the live inbox data (the single read-only endpoint served by the\n * personal-assistant routes, the background poll, the channel-filter selection,\n * and the loading/error/empty/ready state machine) and renders the one\n * presentational {@link InboxSpatialView} inside a {@link SpatialSurface}.\n * Omitting the `modality` prop lets `SpatialSurface` auto-detect GUI vs XR via\n * `window.__elizaXRContext`, so the SAME component serves both surfaces. The TUI\n * surface renders the same `InboxSpatialView` through the terminal registry\n * (see `register-terminal-view.tsx`).\n *\n * Data source (PA owns the persistence + connector pulls; this plugin renders):\n * GET {base}/api/lifeops/inbox?channels=\n *\n * The default fetcher builds its URL from `client.getBaseUrl()`; tests inject\n * the fetcher seam so they stay offline. The wire payload is a flat list of\n * messages plus per-channel counts; we map each message to a flat display item\n * at the fetch boundary so the rest of the view renders display-only.\n *\n * This plugin MUST NOT import from @elizaos/plugin-personal-assistant. The wire\n * DTOs below are declared locally to match the JSON shape PA emits\n * (`LifeOpsInbox` / `LifeOpsInboxMessage` in @elizaos/shared).\n */\n\nimport { client } from \"@elizaos/ui\";\nimport { SpatialSurface } from \"@elizaos/ui/spatial\";\nimport type { ReactNode } from \"react\";\nimport { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport {\n INBOX_CHANNEL_LABELS,\n INBOX_CHANNELS,\n type InboxChannel,\n type InboxItem,\n} from \"../../types.ts\";\nimport {\n type InboxChannelFilter,\n type InboxSnapshot,\n InboxSpatialView,\n type InboxStatus,\n} from \"./InboxSpatialView.tsx\";\n\n// ---------------------------------------------------------------------------\n// Wire DTOs — local mirror of the JSON shape served by the PA inbox route.\n// Never import PA / @elizaos/shared inbox types here; keep this view's contract\n// self-contained and aligned by shape.\n// ---------------------------------------------------------------------------\n\ninterface InboxMessageSenderWire {\n id: string;\n displayName: string;\n email: string | null;\n avatarUrl: string | null;\n}\n\ninterface InboxMessageWire {\n id: string;\n channel: string;\n sender: InboxMessageSenderWire;\n subject: string | null;\n snippet: string;\n receivedAt: string;\n unread: boolean;\n threadId?: string;\n}\n\ninterface InboxChannelCountWire {\n total: number;\n unread: number;\n}\n\ninterface InboxWire {\n messages: InboxMessageWire[];\n channelCounts: Record<string, InboxChannelCountWire>;\n fetchedAt: string;\n}\n\n// ---------------------------------------------------------------------------\n// Fetcher seam — default to a real GET; tests inject an offline fake.\n// ---------------------------------------------------------------------------\n\nexport interface InboxFetchers {\n /** Fetch the inbox. `channels` narrows the server query when non-empty. */\n fetchInbox: (channels: InboxChannel[]) => Promise<InboxWire>;\n}\n\nasync function getInbox(channels: InboxChannel[]): Promise<InboxWire> {\n const params = new URLSearchParams();\n if (channels.length > 0) params.set(\"channels\", channels.join(\",\"));\n const query = params.toString();\n const path = `/api/lifeops/inbox${query ? `?${query}` : \"\"}`;\n const response = await fetch(`${client.getBaseUrl()}${path}`);\n if (!response.ok) {\n throw new Error(`Inbox request failed (${response.status})`);\n }\n return (await response.json()) as InboxWire;\n}\n\nconst defaultFetchers: InboxFetchers = {\n fetchInbox: getInbox,\n};\n\n/** Background poll cadence — keeps the list fresh without a manual refresh. */\nconst INBOX_POLL_MS = 20_000;\n\nexport interface InboxViewProps {\n /** Owner display name. Reserved for host wiring; not currently rendered. */\n ownerName?: string;\n /** Test/host injection seam. Defaults to the real `/api/lifeops/inbox` GET. */\n fetchers?: InboxFetchers;\n}\n\n// ---------------------------------------------------------------------------\n// Wire -> display DTO mapping.\n// ---------------------------------------------------------------------------\n\nconst KNOWN_CHANNELS: ReadonlySet<string> = new Set(INBOX_CHANNELS);\n\nfunction isKnownChannel(value: string): value is InboxChannel {\n return KNOWN_CHANNELS.has(value);\n}\n\nfunction mapMessage(message: InboxMessageWire): InboxItem | null {\n // The wire channel set is fixed; drop anything outside it rather than\n // rendering an unlabeled row. A dropped message means the server emitted a\n // channel this build doesn't know — surfaced as a smaller list, never a crash.\n if (!isKnownChannel(message.channel)) return null;\n return {\n id: message.id,\n channel: message.channel,\n sender: message.sender.displayName,\n subject: message.subject,\n preview: message.snippet,\n receivedAt: message.receivedAt,\n unread: message.unread,\n threadId: message.threadId ?? null,\n };\n}\n\n/** Channels with at least one message in the payload, in display order. */\nfunction connectedChannels(\n counts: Record<string, InboxChannelCountWire>,\n): InboxChannel[] {\n return INBOX_CHANNELS.filter((channel) => {\n const count = counts[channel];\n return count !== undefined && count.total > 0;\n });\n}\n\n/**\n * Proactive one-liner (DESIGN LAW 10): the agent noticing unread threads that\n * still need a reply. Returns null when nothing is unread so the line is absent\n * rather than reading \"0 threads\". Computed from the already-loaded items.\n */\nfunction unreadNudge(items: InboxItem[]): string | null {\n const unread = items.reduce((n, item) => (item.unread ? n + 1 : n), 0);\n if (unread === 0) return null;\n return `${unread} thread${unread === 1 ? \" still needs\" : \"s still need\"} a reply.`;\n}\n\n/** Single chat-handoff seam: search, reload, connect, and open all live in the\n * floating chat, so the view routes user intent there rather than computing. */\nfunction sendChatPrompt(prompt: string): void {\n // `client` is the shared ElizaClient; its published type does not surface\n // `sendChatMessage`, so read it through a narrow optional-method view (the\n // floating chat injects it at runtime) rather than widening the client type.\n (client as { sendChatMessage?: (text: string) => void }).sendChatMessage?.(\n prompt,\n );\n}\n\nfunction requestConnect(): void {\n sendChatPrompt(\"Connect a messaging channel so you can triage my inbox.\");\n}\n\nfunction requestOpen(item: InboxItem | undefined): void {\n if (!item) return;\n const title = item.subject ?? item.sender;\n sendChatPrompt(\n `Open the inbox thread from ${item.sender}${title ? ` — \"${title}\"` : \"\"}.`,\n );\n}\n\n// ---------------------------------------------------------------------------\n// Fetch-driven state machine.\n// ---------------------------------------------------------------------------\n\ninterface InboxData {\n items: InboxItem[];\n /** Channels that reported at least one message in the payload. */\n connected: InboxChannel[];\n}\n\ntype LoadState =\n | { kind: \"loading\" }\n | { kind: \"error\"; message: string }\n | { kind: \"ready\"; data: InboxData };\n\n/** Stable empty array so the pre-ready memo inputs keep a constant reference. */\nconst EMPTY_ITEMS: InboxItem[] = [];\n\nexport function InboxView(props: InboxViewProps = {}): ReactNode {\n const fetchers = props.fetchers ?? defaultFetchers;\n const [state, setState] = useState<LoadState>({ kind: \"loading\" });\n const [activeChannels, setActiveChannels] = useState<Set<InboxChannel>>(\n () => new Set<InboxChannel>(),\n );\n\n const fetchersRef = useRef(fetchers);\n fetchersRef.current = fetchers;\n\n // `background` skips the loading-state flash so the 20s poll refreshes the\n // already-rendered list in place; user-driven loads (mount, channel toggle,\n // retry) show the spinner.\n const load = useCallback((channels: InboxChannel[], background = false) => {\n let cancelled = false;\n if (!background) setState({ kind: \"loading\" });\n fetchersRef.current\n .fetchInbox(channels)\n .then((wire) => {\n if (cancelled) return;\n const items = wire.messages\n .map(mapMessage)\n .filter((item): item is InboxItem => item !== null);\n setState({\n kind: \"ready\",\n data: { items, connected: connectedChannels(wire.channelCounts) },\n });\n })\n .catch((error: unknown) => {\n if (cancelled) return;\n setState({\n kind: \"error\",\n message:\n error instanceof Error ? error.message : \"Could not load inbox.\",\n });\n });\n return () => {\n cancelled = true;\n };\n }, []);\n\n // Re-fetch with the server-side channel filter whenever the selection changes.\n // The active set is the single source of truth for both the query and the\n // client-side grouping, so the two can never disagree.\n const activeList = useMemo(\n () => INBOX_CHANNELS.filter((channel) => activeChannels.has(channel)),\n [activeChannels],\n );\n\n // Initial load + a quiet background poll keep the view fresh without a manual\n // refresh button (search and reload both live in the chat). The poll calls the\n // same load fn against the current channel selection; it's cleared on unmount\n // and re-armed whenever the selection changes.\n useEffect(() => {\n const cancelLoad = load(activeList);\n const timer = setInterval(() => load(activeList, true), INBOX_POLL_MS);\n return () => {\n cancelLoad();\n clearInterval(timer);\n };\n }, [load, activeList]);\n\n const items = state.kind === \"ready\" ? state.data.items : EMPTY_ITEMS;\n\n const onAction = useCallback(\n (action: string) => {\n if (action.startsWith(\"channel:\")) {\n const channel = action.slice(\"channel:\".length);\n if (!isKnownChannel(channel)) return;\n setActiveChannels((prev) => {\n const next = new Set(prev);\n if (next.has(channel)) next.delete(channel);\n else next.add(channel);\n return next;\n });\n return;\n }\n if (action.startsWith(\"open:\")) {\n const id = action.slice(\"open:\".length);\n requestOpen(items.find((item) => item.id === id));\n return;\n }\n switch (action) {\n case \"retry\":\n load(activeList);\n return;\n case \"connect\":\n requestConnect();\n return;\n }\n },\n [items, load, activeList],\n );\n\n const filters: InboxChannelFilter[] = useMemo(\n () =>\n INBOX_CHANNELS.map((channel) => ({\n channel,\n label: INBOX_CHANNEL_LABELS[channel],\n active: activeChannels.has(channel),\n })),\n [activeChannels],\n );\n\n const snapshot: InboxSnapshot = useMemo(() => {\n const status: InboxStatus =\n state.kind === \"loading\"\n ? \"loading\"\n : state.kind === \"error\"\n ? \"error\"\n : items.length === 0\n ? \"empty\"\n : \"ready\";\n return {\n status,\n items,\n filters,\n activeFilterCount: activeChannels.size,\n hasConnectedChannels:\n state.kind === \"ready\" && state.data.connected.length > 0,\n nudge: unreadNudge(items),\n error: state.kind === \"error\" ? state.message : null,\n };\n }, [state, items, filters, activeChannels]);\n\n return (\n <SpatialSurface>\n <InboxSpatialView snapshot={snapshot} onAction={onAction} />\n </SpatialSurface>\n );\n}\n\nexport default InboxView;\n"],"mappings":";;;;;AAgBA,IAAa,IAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAIa,IAAqD;CAChE,OAAO;CACP,MAAM;CACN,SAAS;CACT,UAAU;CACV,QAAQ;CACR,UAAU;CACV,UAAU;CACV,KAAK;AACP;ACuB8C,EAAe,KAAK,OAAa;CAC7E;CACA,OAAO,EAAqB;CAC5B,QAAQ;AACV,EAAE;AAoBF,SAAS,EAAe,GAAyC;CAC/D,IAAM,IAA8B,CAAC;CACrC,KAAK,IAAM,KAAW,GAAgB;EACpC,IAAM,IAAe,EAAM,QAAQ,MAAS,EAAK,YAAY,CAAO;EAChE,EAAa,WAAW,KAC5B,EAAO,KAAK;GACV;GACA,OAAO,EAAqB;GAC5B,OAAO;EACT,CAAC;CACH;CACA,OAAO;AACT;AAEA,SAAS,EAAW,GAAuB;CACzC,IAAM,IAAO,IAAI,KAAK,CAAK;CAE3B,OADI,OAAO,MAAM,EAAK,QAAQ,CAAC,IAAU,IAClC,EAAK,eAAe,KAAA,GAAW;EACpC,OAAO;EACP,KAA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AS,UAAU,EAAM,UAAU;EAClD,IACC;GAAC;GAAO;GAAO;GAAS;EAAc,CAIT;EAAoB;CAAW,CAAA,EAC7C,CAAA;AAEpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-inbox",
|
|
3
|
-
"version": "2.0.3-beta.
|
|
3
|
+
"version": "2.0.3-beta.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Unified cross-channel inbox triage with unresolved-item tracking, snooze, archive, and follow-up watcher. Drives the inbox-zero workflow across email/Discord/Telegram/WhatsApp/X/Slack and other non-SMS channels.",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -49,17 +49,17 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@elizaos/agent": "2.0.3-beta.
|
|
53
|
-
"@elizaos/app-core": "2.0.3-beta.
|
|
54
|
-
"@elizaos/core": "2.0.3-beta.
|
|
55
|
-
"@elizaos/plugin-google": "2.0.3-beta.
|
|
56
|
-
"@elizaos/shared": "2.0.3-beta.
|
|
57
|
-
"@elizaos/ui": "2.0.3-beta.
|
|
52
|
+
"@elizaos/agent": "2.0.3-beta.7",
|
|
53
|
+
"@elizaos/app-core": "2.0.3-beta.7",
|
|
54
|
+
"@elizaos/core": "2.0.3-beta.7",
|
|
55
|
+
"@elizaos/plugin-google": "2.0.3-beta.7",
|
|
56
|
+
"@elizaos/shared": "2.0.3-beta.7",
|
|
57
|
+
"@elizaos/ui": "2.0.3-beta.7",
|
|
58
58
|
"drizzle-orm": "^0.45.1",
|
|
59
59
|
"lucide-react": "^1.0.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@elizaos/plugin-sql": "2.0.3-beta.
|
|
62
|
+
"@elizaos/plugin-sql": "2.0.3-beta.7",
|
|
63
63
|
"react": "^19.0.0",
|
|
64
64
|
"react-dom": "^19.0.0"
|
|
65
65
|
},
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"assets",
|
|
90
90
|
"dist"
|
|
91
91
|
],
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "61094f10458d11055c75b3dd0bae374e3f66bac5"
|
|
93
93
|
}
|