@vectorize-io/hindsight-client 0.4.21 → 0.5.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/dist/index.d.mts +505 -18
- package/dist/index.d.ts +505 -18
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +41 -0
- package/dist/index.mjs.map +1 -1
- package/generated/sdk.gen.ts +50 -0
- package/generated/types.gen.ts +509 -16
- package/package.json +1 -1
- package/src/index.ts +53 -0
package/dist/index.d.mts
CHANGED
|
@@ -366,6 +366,258 @@ type BankStatsResponse = {
|
|
|
366
366
|
*/
|
|
367
367
|
total_observations?: number;
|
|
368
368
|
};
|
|
369
|
+
/**
|
|
370
|
+
* BankTemplateConfig
|
|
371
|
+
*
|
|
372
|
+
* Bank configuration fields within a template manifest.
|
|
373
|
+
*
|
|
374
|
+
* Only includes configurable (per-bank) fields. Credential fields
|
|
375
|
+
* (API keys, base URLs) are intentionally excluded for security.
|
|
376
|
+
*/
|
|
377
|
+
type BankTemplateConfig = {
|
|
378
|
+
/**
|
|
379
|
+
* Reflect Mission
|
|
380
|
+
*
|
|
381
|
+
* Mission/context for Reflect operations
|
|
382
|
+
*/
|
|
383
|
+
reflect_mission?: string | null;
|
|
384
|
+
/**
|
|
385
|
+
* Retain Mission
|
|
386
|
+
*
|
|
387
|
+
* Steers what gets extracted during retain
|
|
388
|
+
*/
|
|
389
|
+
retain_mission?: string | null;
|
|
390
|
+
/**
|
|
391
|
+
* Retain Extraction Mode
|
|
392
|
+
*
|
|
393
|
+
* Fact extraction mode: 'concise' (default), 'verbose', or 'custom'
|
|
394
|
+
*/
|
|
395
|
+
retain_extraction_mode?: string | null;
|
|
396
|
+
/**
|
|
397
|
+
* Retain Custom Instructions
|
|
398
|
+
*
|
|
399
|
+
* Custom extraction prompt (when mode='custom')
|
|
400
|
+
*/
|
|
401
|
+
retain_custom_instructions?: string | null;
|
|
402
|
+
/**
|
|
403
|
+
* Retain Chunk Size
|
|
404
|
+
*
|
|
405
|
+
* Max token size for each content chunk
|
|
406
|
+
*/
|
|
407
|
+
retain_chunk_size?: number | null;
|
|
408
|
+
/**
|
|
409
|
+
* Enable Observations
|
|
410
|
+
*
|
|
411
|
+
* Toggle observation consolidation
|
|
412
|
+
*/
|
|
413
|
+
enable_observations?: boolean | null;
|
|
414
|
+
/**
|
|
415
|
+
* Observations Mission
|
|
416
|
+
*
|
|
417
|
+
* Controls what gets synthesised
|
|
418
|
+
*/
|
|
419
|
+
observations_mission?: string | null;
|
|
420
|
+
/**
|
|
421
|
+
* Disposition Skepticism
|
|
422
|
+
*
|
|
423
|
+
* Skepticism trait (1-5)
|
|
424
|
+
*/
|
|
425
|
+
disposition_skepticism?: number | null;
|
|
426
|
+
/**
|
|
427
|
+
* Disposition Literalism
|
|
428
|
+
*
|
|
429
|
+
* Literalism trait (1-5)
|
|
430
|
+
*/
|
|
431
|
+
disposition_literalism?: number | null;
|
|
432
|
+
/**
|
|
433
|
+
* Disposition Empathy
|
|
434
|
+
*
|
|
435
|
+
* Empathy trait (1-5)
|
|
436
|
+
*/
|
|
437
|
+
disposition_empathy?: number | null;
|
|
438
|
+
/**
|
|
439
|
+
* Entity Labels
|
|
440
|
+
*
|
|
441
|
+
* Controlled vocabulary for entity labels
|
|
442
|
+
*/
|
|
443
|
+
entity_labels?: Array<{
|
|
444
|
+
[key: string]: unknown;
|
|
445
|
+
}> | null;
|
|
446
|
+
/**
|
|
447
|
+
* Entities Allow Free Form
|
|
448
|
+
*
|
|
449
|
+
* Allow entities outside the label vocabulary
|
|
450
|
+
*/
|
|
451
|
+
entities_allow_free_form?: boolean | null;
|
|
452
|
+
};
|
|
453
|
+
/**
|
|
454
|
+
* BankTemplateDirective
|
|
455
|
+
*
|
|
456
|
+
* A directive definition within a bank template manifest.
|
|
457
|
+
*
|
|
458
|
+
* Directives are matched by name on re-import: existing directives
|
|
459
|
+
* with the same name are updated, new ones are created.
|
|
460
|
+
*/
|
|
461
|
+
type BankTemplateDirective = {
|
|
462
|
+
/**
|
|
463
|
+
* Name
|
|
464
|
+
*
|
|
465
|
+
* Human-readable name for the directive (used as match key on re-import)
|
|
466
|
+
*/
|
|
467
|
+
name: string;
|
|
468
|
+
/**
|
|
469
|
+
* Content
|
|
470
|
+
*
|
|
471
|
+
* The directive text to inject into prompts
|
|
472
|
+
*/
|
|
473
|
+
content: string;
|
|
474
|
+
/**
|
|
475
|
+
* Priority
|
|
476
|
+
*
|
|
477
|
+
* Higher priority directives are injected first
|
|
478
|
+
*/
|
|
479
|
+
priority?: number;
|
|
480
|
+
/**
|
|
481
|
+
* Is Active
|
|
482
|
+
*
|
|
483
|
+
* Whether this directive is active
|
|
484
|
+
*/
|
|
485
|
+
is_active?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* Tags
|
|
488
|
+
*
|
|
489
|
+
* Tags for filtering
|
|
490
|
+
*/
|
|
491
|
+
tags?: Array<string>;
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* BankTemplateImportResponse
|
|
495
|
+
*
|
|
496
|
+
* Response model for the bank template import endpoint.
|
|
497
|
+
*/
|
|
498
|
+
type BankTemplateImportResponse = {
|
|
499
|
+
/**
|
|
500
|
+
* Bank Id
|
|
501
|
+
*
|
|
502
|
+
* Bank that was imported into
|
|
503
|
+
*/
|
|
504
|
+
bank_id: string;
|
|
505
|
+
/**
|
|
506
|
+
* Config Applied
|
|
507
|
+
*
|
|
508
|
+
* Whether bank config was updated
|
|
509
|
+
*/
|
|
510
|
+
config_applied: boolean;
|
|
511
|
+
/**
|
|
512
|
+
* Mental Models Created
|
|
513
|
+
*
|
|
514
|
+
* IDs of newly created mental models
|
|
515
|
+
*/
|
|
516
|
+
mental_models_created?: Array<string>;
|
|
517
|
+
/**
|
|
518
|
+
* Mental Models Updated
|
|
519
|
+
*
|
|
520
|
+
* IDs of updated mental models
|
|
521
|
+
*/
|
|
522
|
+
mental_models_updated?: Array<string>;
|
|
523
|
+
/**
|
|
524
|
+
* Directives Created
|
|
525
|
+
*
|
|
526
|
+
* Names of newly created directives
|
|
527
|
+
*/
|
|
528
|
+
directives_created?: Array<string>;
|
|
529
|
+
/**
|
|
530
|
+
* Directives Updated
|
|
531
|
+
*
|
|
532
|
+
* Names of updated directives
|
|
533
|
+
*/
|
|
534
|
+
directives_updated?: Array<string>;
|
|
535
|
+
/**
|
|
536
|
+
* Operation Ids
|
|
537
|
+
*
|
|
538
|
+
* Operation IDs for mental model content generation (async)
|
|
539
|
+
*/
|
|
540
|
+
operation_ids?: Array<string>;
|
|
541
|
+
/**
|
|
542
|
+
* Dry Run
|
|
543
|
+
*
|
|
544
|
+
* True if this was a validation-only run
|
|
545
|
+
*/
|
|
546
|
+
dry_run?: boolean;
|
|
547
|
+
};
|
|
548
|
+
/**
|
|
549
|
+
* BankTemplateManifest
|
|
550
|
+
*
|
|
551
|
+
* A bank template manifest for import/export.
|
|
552
|
+
*
|
|
553
|
+
* Version field enables forward-compatible schema evolution: the API
|
|
554
|
+
* auto-upgrades older manifest versions to the current schema on import.
|
|
555
|
+
*/
|
|
556
|
+
type BankTemplateManifest = {
|
|
557
|
+
/**
|
|
558
|
+
* Version
|
|
559
|
+
*
|
|
560
|
+
* Manifest schema version (currently '1')
|
|
561
|
+
*/
|
|
562
|
+
version: string;
|
|
563
|
+
/**
|
|
564
|
+
* Bank configuration to apply. Omit to leave config unchanged.
|
|
565
|
+
*/
|
|
566
|
+
bank?: BankTemplateConfig | null;
|
|
567
|
+
/**
|
|
568
|
+
* Mental Models
|
|
569
|
+
*
|
|
570
|
+
* Mental models to create or update (matched by id). Omit to leave unchanged.
|
|
571
|
+
*/
|
|
572
|
+
mental_models?: Array<BankTemplateMentalModel> | null;
|
|
573
|
+
/**
|
|
574
|
+
* Directives
|
|
575
|
+
*
|
|
576
|
+
* Directives to create or update (matched by name). Omit to leave unchanged.
|
|
577
|
+
*/
|
|
578
|
+
directives?: Array<BankTemplateDirective> | null;
|
|
579
|
+
};
|
|
580
|
+
/**
|
|
581
|
+
* BankTemplateMentalModel
|
|
582
|
+
*
|
|
583
|
+
* A mental model definition within a bank template manifest.
|
|
584
|
+
*/
|
|
585
|
+
type BankTemplateMentalModel = {
|
|
586
|
+
/**
|
|
587
|
+
* Id
|
|
588
|
+
*
|
|
589
|
+
* Unique ID for the mental model (alphanumeric lowercase with hyphens)
|
|
590
|
+
*/
|
|
591
|
+
id: string;
|
|
592
|
+
/**
|
|
593
|
+
* Name
|
|
594
|
+
*
|
|
595
|
+
* Human-readable name for the mental model
|
|
596
|
+
*/
|
|
597
|
+
name: string;
|
|
598
|
+
/**
|
|
599
|
+
* Source Query
|
|
600
|
+
*
|
|
601
|
+
* The query to run to generate content
|
|
602
|
+
*/
|
|
603
|
+
source_query: string;
|
|
604
|
+
/**
|
|
605
|
+
* Tags
|
|
606
|
+
*
|
|
607
|
+
* Tags for scoped visibility
|
|
608
|
+
*/
|
|
609
|
+
tags?: Array<string>;
|
|
610
|
+
/**
|
|
611
|
+
* Max Tokens
|
|
612
|
+
*
|
|
613
|
+
* Maximum tokens for generated content
|
|
614
|
+
*/
|
|
615
|
+
max_tokens?: number;
|
|
616
|
+
/**
|
|
617
|
+
* Trigger settings
|
|
618
|
+
*/
|
|
619
|
+
trigger?: MentalModelTriggerOutput;
|
|
620
|
+
};
|
|
369
621
|
/**
|
|
370
622
|
* Body_file_retain
|
|
371
623
|
*/
|
|
@@ -699,7 +951,7 @@ type CreateMentalModelRequest = {
|
|
|
699
951
|
/**
|
|
700
952
|
* Trigger settings
|
|
701
953
|
*/
|
|
702
|
-
trigger?:
|
|
954
|
+
trigger?: MentalModelTriggerInput;
|
|
703
955
|
};
|
|
704
956
|
/**
|
|
705
957
|
* CreateMentalModelResponse
|
|
@@ -916,6 +1168,22 @@ type DocumentResponse = {
|
|
|
916
1168
|
* Tags associated with this document
|
|
917
1169
|
*/
|
|
918
1170
|
tags?: Array<string>;
|
|
1171
|
+
/**
|
|
1172
|
+
* Document Metadata
|
|
1173
|
+
*
|
|
1174
|
+
* Document metadata
|
|
1175
|
+
*/
|
|
1176
|
+
document_metadata?: {
|
|
1177
|
+
[key: string]: unknown;
|
|
1178
|
+
} | null;
|
|
1179
|
+
/**
|
|
1180
|
+
* Retain Params
|
|
1181
|
+
*
|
|
1182
|
+
* Parameters used during retain
|
|
1183
|
+
*/
|
|
1184
|
+
retain_params?: {
|
|
1185
|
+
[key: string]: unknown;
|
|
1186
|
+
} | null;
|
|
919
1187
|
};
|
|
920
1188
|
/**
|
|
921
1189
|
* EntityDetailResponse
|
|
@@ -1324,6 +1592,12 @@ type MemoryItem = {
|
|
|
1324
1592
|
* Named retain strategy for this item. Overrides the bank's default strategy for this item only. Strategies are defined in the bank config under 'retain_strategies'.
|
|
1325
1593
|
*/
|
|
1326
1594
|
strategy?: string | null;
|
|
1595
|
+
/**
|
|
1596
|
+
* Update Mode
|
|
1597
|
+
*
|
|
1598
|
+
* How to handle an existing document with the same document_id. 'replace' (default) deletes old data and reprocesses from scratch. 'append' concatenates new content to the existing document text and reprocesses.
|
|
1599
|
+
*/
|
|
1600
|
+
update_mode?: "replace" | "append" | null;
|
|
1327
1601
|
};
|
|
1328
1602
|
/**
|
|
1329
1603
|
* MentalModelListResponse
|
|
@@ -1357,13 +1631,13 @@ type MentalModelResponse = {
|
|
|
1357
1631
|
/**
|
|
1358
1632
|
* Source Query
|
|
1359
1633
|
*/
|
|
1360
|
-
source_query
|
|
1634
|
+
source_query?: string | null;
|
|
1361
1635
|
/**
|
|
1362
1636
|
* Content
|
|
1363
1637
|
*
|
|
1364
1638
|
* The mental model content as well-formatted markdown (auto-generated from reflect endpoint)
|
|
1365
1639
|
*/
|
|
1366
|
-
content
|
|
1640
|
+
content?: string | null;
|
|
1367
1641
|
/**
|
|
1368
1642
|
* Tags
|
|
1369
1643
|
*/
|
|
@@ -1371,8 +1645,8 @@ type MentalModelResponse = {
|
|
|
1371
1645
|
/**
|
|
1372
1646
|
* Max Tokens
|
|
1373
1647
|
*/
|
|
1374
|
-
max_tokens?: number;
|
|
1375
|
-
trigger?:
|
|
1648
|
+
max_tokens?: number | null;
|
|
1649
|
+
trigger?: MentalModelTriggerOutput | null;
|
|
1376
1650
|
/**
|
|
1377
1651
|
* Last Refreshed At
|
|
1378
1652
|
*/
|
|
@@ -1395,7 +1669,7 @@ type MentalModelResponse = {
|
|
|
1395
1669
|
*
|
|
1396
1670
|
* Trigger settings for a mental model.
|
|
1397
1671
|
*/
|
|
1398
|
-
type
|
|
1672
|
+
type MentalModelTriggerInput = {
|
|
1399
1673
|
/**
|
|
1400
1674
|
* Refresh After Consolidation
|
|
1401
1675
|
*
|
|
@@ -1420,6 +1694,61 @@ type MentalModelTrigger = {
|
|
|
1420
1694
|
* Exclude specific mental models by ID from the reflect loop.
|
|
1421
1695
|
*/
|
|
1422
1696
|
exclude_mental_model_ids?: Array<string> | null;
|
|
1697
|
+
/**
|
|
1698
|
+
* Tags Match
|
|
1699
|
+
*
|
|
1700
|
+
* Override how the model's tags filter memories during refresh. If not set, defaults to 'all_strict' when the model has tags (security isolation) or 'any' when the model has no tags. Set to 'any' to include untagged memories alongside tagged ones during refresh.
|
|
1701
|
+
*/
|
|
1702
|
+
tags_match?: "any" | "all" | "any_strict" | "all_strict" | null;
|
|
1703
|
+
/**
|
|
1704
|
+
* Tag Groups
|
|
1705
|
+
*
|
|
1706
|
+
* Compound boolean tag expressions to use during refresh instead of the model's own tags. When set, these tag groups are passed to reflect and the model's flat tags are NOT used for filtering. Supports nested and/or/not expressions for complex tag-based scoping.
|
|
1707
|
+
*/
|
|
1708
|
+
tag_groups?: Array<TagGroupLeaf | TagGroupAndInput | TagGroupOrInput | TagGroupNotInput> | null;
|
|
1709
|
+
};
|
|
1710
|
+
/**
|
|
1711
|
+
* MentalModelTrigger
|
|
1712
|
+
*
|
|
1713
|
+
* Trigger settings for a mental model.
|
|
1714
|
+
*/
|
|
1715
|
+
type MentalModelTriggerOutput = {
|
|
1716
|
+
/**
|
|
1717
|
+
* Refresh After Consolidation
|
|
1718
|
+
*
|
|
1719
|
+
* If true, refresh this mental model after observations consolidation (real-time mode)
|
|
1720
|
+
*/
|
|
1721
|
+
refresh_after_consolidation?: boolean;
|
|
1722
|
+
/**
|
|
1723
|
+
* Fact Types
|
|
1724
|
+
*
|
|
1725
|
+
* Filter which fact types are retrieved during reflect. None means all types (world, experience, observation).
|
|
1726
|
+
*/
|
|
1727
|
+
fact_types?: Array<"world" | "experience" | "observation"> | null;
|
|
1728
|
+
/**
|
|
1729
|
+
* Exclude Mental Models
|
|
1730
|
+
*
|
|
1731
|
+
* If true, exclude all mental models from the reflect loop (skip search_mental_models tool).
|
|
1732
|
+
*/
|
|
1733
|
+
exclude_mental_models?: boolean;
|
|
1734
|
+
/**
|
|
1735
|
+
* Exclude Mental Model Ids
|
|
1736
|
+
*
|
|
1737
|
+
* Exclude specific mental models by ID from the reflect loop.
|
|
1738
|
+
*/
|
|
1739
|
+
exclude_mental_model_ids?: Array<string> | null;
|
|
1740
|
+
/**
|
|
1741
|
+
* Tags Match
|
|
1742
|
+
*
|
|
1743
|
+
* Override how the model's tags filter memories during refresh. If not set, defaults to 'all_strict' when the model has tags (security isolation) or 'any' when the model has no tags. Set to 'any' to include untagged memories alongside tagged ones during refresh.
|
|
1744
|
+
*/
|
|
1745
|
+
tags_match?: "any" | "all" | "any_strict" | "all_strict" | null;
|
|
1746
|
+
/**
|
|
1747
|
+
* Tag Groups
|
|
1748
|
+
*
|
|
1749
|
+
* Compound boolean tag expressions to use during refresh instead of the model's own tags. When set, these tag groups are passed to reflect and the model's flat tags are NOT used for filtering. Supports nested and/or/not expressions for complex tag-based scoping.
|
|
1750
|
+
*/
|
|
1751
|
+
tag_groups?: Array<TagGroupLeaf | TagGroupAndOutput | TagGroupOrOutput | TagGroupNotOutput> | null;
|
|
1423
1752
|
};
|
|
1424
1753
|
/**
|
|
1425
1754
|
* OperationResponse
|
|
@@ -1584,7 +1913,7 @@ type RecallRequest = {
|
|
|
1584
1913
|
*
|
|
1585
1914
|
* Compound tag filter using boolean groups. Groups in the list are AND-ed. Each group is a leaf {tags, match} or compound {and: [...]}, {or: [...]}, {not: ...}.
|
|
1586
1915
|
*/
|
|
1587
|
-
tag_groups?: Array<TagGroupLeaf |
|
|
1916
|
+
tag_groups?: Array<TagGroupLeaf | TagGroupAndInput | TagGroupOrInput | TagGroupNotInput> | null;
|
|
1588
1917
|
};
|
|
1589
1918
|
/**
|
|
1590
1919
|
* RecallResponse
|
|
@@ -1895,7 +2224,7 @@ type ReflectRequest = {
|
|
|
1895
2224
|
*
|
|
1896
2225
|
* Compound tag filter using boolean groups. Groups in the list are AND-ed. Each group is a leaf {tags, match} or compound {and: [...]}, {or: [...]}, {not: ...}.
|
|
1897
2226
|
*/
|
|
1898
|
-
tag_groups?: Array<TagGroupLeaf |
|
|
2227
|
+
tag_groups?: Array<TagGroupLeaf | TagGroupAndInput | TagGroupOrInput | TagGroupNotInput> | null;
|
|
1899
2228
|
/**
|
|
1900
2229
|
* Fact Types
|
|
1901
2230
|
*
|
|
@@ -2117,11 +2446,22 @@ type SourceFactsIncludeOptions = {
|
|
|
2117
2446
|
*
|
|
2118
2447
|
* Compound AND group: all child filters must match.
|
|
2119
2448
|
*/
|
|
2120
|
-
type
|
|
2449
|
+
type TagGroupAndInput = {
|
|
2121
2450
|
/**
|
|
2122
2451
|
* And
|
|
2123
2452
|
*/
|
|
2124
|
-
and: Array<TagGroupLeaf |
|
|
2453
|
+
and: Array<TagGroupLeaf | TagGroupAndInput | TagGroupOrInput | TagGroupNotInput>;
|
|
2454
|
+
};
|
|
2455
|
+
/**
|
|
2456
|
+
* TagGroupAnd
|
|
2457
|
+
*
|
|
2458
|
+
* Compound AND group: all child filters must match.
|
|
2459
|
+
*/
|
|
2460
|
+
type TagGroupAndOutput = {
|
|
2461
|
+
/**
|
|
2462
|
+
* And
|
|
2463
|
+
*/
|
|
2464
|
+
and: Array<TagGroupLeaf | TagGroupAndOutput | TagGroupOrOutput | TagGroupNotOutput>;
|
|
2125
2465
|
};
|
|
2126
2466
|
/**
|
|
2127
2467
|
* TagGroupLeaf
|
|
@@ -2143,22 +2483,44 @@ type TagGroupLeaf = {
|
|
|
2143
2483
|
*
|
|
2144
2484
|
* Compound NOT group: child filter must NOT match.
|
|
2145
2485
|
*/
|
|
2146
|
-
type
|
|
2486
|
+
type TagGroupNotInput = {
|
|
2487
|
+
/**
|
|
2488
|
+
* Not
|
|
2489
|
+
*/
|
|
2490
|
+
not: TagGroupLeaf | TagGroupAndInput | TagGroupOrInput | TagGroupNotInput;
|
|
2491
|
+
};
|
|
2492
|
+
/**
|
|
2493
|
+
* TagGroupNot
|
|
2494
|
+
*
|
|
2495
|
+
* Compound NOT group: child filter must NOT match.
|
|
2496
|
+
*/
|
|
2497
|
+
type TagGroupNotOutput = {
|
|
2147
2498
|
/**
|
|
2148
2499
|
* Not
|
|
2149
2500
|
*/
|
|
2150
|
-
not: TagGroupLeaf |
|
|
2501
|
+
not: TagGroupLeaf | TagGroupAndOutput | TagGroupOrOutput | TagGroupNotOutput;
|
|
2502
|
+
};
|
|
2503
|
+
/**
|
|
2504
|
+
* TagGroupOr
|
|
2505
|
+
*
|
|
2506
|
+
* Compound OR group: at least one child filter must match.
|
|
2507
|
+
*/
|
|
2508
|
+
type TagGroupOrInput = {
|
|
2509
|
+
/**
|
|
2510
|
+
* Or
|
|
2511
|
+
*/
|
|
2512
|
+
or: Array<TagGroupLeaf | TagGroupAndInput | TagGroupOrInput | TagGroupNotInput>;
|
|
2151
2513
|
};
|
|
2152
2514
|
/**
|
|
2153
2515
|
* TagGroupOr
|
|
2154
2516
|
*
|
|
2155
2517
|
* Compound OR group: at least one child filter must match.
|
|
2156
2518
|
*/
|
|
2157
|
-
type
|
|
2519
|
+
type TagGroupOrOutput = {
|
|
2158
2520
|
/**
|
|
2159
2521
|
* Or
|
|
2160
2522
|
*/
|
|
2161
|
-
or: Array<TagGroupLeaf |
|
|
2523
|
+
or: Array<TagGroupLeaf | TagGroupAndOutput | TagGroupOrOutput | TagGroupNotOutput>;
|
|
2162
2524
|
};
|
|
2163
2525
|
/**
|
|
2164
2526
|
* TagItem
|
|
@@ -2322,7 +2684,7 @@ type UpdateMentalModelRequest = {
|
|
|
2322
2684
|
/**
|
|
2323
2685
|
* Trigger settings
|
|
2324
2686
|
*/
|
|
2325
|
-
trigger?:
|
|
2687
|
+
trigger?: MentalModelTriggerInput | null;
|
|
2326
2688
|
};
|
|
2327
2689
|
/**
|
|
2328
2690
|
* UpdateWebhookRequest
|
|
@@ -3013,6 +3375,12 @@ type ListMentalModelsData = {
|
|
|
3013
3375
|
* How to match tags
|
|
3014
3376
|
*/
|
|
3015
3377
|
tags_match?: "any" | "all" | "exact";
|
|
3378
|
+
/**
|
|
3379
|
+
* Detail
|
|
3380
|
+
*
|
|
3381
|
+
* Detail level: 'metadata' (names/tags only), 'content' (adds content/config), 'full' (includes reflect_response)
|
|
3382
|
+
*/
|
|
3383
|
+
detail?: "metadata" | "content" | "full";
|
|
3016
3384
|
/**
|
|
3017
3385
|
* Limit
|
|
3018
3386
|
*/
|
|
@@ -3116,7 +3484,14 @@ type GetMentalModelData = {
|
|
|
3116
3484
|
*/
|
|
3117
3485
|
mental_model_id: string;
|
|
3118
3486
|
};
|
|
3119
|
-
query?:
|
|
3487
|
+
query?: {
|
|
3488
|
+
/**
|
|
3489
|
+
* Detail
|
|
3490
|
+
*
|
|
3491
|
+
* Detail level: 'metadata' (names/tags only), 'content' (adds content/config), 'full' (includes reflect_response)
|
|
3492
|
+
*/
|
|
3493
|
+
detail?: "metadata" | "content" | "full";
|
|
3494
|
+
};
|
|
3120
3495
|
url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}";
|
|
3121
3496
|
};
|
|
3122
3497
|
type GetMentalModelErrors = {
|
|
@@ -3973,6 +4348,83 @@ type CreateOrUpdateBankResponses = {
|
|
|
3973
4348
|
*/
|
|
3974
4349
|
200: BankProfileResponse;
|
|
3975
4350
|
};
|
|
4351
|
+
type ImportBankTemplateData = {
|
|
4352
|
+
body?: never;
|
|
4353
|
+
headers?: {
|
|
4354
|
+
/**
|
|
4355
|
+
* Authorization
|
|
4356
|
+
*/
|
|
4357
|
+
authorization?: string | null;
|
|
4358
|
+
};
|
|
4359
|
+
path: {
|
|
4360
|
+
/**
|
|
4361
|
+
* Bank Id
|
|
4362
|
+
*/
|
|
4363
|
+
bank_id: string;
|
|
4364
|
+
};
|
|
4365
|
+
query?: {
|
|
4366
|
+
/**
|
|
4367
|
+
* Dry Run
|
|
4368
|
+
*
|
|
4369
|
+
* Validate only, do not apply changes
|
|
4370
|
+
*/
|
|
4371
|
+
dry_run?: boolean;
|
|
4372
|
+
};
|
|
4373
|
+
url: "/v1/default/banks/{bank_id}/import";
|
|
4374
|
+
};
|
|
4375
|
+
type ImportBankTemplateErrors = {
|
|
4376
|
+
/**
|
|
4377
|
+
* Validation Error
|
|
4378
|
+
*/
|
|
4379
|
+
422: HttpValidationError;
|
|
4380
|
+
};
|
|
4381
|
+
type ImportBankTemplateResponses = {
|
|
4382
|
+
/**
|
|
4383
|
+
* Successful Response
|
|
4384
|
+
*/
|
|
4385
|
+
200: BankTemplateImportResponse;
|
|
4386
|
+
};
|
|
4387
|
+
type ExportBankTemplateData = {
|
|
4388
|
+
body?: never;
|
|
4389
|
+
headers?: {
|
|
4390
|
+
/**
|
|
4391
|
+
* Authorization
|
|
4392
|
+
*/
|
|
4393
|
+
authorization?: string | null;
|
|
4394
|
+
};
|
|
4395
|
+
path: {
|
|
4396
|
+
/**
|
|
4397
|
+
* Bank Id
|
|
4398
|
+
*/
|
|
4399
|
+
bank_id: string;
|
|
4400
|
+
};
|
|
4401
|
+
query?: never;
|
|
4402
|
+
url: "/v1/default/banks/{bank_id}/export";
|
|
4403
|
+
};
|
|
4404
|
+
type ExportBankTemplateErrors = {
|
|
4405
|
+
/**
|
|
4406
|
+
* Validation Error
|
|
4407
|
+
*/
|
|
4408
|
+
422: HttpValidationError;
|
|
4409
|
+
};
|
|
4410
|
+
type ExportBankTemplateResponses = {
|
|
4411
|
+
/**
|
|
4412
|
+
* Successful Response
|
|
4413
|
+
*/
|
|
4414
|
+
200: BankTemplateManifest;
|
|
4415
|
+
};
|
|
4416
|
+
type GetBankTemplateSchemaData = {
|
|
4417
|
+
body?: never;
|
|
4418
|
+
path?: never;
|
|
4419
|
+
query?: never;
|
|
4420
|
+
url: "/v1/bank-template-schema";
|
|
4421
|
+
};
|
|
4422
|
+
type GetBankTemplateSchemaResponses = {
|
|
4423
|
+
/**
|
|
4424
|
+
* Successful Response
|
|
4425
|
+
*/
|
|
4426
|
+
200: unknown;
|
|
4427
|
+
};
|
|
3976
4428
|
type ClearObservationsData = {
|
|
3977
4429
|
body?: never;
|
|
3978
4430
|
headers?: {
|
|
@@ -5158,6 +5610,24 @@ declare const updateBank: <ThrowOnError extends boolean = false>(options: Option
|
|
|
5158
5610
|
* Create a new agent or update existing agent with disposition and mission. Auto-fills missing fields with defaults.
|
|
5159
5611
|
*/
|
|
5160
5612
|
declare const createOrUpdateBank: <ThrowOnError extends boolean = false>(options: Options<CreateOrUpdateBankData, ThrowOnError>) => RequestResult<CreateOrUpdateBankResponses, CreateOrUpdateBankErrors, ThrowOnError, "fields">;
|
|
5613
|
+
/**
|
|
5614
|
+
* Import bank template
|
|
5615
|
+
*
|
|
5616
|
+
* Import a bank template manifest to create or update a bank's configuration, mental models, and directives. If the bank does not exist it is created. Config fields are applied as per-bank overrides. Mental models are matched by id, directives by name — existing ones are updated, new ones are created. Use dry_run=true to validate the manifest without applying changes.
|
|
5617
|
+
*/
|
|
5618
|
+
declare const importBankTemplate: <ThrowOnError extends boolean = false>(options: Options<ImportBankTemplateData, ThrowOnError>) => RequestResult<ImportBankTemplateResponses, ImportBankTemplateErrors, ThrowOnError, "fields">;
|
|
5619
|
+
/**
|
|
5620
|
+
* Export bank template
|
|
5621
|
+
*
|
|
5622
|
+
* Export a bank's current configuration, mental models, and directives as a template manifest. The exported manifest can be imported into another bank to replicate the setup.
|
|
5623
|
+
*/
|
|
5624
|
+
declare const exportBankTemplate: <ThrowOnError extends boolean = false>(options: Options<ExportBankTemplateData, ThrowOnError>) => RequestResult<ExportBankTemplateResponses, ExportBankTemplateErrors, ThrowOnError, "fields">;
|
|
5625
|
+
/**
|
|
5626
|
+
* Get bank template JSON Schema
|
|
5627
|
+
*
|
|
5628
|
+
* Returns the JSON Schema for the bank template manifest format. Use this to validate template manifests before importing.
|
|
5629
|
+
*/
|
|
5630
|
+
declare const getBankTemplateSchema: <ThrowOnError extends boolean = false>(options?: Options<GetBankTemplateSchemaData, ThrowOnError>) => RequestResult<GetBankTemplateSchemaResponses, unknown, ThrowOnError, "fields">;
|
|
5161
5631
|
/**
|
|
5162
5632
|
* Clear all observations
|
|
5163
5633
|
*
|
|
@@ -5328,10 +5798,12 @@ declare const sdk_gen_deleteDirective: typeof deleteDirective;
|
|
|
5328
5798
|
declare const sdk_gen_deleteDocument: typeof deleteDocument;
|
|
5329
5799
|
declare const sdk_gen_deleteMentalModel: typeof deleteMentalModel;
|
|
5330
5800
|
declare const sdk_gen_deleteWebhook: typeof deleteWebhook;
|
|
5801
|
+
declare const sdk_gen_exportBankTemplate: typeof exportBankTemplate;
|
|
5331
5802
|
declare const sdk_gen_fileRetain: typeof fileRetain;
|
|
5332
5803
|
declare const sdk_gen_getAgentStats: typeof getAgentStats;
|
|
5333
5804
|
declare const sdk_gen_getBankConfig: typeof getBankConfig;
|
|
5334
5805
|
declare const sdk_gen_getBankProfile: typeof getBankProfile;
|
|
5806
|
+
declare const sdk_gen_getBankTemplateSchema: typeof getBankTemplateSchema;
|
|
5335
5807
|
declare const sdk_gen_getChunk: typeof getChunk;
|
|
5336
5808
|
declare const sdk_gen_getDirective: typeof getDirective;
|
|
5337
5809
|
declare const sdk_gen_getDocument: typeof getDocument;
|
|
@@ -5344,6 +5816,7 @@ declare const sdk_gen_getObservationHistory: typeof getObservationHistory;
|
|
|
5344
5816
|
declare const sdk_gen_getOperationStatus: typeof getOperationStatus;
|
|
5345
5817
|
declare const sdk_gen_getVersion: typeof getVersion;
|
|
5346
5818
|
declare const sdk_gen_healthEndpointHealthGet: typeof healthEndpointHealthGet;
|
|
5819
|
+
declare const sdk_gen_importBankTemplate: typeof importBankTemplate;
|
|
5347
5820
|
declare const sdk_gen_listAuditLogs: typeof listAuditLogs;
|
|
5348
5821
|
declare const sdk_gen_listBanks: typeof listBanks;
|
|
5349
5822
|
declare const sdk_gen_listDirectives: typeof listDirectives;
|
|
@@ -5373,7 +5846,7 @@ declare const sdk_gen_updateDocument: typeof updateDocument;
|
|
|
5373
5846
|
declare const sdk_gen_updateMentalModel: typeof updateMentalModel;
|
|
5374
5847
|
declare const sdk_gen_updateWebhook: typeof updateWebhook;
|
|
5375
5848
|
declare namespace sdk_gen {
|
|
5376
|
-
export { type sdk_gen_Options as Options, sdk_gen_addBankBackground as addBankBackground, sdk_gen_auditLogStats as auditLogStats, sdk_gen_cancelOperation as cancelOperation, sdk_gen_clearBankMemories as clearBankMemories, sdk_gen_clearMemoryObservations as clearMemoryObservations, sdk_gen_clearObservations as clearObservations, sdk_gen_createDirective as createDirective, sdk_gen_createMentalModel as createMentalModel, sdk_gen_createOrUpdateBank as createOrUpdateBank, sdk_gen_createWebhook as createWebhook, sdk_gen_deleteBank as deleteBank, sdk_gen_deleteDirective as deleteDirective, sdk_gen_deleteDocument as deleteDocument, sdk_gen_deleteMentalModel as deleteMentalModel, sdk_gen_deleteWebhook as deleteWebhook, sdk_gen_fileRetain as fileRetain, sdk_gen_getAgentStats as getAgentStats, sdk_gen_getBankConfig as getBankConfig, sdk_gen_getBankProfile as getBankProfile, sdk_gen_getChunk as getChunk, sdk_gen_getDirective as getDirective, sdk_gen_getDocument as getDocument, sdk_gen_getEntity as getEntity, sdk_gen_getGraph as getGraph, sdk_gen_getMemory as getMemory, sdk_gen_getMentalModel as getMentalModel, sdk_gen_getMentalModelHistory as getMentalModelHistory, sdk_gen_getObservationHistory as getObservationHistory, sdk_gen_getOperationStatus as getOperationStatus, sdk_gen_getVersion as getVersion, sdk_gen_healthEndpointHealthGet as healthEndpointHealthGet, sdk_gen_listAuditLogs as listAuditLogs, sdk_gen_listBanks as listBanks, sdk_gen_listDirectives as listDirectives, sdk_gen_listDocuments as listDocuments, sdk_gen_listEntities as listEntities, sdk_gen_listMemories as listMemories, sdk_gen_listMentalModels as listMentalModels, sdk_gen_listOperations as listOperations, sdk_gen_listTags as listTags, sdk_gen_listWebhookDeliveries as listWebhookDeliveries, sdk_gen_listWebhooks as listWebhooks, sdk_gen_metricsEndpointMetricsGet as metricsEndpointMetricsGet, sdk_gen_recallMemories as recallMemories, sdk_gen_recoverConsolidation as recoverConsolidation, sdk_gen_reflect as reflect, sdk_gen_refreshMentalModel as refreshMentalModel, sdk_gen_regenerateEntityObservations as regenerateEntityObservations, sdk_gen_resetBankConfig as resetBankConfig, sdk_gen_retainMemories as retainMemories, sdk_gen_retryOperation as retryOperation, sdk_gen_triggerConsolidation as triggerConsolidation, sdk_gen_updateBank as updateBank, sdk_gen_updateBankConfig as updateBankConfig, sdk_gen_updateBankDisposition as updateBankDisposition, sdk_gen_updateDirective as updateDirective, sdk_gen_updateDocument as updateDocument, sdk_gen_updateMentalModel as updateMentalModel, sdk_gen_updateWebhook as updateWebhook };
|
|
5849
|
+
export { type sdk_gen_Options as Options, sdk_gen_addBankBackground as addBankBackground, sdk_gen_auditLogStats as auditLogStats, sdk_gen_cancelOperation as cancelOperation, sdk_gen_clearBankMemories as clearBankMemories, sdk_gen_clearMemoryObservations as clearMemoryObservations, sdk_gen_clearObservations as clearObservations, sdk_gen_createDirective as createDirective, sdk_gen_createMentalModel as createMentalModel, sdk_gen_createOrUpdateBank as createOrUpdateBank, sdk_gen_createWebhook as createWebhook, sdk_gen_deleteBank as deleteBank, sdk_gen_deleteDirective as deleteDirective, sdk_gen_deleteDocument as deleteDocument, sdk_gen_deleteMentalModel as deleteMentalModel, sdk_gen_deleteWebhook as deleteWebhook, sdk_gen_exportBankTemplate as exportBankTemplate, sdk_gen_fileRetain as fileRetain, sdk_gen_getAgentStats as getAgentStats, sdk_gen_getBankConfig as getBankConfig, sdk_gen_getBankProfile as getBankProfile, sdk_gen_getBankTemplateSchema as getBankTemplateSchema, sdk_gen_getChunk as getChunk, sdk_gen_getDirective as getDirective, sdk_gen_getDocument as getDocument, sdk_gen_getEntity as getEntity, sdk_gen_getGraph as getGraph, sdk_gen_getMemory as getMemory, sdk_gen_getMentalModel as getMentalModel, sdk_gen_getMentalModelHistory as getMentalModelHistory, sdk_gen_getObservationHistory as getObservationHistory, sdk_gen_getOperationStatus as getOperationStatus, sdk_gen_getVersion as getVersion, sdk_gen_healthEndpointHealthGet as healthEndpointHealthGet, sdk_gen_importBankTemplate as importBankTemplate, sdk_gen_listAuditLogs as listAuditLogs, sdk_gen_listBanks as listBanks, sdk_gen_listDirectives as listDirectives, sdk_gen_listDocuments as listDocuments, sdk_gen_listEntities as listEntities, sdk_gen_listMemories as listMemories, sdk_gen_listMentalModels as listMentalModels, sdk_gen_listOperations as listOperations, sdk_gen_listTags as listTags, sdk_gen_listWebhookDeliveries as listWebhookDeliveries, sdk_gen_listWebhooks as listWebhooks, sdk_gen_metricsEndpointMetricsGet as metricsEndpointMetricsGet, sdk_gen_recallMemories as recallMemories, sdk_gen_recoverConsolidation as recoverConsolidation, sdk_gen_reflect as reflect, sdk_gen_refreshMentalModel as refreshMentalModel, sdk_gen_regenerateEntityObservations as regenerateEntityObservations, sdk_gen_resetBankConfig as resetBankConfig, sdk_gen_retainMemories as retainMemories, sdk_gen_retryOperation as retryOperation, sdk_gen_triggerConsolidation as triggerConsolidation, sdk_gen_updateBank as updateBank, sdk_gen_updateBankConfig as updateBankConfig, sdk_gen_updateBankDisposition as updateBankDisposition, sdk_gen_updateDirective as updateDirective, sdk_gen_updateDocument as updateDocument, sdk_gen_updateMentalModel as updateMentalModel, sdk_gen_updateWebhook as updateWebhook };
|
|
5377
5850
|
}
|
|
5378
5851
|
|
|
5379
5852
|
/**
|
|
@@ -5433,6 +5906,7 @@ interface MemoryItemInput {
|
|
|
5433
5906
|
tags?: string[];
|
|
5434
5907
|
observation_scopes?: "per_tag" | "combined" | "all_combinations" | string[][];
|
|
5435
5908
|
strategy?: string;
|
|
5909
|
+
update_mode?: "replace" | "append";
|
|
5436
5910
|
}
|
|
5437
5911
|
declare class HindsightClient {
|
|
5438
5912
|
private client;
|
|
@@ -5453,6 +5927,8 @@ declare class HindsightClient {
|
|
|
5453
5927
|
entities?: EntityInput[];
|
|
5454
5928
|
/** Optional list of tags for this memory */
|
|
5455
5929
|
tags?: string[];
|
|
5930
|
+
/** How to handle existing documents: 'replace' (default) or 'append' */
|
|
5931
|
+
updateMode?: "replace" | "append";
|
|
5456
5932
|
}): Promise<RetainResponse>;
|
|
5457
5933
|
/**
|
|
5458
5934
|
* Retain multiple memories in batch.
|
|
@@ -5687,5 +6163,16 @@ declare class HindsightClient {
|
|
|
5687
6163
|
*/
|
|
5688
6164
|
getMentalModelHistory(bankId: string, mentalModelId: string): Promise<any>;
|
|
5689
6165
|
}
|
|
6166
|
+
/**
|
|
6167
|
+
* Serialize a RecallResponse to a string suitable for LLM prompts.
|
|
6168
|
+
*
|
|
6169
|
+
* Builds a prompt containing:
|
|
6170
|
+
* - Facts: each result as a JSON object with text, context, temporal fields,
|
|
6171
|
+
* and source_chunk (if the result's chunk_id matches a chunk in the response).
|
|
6172
|
+
* - Entities: entity summaries from observations, formatted as sections.
|
|
6173
|
+
*
|
|
6174
|
+
* Mirrors the format used internally by Hindsight's reflect operation.
|
|
6175
|
+
*/
|
|
6176
|
+
declare function recallResponseToPromptString(response: RecallResponse): string;
|
|
5690
6177
|
|
|
5691
|
-
export { type BankConfigResponse, type BankProfileResponse, type Budget, type Client, type CreateBankRequest, type EntityInput, type FileRetainResponse, HindsightClient, type HindsightClientOptions, HindsightError, type ListMemoryUnitsResponse, type MemoryItemInput, type RecallRequest, type RecallResponse, type RecallResult, type ReflectRequest, type ReflectResponse, type RetainRequest, type RetainResponse, createClient, createConfig, sdk_gen as sdk };
|
|
6178
|
+
export { type BankConfigResponse, type BankProfileResponse, type Budget, type Client, type CreateBankRequest, type EntityInput, type FileRetainResponse, HindsightClient, type HindsightClientOptions, HindsightError, type ListMemoryUnitsResponse, type MemoryItemInput, type RecallRequest, type RecallResponse, type RecallResult, type ReflectRequest, type ReflectResponse, type RetainRequest, type RetainResponse, createClient, createConfig, recallResponseToPromptString, sdk_gen as sdk };
|