hebbrix 2.3.0 → 2.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/CHANGELOG.md +14 -0
- package/README.md +23 -1
- package/dist/index.d.mts +108 -5
- package/dist/index.d.ts +108 -5
- package/dist/index.js +362 -27
- package/dist/index.mjs +359 -27
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.4.0 — 2026-09-07
|
|
4
|
+
|
|
5
|
+
- Add typed Evidence Loop methods for owner-managed verifiers, durable episodes, actual-execution claims, protected outcome delivery and evidence assessments.
|
|
6
|
+
- Preserve incomplete outcomes, scope, replay and permission receipts. Verifier errors never fall back to caller-reported outcomes.
|
|
7
|
+
- Reject malformed, ambiguous or unknown evidence contracts before exposing unsupported synthesis; retain valid degraded evidence with its abstention signal.
|
|
8
|
+
- Protected ledger methods require the connected Evidence Loop backend, separately scoped verifier credentials and external execution/outcome checks. They do not grant permission or execute actions.
|
|
9
|
+
|
|
10
|
+
## 2.3.1 — 2026-08-27
|
|
11
|
+
|
|
12
|
+
- Make single-memory `wait_for_index` a client-enforced readiness contract:
|
|
13
|
+
submit exactly one write, poll the durable receipt to searchable completion,
|
|
14
|
+
preserve receipt and idempotency context on timeout or cancellation, and
|
|
15
|
+
reject terminal indexing states.
|
|
16
|
+
|
|
3
17
|
## 2.3.0 — 2026-08-27
|
|
4
18
|
|
|
5
19
|
- Reconcile every exported advanced method with the canonical public OpenAPI,
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ outcome-learning APIs.
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
npm install hebbrix@2.
|
|
9
|
+
npm install hebbrix@2.4.0
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
Node.js 16+ and modern browsers are supported.
|
|
@@ -43,6 +43,28 @@ it throws `IndexingTimeoutError`; the error retains the receipt, durable memory
|
|
|
43
43
|
IDs, and status URL. Reuse the same idempotency key with the same body to recover
|
|
44
44
|
the same logical resources.
|
|
45
45
|
|
|
46
|
+
Single writes and batch writes use the same one-write readiness rule. The
|
|
47
|
+
client sends exactly one mutation, then uses read-only status requests. Set
|
|
48
|
+
`index_timeout_ms` and `index_poll_interval_ms` on `memories.create()` to tune
|
|
49
|
+
that client-side wait. A signal can cancel the initial request; once a receipt
|
|
50
|
+
is available, cancellation stops only the read-only polling.
|
|
51
|
+
`IndexingAbortedError` then preserves the durable receipt and IDs so
|
|
52
|
+
cancellation cannot be mistaken for a failed write. Terminal `failed`,
|
|
53
|
+
`cancelled`, or `canceled` states raise `IndexingTerminalError` with the same
|
|
54
|
+
receipt context.
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
const controller = new AbortController();
|
|
58
|
+
const ready = await client.memories.create({
|
|
59
|
+
content: "Customer prefers concise replies",
|
|
60
|
+
wait_for_index: true,
|
|
61
|
+
index_timeout_ms: 30_000,
|
|
62
|
+
index_poll_interval_ms: 250,
|
|
63
|
+
signal: controller.signal,
|
|
64
|
+
idempotency_key: "customer-42-preference-v1",
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
46
68
|
```typescript
|
|
47
69
|
const receipt = await client.memories.createBatch({
|
|
48
70
|
memories: [{ content: "First fact" }, { content: "Second fact" }],
|
package/dist/index.d.mts
CHANGED
|
@@ -38,6 +38,12 @@ interface Memory {
|
|
|
38
38
|
source_reference?: string;
|
|
39
39
|
access_count: number;
|
|
40
40
|
last_accessed_at?: string;
|
|
41
|
+
/** Authoritative indexing state returned by GET /v1/memories/{id}. */
|
|
42
|
+
processing_status?: string;
|
|
43
|
+
/** True only when the memory is available to search. */
|
|
44
|
+
searchable?: boolean;
|
|
45
|
+
outbox_event_id?: string;
|
|
46
|
+
status_url?: string;
|
|
41
47
|
created_at: string;
|
|
42
48
|
updated_at: string;
|
|
43
49
|
}
|
|
@@ -95,12 +101,48 @@ interface ProofLoopCandidate {
|
|
|
95
101
|
}
|
|
96
102
|
interface ProofLoopDecisionParams {
|
|
97
103
|
policy_key: string;
|
|
104
|
+
episode_id?: string;
|
|
98
105
|
candidates: ProofLoopCandidate[];
|
|
99
106
|
proof_context?: ProofContext | string;
|
|
100
107
|
collection_id?: string;
|
|
101
108
|
user_id?: string;
|
|
102
109
|
[key: string]: any;
|
|
103
110
|
}
|
|
111
|
+
interface EvidenceScope {
|
|
112
|
+
policy_key: string;
|
|
113
|
+
collection_id?: string;
|
|
114
|
+
user_id?: string;
|
|
115
|
+
}
|
|
116
|
+
interface VerifierRegistration extends EvidenceScope {
|
|
117
|
+
api_key_id: string;
|
|
118
|
+
source_system: string;
|
|
119
|
+
metric_keys: string[];
|
|
120
|
+
}
|
|
121
|
+
interface EpisodeCreateParams extends EvidenceScope {
|
|
122
|
+
verifier_id: string;
|
|
123
|
+
idempotency_key: string;
|
|
124
|
+
}
|
|
125
|
+
interface ExecutionClaim {
|
|
126
|
+
attempt_id: string;
|
|
127
|
+
status: "started" | "completed" | "failed" | "interrupted" | "blocked";
|
|
128
|
+
actual_action_key: string;
|
|
129
|
+
arguments_digest: string;
|
|
130
|
+
evidence_digest?: string;
|
|
131
|
+
occurred_at?: string;
|
|
132
|
+
}
|
|
133
|
+
interface VerifiedOutcomeDelivery {
|
|
134
|
+
decision_id: string;
|
|
135
|
+
source_event_id: string;
|
|
136
|
+
evidence_digest: string;
|
|
137
|
+
execution_digest: string;
|
|
138
|
+
observations: Array<{
|
|
139
|
+
metric_key: string;
|
|
140
|
+
value: number;
|
|
141
|
+
confidence?: number;
|
|
142
|
+
is_final?: boolean;
|
|
143
|
+
observed_at: string;
|
|
144
|
+
}>;
|
|
145
|
+
}
|
|
104
146
|
interface ReasoningSource {
|
|
105
147
|
memory_id: string;
|
|
106
148
|
content: string;
|
|
@@ -155,6 +197,12 @@ interface CreateMemoryParams {
|
|
|
155
197
|
source?: string;
|
|
156
198
|
/** Stable retry key sent as the Idempotency-Key transport header. */
|
|
157
199
|
idempotency_key?: string;
|
|
200
|
+
/** Optional caller cancellation signal; it is never serialized. */
|
|
201
|
+
signal?: AbortSignal;
|
|
202
|
+
/** Client-side readiness deadline used only when wait_for_index=true. */
|
|
203
|
+
index_timeout_ms?: number;
|
|
204
|
+
/** Poll interval for a durable pending receipt. */
|
|
205
|
+
index_poll_interval_ms?: number;
|
|
158
206
|
}
|
|
159
207
|
interface MemoryAddResult {
|
|
160
208
|
id: string;
|
|
@@ -162,6 +210,7 @@ interface MemoryAddResult {
|
|
|
162
210
|
event: "ADD" | "UPDATE" | "NOOP" | string;
|
|
163
211
|
memory?: string;
|
|
164
212
|
reason?: string;
|
|
213
|
+
processing_status?: string;
|
|
165
214
|
}
|
|
166
215
|
interface MemoryAddResponse {
|
|
167
216
|
results: MemoryAddResult[];
|
|
@@ -170,6 +219,9 @@ interface MemoryAddResponse {
|
|
|
170
219
|
searchable: boolean;
|
|
171
220
|
outbox_event_id?: string;
|
|
172
221
|
status_url?: string;
|
|
222
|
+
idempotency_replay?: boolean;
|
|
223
|
+
request_id?: string;
|
|
224
|
+
retry_after?: string;
|
|
173
225
|
job_id?: string;
|
|
174
226
|
created_count: number;
|
|
175
227
|
updated_count: number;
|
|
@@ -370,9 +422,23 @@ declare class CollectionsResource extends BaseResource {
|
|
|
370
422
|
}
|
|
371
423
|
declare class MemoriesResource extends BaseResource {
|
|
372
424
|
/**
|
|
373
|
-
* Create
|
|
425
|
+
* Create one logical memory write. When `wait_for_index=true`, a durable
|
|
426
|
+
* pending receipt is polled without issuing a second create request.
|
|
374
427
|
*/
|
|
375
428
|
create(params: CreateMemoryParams): Promise<MemoryAddResponse>;
|
|
429
|
+
/** Poll a single-write durable receipt until every accepted memory is searchable. */
|
|
430
|
+
waitForSearchable(receipt: MemoryAddResponse, options?: {
|
|
431
|
+
timeoutMs?: number;
|
|
432
|
+
pollIntervalMs?: number;
|
|
433
|
+
signal?: AbortSignal;
|
|
434
|
+
idempotencyKey?: string;
|
|
435
|
+
}): Promise<MemoryAddResponse>;
|
|
436
|
+
private memoryIds;
|
|
437
|
+
private isSearchableCompletion;
|
|
438
|
+
private isTerminalStatus;
|
|
439
|
+
private readinessPath;
|
|
440
|
+
private throwIfPollingAborted;
|
|
441
|
+
private pollingDelay;
|
|
376
442
|
/**
|
|
377
443
|
* Create up to 100 memories with one unambiguous readiness contract.
|
|
378
444
|
* `wait_for_index=true` resolves only for a fully searchable batch. A durable
|
|
@@ -435,7 +501,7 @@ declare class SearchResource extends BaseResource {
|
|
|
435
501
|
reason(params: ReasonParams): Promise<ReasoningResponse>;
|
|
436
502
|
}
|
|
437
503
|
declare class ProofLoopResource extends BaseResource {
|
|
438
|
-
/**
|
|
504
|
+
/** Record a recommendation; this never authorizes execution or proves causality. */
|
|
439
505
|
decide(params: ProofLoopDecisionParams): Promise<Record<string, any>>;
|
|
440
506
|
recordOutcome(decisionId: string, body: {
|
|
441
507
|
observations?: Record<string, any>[];
|
|
@@ -444,6 +510,18 @@ declare class ProofLoopResource extends BaseResource {
|
|
|
444
510
|
idempotency_key?: string;
|
|
445
511
|
}): Promise<Record<string, any>>;
|
|
446
512
|
getDecision(decisionId: string): Promise<Record<string, any>>;
|
|
513
|
+
/** Owner-session administration. Use a separate client for the verifier key. */
|
|
514
|
+
registerVerifier(params: VerifierRegistration): Promise<Record<string, any>>;
|
|
515
|
+
revokeVerifier(verifierId: string): Promise<Record<string, any>>;
|
|
516
|
+
createEpisode(params: EpisodeCreateParams): Promise<Record<string, any>>;
|
|
517
|
+
getEpisode(episodeId: string, offset?: number): Promise<Record<string, any>>;
|
|
518
|
+
closeEpisode(episodeId: string, status: "completed" | "interrupted"): Promise<Record<string, any>>;
|
|
519
|
+
/** Append an execution claim. This method does not execute a tool. */
|
|
520
|
+
recordExecution(decisionId: string, claim: ExecutionClaim): Promise<Record<string, any>>;
|
|
521
|
+
assessment(decisionId: string, evidenceOffset?: number): Promise<Record<string, any>>;
|
|
522
|
+
verifierEvidence(verifierId: string, decisionId: string): Promise<Record<string, any>>;
|
|
523
|
+
/** Deliver using the dedicated source credential, after checking execution independently. */
|
|
524
|
+
deliverVerifiedOutcomes(verifierId: string, delivery: VerifiedOutcomeDelivery): Promise<Record<string, any>>;
|
|
447
525
|
defineMetric(params: ProofLoopMetricParams): Promise<Record<string, any>>;
|
|
448
526
|
listMetrics(params?: {
|
|
449
527
|
policy_key?: string;
|
|
@@ -689,11 +767,36 @@ declare class EntitlementError extends HebbrixError {
|
|
|
689
767
|
details?: Record<string, any>;
|
|
690
768
|
});
|
|
691
769
|
}
|
|
692
|
-
|
|
770
|
+
interface IndexingWaitErrorOptions {
|
|
771
|
+
idempotencyKey?: string;
|
|
772
|
+
cause?: unknown;
|
|
773
|
+
}
|
|
774
|
+
/** Base class for readiness failures after the API has accepted a durable write. */
|
|
775
|
+
declare class IndexingWaitError extends Error {
|
|
693
776
|
receipt: Record<string, any>;
|
|
694
777
|
memoryIds: string[];
|
|
778
|
+
jobId?: string;
|
|
695
779
|
statusUrl?: string;
|
|
696
|
-
|
|
780
|
+
requestId?: string;
|
|
781
|
+
outboxEventId?: string;
|
|
782
|
+
indexingEventId?: string;
|
|
783
|
+
eventId?: string;
|
|
784
|
+
idempotencyReplay?: boolean;
|
|
785
|
+
idempotencyKey?: string;
|
|
786
|
+
retryAfter?: string;
|
|
787
|
+
recovery: Record<string, unknown>;
|
|
788
|
+
cause?: unknown;
|
|
789
|
+
constructor(message: string, receipt: Record<string, any>, options?: IndexingWaitErrorOptions);
|
|
790
|
+
}
|
|
791
|
+
declare class IndexingTimeoutError extends IndexingWaitError {
|
|
792
|
+
constructor(message: string, receipt: Record<string, any>, options?: IndexingWaitErrorOptions);
|
|
793
|
+
}
|
|
794
|
+
declare class IndexingAbortedError extends IndexingWaitError {
|
|
795
|
+
constructor(message: string, receipt: Record<string, any>, options?: IndexingWaitErrorOptions);
|
|
796
|
+
}
|
|
797
|
+
declare class IndexingTerminalError extends IndexingWaitError {
|
|
798
|
+
processingStatus: string;
|
|
799
|
+
constructor(message: string, receipt: Record<string, any>, processingStatus: string, options?: IndexingWaitErrorOptions);
|
|
697
800
|
}
|
|
698
801
|
declare class AuthenticationError extends HebbrixError {
|
|
699
802
|
constructor(message?: string, options?: {
|
|
@@ -752,4 +855,4 @@ interface SafetyEnvelope {
|
|
|
752
855
|
*/
|
|
753
856
|
declare function enforceSearchSafety<T extends object>(response: T, rowsKey?: "results" | "sources"): T & SafetyEnvelope;
|
|
754
857
|
|
|
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 };
|
|
858
|
+
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 EpisodeCreateParams, type EvidenceClaim, type EvidenceScope, type ExecutionClaim, type GroundingReceipt, HebbrixError, IndexingAbortedError, IndexingTerminalError, IndexingTimeoutError, IndexingWaitError, type IndexingWaitErrorOptions, 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, type VerifiedOutcomeDelivery, type VerifierRegistration, WorkingMemoryResource, enforceSearchSafety };
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,12 @@ interface Memory {
|
|
|
38
38
|
source_reference?: string;
|
|
39
39
|
access_count: number;
|
|
40
40
|
last_accessed_at?: string;
|
|
41
|
+
/** Authoritative indexing state returned by GET /v1/memories/{id}. */
|
|
42
|
+
processing_status?: string;
|
|
43
|
+
/** True only when the memory is available to search. */
|
|
44
|
+
searchable?: boolean;
|
|
45
|
+
outbox_event_id?: string;
|
|
46
|
+
status_url?: string;
|
|
41
47
|
created_at: string;
|
|
42
48
|
updated_at: string;
|
|
43
49
|
}
|
|
@@ -95,12 +101,48 @@ interface ProofLoopCandidate {
|
|
|
95
101
|
}
|
|
96
102
|
interface ProofLoopDecisionParams {
|
|
97
103
|
policy_key: string;
|
|
104
|
+
episode_id?: string;
|
|
98
105
|
candidates: ProofLoopCandidate[];
|
|
99
106
|
proof_context?: ProofContext | string;
|
|
100
107
|
collection_id?: string;
|
|
101
108
|
user_id?: string;
|
|
102
109
|
[key: string]: any;
|
|
103
110
|
}
|
|
111
|
+
interface EvidenceScope {
|
|
112
|
+
policy_key: string;
|
|
113
|
+
collection_id?: string;
|
|
114
|
+
user_id?: string;
|
|
115
|
+
}
|
|
116
|
+
interface VerifierRegistration extends EvidenceScope {
|
|
117
|
+
api_key_id: string;
|
|
118
|
+
source_system: string;
|
|
119
|
+
metric_keys: string[];
|
|
120
|
+
}
|
|
121
|
+
interface EpisodeCreateParams extends EvidenceScope {
|
|
122
|
+
verifier_id: string;
|
|
123
|
+
idempotency_key: string;
|
|
124
|
+
}
|
|
125
|
+
interface ExecutionClaim {
|
|
126
|
+
attempt_id: string;
|
|
127
|
+
status: "started" | "completed" | "failed" | "interrupted" | "blocked";
|
|
128
|
+
actual_action_key: string;
|
|
129
|
+
arguments_digest: string;
|
|
130
|
+
evidence_digest?: string;
|
|
131
|
+
occurred_at?: string;
|
|
132
|
+
}
|
|
133
|
+
interface VerifiedOutcomeDelivery {
|
|
134
|
+
decision_id: string;
|
|
135
|
+
source_event_id: string;
|
|
136
|
+
evidence_digest: string;
|
|
137
|
+
execution_digest: string;
|
|
138
|
+
observations: Array<{
|
|
139
|
+
metric_key: string;
|
|
140
|
+
value: number;
|
|
141
|
+
confidence?: number;
|
|
142
|
+
is_final?: boolean;
|
|
143
|
+
observed_at: string;
|
|
144
|
+
}>;
|
|
145
|
+
}
|
|
104
146
|
interface ReasoningSource {
|
|
105
147
|
memory_id: string;
|
|
106
148
|
content: string;
|
|
@@ -155,6 +197,12 @@ interface CreateMemoryParams {
|
|
|
155
197
|
source?: string;
|
|
156
198
|
/** Stable retry key sent as the Idempotency-Key transport header. */
|
|
157
199
|
idempotency_key?: string;
|
|
200
|
+
/** Optional caller cancellation signal; it is never serialized. */
|
|
201
|
+
signal?: AbortSignal;
|
|
202
|
+
/** Client-side readiness deadline used only when wait_for_index=true. */
|
|
203
|
+
index_timeout_ms?: number;
|
|
204
|
+
/** Poll interval for a durable pending receipt. */
|
|
205
|
+
index_poll_interval_ms?: number;
|
|
158
206
|
}
|
|
159
207
|
interface MemoryAddResult {
|
|
160
208
|
id: string;
|
|
@@ -162,6 +210,7 @@ interface MemoryAddResult {
|
|
|
162
210
|
event: "ADD" | "UPDATE" | "NOOP" | string;
|
|
163
211
|
memory?: string;
|
|
164
212
|
reason?: string;
|
|
213
|
+
processing_status?: string;
|
|
165
214
|
}
|
|
166
215
|
interface MemoryAddResponse {
|
|
167
216
|
results: MemoryAddResult[];
|
|
@@ -170,6 +219,9 @@ interface MemoryAddResponse {
|
|
|
170
219
|
searchable: boolean;
|
|
171
220
|
outbox_event_id?: string;
|
|
172
221
|
status_url?: string;
|
|
222
|
+
idempotency_replay?: boolean;
|
|
223
|
+
request_id?: string;
|
|
224
|
+
retry_after?: string;
|
|
173
225
|
job_id?: string;
|
|
174
226
|
created_count: number;
|
|
175
227
|
updated_count: number;
|
|
@@ -370,9 +422,23 @@ declare class CollectionsResource extends BaseResource {
|
|
|
370
422
|
}
|
|
371
423
|
declare class MemoriesResource extends BaseResource {
|
|
372
424
|
/**
|
|
373
|
-
* Create
|
|
425
|
+
* Create one logical memory write. When `wait_for_index=true`, a durable
|
|
426
|
+
* pending receipt is polled without issuing a second create request.
|
|
374
427
|
*/
|
|
375
428
|
create(params: CreateMemoryParams): Promise<MemoryAddResponse>;
|
|
429
|
+
/** Poll a single-write durable receipt until every accepted memory is searchable. */
|
|
430
|
+
waitForSearchable(receipt: MemoryAddResponse, options?: {
|
|
431
|
+
timeoutMs?: number;
|
|
432
|
+
pollIntervalMs?: number;
|
|
433
|
+
signal?: AbortSignal;
|
|
434
|
+
idempotencyKey?: string;
|
|
435
|
+
}): Promise<MemoryAddResponse>;
|
|
436
|
+
private memoryIds;
|
|
437
|
+
private isSearchableCompletion;
|
|
438
|
+
private isTerminalStatus;
|
|
439
|
+
private readinessPath;
|
|
440
|
+
private throwIfPollingAborted;
|
|
441
|
+
private pollingDelay;
|
|
376
442
|
/**
|
|
377
443
|
* Create up to 100 memories with one unambiguous readiness contract.
|
|
378
444
|
* `wait_for_index=true` resolves only for a fully searchable batch. A durable
|
|
@@ -435,7 +501,7 @@ declare class SearchResource extends BaseResource {
|
|
|
435
501
|
reason(params: ReasonParams): Promise<ReasoningResponse>;
|
|
436
502
|
}
|
|
437
503
|
declare class ProofLoopResource extends BaseResource {
|
|
438
|
-
/**
|
|
504
|
+
/** Record a recommendation; this never authorizes execution or proves causality. */
|
|
439
505
|
decide(params: ProofLoopDecisionParams): Promise<Record<string, any>>;
|
|
440
506
|
recordOutcome(decisionId: string, body: {
|
|
441
507
|
observations?: Record<string, any>[];
|
|
@@ -444,6 +510,18 @@ declare class ProofLoopResource extends BaseResource {
|
|
|
444
510
|
idempotency_key?: string;
|
|
445
511
|
}): Promise<Record<string, any>>;
|
|
446
512
|
getDecision(decisionId: string): Promise<Record<string, any>>;
|
|
513
|
+
/** Owner-session administration. Use a separate client for the verifier key. */
|
|
514
|
+
registerVerifier(params: VerifierRegistration): Promise<Record<string, any>>;
|
|
515
|
+
revokeVerifier(verifierId: string): Promise<Record<string, any>>;
|
|
516
|
+
createEpisode(params: EpisodeCreateParams): Promise<Record<string, any>>;
|
|
517
|
+
getEpisode(episodeId: string, offset?: number): Promise<Record<string, any>>;
|
|
518
|
+
closeEpisode(episodeId: string, status: "completed" | "interrupted"): Promise<Record<string, any>>;
|
|
519
|
+
/** Append an execution claim. This method does not execute a tool. */
|
|
520
|
+
recordExecution(decisionId: string, claim: ExecutionClaim): Promise<Record<string, any>>;
|
|
521
|
+
assessment(decisionId: string, evidenceOffset?: number): Promise<Record<string, any>>;
|
|
522
|
+
verifierEvidence(verifierId: string, decisionId: string): Promise<Record<string, any>>;
|
|
523
|
+
/** Deliver using the dedicated source credential, after checking execution independently. */
|
|
524
|
+
deliverVerifiedOutcomes(verifierId: string, delivery: VerifiedOutcomeDelivery): Promise<Record<string, any>>;
|
|
447
525
|
defineMetric(params: ProofLoopMetricParams): Promise<Record<string, any>>;
|
|
448
526
|
listMetrics(params?: {
|
|
449
527
|
policy_key?: string;
|
|
@@ -689,11 +767,36 @@ declare class EntitlementError extends HebbrixError {
|
|
|
689
767
|
details?: Record<string, any>;
|
|
690
768
|
});
|
|
691
769
|
}
|
|
692
|
-
|
|
770
|
+
interface IndexingWaitErrorOptions {
|
|
771
|
+
idempotencyKey?: string;
|
|
772
|
+
cause?: unknown;
|
|
773
|
+
}
|
|
774
|
+
/** Base class for readiness failures after the API has accepted a durable write. */
|
|
775
|
+
declare class IndexingWaitError extends Error {
|
|
693
776
|
receipt: Record<string, any>;
|
|
694
777
|
memoryIds: string[];
|
|
778
|
+
jobId?: string;
|
|
695
779
|
statusUrl?: string;
|
|
696
|
-
|
|
780
|
+
requestId?: string;
|
|
781
|
+
outboxEventId?: string;
|
|
782
|
+
indexingEventId?: string;
|
|
783
|
+
eventId?: string;
|
|
784
|
+
idempotencyReplay?: boolean;
|
|
785
|
+
idempotencyKey?: string;
|
|
786
|
+
retryAfter?: string;
|
|
787
|
+
recovery: Record<string, unknown>;
|
|
788
|
+
cause?: unknown;
|
|
789
|
+
constructor(message: string, receipt: Record<string, any>, options?: IndexingWaitErrorOptions);
|
|
790
|
+
}
|
|
791
|
+
declare class IndexingTimeoutError extends IndexingWaitError {
|
|
792
|
+
constructor(message: string, receipt: Record<string, any>, options?: IndexingWaitErrorOptions);
|
|
793
|
+
}
|
|
794
|
+
declare class IndexingAbortedError extends IndexingWaitError {
|
|
795
|
+
constructor(message: string, receipt: Record<string, any>, options?: IndexingWaitErrorOptions);
|
|
796
|
+
}
|
|
797
|
+
declare class IndexingTerminalError extends IndexingWaitError {
|
|
798
|
+
processingStatus: string;
|
|
799
|
+
constructor(message: string, receipt: Record<string, any>, processingStatus: string, options?: IndexingWaitErrorOptions);
|
|
697
800
|
}
|
|
698
801
|
declare class AuthenticationError extends HebbrixError {
|
|
699
802
|
constructor(message?: string, options?: {
|
|
@@ -752,4 +855,4 @@ interface SafetyEnvelope {
|
|
|
752
855
|
*/
|
|
753
856
|
declare function enforceSearchSafety<T extends object>(response: T, rowsKey?: "results" | "sources"): T & SafetyEnvelope;
|
|
754
857
|
|
|
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 };
|
|
858
|
+
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 EpisodeCreateParams, type EvidenceClaim, type EvidenceScope, type ExecutionClaim, type GroundingReceipt, HebbrixError, IndexingAbortedError, IndexingTerminalError, IndexingTimeoutError, IndexingWaitError, type IndexingWaitErrorOptions, 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, type VerifiedOutcomeDelivery, type VerifierRegistration, WorkingMemoryResource, enforceSearchSafety };
|