@sentropic/h2a 0.96.1 → 0.97.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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +98 -29
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime/drive/cluster-mesh-outer.d.ts +44 -0
- package/dist/runtime/drive/cluster-mesh-outer.d.ts.map +1 -0
- package/dist/runtime/drive/cluster-mesh-outer.js +70 -0
- package/dist/runtime/drive/cluster-mesh-outer.js.map +1 -0
- package/dist/runtime/drive/inbox-wake.d.ts +5 -0
- package/dist/runtime/drive/inbox-wake.d.ts.map +1 -1
- package/dist/runtime/drive/inbox-wake.js +4 -1
- package/dist/runtime/drive/inbox-wake.js.map +1 -1
- package/dist/runtime/drive/index.d.ts +4 -0
- package/dist/runtime/drive/index.d.ts.map +1 -1
- package/dist/runtime/drive/index.js +12 -0
- package/dist/runtime/drive/index.js.map +1 -1
- package/dist/runtime/drive/pty-actuator.d.ts +54 -0
- package/dist/runtime/drive/pty-actuator.d.ts.map +1 -0
- package/dist/runtime/drive/pty-actuator.js +371 -0
- package/dist/runtime/drive/pty-actuator.js.map +1 -0
- package/dist/runtime/local-files/paths.js +1 -1
- package/dist/runtime/local-files/paths.js.map +1 -1
- package/dist/runtime/local-files/presence.d.ts.map +1 -1
- package/dist/runtime/local-files/presence.js +10 -1
- package/dist/runtime/local-files/presence.js.map +1 -1
- package/dist/runtime/loop/engine/adapters.d.ts +7 -1
- package/dist/runtime/loop/engine/adapters.d.ts.map +1 -1
- package/dist/runtime/loop/engine/adapters.js +43 -11
- package/dist/runtime/loop/engine/adapters.js.map +1 -1
- package/dist/runtime/loop/engine/decision.d.ts +5 -1
- package/dist/runtime/loop/engine/decision.d.ts.map +1 -1
- package/dist/runtime/loop/engine/decision.js +9 -3
- package/dist/runtime/loop/engine/decision.js.map +1 -1
- package/dist/runtime/loop/index.d.ts +2 -0
- package/dist/runtime/loop/index.d.ts.map +1 -1
- package/dist/runtime/loop/index.js +11 -3
- package/dist/runtime/loop/index.js.map +1 -1
- package/dist/runtime/mcp/agent-launch.d.ts +2 -1
- package/dist/runtime/mcp/agent-launch.d.ts.map +1 -1
- package/dist/runtime/mcp/agent-launch.js +51 -8
- package/dist/runtime/mcp/agent-launch.js.map +1 -1
- package/dist/runtime/mcp/handlers.d.ts.map +1 -1
- package/dist/runtime/mcp/handlers.js +17 -0
- package/dist/runtime/mcp/handlers.js.map +1 -1
- package/dist/runtime/mcp/stdio.d.ts +2 -0
- package/dist/runtime/mcp/stdio.d.ts.map +1 -1
- package/dist/runtime/mcp/stdio.js +8 -5
- package/dist/runtime/mcp/stdio.js.map +1 -1
- package/dist/runtime/mcp/tools.d.ts.map +1 -1
- package/dist/runtime/mcp/tools.js +19 -6
- package/dist/runtime/mcp/tools.js.map +1 -1
- package/dist/runtime/memory/admit-client.d.ts +30 -0
- package/dist/runtime/memory/admit-client.d.ts.map +1 -0
- package/dist/runtime/memory/admit-client.js +44 -0
- package/dist/runtime/memory/admit-client.js.map +1 -0
- package/dist/runtime/memory/d11-ceremony.d.ts +731 -0
- package/dist/runtime/memory/d11-ceremony.d.ts.map +1 -0
- package/dist/runtime/memory/d11-ceremony.js +1282 -0
- package/dist/runtime/memory/d11-ceremony.js.map +1 -0
- package/dist/runtime/memory/graphify-contracts-v2.vendored.d.ts +922 -0
- package/dist/runtime/memory/graphify-contracts-v2.vendored.d.ts.map +1 -0
- package/dist/runtime/memory/graphify-contracts-v2.vendored.js +2 -0
- package/dist/runtime/memory/graphify-contracts-v2.vendored.js.map +1 -0
- package/dist/runtime/memory/note-builder.d.ts +83 -0
- package/dist/runtime/memory/note-builder.d.ts.map +1 -0
- package/dist/runtime/memory/note-builder.js +89 -0
- package/dist/runtime/memory/note-builder.js.map +1 -0
- package/dist/runtime/memory/port-v1.d.ts +235 -0
- package/dist/runtime/memory/port-v1.d.ts.map +1 -0
- package/dist/runtime/memory/port-v1.js +129 -0
- package/dist/runtime/memory/port-v1.js.map +1 -0
- package/dist/runtime/memory/port-v2-adapter.d.ts +117 -0
- package/dist/runtime/memory/port-v2-adapter.d.ts.map +1 -0
- package/dist/runtime/memory/port-v2-adapter.js +140 -0
- package/dist/runtime/memory/port-v2-adapter.js.map +1 -0
- package/dist/runtime/memory/port-v2-compat.d.ts +50 -0
- package/dist/runtime/memory/port-v2-compat.d.ts.map +1 -0
- package/dist/runtime/memory/port-v2-compat.js +102 -0
- package/dist/runtime/memory/port-v2-compat.js.map +1 -0
- package/dist/runtime/memory/preflight.d.ts +17 -0
- package/dist/runtime/memory/preflight.d.ts.map +1 -0
- package/dist/runtime/memory/preflight.js +18 -0
- package/dist/runtime/memory/preflight.js.map +1 -0
- package/dist/runtime/memory/promote-client.d.ts +172 -0
- package/dist/runtime/memory/promote-client.d.ts.map +1 -0
- package/dist/runtime/memory/promote-client.js +168 -0
- package/dist/runtime/memory/promote-client.js.map +1 -0
- package/dist/runtime/memory/recall-client.d.ts +74 -0
- package/dist/runtime/memory/recall-client.d.ts.map +1 -0
- package/dist/runtime/memory/recall-client.js +91 -0
- package/dist/runtime/memory/recall-client.js.map +1 -0
- package/dist/session.d.ts +4 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +7 -0
- package/dist/session.js.map +1 -1
- package/package.json +7 -4
- package/skills/h2a-run/SKILL.md +39 -6
|
@@ -0,0 +1,922 @@
|
|
|
1
|
+
export type Digest = `sha256:${string}`;
|
|
2
|
+
export type Cursor = string;
|
|
3
|
+
export type Instant = string;
|
|
4
|
+
export type OpaqueRef = string;
|
|
5
|
+
export type IdempotencyKey = string;
|
|
6
|
+
export type JsonPointer = string;
|
|
7
|
+
export interface ValidIntervalV1 {
|
|
8
|
+
t: number;
|
|
9
|
+
t_end?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface CitationLocatorV1 {
|
|
12
|
+
scheme: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CitationV1 {
|
|
16
|
+
citation_id: string;
|
|
17
|
+
source_ref: OpaqueRef;
|
|
18
|
+
locator: CitationLocatorV1;
|
|
19
|
+
content_digest: Digest;
|
|
20
|
+
observed_at?: Instant;
|
|
21
|
+
}
|
|
22
|
+
export type MemoryComponentKind = "context" | "decision" | "evidence";
|
|
23
|
+
export interface MemoryComponentV2 {
|
|
24
|
+
component_id: string;
|
|
25
|
+
kind: MemoryComponentKind;
|
|
26
|
+
text: string;
|
|
27
|
+
citation_ids: ReadonlyArray<string>;
|
|
28
|
+
}
|
|
29
|
+
export interface PrimaryEventAnchorV1 {
|
|
30
|
+
at: number;
|
|
31
|
+
type_ref: OpaqueRef;
|
|
32
|
+
citation_id: string;
|
|
33
|
+
}
|
|
34
|
+
export interface DerivationLineageV1 {
|
|
35
|
+
source_record_ids: ReadonlyArray<string>;
|
|
36
|
+
transform_ref: OpaqueRef;
|
|
37
|
+
transform_receipt_digest: Digest;
|
|
38
|
+
}
|
|
39
|
+
export interface RetentionV1 {
|
|
40
|
+
expires_at?: Instant;
|
|
41
|
+
derivative_rule: "retain" | "make-ineligible";
|
|
42
|
+
}
|
|
43
|
+
export interface ReconciliationConsentV1 {
|
|
44
|
+
family_refs: ReadonlyArray<OpaqueRef>;
|
|
45
|
+
}
|
|
46
|
+
export interface CandidatePayloadV2 {
|
|
47
|
+
schema_version: 2;
|
|
48
|
+
scope_ref: OpaqueRef;
|
|
49
|
+
purpose_ref: OpaqueRef;
|
|
50
|
+
valid_time: ValidIntervalV1;
|
|
51
|
+
components: ReadonlyArray<MemoryComponentV2>;
|
|
52
|
+
primary_component_id: string;
|
|
53
|
+
primary_event: PrimaryEventAnchorV1;
|
|
54
|
+
citations: ReadonlyArray<CitationV1>;
|
|
55
|
+
retention: RetentionV1;
|
|
56
|
+
reconciliation: ReconciliationConsentV1;
|
|
57
|
+
derivation?: DerivationLineageV1;
|
|
58
|
+
}
|
|
59
|
+
export type EvidenceClass = "earned" | "asserted" | "signed";
|
|
60
|
+
export interface TrustBindingV1 {
|
|
61
|
+
class: EvidenceClass;
|
|
62
|
+
evidence_digest: Digest;
|
|
63
|
+
verifier_id: OpaqueRef;
|
|
64
|
+
verifier_version: string;
|
|
65
|
+
issued_at: Instant;
|
|
66
|
+
expires_at?: Instant;
|
|
67
|
+
revocation_epoch: Cursor;
|
|
68
|
+
receipt_digest: Digest;
|
|
69
|
+
}
|
|
70
|
+
export interface MemoryRecordV2 extends CandidatePayloadV2 {
|
|
71
|
+
record_id: string;
|
|
72
|
+
payload_digest: Digest;
|
|
73
|
+
record_digest: Digest;
|
|
74
|
+
recorded_at: Instant;
|
|
75
|
+
recorded_cursor: Cursor;
|
|
76
|
+
authorization_receipt_digest: Digest;
|
|
77
|
+
trust: TrustBindingV1;
|
|
78
|
+
}
|
|
79
|
+
export type MemoryOperation = "capture" | "cancel_capture" | "request_admission" | "reject" | "withdraw" | "dispute" | "resolve_dispute" | "expire" | "supersede" | "mark_non_current" | "rewind" | "trust_invalidate" | "tombstone" | "recall_current" | "recall_history" | "recall_disputed" | "propose_capitalisation" | "inspect_candidate" | "projection_invalidate" | "backup" | "restore" | "admin";
|
|
80
|
+
export type MemoryErrorCode = "INVALID_SCHEMA" | "INVALID_DIGEST" | "DIGEST_CONFLICT" | "UNAUTHORIZED" | "AUTHORIZATION_EXPIRED" | "AUTHORIZATION_REVOKED" | "POLICY_UNAVAILABLE" | "POLICY_STALE" | "ILLEGAL_TRANSITION" | "NOT_FOUND" | "ALREADY_TERMINAL" | "DEADLINE_EXCEEDED" | "CANCELLED" | "CAPABILITY_UNAVAILABLE" | "STORE_UNAVAILABLE" | "FENCE_LOST" | "CURSOR_GAP" | "JOURNAL_CORRUPT" | "BLOB_MISSING" | "PROJECTION_STALE" | "PROJECTION_OVERSIZED" | "RANKING_UNAVAILABLE" | "STALE_PAGE" | "REGISTRY_VERSION_UNAVAILABLE" | "BACKUP_INVALID" | "RESTORE_REFUSED";
|
|
81
|
+
export interface MemoryErrorV1 {
|
|
82
|
+
code: MemoryErrorCode;
|
|
83
|
+
operation: MemoryOperation;
|
|
84
|
+
message: string;
|
|
85
|
+
retryable: boolean;
|
|
86
|
+
error_receipt_digest?: Digest;
|
|
87
|
+
}
|
|
88
|
+
export type Result<T> = {
|
|
89
|
+
ok: true;
|
|
90
|
+
value: T;
|
|
91
|
+
} | {
|
|
92
|
+
ok: false;
|
|
93
|
+
error: MemoryErrorV1;
|
|
94
|
+
};
|
|
95
|
+
export interface AuthorizationContextV1 {
|
|
96
|
+
credential: string;
|
|
97
|
+
context_ref?: OpaqueRef;
|
|
98
|
+
}
|
|
99
|
+
export interface AuthorizationResourceV1 {
|
|
100
|
+
scope_ref?: OpaqueRef;
|
|
101
|
+
record_id?: string;
|
|
102
|
+
candidate_id?: string;
|
|
103
|
+
source_record_id?: string;
|
|
104
|
+
target_scope_ref?: OpaqueRef;
|
|
105
|
+
}
|
|
106
|
+
export interface AuthorizationRequestV1 {
|
|
107
|
+
operation: MemoryOperation;
|
|
108
|
+
resource: AuthorizationResourceV1;
|
|
109
|
+
resource_digest: Digest;
|
|
110
|
+
context: AuthorizationContextV1;
|
|
111
|
+
issued_at: Instant;
|
|
112
|
+
deadline_at: Instant;
|
|
113
|
+
}
|
|
114
|
+
export interface RedactionDirectiveV1 {
|
|
115
|
+
mode: "field-allowlist";
|
|
116
|
+
allowed_fields: ReadonlyArray<JsonPointer>;
|
|
117
|
+
allow_derivation_lineage: boolean;
|
|
118
|
+
max_packet_bytes: number;
|
|
119
|
+
}
|
|
120
|
+
export interface AuthorizationAllowedV1 {
|
|
121
|
+
allowed: true;
|
|
122
|
+
decision_id: OpaqueRef;
|
|
123
|
+
policy_version: string;
|
|
124
|
+
operation: MemoryOperation;
|
|
125
|
+
resource_digest: Digest;
|
|
126
|
+
scope_ref: OpaqueRef;
|
|
127
|
+
not_before: Instant;
|
|
128
|
+
expires_at: Instant;
|
|
129
|
+
revocation_epoch: Cursor;
|
|
130
|
+
redaction: RedactionDirectiveV1;
|
|
131
|
+
authentication_receipt_digest: Digest;
|
|
132
|
+
receipt_digest: Digest;
|
|
133
|
+
}
|
|
134
|
+
export interface AuthorizationDeniedV1 {
|
|
135
|
+
allowed: false;
|
|
136
|
+
decision_id: OpaqueRef;
|
|
137
|
+
policy_version: string;
|
|
138
|
+
operation: MemoryOperation;
|
|
139
|
+
resource_digest: Digest;
|
|
140
|
+
issued_at: Instant;
|
|
141
|
+
reason_ref: OpaqueRef;
|
|
142
|
+
receipt_digest: Digest;
|
|
143
|
+
}
|
|
144
|
+
export type AuthorizationResultV1 = AuthorizationAllowedV1 | AuthorizationDeniedV1;
|
|
145
|
+
export interface AuthorizationRevalidationV1 {
|
|
146
|
+
receipt_digest: Digest;
|
|
147
|
+
checked_at: Instant;
|
|
148
|
+
valid: boolean;
|
|
149
|
+
current_revocation_epoch: Cursor;
|
|
150
|
+
reason: "valid" | "expired" | "revoked" | "unknown";
|
|
151
|
+
revalidation_receipt_digest: Digest;
|
|
152
|
+
}
|
|
153
|
+
export interface RedactionRequestV1 {
|
|
154
|
+
source_record: MemoryRecordV2;
|
|
155
|
+
target_scope_ref: OpaqueRef;
|
|
156
|
+
directive: RedactionDirectiveV1;
|
|
157
|
+
authorization_receipt_digest: Digest;
|
|
158
|
+
}
|
|
159
|
+
export interface RedactionResultV1 {
|
|
160
|
+
payload: CandidatePayloadV2;
|
|
161
|
+
source_record_digest: Digest;
|
|
162
|
+
output_payload_digest: Digest;
|
|
163
|
+
policy_version: string;
|
|
164
|
+
receipt_digest: Digest;
|
|
165
|
+
}
|
|
166
|
+
export interface AuthorizationPort {
|
|
167
|
+
readonly version: 1;
|
|
168
|
+
authorize(request: AuthorizationRequestV1): Promise<Result<AuthorizationResultV1>>;
|
|
169
|
+
revalidate(receipt_digest: Digest, at: Instant): Promise<Result<AuthorizationRevalidationV1>>;
|
|
170
|
+
redact(request: RedactionRequestV1): Promise<Result<RedactionResultV1>>;
|
|
171
|
+
}
|
|
172
|
+
export type AdmissionDecision = "accept" | "reject" | "adjudication_required";
|
|
173
|
+
export interface AdmissionPolicyRequestV1 {
|
|
174
|
+
policy_id: OpaqueRef;
|
|
175
|
+
policy_version: string;
|
|
176
|
+
record_digest: Digest;
|
|
177
|
+
payload_digest: Digest;
|
|
178
|
+
candidate_envelope_ref: OpaqueRef;
|
|
179
|
+
policy_evidence_digest: Digest;
|
|
180
|
+
policy_evidence_ref: OpaqueRef;
|
|
181
|
+
deadline_at: Instant;
|
|
182
|
+
}
|
|
183
|
+
export interface AdmissionDecisionEnvelopeV1 {
|
|
184
|
+
policy_id: OpaqueRef;
|
|
185
|
+
policy_version: string;
|
|
186
|
+
record_digest: Digest;
|
|
187
|
+
decision: AdmissionDecision;
|
|
188
|
+
issued_at: Instant;
|
|
189
|
+
receipt_digest: Digest;
|
|
190
|
+
}
|
|
191
|
+
export interface AdmissionPolicy {
|
|
192
|
+
readonly policy_id: OpaqueRef;
|
|
193
|
+
readonly policy_version: string;
|
|
194
|
+
decide(request: AdmissionPolicyRequestV1): Promise<Result<AdmissionDecisionEnvelopeV1>>;
|
|
195
|
+
}
|
|
196
|
+
export interface EvidenceBundleV1 {
|
|
197
|
+
evidence_ref: OpaqueRef;
|
|
198
|
+
evidence_digest: Digest;
|
|
199
|
+
citation_ids: ReadonlyArray<string>;
|
|
200
|
+
attestation?: string;
|
|
201
|
+
}
|
|
202
|
+
export interface EvidenceVerificationRequestV1 {
|
|
203
|
+
payload_digest: Digest;
|
|
204
|
+
evidence: EvidenceBundleV1;
|
|
205
|
+
deadline_at: Instant;
|
|
206
|
+
}
|
|
207
|
+
export interface EvidenceVerifierPort {
|
|
208
|
+
readonly verifier_id: OpaqueRef;
|
|
209
|
+
readonly verifier_version: string;
|
|
210
|
+
classify(request: EvidenceVerificationRequestV1): Promise<Result<TrustBindingV1>>;
|
|
211
|
+
revalidate(receipt_digest: Digest, at: Instant): Promise<Result<TrustRevalidationV1>>;
|
|
212
|
+
}
|
|
213
|
+
export interface TrustRevalidationV1 {
|
|
214
|
+
binding_receipt_digest: Digest;
|
|
215
|
+
checked_at: Instant;
|
|
216
|
+
valid: boolean;
|
|
217
|
+
current_revocation_epoch: Cursor;
|
|
218
|
+
reason: "valid" | "expired" | "revoked" | "unknown";
|
|
219
|
+
revalidation_receipt_digest: Digest;
|
|
220
|
+
}
|
|
221
|
+
export interface ActivityEvidenceV1 {
|
|
222
|
+
evidence_id: OpaqueRef;
|
|
223
|
+
subject_ref: OpaqueRef;
|
|
224
|
+
sequence: Cursor;
|
|
225
|
+
valid_time: ValidIntervalV1;
|
|
226
|
+
components: ReadonlyArray<MemoryComponentV2>;
|
|
227
|
+
primary_component_id: string;
|
|
228
|
+
primary_event: PrimaryEventAnchorV1;
|
|
229
|
+
citations: ReadonlyArray<CitationV1>;
|
|
230
|
+
evidence_digest: Digest;
|
|
231
|
+
}
|
|
232
|
+
export interface ActivityEvidenceRequestV1 {
|
|
233
|
+
after?: Cursor;
|
|
234
|
+
limit: number;
|
|
235
|
+
valid_window?: ValidIntervalV1;
|
|
236
|
+
deadline_at: Instant;
|
|
237
|
+
cancellation_ref: OpaqueRef;
|
|
238
|
+
}
|
|
239
|
+
export interface ActivityEvidencePageV1 {
|
|
240
|
+
source_id: OpaqueRef;
|
|
241
|
+
source_version: string;
|
|
242
|
+
evidence: ReadonlyArray<ActivityEvidenceV1>;
|
|
243
|
+
next_after?: Cursor;
|
|
244
|
+
page_digest: Digest;
|
|
245
|
+
}
|
|
246
|
+
export interface ActivityEvidenceSource {
|
|
247
|
+
readonly source_id: OpaqueRef;
|
|
248
|
+
readonly source_version: string;
|
|
249
|
+
read(request: ActivityEvidenceRequestV1): Promise<Result<ActivityEvidencePageV1>>;
|
|
250
|
+
cancel(cancellation_ref: OpaqueRef): Promise<Result<{
|
|
251
|
+
cancelled: boolean;
|
|
252
|
+
}>>;
|
|
253
|
+
}
|
|
254
|
+
export interface CaptureRequestV2 {
|
|
255
|
+
schema_version: 2;
|
|
256
|
+
idempotency_key: IdempotencyKey;
|
|
257
|
+
payload: CandidatePayloadV2;
|
|
258
|
+
evidence: EvidenceBundleV1;
|
|
259
|
+
authorization: AuthorizationContextV1;
|
|
260
|
+
source_order: {
|
|
261
|
+
source_ref: OpaqueRef;
|
|
262
|
+
sequence: Cursor;
|
|
263
|
+
};
|
|
264
|
+
deadline_at: Instant;
|
|
265
|
+
cancellation_ref: OpaqueRef;
|
|
266
|
+
}
|
|
267
|
+
export interface CaptureAcknowledgementV1 {
|
|
268
|
+
status: "committed_pending" | "duplicate_exact" | "refused" | "unavailable";
|
|
269
|
+
candidate_id?: string;
|
|
270
|
+
record_digest?: Digest;
|
|
271
|
+
cursor?: Cursor;
|
|
272
|
+
transaction_receipt_digest?: Digest;
|
|
273
|
+
}
|
|
274
|
+
export interface AdmissionRequestV1 {
|
|
275
|
+
candidate_id: string;
|
|
276
|
+
authorization: AuthorizationContextV1;
|
|
277
|
+
deadline_at: Instant;
|
|
278
|
+
}
|
|
279
|
+
export interface AdmissionOutcomeV1 {
|
|
280
|
+
status: "accepted" | "rejected" | "pending_adjudication" | "duplicate_exact";
|
|
281
|
+
candidate_id: string;
|
|
282
|
+
record_id?: string;
|
|
283
|
+
cursor: Cursor;
|
|
284
|
+
decision_receipt_digest: Digest;
|
|
285
|
+
transaction_receipt_digest: Digest;
|
|
286
|
+
}
|
|
287
|
+
export interface LifecycleEventAnchorV1 {
|
|
288
|
+
occurred_at: Instant;
|
|
289
|
+
kind_ref: OpaqueRef;
|
|
290
|
+
provenance_ref: OpaqueRef;
|
|
291
|
+
provenance_digest: Digest;
|
|
292
|
+
}
|
|
293
|
+
export interface LifecycleCommandBaseV1 {
|
|
294
|
+
event_id: IdempotencyKey;
|
|
295
|
+
reason_ref: OpaqueRef;
|
|
296
|
+
event_anchor: LifecycleEventAnchorV1;
|
|
297
|
+
authorization: AuthorizationContextV1;
|
|
298
|
+
deadline_at: Instant;
|
|
299
|
+
}
|
|
300
|
+
export type LifecycleCommandV1 = LifecycleCommandBaseV1 & ({
|
|
301
|
+
operation: "reject" | "withdraw";
|
|
302
|
+
candidate_id: string;
|
|
303
|
+
} | {
|
|
304
|
+
operation: "dispute" | "resolve_dispute" | "expire" | "mark_non_current" | "trust_invalidate" | "tombstone";
|
|
305
|
+
record_id: string;
|
|
306
|
+
valid_effective_at?: number;
|
|
307
|
+
} | {
|
|
308
|
+
operation: "supersede" | "rewind";
|
|
309
|
+
record_id: string;
|
|
310
|
+
related_record_id: string;
|
|
311
|
+
valid_effective_at?: number;
|
|
312
|
+
});
|
|
313
|
+
export type MemoryState = "pending" | "rejected" | "withdrawn" | "accepted_current" | "accepted_disputed" | "historical" | "expired" | "trust_invalid" | "tombstoned";
|
|
314
|
+
export interface LifecycleReceiptV1 {
|
|
315
|
+
event_id: IdempotencyKey;
|
|
316
|
+
operation: LifecycleCommandV1["operation"];
|
|
317
|
+
from_state: MemoryState;
|
|
318
|
+
to_state: MemoryState;
|
|
319
|
+
cursor: Cursor;
|
|
320
|
+
event_digest: Digest;
|
|
321
|
+
authorization_receipt_digest: Digest;
|
|
322
|
+
transaction_receipt_digest: Digest;
|
|
323
|
+
}
|
|
324
|
+
export interface CapitalisationRequestV1 {
|
|
325
|
+
idempotency_key: IdempotencyKey;
|
|
326
|
+
source_record_id: string;
|
|
327
|
+
target_scope_ref: OpaqueRef;
|
|
328
|
+
purpose_ref: OpaqueRef;
|
|
329
|
+
retention: RetentionV1;
|
|
330
|
+
authorization: AuthorizationContextV1;
|
|
331
|
+
deadline_at: Instant;
|
|
332
|
+
}
|
|
333
|
+
export interface ProjectionInvalidationRequestV1 {
|
|
334
|
+
through_cursor: Cursor;
|
|
335
|
+
projection_ids: ReadonlyArray<OpaqueRef>;
|
|
336
|
+
deadline_at: Instant;
|
|
337
|
+
}
|
|
338
|
+
export interface ProjectionInvalidationReceiptV1 {
|
|
339
|
+
through_cursor: Cursor;
|
|
340
|
+
projection_receipts: ReadonlyArray<{
|
|
341
|
+
projection_id: OpaqueRef;
|
|
342
|
+
cursor: Cursor;
|
|
343
|
+
digest: Digest;
|
|
344
|
+
}>;
|
|
345
|
+
complete: boolean;
|
|
346
|
+
receipt_digest: Digest;
|
|
347
|
+
}
|
|
348
|
+
export interface CapabilityDescriptorV1 {
|
|
349
|
+
contract_version: 2;
|
|
350
|
+
profiles: ReadonlyArray<"offline_lexical_v1" | "semantic_v1">;
|
|
351
|
+
canonical_backends: ReadonlyArray<"sqlite" | "postgres">;
|
|
352
|
+
max_candidates: 2000;
|
|
353
|
+
max_results: 100;
|
|
354
|
+
receipt_digest: Digest;
|
|
355
|
+
}
|
|
356
|
+
export interface LifecycleEventV2 {
|
|
357
|
+
schema_version: 2;
|
|
358
|
+
event_id: IdempotencyKey;
|
|
359
|
+
cursor: Cursor;
|
|
360
|
+
recorded_at: Instant;
|
|
361
|
+
operation: LifecycleCommandV1["operation"] | "capture" | "accept";
|
|
362
|
+
candidate_id?: string;
|
|
363
|
+
record_id?: string;
|
|
364
|
+
related_record_id?: string;
|
|
365
|
+
from_state?: MemoryState;
|
|
366
|
+
to_state: MemoryState;
|
|
367
|
+
valid_effective_at?: number;
|
|
368
|
+
record_digest?: Digest;
|
|
369
|
+
authorization_receipt_digest: Digest;
|
|
370
|
+
admission_decision?: AdmissionDecisionEnvelopeV1;
|
|
371
|
+
reason_ref?: OpaqueRef;
|
|
372
|
+
event_anchor?: LifecycleEventAnchorV1;
|
|
373
|
+
/** L3 journal spelling; equal to previous_event_digest when emitted. */
|
|
374
|
+
previous_event_hash?: Digest;
|
|
375
|
+
/** L3 journal spelling; equal to event_digest when emitted. */
|
|
376
|
+
event_hash?: Digest;
|
|
377
|
+
previous_event_digest: Digest;
|
|
378
|
+
event_digest: Digest;
|
|
379
|
+
}
|
|
380
|
+
export interface SealedCandidateEnvelopeV1 {
|
|
381
|
+
candidate_id: string;
|
|
382
|
+
envelope_ref: OpaqueRef;
|
|
383
|
+
envelope_digest: Digest;
|
|
384
|
+
key_ref: OpaqueRef;
|
|
385
|
+
ciphertext: string;
|
|
386
|
+
}
|
|
387
|
+
export interface PendingControlV1 {
|
|
388
|
+
candidate_id: string;
|
|
389
|
+
envelope_digest: Digest;
|
|
390
|
+
state: "pending" | "rejected" | "withdrawn";
|
|
391
|
+
created_cursor: Cursor;
|
|
392
|
+
policy_id: OpaqueRef;
|
|
393
|
+
policy_version: string;
|
|
394
|
+
}
|
|
395
|
+
/** Encrypted pending material is returned only through the canonical-store seam. */
|
|
396
|
+
export interface PendingCandidateSnapshotV1 {
|
|
397
|
+
control: PendingControlV1;
|
|
398
|
+
sealed: SealedCandidateEnvelopeV1;
|
|
399
|
+
}
|
|
400
|
+
export interface CanonicalTransactionReceiptV1 {
|
|
401
|
+
operation: MemoryOperation;
|
|
402
|
+
cursor: Cursor;
|
|
403
|
+
storage_epoch: Cursor;
|
|
404
|
+
record_digest?: Digest;
|
|
405
|
+
event_digest: Digest;
|
|
406
|
+
state_digest: Digest;
|
|
407
|
+
lexical_digest?: Digest;
|
|
408
|
+
outbox_digest?: Digest;
|
|
409
|
+
committed_at: Instant;
|
|
410
|
+
receipt_digest: Digest;
|
|
411
|
+
}
|
|
412
|
+
export interface AcceptedLexicalDocumentV1 {
|
|
413
|
+
record_id: string;
|
|
414
|
+
fields: {
|
|
415
|
+
primary: string;
|
|
416
|
+
context: string;
|
|
417
|
+
decision: string;
|
|
418
|
+
evidence: string;
|
|
419
|
+
citations: string;
|
|
420
|
+
};
|
|
421
|
+
valid_time: ValidIntervalV1;
|
|
422
|
+
trust_class: EvidenceClass;
|
|
423
|
+
record_digest: Digest;
|
|
424
|
+
}
|
|
425
|
+
export interface AcceptedCandidateSnapshotV1 {
|
|
426
|
+
snapshot_id: OpaqueRef;
|
|
427
|
+
cursor: Cursor;
|
|
428
|
+
valid_as_of: number;
|
|
429
|
+
system_as_of: Cursor;
|
|
430
|
+
documents: ReadonlyArray<AcceptedLexicalDocumentV1>;
|
|
431
|
+
eligibility_digest: Digest;
|
|
432
|
+
snapshot_digest: Digest;
|
|
433
|
+
}
|
|
434
|
+
export interface RevalidationRequestV1 {
|
|
435
|
+
record_ids: ReadonlyArray<string>;
|
|
436
|
+
valid_as_of: number;
|
|
437
|
+
system_as_of: Cursor;
|
|
438
|
+
authorization_receipt_digest: Digest;
|
|
439
|
+
operation: "recall_current" | "recall_history" | "recall_disputed";
|
|
440
|
+
}
|
|
441
|
+
export interface RevalidationPacketV1 {
|
|
442
|
+
eligible_record_ids: ReadonlyArray<string>;
|
|
443
|
+
removed: ReadonlyArray<{
|
|
444
|
+
record_id: string;
|
|
445
|
+
reason: "state" | "valid_time" | "scope" | "expired" | "trust" | "tombstone" | "redaction";
|
|
446
|
+
}>;
|
|
447
|
+
cursor: Cursor;
|
|
448
|
+
eligibility_digest: Digest;
|
|
449
|
+
authorization_receipt_digest: Digest;
|
|
450
|
+
receipt_digest: Digest;
|
|
451
|
+
}
|
|
452
|
+
export interface ProjectionBatchV1 {
|
|
453
|
+
from_cursor_exclusive: Cursor;
|
|
454
|
+
through_cursor_inclusive: Cursor;
|
|
455
|
+
records: ReadonlyArray<ProjectionRecordV1>;
|
|
456
|
+
removals: ReadonlyArray<{
|
|
457
|
+
record_id: string;
|
|
458
|
+
reason_ref: OpaqueRef;
|
|
459
|
+
}>;
|
|
460
|
+
batch_digest: Digest;
|
|
461
|
+
}
|
|
462
|
+
export interface ProjectionRecordV1 {
|
|
463
|
+
record_id: string;
|
|
464
|
+
record_digest: Digest;
|
|
465
|
+
scope_ref: OpaqueRef;
|
|
466
|
+
valid_time: ValidIntervalV1;
|
|
467
|
+
trust_class: EvidenceClass;
|
|
468
|
+
component_kinds: ReadonlyArray<MemoryComponentKind>;
|
|
469
|
+
citation_refs: ReadonlyArray<OpaqueRef>;
|
|
470
|
+
}
|
|
471
|
+
/** Data-only provenance that every graph, edge, or vector projection carries. */
|
|
472
|
+
export interface MemoryProjectionEnvelopeV2 {
|
|
473
|
+
schema_version: 2;
|
|
474
|
+
record_id: string;
|
|
475
|
+
record_digest: Digest;
|
|
476
|
+
scope_ref: OpaqueRef;
|
|
477
|
+
valid_time: ValidIntervalV1;
|
|
478
|
+
projection_cursor: Cursor;
|
|
479
|
+
envelope_digest: Digest;
|
|
480
|
+
}
|
|
481
|
+
export interface ProjectedNodeV2 {
|
|
482
|
+
node_id: string;
|
|
483
|
+
projection: MemoryProjectionEnvelopeV2;
|
|
484
|
+
}
|
|
485
|
+
export interface ProjectedEdgeV2 {
|
|
486
|
+
edge_id: string;
|
|
487
|
+
source_node_id: string;
|
|
488
|
+
target_node_id: string;
|
|
489
|
+
projection: MemoryProjectionEnvelopeV2;
|
|
490
|
+
}
|
|
491
|
+
export interface ProjectedVectorV2 {
|
|
492
|
+
vector_id: string;
|
|
493
|
+
projection: MemoryProjectionEnvelopeV2;
|
|
494
|
+
}
|
|
495
|
+
export type ProjectedObjectV2 = ProjectedNodeV2 | ProjectedEdgeV2 | ProjectedVectorV2;
|
|
496
|
+
/**
|
|
497
|
+
* One current-graph projection object. It carries only a current accepted
|
|
498
|
+
* projection envelope and citation references; never a record body, pending
|
|
499
|
+
* material, journal event, or trust receipt.
|
|
500
|
+
*/
|
|
501
|
+
export interface BoundedProjectionObjectV1 {
|
|
502
|
+
node_id: string;
|
|
503
|
+
projection: MemoryProjectionEnvelopeV2;
|
|
504
|
+
citation_refs: ReadonlyArray<OpaqueRef>;
|
|
505
|
+
}
|
|
506
|
+
/** The bounded `graph.json`-style current projection. History never inflates it. */
|
|
507
|
+
export interface BoundedCurrentProjectionV1 {
|
|
508
|
+
schema_version: 1;
|
|
509
|
+
projection_schema_version: 1;
|
|
510
|
+
high_water_cursor: Cursor;
|
|
511
|
+
projection_cursor: Cursor;
|
|
512
|
+
objects: ReadonlyArray<BoundedProjectionObjectV1>;
|
|
513
|
+
projection_digest: Digest;
|
|
514
|
+
}
|
|
515
|
+
export type ProjectionOmissionReason = "pending" | "rejected" | "withdrawn" | "accepted_disputed" | "historical" | "expired" | "trust_invalid" | "tombstoned";
|
|
516
|
+
/** A bounded export never silently drops current entries; omission is always by an explicit reason. */
|
|
517
|
+
export interface BoundedProjectionExportV1 {
|
|
518
|
+
schema_version: 1;
|
|
519
|
+
projection_schema_version: 1;
|
|
520
|
+
high_water_cursor: Cursor;
|
|
521
|
+
projection_cursor: Cursor;
|
|
522
|
+
included_count: number;
|
|
523
|
+
omitted_total: number;
|
|
524
|
+
omitted_by_reason: Record<ProjectionOmissionReason, number>;
|
|
525
|
+
raw_byte_size: number;
|
|
526
|
+
raw_byte_ceiling: number;
|
|
527
|
+
projection: BoundedCurrentProjectionV1;
|
|
528
|
+
projection_digest: Digest;
|
|
529
|
+
export_digest: Digest;
|
|
530
|
+
}
|
|
531
|
+
/** One derived projection surface (FTS, nodes, edges, vectors, caches, aggregates, exports). */
|
|
532
|
+
export interface ProjectionInvalidationSurfaceV1 {
|
|
533
|
+
readonly projection_id: OpaqueRef;
|
|
534
|
+
invalidate(batch: ProjectionBatchV1): Promise<Result<{
|
|
535
|
+
projection_id: OpaqueRef;
|
|
536
|
+
cursor: Cursor;
|
|
537
|
+
digest: Digest;
|
|
538
|
+
}>>;
|
|
539
|
+
}
|
|
540
|
+
export interface CanonicalStoreCapabilitiesV1 {
|
|
541
|
+
atomic_promotion: true;
|
|
542
|
+
dense_cursor: true;
|
|
543
|
+
accepted_only_lexical: true;
|
|
544
|
+
fenced_single_writer: boolean;
|
|
545
|
+
revocable_active_store: boolean;
|
|
546
|
+
detached_snapshot: boolean;
|
|
547
|
+
bounded_cancellation: boolean;
|
|
548
|
+
backend: "memory" | "sqlite" | "postgres";
|
|
549
|
+
}
|
|
550
|
+
export type AdmissionStoreInputV1 = {
|
|
551
|
+
outcome: "accept";
|
|
552
|
+
candidate_id: string;
|
|
553
|
+
record: MemoryRecordV2;
|
|
554
|
+
decision: AdmissionDecisionEnvelopeV1 & {
|
|
555
|
+
decision: "accept";
|
|
556
|
+
};
|
|
557
|
+
event: LifecycleEventV2;
|
|
558
|
+
lexical_document: AcceptedLexicalDocumentV1;
|
|
559
|
+
projection_batch: ProjectionBatchV1;
|
|
560
|
+
} | {
|
|
561
|
+
outcome: "reject";
|
|
562
|
+
candidate_id: string;
|
|
563
|
+
decision: AdmissionDecisionEnvelopeV1 & {
|
|
564
|
+
decision: "reject";
|
|
565
|
+
};
|
|
566
|
+
event: LifecycleEventV2;
|
|
567
|
+
};
|
|
568
|
+
export interface CanonicalMemoryStorePort {
|
|
569
|
+
readonly version: 1;
|
|
570
|
+
readonly capabilities: CanonicalStoreCapabilitiesV1;
|
|
571
|
+
commitPending(input: {
|
|
572
|
+
control: PendingControlV1;
|
|
573
|
+
sealed: SealedCandidateEnvelopeV1;
|
|
574
|
+
capture_event: LifecycleEventV2;
|
|
575
|
+
}): Promise<Result<CanonicalTransactionReceiptV1>>;
|
|
576
|
+
readPending(input: {
|
|
577
|
+
candidate_id: string;
|
|
578
|
+
authorization_receipt_digest: Digest;
|
|
579
|
+
}): Promise<Result<PendingCandidateSnapshotV1>>;
|
|
580
|
+
applyAdmission(input: AdmissionStoreInputV1): Promise<Result<CanonicalTransactionReceiptV1>>;
|
|
581
|
+
applyLifecycle(input: {
|
|
582
|
+
command: LifecycleCommandV1;
|
|
583
|
+
event: LifecycleEventV2;
|
|
584
|
+
projection_batch: ProjectionBatchV1;
|
|
585
|
+
}): Promise<Result<CanonicalTransactionReceiptV1>>;
|
|
586
|
+
readRecord(input: {
|
|
587
|
+
record_id: string;
|
|
588
|
+
system_as_of: Cursor;
|
|
589
|
+
authorization_receipt_digest: Digest;
|
|
590
|
+
}): Promise<Result<MemoryRecordV2>>;
|
|
591
|
+
acceptedSnapshot(input: {
|
|
592
|
+
valid_as_of: number;
|
|
593
|
+
system_as_of: Cursor;
|
|
594
|
+
authorization_receipt_digest: Digest;
|
|
595
|
+
max_candidates: number;
|
|
596
|
+
}): Promise<Result<AcceptedCandidateSnapshotV1>>;
|
|
597
|
+
revalidate(input: RevalidationRequestV1): Promise<Result<RevalidationPacketV1>>;
|
|
598
|
+
readJournal(input: {
|
|
599
|
+
after: Cursor;
|
|
600
|
+
limit: number;
|
|
601
|
+
}): Promise<Result<ReadonlyArray<LifecycleEventV2>>>;
|
|
602
|
+
checkpoint(input: {
|
|
603
|
+
through_cursor: Cursor;
|
|
604
|
+
}): Promise<Result<RecoveryCheckpointManifestV1>>;
|
|
605
|
+
nextProjectionBatch(input: {
|
|
606
|
+
after: Cursor;
|
|
607
|
+
limit: number;
|
|
608
|
+
}): Promise<Result<ProjectionBatchV1>>;
|
|
609
|
+
acknowledgeProjection(input: ProjectionInvalidationReceiptV1): Promise<Result<CanonicalTransactionReceiptV1>>;
|
|
610
|
+
readiness(): Promise<Result<OperationalCapabilityReceiptV1>>;
|
|
611
|
+
close(): Promise<Result<{
|
|
612
|
+
closed: true;
|
|
613
|
+
}>>;
|
|
614
|
+
}
|
|
615
|
+
export interface GraphProjectionPort {
|
|
616
|
+
readonly version: 1;
|
|
617
|
+
apply(batch: ProjectionBatchV1): Promise<Result<ProjectionInvalidationReceiptV1>>;
|
|
618
|
+
}
|
|
619
|
+
export interface VectorQueryInputV1 {
|
|
620
|
+
snapshot_id: OpaqueRef;
|
|
621
|
+
eligible_record_ids: ReadonlyArray<string>;
|
|
622
|
+
query_text: string;
|
|
623
|
+
limit: number;
|
|
624
|
+
}
|
|
625
|
+
export interface VectorQueryOutputV1 {
|
|
626
|
+
matches: ReadonlyArray<{
|
|
627
|
+
record_id: string;
|
|
628
|
+
score: number;
|
|
629
|
+
}>;
|
|
630
|
+
model_ref: OpaqueRef;
|
|
631
|
+
projection_cursor: Cursor;
|
|
632
|
+
receipt_digest: Digest;
|
|
633
|
+
}
|
|
634
|
+
export interface VectorProjectionPort {
|
|
635
|
+
readonly version: 1;
|
|
636
|
+
query(input: VectorQueryInputV1): Promise<Result<VectorQueryOutputV1>>;
|
|
637
|
+
apply(batch: ProjectionBatchV1): Promise<Result<ProjectionInvalidationReceiptV1>>;
|
|
638
|
+
}
|
|
639
|
+
export interface SemanticAdjacencyV1 {
|
|
640
|
+
record_ids: ReadonlyArray<string>;
|
|
641
|
+
offsets: ReadonlyArray<number>;
|
|
642
|
+
neighbours: ReadonlyArray<number>;
|
|
643
|
+
weights: ReadonlyArray<number>;
|
|
644
|
+
projection_cursor: Cursor;
|
|
645
|
+
adjacency_digest: Digest;
|
|
646
|
+
}
|
|
647
|
+
export interface SemanticProjectionPort {
|
|
648
|
+
readonly version: 1;
|
|
649
|
+
inducedAdjacency(input: {
|
|
650
|
+
eligible_record_ids: ReadonlyArray<string>;
|
|
651
|
+
system_as_of: Cursor;
|
|
652
|
+
}): Promise<Result<SemanticAdjacencyV1>>;
|
|
653
|
+
}
|
|
654
|
+
export interface CryptoPort {
|
|
655
|
+
readonly version: 1;
|
|
656
|
+
seal(input: {
|
|
657
|
+
candidate_id: string;
|
|
658
|
+
plaintext: string;
|
|
659
|
+
context_digest: Digest;
|
|
660
|
+
}): Promise<Result<SealedCandidateEnvelopeV1>>;
|
|
661
|
+
open(input: {
|
|
662
|
+
sealed: SealedCandidateEnvelopeV1;
|
|
663
|
+
context_digest: Digest;
|
|
664
|
+
}): Promise<Result<{
|
|
665
|
+
plaintext: string;
|
|
666
|
+
}>>;
|
|
667
|
+
destroy(input: {
|
|
668
|
+
key_ref: OpaqueRef;
|
|
669
|
+
idempotency_key: IdempotencyKey;
|
|
670
|
+
}): Promise<Result<{
|
|
671
|
+
destroyed: boolean;
|
|
672
|
+
receipt_digest: Digest;
|
|
673
|
+
}>>;
|
|
674
|
+
rotate(input: {
|
|
675
|
+
key_ref: OpaqueRef;
|
|
676
|
+
idempotency_key: IdempotencyKey;
|
|
677
|
+
}): Promise<Result<{
|
|
678
|
+
key_ref: OpaqueRef;
|
|
679
|
+
receipt_digest: Digest;
|
|
680
|
+
}>>;
|
|
681
|
+
}
|
|
682
|
+
export interface BackupKeyPort {
|
|
683
|
+
readonly version: 1;
|
|
684
|
+
seal(input: {
|
|
685
|
+
key_ref: OpaqueRef;
|
|
686
|
+
plaintext: string;
|
|
687
|
+
context_digest: Digest;
|
|
688
|
+
}): Promise<Result<{
|
|
689
|
+
ciphertext: string;
|
|
690
|
+
ciphertext_digest: Digest;
|
|
691
|
+
key_receipt_digest: Digest;
|
|
692
|
+
}>>;
|
|
693
|
+
open(input: {
|
|
694
|
+
key_ref: OpaqueRef;
|
|
695
|
+
ciphertext: string;
|
|
696
|
+
context_digest: Digest;
|
|
697
|
+
}): Promise<Result<{
|
|
698
|
+
plaintext: string;
|
|
699
|
+
key_receipt_digest: Digest;
|
|
700
|
+
}>>;
|
|
701
|
+
}
|
|
702
|
+
export interface BackupObjectPort {
|
|
703
|
+
readonly version: 1;
|
|
704
|
+
put(input: {
|
|
705
|
+
target_ref: OpaqueRef;
|
|
706
|
+
object_id: OpaqueRef;
|
|
707
|
+
ciphertext: string;
|
|
708
|
+
ciphertext_digest: Digest;
|
|
709
|
+
}): Promise<Result<{
|
|
710
|
+
object_ref: OpaqueRef;
|
|
711
|
+
object_receipt_digest: Digest;
|
|
712
|
+
}>>;
|
|
713
|
+
get(input: {
|
|
714
|
+
source_ref: OpaqueRef;
|
|
715
|
+
object_ref: OpaqueRef;
|
|
716
|
+
expected_ciphertext_digest: Digest;
|
|
717
|
+
}): Promise<Result<{
|
|
718
|
+
ciphertext: string;
|
|
719
|
+
object_receipt_digest: Digest;
|
|
720
|
+
}>>;
|
|
721
|
+
}
|
|
722
|
+
export interface RecoveryCheckpointManifestV1 {
|
|
723
|
+
schema_version: 1;
|
|
724
|
+
high_water_cursor: Cursor;
|
|
725
|
+
storage_epoch: Cursor;
|
|
726
|
+
state_digest: Digest;
|
|
727
|
+
journal_root_digest: Digest;
|
|
728
|
+
blob_root_digest: Digest;
|
|
729
|
+
policy_versions: ReadonlyArray<{
|
|
730
|
+
id: OpaqueRef;
|
|
731
|
+
version: string;
|
|
732
|
+
}>;
|
|
733
|
+
registry_versions: ReadonlyArray<{
|
|
734
|
+
id: OpaqueRef;
|
|
735
|
+
version: string;
|
|
736
|
+
}>;
|
|
737
|
+
included_classes: ReadonlyArray<MemoryState | "pending_envelope" | "journal" | "blob_ref">;
|
|
738
|
+
external_blob_refs: ReadonlyArray<{
|
|
739
|
+
ref: OpaqueRef;
|
|
740
|
+
digest: Digest;
|
|
741
|
+
}>;
|
|
742
|
+
manifest_digest: Digest;
|
|
743
|
+
}
|
|
744
|
+
export interface LogicalBackupManifestV1 {
|
|
745
|
+
schema_version: 1;
|
|
746
|
+
generation: Cursor;
|
|
747
|
+
high_water_cursor: Cursor;
|
|
748
|
+
included_classes: ReadonlyArray<"accepted_current" | "accepted_disputed" | "historical" | "terminal_ledger">;
|
|
749
|
+
excluded_counts: {
|
|
750
|
+
pending: number;
|
|
751
|
+
rejected: number;
|
|
752
|
+
withdrawn: number;
|
|
753
|
+
derived_projections: number;
|
|
754
|
+
};
|
|
755
|
+
records_root_digest: Digest;
|
|
756
|
+
journal_root_digest: Digest;
|
|
757
|
+
state_digest: Digest;
|
|
758
|
+
terminal_ledger_digest: Digest;
|
|
759
|
+
object_ref: OpaqueRef;
|
|
760
|
+
ciphertext_digest: Digest;
|
|
761
|
+
key_receipt_digest: Digest;
|
|
762
|
+
object_receipt_digest: Digest;
|
|
763
|
+
manifest_digest: Digest;
|
|
764
|
+
}
|
|
765
|
+
export interface MemoryBackupPort {
|
|
766
|
+
readonly version: 1;
|
|
767
|
+
exportLogical(input: {
|
|
768
|
+
through_cursor: Cursor;
|
|
769
|
+
authorization: AuthorizationContextV1;
|
|
770
|
+
object_target_ref: OpaqueRef;
|
|
771
|
+
encryption_key_ref: OpaqueRef;
|
|
772
|
+
deadline_at: Instant;
|
|
773
|
+
}): Promise<Result<LogicalBackupManifestV1>>;
|
|
774
|
+
restoreLogical(input: {
|
|
775
|
+
manifest: LogicalBackupManifestV1;
|
|
776
|
+
authorization: AuthorizationContextV1;
|
|
777
|
+
source_ref: OpaqueRef;
|
|
778
|
+
decryption_key_ref: OpaqueRef;
|
|
779
|
+
deadline_at: Instant;
|
|
780
|
+
}): Promise<Result<{
|
|
781
|
+
restored_cursor: Cursor;
|
|
782
|
+
canonical_state_digest: Digest;
|
|
783
|
+
receipt_digest: Digest;
|
|
784
|
+
}>>;
|
|
785
|
+
}
|
|
786
|
+
export interface OperationalCapabilityReceiptV1 {
|
|
787
|
+
store_id: OpaqueRef;
|
|
788
|
+
backend: "memory" | "sqlite" | "postgres";
|
|
789
|
+
storage_epoch: Cursor;
|
|
790
|
+
high_water_cursor: Cursor;
|
|
791
|
+
capabilities: CanonicalStoreCapabilitiesV1;
|
|
792
|
+
issued_at: Instant;
|
|
793
|
+
expires_at: Instant;
|
|
794
|
+
receipt_digest: Digest;
|
|
795
|
+
}
|
|
796
|
+
export interface ClockPort {
|
|
797
|
+
now(): Instant;
|
|
798
|
+
}
|
|
799
|
+
export interface AssertionComparisonInputV1 {
|
|
800
|
+
family_id: OpaqueRef;
|
|
801
|
+
family_version: string;
|
|
802
|
+
left: MemoryRecordV2;
|
|
803
|
+
right: MemoryRecordV2;
|
|
804
|
+
comparison_system_as_of: Cursor;
|
|
805
|
+
}
|
|
806
|
+
export interface AssertionFamilyDescriptorV1 {
|
|
807
|
+
family_id: OpaqueRef;
|
|
808
|
+
version: string;
|
|
809
|
+
applies_to_component_kinds: ReadonlyArray<MemoryComponentKind>;
|
|
810
|
+
occurrence_key_version: string;
|
|
811
|
+
comparator_version: string;
|
|
812
|
+
descriptor_digest: Digest;
|
|
813
|
+
}
|
|
814
|
+
export type ReconciliationRelation = "contradicts" | "supersedes" | "needs_adjudication";
|
|
815
|
+
export interface ReconciliationProposalV1 {
|
|
816
|
+
proposal_id: Digest;
|
|
817
|
+
family_id: OpaqueRef;
|
|
818
|
+
family_version: string;
|
|
819
|
+
occurrence_key: string;
|
|
820
|
+
left_record_id: string;
|
|
821
|
+
right_record_id: string;
|
|
822
|
+
relation: ReconciliationRelation;
|
|
823
|
+
comparison_system_as_of: Cursor;
|
|
824
|
+
evidence_citation_ids: ReadonlyArray<string>;
|
|
825
|
+
proposal_digest: Digest;
|
|
826
|
+
}
|
|
827
|
+
export interface AssertionFamilyRegistry {
|
|
828
|
+
readonly registry_id: OpaqueRef;
|
|
829
|
+
readonly registry_version: string;
|
|
830
|
+
descriptors(): ReadonlyArray<AssertionFamilyDescriptorV1>;
|
|
831
|
+
occurrenceKey(input: AssertionComparisonInputV1): Result<string>;
|
|
832
|
+
compare(input: AssertionComparisonInputV1): Result<ReconciliationProposalV1 | undefined>;
|
|
833
|
+
}
|
|
834
|
+
export interface RecallCapabilityPolicyV1 {
|
|
835
|
+
minimum_channels: "lexical" | "lexical_and_semantic";
|
|
836
|
+
network: "forbid" | "allow";
|
|
837
|
+
}
|
|
838
|
+
export interface RecallRequestV2 {
|
|
839
|
+
query: string;
|
|
840
|
+
purpose_ref: OpaqueRef;
|
|
841
|
+
as_of?: {
|
|
842
|
+
valid_time?: number;
|
|
843
|
+
system_cursor?: Cursor;
|
|
844
|
+
};
|
|
845
|
+
authorization: AuthorizationContextV1;
|
|
846
|
+
capability_policy: RecallCapabilityPolicyV1;
|
|
847
|
+
budgets: {
|
|
848
|
+
max_candidates: number;
|
|
849
|
+
max_results: number;
|
|
850
|
+
max_packet_bytes: number;
|
|
851
|
+
deadline_at: Instant;
|
|
852
|
+
};
|
|
853
|
+
page?: {
|
|
854
|
+
size: number;
|
|
855
|
+
cursor?: OpaqueRef;
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
export interface RankReceiptV1 {
|
|
859
|
+
request_digest: Digest;
|
|
860
|
+
authorization_receipt_digest: Digest;
|
|
861
|
+
profile: "offline_lexical_v1" | "semantic_v1";
|
|
862
|
+
profile_version: string;
|
|
863
|
+
profile_config_digest: Digest;
|
|
864
|
+
valid_as_of: number;
|
|
865
|
+
system_as_of: Cursor;
|
|
866
|
+
snapshot_id: OpaqueRef;
|
|
867
|
+
snapshot_digest: Digest;
|
|
868
|
+
candidate_count: number;
|
|
869
|
+
candidate_ids_digest: Digest;
|
|
870
|
+
scoring_formula_ref: OpaqueRef;
|
|
871
|
+
ordered_ids_digest: Digest;
|
|
872
|
+
revalidation_receipt_digest: Digest;
|
|
873
|
+
projection_receipt_digests: ReadonlyArray<Digest>;
|
|
874
|
+
issued_at: Instant;
|
|
875
|
+
receipt_digest: Digest;
|
|
876
|
+
}
|
|
877
|
+
export interface RecallRecordPacketV2 {
|
|
878
|
+
record: MemoryRecordV2;
|
|
879
|
+
redacted_fields: ReadonlyArray<JsonPointer>;
|
|
880
|
+
redaction_receipt_digest: Digest;
|
|
881
|
+
score: number;
|
|
882
|
+
rank: number;
|
|
883
|
+
}
|
|
884
|
+
export interface RecallPacketV2 {
|
|
885
|
+
records: ReadonlyArray<RecallRecordPacketV2>;
|
|
886
|
+
rank_receipt: RankReceiptV1;
|
|
887
|
+
next_page_cursor?: OpaqueRef;
|
|
888
|
+
packet_digest: Digest;
|
|
889
|
+
}
|
|
890
|
+
export interface MemoryPortV2 {
|
|
891
|
+
readonly version: 2;
|
|
892
|
+
capabilities(): Promise<Result<CapabilityDescriptorV1>>;
|
|
893
|
+
validate(payload: CandidatePayloadV2): Result<{
|
|
894
|
+
payload_digest: Digest;
|
|
895
|
+
}>;
|
|
896
|
+
capture(request: CaptureRequestV2): Promise<Result<CaptureAcknowledgementV1>>;
|
|
897
|
+
cancelCapture(cancellation_ref: OpaqueRef): Promise<Result<{
|
|
898
|
+
cancelled: boolean;
|
|
899
|
+
}>>;
|
|
900
|
+
requestAdmission(request: AdmissionRequestV1): Promise<Result<AdmissionOutcomeV1>>;
|
|
901
|
+
transition(command: LifecycleCommandV1): Promise<Result<LifecycleReceiptV1>>;
|
|
902
|
+
recall(request: RecallRequestV2): Promise<Result<RecallPacketV2>>;
|
|
903
|
+
proposeCapitalisation(request: CapitalisationRequestV1): Promise<Result<CaptureAcknowledgementV1>>;
|
|
904
|
+
invalidateProjections(request: ProjectionInvalidationRequestV1): Promise<Result<ProjectionInvalidationReceiptV1>>;
|
|
905
|
+
readiness(): Promise<Result<OperationalCapabilityReceiptV1>>;
|
|
906
|
+
}
|
|
907
|
+
export interface MemoryEngineDependenciesV2 {
|
|
908
|
+
canonical_store: CanonicalMemoryStorePort;
|
|
909
|
+
authorization: AuthorizationPort;
|
|
910
|
+
admission_policy: AdmissionPolicy;
|
|
911
|
+
evidence_verifier?: EvidenceVerifierPort;
|
|
912
|
+
crypto: CryptoPort;
|
|
913
|
+
activity_sources: ReadonlyArray<ActivityEvidenceSource>;
|
|
914
|
+
graph_projection?: GraphProjectionPort;
|
|
915
|
+
vector_projection?: VectorProjectionPort;
|
|
916
|
+
semantic_projection?: SemanticProjectionPort;
|
|
917
|
+
assertion_registry?: AssertionFamilyRegistry;
|
|
918
|
+
backup_object?: BackupObjectPort;
|
|
919
|
+
backup_key?: BackupKeyPort;
|
|
920
|
+
clock: ClockPort;
|
|
921
|
+
}
|
|
922
|
+
//# sourceMappingURL=graphify-contracts-v2.vendored.d.ts.map
|