@vectorize-io/hindsight-client 0.4.22 → 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 +390 -7
- package/dist/index.d.ts +390 -7
- 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 +378 -5
- 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
|
*/
|
|
@@ -1340,6 +1592,12 @@ type MemoryItem = {
|
|
|
1340
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'.
|
|
1341
1593
|
*/
|
|
1342
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;
|
|
1343
1601
|
};
|
|
1344
1602
|
/**
|
|
1345
1603
|
* MentalModelListResponse
|
|
@@ -1373,13 +1631,13 @@ type MentalModelResponse = {
|
|
|
1373
1631
|
/**
|
|
1374
1632
|
* Source Query
|
|
1375
1633
|
*/
|
|
1376
|
-
source_query
|
|
1634
|
+
source_query?: string | null;
|
|
1377
1635
|
/**
|
|
1378
1636
|
* Content
|
|
1379
1637
|
*
|
|
1380
1638
|
* The mental model content as well-formatted markdown (auto-generated from reflect endpoint)
|
|
1381
1639
|
*/
|
|
1382
|
-
content
|
|
1640
|
+
content?: string | null;
|
|
1383
1641
|
/**
|
|
1384
1642
|
* Tags
|
|
1385
1643
|
*/
|
|
@@ -1387,8 +1645,8 @@ type MentalModelResponse = {
|
|
|
1387
1645
|
/**
|
|
1388
1646
|
* Max Tokens
|
|
1389
1647
|
*/
|
|
1390
|
-
max_tokens?: number;
|
|
1391
|
-
trigger?: MentalModelTriggerOutput;
|
|
1648
|
+
max_tokens?: number | null;
|
|
1649
|
+
trigger?: MentalModelTriggerOutput | null;
|
|
1392
1650
|
/**
|
|
1393
1651
|
* Last Refreshed At
|
|
1394
1652
|
*/
|
|
@@ -3117,6 +3375,12 @@ type ListMentalModelsData = {
|
|
|
3117
3375
|
* How to match tags
|
|
3118
3376
|
*/
|
|
3119
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";
|
|
3120
3384
|
/**
|
|
3121
3385
|
* Limit
|
|
3122
3386
|
*/
|
|
@@ -3220,7 +3484,14 @@ type GetMentalModelData = {
|
|
|
3220
3484
|
*/
|
|
3221
3485
|
mental_model_id: string;
|
|
3222
3486
|
};
|
|
3223
|
-
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
|
+
};
|
|
3224
3495
|
url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}";
|
|
3225
3496
|
};
|
|
3226
3497
|
type GetMentalModelErrors = {
|
|
@@ -4077,6 +4348,83 @@ type CreateOrUpdateBankResponses = {
|
|
|
4077
4348
|
*/
|
|
4078
4349
|
200: BankProfileResponse;
|
|
4079
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
|
+
};
|
|
4080
4428
|
type ClearObservationsData = {
|
|
4081
4429
|
body?: never;
|
|
4082
4430
|
headers?: {
|
|
@@ -5262,6 +5610,24 @@ declare const updateBank: <ThrowOnError extends boolean = false>(options: Option
|
|
|
5262
5610
|
* Create a new agent or update existing agent with disposition and mission. Auto-fills missing fields with defaults.
|
|
5263
5611
|
*/
|
|
5264
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">;
|
|
5265
5631
|
/**
|
|
5266
5632
|
* Clear all observations
|
|
5267
5633
|
*
|
|
@@ -5432,10 +5798,12 @@ declare const sdk_gen_deleteDirective: typeof deleteDirective;
|
|
|
5432
5798
|
declare const sdk_gen_deleteDocument: typeof deleteDocument;
|
|
5433
5799
|
declare const sdk_gen_deleteMentalModel: typeof deleteMentalModel;
|
|
5434
5800
|
declare const sdk_gen_deleteWebhook: typeof deleteWebhook;
|
|
5801
|
+
declare const sdk_gen_exportBankTemplate: typeof exportBankTemplate;
|
|
5435
5802
|
declare const sdk_gen_fileRetain: typeof fileRetain;
|
|
5436
5803
|
declare const sdk_gen_getAgentStats: typeof getAgentStats;
|
|
5437
5804
|
declare const sdk_gen_getBankConfig: typeof getBankConfig;
|
|
5438
5805
|
declare const sdk_gen_getBankProfile: typeof getBankProfile;
|
|
5806
|
+
declare const sdk_gen_getBankTemplateSchema: typeof getBankTemplateSchema;
|
|
5439
5807
|
declare const sdk_gen_getChunk: typeof getChunk;
|
|
5440
5808
|
declare const sdk_gen_getDirective: typeof getDirective;
|
|
5441
5809
|
declare const sdk_gen_getDocument: typeof getDocument;
|
|
@@ -5448,6 +5816,7 @@ declare const sdk_gen_getObservationHistory: typeof getObservationHistory;
|
|
|
5448
5816
|
declare const sdk_gen_getOperationStatus: typeof getOperationStatus;
|
|
5449
5817
|
declare const sdk_gen_getVersion: typeof getVersion;
|
|
5450
5818
|
declare const sdk_gen_healthEndpointHealthGet: typeof healthEndpointHealthGet;
|
|
5819
|
+
declare const sdk_gen_importBankTemplate: typeof importBankTemplate;
|
|
5451
5820
|
declare const sdk_gen_listAuditLogs: typeof listAuditLogs;
|
|
5452
5821
|
declare const sdk_gen_listBanks: typeof listBanks;
|
|
5453
5822
|
declare const sdk_gen_listDirectives: typeof listDirectives;
|
|
@@ -5477,7 +5846,7 @@ declare const sdk_gen_updateDocument: typeof updateDocument;
|
|
|
5477
5846
|
declare const sdk_gen_updateMentalModel: typeof updateMentalModel;
|
|
5478
5847
|
declare const sdk_gen_updateWebhook: typeof updateWebhook;
|
|
5479
5848
|
declare namespace sdk_gen {
|
|
5480
|
-
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 };
|
|
5481
5850
|
}
|
|
5482
5851
|
|
|
5483
5852
|
/**
|
|
@@ -5537,6 +5906,7 @@ interface MemoryItemInput {
|
|
|
5537
5906
|
tags?: string[];
|
|
5538
5907
|
observation_scopes?: "per_tag" | "combined" | "all_combinations" | string[][];
|
|
5539
5908
|
strategy?: string;
|
|
5909
|
+
update_mode?: "replace" | "append";
|
|
5540
5910
|
}
|
|
5541
5911
|
declare class HindsightClient {
|
|
5542
5912
|
private client;
|
|
@@ -5557,6 +5927,8 @@ declare class HindsightClient {
|
|
|
5557
5927
|
entities?: EntityInput[];
|
|
5558
5928
|
/** Optional list of tags for this memory */
|
|
5559
5929
|
tags?: string[];
|
|
5930
|
+
/** How to handle existing documents: 'replace' (default) or 'append' */
|
|
5931
|
+
updateMode?: "replace" | "append";
|
|
5560
5932
|
}): Promise<RetainResponse>;
|
|
5561
5933
|
/**
|
|
5562
5934
|
* Retain multiple memories in batch.
|
|
@@ -5791,5 +6163,16 @@ declare class HindsightClient {
|
|
|
5791
6163
|
*/
|
|
5792
6164
|
getMentalModelHistory(bankId: string, mentalModelId: string): Promise<any>;
|
|
5793
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;
|
|
5794
6177
|
|
|
5795
|
-
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 };
|