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