@smartmemory/sdk-js 1.4.57 → 1.4.59
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-D1O9gOZK.js → core-BEScfRuq.js} +127 -106
- package/dist/core.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var S = (a) => {
|
|
2
2
|
throw TypeError(a);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
const
|
|
4
|
+
var w = (a, e, t) => e.has(a) || S("Cannot " + t);
|
|
5
|
+
var d = (a, e, t) => (w(a, e, "read from private field"), t ? t.call(a) : e.get(a)), b = (a, e, t) => e.has(a) ? S("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), I = (a, e, t, s) => (w(a, e, "write to private field"), s ? s.call(a, t) : e.set(a, t), t), v = (a, e, t) => (w(a, e, "access private method"), t);
|
|
6
|
+
const P = {
|
|
7
7
|
access: "smart_memory_auth_token",
|
|
8
8
|
refresh: "smart_memory_refresh_token",
|
|
9
9
|
user: "smart_memory_user",
|
|
@@ -16,14 +16,14 @@ const A = {
|
|
|
16
16
|
tenant: ["tenant_id", "workspace_id", "sm_workspace_id"],
|
|
17
17
|
team: ["team_id", "sm_team_id"]
|
|
18
18
|
};
|
|
19
|
-
class
|
|
19
|
+
class L {
|
|
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 = { ...
|
|
26
|
+
this.storageType = e, this.keys = { ...P, ...t }, this._memory = { access: null, refresh: null, user: null, tenant: null, team: null };
|
|
27
27
|
}
|
|
28
28
|
getAccessToken() {
|
|
29
29
|
return this.storageType === "memory" ? this._memory.access : this._getFromStorage(this.keys.access, y.access);
|
|
@@ -148,8 +148,8 @@ class C {
|
|
|
148
148
|
return s === "none" || s === "null" || s === "undefined" ? null : t;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
var l,
|
|
152
|
-
class
|
|
151
|
+
var l, _, T;
|
|
152
|
+
class q {
|
|
153
153
|
/**
|
|
154
154
|
* @param {Object} options
|
|
155
155
|
* @param {string} options.apiBaseUrl
|
|
@@ -160,22 +160,22 @@ class P {
|
|
|
160
160
|
* @param {function(): void} options.onRefreshFailed
|
|
161
161
|
*/
|
|
162
162
|
constructor({ apiBaseUrl: e, refreshEndpoint: t, tokenManager: s, useCookieAuth: r = !1, onTokenRefreshed: n, onRefreshFailed: i }) {
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
b(this, _);
|
|
164
|
+
b(this, l, null);
|
|
165
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 (
|
|
169
|
-
return
|
|
170
|
-
|
|
168
|
+
if (d(this, l))
|
|
169
|
+
return d(this, l);
|
|
170
|
+
I(this, l, v(this, _, T).call(this));
|
|
171
171
|
try {
|
|
172
|
-
return await
|
|
172
|
+
return await d(this, l);
|
|
173
173
|
} finally {
|
|
174
|
-
|
|
174
|
+
I(this, l, null);
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
l = new WeakMap(),
|
|
178
|
+
l = new WeakMap(), _ = new WeakSet(), T = 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 @@ l = new WeakMap(), f = 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
|
|
194
|
-
class
|
|
193
|
+
const R = "smart_memory_sso_redirect";
|
|
194
|
+
class M {
|
|
195
195
|
/**
|
|
196
196
|
* @param {Object} options
|
|
197
197
|
* @param {string} options.webAppUrl - Web app URL for login redirect
|
|
@@ -216,26 +216,26 @@ class L {
|
|
|
216
216
|
}
|
|
217
217
|
storeRedirect(e) {
|
|
218
218
|
try {
|
|
219
|
-
sessionStorage.setItem(
|
|
219
|
+
sessionStorage.setItem(R, 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(
|
|
227
|
-
return sessionStorage.removeItem(
|
|
226
|
+
const e = sessionStorage.getItem(R);
|
|
227
|
+
return sessionStorage.removeItem(R), e;
|
|
228
228
|
} catch {
|
|
229
229
|
return null;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
class
|
|
233
|
+
class z {
|
|
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
|
|
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 L({
|
|
236
236
|
storage: e.storage || "localStorage",
|
|
237
237
|
keys: e.tokenKeys
|
|
238
|
-
}), this.mode !== "apiKey" ? this.refreshManager = new
|
|
238
|
+
}), this.mode !== "apiKey" ? this.refreshManager = new q({
|
|
239
239
|
apiBaseUrl: this.apiBaseUrl,
|
|
240
240
|
refreshEndpoint: this.endpoints.refresh || "/auth/refresh",
|
|
241
241
|
tokenManager: this.tokenManager,
|
|
@@ -247,7 +247,7 @@ class q {
|
|
|
247
247
|
onRefreshFailed: () => {
|
|
248
248
|
this.clearLocalAuth();
|
|
249
249
|
}
|
|
250
|
-
}) : this.refreshManager = null, this.mode === "sso" && (this.ssoManager = new
|
|
250
|
+
}) : this.refreshManager = null, this.mode === "sso" && (this.ssoManager = new M({
|
|
251
251
|
webAppUrl: e.webAppUrl,
|
|
252
252
|
allowedHosts: e.allowedRedirectHosts || [],
|
|
253
253
|
tokenManager: this.tokenManager
|
|
@@ -377,10 +377,10 @@ class h extends Error {
|
|
|
377
377
|
super(e), this.name = "APIError", this.status = t, this.detail = s;
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function f(a) {
|
|
381
381
|
return typeof FormData < "u" && a instanceof FormData;
|
|
382
382
|
}
|
|
383
|
-
class
|
|
383
|
+
class E {
|
|
384
384
|
/**
|
|
385
385
|
* @param {import('../auth/AuthCore.js').AuthCore} authCore
|
|
386
386
|
* @param {{ fetchFn?: typeof globalThis.fetch }} [options]
|
|
@@ -394,7 +394,7 @@ class M {
|
|
|
394
394
|
async request(e, t = {}) {
|
|
395
395
|
var i, o;
|
|
396
396
|
const s = `${this.baseURL}${e}`, r = {
|
|
397
|
-
...
|
|
397
|
+
...f(t.body) ? {} : { "Content-Type": "application/json" },
|
|
398
398
|
...this.auth.getAuthHeaders(t.headers)
|
|
399
399
|
}, n = this.auth.getRequestOptions({ ...t, headers: r });
|
|
400
400
|
try {
|
|
@@ -402,13 +402,13 @@ class M {
|
|
|
402
402
|
if (c.status === 401 && !t.__isRetry)
|
|
403
403
|
try {
|
|
404
404
|
await this.auth.refreshToken();
|
|
405
|
-
const
|
|
406
|
-
...
|
|
405
|
+
const m = {
|
|
406
|
+
...f(t.body) ? {} : { "Content-Type": "application/json" },
|
|
407
407
|
...this.auth.getAuthHeaders(t.headers)
|
|
408
408
|
};
|
|
409
409
|
c = await this.fetchFn(
|
|
410
410
|
s,
|
|
411
|
-
this.auth.getRequestOptions({ ...n, headers:
|
|
411
|
+
this.auth.getRequestOptions({ ...n, headers: m, __isRetry: !0 })
|
|
412
412
|
);
|
|
413
413
|
} catch {
|
|
414
414
|
}
|
|
@@ -436,7 +436,7 @@ class M {
|
|
|
436
436
|
async requestBinary(e, t = {}) {
|
|
437
437
|
var i, o;
|
|
438
438
|
const s = `${this.baseURL}${e}`, r = {
|
|
439
|
-
...
|
|
439
|
+
...f(t.body) ? {} : { "Content-Type": "application/json" },
|
|
440
440
|
...this.auth.getAuthHeaders(t.headers)
|
|
441
441
|
}, n = this.auth.getRequestOptions({ ...t, headers: r });
|
|
442
442
|
try {
|
|
@@ -444,13 +444,13 @@ class M {
|
|
|
444
444
|
if (c.status === 401 && !t.__isRetry)
|
|
445
445
|
try {
|
|
446
446
|
await this.auth.refreshToken();
|
|
447
|
-
const
|
|
448
|
-
...
|
|
447
|
+
const m = {
|
|
448
|
+
...f(t.body) ? {} : { "Content-Type": "application/json" },
|
|
449
449
|
...this.auth.getAuthHeaders(t.headers)
|
|
450
450
|
};
|
|
451
451
|
c = await this.fetchFn(
|
|
452
452
|
s,
|
|
453
|
-
this.auth.getRequestOptions({ ...n, headers:
|
|
453
|
+
this.auth.getRequestOptions({ ...n, headers: m, __isRetry: !0 })
|
|
454
454
|
);
|
|
455
455
|
} catch {
|
|
456
456
|
}
|
|
@@ -527,7 +527,7 @@ class M {
|
|
|
527
527
|
return typeof (e == null ? void 0 : e.message) == "string" ? e.message : `HTTP ${t}`;
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
class
|
|
530
|
+
class x {
|
|
531
531
|
constructor(e) {
|
|
532
532
|
this.api = e;
|
|
533
533
|
}
|
|
@@ -637,6 +637,11 @@ class z {
|
|
|
637
637
|
* @param {boolean} [options.consolidationFirst=false] - When true (NEURO-1d), surface a
|
|
638
638
|
* consolidated summary above the scattered source memories it consolidates — best for
|
|
639
639
|
* synthesis queries. Opt-in; implies includeConsolidated.
|
|
640
|
+
* @param {string|Date|null} [options.asOfDate=null] - Transaction-time travel
|
|
641
|
+
* (PLAT-AUDITABLE-MEMORY-1): return what the system believed at this
|
|
642
|
+
* ISO-8601 instant. Date objects serialize to ISO automatically.
|
|
643
|
+
* @param {boolean} [options.includeSuperseded=false] - Keep superseded items
|
|
644
|
+
* visible in results (PLAT-AUDITABLE-MEMORY-1).
|
|
640
645
|
* @param {boolean} [options.cite=false] - When true (RECALL-CITATIONS-1), the
|
|
641
646
|
* envelope gains a `citations` array of `{n, item_id, item_type, preview, score, footnote_marker}`.
|
|
642
647
|
* Empty `citations: []` when no results — distinguishes "no results" from "no citations requested".
|
|
@@ -649,9 +654,25 @@ class z {
|
|
|
649
654
|
* present only under `cite: true`. Pre-LINEAGE-1 callers who indexed into a
|
|
650
655
|
* bare array must read `response.results` instead.
|
|
651
656
|
*/
|
|
652
|
-
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:
|
|
653
|
-
const
|
|
654
|
-
return r && (
|
|
657
|
+
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: m = 3, budgetMs: p = 1500, semanticHops: $ = !1, includeReference: k = !1, includeConsolidated: U = !1, consolidationFirst: A = !1, asOfDate: g = null, includeSuperseded: C = !1 } = {}) {
|
|
658
|
+
const u = { query: e, top_k: t, enable_hybrid: s };
|
|
659
|
+
return r && (u.memory_type = r), n && (u.expertise = !0), i && (u.cite = !0), o && (u.decompose = !0), c && (u.multi_hop = !0), c && m !== 3 && (u.max_hops = m), c && p !== 1500 && (u.budget_ms = p), c && $ && (u.semantic_hops = !0), k && (u.include_reference = !0), U && (u.include_consolidated = !0), A && (u.consolidation_first = !0), g && (u.as_of_date = g instanceof Date ? g.toISOString() : g), C && (u.include_superseded = !0), this.api.post("/memory/search", u);
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Get the complete audit answer for one memory (PLAT-AUDITABLE-MEMORY-1).
|
|
663
|
+
*
|
|
664
|
+
* Returns the explain-contract shape: identity + origin tier, every belief
|
|
665
|
+
* the system held over time (with chain hashes), supersession in both
|
|
666
|
+
* directions, lineage roots, decision provenance, and chain verification.
|
|
667
|
+
* A `chain_verified` of `null` means nothing to verify (legacy or
|
|
668
|
+
* unversioned) — it is NOT a tamper warning.
|
|
669
|
+
*
|
|
670
|
+
* @param {string} memoryId - Memory item ID.
|
|
671
|
+
* @returns {Promise<object>} Explain response
|
|
672
|
+
* (docs/features/PLAT-AUDITABLE-MEMORY-1/explain-contract.json).
|
|
673
|
+
*/
|
|
674
|
+
async explain(e) {
|
|
675
|
+
return this.api.get(`/memory/${encodeURIComponent(e)}/explain`);
|
|
655
676
|
}
|
|
656
677
|
async getWorkingContext(e, t, { k: s = 20, maxTokens: r = null, strategy: n = null } = {}) {
|
|
657
678
|
const i = {
|
|
@@ -827,7 +848,7 @@ class z {
|
|
|
827
848
|
return this.api.get("/memory/clustering/stats");
|
|
828
849
|
}
|
|
829
850
|
}
|
|
830
|
-
class
|
|
851
|
+
class O {
|
|
831
852
|
constructor(e) {
|
|
832
853
|
this.api = e;
|
|
833
854
|
}
|
|
@@ -855,10 +876,10 @@ class E {
|
|
|
855
876
|
evidenceIds: i = null,
|
|
856
877
|
domain: o = null,
|
|
857
878
|
tags: c = null,
|
|
858
|
-
rejectedAlternatives:
|
|
879
|
+
rejectedAlternatives: m = null,
|
|
859
880
|
rationale: p = null,
|
|
860
|
-
constraints:
|
|
861
|
-
agentId:
|
|
881
|
+
constraints: $ = null,
|
|
882
|
+
agentId: k = null
|
|
862
883
|
}) {
|
|
863
884
|
return this.api.post("/memory/decisions/create", {
|
|
864
885
|
content: e,
|
|
@@ -869,10 +890,10 @@ class E {
|
|
|
869
890
|
evidence_ids: i,
|
|
870
891
|
domain: o,
|
|
871
892
|
tags: c,
|
|
872
|
-
rejected_alternatives:
|
|
893
|
+
rejected_alternatives: m,
|
|
873
894
|
rationale: p,
|
|
874
|
-
constraints:
|
|
875
|
-
agent_id:
|
|
895
|
+
constraints: $,
|
|
896
|
+
agent_id: k
|
|
876
897
|
});
|
|
877
898
|
}
|
|
878
899
|
/**
|
|
@@ -1045,7 +1066,7 @@ class E {
|
|
|
1045
1066
|
});
|
|
1046
1067
|
}
|
|
1047
1068
|
}
|
|
1048
|
-
class
|
|
1069
|
+
class F {
|
|
1049
1070
|
constructor(e) {
|
|
1050
1071
|
this.api = e;
|
|
1051
1072
|
}
|
|
@@ -1067,7 +1088,7 @@ class x {
|
|
|
1067
1088
|
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);
|
|
1068
1089
|
}
|
|
1069
1090
|
}
|
|
1070
|
-
class
|
|
1091
|
+
class j {
|
|
1071
1092
|
constructor(e) {
|
|
1072
1093
|
this.api = e;
|
|
1073
1094
|
}
|
|
@@ -1202,7 +1223,7 @@ class O {
|
|
|
1202
1223
|
);
|
|
1203
1224
|
}
|
|
1204
1225
|
}
|
|
1205
|
-
class
|
|
1226
|
+
class H {
|
|
1206
1227
|
constructor(e) {
|
|
1207
1228
|
this.api = e;
|
|
1208
1229
|
}
|
|
@@ -1244,7 +1265,7 @@ class F {
|
|
|
1244
1265
|
return this.api.delete(`/memory/teams/${e}/members/${t}`);
|
|
1245
1266
|
}
|
|
1246
1267
|
}
|
|
1247
|
-
class
|
|
1268
|
+
class B {
|
|
1248
1269
|
constructor(e) {
|
|
1249
1270
|
this.api = e;
|
|
1250
1271
|
}
|
|
@@ -1266,7 +1287,7 @@ class j {
|
|
|
1266
1287
|
return this.api.patch("/auth/llm-keys", e);
|
|
1267
1288
|
}
|
|
1268
1289
|
}
|
|
1269
|
-
class
|
|
1290
|
+
class K {
|
|
1270
1291
|
constructor(e) {
|
|
1271
1292
|
this.api = e;
|
|
1272
1293
|
}
|
|
@@ -1292,7 +1313,7 @@ class H {
|
|
|
1292
1313
|
});
|
|
1293
1314
|
}
|
|
1294
1315
|
}
|
|
1295
|
-
class
|
|
1316
|
+
class G {
|
|
1296
1317
|
constructor(e) {
|
|
1297
1318
|
this.api = e;
|
|
1298
1319
|
}
|
|
@@ -1313,7 +1334,7 @@ class B {
|
|
|
1313
1334
|
return this.api.delete(`/memory/api-keys/${e}`);
|
|
1314
1335
|
}
|
|
1315
1336
|
}
|
|
1316
|
-
class
|
|
1337
|
+
class N {
|
|
1317
1338
|
constructor(e) {
|
|
1318
1339
|
this.api = e;
|
|
1319
1340
|
}
|
|
@@ -1372,7 +1393,7 @@ class K {
|
|
|
1372
1393
|
return this.api.get(`/memory/agents/${e}/evaluation/history${n ? "?" + n : ""}`);
|
|
1373
1394
|
}
|
|
1374
1395
|
}
|
|
1375
|
-
class
|
|
1396
|
+
class D {
|
|
1376
1397
|
constructor(e) {
|
|
1377
1398
|
this.api = e;
|
|
1378
1399
|
}
|
|
@@ -1386,7 +1407,7 @@ class G {
|
|
|
1386
1407
|
return this.api.get("/usage/tiers");
|
|
1387
1408
|
}
|
|
1388
1409
|
}
|
|
1389
|
-
class
|
|
1410
|
+
class J {
|
|
1390
1411
|
constructor(e) {
|
|
1391
1412
|
this.api = e;
|
|
1392
1413
|
}
|
|
@@ -1403,7 +1424,7 @@ class D {
|
|
|
1403
1424
|
return this.api.get("/memory/plugins");
|
|
1404
1425
|
}
|
|
1405
1426
|
}
|
|
1406
|
-
class
|
|
1427
|
+
class W {
|
|
1407
1428
|
constructor(e) {
|
|
1408
1429
|
this.api = e;
|
|
1409
1430
|
}
|
|
@@ -1426,7 +1447,7 @@ class N {
|
|
|
1426
1447
|
return this.api.get("/memory/token-usage/current");
|
|
1427
1448
|
}
|
|
1428
1449
|
}
|
|
1429
|
-
class
|
|
1450
|
+
class V {
|
|
1430
1451
|
constructor(e) {
|
|
1431
1452
|
this.api = e;
|
|
1432
1453
|
}
|
|
@@ -1572,7 +1593,7 @@ class J {
|
|
|
1572
1593
|
return this.api.get(`/memory/temporal/relationships/${e}/valid-periods`);
|
|
1573
1594
|
}
|
|
1574
1595
|
}
|
|
1575
|
-
class
|
|
1596
|
+
class Y {
|
|
1576
1597
|
constructor(e) {
|
|
1577
1598
|
this.api = e;
|
|
1578
1599
|
}
|
|
@@ -1641,7 +1662,7 @@ class W {
|
|
|
1641
1662
|
return this.api.get("/memory/governance/summary");
|
|
1642
1663
|
}
|
|
1643
1664
|
}
|
|
1644
|
-
class
|
|
1665
|
+
class Z {
|
|
1645
1666
|
constructor(e) {
|
|
1646
1667
|
this.api = e;
|
|
1647
1668
|
}
|
|
@@ -1682,7 +1703,7 @@ class V {
|
|
|
1682
1703
|
return this.api.post("/memory/evolution/reinforce/opinions");
|
|
1683
1704
|
}
|
|
1684
1705
|
}
|
|
1685
|
-
class
|
|
1706
|
+
class Q {
|
|
1686
1707
|
constructor(e) {
|
|
1687
1708
|
this.api = e;
|
|
1688
1709
|
}
|
|
@@ -1780,7 +1801,7 @@ class Y {
|
|
|
1780
1801
|
});
|
|
1781
1802
|
}
|
|
1782
1803
|
}
|
|
1783
|
-
class
|
|
1804
|
+
class X {
|
|
1784
1805
|
constructor(e) {
|
|
1785
1806
|
this.api = e;
|
|
1786
1807
|
}
|
|
@@ -1834,7 +1855,7 @@ class Z {
|
|
|
1834
1855
|
return this.api.get(`/memory/reasoning/traces/${e}`);
|
|
1835
1856
|
}
|
|
1836
1857
|
}
|
|
1837
|
-
class
|
|
1858
|
+
class ee {
|
|
1838
1859
|
constructor(e) {
|
|
1839
1860
|
this.api = e;
|
|
1840
1861
|
}
|
|
@@ -2404,7 +2425,7 @@ class Q {
|
|
|
2404
2425
|
return r !== void 0 && (n.expected_tier = r), this.api.post("/memory/ontology/queue/bulk", n);
|
|
2405
2426
|
}
|
|
2406
2427
|
}
|
|
2407
|
-
class
|
|
2428
|
+
class te {
|
|
2408
2429
|
constructor(e) {
|
|
2409
2430
|
this.api = e;
|
|
2410
2431
|
}
|
|
@@ -2433,7 +2454,7 @@ class X {
|
|
|
2433
2454
|
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);
|
|
2434
2455
|
}
|
|
2435
2456
|
}
|
|
2436
|
-
class
|
|
2457
|
+
class se {
|
|
2437
2458
|
constructor(e) {
|
|
2438
2459
|
this.api = e;
|
|
2439
2460
|
}
|
|
@@ -2469,7 +2490,7 @@ class ee {
|
|
|
2469
2490
|
return this.api.get("/memory/inference/rules");
|
|
2470
2491
|
}
|
|
2471
2492
|
}
|
|
2472
|
-
class
|
|
2493
|
+
class re {
|
|
2473
2494
|
constructor(e) {
|
|
2474
2495
|
this.api = e;
|
|
2475
2496
|
}
|
|
@@ -2585,7 +2606,7 @@ class te {
|
|
|
2585
2606
|
return this.api.delete(`/memory/pipeline/configs/${e}`);
|
|
2586
2607
|
}
|
|
2587
2608
|
}
|
|
2588
|
-
class
|
|
2609
|
+
class ne {
|
|
2589
2610
|
constructor(e) {
|
|
2590
2611
|
this.api = e;
|
|
2591
2612
|
}
|
|
@@ -2611,7 +2632,7 @@ class se {
|
|
|
2611
2632
|
return this.api.get(`/memory/archive/${e}`);
|
|
2612
2633
|
}
|
|
2613
2634
|
}
|
|
2614
|
-
class
|
|
2635
|
+
class ie {
|
|
2615
2636
|
constructor(e) {
|
|
2616
2637
|
this.api = e;
|
|
2617
2638
|
}
|
|
@@ -2770,7 +2791,7 @@ class re {
|
|
|
2770
2791
|
return this.api.get(`/memory/zettel/by-relation/${e}/${t}?limit=${s}`);
|
|
2771
2792
|
}
|
|
2772
2793
|
}
|
|
2773
|
-
class
|
|
2794
|
+
class ae {
|
|
2774
2795
|
constructor(e) {
|
|
2775
2796
|
this.api = e;
|
|
2776
2797
|
}
|
|
@@ -2806,7 +2827,7 @@ class ne {
|
|
|
2806
2827
|
return this.api.get("/memory/procedures/matches/stats");
|
|
2807
2828
|
}
|
|
2808
2829
|
}
|
|
2809
|
-
class
|
|
2830
|
+
class oe {
|
|
2810
2831
|
constructor(e) {
|
|
2811
2832
|
this.api = e;
|
|
2812
2833
|
}
|
|
@@ -2855,7 +2876,7 @@ class ie {
|
|
|
2855
2876
|
return this.api.delete(`/memory/procedures/candidates/${e}/dismiss`);
|
|
2856
2877
|
}
|
|
2857
2878
|
}
|
|
2858
|
-
class
|
|
2879
|
+
class ce {
|
|
2859
2880
|
constructor(e) {
|
|
2860
2881
|
this.api = e;
|
|
2861
2882
|
}
|
|
@@ -2910,7 +2931,7 @@ class ae {
|
|
|
2910
2931
|
return this.api.get(`/memory/procedures/schemas/${e}`);
|
|
2911
2932
|
}
|
|
2912
2933
|
}
|
|
2913
|
-
class
|
|
2934
|
+
class ue {
|
|
2914
2935
|
constructor(e) {
|
|
2915
2936
|
this.api = e;
|
|
2916
2937
|
}
|
|
@@ -2982,11 +3003,11 @@ class oe {
|
|
|
2982
3003
|
return this.api.delete(`/memory/summary/${e}`);
|
|
2983
3004
|
}
|
|
2984
3005
|
}
|
|
2985
|
-
class
|
|
3006
|
+
class le {
|
|
2986
3007
|
constructor(e) {
|
|
2987
|
-
this.auth = new
|
|
2988
|
-
const t = new
|
|
2989
|
-
this._api = t, this.memories = new
|
|
3008
|
+
this.auth = new z(e);
|
|
3009
|
+
const t = new E(this.auth, { fetchFn: e.fetchFn });
|
|
3010
|
+
this._api = t, this.memories = new x(t), this.decisions = new O(t), this.opinions = new F(t), this.graph = new j(t), this.teams = new H(t), this.profiles = new B(t), this.subscriptions = new K(t), this.authAPI = new G(t), this.agents = new N(t), this.usage = new D(t), this.insights = new J(t), this.tokenUsage = new W(t), this.temporal = new V(t), this.governance = new Y(t), this.evolution = new Z(t), this.reasoning = new Q(t), this.reasoningTraces = new X(t), this.ontology = new ee(t), this.analytics = new te(t), this.validation = new se(t), this.pipeline = new re(t), this.archive = new ne(t), this.zettelkasten = new ie(t), this.procedureMatches = new ae(t), this.procedureCandidates = new oe(t), this.procedureDrift = new ce(t), this.summaries = new ue(t);
|
|
2990
3011
|
}
|
|
2991
3012
|
setTeamId(e) {
|
|
2992
3013
|
this.auth.tokenManager.setTeamId(e), this.auth.notifyListeners();
|
|
@@ -3013,35 +3034,35 @@ class me {
|
|
|
3013
3034
|
}
|
|
3014
3035
|
export {
|
|
3015
3036
|
h as A,
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
j,
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3037
|
+
E as B,
|
|
3038
|
+
O as D,
|
|
3039
|
+
Z as E,
|
|
3040
|
+
Y as G,
|
|
3041
|
+
J as I,
|
|
3042
|
+
x as M,
|
|
3043
|
+
ee as O,
|
|
3044
|
+
re as P,
|
|
3045
|
+
Q as R,
|
|
3046
|
+
le as S,
|
|
3047
|
+
H as T,
|
|
3048
|
+
D as U,
|
|
3049
|
+
se as V,
|
|
3050
|
+
ie as Z,
|
|
3051
|
+
N as a,
|
|
3052
|
+
te as b,
|
|
3053
|
+
ne as c,
|
|
3054
|
+
G as d,
|
|
3055
|
+
z as e,
|
|
3056
|
+
j as f,
|
|
3057
|
+
F as g,
|
|
3058
|
+
oe as h,
|
|
3059
|
+
ae as i,
|
|
3060
|
+
B as j,
|
|
3061
|
+
X as k,
|
|
3062
|
+
K as l,
|
|
3063
|
+
V as m,
|
|
3064
|
+
L as n,
|
|
3065
|
+
W as o,
|
|
3066
|
+
q as p,
|
|
3067
|
+
M as q
|
|
3047
3068
|
};
|
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-
|
|
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";
|
|
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-
|
|
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";
|
|
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 I, useState as p, useEffect as C, useCallback as c, useContext as g } from "react";
|
|
2
|
-
import { S as y } from "./core-
|
|
2
|
+
import { S as y } from "./core-BEScfRuq.js";
|
|
3
3
|
const m = d(null), f = d(null);
|
|
4
4
|
function b({ children: e, ...r }) {
|
|
5
5
|
const n = I(null);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartmemory/sdk-js",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "Unified JavaScript SDK for SmartMemory API
|
|
3
|
+
"version": "1.4.59",
|
|
4
|
+
"description": "Unified JavaScript SDK for SmartMemory API — auth + API client for all frontends",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|