@takboo/dsh-session-bin 0.0.0-stage → 0.1.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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +122 -2
  3. package/cordis.patch.yml +4 -0
  4. package/dist/client-model.js +1673 -0
  5. package/dist/client.js +17043 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/host/archive.d.ts +766 -0
  8. package/dist/host/lease.d.ts +4 -0
  9. package/dist/host/module.d.ts +705 -0
  10. package/dist/host/native-jsonl-files.d.ts +198 -0
  11. package/dist/host/native-retirement-admission.d.ts +33 -0
  12. package/dist/host/native-retirement-metadata.d.ts +116 -0
  13. package/dist/host/native-retirement-owner.d.ts +305 -0
  14. package/dist/host/native-retirement-persistence.d.ts +24 -0
  15. package/dist/host/native-retirement-sdk.d.ts +80 -0
  16. package/dist/host/native.d.ts +12 -0
  17. package/dist/host/platform-files.d.ts +19 -0
  18. package/dist/host/remote.d.ts +32 -0
  19. package/dist/host/retirement-owner-store.d.ts +124 -0
  20. package/dist/host/retirement-owner.d.ts +124 -0
  21. package/dist/host/retirement-store.d.ts +311 -0
  22. package/dist/host/retirement.d.ts +76 -0
  23. package/dist/host/store.d.ts +215 -0
  24. package/dist/index.d.ts +912 -0
  25. package/dist/index.js +5008 -0
  26. package/dist/index.js.map +7 -0
  27. package/dist/operations/archive.d.ts +82 -0
  28. package/dist/operations/index.d.ts +2 -0
  29. package/dist/operations/retirement-owner.d.ts +129 -0
  30. package/dist/operations/retirement.d.ts +821 -0
  31. package/dist/operations/schema.d.ts +115 -0
  32. package/dist/operations.js +130 -0
  33. package/dist/operations.js.map +7 -0
  34. package/dist/remote/contracts.d.ts +891 -0
  35. package/dist/remote.js +442 -0
  36. package/dist/remote.js.map +7 -0
  37. package/dist/types/client/components.d.ts +17 -0
  38. package/dist/types/client/index.d.ts +10 -0
  39. package/dist/types/client/locales.d.ts +116 -0
  40. package/dist/types/client/model.d.ts +137 -0
  41. package/dist/types/client/purge-batch.d.ts +45 -0
  42. package/dist/types/client/retirement-digest.d.ts +3 -0
  43. package/dist/types/operations/archive.d.ts +82 -0
  44. package/dist/types/operations/retirement.d.ts +821 -0
  45. package/dist/types/operations/schema.d.ts +115 -0
  46. package/dist/types/remote/contracts.d.ts +891 -0
  47. package/docs/client-interface.md +79 -0
  48. package/docs/host-lifecycle.md +160 -0
  49. package/locale/en.json +6 -0
  50. package/locale/zh.json +6 -0
  51. package/package.json +163 -4
@@ -0,0 +1,766 @@
1
+ import type { ArchiveEntry, ArchiveOperation, ArchivePlan, ArchivePrepareRequest, ArchiveResult } from '../operations/archive.js';
2
+ import type { ArchiveStore } from './store.js';
3
+ import type { NativeSessionState } from './module.js';
4
+ import type { RetirementOptions, PurgeReconcileReport } from './retirement.js';
5
+ import type { PreparePurgeRequest, PurgePlan } from '../operations/retirement.js';
6
+ export interface NativeArchivePort {
7
+ archivedSessionIds(): readonly string[];
8
+ inspect(sessionId: string): Promise<NativeSessionState>;
9
+ activity?(sessionId: string): Promise<string[]>;
10
+ unarchive(sessionId: string): Promise<void>;
11
+ }
12
+ export interface ArchiveOptions {
13
+ retirement?: RetirementOptions;
14
+ operationIdClaimed?: (operationId: string) => boolean;
15
+ pendingPurge?: (sessionId: string) => boolean;
16
+ reconcileLegacy?: () => Promise<unknown>;
17
+ reconcileLegacyPurge?: () => Promise<PurgeReconcileReport>;
18
+ }
19
+ /** Native archive membership, with durable observation identities, never deletion grants. */
20
+ export declare class ArchiveModule {
21
+ private readonly store;
22
+ private readonly native;
23
+ private readonly options;
24
+ private tail;
25
+ private closing;
26
+ private failed;
27
+ private failure;
28
+ private closePromise;
29
+ private readonly invalidated;
30
+ private readonly rearchived;
31
+ private readonly identities;
32
+ private readonly purge;
33
+ constructor(store: ArchiveStore, native: NativeArchivePort, options?: ArchiveOptions);
34
+ prepare(request: ArchivePrepareRequest): Promise<ArchivePlan>;
35
+ execute(input: ArchivePlan): Promise<ArchiveResult>;
36
+ preparePurge(request: PreparePurgeRequest): Promise<{
37
+ schemaVersion: 1 | 2;
38
+ action: "purge";
39
+ operationId: string;
40
+ sessionId: string;
41
+ expectedEntryId: string | null;
42
+ binding: {
43
+ schemaVersion: 1;
44
+ entryId: string;
45
+ entryVersion: 1;
46
+ lifecycle: {
47
+ storeId: string;
48
+ sessionId: string;
49
+ lifecycleId: string;
50
+ };
51
+ capabilities: {
52
+ protocolVersion: 1;
53
+ ownerId: string;
54
+ hostVersion: string;
55
+ providerId: string;
56
+ storeId: string;
57
+ participants: {
58
+ id: string;
59
+ version: string;
60
+ }[];
61
+ };
62
+ } | {
63
+ schemaVersion: 2;
64
+ target: "native-archive";
65
+ entryId: string;
66
+ entryVersion: 2;
67
+ lifecycle: {
68
+ storeId: string;
69
+ sessionId: string;
70
+ lifecycleId: string;
71
+ };
72
+ capabilities: {
73
+ protocolVersion: 1;
74
+ ownerId: string;
75
+ hostVersion: string;
76
+ providerId: string;
77
+ storeId: string;
78
+ participants: {
79
+ id: string;
80
+ version: string;
81
+ }[];
82
+ };
83
+ } | null;
84
+ manifest: {
85
+ schemaVersion: 1;
86
+ lifecycle: {
87
+ storeId: string;
88
+ sessionId: string;
89
+ lifecycleId: string;
90
+ };
91
+ capabilities: {
92
+ protocolVersion: 1;
93
+ ownerId: string;
94
+ hostVersion: string;
95
+ providerId: string;
96
+ storeId: string;
97
+ participants: {
98
+ id: string;
99
+ version: string;
100
+ }[];
101
+ };
102
+ resources: {
103
+ ownerId: string;
104
+ resourceId: string;
105
+ revision: string;
106
+ kind: "transcript" | "workspace" | "index" | "cache" | "attachment" | "spill" | "coordination";
107
+ disposition: "erase" | "release-reference" | "retain-shared" | "retain-coordination";
108
+ retention: {
109
+ reason: "shared-reference" | "coordination-identity";
110
+ retainedBy: {
111
+ storeId: string;
112
+ sessionId: string;
113
+ lifecycleId: string;
114
+ }[];
115
+ } | null;
116
+ }[];
117
+ } | null;
118
+ blockers: {
119
+ code: string;
120
+ activity?: string[] | undefined;
121
+ }[];
122
+ }>;
123
+ executePurge(input: PurgePlan): Promise<{
124
+ action: "purge";
125
+ operationId: string;
126
+ sessionId: string;
127
+ entryId: string | null;
128
+ status: "success" | "rejected" | "conflict" | "pending-recovery" | "partial-failure";
129
+ reason: string | null;
130
+ ownerState: {
131
+ schemaVersion: 1;
132
+ request: {
133
+ operationId: string;
134
+ expected: {
135
+ storeId: string;
136
+ sessionId: string;
137
+ lifecycleId: string;
138
+ };
139
+ bin: {
140
+ entryId: string;
141
+ entryVersion: 1;
142
+ } | {
143
+ kind: "native-archive";
144
+ entryId: string;
145
+ entryVersion: 2;
146
+ };
147
+ manifestDigest: string;
148
+ };
149
+ manifest: {
150
+ schemaVersion: 1;
151
+ lifecycle: {
152
+ storeId: string;
153
+ sessionId: string;
154
+ lifecycleId: string;
155
+ };
156
+ capabilities: {
157
+ protocolVersion: 1;
158
+ ownerId: string;
159
+ hostVersion: string;
160
+ providerId: string;
161
+ storeId: string;
162
+ participants: {
163
+ id: string;
164
+ version: string;
165
+ }[];
166
+ };
167
+ resources: {
168
+ ownerId: string;
169
+ resourceId: string;
170
+ revision: string;
171
+ kind: "transcript" | "workspace" | "index" | "cache" | "attachment" | "spill" | "coordination";
172
+ disposition: "erase" | "release-reference" | "retain-shared" | "retain-coordination";
173
+ retention: {
174
+ reason: "shared-reference" | "coordination-identity";
175
+ retainedBy: {
176
+ storeId: string;
177
+ sessionId: string;
178
+ lifecycleId: string;
179
+ }[];
180
+ } | null;
181
+ }[];
182
+ };
183
+ authorizationId: string | null;
184
+ phase: "rejected" | "conflict" | "done" | "fenced" | "quiesced" | "erasing" | "converging";
185
+ reason: string | null;
186
+ resources: {
187
+ ownerId: string;
188
+ resourceId: string;
189
+ status: "erased" | "reference-released" | "retained" | "failed";
190
+ reason: string | null;
191
+ }[];
192
+ } | null;
193
+ }>;
194
+ getPurgeOperation(id: string): Promise<{
195
+ schemaVersion: 1 | 2;
196
+ plan: {
197
+ schemaVersion: 1 | 2;
198
+ action: "purge";
199
+ operationId: string;
200
+ sessionId: string;
201
+ expectedEntryId: string | null;
202
+ binding: {
203
+ schemaVersion: 1;
204
+ entryId: string;
205
+ entryVersion: 1;
206
+ lifecycle: {
207
+ storeId: string;
208
+ sessionId: string;
209
+ lifecycleId: string;
210
+ };
211
+ capabilities: {
212
+ protocolVersion: 1;
213
+ ownerId: string;
214
+ hostVersion: string;
215
+ providerId: string;
216
+ storeId: string;
217
+ participants: {
218
+ id: string;
219
+ version: string;
220
+ }[];
221
+ };
222
+ } | {
223
+ schemaVersion: 2;
224
+ target: "native-archive";
225
+ entryId: string;
226
+ entryVersion: 2;
227
+ lifecycle: {
228
+ storeId: string;
229
+ sessionId: string;
230
+ lifecycleId: string;
231
+ };
232
+ capabilities: {
233
+ protocolVersion: 1;
234
+ ownerId: string;
235
+ hostVersion: string;
236
+ providerId: string;
237
+ storeId: string;
238
+ participants: {
239
+ id: string;
240
+ version: string;
241
+ }[];
242
+ };
243
+ } | null;
244
+ manifest: {
245
+ schemaVersion: 1;
246
+ lifecycle: {
247
+ storeId: string;
248
+ sessionId: string;
249
+ lifecycleId: string;
250
+ };
251
+ capabilities: {
252
+ protocolVersion: 1;
253
+ ownerId: string;
254
+ hostVersion: string;
255
+ providerId: string;
256
+ storeId: string;
257
+ participants: {
258
+ id: string;
259
+ version: string;
260
+ }[];
261
+ };
262
+ resources: {
263
+ ownerId: string;
264
+ resourceId: string;
265
+ revision: string;
266
+ kind: "transcript" | "workspace" | "index" | "cache" | "attachment" | "spill" | "coordination";
267
+ disposition: "erase" | "release-reference" | "retain-shared" | "retain-coordination";
268
+ retention: {
269
+ reason: "shared-reference" | "coordination-identity";
270
+ retainedBy: {
271
+ storeId: string;
272
+ sessionId: string;
273
+ lifecycleId: string;
274
+ }[];
275
+ } | null;
276
+ }[];
277
+ } | null;
278
+ blockers: {
279
+ code: string;
280
+ activity?: string[] | undefined;
281
+ }[];
282
+ };
283
+ createdAt: string;
284
+ phase: "intent" | "done" | "authorizing" | "owner-pending";
285
+ entry: {
286
+ schemaVersion: 1;
287
+ sessionId: string;
288
+ entryId: string;
289
+ operationId: string;
290
+ binnedAt: string;
291
+ workspaceIdAtBin: string | null;
292
+ wasArchived: boolean;
293
+ } | {
294
+ schemaVersion: 2;
295
+ sessionId: string;
296
+ entryId: string;
297
+ } | null;
298
+ authorizationId: string | null;
299
+ ownerState: {
300
+ schemaVersion: 1;
301
+ request: {
302
+ operationId: string;
303
+ expected: {
304
+ storeId: string;
305
+ sessionId: string;
306
+ lifecycleId: string;
307
+ };
308
+ bin: {
309
+ entryId: string;
310
+ entryVersion: 1;
311
+ } | {
312
+ kind: "native-archive";
313
+ entryId: string;
314
+ entryVersion: 2;
315
+ };
316
+ manifestDigest: string;
317
+ };
318
+ manifest: {
319
+ schemaVersion: 1;
320
+ lifecycle: {
321
+ storeId: string;
322
+ sessionId: string;
323
+ lifecycleId: string;
324
+ };
325
+ capabilities: {
326
+ protocolVersion: 1;
327
+ ownerId: string;
328
+ hostVersion: string;
329
+ providerId: string;
330
+ storeId: string;
331
+ participants: {
332
+ id: string;
333
+ version: string;
334
+ }[];
335
+ };
336
+ resources: {
337
+ ownerId: string;
338
+ resourceId: string;
339
+ revision: string;
340
+ kind: "transcript" | "workspace" | "index" | "cache" | "attachment" | "spill" | "coordination";
341
+ disposition: "erase" | "release-reference" | "retain-shared" | "retain-coordination";
342
+ retention: {
343
+ reason: "shared-reference" | "coordination-identity";
344
+ retainedBy: {
345
+ storeId: string;
346
+ sessionId: string;
347
+ lifecycleId: string;
348
+ }[];
349
+ } | null;
350
+ }[];
351
+ };
352
+ authorizationId: string | null;
353
+ phase: "rejected" | "conflict" | "done" | "fenced" | "quiesced" | "erasing" | "converging";
354
+ reason: string | null;
355
+ resources: {
356
+ ownerId: string;
357
+ resourceId: string;
358
+ status: "erased" | "reference-released" | "retained" | "failed";
359
+ reason: string | null;
360
+ }[];
361
+ } | null;
362
+ result: {
363
+ action: "purge";
364
+ operationId: string;
365
+ sessionId: string;
366
+ entryId: string | null;
367
+ status: "success" | "rejected" | "conflict" | "pending-recovery" | "partial-failure";
368
+ reason: string | null;
369
+ ownerState: {
370
+ schemaVersion: 1;
371
+ request: {
372
+ operationId: string;
373
+ expected: {
374
+ storeId: string;
375
+ sessionId: string;
376
+ lifecycleId: string;
377
+ };
378
+ bin: {
379
+ entryId: string;
380
+ entryVersion: 1;
381
+ } | {
382
+ kind: "native-archive";
383
+ entryId: string;
384
+ entryVersion: 2;
385
+ };
386
+ manifestDigest: string;
387
+ };
388
+ manifest: {
389
+ schemaVersion: 1;
390
+ lifecycle: {
391
+ storeId: string;
392
+ sessionId: string;
393
+ lifecycleId: string;
394
+ };
395
+ capabilities: {
396
+ protocolVersion: 1;
397
+ ownerId: string;
398
+ hostVersion: string;
399
+ providerId: string;
400
+ storeId: string;
401
+ participants: {
402
+ id: string;
403
+ version: string;
404
+ }[];
405
+ };
406
+ resources: {
407
+ ownerId: string;
408
+ resourceId: string;
409
+ revision: string;
410
+ kind: "transcript" | "workspace" | "index" | "cache" | "attachment" | "spill" | "coordination";
411
+ disposition: "erase" | "release-reference" | "retain-shared" | "retain-coordination";
412
+ retention: {
413
+ reason: "shared-reference" | "coordination-identity";
414
+ retainedBy: {
415
+ storeId: string;
416
+ sessionId: string;
417
+ lifecycleId: string;
418
+ }[];
419
+ } | null;
420
+ }[];
421
+ };
422
+ authorizationId: string | null;
423
+ phase: "rejected" | "conflict" | "done" | "fenced" | "quiesced" | "erasing" | "converging";
424
+ reason: string | null;
425
+ resources: {
426
+ ownerId: string;
427
+ resourceId: string;
428
+ status: "erased" | "reference-released" | "retained" | "failed";
429
+ reason: string | null;
430
+ }[];
431
+ } | null;
432
+ } | null;
433
+ } | undefined>;
434
+ purgeOperations(): Promise<{
435
+ schemaVersion: 1 | 2;
436
+ plan: {
437
+ schemaVersion: 1 | 2;
438
+ action: "purge";
439
+ operationId: string;
440
+ sessionId: string;
441
+ expectedEntryId: string | null;
442
+ binding: {
443
+ schemaVersion: 1;
444
+ entryId: string;
445
+ entryVersion: 1;
446
+ lifecycle: {
447
+ storeId: string;
448
+ sessionId: string;
449
+ lifecycleId: string;
450
+ };
451
+ capabilities: {
452
+ protocolVersion: 1;
453
+ ownerId: string;
454
+ hostVersion: string;
455
+ providerId: string;
456
+ storeId: string;
457
+ participants: {
458
+ id: string;
459
+ version: string;
460
+ }[];
461
+ };
462
+ } | {
463
+ schemaVersion: 2;
464
+ target: "native-archive";
465
+ entryId: string;
466
+ entryVersion: 2;
467
+ lifecycle: {
468
+ storeId: string;
469
+ sessionId: string;
470
+ lifecycleId: string;
471
+ };
472
+ capabilities: {
473
+ protocolVersion: 1;
474
+ ownerId: string;
475
+ hostVersion: string;
476
+ providerId: string;
477
+ storeId: string;
478
+ participants: {
479
+ id: string;
480
+ version: string;
481
+ }[];
482
+ };
483
+ } | null;
484
+ manifest: {
485
+ schemaVersion: 1;
486
+ lifecycle: {
487
+ storeId: string;
488
+ sessionId: string;
489
+ lifecycleId: string;
490
+ };
491
+ capabilities: {
492
+ protocolVersion: 1;
493
+ ownerId: string;
494
+ hostVersion: string;
495
+ providerId: string;
496
+ storeId: string;
497
+ participants: {
498
+ id: string;
499
+ version: string;
500
+ }[];
501
+ };
502
+ resources: {
503
+ ownerId: string;
504
+ resourceId: string;
505
+ revision: string;
506
+ kind: "transcript" | "workspace" | "index" | "cache" | "attachment" | "spill" | "coordination";
507
+ disposition: "erase" | "release-reference" | "retain-shared" | "retain-coordination";
508
+ retention: {
509
+ reason: "shared-reference" | "coordination-identity";
510
+ retainedBy: {
511
+ storeId: string;
512
+ sessionId: string;
513
+ lifecycleId: string;
514
+ }[];
515
+ } | null;
516
+ }[];
517
+ } | null;
518
+ blockers: {
519
+ code: string;
520
+ activity?: string[] | undefined;
521
+ }[];
522
+ };
523
+ createdAt: string;
524
+ phase: "intent" | "done" | "authorizing" | "owner-pending";
525
+ entry: {
526
+ schemaVersion: 1;
527
+ sessionId: string;
528
+ entryId: string;
529
+ operationId: string;
530
+ binnedAt: string;
531
+ workspaceIdAtBin: string | null;
532
+ wasArchived: boolean;
533
+ } | {
534
+ schemaVersion: 2;
535
+ sessionId: string;
536
+ entryId: string;
537
+ } | null;
538
+ authorizationId: string | null;
539
+ ownerState: {
540
+ schemaVersion: 1;
541
+ request: {
542
+ operationId: string;
543
+ expected: {
544
+ storeId: string;
545
+ sessionId: string;
546
+ lifecycleId: string;
547
+ };
548
+ bin: {
549
+ entryId: string;
550
+ entryVersion: 1;
551
+ } | {
552
+ kind: "native-archive";
553
+ entryId: string;
554
+ entryVersion: 2;
555
+ };
556
+ manifestDigest: string;
557
+ };
558
+ manifest: {
559
+ schemaVersion: 1;
560
+ lifecycle: {
561
+ storeId: string;
562
+ sessionId: string;
563
+ lifecycleId: string;
564
+ };
565
+ capabilities: {
566
+ protocolVersion: 1;
567
+ ownerId: string;
568
+ hostVersion: string;
569
+ providerId: string;
570
+ storeId: string;
571
+ participants: {
572
+ id: string;
573
+ version: string;
574
+ }[];
575
+ };
576
+ resources: {
577
+ ownerId: string;
578
+ resourceId: string;
579
+ revision: string;
580
+ kind: "transcript" | "workspace" | "index" | "cache" | "attachment" | "spill" | "coordination";
581
+ disposition: "erase" | "release-reference" | "retain-shared" | "retain-coordination";
582
+ retention: {
583
+ reason: "shared-reference" | "coordination-identity";
584
+ retainedBy: {
585
+ storeId: string;
586
+ sessionId: string;
587
+ lifecycleId: string;
588
+ }[];
589
+ } | null;
590
+ }[];
591
+ };
592
+ authorizationId: string | null;
593
+ phase: "rejected" | "conflict" | "done" | "fenced" | "quiesced" | "erasing" | "converging";
594
+ reason: string | null;
595
+ resources: {
596
+ ownerId: string;
597
+ resourceId: string;
598
+ status: "erased" | "reference-released" | "retained" | "failed";
599
+ reason: string | null;
600
+ }[];
601
+ } | null;
602
+ result: {
603
+ action: "purge";
604
+ operationId: string;
605
+ sessionId: string;
606
+ entryId: string | null;
607
+ status: "success" | "rejected" | "conflict" | "pending-recovery" | "partial-failure";
608
+ reason: string | null;
609
+ ownerState: {
610
+ schemaVersion: 1;
611
+ request: {
612
+ operationId: string;
613
+ expected: {
614
+ storeId: string;
615
+ sessionId: string;
616
+ lifecycleId: string;
617
+ };
618
+ bin: {
619
+ entryId: string;
620
+ entryVersion: 1;
621
+ } | {
622
+ kind: "native-archive";
623
+ entryId: string;
624
+ entryVersion: 2;
625
+ };
626
+ manifestDigest: string;
627
+ };
628
+ manifest: {
629
+ schemaVersion: 1;
630
+ lifecycle: {
631
+ storeId: string;
632
+ sessionId: string;
633
+ lifecycleId: string;
634
+ };
635
+ capabilities: {
636
+ protocolVersion: 1;
637
+ ownerId: string;
638
+ hostVersion: string;
639
+ providerId: string;
640
+ storeId: string;
641
+ participants: {
642
+ id: string;
643
+ version: string;
644
+ }[];
645
+ };
646
+ resources: {
647
+ ownerId: string;
648
+ resourceId: string;
649
+ revision: string;
650
+ kind: "transcript" | "workspace" | "index" | "cache" | "attachment" | "spill" | "coordination";
651
+ disposition: "erase" | "release-reference" | "retain-shared" | "retain-coordination";
652
+ retention: {
653
+ reason: "shared-reference" | "coordination-identity";
654
+ retainedBy: {
655
+ storeId: string;
656
+ sessionId: string;
657
+ lifecycleId: string;
658
+ }[];
659
+ } | null;
660
+ }[];
661
+ };
662
+ authorizationId: string | null;
663
+ phase: "rejected" | "conflict" | "done" | "fenced" | "quiesced" | "erasing" | "converging";
664
+ reason: string | null;
665
+ resources: {
666
+ ownerId: string;
667
+ resourceId: string;
668
+ status: "erased" | "reference-released" | "retained" | "failed";
669
+ reason: string | null;
670
+ }[];
671
+ } | null;
672
+ } | null;
673
+ }[]>;
674
+ reconcilePurge(): Promise<{
675
+ completed: {
676
+ action: "purge";
677
+ operationId: string;
678
+ sessionId: string;
679
+ entryId: string | null;
680
+ status: "success" | "rejected" | "conflict" | "pending-recovery" | "partial-failure";
681
+ reason: string | null;
682
+ ownerState: {
683
+ schemaVersion: 1;
684
+ request: {
685
+ operationId: string;
686
+ expected: {
687
+ storeId: string;
688
+ sessionId: string;
689
+ lifecycleId: string;
690
+ };
691
+ bin: {
692
+ entryId: string;
693
+ entryVersion: 1;
694
+ } | {
695
+ kind: "native-archive";
696
+ entryId: string;
697
+ entryVersion: 2;
698
+ };
699
+ manifestDigest: string;
700
+ };
701
+ manifest: {
702
+ schemaVersion: 1;
703
+ lifecycle: {
704
+ storeId: string;
705
+ sessionId: string;
706
+ lifecycleId: string;
707
+ };
708
+ capabilities: {
709
+ protocolVersion: 1;
710
+ ownerId: string;
711
+ hostVersion: string;
712
+ providerId: string;
713
+ storeId: string;
714
+ participants: {
715
+ id: string;
716
+ version: string;
717
+ }[];
718
+ };
719
+ resources: {
720
+ ownerId: string;
721
+ resourceId: string;
722
+ revision: string;
723
+ kind: "transcript" | "workspace" | "index" | "cache" | "attachment" | "spill" | "coordination";
724
+ disposition: "erase" | "release-reference" | "retain-shared" | "retain-coordination";
725
+ retention: {
726
+ reason: "shared-reference" | "coordination-identity";
727
+ retainedBy: {
728
+ storeId: string;
729
+ sessionId: string;
730
+ lifecycleId: string;
731
+ }[];
732
+ } | null;
733
+ }[];
734
+ };
735
+ authorizationId: string | null;
736
+ phase: "rejected" | "conflict" | "done" | "fenced" | "quiesced" | "erasing" | "converging";
737
+ reason: string | null;
738
+ resources: {
739
+ ownerId: string;
740
+ resourceId: string;
741
+ status: "erased" | "reference-released" | "retained" | "failed";
742
+ reason: string | null;
743
+ }[];
744
+ } | null;
745
+ }[];
746
+ pending: string[];
747
+ }>;
748
+ private requirePurge;
749
+ compatibility<T>(work: () => Promise<T>): Promise<T>;
750
+ list(): Promise<ArchiveEntry[]>;
751
+ getOperation(operationId: string): Promise<ArchiveOperation | undefined>;
752
+ operations(): Promise<ArchiveOperation[]>;
753
+ reconcile(): Promise<void>;
754
+ observeArchives(ids: readonly string[]): Promise<void>;
755
+ close(): Promise<void>;
756
+ private checkClaim;
757
+ private sameRequest;
758
+ private stale;
759
+ private blockers;
760
+ private finish;
761
+ private finalize;
762
+ private reconcileInner;
763
+ private syncEntries;
764
+ private unavailable;
765
+ private enqueue;
766
+ }