@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
package/dist/remote.js ADDED
@@ -0,0 +1,442 @@
1
+ // src/remote/contracts.ts
2
+ import { z as z4 } from "zod";
3
+
4
+ // src/operations/schema.ts
5
+ import { z } from "zod";
6
+ var identity = z.string().min(1).max(1024);
7
+ var actionSchema = z.enum(["bin", "restore"]);
8
+ var blockerSchema = z.object({
9
+ code: z.string().min(1),
10
+ activity: z.array(z.string()).optional()
11
+ }).strict();
12
+ var entrySchema = z.object({
13
+ schemaVersion: z.literal(1),
14
+ sessionId: identity,
15
+ entryId: z.uuid(),
16
+ operationId: identity,
17
+ binnedAt: z.iso.datetime(),
18
+ workspaceIdAtBin: identity.nullable(),
19
+ wasArchived: z.boolean()
20
+ }).strict();
21
+ var planSchema = z.object({
22
+ schemaVersion: z.literal(1),
23
+ operationId: identity,
24
+ action: actionSchema,
25
+ sessionId: identity,
26
+ expected: z.object({ archived: z.boolean(), entryId: z.uuid().nullable() }).strict(),
27
+ blockers: z.array(blockerSchema)
28
+ }).strict();
29
+ var resultSchema = z.object({
30
+ operationId: identity,
31
+ action: actionSchema,
32
+ sessionId: identity,
33
+ status: z.enum(["success", "rejected", "conflict"]),
34
+ reason: z.string().min(1).nullable(),
35
+ entryId: z.uuid().nullable()
36
+ }).strict();
37
+ var operationSchema = z.object({
38
+ schemaVersion: z.literal(1),
39
+ plan: planSchema,
40
+ createdAt: z.iso.datetime(),
41
+ phase: z.enum(["intent", "applied", "done"]),
42
+ ownershipInvalidated: z.boolean(),
43
+ entry: entrySchema.nullable(),
44
+ result: resultSchema.nullable()
45
+ }).strict().superRefine((operation, ctx) => {
46
+ const { plan, entry, result, phase } = operation;
47
+ if (phase === "done" !== (result !== null)) {
48
+ ctx.addIssue({ code: "custom", message: "Only a done operation has a result." });
49
+ }
50
+ if (phase !== "done" && entry === null) {
51
+ ctx.addIssue({ code: "custom", message: "An unfinished operation requires its entry snapshot." });
52
+ }
53
+ if (entry && (entry.sessionId !== plan.sessionId || plan.action === "bin" && (entry.operationId !== plan.operationId || entry.wasArchived !== plan.expected.archived) || plan.action === "restore" && entry.entryId !== plan.expected.entryId)) {
54
+ ctx.addIssue({ code: "custom", message: "Entry snapshot does not match the operation." });
55
+ }
56
+ if (result && (result.status === "success" !== (result.reason === null) || result.entryId !== (entry?.entryId ?? null) || result.status === "success" && !entry)) {
57
+ ctx.addIssue({ code: "custom", message: "Result outcome or entry snapshot is inconsistent." });
58
+ }
59
+ if (operation.ownershipInvalidated && !entry) {
60
+ ctx.addIssue({ code: "custom", message: "Ownership invalidation requires an entry identity." });
61
+ }
62
+ if (result && (result.operationId !== plan.operationId || result.sessionId !== plan.sessionId || result.action !== plan.action)) {
63
+ ctx.addIssue({ code: "custom", message: "Result does not match the operation." });
64
+ }
65
+ });
66
+ var prepareRequestSchema = z.object({
67
+ action: actionSchema,
68
+ sessionId: identity,
69
+ operationId: identity.optional()
70
+ }).strict();
71
+
72
+ // src/operations/archive.ts
73
+ import { z as z2 } from "zod";
74
+ var identity2 = z2.string().min(1).max(1024);
75
+ var archiveEntrySchema = z2.object({
76
+ schemaVersion: z2.literal(2),
77
+ sessionId: identity2,
78
+ entryId: z2.uuid()
79
+ }).strict();
80
+ var archivePlanSchema = z2.object({
81
+ schemaVersion: z2.literal(2),
82
+ operationId: identity2,
83
+ action: z2.literal("unarchive"),
84
+ sessionId: identity2,
85
+ expected: z2.object({ archived: z2.boolean(), entryId: z2.uuid().nullable() }).strict(),
86
+ blockers: z2.array(blockerSchema)
87
+ }).strict();
88
+ var archiveResultSchema = z2.object({
89
+ operationId: identity2,
90
+ action: z2.literal("unarchive"),
91
+ sessionId: identity2,
92
+ status: z2.enum(["success", "rejected", "conflict"]),
93
+ reason: z2.string().min(1).nullable(),
94
+ entryId: z2.uuid().nullable()
95
+ }).strict();
96
+ var archiveOperationSchema = z2.object({
97
+ schemaVersion: z2.literal(2),
98
+ plan: archivePlanSchema,
99
+ createdAt: z2.iso.datetime(),
100
+ phase: z2.enum(["intent", "applied", "done"]),
101
+ entry: archiveEntrySchema.nullable(),
102
+ result: archiveResultSchema.nullable()
103
+ }).strict().superRefine(({ plan, entry, result, phase }, ctx) => {
104
+ if (phase === "done" !== (result !== null) || phase !== "done" && (entry === null || !plan.expected.archived)) {
105
+ ctx.addIssue({ code: "custom", message: "Only done operations have results; unfinished operations require an entry." });
106
+ }
107
+ if (entry && (entry.sessionId !== plan.sessionId || entry.entryId !== plan.expected.entryId)) {
108
+ ctx.addIssue({ code: "custom", message: "Entry snapshot does not match the plan." });
109
+ }
110
+ if (result && (result.operationId !== plan.operationId || result.sessionId !== plan.sessionId || result.action !== plan.action || result.entryId !== (entry?.entryId ?? null) || result.status === "success" !== (result.reason === null) || result.status === "success" && !entry)) {
111
+ ctx.addIssue({ code: "custom", message: "Result does not match the operation." });
112
+ }
113
+ });
114
+ var archivePrepareRequestSchema = z2.object({
115
+ action: z2.literal("unarchive"),
116
+ sessionId: identity2,
117
+ operationId: identity2.optional()
118
+ }).strict();
119
+
120
+ // src/operations/retirement.ts
121
+ import { z as z3 } from "zod";
122
+ var key = z3.string().min(1).max(1024);
123
+ var lifecycleKeySchema = z3.object({ storeId: key, sessionId: key, lifecycleId: key }).strict();
124
+ var retirementParticipantSchema = z3.object({ id: key, version: key }).strict();
125
+ var retirementCapabilitiesSchema = z3.object({
126
+ protocolVersion: z3.literal(1),
127
+ ownerId: key,
128
+ hostVersion: key,
129
+ providerId: key,
130
+ storeId: key,
131
+ participants: z3.array(retirementParticipantSchema).min(1).max(64)
132
+ }).strict().superRefine((value, ctx) => {
133
+ if (new Set(value.participants.map((item) => item.id)).size !== value.participants.length) {
134
+ ctx.addIssue({ code: "custom", message: "Participant identities must be unique." });
135
+ }
136
+ });
137
+ var legacyRetirementBindingSchema = z3.object({
138
+ schemaVersion: z3.literal(1),
139
+ entryId: z3.uuid(),
140
+ entryVersion: z3.literal(1),
141
+ lifecycle: lifecycleKeySchema,
142
+ capabilities: retirementCapabilitiesSchema
143
+ }).strict();
144
+ var nativeRetirementBindingSchema = z3.object({
145
+ schemaVersion: z3.literal(2),
146
+ target: z3.literal("native-archive"),
147
+ entryId: z3.uuid(),
148
+ entryVersion: z3.literal(2),
149
+ lifecycle: lifecycleKeySchema,
150
+ capabilities: retirementCapabilitiesSchema
151
+ }).strict();
152
+ var retirementBindingSchema = z3.union([legacyRetirementBindingSchema, nativeRetirementBindingSchema]).superRefine((value, ctx) => {
153
+ if (value.lifecycle.storeId !== value.capabilities.storeId) {
154
+ ctx.addIssue({ code: "custom", message: "Binding store differs from its owner." });
155
+ }
156
+ });
157
+ var retirementResourceSchema = z3.object({
158
+ ownerId: key,
159
+ resourceId: key,
160
+ revision: key,
161
+ kind: z3.enum(["transcript", "workspace", "index", "cache", "attachment", "spill", "coordination"]),
162
+ disposition: z3.enum(["erase", "release-reference", "retain-shared", "retain-coordination"]),
163
+ retention: z3.object({
164
+ reason: z3.enum(["shared-reference", "coordination-identity"]),
165
+ retainedBy: z3.array(lifecycleKeySchema).max(4096)
166
+ }).strict().nullable()
167
+ }).strict();
168
+ var retirementManifestSchema = z3.object({
169
+ schemaVersion: z3.literal(1),
170
+ lifecycle: lifecycleKeySchema,
171
+ capabilities: retirementCapabilitiesSchema,
172
+ resources: z3.array(retirementResourceSchema).min(1).max(4096)
173
+ }).strict().superRefine((value, ctx) => {
174
+ const owners = new Set(value.capabilities.participants.map((item) => item.id));
175
+ const resourceKeys = value.resources.map((item) => JSON.stringify([item.ownerId, item.resourceId]));
176
+ if (new Set(resourceKeys).size !== resourceKeys.length || value.resources.some((item) => !owners.has(item.ownerId))) {
177
+ ctx.addIssue({ code: "custom", message: "Resources require unique keys and declared owners." });
178
+ }
179
+ if (value.lifecycle.storeId !== value.capabilities.storeId || !value.resources.some((item) => item.kind === "transcript" && item.disposition === "erase")) {
180
+ ctx.addIssue({ code: "custom", message: "Manifest must identify its store and erase the target transcript." });
181
+ }
182
+ for (const resource of value.resources) {
183
+ if (resource.kind === "coordination" && resource.disposition !== "retain-coordination") {
184
+ ctx.addIssue({ code: "custom", message: "Stable coordination identity must be retained." });
185
+ }
186
+ const retained = resource.retention;
187
+ if (resource.disposition === "retain-shared") {
188
+ if (!retained || retained.reason !== "shared-reference" || !retained.retainedBy.length || retained.retainedBy.some((key2) => lifecycleEqual(key2, value.lifecycle)) || new Set(retained.retainedBy.map((key2) => JSON.stringify([key2.storeId, key2.sessionId, key2.lifecycleId]))).size !== retained.retainedBy.length) {
189
+ ctx.addIssue({ code: "custom", message: "Shared retention requires distinct surviving lifecycle witnesses." });
190
+ }
191
+ } else if (resource.disposition === "retain-coordination") {
192
+ if (resource.kind !== "coordination" || !retained || retained.reason !== "coordination-identity" || retained.retainedBy.length) {
193
+ ctx.addIssue({ code: "custom", message: "Coordination retention must state its identity purpose." });
194
+ }
195
+ } else if (retained !== null) {
196
+ ctx.addIssue({ code: "custom", message: "Erasure/reference release does not retain this resource." });
197
+ }
198
+ }
199
+ });
200
+ var retirementRequestSchema = z3.object({
201
+ operationId: key,
202
+ expected: lifecycleKeySchema,
203
+ bin: z3.union([
204
+ z3.object({ entryId: z3.uuid(), entryVersion: z3.literal(1) }).strict(),
205
+ z3.object({ kind: z3.literal("native-archive"), entryId: z3.uuid(), entryVersion: z3.literal(2) }).strict()
206
+ ]),
207
+ manifestDigest: z3.string().regex(/^[a-f0-9]{64}$/)
208
+ }).strict();
209
+ var retirementResourceReceiptSchema = z3.object({
210
+ ownerId: key,
211
+ resourceId: key,
212
+ status: z3.enum(["erased", "reference-released", "retained", "failed"]),
213
+ reason: key.nullable()
214
+ }).strict().superRefine((value, ctx) => {
215
+ if ((value.status === "failed" || value.status === "retained") !== (value.reason !== null)) {
216
+ ctx.addIssue({ code: "custom", message: "Failure and retention require a reason; erased/released resources do not." });
217
+ }
218
+ });
219
+ var retirementAuthorizationSchema = z3.discriminatedUnion("authorized", [
220
+ z3.object({ authorized: z3.literal(true), authorizationId: z3.uuid() }).strict(),
221
+ z3.object({ authorized: z3.literal(false), reason: key }).strict()
222
+ ]);
223
+ var retirementStateSchema = z3.object({
224
+ schemaVersion: z3.literal(1),
225
+ request: retirementRequestSchema,
226
+ manifest: retirementManifestSchema,
227
+ authorizationId: z3.uuid().nullable(),
228
+ phase: z3.enum(["rejected", "conflict", "fenced", "quiesced", "erasing", "converging", "done"]),
229
+ reason: key.nullable(),
230
+ resources: z3.array(retirementResourceReceiptSchema).max(4096)
231
+ }).strict().superRefine((value, ctx) => {
232
+ if (!lifecycleEqual(value.request.expected, value.manifest.lifecycle)) {
233
+ ctx.addIssue({ code: "custom", message: "Owner state changed the requested lifecycle." });
234
+ }
235
+ const refused = value.phase === "rejected" || value.phase === "conflict";
236
+ if (refused !== (value.authorizationId === null)) {
237
+ ctx.addIssue({ code: "custom", message: "Admitted owner state requires its handed-off authorization grant." });
238
+ }
239
+ if (refused !== (value.reason !== null)) {
240
+ ctx.addIssue({ code: "custom", message: "Admission refusal requires a reason." });
241
+ }
242
+ const keys = value.resources.map((item) => JSON.stringify([item.ownerId, item.resourceId]));
243
+ if (new Set(keys).size !== keys.length) ctx.addIssue({ code: "custom", message: "Duplicate resource receipts." });
244
+ for (const receipt of value.resources) {
245
+ const resource = value.manifest.resources.find((item) => item.ownerId === receipt.ownerId && item.resourceId === receipt.resourceId);
246
+ if (!resource) ctx.addIssue({ code: "custom", message: "Receipt is outside the frozen manifest." });
247
+ if (resource && receipt.status !== "failed") {
248
+ const expected = resource.disposition === "erase" ? "erased" : resource.disposition === "release-reference" ? "reference-released" : "retained";
249
+ if (receipt.status !== expected || receipt.status === "retained" && receipt.reason !== resource.retention?.reason) {
250
+ ctx.addIssue({ code: "custom", message: "Resource acknowledgement did not satisfy its frozen disposition and retention reason." });
251
+ }
252
+ }
253
+ }
254
+ if (value.phase === "done" && (value.resources.length !== value.manifest.resources.length || value.resources.some((receipt) => receipt.status === "failed"))) {
255
+ ctx.addIssue({ code: "custom", message: "Completion requires every resource receipt without failures." });
256
+ }
257
+ if (["rejected", "conflict", "fenced", "quiesced"].includes(value.phase) && value.resources.length) {
258
+ ctx.addIssue({ code: "custom", message: "Admission and quiescence phases cannot include resource erasure effects." });
259
+ }
260
+ });
261
+ var preparePurgeRequestSchema = z3.object({ sessionId: key, operationId: key.optional() }).strict();
262
+ var purgePlanSchema = z3.object({
263
+ schemaVersion: z3.union([z3.literal(1), z3.literal(2)]),
264
+ action: z3.literal("purge"),
265
+ operationId: key,
266
+ sessionId: key,
267
+ expectedEntryId: z3.uuid().nullable(),
268
+ binding: retirementBindingSchema.nullable(),
269
+ manifest: retirementManifestSchema.nullable(),
270
+ blockers: z3.array(blockerSchema)
271
+ }).strict().superRefine((value, ctx) => {
272
+ if (value.binding && value.binding.schemaVersion !== value.schemaVersion) {
273
+ ctx.addIssue({ code: "custom", message: "Legacy Bin and native archive deletion bindings cannot be interchanged." });
274
+ }
275
+ if (value.binding && (value.binding.entryId !== value.expectedEntryId || value.binding.lifecycle.sessionId !== value.sessionId)) {
276
+ ctx.addIssue({ code: "custom", message: "Purge binding differs from its target entry." });
277
+ }
278
+ if (value.manifest && (!value.binding || !lifecycleEqual(value.binding.lifecycle, value.manifest.lifecycle))) {
279
+ ctx.addIssue({ code: "custom", message: "Purge manifest differs from its bound lifecycle." });
280
+ }
281
+ });
282
+ var purgeResultSchema = z3.object({
283
+ action: z3.literal("purge"),
284
+ operationId: key,
285
+ sessionId: key,
286
+ entryId: z3.uuid().nullable(),
287
+ status: z3.enum(["success", "rejected", "conflict", "pending-recovery", "partial-failure"]),
288
+ reason: key.nullable(),
289
+ ownerState: retirementStateSchema.nullable()
290
+ }).strict().superRefine((value, ctx) => {
291
+ if (value.status === "success" !== (value.reason === null) || value.status === "success" && value.ownerState?.phase !== "done") {
292
+ ctx.addIssue({ code: "custom", message: "Success requires a complete owner receipt." });
293
+ }
294
+ if (value.ownerState && (value.ownerState.request.operationId !== value.operationId || value.ownerState.request.expected.sessionId !== value.sessionId || value.ownerState.request.bin.entryId !== value.entryId)) {
295
+ ctx.addIssue({ code: "custom", message: "Purge result differs from its owner receipt." });
296
+ }
297
+ });
298
+ var purgeOperationSchema = z3.object({
299
+ schemaVersion: z3.union([z3.literal(1), z3.literal(2)]),
300
+ plan: purgePlanSchema,
301
+ createdAt: z3.iso.datetime(),
302
+ phase: z3.enum(["intent", "authorizing", "owner-pending", "done"]),
303
+ entry: z3.union([entrySchema, archiveEntrySchema]).nullable(),
304
+ authorizationId: z3.uuid().nullable(),
305
+ ownerState: retirementStateSchema.nullable(),
306
+ result: purgeResultSchema.nullable()
307
+ }).strict().superRefine((value, ctx) => {
308
+ const { plan, entry, result, ownerState } = value;
309
+ if (value.schemaVersion !== plan.schemaVersion || entry && entry.schemaVersion !== plan.schemaVersion || ownerState && ownerState.request.bin.entryVersion !== plan.schemaVersion) {
310
+ ctx.addIssue({ code: "custom", message: "Deletion journal target versions must agree." });
311
+ }
312
+ if (entry && (entry.entryId !== plan.expectedEntryId || entry.sessionId !== plan.sessionId)) {
313
+ ctx.addIssue({ code: "custom", message: "Purge journal entry differs from the plan." });
314
+ }
315
+ if (value.phase !== "done" && (!entry || !plan.binding || !plan.manifest)) {
316
+ ctx.addIssue({ code: "custom", message: "Unfinished purge requires an entry, binding and manifest." });
317
+ }
318
+ const terminalResult = result && ["success", "rejected", "conflict"].includes(result.status);
319
+ if (value.phase === "done" !== Boolean(terminalResult) || ["intent", "authorizing"].includes(value.phase) && (ownerState !== null || result !== null) || value.phase === "intent" && value.authorizationId !== null || value.phase === "authorizing" && value.authorizationId === null || ownerState && ownerState.authorizationId !== null && ownerState.authorizationId !== value.authorizationId || value.phase === "owner-pending" && (ownerState === null || result === null)) {
320
+ ctx.addIssue({ code: "custom", message: "Purge journal phase and receipt are inconsistent." });
321
+ }
322
+ if (result && (result.operationId !== plan.operationId || result.sessionId !== plan.sessionId || result.entryId !== (entry?.entryId ?? null) || JSON.stringify(result.ownerState) !== JSON.stringify(ownerState))) {
323
+ ctx.addIssue({ code: "custom", message: "Purge journal result differs from its saved state." });
324
+ }
325
+ });
326
+ function lifecycleEqual(a, b) {
327
+ return a.storeId === b.storeId && a.sessionId === b.sessionId && a.lifecycleId === b.lifecycleId;
328
+ }
329
+
330
+ // src/remote/contracts.ts
331
+ var sessionBinRemoteNamespace = "sessionBin";
332
+ var sessionBinRemoteServiceKey = "sessionBinRemote";
333
+ var snapshotSchema = z4.object({ schemaVersion: z4.literal(2), entries: z4.array(archiveEntrySchema) }).strict();
334
+ var operationIdSchema = z4.string().min(1).max(1024);
335
+ var entriesSchema = z4.array(archiveEntrySchema);
336
+ var optionalOperationSchema = z4.union([archiveOperationSchema, operationSchema]).nullable();
337
+ var nativePurgePlanSchema = purgePlanSchema.refine((plan) => plan.schemaVersion === 2, "Only native archive v2 deletion plans may be executed remotely.");
338
+ var optionalPurgeOperationSchema = purgeOperationSchema.nullable();
339
+ var purgeOperationsSchema = z4.array(purgeOperationSchema);
340
+ var binRemoteErrorCodes = ["bin/closed", "bin/recovery-required", "bin/not-ready", "bin/operation-id-reused"];
341
+ function strictCodec(name, schema) {
342
+ return {
343
+ mode: "strict",
344
+ typeSymbol: `@takboo/dsh-session-bin#${name}`,
345
+ create: () => schema,
346
+ encode: (value) => schema.parse(value),
347
+ decode: (value) => schema.parse(value)
348
+ };
349
+ }
350
+ var codecs = {
351
+ request: strictCodec("ArchivePrepareRequest", archivePrepareRequestSchema),
352
+ plan: strictCodec("ArchivePlan", archivePlanSchema),
353
+ result: strictCodec("ArchiveResult", archiveResultSchema),
354
+ entries: strictCodec("ArchiveEntries", entriesSchema),
355
+ operationId: strictCodec("OperationId", operationIdSchema),
356
+ operation: strictCodec("OptionalArchiveOperation", optionalOperationSchema),
357
+ purgeRequest: strictCodec("PreparePurgeRequest", preparePurgeRequestSchema),
358
+ purgePlan: strictCodec("NativePurgePlan", nativePurgePlanSchema),
359
+ purgeResult: strictCodec("PurgeResult", purgeResultSchema),
360
+ purgeOperation: strictCodec("OptionalPurgeOperation", optionalPurgeOperationSchema),
361
+ purgeOperations: strictCodec("PurgeOperations", purgeOperationsSchema),
362
+ snapshot: strictCodec("ArchiveSnapshot", snapshotSchema)
363
+ };
364
+ function descriptor(method, parameters, result, mode) {
365
+ return {
366
+ id: `@takboo/dsh-session-bin#sessionBin/${method}`,
367
+ service: sessionBinRemoteServiceKey,
368
+ namespace: sessionBinRemoteNamespace,
369
+ method,
370
+ invocation: { kind: "direct" },
371
+ parameters,
372
+ result,
373
+ cancellation: { parameter: "signal" },
374
+ ...mode === void 0 ? {} : { mode }
375
+ };
376
+ }
377
+ var descriptors = [
378
+ descriptor("prepare", [{ name: "request", wire: "request", source: "json", codec: codecs.request }], codecs.plan),
379
+ descriptor("execute", [{ name: "plan", wire: "plan", source: "json", codec: codecs.plan }], codecs.result),
380
+ descriptor("list", [], codecs.entries),
381
+ descriptor("getOperation", [{ name: "operationId", wire: "operationId", source: "json", codec: codecs.operationId }], codecs.operation),
382
+ descriptor("preparePurge", [{ name: "request", wire: "request", source: "json", codec: codecs.purgeRequest }], codecs.purgePlan),
383
+ descriptor("executePurge", [{ name: "plan", wire: "plan", source: "json", codec: codecs.purgePlan }], codecs.purgeResult),
384
+ descriptor("getPurgeOperation", [{ name: "operationId", wire: "operationId", source: "json", codec: codecs.operationId }], codecs.purgeOperation),
385
+ descriptor("purgeOperations", [], codecs.purgeOperations),
386
+ descriptor("follow", [], codecs.snapshot, "stream")
387
+ ];
388
+ var sessionBinRemoteContribution = { package: "@takboo/dsh-session-bin", descriptors };
389
+ var sessionBinHostContribution = {
390
+ package: "@takboo/dsh-session-bin",
391
+ face: "host",
392
+ schemas: [
393
+ { name: "ArchivePrepareRequest", create: () => archivePrepareRequestSchema },
394
+ { name: "ArchiveEntry", create: () => archiveEntrySchema },
395
+ { name: "ArchivePlan", create: () => archivePlanSchema },
396
+ { name: "ArchiveResult", create: () => archiveResultSchema },
397
+ { name: "ArchiveOperation", create: () => archiveOperationSchema },
398
+ { name: "ArchiveEntries", create: () => entriesSchema },
399
+ { name: "OperationId", create: () => operationIdSchema },
400
+ { name: "OptionalArchiveOperation", create: () => optionalOperationSchema },
401
+ { name: "PreparePurgeRequest", create: () => preparePurgeRequestSchema },
402
+ { name: "NativePurgePlan", create: () => nativePurgePlanSchema },
403
+ { name: "PurgeResult", create: () => purgeResultSchema },
404
+ { name: "OptionalPurgeOperation", create: () => optionalPurgeOperationSchema },
405
+ { name: "PurgeOperations", create: () => purgeOperationsSchema },
406
+ { name: "ArchiveSnapshot", create: () => snapshotSchema }
407
+ ],
408
+ model: { services: [{
409
+ key: sessionBinRemoteServiceKey,
410
+ exportName: "SessionBinRemote",
411
+ description: "Typed native archive management adapter.",
412
+ tags: [],
413
+ members: [
414
+ { kind: "method", name: "prepare", signature: "prepare(request: ArchivePrepareRequest, signal: AbortSignal): Promise<ArchivePlan>" },
415
+ { kind: "method", name: "execute", signature: "execute(plan: ArchivePlan, signal: AbortSignal): Promise<ArchiveResult>" },
416
+ { kind: "method", name: "list", signature: "list(signal: AbortSignal): Promise<ArchiveEntry[]>" },
417
+ { kind: "method", name: "getOperation", signature: "getOperation(operationId: string, signal: AbortSignal): Promise<ArchiveOperation | BinOperation | null>" },
418
+ { kind: "method", name: "preparePurge", signature: "preparePurge(request: PreparePurgeRequest, signal: AbortSignal): Promise<PurgePlan>" },
419
+ { kind: "method", name: "executePurge", signature: "executePurge(plan: PurgePlan, signal: AbortSignal): Promise<PurgeResult>" },
420
+ { kind: "method", name: "getPurgeOperation", signature: "getPurgeOperation(operationId: string, signal: AbortSignal): Promise<PurgeOperation | null>" },
421
+ { kind: "method", name: "purgeOperations", signature: "purgeOperations(signal: AbortSignal): Promise<PurgeOperation[]>" },
422
+ { kind: "method", name: "follow", signature: "follow(signal: AbortSignal): RemoteStream<ArchiveSnapshot>" }
423
+ ],
424
+ types: []
425
+ }], events: [], objects: [] },
426
+ invocations: descriptors
427
+ };
428
+ export {
429
+ binRemoteErrorCodes,
430
+ entriesSchema,
431
+ nativePurgePlanSchema,
432
+ operationIdSchema,
433
+ optionalOperationSchema,
434
+ optionalPurgeOperationSchema,
435
+ purgeOperationsSchema,
436
+ sessionBinHostContribution,
437
+ sessionBinRemoteContribution,
438
+ sessionBinRemoteNamespace,
439
+ sessionBinRemoteServiceKey,
440
+ snapshotSchema
441
+ };
442
+ //# sourceMappingURL=remote.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/remote/contracts.ts", "../src/operations/schema.ts", "../src/operations/archive.ts", "../src/operations/retirement.ts"],
4
+ "sourcesContent": ["import { z } from 'zod';\nimport type { InvocationDescriptor, RemoteResult, RemoteStreamHandle, TypertCodec, TypertRemoteContribution } from '@deepseek-ai/dsh-typert-protocol';\nimport type { TypertContribution } from '@deepseek-ai/dsh-typert-registry';\nimport { operationSchema } from '../operations/schema.js';\nimport type { BinOperation } from '../operations/schema.js';\nimport { archiveEntrySchema, archiveOperationSchema, archivePlanSchema, archivePrepareRequestSchema, archiveResultSchema } from '../operations/archive.js';\nimport type { ArchiveEntry, ArchiveOperation, ArchivePlan, ArchivePrepareRequest, ArchiveResult } from '../operations/archive.js';\nimport { preparePurgeRequestSchema, purgePlanSchema, purgeResultSchema, purgeOperationSchema } from '../operations/retirement.js';\nimport type { PreparePurgeRequest, PurgePlan, PurgeResult, PurgeOperation } from '../operations/retirement.js';\n\nexport const sessionBinRemoteNamespace = 'sessionBin';\nexport const sessionBinRemoteServiceKey = 'sessionBinRemote';\nexport const snapshotSchema = z.object({ schemaVersion: z.literal(2), entries: z.array(archiveEntrySchema) }).strict();\nexport type BinSnapshot = z.infer<typeof snapshotSchema>;\nexport type ArchiveSnapshot = BinSnapshot;\nexport const operationIdSchema = z.string().min(1).max(1024);\nexport const entriesSchema = z.array(archiveEntrySchema);\nexport const optionalOperationSchema = z.union([archiveOperationSchema, operationSchema]).nullable();\nexport const nativePurgePlanSchema = purgePlanSchema.refine(plan => plan.schemaVersion === 2, 'Only native archive v2 deletion plans may be executed remotely.');\nexport const optionalPurgeOperationSchema = purgeOperationSchema.nullable();\nexport const purgeOperationsSchema = z.array(purgeOperationSchema);\n\n/** Browser-safe contract. Native archive is the sole entry path. */\nexport interface SessionBinRemoteApi {\n prepare(request: ArchivePrepareRequest, signal?: AbortSignal): Promise<RemoteResult<ArchivePlan>>;\n execute(plan: ArchivePlan, signal?: AbortSignal): Promise<RemoteResult<ArchiveResult>>;\n list(signal?: AbortSignal): Promise<RemoteResult<ArchiveEntry[]>>;\n getOperation(operationId: string, signal?: AbortSignal): Promise<RemoteResult<ArchiveOperation | BinOperation | null>>;\n preparePurge(request: PreparePurgeRequest, signal?: AbortSignal): Promise<RemoteResult<PurgePlan>>;\n executePurge(plan: PurgePlan, signal?: AbortSignal): Promise<RemoteResult<PurgeResult>>;\n getPurgeOperation(operationId: string, signal?: AbortSignal): Promise<RemoteResult<PurgeOperation | null>>;\n purgeOperations(signal?: AbortSignal): Promise<RemoteResult<PurgeOperation[]>>;\n follow(signal?: AbortSignal): RemoteStreamHandle<BinSnapshot, never>;\n}\nexport const binRemoteErrorCodes = ['bin/closed', 'bin/recovery-required', 'bin/not-ready', 'bin/operation-id-reused'] as const;\nexport type BinRemoteErrorCode = typeof binRemoteErrorCodes[number];\ndeclare module '@deepseek-ai/dsh-typert-protocol' {\n interface RemoteErrorDetailsMap {\n 'bin/closed': {};\n 'bin/recovery-required': {};\n 'bin/not-ready': {};\n 'bin/operation-id-reused': {};\n }\n}\nfunction strictCodec<Output>(name: string, schema: z.ZodType<Output>): TypertCodec {\n return { mode: 'strict', typeSymbol: `@takboo/dsh-session-bin#${name}`, create: () => schema,\n encode: value => schema.parse(value), decode: value => schema.parse(value) };\n}\nconst codecs = {\n request: strictCodec('ArchivePrepareRequest', archivePrepareRequestSchema),\n plan: strictCodec('ArchivePlan', archivePlanSchema),\n result: strictCodec('ArchiveResult', archiveResultSchema),\n entries: strictCodec('ArchiveEntries', entriesSchema),\n operationId: strictCodec('OperationId', operationIdSchema),\n operation: strictCodec('OptionalArchiveOperation', optionalOperationSchema),\n purgeRequest: strictCodec('PreparePurgeRequest', preparePurgeRequestSchema),\n purgePlan: strictCodec('NativePurgePlan', nativePurgePlanSchema),\n purgeResult: strictCodec('PurgeResult', purgeResultSchema),\n purgeOperation: strictCodec('OptionalPurgeOperation', optionalPurgeOperationSchema),\n purgeOperations: strictCodec('PurgeOperations', purgeOperationsSchema),\n snapshot: strictCodec('ArchiveSnapshot', snapshotSchema),\n};\nfunction descriptor(method: string, parameters: InvocationDescriptor['parameters'], result: TypertCodec,\n mode?: 'stream'): InvocationDescriptor {\n return { id: `@takboo/dsh-session-bin#sessionBin/${method}`, service: sessionBinRemoteServiceKey,\n namespace: sessionBinRemoteNamespace, method, invocation: { kind: 'direct' }, parameters, result,\n cancellation: { parameter: 'signal' }, ...(mode === undefined ? {} : { mode }) };\n}\nconst descriptors: readonly InvocationDescriptor[] = [\n descriptor('prepare', [{ name: 'request', wire: 'request', source: 'json', codec: codecs.request }], codecs.plan),\n descriptor('execute', [{ name: 'plan', wire: 'plan', source: 'json', codec: codecs.plan }], codecs.result),\n descriptor('list', [], codecs.entries),\n descriptor('getOperation', [{ name: 'operationId', wire: 'operationId', source: 'json', codec: codecs.operationId }], codecs.operation),\n descriptor('preparePurge', [{ name: 'request', wire: 'request', source: 'json', codec: codecs.purgeRequest }], codecs.purgePlan),\n descriptor('executePurge', [{ name: 'plan', wire: 'plan', source: 'json', codec: codecs.purgePlan }], codecs.purgeResult),\n descriptor('getPurgeOperation', [{ name: 'operationId', wire: 'operationId', source: 'json', codec: codecs.operationId }], codecs.purgeOperation),\n descriptor('purgeOperations', [], codecs.purgeOperations),\n descriptor('follow', [], codecs.snapshot, 'stream'),\n];\nexport const sessionBinRemoteContribution: TypertRemoteContribution = { package: '@takboo/dsh-session-bin', descriptors };\nexport const sessionBinHostContribution: TypertContribution = {\n package: '@takboo/dsh-session-bin', face: 'host',\n schemas: [\n { name: 'ArchivePrepareRequest', create: () => archivePrepareRequestSchema },\n { name: 'ArchiveEntry', create: () => archiveEntrySchema },\n { name: 'ArchivePlan', create: () => archivePlanSchema },\n { name: 'ArchiveResult', create: () => archiveResultSchema },\n { name: 'ArchiveOperation', create: () => archiveOperationSchema },\n { name: 'ArchiveEntries', create: () => entriesSchema },\n { name: 'OperationId', create: () => operationIdSchema },\n { name: 'OptionalArchiveOperation', create: () => optionalOperationSchema },\n { name: 'PreparePurgeRequest', create: () => preparePurgeRequestSchema },\n { name: 'NativePurgePlan', create: () => nativePurgePlanSchema },\n { name: 'PurgeResult', create: () => purgeResultSchema },\n { name: 'OptionalPurgeOperation', create: () => optionalPurgeOperationSchema },\n { name: 'PurgeOperations', create: () => purgeOperationsSchema },\n { name: 'ArchiveSnapshot', create: () => snapshotSchema },\n ],\n model: { services: [{ key: sessionBinRemoteServiceKey, exportName: 'SessionBinRemote',\n description: 'Typed native archive management adapter.', tags: [], members: [\n { kind: 'method', name: 'prepare', signature: 'prepare(request: ArchivePrepareRequest, signal: AbortSignal): Promise<ArchivePlan>' },\n { kind: 'method', name: 'execute', signature: 'execute(plan: ArchivePlan, signal: AbortSignal): Promise<ArchiveResult>' },\n { kind: 'method', name: 'list', signature: 'list(signal: AbortSignal): Promise<ArchiveEntry[]>' },\n { kind: 'method', name: 'getOperation', signature: 'getOperation(operationId: string, signal: AbortSignal): Promise<ArchiveOperation | BinOperation | null>' },\n { kind: 'method', name: 'preparePurge', signature: 'preparePurge(request: PreparePurgeRequest, signal: AbortSignal): Promise<PurgePlan>' },\n { kind: 'method', name: 'executePurge', signature: 'executePurge(plan: PurgePlan, signal: AbortSignal): Promise<PurgeResult>' },\n { kind: 'method', name: 'getPurgeOperation', signature: 'getPurgeOperation(operationId: string, signal: AbortSignal): Promise<PurgeOperation | null>' },\n { kind: 'method', name: 'purgeOperations', signature: 'purgeOperations(signal: AbortSignal): Promise<PurgeOperation[]>' },\n { kind: 'method', name: 'follow', signature: 'follow(signal: AbortSignal): RemoteStream<ArchiveSnapshot>' },\n ], types: [] }], events: [], objects: [] }, invocations: descriptors,\n};\n", "import { z } from 'zod';\n\nconst identity = z.string().min(1).max(1024);\nexport const actionSchema = z.enum(['bin', 'restore']);\nexport const blockerSchema = z.object({\n code: z.string().min(1),\n activity: z.array(z.string()).optional(),\n}).strict();\nexport const entrySchema = z.object({\n schemaVersion: z.literal(1),\n sessionId: identity,\n entryId: z.uuid(),\n operationId: identity,\n binnedAt: z.iso.datetime(),\n workspaceIdAtBin: identity.nullable(),\n wasArchived: z.boolean(),\n}).strict();\nexport const planSchema = z.object({\n schemaVersion: z.literal(1),\n operationId: identity,\n action: actionSchema,\n sessionId: identity,\n expected: z.object({ archived: z.boolean(), entryId: z.uuid().nullable() }).strict(),\n blockers: z.array(blockerSchema),\n}).strict();\nexport const resultSchema = z.object({\n operationId: identity,\n action: actionSchema,\n sessionId: identity,\n status: z.enum(['success', 'rejected', 'conflict']),\n reason: z.string().min(1).nullable(),\n entryId: z.uuid().nullable(),\n}).strict();\nexport const operationSchema = z.object({\n schemaVersion: z.literal(1),\n plan: planSchema,\n createdAt: z.iso.datetime(),\n phase: z.enum(['intent', 'applied', 'done']),\n ownershipInvalidated: z.boolean(),\n entry: entrySchema.nullable(),\n result: resultSchema.nullable(),\n}).strict().superRefine((operation, ctx) => {\n const { plan, entry, result, phase } = operation;\n if ((phase === 'done') !== (result !== null)) {\n ctx.addIssue({ code: 'custom', message: 'Only a done operation has a result.' });\n }\n if (phase !== 'done' && entry === null) {\n ctx.addIssue({ code: 'custom', message: 'An unfinished operation requires its entry snapshot.' });\n }\n if (entry && (entry.sessionId !== plan.sessionId\n || (plan.action === 'bin' && (entry.operationId !== plan.operationId\n || entry.wasArchived !== plan.expected.archived))\n || (plan.action === 'restore' && entry.entryId !== plan.expected.entryId))) {\n ctx.addIssue({ code: 'custom', message: 'Entry snapshot does not match the operation.' });\n }\n if (result && ((result.status === 'success') !== (result.reason === null)\n || result.entryId !== (entry?.entryId ?? null)\n || (result.status === 'success' && !entry))) {\n ctx.addIssue({ code: 'custom', message: 'Result outcome or entry snapshot is inconsistent.' });\n }\n if (operation.ownershipInvalidated && !entry) {\n ctx.addIssue({ code: 'custom', message: 'Ownership invalidation requires an entry identity.' });\n }\n if (result && (result.operationId !== plan.operationId\n || result.sessionId !== plan.sessionId || result.action !== plan.action)) {\n ctx.addIssue({ code: 'custom', message: 'Result does not match the operation.' });\n }\n});\nexport const prepareRequestSchema = z.object({\n action: actionSchema,\n sessionId: identity,\n operationId: identity.optional(),\n}).strict();\n\nexport type BinEntry = z.infer<typeof entrySchema>;\nexport type BinPlan = z.infer<typeof planSchema>;\nexport type BinResult = z.infer<typeof resultSchema>;\nexport type BinOperation = z.infer<typeof operationSchema>;\nexport type BinBlocker = z.infer<typeof blockerSchema>;\nexport type PrepareRequest = z.infer<typeof prepareRequestSchema>;\n", "import { z } from 'zod';\nimport { blockerSchema } from './schema.js';\n\nconst identity = z.string().min(1).max(1024);\nexport const archiveEntrySchema = z.object({\n schemaVersion: z.literal(2), sessionId: identity, entryId: z.uuid(),\n}).strict();\nexport const archivePlanSchema = z.object({\n schemaVersion: z.literal(2), operationId: identity, action: z.literal('unarchive'), sessionId: identity,\n expected: z.object({ archived: z.boolean(), entryId: z.uuid().nullable() }).strict(),\n blockers: z.array(blockerSchema),\n}).strict();\nexport const archiveResultSchema = z.object({\n operationId: identity, action: z.literal('unarchive'), sessionId: identity,\n status: z.enum(['success', 'rejected', 'conflict']), reason: z.string().min(1).nullable(), entryId: z.uuid().nullable(),\n}).strict();\nexport const archiveOperationSchema = z.object({\n schemaVersion: z.literal(2), plan: archivePlanSchema, createdAt: z.iso.datetime(),\n phase: z.enum(['intent', 'applied', 'done']), entry: archiveEntrySchema.nullable(), result: archiveResultSchema.nullable(),\n}).strict().superRefine(({ plan, entry, result, phase }, ctx) => {\n if ((phase === 'done') !== (result !== null) || (phase !== 'done' && (entry === null || !plan.expected.archived))) {\n ctx.addIssue({ code: 'custom', message: 'Only done operations have results; unfinished operations require an entry.' });\n }\n if (entry && (entry.sessionId !== plan.sessionId || entry.entryId !== plan.expected.entryId)) {\n ctx.addIssue({ code: 'custom', message: 'Entry snapshot does not match the plan.' });\n }\n if (result && (result.operationId !== plan.operationId || result.sessionId !== plan.sessionId\n || result.action !== plan.action || result.entryId !== (entry?.entryId ?? null)\n || (result.status === 'success') !== (result.reason === null) || (result.status === 'success' && !entry))) {\n ctx.addIssue({ code: 'custom', message: 'Result does not match the operation.' });\n }\n});\nexport const archivePrepareRequestSchema = z.object({\n action: z.literal('unarchive'), sessionId: identity, operationId: identity.optional(),\n}).strict();\nexport type ArchiveEntry = z.infer<typeof archiveEntrySchema>;\nexport type ArchivePlan = z.infer<typeof archivePlanSchema>;\nexport type ArchiveResult = z.infer<typeof archiveResultSchema>;\nexport type ArchiveOperation = z.infer<typeof archiveOperationSchema>;\nexport type ArchivePrepareRequest = z.infer<typeof archivePrepareRequestSchema>;\n", "import { z } from 'zod';\nimport { blockerSchema, entrySchema } from './schema.js';\nimport { archiveEntrySchema } from './archive.js';\n\nconst key = z.string().min(1).max(1024);\nexport const lifecycleKeySchema = z.object({ storeId: key, sessionId: key, lifecycleId: key }).strict();\nexport const retirementParticipantSchema = z.object({ id: key, version: key }).strict();\nexport const retirementCapabilitiesSchema = z.object({\n protocolVersion: z.literal(1), ownerId: key, hostVersion: key, providerId: key, storeId: key,\n participants: z.array(retirementParticipantSchema).min(1).max(64),\n}).strict().superRefine((value, ctx) => {\n if (new Set(value.participants.map(item => item.id)).size !== value.participants.length) {\n ctx.addIssue({ code: 'custom', message: 'Participant identities must be unique.' });\n }\n});\nconst legacyRetirementBindingSchema = z.object({\n schemaVersion: z.literal(1), entryId: z.uuid(), entryVersion: z.literal(1),\n lifecycle: lifecycleKeySchema, capabilities: retirementCapabilitiesSchema,\n}).strict();\nconst nativeRetirementBindingSchema = z.object({\n schemaVersion: z.literal(2), target: z.literal('native-archive'), entryId: z.uuid(), entryVersion: z.literal(2),\n lifecycle: lifecycleKeySchema, capabilities: retirementCapabilitiesSchema,\n}).strict();\nexport const retirementBindingSchema = z.union([legacyRetirementBindingSchema, nativeRetirementBindingSchema]).superRefine((value, ctx) => {\n if (value.lifecycle.storeId !== value.capabilities.storeId) {\n ctx.addIssue({ code: 'custom', message: 'Binding store differs from its owner.' });\n }\n});\nexport const retirementResourceSchema = z.object({\n ownerId: key, resourceId: key, revision: key,\n kind: z.enum(['transcript', 'workspace', 'index', 'cache', 'attachment', 'spill', 'coordination']),\n disposition: z.enum(['erase', 'release-reference', 'retain-shared', 'retain-coordination']),\n retention: z.object({\n reason: z.enum(['shared-reference', 'coordination-identity']),\n retainedBy: z.array(lifecycleKeySchema).max(4096),\n }).strict().nullable(),\n}).strict();\nexport const retirementManifestSchema = z.object({\n schemaVersion: z.literal(1), lifecycle: lifecycleKeySchema,\n capabilities: retirementCapabilitiesSchema,\n resources: z.array(retirementResourceSchema).min(1).max(4096),\n}).strict().superRefine((value, ctx) => {\n const owners = new Set(value.capabilities.participants.map(item => item.id));\n const resourceKeys = value.resources.map(item => JSON.stringify([item.ownerId, item.resourceId]));\n if (new Set(resourceKeys).size !== resourceKeys.length || value.resources.some(item => !owners.has(item.ownerId))) {\n ctx.addIssue({ code: 'custom', message: 'Resources require unique keys and declared owners.' });\n }\n if (value.lifecycle.storeId !== value.capabilities.storeId\n || !value.resources.some(item => item.kind === 'transcript' && item.disposition === 'erase')) {\n ctx.addIssue({ code: 'custom', message: 'Manifest must identify its store and erase the target transcript.' });\n }\n for (const resource of value.resources) {\n if (resource.kind === 'coordination' && resource.disposition !== 'retain-coordination') {\n ctx.addIssue({ code: 'custom', message: 'Stable coordination identity must be retained.' });\n }\n const retained = resource.retention;\n if (resource.disposition === 'retain-shared') {\n if (!retained || retained.reason !== 'shared-reference' || !retained.retainedBy.length\n || retained.retainedBy.some(key => lifecycleEqual(key, value.lifecycle))\n || new Set(retained.retainedBy.map(key => JSON.stringify([key.storeId, key.sessionId, key.lifecycleId]))).size !== retained.retainedBy.length) {\n ctx.addIssue({ code: 'custom', message: 'Shared retention requires distinct surviving lifecycle witnesses.' });\n }\n } else if (resource.disposition === 'retain-coordination') {\n if (resource.kind !== 'coordination' || !retained || retained.reason !== 'coordination-identity' || retained.retainedBy.length) {\n ctx.addIssue({ code: 'custom', message: 'Coordination retention must state its identity purpose.' });\n }\n } else if (retained !== null) {\n ctx.addIssue({ code: 'custom', message: 'Erasure/reference release does not retain this resource.' });\n }\n }\n});\nexport const retirementRequestSchema = z.object({\n operationId: key, expected: lifecycleKeySchema,\n bin: z.union([\n z.object({ entryId: z.uuid(), entryVersion: z.literal(1) }).strict(),\n z.object({ kind: z.literal('native-archive'), entryId: z.uuid(), entryVersion: z.literal(2) }).strict(),\n ]),\n manifestDigest: z.string().regex(/^[a-f0-9]{64}$/),\n}).strict();\nexport const retirementResourceReceiptSchema = z.object({\n ownerId: key, resourceId: key,\n status: z.enum(['erased', 'reference-released', 'retained', 'failed']), reason: key.nullable(),\n}).strict().superRefine((value, ctx) => {\n if ((value.status === 'failed' || value.status === 'retained') !== (value.reason !== null)) {\n ctx.addIssue({ code: 'custom', message: 'Failure and retention require a reason; erased/released resources do not.' });\n }\n});\nexport const retirementAuthorizationSchema = z.discriminatedUnion('authorized', [\n z.object({ authorized: z.literal(true), authorizationId: z.uuid() }).strict(),\n z.object({ authorized: z.literal(false), reason: key }).strict(),\n]);\nexport const retirementStateSchema = z.object({\n schemaVersion: z.literal(1), request: retirementRequestSchema, manifest: retirementManifestSchema,\n authorizationId: z.uuid().nullable(),\n phase: z.enum(['rejected', 'conflict', 'fenced', 'quiesced', 'erasing', 'converging', 'done']),\n reason: key.nullable(), resources: z.array(retirementResourceReceiptSchema).max(4096),\n}).strict().superRefine((value, ctx) => {\n if (!lifecycleEqual(value.request.expected, value.manifest.lifecycle)) {\n ctx.addIssue({ code: 'custom', message: 'Owner state changed the requested lifecycle.' });\n }\n const refused = value.phase === 'rejected' || value.phase === 'conflict';\n if (refused !== (value.authorizationId === null)) {\n ctx.addIssue({ code: 'custom', message: 'Admitted owner state requires its handed-off authorization grant.' });\n }\n if (refused !== (value.reason !== null)) {\n ctx.addIssue({ code: 'custom', message: 'Admission refusal requires a reason.' });\n }\n const keys = value.resources.map(item => JSON.stringify([item.ownerId, item.resourceId]));\n if (new Set(keys).size !== keys.length) ctx.addIssue({ code: 'custom', message: 'Duplicate resource receipts.' });\n for (const receipt of value.resources) {\n const resource = value.manifest.resources.find(item => item.ownerId === receipt.ownerId && item.resourceId === receipt.resourceId);\n if (!resource) ctx.addIssue({ code: 'custom', message: 'Receipt is outside the frozen manifest.' });\n if (resource && receipt.status !== 'failed') {\n const expected = resource.disposition === 'erase' ? 'erased'\n : resource.disposition === 'release-reference' ? 'reference-released' : 'retained';\n if (receipt.status !== expected || (receipt.status === 'retained' && receipt.reason !== resource.retention?.reason)) {\n ctx.addIssue({ code: 'custom', message: 'Resource acknowledgement did not satisfy its frozen disposition and retention reason.' });\n }\n }\n }\n if (value.phase === 'done' && (value.resources.length !== value.manifest.resources.length\n || value.resources.some(receipt => receipt.status === 'failed'))) {\n ctx.addIssue({ code: 'custom', message: 'Completion requires every resource receipt without failures.' });\n }\n if (['rejected', 'conflict', 'fenced', 'quiesced'].includes(value.phase) && value.resources.length) {\n ctx.addIssue({ code: 'custom', message: 'Admission and quiescence phases cannot include resource erasure effects.' });\n }\n});\nexport const preparePurgeRequestSchema = z.object({ sessionId: key, operationId: key.optional() }).strict();\nexport const purgePlanSchema = z.object({\n schemaVersion: z.union([z.literal(1), z.literal(2)]), action: z.literal('purge'), operationId: key, sessionId: key,\n expectedEntryId: z.uuid().nullable(), binding: retirementBindingSchema.nullable(),\n manifest: retirementManifestSchema.nullable(), blockers: z.array(blockerSchema),\n}).strict().superRefine((value, ctx) => {\n if (value.binding && value.binding.schemaVersion !== value.schemaVersion) {\n ctx.addIssue({ code: 'custom', message: 'Legacy Bin and native archive deletion bindings cannot be interchanged.' });\n }\n if (value.binding && (value.binding.entryId !== value.expectedEntryId || value.binding.lifecycle.sessionId !== value.sessionId)) {\n ctx.addIssue({ code: 'custom', message: 'Purge binding differs from its target entry.' });\n }\n if (value.manifest && (!value.binding || !lifecycleEqual(value.binding.lifecycle, value.manifest.lifecycle))) {\n ctx.addIssue({ code: 'custom', message: 'Purge manifest differs from its bound lifecycle.' });\n }\n});\nexport const purgeResultSchema = z.object({\n action: z.literal('purge'), operationId: key, sessionId: key, entryId: z.uuid().nullable(),\n status: z.enum(['success', 'rejected', 'conflict', 'pending-recovery', 'partial-failure']), reason: key.nullable(),\n ownerState: retirementStateSchema.nullable(),\n}).strict().superRefine((value, ctx) => {\n if ((value.status === 'success') !== (value.reason === null)\n || (value.status === 'success' && value.ownerState?.phase !== 'done')) {\n ctx.addIssue({ code: 'custom', message: 'Success requires a complete owner receipt.' });\n }\n if (value.ownerState && (value.ownerState.request.operationId !== value.operationId\n || value.ownerState.request.expected.sessionId !== value.sessionId\n || value.ownerState.request.bin.entryId !== value.entryId)) {\n ctx.addIssue({ code: 'custom', message: 'Purge result differs from its owner receipt.' });\n }\n});\nexport const purgeOperationSchema = z.object({\n schemaVersion: z.union([z.literal(1), z.literal(2)]), plan: purgePlanSchema, createdAt: z.iso.datetime(),\n phase: z.enum(['intent', 'authorizing', 'owner-pending', 'done']), entry: z.union([entrySchema, archiveEntrySchema]).nullable(),\n authorizationId: z.uuid().nullable(),\n ownerState: retirementStateSchema.nullable(), result: purgeResultSchema.nullable(),\n}).strict().superRefine((value, ctx) => {\n const { plan, entry, result, ownerState } = value;\n if (value.schemaVersion !== plan.schemaVersion || (entry && entry.schemaVersion !== plan.schemaVersion)\n || (ownerState && ownerState.request.bin.entryVersion !== plan.schemaVersion)) {\n ctx.addIssue({ code: 'custom', message: 'Deletion journal target versions must agree.' });\n }\n if (entry && (entry.entryId !== plan.expectedEntryId || entry.sessionId !== plan.sessionId)) {\n ctx.addIssue({ code: 'custom', message: 'Purge journal entry differs from the plan.' });\n }\n if (value.phase !== 'done' && (!entry || !plan.binding || !plan.manifest)) {\n ctx.addIssue({ code: 'custom', message: 'Unfinished purge requires an entry, binding and manifest.' });\n }\n const terminalResult = result && ['success', 'rejected', 'conflict'].includes(result.status);\n if ((value.phase === 'done') !== Boolean(terminalResult)\n || (['intent', 'authorizing'].includes(value.phase) && (ownerState !== null || result !== null))\n || (value.phase === 'intent' && value.authorizationId !== null)\n || (value.phase === 'authorizing' && value.authorizationId === null)\n || (ownerState && ownerState.authorizationId !== null && ownerState.authorizationId !== value.authorizationId)\n || (value.phase === 'owner-pending' && (ownerState === null || result === null))) {\n ctx.addIssue({ code: 'custom', message: 'Purge journal phase and receipt are inconsistent.' });\n }\n if (result && (result.operationId !== plan.operationId || result.sessionId !== plan.sessionId\n || result.entryId !== (entry?.entryId ?? null) || JSON.stringify(result.ownerState) !== JSON.stringify(ownerState))) {\n ctx.addIssue({ code: 'custom', message: 'Purge journal result differs from its saved state.' });\n }\n});\n\nexport type LifecycleKey = z.infer<typeof lifecycleKeySchema>;\nexport type RetirementCapabilities = z.infer<typeof retirementCapabilitiesSchema>;\nexport type RetirementBinding = z.infer<typeof retirementBindingSchema>;\nexport type RetirementManifest = z.infer<typeof retirementManifestSchema>;\nexport type RetirementRequest = z.infer<typeof retirementRequestSchema>;\nexport type RetirementAuthorization = z.infer<typeof retirementAuthorizationSchema>;\nexport type RetirementState = z.infer<typeof retirementStateSchema>;\nexport type PurgePlan = z.infer<typeof purgePlanSchema>;\nexport type PurgeResult = z.infer<typeof purgeResultSchema>;\nexport type PurgeOperation = z.infer<typeof purgeOperationSchema>;\nexport type PreparePurgeRequest = z.infer<typeof preparePurgeRequestSchema>;\nexport function lifecycleEqual(a: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,WAAW,2EAA2E;AAAA,MAC9H,EAAE,MAAM,UAAU,MAAM,qBAAqB,WAAW,8FAA8F;AAAA,MACtJ,EAAE,MAAM,UAAU,MAAM,mBAAmB,WAAW,kEAAkE;AAAA,MACxH,EAAE,MAAM,UAAU,MAAM,UAAU,WAAW,6DAA6D;AAAA,IAC5G;AAAA,IAAG,OAAO,CAAC;AAAA,EAAE,CAAC,GAAG,QAAQ,CAAC,GAAG,SAAS,CAAC,EAAE;AAAA,EAAG,aAAa;AAC7D;",
6
+ "names": ["z", "z", "identity", "z", "z", "z", "key", "z"]
7
+ }
@@ -0,0 +1,17 @@
1
+ import type { HostObservable, InjectFace, PropsLocale, PropsRuntime, TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { BinClientState, SessionBinClientModel } from './model.js';
3
+ import { NS } from './locales.js';
4
+ export interface BinInjected {
5
+ hooks: {
6
+ bin: HostObservable<BinClientState>;
7
+ };
8
+ model: SessionBinClientModel;
9
+ }
10
+ type BinFace = InjectFace<BinInjected>;
11
+ type PanelProps = PropsRuntime<'main'> & PropsLocale<typeof NS> & BinFace;
12
+ type NoticeProps = PropsRuntime<'shell.overlay'> & PropsLocale<typeof NS> & BinFace;
13
+ export declare function reasonText(reason: string | null, t: TranslateNS<typeof NS>): string;
14
+ export declare function BinIcon({ size }: PropsRuntime<'sidebar.panellist'>): import("react/jsx-runtime").JSX.Element;
15
+ export declare function BinNotice({ useBin, model, t }: NoticeProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function BinPanel({ useBin, useSessions, useWorkspaces, model, t }: PanelProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import type { SessionBinRemoteApi } from '../remote/contracts.js';
3
+ export declare const panelId = "dsh-session-bin.panel";
4
+ export declare const inject: string[];
5
+ declare module '@deepseek-ai/dsh-typert-protocol' {
6
+ interface TypertRemoteNamespaceMap {
7
+ sessionBin: SessionBinRemoteApi;
8
+ }
9
+ }
10
+ export declare function apply(ctx: Context): Promise<void>;