@serve.zone/interfaces 7.7.0 → 7.9.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 +17 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/clusternode.d.ts +59 -0
- package/dist_ts/data/deployment.d.ts +6 -0
- package/dist_ts/requests/deployment.d.ts +2 -0
- package/dist_ts/requests/node.d.ts +44 -1
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/clusternode.ts +67 -0
- package/ts/data/deployment.ts +7 -0
- package/ts/requests/deployment.ts +2 -0
- package/ts/requests/node.ts +60 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-06-10 - 7.9.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add archived deployment metadata and query support (deployment)
|
|
8
|
+
- Add optional archivedAt timestamp to deployment data for retained archived records.
|
|
9
|
+
- Add optional includeArchived flag to getDeployments requests.
|
|
10
|
+
|
|
11
|
+
## 2026-06-10 - 7.8.0
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- add live node metrics and action interfaces (node)
|
|
16
|
+
- Add high-frequency node metrics sample types for Spark-to-Cloudly reporting and admin UI relay.
|
|
17
|
+
- Add node action types and TypedRequest contracts for creating, listing, and pushing action updates.
|
|
18
|
+
- Add Spark action result request and response interfaces.
|
|
19
|
+
|
|
3
20
|
## 2026-06-10 - 7.7.0
|
|
4
21
|
|
|
5
22
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '7.
|
|
6
|
+
version: '7.9.0',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
|
|
@@ -8,6 +8,65 @@ export interface IClusterNodeMetrics {
|
|
|
8
8
|
containerCount: number;
|
|
9
9
|
timestamp: number;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Lightweight high-frequency node metrics sample (1s cadence).
|
|
13
|
+
* Streamed spark -> cloudly -> admin UIs; never persisted.
|
|
14
|
+
*/
|
|
15
|
+
export interface INodeMetricsSample {
|
|
16
|
+
timestamp: number;
|
|
17
|
+
cpuUsagePercent: number;
|
|
18
|
+
memoryUsedMB: number;
|
|
19
|
+
memoryAvailableMB: number;
|
|
20
|
+
/** Host-level network receive rate across non-loopback interfaces. */
|
|
21
|
+
networkRxBytesPerSec?: number;
|
|
22
|
+
/** Host-level network transmit rate across non-loopback interfaces. */
|
|
23
|
+
networkTxBytesPerSec?: number;
|
|
24
|
+
}
|
|
25
|
+
export type TNodeActionName = 'systemUpgrade' | 'reboot';
|
|
26
|
+
export type TNodeActionStatus = 'pending' | 'running' | 'succeeded' | 'failed';
|
|
27
|
+
/**
|
|
28
|
+
* An operator-requested action executed by spark on a node.
|
|
29
|
+
* Delivered to spark in metrics-sample responses; results posted back.
|
|
30
|
+
*/
|
|
31
|
+
export interface INodeAction {
|
|
32
|
+
id: string;
|
|
33
|
+
nodeId: string;
|
|
34
|
+
actionName: TNodeActionName;
|
|
35
|
+
payload?: {
|
|
36
|
+
/** Reboot only: gracefully stop workloads before rebooting. */
|
|
37
|
+
drainFirst?: boolean;
|
|
38
|
+
};
|
|
39
|
+
status: TNodeActionStatus;
|
|
40
|
+
requestedAt: number;
|
|
41
|
+
requestedBy?: string;
|
|
42
|
+
startedAt?: number;
|
|
43
|
+
finishedAt?: number;
|
|
44
|
+
resultText?: string;
|
|
45
|
+
}
|
|
46
|
+
/** Spark -> Cloudly HTTP body for POST /spark/v1/nodes/metrics-sample */
|
|
47
|
+
export interface ISparkMetricsSampleRequest {
|
|
48
|
+
nodeId: string;
|
|
49
|
+
nodeToken: string;
|
|
50
|
+
sample: INodeMetricsSample;
|
|
51
|
+
}
|
|
52
|
+
export interface ISparkMetricsSampleResponse {
|
|
53
|
+
accepted: boolean;
|
|
54
|
+
message?: string;
|
|
55
|
+
/** Actions queued for this node; spark executes them and posts results. */
|
|
56
|
+
pendingActions?: INodeAction[];
|
|
57
|
+
}
|
|
58
|
+
/** Spark -> Cloudly HTTP body for POST /spark/v1/nodes/action-result */
|
|
59
|
+
export interface ISparkActionResultRequest {
|
|
60
|
+
nodeId: string;
|
|
61
|
+
nodeToken: string;
|
|
62
|
+
actionId: string;
|
|
63
|
+
status: Extract<TNodeActionStatus, 'running' | 'succeeded' | 'failed'>;
|
|
64
|
+
resultText?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface ISparkActionResultResponse {
|
|
67
|
+
accepted: boolean;
|
|
68
|
+
message?: string;
|
|
69
|
+
}
|
|
11
70
|
export type TSparkNodeMode = 'cloudly' | 'coreflow-node';
|
|
12
71
|
export type TSparkCloudlyConnectionStatus = 'not-configured' | 'connecting' | 'connected' | 'failed';
|
|
13
72
|
export interface ISparkNodeRuntimeInfo {
|
|
@@ -62,4 +62,10 @@ export interface IDeployment {
|
|
|
62
62
|
memoryUsedMB: number;
|
|
63
63
|
lastUpdated: number;
|
|
64
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* Set when the deployment disappeared from runtime snapshots. Archived
|
|
67
|
+
* deployments are kept for lookup and log retention (default 90 days)
|
|
68
|
+
* and are excluded from active runtime views.
|
|
69
|
+
*/
|
|
70
|
+
archivedAt?: number;
|
|
65
71
|
}
|
|
@@ -21,6 +21,8 @@ export interface IReq_Any_Cloudly_GetDeployments extends plugins.typedrequestInt
|
|
|
21
21
|
method: 'getDeployments';
|
|
22
22
|
request: {
|
|
23
23
|
identity: IIdentity;
|
|
24
|
+
/** Include archived deployments (default: active only). */
|
|
25
|
+
includeArchived?: boolean;
|
|
24
26
|
};
|
|
25
27
|
response: {
|
|
26
28
|
deployments: IDeployment[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import type { IBareMetal } from '../data/baremetal.js';
|
|
3
3
|
import type { ICluster } from '../data/cluster.js';
|
|
4
|
-
import type { IClusterNode, IClusterNodeMetrics, ISparkNodeRuntimeInfo } from '../data/clusternode.js';
|
|
4
|
+
import type { IClusterNode, IClusterNodeMetrics, INodeAction, INodeMetricsSample, ISparkNodeRuntimeInfo, TNodeActionName } from '../data/clusternode.js';
|
|
5
5
|
import type { IDeployment } from '../data/deployment.js';
|
|
6
6
|
import type { IIdentity } from '../data/user.js';
|
|
7
7
|
export interface IRequest_Any_Cloudly_GetNodeConfig {
|
|
@@ -106,3 +106,46 @@ export interface IRequest_Spark_Cloudly_SendHeartbeat extends plugins.typedreque
|
|
|
106
106
|
message?: string;
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
+
export interface IReq_Any_Cloudly_CreateNodeAction extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Any_Cloudly_CreateNodeAction> {
|
|
110
|
+
method: 'createNodeAction';
|
|
111
|
+
request: {
|
|
112
|
+
identity: IIdentity;
|
|
113
|
+
nodeId: string;
|
|
114
|
+
actionName: TNodeActionName;
|
|
115
|
+
payload?: INodeAction['payload'];
|
|
116
|
+
};
|
|
117
|
+
response: {
|
|
118
|
+
action: INodeAction;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export interface IReq_Any_Cloudly_GetNodeActions extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Any_Cloudly_GetNodeActions> {
|
|
122
|
+
method: 'getNodeActions';
|
|
123
|
+
request: {
|
|
124
|
+
identity: IIdentity;
|
|
125
|
+
nodeId: string;
|
|
126
|
+
};
|
|
127
|
+
response: {
|
|
128
|
+
actions: INodeAction[];
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Cloudly -> admin UIs: live node metrics relay (1s cadence, not persisted).
|
|
133
|
+
*/
|
|
134
|
+
export interface IReq_Cloudly_Any_PushNodeMetricsSample extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Cloudly_Any_PushNodeMetricsSample> {
|
|
135
|
+
method: 'pushNodeMetricsSample';
|
|
136
|
+
request: {
|
|
137
|
+
nodeId: string;
|
|
138
|
+
sample: INodeMetricsSample;
|
|
139
|
+
};
|
|
140
|
+
response: Record<string, never>;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Cloudly -> admin UIs: node action lifecycle updates.
|
|
144
|
+
*/
|
|
145
|
+
export interface IReq_Cloudly_Any_PushNodeActionUpdate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Cloudly_Any_PushNodeActionUpdate> {
|
|
146
|
+
method: 'pushNodeActionUpdate';
|
|
147
|
+
request: {
|
|
148
|
+
action: INodeAction;
|
|
149
|
+
};
|
|
150
|
+
response: Record<string, never>;
|
|
151
|
+
}
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/clusternode.ts
CHANGED
|
@@ -10,6 +10,73 @@ export interface IClusterNodeMetrics {
|
|
|
10
10
|
timestamp: number;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Lightweight high-frequency node metrics sample (1s cadence).
|
|
15
|
+
* Streamed spark -> cloudly -> admin UIs; never persisted.
|
|
16
|
+
*/
|
|
17
|
+
export interface INodeMetricsSample {
|
|
18
|
+
timestamp: number;
|
|
19
|
+
cpuUsagePercent: number;
|
|
20
|
+
memoryUsedMB: number;
|
|
21
|
+
memoryAvailableMB: number;
|
|
22
|
+
/** Host-level network receive rate across non-loopback interfaces. */
|
|
23
|
+
networkRxBytesPerSec?: number;
|
|
24
|
+
/** Host-level network transmit rate across non-loopback interfaces. */
|
|
25
|
+
networkTxBytesPerSec?: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type TNodeActionName = 'systemUpgrade' | 'reboot';
|
|
29
|
+
|
|
30
|
+
export type TNodeActionStatus = 'pending' | 'running' | 'succeeded' | 'failed';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* An operator-requested action executed by spark on a node.
|
|
34
|
+
* Delivered to spark in metrics-sample responses; results posted back.
|
|
35
|
+
*/
|
|
36
|
+
export interface INodeAction {
|
|
37
|
+
id: string;
|
|
38
|
+
nodeId: string;
|
|
39
|
+
actionName: TNodeActionName;
|
|
40
|
+
payload?: {
|
|
41
|
+
/** Reboot only: gracefully stop workloads before rebooting. */
|
|
42
|
+
drainFirst?: boolean;
|
|
43
|
+
};
|
|
44
|
+
status: TNodeActionStatus;
|
|
45
|
+
requestedAt: number;
|
|
46
|
+
requestedBy?: string;
|
|
47
|
+
startedAt?: number;
|
|
48
|
+
finishedAt?: number;
|
|
49
|
+
resultText?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Spark -> Cloudly HTTP body for POST /spark/v1/nodes/metrics-sample */
|
|
53
|
+
export interface ISparkMetricsSampleRequest {
|
|
54
|
+
nodeId: string;
|
|
55
|
+
nodeToken: string;
|
|
56
|
+
sample: INodeMetricsSample;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface ISparkMetricsSampleResponse {
|
|
60
|
+
accepted: boolean;
|
|
61
|
+
message?: string;
|
|
62
|
+
/** Actions queued for this node; spark executes them and posts results. */
|
|
63
|
+
pendingActions?: INodeAction[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Spark -> Cloudly HTTP body for POST /spark/v1/nodes/action-result */
|
|
67
|
+
export interface ISparkActionResultRequest {
|
|
68
|
+
nodeId: string;
|
|
69
|
+
nodeToken: string;
|
|
70
|
+
actionId: string;
|
|
71
|
+
status: Extract<TNodeActionStatus, 'running' | 'succeeded' | 'failed'>;
|
|
72
|
+
resultText?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface ISparkActionResultResponse {
|
|
76
|
+
accepted: boolean;
|
|
77
|
+
message?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
13
80
|
export type TSparkNodeMode = 'cloudly' | 'coreflow-node';
|
|
14
81
|
|
|
15
82
|
export type TSparkCloudlyConnectionStatus =
|
package/ts/data/deployment.ts
CHANGED
|
@@ -81,4 +81,11 @@ export interface IDeployment {
|
|
|
81
81
|
memoryUsedMB: number;
|
|
82
82
|
lastUpdated: number;
|
|
83
83
|
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Set when the deployment disappeared from runtime snapshots. Archived
|
|
87
|
+
* deployments are kept for lookup and log retention (default 90 days)
|
|
88
|
+
* and are excluded from active runtime views.
|
|
89
|
+
*/
|
|
90
|
+
archivedAt?: number;
|
|
84
91
|
}
|
|
@@ -32,6 +32,8 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
32
32
|
method: 'getDeployments';
|
|
33
33
|
request: {
|
|
34
34
|
identity: IIdentity;
|
|
35
|
+
/** Include archived deployments (default: active only). */
|
|
36
|
+
includeArchived?: boolean;
|
|
35
37
|
};
|
|
36
38
|
response: {
|
|
37
39
|
deployments: IDeployment[];
|
package/ts/requests/node.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import type { IBareMetal } from '../data/baremetal.js';
|
|
3
3
|
import type { ICluster } from '../data/cluster.js';
|
|
4
|
-
import type { IClusterNode, IClusterNodeMetrics, ISparkNodeRuntimeInfo } from '../data/clusternode.js';
|
|
4
|
+
import type { IClusterNode, IClusterNodeMetrics, INodeAction, INodeMetricsSample, ISparkNodeRuntimeInfo, TNodeActionName } from '../data/clusternode.js';
|
|
5
5
|
import type { IDeployment } from '../data/deployment.js';
|
|
6
6
|
import type { IIdentity } from '../data/user.js';
|
|
7
7
|
|
|
@@ -133,3 +133,62 @@ export interface IRequest_Spark_Cloudly_SendHeartbeat extends plugins.typedreque
|
|
|
133
133
|
message?: string;
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
+
|
|
137
|
+
export interface IReq_Any_Cloudly_CreateNodeAction extends plugins.typedrequestInterfaces.implementsTR<
|
|
138
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
139
|
+
IReq_Any_Cloudly_CreateNodeAction
|
|
140
|
+
> {
|
|
141
|
+
method: 'createNodeAction';
|
|
142
|
+
request: {
|
|
143
|
+
identity: IIdentity;
|
|
144
|
+
nodeId: string;
|
|
145
|
+
actionName: TNodeActionName;
|
|
146
|
+
payload?: INodeAction['payload'];
|
|
147
|
+
};
|
|
148
|
+
response: {
|
|
149
|
+
action: INodeAction;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface IReq_Any_Cloudly_GetNodeActions extends plugins.typedrequestInterfaces.implementsTR<
|
|
154
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
155
|
+
IReq_Any_Cloudly_GetNodeActions
|
|
156
|
+
> {
|
|
157
|
+
method: 'getNodeActions';
|
|
158
|
+
request: {
|
|
159
|
+
identity: IIdentity;
|
|
160
|
+
nodeId: string;
|
|
161
|
+
};
|
|
162
|
+
response: {
|
|
163
|
+
actions: INodeAction[];
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Cloudly -> admin UIs: live node metrics relay (1s cadence, not persisted).
|
|
169
|
+
*/
|
|
170
|
+
export interface IReq_Cloudly_Any_PushNodeMetricsSample extends plugins.typedrequestInterfaces.implementsTR<
|
|
171
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
172
|
+
IReq_Cloudly_Any_PushNodeMetricsSample
|
|
173
|
+
> {
|
|
174
|
+
method: 'pushNodeMetricsSample';
|
|
175
|
+
request: {
|
|
176
|
+
nodeId: string;
|
|
177
|
+
sample: INodeMetricsSample;
|
|
178
|
+
};
|
|
179
|
+
response: Record<string, never>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Cloudly -> admin UIs: node action lifecycle updates.
|
|
184
|
+
*/
|
|
185
|
+
export interface IReq_Cloudly_Any_PushNodeActionUpdate extends plugins.typedrequestInterfaces.implementsTR<
|
|
186
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
187
|
+
IReq_Cloudly_Any_PushNodeActionUpdate
|
|
188
|
+
> {
|
|
189
|
+
method: 'pushNodeActionUpdate';
|
|
190
|
+
request: {
|
|
191
|
+
action: INodeAction;
|
|
192
|
+
};
|
|
193
|
+
response: Record<string, never>;
|
|
194
|
+
}
|