@vectorize-io/hindsight-client 0.2.1 → 0.4.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/generated/sdk.gen.d.ts +122 -10
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/sdk.gen.js +196 -10
- package/dist/generated/sdk.gen.js.map +1 -1
- package/dist/generated/types.gen.d.ts +1530 -80
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/src/index.d.ts +96 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +194 -10
- package/dist/src/index.js.map +1 -1
- package/generated/sdk.gen.ts +370 -9
- package/generated/types.gen.ts +1693 -108
- package/package.json +2 -2
- package/src/index.ts +275 -13
package/generated/sdk.gen.ts
CHANGED
|
@@ -12,15 +12,30 @@ import type {
|
|
|
12
12
|
ClearBankMemoriesData,
|
|
13
13
|
ClearBankMemoriesErrors,
|
|
14
14
|
ClearBankMemoriesResponses,
|
|
15
|
+
ClearObservationsData,
|
|
16
|
+
ClearObservationsErrors,
|
|
17
|
+
ClearObservationsResponses,
|
|
18
|
+
CreateDirectiveData,
|
|
19
|
+
CreateDirectiveErrors,
|
|
20
|
+
CreateDirectiveResponses,
|
|
21
|
+
CreateMentalModelData,
|
|
22
|
+
CreateMentalModelErrors,
|
|
23
|
+
CreateMentalModelResponses,
|
|
15
24
|
CreateOrUpdateBankData,
|
|
16
25
|
CreateOrUpdateBankErrors,
|
|
17
26
|
CreateOrUpdateBankResponses,
|
|
18
27
|
DeleteBankData,
|
|
19
28
|
DeleteBankErrors,
|
|
20
29
|
DeleteBankResponses,
|
|
30
|
+
DeleteDirectiveData,
|
|
31
|
+
DeleteDirectiveErrors,
|
|
32
|
+
DeleteDirectiveResponses,
|
|
21
33
|
DeleteDocumentData,
|
|
22
34
|
DeleteDocumentErrors,
|
|
23
35
|
DeleteDocumentResponses,
|
|
36
|
+
DeleteMentalModelData,
|
|
37
|
+
DeleteMentalModelErrors,
|
|
38
|
+
DeleteMentalModelResponses,
|
|
24
39
|
GetAgentStatsData,
|
|
25
40
|
GetAgentStatsErrors,
|
|
26
41
|
GetAgentStatsResponses,
|
|
@@ -30,6 +45,9 @@ import type {
|
|
|
30
45
|
GetChunkData,
|
|
31
46
|
GetChunkErrors,
|
|
32
47
|
GetChunkResponses,
|
|
48
|
+
GetDirectiveData,
|
|
49
|
+
GetDirectiveErrors,
|
|
50
|
+
GetDirectiveResponses,
|
|
33
51
|
GetDocumentData,
|
|
34
52
|
GetDocumentErrors,
|
|
35
53
|
GetDocumentResponses,
|
|
@@ -39,11 +57,25 @@ import type {
|
|
|
39
57
|
GetGraphData,
|
|
40
58
|
GetGraphErrors,
|
|
41
59
|
GetGraphResponses,
|
|
60
|
+
GetMemoryData,
|
|
61
|
+
GetMemoryErrors,
|
|
62
|
+
GetMemoryResponses,
|
|
63
|
+
GetMentalModelData,
|
|
64
|
+
GetMentalModelErrors,
|
|
65
|
+
GetMentalModelResponses,
|
|
66
|
+
GetOperationStatusData,
|
|
67
|
+
GetOperationStatusErrors,
|
|
68
|
+
GetOperationStatusResponses,
|
|
69
|
+
GetVersionData,
|
|
70
|
+
GetVersionResponses,
|
|
42
71
|
HealthEndpointHealthGetData,
|
|
43
72
|
HealthEndpointHealthGetResponses,
|
|
44
73
|
ListBanksData,
|
|
45
74
|
ListBanksErrors,
|
|
46
75
|
ListBanksResponses,
|
|
76
|
+
ListDirectivesData,
|
|
77
|
+
ListDirectivesErrors,
|
|
78
|
+
ListDirectivesResponses,
|
|
47
79
|
ListDocumentsData,
|
|
48
80
|
ListDocumentsErrors,
|
|
49
81
|
ListDocumentsResponses,
|
|
@@ -53,9 +85,15 @@ import type {
|
|
|
53
85
|
ListMemoriesData,
|
|
54
86
|
ListMemoriesErrors,
|
|
55
87
|
ListMemoriesResponses,
|
|
88
|
+
ListMentalModelsData,
|
|
89
|
+
ListMentalModelsErrors,
|
|
90
|
+
ListMentalModelsResponses,
|
|
56
91
|
ListOperationsData,
|
|
57
92
|
ListOperationsErrors,
|
|
58
93
|
ListOperationsResponses,
|
|
94
|
+
ListTagsData,
|
|
95
|
+
ListTagsErrors,
|
|
96
|
+
ListTagsResponses,
|
|
59
97
|
MetricsEndpointMetricsGetData,
|
|
60
98
|
MetricsEndpointMetricsGetResponses,
|
|
61
99
|
RecallMemoriesData,
|
|
@@ -64,15 +102,30 @@ import type {
|
|
|
64
102
|
ReflectData,
|
|
65
103
|
ReflectErrors,
|
|
66
104
|
ReflectResponses,
|
|
105
|
+
RefreshMentalModelData,
|
|
106
|
+
RefreshMentalModelErrors,
|
|
107
|
+
RefreshMentalModelResponses,
|
|
67
108
|
RegenerateEntityObservationsData,
|
|
68
109
|
RegenerateEntityObservationsErrors,
|
|
69
110
|
RegenerateEntityObservationsResponses,
|
|
70
111
|
RetainMemoriesData,
|
|
71
112
|
RetainMemoriesErrors,
|
|
72
113
|
RetainMemoriesResponses,
|
|
114
|
+
TriggerConsolidationData,
|
|
115
|
+
TriggerConsolidationErrors,
|
|
116
|
+
TriggerConsolidationResponses,
|
|
117
|
+
UpdateBankData,
|
|
73
118
|
UpdateBankDispositionData,
|
|
74
119
|
UpdateBankDispositionErrors,
|
|
75
120
|
UpdateBankDispositionResponses,
|
|
121
|
+
UpdateBankErrors,
|
|
122
|
+
UpdateBankResponses,
|
|
123
|
+
UpdateDirectiveData,
|
|
124
|
+
UpdateDirectiveErrors,
|
|
125
|
+
UpdateDirectiveResponses,
|
|
126
|
+
UpdateMentalModelData,
|
|
127
|
+
UpdateMentalModelErrors,
|
|
128
|
+
UpdateMentalModelResponses,
|
|
76
129
|
} from "./types.gen";
|
|
77
130
|
|
|
78
131
|
export type Options<
|
|
@@ -106,6 +159,19 @@ export const healthEndpointHealthGet = <ThrowOnError extends boolean = false>(
|
|
|
106
159
|
ThrowOnError
|
|
107
160
|
>({ url: "/health", ...options });
|
|
108
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Get API version and feature flags
|
|
164
|
+
*
|
|
165
|
+
* Returns API version information and enabled feature flags. Use this to check which capabilities are available in this deployment.
|
|
166
|
+
*/
|
|
167
|
+
export const getVersion = <ThrowOnError extends boolean = false>(
|
|
168
|
+
options?: Options<GetVersionData, ThrowOnError>,
|
|
169
|
+
) =>
|
|
170
|
+
(options?.client ?? client).get<GetVersionResponses, unknown, ThrowOnError>({
|
|
171
|
+
url: "/version",
|
|
172
|
+
...options,
|
|
173
|
+
});
|
|
174
|
+
|
|
109
175
|
/**
|
|
110
176
|
* Prometheus metrics endpoint
|
|
111
177
|
*
|
|
@@ -123,7 +189,7 @@ export const metricsEndpointMetricsGet = <ThrowOnError extends boolean = false>(
|
|
|
123
189
|
/**
|
|
124
190
|
* Get memory graph data
|
|
125
191
|
*
|
|
126
|
-
* Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion).
|
|
192
|
+
* Retrieve graph data for visualization, optionally filtered by type (world/experience/opinion).
|
|
127
193
|
*/
|
|
128
194
|
export const getGraph = <ThrowOnError extends boolean = false>(
|
|
129
195
|
options: Options<GetGraphData, ThrowOnError>,
|
|
@@ -148,6 +214,20 @@ export const listMemories = <ThrowOnError extends boolean = false>(
|
|
|
148
214
|
ThrowOnError
|
|
149
215
|
>({ url: "/v1/default/banks/{bank_id}/memories/list", ...options });
|
|
150
216
|
|
|
217
|
+
/**
|
|
218
|
+
* Get memory unit
|
|
219
|
+
*
|
|
220
|
+
* Get a single memory unit by ID with all its metadata including entities and tags.
|
|
221
|
+
*/
|
|
222
|
+
export const getMemory = <ThrowOnError extends boolean = false>(
|
|
223
|
+
options: Options<GetMemoryData, ThrowOnError>,
|
|
224
|
+
) =>
|
|
225
|
+
(options.client ?? client).get<
|
|
226
|
+
GetMemoryResponses,
|
|
227
|
+
GetMemoryErrors,
|
|
228
|
+
ThrowOnError
|
|
229
|
+
>({ url: "/v1/default/banks/{bank_id}/memories/{memory_id}", ...options });
|
|
230
|
+
|
|
151
231
|
/**
|
|
152
232
|
* Recall memory
|
|
153
233
|
*
|
|
@@ -236,7 +316,7 @@ export const getAgentStats = <ThrowOnError extends boolean = false>(
|
|
|
236
316
|
/**
|
|
237
317
|
* List entities
|
|
238
318
|
*
|
|
239
|
-
* List all entities (people, organizations, etc.) known by the bank, ordered by mention count.
|
|
319
|
+
* List all entities (people, organizations, etc.) known by the bank, ordered by mention count. Supports pagination.
|
|
240
320
|
*/
|
|
241
321
|
export const listEntities = <ThrowOnError extends boolean = false>(
|
|
242
322
|
options: Options<ListEntitiesData, ThrowOnError>,
|
|
@@ -262,9 +342,11 @@ export const getEntity = <ThrowOnError extends boolean = false>(
|
|
|
262
342
|
>({ url: "/v1/default/banks/{bank_id}/entities/{entity_id}", ...options });
|
|
263
343
|
|
|
264
344
|
/**
|
|
265
|
-
* Regenerate entity observations
|
|
345
|
+
* Regenerate entity observations (deprecated)
|
|
346
|
+
*
|
|
347
|
+
* This endpoint is deprecated. Entity observations have been replaced by mental models.
|
|
266
348
|
*
|
|
267
|
-
*
|
|
349
|
+
* @deprecated
|
|
268
350
|
*/
|
|
269
351
|
export const regenerateEntityObservations = <
|
|
270
352
|
ThrowOnError extends boolean = false,
|
|
@@ -280,6 +362,203 @@ export const regenerateEntityObservations = <
|
|
|
280
362
|
...options,
|
|
281
363
|
});
|
|
282
364
|
|
|
365
|
+
/**
|
|
366
|
+
* List mental models
|
|
367
|
+
*
|
|
368
|
+
* List user-curated living documents that stay current.
|
|
369
|
+
*/
|
|
370
|
+
export const listMentalModels = <ThrowOnError extends boolean = false>(
|
|
371
|
+
options: Options<ListMentalModelsData, ThrowOnError>,
|
|
372
|
+
) =>
|
|
373
|
+
(options.client ?? client).get<
|
|
374
|
+
ListMentalModelsResponses,
|
|
375
|
+
ListMentalModelsErrors,
|
|
376
|
+
ThrowOnError
|
|
377
|
+
>({ url: "/v1/default/banks/{bank_id}/mental-models", ...options });
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Create mental model
|
|
381
|
+
*
|
|
382
|
+
* Create a mental model by running reflect with the source query in the background. Returns an operation ID to track progress. The content is auto-generated by the reflect endpoint. Use the operations endpoint to check completion status.
|
|
383
|
+
*/
|
|
384
|
+
export const createMentalModel = <ThrowOnError extends boolean = false>(
|
|
385
|
+
options: Options<CreateMentalModelData, ThrowOnError>,
|
|
386
|
+
) =>
|
|
387
|
+
(options.client ?? client).post<
|
|
388
|
+
CreateMentalModelResponses,
|
|
389
|
+
CreateMentalModelErrors,
|
|
390
|
+
ThrowOnError
|
|
391
|
+
>({
|
|
392
|
+
url: "/v1/default/banks/{bank_id}/mental-models",
|
|
393
|
+
...options,
|
|
394
|
+
headers: {
|
|
395
|
+
"Content-Type": "application/json",
|
|
396
|
+
...options.headers,
|
|
397
|
+
},
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Delete mental model
|
|
402
|
+
*
|
|
403
|
+
* Delete a mental model.
|
|
404
|
+
*/
|
|
405
|
+
export const deleteMentalModel = <ThrowOnError extends boolean = false>(
|
|
406
|
+
options: Options<DeleteMentalModelData, ThrowOnError>,
|
|
407
|
+
) =>
|
|
408
|
+
(options.client ?? client).delete<
|
|
409
|
+
DeleteMentalModelResponses,
|
|
410
|
+
DeleteMentalModelErrors,
|
|
411
|
+
ThrowOnError
|
|
412
|
+
>({
|
|
413
|
+
url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}",
|
|
414
|
+
...options,
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Get mental model
|
|
419
|
+
*
|
|
420
|
+
* Get a specific mental model by ID.
|
|
421
|
+
*/
|
|
422
|
+
export const getMentalModel = <ThrowOnError extends boolean = false>(
|
|
423
|
+
options: Options<GetMentalModelData, ThrowOnError>,
|
|
424
|
+
) =>
|
|
425
|
+
(options.client ?? client).get<
|
|
426
|
+
GetMentalModelResponses,
|
|
427
|
+
GetMentalModelErrors,
|
|
428
|
+
ThrowOnError
|
|
429
|
+
>({
|
|
430
|
+
url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}",
|
|
431
|
+
...options,
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Update mental model
|
|
436
|
+
*
|
|
437
|
+
* Update a mental model's name and/or source query.
|
|
438
|
+
*/
|
|
439
|
+
export const updateMentalModel = <ThrowOnError extends boolean = false>(
|
|
440
|
+
options: Options<UpdateMentalModelData, ThrowOnError>,
|
|
441
|
+
) =>
|
|
442
|
+
(options.client ?? client).patch<
|
|
443
|
+
UpdateMentalModelResponses,
|
|
444
|
+
UpdateMentalModelErrors,
|
|
445
|
+
ThrowOnError
|
|
446
|
+
>({
|
|
447
|
+
url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}",
|
|
448
|
+
...options,
|
|
449
|
+
headers: {
|
|
450
|
+
"Content-Type": "application/json",
|
|
451
|
+
...options.headers,
|
|
452
|
+
},
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Refresh mental model
|
|
457
|
+
*
|
|
458
|
+
* Submit an async task to re-run the source query through reflect and update the content.
|
|
459
|
+
*/
|
|
460
|
+
export const refreshMentalModel = <ThrowOnError extends boolean = false>(
|
|
461
|
+
options: Options<RefreshMentalModelData, ThrowOnError>,
|
|
462
|
+
) =>
|
|
463
|
+
(options.client ?? client).post<
|
|
464
|
+
RefreshMentalModelResponses,
|
|
465
|
+
RefreshMentalModelErrors,
|
|
466
|
+
ThrowOnError
|
|
467
|
+
>({
|
|
468
|
+
url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}/refresh",
|
|
469
|
+
...options,
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* List directives
|
|
474
|
+
*
|
|
475
|
+
* List hard rules that are injected into prompts.
|
|
476
|
+
*/
|
|
477
|
+
export const listDirectives = <ThrowOnError extends boolean = false>(
|
|
478
|
+
options: Options<ListDirectivesData, ThrowOnError>,
|
|
479
|
+
) =>
|
|
480
|
+
(options.client ?? client).get<
|
|
481
|
+
ListDirectivesResponses,
|
|
482
|
+
ListDirectivesErrors,
|
|
483
|
+
ThrowOnError
|
|
484
|
+
>({ url: "/v1/default/banks/{bank_id}/directives", ...options });
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Create directive
|
|
488
|
+
*
|
|
489
|
+
* Create a hard rule that will be injected into prompts.
|
|
490
|
+
*/
|
|
491
|
+
export const createDirective = <ThrowOnError extends boolean = false>(
|
|
492
|
+
options: Options<CreateDirectiveData, ThrowOnError>,
|
|
493
|
+
) =>
|
|
494
|
+
(options.client ?? client).post<
|
|
495
|
+
CreateDirectiveResponses,
|
|
496
|
+
CreateDirectiveErrors,
|
|
497
|
+
ThrowOnError
|
|
498
|
+
>({
|
|
499
|
+
url: "/v1/default/banks/{bank_id}/directives",
|
|
500
|
+
...options,
|
|
501
|
+
headers: {
|
|
502
|
+
"Content-Type": "application/json",
|
|
503
|
+
...options.headers,
|
|
504
|
+
},
|
|
505
|
+
});
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Delete directive
|
|
509
|
+
*
|
|
510
|
+
* Delete a directive.
|
|
511
|
+
*/
|
|
512
|
+
export const deleteDirective = <ThrowOnError extends boolean = false>(
|
|
513
|
+
options: Options<DeleteDirectiveData, ThrowOnError>,
|
|
514
|
+
) =>
|
|
515
|
+
(options.client ?? client).delete<
|
|
516
|
+
DeleteDirectiveResponses,
|
|
517
|
+
DeleteDirectiveErrors,
|
|
518
|
+
ThrowOnError
|
|
519
|
+
>({
|
|
520
|
+
url: "/v1/default/banks/{bank_id}/directives/{directive_id}",
|
|
521
|
+
...options,
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Get directive
|
|
526
|
+
*
|
|
527
|
+
* Get a specific directive by ID.
|
|
528
|
+
*/
|
|
529
|
+
export const getDirective = <ThrowOnError extends boolean = false>(
|
|
530
|
+
options: Options<GetDirectiveData, ThrowOnError>,
|
|
531
|
+
) =>
|
|
532
|
+
(options.client ?? client).get<
|
|
533
|
+
GetDirectiveResponses,
|
|
534
|
+
GetDirectiveErrors,
|
|
535
|
+
ThrowOnError
|
|
536
|
+
>({
|
|
537
|
+
url: "/v1/default/banks/{bank_id}/directives/{directive_id}",
|
|
538
|
+
...options,
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Update directive
|
|
543
|
+
*
|
|
544
|
+
* Update a directive's properties.
|
|
545
|
+
*/
|
|
546
|
+
export const updateDirective = <ThrowOnError extends boolean = false>(
|
|
547
|
+
options: Options<UpdateDirectiveData, ThrowOnError>,
|
|
548
|
+
) =>
|
|
549
|
+
(options.client ?? client).patch<
|
|
550
|
+
UpdateDirectiveResponses,
|
|
551
|
+
UpdateDirectiveErrors,
|
|
552
|
+
ThrowOnError
|
|
553
|
+
>({
|
|
554
|
+
url: "/v1/default/banks/{bank_id}/directives/{directive_id}",
|
|
555
|
+
...options,
|
|
556
|
+
headers: {
|
|
557
|
+
"Content-Type": "application/json",
|
|
558
|
+
...options.headers,
|
|
559
|
+
},
|
|
560
|
+
});
|
|
561
|
+
|
|
283
562
|
/**
|
|
284
563
|
* List documents
|
|
285
564
|
*
|
|
@@ -329,6 +608,20 @@ export const getDocument = <ThrowOnError extends boolean = false>(
|
|
|
329
608
|
ThrowOnError
|
|
330
609
|
>({ url: "/v1/default/banks/{bank_id}/documents/{document_id}", ...options });
|
|
331
610
|
|
|
611
|
+
/**
|
|
612
|
+
* List tags
|
|
613
|
+
*
|
|
614
|
+
* List all unique tags in a memory bank with usage counts. Supports wildcard search using '*' (e.g., 'user:*', '*-fred', 'tag*-2'). Case-insensitive.
|
|
615
|
+
*/
|
|
616
|
+
export const listTags = <ThrowOnError extends boolean = false>(
|
|
617
|
+
options: Options<ListTagsData, ThrowOnError>,
|
|
618
|
+
) =>
|
|
619
|
+
(options.client ?? client).get<
|
|
620
|
+
ListTagsResponses,
|
|
621
|
+
ListTagsErrors,
|
|
622
|
+
ThrowOnError
|
|
623
|
+
>({ url: "/v1/default/banks/{bank_id}/tags", ...options });
|
|
624
|
+
|
|
332
625
|
/**
|
|
333
626
|
* Get chunk details
|
|
334
627
|
*
|
|
@@ -346,7 +639,7 @@ export const getChunk = <ThrowOnError extends boolean = false>(
|
|
|
346
639
|
/**
|
|
347
640
|
* List async operations
|
|
348
641
|
*
|
|
349
|
-
* Get a list of
|
|
642
|
+
* Get a list of async operations for a specific agent, with optional filtering by status. Results are sorted by most recent first.
|
|
350
643
|
*/
|
|
351
644
|
export const listOperations = <ThrowOnError extends boolean = false>(
|
|
352
645
|
options: Options<ListOperationsData, ThrowOnError>,
|
|
@@ -374,10 +667,27 @@ export const cancelOperation = <ThrowOnError extends boolean = false>(
|
|
|
374
667
|
...options,
|
|
375
668
|
});
|
|
376
669
|
|
|
670
|
+
/**
|
|
671
|
+
* Get operation status
|
|
672
|
+
*
|
|
673
|
+
* Get the status of a specific async operation. Returns 'pending', 'completed', or 'failed'. Completed operations are removed from storage, so 'completed' means the operation finished successfully.
|
|
674
|
+
*/
|
|
675
|
+
export const getOperationStatus = <ThrowOnError extends boolean = false>(
|
|
676
|
+
options: Options<GetOperationStatusData, ThrowOnError>,
|
|
677
|
+
) =>
|
|
678
|
+
(options.client ?? client).get<
|
|
679
|
+
GetOperationStatusResponses,
|
|
680
|
+
GetOperationStatusErrors,
|
|
681
|
+
ThrowOnError
|
|
682
|
+
>({
|
|
683
|
+
url: "/v1/default/banks/{bank_id}/operations/{operation_id}",
|
|
684
|
+
...options,
|
|
685
|
+
});
|
|
686
|
+
|
|
377
687
|
/**
|
|
378
688
|
* Get memory bank profile
|
|
379
689
|
*
|
|
380
|
-
* Get disposition traits and
|
|
690
|
+
* Get disposition traits and mission for a memory bank. Auto-creates agent with defaults if not exists.
|
|
381
691
|
*/
|
|
382
692
|
export const getBankProfile = <ThrowOnError extends boolean = false>(
|
|
383
693
|
options: Options<GetBankProfileData, ThrowOnError>,
|
|
@@ -410,9 +720,11 @@ export const updateBankDisposition = <ThrowOnError extends boolean = false>(
|
|
|
410
720
|
});
|
|
411
721
|
|
|
412
722
|
/**
|
|
413
|
-
* Add/merge memory bank background
|
|
723
|
+
* Add/merge memory bank background (deprecated)
|
|
724
|
+
*
|
|
725
|
+
* Deprecated: Use PUT /mission instead. This endpoint now updates the mission field.
|
|
414
726
|
*
|
|
415
|
-
*
|
|
727
|
+
* @deprecated
|
|
416
728
|
*/
|
|
417
729
|
export const addBankBackground = <ThrowOnError extends boolean = false>(
|
|
418
730
|
options: Options<AddBankBackgroundData, ThrowOnError>,
|
|
@@ -444,10 +756,31 @@ export const deleteBank = <ThrowOnError extends boolean = false>(
|
|
|
444
756
|
ThrowOnError
|
|
445
757
|
>({ url: "/v1/default/banks/{bank_id}", ...options });
|
|
446
758
|
|
|
759
|
+
/**
|
|
760
|
+
* Partial update memory bank
|
|
761
|
+
*
|
|
762
|
+
* Partially update an agent's profile. Only provided fields will be updated.
|
|
763
|
+
*/
|
|
764
|
+
export const updateBank = <ThrowOnError extends boolean = false>(
|
|
765
|
+
options: Options<UpdateBankData, ThrowOnError>,
|
|
766
|
+
) =>
|
|
767
|
+
(options.client ?? client).patch<
|
|
768
|
+
UpdateBankResponses,
|
|
769
|
+
UpdateBankErrors,
|
|
770
|
+
ThrowOnError
|
|
771
|
+
>({
|
|
772
|
+
url: "/v1/default/banks/{bank_id}",
|
|
773
|
+
...options,
|
|
774
|
+
headers: {
|
|
775
|
+
"Content-Type": "application/json",
|
|
776
|
+
...options.headers,
|
|
777
|
+
},
|
|
778
|
+
});
|
|
779
|
+
|
|
447
780
|
/**
|
|
448
781
|
* Create or update memory bank
|
|
449
782
|
*
|
|
450
|
-
* Create a new agent or update existing agent with disposition and
|
|
783
|
+
* Create a new agent or update existing agent with disposition and mission. Auto-fills missing fields with defaults.
|
|
451
784
|
*/
|
|
452
785
|
export const createOrUpdateBank = <ThrowOnError extends boolean = false>(
|
|
453
786
|
options: Options<CreateOrUpdateBankData, ThrowOnError>,
|
|
@@ -465,6 +798,34 @@ export const createOrUpdateBank = <ThrowOnError extends boolean = false>(
|
|
|
465
798
|
},
|
|
466
799
|
});
|
|
467
800
|
|
|
801
|
+
/**
|
|
802
|
+
* Clear all observations
|
|
803
|
+
*
|
|
804
|
+
* Delete all observations for a memory bank. This is useful for resetting the consolidated knowledge.
|
|
805
|
+
*/
|
|
806
|
+
export const clearObservations = <ThrowOnError extends boolean = false>(
|
|
807
|
+
options: Options<ClearObservationsData, ThrowOnError>,
|
|
808
|
+
) =>
|
|
809
|
+
(options.client ?? client).delete<
|
|
810
|
+
ClearObservationsResponses,
|
|
811
|
+
ClearObservationsErrors,
|
|
812
|
+
ThrowOnError
|
|
813
|
+
>({ url: "/v1/default/banks/{bank_id}/observations", ...options });
|
|
814
|
+
|
|
815
|
+
/**
|
|
816
|
+
* Trigger consolidation
|
|
817
|
+
*
|
|
818
|
+
* Run memory consolidation to create/update observations from recent memories.
|
|
819
|
+
*/
|
|
820
|
+
export const triggerConsolidation = <ThrowOnError extends boolean = false>(
|
|
821
|
+
options: Options<TriggerConsolidationData, ThrowOnError>,
|
|
822
|
+
) =>
|
|
823
|
+
(options.client ?? client).post<
|
|
824
|
+
TriggerConsolidationResponses,
|
|
825
|
+
TriggerConsolidationErrors,
|
|
826
|
+
ThrowOnError
|
|
827
|
+
>({ url: "/v1/default/banks/{bank_id}/consolidate", ...options });
|
|
828
|
+
|
|
468
829
|
/**
|
|
469
830
|
* Clear memory bank memories
|
|
470
831
|
*
|