hebbrix 2.2.1 → 2.3.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/CHANGELOG.md +15 -0
- package/README.md +61 -748
- package/dist/index.d.mts +88 -37
- package/dist/index.d.ts +88 -37
- package/dist/index.js +196 -131
- package/dist/index.mjs +194 -130
- package/package.json +3 -7
package/dist/index.d.mts
CHANGED
|
@@ -198,10 +198,16 @@ interface BatchMemoryCreateParams {
|
|
|
198
198
|
idempotency_key?: string;
|
|
199
199
|
/** Optional caller cancellation signal; it is never serialized. */
|
|
200
200
|
signal?: AbortSignal;
|
|
201
|
+
/** Client-side readiness deadline used only when wait_for_index=true. */
|
|
202
|
+
index_timeout_ms?: number;
|
|
203
|
+
/** Poll interval for a durable 202 receipt. */
|
|
204
|
+
index_poll_interval_ms?: number;
|
|
201
205
|
}
|
|
202
206
|
interface BatchMemoryResponse {
|
|
203
207
|
created: number;
|
|
204
208
|
failed: number;
|
|
209
|
+
accepted: boolean;
|
|
210
|
+
durable: boolean;
|
|
205
211
|
memory_ids: string[];
|
|
206
212
|
errors: string[];
|
|
207
213
|
results: Array<{
|
|
@@ -213,6 +219,8 @@ interface BatchMemoryResponse {
|
|
|
213
219
|
searchable: boolean;
|
|
214
220
|
outbox_event_id?: string;
|
|
215
221
|
status_url?: string;
|
|
222
|
+
idempotency_replay?: boolean;
|
|
223
|
+
request_id?: string;
|
|
216
224
|
}
|
|
217
225
|
interface UpdateMemoryParams {
|
|
218
226
|
content?: string;
|
|
@@ -246,8 +254,10 @@ interface ReasonParams {
|
|
|
246
254
|
facets?: string[];
|
|
247
255
|
}
|
|
248
256
|
interface ListParams {
|
|
249
|
-
|
|
257
|
+
cursor?: string;
|
|
250
258
|
limit?: number;
|
|
259
|
+
name?: string;
|
|
260
|
+
name_prefix?: string;
|
|
251
261
|
}
|
|
252
262
|
interface MemoryListParams {
|
|
253
263
|
collection_id?: string;
|
|
@@ -344,7 +354,7 @@ declare class CollectionsResource extends BaseResource {
|
|
|
344
354
|
/**
|
|
345
355
|
* List all collections
|
|
346
356
|
*/
|
|
347
|
-
list(params?: ListParams): Promise<Collection
|
|
357
|
+
list(params?: ListParams): Promise<CursorPage<Collection>>;
|
|
348
358
|
/**
|
|
349
359
|
* Get a specific collection
|
|
350
360
|
*/
|
|
@@ -365,9 +375,9 @@ declare class MemoriesResource extends BaseResource {
|
|
|
365
375
|
create(params: CreateMemoryParams): Promise<MemoryAddResponse>;
|
|
366
376
|
/**
|
|
367
377
|
* Create up to 100 memories with one unambiguous readiness contract.
|
|
368
|
-
* `wait_for_index=true` resolves only for a fully searchable batch
|
|
369
|
-
*
|
|
370
|
-
*
|
|
378
|
+
* `wait_for_index=true` resolves only for a fully searchable batch. A durable
|
|
379
|
+
* server-side 202 is polled to the caller's deadline; expiry raises a typed
|
|
380
|
+
* `IndexingTimeoutError` carrying the original durable receipt.
|
|
371
381
|
*/
|
|
372
382
|
createBatch(params: BatchMemoryCreateParams): Promise<BatchMemoryResponse>;
|
|
373
383
|
/** Poll every item in an asynchronous batch receipt until it is searchable. */
|
|
@@ -459,7 +469,6 @@ declare class RLResource extends BaseResource {
|
|
|
459
469
|
* Train the Memory Manager agent using RL
|
|
460
470
|
*/
|
|
461
471
|
trainMemoryManager(params: {
|
|
462
|
-
collection_id?: string;
|
|
463
472
|
num_episodes?: number;
|
|
464
473
|
[key: string]: any;
|
|
465
474
|
}): Promise<any>;
|
|
@@ -467,7 +476,6 @@ declare class RLResource extends BaseResource {
|
|
|
467
476
|
* Train the Answer Agent using RL
|
|
468
477
|
*/
|
|
469
478
|
trainAnswerAgent(params: {
|
|
470
|
-
collection_id?: string;
|
|
471
479
|
num_episodes?: number;
|
|
472
480
|
[key: string]: any;
|
|
473
481
|
}): Promise<any>;
|
|
@@ -534,8 +542,11 @@ declare class TemporalResource extends BaseResource {
|
|
|
534
542
|
subject: string;
|
|
535
543
|
predicate: string;
|
|
536
544
|
object: string;
|
|
537
|
-
valid_from
|
|
545
|
+
valid_from: string;
|
|
538
546
|
valid_until?: string;
|
|
547
|
+
observed_at?: string;
|
|
548
|
+
subject_type?: string;
|
|
549
|
+
object_type?: string;
|
|
539
550
|
confidence?: number;
|
|
540
551
|
source_memory_id?: string;
|
|
541
552
|
metadata?: Record<string, any>;
|
|
@@ -543,12 +554,20 @@ declare class TemporalResource extends BaseResource {
|
|
|
543
554
|
/**
|
|
544
555
|
* Query temporal facts
|
|
545
556
|
*/
|
|
546
|
-
queryFacts(params
|
|
557
|
+
queryFacts(params: {
|
|
547
558
|
subject?: string;
|
|
548
559
|
predicate?: string;
|
|
549
560
|
object?: string;
|
|
550
561
|
at_time?: string;
|
|
551
562
|
}): Promise<any[]>;
|
|
563
|
+
queryAtTime(params: {
|
|
564
|
+
subject: string;
|
|
565
|
+
timestamp: string;
|
|
566
|
+
predicate?: string;
|
|
567
|
+
}): Promise<any>;
|
|
568
|
+
history(subject: string, predicate: string, limit?: number): Promise<any>;
|
|
569
|
+
conflicts(subject: string, predicate: string): Promise<any>;
|
|
570
|
+
invalidate(subject: string, predicate: string, object: string): Promise<any>;
|
|
552
571
|
/**
|
|
553
572
|
* Query knowledge state at a specific point in time
|
|
554
573
|
*/
|
|
@@ -557,6 +576,8 @@ declare class TemporalResource extends BaseResource {
|
|
|
557
576
|
deleteFact(factId: string): Promise<any>;
|
|
558
577
|
}
|
|
559
578
|
declare class WorkingMemoryResource extends BaseResource {
|
|
579
|
+
readonly sessionId: string;
|
|
580
|
+
constructor(client: MemoryClient);
|
|
560
581
|
/**
|
|
561
582
|
* Add item to working memory buffer
|
|
562
583
|
*/
|
|
@@ -564,33 +585,30 @@ declare class WorkingMemoryResource extends BaseResource {
|
|
|
564
585
|
role: string;
|
|
565
586
|
content: string;
|
|
566
587
|
metadata?: Record<string, any>;
|
|
588
|
+
session_id?: string;
|
|
567
589
|
}): Promise<any>;
|
|
568
590
|
/**
|
|
569
591
|
* Get current working memory context
|
|
570
592
|
*/
|
|
571
|
-
getContext(): Promise<any>;
|
|
593
|
+
getContext(sessionId?: string, includeCompressed?: boolean): Promise<any>;
|
|
572
594
|
/**
|
|
573
595
|
* Compress working memory buffer
|
|
574
596
|
*/
|
|
575
|
-
compress(): Promise<any>;
|
|
597
|
+
compress(sessionId?: string): Promise<any>;
|
|
576
598
|
/**
|
|
577
599
|
* Clear working memory buffer
|
|
578
600
|
*/
|
|
579
|
-
clear(): Promise<any>;
|
|
601
|
+
clear(sessionId?: string): Promise<any>;
|
|
580
602
|
}
|
|
581
603
|
declare class ConsolidationResource extends BaseResource {
|
|
582
604
|
/**
|
|
583
605
|
* Trigger memory consolidation
|
|
584
606
|
*/
|
|
585
|
-
consolidate(collectionId: string,
|
|
607
|
+
consolidate(collectionId: string, lookbackDays?: number, utilityThreshold?: number): Promise<any>;
|
|
586
608
|
/**
|
|
587
609
|
* Get consolidation statistics
|
|
588
610
|
*/
|
|
589
611
|
getStats(collectionId: string): Promise<any>;
|
|
590
|
-
/**
|
|
591
|
-
* Archive old memories
|
|
592
|
-
*/
|
|
593
|
-
archive(collectionId: string, beforeDate?: string): Promise<any>;
|
|
594
612
|
}
|
|
595
613
|
declare class MemoryToolsResource extends BaseResource {
|
|
596
614
|
/**
|
|
@@ -598,7 +616,9 @@ declare class MemoryToolsResource extends BaseResource {
|
|
|
598
616
|
*/
|
|
599
617
|
replace(params: {
|
|
600
618
|
memory_id: string;
|
|
619
|
+
old_content: string;
|
|
601
620
|
new_content: string;
|
|
621
|
+
collection_id: string;
|
|
602
622
|
reason?: string;
|
|
603
623
|
}): Promise<any>;
|
|
604
624
|
/**
|
|
@@ -607,23 +627,15 @@ declare class MemoryToolsResource extends BaseResource {
|
|
|
607
627
|
insert(params: {
|
|
608
628
|
collection_id: string;
|
|
609
629
|
content: string;
|
|
610
|
-
position
|
|
630
|
+
position?: number;
|
|
611
631
|
reason?: string;
|
|
632
|
+
importance?: number;
|
|
633
|
+
metadata?: Record<string, any>;
|
|
612
634
|
}): Promise<any>;
|
|
613
635
|
/**
|
|
614
636
|
* Re-evaluate memory in light of new information
|
|
615
637
|
*/
|
|
616
|
-
rethink(memoryId: string,
|
|
617
|
-
}
|
|
618
|
-
declare class WorldModelResource extends BaseResource {
|
|
619
|
-
/**
|
|
620
|
-
* Simulate retrieval without actually retrieving
|
|
621
|
-
*/
|
|
622
|
-
imagineRetrieval(query: string, collectionId?: string): Promise<any>;
|
|
623
|
-
/**
|
|
624
|
-
* Plan memory operations to achieve goal
|
|
625
|
-
*/
|
|
626
|
-
plan(goal: string, collectionId?: string): Promise<any>;
|
|
638
|
+
rethink(memoryId: string, collectionId: string): Promise<any>;
|
|
627
639
|
}
|
|
628
640
|
|
|
629
641
|
declare class MemoryClient {
|
|
@@ -642,7 +654,6 @@ declare class MemoryClient {
|
|
|
642
654
|
workingMemory: WorkingMemoryResource;
|
|
643
655
|
consolidation: ConsolidationResource;
|
|
644
656
|
memoryTools: MemoryToolsResource;
|
|
645
|
-
worldModel: WorldModelResource;
|
|
646
657
|
proofloop: ProofLoopResource;
|
|
647
658
|
constructor(config?: ClientConfig);
|
|
648
659
|
private getHeaders;
|
|
@@ -662,23 +673,63 @@ declare class MemoryClient {
|
|
|
662
673
|
*/
|
|
663
674
|
declare class HebbrixError extends Error {
|
|
664
675
|
statusCode?: number;
|
|
665
|
-
|
|
676
|
+
code?: string;
|
|
677
|
+
requestId?: string;
|
|
678
|
+
details?: Record<string, any>;
|
|
679
|
+
constructor(message: string, statusCode?: number, options?: {
|
|
680
|
+
code?: string;
|
|
681
|
+
requestId?: string;
|
|
682
|
+
details?: Record<string, any>;
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
declare class EntitlementError extends HebbrixError {
|
|
686
|
+
constructor(message: string, statusCode: number, options?: {
|
|
687
|
+
code?: string;
|
|
688
|
+
requestId?: string;
|
|
689
|
+
details?: Record<string, any>;
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
declare class IndexingTimeoutError extends Error {
|
|
693
|
+
receipt: Record<string, any>;
|
|
694
|
+
memoryIds: string[];
|
|
695
|
+
statusUrl?: string;
|
|
696
|
+
constructor(message: string, receipt: Record<string, any>);
|
|
666
697
|
}
|
|
667
698
|
declare class AuthenticationError extends HebbrixError {
|
|
668
|
-
constructor(message?: string
|
|
699
|
+
constructor(message?: string, options?: {
|
|
700
|
+
code?: string;
|
|
701
|
+
requestId?: string;
|
|
702
|
+
details?: Record<string, any>;
|
|
703
|
+
});
|
|
669
704
|
}
|
|
670
705
|
declare class ValidationError extends HebbrixError {
|
|
671
706
|
errors?: any[];
|
|
672
|
-
constructor(message: string, errors?: any[]
|
|
707
|
+
constructor(message: string, errors?: any[], options?: {
|
|
708
|
+
code?: string;
|
|
709
|
+
requestId?: string;
|
|
710
|
+
details?: Record<string, any>;
|
|
711
|
+
});
|
|
673
712
|
}
|
|
674
713
|
declare class NotFoundError extends HebbrixError {
|
|
675
|
-
constructor(message?: string
|
|
714
|
+
constructor(message?: string, options?: {
|
|
715
|
+
code?: string;
|
|
716
|
+
requestId?: string;
|
|
717
|
+
details?: Record<string, any>;
|
|
718
|
+
});
|
|
676
719
|
}
|
|
677
720
|
declare class RateLimitError extends HebbrixError {
|
|
678
|
-
constructor(message?: string
|
|
721
|
+
constructor(message?: string, options?: {
|
|
722
|
+
code?: string;
|
|
723
|
+
requestId?: string;
|
|
724
|
+
details?: Record<string, any>;
|
|
725
|
+
});
|
|
679
726
|
}
|
|
680
727
|
declare class ServerError extends HebbrixError {
|
|
681
|
-
constructor(message?: string
|
|
728
|
+
constructor(message?: string, options?: {
|
|
729
|
+
code?: string;
|
|
730
|
+
requestId?: string;
|
|
731
|
+
details?: Record<string, any>;
|
|
732
|
+
});
|
|
682
733
|
}
|
|
683
734
|
|
|
684
735
|
interface SafetyEnvelope {
|
|
@@ -701,4 +752,4 @@ interface SafetyEnvelope {
|
|
|
701
752
|
*/
|
|
702
753
|
declare function enforceSearchSafety<T extends object>(response: T, rowsKey?: "results" | "sources"): T & SafetyEnvelope;
|
|
703
754
|
|
|
704
|
-
export { type APIKeyResponse, AuthResource, type AuthResponse, AuthenticationError, type BatchMemoryCreateParams, type BatchMemoryItemParams, type BatchMemoryResponse, type ClientConfig, type Collection, CollectionsResource, ConsolidationResource, type CorrectionCreateParams, type CorrectionSearchParams, CorrectionsResource, type CreateCollectionParams, type CreateMemoryParams, type CursorPage, type EvidenceClaim, type GroundingReceipt, HebbrixError, type ListParams, MemoriesResource, type Memory, type MemoryAddResponse, type MemoryAddResult, MemoryClient, type MemoryJobReceipt, MemoryJobsResource, type MemoryListParams, MemoryToolsResource, type MemoryWithMetadata, NotFoundError, ProceduralResource, type ProofContext, type ProofLoopCandidate, type ProofLoopDecisionParams, type ProofLoopMetricParams, ProofLoopResource, RLResource, RateLimitError, type ReasonParams, type ReasoningResponse, type ReasoningSource, type SafetyEnvelope, type SearchParams, SearchResource, type SearchResponse, type SearchResult, ServerError, TemporalResource, type UpdateCollectionParams, type UpdateMemoryParams, type User, ValidationError, WorkingMemoryResource,
|
|
755
|
+
export { type APIKeyResponse, AuthResource, type AuthResponse, AuthenticationError, type BatchMemoryCreateParams, type BatchMemoryItemParams, type BatchMemoryResponse, type ClientConfig, type Collection, CollectionsResource, ConsolidationResource, type CorrectionCreateParams, type CorrectionSearchParams, CorrectionsResource, type CreateCollectionParams, type CreateMemoryParams, type CursorPage, EntitlementError, type EvidenceClaim, type GroundingReceipt, HebbrixError, IndexingTimeoutError, type ListParams, MemoriesResource, type Memory, type MemoryAddResponse, type MemoryAddResult, MemoryClient, type MemoryJobReceipt, MemoryJobsResource, type MemoryListParams, MemoryToolsResource, type MemoryWithMetadata, NotFoundError, ProceduralResource, type ProofContext, type ProofLoopCandidate, type ProofLoopDecisionParams, type ProofLoopMetricParams, ProofLoopResource, RLResource, RateLimitError, type ReasonParams, type ReasoningResponse, type ReasoningSource, type SafetyEnvelope, type SearchParams, SearchResource, type SearchResponse, type SearchResult, ServerError, TemporalResource, type UpdateCollectionParams, type UpdateMemoryParams, type User, ValidationError, WorkingMemoryResource, enforceSearchSafety };
|
package/dist/index.d.ts
CHANGED
|
@@ -198,10 +198,16 @@ interface BatchMemoryCreateParams {
|
|
|
198
198
|
idempotency_key?: string;
|
|
199
199
|
/** Optional caller cancellation signal; it is never serialized. */
|
|
200
200
|
signal?: AbortSignal;
|
|
201
|
+
/** Client-side readiness deadline used only when wait_for_index=true. */
|
|
202
|
+
index_timeout_ms?: number;
|
|
203
|
+
/** Poll interval for a durable 202 receipt. */
|
|
204
|
+
index_poll_interval_ms?: number;
|
|
201
205
|
}
|
|
202
206
|
interface BatchMemoryResponse {
|
|
203
207
|
created: number;
|
|
204
208
|
failed: number;
|
|
209
|
+
accepted: boolean;
|
|
210
|
+
durable: boolean;
|
|
205
211
|
memory_ids: string[];
|
|
206
212
|
errors: string[];
|
|
207
213
|
results: Array<{
|
|
@@ -213,6 +219,8 @@ interface BatchMemoryResponse {
|
|
|
213
219
|
searchable: boolean;
|
|
214
220
|
outbox_event_id?: string;
|
|
215
221
|
status_url?: string;
|
|
222
|
+
idempotency_replay?: boolean;
|
|
223
|
+
request_id?: string;
|
|
216
224
|
}
|
|
217
225
|
interface UpdateMemoryParams {
|
|
218
226
|
content?: string;
|
|
@@ -246,8 +254,10 @@ interface ReasonParams {
|
|
|
246
254
|
facets?: string[];
|
|
247
255
|
}
|
|
248
256
|
interface ListParams {
|
|
249
|
-
|
|
257
|
+
cursor?: string;
|
|
250
258
|
limit?: number;
|
|
259
|
+
name?: string;
|
|
260
|
+
name_prefix?: string;
|
|
251
261
|
}
|
|
252
262
|
interface MemoryListParams {
|
|
253
263
|
collection_id?: string;
|
|
@@ -344,7 +354,7 @@ declare class CollectionsResource extends BaseResource {
|
|
|
344
354
|
/**
|
|
345
355
|
* List all collections
|
|
346
356
|
*/
|
|
347
|
-
list(params?: ListParams): Promise<Collection
|
|
357
|
+
list(params?: ListParams): Promise<CursorPage<Collection>>;
|
|
348
358
|
/**
|
|
349
359
|
* Get a specific collection
|
|
350
360
|
*/
|
|
@@ -365,9 +375,9 @@ declare class MemoriesResource extends BaseResource {
|
|
|
365
375
|
create(params: CreateMemoryParams): Promise<MemoryAddResponse>;
|
|
366
376
|
/**
|
|
367
377
|
* Create up to 100 memories with one unambiguous readiness contract.
|
|
368
|
-
* `wait_for_index=true` resolves only for a fully searchable batch
|
|
369
|
-
*
|
|
370
|
-
*
|
|
378
|
+
* `wait_for_index=true` resolves only for a fully searchable batch. A durable
|
|
379
|
+
* server-side 202 is polled to the caller's deadline; expiry raises a typed
|
|
380
|
+
* `IndexingTimeoutError` carrying the original durable receipt.
|
|
371
381
|
*/
|
|
372
382
|
createBatch(params: BatchMemoryCreateParams): Promise<BatchMemoryResponse>;
|
|
373
383
|
/** Poll every item in an asynchronous batch receipt until it is searchable. */
|
|
@@ -459,7 +469,6 @@ declare class RLResource extends BaseResource {
|
|
|
459
469
|
* Train the Memory Manager agent using RL
|
|
460
470
|
*/
|
|
461
471
|
trainMemoryManager(params: {
|
|
462
|
-
collection_id?: string;
|
|
463
472
|
num_episodes?: number;
|
|
464
473
|
[key: string]: any;
|
|
465
474
|
}): Promise<any>;
|
|
@@ -467,7 +476,6 @@ declare class RLResource extends BaseResource {
|
|
|
467
476
|
* Train the Answer Agent using RL
|
|
468
477
|
*/
|
|
469
478
|
trainAnswerAgent(params: {
|
|
470
|
-
collection_id?: string;
|
|
471
479
|
num_episodes?: number;
|
|
472
480
|
[key: string]: any;
|
|
473
481
|
}): Promise<any>;
|
|
@@ -534,8 +542,11 @@ declare class TemporalResource extends BaseResource {
|
|
|
534
542
|
subject: string;
|
|
535
543
|
predicate: string;
|
|
536
544
|
object: string;
|
|
537
|
-
valid_from
|
|
545
|
+
valid_from: string;
|
|
538
546
|
valid_until?: string;
|
|
547
|
+
observed_at?: string;
|
|
548
|
+
subject_type?: string;
|
|
549
|
+
object_type?: string;
|
|
539
550
|
confidence?: number;
|
|
540
551
|
source_memory_id?: string;
|
|
541
552
|
metadata?: Record<string, any>;
|
|
@@ -543,12 +554,20 @@ declare class TemporalResource extends BaseResource {
|
|
|
543
554
|
/**
|
|
544
555
|
* Query temporal facts
|
|
545
556
|
*/
|
|
546
|
-
queryFacts(params
|
|
557
|
+
queryFacts(params: {
|
|
547
558
|
subject?: string;
|
|
548
559
|
predicate?: string;
|
|
549
560
|
object?: string;
|
|
550
561
|
at_time?: string;
|
|
551
562
|
}): Promise<any[]>;
|
|
563
|
+
queryAtTime(params: {
|
|
564
|
+
subject: string;
|
|
565
|
+
timestamp: string;
|
|
566
|
+
predicate?: string;
|
|
567
|
+
}): Promise<any>;
|
|
568
|
+
history(subject: string, predicate: string, limit?: number): Promise<any>;
|
|
569
|
+
conflicts(subject: string, predicate: string): Promise<any>;
|
|
570
|
+
invalidate(subject: string, predicate: string, object: string): Promise<any>;
|
|
552
571
|
/**
|
|
553
572
|
* Query knowledge state at a specific point in time
|
|
554
573
|
*/
|
|
@@ -557,6 +576,8 @@ declare class TemporalResource extends BaseResource {
|
|
|
557
576
|
deleteFact(factId: string): Promise<any>;
|
|
558
577
|
}
|
|
559
578
|
declare class WorkingMemoryResource extends BaseResource {
|
|
579
|
+
readonly sessionId: string;
|
|
580
|
+
constructor(client: MemoryClient);
|
|
560
581
|
/**
|
|
561
582
|
* Add item to working memory buffer
|
|
562
583
|
*/
|
|
@@ -564,33 +585,30 @@ declare class WorkingMemoryResource extends BaseResource {
|
|
|
564
585
|
role: string;
|
|
565
586
|
content: string;
|
|
566
587
|
metadata?: Record<string, any>;
|
|
588
|
+
session_id?: string;
|
|
567
589
|
}): Promise<any>;
|
|
568
590
|
/**
|
|
569
591
|
* Get current working memory context
|
|
570
592
|
*/
|
|
571
|
-
getContext(): Promise<any>;
|
|
593
|
+
getContext(sessionId?: string, includeCompressed?: boolean): Promise<any>;
|
|
572
594
|
/**
|
|
573
595
|
* Compress working memory buffer
|
|
574
596
|
*/
|
|
575
|
-
compress(): Promise<any>;
|
|
597
|
+
compress(sessionId?: string): Promise<any>;
|
|
576
598
|
/**
|
|
577
599
|
* Clear working memory buffer
|
|
578
600
|
*/
|
|
579
|
-
clear(): Promise<any>;
|
|
601
|
+
clear(sessionId?: string): Promise<any>;
|
|
580
602
|
}
|
|
581
603
|
declare class ConsolidationResource extends BaseResource {
|
|
582
604
|
/**
|
|
583
605
|
* Trigger memory consolidation
|
|
584
606
|
*/
|
|
585
|
-
consolidate(collectionId: string,
|
|
607
|
+
consolidate(collectionId: string, lookbackDays?: number, utilityThreshold?: number): Promise<any>;
|
|
586
608
|
/**
|
|
587
609
|
* Get consolidation statistics
|
|
588
610
|
*/
|
|
589
611
|
getStats(collectionId: string): Promise<any>;
|
|
590
|
-
/**
|
|
591
|
-
* Archive old memories
|
|
592
|
-
*/
|
|
593
|
-
archive(collectionId: string, beforeDate?: string): Promise<any>;
|
|
594
612
|
}
|
|
595
613
|
declare class MemoryToolsResource extends BaseResource {
|
|
596
614
|
/**
|
|
@@ -598,7 +616,9 @@ declare class MemoryToolsResource extends BaseResource {
|
|
|
598
616
|
*/
|
|
599
617
|
replace(params: {
|
|
600
618
|
memory_id: string;
|
|
619
|
+
old_content: string;
|
|
601
620
|
new_content: string;
|
|
621
|
+
collection_id: string;
|
|
602
622
|
reason?: string;
|
|
603
623
|
}): Promise<any>;
|
|
604
624
|
/**
|
|
@@ -607,23 +627,15 @@ declare class MemoryToolsResource extends BaseResource {
|
|
|
607
627
|
insert(params: {
|
|
608
628
|
collection_id: string;
|
|
609
629
|
content: string;
|
|
610
|
-
position
|
|
630
|
+
position?: number;
|
|
611
631
|
reason?: string;
|
|
632
|
+
importance?: number;
|
|
633
|
+
metadata?: Record<string, any>;
|
|
612
634
|
}): Promise<any>;
|
|
613
635
|
/**
|
|
614
636
|
* Re-evaluate memory in light of new information
|
|
615
637
|
*/
|
|
616
|
-
rethink(memoryId: string,
|
|
617
|
-
}
|
|
618
|
-
declare class WorldModelResource extends BaseResource {
|
|
619
|
-
/**
|
|
620
|
-
* Simulate retrieval without actually retrieving
|
|
621
|
-
*/
|
|
622
|
-
imagineRetrieval(query: string, collectionId?: string): Promise<any>;
|
|
623
|
-
/**
|
|
624
|
-
* Plan memory operations to achieve goal
|
|
625
|
-
*/
|
|
626
|
-
plan(goal: string, collectionId?: string): Promise<any>;
|
|
638
|
+
rethink(memoryId: string, collectionId: string): Promise<any>;
|
|
627
639
|
}
|
|
628
640
|
|
|
629
641
|
declare class MemoryClient {
|
|
@@ -642,7 +654,6 @@ declare class MemoryClient {
|
|
|
642
654
|
workingMemory: WorkingMemoryResource;
|
|
643
655
|
consolidation: ConsolidationResource;
|
|
644
656
|
memoryTools: MemoryToolsResource;
|
|
645
|
-
worldModel: WorldModelResource;
|
|
646
657
|
proofloop: ProofLoopResource;
|
|
647
658
|
constructor(config?: ClientConfig);
|
|
648
659
|
private getHeaders;
|
|
@@ -662,23 +673,63 @@ declare class MemoryClient {
|
|
|
662
673
|
*/
|
|
663
674
|
declare class HebbrixError extends Error {
|
|
664
675
|
statusCode?: number;
|
|
665
|
-
|
|
676
|
+
code?: string;
|
|
677
|
+
requestId?: string;
|
|
678
|
+
details?: Record<string, any>;
|
|
679
|
+
constructor(message: string, statusCode?: number, options?: {
|
|
680
|
+
code?: string;
|
|
681
|
+
requestId?: string;
|
|
682
|
+
details?: Record<string, any>;
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
declare class EntitlementError extends HebbrixError {
|
|
686
|
+
constructor(message: string, statusCode: number, options?: {
|
|
687
|
+
code?: string;
|
|
688
|
+
requestId?: string;
|
|
689
|
+
details?: Record<string, any>;
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
declare class IndexingTimeoutError extends Error {
|
|
693
|
+
receipt: Record<string, any>;
|
|
694
|
+
memoryIds: string[];
|
|
695
|
+
statusUrl?: string;
|
|
696
|
+
constructor(message: string, receipt: Record<string, any>);
|
|
666
697
|
}
|
|
667
698
|
declare class AuthenticationError extends HebbrixError {
|
|
668
|
-
constructor(message?: string
|
|
699
|
+
constructor(message?: string, options?: {
|
|
700
|
+
code?: string;
|
|
701
|
+
requestId?: string;
|
|
702
|
+
details?: Record<string, any>;
|
|
703
|
+
});
|
|
669
704
|
}
|
|
670
705
|
declare class ValidationError extends HebbrixError {
|
|
671
706
|
errors?: any[];
|
|
672
|
-
constructor(message: string, errors?: any[]
|
|
707
|
+
constructor(message: string, errors?: any[], options?: {
|
|
708
|
+
code?: string;
|
|
709
|
+
requestId?: string;
|
|
710
|
+
details?: Record<string, any>;
|
|
711
|
+
});
|
|
673
712
|
}
|
|
674
713
|
declare class NotFoundError extends HebbrixError {
|
|
675
|
-
constructor(message?: string
|
|
714
|
+
constructor(message?: string, options?: {
|
|
715
|
+
code?: string;
|
|
716
|
+
requestId?: string;
|
|
717
|
+
details?: Record<string, any>;
|
|
718
|
+
});
|
|
676
719
|
}
|
|
677
720
|
declare class RateLimitError extends HebbrixError {
|
|
678
|
-
constructor(message?: string
|
|
721
|
+
constructor(message?: string, options?: {
|
|
722
|
+
code?: string;
|
|
723
|
+
requestId?: string;
|
|
724
|
+
details?: Record<string, any>;
|
|
725
|
+
});
|
|
679
726
|
}
|
|
680
727
|
declare class ServerError extends HebbrixError {
|
|
681
|
-
constructor(message?: string
|
|
728
|
+
constructor(message?: string, options?: {
|
|
729
|
+
code?: string;
|
|
730
|
+
requestId?: string;
|
|
731
|
+
details?: Record<string, any>;
|
|
732
|
+
});
|
|
682
733
|
}
|
|
683
734
|
|
|
684
735
|
interface SafetyEnvelope {
|
|
@@ -701,4 +752,4 @@ interface SafetyEnvelope {
|
|
|
701
752
|
*/
|
|
702
753
|
declare function enforceSearchSafety<T extends object>(response: T, rowsKey?: "results" | "sources"): T & SafetyEnvelope;
|
|
703
754
|
|
|
704
|
-
export { type APIKeyResponse, AuthResource, type AuthResponse, AuthenticationError, type BatchMemoryCreateParams, type BatchMemoryItemParams, type BatchMemoryResponse, type ClientConfig, type Collection, CollectionsResource, ConsolidationResource, type CorrectionCreateParams, type CorrectionSearchParams, CorrectionsResource, type CreateCollectionParams, type CreateMemoryParams, type CursorPage, type EvidenceClaim, type GroundingReceipt, HebbrixError, type ListParams, MemoriesResource, type Memory, type MemoryAddResponse, type MemoryAddResult, MemoryClient, type MemoryJobReceipt, MemoryJobsResource, type MemoryListParams, MemoryToolsResource, type MemoryWithMetadata, NotFoundError, ProceduralResource, type ProofContext, type ProofLoopCandidate, type ProofLoopDecisionParams, type ProofLoopMetricParams, ProofLoopResource, RLResource, RateLimitError, type ReasonParams, type ReasoningResponse, type ReasoningSource, type SafetyEnvelope, type SearchParams, SearchResource, type SearchResponse, type SearchResult, ServerError, TemporalResource, type UpdateCollectionParams, type UpdateMemoryParams, type User, ValidationError, WorkingMemoryResource,
|
|
755
|
+
export { type APIKeyResponse, AuthResource, type AuthResponse, AuthenticationError, type BatchMemoryCreateParams, type BatchMemoryItemParams, type BatchMemoryResponse, type ClientConfig, type Collection, CollectionsResource, ConsolidationResource, type CorrectionCreateParams, type CorrectionSearchParams, CorrectionsResource, type CreateCollectionParams, type CreateMemoryParams, type CursorPage, EntitlementError, type EvidenceClaim, type GroundingReceipt, HebbrixError, IndexingTimeoutError, type ListParams, MemoriesResource, type Memory, type MemoryAddResponse, type MemoryAddResult, MemoryClient, type MemoryJobReceipt, MemoryJobsResource, type MemoryListParams, MemoryToolsResource, type MemoryWithMetadata, NotFoundError, ProceduralResource, type ProofContext, type ProofLoopCandidate, type ProofLoopDecisionParams, type ProofLoopMetricParams, ProofLoopResource, RLResource, RateLimitError, type ReasonParams, type ReasoningResponse, type ReasoningSource, type SafetyEnvelope, type SearchParams, SearchResource, type SearchResponse, type SearchResult, ServerError, TemporalResource, type UpdateCollectionParams, type UpdateMemoryParams, type User, ValidationError, WorkingMemoryResource, enforceSearchSafety };
|