@opengeni/db 0.28.1 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/attached-browser-devices.d.ts +42 -0
- package/dist/attempt-tool-catalogs.d.ts +16 -0
- package/dist/browser-auth.d.ts +91 -0
- package/dist/browser-identities.d.ts +128 -0
- package/dist/browser-sessions.d.ts +272 -0
- package/dist/browser-state-artifacts.d.ts +17 -0
- package/dist/capability-components.d.ts +37 -0
- package/dist/capability-integrations.d.ts +192 -0
- package/dist/chunk-F5FT7BEZ.js +3535 -0
- package/dist/chunk-F5FT7BEZ.js.map +1 -0
- package/dist/chunk-ISI2TIUG.js +639 -0
- package/dist/chunk-ISI2TIUG.js.map +1 -0
- package/dist/chunk-MWDVXQOL.js +11639 -0
- package/dist/chunk-MWDVXQOL.js.map +1 -0
- package/dist/chunk-NBE6CHRI.js +955 -0
- package/dist/chunk-NBE6CHRI.js.map +1 -0
- package/dist/{chunk-DBS5HPEW.js → chunk-YHZXQ7HP.js} +760 -11
- package/dist/chunk-YHZXQ7HP.js.map +1 -0
- package/dist/codemode-operations.d.ts +117 -0
- package/dist/codex-token-resolver.d.ts +2 -2
- package/dist/company-profile-schema.d.ts +798 -0
- package/dist/company-profile.d.ts +268 -0
- package/dist/computer-sessions.d.ts +109 -0
- package/dist/connection-token-resolver.d.ts +9 -4
- package/dist/database.d.ts +52 -3
- package/dist/editable-artifact-durable-export.d.ts +153 -0
- package/dist/editable-artifact-durable-export.js +788 -0
- package/dist/editable-artifact-durable-export.js.map +1 -0
- package/dist/editable-artifact-materialization.d.ts +123 -0
- package/dist/editable-artifacts-schema.d.ts +4152 -0
- package/dist/editable-artifacts.d.ts +610 -0
- package/dist/editable-artifacts.js +26 -0
- package/dist/editable-artifacts.js.map +1 -0
- package/dist/environment-crypto.d.ts +8 -4
- package/dist/generated-images.d.ts +139 -0
- package/dist/index.d.ts +958 -126
- package/dist/index.js +31204 -12172
- package/dist/index.js.map +1 -1
- package/dist/insights.d.ts +51 -4
- package/dist/integration-bindings.d.ts +70 -0
- package/dist/integration-features.d.ts +99 -0
- package/dist/interaction-revisions.d.ts +3 -0
- package/dist/interaction-schema.d.ts +5372 -0
- package/dist/knowledge-source-sync-schema.d.ts +1679 -0
- package/dist/knowledge-source-sync.d.ts +274 -0
- package/dist/lossless-columns.d.ts +58 -0
- package/dist/lossless-json.d.ts +39 -0
- package/dist/memory-domain.d.ts +3 -6
- package/dist/memory-governance.d.ts +2 -2
- package/dist/memory-slack-delivery.d.ts +101 -0
- package/dist/new-session-drafts.d.ts +2 -2
- package/dist/pack-components.d.ts +76 -0
- package/dist/pack-installations.d.ts +86 -0
- package/dist/persistence-errors.d.ts +7 -14
- package/dist/plugin-packages.d.ts +126 -0
- package/dist/preference-registry.d.ts +1 -1
- package/dist/provision-roles.d.ts +9 -1
- package/dist/provision-roles.js +1 -1
- package/dist/runtime-posture.d.ts +18 -6
- package/dist/schema.d.ts +19122 -8731
- package/dist/schema.js +173 -1
- package/dist/scoped-knowledge.d.ts +97 -1
- package/dist/session-control.d.ts +4 -4
- package/dist/session-queue-commands.d.ts +19 -11
- package/dist/session-realtime-context.d.ts +2 -2
- package/dist/session-realtime-ledger.d.ts +4 -4
- package/dist/session-realtime-mirror.d.ts +2 -2
- package/dist/session-realtime-state.d.ts +1 -1
- package/dist/session-realtime-terminal.d.ts +8 -1
- package/dist/session-realtime.d.ts +7 -7
- package/dist/session-tool-call-settlement.d.ts +1 -1
- package/dist/slack-user-link-access.d.ts +54 -0
- package/dist/transcription-recordings-schema.d.ts +44 -6
- package/dist/transcription-recordings.d.ts +3 -3
- package/dist/turn-initiator.d.ts +2 -2
- package/dist/video-generation.d.ts +216 -0
- package/dist/video-generation.js +66 -0
- package/dist/video-generation.js.map +1 -0
- package/dist/workspace-artifacts.d.ts +1 -1
- package/dist/workspace-instruction-policies.d.ts +1 -1
- package/dist/workspace-learning-policy-schema.d.ts +932 -0
- package/dist/workspace-learning-policy.d.ts +161 -0
- package/drizzle/0065_enrollment_credential_generation.sql +10 -0
- package/drizzle/0140_retained_screenshot_artifacts.sql +192 -0
- package/drizzle/0176_lossless_canonical_json.sql +975 -0
- package/drizzle/0177_session_events_workspace_turn_type_index.sql +5 -0
- package/drizzle/0178_permissioned_secret_reads.sql +14 -0
- package/drizzle/0179_slack_private_shortcut_delivery_gate.sql +85 -0
- package/drizzle/0180_retained_screenshot_lifecycle_fences.sql +273 -0
- package/drizzle/0181_connected_machine_removal.sql +52 -0
- package/drizzle/0182_connected_machine_remove_session_default.sql +77 -0
- package/drizzle/0183_model_call_provider_cost_estimates.sql +39 -0
- package/drizzle/0184_sandbox_drain_teardown_fence.sql +682 -0
- package/drizzle/0185_temporal_schedule_cleanup_outbox.sql +168 -0
- package/drizzle/0186_sandbox_capture_provider_contract.sql +400 -0
- package/drizzle/0187_generated_image_artifacts.sql +173 -0
- package/drizzle/0188_image_generation_retention_failure.sql +25 -0
- package/drizzle/0189_retained_session_image_formats.sql +13 -0
- package/drizzle/0190_timeline_annotations.sql +31 -0
- package/drizzle/0191_editable_artifact_engine.sql +3853 -0
- package/drizzle/0192_editable_artifact_live_tickets.sql +338 -0
- package/drizzle/0193_editable_artifact_authorization.sql +190 -0
- package/drizzle/0194_editable_artifact_durable_exports.sql +160 -0
- package/drizzle/0195_editable_artifact_import_authorization.sql +203 -0
- package/drizzle/0196_rig_provider_images.sql +152 -0
- package/drizzle/0197_knowledge_source_sync_schedules.sql +523 -0
- package/drizzle/0198_memory_slack_publication_delivery.sql +393 -0
- package/drizzle/0199_workspace_learning_policy.sql +980 -0
- package/drizzle/0201_company_profile_authority.sql +849 -0
- package/drizzle/0202_document_index_checkpoints.sql +85 -0
- package/drizzle/0203_durable_video_generation.sql +353 -0
- package/drizzle/0204_video_generation_funding.sql +44 -0
- package/drizzle/0205_attempt_tool_catalogs.sql +230 -0
- package/drizzle/0206_browser_sessions.sql +646 -0
- package/drizzle/0207_browser_identities.sql +379 -0
- package/drizzle/0208_attached_browser_devices.sql +165 -0
- package/drizzle/0209_computer_sessions.sql +575 -0
- package/drizzle/0210_browser_auth_network_interventions.sql +441 -0
- package/drizzle/0211_editable_artifact_session_links.sql +58 -0
- package/drizzle/0212_slack_installation_bindings.sql +348 -0
- package/drizzle/0213_slack_user_link_access_requests.sql +177 -0
- package/drizzle/0214_session_activity_commit_gate.sql +262 -0
- package/drizzle/0215_capabilities_platform.sql +980 -0
- package/drizzle/0216_pack_component_ownership.sql +235 -0
- package/drizzle/0217_capability_definition_delete_authority.sql +32 -0
- package/package.json +18 -5
- package/src/attached-browser-devices.ts +371 -0
- package/src/attempt-tool-catalogs.ts +131 -0
- package/src/browser-auth.ts +1896 -0
- package/src/browser-identities.ts +1168 -0
- package/src/browser-sessions.ts +2005 -0
- package/src/browser-state-artifacts.ts +59 -0
- package/src/capability-components.ts +166 -0
- package/src/capability-integrations.ts +1663 -0
- package/src/codemode-operations.ts +674 -0
- package/src/company-profile-schema.ts +143 -0
- package/src/company-profile.ts +968 -0
- package/src/computer-sessions.ts +1130 -0
- package/src/connection-token-resolver.ts +270 -25
- package/src/database.ts +434 -24
- package/src/editable-artifact-durable-export.ts +1201 -0
- package/src/editable-artifact-materialization.ts +893 -0
- package/src/editable-artifacts-schema.ts +879 -0
- package/src/editable-artifacts.ts +5404 -0
- package/src/environment-crypto.ts +22 -9
- package/src/generated-images.ts +740 -0
- package/src/index.ts +10117 -2730
- package/src/insights.ts +160 -13
- package/src/integration-bindings.ts +455 -0
- package/src/integration-features.ts +859 -0
- package/src/interaction-revisions.ts +40 -0
- package/src/interaction-schema.ts +1303 -0
- package/src/knowledge-source-sync-schema.ts +192 -0
- package/src/knowledge-source-sync.ts +1922 -0
- package/src/lossless-columns.ts +35 -0
- package/src/lossless-json.ts +322 -0
- package/src/memory-domain.ts +5 -44
- package/src/memory-slack-delivery.ts +801 -0
- package/src/pack-components.ts +954 -0
- package/src/pack-installations.ts +929 -0
- package/src/persistence-errors.ts +26 -34
- package/src/plugin-packages.ts +1186 -0
- package/src/provision-roles.ts +302 -1
- package/src/runtime-posture-cli.ts +9 -0
- package/src/runtime-posture.ts +514 -5
- package/src/schema.ts +5177 -2957
- package/src/scoped-knowledge-schema.ts +1 -1
- package/src/scoped-knowledge.ts +655 -3
- package/src/session-control.ts +133 -81
- package/src/session-queue-commands.ts +511 -247
- package/src/session-realtime-context.ts +20 -7
- package/src/session-realtime-ledger.ts +32 -10
- package/src/session-realtime-mirror.ts +4 -2
- package/src/session-realtime-terminal.ts +89 -21
- package/src/session-realtime.ts +10 -9
- package/src/session-tool-call-settlement.ts +38 -15
- package/src/slack-user-link-access.ts +702 -0
- package/src/transcription-recordings-schema.ts +5 -2
- package/src/transcription-recordings.ts +70 -40
- package/src/video-generation.ts +1452 -0
- package/src/workspace-learning-policy-schema.ts +139 -0
- package/src/workspace-learning-policy.ts +595 -0
- package/dist/chunk-DBS5HPEW.js.map +0 -1
- package/dist/chunk-HT5T62CC.js +0 -6803
- package/dist/chunk-HT5T62CC.js.map +0 -1
- package/dist/event-payload-sanitizer.d.ts +0 -32
- package/src/event-payload-sanitizer.ts +0 -377
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
import { type Database } from "./database.js";
|
|
2
|
+
/**
|
|
3
|
+
* Persistence DTOs intentionally live below @opengeni/core. Core already
|
|
4
|
+
* depends on @opengeni/db, so importing its nominal types here would create a
|
|
5
|
+
* publish-time package cycle. These shapes mirror the editable-artifact domain
|
|
6
|
+
* port exactly; core owns the one-way typed adapter.
|
|
7
|
+
*/
|
|
8
|
+
export type PersistedEditableArtifactScope = Readonly<{
|
|
9
|
+
accountId: string;
|
|
10
|
+
workspaceId: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type PersistedEditableArtifactActor = Readonly<{
|
|
13
|
+
kind: "human";
|
|
14
|
+
subjectId: string;
|
|
15
|
+
replicaId: string;
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: "agent";
|
|
18
|
+
subjectId: string;
|
|
19
|
+
replicaId: string;
|
|
20
|
+
sessionId: string;
|
|
21
|
+
turnId: string;
|
|
22
|
+
attemptId: string;
|
|
23
|
+
generation: number;
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
kind: "service";
|
|
26
|
+
subjectId: string;
|
|
27
|
+
replicaId: string;
|
|
28
|
+
service: string;
|
|
29
|
+
}>;
|
|
30
|
+
export type PersistedEditableArtifactLiveTicketActor = PersistedEditableArtifactActor;
|
|
31
|
+
export type PersistedEditableArtifactLiveTicketRecord = Readonly<{
|
|
32
|
+
tokenDigest: string;
|
|
33
|
+
scope: PersistedEditableArtifactScope;
|
|
34
|
+
artifactId: string;
|
|
35
|
+
modality: "spreadsheet" | "presentation" | "document";
|
|
36
|
+
actor: PersistedEditableArtifactLiveTicketActor;
|
|
37
|
+
allowEdit: boolean;
|
|
38
|
+
protocolVersion: number;
|
|
39
|
+
issuedAt: string;
|
|
40
|
+
expiresAt: string;
|
|
41
|
+
}>;
|
|
42
|
+
export type PersistedEditableArtifactCausalEntry = Readonly<{
|
|
43
|
+
replicaId: string;
|
|
44
|
+
counter: number;
|
|
45
|
+
}>;
|
|
46
|
+
export type PersistedEditableArtifactCausalFrontier = readonly PersistedEditableArtifactCausalEntry[];
|
|
47
|
+
type PersistedEditableArtifactCommon = Readonly<{
|
|
48
|
+
scope: PersistedEditableArtifactScope;
|
|
49
|
+
id: string;
|
|
50
|
+
title: string;
|
|
51
|
+
lifecycle: "active" | "archived";
|
|
52
|
+
authorizationRevision: number;
|
|
53
|
+
headSequence: number;
|
|
54
|
+
stateHash: string;
|
|
55
|
+
currentSnapshotId: string | null;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
}>;
|
|
59
|
+
export type PersistedEditableArtifact = (PersistedEditableArtifactCommon & Readonly<{
|
|
60
|
+
modality: "spreadsheet";
|
|
61
|
+
causalFrontier: PersistedEditableArtifactCausalFrontier;
|
|
62
|
+
}>) | (PersistedEditableArtifactCommon & Readonly<{
|
|
63
|
+
modality: "document" | "presentation";
|
|
64
|
+
}>);
|
|
65
|
+
export type PersistedEditableArtifactCreationReceipt = Readonly<{
|
|
66
|
+
receiptId: string;
|
|
67
|
+
scope: PersistedEditableArtifactScope;
|
|
68
|
+
artifactId: string;
|
|
69
|
+
operationKind: "create" | "import";
|
|
70
|
+
authorityKey: string;
|
|
71
|
+
idempotencyKey: string;
|
|
72
|
+
requestHash: string;
|
|
73
|
+
genesisSnapshotId: string;
|
|
74
|
+
createdAt: string;
|
|
75
|
+
}>;
|
|
76
|
+
export type CreatePersistedEditableArtifactResult = Readonly<{
|
|
77
|
+
artifact: PersistedEditableArtifact;
|
|
78
|
+
genesisSnapshot: PersistedEditableArtifactSnapshotMetadata;
|
|
79
|
+
creationReceipt: PersistedEditableArtifactCreationReceipt;
|
|
80
|
+
replayed: boolean;
|
|
81
|
+
}>;
|
|
82
|
+
export type CreatePersistedEditableArtifactStoreResult = Readonly<{
|
|
83
|
+
kind: "result";
|
|
84
|
+
value: CreatePersistedEditableArtifactResult;
|
|
85
|
+
}> | Readonly<{
|
|
86
|
+
kind: "authorization_stale";
|
|
87
|
+
}>;
|
|
88
|
+
export type ReadPersistedEditableArtifactAtAuthorizationRevisionResult = Readonly<{
|
|
89
|
+
kind: "result";
|
|
90
|
+
artifact: PersistedEditableArtifact | null;
|
|
91
|
+
}> | Readonly<{
|
|
92
|
+
kind: "authorization_stale";
|
|
93
|
+
}>;
|
|
94
|
+
export type PersistedEditableArtifactOperationRecord = Readonly<{
|
|
95
|
+
scope: PersistedEditableArtifactScope;
|
|
96
|
+
artifactId: string;
|
|
97
|
+
serverTransactionId: string;
|
|
98
|
+
sequence: number;
|
|
99
|
+
actorKey: string;
|
|
100
|
+
createdAt: string;
|
|
101
|
+
operationId: string;
|
|
102
|
+
dot: PersistedEditableArtifactCausalEntry;
|
|
103
|
+
}>;
|
|
104
|
+
type PersistedEditableArtifactCommittedTransactionCommon = Readonly<{
|
|
105
|
+
scope: PersistedEditableArtifactScope;
|
|
106
|
+
artifactId: string;
|
|
107
|
+
modality: PersistedEditableArtifact["modality"];
|
|
108
|
+
serverTransactionId: string;
|
|
109
|
+
requestHash: string;
|
|
110
|
+
sequenceStart: number;
|
|
111
|
+
sequenceEnd: number;
|
|
112
|
+
priorStateHash: string;
|
|
113
|
+
stateHash: string;
|
|
114
|
+
modelSchemaVersion: number;
|
|
115
|
+
kernelVersion: string;
|
|
116
|
+
committedTransactionBytes: Uint8Array;
|
|
117
|
+
committedAt: string;
|
|
118
|
+
}>;
|
|
119
|
+
export type PersistedEditableArtifactCommittedTransactionRecord = (PersistedEditableArtifactCommittedTransactionCommon & Readonly<{
|
|
120
|
+
modality: "spreadsheet";
|
|
121
|
+
dot: PersistedEditableArtifactCausalEntry;
|
|
122
|
+
resolvedCausalBase: PersistedEditableArtifactCausalFrontier;
|
|
123
|
+
resultingCausalFrontier: PersistedEditableArtifactCausalFrontier;
|
|
124
|
+
operationIds: readonly string[];
|
|
125
|
+
operationProtocolVersion: number;
|
|
126
|
+
}>) | (PersistedEditableArtifactCommittedTransactionCommon & Readonly<{
|
|
127
|
+
modality: "document" | "presentation";
|
|
128
|
+
commitProtocolVersion: number;
|
|
129
|
+
priorNativeRevision: number;
|
|
130
|
+
nativeRevision: number;
|
|
131
|
+
commandCount: number;
|
|
132
|
+
nativeReceiptBytes: Uint8Array;
|
|
133
|
+
}>);
|
|
134
|
+
type PersistedEditableArtifactReceiptCommon = Readonly<{
|
|
135
|
+
receiptId: string;
|
|
136
|
+
scope: PersistedEditableArtifactScope;
|
|
137
|
+
artifactId: string;
|
|
138
|
+
modality: PersistedEditableArtifact["modality"];
|
|
139
|
+
serverTransactionId: string;
|
|
140
|
+
clientTransactionId: string;
|
|
141
|
+
replicaId: string;
|
|
142
|
+
replicaCounter: number;
|
|
143
|
+
previousLocalTransactionId: string | null;
|
|
144
|
+
intentBytes: Uint8Array;
|
|
145
|
+
requestHash: string;
|
|
146
|
+
actorKey: string;
|
|
147
|
+
sequenceStart: number;
|
|
148
|
+
sequenceEnd: number;
|
|
149
|
+
priorStateHash: string;
|
|
150
|
+
stateHash: string;
|
|
151
|
+
intentEnvelopeVersion: number;
|
|
152
|
+
intentProtocolVersion: number;
|
|
153
|
+
commandProtocolVersion: number;
|
|
154
|
+
kernelVersion: string;
|
|
155
|
+
modelSchemaVersion: number;
|
|
156
|
+
committedAt: string;
|
|
157
|
+
}>;
|
|
158
|
+
export type PersistedEditableArtifactReceipt = (PersistedEditableArtifactReceiptCommon & Readonly<{
|
|
159
|
+
modality: "spreadsheet";
|
|
160
|
+
causalBase: PersistedEditableArtifactCausalFrontier;
|
|
161
|
+
resolvedCausalBase: PersistedEditableArtifactCausalFrontier;
|
|
162
|
+
resultingCausalFrontier: PersistedEditableArtifactCausalFrontier;
|
|
163
|
+
operationCount: number;
|
|
164
|
+
selectiveUndoOperationIds: readonly string[];
|
|
165
|
+
operationProtocolVersion: number;
|
|
166
|
+
}>) | (PersistedEditableArtifactReceiptCommon & Readonly<{
|
|
167
|
+
modality: "document" | "presentation";
|
|
168
|
+
commitProtocolVersion: number;
|
|
169
|
+
priorNativeRevision: number;
|
|
170
|
+
nativeRevision: number;
|
|
171
|
+
commandCount: number;
|
|
172
|
+
}>);
|
|
173
|
+
type PersistedEditableArtifactSnapshotMetadataCommon = Readonly<{
|
|
174
|
+
scope: PersistedEditableArtifactScope;
|
|
175
|
+
artifactId: string;
|
|
176
|
+
modality: PersistedEditableArtifact["modality"];
|
|
177
|
+
snapshotId: string;
|
|
178
|
+
blobReference: string;
|
|
179
|
+
byteSize: number;
|
|
180
|
+
contentHash: string;
|
|
181
|
+
mimeType: "application/vnd.opengeni.editable-artifact-snapshot";
|
|
182
|
+
coveredHeadSequence: number;
|
|
183
|
+
stateHash: string;
|
|
184
|
+
modelSchemaVersion: number;
|
|
185
|
+
kernelVersion: string;
|
|
186
|
+
verifiedAt: string;
|
|
187
|
+
publishedAt: string;
|
|
188
|
+
}>;
|
|
189
|
+
export type PersistedEditableArtifactSnapshotMetadata = (PersistedEditableArtifactSnapshotMetadataCommon & Readonly<{
|
|
190
|
+
modality: "spreadsheet";
|
|
191
|
+
coveredCausalFrontier: PersistedEditableArtifactCausalFrontier;
|
|
192
|
+
operationProtocolVersion: number;
|
|
193
|
+
crdtStateVersion: number;
|
|
194
|
+
}>) | (PersistedEditableArtifactSnapshotMetadataCommon & Readonly<{
|
|
195
|
+
modality: "document" | "presentation";
|
|
196
|
+
nativeRevision: number;
|
|
197
|
+
}>);
|
|
198
|
+
export type PersistedEditableArtifactSequenceCheckpoint = Readonly<{
|
|
199
|
+
modality: "spreadsheet";
|
|
200
|
+
headSequence: number;
|
|
201
|
+
causalFrontier: PersistedEditableArtifactCausalFrontier;
|
|
202
|
+
stateHash: string;
|
|
203
|
+
}> | Readonly<{
|
|
204
|
+
modality: "document" | "presentation";
|
|
205
|
+
headSequence: number;
|
|
206
|
+
nativeRevision: number;
|
|
207
|
+
stateHash: string;
|
|
208
|
+
}>;
|
|
209
|
+
type PersistedEditableArtifactTransactionEventCommon = Readonly<{
|
|
210
|
+
kind: "transaction_committed";
|
|
211
|
+
schemaVersion: 1;
|
|
212
|
+
scope: PersistedEditableArtifactScope;
|
|
213
|
+
artifactId: string;
|
|
214
|
+
serverTransactionId: string;
|
|
215
|
+
sequenceStart: number;
|
|
216
|
+
sequenceEnd: number;
|
|
217
|
+
stateHash: string;
|
|
218
|
+
committedAt: string;
|
|
219
|
+
}>;
|
|
220
|
+
type PersistedEditableArtifactSnapshotEventCommon = Readonly<{
|
|
221
|
+
kind: "snapshot_published";
|
|
222
|
+
schemaVersion: 1;
|
|
223
|
+
scope: PersistedEditableArtifactScope;
|
|
224
|
+
artifactId: string;
|
|
225
|
+
snapshotId: string;
|
|
226
|
+
coveredHeadSequence: number;
|
|
227
|
+
stateHash: string;
|
|
228
|
+
publishedAt: string;
|
|
229
|
+
}>;
|
|
230
|
+
export type PersistedEditableArtifactLiveEvent = (PersistedEditableArtifactTransactionEventCommon & Readonly<{
|
|
231
|
+
modality: "spreadsheet";
|
|
232
|
+
operationProtocolVersion: number;
|
|
233
|
+
}>) | (PersistedEditableArtifactTransactionEventCommon & Readonly<{
|
|
234
|
+
modality: "document" | "presentation";
|
|
235
|
+
commitProtocolVersion: number;
|
|
236
|
+
}>) | (PersistedEditableArtifactSnapshotEventCommon & Readonly<{
|
|
237
|
+
modality: "spreadsheet";
|
|
238
|
+
operationProtocolVersion: number;
|
|
239
|
+
}>) | (PersistedEditableArtifactSnapshotEventCommon & Readonly<{
|
|
240
|
+
modality: "document" | "presentation";
|
|
241
|
+
}>);
|
|
242
|
+
export type PersistedEditableArtifactLiveOutboxRecord = Readonly<{
|
|
243
|
+
outboxId: string;
|
|
244
|
+
event: PersistedEditableArtifactLiveEvent;
|
|
245
|
+
state: "pending" | "publishing" | "published" | "dead_lettered";
|
|
246
|
+
attemptCount: number;
|
|
247
|
+
leaseOwner: string | null;
|
|
248
|
+
leaseExpiresAt: string | null;
|
|
249
|
+
nextAttemptAt: string;
|
|
250
|
+
lastErrorCode: string | null;
|
|
251
|
+
publishedAt: string | null;
|
|
252
|
+
deadLetteredAt: string | null;
|
|
253
|
+
createdAt: string;
|
|
254
|
+
}>;
|
|
255
|
+
type PersistedEditableArtifactLiveBoundaryCommon = Readonly<{
|
|
256
|
+
modality: PersistedEditableArtifact["modality"];
|
|
257
|
+
headSequence: number;
|
|
258
|
+
stateHash: string;
|
|
259
|
+
minimumReplaySequence: number;
|
|
260
|
+
}>;
|
|
261
|
+
export type PersistedEditableArtifactLiveHead = (PersistedEditableArtifactLiveBoundaryCommon & Readonly<{
|
|
262
|
+
modality: "spreadsheet";
|
|
263
|
+
causalFrontier: PersistedEditableArtifactCausalFrontier;
|
|
264
|
+
}>) | (PersistedEditableArtifactLiveBoundaryCommon & Readonly<{
|
|
265
|
+
modality: "document" | "presentation";
|
|
266
|
+
nativeRevision: number;
|
|
267
|
+
}>);
|
|
268
|
+
export type PersistedEditableArtifactLiveResume = Readonly<{
|
|
269
|
+
modality?: "spreadsheet";
|
|
270
|
+
localCursor: number | null;
|
|
271
|
+
localStateHash: string | null;
|
|
272
|
+
localCausalFrontier: PersistedEditableArtifactCausalFrontier;
|
|
273
|
+
requireSnapshot: boolean;
|
|
274
|
+
}> | Readonly<{
|
|
275
|
+
modality: "document" | "presentation";
|
|
276
|
+
localCursor: number | null;
|
|
277
|
+
localStateHash: string | null;
|
|
278
|
+
localNativeRevision: number | null;
|
|
279
|
+
requireSnapshot: boolean;
|
|
280
|
+
}>;
|
|
281
|
+
export type PersistedEditableArtifactLiveSnapshot = Readonly<{
|
|
282
|
+
modality: "spreadsheet";
|
|
283
|
+
artifactId: string;
|
|
284
|
+
sequence: number;
|
|
285
|
+
stateHash: string;
|
|
286
|
+
causalFrontier: PersistedEditableArtifactCausalFrontier;
|
|
287
|
+
digest: string;
|
|
288
|
+
operationProtocolVersion: number;
|
|
289
|
+
kernelVersion: string;
|
|
290
|
+
modelSchemaVersion: number;
|
|
291
|
+
bytes: Uint8Array;
|
|
292
|
+
}> | Readonly<{
|
|
293
|
+
modality: "document" | "presentation";
|
|
294
|
+
artifactId: string;
|
|
295
|
+
sequence: number;
|
|
296
|
+
stateHash: string;
|
|
297
|
+
nativeRevision: number;
|
|
298
|
+
digest: string;
|
|
299
|
+
kernelVersion: string;
|
|
300
|
+
modelSchemaVersion: number;
|
|
301
|
+
bytes: Uint8Array;
|
|
302
|
+
}>;
|
|
303
|
+
export type PersistedEditableArtifactLiveCommittedTransaction = Readonly<{
|
|
304
|
+
modality: "spreadsheet";
|
|
305
|
+
artifactId: string;
|
|
306
|
+
transactionId: string;
|
|
307
|
+
requestHash: string;
|
|
308
|
+
startSequence: number;
|
|
309
|
+
endSequence: number;
|
|
310
|
+
priorStateHash: string;
|
|
311
|
+
stateHash: string;
|
|
312
|
+
causalFrontier: PersistedEditableArtifactCausalFrontier;
|
|
313
|
+
operationProtocolVersion: number;
|
|
314
|
+
committedTransactionBytes: Uint8Array;
|
|
315
|
+
}> | Readonly<{
|
|
316
|
+
modality: "document" | "presentation";
|
|
317
|
+
artifactId: string;
|
|
318
|
+
transactionId: string;
|
|
319
|
+
requestHash: string;
|
|
320
|
+
startSequence: number;
|
|
321
|
+
endSequence: number;
|
|
322
|
+
priorStateHash: string;
|
|
323
|
+
stateHash: string;
|
|
324
|
+
priorNativeRevision: number;
|
|
325
|
+
nativeRevision: number;
|
|
326
|
+
commitProtocolVersion: number;
|
|
327
|
+
committedTransactionBytes: Uint8Array;
|
|
328
|
+
}>;
|
|
329
|
+
export type PersistedEditableArtifactLiveBootstrap = PersistedEditableArtifactLiveHead & Readonly<{
|
|
330
|
+
resumeAccepted: boolean;
|
|
331
|
+
resumeSequence: number;
|
|
332
|
+
resumeStateHash: string;
|
|
333
|
+
snapshot: PersistedEditableArtifactLiveSnapshot | null;
|
|
334
|
+
}>;
|
|
335
|
+
export interface PersistedEditableArtifactSnapshotBytesPort {
|
|
336
|
+
readSnapshotBytes(snapshot: PersistedEditableArtifactSnapshotMetadata): Promise<Uint8Array>;
|
|
337
|
+
}
|
|
338
|
+
export type PersistedEditableArtifactKernelState = Readonly<{
|
|
339
|
+
modality: "spreadsheet";
|
|
340
|
+
artifact: Extract<PersistedEditableArtifact, {
|
|
341
|
+
modality: "spreadsheet";
|
|
342
|
+
}>;
|
|
343
|
+
snapshot: Extract<PersistedEditableArtifactSnapshotMetadata, {
|
|
344
|
+
modality: "spreadsheet";
|
|
345
|
+
}> | null;
|
|
346
|
+
tailTransactionCount: number;
|
|
347
|
+
tailByteSize: number;
|
|
348
|
+
committedTransactionTail: readonly Extract<PersistedEditableArtifactCommittedTransactionRecord, {
|
|
349
|
+
modality: "spreadsheet";
|
|
350
|
+
}>[];
|
|
351
|
+
}> | Readonly<{
|
|
352
|
+
modality: "document" | "presentation";
|
|
353
|
+
artifact: Extract<PersistedEditableArtifact, {
|
|
354
|
+
modality: "document" | "presentation";
|
|
355
|
+
}>;
|
|
356
|
+
snapshot: Extract<PersistedEditableArtifactSnapshotMetadata, {
|
|
357
|
+
modality: "document" | "presentation";
|
|
358
|
+
}> | null;
|
|
359
|
+
tailTransactionCount: number;
|
|
360
|
+
tailByteSize: number;
|
|
361
|
+
baseNativeRevision: number;
|
|
362
|
+
committedTransactionTail: readonly Extract<PersistedEditableArtifactCommittedTransactionRecord, {
|
|
363
|
+
modality: "document" | "presentation";
|
|
364
|
+
}>[];
|
|
365
|
+
}>;
|
|
366
|
+
export type CommitPersistedEditableArtifactTransaction = Readonly<{
|
|
367
|
+
expectedHeadSequence: number;
|
|
368
|
+
serverTransactionId: string;
|
|
369
|
+
receipt: PersistedEditableArtifactReceipt;
|
|
370
|
+
committedTransaction: PersistedEditableArtifactCommittedTransactionRecord;
|
|
371
|
+
operations: readonly PersistedEditableArtifactOperationRecord[];
|
|
372
|
+
outbox: PersistedEditableArtifactLiveOutboxRecord;
|
|
373
|
+
}>;
|
|
374
|
+
export type ReadPersistedEditableArtifactTransactionBasisRequest = Readonly<{
|
|
375
|
+
actorKey: string;
|
|
376
|
+
clientTransactionId: string;
|
|
377
|
+
previousLocalTransactionId: string | null;
|
|
378
|
+
selectiveUndoOperationIds: readonly string[];
|
|
379
|
+
}>;
|
|
380
|
+
export type PersistedEditableArtifactTransactionUndoBasis = Readonly<{
|
|
381
|
+
operationId: string;
|
|
382
|
+
operation: PersistedEditableArtifactOperationRecord | null;
|
|
383
|
+
claimedBy: string | null;
|
|
384
|
+
}>;
|
|
385
|
+
export type PersistedEditableArtifactTransactionBasis = Readonly<{
|
|
386
|
+
kind: "existing";
|
|
387
|
+
receipt: PersistedEditableArtifactReceipt;
|
|
388
|
+
}> | Readonly<{
|
|
389
|
+
kind: "basis";
|
|
390
|
+
artifact: PersistedEditableArtifact;
|
|
391
|
+
predecessor: PersistedEditableArtifactReceipt | null;
|
|
392
|
+
undoTargets: readonly PersistedEditableArtifactTransactionUndoBasis[];
|
|
393
|
+
kernelState: PersistedEditableArtifactKernelState;
|
|
394
|
+
}>;
|
|
395
|
+
export type ExpectedPersistedEditableArtifactPredecessor = Readonly<{
|
|
396
|
+
receiptId: string;
|
|
397
|
+
serverTransactionId: string;
|
|
398
|
+
actorKey: string;
|
|
399
|
+
clientTransactionId: string;
|
|
400
|
+
replicaId: string;
|
|
401
|
+
replicaCounter: number;
|
|
402
|
+
}>;
|
|
403
|
+
export type TryCommitPersistedEditableArtifactTransactionRequest = CommitPersistedEditableArtifactTransaction & Readonly<{
|
|
404
|
+
scope: PersistedEditableArtifactScope;
|
|
405
|
+
artifactId: string;
|
|
406
|
+
expectedLifecycle: "active";
|
|
407
|
+
expectedAuthorizationRevision: number;
|
|
408
|
+
authorizationActor: PersistedEditableArtifactActor;
|
|
409
|
+
actorKey: string;
|
|
410
|
+
clientTransactionId: string;
|
|
411
|
+
requestHash: string;
|
|
412
|
+
expectedPredecessor: ExpectedPersistedEditableArtifactPredecessor | null;
|
|
413
|
+
expectedUnclaimedUndoTargets: readonly string[];
|
|
414
|
+
}>;
|
|
415
|
+
export type TryCommitPersistedEditableArtifactTransactionResult = Readonly<{
|
|
416
|
+
kind: "committed";
|
|
417
|
+
receipt: PersistedEditableArtifactReceipt;
|
|
418
|
+
}> | Readonly<{
|
|
419
|
+
kind: "replayed";
|
|
420
|
+
receipt: PersistedEditableArtifactReceipt;
|
|
421
|
+
}> | Readonly<{
|
|
422
|
+
kind: "stale";
|
|
423
|
+
}>;
|
|
424
|
+
export type CommitPersistedEditableArtifactSnapshot = Readonly<{
|
|
425
|
+
expectedCurrentSnapshotId: string | null;
|
|
426
|
+
expectedAuthorizationRevision: number;
|
|
427
|
+
authorizationActor: PersistedEditableArtifactActor;
|
|
428
|
+
authorizationPermission?: "manage" | "read" | "edit";
|
|
429
|
+
snapshot: PersistedEditableArtifactSnapshotMetadata;
|
|
430
|
+
outbox: PersistedEditableArtifactLiveOutboxRecord;
|
|
431
|
+
}>;
|
|
432
|
+
export type CommitPersistedEditableArtifactSnapshotResult = Readonly<{
|
|
433
|
+
kind: "committed";
|
|
434
|
+
}> | Readonly<{
|
|
435
|
+
kind: "authorization_stale";
|
|
436
|
+
}>;
|
|
437
|
+
export interface PersistedEditableArtifactSnapshotPublicationUnitOfWork {
|
|
438
|
+
artifact(): PersistedEditableArtifact;
|
|
439
|
+
checkpoint(headSequence: number): Promise<PersistedEditableArtifactSequenceCheckpoint | null>;
|
|
440
|
+
findSnapshot(snapshotId: string): Promise<PersistedEditableArtifactSnapshotMetadata | null>;
|
|
441
|
+
commitSnapshot(input: CommitPersistedEditableArtifactSnapshot): Promise<CommitPersistedEditableArtifactSnapshotResult>;
|
|
442
|
+
}
|
|
443
|
+
export type ClaimPersistedEditableArtifactLiveOutboxRequest = Readonly<{
|
|
444
|
+
owner: string;
|
|
445
|
+
leaseDurationMs: number;
|
|
446
|
+
limit: number;
|
|
447
|
+
}>;
|
|
448
|
+
export type PersistedEditableArtifactOutboxRetryErrorCode = "broker_unavailable" | "broker_backpressure" | "publish_timeout";
|
|
449
|
+
export type PersistedEditableArtifactOutboxDeadLetterErrorCode = "invalid_hint" | "oversized_hint";
|
|
450
|
+
export type AdvancePersistedEditableArtifactAuthorizationRevisionResult = Readonly<{
|
|
451
|
+
applied: boolean;
|
|
452
|
+
authorizationRevision: number;
|
|
453
|
+
}>;
|
|
454
|
+
export type PersistedEditableArtifactScopeAuthorizationHead = Readonly<{
|
|
455
|
+
scope: PersistedEditableArtifactScope;
|
|
456
|
+
createRevision: number;
|
|
457
|
+
}>;
|
|
458
|
+
export declare class EditableArtifactPersistenceError extends Error {
|
|
459
|
+
readonly code: "not_found" | "conflict" | "corrupt_history" | "history_limit" | "outbox_lease_conflict" | "transient";
|
|
460
|
+
constructor(code: "not_found" | "conflict" | "corrupt_history" | "history_limit" | "outbox_lease_conflict" | "transient", message: string, options?: ErrorOptions);
|
|
461
|
+
}
|
|
462
|
+
/** Record that one session used an artifact; repeated calls only advance recency. */
|
|
463
|
+
export declare function touchEditableArtifactSessionLink(db: Database, scopeInput: PersistedEditableArtifactScope, sessionIdInput: string, artifactIdInput: string): Promise<void>;
|
|
464
|
+
/** List the exact artifacts most recently used by one session. */
|
|
465
|
+
export declare function listEditableArtifactIdsForSession(db: Database, scopeInput: PersistedEditableArtifactScope, sessionIdInput: string, limitInput?: number): Promise<readonly string[]>;
|
|
466
|
+
export declare const EDITABLE_ARTIFACT_INTENT_MAX_BYTES: number;
|
|
467
|
+
export declare const EDITABLE_ARTIFACT_KERNEL_TAIL_MAX_TRANSACTIONS = 100000;
|
|
468
|
+
export declare const EDITABLE_ARTIFACT_KERNEL_TAIL_MAX_BYTES: number;
|
|
469
|
+
/**
|
|
470
|
+
* Shared PostgreSQL implementation of the live ticket atomic-take port.
|
|
471
|
+
* Direct table access is intentionally unnecessary: all three operations use
|
|
472
|
+
* hardened owner-defined routines installed by migration 0185.
|
|
473
|
+
*/
|
|
474
|
+
export declare class PostgresEditableArtifactLiveTicketStore {
|
|
475
|
+
private readonly db;
|
|
476
|
+
constructor(db: Database);
|
|
477
|
+
put(recordInput: PersistedEditableArtifactLiveTicketRecord): Promise<void>;
|
|
478
|
+
consume(tokenDigestInput: string): Promise<PersistedEditableArtifactLiveTicketRecord | null>;
|
|
479
|
+
cleanupExpired(limitInput?: number): Promise<number>;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* PostgreSQL authority adapter. Kernel inputs are copied from a detached,
|
|
483
|
+
* repeatable-read basis; only the final write CAS and narrow snapshot metadata
|
|
484
|
+
* publication hold the artifact row lock. Tenant RLS is set and verified in
|
|
485
|
+
* every scoped transaction.
|
|
486
|
+
*/
|
|
487
|
+
export declare class PostgresEditableArtifactStore {
|
|
488
|
+
private readonly db;
|
|
489
|
+
constructor(db: Database);
|
|
490
|
+
findArtifactCreation(scopeInput: PersistedEditableArtifactScope, operationKindInput: "create" | "import", authorityKeyInput: string, idempotencyKeyInput: string): Promise<CreatePersistedEditableArtifactResult | null>;
|
|
491
|
+
createArtifact(input: {
|
|
492
|
+
scope: PersistedEditableArtifactScope;
|
|
493
|
+
artifactId: string;
|
|
494
|
+
authorizationActor: PersistedEditableArtifactActor;
|
|
495
|
+
receiptId: string;
|
|
496
|
+
authorityKey: string;
|
|
497
|
+
idempotencyKey: string;
|
|
498
|
+
requestHash: string;
|
|
499
|
+
operationKind: "create" | "import";
|
|
500
|
+
modality: PersistedEditableArtifact["modality"];
|
|
501
|
+
title: string;
|
|
502
|
+
expectedScopeAuthorizationRevision: number;
|
|
503
|
+
initialArtifactAuthorizationRevision: number;
|
|
504
|
+
createdBySubjectId: string;
|
|
505
|
+
genesisSnapshot: PersistedEditableArtifactSnapshotMetadata;
|
|
506
|
+
originalImport?: Readonly<{
|
|
507
|
+
fileId: string;
|
|
508
|
+
blobRefId: string;
|
|
509
|
+
blobReference: string;
|
|
510
|
+
byteSize: number;
|
|
511
|
+
contentHash: string;
|
|
512
|
+
mimeType: string;
|
|
513
|
+
}>;
|
|
514
|
+
outbox: PersistedEditableArtifactLiveOutboxRecord;
|
|
515
|
+
}): Promise<CreatePersistedEditableArtifactStoreResult>;
|
|
516
|
+
ensureScopeCreateAuthorizationHead(scopeInput: PersistedEditableArtifactScope): Promise<PersistedEditableArtifactScopeAuthorizationHead>;
|
|
517
|
+
advanceScopeCreateAuthorizationRevision(scopeInput: PersistedEditableArtifactScope, expectedRevisionInput: number, nextRevisionInput: number): Promise<AdvancePersistedEditableArtifactAuthorizationRevisionResult>;
|
|
518
|
+
getArtifact(scopeInput: PersistedEditableArtifactScope, artifactIdInput: string): Promise<PersistedEditableArtifact | null>;
|
|
519
|
+
readArtifactAtAuthorizationRevision(scopeInput: PersistedEditableArtifactScope, artifactIdInput: string, expectedAuthorizationRevisionInput: number): Promise<ReadPersistedEditableArtifactAtAuthorizationRevisionResult>;
|
|
520
|
+
advanceAuthorizationRevision(scopeInput: PersistedEditableArtifactScope, artifactIdInput: string, expectedRevisionInput: number, nextRevisionInput: number): Promise<AdvancePersistedEditableArtifactAuthorizationRevisionResult>;
|
|
521
|
+
readTransactionBasis(scopeInput: PersistedEditableArtifactScope, artifactIdInput: string, request: ReadPersistedEditableArtifactTransactionBasisRequest): Promise<PersistedEditableArtifactTransactionBasis>;
|
|
522
|
+
readCurrentKernelState(scopeInput: PersistedEditableArtifactScope, artifactIdInput: string, expectedAuthorizationRevisionInput: number): Promise<Readonly<{
|
|
523
|
+
kind: "basis";
|
|
524
|
+
state: PersistedEditableArtifactKernelState;
|
|
525
|
+
}> | Readonly<{
|
|
526
|
+
kind: "authorization_stale";
|
|
527
|
+
}>>;
|
|
528
|
+
tryCommitAppliedTransaction(request: TryCommitPersistedEditableArtifactTransactionRequest): Promise<TryCommitPersistedEditableArtifactTransactionResult>;
|
|
529
|
+
withSnapshotPublicationLock<T>(scopeInput: PersistedEditableArtifactScope, artifactIdInput: string, callback: (unitOfWork: PersistedEditableArtifactSnapshotPublicationUnitOfWork) => Promise<T>): Promise<T>;
|
|
530
|
+
claimLiveOutbox(request: ClaimPersistedEditableArtifactLiveOutboxRequest): Promise<readonly PersistedEditableArtifactLiveOutboxRecord[]>;
|
|
531
|
+
markLiveOutboxPublished(input: {
|
|
532
|
+
outboxId: string;
|
|
533
|
+
owner: string;
|
|
534
|
+
attemptCount: number;
|
|
535
|
+
}): Promise<void>;
|
|
536
|
+
renewLiveOutbox(input: {
|
|
537
|
+
outboxId: string;
|
|
538
|
+
owner: string;
|
|
539
|
+
attemptCount: number;
|
|
540
|
+
leaseDurationMs: number;
|
|
541
|
+
}): Promise<void>;
|
|
542
|
+
retryLiveOutbox(input: {
|
|
543
|
+
outboxId: string;
|
|
544
|
+
owner: string;
|
|
545
|
+
attemptCount: number;
|
|
546
|
+
retryDelayMs: number;
|
|
547
|
+
errorCode: PersistedEditableArtifactOutboxRetryErrorCode;
|
|
548
|
+
}): Promise<void>;
|
|
549
|
+
deadLetterLiveOutbox(input: {
|
|
550
|
+
outboxId: string;
|
|
551
|
+
owner: string;
|
|
552
|
+
attemptCount: number;
|
|
553
|
+
errorCode: PersistedEditableArtifactOutboxDeadLetterErrorCode;
|
|
554
|
+
}): Promise<void>;
|
|
555
|
+
releaseLiveOutbox(input: {
|
|
556
|
+
outboxId: string;
|
|
557
|
+
owner: string;
|
|
558
|
+
attemptCount: number;
|
|
559
|
+
}): Promise<void>;
|
|
560
|
+
}
|
|
561
|
+
export type PostgresEditableArtifactLiveReadStoreOptions = Readonly<{
|
|
562
|
+
snapshotBytes: PersistedEditableArtifactSnapshotBytesPort;
|
|
563
|
+
replicaLeaseTtlMs?: number;
|
|
564
|
+
}>;
|
|
565
|
+
/**
|
|
566
|
+
* Durable OGALV read/ACK adapter. PostgreSQL selects the immutable modality
|
|
567
|
+
* before any canonical transaction bytes are decoded; object storage supplies
|
|
568
|
+
* only bytes for already-authoritative snapshot metadata.
|
|
569
|
+
*/
|
|
570
|
+
export declare class PostgresEditableArtifactLiveReadStore {
|
|
571
|
+
private readonly db;
|
|
572
|
+
private readonly options;
|
|
573
|
+
private readonly replicaLeaseTtlMs;
|
|
574
|
+
constructor(db: Database, options: PostgresEditableArtifactLiveReadStoreOptions);
|
|
575
|
+
readBootstrap(input: {
|
|
576
|
+
scope: PersistedEditableArtifactScope;
|
|
577
|
+
artifactId: string;
|
|
578
|
+
resume: PersistedEditableArtifactLiveResume;
|
|
579
|
+
protocolVersion: number;
|
|
580
|
+
}): Promise<PersistedEditableArtifactLiveBootstrap>;
|
|
581
|
+
readHead(scopeInput: PersistedEditableArtifactScope, artifactIdInput: string): Promise<PersistedEditableArtifactLiveHead>;
|
|
582
|
+
readTransactions(input: {
|
|
583
|
+
scope: PersistedEditableArtifactScope;
|
|
584
|
+
artifactId: string;
|
|
585
|
+
after: number;
|
|
586
|
+
through: number;
|
|
587
|
+
maxCount: number;
|
|
588
|
+
maxBytes: number;
|
|
589
|
+
}): Promise<Readonly<{
|
|
590
|
+
transactions: readonly PersistedEditableArtifactLiveCommittedTransaction[];
|
|
591
|
+
headSequence: number;
|
|
592
|
+
minimumReplaySequence: number;
|
|
593
|
+
}>>;
|
|
594
|
+
readCommittedTransaction(input: {
|
|
595
|
+
scope: PersistedEditableArtifactScope;
|
|
596
|
+
artifactId: string;
|
|
597
|
+
transactionId: string;
|
|
598
|
+
}): Promise<PersistedEditableArtifactLiveCommittedTransaction | null>;
|
|
599
|
+
acknowledgeReplica(input: {
|
|
600
|
+
scope: PersistedEditableArtifactScope;
|
|
601
|
+
artifactId: string;
|
|
602
|
+
replicaId: string;
|
|
603
|
+
actorKey: string;
|
|
604
|
+
streamEpoch: string;
|
|
605
|
+
sequence: number;
|
|
606
|
+
stateHash: string;
|
|
607
|
+
}): Promise<void>;
|
|
608
|
+
private readVerifiedSnapshotBytes;
|
|
609
|
+
}
|
|
610
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EDITABLE_ARTIFACT_INTENT_MAX_BYTES,
|
|
3
|
+
EDITABLE_ARTIFACT_KERNEL_TAIL_MAX_BYTES,
|
|
4
|
+
EDITABLE_ARTIFACT_KERNEL_TAIL_MAX_TRANSACTIONS,
|
|
5
|
+
EditableArtifactPersistenceError,
|
|
6
|
+
PostgresEditableArtifactLiveReadStore,
|
|
7
|
+
PostgresEditableArtifactLiveTicketStore,
|
|
8
|
+
PostgresEditableArtifactStore,
|
|
9
|
+
listEditableArtifactIdsForSession,
|
|
10
|
+
touchEditableArtifactSessionLink
|
|
11
|
+
} from "./chunk-F5FT7BEZ.js";
|
|
12
|
+
import "./chunk-ISI2TIUG.js";
|
|
13
|
+
import "./chunk-MWDVXQOL.js";
|
|
14
|
+
import "./chunk-PZ5AY32C.js";
|
|
15
|
+
export {
|
|
16
|
+
EDITABLE_ARTIFACT_INTENT_MAX_BYTES,
|
|
17
|
+
EDITABLE_ARTIFACT_KERNEL_TAIL_MAX_BYTES,
|
|
18
|
+
EDITABLE_ARTIFACT_KERNEL_TAIL_MAX_TRANSACTIONS,
|
|
19
|
+
EditableArtifactPersistenceError,
|
|
20
|
+
PostgresEditableArtifactLiveReadStore,
|
|
21
|
+
PostgresEditableArtifactLiveTicketStore,
|
|
22
|
+
PostgresEditableArtifactStore,
|
|
23
|
+
listEditableArtifactIdsForSession,
|
|
24
|
+
touchEditableArtifactSessionLink
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=editable-artifacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Encrypts one workspace environment variable value with AES-256-GCM under an
|
|
3
|
-
* operator key held outside Postgres.
|
|
3
|
+
* operator key held outside Postgres. v2 encodes the JavaScript string as
|
|
4
|
+
* UTF-16LE before encryption so every code unit (including NUL and lone
|
|
5
|
+
* surrogates) round-trips exactly. Output format:
|
|
6
|
+
* `v2:<b64 iv>:<b64 ciphertext||tag>`.
|
|
4
7
|
*/
|
|
5
8
|
export declare function encryptEnvironmentValue(key: Uint8Array, plaintext: string): string;
|
|
6
9
|
/**
|
|
7
|
-
* Decrypts
|
|
8
|
-
* ciphertext: unknown versions throw
|
|
9
|
-
* auth-tag mismatches throw
|
|
10
|
+
* Decrypts current lossless v2 values and historical UTF-8 v1 values. Error
|
|
11
|
+
* messages never echo plaintext or ciphertext: unknown versions throw
|
|
12
|
+
* "unsupported environment value format", auth-tag mismatches throw
|
|
13
|
+
* "environment value decryption failed".
|
|
10
14
|
*/
|
|
11
15
|
export declare function decryptEnvironmentValue(key: Uint8Array, stored: string): string;
|