@serve.zone/interfaces 32.103.0 → 32.104.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.
- package/changelog.md +7 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/requests/backup.d.ts +72 -0
- package/dist_ts/runtime.corestore.objectstoragebackup.d.ts +169 -0
- package/dist_ts/runtime.corestore.objectstoragebackup.js +370 -0
- package/dist_ts/runtime.d.ts +1 -0
- package/dist_ts/runtime.js +2 -1
- package/package.json +1 -1
- package/readme.md +35 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/requests/backup.ts +95 -0
- package/ts/runtime.corestore.objectstoragebackup.ts +583 -0
- package/ts/runtime.ts +1 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-11-21 - 32.104.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Define the resumable segmented ObjectStorage backup contract and validate scoped archive receipts before stream acceptance.
|
|
8
|
+
- Define the sealed bucket manifest, immutable artifact paths, ordered restore operations and relay closure delivery. Bind an absent-bucket restore to the admitted target allocation and the verified source manifest.
|
|
9
|
+
|
|
3
10
|
## 2026-11-19 - 32.103.0
|
|
4
11
|
|
|
5
12
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '32.
|
|
6
|
+
version: '32.104.0',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFVBQVU7SUFDbkIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
|
|
@@ -5,6 +5,7 @@ import type { ILocationScope } from '../data/location.js';
|
|
|
5
5
|
import type { IService } from '../data/service.js';
|
|
6
6
|
import type { IIdentity, IIdentityCredential } from '../data/user.js';
|
|
7
7
|
import type { ICorestoreDatabaseClosureDescriptor } from '../runtime.corestore.relay.js';
|
|
8
|
+
import type { ICorestoreObjectStorageBackupManifest, ICorestoreObjectStorageBackupSegmentDescriptor } from '../runtime.corestore.objectstoragebackup.js';
|
|
8
9
|
export interface IReq_Any_Cloudly_CreateServiceBackup extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Any_Cloudly_CreateServiceBackup> {
|
|
9
10
|
method: 'createServiceBackup';
|
|
10
11
|
request: {
|
|
@@ -295,6 +296,43 @@ export interface IReq_Relay_Cloudly_BackupServiceDatabaseClosure extends plugins
|
|
|
295
296
|
accepted: boolean;
|
|
296
297
|
};
|
|
297
298
|
}
|
|
299
|
+
/**
|
|
300
|
+
* The relay sends one sealed object-storage segment from its node to Cloudly.
|
|
301
|
+
* Its authenticated session names the cluster. Cloudly checks the backup,
|
|
302
|
+
* service, node, allocation and bucket against its own authority before accepting
|
|
303
|
+
* the stream. Stream acceptance proves this artifact was stored; a separate
|
|
304
|
+
* final manifest decides whether the complete bucket backup may be published.
|
|
305
|
+
*/
|
|
306
|
+
export interface IReq_Relay_Cloudly_BackupServiceObjectStorageSegment extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Relay_Cloudly_BackupServiceObjectStorageSegment> {
|
|
307
|
+
method: 'backupServiceObjectStorageSegment';
|
|
308
|
+
request: {
|
|
309
|
+
/** The cluster node whose Corestore sealed the segment. */
|
|
310
|
+
nodeId: string;
|
|
311
|
+
/** Validated before any artifact bytes move. */
|
|
312
|
+
descriptor: ICorestoreObjectStorageBackupSegmentDescriptor;
|
|
313
|
+
/** Requester sends the segment closure; the TypedHandler receives it. */
|
|
314
|
+
closure: plugins.typedrequestInterfaces.TVirtualStream<'send'>;
|
|
315
|
+
};
|
|
316
|
+
response: {
|
|
317
|
+
accepted: boolean;
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Cloudly publishes the complete bucket manifest only after every named immutable
|
|
322
|
+
* segment artifact was accepted and read back. The response's digest is over the
|
|
323
|
+
* shared canonical manifest, and publication is separate from segment acceptance.
|
|
324
|
+
*/
|
|
325
|
+
export interface IReq_Relay_Cloudly_CompleteServiceObjectStorageBackup extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Relay_Cloudly_CompleteServiceObjectStorageBackup> {
|
|
326
|
+
method: 'completeServiceObjectStorageBackup';
|
|
327
|
+
request: {
|
|
328
|
+
nodeId: string;
|
|
329
|
+
manifest: ICorestoreObjectStorageBackupManifest;
|
|
330
|
+
};
|
|
331
|
+
response: {
|
|
332
|
+
published: true;
|
|
333
|
+
manifestSha256: string;
|
|
334
|
+
};
|
|
335
|
+
}
|
|
298
336
|
/**
|
|
299
337
|
* The relay fetches one service database closure back from Cloudly.
|
|
300
338
|
*
|
|
@@ -320,6 +358,40 @@ export interface IReq_Relay_Cloudly_RestoreServiceDatabaseClosure extends plugin
|
|
|
320
358
|
closure: plugins.typedrequestInterfaces.TVirtualStream<'receive'>;
|
|
321
359
|
};
|
|
322
360
|
}
|
|
361
|
+
/** The relay obtains the one published manifest before staging any restored bytes. */
|
|
362
|
+
export interface IReq_Relay_Cloudly_GetServiceObjectStorageBackupManifest extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Relay_Cloudly_GetServiceObjectStorageBackupManifest> {
|
|
363
|
+
method: 'getServiceObjectStorageBackupManifest';
|
|
364
|
+
request: {
|
|
365
|
+
backupId: string;
|
|
366
|
+
serviceId: string;
|
|
367
|
+
nodeId: string;
|
|
368
|
+
snapshotId: string;
|
|
369
|
+
};
|
|
370
|
+
response: {
|
|
371
|
+
manifest: ICorestoreObjectStorageBackupManifest;
|
|
372
|
+
manifestSha256: string;
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* One immutable closure is served with its descriptor before the byte stream.
|
|
377
|
+
* Cloudly must resolve the exact published manifest and artifact by ordinal;
|
|
378
|
+
* the caller's digest is an equality fence, not authority to name another object.
|
|
379
|
+
*/
|
|
380
|
+
export interface IReq_Relay_Cloudly_RestoreServiceObjectStorageSegment extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Relay_Cloudly_RestoreServiceObjectStorageSegment> {
|
|
381
|
+
method: 'restoreServiceObjectStorageSegment';
|
|
382
|
+
request: {
|
|
383
|
+
backupId: string;
|
|
384
|
+
serviceId: string;
|
|
385
|
+
nodeId: string;
|
|
386
|
+
snapshotId: string;
|
|
387
|
+
manifestSha256: string;
|
|
388
|
+
ordinal: number;
|
|
389
|
+
};
|
|
390
|
+
response: {
|
|
391
|
+
descriptor: ICorestoreObjectStorageBackupSegmentDescriptor;
|
|
392
|
+
closure: plugins.typedrequestInterfaces.TVirtualStream<'receive'>;
|
|
393
|
+
};
|
|
394
|
+
}
|
|
323
395
|
/**
|
|
324
396
|
* Creates a restore in a new non-runnable data-plane scratch namespace.
|
|
325
397
|
* Cloudly derives clusterId and sourceServiceId from the authoritative backup,
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/** Corestore's 8 GiB snapshot encoder and 16 GiB closure, within ContainerArchive's own bounds. */
|
|
2
|
+
export declare const corestoreObjectStorageBackupLimits: Readonly<{
|
|
3
|
+
maximumControlBytes: number;
|
|
4
|
+
/** A 10 TiB bucket at 8 GiB per unit needs 1,280 full receipts. */
|
|
5
|
+
/** Leaves headroom below TypedSocket's 16 MiB text-frame ceiling. */
|
|
6
|
+
maximumManifestBytes: number;
|
|
7
|
+
maximumCursorBytes: 4096;
|
|
8
|
+
maximumSegments: 8192;
|
|
9
|
+
maximumSegmentBytes: number;
|
|
10
|
+
maximumClosureBytes: number;
|
|
11
|
+
maximumClosureObjects: 400506;
|
|
12
|
+
maximumClosurePacks: 200000;
|
|
13
|
+
maximumClosureChunks: 350000;
|
|
14
|
+
}>;
|
|
15
|
+
/** Corestore's segmented capture control routes; each requires control authentication. */
|
|
16
|
+
export declare const corestoreObjectStorageBackupPaths: Readonly<{
|
|
17
|
+
begin: "/resources/objectstorage/backup/begin";
|
|
18
|
+
status: "/resources/objectstorage/backup/status";
|
|
19
|
+
seal: "/resources/objectstorage/backup/seal";
|
|
20
|
+
chunk: "/resources/objectstorage/backup/chunk";
|
|
21
|
+
release: "/resources/objectstorage/backup/release";
|
|
22
|
+
restoreBegin: "/resources/objectstorage/backup/restore/begin";
|
|
23
|
+
restoreStatus: "/resources/objectstorage/backup/restore/status";
|
|
24
|
+
restoreSegment: "/resources/objectstorage/backup/restore/segment";
|
|
25
|
+
restoreSeal: "/resources/objectstorage/backup/restore/seal";
|
|
26
|
+
restorePublish: "/resources/objectstorage/backup/restore/publish";
|
|
27
|
+
restoreCancel: "/resources/objectstorage/backup/restore/cancel";
|
|
28
|
+
}>;
|
|
29
|
+
/** A nonempty chunk streams the exact ContainerArchive closure bytes. */
|
|
30
|
+
export declare const corestoreObjectStorageBackupMediaType = "application/octet-stream";
|
|
31
|
+
/** Base64url JSON of the normalized chunk response that describes the closure body. */
|
|
32
|
+
export declare const corestoreObjectStorageBackupChunkHeader = "x-corestore-objectstorage-backup-chunk";
|
|
33
|
+
/** The caller's durable identity for one bucket capture; no credential or endpoint travels here. */
|
|
34
|
+
export interface ICorestoreObjectStorageBackupScope {
|
|
35
|
+
backupId: string;
|
|
36
|
+
serviceId: string;
|
|
37
|
+
/** Caller-owned canonical lowercase UUID, distinct from each engine-generated segment ID. */
|
|
38
|
+
snapshotId: string;
|
|
39
|
+
allocation: {
|
|
40
|
+
bindingId: string;
|
|
41
|
+
resourceRef: string;
|
|
42
|
+
generation: number;
|
|
43
|
+
};
|
|
44
|
+
bucketName: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ICorestoreObjectStorageBackupBeginRequest extends ICorestoreObjectStorageBackupScope {
|
|
47
|
+
}
|
|
48
|
+
export interface ICorestoreObjectStorageBackupStatusRequest extends ICorestoreObjectStorageBackupScope {
|
|
49
|
+
}
|
|
50
|
+
export interface ICorestoreObjectStorageBackupSealRequest extends ICorestoreObjectStorageBackupScope {
|
|
51
|
+
}
|
|
52
|
+
export interface ICorestoreObjectStorageBackupReleaseRequest extends ICorestoreObjectStorageBackupScope {
|
|
53
|
+
}
|
|
54
|
+
/** Seal reports ObjectStorage's actual catalog counts, not estimates from frame sizes. */
|
|
55
|
+
export type TCorestoreObjectStorageBackupStatus = (ICorestoreObjectStorageBackupScope & {
|
|
56
|
+
phase: 'capturing';
|
|
57
|
+
}) | (ICorestoreObjectStorageBackupScope & {
|
|
58
|
+
phase: 'sealed';
|
|
59
|
+
objectCount: number;
|
|
60
|
+
totalPayloadBytes: number;
|
|
61
|
+
});
|
|
62
|
+
/** Exact replay of durable logical retirement returns this receipt; physical reclamation is independent. */
|
|
63
|
+
export interface ICorestoreObjectStorageBackupReleaseResponse extends ICorestoreObjectStorageBackupScope {
|
|
64
|
+
released: true;
|
|
65
|
+
}
|
|
66
|
+
/** One request obtains at most one segment. The cursor is transport state, never authority. */
|
|
67
|
+
export interface ICorestoreObjectStorageBackupChunkRequest extends ICorestoreObjectStorageBackupScope {
|
|
68
|
+
cursor?: string;
|
|
69
|
+
}
|
|
70
|
+
/** Exact ContainerArchive 0.15.0 closure-v1 completion receipt wire shape. */
|
|
71
|
+
export interface ICorestoreObjectStorageClosureReceipt {
|
|
72
|
+
/** Foreign ContainerArchive member; the normalizer admits exactly 1. */
|
|
73
|
+
formatVersion: number;
|
|
74
|
+
snapshotIds: [string];
|
|
75
|
+
objectCount: number;
|
|
76
|
+
packCount: number;
|
|
77
|
+
chunkCount: number;
|
|
78
|
+
payloadBytes: number;
|
|
79
|
+
archiveBytes: number;
|
|
80
|
+
sha256: string;
|
|
81
|
+
}
|
|
82
|
+
/** The logical segment and the exact opaque artifact that carries it. */
|
|
83
|
+
export interface ICorestoreObjectStorageBackupSegmentReceipt extends ICorestoreObjectStorageBackupScope {
|
|
84
|
+
segmentId: string;
|
|
85
|
+
ordinal: number;
|
|
86
|
+
offset: number;
|
|
87
|
+
length: number;
|
|
88
|
+
logicalSha256: string;
|
|
89
|
+
closure: ICorestoreObjectStorageClosureReceipt;
|
|
90
|
+
}
|
|
91
|
+
/** Announced before bytes move; the closure receipt is completion evidence, not backup completion. */
|
|
92
|
+
export interface ICorestoreObjectStorageBackupSegmentDescriptor {
|
|
93
|
+
size: number;
|
|
94
|
+
sha256: string;
|
|
95
|
+
receipt: ICorestoreObjectStorageBackupSegmentReceipt;
|
|
96
|
+
}
|
|
97
|
+
/** A null segment has no cursor; a present segment without one is the last artifact. */
|
|
98
|
+
export interface ICorestoreObjectStorageBackupChunkResponse {
|
|
99
|
+
segment: ICorestoreObjectStorageBackupSegmentDescriptor | null;
|
|
100
|
+
nextCursor?: string;
|
|
101
|
+
}
|
|
102
|
+
/** Relative to the backup's immutable artifact namespace. Cloudly owns its physical target. */
|
|
103
|
+
export interface ICorestoreObjectStorageBackupManifestSegment {
|
|
104
|
+
descriptor: ICorestoreObjectStorageBackupSegmentDescriptor;
|
|
105
|
+
artifactPath: string;
|
|
106
|
+
}
|
|
107
|
+
/** Published only after every segment artifact was durably accepted and read back. */
|
|
108
|
+
export interface ICorestoreObjectStorageBackupManifest extends ICorestoreObjectStorageBackupScope {
|
|
109
|
+
format: 'corestore.objectstorage.backup.manifest';
|
|
110
|
+
objectCount: number;
|
|
111
|
+
totalPayloadBytes: number;
|
|
112
|
+
logicalBytes: number;
|
|
113
|
+
segments: ICorestoreObjectStorageBackupManifestSegment[];
|
|
114
|
+
}
|
|
115
|
+
/** One restore attempt, bound to the exact admitted manifest and target allocation. */
|
|
116
|
+
export interface ICorestoreObjectStorageRestoreScope {
|
|
117
|
+
restoreId: string;
|
|
118
|
+
backupId: string;
|
|
119
|
+
snapshotId: string;
|
|
120
|
+
manifestSha256: string;
|
|
121
|
+
targetServiceId: string;
|
|
122
|
+
targetAllocation: ICorestoreObjectStorageBackupScope['allocation'];
|
|
123
|
+
/** Native fenced publication currently requires this bucket to be absent. */
|
|
124
|
+
targetBucketName: string;
|
|
125
|
+
}
|
|
126
|
+
/** The large manifest is admitted once; later control requests carry only its digest. */
|
|
127
|
+
export interface ICorestoreObjectStorageRestoreBeginRequest extends ICorestoreObjectStorageRestoreScope {
|
|
128
|
+
manifest: ICorestoreObjectStorageBackupManifest;
|
|
129
|
+
}
|
|
130
|
+
/** Used by status, seal, publish and cancel; segment adds only its ordinal. */
|
|
131
|
+
export interface ICorestoreObjectStorageRestoreRequest extends ICorestoreObjectStorageRestoreScope {
|
|
132
|
+
}
|
|
133
|
+
export interface ICorestoreObjectStorageRestoreSegmentRequest extends ICorestoreObjectStorageRestoreScope {
|
|
134
|
+
ordinal: number;
|
|
135
|
+
}
|
|
136
|
+
export interface ICorestoreObjectStorageRestoreStatus extends ICorestoreObjectStorageRestoreScope {
|
|
137
|
+
nextOrdinal: number;
|
|
138
|
+
objectCount: number;
|
|
139
|
+
totalPayloadBytes: number;
|
|
140
|
+
sealed: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface ICorestoreObjectStorageRestorePublishResponse extends ICorestoreObjectStorageRestoreScope {
|
|
143
|
+
published: true;
|
|
144
|
+
replayed: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface ICorestoreObjectStorageRestoreCancelResponse extends ICorestoreObjectStorageRestoreScope {
|
|
147
|
+
done: boolean;
|
|
148
|
+
}
|
|
149
|
+
export declare const normalizeCorestoreObjectStorageBackupScope: (value: unknown) => Readonly<ICorestoreObjectStorageBackupScope>;
|
|
150
|
+
export declare const normalizeCorestoreObjectStorageBackupStatus: (value: unknown) => Readonly<TCorestoreObjectStorageBackupStatus>;
|
|
151
|
+
export declare const normalizeCorestoreObjectStorageBackupReleaseResponse: (value: unknown) => Readonly<ICorestoreObjectStorageBackupReleaseResponse>;
|
|
152
|
+
export declare const normalizeCorestoreObjectStorageBackupChunkRequest: (value: unknown) => Readonly<ICorestoreObjectStorageBackupChunkRequest>;
|
|
153
|
+
export declare const normalizeCorestoreObjectStorageBackupSegmentReceipt: (value: unknown) => Readonly<ICorestoreObjectStorageBackupSegmentReceipt>;
|
|
154
|
+
export declare const normalizeCorestoreObjectStorageBackupSegmentDescriptor: (value: unknown) => Readonly<ICorestoreObjectStorageBackupSegmentDescriptor>;
|
|
155
|
+
export declare const normalizeCorestoreObjectStorageBackupChunkResponse: (value: unknown) => Readonly<ICorestoreObjectStorageBackupChunkResponse>;
|
|
156
|
+
/** The path is relative to a backup, with the artifact digest in its immutable name. */
|
|
157
|
+
export declare const corestoreObjectStorageSegmentArtifactPath: (snapshotId: string, ordinal: number, sha256: string) => string;
|
|
158
|
+
export declare const normalizeCorestoreObjectStorageBackupManifest: (value: unknown) => Readonly<ICorestoreObjectStorageBackupManifest>;
|
|
159
|
+
/** Hashes the exact normalized manifest; its digest is stored separately from the manifest. */
|
|
160
|
+
export declare const computeCorestoreObjectStorageBackupManifestSha256: (value: unknown) => Promise<string>;
|
|
161
|
+
/** Admits a restore's manifest only when its independent digest matches. */
|
|
162
|
+
export declare const verifyCorestoreObjectStorageRestoreBeginRequest: (value: unknown) => Promise<Readonly<ICorestoreObjectStorageRestoreBeginRequest>>;
|
|
163
|
+
export declare const normalizeCorestoreObjectStorageRestoreScope: (value: unknown) => Readonly<ICorestoreObjectStorageRestoreScope>;
|
|
164
|
+
/** Structural admission only; compare `manifestSha256` with the computed digest before storing. */
|
|
165
|
+
export declare const normalizeCorestoreObjectStorageRestoreBeginRequest: (value: unknown) => Readonly<ICorestoreObjectStorageRestoreBeginRequest>;
|
|
166
|
+
export declare const normalizeCorestoreObjectStorageRestoreSegmentRequest: (value: unknown) => Readonly<ICorestoreObjectStorageRestoreSegmentRequest>;
|
|
167
|
+
export declare const normalizeCorestoreObjectStorageRestoreStatus: (value: unknown) => Readonly<ICorestoreObjectStorageRestoreStatus>;
|
|
168
|
+
export declare const normalizeCorestoreObjectStorageRestorePublishResponse: (value: unknown) => Readonly<ICorestoreObjectStorageRestorePublishResponse>;
|
|
169
|
+
export declare const normalizeCorestoreObjectStorageRestoreCancelResponse: (value: unknown) => Readonly<ICorestoreObjectStorageRestoreCancelResponse>;
|