@quantiya/codevibe-codex-plugin 2.0.64 → 2.0.66
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/server.js +38 -36
- package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +302 -8
- package/node_modules/@quantiya/codevibe-core/dist/appsync/index.d.ts +25 -1
- package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +10 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/standalone-companion-status.d.ts +6 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-deferred-inputs.d.ts +104 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-desktop-registration.d.ts +133 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-event-client.d.ts +110 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-inbound-journal.d.ts +142 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-input-delivery.d.ts +13 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-live-connection.d.ts +87 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-mobile-echo.d.ts +289 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-operation-journal.d.ts +236 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-prompt-publication.d.ts +153 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-prompt-resolution.d.ts +38 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-prompt-retention.d.ts +99 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-read-client.d.ts +131 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-resolution-recovery.d.ts +29 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-security-posture.d.ts +32 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-session-retirement.d.ts +30 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-shell-source.d.ts +151 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-source-cursor.d.ts +529 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-source-file.d.ts +33 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-source-pair.d.ts +33 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-state.d.ts +51 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-usage-warning.d.ts +33 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/sync-workspace-outcome.d.ts +23 -0
- package/node_modules/@quantiya/codevibe-core/dist/config/config.d.ts +3 -0
- package/node_modules/@quantiya/codevibe-core/dist/credential-broker/oauth-account-lock.d.ts +4 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +26 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.js +584 -537
- package/node_modules/@quantiya/codevibe-core/dist/local-executor/local-executor-impl.d.ts +11 -11
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.d.ts +9 -4
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/cli.js +50678 -44643
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/OrchestrationApp.d.ts +6 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/components/StatusBar.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/decision-attempt-recovery.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/emit-shell-event.d.ts +31 -8
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/gate-prompts.d.ts +4 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/index.d.ts +8 -7
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/planner-offer-e1.d.ts +5 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/quorum-loop.d.ts +9 -2
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/shell-sync-recovery.d.ts +23 -0
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/slash-routes/reviewers.d.ts +3 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/types.d.ts +8 -8
- package/node_modules/@quantiya/codevibe-core/dist/orchestration-shell/workspace-terminal-coordinator.d.ts +1 -1
- package/node_modules/@quantiya/codevibe-core/dist/planner/types.d.ts +2 -2
- package/node_modules/@quantiya/codevibe-core/dist/tool-activity/atomic-file.d.ts +13 -3
- package/node_modules/@quantiya/codevibe-core/dist/tool-activity/consolidator.d.ts +10 -2
- package/node_modules/@quantiya/codevibe-core/dist/tool-activity/index.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/tool-activity/ledger.d.ts +17 -9
- package/node_modules/@quantiya/codevibe-core/dist/tool-activity/outbox.d.ts +20 -2
- package/node_modules/@quantiya/codevibe-core/dist/tool-activity/replay-cursor.d.ts +2 -2
- package/node_modules/@quantiya/codevibe-core/dist/tool-activity/sync-transport.d.ts +53 -0
- package/node_modules/@quantiya/codevibe-core/dist/tool-activity/types.d.ts +28 -24
- package/node_modules/@quantiya/codevibe-core/dist/types/events.d.ts +3 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/reviewer.d.ts +14 -4
- package/node_modules/@quantiya/codevibe-core/package.json +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const coordinate: z.ZodObject<{
|
|
3
|
+
eventId: z.ZodString;
|
|
4
|
+
timestamp: z.ZodString;
|
|
5
|
+
type: z.ZodEnum<["USER_PROMPT", "PROMPT_RESPONSE"]>;
|
|
6
|
+
lane: z.ZodEnum<["primary", "follow_up", "free_form"]>;
|
|
7
|
+
}, "strict", z.ZodTypeAny, {
|
|
8
|
+
eventId: string;
|
|
9
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
10
|
+
timestamp: string;
|
|
11
|
+
lane: "primary" | "follow_up" | "free_form";
|
|
12
|
+
}, {
|
|
13
|
+
eventId: string;
|
|
14
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
15
|
+
timestamp: string;
|
|
16
|
+
lane: "primary" | "follow_up" | "free_form";
|
|
17
|
+
}>;
|
|
18
|
+
declare const frame: z.ZodEffects<z.ZodObject<{
|
|
19
|
+
streamSha256: z.ZodString;
|
|
20
|
+
occurrence: z.ZodString;
|
|
21
|
+
sourceSha256: z.ZodString;
|
|
22
|
+
startOffset: z.ZodNumber;
|
|
23
|
+
endOffset: z.ZodNumber;
|
|
24
|
+
}, "strict", z.ZodTypeAny, {
|
|
25
|
+
streamSha256: string;
|
|
26
|
+
occurrence: string;
|
|
27
|
+
sourceSha256: string;
|
|
28
|
+
startOffset: number;
|
|
29
|
+
endOffset: number;
|
|
30
|
+
}, {
|
|
31
|
+
streamSha256: string;
|
|
32
|
+
occurrence: string;
|
|
33
|
+
sourceSha256: string;
|
|
34
|
+
startOffset: number;
|
|
35
|
+
endOffset: number;
|
|
36
|
+
}>, {
|
|
37
|
+
streamSha256: string;
|
|
38
|
+
occurrence: string;
|
|
39
|
+
sourceSha256: string;
|
|
40
|
+
startOffset: number;
|
|
41
|
+
endOffset: number;
|
|
42
|
+
}, {
|
|
43
|
+
streamSha256: string;
|
|
44
|
+
occurrence: string;
|
|
45
|
+
sourceSha256: string;
|
|
46
|
+
startOffset: number;
|
|
47
|
+
endOffset: number;
|
|
48
|
+
}>;
|
|
49
|
+
declare const row: z.ZodObject<{
|
|
50
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
51
|
+
kind: z.ZodLiteral<"MOBILE_ECHOES">;
|
|
52
|
+
operationId: z.ZodString;
|
|
53
|
+
sessionId: z.ZodString;
|
|
54
|
+
sessionGenerationId: z.ZodString;
|
|
55
|
+
provider: z.ZodEnum<["codex", "claude", "agy"]>;
|
|
56
|
+
entries: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
57
|
+
token: z.ZodString;
|
|
58
|
+
target: z.ZodObject<{
|
|
59
|
+
eventId: z.ZodString;
|
|
60
|
+
timestamp: z.ZodString;
|
|
61
|
+
type: z.ZodEnum<["USER_PROMPT", "PROMPT_RESPONSE"]>;
|
|
62
|
+
lane: z.ZodEnum<["primary", "follow_up", "free_form"]>;
|
|
63
|
+
}, "strict", z.ZodTypeAny, {
|
|
64
|
+
eventId: string;
|
|
65
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
66
|
+
timestamp: string;
|
|
67
|
+
lane: "primary" | "follow_up" | "free_form";
|
|
68
|
+
}, {
|
|
69
|
+
eventId: string;
|
|
70
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
71
|
+
timestamp: string;
|
|
72
|
+
lane: "primary" | "follow_up" | "free_form";
|
|
73
|
+
}>;
|
|
74
|
+
normalized: z.ZodString;
|
|
75
|
+
armedAt: z.ZodNumber;
|
|
76
|
+
expiresAt: z.ZodNumber;
|
|
77
|
+
clockPrecisionMs: z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<1000>]>;
|
|
78
|
+
normalization: z.ZodEnum<["trim", "whitespace"]>;
|
|
79
|
+
allowSuffix: z.ZodBoolean;
|
|
80
|
+
claim: z.ZodNullable<z.ZodEffects<z.ZodObject<{
|
|
81
|
+
streamSha256: z.ZodString;
|
|
82
|
+
occurrence: z.ZodString;
|
|
83
|
+
sourceSha256: z.ZodString;
|
|
84
|
+
startOffset: z.ZodNumber;
|
|
85
|
+
endOffset: z.ZodNumber;
|
|
86
|
+
}, "strict", z.ZodTypeAny, {
|
|
87
|
+
streamSha256: string;
|
|
88
|
+
occurrence: string;
|
|
89
|
+
sourceSha256: string;
|
|
90
|
+
startOffset: number;
|
|
91
|
+
endOffset: number;
|
|
92
|
+
}, {
|
|
93
|
+
streamSha256: string;
|
|
94
|
+
occurrence: string;
|
|
95
|
+
sourceSha256: string;
|
|
96
|
+
startOffset: number;
|
|
97
|
+
endOffset: number;
|
|
98
|
+
}>, {
|
|
99
|
+
streamSha256: string;
|
|
100
|
+
occurrence: string;
|
|
101
|
+
sourceSha256: string;
|
|
102
|
+
startOffset: number;
|
|
103
|
+
endOffset: number;
|
|
104
|
+
}, {
|
|
105
|
+
streamSha256: string;
|
|
106
|
+
occurrence: string;
|
|
107
|
+
sourceSha256: string;
|
|
108
|
+
startOffset: number;
|
|
109
|
+
endOffset: number;
|
|
110
|
+
}>>;
|
|
111
|
+
claimedEchoSha256: z.ZodNullable<z.ZodString>;
|
|
112
|
+
}, "strict", z.ZodTypeAny, {
|
|
113
|
+
expiresAt: number;
|
|
114
|
+
token: string;
|
|
115
|
+
target: {
|
|
116
|
+
eventId: string;
|
|
117
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
118
|
+
timestamp: string;
|
|
119
|
+
lane: "primary" | "follow_up" | "free_form";
|
|
120
|
+
};
|
|
121
|
+
claim: {
|
|
122
|
+
streamSha256: string;
|
|
123
|
+
occurrence: string;
|
|
124
|
+
sourceSha256: string;
|
|
125
|
+
startOffset: number;
|
|
126
|
+
endOffset: number;
|
|
127
|
+
} | null;
|
|
128
|
+
normalized: string;
|
|
129
|
+
armedAt: number;
|
|
130
|
+
clockPrecisionMs: 1 | 1000;
|
|
131
|
+
normalization: "trim" | "whitespace";
|
|
132
|
+
allowSuffix: boolean;
|
|
133
|
+
claimedEchoSha256: string | null;
|
|
134
|
+
}, {
|
|
135
|
+
expiresAt: number;
|
|
136
|
+
token: string;
|
|
137
|
+
target: {
|
|
138
|
+
eventId: string;
|
|
139
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
140
|
+
timestamp: string;
|
|
141
|
+
lane: "primary" | "follow_up" | "free_form";
|
|
142
|
+
};
|
|
143
|
+
claim: {
|
|
144
|
+
streamSha256: string;
|
|
145
|
+
occurrence: string;
|
|
146
|
+
sourceSha256: string;
|
|
147
|
+
startOffset: number;
|
|
148
|
+
endOffset: number;
|
|
149
|
+
} | null;
|
|
150
|
+
normalized: string;
|
|
151
|
+
armedAt: number;
|
|
152
|
+
clockPrecisionMs: 1 | 1000;
|
|
153
|
+
normalization: "trim" | "whitespace";
|
|
154
|
+
allowSuffix: boolean;
|
|
155
|
+
claimedEchoSha256: string | null;
|
|
156
|
+
}>, {
|
|
157
|
+
expiresAt: number;
|
|
158
|
+
token: string;
|
|
159
|
+
target: {
|
|
160
|
+
eventId: string;
|
|
161
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
162
|
+
timestamp: string;
|
|
163
|
+
lane: "primary" | "follow_up" | "free_form";
|
|
164
|
+
};
|
|
165
|
+
claim: {
|
|
166
|
+
streamSha256: string;
|
|
167
|
+
occurrence: string;
|
|
168
|
+
sourceSha256: string;
|
|
169
|
+
startOffset: number;
|
|
170
|
+
endOffset: number;
|
|
171
|
+
} | null;
|
|
172
|
+
normalized: string;
|
|
173
|
+
armedAt: number;
|
|
174
|
+
clockPrecisionMs: 1 | 1000;
|
|
175
|
+
normalization: "trim" | "whitespace";
|
|
176
|
+
allowSuffix: boolean;
|
|
177
|
+
claimedEchoSha256: string | null;
|
|
178
|
+
}, {
|
|
179
|
+
expiresAt: number;
|
|
180
|
+
token: string;
|
|
181
|
+
target: {
|
|
182
|
+
eventId: string;
|
|
183
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
184
|
+
timestamp: string;
|
|
185
|
+
lane: "primary" | "follow_up" | "free_form";
|
|
186
|
+
};
|
|
187
|
+
claim: {
|
|
188
|
+
streamSha256: string;
|
|
189
|
+
occurrence: string;
|
|
190
|
+
sourceSha256: string;
|
|
191
|
+
startOffset: number;
|
|
192
|
+
endOffset: number;
|
|
193
|
+
} | null;
|
|
194
|
+
normalized: string;
|
|
195
|
+
armedAt: number;
|
|
196
|
+
clockPrecisionMs: 1 | 1000;
|
|
197
|
+
normalization: "trim" | "whitespace";
|
|
198
|
+
allowSuffix: boolean;
|
|
199
|
+
claimedEchoSha256: string | null;
|
|
200
|
+
}>, "many">;
|
|
201
|
+
}, "strict", z.ZodTypeAny, {
|
|
202
|
+
kind: "MOBILE_ECHOES";
|
|
203
|
+
entries: {
|
|
204
|
+
expiresAt: number;
|
|
205
|
+
token: string;
|
|
206
|
+
target: {
|
|
207
|
+
eventId: string;
|
|
208
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
209
|
+
timestamp: string;
|
|
210
|
+
lane: "primary" | "follow_up" | "free_form";
|
|
211
|
+
};
|
|
212
|
+
claim: {
|
|
213
|
+
streamSha256: string;
|
|
214
|
+
occurrence: string;
|
|
215
|
+
sourceSha256: string;
|
|
216
|
+
startOffset: number;
|
|
217
|
+
endOffset: number;
|
|
218
|
+
} | null;
|
|
219
|
+
normalized: string;
|
|
220
|
+
armedAt: number;
|
|
221
|
+
clockPrecisionMs: 1 | 1000;
|
|
222
|
+
normalization: "trim" | "whitespace";
|
|
223
|
+
allowSuffix: boolean;
|
|
224
|
+
claimedEchoSha256: string | null;
|
|
225
|
+
}[];
|
|
226
|
+
sessionId: string;
|
|
227
|
+
sessionGenerationId: string;
|
|
228
|
+
schemaVersion: 1;
|
|
229
|
+
provider: "agy" | "claude" | "codex";
|
|
230
|
+
operationId: string;
|
|
231
|
+
}, {
|
|
232
|
+
kind: "MOBILE_ECHOES";
|
|
233
|
+
entries: {
|
|
234
|
+
expiresAt: number;
|
|
235
|
+
token: string;
|
|
236
|
+
target: {
|
|
237
|
+
eventId: string;
|
|
238
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
239
|
+
timestamp: string;
|
|
240
|
+
lane: "primary" | "follow_up" | "free_form";
|
|
241
|
+
};
|
|
242
|
+
claim: {
|
|
243
|
+
streamSha256: string;
|
|
244
|
+
occurrence: string;
|
|
245
|
+
sourceSha256: string;
|
|
246
|
+
startOffset: number;
|
|
247
|
+
endOffset: number;
|
|
248
|
+
} | null;
|
|
249
|
+
normalized: string;
|
|
250
|
+
armedAt: number;
|
|
251
|
+
clockPrecisionMs: 1 | 1000;
|
|
252
|
+
normalization: "trim" | "whitespace";
|
|
253
|
+
allowSuffix: boolean;
|
|
254
|
+
claimedEchoSha256: string | null;
|
|
255
|
+
}[];
|
|
256
|
+
sessionId: string;
|
|
257
|
+
sessionGenerationId: string;
|
|
258
|
+
schemaVersion: 1;
|
|
259
|
+
provider: "agy" | "claude" | "codex";
|
|
260
|
+
operationId: string;
|
|
261
|
+
}>;
|
|
262
|
+
export type DesktopMobileEchoRecord = z.infer<typeof row>;
|
|
263
|
+
export type DesktopMobileEchoTarget = z.infer<typeof coordinate>;
|
|
264
|
+
export type DesktopMobileEchoFrame = z.infer<typeof frame>;
|
|
265
|
+
export declare function decodeMobileEcho(value: unknown): DesktopMobileEchoRecord;
|
|
266
|
+
export interface DesktopMobileEchoJournal {
|
|
267
|
+
/** Before terminal input. A full or unavailable journal must prevent typing. */
|
|
268
|
+
arm(target: DesktopMobileEchoTarget, content: string, options: {
|
|
269
|
+
nowMs: number;
|
|
270
|
+
windowMs: number;
|
|
271
|
+
clockPrecisionMs?: 1 | 1000;
|
|
272
|
+
allowSuffix: boolean;
|
|
273
|
+
normalization: 'trim' | 'whitespace';
|
|
274
|
+
}): Promise<void>;
|
|
275
|
+
/** Uses native record time, not replay time; reserves one exact byte occurrence. */
|
|
276
|
+
claim(frame: DesktopMobileEchoFrame, content: string, nativeTimestamp: string): Promise<boolean>;
|
|
277
|
+
/** Call only after the real native cursor is durably at/past this position. */
|
|
278
|
+
reconcile(streamSha256: string, committedByteOffset: number): Promise<number>;
|
|
279
|
+
}
|
|
280
|
+
/** Device-key encrypted storage is supplied by the account journal. Unmatched
|
|
281
|
+
* entries are bounded and retained, not age-evicted before a delayed replay.
|
|
282
|
+
* Exact session retirement removes them. No customer content is returned. */
|
|
283
|
+
export declare function createMobileEchoJournal(options: {
|
|
284
|
+
mutate<T>(fn: (row: DesktopMobileEchoRecord, save: () => Promise<void>) => Promise<T>): Promise<T>;
|
|
285
|
+
assertAdmission(): void;
|
|
286
|
+
full(): never;
|
|
287
|
+
collision(): never;
|
|
288
|
+
}): DesktopMobileEchoJournal;
|
|
289
|
+
export {};
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { type CreateDesktopSyncEventInput, type UpdateDesktopSyncEventInput, type SyncEventReceipt } from './sync-event-client';
|
|
2
|
+
import { type DesktopSyncSourceStream, type DesktopSyncSourceJournal, type DesktopSyncSourceInventory } from './sync-source-cursor';
|
|
3
|
+
import { type DesktopSyncSourcePair } from './sync-source-pair';
|
|
4
|
+
import { type ShellSyncSource, type ShellSyncSourceInventory } from './sync-shell-source';
|
|
5
|
+
import { type DesktopSyncRegistrationStore } from './sync-desktop-registration';
|
|
6
|
+
import type { DesktopSyncRegistrationAttempt, DesktopSyncReadCredential } from './sync-read-client';
|
|
7
|
+
import { type DesktopInboundJournal } from './sync-inbound-journal';
|
|
8
|
+
import { type DesktopDeferredInputStore } from './sync-deferred-inputs';
|
|
9
|
+
import { type DesktopMobileEchoJournal } from './sync-mobile-echo';
|
|
10
|
+
import { type PromptRetentionJournal } from './sync-prompt-retention';
|
|
11
|
+
import { type PromptPublicationJournal } from './sync-prompt-publication';
|
|
12
|
+
import { type ResolveDesktopSyncPromptInput } from './sync-prompt-resolution';
|
|
13
|
+
import { type ConfirmDesktopSyncRetirementInput, type SyncSessionRetirementReceipt, type SessionRetirementRecord, type ToolSyncRetirementLocation } from './sync-session-retirement';
|
|
14
|
+
type Action = 'CREATE_EVENT' | 'UPDATE_EVENT';
|
|
15
|
+
type Input = CreateDesktopSyncEventInput | UpdateDesktopSyncEventInput;
|
|
16
|
+
export type DurableSyncResult = {
|
|
17
|
+
status: 'ACCEPTED';
|
|
18
|
+
receipt: SyncEventReceipt;
|
|
19
|
+
} | {
|
|
20
|
+
status: 'OMITTED';
|
|
21
|
+
reason: 'SYNC_QUOTA_EXHAUSTED';
|
|
22
|
+
};
|
|
23
|
+
export declare class SyncJournalError extends Error {
|
|
24
|
+
readonly code: 'SYNC_JOURNAL_INVALID' | 'SYNC_JOURNAL_FULL' | 'SYNC_JOURNAL_MISSING' | 'SYNC_OPERATION_COLLISION' | 'SYNC_OPERATION_PENDING' | 'SYNC_JOURNAL_IDENTITY_UNAVAILABLE' | 'SYNC_JOURNAL_LOCK_LOST';
|
|
25
|
+
constructor(code: 'SYNC_JOURNAL_INVALID' | 'SYNC_JOURNAL_FULL' | 'SYNC_JOURNAL_MISSING' | 'SYNC_OPERATION_COLLISION' | 'SYNC_OPERATION_PENDING' | 'SYNC_JOURNAL_IDENTITY_UNAVAILABLE' | 'SYNC_JOURNAL_LOCK_LOST');
|
|
26
|
+
}
|
|
27
|
+
export interface DesktopSyncSessionScope {
|
|
28
|
+
sessionId: string;
|
|
29
|
+
sessionGenerationId: string;
|
|
30
|
+
}
|
|
31
|
+
/** A stable native occurrence, supplied by the source reader, never the cloud. */
|
|
32
|
+
export interface DesktopSyncSourceIdentity {
|
|
33
|
+
provider: 'codex' | 'claude' | 'agy';
|
|
34
|
+
/** Hash of the native stream identity; no filesystem path or customer text. */
|
|
35
|
+
streamSha256: string;
|
|
36
|
+
/** Native record UUID, or descriptor-derived byte span for a framed stream. */
|
|
37
|
+
occurrence: string;
|
|
38
|
+
/** Exact source bytes before randomized encryption, stable on a restart. */
|
|
39
|
+
sourceSha256: string;
|
|
40
|
+
}
|
|
41
|
+
interface RecordBase extends DesktopSyncSessionScope {
|
|
42
|
+
schemaVersion: 1;
|
|
43
|
+
operationId: string;
|
|
44
|
+
fingerprint: string;
|
|
45
|
+
createdAt: number;
|
|
46
|
+
action: Action;
|
|
47
|
+
}
|
|
48
|
+
type RecordRow = RecordBase & ({
|
|
49
|
+
state: 'PENDING';
|
|
50
|
+
input: Input;
|
|
51
|
+
} | {
|
|
52
|
+
state: 'ACCEPTED';
|
|
53
|
+
receipt: SyncEventReceipt;
|
|
54
|
+
} | {
|
|
55
|
+
state: 'OMITTED';
|
|
56
|
+
reason: 'SYNC_QUOTA_EXHAUSTED';
|
|
57
|
+
});
|
|
58
|
+
export interface DurableDesktopSyncWriterOptions {
|
|
59
|
+
userId: string;
|
|
60
|
+
environment: 'development' | 'production';
|
|
61
|
+
/** Dedicated durable root; a caller override supports private installations. */
|
|
62
|
+
root?: string;
|
|
63
|
+
/** Restrict this producer to its exact session incarnation, including recovery/ack. */
|
|
64
|
+
sessionScope?: DesktopSyncSessionScope;
|
|
65
|
+
/** Existing device private key only. This callback must never mint an identity. */
|
|
66
|
+
readPrivateKey(): Promise<string | null>;
|
|
67
|
+
/** Must fence the current authenticated account before and after awaits. */
|
|
68
|
+
assertAccount(): void;
|
|
69
|
+
/** Session owner fences new deferred writes once its input lifetime closes. */
|
|
70
|
+
assertDeferredAdmission?(): void;
|
|
71
|
+
send(action: Action, input: Input, signal?: AbortSignal): Promise<SyncEventReceipt>;
|
|
72
|
+
/** Recognize a typed backend quota error, never an error-message substring. */
|
|
73
|
+
isQuotaDenial(error: unknown): boolean;
|
|
74
|
+
/** Fresh cloud pause observation for NEW ordinary payloads only. Never
|
|
75
|
+
* classify an existing operation which may have committed remotely. */
|
|
76
|
+
omitNewPayload?(signal?: AbortSignal): Promise<boolean>;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Bounded encrypted transactional outbox for ordinary desktop sync writes.
|
|
80
|
+
* A producer must persist its own cursor BEFORE acknowledge(). Until then a
|
|
81
|
+
* terminal receipt/tombstone survives restart. No age-based eviction, remint,
|
|
82
|
+
* auto-replay or quota-reset replay is permitted. Full/corrupt storage stops
|
|
83
|
+
* Companion admission only; callers must keep the local desktop running.
|
|
84
|
+
*
|
|
85
|
+
* The existing portable mkdir lock serializes local records; per-operation
|
|
86
|
+
* locks serialize the network attempt without blocking other sessions' I/O.
|
|
87
|
+
* Ownerless lock stealing is disabled: a stranded ownerless/reclaim guard
|
|
88
|
+
* fails closed and needs quiescent repair, not an unsafe online removal.
|
|
89
|
+
*/
|
|
90
|
+
export declare class DurableDesktopSyncWriter {
|
|
91
|
+
private readonly options;
|
|
92
|
+
private readonly directory;
|
|
93
|
+
private readonly scope;
|
|
94
|
+
private readonly sessionScope?;
|
|
95
|
+
constructor(options: DurableDesktopSyncWriterOptions);
|
|
96
|
+
create(input: CreateDesktopSyncEventInput, signal?: AbortSignal): Promise<DurableSyncResult>;
|
|
97
|
+
update(input: UpdateDesktopSyncEventInput, signal?: AbortSignal): Promise<DurableSyncResult>;
|
|
98
|
+
/** Seal exact bytes without sending; the producer can checkpoint its source before retry(id). */
|
|
99
|
+
prepareCreate(input: CreateDesktopSyncEventInput, signal?: AbortSignal): Promise<string>;
|
|
100
|
+
prepareUpdate(input: UpdateDesktopSyncEventInput, signal?: AbortSignal): Promise<string>;
|
|
101
|
+
/**
|
|
102
|
+
* Source-reader admission: prepare, but NEVER dispatch. Re-reading the same
|
|
103
|
+
* native occurrence recovers its already-sealed bytes without invoking the
|
|
104
|
+
* encryption factory again. The producer still owns its durable cursor and
|
|
105
|
+
* must advance it before acknowledging a terminal result. This is not a
|
|
106
|
+
* substitute for that cursor, nor an inner-attested orchestration writer.
|
|
107
|
+
*/
|
|
108
|
+
prepareSourceCreate(source: DesktopSyncSourceIdentity, prepare: (operationId: string) => Promise<CreateDesktopSyncEventInput>, signal?: AbortSignal): Promise<string>;
|
|
109
|
+
/** Encrypted cursor + owned-operation linkage in the same bounded account store. */
|
|
110
|
+
sourceStream(value: DesktopSyncSourceStream): DesktopSyncSourceJournal;
|
|
111
|
+
/** Fixed two-output source; both durable lanes must admit before reader advancement. */
|
|
112
|
+
sourcePair(value: DesktopSyncSourceStream): DesktopSyncSourcePair;
|
|
113
|
+
/** Shell events have no native transcript. Their already-signed encrypted
|
|
114
|
+
* source is admitted durably before entering the shared operation journal.
|
|
115
|
+
* No network loop/timer is created here; the session owner drives recovery.
|
|
116
|
+
*/
|
|
117
|
+
shellSource(): ShellSyncSource;
|
|
118
|
+
shellSources(): Promise<ShellSyncSourceInventory[]>;
|
|
119
|
+
/** One encrypted intent/credential record per original desktop incarnation.
|
|
120
|
+
* This uses the account journal's existing 256-file / 32-MiB total bound. */
|
|
121
|
+
desktopRegistration(register: (attempt: DesktopSyncRegistrationAttempt, signal?: AbortSignal) => Promise<DesktopSyncReadCredential>, now?: () => number): DesktopSyncRegistrationStore;
|
|
122
|
+
/** Exact local retirement only after the owner has joined read/registration
|
|
123
|
+
* requests and obtained canonical INACTIVE authority. No hosted mutation. */
|
|
124
|
+
removeDesktopRegistration(): Promise<boolean>;
|
|
125
|
+
/** Provider queues share the existing encrypted/account-fenced capacity.
|
|
126
|
+
* Native identity and generation are immutable: no automatic re-homing. */
|
|
127
|
+
deferredInputs(provider: DesktopSyncSourceIdentity['provider'], nativeSessionSha256: string): DesktopDeferredInputStore;
|
|
128
|
+
mobileEchoes(provider: DesktopSyncSourceIdentity['provider']): DesktopMobileEchoJournal;
|
|
129
|
+
promptPublication(promptId: string): PromptPublicationJournal;
|
|
130
|
+
/** Persist exact ownership before recovery/control I/O. The per-intent lock
|
|
131
|
+
* serializes original callers and restarted owners without holding the
|
|
132
|
+
* account store lock across network awaits. Only an exact ACK permits removal.
|
|
133
|
+
* Admission closure/PAUSED does not authorize dropping pending control work. */
|
|
134
|
+
runPromptResolution(value: ResolveDesktopSyncPromptInput, resolve: (input: ResolveDesktopSyncPromptInput, fence: () => Promise<void>) => Promise<boolean>, options?: {
|
|
135
|
+
existingOnly?: boolean;
|
|
136
|
+
}): Promise<boolean>;
|
|
137
|
+
/** Account-fenced, encrypted ownership inventory. Contains secret owner tokens;
|
|
138
|
+
* only the recovery caller may use it, never logs or cloud-visible metadata.
|
|
139
|
+
* A bound writer filters core generations; plugin tokens are SID-bound. */
|
|
140
|
+
promptResolutions(): Promise<readonly ResolveDesktopSyncPromptInput[]>;
|
|
141
|
+
private matchesPromptResolutionScope;
|
|
142
|
+
/** Bounded metadata inventory for producer recovery and rollback fences.
|
|
143
|
+
* Never expose retained ciphertext or owner tokens to a caller. */
|
|
144
|
+
promptPublications(): Promise<Array<DesktopSyncSessionScope & {
|
|
145
|
+
promptId: string;
|
|
146
|
+
state: 'STAGED' | 'SETTLED';
|
|
147
|
+
}>>;
|
|
148
|
+
promptRetention(): PromptRetentionJournal;
|
|
149
|
+
/** Canonical INACTIVE proof and joined publication owners are prerequisites.
|
|
150
|
+
* Validate the complete exact-incarnation target set before deleting anything;
|
|
151
|
+
* uncertain publications remain recoverable and prevent terminal cleanup. */
|
|
152
|
+
removeSettledPromptPublications(): Promise<number>;
|
|
153
|
+
/** Canonical terminal proof and joined source/input owners are prerequisites. */
|
|
154
|
+
removeMobileEchoes(): Promise<number>;
|
|
155
|
+
/** Only after canonical INACTIVE proof and joined provider input owners.
|
|
156
|
+
* Remove payload for this exact incarnation, never another generation. */
|
|
157
|
+
removeDeferredInputs(): Promise<number>;
|
|
158
|
+
/** One small encrypted row for unresolved inbound inputs. Completed cloud
|
|
159
|
+
* acknowledgements remove entries; it is not a lifetime transcript. */
|
|
160
|
+
inbound(): DesktopInboundJournal;
|
|
161
|
+
/** Caller must join subscription/provider dispatch and prove canonical
|
|
162
|
+
* INACTIVE first; no closed generation may execute these inputs again. */
|
|
163
|
+
removeInbound(): Promise<boolean>;
|
|
164
|
+
/** Exact empty-source GC only after the owner has joined all its emitters
|
|
165
|
+
* and received canonical terminal-session proof. Pending payload or receipts
|
|
166
|
+
* are never discarded here. Admission/drain locks serialize the empty check
|
|
167
|
+
* and unlink against every other instance using this account directory. */
|
|
168
|
+
removeEmptyShellSource(): Promise<boolean>;
|
|
169
|
+
/** Bounded account-wide discovery. Only terminal owners create these records;
|
|
170
|
+
* merely missing/old source files or a new session ID never create an intent. */
|
|
171
|
+
sessionRetirements(): Promise<readonly SessionRetirementRecord[]>;
|
|
172
|
+
hasSessionRetirementWork(expectedSessionKeyGen: string): Promise<boolean>;
|
|
173
|
+
/** Durable stop/join intent -> confirmed source cleanup -> control ACKs ->
|
|
174
|
+
* intent removal. Network I/O never holds the account-store lock. */
|
|
175
|
+
runSessionRetirement<T>(input: ConfirmDesktopSyncRetirementInput, toolOutbox: ToolSyncRetirementLocation | null, cleanup: (record: SessionRetirementRecord, fence: () => Promise<void>) => Promise<T>, options?: {
|
|
176
|
+
existingOnly?: boolean;
|
|
177
|
+
}): Promise<T | null>;
|
|
178
|
+
/** Terminal GC, not delivery settlement. The session owner MUST first stop
|
|
179
|
+
* admission and join its native readers, shell emitters and prompt producers.
|
|
180
|
+
* Only a fresh, exact permanent-retirement ACK authorizes removing these
|
|
181
|
+
* sources, including ambiguous writes. No Event outcome is invented.
|
|
182
|
+
*
|
|
183
|
+
* Only operations linked from a validated source are collected. Standalone
|
|
184
|
+
* operations (including the tool-activity outbox), control intents, other
|
|
185
|
+
* generations and other accounts remain owned by their respective lifecycles.
|
|
186
|
+
* Source records are removed LAST: an interrupted unlink can be retried by
|
|
187
|
+
* a new owner using the remaining source links and a new cloud confirmation.
|
|
188
|
+
*/
|
|
189
|
+
removeRetiredSources(expectedSessionKeyGen: string, confirm: (input: ConfirmDesktopSyncRetirementInput) => Promise<SyncSessionRetirementReceipt>): Promise<{
|
|
190
|
+
sourcesRemoved: number;
|
|
191
|
+
operationsRemoved: number;
|
|
192
|
+
}>;
|
|
193
|
+
/** Outbox-owned tool GC. The caller holds its quiescent source ownership and
|
|
194
|
+
* supplies the exact deterministic window IDs. Persist replay suppression
|
|
195
|
+
* before unlink; release every send lock before pruning the source links. */
|
|
196
|
+
removeRetiredToolOperations(values: readonly string[], expectedSessionKeyGen: string, confirm: (input: ConfirmDesktopSyncRetirementInput) => Promise<SyncSessionRetirementReceipt>, sources: {
|
|
197
|
+
markRetired(): Promise<void>;
|
|
198
|
+
prune(): Promise<void>;
|
|
199
|
+
}): Promise<number>;
|
|
200
|
+
private retiredSourcePlan;
|
|
201
|
+
private readShellSource;
|
|
202
|
+
private sourceOperationId;
|
|
203
|
+
private matchesScope;
|
|
204
|
+
private requireScope;
|
|
205
|
+
private prepare;
|
|
206
|
+
/** Retry stored immutable bytes, never re-encrypt/reconstruct from a transcript. */
|
|
207
|
+
retry(value: string, signal?: AbortSignal): Promise<DurableSyncResult>;
|
|
208
|
+
/** Bounded recovery inventory, containing no customer payload. Never sends. */
|
|
209
|
+
pending(): Promise<Array<{
|
|
210
|
+
operationId: string;
|
|
211
|
+
createdAt: number;
|
|
212
|
+
state: RecordRow['state'];
|
|
213
|
+
}>>;
|
|
214
|
+
/** Bounded, account-fenced inventory for recovery in the ORIGINAL generation.
|
|
215
|
+
* Contains coordinates only, never native text or pending ciphertext. Loading
|
|
216
|
+
* validates every cursor before any caller starts a recovery mutation.
|
|
217
|
+
*/
|
|
218
|
+
sourceStreams(): Promise<DesktopSyncSourceInventory[]>;
|
|
219
|
+
private readSourceCursor;
|
|
220
|
+
/** Only after the producer's own cursor/result is durable. Never discards pending work. */
|
|
221
|
+
acknowledge(value: string): Promise<void>;
|
|
222
|
+
private file;
|
|
223
|
+
private lock;
|
|
224
|
+
private withStore;
|
|
225
|
+
private seal;
|
|
226
|
+
private required;
|
|
227
|
+
private read;
|
|
228
|
+
private readValue;
|
|
229
|
+
private validateRecord;
|
|
230
|
+
private write;
|
|
231
|
+
private recordNames;
|
|
232
|
+
private checkCapacity;
|
|
233
|
+
private ensureDirectory;
|
|
234
|
+
private syncDirectory;
|
|
235
|
+
}
|
|
236
|
+
export {};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type CreateDesktopSyncEventInput } from './sync-event-client';
|
|
3
|
+
import type { DesktopSyncSessionScope, DurableSyncResult } from './sync-operation-journal';
|
|
4
|
+
declare const schema: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
|
|
5
|
+
state: z.ZodLiteral<"STAGED">;
|
|
6
|
+
input: z.ZodUnknown;
|
|
7
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
8
|
+
kind: z.ZodLiteral<"PROMPT_PUBLICATION">;
|
|
9
|
+
operationId: z.ZodString;
|
|
10
|
+
sessionId: z.ZodString;
|
|
11
|
+
sessionGenerationId: z.ZodString;
|
|
12
|
+
promptId: z.ZodString;
|
|
13
|
+
sourceSha256: z.ZodString;
|
|
14
|
+
eventType: z.ZodEnum<["INTERACTIVE_PROMPT", "NOTIFICATION"]>;
|
|
15
|
+
writeId: z.ZodString;
|
|
16
|
+
reRaiseToken: z.ZodNullable<z.ZodString>;
|
|
17
|
+
}, "strict", z.ZodTypeAny, {
|
|
18
|
+
kind: "PROMPT_PUBLICATION";
|
|
19
|
+
sessionId: string;
|
|
20
|
+
sessionGenerationId: string;
|
|
21
|
+
promptId: string;
|
|
22
|
+
schemaVersion: 1;
|
|
23
|
+
state: "STAGED";
|
|
24
|
+
sourceSha256: string;
|
|
25
|
+
operationId: string;
|
|
26
|
+
reRaiseToken: string | null;
|
|
27
|
+
eventType: "NOTIFICATION" | "INTERACTIVE_PROMPT";
|
|
28
|
+
writeId: string;
|
|
29
|
+
input?: unknown;
|
|
30
|
+
}, {
|
|
31
|
+
kind: "PROMPT_PUBLICATION";
|
|
32
|
+
sessionId: string;
|
|
33
|
+
sessionGenerationId: string;
|
|
34
|
+
promptId: string;
|
|
35
|
+
schemaVersion: 1;
|
|
36
|
+
state: "STAGED";
|
|
37
|
+
sourceSha256: string;
|
|
38
|
+
operationId: string;
|
|
39
|
+
reRaiseToken: string | null;
|
|
40
|
+
eventType: "NOTIFICATION" | "INTERACTIVE_PROMPT";
|
|
41
|
+
writeId: string;
|
|
42
|
+
input?: unknown;
|
|
43
|
+
}>, z.ZodObject<{
|
|
44
|
+
state: z.ZodLiteral<"SETTLED">;
|
|
45
|
+
result: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
46
|
+
status: z.ZodLiteral<"ACCEPTED">;
|
|
47
|
+
receipt: z.ZodUnknown;
|
|
48
|
+
}, "strict", z.ZodTypeAny, {
|
|
49
|
+
status: "ACCEPTED";
|
|
50
|
+
receipt?: unknown;
|
|
51
|
+
}, {
|
|
52
|
+
status: "ACCEPTED";
|
|
53
|
+
receipt?: unknown;
|
|
54
|
+
}>, z.ZodObject<{
|
|
55
|
+
status: z.ZodLiteral<"OMITTED">;
|
|
56
|
+
reason: z.ZodLiteral<"SYNC_QUOTA_EXHAUSTED">;
|
|
57
|
+
}, "strict", z.ZodTypeAny, {
|
|
58
|
+
reason: "SYNC_QUOTA_EXHAUSTED";
|
|
59
|
+
status: "OMITTED";
|
|
60
|
+
}, {
|
|
61
|
+
reason: "SYNC_QUOTA_EXHAUSTED";
|
|
62
|
+
status: "OMITTED";
|
|
63
|
+
}>]>;
|
|
64
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
65
|
+
kind: z.ZodLiteral<"PROMPT_PUBLICATION">;
|
|
66
|
+
operationId: z.ZodString;
|
|
67
|
+
sessionId: z.ZodString;
|
|
68
|
+
sessionGenerationId: z.ZodString;
|
|
69
|
+
promptId: z.ZodString;
|
|
70
|
+
sourceSha256: z.ZodString;
|
|
71
|
+
eventType: z.ZodEnum<["INTERACTIVE_PROMPT", "NOTIFICATION"]>;
|
|
72
|
+
writeId: z.ZodString;
|
|
73
|
+
reRaiseToken: z.ZodNullable<z.ZodString>;
|
|
74
|
+
}, "strict", z.ZodTypeAny, {
|
|
75
|
+
kind: "PROMPT_PUBLICATION";
|
|
76
|
+
sessionId: string;
|
|
77
|
+
sessionGenerationId: string;
|
|
78
|
+
promptId: string;
|
|
79
|
+
schemaVersion: 1;
|
|
80
|
+
state: "SETTLED";
|
|
81
|
+
result: {
|
|
82
|
+
status: "ACCEPTED";
|
|
83
|
+
receipt?: unknown;
|
|
84
|
+
} | {
|
|
85
|
+
reason: "SYNC_QUOTA_EXHAUSTED";
|
|
86
|
+
status: "OMITTED";
|
|
87
|
+
};
|
|
88
|
+
sourceSha256: string;
|
|
89
|
+
operationId: string;
|
|
90
|
+
reRaiseToken: string | null;
|
|
91
|
+
eventType: "NOTIFICATION" | "INTERACTIVE_PROMPT";
|
|
92
|
+
writeId: string;
|
|
93
|
+
}, {
|
|
94
|
+
kind: "PROMPT_PUBLICATION";
|
|
95
|
+
sessionId: string;
|
|
96
|
+
sessionGenerationId: string;
|
|
97
|
+
promptId: string;
|
|
98
|
+
schemaVersion: 1;
|
|
99
|
+
state: "SETTLED";
|
|
100
|
+
result: {
|
|
101
|
+
status: "ACCEPTED";
|
|
102
|
+
receipt?: unknown;
|
|
103
|
+
} | {
|
|
104
|
+
reason: "SYNC_QUOTA_EXHAUSTED";
|
|
105
|
+
status: "OMITTED";
|
|
106
|
+
};
|
|
107
|
+
sourceSha256: string;
|
|
108
|
+
operationId: string;
|
|
109
|
+
reRaiseToken: string | null;
|
|
110
|
+
eventType: "NOTIFICATION" | "INTERACTIVE_PROMPT";
|
|
111
|
+
writeId: string;
|
|
112
|
+
}>]>;
|
|
113
|
+
export type PromptPublicationRecord = z.infer<typeof schema>;
|
|
114
|
+
export interface PromptPublicationJournal {
|
|
115
|
+
/** Hash the immutable plaintext occurrence, excluding retry timestamps.
|
|
116
|
+
* A reRaiseToken is supplied only from one durably recorded canonical absence.
|
|
117
|
+
* Repeated callbacks reuse it; a later absence obtains a different token. */
|
|
118
|
+
publish(sourceSha256: string, prepare: (operationId: string) => Promise<CreateDesktopSyncEventInput>, options?: {
|
|
119
|
+
reRaiseToken?: string;
|
|
120
|
+
signal?: AbortSignal;
|
|
121
|
+
}): Promise<DurableSyncResult>;
|
|
122
|
+
/** Settle only an already-persisted episode, without a factory, current
|
|
123
|
+
* session key, or new-admission permission. Never creates a new occurrence. */
|
|
124
|
+
settle(signal?: AbortSignal): Promise<DurableSyncResult | null>;
|
|
125
|
+
/** Caller has joined this prompt's publications and confirmed local closure.
|
|
126
|
+
* An uncertain operation is never discarded by this cleanup method. */
|
|
127
|
+
close(): Promise<boolean>;
|
|
128
|
+
}
|
|
129
|
+
export declare function decodePromptPublication(value: unknown, invalid: () => never): PromptPublicationRecord;
|
|
130
|
+
/** One encrypted source per live prompt. A STAGED input is durable before the
|
|
131
|
+
* operation can send; retry never invokes the encryption factory again.
|
|
132
|
+
* Settlement strips payload BEFORE acknowledging/removing the generic outbox.
|
|
133
|
+
* A quota omission is terminal for that plaintext occurrence, including TTL
|
|
134
|
+
* recovery after reset. It is not represented as a successful cloud Event.
|
|
135
|
+
*/
|
|
136
|
+
export declare function createPromptPublicationJournal(store: {
|
|
137
|
+
id: string;
|
|
138
|
+
scope: Readonly<DesktopSyncSessionScope>;
|
|
139
|
+
promptId: string;
|
|
140
|
+
assertAdmission(): void;
|
|
141
|
+
assertOpen(): Promise<void>;
|
|
142
|
+
invalid(): never;
|
|
143
|
+
collision(): never;
|
|
144
|
+
pending(): never;
|
|
145
|
+
locked<T>(fn: (fence: () => Promise<void>) => Promise<T>): Promise<T>;
|
|
146
|
+
read(): Promise<PromptPublicationRecord | null>;
|
|
147
|
+
write(row: PromptPublicationRecord): Promise<void>;
|
|
148
|
+
remove(): Promise<void>;
|
|
149
|
+
prepare(input: CreateDesktopSyncEventInput): Promise<string>;
|
|
150
|
+
retry(id: string, signal?: AbortSignal): Promise<DurableSyncResult>;
|
|
151
|
+
acknowledge(id: string): Promise<void>;
|
|
152
|
+
}): PromptPublicationJournal;
|
|
153
|
+
export {};
|