@smartmemory/sdk-js 1.4.36 → 1.4.37
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-Cv-xIq3O.js → core-C_2OxSk3.js} +50 -12
- package/dist/core.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
|
@@ -810,6 +810,44 @@ class E {
|
|
|
810
810
|
async listPending(e = 50) {
|
|
811
811
|
return this.api.get(`/memory/decisions/pending?limit=${e}`);
|
|
812
812
|
}
|
|
813
|
+
/**
|
|
814
|
+
* Create a new pending decision awaiting requirements to be resolved.
|
|
815
|
+
* @param {Object} params
|
|
816
|
+
* @param {string} params.content
|
|
817
|
+
* @param {Array} params.requirements - List of requirement objects
|
|
818
|
+
* @param {string} [params.domain]
|
|
819
|
+
* @param {string[]} [params.tags]
|
|
820
|
+
* @param {string} [params.agentId]
|
|
821
|
+
*/
|
|
822
|
+
async createPending({ content: e, requirements: t, domain: s = null, tags: r = null, agentId: n = null }) {
|
|
823
|
+
return this.api.post("/memory/decisions/pending/create", {
|
|
824
|
+
content: e,
|
|
825
|
+
requirements: t,
|
|
826
|
+
domain: s,
|
|
827
|
+
tags: r,
|
|
828
|
+
agent_id: n
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* Resolve a requirement on a pending decision.
|
|
833
|
+
* @param {string} decisionId
|
|
834
|
+
* @param {Object} params
|
|
835
|
+
* @param {string} params.requirementId
|
|
836
|
+
* @param {string} params.memoryId
|
|
837
|
+
*/
|
|
838
|
+
async resolveRequirement(e, { requirementId: t, memoryId: s }) {
|
|
839
|
+
return this.api.post(`/memory/decisions/pending/${e}/resolve`, {
|
|
840
|
+
requirement_id: t,
|
|
841
|
+
memory_id: s
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Try to activate a pending decision when all requirements are resolved.
|
|
846
|
+
* @param {string} decisionId
|
|
847
|
+
*/
|
|
848
|
+
async tryActivate(e) {
|
|
849
|
+
return this.api.post(`/memory/decisions/pending/${e}/activate`, {});
|
|
850
|
+
}
|
|
813
851
|
/**
|
|
814
852
|
* Retrieve a decision by ID.
|
|
815
853
|
* @param {string} decisionId
|
|
@@ -927,7 +965,7 @@ class x {
|
|
|
927
965
|
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);
|
|
928
966
|
}
|
|
929
967
|
}
|
|
930
|
-
class
|
|
968
|
+
class q {
|
|
931
969
|
constructor(e) {
|
|
932
970
|
this.api = e;
|
|
933
971
|
}
|
|
@@ -946,11 +984,11 @@ class O {
|
|
|
946
984
|
return this.api.get("/memory/graph/health");
|
|
947
985
|
}
|
|
948
986
|
async getInferenceRules() {
|
|
949
|
-
return this.api.get("/memory/
|
|
987
|
+
return this.api.get("/memory/inference/rules");
|
|
950
988
|
}
|
|
951
|
-
async runInference(e =
|
|
952
|
-
return this.api.post("/memory/
|
|
953
|
-
|
|
989
|
+
async runInference({ dryRun: e = !1 } = {}) {
|
|
990
|
+
return this.api.post("/memory/inference", {
|
|
991
|
+
dry_run: e
|
|
954
992
|
});
|
|
955
993
|
}
|
|
956
994
|
/**
|
|
@@ -1050,7 +1088,7 @@ class O {
|
|
|
1050
1088
|
);
|
|
1051
1089
|
}
|
|
1052
1090
|
}
|
|
1053
|
-
class
|
|
1091
|
+
class O {
|
|
1054
1092
|
constructor(e) {
|
|
1055
1093
|
this.api = e;
|
|
1056
1094
|
}
|
|
@@ -2114,7 +2152,7 @@ class Q {
|
|
|
2114
2152
|
* @param {string} itemId
|
|
2115
2153
|
*/
|
|
2116
2154
|
async validateItem(e) {
|
|
2117
|
-
return this.api.post("/memory/
|
|
2155
|
+
return this.api.post("/memory/validate", {
|
|
2118
2156
|
item_id: e
|
|
2119
2157
|
});
|
|
2120
2158
|
}
|
|
@@ -2124,7 +2162,7 @@ class Q {
|
|
|
2124
2162
|
* @param {boolean} [options.dryRun=false]
|
|
2125
2163
|
*/
|
|
2126
2164
|
async runInference({ dryRun: e = !1 } = {}) {
|
|
2127
|
-
return this.api.post("/memory/
|
|
2165
|
+
return this.api.post("/memory/inference", {
|
|
2128
2166
|
dry_run: e
|
|
2129
2167
|
});
|
|
2130
2168
|
}
|
|
@@ -2132,7 +2170,7 @@ class Q {
|
|
|
2132
2170
|
* List available inference rules.
|
|
2133
2171
|
*/
|
|
2134
2172
|
async getInferenceRules() {
|
|
2135
|
-
return this.api.get("/memory/
|
|
2173
|
+
return this.api.get("/memory/inference/rules");
|
|
2136
2174
|
}
|
|
2137
2175
|
}
|
|
2138
2176
|
class ee {
|
|
@@ -2652,7 +2690,7 @@ class ce {
|
|
|
2652
2690
|
constructor(e) {
|
|
2653
2691
|
this.auth = new M(e);
|
|
2654
2692
|
const t = new L(this.auth, { fetchFn: e.fetchFn });
|
|
2655
|
-
this.memories = new z(t), this.decisions = new E(t), this.opinions = new x(t), this.graph = new
|
|
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);
|
|
2656
2694
|
}
|
|
2657
2695
|
setTeamId(e) {
|
|
2658
2696
|
this.auth.tokenManager.setTeamId(e), this.auth.notifyListeners();
|
|
@@ -2673,7 +2711,7 @@ export {
|
|
|
2673
2711
|
ee as P,
|
|
2674
2712
|
W as R,
|
|
2675
2713
|
ce as S,
|
|
2676
|
-
|
|
2714
|
+
O as T,
|
|
2677
2715
|
B as U,
|
|
2678
2716
|
Q as V,
|
|
2679
2717
|
se as Z,
|
|
@@ -2682,7 +2720,7 @@ export {
|
|
|
2682
2720
|
te as c,
|
|
2683
2721
|
H as d,
|
|
2684
2722
|
M as e,
|
|
2685
|
-
|
|
2723
|
+
q as f,
|
|
2686
2724
|
x as g,
|
|
2687
2725
|
ne as h,
|
|
2688
2726
|
re as i,
|
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-C_2OxSk3.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-C_2OxSk3.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-C_2OxSk3.js";
|
|
3
3
|
const m = d(null), g = d(null);
|
|
4
4
|
function U({ children: e, ...r }) {
|
|
5
5
|
const n = y(null);
|