mindgraph 0.13.0 → 0.15.0
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/LICENSE +1 -1
- package/README.md +22 -1
- package/dist/index.d.mts +406 -8
- package/dist/index.d.ts +406 -8
- package/dist/index.js +114 -47
- package/dist/index.mjs +114 -47
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -52,6 +52,10 @@ new MindGraph({ baseUrl: string, apiKey?: string, jwt?: string })
|
|
|
52
52
|
|--------|-------------|
|
|
53
53
|
| `capture(req)` | Capture a source, snippet, or observation |
|
|
54
54
|
| `entity(req)` | Create, alias, resolve, or merge entities |
|
|
55
|
+
| `series(req)` | Call the typed time-series action surface directly |
|
|
56
|
+
| `createSeries` / `appendSeries` / `seriesWindow` | Create a Series, append sourced points, and page through a bounded time window |
|
|
57
|
+
| `aggregateSeries` / `latestSeries` / `listSeriesForEntity` | Read bounded aggregates, cached latest values, and an entity's Series |
|
|
58
|
+
| `batchLatestSeries` / `batchAggregateSeries` / `deleteSeries` | Compare Series across entities or tombstone a Series and its points |
|
|
55
59
|
| `findOrCreateEntity(label, props?, agentId?)` | Convenience: create or find an entity by label (generic fallback) |
|
|
56
60
|
| `findOrCreatePerson(label, props?, agentId?)` | Find or create a Person entity |
|
|
57
61
|
| `findOrCreateOrganization(label, props?, agentId?)` | Find or create an Organization entity |
|
|
@@ -103,9 +107,25 @@ const entity = await graph.findOrCreateEntity("Some Entity");
|
|
|
103
107
|
|--------|-------------|
|
|
104
108
|
| `session(req)` | Open a session, record traces, or close a session |
|
|
105
109
|
| `journal(label, props, options?)` | Record a journal entry linked to an optional session |
|
|
106
|
-
| `distill(req)` | Create a Summary
|
|
110
|
+
| `distill(req)` | Create a Summary, Lesson, or governed Skill candidate with source provenance |
|
|
107
111
|
| `memoryConfig(req)` | Set/get preferences and memory policies |
|
|
108
112
|
|
|
113
|
+
`output_type: "skill"` requires caller-authored SKILL.md content and at
|
|
114
|
+
least one provenance field. It always creates a candidate for review:
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
await graph.distill({
|
|
118
|
+
label: "Recover a malformed import",
|
|
119
|
+
output_type: "skill",
|
|
120
|
+
work_uid: "work_import_42",
|
|
121
|
+
props: {
|
|
122
|
+
name: "recover-malformed-import",
|
|
123
|
+
description: "Use after a spreadsheet import fails schema validation.",
|
|
124
|
+
content: "# Recovery\n\nValidate headers, normalize dates, then retry.",
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
109
129
|
### Agent Layer
|
|
110
130
|
|
|
111
131
|
| Method | Description |
|
|
@@ -139,6 +159,7 @@ Define typed domain objects (Customer, Order, Contract…) as a semantic contrac
|
|
|
139
159
|
|--------|-------------|
|
|
140
160
|
| `proposeOntologySchema(req)` | Draft a schema from a description (+ optional sample docs); returns `{ schema_id, job_id }` |
|
|
141
161
|
| `activateOntologySchema(id)` / `getOntologySchema(id)` / `listOntologySchemas()` | Schema lifecycle |
|
|
162
|
+
| `createOntologySeriesBinding` / `syncOntologySeriesBinding` / `archiveOntologySeriesBinding` | Manage SQL-backed dense-measurement bindings |
|
|
142
163
|
| `listOntologyProposals(opts?)` / `approveOntologyProposal(id)` / `rejectOntologyProposal(id)` | Review extracted-object proposals |
|
|
143
164
|
| `queryOntology({ query, include_cognitive_context })` | Typed retrieval with the cognitive overlay fused in |
|
|
144
165
|
| `listOntologyTools()` | The generated read-tool manifest (`search_/get_/summarize_<obj>`) the MCP server renders |
|
package/dist/index.d.mts
CHANGED
|
@@ -179,6 +179,47 @@ interface PlaceProps {
|
|
|
179
179
|
identifiers?: Record<string, string>;
|
|
180
180
|
attributes?: Record<string, unknown>;
|
|
181
181
|
}
|
|
182
|
+
interface FiscalYearEnd {
|
|
183
|
+
month: number;
|
|
184
|
+
day: number;
|
|
185
|
+
}
|
|
186
|
+
interface SeriesProps {
|
|
187
|
+
name: string;
|
|
188
|
+
description: string;
|
|
189
|
+
unit?: string | null;
|
|
190
|
+
temporality: "instant" | "period";
|
|
191
|
+
period_unit?: "year" | "quarter" | "month" | "week" | "day" | null;
|
|
192
|
+
fiscal_year_end: FiscalYearEnd;
|
|
193
|
+
value_kind: string;
|
|
194
|
+
default_source_uid?: string | null;
|
|
195
|
+
origin: "ingest" | "connector";
|
|
196
|
+
binding_uid?: string | null;
|
|
197
|
+
binding_name?: string | null;
|
|
198
|
+
n_points: number;
|
|
199
|
+
min_t?: number | null;
|
|
200
|
+
max_t?: number | null;
|
|
201
|
+
latest_t?: number | null;
|
|
202
|
+
latest_value?: number | null;
|
|
203
|
+
latest_period_label?: string | null;
|
|
204
|
+
}
|
|
205
|
+
type SeriesNode = Omit<GraphNode, "props"> & {
|
|
206
|
+
props: SeriesProps;
|
|
207
|
+
};
|
|
208
|
+
interface MeasurementPoint {
|
|
209
|
+
/** Microseconds since the Unix epoch (UTC). */
|
|
210
|
+
t: number;
|
|
211
|
+
value: number;
|
|
212
|
+
scale_applied?: number;
|
|
213
|
+
period_start?: number | null;
|
|
214
|
+
period_label?: string | null;
|
|
215
|
+
source_uid?: string | null;
|
|
216
|
+
source_ref?: string | null;
|
|
217
|
+
}
|
|
218
|
+
interface AggregatePoint {
|
|
219
|
+
/** UTC bucket start, microseconds since the Unix epoch. */
|
|
220
|
+
t: number;
|
|
221
|
+
value: number | null;
|
|
222
|
+
}
|
|
182
223
|
interface CaptureRequest {
|
|
183
224
|
action: "source" | "snippet" | "observation";
|
|
184
225
|
label: string;
|
|
@@ -190,7 +231,7 @@ interface CaptureRequest {
|
|
|
190
231
|
agent_id?: string;
|
|
191
232
|
}
|
|
192
233
|
interface EntityRequest {
|
|
193
|
-
action: "create" | "alias" | "resolve" | "fuzzy_resolve" | "merge" | "relate";
|
|
234
|
+
action: "create" | "resolve_identity" | "alias" | "resolve" | "fuzzy_resolve" | "merge" | "relate";
|
|
194
235
|
label?: string;
|
|
195
236
|
text?: string;
|
|
196
237
|
canonical_uid?: string;
|
|
@@ -203,6 +244,154 @@ interface EntityRequest {
|
|
|
203
244
|
edge_type?: string;
|
|
204
245
|
props?: Record<string, unknown>;
|
|
205
246
|
agent_id?: string;
|
|
247
|
+
/** Server-canonicalized exact identity. Values may contain only strings and integers. */
|
|
248
|
+
identity?: {
|
|
249
|
+
namespace: string;
|
|
250
|
+
key_version: 1;
|
|
251
|
+
key: unknown;
|
|
252
|
+
};
|
|
253
|
+
/** Explicit writable Project/repository/agent Space for an identity-backed create. */
|
|
254
|
+
identity_space_uid?: string;
|
|
255
|
+
}
|
|
256
|
+
type SeriesRequest = {
|
|
257
|
+
action: "create";
|
|
258
|
+
entity_uid: string;
|
|
259
|
+
name: string;
|
|
260
|
+
description?: string;
|
|
261
|
+
unit?: string;
|
|
262
|
+
temporality: "instant" | "period";
|
|
263
|
+
period_unit?: "year" | "quarter" | "month" | "week" | "day";
|
|
264
|
+
fiscal_year_end?: FiscalYearEnd;
|
|
265
|
+
value_kind?: string;
|
|
266
|
+
default_source_uid?: string;
|
|
267
|
+
origin?: "ingest" | "connector";
|
|
268
|
+
space_uid?: string;
|
|
269
|
+
agent_id?: string;
|
|
270
|
+
} | {
|
|
271
|
+
action: "append";
|
|
272
|
+
series_uid: string;
|
|
273
|
+
points: MeasurementPoint[];
|
|
274
|
+
agent_id?: string;
|
|
275
|
+
} | {
|
|
276
|
+
action: "window";
|
|
277
|
+
series_uid: string;
|
|
278
|
+
from: number;
|
|
279
|
+
to: number;
|
|
280
|
+
cursor?: number;
|
|
281
|
+
limit?: number;
|
|
282
|
+
project_uid?: string;
|
|
283
|
+
} | {
|
|
284
|
+
action: "aggregate";
|
|
285
|
+
series_uid: string;
|
|
286
|
+
from: number;
|
|
287
|
+
to: number;
|
|
288
|
+
bucket: "year" | "quarter" | "month" | "week" | "day" | "hour";
|
|
289
|
+
agg: "sum" | "mean" | "min" | "max" | "count" | "std_dev" | "last";
|
|
290
|
+
fill?: "none" | "null" | "prev";
|
|
291
|
+
project_uid?: string;
|
|
292
|
+
} | {
|
|
293
|
+
action: "latest";
|
|
294
|
+
series_uid: string;
|
|
295
|
+
project_uid?: string;
|
|
296
|
+
} | {
|
|
297
|
+
action: "list_for_entity";
|
|
298
|
+
entity_uid: string;
|
|
299
|
+
project_uid?: string;
|
|
300
|
+
} | {
|
|
301
|
+
action: "batch_latest";
|
|
302
|
+
entity_uids: string[];
|
|
303
|
+
series_names?: string[];
|
|
304
|
+
project_uid?: string;
|
|
305
|
+
} | {
|
|
306
|
+
action: "batch_aggregate";
|
|
307
|
+
series_uids: string[];
|
|
308
|
+
from: number;
|
|
309
|
+
to: number;
|
|
310
|
+
bucket: "year" | "quarter" | "month" | "week" | "day" | "hour";
|
|
311
|
+
agg: "sum" | "mean" | "min" | "max" | "count" | "std_dev" | "last";
|
|
312
|
+
fill?: "none" | "null" | "prev";
|
|
313
|
+
project_uid?: string;
|
|
314
|
+
} | {
|
|
315
|
+
action: "delete_series";
|
|
316
|
+
series_uid: string;
|
|
317
|
+
reason?: string;
|
|
318
|
+
agent_id?: string;
|
|
319
|
+
};
|
|
320
|
+
interface CreateSeriesResponse {
|
|
321
|
+
created: boolean;
|
|
322
|
+
series: SeriesNode;
|
|
323
|
+
}
|
|
324
|
+
interface AppendSeriesResponse {
|
|
325
|
+
series_uid: string;
|
|
326
|
+
appended: number;
|
|
327
|
+
stats: Pick<SeriesProps, "n_points" | "min_t" | "max_t" | "latest_t" | "latest_value">;
|
|
328
|
+
}
|
|
329
|
+
interface SeriesWindowResponse {
|
|
330
|
+
series_uid: string;
|
|
331
|
+
from: number;
|
|
332
|
+
to: number;
|
|
333
|
+
points: MeasurementPoint[];
|
|
334
|
+
next_cursor: number | null;
|
|
335
|
+
}
|
|
336
|
+
interface SeriesAggregateResponse {
|
|
337
|
+
series_uid: string;
|
|
338
|
+
from: number;
|
|
339
|
+
to: number;
|
|
340
|
+
bucket: string;
|
|
341
|
+
agg: string;
|
|
342
|
+
fill: string;
|
|
343
|
+
estimated_scanned_points: number;
|
|
344
|
+
points: AggregatePoint[];
|
|
345
|
+
}
|
|
346
|
+
interface SeriesLatestResponse {
|
|
347
|
+
series_uid: string;
|
|
348
|
+
n_points: number;
|
|
349
|
+
min_t: number | null;
|
|
350
|
+
max_t: number | null;
|
|
351
|
+
latest_t: number | null;
|
|
352
|
+
latest_value: number | null;
|
|
353
|
+
latest_period_label: string | null;
|
|
354
|
+
}
|
|
355
|
+
interface ListSeriesResponse {
|
|
356
|
+
entity_uid: string;
|
|
357
|
+
series: SeriesNode[];
|
|
358
|
+
}
|
|
359
|
+
interface BatchLatestSeriesResponse {
|
|
360
|
+
entity_count: number;
|
|
361
|
+
series_names: string[];
|
|
362
|
+
rows: Array<{
|
|
363
|
+
entity_uid: string;
|
|
364
|
+
series_uid: string;
|
|
365
|
+
name: string;
|
|
366
|
+
unit: string | null;
|
|
367
|
+
temporality: string;
|
|
368
|
+
period_unit: string | null;
|
|
369
|
+
n_points: number;
|
|
370
|
+
latest_t: number | null;
|
|
371
|
+
latest_value: number | null;
|
|
372
|
+
latest_period_label: string | null;
|
|
373
|
+
}>;
|
|
374
|
+
coverage_complete: boolean;
|
|
375
|
+
}
|
|
376
|
+
interface BatchAggregateSeriesResponse {
|
|
377
|
+
from: number;
|
|
378
|
+
to: number;
|
|
379
|
+
bucket: string;
|
|
380
|
+
agg: string;
|
|
381
|
+
fill: string;
|
|
382
|
+
estimated_scanned_points: number;
|
|
383
|
+
series: Array<{
|
|
384
|
+
series_uid: string;
|
|
385
|
+
name: string;
|
|
386
|
+
unit: string | null;
|
|
387
|
+
estimated_scanned_points: number;
|
|
388
|
+
points: AggregatePoint[];
|
|
389
|
+
}>;
|
|
390
|
+
}
|
|
391
|
+
interface DeleteSeriesResponse {
|
|
392
|
+
series_uid: string;
|
|
393
|
+
deleted: boolean;
|
|
394
|
+
tombstoned_points: number;
|
|
206
395
|
}
|
|
207
396
|
interface ArgumentRequest {
|
|
208
397
|
claim: {
|
|
@@ -330,21 +519,45 @@ interface SessionRequest {
|
|
|
330
519
|
salience?: number;
|
|
331
520
|
session_uid?: string;
|
|
332
521
|
relevant_node_uids?: string[];
|
|
522
|
+
harness?: "claude-code" | "codex" | "generic";
|
|
523
|
+
harness_session_id?: string;
|
|
524
|
+
model?: string;
|
|
333
525
|
props?: Record<string, unknown>;
|
|
334
526
|
agent_id?: string;
|
|
335
527
|
}
|
|
336
|
-
|
|
528
|
+
/** Caller-authored content for a governed skill candidate. */
|
|
529
|
+
interface SkillDistillProps {
|
|
530
|
+
/** Stable agentskills.io identifier: 1-64 lowercase letters, digits, or hyphens. */
|
|
531
|
+
name: string;
|
|
532
|
+
/** Human-readable trigger guidance (1-1024 characters; XML tags are rejected). */
|
|
533
|
+
description: string;
|
|
534
|
+
/** Complete SKILL.md body, capped by the server at 64 KiB. */
|
|
535
|
+
content: string;
|
|
536
|
+
license?: string;
|
|
537
|
+
}
|
|
538
|
+
interface DistillRequestBase {
|
|
337
539
|
label: string;
|
|
338
|
-
/** Defaults to "summary" for backward compatibility. */
|
|
339
|
-
output_type?: "summary" | "lesson";
|
|
340
540
|
summary?: string;
|
|
341
541
|
confidence?: number;
|
|
342
542
|
salience?: number;
|
|
343
543
|
summarizes_uids?: string[];
|
|
344
544
|
session_uid?: string;
|
|
345
|
-
|
|
545
|
+
work_uid?: string;
|
|
546
|
+
execution_uid?: string;
|
|
547
|
+
idempotency_key?: string;
|
|
548
|
+
supersedes_uid?: string;
|
|
346
549
|
agent_id?: string;
|
|
347
550
|
}
|
|
551
|
+
interface SummaryOrLessonDistillRequest extends DistillRequestBase {
|
|
552
|
+
/** Defaults to "summary" for backward compatibility. */
|
|
553
|
+
output_type?: "summary" | "lesson";
|
|
554
|
+
props?: Record<string, unknown>;
|
|
555
|
+
}
|
|
556
|
+
interface SkillDistillRequest extends DistillRequestBase {
|
|
557
|
+
output_type: "skill";
|
|
558
|
+
props: SkillDistillProps;
|
|
559
|
+
}
|
|
560
|
+
type DistillRequest = SummaryOrLessonDistillRequest | SkillDistillRequest;
|
|
348
561
|
interface MemoryConfigRequest {
|
|
349
562
|
action: "set_preference" | "get_preferences" | "set_policy" | "get_policies";
|
|
350
563
|
label?: string;
|
|
@@ -354,8 +567,31 @@ interface MemoryConfigRequest {
|
|
|
354
567
|
props?: Record<string, unknown>;
|
|
355
568
|
agent_id?: string;
|
|
356
569
|
}
|
|
570
|
+
interface MemorySyncRequest {
|
|
571
|
+
action: "scan" | "begin" | "record" | "finalize" | "status" | "abandon";
|
|
572
|
+
provider?: string;
|
|
573
|
+
repo_id?: string;
|
|
574
|
+
logical_path?: string;
|
|
575
|
+
content_hash?: string;
|
|
576
|
+
content?: string;
|
|
577
|
+
source_uid?: string;
|
|
578
|
+
execution_uid?: string;
|
|
579
|
+
assertion_fingerprint?: string;
|
|
580
|
+
planned_fingerprints?: string[];
|
|
581
|
+
current_fingerprints?: string[];
|
|
582
|
+
source_selector?: Record<string, unknown>;
|
|
583
|
+
capture_type?: "lesson" | "journal" | "claim" | "decision" | "risk";
|
|
584
|
+
label?: string;
|
|
585
|
+
summary?: string;
|
|
586
|
+
props?: Record<string, unknown>;
|
|
587
|
+
expected_execution_version?: number;
|
|
588
|
+
baseline_version?: number;
|
|
589
|
+
repo_space_uid?: string;
|
|
590
|
+
file_present?: boolean;
|
|
591
|
+
agent_id?: string;
|
|
592
|
+
}
|
|
357
593
|
interface PlanRequest {
|
|
358
|
-
action: "create_task" | "create_plan" | "add_step" | "update_status" | "get_plan";
|
|
594
|
+
action: "create_task" | "create_plan" | "add_step" | "update_status" | "get_plan" | "resume_work" | "claim_task" | "heartbeat" | "start_iteration" | "checkpoint_iteration" | "block_task" | "complete_task" | "abandon_iteration";
|
|
359
595
|
label?: string;
|
|
360
596
|
summary?: string;
|
|
361
597
|
confidence?: number;
|
|
@@ -363,15 +599,39 @@ interface PlanRequest {
|
|
|
363
599
|
goal_uid?: string;
|
|
364
600
|
task_uid?: string;
|
|
365
601
|
plan_uid?: string;
|
|
602
|
+
step_uid?: string;
|
|
603
|
+
execution_uid?: string;
|
|
604
|
+
session_uid?: string;
|
|
366
605
|
depends_on_uids?: string[];
|
|
367
606
|
target_uid?: string;
|
|
368
607
|
status?: string;
|
|
608
|
+
task_status?: string;
|
|
609
|
+
step_status?: string;
|
|
610
|
+
execution_status?: "completed" | "failed" | "abandoned";
|
|
611
|
+
expected_version?: number;
|
|
612
|
+
lease_epoch?: number;
|
|
613
|
+
lease_ttl_secs?: number;
|
|
614
|
+
idempotency_key?: string;
|
|
615
|
+
allow_takeover?: boolean;
|
|
616
|
+
release_lease?: boolean;
|
|
617
|
+
override_reason?: string;
|
|
618
|
+
scope_uids?: string[];
|
|
619
|
+
limit?: number;
|
|
620
|
+
input_snapshot?: Record<string, unknown>;
|
|
621
|
+
output_snapshot?: Record<string, unknown>;
|
|
622
|
+
side_effects?: string[];
|
|
623
|
+
outcome?: string;
|
|
624
|
+
error?: string;
|
|
625
|
+
next_action?: string;
|
|
626
|
+
checkpoint_summary?: string;
|
|
627
|
+
test_summary?: string;
|
|
628
|
+
produces_node_uids?: string[];
|
|
369
629
|
related_uids?: string[];
|
|
370
630
|
props?: Record<string, unknown>;
|
|
371
631
|
agent_id?: string;
|
|
372
632
|
}
|
|
373
633
|
interface GovernanceRequest {
|
|
374
|
-
action: "create_policy" | "set_budget" | "request_approval" | "resolve_approval" | "get_pending";
|
|
634
|
+
action: "create_policy" | "set_budget" | "request_approval" | "resolve_approval" | "get_pending" | "check";
|
|
375
635
|
label?: string;
|
|
376
636
|
summary?: string;
|
|
377
637
|
confidence?: number;
|
|
@@ -380,9 +640,30 @@ interface GovernanceRequest {
|
|
|
380
640
|
approval_uid?: string;
|
|
381
641
|
approved?: boolean;
|
|
382
642
|
requires_plan_uid?: string;
|
|
643
|
+
act?: string;
|
|
644
|
+
target?: GovernanceTarget;
|
|
645
|
+
purpose?: string;
|
|
646
|
+
context?: Record<string, unknown>;
|
|
647
|
+
mode?: "permit_default" | "deny_default";
|
|
648
|
+
tier?: "native" | "checkpoint" | "advisory" | "dry_run";
|
|
383
649
|
props?: Record<string, unknown>;
|
|
384
650
|
agent_id?: string;
|
|
385
651
|
}
|
|
652
|
+
interface GovernanceTarget {
|
|
653
|
+
node_uid?: string;
|
|
654
|
+
document_uid?: string;
|
|
655
|
+
node_type?: string;
|
|
656
|
+
ontology_class?: string;
|
|
657
|
+
tags?: string[];
|
|
658
|
+
space?: string;
|
|
659
|
+
classifications?: string[];
|
|
660
|
+
tool_name?: string;
|
|
661
|
+
tool_annotations?: string[];
|
|
662
|
+
execution_uid?: string;
|
|
663
|
+
action?: string;
|
|
664
|
+
mutability?: "read" | "write";
|
|
665
|
+
target_uids?: string[];
|
|
666
|
+
}
|
|
386
667
|
interface ExecutionRequest {
|
|
387
668
|
action: "start" | "complete" | "fail" | "register_agent" | "get_executions";
|
|
388
669
|
label?: string;
|
|
@@ -391,10 +672,16 @@ interface ExecutionRequest {
|
|
|
391
672
|
salience?: number;
|
|
392
673
|
plan_uid?: string;
|
|
393
674
|
executor_uid?: string;
|
|
675
|
+
affordance_uid?: string;
|
|
394
676
|
execution_uid?: string;
|
|
395
677
|
produces_node_uid?: string;
|
|
396
678
|
filter_plan_uid?: string;
|
|
397
679
|
related_uids?: string[];
|
|
680
|
+
input_snapshot?: Record<string, unknown>;
|
|
681
|
+
output_snapshot?: Record<string, unknown>;
|
|
682
|
+
side_effects?: string[];
|
|
683
|
+
outcome?: string;
|
|
684
|
+
error?: string;
|
|
398
685
|
props?: Record<string, unknown>;
|
|
399
686
|
agent_id?: string;
|
|
400
687
|
}
|
|
@@ -674,6 +961,30 @@ interface BelievedBy {
|
|
|
674
961
|
/** The asserting agent's certainty in the claim, or null if unspecified. */
|
|
675
962
|
confidence: number | null;
|
|
676
963
|
}
|
|
964
|
+
interface SeriesContextAnnotation {
|
|
965
|
+
uid: string;
|
|
966
|
+
name: string;
|
|
967
|
+
unit: string | null;
|
|
968
|
+
temporality: string;
|
|
969
|
+
origin: "ingest" | "connector" | string;
|
|
970
|
+
binding_name?: string | null;
|
|
971
|
+
/** Equivalent parallel Series; connector-backed entries sort first. */
|
|
972
|
+
same_metric_as?: Array<{
|
|
973
|
+
uid: string;
|
|
974
|
+
name: string;
|
|
975
|
+
origin: "ingest" | "connector" | string;
|
|
976
|
+
binding_name?: string | null;
|
|
977
|
+
}>;
|
|
978
|
+
/** Omitted for an empty Series (unknown is not zero). */
|
|
979
|
+
n_points?: number;
|
|
980
|
+
first_t?: number | null;
|
|
981
|
+
last_t?: number | null;
|
|
982
|
+
latest?: {
|
|
983
|
+
value: number | null;
|
|
984
|
+
t: number | null;
|
|
985
|
+
period_label: string | null;
|
|
986
|
+
};
|
|
987
|
+
}
|
|
677
988
|
interface RetrieveContextResponse {
|
|
678
989
|
articles?: ArticleResult[];
|
|
679
990
|
chunks?: {
|
|
@@ -696,6 +1007,7 @@ interface RetrieveContextResponse {
|
|
|
696
1007
|
}[];
|
|
697
1008
|
source_chunks?: SourceChunk[];
|
|
698
1009
|
believed_by?: BelievedBy[];
|
|
1010
|
+
series?: SeriesContextAnnotation[];
|
|
699
1011
|
/** This node has been replaced by a newer value (Supersedes edge). */
|
|
700
1012
|
superseded?: boolean;
|
|
701
1013
|
/** UID of the node that superseded this one. */
|
|
@@ -1060,6 +1372,43 @@ interface BackingSync {
|
|
|
1060
1372
|
/** null = manual "Sync now"; cron later. */
|
|
1061
1373
|
schedule?: string | null;
|
|
1062
1374
|
}
|
|
1375
|
+
interface SeriesBacking {
|
|
1376
|
+
connection_ref: string;
|
|
1377
|
+
table: string;
|
|
1378
|
+
entity_key_column: string;
|
|
1379
|
+
time_column: string;
|
|
1380
|
+
value_column: string;
|
|
1381
|
+
filter?: BackingFilter;
|
|
1382
|
+
cursor_column?: string;
|
|
1383
|
+
}
|
|
1384
|
+
interface OntologySeriesBinding {
|
|
1385
|
+
id: string;
|
|
1386
|
+
schema_id: string;
|
|
1387
|
+
org_id: string;
|
|
1388
|
+
name: string;
|
|
1389
|
+
entity_type: string;
|
|
1390
|
+
unit?: string | null;
|
|
1391
|
+
temporality: "instant" | "period";
|
|
1392
|
+
period_unit?: "year" | "half" | "quarter" | "month" | "week" | "day" | null;
|
|
1393
|
+
fiscal_year_end: {
|
|
1394
|
+
month: number;
|
|
1395
|
+
day: number;
|
|
1396
|
+
};
|
|
1397
|
+
backing: SeriesBacking;
|
|
1398
|
+
cursor_value?: string | null;
|
|
1399
|
+
last_domain_time?: string | null;
|
|
1400
|
+
reconcile_periods: number;
|
|
1401
|
+
last_source_keys: string[];
|
|
1402
|
+
last_reconciliation?: {
|
|
1403
|
+
deleted_source_keys: string[];
|
|
1404
|
+
deleted_count: number;
|
|
1405
|
+
policy: "rows_retained";
|
|
1406
|
+
completed_at: string;
|
|
1407
|
+
} | null;
|
|
1408
|
+
status: "active" | "archived";
|
|
1409
|
+
created_at: string;
|
|
1410
|
+
updated_at: string;
|
|
1411
|
+
}
|
|
1063
1412
|
/** Datasource binding for a relation type (FK column or M:M join table). */
|
|
1064
1413
|
type RelationBacking = {
|
|
1065
1414
|
kind: "sql_fk";
|
|
@@ -1151,6 +1500,7 @@ interface OntologyRelationType {
|
|
|
1151
1500
|
interface OntologySchemaDetail extends OntologySchema {
|
|
1152
1501
|
object_types: OntologyObjectType[];
|
|
1153
1502
|
relation_types: OntologyRelationType[];
|
|
1503
|
+
series_bindings: OntologySeriesBinding[];
|
|
1154
1504
|
}
|
|
1155
1505
|
/** A generated read-only tool descriptor (from `listOntologyTools`). */
|
|
1156
1506
|
interface OntologyToolDescriptor {
|
|
@@ -1484,6 +1834,36 @@ declare class MindGraph {
|
|
|
1484
1834
|
}): Promise<unknown>;
|
|
1485
1835
|
capture(req: CaptureRequest): Promise<unknown>;
|
|
1486
1836
|
entity(req: EntityRequest): Promise<unknown>;
|
|
1837
|
+
series(req: SeriesRequest): Promise<unknown>;
|
|
1838
|
+
createSeries(req: Omit<Extract<SeriesRequest, {
|
|
1839
|
+
action: "create";
|
|
1840
|
+
}>, "action">): Promise<CreateSeriesResponse>;
|
|
1841
|
+
appendSeries(req: Omit<Extract<SeriesRequest, {
|
|
1842
|
+
action: "append";
|
|
1843
|
+
}>, "action">): Promise<AppendSeriesResponse>;
|
|
1844
|
+
seriesWindow(req: Omit<Extract<SeriesRequest, {
|
|
1845
|
+
action: "window";
|
|
1846
|
+
}>, "action">): Promise<SeriesWindowResponse>;
|
|
1847
|
+
aggregateSeries(req: Omit<Extract<SeriesRequest, {
|
|
1848
|
+
action: "aggregate";
|
|
1849
|
+
}>, "action">): Promise<SeriesAggregateResponse>;
|
|
1850
|
+
latestSeries(seriesUid: string, options?: {
|
|
1851
|
+
project_uid?: string;
|
|
1852
|
+
}): Promise<SeriesLatestResponse>;
|
|
1853
|
+
listSeriesForEntity(entityUid: string, options?: {
|
|
1854
|
+
project_uid?: string;
|
|
1855
|
+
}): Promise<ListSeriesResponse>;
|
|
1856
|
+
batchLatestSeries(entityUids: string[], options?: {
|
|
1857
|
+
series_names?: string[];
|
|
1858
|
+
project_uid?: string;
|
|
1859
|
+
}): Promise<BatchLatestSeriesResponse>;
|
|
1860
|
+
batchAggregateSeries(req: Omit<Extract<SeriesRequest, {
|
|
1861
|
+
action: "batch_aggregate";
|
|
1862
|
+
}>, "action">): Promise<BatchAggregateSeriesResponse>;
|
|
1863
|
+
deleteSeries(seriesUid: string, options?: {
|
|
1864
|
+
reason?: string;
|
|
1865
|
+
agent_id?: string;
|
|
1866
|
+
}): Promise<DeleteSeriesResponse>;
|
|
1487
1867
|
/** Convenience: create or find an entity by label. */
|
|
1488
1868
|
findOrCreateEntity(label: string, props?: Record<string, unknown>, agentId?: string): Promise<GraphNode & {
|
|
1489
1869
|
created: boolean;
|
|
@@ -1585,6 +1965,7 @@ declare class MindGraph {
|
|
|
1585
1965
|
}): Promise<unknown>;
|
|
1586
1966
|
distill(req: DistillRequest): Promise<unknown>;
|
|
1587
1967
|
memoryConfig(req: MemoryConfigRequest): Promise<unknown>;
|
|
1968
|
+
memorySync(req: MemorySyncRequest): Promise<unknown>;
|
|
1588
1969
|
plan(req: PlanRequest): Promise<unknown>;
|
|
1589
1970
|
governance(req: GovernanceRequest): Promise<unknown>;
|
|
1590
1971
|
execution(req: ExecutionRequest): Promise<unknown>;
|
|
@@ -1860,6 +2241,23 @@ declare class MindGraph {
|
|
|
1860
2241
|
items: OntologySchema[];
|
|
1861
2242
|
}>;
|
|
1862
2243
|
getOntologySchema(id: string): Promise<OntologySchemaDetail>;
|
|
2244
|
+
createOntologySeriesBinding(schemaId: string, request: {
|
|
2245
|
+
name: string;
|
|
2246
|
+
entity_type: string;
|
|
2247
|
+
unit?: string;
|
|
2248
|
+
temporality?: "instant" | "period";
|
|
2249
|
+
period_unit?: "year" | "half" | "quarter" | "month" | "week" | "day";
|
|
2250
|
+
fiscal_year_end?: {
|
|
2251
|
+
month: number;
|
|
2252
|
+
day: number;
|
|
2253
|
+
};
|
|
2254
|
+
backing: SeriesBacking;
|
|
2255
|
+
reconcile_periods?: number;
|
|
2256
|
+
}): Promise<OntologySeriesBinding>;
|
|
2257
|
+
syncOntologySeriesBinding(bindingId: string, mode?: "incremental" | "full"): Promise<{
|
|
2258
|
+
sync_job_id: string;
|
|
2259
|
+
}>;
|
|
2260
|
+
archiveOntologySeriesBinding(schemaId: string, bindingId: string): Promise<void>;
|
|
1863
2261
|
createOntologySchema(req: CreateOntologySchemaRequest): Promise<OntologySchema>;
|
|
1864
2262
|
updateOntologySchema(id: string, req: UpdateOntologySchemaRequest): Promise<OntologySchema>;
|
|
1865
2263
|
activateOntologySchema(id: string): Promise<OntologySchema>;
|
|
@@ -2029,4 +2427,4 @@ declare class MindGraph {
|
|
|
2029
2427
|
}>;
|
|
2030
2428
|
}
|
|
2031
2429
|
|
|
2032
|
-
export { type AnalogyCandidate, type ArgumentRequest, type ArticleResult, type BatchRequest, type BelievedBy, type CanonicalAttachmentAuthority, type CanonicalAttachmentBinding, type CanonicalAttachmentDirection, type CaptureRequest, type ClaimHub, type ClearResponse, type ClusterClaimSample, type ClusteredClaimHub, type CommitmentRequest, type ConceptCluster, type CreateOntologySchemaRequest, type DecayRequest, type DeliberationRequest, type DialecticalPair, type DistillRequest, type DocumentRef, type EnrichedSearchResponse, type EntityBridge, type EntityRequest, type EpistemicCounts, type EventProps, type EvolveRequest, type ExecutionRequest, type FieldDefinition, type FieldSemantic, type FieldSemanticKind, type GovernanceRequest, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type ListArticlesResponse, type MemoryConfigRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type NormativeKind, type ObjectBacking, type OntologicalBaseKind, type OntologyDuplicateAudit, type OntologyObjectType, type OntologyObjectTypeInput, type OntologyPredicateOperator, type OntologyProposal, type OntologyQueryPredicate, type OntologyRelationType, type OntologyRelationTypeInput, type OntologySchema, type OntologySchemaDetail, type OntologyToolDescriptor, type OrganizationProps, type Participant, type ParticipantSlotKind, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type ProposalEdits, type PurgeRequest, type RankedClaimHub, type RelatedDomainObjectsRequest, type RelationBacking, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SemanticDependence, type SemanticEvidenceRef, type SemanticEvidenceSourceKind, type SemanticGeneratorRef, type SemanticIdentityMode, type SemanticMatch, type SemanticMatchAlternative, type SemanticMatchStatus, type SemanticModifier, type SemanticModifierMatch, type SemanticNegativeControl, type SemanticParticipantSlot, type SemanticRelationKind, type SemanticReviewDecision, type SemanticRigidity, type SemanticRuntimeTemplate, type SemanticSignal, type SemanticSignalKind, type SemanticTemplateRef, type SemanticTemporalMode, type SemanticTenantBindings, type SemanticValidationAuthoringMode, type SemanticValidationMode, type SessionRequest, type SignalsQuery, type SignalsResponse, type SourceChunk, type StructureRequest, type StructuredOntologyQueryRequest, type StructuredOntologyQueryResponse, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest, type UpdateOntologySchemaRequest };
|
|
2430
|
+
export { type AggregatePoint, type AnalogyCandidate, type AppendSeriesResponse, type ArgumentRequest, type ArticleResult, type BatchAggregateSeriesResponse, type BatchLatestSeriesResponse, type BatchRequest, type BelievedBy, type CanonicalAttachmentAuthority, type CanonicalAttachmentBinding, type CanonicalAttachmentDirection, type CaptureRequest, type ClaimHub, type ClearResponse, type ClusterClaimSample, type ClusteredClaimHub, type CommitmentRequest, type ConceptCluster, type CreateOntologySchemaRequest, type CreateSeriesResponse, type DecayRequest, type DeleteSeriesResponse, type DeliberationRequest, type DialecticalPair, type DistillRequest, type DocumentRef, type EnrichedSearchResponse, type EntityBridge, type EntityRequest, type EpistemicCounts, type EventProps, type EvolveRequest, type ExecutionRequest, type FieldDefinition, type FieldSemantic, type FieldSemanticKind, type FiscalYearEnd, type GovernanceRequest, type GovernanceTarget, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type ListArticlesResponse, type ListSeriesResponse, type MeasurementPoint, type MemoryConfigRequest, type MemorySyncRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type NormativeKind, type ObjectBacking, type OntologicalBaseKind, type OntologyDuplicateAudit, type OntologyObjectType, type OntologyObjectTypeInput, type OntologyPredicateOperator, type OntologyProposal, type OntologyQueryPredicate, type OntologyRelationType, type OntologyRelationTypeInput, type OntologySchema, type OntologySchemaDetail, type OntologySeriesBinding, type OntologyToolDescriptor, type OrganizationProps, type Participant, type ParticipantSlotKind, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type ProposalEdits, type PurgeRequest, type RankedClaimHub, type RelatedDomainObjectsRequest, type RelationBacking, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SemanticDependence, type SemanticEvidenceRef, type SemanticEvidenceSourceKind, type SemanticGeneratorRef, type SemanticIdentityMode, type SemanticMatch, type SemanticMatchAlternative, type SemanticMatchStatus, type SemanticModifier, type SemanticModifierMatch, type SemanticNegativeControl, type SemanticParticipantSlot, type SemanticRelationKind, type SemanticReviewDecision, type SemanticRigidity, type SemanticRuntimeTemplate, type SemanticSignal, type SemanticSignalKind, type SemanticTemplateRef, type SemanticTemporalMode, type SemanticTenantBindings, type SemanticValidationAuthoringMode, type SemanticValidationMode, type SeriesAggregateResponse, type SeriesBacking, type SeriesContextAnnotation, type SeriesLatestResponse, type SeriesNode, type SeriesProps, type SeriesRequest, type SeriesWindowResponse, type SessionRequest, type SignalsQuery, type SignalsResponse, type SkillDistillProps, type SkillDistillRequest, type SourceChunk, type StructureRequest, type StructuredOntologyQueryRequest, type StructuredOntologyQueryResponse, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest, type UpdateOntologySchemaRequest };
|