mindgraph 0.1.0 → 0.1.2
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/index.d.mts +72 -51
- package/dist/index.d.ts +72 -51
- package/dist/index.js +10 -2
- package/dist/index.mjs +10 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -41,19 +41,16 @@ interface PathStep {
|
|
|
41
41
|
interface IngestRequest {
|
|
42
42
|
action: "source" | "snippet" | "observation";
|
|
43
43
|
label: string;
|
|
44
|
-
|
|
44
|
+
summary?: string;
|
|
45
45
|
source_uid?: string;
|
|
46
|
-
medium?: string;
|
|
47
|
-
url?: string;
|
|
48
|
-
timestamp?: number;
|
|
49
46
|
confidence?: number;
|
|
50
47
|
salience?: number;
|
|
48
|
+
props?: Record<string, unknown>;
|
|
51
49
|
agent_id?: string;
|
|
52
50
|
}
|
|
53
51
|
interface EntityRequest {
|
|
54
52
|
action: "create" | "alias" | "resolve" | "fuzzy_resolve" | "merge" | "relate";
|
|
55
53
|
label?: string;
|
|
56
|
-
entity_type?: string;
|
|
57
54
|
text?: string;
|
|
58
55
|
canonical_uid?: string;
|
|
59
56
|
alias_score?: number;
|
|
@@ -63,50 +60,54 @@ interface EntityRequest {
|
|
|
63
60
|
source_uid?: string;
|
|
64
61
|
target_uid?: string;
|
|
65
62
|
edge_type?: string;
|
|
63
|
+
props?: Record<string, unknown>;
|
|
66
64
|
agent_id?: string;
|
|
67
65
|
}
|
|
68
66
|
interface ArgumentRequest {
|
|
69
67
|
claim: {
|
|
70
68
|
label: string;
|
|
71
|
-
content: string;
|
|
72
69
|
confidence?: number;
|
|
70
|
+
props?: Record<string, unknown>;
|
|
73
71
|
};
|
|
74
72
|
evidence?: {
|
|
75
73
|
label: string;
|
|
76
|
-
|
|
77
|
-
evidence_type?: string;
|
|
74
|
+
props?: Record<string, unknown>;
|
|
78
75
|
}[];
|
|
79
76
|
warrant?: {
|
|
80
77
|
label: string;
|
|
81
|
-
|
|
78
|
+
props?: Record<string, unknown>;
|
|
82
79
|
};
|
|
83
80
|
argument?: {
|
|
84
81
|
label: string;
|
|
85
|
-
|
|
82
|
+
props?: Record<string, unknown>;
|
|
86
83
|
};
|
|
87
84
|
refutes_uid?: string;
|
|
88
85
|
extends_uid?: string;
|
|
86
|
+
supersedes_uid?: string;
|
|
87
|
+
contradicts_uid?: string;
|
|
89
88
|
source_uids?: string[];
|
|
89
|
+
props?: Record<string, unknown>;
|
|
90
90
|
agent_id?: string;
|
|
91
91
|
}
|
|
92
92
|
interface InquiryRequest {
|
|
93
93
|
action: "hypothesis" | "theory" | "paradigm" | "anomaly" | "assumption" | "question" | "open_question";
|
|
94
94
|
label: string;
|
|
95
|
-
|
|
96
|
-
status?: string;
|
|
95
|
+
summary?: string;
|
|
97
96
|
anomalous_to_uid?: string;
|
|
98
97
|
assumes_uid?: string[];
|
|
99
98
|
tests_uid?: string;
|
|
100
99
|
addresses_uid?: string;
|
|
100
|
+
supersedes_uid?: string;
|
|
101
|
+
produces_uid?: string;
|
|
101
102
|
confidence?: number;
|
|
102
103
|
salience?: number;
|
|
103
104
|
related_uids?: string[];
|
|
105
|
+
props?: Record<string, unknown>;
|
|
104
106
|
agent_id?: string;
|
|
105
107
|
}
|
|
106
108
|
interface StructureRequest {
|
|
107
|
-
action: "concept" | "pattern" | "mechanism" | "model" | "model_evaluation" | "analogy" | "inference_chain" | "reasoning_strategy" | "sensitivity_analysis" | "theorem" | "equation";
|
|
109
|
+
action: "concept" | "pattern" | "mechanism" | "model" | "model_evaluation" | "analogy" | "inference_chain" | "reasoning_strategy" | "sensitivity_analysis" | "theorem" | "equation" | "method" | "experiment";
|
|
108
110
|
label: string;
|
|
109
|
-
content: string;
|
|
110
111
|
summary?: string;
|
|
111
112
|
analogous_to_uid?: string;
|
|
112
113
|
transfers_to_uid?: string[];
|
|
@@ -115,125 +116,137 @@ interface StructureRequest {
|
|
|
115
116
|
chain_steps?: string[];
|
|
116
117
|
derived_from_uid?: string[];
|
|
117
118
|
proven_by_uid?: string;
|
|
119
|
+
method_uid?: string;
|
|
120
|
+
describes_uid?: string;
|
|
121
|
+
part_of_uid?: string;
|
|
122
|
+
supersedes_uid?: string;
|
|
123
|
+
produces_uid?: string;
|
|
118
124
|
related_uids?: string[];
|
|
119
125
|
confidence?: number;
|
|
126
|
+
salience?: number;
|
|
127
|
+
props?: Record<string, unknown>;
|
|
120
128
|
agent_id?: string;
|
|
121
129
|
}
|
|
122
130
|
interface CommitmentRequest {
|
|
123
131
|
action: "goal" | "project" | "milestone";
|
|
124
132
|
label: string;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
133
|
+
summary?: string;
|
|
134
|
+
confidence?: number;
|
|
135
|
+
salience?: number;
|
|
128
136
|
parent_uid?: string;
|
|
129
|
-
due_date?: number;
|
|
130
137
|
motivated_by_uid?: string[];
|
|
138
|
+
props?: Record<string, unknown>;
|
|
131
139
|
agent_id?: string;
|
|
132
140
|
}
|
|
133
141
|
interface DeliberationRequest {
|
|
134
142
|
action: "open_decision" | "add_option" | "add_constraint" | "resolve" | "get_open";
|
|
135
143
|
label?: string;
|
|
136
|
-
|
|
144
|
+
summary?: string;
|
|
145
|
+
confidence?: number;
|
|
146
|
+
salience?: number;
|
|
137
147
|
decision_uid?: string;
|
|
138
148
|
chosen_option_uid?: string;
|
|
139
|
-
resolution_rationale?: string;
|
|
140
|
-
constraint_type?: string;
|
|
141
149
|
blocks_uid?: string;
|
|
142
150
|
informs_uid?: string[];
|
|
151
|
+
props?: Record<string, unknown>;
|
|
143
152
|
agent_id?: string;
|
|
144
153
|
}
|
|
145
154
|
interface ProcedureRequest {
|
|
146
155
|
action: "create_flow" | "add_step" | "add_affordance" | "add_control";
|
|
147
156
|
label: string;
|
|
148
|
-
|
|
157
|
+
summary?: string;
|
|
158
|
+
confidence?: number;
|
|
159
|
+
salience?: number;
|
|
149
160
|
flow_uid?: string;
|
|
150
|
-
step_order?: number;
|
|
151
161
|
previous_step_uid?: string;
|
|
152
|
-
affordance_type?: string;
|
|
153
|
-
control_type?: string;
|
|
154
162
|
uses_affordance_uids?: string[];
|
|
155
163
|
goal_uid?: string;
|
|
164
|
+
props?: Record<string, unknown>;
|
|
156
165
|
agent_id?: string;
|
|
157
166
|
}
|
|
158
167
|
interface RiskRequest {
|
|
159
168
|
action: "assess" | "get_assessments";
|
|
160
169
|
label?: string;
|
|
161
|
-
|
|
170
|
+
summary?: string;
|
|
171
|
+
confidence?: number;
|
|
172
|
+
salience?: number;
|
|
162
173
|
assessed_uid?: string;
|
|
163
|
-
severity?: string;
|
|
164
|
-
likelihood?: number;
|
|
165
|
-
mitigations?: string[];
|
|
166
|
-
residual_risk?: number;
|
|
167
174
|
filter_uid?: string;
|
|
175
|
+
props?: Record<string, unknown>;
|
|
168
176
|
agent_id?: string;
|
|
169
177
|
}
|
|
170
178
|
interface SessionRequest {
|
|
171
|
-
action: "open" | "trace" | "close";
|
|
179
|
+
action: "open" | "trace" | "close" | "journal";
|
|
172
180
|
label?: string;
|
|
173
|
-
|
|
181
|
+
summary?: string;
|
|
182
|
+
confidence?: number;
|
|
183
|
+
salience?: number;
|
|
174
184
|
session_uid?: string;
|
|
175
|
-
trace_content?: string;
|
|
176
|
-
trace_type?: string;
|
|
177
185
|
relevant_node_uids?: string[];
|
|
186
|
+
props?: Record<string, unknown>;
|
|
178
187
|
agent_id?: string;
|
|
179
188
|
}
|
|
180
189
|
interface DistillRequest {
|
|
181
190
|
label: string;
|
|
182
|
-
|
|
191
|
+
summary?: string;
|
|
192
|
+
confidence?: number;
|
|
193
|
+
salience?: number;
|
|
183
194
|
summarizes_uids?: string[];
|
|
184
195
|
session_uid?: string;
|
|
185
|
-
|
|
196
|
+
props?: Record<string, unknown>;
|
|
186
197
|
agent_id?: string;
|
|
187
198
|
}
|
|
188
199
|
interface MemoryConfigRequest {
|
|
189
200
|
action: "set_preference" | "get_preferences" | "set_policy" | "get_policies";
|
|
190
201
|
label?: string;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
202
|
+
summary?: string;
|
|
203
|
+
confidence?: number;
|
|
204
|
+
salience?: number;
|
|
205
|
+
props?: Record<string, unknown>;
|
|
194
206
|
agent_id?: string;
|
|
195
207
|
}
|
|
196
208
|
interface PlanRequest {
|
|
197
209
|
action: "create_task" | "create_plan" | "add_step" | "update_status" | "get_plan";
|
|
198
210
|
label?: string;
|
|
199
|
-
|
|
211
|
+
summary?: string;
|
|
212
|
+
confidence?: number;
|
|
213
|
+
salience?: number;
|
|
200
214
|
goal_uid?: string;
|
|
201
215
|
task_uid?: string;
|
|
202
216
|
plan_uid?: string;
|
|
203
|
-
step_order?: number;
|
|
204
217
|
depends_on_uids?: string[];
|
|
205
218
|
target_uid?: string;
|
|
206
219
|
status?: string;
|
|
207
220
|
related_uids?: string[];
|
|
221
|
+
props?: Record<string, unknown>;
|
|
208
222
|
agent_id?: string;
|
|
209
223
|
}
|
|
210
224
|
interface GovernanceRequest {
|
|
211
225
|
action: "create_policy" | "set_budget" | "request_approval" | "resolve_approval" | "get_pending";
|
|
212
226
|
label?: string;
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
227
|
+
summary?: string;
|
|
228
|
+
confidence?: number;
|
|
229
|
+
salience?: number;
|
|
216
230
|
governed_uid?: string;
|
|
217
231
|
approval_uid?: string;
|
|
218
232
|
approved?: boolean;
|
|
219
|
-
resolution_note?: string;
|
|
220
233
|
requires_plan_uid?: string;
|
|
221
|
-
|
|
234
|
+
props?: Record<string, unknown>;
|
|
222
235
|
agent_id?: string;
|
|
223
236
|
}
|
|
224
237
|
interface ExecutionRequest {
|
|
225
238
|
action: "start" | "complete" | "fail" | "register_agent" | "get_executions";
|
|
226
239
|
label?: string;
|
|
240
|
+
summary?: string;
|
|
241
|
+
confidence?: number;
|
|
242
|
+
salience?: number;
|
|
227
243
|
plan_uid?: string;
|
|
228
244
|
executor_uid?: string;
|
|
229
245
|
execution_uid?: string;
|
|
230
|
-
outcome?: string;
|
|
231
246
|
produces_node_uid?: string;
|
|
232
|
-
error_description?: string;
|
|
233
|
-
agent_name?: string;
|
|
234
|
-
agent_role?: string;
|
|
235
247
|
filter_plan_uid?: string;
|
|
236
248
|
related_uids?: string[];
|
|
249
|
+
props?: Record<string, unknown>;
|
|
237
250
|
agent_id?: string;
|
|
238
251
|
}
|
|
239
252
|
interface RetrieveRequest {
|
|
@@ -321,7 +334,7 @@ declare class MindGraph {
|
|
|
321
334
|
ingest(req: IngestRequest): Promise<unknown>;
|
|
322
335
|
entity(req: EntityRequest): Promise<unknown>;
|
|
323
336
|
/** Convenience: create or find an entity by label. */
|
|
324
|
-
findOrCreateEntity(label: string,
|
|
337
|
+
findOrCreateEntity(label: string, props?: Record<string, unknown>, agentId?: string): Promise<GraphNode & {
|
|
325
338
|
created: boolean;
|
|
326
339
|
}>;
|
|
327
340
|
argue(req: ArgumentRequest): Promise<unknown>;
|
|
@@ -332,6 +345,14 @@ declare class MindGraph {
|
|
|
332
345
|
procedure(req: ProcedureRequest): Promise<unknown>;
|
|
333
346
|
risk(req: RiskRequest): Promise<unknown>;
|
|
334
347
|
session(req: SessionRequest): Promise<unknown>;
|
|
348
|
+
journal(label: string, props: Record<string, unknown>, options?: {
|
|
349
|
+
summary?: string;
|
|
350
|
+
session_uid?: string;
|
|
351
|
+
relevant_node_uids?: string[];
|
|
352
|
+
confidence?: number;
|
|
353
|
+
salience?: number;
|
|
354
|
+
agent_id?: string;
|
|
355
|
+
}): Promise<unknown>;
|
|
335
356
|
distill(req: DistillRequest): Promise<unknown>;
|
|
336
357
|
memoryConfig(req: MemoryConfigRequest): Promise<unknown>;
|
|
337
358
|
plan(req: PlanRequest): Promise<unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -41,19 +41,16 @@ interface PathStep {
|
|
|
41
41
|
interface IngestRequest {
|
|
42
42
|
action: "source" | "snippet" | "observation";
|
|
43
43
|
label: string;
|
|
44
|
-
|
|
44
|
+
summary?: string;
|
|
45
45
|
source_uid?: string;
|
|
46
|
-
medium?: string;
|
|
47
|
-
url?: string;
|
|
48
|
-
timestamp?: number;
|
|
49
46
|
confidence?: number;
|
|
50
47
|
salience?: number;
|
|
48
|
+
props?: Record<string, unknown>;
|
|
51
49
|
agent_id?: string;
|
|
52
50
|
}
|
|
53
51
|
interface EntityRequest {
|
|
54
52
|
action: "create" | "alias" | "resolve" | "fuzzy_resolve" | "merge" | "relate";
|
|
55
53
|
label?: string;
|
|
56
|
-
entity_type?: string;
|
|
57
54
|
text?: string;
|
|
58
55
|
canonical_uid?: string;
|
|
59
56
|
alias_score?: number;
|
|
@@ -63,50 +60,54 @@ interface EntityRequest {
|
|
|
63
60
|
source_uid?: string;
|
|
64
61
|
target_uid?: string;
|
|
65
62
|
edge_type?: string;
|
|
63
|
+
props?: Record<string, unknown>;
|
|
66
64
|
agent_id?: string;
|
|
67
65
|
}
|
|
68
66
|
interface ArgumentRequest {
|
|
69
67
|
claim: {
|
|
70
68
|
label: string;
|
|
71
|
-
content: string;
|
|
72
69
|
confidence?: number;
|
|
70
|
+
props?: Record<string, unknown>;
|
|
73
71
|
};
|
|
74
72
|
evidence?: {
|
|
75
73
|
label: string;
|
|
76
|
-
|
|
77
|
-
evidence_type?: string;
|
|
74
|
+
props?: Record<string, unknown>;
|
|
78
75
|
}[];
|
|
79
76
|
warrant?: {
|
|
80
77
|
label: string;
|
|
81
|
-
|
|
78
|
+
props?: Record<string, unknown>;
|
|
82
79
|
};
|
|
83
80
|
argument?: {
|
|
84
81
|
label: string;
|
|
85
|
-
|
|
82
|
+
props?: Record<string, unknown>;
|
|
86
83
|
};
|
|
87
84
|
refutes_uid?: string;
|
|
88
85
|
extends_uid?: string;
|
|
86
|
+
supersedes_uid?: string;
|
|
87
|
+
contradicts_uid?: string;
|
|
89
88
|
source_uids?: string[];
|
|
89
|
+
props?: Record<string, unknown>;
|
|
90
90
|
agent_id?: string;
|
|
91
91
|
}
|
|
92
92
|
interface InquiryRequest {
|
|
93
93
|
action: "hypothesis" | "theory" | "paradigm" | "anomaly" | "assumption" | "question" | "open_question";
|
|
94
94
|
label: string;
|
|
95
|
-
|
|
96
|
-
status?: string;
|
|
95
|
+
summary?: string;
|
|
97
96
|
anomalous_to_uid?: string;
|
|
98
97
|
assumes_uid?: string[];
|
|
99
98
|
tests_uid?: string;
|
|
100
99
|
addresses_uid?: string;
|
|
100
|
+
supersedes_uid?: string;
|
|
101
|
+
produces_uid?: string;
|
|
101
102
|
confidence?: number;
|
|
102
103
|
salience?: number;
|
|
103
104
|
related_uids?: string[];
|
|
105
|
+
props?: Record<string, unknown>;
|
|
104
106
|
agent_id?: string;
|
|
105
107
|
}
|
|
106
108
|
interface StructureRequest {
|
|
107
|
-
action: "concept" | "pattern" | "mechanism" | "model" | "model_evaluation" | "analogy" | "inference_chain" | "reasoning_strategy" | "sensitivity_analysis" | "theorem" | "equation";
|
|
109
|
+
action: "concept" | "pattern" | "mechanism" | "model" | "model_evaluation" | "analogy" | "inference_chain" | "reasoning_strategy" | "sensitivity_analysis" | "theorem" | "equation" | "method" | "experiment";
|
|
108
110
|
label: string;
|
|
109
|
-
content: string;
|
|
110
111
|
summary?: string;
|
|
111
112
|
analogous_to_uid?: string;
|
|
112
113
|
transfers_to_uid?: string[];
|
|
@@ -115,125 +116,137 @@ interface StructureRequest {
|
|
|
115
116
|
chain_steps?: string[];
|
|
116
117
|
derived_from_uid?: string[];
|
|
117
118
|
proven_by_uid?: string;
|
|
119
|
+
method_uid?: string;
|
|
120
|
+
describes_uid?: string;
|
|
121
|
+
part_of_uid?: string;
|
|
122
|
+
supersedes_uid?: string;
|
|
123
|
+
produces_uid?: string;
|
|
118
124
|
related_uids?: string[];
|
|
119
125
|
confidence?: number;
|
|
126
|
+
salience?: number;
|
|
127
|
+
props?: Record<string, unknown>;
|
|
120
128
|
agent_id?: string;
|
|
121
129
|
}
|
|
122
130
|
interface CommitmentRequest {
|
|
123
131
|
action: "goal" | "project" | "milestone";
|
|
124
132
|
label: string;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
133
|
+
summary?: string;
|
|
134
|
+
confidence?: number;
|
|
135
|
+
salience?: number;
|
|
128
136
|
parent_uid?: string;
|
|
129
|
-
due_date?: number;
|
|
130
137
|
motivated_by_uid?: string[];
|
|
138
|
+
props?: Record<string, unknown>;
|
|
131
139
|
agent_id?: string;
|
|
132
140
|
}
|
|
133
141
|
interface DeliberationRequest {
|
|
134
142
|
action: "open_decision" | "add_option" | "add_constraint" | "resolve" | "get_open";
|
|
135
143
|
label?: string;
|
|
136
|
-
|
|
144
|
+
summary?: string;
|
|
145
|
+
confidence?: number;
|
|
146
|
+
salience?: number;
|
|
137
147
|
decision_uid?: string;
|
|
138
148
|
chosen_option_uid?: string;
|
|
139
|
-
resolution_rationale?: string;
|
|
140
|
-
constraint_type?: string;
|
|
141
149
|
blocks_uid?: string;
|
|
142
150
|
informs_uid?: string[];
|
|
151
|
+
props?: Record<string, unknown>;
|
|
143
152
|
agent_id?: string;
|
|
144
153
|
}
|
|
145
154
|
interface ProcedureRequest {
|
|
146
155
|
action: "create_flow" | "add_step" | "add_affordance" | "add_control";
|
|
147
156
|
label: string;
|
|
148
|
-
|
|
157
|
+
summary?: string;
|
|
158
|
+
confidence?: number;
|
|
159
|
+
salience?: number;
|
|
149
160
|
flow_uid?: string;
|
|
150
|
-
step_order?: number;
|
|
151
161
|
previous_step_uid?: string;
|
|
152
|
-
affordance_type?: string;
|
|
153
|
-
control_type?: string;
|
|
154
162
|
uses_affordance_uids?: string[];
|
|
155
163
|
goal_uid?: string;
|
|
164
|
+
props?: Record<string, unknown>;
|
|
156
165
|
agent_id?: string;
|
|
157
166
|
}
|
|
158
167
|
interface RiskRequest {
|
|
159
168
|
action: "assess" | "get_assessments";
|
|
160
169
|
label?: string;
|
|
161
|
-
|
|
170
|
+
summary?: string;
|
|
171
|
+
confidence?: number;
|
|
172
|
+
salience?: number;
|
|
162
173
|
assessed_uid?: string;
|
|
163
|
-
severity?: string;
|
|
164
|
-
likelihood?: number;
|
|
165
|
-
mitigations?: string[];
|
|
166
|
-
residual_risk?: number;
|
|
167
174
|
filter_uid?: string;
|
|
175
|
+
props?: Record<string, unknown>;
|
|
168
176
|
agent_id?: string;
|
|
169
177
|
}
|
|
170
178
|
interface SessionRequest {
|
|
171
|
-
action: "open" | "trace" | "close";
|
|
179
|
+
action: "open" | "trace" | "close" | "journal";
|
|
172
180
|
label?: string;
|
|
173
|
-
|
|
181
|
+
summary?: string;
|
|
182
|
+
confidence?: number;
|
|
183
|
+
salience?: number;
|
|
174
184
|
session_uid?: string;
|
|
175
|
-
trace_content?: string;
|
|
176
|
-
trace_type?: string;
|
|
177
185
|
relevant_node_uids?: string[];
|
|
186
|
+
props?: Record<string, unknown>;
|
|
178
187
|
agent_id?: string;
|
|
179
188
|
}
|
|
180
189
|
interface DistillRequest {
|
|
181
190
|
label: string;
|
|
182
|
-
|
|
191
|
+
summary?: string;
|
|
192
|
+
confidence?: number;
|
|
193
|
+
salience?: number;
|
|
183
194
|
summarizes_uids?: string[];
|
|
184
195
|
session_uid?: string;
|
|
185
|
-
|
|
196
|
+
props?: Record<string, unknown>;
|
|
186
197
|
agent_id?: string;
|
|
187
198
|
}
|
|
188
199
|
interface MemoryConfigRequest {
|
|
189
200
|
action: "set_preference" | "get_preferences" | "set_policy" | "get_policies";
|
|
190
201
|
label?: string;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
202
|
+
summary?: string;
|
|
203
|
+
confidence?: number;
|
|
204
|
+
salience?: number;
|
|
205
|
+
props?: Record<string, unknown>;
|
|
194
206
|
agent_id?: string;
|
|
195
207
|
}
|
|
196
208
|
interface PlanRequest {
|
|
197
209
|
action: "create_task" | "create_plan" | "add_step" | "update_status" | "get_plan";
|
|
198
210
|
label?: string;
|
|
199
|
-
|
|
211
|
+
summary?: string;
|
|
212
|
+
confidence?: number;
|
|
213
|
+
salience?: number;
|
|
200
214
|
goal_uid?: string;
|
|
201
215
|
task_uid?: string;
|
|
202
216
|
plan_uid?: string;
|
|
203
|
-
step_order?: number;
|
|
204
217
|
depends_on_uids?: string[];
|
|
205
218
|
target_uid?: string;
|
|
206
219
|
status?: string;
|
|
207
220
|
related_uids?: string[];
|
|
221
|
+
props?: Record<string, unknown>;
|
|
208
222
|
agent_id?: string;
|
|
209
223
|
}
|
|
210
224
|
interface GovernanceRequest {
|
|
211
225
|
action: "create_policy" | "set_budget" | "request_approval" | "resolve_approval" | "get_pending";
|
|
212
226
|
label?: string;
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
227
|
+
summary?: string;
|
|
228
|
+
confidence?: number;
|
|
229
|
+
salience?: number;
|
|
216
230
|
governed_uid?: string;
|
|
217
231
|
approval_uid?: string;
|
|
218
232
|
approved?: boolean;
|
|
219
|
-
resolution_note?: string;
|
|
220
233
|
requires_plan_uid?: string;
|
|
221
|
-
|
|
234
|
+
props?: Record<string, unknown>;
|
|
222
235
|
agent_id?: string;
|
|
223
236
|
}
|
|
224
237
|
interface ExecutionRequest {
|
|
225
238
|
action: "start" | "complete" | "fail" | "register_agent" | "get_executions";
|
|
226
239
|
label?: string;
|
|
240
|
+
summary?: string;
|
|
241
|
+
confidence?: number;
|
|
242
|
+
salience?: number;
|
|
227
243
|
plan_uid?: string;
|
|
228
244
|
executor_uid?: string;
|
|
229
245
|
execution_uid?: string;
|
|
230
|
-
outcome?: string;
|
|
231
246
|
produces_node_uid?: string;
|
|
232
|
-
error_description?: string;
|
|
233
|
-
agent_name?: string;
|
|
234
|
-
agent_role?: string;
|
|
235
247
|
filter_plan_uid?: string;
|
|
236
248
|
related_uids?: string[];
|
|
249
|
+
props?: Record<string, unknown>;
|
|
237
250
|
agent_id?: string;
|
|
238
251
|
}
|
|
239
252
|
interface RetrieveRequest {
|
|
@@ -321,7 +334,7 @@ declare class MindGraph {
|
|
|
321
334
|
ingest(req: IngestRequest): Promise<unknown>;
|
|
322
335
|
entity(req: EntityRequest): Promise<unknown>;
|
|
323
336
|
/** Convenience: create or find an entity by label. */
|
|
324
|
-
findOrCreateEntity(label: string,
|
|
337
|
+
findOrCreateEntity(label: string, props?: Record<string, unknown>, agentId?: string): Promise<GraphNode & {
|
|
325
338
|
created: boolean;
|
|
326
339
|
}>;
|
|
327
340
|
argue(req: ArgumentRequest): Promise<unknown>;
|
|
@@ -332,6 +345,14 @@ declare class MindGraph {
|
|
|
332
345
|
procedure(req: ProcedureRequest): Promise<unknown>;
|
|
333
346
|
risk(req: RiskRequest): Promise<unknown>;
|
|
334
347
|
session(req: SessionRequest): Promise<unknown>;
|
|
348
|
+
journal(label: string, props: Record<string, unknown>, options?: {
|
|
349
|
+
summary?: string;
|
|
350
|
+
session_uid?: string;
|
|
351
|
+
relevant_node_uids?: string[];
|
|
352
|
+
confidence?: number;
|
|
353
|
+
salience?: number;
|
|
354
|
+
agent_id?: string;
|
|
355
|
+
}): Promise<unknown>;
|
|
335
356
|
distill(req: DistillRequest): Promise<unknown>;
|
|
336
357
|
memoryConfig(req: MemoryConfigRequest): Promise<unknown>;
|
|
337
358
|
plan(req: PlanRequest): Promise<unknown>;
|
package/dist/index.js
CHANGED
|
@@ -100,11 +100,11 @@ var MindGraph = class {
|
|
|
100
100
|
return this.post("/reality/entity", req);
|
|
101
101
|
}
|
|
102
102
|
/** Convenience: create or find an entity by label. */
|
|
103
|
-
async findOrCreateEntity(label,
|
|
103
|
+
async findOrCreateEntity(label, props, agentId) {
|
|
104
104
|
return this.post("/reality/entity", {
|
|
105
105
|
action: "create",
|
|
106
106
|
label,
|
|
107
|
-
entity_type:
|
|
107
|
+
props: { entity_type: "other", ...props },
|
|
108
108
|
agent_id: agentId
|
|
109
109
|
});
|
|
110
110
|
}
|
|
@@ -136,6 +136,14 @@ var MindGraph = class {
|
|
|
136
136
|
async session(req) {
|
|
137
137
|
return this.post("/memory/session", req);
|
|
138
138
|
}
|
|
139
|
+
async journal(label, props, options) {
|
|
140
|
+
return this.post("/memory/session", {
|
|
141
|
+
action: "journal",
|
|
142
|
+
label,
|
|
143
|
+
props,
|
|
144
|
+
...options
|
|
145
|
+
});
|
|
146
|
+
}
|
|
139
147
|
async distill(req) {
|
|
140
148
|
return this.post("/memory/distill", req);
|
|
141
149
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -73,11 +73,11 @@ var MindGraph = class {
|
|
|
73
73
|
return this.post("/reality/entity", req);
|
|
74
74
|
}
|
|
75
75
|
/** Convenience: create or find an entity by label. */
|
|
76
|
-
async findOrCreateEntity(label,
|
|
76
|
+
async findOrCreateEntity(label, props, agentId) {
|
|
77
77
|
return this.post("/reality/entity", {
|
|
78
78
|
action: "create",
|
|
79
79
|
label,
|
|
80
|
-
entity_type:
|
|
80
|
+
props: { entity_type: "other", ...props },
|
|
81
81
|
agent_id: agentId
|
|
82
82
|
});
|
|
83
83
|
}
|
|
@@ -109,6 +109,14 @@ var MindGraph = class {
|
|
|
109
109
|
async session(req) {
|
|
110
110
|
return this.post("/memory/session", req);
|
|
111
111
|
}
|
|
112
|
+
async journal(label, props, options) {
|
|
113
|
+
return this.post("/memory/session", {
|
|
114
|
+
action: "journal",
|
|
115
|
+
label,
|
|
116
|
+
props,
|
|
117
|
+
...options
|
|
118
|
+
});
|
|
119
|
+
}
|
|
112
120
|
async distill(req) {
|
|
113
121
|
return this.post("/memory/distill", req);
|
|
114
122
|
}
|