@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/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 n, f as o, I as t, M as i, j as g, p as M, q as h, S as m, l as S, T as f, n as p, U as l } from "./core-BEScfRuq.js";
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
- n as DecisionAPI,
9
- o as GraphAPI,
8
+ o as DecisionAPI,
9
+ n as GraphAPI,
10
10
  t as InsightsAPI,
11
- i as MemoryAPI,
12
- g as ProfileAPI,
11
+ g as MemoryAPI,
12
+ i as OntologyAPI,
13
+ m as ProfileAPI,
13
14
  M as RefreshManager,
14
15
  h as SSOManager,
15
- m as SmartMemoryClient,
16
- S as SubscriptionAPI,
17
- f as TeamAPI,
16
+ f as SmartMemoryClient,
17
+ l as SubscriptionAPI,
18
+ S as TeamAPI,
18
19
  p as TokenManager,
19
- l as UsageAPI
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 b, d as P, e as h, D as I, E as g, G as x, f as p, I as w, M as m, O as k, g as v, P as T, h as B, i as y, j as C, R as E, k as S, S as R, l as F, T as M, m as L, n as O, o as G, U, V as $, Z as D } from "./core-BEScfRuq.js";
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(o, a = 8, r = 300) {
43
- for (let e = 0; e < a; e += 1) {
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 o({ skipCache: !0 });
46
+ t = await a({ skipCache: !0 });
47
47
  } catch {
48
- t = await o();
48
+ t = await a();
49
49
  }
50
50
  if (t) return t;
51
- e < a - 1 && await new Promise((s) => setTimeout(s, r));
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: o,
57
- getToken: a
56
+ apiBaseUrl: a,
57
+ getToken: o
58
58
  }) {
59
- const r = await n(a);
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(`${o}/auth/clerk/session`, {
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
- b as ArchiveAPI,
82
- P as AuthAPI,
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 MemoryAPI,
91
- k as OntologyAPI,
92
- v as OpinionAPI,
93
- T as PipelineAPI,
94
- B as ProcedureCandidateAPI,
95
- y as ProcedureMatchAPI,
96
- C as ProfileAPI,
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
- S as ReasoningTracesAPI,
99
- R as SmartMemoryClient,
100
- F as SubscriptionAPI,
101
- M as TeamAPI,
102
- L as TemporalAPI,
103
- O as TokenManager,
104
- G as TokenUsageAPI,
105
- U as UsageAPI,
106
- $ as ValidationAPI,
107
- D as ZettelkastenAPI,
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 I, useState as p, useEffect as C, useCallback as c, useContext as g } from "react";
2
- import { S as y } from "./core-BEScfRuq.js";
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 = I(null);
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((k) => ({
18
- ...k,
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]), S = {
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: S }, /* @__PURE__ */ h.createElement(f.Provider, { value: t }, e));
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartmemory/sdk-js",
3
- "version": "1.4.59",
3
+ "version": "1.4.61",
4
4
  "description": "Unified JavaScript SDK for SmartMemory API — auth + API client for all frontends",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",