@applica-software-guru/persona-sdk 0.1.44-preview8 → 0.1.44
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/bundle.cjs.js +3 -8
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.es.js +256 -468
- package/dist/bundle.es.js.map +1 -1
- package/dist/bundle.iife.js +3 -8
- package/dist/bundle.iife.js.map +1 -1
- package/dist/bundle.umd.js +3 -8
- package/dist/bundle.umd.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/protocol/rest.d.ts.map +1 -1
- package/dist/protocol/webrtc.d.ts.map +1 -1
- package/dist/protocol/websocket.d.ts.map +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -2
- package/src/protocol/rest.ts +0 -2
- package/src/protocol/webrtc.ts +0 -2
- package/src/protocol/websocket.ts +0 -2
- package/src/runtime.tsx +0 -3
- package/vite.config.ts +2 -1
package/dist/bundle.es.js
CHANGED
|
@@ -1,298 +1,86 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { useExternalStoreRuntime as
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
case S:
|
|
35
|
-
return "SuspenseList";
|
|
36
|
-
case P:
|
|
37
|
-
return "Activity";
|
|
38
|
-
}
|
|
39
|
-
if (typeof s == "object")
|
|
40
|
-
switch (typeof s.tag == "number" && console.error(
|
|
41
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
42
|
-
), s.$$typeof) {
|
|
43
|
-
case _:
|
|
44
|
-
return "Portal";
|
|
45
|
-
case W:
|
|
46
|
-
return (s.displayName || "Context") + ".Provider";
|
|
47
|
-
case D:
|
|
48
|
-
return (s._context.displayName || "Context") + ".Consumer";
|
|
49
|
-
case u:
|
|
50
|
-
var a = s.render;
|
|
51
|
-
return s = s.displayName, s || (s = a.displayName || a.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
|
|
52
|
-
case T:
|
|
53
|
-
return a = s.displayName || null, a !== null ? a : r(s.type) || "Memo";
|
|
54
|
-
case b:
|
|
55
|
-
a = s._payload, s = s._init;
|
|
56
|
-
try {
|
|
57
|
-
return r(s(a));
|
|
58
|
-
} catch {
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
function t(s) {
|
|
64
|
-
return "" + s;
|
|
65
|
-
}
|
|
66
|
-
function e(s) {
|
|
67
|
-
try {
|
|
68
|
-
t(s);
|
|
69
|
-
var a = !1;
|
|
70
|
-
} catch {
|
|
71
|
-
a = !0;
|
|
72
|
-
}
|
|
73
|
-
if (a) {
|
|
74
|
-
a = console;
|
|
75
|
-
var l = a.error, m = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
76
|
-
return l.call(
|
|
77
|
-
a,
|
|
78
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
79
|
-
m
|
|
80
|
-
), t(s);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
function n(s) {
|
|
84
|
-
if (s === R) return "<>";
|
|
85
|
-
if (typeof s == "object" && s !== null && s.$$typeof === b)
|
|
86
|
-
return "<...>";
|
|
87
|
-
try {
|
|
88
|
-
var a = r(s);
|
|
89
|
-
return a ? "<" + a + ">" : "<...>";
|
|
90
|
-
} catch {
|
|
91
|
-
return "<...>";
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
function o() {
|
|
95
|
-
var s = A.A;
|
|
96
|
-
return s === null ? null : s.getOwner();
|
|
97
|
-
}
|
|
98
|
-
function c() {
|
|
99
|
-
return Error("react-stack-top-frame");
|
|
100
|
-
}
|
|
101
|
-
function d(s) {
|
|
102
|
-
if (J.call(s, "key")) {
|
|
103
|
-
var a = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
104
|
-
if (a && a.isReactWarning) return !1;
|
|
105
|
-
}
|
|
106
|
-
return s.key !== void 0;
|
|
107
|
-
}
|
|
108
|
-
function g(s, a) {
|
|
109
|
-
function l() {
|
|
110
|
-
B || (B = !0, console.error(
|
|
111
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
112
|
-
a
|
|
113
|
-
));
|
|
114
|
-
}
|
|
115
|
-
l.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
116
|
-
get: l,
|
|
117
|
-
configurable: !0
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function h() {
|
|
121
|
-
var s = r(this.type);
|
|
122
|
-
return V[s] || (V[s] = !0, console.error(
|
|
123
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
124
|
-
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
125
|
-
}
|
|
126
|
-
function f(s, a, l, m, E, C, L, F) {
|
|
127
|
-
return l = C.ref, s = {
|
|
128
|
-
$$typeof: N,
|
|
129
|
-
type: s,
|
|
130
|
-
key: a,
|
|
131
|
-
props: C,
|
|
132
|
-
_owner: E
|
|
133
|
-
}, (l !== void 0 ? l : null) !== null ? Object.defineProperty(s, "ref", {
|
|
134
|
-
enumerable: !1,
|
|
135
|
-
get: h
|
|
136
|
-
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
137
|
-
configurable: !1,
|
|
138
|
-
enumerable: !1,
|
|
139
|
-
writable: !0,
|
|
140
|
-
value: 0
|
|
141
|
-
}), Object.defineProperty(s, "_debugInfo", {
|
|
142
|
-
configurable: !1,
|
|
143
|
-
enumerable: !1,
|
|
144
|
-
writable: !0,
|
|
145
|
-
value: null
|
|
146
|
-
}), Object.defineProperty(s, "_debugStack", {
|
|
147
|
-
configurable: !1,
|
|
148
|
-
enumerable: !1,
|
|
149
|
-
writable: !0,
|
|
150
|
-
value: L
|
|
151
|
-
}), Object.defineProperty(s, "_debugTask", {
|
|
152
|
-
configurable: !1,
|
|
153
|
-
enumerable: !1,
|
|
154
|
-
writable: !0,
|
|
155
|
-
value: F
|
|
156
|
-
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
157
|
-
}
|
|
158
|
-
function w(s, a, l, m, E, C, L, F) {
|
|
159
|
-
var p = a.children;
|
|
160
|
-
if (p !== void 0)
|
|
161
|
-
if (m)
|
|
162
|
-
if (ae(p)) {
|
|
163
|
-
for (m = 0; m < p.length; m++)
|
|
164
|
-
O(p[m]);
|
|
165
|
-
Object.freeze && Object.freeze(p);
|
|
166
|
-
} else
|
|
167
|
-
console.error(
|
|
168
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
169
|
-
);
|
|
170
|
-
else O(p);
|
|
171
|
-
if (J.call(a, "key")) {
|
|
172
|
-
p = r(s);
|
|
173
|
-
var v = Object.keys(a).filter(function(oe) {
|
|
174
|
-
return oe !== "key";
|
|
175
|
-
});
|
|
176
|
-
m = 0 < v.length ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}", H[p + m] || (v = 0 < v.length ? "{" + v.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
177
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
178
|
-
let props = %s;
|
|
179
|
-
<%s {...props} />
|
|
180
|
-
React keys must be passed directly to JSX without using spread:
|
|
181
|
-
let props = %s;
|
|
182
|
-
<%s key={someKey} {...props} />`,
|
|
183
|
-
m,
|
|
184
|
-
p,
|
|
185
|
-
v,
|
|
186
|
-
p
|
|
187
|
-
), H[p + m] = !0);
|
|
188
|
-
}
|
|
189
|
-
if (p = null, l !== void 0 && (e(l), p = "" + l), d(a) && (e(a.key), p = "" + a.key), "key" in a) {
|
|
190
|
-
l = {};
|
|
191
|
-
for (var U in a)
|
|
192
|
-
U !== "key" && (l[U] = a[U]);
|
|
193
|
-
} else l = a;
|
|
194
|
-
return p && g(
|
|
195
|
-
l,
|
|
196
|
-
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
197
|
-
), f(
|
|
198
|
-
s,
|
|
199
|
-
p,
|
|
200
|
-
C,
|
|
201
|
-
E,
|
|
202
|
-
o(),
|
|
203
|
-
l,
|
|
204
|
-
L,
|
|
205
|
-
F
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
function O(s) {
|
|
209
|
-
typeof s == "object" && s !== null && s.$$typeof === N && s._store && (s._store.validated = 1);
|
|
210
|
-
}
|
|
211
|
-
var k = le, N = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), D = Symbol.for("react.consumer"), W = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), b = Symbol.for("react.lazy"), P = Symbol.for("react.activity"), I = Symbol.for("react.client.reference"), A = k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, J = Object.prototype.hasOwnProperty, ae = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
212
|
-
return null;
|
|
1
|
+
var U = Object.defineProperty;
|
|
2
|
+
var J = (i, t, e) => t in i ? U(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
+
var o = (i, t, e) => J(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { createContext as q, useContext as N, useState as C, useRef as _, useMemo as B, useEffect as K, useCallback as v } from "react";
|
|
5
|
+
import { useExternalStoreRuntime as Y, AssistantRuntimeProvider as G } from "@assistant-ui/react";
|
|
6
|
+
var z = { exports: {} }, w = {};
|
|
7
|
+
/**
|
|
8
|
+
* @license React
|
|
9
|
+
* react-jsx-runtime.production.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
var M;
|
|
17
|
+
function V() {
|
|
18
|
+
if (M) return w;
|
|
19
|
+
M = 1;
|
|
20
|
+
var i = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
21
|
+
function e(s, n, a) {
|
|
22
|
+
var r = null;
|
|
23
|
+
if (a !== void 0 && (r = "" + a), n.key !== void 0 && (r = "" + n.key), "key" in n) {
|
|
24
|
+
a = {};
|
|
25
|
+
for (var l in n)
|
|
26
|
+
l !== "key" && (a[l] = n[l]);
|
|
27
|
+
} else a = n;
|
|
28
|
+
return n = a.ref, {
|
|
29
|
+
$$typeof: i,
|
|
30
|
+
type: s,
|
|
31
|
+
key: r,
|
|
32
|
+
ref: n !== void 0 ? n : null,
|
|
33
|
+
props: a
|
|
213
34
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
return s();
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
var B, V = {}, G = k["react-stack-bottom-frame"].bind(
|
|
220
|
-
k,
|
|
221
|
-
c
|
|
222
|
-
)(), X = z(n(c)), H = {};
|
|
223
|
-
x.Fragment = R, x.jsx = function(s, a, l, m, E) {
|
|
224
|
-
var C = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
225
|
-
return w(
|
|
226
|
-
s,
|
|
227
|
-
a,
|
|
228
|
-
l,
|
|
229
|
-
!1,
|
|
230
|
-
m,
|
|
231
|
-
E,
|
|
232
|
-
C ? Error("react-stack-top-frame") : G,
|
|
233
|
-
C ? z(n(s)) : X
|
|
234
|
-
);
|
|
235
|
-
}, x.jsxs = function(s, a, l, m, E) {
|
|
236
|
-
var C = 1e4 > A.recentlyCreatedOwnerStacks++;
|
|
237
|
-
return w(
|
|
238
|
-
s,
|
|
239
|
-
a,
|
|
240
|
-
l,
|
|
241
|
-
!0,
|
|
242
|
-
m,
|
|
243
|
-
E,
|
|
244
|
-
C ? Error("react-stack-top-frame") : G,
|
|
245
|
-
C ? z(n(s)) : X
|
|
246
|
-
);
|
|
247
|
-
};
|
|
248
|
-
}(), x;
|
|
35
|
+
}
|
|
36
|
+
return w.Fragment = t, w.jsx = e, w.jsxs = e, w;
|
|
249
37
|
}
|
|
250
|
-
|
|
251
|
-
var
|
|
252
|
-
function
|
|
253
|
-
return
|
|
38
|
+
z.exports = V();
|
|
39
|
+
var k = z.exports;
|
|
40
|
+
function H(i) {
|
|
41
|
+
return i.filter((t) => {
|
|
254
42
|
var e;
|
|
255
43
|
return t.finishReason === "stop" ? t.text !== null && ((e = t.text) == null ? void 0 : e.trim()) !== "" : !0;
|
|
256
44
|
});
|
|
257
45
|
}
|
|
258
|
-
function
|
|
46
|
+
function Q(i) {
|
|
259
47
|
const t = [];
|
|
260
48
|
let e = null;
|
|
261
|
-
for (const
|
|
262
|
-
|
|
49
|
+
for (const s of i)
|
|
50
|
+
s.type === "reasoning" ? (e != null && (t.push(e), e = null), t.push(s)) : s.functionCalls ? (e && t.push(e), t.push(s), e = null) : s.functionResponse ? t[t.length - 1] = {
|
|
263
51
|
...t[t.length - 1],
|
|
264
|
-
functionResponse:
|
|
265
|
-
} : e &&
|
|
266
|
-
...
|
|
52
|
+
functionResponse: s.functionResponse
|
|
53
|
+
} : e && s.protocol === e.protocol && (e.role === s.role || s.finishReason === "stop") ? e.text += s.text : (e && t.push(e), e = {
|
|
54
|
+
...s
|
|
267
55
|
});
|
|
268
|
-
return e && t.push(e),
|
|
56
|
+
return e && t.push(e), H(t);
|
|
269
57
|
}
|
|
270
|
-
function
|
|
58
|
+
function X(i) {
|
|
271
59
|
var t;
|
|
272
|
-
return
|
|
273
|
-
id:
|
|
60
|
+
return i.role === "function" ? {
|
|
61
|
+
id: i.id,
|
|
274
62
|
role: "assistant",
|
|
275
|
-
status: (
|
|
276
|
-
content: ((t =
|
|
277
|
-
var
|
|
63
|
+
status: (i == null ? void 0 : i.functionResponse) === null ? { type: "running" } : { type: "complete", reason: "stop" },
|
|
64
|
+
content: ((t = i.functionCalls) == null ? void 0 : t.map((e) => {
|
|
65
|
+
var s;
|
|
278
66
|
return {
|
|
279
67
|
type: "tool-call",
|
|
280
68
|
toolName: e.name,
|
|
281
69
|
toolCallId: e.id,
|
|
282
70
|
args: e.args,
|
|
283
|
-
result: (
|
|
71
|
+
result: (s = i.functionResponse) == null ? void 0 : s.result
|
|
284
72
|
};
|
|
285
73
|
})) ?? []
|
|
286
74
|
} : {
|
|
287
|
-
id:
|
|
288
|
-
role:
|
|
289
|
-
content:
|
|
75
|
+
id: i.id,
|
|
76
|
+
role: i.role,
|
|
77
|
+
content: i.type === "reasoning" ? [{ type: "reasoning", text: i.text }] : [{ type: "text", text: i.text }]
|
|
290
78
|
};
|
|
291
79
|
}
|
|
292
|
-
class
|
|
80
|
+
class x {
|
|
293
81
|
constructor() {
|
|
294
|
-
|
|
295
|
-
|
|
82
|
+
o(this, "statusChangeCallbacks", []);
|
|
83
|
+
o(this, "messageCallbacks", []);
|
|
296
84
|
}
|
|
297
85
|
addStatusChangeListener(t) {
|
|
298
86
|
this.statusChangeCallbacks.push(t);
|
|
@@ -308,7 +96,7 @@ class K {
|
|
|
308
96
|
}
|
|
309
97
|
async notifyMessages(t) {
|
|
310
98
|
t.forEach((e) => {
|
|
311
|
-
this.messageCallbacks.forEach((
|
|
99
|
+
this.messageCallbacks.forEach((s) => s(e));
|
|
312
100
|
});
|
|
313
101
|
}
|
|
314
102
|
async setSession(t) {
|
|
@@ -316,20 +104,20 @@ class K {
|
|
|
316
104
|
}
|
|
317
105
|
async setStatus(t) {
|
|
318
106
|
const e = this.status !== t;
|
|
319
|
-
this.status = t, e && this.statusChangeCallbacks.forEach((
|
|
107
|
+
this.status = t, e && this.statusChangeCallbacks.forEach((s) => s(t));
|
|
320
108
|
}
|
|
321
109
|
clearListeners() {
|
|
322
110
|
this.statusChangeCallbacks = [], this.messageCallbacks = [];
|
|
323
111
|
}
|
|
324
112
|
}
|
|
325
|
-
class
|
|
113
|
+
class T extends x {
|
|
326
114
|
constructor(e) {
|
|
327
115
|
super();
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
116
|
+
o(this, "status");
|
|
117
|
+
o(this, "autostart");
|
|
118
|
+
o(this, "session");
|
|
119
|
+
o(this, "config");
|
|
120
|
+
o(this, "notify", !0);
|
|
333
121
|
this.config = e, this.status = "disconnected", this.autostart = !0;
|
|
334
122
|
}
|
|
335
123
|
getName() {
|
|
@@ -348,26 +136,26 @@ class ee extends K {
|
|
|
348
136
|
this.session = e;
|
|
349
137
|
}
|
|
350
138
|
async send(e) {
|
|
351
|
-
const { apiUrl:
|
|
352
|
-
body: JSON.stringify({ userMessage:
|
|
139
|
+
const { apiUrl: s, apiKey: n, agentId: a } = this.config, r = this.session ?? "new", l = e, h = await (await fetch(`${s}/agents/${a}/sessions/${r}/messages`, {
|
|
140
|
+
body: JSON.stringify({ userMessage: l }),
|
|
353
141
|
method: "POST",
|
|
354
142
|
headers: {
|
|
355
143
|
"Content-Type": "application/json",
|
|
356
|
-
"x-fox-apikey":
|
|
357
|
-
"x-persona-apikey":
|
|
144
|
+
"x-fox-apikey": n,
|
|
145
|
+
"x-persona-apikey": n
|
|
358
146
|
}
|
|
359
147
|
})).json();
|
|
360
|
-
this.notifyMessages(
|
|
148
|
+
this.notifyMessages(h.response.messages);
|
|
361
149
|
}
|
|
362
150
|
}
|
|
363
|
-
class
|
|
151
|
+
class I extends x {
|
|
364
152
|
constructor(e) {
|
|
365
153
|
super();
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
154
|
+
o(this, "status");
|
|
155
|
+
o(this, "autostart");
|
|
156
|
+
o(this, "session");
|
|
157
|
+
o(this, "config");
|
|
158
|
+
o(this, "webSocket");
|
|
371
159
|
this.config = e, this.status = "disconnected", this.autostart = !0, this.session = null, this.webSocket = null;
|
|
372
160
|
}
|
|
373
161
|
getName() {
|
|
@@ -377,31 +165,31 @@ class te extends K {
|
|
|
377
165
|
return 1;
|
|
378
166
|
}
|
|
379
167
|
async syncSession(e) {
|
|
380
|
-
var
|
|
381
|
-
(
|
|
168
|
+
var s;
|
|
169
|
+
(s = this.config.logger) == null || s.debug("Syncing session with WebSocket protocol:", e), this.session = e, this.webSocket && this.status === "connected" && (this.disconnect(), this.connect(e));
|
|
382
170
|
}
|
|
383
171
|
connect(e) {
|
|
384
|
-
var
|
|
172
|
+
var l;
|
|
385
173
|
if (this.webSocket !== null && this.status === "connected")
|
|
386
174
|
return Promise.resolve(this.session);
|
|
387
|
-
const
|
|
388
|
-
(
|
|
389
|
-
const
|
|
390
|
-
return this.setStatus("connecting"), this.webSocket = new WebSocket(
|
|
175
|
+
const s = e || this.session || "new";
|
|
176
|
+
(l = this.config.logger) == null || l.debug("Connecting to WebSocket with sessionId:", s);
|
|
177
|
+
const n = encodeURIComponent(this.config.apiKey), a = this.config.agentId, r = `${this.config.webSocketUrl}?sessionCode=${s}&agentId=${a}&apiKey=${n}`;
|
|
178
|
+
return this.setStatus("connecting"), this.webSocket = new WebSocket(r), this.webSocket.addEventListener("open", () => {
|
|
391
179
|
this.setStatus("connected");
|
|
392
|
-
}), this.webSocket.addEventListener("message", (
|
|
393
|
-
const
|
|
394
|
-
if (
|
|
180
|
+
}), this.webSocket.addEventListener("message", (u) => {
|
|
181
|
+
const h = JSON.parse(u.data);
|
|
182
|
+
if (h.type !== "message")
|
|
395
183
|
return;
|
|
396
|
-
const
|
|
397
|
-
this.notifyMessage(
|
|
184
|
+
const f = h.payload;
|
|
185
|
+
this.notifyMessage(f != null && f.thought ? { role: "assistant", type: "reasoning", text: f.thought } : f);
|
|
398
186
|
}), this.webSocket.addEventListener("close", () => {
|
|
187
|
+
var u;
|
|
188
|
+
this.setStatus("disconnected"), this.webSocket = null, (u = this.config.logger) == null || u.warn("WebSocket connection closed");
|
|
189
|
+
}), this.webSocket.addEventListener("error", (u) => {
|
|
399
190
|
var h;
|
|
400
|
-
this.setStatus("disconnected"), this.webSocket = null, (h = this.config.logger) == null || h.
|
|
401
|
-
}),
|
|
402
|
-
var f;
|
|
403
|
-
this.setStatus("disconnected"), this.webSocket = null, (f = this.config.logger) == null || f.error("WebSocket error", h);
|
|
404
|
-
}), Promise.resolve(n);
|
|
191
|
+
this.setStatus("disconnected"), this.webSocket = null, (h = this.config.logger) == null || h.error("WebSocket error", u);
|
|
192
|
+
}), Promise.resolve(s);
|
|
405
193
|
}
|
|
406
194
|
disconnect() {
|
|
407
195
|
var e;
|
|
@@ -411,21 +199,21 @@ class te extends K {
|
|
|
411
199
|
return this.webSocket && this.status === "connected" ? (this.webSocket.send(JSON.stringify({ type: "request", payload: e })), Promise.resolve()) : Promise.reject(new Error("WebSocket is not connected"));
|
|
412
200
|
}
|
|
413
201
|
}
|
|
414
|
-
class
|
|
202
|
+
class Z {
|
|
415
203
|
constructor(t) {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
204
|
+
o(this, "config");
|
|
205
|
+
o(this, "pc", null);
|
|
206
|
+
o(this, "ws", null);
|
|
207
|
+
o(this, "localStream", null);
|
|
208
|
+
o(this, "remoteStream", new MediaStream());
|
|
209
|
+
o(this, "audioCtx", null);
|
|
210
|
+
o(this, "localAnalyser", null);
|
|
211
|
+
o(this, "remoteAnalyser", null);
|
|
212
|
+
o(this, "analyzerFrame", null);
|
|
213
|
+
o(this, "dataChannel", null);
|
|
214
|
+
o(this, "isConnected", !1);
|
|
215
|
+
o(this, "visualizerCallbacks", []);
|
|
216
|
+
o(this, "messageCallbacks", []);
|
|
429
217
|
this.config = t;
|
|
430
218
|
}
|
|
431
219
|
async connect(t) {
|
|
@@ -434,8 +222,8 @@ class Se {
|
|
|
434
222
|
this.isConnected = !0;
|
|
435
223
|
try {
|
|
436
224
|
this.localStream = await navigator.mediaDevices.getUserMedia({ audio: !0 });
|
|
437
|
-
} catch (
|
|
438
|
-
(e = this.config.logger) == null || e.error("Error accessing microphone:",
|
|
225
|
+
} catch (s) {
|
|
226
|
+
(e = this.config.logger) == null || e.error("Error accessing microphone:", s);
|
|
439
227
|
return;
|
|
440
228
|
}
|
|
441
229
|
this.pc = new RTCPeerConnection({
|
|
@@ -449,65 +237,65 @@ class Se {
|
|
|
449
237
|
credential: "webrtc"
|
|
450
238
|
}
|
|
451
239
|
]
|
|
452
|
-
}), this.localStream.getTracks().forEach((
|
|
453
|
-
this.pc.addTrack(
|
|
454
|
-
}), this.pc.ontrack = (
|
|
455
|
-
|
|
456
|
-
this.remoteStream.addTrack(
|
|
240
|
+
}), this.localStream.getTracks().forEach((s) => {
|
|
241
|
+
this.pc.addTrack(s, this.localStream);
|
|
242
|
+
}), this.pc.ontrack = (s) => {
|
|
243
|
+
s.streams[0].getTracks().forEach((a) => {
|
|
244
|
+
this.remoteStream.addTrack(a);
|
|
457
245
|
}), this.audioCtx || this._startAnalyzers();
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
var
|
|
461
|
-
(
|
|
246
|
+
const n = new Audio();
|
|
247
|
+
n.srcObject = this.remoteStream, n.play().catch((a) => {
|
|
248
|
+
var r;
|
|
249
|
+
(r = this.config.logger) == null || r.error("Error playing remote audio:", a);
|
|
462
250
|
});
|
|
463
|
-
}, this.pc.onicecandidate = (
|
|
464
|
-
var
|
|
465
|
-
|
|
251
|
+
}, this.pc.onicecandidate = (s) => {
|
|
252
|
+
var n;
|
|
253
|
+
s.candidate && ((n = this.ws) == null ? void 0 : n.readyState) === WebSocket.OPEN && this.ws.send(
|
|
466
254
|
JSON.stringify({
|
|
467
255
|
type: "CANDIDATE",
|
|
468
256
|
src: "client",
|
|
469
|
-
payload: { candidate:
|
|
257
|
+
payload: { candidate: s.candidate }
|
|
470
258
|
})
|
|
471
259
|
);
|
|
472
|
-
}, this.pc.ondatachannel = (
|
|
473
|
-
const
|
|
474
|
-
|
|
475
|
-
this.messageCallbacks.forEach((
|
|
476
|
-
|
|
260
|
+
}, this.pc.ondatachannel = (s) => {
|
|
261
|
+
const n = s.channel;
|
|
262
|
+
n.onmessage = (a) => {
|
|
263
|
+
this.messageCallbacks.forEach((r) => {
|
|
264
|
+
r(a);
|
|
477
265
|
});
|
|
478
266
|
};
|
|
479
267
|
}, this.ws = new WebSocket(this.config.webrtcUrl || "wss://persona.applica.guru/api/webrtc"), this.ws.onopen = async () => {
|
|
480
|
-
var
|
|
481
|
-
const
|
|
482
|
-
await this.pc.setLocalDescription(
|
|
483
|
-
const
|
|
268
|
+
var r, l;
|
|
269
|
+
const s = await this.pc.createOffer();
|
|
270
|
+
await this.pc.setLocalDescription(s);
|
|
271
|
+
const n = {
|
|
484
272
|
agentId: this.config.agentId,
|
|
485
273
|
sessionCode: t
|
|
486
274
|
};
|
|
487
|
-
(
|
|
488
|
-
const
|
|
275
|
+
(r = this.config.logger) == null || r.debug("Opening connection to WebRTC server: ", n);
|
|
276
|
+
const a = {
|
|
489
277
|
type: "OFFER",
|
|
490
|
-
src: ((
|
|
278
|
+
src: ((l = crypto.randomUUID) == null ? void 0 : l.call(crypto)) || "client_" + Date.now(),
|
|
491
279
|
payload: {
|
|
492
280
|
sdp: {
|
|
493
|
-
sdp:
|
|
494
|
-
type:
|
|
281
|
+
sdp: s.sdp,
|
|
282
|
+
type: s.type
|
|
495
283
|
},
|
|
496
284
|
connectionId: (Date.now() % 1e6).toString(),
|
|
497
|
-
metadata:
|
|
285
|
+
metadata: n
|
|
498
286
|
}
|
|
499
287
|
};
|
|
500
|
-
this.ws.send(JSON.stringify(
|
|
501
|
-
}, this.ws.onmessage = async (
|
|
502
|
-
var
|
|
503
|
-
const
|
|
504
|
-
if (
|
|
505
|
-
await this.pc.setRemoteDescription(new RTCSessionDescription(
|
|
506
|
-
else if (
|
|
288
|
+
this.ws.send(JSON.stringify(a));
|
|
289
|
+
}, this.ws.onmessage = async (s) => {
|
|
290
|
+
var a;
|
|
291
|
+
const n = JSON.parse(s.data);
|
|
292
|
+
if (n.type === "ANSWER")
|
|
293
|
+
await this.pc.setRemoteDescription(new RTCSessionDescription(n.payload.sdp));
|
|
294
|
+
else if (n.type === "CANDIDATE")
|
|
507
295
|
try {
|
|
508
|
-
await this.pc.addIceCandidate(new RTCIceCandidate(
|
|
509
|
-
} catch (
|
|
510
|
-
(
|
|
296
|
+
await this.pc.addIceCandidate(new RTCIceCandidate(n.payload.candidate));
|
|
297
|
+
} catch (r) {
|
|
298
|
+
(a = this.config.logger) == null || a.error("Error adding ICE candidate:", r);
|
|
511
299
|
}
|
|
512
300
|
}, this.ws.onclose = () => {
|
|
513
301
|
this._stopAnalyzers();
|
|
@@ -529,18 +317,18 @@ class Se {
|
|
|
529
317
|
var e;
|
|
530
318
|
return (e = this.config.logger) == null ? void 0 : e.info("Data channel opened");
|
|
531
319
|
}, this.dataChannel.onmessage = (e) => {
|
|
532
|
-
this.messageCallbacks.forEach((
|
|
533
|
-
|
|
320
|
+
this.messageCallbacks.forEach((s) => {
|
|
321
|
+
s(e);
|
|
534
322
|
});
|
|
535
323
|
});
|
|
536
324
|
}
|
|
537
325
|
sendMessage(t) {
|
|
538
|
-
var e,
|
|
326
|
+
var e, s;
|
|
539
327
|
if (!this.dataChannel) {
|
|
540
328
|
(e = this.config.logger) == null || e.warn("Data channel is not open, cannot send message");
|
|
541
329
|
return;
|
|
542
330
|
}
|
|
543
|
-
this.dataChannel.send(t), (
|
|
331
|
+
this.dataChannel.send(t), (s = this.config.logger) == null || s.info("Sent message:", t);
|
|
544
332
|
}
|
|
545
333
|
_startAnalyzers() {
|
|
546
334
|
if (!this.localStream || !this.remoteStream || this.visualizerCallbacks.length === 0)
|
|
@@ -548,38 +336,38 @@ class Se {
|
|
|
548
336
|
this.audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
|
549
337
|
const t = this.audioCtx.createMediaStreamSource(this.localStream), e = this.audioCtx.createMediaStreamSource(this.remoteStream);
|
|
550
338
|
this.localAnalyser = this.audioCtx.createAnalyser(), this.remoteAnalyser = this.audioCtx.createAnalyser(), this.localAnalyser.fftSize = 256, this.remoteAnalyser.fftSize = 256, t.connect(this.localAnalyser), e.connect(this.remoteAnalyser);
|
|
551
|
-
const
|
|
339
|
+
const s = () => {
|
|
552
340
|
if (!this.localAnalyser || !this.remoteAnalyser || this.visualizerCallbacks.length === 0)
|
|
553
341
|
return;
|
|
554
|
-
const
|
|
555
|
-
this.localAnalyser.getByteFrequencyData(
|
|
556
|
-
const
|
|
557
|
-
this.visualizerCallbacks.length > 0 && this.visualizerCallbacks.forEach((
|
|
558
|
-
|
|
559
|
-
localAmplitude:
|
|
560
|
-
remoteAmplitude:
|
|
342
|
+
const n = new Uint8Array(this.localAnalyser.frequencyBinCount), a = new Uint8Array(this.remoteAnalyser.frequencyBinCount);
|
|
343
|
+
this.localAnalyser.getByteFrequencyData(n), this.remoteAnalyser.getByteFrequencyData(a);
|
|
344
|
+
const r = n.reduce((u, h) => u + h, 0) / n.length, l = a.reduce((u, h) => u + h, 0) / a.length;
|
|
345
|
+
this.visualizerCallbacks.length > 0 && this.visualizerCallbacks.forEach((u) => {
|
|
346
|
+
u({
|
|
347
|
+
localAmplitude: r,
|
|
348
|
+
remoteAmplitude: l
|
|
561
349
|
});
|
|
562
|
-
}), this.analyzerFrame = requestAnimationFrame(
|
|
350
|
+
}), this.analyzerFrame = requestAnimationFrame(s);
|
|
563
351
|
};
|
|
564
|
-
this.analyzerFrame = requestAnimationFrame(
|
|
352
|
+
this.analyzerFrame = requestAnimationFrame(s);
|
|
565
353
|
}
|
|
566
354
|
_stopAnalyzers() {
|
|
567
355
|
this.analyzerFrame && (cancelAnimationFrame(this.analyzerFrame), this.analyzerFrame = null), this.localAnalyser = null, this.remoteAnalyser = null;
|
|
568
356
|
}
|
|
569
357
|
}
|
|
570
|
-
class
|
|
358
|
+
class $ extends x {
|
|
571
359
|
constructor(e) {
|
|
572
360
|
super();
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
this.config = e, this.status = "disconnected", this.session = null, this.autostart = (e == null ? void 0 : e.autostart) ?? !1, this.webRTCClient = new
|
|
579
|
-
var
|
|
580
|
-
(
|
|
581
|
-
const
|
|
582
|
-
|
|
361
|
+
o(this, "status");
|
|
362
|
+
o(this, "session");
|
|
363
|
+
o(this, "autostart");
|
|
364
|
+
o(this, "config");
|
|
365
|
+
o(this, "webRTCClient");
|
|
366
|
+
this.config = e, this.status = "disconnected", this.session = null, this.autostart = (e == null ? void 0 : e.autostart) ?? !1, this.webRTCClient = new Z(e), this.webRTCClient.addMessageCallback((s) => {
|
|
367
|
+
var a;
|
|
368
|
+
(a = e.logger) == null || a.debug("Received data message:", s.data);
|
|
369
|
+
const n = JSON.parse(s.data);
|
|
370
|
+
n.type === "message" && this.notifyMessage(n.payload);
|
|
583
371
|
});
|
|
584
372
|
}
|
|
585
373
|
getName() {
|
|
@@ -592,112 +380,112 @@ class se extends K {
|
|
|
592
380
|
super.syncSession(e), this.status === "connected" && (await this.disconnect(), await this.connect(e));
|
|
593
381
|
}
|
|
594
382
|
async connect(e) {
|
|
595
|
-
var
|
|
596
|
-
return this.status === "connected" ? Promise.resolve(this.session) : (this.session = e || this.session || "new", this.setStatus("connecting"), (
|
|
383
|
+
var s;
|
|
384
|
+
return this.status === "connected" ? Promise.resolve(this.session) : (this.session = e || this.session || "new", this.setStatus("connecting"), (s = this.config.logger) == null || s.debug("Connecting to WebRTC with sessionId:", this.session), await this.webRTCClient.connect(this.session), this.setStatus("connected"), await this.webRTCClient.createDataChannel(), this.session);
|
|
597
385
|
}
|
|
598
386
|
async disconnect() {
|
|
599
|
-
var e,
|
|
387
|
+
var e, s, n;
|
|
600
388
|
if (this.status === "disconnected")
|
|
601
389
|
return (e = this.config.logger) == null || e.warn("Already disconnected"), Promise.resolve();
|
|
602
|
-
await this.webRTCClient.disconnect(), this.setStatus("disconnected"), (
|
|
390
|
+
await this.webRTCClient.disconnect(), this.setStatus("disconnected"), (n = (s = this.config) == null ? void 0 : s.logger) == null || n.debug("Disconnected from WebRTC");
|
|
603
391
|
}
|
|
604
392
|
send(e) {
|
|
605
393
|
return this.status !== "connected" ? Promise.reject(new Error("Not connected")) : (this.webRTCClient.sendMessage(e), Promise.resolve());
|
|
606
394
|
}
|
|
607
395
|
}
|
|
608
|
-
const
|
|
609
|
-
function
|
|
610
|
-
dev:
|
|
396
|
+
const P = q(void 0);
|
|
397
|
+
function ee({
|
|
398
|
+
dev: i = !1,
|
|
611
399
|
protocols: t,
|
|
612
400
|
logger: e,
|
|
613
|
-
children:
|
|
614
|
-
session:
|
|
615
|
-
...
|
|
401
|
+
children: s,
|
|
402
|
+
session: n = "new",
|
|
403
|
+
...a
|
|
616
404
|
}) {
|
|
617
|
-
const [
|
|
405
|
+
const [r, l] = C(!1), [u, h] = C([]), [f, D] = C(n), [m, W] = C(/* @__PURE__ */ new Map()), R = _(!1), y = B(() => {
|
|
618
406
|
if (Array.isArray(t))
|
|
619
407
|
return t;
|
|
620
408
|
if (typeof t == "object" && t !== null) {
|
|
621
|
-
const
|
|
622
|
-
return Object.keys(t).map((
|
|
623
|
-
switch (
|
|
409
|
+
const c = i ? "localhost:8000" : "persona.applica.guru/api", p = i ? "http" : "https", g = i ? "ws" : "wss";
|
|
410
|
+
return Object.keys(t).map((d) => {
|
|
411
|
+
switch (d) {
|
|
624
412
|
case "rest":
|
|
625
|
-
const
|
|
626
|
-
return
|
|
627
|
-
apiUrl: `${
|
|
628
|
-
apiKey:
|
|
629
|
-
agentId:
|
|
413
|
+
const b = t[d];
|
|
414
|
+
return b === !0 ? new T({
|
|
415
|
+
apiUrl: `${p}://${c}`,
|
|
416
|
+
apiKey: a.apiKey,
|
|
417
|
+
agentId: a.agentId,
|
|
630
418
|
logger: e
|
|
631
|
-
}) : new
|
|
419
|
+
}) : new T(b);
|
|
632
420
|
case "webrtc":
|
|
633
|
-
const
|
|
634
|
-
return
|
|
635
|
-
webrtcUrl: `${
|
|
636
|
-
apiKey:
|
|
637
|
-
agentId:
|
|
421
|
+
const A = t[d];
|
|
422
|
+
return A === !0 ? new $({
|
|
423
|
+
webrtcUrl: `${g}://${c}/webrtc`,
|
|
424
|
+
apiKey: a.apiKey,
|
|
425
|
+
agentId: a.agentId,
|
|
638
426
|
logger: e
|
|
639
|
-
}) : new
|
|
427
|
+
}) : new $(A);
|
|
640
428
|
case "websocket":
|
|
641
|
-
const
|
|
642
|
-
return
|
|
643
|
-
webSocketUrl: `${
|
|
644
|
-
apiKey:
|
|
645
|
-
agentId:
|
|
429
|
+
const E = t[d];
|
|
430
|
+
return E === !0 ? new I({
|
|
431
|
+
webSocketUrl: `${g}://${c}/websocket`,
|
|
432
|
+
apiKey: a.apiKey,
|
|
433
|
+
agentId: a.agentId,
|
|
646
434
|
logger: e
|
|
647
|
-
}) : new
|
|
435
|
+
}) : new I(E);
|
|
648
436
|
default:
|
|
649
|
-
throw new Error(`Unknown protocol: ${
|
|
437
|
+
throw new Error(`Unknown protocol: ${d}`);
|
|
650
438
|
}
|
|
651
439
|
});
|
|
652
440
|
}
|
|
653
441
|
throw new Error("Invalid protocols configuration");
|
|
654
442
|
}, []);
|
|
655
|
-
|
|
656
|
-
|
|
443
|
+
K(() => {
|
|
444
|
+
R.current || (R.current = !0, e == null || e.debug(
|
|
657
445
|
"Initializing protocols: ",
|
|
658
|
-
|
|
659
|
-
),
|
|
660
|
-
|
|
661
|
-
e == null || e.debug(`${
|
|
662
|
-
}),
|
|
663
|
-
|
|
664
|
-
}),
|
|
446
|
+
y.map((c) => c.getName())
|
|
447
|
+
), y.forEach((c) => {
|
|
448
|
+
c.setSession(f), c.clearListeners(), c.addStatusChangeListener((p) => {
|
|
449
|
+
e == null || e.debug(`${c.getName()} has notified new status: ${p}`), m.set(c.getName(), p), W(new Map(m));
|
|
450
|
+
}), c.addMessageListener((p) => {
|
|
451
|
+
h((g) => Q([...g, { ...p, protocol: c.getName() }]));
|
|
452
|
+
}), c.autostart && c.status === "disconnected" && (e == null || e.debug(`Connecting to protocol: ${c.getName()}`), c.connect(f));
|
|
665
453
|
}));
|
|
666
|
-
}, [
|
|
667
|
-
const
|
|
668
|
-
var
|
|
669
|
-
if (((
|
|
670
|
-
const
|
|
671
|
-
|
|
672
|
-
const
|
|
673
|
-
await (
|
|
674
|
-
},
|
|
675
|
-
isRunning:
|
|
676
|
-
messages:
|
|
677
|
-
convertMessage:
|
|
678
|
-
onNew:
|
|
679
|
-
onCancel:
|
|
680
|
-
onReload:
|
|
454
|
+
}, [f, y, e, m]);
|
|
455
|
+
const L = async (c) => {
|
|
456
|
+
var S;
|
|
457
|
+
if (((S = c.content[0]) == null ? void 0 : S.type) !== "text") throw new Error("Only text messages are supported");
|
|
458
|
+
const p = c.content[0].text;
|
|
459
|
+
h((d) => [...d, { role: "user", type: "text", text: p }]), l(!0);
|
|
460
|
+
const g = y.sort((d, b) => b.getPriority() - d.getPriority()).find((d) => d.status === "connected");
|
|
461
|
+
await (g == null ? void 0 : g.send(p)), l(!1);
|
|
462
|
+
}, O = v(() => (l(!1), h([]), D("new"), Promise.resolve()), []), j = v(() => Promise.resolve(), []), F = Y({
|
|
463
|
+
isRunning: r,
|
|
464
|
+
messages: u,
|
|
465
|
+
convertMessage: X,
|
|
466
|
+
onNew: L,
|
|
467
|
+
onCancel: O,
|
|
468
|
+
onReload: j
|
|
681
469
|
});
|
|
682
|
-
return /* @__PURE__ */
|
|
470
|
+
return /* @__PURE__ */ k.jsx(P.Provider, { value: { protocols: y, protocolsStatus: m }, children: /* @__PURE__ */ k.jsx(G, { runtime: F, children: s }) });
|
|
683
471
|
}
|
|
684
|
-
function
|
|
685
|
-
return /* @__PURE__ */
|
|
472
|
+
function ae({ children: i, ...t }) {
|
|
473
|
+
return /* @__PURE__ */ k.jsx(ee, { ...t, children: i });
|
|
686
474
|
}
|
|
687
|
-
function
|
|
688
|
-
const
|
|
689
|
-
if (!
|
|
475
|
+
function oe() {
|
|
476
|
+
const i = N(P);
|
|
477
|
+
if (!i)
|
|
690
478
|
throw new Error("usePersonaRuntime must be used within a PersonaRuntimeProvider");
|
|
691
|
-
return
|
|
479
|
+
return i;
|
|
692
480
|
}
|
|
693
|
-
function
|
|
694
|
-
const t =
|
|
481
|
+
function te(i) {
|
|
482
|
+
const t = N(P);
|
|
695
483
|
if (!t)
|
|
696
484
|
throw new Error("usePersonaRuntimeProtocol must be used within a PersonaRuntimeProvider");
|
|
697
|
-
const e = t.protocols.find((
|
|
485
|
+
const e = t.protocols.find((n) => n.getName() === i);
|
|
698
486
|
if (!e)
|
|
699
487
|
return null;
|
|
700
|
-
const
|
|
488
|
+
const s = t.protocolsStatus.get(e.getName());
|
|
701
489
|
return {
|
|
702
490
|
...e,
|
|
703
491
|
connect: e.connect.bind(e),
|
|
@@ -708,15 +496,15 @@ function ke(r) {
|
|
|
708
496
|
addMessageListener: e.addMessageListener.bind(e),
|
|
709
497
|
getName: e.getName.bind(e),
|
|
710
498
|
getPriority: e.getPriority.bind(e),
|
|
711
|
-
status:
|
|
499
|
+
status: s || e.status
|
|
712
500
|
};
|
|
713
501
|
}
|
|
714
|
-
function
|
|
715
|
-
return
|
|
502
|
+
function re() {
|
|
503
|
+
return te("webrtc");
|
|
716
504
|
}
|
|
717
|
-
class
|
|
505
|
+
class ce {
|
|
718
506
|
constructor() {
|
|
719
|
-
|
|
507
|
+
o(this, "prefix", "[Persona]");
|
|
720
508
|
}
|
|
721
509
|
log(t, ...e) {
|
|
722
510
|
console.log(`${this.prefix} - ${t}`, ...e);
|
|
@@ -735,14 +523,14 @@ class xe {
|
|
|
735
523
|
}
|
|
736
524
|
}
|
|
737
525
|
export {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
526
|
+
ce as PersonaConsoleLogger,
|
|
527
|
+
x as PersonaProtocolBase,
|
|
528
|
+
T as PersonaRESTProtocol,
|
|
529
|
+
ae as PersonaRuntimeProvider,
|
|
530
|
+
$ as PersonaWebRTCProtocol,
|
|
531
|
+
I as PersonaWebSocketProtocol,
|
|
532
|
+
oe as usePersonaRuntime,
|
|
533
|
+
te as usePersonaRuntimeProtocol,
|
|
534
|
+
re as usePersonaRuntimeWebRTCProtocol
|
|
747
535
|
};
|
|
748
536
|
//# sourceMappingURL=bundle.es.js.map
|