@kinotic-ai/system-api 5.0.0-beta.14 → 5.0.0-beta.15

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 CHANGED
@@ -102,6 +102,7 @@ class VmNode {
102
102
  availableCpus = 0;
103
103
  availableMemoryMb = 0;
104
104
  availableDiskMb = 0;
105
+ reservations = [];
105
106
  lastSeen = null;
106
107
  workloadDataDir = null;
107
108
  constructor(id, name, hostname) {
package/dist/index.d.cts CHANGED
@@ -21,6 +21,26 @@ declare class VmNodeStatus {
21
21
  */
22
22
  healthMessage: string | null;
23
23
  }
24
+ /**
25
+ * The room one workload holds on a VmNode: its CPU, memory and disk while its VM runs, and its
26
+ * disk alone once the run has ended, since a VM that is kept for a restart keeps its disk on the
27
+ * node. A workload holds at most one reservation per node, keyed by its id.
28
+ */
29
+ interface WorkloadReservation {
30
+ /** The id of the workload holding the reservation. */
31
+ workloadId: string;
32
+ /** CPU the workload's VM is allotted, in cores; a fraction is a share of one core. */
33
+ cpus: number;
34
+ /** Memory the workload's VM is allotted, in megabytes. */
35
+ memoryMb: number;
36
+ /** Disk the workload's VM is allotted, in megabytes. */
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
+ }
24
44
  declare enum VmProviderType {
25
45
  BOXLITE = "BOXLITE",
26
46
  CLOUD_HYPERVISOR = "CLOUD_HYPERVISOR"
@@ -64,8 +84,8 @@ declare class VmNode implements Identifiable<string> {
64
84
  */
65
85
  totalDiskMb: number;
66
86
  /**
67
- * Number of vCPUs not allocated to any workload. What is allocated is
68
- * totalCpus - availableCpus.
87
+ * CPU not allocated to any workload, in cores. What is allocated is
88
+ * totalCpus - availableCpus, the sum of the reservations that are running.
69
89
  */
70
90
  availableCpus: number;
71
91
  /**
@@ -77,6 +97,12 @@ declare class VmNode implements Identifiable<string> {
77
97
  */
78
98
  availableDiskMb: number;
79
99
  /**
100
+ * The room each workload placed on this node holds, one entry per workload. The available*
101
+ * fields are the totals less what these hold, so a workload's room is reserved and released
102
+ * by its id and never counted twice.
103
+ */
104
+ reservations: WorkloadReservation[];
105
+ /**
80
106
  * The date and time the node was last seen/heartbeat.
81
107
  */
82
108
  lastSeen: number | null;
@@ -145,7 +171,7 @@ import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
145
171
  interface IVmNodeService extends ICrudServiceProxy<VmNode> {
146
172
  /**
147
173
  * Finds a node with sufficient resources to host a workload with the given requirements.
148
- * @param requiredCpus the number of vCPUs required
174
+ * @param requiredCpus the CPU required, in cores
149
175
  * @param requiredMemoryMb the amount of memory required in megabytes
150
176
  * @param requiredDiskMb the amount of disk space required in megabytes
151
177
  * @return a Promise resolving to a suitable node, or null if none available
@@ -496,4 +522,4 @@ declare class LogManager implements ILogManager {
496
522
  declare module "@kinotic-ai/core" {
497
523
  interface KinoticSingleton extends ISystemApiExtension {}
498
524
  }
499
- export { WorkloadStatusReport, WorkloadServiceProxy, WorkloadOrchestrationService, VmProviderType, VmNodeStatusType, VmNodeStatus, VmNodeServiceProxy, VmNodeRegistration, VmNodeOrchestrationServiceProxy, VmNode, TraceLogProperties, SystemOrganizationService, SystemMemberService, SystemApiPlugin, SingleLoggerLevelsDescriptor, SYSTEM_API_ZONE, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticNodeInfo, KinoticClusterInfoService, KinoticClusterInfo, IWorkloadService, IWorkloadOrchestrationService, IVmNodeService, ISystemOrganizationService, ISystemMemberService, ISystemApiExtension, ILogManager, IKinoticClusterInfoService, GroupLoggerLevelsDescriptor };
525
+ export { WorkloadStatusReport, WorkloadServiceProxy, WorkloadReservation, WorkloadOrchestrationService, VmProviderType, VmNodeStatusType, VmNodeStatus, VmNodeServiceProxy, VmNodeRegistration, VmNodeOrchestrationServiceProxy, VmNode, TraceLogProperties, SystemOrganizationService, SystemMemberService, SystemApiPlugin, SingleLoggerLevelsDescriptor, SYSTEM_API_ZONE, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticNodeInfo, KinoticClusterInfoService, KinoticClusterInfo, IWorkloadService, IWorkloadOrchestrationService, IVmNodeService, ISystemOrganizationService, ISystemMemberService, ISystemApiExtension, ILogManager, IKinoticClusterInfoService, GroupLoggerLevelsDescriptor };
package/dist/index.d.ts CHANGED
@@ -21,6 +21,26 @@ declare class VmNodeStatus {
21
21
  */
22
22
  healthMessage: string | null;
23
23
  }
24
+ /**
25
+ * The room one workload holds on a VmNode: its CPU, memory and disk while its VM runs, and its
26
+ * disk alone once the run has ended, since a VM that is kept for a restart keeps its disk on the
27
+ * node. A workload holds at most one reservation per node, keyed by its id.
28
+ */
29
+ interface WorkloadReservation {
30
+ /** The id of the workload holding the reservation. */
31
+ workloadId: string;
32
+ /** CPU the workload's VM is allotted, in cores; a fraction is a share of one core. */
33
+ cpus: number;
34
+ /** Memory the workload's VM is allotted, in megabytes. */
35
+ memoryMb: number;
36
+ /** Disk the workload's VM is allotted, in megabytes. */
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
+ }
24
44
  declare enum VmProviderType {
25
45
  BOXLITE = "BOXLITE",
26
46
  CLOUD_HYPERVISOR = "CLOUD_HYPERVISOR"
@@ -64,8 +84,8 @@ declare class VmNode implements Identifiable<string> {
64
84
  */
65
85
  totalDiskMb: number;
66
86
  /**
67
- * Number of vCPUs not allocated to any workload. What is allocated is
68
- * totalCpus - availableCpus.
87
+ * CPU not allocated to any workload, in cores. What is allocated is
88
+ * totalCpus - availableCpus, the sum of the reservations that are running.
69
89
  */
70
90
  availableCpus: number;
71
91
  /**
@@ -77,6 +97,12 @@ declare class VmNode implements Identifiable<string> {
77
97
  */
78
98
  availableDiskMb: number;
79
99
  /**
100
+ * The room each workload placed on this node holds, one entry per workload. The available*
101
+ * fields are the totals less what these hold, so a workload's room is reserved and released
102
+ * by its id and never counted twice.
103
+ */
104
+ reservations: WorkloadReservation[];
105
+ /**
80
106
  * The date and time the node was last seen/heartbeat.
81
107
  */
82
108
  lastSeen: number | null;
@@ -145,7 +171,7 @@ import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
145
171
  interface IVmNodeService extends ICrudServiceProxy<VmNode> {
146
172
  /**
147
173
  * Finds a node with sufficient resources to host a workload with the given requirements.
148
- * @param requiredCpus the number of vCPUs required
174
+ * @param requiredCpus the CPU required, in cores
149
175
  * @param requiredMemoryMb the amount of memory required in megabytes
150
176
  * @param requiredDiskMb the amount of disk space required in megabytes
151
177
  * @return a Promise resolving to a suitable node, or null if none available
@@ -496,4 +522,4 @@ declare class LogManager implements ILogManager {
496
522
  declare module "@kinotic-ai/core" {
497
523
  interface KinoticSingleton extends ISystemApiExtension {}
498
524
  }
499
- export { WorkloadStatusReport, WorkloadServiceProxy, WorkloadOrchestrationService, VmProviderType, VmNodeStatusType, VmNodeStatus, VmNodeServiceProxy, VmNodeRegistration, VmNodeOrchestrationServiceProxy, VmNode, TraceLogProperties, SystemOrganizationService, SystemMemberService, SystemApiPlugin, SingleLoggerLevelsDescriptor, SYSTEM_API_ZONE, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticNodeInfo, KinoticClusterInfoService, KinoticClusterInfo, IWorkloadService, IWorkloadOrchestrationService, IVmNodeService, ISystemOrganizationService, ISystemMemberService, ISystemApiExtension, ILogManager, IKinoticClusterInfoService, GroupLoggerLevelsDescriptor };
525
+ export { WorkloadStatusReport, WorkloadServiceProxy, WorkloadReservation, WorkloadOrchestrationService, VmProviderType, VmNodeStatusType, VmNodeStatus, VmNodeServiceProxy, VmNodeRegistration, VmNodeOrchestrationServiceProxy, VmNode, TraceLogProperties, SystemOrganizationService, SystemMemberService, SystemApiPlugin, SingleLoggerLevelsDescriptor, SYSTEM_API_ZONE, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticNodeInfo, KinoticClusterInfoService, KinoticClusterInfo, IWorkloadService, IWorkloadOrchestrationService, IVmNodeService, ISystemOrganizationService, ISystemMemberService, ISystemApiExtension, ILogManager, IKinoticClusterInfoService, GroupLoggerLevelsDescriptor };
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ class VmNode {
36
36
  availableCpus = 0;
37
37
  availableMemoryMb = 0;
38
38
  availableDiskMb = 0;
39
+ reservations = [];
39
40
  lastSeen = null;
40
41
  workloadDataDir = null;
41
42
  constructor(id, name, hostname) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinotic-ai/system-api",
3
- "version": "5.0.0-beta.14",
3
+ "version": "5.0.0-beta.15",
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.32"
42
+ "@kinotic-ai/management-api": "^5.0.0-beta.33"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@kinotic-ai/core": "5.0.0-beta.13",
46
- "@kinotic-ai/management-api": "5.0.0-beta.32",
46
+ "@kinotic-ai/management-api": "5.0.0-beta.33",
47
47
  "@types/bun": "^1.3.9",
48
48
  "typescript": "^5.9.3"
49
49
  }