@serve.zone/interfaces 32.114.0 → 32.115.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 +13 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/backup/index.d.ts +2 -0
- package/dist_ts/data/backup/index.js +3 -0
- package/dist_ts/data/coremail/index.d.ts +2 -0
- package/dist_ts/data/coremail/index.js +3 -0
- package/dist_ts/data/corestorereplication.d.ts +90 -0
- package/dist_ts/data/corestorereplication.js +129 -0
- package/dist_ts/data/dcstorage.d.ts +206 -0
- package/dist_ts/data/dcstorage.js +322 -0
- package/dist_ts/data/delegatedadmintoken.d.ts +4 -2
- package/dist_ts/data/delegatedadmintoken.js +9 -3
- package/dist_ts/data/gateway.d.ts +13 -0
- package/dist_ts/data/gateway.js +6 -2
- package/dist_ts/data/gatewayarearows.d.ts +17 -11
- package/dist_ts/data/gatewayarearows.js +27 -11
- package/dist_ts/data/gatewayareas.d.ts +12 -2
- package/dist_ts/data/gatewayareas.js +5 -2
- package/dist_ts/data/gatewayareas.validation.js +11 -5
- package/dist_ts/data/index.d.ts +3 -0
- package/dist_ts/data/index.js +4 -1
- package/dist_ts/data/preparedimages.d.ts +80 -0
- package/dist_ts/data/preparedimages.js +154 -0
- package/dist_ts/index.d.ts +8 -2
- package/dist_ts/index.js +9 -3
- package/dist_ts/requests/backup.d.ts +1 -1
- package/dist_ts/requests/backup.js +2 -2
- package/dist_ts/requests/corestore.d.ts +1 -1
- package/dist_ts/requests/corestore.js +1 -2
- package/dist_ts/requests/corestorereplication.d.ts +108 -0
- package/dist_ts/requests/corestorereplication.js +2 -0
- package/dist_ts/requests/dcstorage.d.ts +204 -0
- package/dist_ts/requests/dcstorage.js +2 -0
- package/dist_ts/requests/gateway.d.ts +1 -1
- package/dist_ts/requests/gateway.js +2 -2
- package/dist_ts/requests/gatewaycertificatestore.d.ts +10 -0
- package/dist_ts/requests/gatewaycertificatestore.js +27 -10
- package/dist_ts/requests/gatewayconnector.d.ts +1 -1
- package/dist_ts/requests/gatewayconnector.js +2 -2
- package/dist_ts/requests/gatewayhealth.d.ts +65 -0
- package/dist_ts/requests/gatewayhealth.js +72 -0
- package/dist_ts/requests/gatewayremoteingress.d.ts +10 -2
- package/dist_ts/requests/gatewayremoteingress.js +7 -2
- package/dist_ts/requests/index.d.ts +4 -0
- package/dist_ts/requests/index.js +5 -1
- package/dist_ts/requests/mail.d.ts +1 -1
- package/dist_ts/requests/mail.js +2 -2
- package/dist_ts/requests/preparedimages.d.ts +24 -0
- package/dist_ts/requests/preparedimages.js +2 -0
- package/package.json +105 -1
- package/readme.md +91 -10
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/backup/index.ts +2 -0
- package/ts/data/coremail/index.ts +2 -0
- package/ts/data/corestorereplication.ts +223 -0
- package/ts/data/dcstorage.ts +505 -0
- package/ts/data/delegatedadmintoken.ts +9 -3
- package/ts/data/gateway.ts +18 -1
- package/ts/data/gatewayarearows.ts +32 -13
- package/ts/data/gatewayareas.ts +15 -3
- package/ts/data/gatewayareas.validation.ts +10 -4
- package/ts/data/index.ts +3 -0
- package/ts/data/preparedimages.ts +231 -0
- package/ts/index.ts +9 -2
- package/ts/requests/backup.ts +1 -1
- package/ts/requests/corestore.ts +1 -1
- package/ts/requests/corestorereplication.ts +123 -0
- package/ts/requests/dcstorage.ts +208 -0
- package/ts/requests/gateway.ts +1 -1
- package/ts/requests/gatewaycertificatestore.ts +34 -9
- package/ts/requests/gatewayconnector.ts +1 -1
- package/ts/requests/gatewayhealth.ts +135 -0
- package/ts/requests/gatewayremoteingress.ts +15 -3
- package/ts/requests/index.ts +4 -0
- package/ts/requests/mail.ts +1 -1
- package/ts/requests/preparedimages.ts +39 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-11-22 - 32.115.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Define capability-gated staged RemoteIngress secret rotation, with redacted connection slot status and staged token reads after hub acknowledgment.
|
|
8
|
+
- Add a separately advertised related legacy certificate import shape to the existing gateway and administrator request family. It fences the observed related selector with content and usage revisions while creating a new raw wildcard selector.
|
|
9
|
+
- Add the delegated-admin `monitor` scope for six native read methods covering cluster, node, service, deployment and runtime log observations.
|
|
10
|
+
- Define a capability-gated gateway service health read and its Cloudly administrator request. The bounded report carries dcrouter release, observation time, uptime and closed service health states.
|
|
11
|
+
- Add dcstorage enrollment, fenced filesystem volume ownership, pool membership and value-free telemetry contracts for Cloudly.
|
|
12
|
+
- Add ESM and TypeScript subpath exports for the six platform areas and focused gateway (including service health), CoreMail, mail, backup, Corestore and dcstorage contracts. Existing package entry points keep their APIs.
|
|
13
|
+
- Add prepared shadow-image list sync, value-free Pallet observations and attempt-scoped pull credentials.
|
|
14
|
+
- Add per-binding Corestore replication roles, timelines, value-free lag and fenced link grants and lifecycle requests.
|
|
15
|
+
|
|
3
16
|
## 2026-11-22 - 32.114.0
|
|
4
17
|
|
|
5
18
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '32.
|
|
6
|
+
version: '32.115.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=
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from '../backup.js';
|
|
2
|
+
export * from '../backuprestorerefusal.js';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90cy9kYXRhL2JhY2t1cC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLDRCQUE0QixDQUFDIn0=
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from '../coremail.js';
|
|
2
|
+
export * from '../coremail.runtime.js';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi90cy9kYXRhL2NvcmVtYWlsL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyx3QkFBd0IsQ0FBQyJ9
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export type TCorestoreReplicationRole = 'primary' | 'replica' | 'standalone';
|
|
2
|
+
export interface ICorestoreReplicationBinding {
|
|
3
|
+
organizationId: string;
|
|
4
|
+
serviceId: string;
|
|
5
|
+
bindingId: string;
|
|
6
|
+
capability: 'database' | 'objectstorage';
|
|
7
|
+
}
|
|
8
|
+
export interface ICorestoreReplicationTimeline {
|
|
9
|
+
timelineId: string;
|
|
10
|
+
/** A positive counter for this binding, advanced on writer changes. */
|
|
11
|
+
epoch: number;
|
|
12
|
+
/** The lowest admissible sequence on this timeline, inclusive. */
|
|
13
|
+
sequenceFloor: number;
|
|
14
|
+
}
|
|
15
|
+
export type TCorestoreReplicationBindingRole = {
|
|
16
|
+
role: 'standalone';
|
|
17
|
+
timeline: null;
|
|
18
|
+
} | {
|
|
19
|
+
role: 'primary' | 'replica';
|
|
20
|
+
timeline: ICorestoreReplicationTimeline;
|
|
21
|
+
};
|
|
22
|
+
export interface ICorestoreReplicationLagReport {
|
|
23
|
+
role: TCorestoreReplicationRole;
|
|
24
|
+
timelineId: string | null;
|
|
25
|
+
/** Null represents unknown or inapplicable lag. Zero represents measured zero lag. */
|
|
26
|
+
lagBytes: number | null;
|
|
27
|
+
lagMs: number | null;
|
|
28
|
+
/** Whether this replica has completed a usable first copy on the reported timeline. */
|
|
29
|
+
firstCopyComplete: boolean;
|
|
30
|
+
/** Time of the last successful replica sync, in Unix milliseconds. */
|
|
31
|
+
lastSyncAt: number | null;
|
|
32
|
+
}
|
|
33
|
+
/** Public identity and routing metadata for a specific provider-local binding. */
|
|
34
|
+
export interface ICorestoreReplicationPeer {
|
|
35
|
+
locationId: string;
|
|
36
|
+
clusterId: string;
|
|
37
|
+
nodeId: string;
|
|
38
|
+
localBindingId: string;
|
|
39
|
+
/** Opaque public identity reference to compare with the authenticated transport peer. */
|
|
40
|
+
peerIdentityId: string;
|
|
41
|
+
directOrigin: string;
|
|
42
|
+
}
|
|
43
|
+
/** Expected authority for the exact directed link, never a bearer or writer capability. */
|
|
44
|
+
export interface ICorestoreReplicationFence {
|
|
45
|
+
linkId: string;
|
|
46
|
+
binding: ICorestoreReplicationBinding;
|
|
47
|
+
/** Monotone for the binding even after revocation. */
|
|
48
|
+
generation: number;
|
|
49
|
+
controllerId: string;
|
|
50
|
+
controllerEpoch: number;
|
|
51
|
+
timeline: ICorestoreReplicationTimeline;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Cloudly authorizes this directed binding and both Corestores persist the metadata. Replication
|
|
55
|
+
* proceeds directly between authenticated peers during Cloudly downtime. Each peer compares the
|
|
56
|
+
* grant with the durable fence and its authenticated counterpart before opening the data path.
|
|
57
|
+
* Provider tokens stay at their own site.
|
|
58
|
+
*/
|
|
59
|
+
export interface ICorestoreReplicationGrant {
|
|
60
|
+
fence: ICorestoreReplicationFence;
|
|
61
|
+
primary: ICorestoreReplicationPeer;
|
|
62
|
+
replica: ICorestoreReplicationPeer;
|
|
63
|
+
}
|
|
64
|
+
/** An authenticated, durable source receipt for a planned switchover. */
|
|
65
|
+
export interface ICorestoreReplicationQuiescence {
|
|
66
|
+
fence: ICorestoreReplicationFence;
|
|
67
|
+
fenceReceiptId: string;
|
|
68
|
+
/** The final committed source sequence after closing writes. */
|
|
69
|
+
finalSequence: number;
|
|
70
|
+
}
|
|
71
|
+
export interface ICorestoreReplicationPromotion {
|
|
72
|
+
expected: ICorestoreReplicationFence;
|
|
73
|
+
nextTimeline: ICorestoreReplicationTimeline;
|
|
74
|
+
/** A reference to verified old-writer fencing, resolved by the authority that owns it. */
|
|
75
|
+
fenceReceiptId: string;
|
|
76
|
+
/** The minimum sequence applied on the old timeline. Switchover uses the final sequence. */
|
|
77
|
+
minimumAppliedSequence: number;
|
|
78
|
+
}
|
|
79
|
+
/** Standalone has no replication timeline. Both linked roles carry an exact timeline. */
|
|
80
|
+
export declare const snapshotCorestoreReplicationBindingRole: (value: unknown) => TCorestoreReplicationBindingRole;
|
|
81
|
+
/** Select only public observations from a local provider sample without reading other properties. */
|
|
82
|
+
export declare const projectCorestoreReplicationLagReport: (value: unknown) => ICorestoreReplicationLagReport;
|
|
83
|
+
/** Read an exact wire report and refuse any additional field. Lag alone never authorizes a write. */
|
|
84
|
+
export declare const snapshotCorestoreReplicationLagReport: (value: unknown) => ICorestoreReplicationLagReport;
|
|
85
|
+
export declare const snapshotCorestoreReplicationFence: (value: unknown) => ICorestoreReplicationFence;
|
|
86
|
+
/** Check the grant shape. Consumers resolve both peer/binding identities from trusted records. */
|
|
87
|
+
export declare const snapshotCorestoreReplicationGrant: (value: unknown) => ICorestoreReplicationGrant;
|
|
88
|
+
export declare const snapshotCorestoreReplicationQuiescence: (value: unknown) => ICorestoreReplicationQuiescence;
|
|
89
|
+
/** Validate the proposed timeline transition. Only provider evidence can prove fencing and apply. */
|
|
90
|
+
export declare const snapshotCorestoreReplicationPromotion: (value: unknown) => ICorestoreReplicationPromotion;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { validateControllerIdentifier, validateControllerOrigin } from '../private/controllercontract.js';
|
|
2
|
+
import { isPlainRecord, readDataProperty, readExactDataRecord } from '../private/dataproperties.js';
|
|
3
|
+
import { isClusterNodeId } from '../private/nodeidentifier.js';
|
|
4
|
+
import { isBoundedInteger } from '../private/runtimepolicy.js';
|
|
5
|
+
import { validateServiceId } from './coremail.runtime.js';
|
|
6
|
+
const invalid = () => { throw new Error('Corestore replication contract rejected.'); };
|
|
7
|
+
const exact = (value, keys) => readExactDataRecord(value, keys) ?? invalid();
|
|
8
|
+
const identifier = (value) => typeof value === 'string' && validateControllerIdentifier(value, 'identifier').length === 0 ? value : invalid();
|
|
9
|
+
const counter = (value, minimum) => isBoundedInteger(value, minimum, Number.MAX_SAFE_INTEGER) ? value : invalid();
|
|
10
|
+
const optionalCounter = (value, minimum) => value === null ? null : counter(value, minimum);
|
|
11
|
+
const roleOf = (value) => {
|
|
12
|
+
if (value === 'primary' || value === 'replica' || value === 'standalone')
|
|
13
|
+
return value;
|
|
14
|
+
return invalid();
|
|
15
|
+
};
|
|
16
|
+
const timelineOf = (value) => {
|
|
17
|
+
const timeline = exact(value, ['timelineId', 'epoch', 'sequenceFloor']);
|
|
18
|
+
return {
|
|
19
|
+
timelineId: identifier(timeline.timelineId),
|
|
20
|
+
epoch: counter(timeline.epoch, 1),
|
|
21
|
+
sequenceFloor: counter(timeline.sequenceFloor, 0),
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/** Standalone has no replication timeline. Both linked roles carry an exact timeline. */
|
|
25
|
+
export const snapshotCorestoreReplicationBindingRole = (value) => {
|
|
26
|
+
const state = exact(value, ['role', 'timeline']);
|
|
27
|
+
const role = roleOf(state.role);
|
|
28
|
+
if (role === 'standalone')
|
|
29
|
+
return state.timeline === null ? { role, timeline: null } : invalid();
|
|
30
|
+
return { role, timeline: timelineOf(state.timeline) };
|
|
31
|
+
};
|
|
32
|
+
const lagKeys = ['role', 'timelineId', 'lagBytes', 'lagMs', 'firstCopyComplete', 'lastSyncAt'];
|
|
33
|
+
const lagOf = (value) => {
|
|
34
|
+
const role = roleOf(value.role);
|
|
35
|
+
if (role === 'standalone' && value.timelineId !== null)
|
|
36
|
+
return invalid();
|
|
37
|
+
const timelineId = role === 'standalone' ? null : identifier(value.timelineId);
|
|
38
|
+
if (typeof value.firstCopyComplete !== 'boolean')
|
|
39
|
+
return invalid();
|
|
40
|
+
const { firstCopyComplete } = value;
|
|
41
|
+
const lagBytes = optionalCounter(value.lagBytes, 0);
|
|
42
|
+
const lagMs = optionalCounter(value.lagMs, 0);
|
|
43
|
+
const lastSyncAt = optionalCounter(value.lastSyncAt, 1);
|
|
44
|
+
if ((role !== 'replica' && firstCopyComplete)
|
|
45
|
+
|| (!firstCopyComplete && (lagBytes !== null || lagMs !== null || lastSyncAt !== null)))
|
|
46
|
+
return invalid();
|
|
47
|
+
return { role, timelineId, lagBytes, lagMs, firstCopyComplete, lastSyncAt };
|
|
48
|
+
};
|
|
49
|
+
/** Select only public observations from a local provider sample without reading other properties. */
|
|
50
|
+
export const projectCorestoreReplicationLagReport = (value) => {
|
|
51
|
+
if (!isPlainRecord(value))
|
|
52
|
+
return invalid();
|
|
53
|
+
const fields = Object.fromEntries(lagKeys.map((key) => {
|
|
54
|
+
const field = readDataProperty(value, key) ?? invalid();
|
|
55
|
+
return [key, field.value];
|
|
56
|
+
}));
|
|
57
|
+
return lagOf(fields);
|
|
58
|
+
};
|
|
59
|
+
/** Read an exact wire report and refuse any additional field. Lag alone never authorizes a write. */
|
|
60
|
+
export const snapshotCorestoreReplicationLagReport = (value) => lagOf(exact(value, lagKeys));
|
|
61
|
+
const bindingOf = (value) => {
|
|
62
|
+
const binding = exact(value, ['organizationId', 'serviceId', 'bindingId', 'capability']);
|
|
63
|
+
const { capability, serviceId } = binding;
|
|
64
|
+
if ((capability !== 'database' && capability !== 'objectstorage')
|
|
65
|
+
|| typeof serviceId !== 'string' || validateServiceId(serviceId).length !== 0)
|
|
66
|
+
return invalid();
|
|
67
|
+
return { organizationId: identifier(binding.organizationId), serviceId, bindingId: identifier(binding.bindingId), capability };
|
|
68
|
+
};
|
|
69
|
+
const peerOf = (value) => {
|
|
70
|
+
const peer = exact(value, ['locationId', 'clusterId', 'nodeId', 'localBindingId', 'peerIdentityId', 'directOrigin']);
|
|
71
|
+
const { nodeId, directOrigin } = peer;
|
|
72
|
+
if (!isClusterNodeId(nodeId) || typeof directOrigin !== 'string'
|
|
73
|
+
|| validateControllerOrigin(directOrigin, 'directOrigin', 2048).length !== 0)
|
|
74
|
+
return invalid();
|
|
75
|
+
return {
|
|
76
|
+
locationId: identifier(peer.locationId),
|
|
77
|
+
clusterId: identifier(peer.clusterId),
|
|
78
|
+
nodeId,
|
|
79
|
+
localBindingId: identifier(peer.localBindingId),
|
|
80
|
+
peerIdentityId: identifier(peer.peerIdentityId),
|
|
81
|
+
directOrigin,
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export const snapshotCorestoreReplicationFence = (value) => {
|
|
85
|
+
const fence = exact(value, ['linkId', 'binding', 'generation', 'controllerId', 'controllerEpoch', 'timeline']);
|
|
86
|
+
return {
|
|
87
|
+
linkId: identifier(fence.linkId),
|
|
88
|
+
binding: bindingOf(fence.binding),
|
|
89
|
+
generation: counter(fence.generation, 1),
|
|
90
|
+
controllerId: identifier(fence.controllerId),
|
|
91
|
+
controllerEpoch: counter(fence.controllerEpoch, 1),
|
|
92
|
+
timeline: timelineOf(fence.timeline),
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
/** Check the grant shape. Consumers resolve both peer/binding identities from trusted records. */
|
|
96
|
+
export const snapshotCorestoreReplicationGrant = (value) => {
|
|
97
|
+
const grant = exact(value, ['fence', 'primary', 'replica']);
|
|
98
|
+
const primary = peerOf(grant.primary);
|
|
99
|
+
const replica = peerOf(grant.replica);
|
|
100
|
+
if (primary.locationId === replica.locationId || primary.clusterId === replica.clusterId
|
|
101
|
+
|| primary.nodeId === replica.nodeId || primary.peerIdentityId === replica.peerIdentityId
|
|
102
|
+
|| primary.directOrigin === replica.directOrigin)
|
|
103
|
+
return invalid();
|
|
104
|
+
return { fence: snapshotCorestoreReplicationFence(grant.fence), primary, replica };
|
|
105
|
+
};
|
|
106
|
+
export const snapshotCorestoreReplicationQuiescence = (value) => {
|
|
107
|
+
const receipt = exact(value, ['fence', 'fenceReceiptId', 'finalSequence']);
|
|
108
|
+
const fence = snapshotCorestoreReplicationFence(receipt.fence);
|
|
109
|
+
return {
|
|
110
|
+
fence,
|
|
111
|
+
fenceReceiptId: identifier(receipt.fenceReceiptId),
|
|
112
|
+
finalSequence: counter(receipt.finalSequence, fence.timeline.sequenceFloor),
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
/** Validate the proposed timeline transition. Only provider evidence can prove fencing and apply. */
|
|
116
|
+
export const snapshotCorestoreReplicationPromotion = (value) => {
|
|
117
|
+
const promotion = exact(value, ['expected', 'nextTimeline', 'fenceReceiptId', 'minimumAppliedSequence']);
|
|
118
|
+
const expected = snapshotCorestoreReplicationFence(promotion.expected);
|
|
119
|
+
const nextTimeline = timelineOf(promotion.nextTimeline);
|
|
120
|
+
if (nextTimeline.timelineId === expected.timeline.timelineId || nextTimeline.epoch <= expected.timeline.epoch)
|
|
121
|
+
return invalid();
|
|
122
|
+
return {
|
|
123
|
+
expected,
|
|
124
|
+
nextTimeline,
|
|
125
|
+
fenceReceiptId: identifier(promotion.fenceReceiptId),
|
|
126
|
+
minimumAppliedSequence: counter(promotion.minimumAppliedSequence, expected.timeline.sequenceFloor),
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
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HLE1BQU0sUUFBUSxHQUFHLGlDQUFpQyxDQUFDLFNBQVMsQ0FBQyxRQUFRLENBQUMsQ0FBQztJQUN2RSxNQUFNLFlBQVksR0FBRyxVQUFVLENBQUMsU0FBUyxDQUFDLFlBQVksQ0FBQyxDQUFDO0lBQ3hELElBQUksWUFBWSxDQUFDLFVBQVUsS0FBSyxRQUFRLENBQUMsUUFBUSxDQUFDLFVBQVUsSUFBSSxZQUFZLENBQUMsS0FBSyxJQUFJLFFBQVEsQ0FBQyxRQUFRLENBQUMsS0FBSztRQUFFLE9BQU8sT0FBTyxFQUFFLENBQUM7SUFDaEksT0FBTztRQUNMLFFBQVE7UUFDUixZQUFZO1FBQ1osY0FBYyxFQUFFLFVBQVUsQ0FBQyxTQUFTLENBQUMsY0FBYyxDQUFDO1FBQ3BELHNCQUFzQixFQUFFLE9BQU8sQ0FBQyxTQUFTLENBQUMsc0JBQXNCLEVBQUUsUUFBUSxDQUFDLFFBQVEsQ0FBQyxhQUFhLENBQUM7S0FDbkcsQ0FBQztBQUNKLENBQUMsQ0FBQyJ9
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import type { IProtocolOffer } from '../protocol.js';
|
|
2
|
+
export declare const dcStorageBounds: Readonly<{
|
|
3
|
+
mountPathLength: 255;
|
|
4
|
+
volumesPerNode: 64;
|
|
5
|
+
membersPerPool: 16;
|
|
6
|
+
reportedMembersPerNode: 64;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const dcStorageEnrollmentStates: readonly ["pending", "enrolled", "revoked"];
|
|
9
|
+
export declare const dcStorageNodeHealthStates: readonly ["unknown", "healthy", "degraded", "offline"];
|
|
10
|
+
export declare const dcStorageVolumeHealthStates: readonly ["healthy", "degraded", "unavailable"];
|
|
11
|
+
export declare const dcStoragePoolStates: readonly ["writable", "read-only", "unavailable"];
|
|
12
|
+
export declare const dcStoragePoolMemberStates: readonly ["pending", "admitting", "active", "draining", "drained", "replacing", "faulted", "retired"];
|
|
13
|
+
export declare const dcStorageNativeMemberStates: readonly ["stopped", "starting", "ready", "faulted"];
|
|
14
|
+
export declare const dcStorageVolumeRefusals: readonly ["mount-missing", "identity-unreadable", "mount-target-mismatch", "filesystem-uuid-missing", "filesystem-uuid-mismatch", "marker-missing", "marker-mismatch"];
|
|
15
|
+
export declare const dcStorageTransitionRefusals: readonly ["invalid-member-transition", "volume-not-writable", "native-operation-unsupported", "quorum-unsafe", "writer-not-fenced", "drain-incomplete", "replacement-not-reserved", "native-membership-unconfirmed"];
|
|
16
|
+
export declare const dcStorageRefusals: readonly ["request-invalid", "administrator-required", "fresh-sign-in-required", "enrollment-invalid", "credential-invalid", "protocol-incompatible", "capability-unsupported", "not-found", "location-not-found", "placement-conflict", "stale-fence", "volume-in-use", "mount-missing", "identity-unreadable", "mount-target-mismatch", "filesystem-uuid-missing", "filesystem-uuid-mismatch", "marker-missing", "marker-mismatch", "invalid-member-transition", "volume-not-writable", "native-operation-unsupported", "quorum-unsafe", "writer-not-fenced", "drain-incomplete", "replacement-not-reserved", "native-membership-unconfirmed", "outcome-unknown"];
|
|
17
|
+
export type TDcStorageVolumeRefusal = typeof dcStorageVolumeRefusals[number];
|
|
18
|
+
export type TDcStorageTransitionRefusal = typeof dcStorageTransitionRefusals[number];
|
|
19
|
+
export type TDcStorageRefusal = typeof dcStorageRefusals[number];
|
|
20
|
+
export type TDcStoragePoolMemberState = typeof dcStoragePoolMemberStates[number];
|
|
21
|
+
export interface IDcStorageFailureDomain {
|
|
22
|
+
/** Cloudly inventory IDs, scoped to the location. VMs on the same host share hostId. */
|
|
23
|
+
hostId: string;
|
|
24
|
+
rackId: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface IDcStorageCapabilities {
|
|
27
|
+
filesystemVolumes: boolean;
|
|
28
|
+
/** The node can supervise a native member. This alone authorizes no topology changes. */
|
|
29
|
+
objectStorageMembers: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Controller-owned inventory. lastSeenAt is Cloudly's receive time, in Unix milliseconds. */
|
|
32
|
+
export interface IDcStorageNode {
|
|
33
|
+
id: string;
|
|
34
|
+
locationId: string;
|
|
35
|
+
failureDomain: IDcStorageFailureDomain;
|
|
36
|
+
enrollmentState: typeof dcStorageEnrollmentStates[number];
|
|
37
|
+
credentialGeneration: number;
|
|
38
|
+
/** CAS revision for controller-owned node intent, including assignments. */
|
|
39
|
+
revision: number;
|
|
40
|
+
softwareVersion: string | null;
|
|
41
|
+
capabilities: IDcStorageCapabilities;
|
|
42
|
+
health: typeof dcStorageNodeHealthStates[number];
|
|
43
|
+
lastSeenAt: number | null;
|
|
44
|
+
}
|
|
45
|
+
export interface IDcStorageFilesystemIdentity {
|
|
46
|
+
mountPath: string;
|
|
47
|
+
fsUuid: string;
|
|
48
|
+
markerId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface IDcStorageVolumeAssignment {
|
|
51
|
+
volumeId: string;
|
|
52
|
+
nodeId: string;
|
|
53
|
+
/** Increases on any new assignment of this volume. Retain the high-water mark after release. */
|
|
54
|
+
generation: number;
|
|
55
|
+
expected: IDcStorageFilesystemIdentity;
|
|
56
|
+
}
|
|
57
|
+
export type TDcStorageObservedFilesystem = {
|
|
58
|
+
kind: 'unmounted';
|
|
59
|
+
} | {
|
|
60
|
+
kind: 'unreadable';
|
|
61
|
+
} | {
|
|
62
|
+
kind: 'mounted';
|
|
63
|
+
mountPath: string;
|
|
64
|
+
fsUuid: string | null;
|
|
65
|
+
markerId: string | null;
|
|
66
|
+
};
|
|
67
|
+
export type TDcStorageVolumeVerification = {
|
|
68
|
+
kind: 'verified';
|
|
69
|
+
} | {
|
|
70
|
+
kind: 'refused';
|
|
71
|
+
reason: TDcStorageVolumeRefusal;
|
|
72
|
+
};
|
|
73
|
+
export interface IDcStorageCapacity {
|
|
74
|
+
totalBytes: number;
|
|
75
|
+
usedBytes: number;
|
|
76
|
+
/** May exclude reserved blocks, so usedBytes + availableBytes may be less than totalBytes. */
|
|
77
|
+
availableBytes: number;
|
|
78
|
+
}
|
|
79
|
+
interface IDcStorageVolumeObservation {
|
|
80
|
+
verification: TDcStorageVolumeVerification;
|
|
81
|
+
capacity: IDcStorageCapacity | null;
|
|
82
|
+
/** True on refusal, regardless of the kernel mount flags. */
|
|
83
|
+
readOnly: boolean;
|
|
84
|
+
health: typeof dcStorageVolumeHealthStates[number];
|
|
85
|
+
}
|
|
86
|
+
export interface IDcStorageSessionFence {
|
|
87
|
+
controllerEpoch: number;
|
|
88
|
+
credentialGeneration: number;
|
|
89
|
+
sessionEpoch: number;
|
|
90
|
+
}
|
|
91
|
+
/** Private verification result. The paths and UUIDs belong in administrator inspection only. */
|
|
92
|
+
export interface IDcStorageVolumeStatus extends IDcStorageVolumeObservation {
|
|
93
|
+
assignment: IDcStorageVolumeAssignment;
|
|
94
|
+
fence: IDcStorageSessionFence;
|
|
95
|
+
observed: TDcStorageObservedFilesystem;
|
|
96
|
+
}
|
|
97
|
+
export interface IDcStoragePoolProfile {
|
|
98
|
+
dataShards: number;
|
|
99
|
+
parityShards: number;
|
|
100
|
+
/** Phase 1 places one shard per selected domain. Rack placement also requires distinct hosts. */
|
|
101
|
+
failureDomain: 'host' | 'rack';
|
|
102
|
+
}
|
|
103
|
+
export interface IDcStoragePoolMember {
|
|
104
|
+
poolId: string;
|
|
105
|
+
/** Stable logical slot, zero-based within dataShards + parityShards. */
|
|
106
|
+
slot: number;
|
|
107
|
+
nodeId: string;
|
|
108
|
+
volumeId: string;
|
|
109
|
+
volumeGeneration: number;
|
|
110
|
+
controllerEpoch: number;
|
|
111
|
+
failureDomain: IDcStorageFailureDomain;
|
|
112
|
+
/** Incarnation of the slot. A replacement raises it before the new owner begins. */
|
|
113
|
+
generation: number;
|
|
114
|
+
state: TDcStoragePoolMemberState;
|
|
115
|
+
}
|
|
116
|
+
export interface IDcStoragePool {
|
|
117
|
+
poolId: string;
|
|
118
|
+
locationId: string;
|
|
119
|
+
/** Durable CAS position for the pool intent. */
|
|
120
|
+
controllerEpoch: number;
|
|
121
|
+
revision: number;
|
|
122
|
+
profile: IDcStoragePoolProfile;
|
|
123
|
+
/** Cloudly's conservative view from native evidence. */
|
|
124
|
+
health: typeof dcStoragePoolStates[number];
|
|
125
|
+
/** Current slot records only. Cloudly retains superseded records separately. */
|
|
126
|
+
members: IDcStoragePoolMember[];
|
|
127
|
+
}
|
|
128
|
+
export interface IDcStorageRepairProgress {
|
|
129
|
+
shardsChecked: number;
|
|
130
|
+
shardsHealed: number;
|
|
131
|
+
shardsPending: number;
|
|
132
|
+
failed: number;
|
|
133
|
+
}
|
|
134
|
+
export interface IDcStorageVolumeTelemetry extends IDcStorageVolumeObservation {
|
|
135
|
+
volumeId: string;
|
|
136
|
+
generation: number;
|
|
137
|
+
}
|
|
138
|
+
export interface IDcStorageMemberTelemetry {
|
|
139
|
+
poolId: string;
|
|
140
|
+
slot: number;
|
|
141
|
+
generation: number;
|
|
142
|
+
state: typeof dcStorageNativeMemberStates[number];
|
|
143
|
+
quorumHealthy: boolean | null;
|
|
144
|
+
majorityHealthy: boolean | null;
|
|
145
|
+
/** Aggregate counters from the native engine. Null when absent. */
|
|
146
|
+
repair: IDcStorageRepairProgress | null;
|
|
147
|
+
}
|
|
148
|
+
/** Observations only. No paths, filesystem identifiers, keys, endpoints or error messages. */
|
|
149
|
+
export interface IDcStorageNodeTelemetryReport {
|
|
150
|
+
nodeId: string;
|
|
151
|
+
fence: IDcStorageSessionFence;
|
|
152
|
+
/** Starts at 0 and advances within one authenticated session. */
|
|
153
|
+
sequence: number;
|
|
154
|
+
health: 'healthy' | 'degraded';
|
|
155
|
+
volumes: IDcStorageVolumeTelemetry[];
|
|
156
|
+
members: IDcStorageMemberTelemetry[];
|
|
157
|
+
}
|
|
158
|
+
/** Secret-bearing bootstrap request. The bearer itself is generated and retained by the node. */
|
|
159
|
+
export interface IEnrollDcStorageNodeRequest {
|
|
160
|
+
pairingCode: string;
|
|
161
|
+
bearerSha256: string;
|
|
162
|
+
protocol: IProtocolOffer;
|
|
163
|
+
}
|
|
164
|
+
/** Secret-bearing session registration, bound to the transport that authenticates it. */
|
|
165
|
+
export interface IRegisterDcStorageNodeSessionRequest {
|
|
166
|
+
nodeId: string;
|
|
167
|
+
credentialGeneration: number;
|
|
168
|
+
bearer: string;
|
|
169
|
+
protocol: IProtocolOffer;
|
|
170
|
+
softwareVersion: string;
|
|
171
|
+
capabilities: IDcStorageCapabilities;
|
|
172
|
+
}
|
|
173
|
+
export declare const isDcStorageRefusal: (value: unknown) => value is TDcStorageRefusal;
|
|
174
|
+
/** The typed error exposes a closed code with no values from the refused body. */
|
|
175
|
+
export declare const readDcStorageRefusalErrorData: (value: unknown) => {
|
|
176
|
+
code: TDcStorageRefusal;
|
|
177
|
+
retryable: false;
|
|
178
|
+
} | null;
|
|
179
|
+
export declare const isDcStorageNode: (value: unknown) => value is IDcStorageNode;
|
|
180
|
+
export declare const isDcStorageFilesystemIdentity: (value: unknown) => value is IDcStorageFilesystemIdentity;
|
|
181
|
+
export declare const isDcStorageVolumeAssignment: (value: unknown) => value is IDcStorageVolumeAssignment;
|
|
182
|
+
/** Call with validated identities. Authentication and safe mount probing belong to the consumer. */
|
|
183
|
+
export declare const judgeDcStorageVolumeIdentity: (expected: Readonly<IDcStorageFilesystemIdentity>, observed: Readonly<TDcStorageObservedFilesystem>) => TDcStorageVolumeRefusal | null;
|
|
184
|
+
export declare const isDcStorageSessionFence: (value: unknown) => value is IDcStorageSessionFence;
|
|
185
|
+
export declare const isDcStorageVolumeStatus: (value: unknown) => value is IDcStorageVolumeStatus;
|
|
186
|
+
export declare const isDcStoragePoolProfile: (value: unknown) => value is IDcStoragePoolProfile;
|
|
187
|
+
export declare const isDcStoragePoolMember: (value: unknown) => value is IDcStoragePoolMember;
|
|
188
|
+
export declare const isDcStoragePool: (value: unknown) => value is IDcStoragePool;
|
|
189
|
+
/** Internal Cloudly evidence, derived under the operation fence. Never accept it from a caller. */
|
|
190
|
+
export interface IDcStoragePoolMemberTransitionEvidence {
|
|
191
|
+
volumeVerifiedWritable: boolean;
|
|
192
|
+
nativeOperationSupported: boolean;
|
|
193
|
+
quorumSafe: boolean;
|
|
194
|
+
writerFenced: boolean;
|
|
195
|
+
drainComplete: boolean;
|
|
196
|
+
replacementReserved: boolean;
|
|
197
|
+
nativeMembershipConfirmed: boolean;
|
|
198
|
+
}
|
|
199
|
+
/** Check a new edge under CAS. An idempotent replay is recovered from the operation receipt. */
|
|
200
|
+
export declare const judgeDcStoragePoolMemberTransition: (current: TDcStoragePoolMemberState, next: TDcStoragePoolMemberState, evidence: Readonly<IDcStoragePoolMemberTransitionEvidence>) => TDcStorageTransitionRefusal | null;
|
|
201
|
+
/** Defensively rebuild the exact wire record for serialization or persistence. */
|
|
202
|
+
export declare const snapshotDcStorageNodeTelemetryReport: (value: unknown) => IDcStorageNodeTelemetryReport | null;
|
|
203
|
+
export declare const isDcStorageNodeTelemetryReport: (value: unknown) => value is IDcStorageNodeTelemetryReport;
|
|
204
|
+
export declare const isEnrollDcStorageNodeRequest: (value: unknown) => value is IEnrollDcStorageNodeRequest;
|
|
205
|
+
export declare const isRegisterDcStorageNodeSessionRequest: (value: unknown) => value is IRegisterDcStorageNodeSessionRequest;
|
|
206
|
+
export {};
|