@smartmemory/sdk-js 1.4.44 → 1.4.46

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.
@@ -1,32 +1,32 @@
1
- var I = (i) => {
2
- throw TypeError(i);
1
+ var R = (a) => {
2
+ throw TypeError(a);
3
3
  };
4
- var $ = (i, e, t) => e.has(i) || I("Cannot " + t);
5
- var p = (i, e, t) => ($(i, e, "read from private field"), t ? t.call(i) : e.get(i)), k = (i, e, t) => e.has(i) ? I("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), w = (i, e, t, s) => ($(i, e, "write to private field"), s ? s.call(i, t) : e.set(i, t), t), S = (i, e, t) => ($(i, e, "access private method"), t);
6
- const R = {
4
+ var k = (a, e, t) => e.has(a) || R("Cannot " + t);
5
+ var g = (a, e, t) => (k(a, e, "read from private field"), t ? t.call(a) : e.get(a)), w = (a, e, t) => e.has(a) ? R("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), b = (a, e, t, s) => (k(a, e, "write to private field"), s ? s.call(a, t) : e.set(a, t), t), S = (a, e, t) => (k(a, e, "access private method"), t);
6
+ const U = {
7
7
  access: "smart_memory_auth_token",
8
8
  refresh: "smart_memory_refresh_token",
9
9
  user: "smart_memory_user",
10
10
  tenant: "smart_memory_tenant_id",
11
11
  team: "smart_memory_team_id"
12
- }, h = {
12
+ }, y = {
13
13
  access: ["access_token", "sm_token"],
14
14
  refresh: ["refresh_token", "sm_refresh_token"],
15
15
  user: ["sm_user"],
16
16
  tenant: ["tenant_id", "workspace_id", "sm_workspace_id"],
17
17
  team: ["team_id", "sm_team_id"]
18
18
  };
19
- class U {
19
+ class C {
20
20
  /**
21
21
  * @param {Object} options
22
22
  * @param {'localStorage' | 'sessionStorage' | 'memory'} [options.storage='localStorage']
23
23
  * @param {Object} [options.keys] - Custom storage key names
24
24
  */
25
25
  constructor({ storage: e = "localStorage", keys: t = {} } = {}) {
26
- this.storageType = e, this.keys = { ...R, ...t }, this._memory = { access: null, refresh: null, user: null, tenant: null, team: null };
26
+ this.storageType = e, this.keys = { ...U, ...t }, this._memory = { access: null, refresh: null, user: null, tenant: null, team: null };
27
27
  }
28
28
  getAccessToken() {
29
- return this.storageType === "memory" ? this._memory.access : this._getFromStorage(this.keys.access, h.access);
29
+ return this.storageType === "memory" ? this._memory.access : this._getFromStorage(this.keys.access, y.access);
30
30
  }
31
31
  setAccessToken(e) {
32
32
  if (this.storageType === "memory") {
@@ -36,7 +36,7 @@ class U {
36
36
  this._setInStorage(this.keys.access, e);
37
37
  }
38
38
  getRefreshToken() {
39
- return this.storageType === "memory" ? this._memory.refresh : this._getFromStorage(this.keys.refresh, h.refresh);
39
+ return this.storageType === "memory" ? this._memory.refresh : this._getFromStorage(this.keys.refresh, y.refresh);
40
40
  }
41
41
  setRefreshToken(e) {
42
42
  if (this.storageType === "memory") {
@@ -47,7 +47,7 @@ class U {
47
47
  }
48
48
  getUser() {
49
49
  if (this.storageType === "memory") return this._memory.user;
50
- const e = this._getFromStorage(this.keys.user, h.user);
50
+ const e = this._getFromStorage(this.keys.user, y.user);
51
51
  if (!e) return null;
52
52
  try {
53
53
  return JSON.parse(e);
@@ -63,7 +63,7 @@ class U {
63
63
  this._setInStorage(this.keys.user, e ? JSON.stringify(e) : null);
64
64
  }
65
65
  getTenantId() {
66
- return this.storageType === "memory" ? this._memory.tenant : this._normalizeId(this._getFromStorage(this.keys.tenant, h.tenant));
66
+ return this.storageType === "memory" ? this._memory.tenant : this._normalizeId(this._getFromStorage(this.keys.tenant, y.tenant));
67
67
  }
68
68
  setTenantId(e) {
69
69
  const t = this._normalizeId(e);
@@ -74,7 +74,7 @@ class U {
74
74
  this._setInStorage(this.keys.tenant, t);
75
75
  }
76
76
  getTeamId() {
77
- return this.storageType === "memory" ? this._memory.team : this._normalizeId(this._getFromStorage(this.keys.team, h.team));
77
+ return this.storageType === "memory" ? this._memory.team : this._normalizeId(this._getFromStorage(this.keys.team, y.team));
78
78
  }
79
79
  setTeamId(e) {
80
80
  const t = this._normalizeId(e);
@@ -94,7 +94,7 @@ class U {
94
94
  localStorage.removeItem(e), sessionStorage.removeItem(e);
95
95
  } catch {
96
96
  }
97
- for (const e of Object.values(h))
97
+ for (const e of Object.values(y))
98
98
  for (const t of e)
99
99
  try {
100
100
  localStorage.removeItem(t), sessionStorage.removeItem(t);
@@ -114,15 +114,15 @@ class U {
114
114
  try {
115
115
  const s = this.storageType === "localStorage" ? localStorage : sessionStorage, r = this.storageType === "localStorage" ? sessionStorage : localStorage, n = s.getItem(e) || r.getItem(e);
116
116
  if (n != null) return n;
117
- for (const a of t) {
118
- const c = s.getItem(a) || r.getItem(a);
119
- if (c != null) {
120
- this._setInStorage(e, c);
117
+ for (const i of t) {
118
+ const o = s.getItem(i) || r.getItem(i);
119
+ if (o != null) {
120
+ this._setInStorage(e, o);
121
121
  try {
122
- s.removeItem(a), r.removeItem(a);
122
+ s.removeItem(i), r.removeItem(i);
123
123
  } catch {
124
124
  }
125
- return c;
125
+ return o;
126
126
  }
127
127
  }
128
128
  return null;
@@ -148,7 +148,7 @@ class U {
148
148
  return s === "none" || s === "null" || s === "undefined" ? null : t;
149
149
  }
150
150
  }
151
- var m, d, v;
151
+ var l, f, v;
152
152
  class P {
153
153
  /**
154
154
  * @param {Object} options
@@ -159,23 +159,23 @@ class P {
159
159
  * @param {function(string): void} options.onTokenRefreshed
160
160
  * @param {function(): void} options.onRefreshFailed
161
161
  */
162
- constructor({ apiBaseUrl: e, refreshEndpoint: t, tokenManager: s, useCookieAuth: r = !1, onTokenRefreshed: n, onRefreshFailed: a }) {
163
- k(this, d);
164
- k(this, m, null);
165
- this.apiBaseUrl = e, this.refreshEndpoint = t, this.tokenManager = s, this.useCookieAuth = r, this.onTokenRefreshed = n, this.onRefreshFailed = a;
162
+ constructor({ apiBaseUrl: e, refreshEndpoint: t, tokenManager: s, useCookieAuth: r = !1, onTokenRefreshed: n, onRefreshFailed: i }) {
163
+ w(this, f);
164
+ w(this, l, null);
165
+ this.apiBaseUrl = e, this.refreshEndpoint = t, this.tokenManager = s, this.useCookieAuth = r, this.onTokenRefreshed = n, this.onRefreshFailed = i;
166
166
  }
167
167
  async refresh() {
168
- if (p(this, m))
169
- return p(this, m);
170
- w(this, m, S(this, d, v).call(this));
168
+ if (g(this, l))
169
+ return g(this, l);
170
+ b(this, l, S(this, f, v).call(this));
171
171
  try {
172
- return await p(this, m);
172
+ return await g(this, l);
173
173
  } finally {
174
- w(this, m, null);
174
+ b(this, l, null);
175
175
  }
176
176
  }
177
177
  }
178
- m = new WeakMap(), d = new WeakSet(), v = async function() {
178
+ l = new WeakMap(), f = new WeakSet(), v = async function() {
179
179
  const e = this.tokenManager.getRefreshToken();
180
180
  if (!e && !this.useCookieAuth)
181
181
  throw this.onRefreshFailed(), new Error("No refresh token");
@@ -190,8 +190,8 @@ m = new WeakMap(), d = new WeakSet(), v = async function() {
190
190
  const r = await s.json();
191
191
  return this.tokenManager.setAccessToken(r.access_token), r.refresh_token && this.tokenManager.setRefreshToken(r.refresh_token), this.onTokenRefreshed(r.access_token), r.access_token;
192
192
  };
193
- const b = "smart_memory_sso_redirect";
194
- class C {
193
+ const I = "smart_memory_sso_redirect";
194
+ class q {
195
195
  /**
196
196
  * @param {Object} options
197
197
  * @param {string} options.webAppUrl - Web app URL for login redirect
@@ -216,23 +216,23 @@ class C {
216
216
  }
217
217
  storeRedirect(e) {
218
218
  try {
219
- sessionStorage.setItem(b, e);
219
+ sessionStorage.setItem(I, e);
220
220
  } catch (t) {
221
221
  console.warn("Failed to store redirect URL:", t);
222
222
  }
223
223
  }
224
224
  getAndClearRedirect() {
225
225
  try {
226
- const e = sessionStorage.getItem(b);
227
- return sessionStorage.removeItem(b), e;
226
+ const e = sessionStorage.getItem(I);
227
+ return sessionStorage.removeItem(I), e;
228
228
  } catch {
229
229
  return null;
230
230
  }
231
231
  }
232
232
  }
233
- class M {
233
+ class L {
234
234
  constructor(e) {
235
- this.mode = e.mode, this.apiBaseUrl = e.apiBaseUrl, this.endpoints = e.endpoints || {}, this.listeners = /* @__PURE__ */ new Set(), this.useCookieAuth = e.useCookieAuth ?? this.mode === "sso", this.apiKey = e.apiKey || null, this.apiKey && (this.mode = "apiKey"), this.tokenManager = new U({
235
+ this.mode = e.mode, this.apiBaseUrl = e.apiBaseUrl, this.endpoints = e.endpoints || {}, this.listeners = /* @__PURE__ */ new Set(), this.useCookieAuth = e.useCookieAuth ?? this.mode === "sso", this.apiKey = e.apiKey || null, this.apiKey && (this.mode = "apiKey"), this.tokenManager = new C({
236
236
  storage: e.storage || "localStorage",
237
237
  keys: e.tokenKeys
238
238
  }), this.mode !== "apiKey" ? this.refreshManager = new P({
@@ -247,7 +247,7 @@ class M {
247
247
  onRefreshFailed: () => {
248
248
  this.clearLocalAuth();
249
249
  }
250
- }) : this.refreshManager = null, this.mode === "sso" && (this.ssoManager = new C({
250
+ }) : this.refreshManager = null, this.mode === "sso" && (this.ssoManager = new q({
251
251
  webAppUrl: e.webAppUrl,
252
252
  allowedHosts: e.allowedRedirectHosts || [],
253
253
  tokenManager: this.tokenManager
@@ -366,7 +366,7 @@ class M {
366
366
  this.tokenManager.setTenantId(e), this.notifyListeners();
367
367
  }
368
368
  }
369
- class g extends Error {
369
+ class h extends Error {
370
370
  /**
371
371
  * @param {string} message - Error message
372
372
  * @param {number} [status=0] - HTTP status code (0 for network errors)
@@ -376,7 +376,10 @@ class g extends Error {
376
376
  super(e), this.name = "APIError", this.status = t, this.detail = s;
377
377
  }
378
378
  }
379
- class L {
379
+ function d(a) {
380
+ return typeof FormData < "u" && a instanceof FormData;
381
+ }
382
+ class M {
380
383
  /**
381
384
  * @param {import('../auth/AuthCore.js').AuthCore} authCore
382
385
  * @param {{ fetchFn?: typeof globalThis.fetch }} [options]
@@ -388,35 +391,35 @@ class L {
388
391
  return this._customFetchFn || globalThis.fetch.bind(globalThis);
389
392
  }
390
393
  async request(e, t = {}) {
391
- var a, c;
394
+ var i, o;
392
395
  const s = `${this.baseURL}${e}`, r = {
393
- "Content-Type": "application/json",
396
+ ...d(t.body) ? {} : { "Content-Type": "application/json" },
394
397
  ...this.auth.getAuthHeaders(t.headers)
395
398
  }, n = this.auth.getRequestOptions({ ...t, headers: r });
396
399
  try {
397
- let o = await this.fetchFn(s, n);
398
- if (o.status === 401 && !t.__isRetry)
400
+ let c = await this.fetchFn(s, n);
401
+ if (c.status === 401 && !t.__isRetry)
399
402
  try {
400
403
  await this.auth.refreshToken();
401
404
  const u = {
402
- "Content-Type": "application/json",
405
+ ...d(t.body) ? {} : { "Content-Type": "application/json" },
403
406
  ...this.auth.getAuthHeaders(t.headers)
404
407
  };
405
- o = await this.fetchFn(
408
+ c = await this.fetchFn(
406
409
  s,
407
410
  this.auth.getRequestOptions({ ...n, headers: u, __isRetry: !0 })
408
411
  );
409
412
  } catch {
410
413
  }
411
- if (o.status === 401)
412
- throw (c = (a = this.auth).clearLocalAuth) == null || c.call(a), new g("Authentication required", 401, "auth_expired");
413
- if (o.status === 204)
414
+ if (c.status === 401)
415
+ throw (o = (i = this.auth).clearLocalAuth) == null || o.call(i), new h("Authentication required", 401, "auth_expired");
416
+ if (c.status === 204)
414
417
  return null;
415
- if (!o.ok)
416
- throw await this._handleError(o);
417
- return await o.json();
418
- } catch (o) {
419
- throw o instanceof g ? o : new g(o.message, 0, "network_error");
418
+ if (!c.ok)
419
+ throw await this._handleError(c);
420
+ return await c.json();
421
+ } catch (c) {
422
+ throw c instanceof h ? c : new h(c.message, 0, "network_error");
420
423
  }
421
424
  }
422
425
  async get(e, t = {}) {
@@ -429,6 +432,43 @@ class L {
429
432
  body: JSON.stringify(t)
430
433
  });
431
434
  }
435
+ async requestBinary(e, t = {}) {
436
+ var i, o;
437
+ const s = `${this.baseURL}${e}`, r = {
438
+ ...d(t.body) ? {} : { "Content-Type": "application/json" },
439
+ ...this.auth.getAuthHeaders(t.headers)
440
+ }, n = this.auth.getRequestOptions({ ...t, headers: r });
441
+ try {
442
+ let c = await this.fetchFn(s, n);
443
+ if (c.status === 401 && !t.__isRetry)
444
+ try {
445
+ await this.auth.refreshToken();
446
+ const u = {
447
+ ...d(t.body) ? {} : { "Content-Type": "application/json" },
448
+ ...this.auth.getAuthHeaders(t.headers)
449
+ };
450
+ c = await this.fetchFn(
451
+ s,
452
+ this.auth.getRequestOptions({ ...n, headers: u, __isRetry: !0 })
453
+ );
454
+ } catch {
455
+ }
456
+ if (c.status === 401)
457
+ throw (o = (i = this.auth).clearLocalAuth) == null || o.call(i), new h("Authentication required", 401, "auth_expired");
458
+ if (!c.ok)
459
+ throw await this._handleError(c);
460
+ return await c.arrayBuffer();
461
+ } catch (c) {
462
+ throw c instanceof h ? c : new h(c.message, 0, "network_error");
463
+ }
464
+ }
465
+ async postForm(e, t, s = {}) {
466
+ return this.request(e, {
467
+ ...s,
468
+ method: "POST",
469
+ body: t
470
+ });
471
+ }
432
472
  async put(e, t, s = {}) {
433
473
  return this.request(e, {
434
474
  ...s,
@@ -456,7 +496,7 @@ class L {
456
496
  } catch {
457
497
  t = { message: `HTTP ${e.status}` };
458
498
  }
459
- return new g(
499
+ return new h(
460
500
  this._extractMessage(t, e.status),
461
501
  e.status,
462
502
  t
@@ -496,16 +536,16 @@ class z {
496
536
  metadata: s = null,
497
537
  usePipeline: r = !0,
498
538
  profileName: n = null,
499
- conversationContext: a = null
539
+ conversationContext: i = null
500
540
  }) {
501
- const c = {
541
+ const o = {
502
542
  content: e,
503
543
  memory_type: t,
504
544
  metadata: s,
505
545
  use_pipeline: r,
506
546
  profile_name: n
507
547
  };
508
- return a != null && (c.conversation_context = a), this.api.post("/memory/add", c);
548
+ return i != null && (o.conversation_context = i), this.api.post("/memory/add", o);
509
549
  }
510
550
  async get(e) {
511
551
  const t = await this.api.get(`/memory/${e}`);
@@ -563,17 +603,17 @@ class z {
563
603
  * present only under `cite: true`. Pre-LINEAGE-1 callers who indexed into a
564
604
  * bare array must read `response.results` instead.
565
605
  */
566
- async search(e, { topK: t = 5, enableHybrid: s = !0, memoryType: r = null, expertise: n = !1, cite: a = !1, decompose: c = !1, multiHop: o = !1, maxHops: u = 3, budgetMs: y = 1500, semanticHops: f = !1, includeReference: _ = !1, includeConsolidated: T = !1, consolidationFirst: A = !1 } = {}) {
567
- const l = { query: e, top_k: t, enable_hybrid: s };
568
- return r && (l.memory_type = r), n && (l.expertise = !0), a && (l.cite = !0), c && (l.decompose = !0), o && (l.multi_hop = !0), o && u !== 3 && (l.max_hops = u), o && y !== 1500 && (l.budget_ms = y), o && f && (l.semantic_hops = !0), _ && (l.include_reference = !0), T && (l.include_consolidated = !0), A && (l.consolidation_first = !0), this.api.post("/memory/search", l);
606
+ async search(e, { topK: t = 5, enableHybrid: s = !0, memoryType: r = null, expertise: n = !1, cite: i = !1, decompose: o = !1, multiHop: c = !1, maxHops: u = 3, budgetMs: p = 1500, semanticHops: _ = !1, includeReference: $ = !1, includeConsolidated: T = !1, consolidationFirst: A = !1 } = {}) {
607
+ const m = { query: e, top_k: t, enable_hybrid: s };
608
+ return r && (m.memory_type = r), n && (m.expertise = !0), i && (m.cite = !0), o && (m.decompose = !0), c && (m.multi_hop = !0), c && u !== 3 && (m.max_hops = u), c && p !== 1500 && (m.budget_ms = p), c && _ && (m.semantic_hops = !0), $ && (m.include_reference = !0), T && (m.include_consolidated = !0), A && (m.consolidation_first = !0), this.api.post("/memory/search", m);
569
609
  }
570
610
  async getWorkingContext(e, t, { k: s = 20, maxTokens: r = null, strategy: n = null } = {}) {
571
- const a = {
611
+ const i = {
572
612
  session_id: e,
573
613
  query: t,
574
614
  k: s
575
615
  };
576
- return r != null && (a.max_tokens = r), n != null && (a.strategy = n), this.api.post("/memory/context", a);
616
+ return r != null && (i.max_tokens = r), n != null && (i.strategy = n), this.api.post("/memory/context", i);
577
617
  }
578
618
  async searchAdvanced(e, { algorithm: t = "query_traversal", maxResults: s = 15, useSSG: r = !0 } = {}) {
579
619
  return this.api.post("/memory/search/advanced", {
@@ -612,11 +652,11 @@ class z {
612
652
  conversationId: s = null,
613
653
  sessionDates: r = null,
614
654
  turnsPerChunk: n = 15,
615
- maxChunkChars: a = 12e3,
616
- maxConcurrent: c = 4
655
+ maxChunkChars: i = 12e3,
656
+ maxConcurrent: o = 4
617
657
  } = {}) {
618
- const o = { turns: e, turns_per_chunk: n, max_chunk_chars: a, max_concurrent: c };
619
- return t && (o.session_boundaries = t), s && (o.conversation_id = s), r && (o.session_dates = r), this.api.post("/memory/ingest/conversation", o);
658
+ const c = { turns: e, turns_per_chunk: n, max_chunk_chars: i, max_concurrent: o };
659
+ return t && (c.session_boundaries = t), s && (c.conversation_id = s), r && (c.session_dates = r), this.api.post("/memory/ingest/conversation", c);
620
660
  }
621
661
  async ingestDocument(e, { title: t = null, source: s = null, chunkStrategy: r = null } = {}) {
622
662
  const n = { content: e };
@@ -627,8 +667,8 @@ class z {
627
667
  return t && (r.repo = t), s && (r.commit = s), this.api.post("/memory/code/index", r);
628
668
  }
629
669
  async codeSearch(e, { entityType: t = null, repo: s = null, limit: r = 20, semantic: n = !1 } = {}) {
630
- const a = new URLSearchParams({ query: e, limit: r, semantic: n });
631
- return t && a.append("entity_type", t), s && a.append("repo", s), this.api.get(`/memory/code/search?${a}`);
670
+ const i = new URLSearchParams({ query: e, limit: r, semantic: n });
671
+ return t && i.append("entity_type", t), s && i.append("repo", s), this.api.get(`/memory/code/search?${i}`);
632
672
  }
633
673
  async codeContext(e, { repo: t = null } = {}) {
634
674
  const s = new URLSearchParams({ entity_name: e });
@@ -709,8 +749,8 @@ class z {
709
749
  }
710
750
  async getChanges(e, { since: t = null, until: s = null, changeType: r = null } = {}) {
711
751
  let n = `/memory/temporal/${e}/changes`;
712
- const a = [];
713
- return t && a.push(`since=${t}`), s && a.push(`until=${s}`), r && a.push(`change_type=${r}`), a.length && (n += `?${a.join("&")}`), this.api.get(n);
752
+ const i = [];
753
+ return t && i.push(`since=${t}`), s && i.push(`until=${s}`), r && i.push(`change_type=${r}`), i.length && (n += `?${i.join("&")}`), this.api.get(n);
714
754
  }
715
755
  async compareVersions(e, t, s) {
716
756
  return this.api.post(`/memory/temporal/${e}/compare?v1=${t}&v2=${s}`);
@@ -753,13 +793,13 @@ class E {
753
793
  confidence: s = 0.8,
754
794
  sourceTraceId: r = null,
755
795
  sourceSessionId: n = null,
756
- evidenceIds: a = null,
757
- domain: c = null,
758
- tags: o = null,
796
+ evidenceIds: i = null,
797
+ domain: o = null,
798
+ tags: c = null,
759
799
  rejectedAlternatives: u = null,
760
- rationale: y = null,
761
- constraints: f = null,
762
- agentId: _ = null
800
+ rationale: p = null,
801
+ constraints: _ = null,
802
+ agentId: $ = null
763
803
  }) {
764
804
  return this.api.post("/memory/decisions/create", {
765
805
  content: e,
@@ -767,13 +807,13 @@ class E {
767
807
  confidence: s,
768
808
  source_trace_id: r,
769
809
  source_session_id: n,
770
- evidence_ids: a,
771
- domain: c,
772
- tags: o,
810
+ evidence_ids: i,
811
+ domain: o,
812
+ tags: c,
773
813
  rejected_alternatives: u,
774
- rationale: y,
775
- constraints: f,
776
- agent_id: _
814
+ rationale: p,
815
+ constraints: _,
816
+ agent_id: $
777
817
  });
778
818
  }
779
819
  /**
@@ -943,7 +983,7 @@ class E {
943
983
  });
944
984
  }
945
985
  }
946
- class x {
986
+ class O {
947
987
  constructor(e) {
948
988
  this.api = e;
949
989
  }
@@ -965,7 +1005,7 @@ class x {
965
1005
  return t.confidence !== void 0 && (s.confidence = t.confidence), t.subject !== void 0 && (s.subject = t.subject), t.subjectType !== void 0 && (s.subject_type = t.subjectType), t.disposition !== void 0 && (s.disposition = t.disposition), t.formedFrom !== void 0 && (s.formed_from = t.formedFrom), t.domain !== void 0 && (s.domain = t.domain), t.agentId !== void 0 && (s.agent_id = t.agentId), this.api.post("/memory/opinions/create", s);
966
1006
  }
967
1007
  }
968
- class q {
1008
+ class x {
969
1009
  constructor(e) {
970
1010
  this.api = e;
971
1011
  }
@@ -1088,7 +1128,7 @@ class q {
1088
1128
  );
1089
1129
  }
1090
1130
  }
1091
- class O {
1131
+ class F {
1092
1132
  constructor(e) {
1093
1133
  this.api = e;
1094
1134
  }
@@ -1150,7 +1190,7 @@ class j {
1150
1190
  return this.api.patch("/auth/llm-keys", e);
1151
1191
  }
1152
1192
  }
1153
- class F {
1193
+ class H {
1154
1194
  constructor(e) {
1155
1195
  this.api = e;
1156
1196
  }
@@ -1176,7 +1216,7 @@ class F {
1176
1216
  });
1177
1217
  }
1178
1218
  }
1179
- class H {
1219
+ class B {
1180
1220
  constructor(e) {
1181
1221
  this.api = e;
1182
1222
  }
@@ -1256,7 +1296,7 @@ class K {
1256
1296
  return this.api.get(`/memory/agents/${e}/evaluation/history${n ? "?" + n : ""}`);
1257
1297
  }
1258
1298
  }
1259
- class B {
1299
+ class G {
1260
1300
  constructor(e) {
1261
1301
  this.api = e;
1262
1302
  }
@@ -1270,7 +1310,7 @@ class B {
1270
1310
  return this.api.get("/usage/tiers");
1271
1311
  }
1272
1312
  }
1273
- class G {
1313
+ class D {
1274
1314
  constructor(e) {
1275
1315
  this.api = e;
1276
1316
  }
@@ -1310,7 +1350,7 @@ class N {
1310
1350
  return this.api.get("/memory/token-usage/current");
1311
1351
  }
1312
1352
  }
1313
- class V {
1353
+ class J {
1314
1354
  constructor(e) {
1315
1355
  this.api = e;
1316
1356
  }
@@ -1358,8 +1398,8 @@ class V {
1358
1398
  */
1359
1399
  async getChanges(e, { since: t = null, until: s = null, changeType: r = null } = {}) {
1360
1400
  let n = `/memory/temporal/${e}/changes`;
1361
- const a = [];
1362
- return t && a.push(`since=${t}`), s && a.push(`until=${s}`), r && a.push(`change_type=${r}`), a.length && (n += `?${a.join("&")}`), this.api.get(n);
1401
+ const i = [];
1402
+ return t && i.push(`since=${t}`), s && i.push(`until=${s}`), r && i.push(`change_type=${r}`), i.length && (n += `?${i.join("&")}`), this.api.get(n);
1363
1403
  }
1364
1404
  // === VERSION COMPARISON ===
1365
1405
  /**
@@ -1395,9 +1435,9 @@ class V {
1395
1435
  * @param {string} [options.endTime]
1396
1436
  */
1397
1437
  async getAuditTrail(e, { changeType: t = null, userId: s = null, startTime: r = null, endTime: n = null } = {}) {
1398
- let a = `/memory/temporal/${e}/audit`;
1399
- const c = [];
1400
- return t && c.push(`change_type=${t}`), s && c.push(`user_id=${s}`), r && c.push(`start_time=${r}`), n && c.push(`end_time=${n}`), c.length && (a += `?${c.join("&")}`), this.api.get(a);
1438
+ let i = `/memory/temporal/${e}/audit`;
1439
+ const o = [];
1440
+ return t && o.push(`change_type=${t}`), s && o.push(`user_id=${s}`), r && o.push(`start_time=${r}`), n && o.push(`end_time=${n}`), o.length && (i += `?${o.join("&")}`), this.api.get(i);
1401
1441
  }
1402
1442
  // === TEMPORAL SEARCH ===
1403
1443
  /**
@@ -1428,8 +1468,8 @@ class V {
1428
1468
  async complianceReport(e, t, { reportType: s = "HIPAA", itemIds: r = null } = {}) {
1429
1469
  let n = `/memory/temporal/compliance/report?start_date=${e}&end_date=${t}&report_type=${s}`;
1430
1470
  if (r && r.length)
1431
- for (const a of r)
1432
- n += `&item_ids=${encodeURIComponent(a)}`;
1471
+ for (const i of r)
1472
+ n += `&item_ids=${encodeURIComponent(i)}`;
1433
1473
  return this.api.get(n);
1434
1474
  }
1435
1475
  // === TEMPORAL RELATIONSHIPS ===
@@ -1456,7 +1496,7 @@ class V {
1456
1496
  return this.api.get(`/memory/temporal/relationships/${e}/valid-periods`);
1457
1497
  }
1458
1498
  }
1459
- class D {
1499
+ class V {
1460
1500
  constructor(e) {
1461
1501
  this.api = e;
1462
1502
  }
@@ -1525,7 +1565,7 @@ class D {
1525
1565
  return this.api.get("/memory/governance/summary");
1526
1566
  }
1527
1567
  }
1528
- class J {
1568
+ class W {
1529
1569
  constructor(e) {
1530
1570
  this.api = e;
1531
1571
  }
@@ -1566,7 +1606,7 @@ class J {
1566
1606
  return this.api.post("/memory/evolution/reinforce/opinions");
1567
1607
  }
1568
1608
  }
1569
- class W {
1609
+ class Y {
1570
1610
  constructor(e) {
1571
1611
  this.api = e;
1572
1612
  }
@@ -1595,14 +1635,14 @@ class W {
1595
1635
  * @param {boolean} [params.useWikipedia=true]
1596
1636
  * @param {boolean} [params.useLlm=true]
1597
1637
  */
1598
- async resolve({ existingItemId: e, newFact: t, autoResolve: s = !0, strategy: r = null, useWikipedia: n = !0, useLlm: a = !0 }) {
1638
+ async resolve({ existingItemId: e, newFact: t, autoResolve: s = !0, strategy: r = null, useWikipedia: n = !0, useLlm: i = !0 }) {
1599
1639
  return this.api.post("/memory/reasoning/resolve", {
1600
1640
  existing_item_id: e,
1601
1641
  new_fact: t,
1602
1642
  auto_resolve: s,
1603
1643
  strategy: r,
1604
1644
  use_wikipedia: n,
1605
- use_llm: a
1645
+ use_llm: i
1606
1646
  });
1607
1647
  }
1608
1648
  // === CONFLICT QUERIES ===
@@ -1664,7 +1704,7 @@ class W {
1664
1704
  });
1665
1705
  }
1666
1706
  }
1667
- class Y {
1707
+ class Z {
1668
1708
  constructor(e) {
1669
1709
  this.api = e;
1670
1710
  }
@@ -1718,7 +1758,7 @@ class Y {
1718
1758
  return this.api.get(`/memory/reasoning/traces/${e}`);
1719
1759
  }
1720
1760
  }
1721
- class Z {
1761
+ class Q {
1722
1762
  constructor(e) {
1723
1763
  this.api = e;
1724
1764
  }
@@ -2107,6 +2147,186 @@ class Z {
2107
2147
  async resolveHitl(e, { action: t, note: s = null }) {
2108
2148
  return this.api.post(`/memory/ontology/hitl/${e}/resolve`, { action: t, note: s });
2109
2149
  }
2150
+ // --- ONTO-CRUD-1 read / audit / migration surface -------------------------
2151
+ /**
2152
+ * List ontology types, keyset-paginated.
2153
+ * @param {Object} [options]
2154
+ * @param {string} [options.tier] working|proposed|confirmed|retired
2155
+ * @param {string} [options.layer] public|domain|private
2156
+ * @param {string} [options.packId] filter by originating pack id
2157
+ * @param {boolean} [options.hasIri] only types with (or without) an IRI
2158
+ * @param {number} [options.limit=100]
2159
+ * @param {string} [options.cursor] opaque keyset continuation token
2160
+ */
2161
+ async listTypes({ tier: e, layer: t, packId: s, hasIri: r, limit: n = 100, cursor: i } = {}) {
2162
+ const o = { limit: String(n) };
2163
+ e !== void 0 && (o.tier = e), t !== void 0 && (o.layer = t), s !== void 0 && (o.pack_id = s), r !== void 0 && (o.has_iri = String(r)), i !== void 0 && (o.cursor = i);
2164
+ const c = new URLSearchParams(o).toString();
2165
+ return this.api.get(`/memory/ontology/types${c ? "?" + c : ""}`);
2166
+ }
2167
+ /**
2168
+ * List ontology relation types, keyset-paginated. Mirror of `listTypes`.
2169
+ * @param {Object} [options]
2170
+ * @param {string} [options.tier] working|proposed|confirmed|retired
2171
+ * @param {string} [options.layer] public|domain|private
2172
+ * @param {string} [options.packId] filter by originating pack id
2173
+ * @param {boolean} [options.hasIri] only relations with (or without) an IRI
2174
+ * @param {number} [options.limit=100]
2175
+ * @param {string} [options.cursor] opaque keyset continuation token
2176
+ */
2177
+ async listRelations({ tier: e, layer: t, packId: s, hasIri: r, limit: n = 100, cursor: i } = {}) {
2178
+ const o = { limit: String(n) };
2179
+ e !== void 0 && (o.tier = e), t !== void 0 && (o.layer = t), s !== void 0 && (o.pack_id = s), r !== void 0 && (o.has_iri = String(r)), i !== void 0 && (o.cursor = i);
2180
+ const c = new URLSearchParams(o).toString();
2181
+ return this.api.get(`/memory/ontology/relations${c ? "?" + c : ""}`);
2182
+ }
2183
+ /**
2184
+ * Resolve a single ontology type by iri/qid/name.
2185
+ * @param {string} typeId
2186
+ */
2187
+ async getType(e) {
2188
+ return this.api.get(`/memory/ontology/types/${encodeURIComponent(e)}`);
2189
+ }
2190
+ /**
2191
+ * Resolve a single ontology relation type by its identity (iri -> pid -> name).
2192
+ * @param {string} relationId
2193
+ */
2194
+ async getRelation(e) {
2195
+ return this.api.get(`/memory/ontology/relations/${encodeURIComponent(e)}`);
2196
+ }
2197
+ /**
2198
+ * Cross-entity, newest-first ontology audit feed.
2199
+ * @param {Object} [options]
2200
+ * @param {string} [options.actor]
2201
+ * @param {string} [options.action] e.g. migrate, retire
2202
+ * @param {string} [options.since] full ISO-8601 lower bound (inclusive)
2203
+ * @param {string} [options.until] full ISO-8601 upper bound (inclusive)
2204
+ * @param {number} [options.limit=200]
2205
+ */
2206
+ async listAudit({ actor: e, action: t, since: s, until: r, limit: n = 200 } = {}) {
2207
+ const i = { limit: String(n) };
2208
+ e !== void 0 && (i.actor = e), t !== void 0 && (i.action = t), s !== void 0 && (i.since = s), r !== void 0 && (i.until = r);
2209
+ const o = new URLSearchParams(i).toString();
2210
+ return this.api.get(`/memory/ontology/audit${o ? "?" + o : ""}`);
2211
+ }
2212
+ /**
2213
+ * Full append-only audit trail for one ontology type (oldest-first).
2214
+ * @param {string} typeId
2215
+ */
2216
+ async getTypeAudit(e) {
2217
+ return this.api.get(`/memory/ontology/types/${encodeURIComponent(e)}/audit`);
2218
+ }
2219
+ /**
2220
+ * Full append-only audit trail for one ontology relation (oldest-first).
2221
+ * @param {string} relationId
2222
+ */
2223
+ async getRelationAudit(e) {
2224
+ return this.api.get(`/memory/ontology/relations/${encodeURIComponent(e)}/audit`);
2225
+ }
2226
+ /**
2227
+ * Full append-only audit trail for a pack (oldest-first), optionally version-scoped.
2228
+ * @param {string} packId
2229
+ * @param {Object} [options]
2230
+ * @param {string} [options.packVersion] scope to one installed version; omit for all
2231
+ */
2232
+ async getPackAudit(e, { packVersion: t = null } = {}) {
2233
+ const s = {};
2234
+ t !== null && (s.pack_version = t);
2235
+ const r = new URLSearchParams(s).toString();
2236
+ return this.api.get(`/memory/ontology/packs/${encodeURIComponent(e)}/audit${r ? "?" + r : ""}`);
2237
+ }
2238
+ /**
2239
+ * Reclassify every instance of `fromId` onto `toId`. Both types stay live.
2240
+ * @param {string} fromId
2241
+ * @param {string} toId
2242
+ * @param {Object} params
2243
+ * @param {string} params.reason why the migration is being performed (audit evidence)
2244
+ * @param {number} [params.batchSize=500] instance edges rewritten per chunk
2245
+ */
2246
+ async migrateTypeInstances(e, t, { reason: s, batchSize: r = 500 }) {
2247
+ return this.api.post(
2248
+ `/memory/ontology/types/${encodeURIComponent(e)}/migrate-to/${encodeURIComponent(t)}`,
2249
+ { reason: s, batch_size: r }
2250
+ );
2251
+ }
2252
+ // --- ONTO-HITL-CURATE-1 curation queue surface ---------------------------
2253
+ /**
2254
+ * List ontology review queue items, keyset-paginated.
2255
+ * @param {Object} [options]
2256
+ * @param {string} [options.tier] working|proposed
2257
+ * @param {string} [options.assignee] filter by review assignee
2258
+ * @param {string} [options.source] filter by source string
2259
+ * @param {number} [options.limit=100]
2260
+ * @param {string} [options.cursor] opaque keyset continuation token
2261
+ */
2262
+ async listReviewQueue({ tier: e, assignee: t, source: s, limit: r = 100, cursor: n } = {}) {
2263
+ const i = { limit: String(r) };
2264
+ e !== void 0 && (i.tier = e), t !== void 0 && (i.assignee = t), s !== void 0 && (i.source = s), n !== void 0 && (i.cursor = n);
2265
+ const o = new URLSearchParams(i).toString();
2266
+ return this.api.get(`/memory/ontology/queue${o ? "?" + o : ""}`);
2267
+ }
2268
+ /**
2269
+ * Approve one ontology review type.
2270
+ * @param {string} typeId private-layer ontology type name
2271
+ * @param {Object} [options]
2272
+ * @param {string} [options.expectedTier] optional optimistic tier precondition
2273
+ */
2274
+ async approveReviewType(e, { expectedTier: t } = {}) {
2275
+ const s = {};
2276
+ return t !== void 0 && (s.expected_tier = t), this.api.post(`/memory/ontology/queue/${encodeURIComponent(e)}/approve`, s);
2277
+ }
2278
+ /**
2279
+ * Reject one ontology review type.
2280
+ * @param {string} typeId private-layer ontology type name
2281
+ * @param {Object} [options]
2282
+ * @param {string} [options.expectedTier] optional optimistic tier precondition
2283
+ */
2284
+ async rejectReviewType(e, { expectedTier: t } = {}) {
2285
+ const s = {};
2286
+ return t !== void 0 && (s.expected_tier = t), this.api.post(`/memory/ontology/queue/${encodeURIComponent(e)}/reject`, s);
2287
+ }
2288
+ /**
2289
+ * Merge one ontology review type into another type.
2290
+ * @param {string} typeId private-layer ontology type name being reviewed
2291
+ * @param {string} intoId destination type identifier
2292
+ * @param {Object} [options]
2293
+ * @param {string} [options.expectedTier] optional optimistic tier precondition
2294
+ */
2295
+ async mergeReviewType(e, t, { expectedTier: s } = {}) {
2296
+ const r = { into_id: t };
2297
+ return s !== void 0 && (r.expected_tier = s), this.api.post(`/memory/ontology/queue/${encodeURIComponent(e)}/merge`, r);
2298
+ }
2299
+ /**
2300
+ * Edit and promote one ontology review type.
2301
+ * @param {string} typeId private-layer ontology type name being reviewed
2302
+ * @param {Object} edits edit payload accepted by the service
2303
+ * @param {Object} [options]
2304
+ * @param {string} [options.expectedTier] optional optimistic tier precondition
2305
+ */
2306
+ async editPromoteReviewType(e, t, { expectedTier: s } = {}) {
2307
+ const r = { edits: t };
2308
+ return s !== void 0 && (r.expected_tier = s), this.api.post(`/memory/ontology/queue/${encodeURIComponent(e)}/edit-promote`, r);
2309
+ }
2310
+ /**
2311
+ * Assign or clear the reviewer for one ontology review type.
2312
+ * @param {string} typeId private-layer ontology type name being reviewed
2313
+ * @param {string|null} assignee reviewer identifier, or null to clear assignment
2314
+ */
2315
+ async assignReviewer(e, t) {
2316
+ return this.api.post(`/memory/ontology/queue/${encodeURIComponent(e)}/assign`, { assignee: t });
2317
+ }
2318
+ /**
2319
+ * Apply a curation action to many ontology review types.
2320
+ * @param {string} action approve|reject|merge|edit_promote|assign
2321
+ * @param {string[]} ids private-layer ontology type names to process
2322
+ * @param {Object} [options]
2323
+ * @param {Object} [options.params] action-specific params
2324
+ * @param {string} [options.expectedTier] optional optimistic tier precondition
2325
+ */
2326
+ async bulkReviewAction(e, t, { params: s, expectedTier: r } = {}) {
2327
+ const n = { action: e, ids: t, params: s === void 0 ? {} : s };
2328
+ return r !== void 0 && (n.expected_tier = r), this.api.post("/memory/ontology/queue/bulk", n);
2329
+ }
2110
2330
  }
2111
2331
  class X {
2112
2332
  constructor(e) {
@@ -2137,7 +2357,7 @@ class X {
2137
2357
  return e !== null && (r.protected_attributes = e), t !== null && (r.sentiment_analysis = t), s !== null && (r.topic_analysis = s), this.api.post("/memory/analytics/bias", r);
2138
2358
  }
2139
2359
  }
2140
- class Q {
2360
+ class ee {
2141
2361
  constructor(e) {
2142
2362
  this.api = e;
2143
2363
  }
@@ -2173,7 +2393,7 @@ class Q {
2173
2393
  return this.api.get("/memory/inference/rules");
2174
2394
  }
2175
2395
  }
2176
- class ee {
2396
+ class te {
2177
2397
  constructor(e) {
2178
2398
  this.api = e;
2179
2399
  }
@@ -2289,7 +2509,7 @@ class ee {
2289
2509
  return this.api.delete(`/memory/pipeline/configs/${e}`);
2290
2510
  }
2291
2511
  }
2292
- class te {
2512
+ class se {
2293
2513
  constructor(e) {
2294
2514
  this.api = e;
2295
2515
  }
@@ -2315,7 +2535,7 @@ class te {
2315
2535
  return this.api.get(`/memory/archive/${e}`);
2316
2536
  }
2317
2537
  }
2318
- class se {
2538
+ class re {
2319
2539
  constructor(e) {
2320
2540
  this.api = e;
2321
2541
  }
@@ -2474,7 +2694,7 @@ class se {
2474
2694
  return this.api.get(`/memory/zettel/by-relation/${e}/${t}?limit=${s}`);
2475
2695
  }
2476
2696
  }
2477
- class re {
2697
+ class ne {
2478
2698
  constructor(e) {
2479
2699
  this.api = e;
2480
2700
  }
@@ -2510,7 +2730,7 @@ class re {
2510
2730
  return this.api.get("/memory/procedures/matches/stats");
2511
2731
  }
2512
2732
  }
2513
- class ne {
2733
+ class ie {
2514
2734
  constructor(e) {
2515
2735
  this.api = e;
2516
2736
  }
@@ -2559,7 +2779,7 @@ class ne {
2559
2779
  return this.api.delete(`/memory/procedures/candidates/${e}/dismiss`);
2560
2780
  }
2561
2781
  }
2562
- class ie {
2782
+ class ae {
2563
2783
  constructor(e) {
2564
2784
  this.api = e;
2565
2785
  }
@@ -2614,7 +2834,7 @@ class ie {
2614
2834
  return this.api.get(`/memory/procedures/schemas/${e}`);
2615
2835
  }
2616
2836
  }
2617
- class ae {
2837
+ class oe {
2618
2838
  constructor(e) {
2619
2839
  this.api = e;
2620
2840
  }
@@ -2686,11 +2906,11 @@ class ae {
2686
2906
  return this.api.delete(`/memory/summary/${e}`);
2687
2907
  }
2688
2908
  }
2689
- class ce {
2909
+ class me {
2690
2910
  constructor(e) {
2691
- this.auth = new M(e);
2692
- const t = new L(this.auth, { fetchFn: e.fetchFn });
2693
- this.memories = new z(t), this.decisions = new E(t), this.opinions = new x(t), this.graph = new q(t), this.teams = new O(t), this.profiles = new j(t), this.subscriptions = new F(t), this.authAPI = new H(t), this.agents = new K(t), this.usage = new B(t), this.insights = new G(t), this.tokenUsage = new N(t), this.temporal = new V(t), this.governance = new D(t), this.evolution = new J(t), this.reasoning = new W(t), this.reasoningTraces = new Y(t), this.ontology = new Z(t), this.analytics = new X(t), this.validation = new Q(t), this.pipeline = new ee(t), this.archive = new te(t), this.zettelkasten = new se(t), this.procedureMatches = new re(t), this.procedureCandidates = new ne(t), this.procedureDrift = new ie(t), this.summaries = new ae(t);
2911
+ this.auth = new L(e);
2912
+ const t = new M(this.auth, { fetchFn: e.fetchFn });
2913
+ this._api = t, this.memories = new z(t), this.decisions = new E(t), this.opinions = new O(t), this.graph = new x(t), this.teams = new F(t), this.profiles = new j(t), this.subscriptions = new H(t), this.authAPI = new B(t), this.agents = new K(t), this.usage = new G(t), this.insights = new D(t), this.tokenUsage = new N(t), this.temporal = new J(t), this.governance = new V(t), this.evolution = new W(t), this.reasoning = new Y(t), this.reasoningTraces = new Z(t), this.ontology = new Q(t), this.analytics = new X(t), this.validation = new ee(t), this.pipeline = new te(t), this.archive = new se(t), this.zettelkasten = new re(t), this.procedureMatches = new ne(t), this.procedureCandidates = new ie(t), this.procedureDrift = new ae(t), this.summaries = new oe(t);
2694
2914
  }
2695
2915
  setTeamId(e) {
2696
2916
  this.auth.tokenManager.setTeamId(e), this.auth.notifyListeners();
@@ -2698,38 +2918,54 @@ class ce {
2698
2918
  getTeamId() {
2699
2919
  return this.auth.tokenManager.getTeamId();
2700
2920
  }
2921
+ /**
2922
+ * Export the current workspace as a gzipped OKF bundle.
2923
+ * @returns {Promise<ArrayBuffer>}
2924
+ */
2925
+ async exportOkf() {
2926
+ return this._api.requestBinary("/memory/okf/export", { method: "GET" });
2927
+ }
2928
+ /**
2929
+ * Import a gzipped OKF bundle into the current workspace.
2930
+ * @param {Blob | ArrayBuffer | Uint8Array} archive
2931
+ * @returns {Promise<{ imported: number, failed: number, workspace_id: string }>}
2932
+ */
2933
+ async importOkf(e) {
2934
+ const t = e instanceof Blob ? e : new Blob([e], { type: "application/gzip" }), s = new FormData();
2935
+ return s.append("file", t, "smartmemory-okf-import.tar.gz"), this._api.postForm("/memory/okf/import", s);
2936
+ }
2701
2937
  }
2702
2938
  export {
2703
- g as A,
2704
- L as B,
2939
+ h as A,
2940
+ M as B,
2705
2941
  E as D,
2706
- J as E,
2707
- D as G,
2708
- G as I,
2942
+ W as E,
2943
+ V as G,
2944
+ D as I,
2709
2945
  z as M,
2710
- Z as O,
2711
- ee as P,
2712
- W as R,
2713
- ce as S,
2714
- O as T,
2715
- B as U,
2716
- Q as V,
2717
- se as Z,
2946
+ Q as O,
2947
+ te as P,
2948
+ Y as R,
2949
+ me as S,
2950
+ F as T,
2951
+ G as U,
2952
+ ee as V,
2953
+ re as Z,
2718
2954
  K as a,
2719
2955
  X as b,
2720
- te as c,
2721
- H as d,
2722
- M as e,
2723
- q as f,
2724
- x as g,
2725
- ne as h,
2726
- re as i,
2956
+ se as c,
2957
+ B as d,
2958
+ L as e,
2959
+ x as f,
2960
+ O as g,
2961
+ ie as h,
2962
+ ne as i,
2727
2963
  j,
2728
- Y as k,
2729
- F as l,
2730
- V as m,
2731
- U as n,
2964
+ Z as k,
2965
+ H as l,
2966
+ J as m,
2967
+ C as n,
2732
2968
  N as o,
2733
2969
  P as p,
2734
- C as q
2970
+ q
2735
2971
  };
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
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-C_2OxSk3.js";
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-BNt44Xql.js";
2
2
  export {
3
3
  e as APIError,
4
4
  r as AgentAPI,
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-C_2OxSk3.js";
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-BNt44Xql.js";
2
2
  const i = {
3
3
  variables: {
4
4
  colorBackground: "transparent",
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import h, { createContext as d, useRef as y, useState as v, useEffect as b, useCallback as c, useContext as f } from "react";
2
- import { S as x } from "./core-C_2OxSk3.js";
2
+ import { S as x } from "./core-BNt44Xql.js";
3
3
  const m = d(null), g = d(null);
4
4
  function U({ children: e, ...r }) {
5
5
  const n = y(null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartmemory/sdk-js",
3
- "version": "1.4.44",
3
+ "version": "1.4.46",
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",