@takboo/dsh-session-bin 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +109 -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 +4921 -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 +158 -0
  49. package/locale/en.json +6 -0
  50. package/locale/zh.json +6 -0
  51. package/package.json +163 -4
@@ -0,0 +1,891 @@
1
+ import { z } from 'zod';
2
+ import type { RemoteResult, RemoteStreamHandle, TypertRemoteContribution } from '@deepseek-ai/dsh-typert-protocol';
3
+ import type { TypertContribution } from '@deepseek-ai/dsh-typert-registry';
4
+ import type { BinOperation } from '../operations/schema.js';
5
+ import type { ArchiveEntry, ArchiveOperation, ArchivePlan, ArchivePrepareRequest, ArchiveResult } from '../operations/archive.js';
6
+ import type { PreparePurgeRequest, PurgePlan, PurgeResult, PurgeOperation } from '../operations/retirement.js';
7
+ export declare const sessionBinRemoteNamespace = "sessionBin";
8
+ export declare const sessionBinRemoteServiceKey = "sessionBinRemote";
9
+ export declare const snapshotSchema: z.ZodObject<{
10
+ schemaVersion: z.ZodLiteral<2>;
11
+ entries: z.ZodArray<z.ZodObject<{
12
+ schemaVersion: z.ZodLiteral<2>;
13
+ sessionId: z.ZodString;
14
+ entryId: z.ZodUUID;
15
+ }, z.core.$strict>>;
16
+ }, z.core.$strict>;
17
+ export type BinSnapshot = z.infer<typeof snapshotSchema>;
18
+ export type ArchiveSnapshot = BinSnapshot;
19
+ export declare const operationIdSchema: z.ZodString;
20
+ export declare const entriesSchema: z.ZodArray<z.ZodObject<{
21
+ schemaVersion: z.ZodLiteral<2>;
22
+ sessionId: z.ZodString;
23
+ entryId: z.ZodUUID;
24
+ }, z.core.$strict>>;
25
+ export declare const optionalOperationSchema: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
26
+ schemaVersion: z.ZodLiteral<2>;
27
+ plan: z.ZodObject<{
28
+ schemaVersion: z.ZodLiteral<2>;
29
+ operationId: z.ZodString;
30
+ action: z.ZodLiteral<"unarchive">;
31
+ sessionId: z.ZodString;
32
+ expected: z.ZodObject<{
33
+ archived: z.ZodBoolean;
34
+ entryId: z.ZodNullable<z.ZodUUID>;
35
+ }, z.core.$strict>;
36
+ blockers: z.ZodArray<z.ZodObject<{
37
+ code: z.ZodString;
38
+ activity: z.ZodOptional<z.ZodArray<z.ZodString>>;
39
+ }, z.core.$strict>>;
40
+ }, z.core.$strict>;
41
+ createdAt: z.ZodISODateTime;
42
+ phase: z.ZodEnum<{
43
+ intent: "intent";
44
+ applied: "applied";
45
+ done: "done";
46
+ }>;
47
+ entry: z.ZodNullable<z.ZodObject<{
48
+ schemaVersion: z.ZodLiteral<2>;
49
+ sessionId: z.ZodString;
50
+ entryId: z.ZodUUID;
51
+ }, z.core.$strict>>;
52
+ result: z.ZodNullable<z.ZodObject<{
53
+ operationId: z.ZodString;
54
+ action: z.ZodLiteral<"unarchive">;
55
+ sessionId: z.ZodString;
56
+ status: z.ZodEnum<{
57
+ success: "success";
58
+ rejected: "rejected";
59
+ conflict: "conflict";
60
+ }>;
61
+ reason: z.ZodNullable<z.ZodString>;
62
+ entryId: z.ZodNullable<z.ZodUUID>;
63
+ }, z.core.$strict>>;
64
+ }, z.core.$strict>, z.ZodObject<{
65
+ schemaVersion: z.ZodLiteral<1>;
66
+ plan: z.ZodObject<{
67
+ schemaVersion: z.ZodLiteral<1>;
68
+ operationId: z.ZodString;
69
+ action: z.ZodEnum<{
70
+ bin: "bin";
71
+ restore: "restore";
72
+ }>;
73
+ sessionId: z.ZodString;
74
+ expected: z.ZodObject<{
75
+ archived: z.ZodBoolean;
76
+ entryId: z.ZodNullable<z.ZodUUID>;
77
+ }, z.core.$strict>;
78
+ blockers: z.ZodArray<z.ZodObject<{
79
+ code: z.ZodString;
80
+ activity: z.ZodOptional<z.ZodArray<z.ZodString>>;
81
+ }, z.core.$strict>>;
82
+ }, z.core.$strict>;
83
+ createdAt: z.ZodISODateTime;
84
+ phase: z.ZodEnum<{
85
+ intent: "intent";
86
+ applied: "applied";
87
+ done: "done";
88
+ }>;
89
+ ownershipInvalidated: z.ZodBoolean;
90
+ entry: z.ZodNullable<z.ZodObject<{
91
+ schemaVersion: z.ZodLiteral<1>;
92
+ sessionId: z.ZodString;
93
+ entryId: z.ZodUUID;
94
+ operationId: z.ZodString;
95
+ binnedAt: z.ZodISODateTime;
96
+ workspaceIdAtBin: z.ZodNullable<z.ZodString>;
97
+ wasArchived: z.ZodBoolean;
98
+ }, z.core.$strict>>;
99
+ result: z.ZodNullable<z.ZodObject<{
100
+ operationId: z.ZodString;
101
+ action: z.ZodEnum<{
102
+ bin: "bin";
103
+ restore: "restore";
104
+ }>;
105
+ sessionId: z.ZodString;
106
+ status: z.ZodEnum<{
107
+ success: "success";
108
+ rejected: "rejected";
109
+ conflict: "conflict";
110
+ }>;
111
+ reason: z.ZodNullable<z.ZodString>;
112
+ entryId: z.ZodNullable<z.ZodUUID>;
113
+ }, z.core.$strict>>;
114
+ }, z.core.$strict>]>>;
115
+ export declare const nativePurgePlanSchema: z.ZodObject<{
116
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
117
+ action: z.ZodLiteral<"purge">;
118
+ operationId: z.ZodString;
119
+ sessionId: z.ZodString;
120
+ expectedEntryId: z.ZodNullable<z.ZodUUID>;
121
+ binding: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
122
+ schemaVersion: z.ZodLiteral<1>;
123
+ entryId: z.ZodUUID;
124
+ entryVersion: z.ZodLiteral<1>;
125
+ lifecycle: z.ZodObject<{
126
+ storeId: z.ZodString;
127
+ sessionId: z.ZodString;
128
+ lifecycleId: z.ZodString;
129
+ }, z.core.$strict>;
130
+ capabilities: z.ZodObject<{
131
+ protocolVersion: z.ZodLiteral<1>;
132
+ ownerId: z.ZodString;
133
+ hostVersion: z.ZodString;
134
+ providerId: z.ZodString;
135
+ storeId: z.ZodString;
136
+ participants: z.ZodArray<z.ZodObject<{
137
+ id: z.ZodString;
138
+ version: z.ZodString;
139
+ }, z.core.$strict>>;
140
+ }, z.core.$strict>;
141
+ }, z.core.$strict>, z.ZodObject<{
142
+ schemaVersion: z.ZodLiteral<2>;
143
+ target: z.ZodLiteral<"native-archive">;
144
+ entryId: z.ZodUUID;
145
+ entryVersion: z.ZodLiteral<2>;
146
+ lifecycle: z.ZodObject<{
147
+ storeId: z.ZodString;
148
+ sessionId: z.ZodString;
149
+ lifecycleId: z.ZodString;
150
+ }, z.core.$strict>;
151
+ capabilities: z.ZodObject<{
152
+ protocolVersion: z.ZodLiteral<1>;
153
+ ownerId: z.ZodString;
154
+ hostVersion: z.ZodString;
155
+ providerId: z.ZodString;
156
+ storeId: z.ZodString;
157
+ participants: z.ZodArray<z.ZodObject<{
158
+ id: z.ZodString;
159
+ version: z.ZodString;
160
+ }, z.core.$strict>>;
161
+ }, z.core.$strict>;
162
+ }, z.core.$strict>]>>;
163
+ manifest: z.ZodNullable<z.ZodObject<{
164
+ schemaVersion: z.ZodLiteral<1>;
165
+ lifecycle: z.ZodObject<{
166
+ storeId: z.ZodString;
167
+ sessionId: z.ZodString;
168
+ lifecycleId: z.ZodString;
169
+ }, z.core.$strict>;
170
+ capabilities: z.ZodObject<{
171
+ protocolVersion: z.ZodLiteral<1>;
172
+ ownerId: z.ZodString;
173
+ hostVersion: z.ZodString;
174
+ providerId: z.ZodString;
175
+ storeId: z.ZodString;
176
+ participants: z.ZodArray<z.ZodObject<{
177
+ id: z.ZodString;
178
+ version: z.ZodString;
179
+ }, z.core.$strict>>;
180
+ }, z.core.$strict>;
181
+ resources: z.ZodArray<z.ZodObject<{
182
+ ownerId: z.ZodString;
183
+ resourceId: z.ZodString;
184
+ revision: z.ZodString;
185
+ kind: z.ZodEnum<{
186
+ transcript: "transcript";
187
+ workspace: "workspace";
188
+ index: "index";
189
+ cache: "cache";
190
+ attachment: "attachment";
191
+ spill: "spill";
192
+ coordination: "coordination";
193
+ }>;
194
+ disposition: z.ZodEnum<{
195
+ erase: "erase";
196
+ "release-reference": "release-reference";
197
+ "retain-shared": "retain-shared";
198
+ "retain-coordination": "retain-coordination";
199
+ }>;
200
+ retention: z.ZodNullable<z.ZodObject<{
201
+ reason: z.ZodEnum<{
202
+ "shared-reference": "shared-reference";
203
+ "coordination-identity": "coordination-identity";
204
+ }>;
205
+ retainedBy: z.ZodArray<z.ZodObject<{
206
+ storeId: z.ZodString;
207
+ sessionId: z.ZodString;
208
+ lifecycleId: z.ZodString;
209
+ }, z.core.$strict>>;
210
+ }, z.core.$strict>>;
211
+ }, z.core.$strict>>;
212
+ }, z.core.$strict>>;
213
+ blockers: z.ZodArray<z.ZodObject<{
214
+ code: z.ZodString;
215
+ activity: z.ZodOptional<z.ZodArray<z.ZodString>>;
216
+ }, z.core.$strict>>;
217
+ }, z.core.$strict>;
218
+ export declare const optionalPurgeOperationSchema: z.ZodNullable<z.ZodObject<{
219
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
220
+ plan: z.ZodObject<{
221
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
222
+ action: z.ZodLiteral<"purge">;
223
+ operationId: z.ZodString;
224
+ sessionId: z.ZodString;
225
+ expectedEntryId: z.ZodNullable<z.ZodUUID>;
226
+ binding: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
227
+ schemaVersion: z.ZodLiteral<1>;
228
+ entryId: z.ZodUUID;
229
+ entryVersion: z.ZodLiteral<1>;
230
+ lifecycle: z.ZodObject<{
231
+ storeId: z.ZodString;
232
+ sessionId: z.ZodString;
233
+ lifecycleId: z.ZodString;
234
+ }, z.core.$strict>;
235
+ capabilities: z.ZodObject<{
236
+ protocolVersion: z.ZodLiteral<1>;
237
+ ownerId: z.ZodString;
238
+ hostVersion: z.ZodString;
239
+ providerId: z.ZodString;
240
+ storeId: z.ZodString;
241
+ participants: z.ZodArray<z.ZodObject<{
242
+ id: z.ZodString;
243
+ version: z.ZodString;
244
+ }, z.core.$strict>>;
245
+ }, z.core.$strict>;
246
+ }, z.core.$strict>, z.ZodObject<{
247
+ schemaVersion: z.ZodLiteral<2>;
248
+ target: z.ZodLiteral<"native-archive">;
249
+ entryId: z.ZodUUID;
250
+ entryVersion: z.ZodLiteral<2>;
251
+ lifecycle: z.ZodObject<{
252
+ storeId: z.ZodString;
253
+ sessionId: z.ZodString;
254
+ lifecycleId: z.ZodString;
255
+ }, z.core.$strict>;
256
+ capabilities: z.ZodObject<{
257
+ protocolVersion: z.ZodLiteral<1>;
258
+ ownerId: z.ZodString;
259
+ hostVersion: z.ZodString;
260
+ providerId: z.ZodString;
261
+ storeId: z.ZodString;
262
+ participants: z.ZodArray<z.ZodObject<{
263
+ id: z.ZodString;
264
+ version: z.ZodString;
265
+ }, z.core.$strict>>;
266
+ }, z.core.$strict>;
267
+ }, z.core.$strict>]>>;
268
+ manifest: z.ZodNullable<z.ZodObject<{
269
+ schemaVersion: z.ZodLiteral<1>;
270
+ lifecycle: z.ZodObject<{
271
+ storeId: z.ZodString;
272
+ sessionId: z.ZodString;
273
+ lifecycleId: z.ZodString;
274
+ }, z.core.$strict>;
275
+ capabilities: z.ZodObject<{
276
+ protocolVersion: z.ZodLiteral<1>;
277
+ ownerId: z.ZodString;
278
+ hostVersion: z.ZodString;
279
+ providerId: z.ZodString;
280
+ storeId: z.ZodString;
281
+ participants: z.ZodArray<z.ZodObject<{
282
+ id: z.ZodString;
283
+ version: z.ZodString;
284
+ }, z.core.$strict>>;
285
+ }, z.core.$strict>;
286
+ resources: z.ZodArray<z.ZodObject<{
287
+ ownerId: z.ZodString;
288
+ resourceId: z.ZodString;
289
+ revision: z.ZodString;
290
+ kind: z.ZodEnum<{
291
+ transcript: "transcript";
292
+ workspace: "workspace";
293
+ index: "index";
294
+ cache: "cache";
295
+ attachment: "attachment";
296
+ spill: "spill";
297
+ coordination: "coordination";
298
+ }>;
299
+ disposition: z.ZodEnum<{
300
+ erase: "erase";
301
+ "release-reference": "release-reference";
302
+ "retain-shared": "retain-shared";
303
+ "retain-coordination": "retain-coordination";
304
+ }>;
305
+ retention: z.ZodNullable<z.ZodObject<{
306
+ reason: z.ZodEnum<{
307
+ "shared-reference": "shared-reference";
308
+ "coordination-identity": "coordination-identity";
309
+ }>;
310
+ retainedBy: z.ZodArray<z.ZodObject<{
311
+ storeId: z.ZodString;
312
+ sessionId: z.ZodString;
313
+ lifecycleId: z.ZodString;
314
+ }, z.core.$strict>>;
315
+ }, z.core.$strict>>;
316
+ }, z.core.$strict>>;
317
+ }, z.core.$strict>>;
318
+ blockers: z.ZodArray<z.ZodObject<{
319
+ code: z.ZodString;
320
+ activity: z.ZodOptional<z.ZodArray<z.ZodString>>;
321
+ }, z.core.$strict>>;
322
+ }, z.core.$strict>;
323
+ createdAt: z.ZodISODateTime;
324
+ phase: z.ZodEnum<{
325
+ intent: "intent";
326
+ done: "done";
327
+ authorizing: "authorizing";
328
+ "owner-pending": "owner-pending";
329
+ }>;
330
+ entry: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
331
+ schemaVersion: z.ZodLiteral<1>;
332
+ sessionId: z.ZodString;
333
+ entryId: z.ZodUUID;
334
+ operationId: z.ZodString;
335
+ binnedAt: z.ZodISODateTime;
336
+ workspaceIdAtBin: z.ZodNullable<z.ZodString>;
337
+ wasArchived: z.ZodBoolean;
338
+ }, z.core.$strict>, z.ZodObject<{
339
+ schemaVersion: z.ZodLiteral<2>;
340
+ sessionId: z.ZodString;
341
+ entryId: z.ZodUUID;
342
+ }, z.core.$strict>]>>;
343
+ authorizationId: z.ZodNullable<z.ZodUUID>;
344
+ ownerState: z.ZodNullable<z.ZodObject<{
345
+ schemaVersion: z.ZodLiteral<1>;
346
+ request: z.ZodObject<{
347
+ operationId: z.ZodString;
348
+ expected: z.ZodObject<{
349
+ storeId: z.ZodString;
350
+ sessionId: z.ZodString;
351
+ lifecycleId: z.ZodString;
352
+ }, z.core.$strict>;
353
+ bin: z.ZodUnion<readonly [z.ZodObject<{
354
+ entryId: z.ZodUUID;
355
+ entryVersion: z.ZodLiteral<1>;
356
+ }, z.core.$strict>, z.ZodObject<{
357
+ kind: z.ZodLiteral<"native-archive">;
358
+ entryId: z.ZodUUID;
359
+ entryVersion: z.ZodLiteral<2>;
360
+ }, z.core.$strict>]>;
361
+ manifestDigest: z.ZodString;
362
+ }, z.core.$strict>;
363
+ manifest: z.ZodObject<{
364
+ schemaVersion: z.ZodLiteral<1>;
365
+ lifecycle: z.ZodObject<{
366
+ storeId: z.ZodString;
367
+ sessionId: z.ZodString;
368
+ lifecycleId: z.ZodString;
369
+ }, z.core.$strict>;
370
+ capabilities: z.ZodObject<{
371
+ protocolVersion: z.ZodLiteral<1>;
372
+ ownerId: z.ZodString;
373
+ hostVersion: z.ZodString;
374
+ providerId: z.ZodString;
375
+ storeId: z.ZodString;
376
+ participants: z.ZodArray<z.ZodObject<{
377
+ id: z.ZodString;
378
+ version: z.ZodString;
379
+ }, z.core.$strict>>;
380
+ }, z.core.$strict>;
381
+ resources: z.ZodArray<z.ZodObject<{
382
+ ownerId: z.ZodString;
383
+ resourceId: z.ZodString;
384
+ revision: z.ZodString;
385
+ kind: z.ZodEnum<{
386
+ transcript: "transcript";
387
+ workspace: "workspace";
388
+ index: "index";
389
+ cache: "cache";
390
+ attachment: "attachment";
391
+ spill: "spill";
392
+ coordination: "coordination";
393
+ }>;
394
+ disposition: z.ZodEnum<{
395
+ erase: "erase";
396
+ "release-reference": "release-reference";
397
+ "retain-shared": "retain-shared";
398
+ "retain-coordination": "retain-coordination";
399
+ }>;
400
+ retention: z.ZodNullable<z.ZodObject<{
401
+ reason: z.ZodEnum<{
402
+ "shared-reference": "shared-reference";
403
+ "coordination-identity": "coordination-identity";
404
+ }>;
405
+ retainedBy: z.ZodArray<z.ZodObject<{
406
+ storeId: z.ZodString;
407
+ sessionId: z.ZodString;
408
+ lifecycleId: z.ZodString;
409
+ }, z.core.$strict>>;
410
+ }, z.core.$strict>>;
411
+ }, z.core.$strict>>;
412
+ }, z.core.$strict>;
413
+ authorizationId: z.ZodNullable<z.ZodUUID>;
414
+ phase: z.ZodEnum<{
415
+ rejected: "rejected";
416
+ conflict: "conflict";
417
+ done: "done";
418
+ fenced: "fenced";
419
+ quiesced: "quiesced";
420
+ erasing: "erasing";
421
+ converging: "converging";
422
+ }>;
423
+ reason: z.ZodNullable<z.ZodString>;
424
+ resources: z.ZodArray<z.ZodObject<{
425
+ ownerId: z.ZodString;
426
+ resourceId: z.ZodString;
427
+ status: z.ZodEnum<{
428
+ erased: "erased";
429
+ "reference-released": "reference-released";
430
+ retained: "retained";
431
+ failed: "failed";
432
+ }>;
433
+ reason: z.ZodNullable<z.ZodString>;
434
+ }, z.core.$strict>>;
435
+ }, z.core.$strict>>;
436
+ result: z.ZodNullable<z.ZodObject<{
437
+ action: z.ZodLiteral<"purge">;
438
+ operationId: z.ZodString;
439
+ sessionId: z.ZodString;
440
+ entryId: z.ZodNullable<z.ZodUUID>;
441
+ status: z.ZodEnum<{
442
+ success: "success";
443
+ rejected: "rejected";
444
+ conflict: "conflict";
445
+ "pending-recovery": "pending-recovery";
446
+ "partial-failure": "partial-failure";
447
+ }>;
448
+ reason: z.ZodNullable<z.ZodString>;
449
+ ownerState: z.ZodNullable<z.ZodObject<{
450
+ schemaVersion: z.ZodLiteral<1>;
451
+ request: z.ZodObject<{
452
+ operationId: z.ZodString;
453
+ expected: z.ZodObject<{
454
+ storeId: z.ZodString;
455
+ sessionId: z.ZodString;
456
+ lifecycleId: z.ZodString;
457
+ }, z.core.$strict>;
458
+ bin: z.ZodUnion<readonly [z.ZodObject<{
459
+ entryId: z.ZodUUID;
460
+ entryVersion: z.ZodLiteral<1>;
461
+ }, z.core.$strict>, z.ZodObject<{
462
+ kind: z.ZodLiteral<"native-archive">;
463
+ entryId: z.ZodUUID;
464
+ entryVersion: z.ZodLiteral<2>;
465
+ }, z.core.$strict>]>;
466
+ manifestDigest: z.ZodString;
467
+ }, z.core.$strict>;
468
+ manifest: z.ZodObject<{
469
+ schemaVersion: z.ZodLiteral<1>;
470
+ lifecycle: z.ZodObject<{
471
+ storeId: z.ZodString;
472
+ sessionId: z.ZodString;
473
+ lifecycleId: z.ZodString;
474
+ }, z.core.$strict>;
475
+ capabilities: z.ZodObject<{
476
+ protocolVersion: z.ZodLiteral<1>;
477
+ ownerId: z.ZodString;
478
+ hostVersion: z.ZodString;
479
+ providerId: z.ZodString;
480
+ storeId: z.ZodString;
481
+ participants: z.ZodArray<z.ZodObject<{
482
+ id: z.ZodString;
483
+ version: z.ZodString;
484
+ }, z.core.$strict>>;
485
+ }, z.core.$strict>;
486
+ resources: z.ZodArray<z.ZodObject<{
487
+ ownerId: z.ZodString;
488
+ resourceId: z.ZodString;
489
+ revision: z.ZodString;
490
+ kind: z.ZodEnum<{
491
+ transcript: "transcript";
492
+ workspace: "workspace";
493
+ index: "index";
494
+ cache: "cache";
495
+ attachment: "attachment";
496
+ spill: "spill";
497
+ coordination: "coordination";
498
+ }>;
499
+ disposition: z.ZodEnum<{
500
+ erase: "erase";
501
+ "release-reference": "release-reference";
502
+ "retain-shared": "retain-shared";
503
+ "retain-coordination": "retain-coordination";
504
+ }>;
505
+ retention: z.ZodNullable<z.ZodObject<{
506
+ reason: z.ZodEnum<{
507
+ "shared-reference": "shared-reference";
508
+ "coordination-identity": "coordination-identity";
509
+ }>;
510
+ retainedBy: z.ZodArray<z.ZodObject<{
511
+ storeId: z.ZodString;
512
+ sessionId: z.ZodString;
513
+ lifecycleId: z.ZodString;
514
+ }, z.core.$strict>>;
515
+ }, z.core.$strict>>;
516
+ }, z.core.$strict>>;
517
+ }, z.core.$strict>;
518
+ authorizationId: z.ZodNullable<z.ZodUUID>;
519
+ phase: z.ZodEnum<{
520
+ rejected: "rejected";
521
+ conflict: "conflict";
522
+ done: "done";
523
+ fenced: "fenced";
524
+ quiesced: "quiesced";
525
+ erasing: "erasing";
526
+ converging: "converging";
527
+ }>;
528
+ reason: z.ZodNullable<z.ZodString>;
529
+ resources: z.ZodArray<z.ZodObject<{
530
+ ownerId: z.ZodString;
531
+ resourceId: z.ZodString;
532
+ status: z.ZodEnum<{
533
+ erased: "erased";
534
+ "reference-released": "reference-released";
535
+ retained: "retained";
536
+ failed: "failed";
537
+ }>;
538
+ reason: z.ZodNullable<z.ZodString>;
539
+ }, z.core.$strict>>;
540
+ }, z.core.$strict>>;
541
+ }, z.core.$strict>>;
542
+ }, z.core.$strict>>;
543
+ export declare const purgeOperationsSchema: z.ZodArray<z.ZodObject<{
544
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
545
+ plan: z.ZodObject<{
546
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
547
+ action: z.ZodLiteral<"purge">;
548
+ operationId: z.ZodString;
549
+ sessionId: z.ZodString;
550
+ expectedEntryId: z.ZodNullable<z.ZodUUID>;
551
+ binding: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
552
+ schemaVersion: z.ZodLiteral<1>;
553
+ entryId: z.ZodUUID;
554
+ entryVersion: z.ZodLiteral<1>;
555
+ lifecycle: z.ZodObject<{
556
+ storeId: z.ZodString;
557
+ sessionId: z.ZodString;
558
+ lifecycleId: z.ZodString;
559
+ }, z.core.$strict>;
560
+ capabilities: z.ZodObject<{
561
+ protocolVersion: z.ZodLiteral<1>;
562
+ ownerId: z.ZodString;
563
+ hostVersion: z.ZodString;
564
+ providerId: z.ZodString;
565
+ storeId: z.ZodString;
566
+ participants: z.ZodArray<z.ZodObject<{
567
+ id: z.ZodString;
568
+ version: z.ZodString;
569
+ }, z.core.$strict>>;
570
+ }, z.core.$strict>;
571
+ }, z.core.$strict>, z.ZodObject<{
572
+ schemaVersion: z.ZodLiteral<2>;
573
+ target: z.ZodLiteral<"native-archive">;
574
+ entryId: z.ZodUUID;
575
+ entryVersion: z.ZodLiteral<2>;
576
+ lifecycle: z.ZodObject<{
577
+ storeId: z.ZodString;
578
+ sessionId: z.ZodString;
579
+ lifecycleId: z.ZodString;
580
+ }, z.core.$strict>;
581
+ capabilities: z.ZodObject<{
582
+ protocolVersion: z.ZodLiteral<1>;
583
+ ownerId: z.ZodString;
584
+ hostVersion: z.ZodString;
585
+ providerId: z.ZodString;
586
+ storeId: z.ZodString;
587
+ participants: z.ZodArray<z.ZodObject<{
588
+ id: z.ZodString;
589
+ version: z.ZodString;
590
+ }, z.core.$strict>>;
591
+ }, z.core.$strict>;
592
+ }, z.core.$strict>]>>;
593
+ manifest: z.ZodNullable<z.ZodObject<{
594
+ schemaVersion: z.ZodLiteral<1>;
595
+ lifecycle: z.ZodObject<{
596
+ storeId: z.ZodString;
597
+ sessionId: z.ZodString;
598
+ lifecycleId: z.ZodString;
599
+ }, z.core.$strict>;
600
+ capabilities: z.ZodObject<{
601
+ protocolVersion: z.ZodLiteral<1>;
602
+ ownerId: z.ZodString;
603
+ hostVersion: z.ZodString;
604
+ providerId: z.ZodString;
605
+ storeId: z.ZodString;
606
+ participants: z.ZodArray<z.ZodObject<{
607
+ id: z.ZodString;
608
+ version: z.ZodString;
609
+ }, z.core.$strict>>;
610
+ }, z.core.$strict>;
611
+ resources: z.ZodArray<z.ZodObject<{
612
+ ownerId: z.ZodString;
613
+ resourceId: z.ZodString;
614
+ revision: z.ZodString;
615
+ kind: z.ZodEnum<{
616
+ transcript: "transcript";
617
+ workspace: "workspace";
618
+ index: "index";
619
+ cache: "cache";
620
+ attachment: "attachment";
621
+ spill: "spill";
622
+ coordination: "coordination";
623
+ }>;
624
+ disposition: z.ZodEnum<{
625
+ erase: "erase";
626
+ "release-reference": "release-reference";
627
+ "retain-shared": "retain-shared";
628
+ "retain-coordination": "retain-coordination";
629
+ }>;
630
+ retention: z.ZodNullable<z.ZodObject<{
631
+ reason: z.ZodEnum<{
632
+ "shared-reference": "shared-reference";
633
+ "coordination-identity": "coordination-identity";
634
+ }>;
635
+ retainedBy: z.ZodArray<z.ZodObject<{
636
+ storeId: z.ZodString;
637
+ sessionId: z.ZodString;
638
+ lifecycleId: z.ZodString;
639
+ }, z.core.$strict>>;
640
+ }, z.core.$strict>>;
641
+ }, z.core.$strict>>;
642
+ }, z.core.$strict>>;
643
+ blockers: z.ZodArray<z.ZodObject<{
644
+ code: z.ZodString;
645
+ activity: z.ZodOptional<z.ZodArray<z.ZodString>>;
646
+ }, z.core.$strict>>;
647
+ }, z.core.$strict>;
648
+ createdAt: z.ZodISODateTime;
649
+ phase: z.ZodEnum<{
650
+ intent: "intent";
651
+ done: "done";
652
+ authorizing: "authorizing";
653
+ "owner-pending": "owner-pending";
654
+ }>;
655
+ entry: z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
656
+ schemaVersion: z.ZodLiteral<1>;
657
+ sessionId: z.ZodString;
658
+ entryId: z.ZodUUID;
659
+ operationId: z.ZodString;
660
+ binnedAt: z.ZodISODateTime;
661
+ workspaceIdAtBin: z.ZodNullable<z.ZodString>;
662
+ wasArchived: z.ZodBoolean;
663
+ }, z.core.$strict>, z.ZodObject<{
664
+ schemaVersion: z.ZodLiteral<2>;
665
+ sessionId: z.ZodString;
666
+ entryId: z.ZodUUID;
667
+ }, z.core.$strict>]>>;
668
+ authorizationId: z.ZodNullable<z.ZodUUID>;
669
+ ownerState: z.ZodNullable<z.ZodObject<{
670
+ schemaVersion: z.ZodLiteral<1>;
671
+ request: z.ZodObject<{
672
+ operationId: z.ZodString;
673
+ expected: z.ZodObject<{
674
+ storeId: z.ZodString;
675
+ sessionId: z.ZodString;
676
+ lifecycleId: z.ZodString;
677
+ }, z.core.$strict>;
678
+ bin: z.ZodUnion<readonly [z.ZodObject<{
679
+ entryId: z.ZodUUID;
680
+ entryVersion: z.ZodLiteral<1>;
681
+ }, z.core.$strict>, z.ZodObject<{
682
+ kind: z.ZodLiteral<"native-archive">;
683
+ entryId: z.ZodUUID;
684
+ entryVersion: z.ZodLiteral<2>;
685
+ }, z.core.$strict>]>;
686
+ manifestDigest: z.ZodString;
687
+ }, z.core.$strict>;
688
+ manifest: z.ZodObject<{
689
+ schemaVersion: z.ZodLiteral<1>;
690
+ lifecycle: z.ZodObject<{
691
+ storeId: z.ZodString;
692
+ sessionId: z.ZodString;
693
+ lifecycleId: z.ZodString;
694
+ }, z.core.$strict>;
695
+ capabilities: z.ZodObject<{
696
+ protocolVersion: z.ZodLiteral<1>;
697
+ ownerId: z.ZodString;
698
+ hostVersion: z.ZodString;
699
+ providerId: z.ZodString;
700
+ storeId: z.ZodString;
701
+ participants: z.ZodArray<z.ZodObject<{
702
+ id: z.ZodString;
703
+ version: z.ZodString;
704
+ }, z.core.$strict>>;
705
+ }, z.core.$strict>;
706
+ resources: z.ZodArray<z.ZodObject<{
707
+ ownerId: z.ZodString;
708
+ resourceId: z.ZodString;
709
+ revision: z.ZodString;
710
+ kind: z.ZodEnum<{
711
+ transcript: "transcript";
712
+ workspace: "workspace";
713
+ index: "index";
714
+ cache: "cache";
715
+ attachment: "attachment";
716
+ spill: "spill";
717
+ coordination: "coordination";
718
+ }>;
719
+ disposition: z.ZodEnum<{
720
+ erase: "erase";
721
+ "release-reference": "release-reference";
722
+ "retain-shared": "retain-shared";
723
+ "retain-coordination": "retain-coordination";
724
+ }>;
725
+ retention: z.ZodNullable<z.ZodObject<{
726
+ reason: z.ZodEnum<{
727
+ "shared-reference": "shared-reference";
728
+ "coordination-identity": "coordination-identity";
729
+ }>;
730
+ retainedBy: z.ZodArray<z.ZodObject<{
731
+ storeId: z.ZodString;
732
+ sessionId: z.ZodString;
733
+ lifecycleId: z.ZodString;
734
+ }, z.core.$strict>>;
735
+ }, z.core.$strict>>;
736
+ }, z.core.$strict>>;
737
+ }, z.core.$strict>;
738
+ authorizationId: z.ZodNullable<z.ZodUUID>;
739
+ phase: z.ZodEnum<{
740
+ rejected: "rejected";
741
+ conflict: "conflict";
742
+ done: "done";
743
+ fenced: "fenced";
744
+ quiesced: "quiesced";
745
+ erasing: "erasing";
746
+ converging: "converging";
747
+ }>;
748
+ reason: z.ZodNullable<z.ZodString>;
749
+ resources: z.ZodArray<z.ZodObject<{
750
+ ownerId: z.ZodString;
751
+ resourceId: z.ZodString;
752
+ status: z.ZodEnum<{
753
+ erased: "erased";
754
+ "reference-released": "reference-released";
755
+ retained: "retained";
756
+ failed: "failed";
757
+ }>;
758
+ reason: z.ZodNullable<z.ZodString>;
759
+ }, z.core.$strict>>;
760
+ }, z.core.$strict>>;
761
+ result: z.ZodNullable<z.ZodObject<{
762
+ action: z.ZodLiteral<"purge">;
763
+ operationId: z.ZodString;
764
+ sessionId: z.ZodString;
765
+ entryId: z.ZodNullable<z.ZodUUID>;
766
+ status: z.ZodEnum<{
767
+ success: "success";
768
+ rejected: "rejected";
769
+ conflict: "conflict";
770
+ "pending-recovery": "pending-recovery";
771
+ "partial-failure": "partial-failure";
772
+ }>;
773
+ reason: z.ZodNullable<z.ZodString>;
774
+ ownerState: z.ZodNullable<z.ZodObject<{
775
+ schemaVersion: z.ZodLiteral<1>;
776
+ request: z.ZodObject<{
777
+ operationId: z.ZodString;
778
+ expected: z.ZodObject<{
779
+ storeId: z.ZodString;
780
+ sessionId: z.ZodString;
781
+ lifecycleId: z.ZodString;
782
+ }, z.core.$strict>;
783
+ bin: z.ZodUnion<readonly [z.ZodObject<{
784
+ entryId: z.ZodUUID;
785
+ entryVersion: z.ZodLiteral<1>;
786
+ }, z.core.$strict>, z.ZodObject<{
787
+ kind: z.ZodLiteral<"native-archive">;
788
+ entryId: z.ZodUUID;
789
+ entryVersion: z.ZodLiteral<2>;
790
+ }, z.core.$strict>]>;
791
+ manifestDigest: z.ZodString;
792
+ }, z.core.$strict>;
793
+ manifest: z.ZodObject<{
794
+ schemaVersion: z.ZodLiteral<1>;
795
+ lifecycle: z.ZodObject<{
796
+ storeId: z.ZodString;
797
+ sessionId: z.ZodString;
798
+ lifecycleId: z.ZodString;
799
+ }, z.core.$strict>;
800
+ capabilities: z.ZodObject<{
801
+ protocolVersion: z.ZodLiteral<1>;
802
+ ownerId: z.ZodString;
803
+ hostVersion: z.ZodString;
804
+ providerId: z.ZodString;
805
+ storeId: z.ZodString;
806
+ participants: z.ZodArray<z.ZodObject<{
807
+ id: z.ZodString;
808
+ version: z.ZodString;
809
+ }, z.core.$strict>>;
810
+ }, z.core.$strict>;
811
+ resources: z.ZodArray<z.ZodObject<{
812
+ ownerId: z.ZodString;
813
+ resourceId: z.ZodString;
814
+ revision: z.ZodString;
815
+ kind: z.ZodEnum<{
816
+ transcript: "transcript";
817
+ workspace: "workspace";
818
+ index: "index";
819
+ cache: "cache";
820
+ attachment: "attachment";
821
+ spill: "spill";
822
+ coordination: "coordination";
823
+ }>;
824
+ disposition: z.ZodEnum<{
825
+ erase: "erase";
826
+ "release-reference": "release-reference";
827
+ "retain-shared": "retain-shared";
828
+ "retain-coordination": "retain-coordination";
829
+ }>;
830
+ retention: z.ZodNullable<z.ZodObject<{
831
+ reason: z.ZodEnum<{
832
+ "shared-reference": "shared-reference";
833
+ "coordination-identity": "coordination-identity";
834
+ }>;
835
+ retainedBy: z.ZodArray<z.ZodObject<{
836
+ storeId: z.ZodString;
837
+ sessionId: z.ZodString;
838
+ lifecycleId: z.ZodString;
839
+ }, z.core.$strict>>;
840
+ }, z.core.$strict>>;
841
+ }, z.core.$strict>>;
842
+ }, z.core.$strict>;
843
+ authorizationId: z.ZodNullable<z.ZodUUID>;
844
+ phase: z.ZodEnum<{
845
+ rejected: "rejected";
846
+ conflict: "conflict";
847
+ done: "done";
848
+ fenced: "fenced";
849
+ quiesced: "quiesced";
850
+ erasing: "erasing";
851
+ converging: "converging";
852
+ }>;
853
+ reason: z.ZodNullable<z.ZodString>;
854
+ resources: z.ZodArray<z.ZodObject<{
855
+ ownerId: z.ZodString;
856
+ resourceId: z.ZodString;
857
+ status: z.ZodEnum<{
858
+ erased: "erased";
859
+ "reference-released": "reference-released";
860
+ retained: "retained";
861
+ failed: "failed";
862
+ }>;
863
+ reason: z.ZodNullable<z.ZodString>;
864
+ }, z.core.$strict>>;
865
+ }, z.core.$strict>>;
866
+ }, z.core.$strict>>;
867
+ }, z.core.$strict>>;
868
+ /** Browser-safe contract. Native archive is the sole entry path. */
869
+ export interface SessionBinRemoteApi {
870
+ prepare(request: ArchivePrepareRequest, signal?: AbortSignal): Promise<RemoteResult<ArchivePlan>>;
871
+ execute(plan: ArchivePlan, signal?: AbortSignal): Promise<RemoteResult<ArchiveResult>>;
872
+ list(signal?: AbortSignal): Promise<RemoteResult<ArchiveEntry[]>>;
873
+ getOperation(operationId: string, signal?: AbortSignal): Promise<RemoteResult<ArchiveOperation | BinOperation | null>>;
874
+ preparePurge(request: PreparePurgeRequest, signal?: AbortSignal): Promise<RemoteResult<PurgePlan>>;
875
+ executePurge(plan: PurgePlan, signal?: AbortSignal): Promise<RemoteResult<PurgeResult>>;
876
+ getPurgeOperation(operationId: string, signal?: AbortSignal): Promise<RemoteResult<PurgeOperation | null>>;
877
+ purgeOperations(signal?: AbortSignal): Promise<RemoteResult<PurgeOperation[]>>;
878
+ follow(signal?: AbortSignal): RemoteStreamHandle<BinSnapshot, never>;
879
+ }
880
+ export declare const binRemoteErrorCodes: readonly ["bin/closed", "bin/recovery-required", "bin/not-ready", "bin/operation-id-reused"];
881
+ export type BinRemoteErrorCode = typeof binRemoteErrorCodes[number];
882
+ declare module '@deepseek-ai/dsh-typert-protocol' {
883
+ interface RemoteErrorDetailsMap {
884
+ 'bin/closed': {};
885
+ 'bin/recovery-required': {};
886
+ 'bin/not-ready': {};
887
+ 'bin/operation-id-reused': {};
888
+ }
889
+ }
890
+ export declare const sessionBinRemoteContribution: TypertRemoteContribution;
891
+ export declare const sessionBinHostContribution: TypertContribution;