@kinotic-ai/system-api 5.0.0-beta.43 → 5.0.0-beta.45
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 +14 -9
- package/dist/index.d.cts +28 -18
- package/dist/index.d.ts +28 -18
- package/dist/index.js +14 -9
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -117,17 +117,13 @@ var VmNodeStatusType;
|
|
|
117
117
|
})(VmNodeStatusType ||= {});
|
|
118
118
|
// packages/system-api/src/api/model/workload/VmNodeRegistration.ts
|
|
119
119
|
class VmNodeRegistration {
|
|
120
|
-
id;
|
|
121
|
-
name;
|
|
122
120
|
hostname;
|
|
123
121
|
providerType = "BOXLITE" /* BOXLITE */;
|
|
124
122
|
totalCpus = 0;
|
|
125
123
|
totalMemoryMb = 0;
|
|
126
124
|
totalDiskMb = 0;
|
|
127
125
|
workloadDataDir = null;
|
|
128
|
-
constructor(
|
|
129
|
-
this.id = id;
|
|
130
|
-
this.name = name;
|
|
126
|
+
constructor(hostname) {
|
|
131
127
|
this.hostname = hostname;
|
|
132
128
|
}
|
|
133
129
|
}
|
|
@@ -235,11 +231,11 @@ class VmNodeOrchestrationServiceProxy {
|
|
|
235
231
|
registerNode(registration) {
|
|
236
232
|
return this.serviceProxy.invoke("registerNode", [registration]);
|
|
237
233
|
}
|
|
238
|
-
heartbeat(
|
|
239
|
-
return this.serviceProxy.invoke("heartbeat", [
|
|
234
|
+
heartbeat(problems) {
|
|
235
|
+
return this.serviceProxy.invoke("heartbeat", [problems]);
|
|
240
236
|
}
|
|
241
|
-
reportWorkloadStatus(
|
|
242
|
-
return this.serviceProxy.invoke("reportWorkloadStatus", [
|
|
237
|
+
reportWorkloadStatus(reports) {
|
|
238
|
+
return this.serviceProxy.invoke("reportWorkloadStatus", [reports]);
|
|
243
239
|
}
|
|
244
240
|
deregisterNode(nodeId) {
|
|
245
241
|
return this.serviceProxy.invoke("deregisterNode", [nodeId]);
|
|
@@ -399,6 +395,15 @@ class SystemMemberService {
|
|
|
399
395
|
searchUsers(searchText, pageable) {
|
|
400
396
|
return this.serviceProxy.invoke("searchUsers", [searchText, pageable]);
|
|
401
397
|
}
|
|
398
|
+
addUser(email, displayName) {
|
|
399
|
+
return this.serviceProxy.invoke("addUser", [email, displayName]);
|
|
400
|
+
}
|
|
401
|
+
setUserEnabled(userId, enabled) {
|
|
402
|
+
return this.serviceProxy.invoke("setUserEnabled", [userId, enabled]);
|
|
403
|
+
}
|
|
404
|
+
resetUserPassword(userId) {
|
|
405
|
+
return this.serviceProxy.invoke("resetUserPassword", [userId]);
|
|
406
|
+
}
|
|
402
407
|
findMachines(pageable) {
|
|
403
408
|
return this.serviceProxy.invoke("findMachines", [pageable]);
|
|
404
409
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -97,18 +97,10 @@ declare class VmNode implements Reconcilable<VmNodeState> {
|
|
|
97
97
|
constructor(id: string, name: string, hostname: string);
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
* DTO sent by a vm-manager process when it registers with the server.
|
|
101
|
-
*
|
|
100
|
+
* DTO sent by a vm-manager process when it registers with the server. Contains only the information the node
|
|
101
|
+
* knows about itself: the node's id and name are those of the machine it authenticates as.
|
|
102
102
|
*/
|
|
103
103
|
declare class VmNodeRegistration {
|
|
104
|
-
/**
|
|
105
|
-
* Unique identifier for this node.
|
|
106
|
-
*/
|
|
107
|
-
id: string;
|
|
108
|
-
/**
|
|
109
|
-
* Human-readable name for the node.
|
|
110
|
-
*/
|
|
111
|
-
name: string;
|
|
112
104
|
/**
|
|
113
105
|
* The hostname or address of the node.
|
|
114
106
|
*/
|
|
@@ -133,7 +125,7 @@ declare class VmNodeRegistration {
|
|
|
133
125
|
* Base directory every workload volume mount on this node must live under.
|
|
134
126
|
*/
|
|
135
127
|
workloadDataDir: string | null;
|
|
136
|
-
constructor(
|
|
128
|
+
constructor(hostname: string);
|
|
137
129
|
}
|
|
138
130
|
import { WorkloadStatus } from "@kinotic-ai/management-api";
|
|
139
131
|
/**
|
|
@@ -307,7 +299,8 @@ declare class VmNodeOrchestrationServiceProxy {
|
|
|
307
299
|
private readonly serviceProxy;
|
|
308
300
|
constructor(kinotic: IKinotic4);
|
|
309
301
|
/**
|
|
310
|
-
* Registers this
|
|
302
|
+
* Registers the machine this client authenticated as with the orchestrator, as a node whose id is the
|
|
303
|
+
* machine's id and whose name is the machine's display name.
|
|
311
304
|
* @param registration the node registration info
|
|
312
305
|
* @return a Promise resolving to the registered VmNode
|
|
313
306
|
*/
|
|
@@ -315,21 +308,19 @@ declare class VmNodeOrchestrationServiceProxy {
|
|
|
315
308
|
/**
|
|
316
309
|
* Sends a heartbeat to indicate this node is still alive, carrying what it can still
|
|
317
310
|
* guarantee. A node reporting problems stops receiving workloads until it reports none.
|
|
318
|
-
* @param nodeId the id of this node
|
|
319
311
|
* @param problems what the node can no longer guarantee, empty when it is fit
|
|
320
312
|
* @return a Promise resolving to the updated VmNode
|
|
321
313
|
*/
|
|
322
|
-
heartbeat(
|
|
314
|
+
heartbeat(problems: string[]): Promise<VmNode>;
|
|
323
315
|
/**
|
|
324
316
|
* Reports the actual status of workloads on this node so the server's records track
|
|
325
317
|
* transitions the orchestrator did not initiate.
|
|
326
|
-
* @param nodeId the id of this node
|
|
327
318
|
* @param reports one report per workload
|
|
328
319
|
*/
|
|
329
|
-
reportWorkloadStatus(
|
|
320
|
+
reportWorkloadStatus(reports: WorkloadStatusReport[]): Promise<void>;
|
|
330
321
|
/**
|
|
331
|
-
*
|
|
332
|
-
* @param nodeId the id of
|
|
322
|
+
* Asks for a node's removal from the orchestrator.
|
|
323
|
+
* @param nodeId the id of the node
|
|
333
324
|
*/
|
|
334
325
|
deregisterNode(nodeId: string): Promise<void>;
|
|
335
326
|
}
|
|
@@ -543,6 +534,22 @@ import { IKinotic as IKinotic8, Page as Page4, Pageable as Pageable4 } from "@ki
|
|
|
543
534
|
interface ISystemMemberService {
|
|
544
535
|
findUsers(pageable: Pageable4): Promise<Page4<SystemParticipantIdentity>>;
|
|
545
536
|
searchUsers(searchText: string, pageable: Pageable4): Promise<Page4<SystemParticipantIdentity>>;
|
|
537
|
+
/**
|
|
538
|
+
* Adds a system user, who holds the system's full authority once signed in. The user is pending until it first
|
|
539
|
+
* signs in: through one of the providers the system console's login offers, which signs in the account whose
|
|
540
|
+
* verified email is `email`, or with a password `resetUserPassword` issues.
|
|
541
|
+
*/
|
|
542
|
+
addUser(email: string, displayName: string | null): Promise<SystemParticipantIdentity>;
|
|
543
|
+
/**
|
|
544
|
+
* Enables or disables a system user. A disabled user cannot sign in; a session it already holds lasts until it
|
|
545
|
+
* expires. Callers cannot disable themselves.
|
|
546
|
+
*/
|
|
547
|
+
setUserEnabled(userId: string, enabled: boolean): Promise<void>;
|
|
548
|
+
/**
|
|
549
|
+
* Replaces a system user's password with a generated one, returned exactly once. Refused while the system
|
|
550
|
+
* console's login takes no password.
|
|
551
|
+
*/
|
|
552
|
+
resetUserPassword(userId: string): Promise<string>;
|
|
546
553
|
/** Lists the system's machines, disabled ones included. */
|
|
547
554
|
findMachines(pageable: Pageable4): Promise<Page4<MachineParticipantIdentity>>;
|
|
548
555
|
/**
|
|
@@ -572,6 +579,9 @@ declare class SystemMemberService implements ISystemMemberService {
|
|
|
572
579
|
constructor(kinotic: IKinotic8);
|
|
573
580
|
findUsers(pageable: Pageable4): Promise<Page4<SystemParticipantIdentity>>;
|
|
574
581
|
searchUsers(searchText: string, pageable: Pageable4): Promise<Page4<SystemParticipantIdentity>>;
|
|
582
|
+
addUser(email: string, displayName: string | null): Promise<SystemParticipantIdentity>;
|
|
583
|
+
setUserEnabled(userId: string, enabled: boolean): Promise<void>;
|
|
584
|
+
resetUserPassword(userId: string): Promise<string>;
|
|
575
585
|
findMachines(pageable: Pageable4): Promise<Page4<MachineParticipantIdentity>>;
|
|
576
586
|
createMachine(displayName: string): Promise<MachineProvisionResult>;
|
|
577
587
|
rotateSecret(machineId: string): Promise<string>;
|
package/dist/index.d.ts
CHANGED
|
@@ -97,18 +97,10 @@ declare class VmNode implements Reconcilable<VmNodeState> {
|
|
|
97
97
|
constructor(id: string, name: string, hostname: string);
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
* DTO sent by a vm-manager process when it registers with the server.
|
|
101
|
-
*
|
|
100
|
+
* DTO sent by a vm-manager process when it registers with the server. Contains only the information the node
|
|
101
|
+
* knows about itself: the node's id and name are those of the machine it authenticates as.
|
|
102
102
|
*/
|
|
103
103
|
declare class VmNodeRegistration {
|
|
104
|
-
/**
|
|
105
|
-
* Unique identifier for this node.
|
|
106
|
-
*/
|
|
107
|
-
id: string;
|
|
108
|
-
/**
|
|
109
|
-
* Human-readable name for the node.
|
|
110
|
-
*/
|
|
111
|
-
name: string;
|
|
112
104
|
/**
|
|
113
105
|
* The hostname or address of the node.
|
|
114
106
|
*/
|
|
@@ -133,7 +125,7 @@ declare class VmNodeRegistration {
|
|
|
133
125
|
* Base directory every workload volume mount on this node must live under.
|
|
134
126
|
*/
|
|
135
127
|
workloadDataDir: string | null;
|
|
136
|
-
constructor(
|
|
128
|
+
constructor(hostname: string);
|
|
137
129
|
}
|
|
138
130
|
import { WorkloadStatus } from "@kinotic-ai/management-api";
|
|
139
131
|
/**
|
|
@@ -307,7 +299,8 @@ declare class VmNodeOrchestrationServiceProxy {
|
|
|
307
299
|
private readonly serviceProxy;
|
|
308
300
|
constructor(kinotic: IKinotic4);
|
|
309
301
|
/**
|
|
310
|
-
* Registers this
|
|
302
|
+
* Registers the machine this client authenticated as with the orchestrator, as a node whose id is the
|
|
303
|
+
* machine's id and whose name is the machine's display name.
|
|
311
304
|
* @param registration the node registration info
|
|
312
305
|
* @return a Promise resolving to the registered VmNode
|
|
313
306
|
*/
|
|
@@ -315,21 +308,19 @@ declare class VmNodeOrchestrationServiceProxy {
|
|
|
315
308
|
/**
|
|
316
309
|
* Sends a heartbeat to indicate this node is still alive, carrying what it can still
|
|
317
310
|
* guarantee. A node reporting problems stops receiving workloads until it reports none.
|
|
318
|
-
* @param nodeId the id of this node
|
|
319
311
|
* @param problems what the node can no longer guarantee, empty when it is fit
|
|
320
312
|
* @return a Promise resolving to the updated VmNode
|
|
321
313
|
*/
|
|
322
|
-
heartbeat(
|
|
314
|
+
heartbeat(problems: string[]): Promise<VmNode>;
|
|
323
315
|
/**
|
|
324
316
|
* Reports the actual status of workloads on this node so the server's records track
|
|
325
317
|
* transitions the orchestrator did not initiate.
|
|
326
|
-
* @param nodeId the id of this node
|
|
327
318
|
* @param reports one report per workload
|
|
328
319
|
*/
|
|
329
|
-
reportWorkloadStatus(
|
|
320
|
+
reportWorkloadStatus(reports: WorkloadStatusReport[]): Promise<void>;
|
|
330
321
|
/**
|
|
331
|
-
*
|
|
332
|
-
* @param nodeId the id of
|
|
322
|
+
* Asks for a node's removal from the orchestrator.
|
|
323
|
+
* @param nodeId the id of the node
|
|
333
324
|
*/
|
|
334
325
|
deregisterNode(nodeId: string): Promise<void>;
|
|
335
326
|
}
|
|
@@ -543,6 +534,22 @@ import { IKinotic as IKinotic8, Page as Page4, Pageable as Pageable4 } from "@ki
|
|
|
543
534
|
interface ISystemMemberService {
|
|
544
535
|
findUsers(pageable: Pageable4): Promise<Page4<SystemParticipantIdentity>>;
|
|
545
536
|
searchUsers(searchText: string, pageable: Pageable4): Promise<Page4<SystemParticipantIdentity>>;
|
|
537
|
+
/**
|
|
538
|
+
* Adds a system user, who holds the system's full authority once signed in. The user is pending until it first
|
|
539
|
+
* signs in: through one of the providers the system console's login offers, which signs in the account whose
|
|
540
|
+
* verified email is `email`, or with a password `resetUserPassword` issues.
|
|
541
|
+
*/
|
|
542
|
+
addUser(email: string, displayName: string | null): Promise<SystemParticipantIdentity>;
|
|
543
|
+
/**
|
|
544
|
+
* Enables or disables a system user. A disabled user cannot sign in; a session it already holds lasts until it
|
|
545
|
+
* expires. Callers cannot disable themselves.
|
|
546
|
+
*/
|
|
547
|
+
setUserEnabled(userId: string, enabled: boolean): Promise<void>;
|
|
548
|
+
/**
|
|
549
|
+
* Replaces a system user's password with a generated one, returned exactly once. Refused while the system
|
|
550
|
+
* console's login takes no password.
|
|
551
|
+
*/
|
|
552
|
+
resetUserPassword(userId: string): Promise<string>;
|
|
546
553
|
/** Lists the system's machines, disabled ones included. */
|
|
547
554
|
findMachines(pageable: Pageable4): Promise<Page4<MachineParticipantIdentity>>;
|
|
548
555
|
/**
|
|
@@ -572,6 +579,9 @@ declare class SystemMemberService implements ISystemMemberService {
|
|
|
572
579
|
constructor(kinotic: IKinotic8);
|
|
573
580
|
findUsers(pageable: Pageable4): Promise<Page4<SystemParticipantIdentity>>;
|
|
574
581
|
searchUsers(searchText: string, pageable: Pageable4): Promise<Page4<SystemParticipantIdentity>>;
|
|
582
|
+
addUser(email: string, displayName: string | null): Promise<SystemParticipantIdentity>;
|
|
583
|
+
setUserEnabled(userId: string, enabled: boolean): Promise<void>;
|
|
584
|
+
resetUserPassword(userId: string): Promise<string>;
|
|
575
585
|
findMachines(pageable: Pageable4): Promise<Page4<MachineParticipantIdentity>>;
|
|
576
586
|
createMachine(displayName: string): Promise<MachineProvisionResult>;
|
|
577
587
|
rotateSecret(machineId: string): Promise<string>;
|
package/dist/index.js
CHANGED
|
@@ -41,17 +41,13 @@ var VmNodeStatusType;
|
|
|
41
41
|
})(VmNodeStatusType ||= {});
|
|
42
42
|
// packages/system-api/src/api/model/workload/VmNodeRegistration.ts
|
|
43
43
|
class VmNodeRegistration {
|
|
44
|
-
id;
|
|
45
|
-
name;
|
|
46
44
|
hostname;
|
|
47
45
|
providerType = "BOXLITE" /* BOXLITE */;
|
|
48
46
|
totalCpus = 0;
|
|
49
47
|
totalMemoryMb = 0;
|
|
50
48
|
totalDiskMb = 0;
|
|
51
49
|
workloadDataDir = null;
|
|
52
|
-
constructor(
|
|
53
|
-
this.id = id;
|
|
54
|
-
this.name = name;
|
|
50
|
+
constructor(hostname) {
|
|
55
51
|
this.hostname = hostname;
|
|
56
52
|
}
|
|
57
53
|
}
|
|
@@ -159,11 +155,11 @@ class VmNodeOrchestrationServiceProxy {
|
|
|
159
155
|
registerNode(registration) {
|
|
160
156
|
return this.serviceProxy.invoke("registerNode", [registration]);
|
|
161
157
|
}
|
|
162
|
-
heartbeat(
|
|
163
|
-
return this.serviceProxy.invoke("heartbeat", [
|
|
158
|
+
heartbeat(problems) {
|
|
159
|
+
return this.serviceProxy.invoke("heartbeat", [problems]);
|
|
164
160
|
}
|
|
165
|
-
reportWorkloadStatus(
|
|
166
|
-
return this.serviceProxy.invoke("reportWorkloadStatus", [
|
|
161
|
+
reportWorkloadStatus(reports) {
|
|
162
|
+
return this.serviceProxy.invoke("reportWorkloadStatus", [reports]);
|
|
167
163
|
}
|
|
168
164
|
deregisterNode(nodeId) {
|
|
169
165
|
return this.serviceProxy.invoke("deregisterNode", [nodeId]);
|
|
@@ -327,6 +323,15 @@ class SystemMemberService {
|
|
|
327
323
|
searchUsers(searchText, pageable) {
|
|
328
324
|
return this.serviceProxy.invoke("searchUsers", [searchText, pageable]);
|
|
329
325
|
}
|
|
326
|
+
addUser(email, displayName) {
|
|
327
|
+
return this.serviceProxy.invoke("addUser", [email, displayName]);
|
|
328
|
+
}
|
|
329
|
+
setUserEnabled(userId, enabled) {
|
|
330
|
+
return this.serviceProxy.invoke("setUserEnabled", [userId, enabled]);
|
|
331
|
+
}
|
|
332
|
+
resetUserPassword(userId) {
|
|
333
|
+
return this.serviceProxy.invoke("resetUserPassword", [userId]);
|
|
334
|
+
}
|
|
330
335
|
findMachines(pageable) {
|
|
331
336
|
return this.serviceProxy.invoke("findMachines", [pageable]);
|
|
332
337
|
}
|
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.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Client API for the Kinotic platform's system plane: the workload and node orchestration services system 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.30",
|
|
42
|
-
"@kinotic-ai/management-api": "^5.0.0-beta.
|
|
42
|
+
"@kinotic-ai/management-api": "^5.0.0-beta.75"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@kinotic-ai/core": "5.0.0-beta.30",
|
|
46
|
-
"@kinotic-ai/management-api": "5.0.0-beta.
|
|
46
|
+
"@kinotic-ai/management-api": "5.0.0-beta.75",
|
|
47
47
|
"@types/bun": "^1.3.9",
|
|
48
48
|
"typescript": "^5.9.3"
|
|
49
49
|
}
|