@smartmemory/sdk-js 1.4.32 → 1.4.36
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 +1 -1
- package/dist/{core-sjVwMmLA.js → core-Cv-xIq3O.js} +37 -10
- package/dist/core.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -200,7 +200,7 @@ client.teams.removeMember(teamId, userId);
|
|
|
200
200
|
client.profiles.list();
|
|
201
201
|
client.profiles.get('default');
|
|
202
202
|
client.profiles.getLLMKeys();
|
|
203
|
-
client.profiles.updateLLMKeys({
|
|
203
|
+
client.profiles.updateLLMKeys({ openai_key: 'sk-...', gemini_key: 'AIza...' });
|
|
204
204
|
|
|
205
205
|
// Subscriptions
|
|
206
206
|
client.subscriptions.getCurrent();
|
|
@@ -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,
|
|
151
|
+
var m, d, v;
|
|
152
152
|
class P {
|
|
153
153
|
/**
|
|
154
154
|
* @param {Object} options
|
|
@@ -167,7 +167,7 @@ class P {
|
|
|
167
167
|
async refresh() {
|
|
168
168
|
if (p(this, m))
|
|
169
169
|
return p(this, m);
|
|
170
|
-
w(this, m, S(this, d,
|
|
170
|
+
w(this, m, S(this, d, v).call(this));
|
|
171
171
|
try {
|
|
172
172
|
return await p(this, m);
|
|
173
173
|
} finally {
|
|
@@ -175,7 +175,7 @@ class P {
|
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
m = new WeakMap(), d = new WeakSet(),
|
|
178
|
+
m = new WeakMap(), d = 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");
|
|
@@ -563,9 +563,9 @@ class z {
|
|
|
563
563
|
* present only under `cite: true`. Pre-LINEAGE-1 callers who indexed into a
|
|
564
564
|
* bare array must read `response.results` instead.
|
|
565
565
|
*/
|
|
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:
|
|
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
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),
|
|
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);
|
|
569
569
|
}
|
|
570
570
|
async getWorkingContext(e, t, { k: s = 20, maxTokens: r = null, strategy: n = null } = {}) {
|
|
571
571
|
const a = {
|
|
@@ -1103,6 +1103,11 @@ class j {
|
|
|
1103
1103
|
async getLLMKeys() {
|
|
1104
1104
|
return this.api.get("/auth/llm-keys");
|
|
1105
1105
|
}
|
|
1106
|
+
/**
|
|
1107
|
+
* Update the user's LLM provider API keys. Keys are passed through to
|
|
1108
|
+
* PATCH /auth/llm-keys; supply only the providers you want to set.
|
|
1109
|
+
* @param {Object} keys - any of: openai_key, anthropic_key, groq_key, gemini_key
|
|
1110
|
+
*/
|
|
1106
1111
|
async updateLLMKeys(e) {
|
|
1107
1112
|
return this.api.patch("/auth/llm-keys", e);
|
|
1108
1113
|
}
|
|
@@ -1133,7 +1138,7 @@ class F {
|
|
|
1133
1138
|
});
|
|
1134
1139
|
}
|
|
1135
1140
|
}
|
|
1136
|
-
class
|
|
1141
|
+
class H {
|
|
1137
1142
|
constructor(e) {
|
|
1138
1143
|
this.api = e;
|
|
1139
1144
|
}
|
|
@@ -1154,7 +1159,7 @@ class K {
|
|
|
1154
1159
|
return this.api.delete(`/memory/api-keys/${e}`);
|
|
1155
1160
|
}
|
|
1156
1161
|
}
|
|
1157
|
-
class
|
|
1162
|
+
class K {
|
|
1158
1163
|
constructor(e) {
|
|
1159
1164
|
this.api = e;
|
|
1160
1165
|
}
|
|
@@ -2042,6 +2047,28 @@ class Z {
|
|
|
2042
2047
|
async getUpdateStats({ history: e = !1 } = {}) {
|
|
2043
2048
|
return this.api.get(`/memory/ontology/updates/stats?history=${e}`);
|
|
2044
2049
|
}
|
|
2050
|
+
// --- HITL queue consumer (ONTO-HITL-CONSUMER-1) ---------------------------
|
|
2051
|
+
/**
|
|
2052
|
+
* List ontology HITL queue items for the caller's workspace.
|
|
2053
|
+
* @param {Object} [options]
|
|
2054
|
+
* @param {('open'|'resolved')} [options.status='open']
|
|
2055
|
+
* @param {string} [options.kind] missing_in_graph | missing_in_registry | name_conflict_unresolvable
|
|
2056
|
+
* @param {number} [options.limit=50]
|
|
2057
|
+
*/
|
|
2058
|
+
async listHitl({ status: e = "open", kind: t = null, limit: s = 50 } = {}) {
|
|
2059
|
+
const r = new URLSearchParams({ status: e, limit: String(s) });
|
|
2060
|
+
return t && r.set("kind", t), this.api.get(`/memory/ontology/hitl?${r.toString()}`);
|
|
2061
|
+
}
|
|
2062
|
+
/**
|
|
2063
|
+
* Resolve one ontology HITL queue item (open -> resolved).
|
|
2064
|
+
* @param {string} itemId
|
|
2065
|
+
* @param {Object} body
|
|
2066
|
+
* @param {('accepted'|'dismissed'|'deferred')} body.action
|
|
2067
|
+
* @param {string} [body.note]
|
|
2068
|
+
*/
|
|
2069
|
+
async resolveHitl(e, { action: t, note: s = null }) {
|
|
2070
|
+
return this.api.post(`/memory/ontology/hitl/${e}/resolve`, { action: t, note: s });
|
|
2071
|
+
}
|
|
2045
2072
|
}
|
|
2046
2073
|
class X {
|
|
2047
2074
|
constructor(e) {
|
|
@@ -2625,7 +2652,7 @@ class ce {
|
|
|
2625
2652
|
constructor(e) {
|
|
2626
2653
|
this.auth = new M(e);
|
|
2627
2654
|
const t = new L(this.auth, { fetchFn: e.fetchFn });
|
|
2628
|
-
this.memories = new z(t), this.decisions = new E(t), this.opinions = new x(t), this.graph = new O(t), this.teams = new q(t), this.profiles = new j(t), this.subscriptions = new F(t), this.authAPI = new
|
|
2655
|
+
this.memories = new z(t), this.decisions = new E(t), this.opinions = new x(t), this.graph = new O(t), this.teams = new q(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);
|
|
2629
2656
|
}
|
|
2630
2657
|
setTeamId(e) {
|
|
2631
2658
|
this.auth.tokenManager.setTeamId(e), this.auth.notifyListeners();
|
|
@@ -2650,10 +2677,10 @@ export {
|
|
|
2650
2677
|
B as U,
|
|
2651
2678
|
Q as V,
|
|
2652
2679
|
se as Z,
|
|
2653
|
-
|
|
2680
|
+
K as a,
|
|
2654
2681
|
X as b,
|
|
2655
2682
|
te as c,
|
|
2656
|
-
|
|
2683
|
+
H as d,
|
|
2657
2684
|
M as e,
|
|
2658
2685
|
O as f,
|
|
2659
2686
|
x as g,
|
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-Cv-xIq3O.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-Cv-xIq3O.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-
|
|
2
|
+
import { S as x } from "./core-Cv-xIq3O.js";
|
|
3
3
|
const m = d(null), g = d(null);
|
|
4
4
|
function U({ children: e, ...r }) {
|
|
5
5
|
const n = y(null);
|