@kinotic-ai/system-api 5.0.0-beta.15 → 5.0.0-beta.16
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/dist/index.cjs +3 -6
- package/dist/index.d.cts +8 -22
- package/dist/index.d.ts +8 -22
- package/dist/index.js +3 -6
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -99,9 +99,9 @@ class VmNode {
|
|
|
99
99
|
totalCpus = 0;
|
|
100
100
|
totalMemoryMb = 0;
|
|
101
101
|
totalDiskMb = 0;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
freeCpus = 0;
|
|
103
|
+
freeMemoryMb = 0;
|
|
104
|
+
freeDiskMb = 0;
|
|
105
105
|
reservations = [];
|
|
106
106
|
lastSeen = null;
|
|
107
107
|
workloadDataDir = null;
|
|
@@ -175,9 +175,6 @@ class WorkloadOrchestrationService {
|
|
|
175
175
|
deployWorkload(workload) {
|
|
176
176
|
return this.serviceProxy.invoke("deployWorkload", [workload]);
|
|
177
177
|
}
|
|
178
|
-
restartWorkload(workloadId) {
|
|
179
|
-
return this.serviceProxy.invoke("restartWorkload", [workloadId]);
|
|
180
|
-
}
|
|
181
178
|
stopWorkload(workloadId) {
|
|
182
179
|
return this.serviceProxy.invoke("stopWorkload", [workloadId]);
|
|
183
180
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -22,9 +22,9 @@ declare class VmNodeStatus {
|
|
|
22
22
|
healthMessage: string | null;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* The room one workload holds on a VmNode:
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* The room one workload's run holds on a VmNode: the CPU, memory and disk its VM is sized for,
|
|
26
|
+
* from the moment it is placed until its run ends or it is destroyed. A workload holds at most
|
|
27
|
+
* one reservation per node, keyed by its id.
|
|
28
28
|
*/
|
|
29
29
|
interface WorkloadReservation {
|
|
30
30
|
/** The id of the workload holding the reservation. */
|
|
@@ -35,11 +35,6 @@ interface WorkloadReservation {
|
|
|
35
35
|
memoryMb: number;
|
|
36
36
|
/** Disk the workload's VM is allotted, in megabytes. */
|
|
37
37
|
diskMb: number;
|
|
38
|
-
/**
|
|
39
|
-
* True while the workload's run holds its CPU and memory; false once the run has ended and
|
|
40
|
-
* only the disk is still held.
|
|
41
|
-
*/
|
|
42
|
-
running: boolean;
|
|
43
38
|
}
|
|
44
39
|
declare enum VmProviderType {
|
|
45
40
|
BOXLITE = "BOXLITE",
|
|
@@ -85,19 +80,19 @@ declare class VmNode implements Identifiable<string> {
|
|
|
85
80
|
totalDiskMb: number;
|
|
86
81
|
/**
|
|
87
82
|
* CPU not allocated to any workload, in cores. What is allocated is
|
|
88
|
-
* totalCpus -
|
|
83
|
+
* totalCpus - freeCpus, the sum of the reservations.
|
|
89
84
|
*/
|
|
90
|
-
|
|
85
|
+
freeCpus: number;
|
|
91
86
|
/**
|
|
92
87
|
* Memory not allocated to any workload, in megabytes.
|
|
93
88
|
*/
|
|
94
|
-
|
|
89
|
+
freeMemoryMb: number;
|
|
95
90
|
/**
|
|
96
91
|
* Disk space not allocated to any workload, in megabytes.
|
|
97
92
|
*/
|
|
98
|
-
|
|
93
|
+
freeDiskMb: number;
|
|
99
94
|
/**
|
|
100
|
-
* The room each workload
|
|
95
|
+
* The room each workload running on this node holds, one entry per workload. The free*
|
|
101
96
|
* fields are the totals less what these hold, so a workload's room is reserved and released
|
|
102
97
|
* by its id and never counted twice.
|
|
103
98
|
*/
|
|
@@ -236,14 +231,6 @@ interface IWorkloadOrchestrationService {
|
|
|
236
231
|
*/
|
|
237
232
|
deployWorkload(workload: Workload2): Promise<Workload2>;
|
|
238
233
|
/**
|
|
239
|
-
* Restarts a stopped workload in place on the node it is deployed to. Fails unless the
|
|
240
|
-
* workload is stopped; a workload stopped with autoRemove true has no VM left to restart.
|
|
241
|
-
* Honors the workload's detached flag the same way as {@link deployWorkload}.
|
|
242
|
-
* @param workloadId the id of the workload to restart
|
|
243
|
-
* @return a Promise resolving to the restarted workload
|
|
244
|
-
*/
|
|
245
|
-
restartWorkload(workloadId: string): Promise<Workload2>;
|
|
246
|
-
/**
|
|
247
234
|
* Stops a running workload.
|
|
248
235
|
* @param workloadId the id of the workload to stop
|
|
249
236
|
* @return a Promise that resolves when the workload has been stopped
|
|
@@ -260,7 +247,6 @@ declare class WorkloadOrchestrationService implements IWorkloadOrchestrationServ
|
|
|
260
247
|
private readonly serviceProxy;
|
|
261
248
|
constructor(kinotic: IKinotic3);
|
|
262
249
|
deployWorkload(workload: Workload2): Promise<Workload2>;
|
|
263
|
-
restartWorkload(workloadId: string): Promise<Workload2>;
|
|
264
250
|
stopWorkload(workloadId: string): Promise<void>;
|
|
265
251
|
destroyWorkload(workloadId: string): Promise<void>;
|
|
266
252
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -22,9 +22,9 @@ declare class VmNodeStatus {
|
|
|
22
22
|
healthMessage: string | null;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* The room one workload holds on a VmNode:
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* The room one workload's run holds on a VmNode: the CPU, memory and disk its VM is sized for,
|
|
26
|
+
* from the moment it is placed until its run ends or it is destroyed. A workload holds at most
|
|
27
|
+
* one reservation per node, keyed by its id.
|
|
28
28
|
*/
|
|
29
29
|
interface WorkloadReservation {
|
|
30
30
|
/** The id of the workload holding the reservation. */
|
|
@@ -35,11 +35,6 @@ interface WorkloadReservation {
|
|
|
35
35
|
memoryMb: number;
|
|
36
36
|
/** Disk the workload's VM is allotted, in megabytes. */
|
|
37
37
|
diskMb: number;
|
|
38
|
-
/**
|
|
39
|
-
* True while the workload's run holds its CPU and memory; false once the run has ended and
|
|
40
|
-
* only the disk is still held.
|
|
41
|
-
*/
|
|
42
|
-
running: boolean;
|
|
43
38
|
}
|
|
44
39
|
declare enum VmProviderType {
|
|
45
40
|
BOXLITE = "BOXLITE",
|
|
@@ -85,19 +80,19 @@ declare class VmNode implements Identifiable<string> {
|
|
|
85
80
|
totalDiskMb: number;
|
|
86
81
|
/**
|
|
87
82
|
* CPU not allocated to any workload, in cores. What is allocated is
|
|
88
|
-
* totalCpus -
|
|
83
|
+
* totalCpus - freeCpus, the sum of the reservations.
|
|
89
84
|
*/
|
|
90
|
-
|
|
85
|
+
freeCpus: number;
|
|
91
86
|
/**
|
|
92
87
|
* Memory not allocated to any workload, in megabytes.
|
|
93
88
|
*/
|
|
94
|
-
|
|
89
|
+
freeMemoryMb: number;
|
|
95
90
|
/**
|
|
96
91
|
* Disk space not allocated to any workload, in megabytes.
|
|
97
92
|
*/
|
|
98
|
-
|
|
93
|
+
freeDiskMb: number;
|
|
99
94
|
/**
|
|
100
|
-
* The room each workload
|
|
95
|
+
* The room each workload running on this node holds, one entry per workload. The free*
|
|
101
96
|
* fields are the totals less what these hold, so a workload's room is reserved and released
|
|
102
97
|
* by its id and never counted twice.
|
|
103
98
|
*/
|
|
@@ -236,14 +231,6 @@ interface IWorkloadOrchestrationService {
|
|
|
236
231
|
*/
|
|
237
232
|
deployWorkload(workload: Workload2): Promise<Workload2>;
|
|
238
233
|
/**
|
|
239
|
-
* Restarts a stopped workload in place on the node it is deployed to. Fails unless the
|
|
240
|
-
* workload is stopped; a workload stopped with autoRemove true has no VM left to restart.
|
|
241
|
-
* Honors the workload's detached flag the same way as {@link deployWorkload}.
|
|
242
|
-
* @param workloadId the id of the workload to restart
|
|
243
|
-
* @return a Promise resolving to the restarted workload
|
|
244
|
-
*/
|
|
245
|
-
restartWorkload(workloadId: string): Promise<Workload2>;
|
|
246
|
-
/**
|
|
247
234
|
* Stops a running workload.
|
|
248
235
|
* @param workloadId the id of the workload to stop
|
|
249
236
|
* @return a Promise that resolves when the workload has been stopped
|
|
@@ -260,7 +247,6 @@ declare class WorkloadOrchestrationService implements IWorkloadOrchestrationServ
|
|
|
260
247
|
private readonly serviceProxy;
|
|
261
248
|
constructor(kinotic: IKinotic3);
|
|
262
249
|
deployWorkload(workload: Workload2): Promise<Workload2>;
|
|
263
|
-
restartWorkload(workloadId: string): Promise<Workload2>;
|
|
264
250
|
stopWorkload(workloadId: string): Promise<void>;
|
|
265
251
|
destroyWorkload(workloadId: string): Promise<void>;
|
|
266
252
|
}
|
package/dist/index.js
CHANGED
|
@@ -33,9 +33,9 @@ class VmNode {
|
|
|
33
33
|
totalCpus = 0;
|
|
34
34
|
totalMemoryMb = 0;
|
|
35
35
|
totalDiskMb = 0;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
freeCpus = 0;
|
|
37
|
+
freeMemoryMb = 0;
|
|
38
|
+
freeDiskMb = 0;
|
|
39
39
|
reservations = [];
|
|
40
40
|
lastSeen = null;
|
|
41
41
|
workloadDataDir = null;
|
|
@@ -109,9 +109,6 @@ class WorkloadOrchestrationService {
|
|
|
109
109
|
deployWorkload(workload) {
|
|
110
110
|
return this.serviceProxy.invoke("deployWorkload", [workload]);
|
|
111
111
|
}
|
|
112
|
-
restartWorkload(workloadId) {
|
|
113
|
-
return this.serviceProxy.invoke("restartWorkload", [workloadId]);
|
|
114
|
-
}
|
|
115
112
|
stopWorkload(workloadId) {
|
|
116
113
|
return this.serviceProxy.invoke("stopWorkload", [workloadId]);
|
|
117
114
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinotic-ai/system-api",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Client API for the Kinotic platform's system plane: the workload and node orchestration services platform machines and operators use.",
|
|
6
6
|
"files": [
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@kinotic-ai/core": "^5.0.0-beta.13",
|
|
42
|
-
"@kinotic-ai/management-api": "^5.0.0-beta.
|
|
42
|
+
"@kinotic-ai/management-api": "^5.0.0-beta.34"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@kinotic-ai/core": "5.0.0-beta.13",
|
|
46
|
-
"@kinotic-ai/management-api": "5.0.0-beta.
|
|
46
|
+
"@kinotic-ai/management-api": "5.0.0-beta.34",
|
|
47
47
|
"@types/bun": "^1.3.9",
|
|
48
48
|
"typescript": "^5.9.3"
|
|
49
49
|
}
|