@smartmemory/sdk-js 1.4.59 → 1.4.61
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/README.md +3 -0
- package/dist/{core-BEScfRuq.js → core-GpqOJ8RQ.js} +606 -334
- package/dist/core.js +10 -9
- package/dist/index.js +31 -29
- package/dist/react.js +7 -7
- package/package.json +1 -1
package/dist/core.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { A as e, a as r, d as A, e as I, B as P, D as
|
|
1
|
+
import { A as e, a as r, d as A, e as I, B as P, D as o, f as n, I as t, M as g, O as i, j as m, q as M, r as h, l as f, m as l, T as S, o as p, U as u } from "./core-GpqOJ8RQ.js";
|
|
2
2
|
export {
|
|
3
3
|
e as APIError,
|
|
4
4
|
r as AgentAPI,
|
|
5
5
|
A as AuthAPI,
|
|
6
6
|
I as AuthCore,
|
|
7
7
|
P as BaseAPI,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
o as DecisionAPI,
|
|
9
|
+
n as GraphAPI,
|
|
10
10
|
t as InsightsAPI,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
g as MemoryAPI,
|
|
12
|
+
i as OntologyAPI,
|
|
13
|
+
m as ProfileAPI,
|
|
13
14
|
M as RefreshManager,
|
|
14
15
|
h as SSOManager,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
f as SmartMemoryClient,
|
|
17
|
+
l as SubscriptionAPI,
|
|
18
|
+
S as TeamAPI,
|
|
18
19
|
p as TokenManager,
|
|
19
|
-
|
|
20
|
+
u as UsageAPI
|
|
20
21
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as f, a as u, b as A, c as
|
|
1
|
+
import { A as f, a as u, b as A, c as P, d as b, e as h, D as I, E as g, G as x, f as p, I as w, L as m, M as k, O as v, g as T, P as B, h as y, i as C, j as S, R as E, k as R, S as F, l as L, m as M, T as O, n as G, o as U, p as $, U as D, V, Z } from "./core-GpqOJ8RQ.js";
|
|
2
2
|
const i = {
|
|
3
3
|
variables: {
|
|
4
4
|
colorBackground: "transparent",
|
|
@@ -39,27 +39,27 @@ const i = {
|
|
|
39
39
|
lastAuthenticationStrategyBadge: "hidden"
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
async function n(
|
|
43
|
-
for (let e = 0; e <
|
|
42
|
+
async function n(a, o = 8, r = 300) {
|
|
43
|
+
for (let e = 0; e < o; e += 1) {
|
|
44
44
|
let t = null;
|
|
45
45
|
try {
|
|
46
|
-
t = await
|
|
46
|
+
t = await a({ skipCache: !0 });
|
|
47
47
|
} catch {
|
|
48
|
-
t = await
|
|
48
|
+
t = await a();
|
|
49
49
|
}
|
|
50
50
|
if (t) return t;
|
|
51
|
-
e <
|
|
51
|
+
e < o - 1 && await new Promise((s) => setTimeout(s, r));
|
|
52
52
|
}
|
|
53
53
|
return null;
|
|
54
54
|
}
|
|
55
55
|
async function l({
|
|
56
|
-
apiBaseUrl:
|
|
57
|
-
getToken:
|
|
56
|
+
apiBaseUrl: a,
|
|
57
|
+
getToken: o
|
|
58
58
|
}) {
|
|
59
|
-
const r = await n(
|
|
59
|
+
const r = await n(o);
|
|
60
60
|
if (!r)
|
|
61
61
|
throw new Error("Missing Clerk token after retries");
|
|
62
|
-
const e = await fetch(`${
|
|
62
|
+
const e = await fetch(`${a}/auth/clerk/session`, {
|
|
63
63
|
method: "POST",
|
|
64
64
|
headers: { Authorization: `Bearer ${r}` },
|
|
65
65
|
credentials: "include"
|
|
@@ -78,8 +78,8 @@ export {
|
|
|
78
78
|
f as APIError,
|
|
79
79
|
u as AgentAPI,
|
|
80
80
|
A as AnalyticsAPI,
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
P as ArchiveAPI,
|
|
82
|
+
b as AuthAPI,
|
|
83
83
|
h as AuthCore,
|
|
84
84
|
i as CLERK_APPEARANCE,
|
|
85
85
|
I as DecisionAPI,
|
|
@@ -87,24 +87,26 @@ export {
|
|
|
87
87
|
x as GovernanceAPI,
|
|
88
88
|
p as GraphAPI,
|
|
89
89
|
w as InsightsAPI,
|
|
90
|
-
m as
|
|
91
|
-
k as
|
|
92
|
-
v as
|
|
93
|
-
T as
|
|
94
|
-
B as
|
|
95
|
-
y as
|
|
96
|
-
C as
|
|
90
|
+
m as LockAPI,
|
|
91
|
+
k as MemoryAPI,
|
|
92
|
+
v as OntologyAPI,
|
|
93
|
+
T as OpinionAPI,
|
|
94
|
+
B as PipelineAPI,
|
|
95
|
+
y as ProcedureCandidateAPI,
|
|
96
|
+
C as ProcedureMatchAPI,
|
|
97
|
+
S as ProfileAPI,
|
|
97
98
|
E as ReasoningAPI,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
M as
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
R as ReasoningTracesAPI,
|
|
100
|
+
F as SequenceAPI,
|
|
101
|
+
L as SmartMemoryClient,
|
|
102
|
+
M as SubscriptionAPI,
|
|
103
|
+
O as TeamAPI,
|
|
104
|
+
G as TemporalAPI,
|
|
105
|
+
U as TokenManager,
|
|
106
|
+
$ as TokenUsageAPI,
|
|
107
|
+
D as UsageAPI,
|
|
108
|
+
V as ValidationAPI,
|
|
109
|
+
Z as ZettelkastenAPI,
|
|
108
110
|
l as exchangeClerkSession,
|
|
109
111
|
n as getClerkTokenWithRetry
|
|
110
112
|
};
|
package/dist/react.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import h, { createContext as d, useRef as
|
|
2
|
-
import {
|
|
1
|
+
import h, { createContext as d, useRef as S, useState as p, useEffect as C, useCallback as c, useContext as g } from "react";
|
|
2
|
+
import { l as y } from "./core-GpqOJ8RQ.js";
|
|
3
3
|
const m = d(null), f = d(null);
|
|
4
4
|
function b({ children: e, ...r }) {
|
|
5
|
-
const n =
|
|
5
|
+
const n = S(null);
|
|
6
6
|
n.current || (n.current = new y(r));
|
|
7
7
|
const t = n.current, [o, u] = p({
|
|
8
8
|
isAuthenticated: t.auth.isAuthenticated(),
|
|
@@ -14,8 +14,8 @@ function b({ children: e, ...r }) {
|
|
|
14
14
|
error: null
|
|
15
15
|
});
|
|
16
16
|
C(() => t.auth.addListener((i) => {
|
|
17
|
-
u((
|
|
18
|
-
...
|
|
17
|
+
u((I) => ({
|
|
18
|
+
...I,
|
|
19
19
|
isAuthenticated: i.isAuthenticated,
|
|
20
20
|
user: i.user,
|
|
21
21
|
token: i.token,
|
|
@@ -25,13 +25,13 @@ function b({ children: e, ...r }) {
|
|
|
25
25
|
}), [t]);
|
|
26
26
|
const a = c(async () => {
|
|
27
27
|
await t.auth.logout();
|
|
28
|
-
}, [t]), w = c((s) => t.auth.hasRole(s), [t]), A = c((s) => t.auth.getLoginUrl(s), [t]),
|
|
28
|
+
}, [t]), w = c((s) => t.auth.hasRole(s), [t]), A = c((s) => t.auth.getLoginUrl(s), [t]), k = {
|
|
29
29
|
...o,
|
|
30
30
|
logout: a,
|
|
31
31
|
hasRole: w,
|
|
32
32
|
getLoginUrl: A
|
|
33
33
|
};
|
|
34
|
-
return /* @__PURE__ */ h.createElement(m.Provider, { value:
|
|
34
|
+
return /* @__PURE__ */ h.createElement(m.Provider, { value: k }, /* @__PURE__ */ h.createElement(f.Provider, { value: t }, e));
|
|
35
35
|
}
|
|
36
36
|
function l() {
|
|
37
37
|
const e = g(m);
|