@kinotic-ai/system-api 5.0.0-beta.1 → 5.0.0-beta.10

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
@@ -40,10 +40,8 @@ var __export = (target, all) => {
40
40
  // packages/system-api/src/index.ts
41
41
  var exports_src = {};
42
42
  __export(exports_src, {
43
- WorkloadStatus: () => WorkloadStatus,
44
43
  WorkloadServiceProxy: () => WorkloadServiceProxy,
45
44
  WorkloadOrchestrationService: () => WorkloadOrchestrationService,
46
- Workload: () => Workload,
47
45
  VmProviderType: () => VmProviderType,
48
46
  VmNodeStatusType: () => VmNodeStatusType,
49
47
  VmNodeStatus: () => VmNodeStatus,
@@ -51,16 +49,13 @@ __export(exports_src, {
51
49
  VmNodeRegistration: () => VmNodeRegistration,
52
50
  VmNodeOrchestrationServiceProxy: () => VmNodeOrchestrationServiceProxy,
53
51
  VmNode: () => VmNode,
52
+ TraceLogProperties: () => TraceLogProperties,
54
53
  SystemOrganizationService: () => SystemOrganizationService,
55
54
  SystemApiPlugin: () => SystemApiPlugin,
56
55
  SingleLoggerLevelsDescriptor: () => SingleLoggerLevelsDescriptor,
57
56
  SYSTEM_API_ZONE: () => import_management_api8.SYSTEM_API_ZONE,
58
- PortProtocol: () => PortProtocol,
59
- NetworkPolicy: () => NetworkPolicy,
60
- NetworkMode: () => NetworkMode,
61
57
  LoggersDescriptor: () => LoggersDescriptor,
62
58
  LoggerLevelsDescriptor: () => LoggerLevelsDescriptor,
63
- LogPolicy: () => LogPolicy,
64
59
  LogManager: () => LogManager,
65
60
  LogLevel: () => LogLevel,
66
61
  KinoticNodeInfo: () => KinoticNodeInfo,
@@ -71,28 +66,6 @@ __export(exports_src, {
71
66
  module.exports = __toCommonJS(exports_src);
72
67
  var import_management_api8 = require("@kinotic-ai/management-api");
73
68
 
74
- // packages/system-api/src/api/model/workload/LogPolicy.ts
75
- class LogPolicy {
76
- maxSizeMb = 10;
77
- maxFiles = 3;
78
- }
79
- // packages/system-api/src/api/model/workload/NetworkMode.ts
80
- var NetworkMode;
81
- ((NetworkMode2) => {
82
- NetworkMode2["ENABLED"] = "ENABLED";
83
- NetworkMode2["DISABLED"] = "DISABLED";
84
- })(NetworkMode ||= {});
85
- // packages/system-api/src/api/model/workload/NetworkPolicy.ts
86
- class NetworkPolicy {
87
- mode = "ENABLED" /* ENABLED */;
88
- allowedHosts = [];
89
- }
90
- // packages/system-api/src/api/model/workload/PortProtocol.ts
91
- var PortProtocol;
92
- ((PortProtocol2) => {
93
- PortProtocol2["TCP"] = "TCP";
94
- PortProtocol2["UDP"] = "UDP";
95
- })(PortProtocol ||= {});
96
69
  // packages/system-api/src/api/model/workload/VmNodeStatusType.ts
97
70
  var VmNodeStatusType;
98
71
  ((VmNodeStatusType2) => {
@@ -124,9 +97,9 @@ class VmNode {
124
97
  totalCpus = 0;
125
98
  totalMemoryMb = 0;
126
99
  totalDiskMb = 0;
127
- allocatedCpus = 0;
128
- allocatedMemoryMb = 0;
129
- allocatedDiskMb = 0;
100
+ availableCpus = 0;
101
+ availableMemoryMb = 0;
102
+ availableDiskMb = 0;
130
103
  lastSeen = null;
131
104
  workloadDataDir = null;
132
105
  constructor(id, name, hostname) {
@@ -135,48 +108,6 @@ class VmNode {
135
108
  this.hostname = hostname;
136
109
  }
137
110
  }
138
- // packages/system-api/src/api/model/workload/WorkloadStatus.ts
139
- var WorkloadStatus;
140
- ((WorkloadStatus2) => {
141
- WorkloadStatus2["PENDING"] = "PENDING";
142
- WorkloadStatus2["STARTING"] = "STARTING";
143
- WorkloadStatus2["RUNNING"] = "RUNNING";
144
- WorkloadStatus2["STOPPING"] = "STOPPING";
145
- WorkloadStatus2["STOPPED"] = "STOPPED";
146
- WorkloadStatus2["FAILED"] = "FAILED";
147
- })(WorkloadStatus ||= {});
148
-
149
- // packages/system-api/src/api/model/workload/Workload.ts
150
- class Workload {
151
- id = null;
152
- name;
153
- description;
154
- nodeId = null;
155
- organizationId = null;
156
- applicationId = null;
157
- image;
158
- vcpus = 1;
159
- memoryMb = 512;
160
- diskSizeMb = 1024;
161
- network = new NetworkPolicy;
162
- logPolicy = new LogPolicy;
163
- detached = true;
164
- autoRemove = false;
165
- status = "PENDING" /* PENDING */;
166
- exitCode = null;
167
- environment = {};
168
- secrets = {};
169
- portMappings = [];
170
- volumeMounts = [];
171
- entrypoint = [];
172
- cmd = [];
173
- created = null;
174
- updated = null;
175
- constructor(name, image) {
176
- this.name = name;
177
- this.image = image;
178
- }
179
- }
180
111
  // packages/system-api/src/api/model/VmNodeRegistration.ts
181
112
  class VmNodeRegistration {
182
113
  id;
@@ -305,6 +236,11 @@ class LoggersDescriptor {
305
236
  groups = new Map;
306
237
  }
307
238
 
239
+ class TraceLogProperties {
240
+ includes = [];
241
+ excludes = [];
242
+ }
243
+
308
244
  // packages/system-api/src/api/services/LogManager.ts
309
245
  class LogManager {
310
246
  serviceProxy;
@@ -330,6 +266,15 @@ class LogManager {
330
266
  configureLogLevel(nodeId, name, level) {
331
267
  return this.serviceProxy.invoke("configureLogLevel", [name, level], nodeId);
332
268
  }
269
+ async traceLog(nodeId) {
270
+ const data = await this.serviceProxy.invoke("traceLog", null, nodeId);
271
+ const ret = new TraceLogProperties;
272
+ Object.assign(ret, data);
273
+ return ret;
274
+ }
275
+ configureTraceLog(nodeId, traceLog) {
276
+ return this.serviceProxy.invoke("configureTraceLog", [traceLog], nodeId);
277
+ }
333
278
  }
334
279
 
335
280
  // packages/system-api/src/api/services/IKinoticClusterInfoService.ts
@@ -380,6 +325,9 @@ class SystemOrganizationService {
380
325
  findPendingInvites(organizationId, applicationId, pageable) {
381
326
  return this.serviceProxy.invoke("findPendingInvites", [organizationId, applicationId, pageable]);
382
327
  }
328
+ provisionOrganization(organizationId) {
329
+ return this.serviceProxy.invoke("provisionOrganization", [organizationId]);
330
+ }
383
331
  }
384
332
 
385
333
  // packages/system-api/src/api/SystemApiPlugin.ts
@@ -409,5 +357,7 @@ class KinoticNodeInfo {
409
357
  nodeId = "";
410
358
  order = 0;
411
359
  local = false;
360
+ addresses = [];
361
+ hostNames = [];
412
362
  version = "";
413
363
  }
package/dist/index.d.cts CHANGED
@@ -1,67 +1,4 @@
1
1
  import { SYSTEM_API_ZONE } from "@kinotic-ai/management-api";
2
- /**
3
- * How much of a workload's log output is kept on the node. The workload's own image and
4
- * entrypoint have no say in it: the policy is applied by the VM provider, which owns the
5
- * log files, so a workload cannot fill the node by writing to stdout.
6
- */
7
- declare class LogPolicy {
8
- /**
9
- * Size at which the workload's current log file is rotated.
10
- */
11
- maxSizeMb: number;
12
- /**
13
- * How many rotated files are kept alongside the current one. The oldest is discarded
14
- * once this many exist, so a workload's logs occupy at most maxSizeMb * (maxFiles + 1).
15
- */
16
- maxFiles: number;
17
- }
18
- declare enum NetworkMode {
19
- ENABLED = "ENABLED",
20
- /**
21
- * No network access. Nothing outside the VM is reachable, by name or by address, and
22
- * any NetworkPolicy.allowedHosts the workload declares does not apply.
23
- */
24
- DISABLED = "DISABLED"
25
- }
26
- /**
27
- * The network access granted to a workload's VM. The workload's own image and entrypoint
28
- * have no say in it: the policy is applied by the VM provider when the VM is created,
29
- * which is what makes it safe to run code the platform does not trust.
30
- */
31
- declare class NetworkPolicy {
32
- /**
33
- * Whether the VM has network access at all.
34
- */
35
- mode: NetworkMode;
36
- /**
37
- * The outbound destinations the VM may reach, including the api-gateway the workload is
38
- * deployed to talk to. An empty list denies every destination, leaving the VM able to
39
- * resolve names and reach nothing. Applies only when mode is ENABLED.
40
- *
41
- * What an entry may be follows the provider of the node the workload is placed on:
42
- * CLOUD_HYPERVISOR takes IPv4 addresses and CIDRs, enforced by the node's firewall, and
43
- * BOXLITE takes hostnames, enforced on the connection so an unlisted destination is
44
- * unreachable by name and by raw IP alike.
45
- */
46
- allowedHosts: string[];
47
- }
48
- declare enum PortProtocol {
49
- TCP = "TCP",
50
- UDP = "UDP"
51
- }
52
- /**
53
- * A guest port exposed on the host for a workload's VM.
54
- */
55
- interface PortMapping {
56
- /** Host port to expose. When omitted, the provider assigns one. */
57
- hostPort?: number;
58
- /** Guest port to map to the host. */
59
- guestPort: number;
60
- /** Transport protocol. When omitted, the provider's default applies. */
61
- protocol?: PortProtocol;
62
- /** Host interface to bind on. When omitted, the provider's default applies. */
63
- hostIp?: string;
64
- }
65
2
  import { Identifiable } from "@kinotic-ai/core";
66
3
  declare enum VmNodeStatusType {
67
4
  ONLINE = "ONLINE",
@@ -126,17 +63,18 @@ declare class VmNode implements Identifiable<string> {
126
63
  */
127
64
  totalDiskMb: number;
128
65
  /**
129
- * Number of vCPUs currently allocated to workloads.
66
+ * Number of vCPUs not allocated to any workload. What is allocated is
67
+ * totalCpus - availableCpus.
130
68
  */
131
- allocatedCpus: number;
69
+ availableCpus: number;
132
70
  /**
133
- * Memory currently allocated to workloads in megabytes.
71
+ * Memory not allocated to any workload, in megabytes.
134
72
  */
135
- allocatedMemoryMb: number;
73
+ availableMemoryMb: number;
136
74
  /**
137
- * Disk space currently allocated to workloads in megabytes.
75
+ * Disk space not allocated to any workload, in megabytes.
138
76
  */
139
- allocatedDiskMb: number;
77
+ availableDiskMb: number;
140
78
  /**
141
79
  * The date and time the node was last seen/heartbeat.
142
80
  */
@@ -149,154 +87,6 @@ declare class VmNode implements Identifiable<string> {
149
87
  constructor(id: string, name: string, hostname: string);
150
88
  }
151
89
  /**
152
- * A host directory exposed inside a workload's guest VM.
153
- */
154
- interface VolumeMount {
155
- /** Absolute path on the host to mount into the guest. */
156
- hostPath: string;
157
- /** Absolute path inside the guest where the host path is mounted. */
158
- guestPath: string;
159
- /** When true, the mount is exposed read-only inside the guest. Defaults to false. */
160
- readOnly?: boolean;
161
- /**
162
- * Hard cap in megabytes on what the guest may write through this mount. Unset leaves the
163
- * mount bounded only by the host filesystem it comes from. Applies to writable mounts,
164
- * since a read-only mount is already unwritable.
165
- */
166
- sizeLimitMb?: number;
167
- }
168
- import { Identifiable as Identifiable2 } from "@kinotic-ai/core";
169
- declare enum WorkloadStatus {
170
- PENDING = "PENDING",
171
- STARTING = "STARTING",
172
- RUNNING = "RUNNING",
173
- STOPPING = "STOPPING",
174
- STOPPED = "STOPPED",
175
- FAILED = "FAILED"
176
- }
177
- /**
178
- * Represents a workload to be managed by the VM manager.
179
- * A workload defines the configuration for a micro VM instance.
180
- */
181
- declare class Workload implements Identifiable2<string> {
182
- /**
183
- * Unique identifier for this workload.
184
- */
185
- id: string | null;
186
- /**
187
- * Human-readable name for the workload.
188
- */
189
- name: string;
190
- /**
191
- * Optional description of the workload.
192
- */
193
- description?: string;
194
- /**
195
- * The id of the node this workload is deployed to, assigned by the orchestrator
196
- * during deployment, or set by the caller before deploying to pin the workload to a
197
- * specific node. Null until the workload has been placed.
198
- */
199
- nodeId: string | null;
200
- /**
201
- * The Organization this workload runs on behalf of, and which may view its logs.
202
- * Null for platform workloads (SYSTEM scope).
203
- */
204
- organizationId: string | null;
205
- /**
206
- * The Application this workload runs on behalf of, or null if none.
207
- * When set, organizationId must also be set.
208
- */
209
- applicationId: string | null;
210
- /**
211
- * The image or rootfs to use for the VM.
212
- */
213
- image: string;
214
- /**
215
- * Number of vCPUs allocated to the VM.
216
- */
217
- vcpus: number;
218
- /**
219
- * Memory allocated to the VM in megabytes.
220
- */
221
- memoryMb: number;
222
- /**
223
- * Disk size allocated to the VM in megabytes.
224
- */
225
- diskSizeMb: number;
226
- /**
227
- * The network access granted to this workload's VM.
228
- */
229
- network: NetworkPolicy;
230
- /**
231
- * How much of this workload's log output the node keeps.
232
- */
233
- logPolicy: LogPolicy;
234
- /**
235
- * When true the VM runs detached from the vm-manager process and survives its restarts,
236
- * and calls that start its run (deploy, restart) complete as soon as it is running.
237
- * When false the workload runs in the foreground: it ends when the vm-manager exits,
238
- * and calls that start its run complete only once the run has ended — STOPPED or
239
- * FAILED, with the exit code set.
240
- */
241
- detached: boolean;
242
- /**
243
- * When true the VM and its disk are discarded when the workload stops, so a
244
- * stopped workload cannot be restarted. When false the disk is kept and the
245
- * workload may be restarted in place.
246
- */
247
- autoRemove: boolean;
248
- /**
249
- * Current status of the workload.
250
- */
251
- status: WorkloadStatus;
252
- /**
253
- * The exit status of the workload's process once it has stopped, null while it has not.
254
- * A workload killed by a signal reports 128 plus the signal number, so 137 is a SIGKILL —
255
- * which is what a workload that exceeded its memory limit receives, with no chance to
256
- * shut down first. FAILED alone does not distinguish that from code that threw.
257
- */
258
- exitCode: number | null;
259
- /**
260
- * Optional environment variables to pass to the VM. Persisted verbatim on the workload
261
- * record — put values that must not be readable there in secrets instead.
262
- */
263
- environment: Record<string, string>;
264
- /**
265
- * Optional secret environment variables to pass to the VM, delivered to the guest
266
- * exactly like environment and overriding it on a duplicate key. The persisted workload
267
- * record holds a masked value for every entry — reading a workload back returns the keys
268
- * but never the values, which only the node receives.
269
- */
270
- secrets: Record<string, string>;
271
- /**
272
- * Port mappings that expose guest ports on the host.
273
- */
274
- portMappings: PortMapping[];
275
- /**
276
- * Volume mounts that expose host directories inside the guest VM.
277
- */
278
- volumeMounts: VolumeMount[];
279
- /**
280
- * Overrides the image entrypoint. Empty keeps the image default.
281
- */
282
- entrypoint: string[];
283
- /**
284
- * Overrides the image command (CMD). Empty keeps the image default, unless
285
- * entrypoint is declared — then the image CMD is dropped so the entrypoint
286
- * runs exactly as given.
287
- */
288
- cmd: string[];
289
- /**
290
- * The date and time the workload was created.
291
- */
292
- created: number | null;
293
- /**
294
- * The date and time the workload was last updated.
295
- */
296
- updated: number | null;
297
- constructor(name: string, image: string);
298
- }
299
- /**
300
90
  * DTO sent by a vm-manager process when it registers with the server.
301
91
  * Contains only the information the node knows about itself.
302
92
  */
@@ -335,6 +125,7 @@ declare class VmNodeRegistration {
335
125
  workloadDataDir: string | null;
336
126
  constructor(id: string, name: string, hostname: string);
337
127
  }
128
+ import { WorkloadStatus } from "@kinotic-ai/management-api";
338
129
  /**
339
130
  * A vm-manager node's view of one workload's status, reported to the orchestrator.
340
131
  */
@@ -370,6 +161,7 @@ declare class VmNodeServiceProxy extends CrudServiceProxy<VmNode> implements IVm
370
161
  findAvailableNode(requiredCpus: number, requiredMemoryMb: number, requiredDiskMb: number): Promise<VmNode | null>;
371
162
  syncIndex(): Promise<void>;
372
163
  }
164
+ import { Workload } from "@kinotic-ai/management-api";
373
165
  import { CrudServiceProxy as CrudServiceProxy2, IKinotic as IKinotic2, ICrudServiceProxy as ICrudServiceProxy2, IterablePage, Page, Pageable } from "@kinotic-ai/core";
374
166
  interface IWorkloadService extends ICrudServiceProxy2<Workload> {
375
167
  /**
@@ -398,6 +190,7 @@ declare class WorkloadServiceProxy extends CrudServiceProxy2<Workload> implement
398
190
  countForNode(nodeId: string): Promise<number>;
399
191
  syncIndex(): Promise<void>;
400
192
  }
193
+ import { Workload as Workload2 } from "@kinotic-ai/management-api";
401
194
  import { IKinotic as IKinotic3 } from "@kinotic-ai/core";
402
195
  /**
403
196
  * Orchestrates workload deployment across the cluster, acting as the intermediary between
@@ -414,7 +207,7 @@ interface IWorkloadOrchestrationService {
414
207
  * @param workload the workload configuration to deploy
415
208
  * @return a Promise resolving to the deployed workload (including assigned nodeId and id)
416
209
  */
417
- deployWorkload(workload: Workload): Promise<Workload>;
210
+ deployWorkload(workload: Workload2): Promise<Workload2>;
418
211
  /**
419
212
  * Restarts a stopped workload in place on the node it is deployed to. Fails unless the
420
213
  * workload is stopped; a workload stopped with autoRemove true has no VM left to restart.
@@ -422,7 +215,7 @@ interface IWorkloadOrchestrationService {
422
215
  * @param workloadId the id of the workload to restart
423
216
  * @return a Promise resolving to the restarted workload
424
217
  */
425
- restartWorkload(workloadId: string): Promise<Workload>;
218
+ restartWorkload(workloadId: string): Promise<Workload2>;
426
219
  /**
427
220
  * Stops a running workload.
428
221
  * @param workloadId the id of the workload to stop
@@ -439,8 +232,8 @@ interface IWorkloadOrchestrationService {
439
232
  declare class WorkloadOrchestrationService implements IWorkloadOrchestrationService {
440
233
  private readonly serviceProxy;
441
234
  constructor(kinotic: IKinotic3);
442
- deployWorkload(workload: Workload): Promise<Workload>;
443
- restartWorkload(workloadId: string): Promise<Workload>;
235
+ deployWorkload(workload: Workload2): Promise<Workload2>;
236
+ restartWorkload(workloadId: string): Promise<Workload2>;
444
237
  stopWorkload(workloadId: string): Promise<void>;
445
238
  destroyWorkload(workloadId: string): Promise<void>;
446
239
  }
@@ -507,6 +300,22 @@ declare class LoggersDescriptor {
507
300
  groups: Map<string, GroupLoggerLevelsDescriptor>;
508
301
  }
509
302
  /**
303
+ * The CRI patterns that decide what trace logging prints.
304
+ *
305
+ * Each pattern is matched against the fully qualified CRI with Ant wildcards, where `*` matches
306
+ * within one segment and `**` across segments, so
307
+ * `srv://system-api~com.acme.HeartbeatService/*` covers every method of that service and
308
+ * `srv://system-api~com.acme.HeartbeatService/ping` covers only that one.
309
+ * An include wins over an exclude, so `excludes: ['**']` plus the handful of includes worth
310
+ * watching narrows trace logging to those services alone.
311
+ */
312
+ declare class TraceLogProperties {
313
+ /** CRIs kept in trace logging whatever the excludes say. Empty leaves the excludes to decide. */
314
+ includes: string[];
315
+ /** CRIs left out of trace logging, request and reply both, unless an include covers them. */
316
+ excludes: string[];
317
+ }
318
+ /**
510
319
  * Provides the ability to manage loggers
511
320
  */
512
321
  interface ILogManager {
@@ -528,6 +337,21 @@ interface ILogManager {
528
337
  * @param level the {@link LogLevel} to set for the logger with the given name
529
338
  */
530
339
  configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
340
+ /**
341
+ * @param nodeId the kinotic node to get the trace log patterns from
342
+ * @return the CRI patterns currently deciding what the node trace logs
343
+ */
344
+ traceLog(nodeId: string): Promise<TraceLogProperties>;
345
+ /**
346
+ * Configures the CRI patterns deciding what the node trace logs, silencing a service that
347
+ * would otherwise bury the log while trace logging is on.
348
+ * The patterns replace whatever the node is using and last until it restarts, which returns it
349
+ * to the `kinotic.traceLog` it was configured with.
350
+ *
351
+ * @param nodeId the kinotic node to set the trace log patterns on
352
+ * @param traceLog the include and exclude patterns to apply
353
+ */
354
+ configureTraceLog(nodeId: string, traceLog: TraceLogProperties): Promise<void>;
531
355
  }
532
356
  import { IKinotic as IKinotic5 } from "@kinotic-ai/core";
533
357
  /**
@@ -538,6 +362,8 @@ declare class KinoticNodeInfo {
538
362
  nodeId: string;
539
363
  order: number;
540
364
  local: boolean;
365
+ addresses: string[];
366
+ hostNames: string[];
541
367
  version: string;
542
368
  }
543
369
  /**
@@ -585,6 +411,12 @@ interface ISystemOrganizationService {
585
411
  findMembers(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
586
412
  searchMembers(searchText: string, organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
587
413
  findPendingInvites(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<PendingInviteSummary>>;
414
+ /**
415
+ * Provisions the organization again: runs the provisioning job that its creation ran, which
416
+ * does whatever an earlier run left undone, and records the new run on the organization.
417
+ * @param organizationId the organization to provision
418
+ */
419
+ provisionOrganization(organizationId: string): Promise<Organization>;
588
420
  }
589
421
  declare class SystemOrganizationService implements ISystemOrganizationService {
590
422
  private readonly serviceProxy;
@@ -598,6 +430,7 @@ declare class SystemOrganizationService implements ISystemOrganizationService {
598
430
  findMembers(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
599
431
  searchMembers(searchText: string, organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
600
432
  findPendingInvites(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<PendingInviteSummary>>;
433
+ provisionOrganization(organizationId: string): Promise<Organization>;
601
434
  }
602
435
  interface ISystemApiExtension {
603
436
  vmNodes: IVmNodeService;
@@ -615,8 +448,10 @@ declare class LogManager implements ILogManager {
615
448
  loggers(nodeId: string): Promise<LoggersDescriptor>;
616
449
  loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
617
450
  configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
451
+ traceLog(nodeId: string): Promise<TraceLogProperties>;
452
+ configureTraceLog(nodeId: string, traceLog: TraceLogProperties): Promise<void>;
618
453
  }
619
454
  declare module "@kinotic-ai/core" {
620
455
  interface KinoticSingleton extends ISystemApiExtension {}
621
456
  }
622
- export { WorkloadStatusReport, WorkloadStatus, WorkloadServiceProxy, WorkloadOrchestrationService, Workload, VolumeMount, VmProviderType, VmNodeStatusType, VmNodeStatus, VmNodeServiceProxy, VmNodeRegistration, VmNodeOrchestrationServiceProxy, VmNode, SystemOrganizationService, SystemApiPlugin, SingleLoggerLevelsDescriptor, SYSTEM_API_ZONE, PortProtocol, PortMapping, NetworkPolicy, NetworkMode, LoggersDescriptor, LoggerLevelsDescriptor, LogPolicy, LogManager, LogLevel, KinoticNodeInfo, KinoticClusterInfoService, KinoticClusterInfo, IWorkloadService, IWorkloadOrchestrationService, IVmNodeService, ISystemOrganizationService, ISystemApiExtension, ILogManager, IKinoticClusterInfoService, GroupLoggerLevelsDescriptor };
457
+ export { WorkloadStatusReport, WorkloadServiceProxy, WorkloadOrchestrationService, VmProviderType, VmNodeStatusType, VmNodeStatus, VmNodeServiceProxy, VmNodeRegistration, VmNodeOrchestrationServiceProxy, VmNode, TraceLogProperties, SystemOrganizationService, SystemApiPlugin, SingleLoggerLevelsDescriptor, SYSTEM_API_ZONE, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticNodeInfo, KinoticClusterInfoService, KinoticClusterInfo, IWorkloadService, IWorkloadOrchestrationService, IVmNodeService, ISystemOrganizationService, ISystemApiExtension, ILogManager, IKinoticClusterInfoService, GroupLoggerLevelsDescriptor };
package/dist/index.d.ts CHANGED
@@ -1,67 +1,4 @@
1
1
  import { SYSTEM_API_ZONE } from "@kinotic-ai/management-api";
2
- /**
3
- * How much of a workload's log output is kept on the node. The workload's own image and
4
- * entrypoint have no say in it: the policy is applied by the VM provider, which owns the
5
- * log files, so a workload cannot fill the node by writing to stdout.
6
- */
7
- declare class LogPolicy {
8
- /**
9
- * Size at which the workload's current log file is rotated.
10
- */
11
- maxSizeMb: number;
12
- /**
13
- * How many rotated files are kept alongside the current one. The oldest is discarded
14
- * once this many exist, so a workload's logs occupy at most maxSizeMb * (maxFiles + 1).
15
- */
16
- maxFiles: number;
17
- }
18
- declare enum NetworkMode {
19
- ENABLED = "ENABLED",
20
- /**
21
- * No network access. Nothing outside the VM is reachable, by name or by address, and
22
- * any NetworkPolicy.allowedHosts the workload declares does not apply.
23
- */
24
- DISABLED = "DISABLED"
25
- }
26
- /**
27
- * The network access granted to a workload's VM. The workload's own image and entrypoint
28
- * have no say in it: the policy is applied by the VM provider when the VM is created,
29
- * which is what makes it safe to run code the platform does not trust.
30
- */
31
- declare class NetworkPolicy {
32
- /**
33
- * Whether the VM has network access at all.
34
- */
35
- mode: NetworkMode;
36
- /**
37
- * The outbound destinations the VM may reach, including the api-gateway the workload is
38
- * deployed to talk to. An empty list denies every destination, leaving the VM able to
39
- * resolve names and reach nothing. Applies only when mode is ENABLED.
40
- *
41
- * What an entry may be follows the provider of the node the workload is placed on:
42
- * CLOUD_HYPERVISOR takes IPv4 addresses and CIDRs, enforced by the node's firewall, and
43
- * BOXLITE takes hostnames, enforced on the connection so an unlisted destination is
44
- * unreachable by name and by raw IP alike.
45
- */
46
- allowedHosts: string[];
47
- }
48
- declare enum PortProtocol {
49
- TCP = "TCP",
50
- UDP = "UDP"
51
- }
52
- /**
53
- * A guest port exposed on the host for a workload's VM.
54
- */
55
- interface PortMapping {
56
- /** Host port to expose. When omitted, the provider assigns one. */
57
- hostPort?: number;
58
- /** Guest port to map to the host. */
59
- guestPort: number;
60
- /** Transport protocol. When omitted, the provider's default applies. */
61
- protocol?: PortProtocol;
62
- /** Host interface to bind on. When omitted, the provider's default applies. */
63
- hostIp?: string;
64
- }
65
2
  import { Identifiable } from "@kinotic-ai/core";
66
3
  declare enum VmNodeStatusType {
67
4
  ONLINE = "ONLINE",
@@ -126,17 +63,18 @@ declare class VmNode implements Identifiable<string> {
126
63
  */
127
64
  totalDiskMb: number;
128
65
  /**
129
- * Number of vCPUs currently allocated to workloads.
66
+ * Number of vCPUs not allocated to any workload. What is allocated is
67
+ * totalCpus - availableCpus.
130
68
  */
131
- allocatedCpus: number;
69
+ availableCpus: number;
132
70
  /**
133
- * Memory currently allocated to workloads in megabytes.
71
+ * Memory not allocated to any workload, in megabytes.
134
72
  */
135
- allocatedMemoryMb: number;
73
+ availableMemoryMb: number;
136
74
  /**
137
- * Disk space currently allocated to workloads in megabytes.
75
+ * Disk space not allocated to any workload, in megabytes.
138
76
  */
139
- allocatedDiskMb: number;
77
+ availableDiskMb: number;
140
78
  /**
141
79
  * The date and time the node was last seen/heartbeat.
142
80
  */
@@ -149,154 +87,6 @@ declare class VmNode implements Identifiable<string> {
149
87
  constructor(id: string, name: string, hostname: string);
150
88
  }
151
89
  /**
152
- * A host directory exposed inside a workload's guest VM.
153
- */
154
- interface VolumeMount {
155
- /** Absolute path on the host to mount into the guest. */
156
- hostPath: string;
157
- /** Absolute path inside the guest where the host path is mounted. */
158
- guestPath: string;
159
- /** When true, the mount is exposed read-only inside the guest. Defaults to false. */
160
- readOnly?: boolean;
161
- /**
162
- * Hard cap in megabytes on what the guest may write through this mount. Unset leaves the
163
- * mount bounded only by the host filesystem it comes from. Applies to writable mounts,
164
- * since a read-only mount is already unwritable.
165
- */
166
- sizeLimitMb?: number;
167
- }
168
- import { Identifiable as Identifiable2 } from "@kinotic-ai/core";
169
- declare enum WorkloadStatus {
170
- PENDING = "PENDING",
171
- STARTING = "STARTING",
172
- RUNNING = "RUNNING",
173
- STOPPING = "STOPPING",
174
- STOPPED = "STOPPED",
175
- FAILED = "FAILED"
176
- }
177
- /**
178
- * Represents a workload to be managed by the VM manager.
179
- * A workload defines the configuration for a micro VM instance.
180
- */
181
- declare class Workload implements Identifiable2<string> {
182
- /**
183
- * Unique identifier for this workload.
184
- */
185
- id: string | null;
186
- /**
187
- * Human-readable name for the workload.
188
- */
189
- name: string;
190
- /**
191
- * Optional description of the workload.
192
- */
193
- description?: string;
194
- /**
195
- * The id of the node this workload is deployed to, assigned by the orchestrator
196
- * during deployment, or set by the caller before deploying to pin the workload to a
197
- * specific node. Null until the workload has been placed.
198
- */
199
- nodeId: string | null;
200
- /**
201
- * The Organization this workload runs on behalf of, and which may view its logs.
202
- * Null for platform workloads (SYSTEM scope).
203
- */
204
- organizationId: string | null;
205
- /**
206
- * The Application this workload runs on behalf of, or null if none.
207
- * When set, organizationId must also be set.
208
- */
209
- applicationId: string | null;
210
- /**
211
- * The image or rootfs to use for the VM.
212
- */
213
- image: string;
214
- /**
215
- * Number of vCPUs allocated to the VM.
216
- */
217
- vcpus: number;
218
- /**
219
- * Memory allocated to the VM in megabytes.
220
- */
221
- memoryMb: number;
222
- /**
223
- * Disk size allocated to the VM in megabytes.
224
- */
225
- diskSizeMb: number;
226
- /**
227
- * The network access granted to this workload's VM.
228
- */
229
- network: NetworkPolicy;
230
- /**
231
- * How much of this workload's log output the node keeps.
232
- */
233
- logPolicy: LogPolicy;
234
- /**
235
- * When true the VM runs detached from the vm-manager process and survives its restarts,
236
- * and calls that start its run (deploy, restart) complete as soon as it is running.
237
- * When false the workload runs in the foreground: it ends when the vm-manager exits,
238
- * and calls that start its run complete only once the run has ended — STOPPED or
239
- * FAILED, with the exit code set.
240
- */
241
- detached: boolean;
242
- /**
243
- * When true the VM and its disk are discarded when the workload stops, so a
244
- * stopped workload cannot be restarted. When false the disk is kept and the
245
- * workload may be restarted in place.
246
- */
247
- autoRemove: boolean;
248
- /**
249
- * Current status of the workload.
250
- */
251
- status: WorkloadStatus;
252
- /**
253
- * The exit status of the workload's process once it has stopped, null while it has not.
254
- * A workload killed by a signal reports 128 plus the signal number, so 137 is a SIGKILL —
255
- * which is what a workload that exceeded its memory limit receives, with no chance to
256
- * shut down first. FAILED alone does not distinguish that from code that threw.
257
- */
258
- exitCode: number | null;
259
- /**
260
- * Optional environment variables to pass to the VM. Persisted verbatim on the workload
261
- * record — put values that must not be readable there in secrets instead.
262
- */
263
- environment: Record<string, string>;
264
- /**
265
- * Optional secret environment variables to pass to the VM, delivered to the guest
266
- * exactly like environment and overriding it on a duplicate key. The persisted workload
267
- * record holds a masked value for every entry — reading a workload back returns the keys
268
- * but never the values, which only the node receives.
269
- */
270
- secrets: Record<string, string>;
271
- /**
272
- * Port mappings that expose guest ports on the host.
273
- */
274
- portMappings: PortMapping[];
275
- /**
276
- * Volume mounts that expose host directories inside the guest VM.
277
- */
278
- volumeMounts: VolumeMount[];
279
- /**
280
- * Overrides the image entrypoint. Empty keeps the image default.
281
- */
282
- entrypoint: string[];
283
- /**
284
- * Overrides the image command (CMD). Empty keeps the image default, unless
285
- * entrypoint is declared — then the image CMD is dropped so the entrypoint
286
- * runs exactly as given.
287
- */
288
- cmd: string[];
289
- /**
290
- * The date and time the workload was created.
291
- */
292
- created: number | null;
293
- /**
294
- * The date and time the workload was last updated.
295
- */
296
- updated: number | null;
297
- constructor(name: string, image: string);
298
- }
299
- /**
300
90
  * DTO sent by a vm-manager process when it registers with the server.
301
91
  * Contains only the information the node knows about itself.
302
92
  */
@@ -335,6 +125,7 @@ declare class VmNodeRegistration {
335
125
  workloadDataDir: string | null;
336
126
  constructor(id: string, name: string, hostname: string);
337
127
  }
128
+ import { WorkloadStatus } from "@kinotic-ai/management-api";
338
129
  /**
339
130
  * A vm-manager node's view of one workload's status, reported to the orchestrator.
340
131
  */
@@ -370,6 +161,7 @@ declare class VmNodeServiceProxy extends CrudServiceProxy<VmNode> implements IVm
370
161
  findAvailableNode(requiredCpus: number, requiredMemoryMb: number, requiredDiskMb: number): Promise<VmNode | null>;
371
162
  syncIndex(): Promise<void>;
372
163
  }
164
+ import { Workload } from "@kinotic-ai/management-api";
373
165
  import { CrudServiceProxy as CrudServiceProxy2, IKinotic as IKinotic2, ICrudServiceProxy as ICrudServiceProxy2, IterablePage, Page, Pageable } from "@kinotic-ai/core";
374
166
  interface IWorkloadService extends ICrudServiceProxy2<Workload> {
375
167
  /**
@@ -398,6 +190,7 @@ declare class WorkloadServiceProxy extends CrudServiceProxy2<Workload> implement
398
190
  countForNode(nodeId: string): Promise<number>;
399
191
  syncIndex(): Promise<void>;
400
192
  }
193
+ import { Workload as Workload2 } from "@kinotic-ai/management-api";
401
194
  import { IKinotic as IKinotic3 } from "@kinotic-ai/core";
402
195
  /**
403
196
  * Orchestrates workload deployment across the cluster, acting as the intermediary between
@@ -414,7 +207,7 @@ interface IWorkloadOrchestrationService {
414
207
  * @param workload the workload configuration to deploy
415
208
  * @return a Promise resolving to the deployed workload (including assigned nodeId and id)
416
209
  */
417
- deployWorkload(workload: Workload): Promise<Workload>;
210
+ deployWorkload(workload: Workload2): Promise<Workload2>;
418
211
  /**
419
212
  * Restarts a stopped workload in place on the node it is deployed to. Fails unless the
420
213
  * workload is stopped; a workload stopped with autoRemove true has no VM left to restart.
@@ -422,7 +215,7 @@ interface IWorkloadOrchestrationService {
422
215
  * @param workloadId the id of the workload to restart
423
216
  * @return a Promise resolving to the restarted workload
424
217
  */
425
- restartWorkload(workloadId: string): Promise<Workload>;
218
+ restartWorkload(workloadId: string): Promise<Workload2>;
426
219
  /**
427
220
  * Stops a running workload.
428
221
  * @param workloadId the id of the workload to stop
@@ -439,8 +232,8 @@ interface IWorkloadOrchestrationService {
439
232
  declare class WorkloadOrchestrationService implements IWorkloadOrchestrationService {
440
233
  private readonly serviceProxy;
441
234
  constructor(kinotic: IKinotic3);
442
- deployWorkload(workload: Workload): Promise<Workload>;
443
- restartWorkload(workloadId: string): Promise<Workload>;
235
+ deployWorkload(workload: Workload2): Promise<Workload2>;
236
+ restartWorkload(workloadId: string): Promise<Workload2>;
444
237
  stopWorkload(workloadId: string): Promise<void>;
445
238
  destroyWorkload(workloadId: string): Promise<void>;
446
239
  }
@@ -507,6 +300,22 @@ declare class LoggersDescriptor {
507
300
  groups: Map<string, GroupLoggerLevelsDescriptor>;
508
301
  }
509
302
  /**
303
+ * The CRI patterns that decide what trace logging prints.
304
+ *
305
+ * Each pattern is matched against the fully qualified CRI with Ant wildcards, where `*` matches
306
+ * within one segment and `**` across segments, so
307
+ * `srv://system-api~com.acme.HeartbeatService/*` covers every method of that service and
308
+ * `srv://system-api~com.acme.HeartbeatService/ping` covers only that one.
309
+ * An include wins over an exclude, so `excludes: ['**']` plus the handful of includes worth
310
+ * watching narrows trace logging to those services alone.
311
+ */
312
+ declare class TraceLogProperties {
313
+ /** CRIs kept in trace logging whatever the excludes say. Empty leaves the excludes to decide. */
314
+ includes: string[];
315
+ /** CRIs left out of trace logging, request and reply both, unless an include covers them. */
316
+ excludes: string[];
317
+ }
318
+ /**
510
319
  * Provides the ability to manage loggers
511
320
  */
512
321
  interface ILogManager {
@@ -528,6 +337,21 @@ interface ILogManager {
528
337
  * @param level the {@link LogLevel} to set for the logger with the given name
529
338
  */
530
339
  configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
340
+ /**
341
+ * @param nodeId the kinotic node to get the trace log patterns from
342
+ * @return the CRI patterns currently deciding what the node trace logs
343
+ */
344
+ traceLog(nodeId: string): Promise<TraceLogProperties>;
345
+ /**
346
+ * Configures the CRI patterns deciding what the node trace logs, silencing a service that
347
+ * would otherwise bury the log while trace logging is on.
348
+ * The patterns replace whatever the node is using and last until it restarts, which returns it
349
+ * to the `kinotic.traceLog` it was configured with.
350
+ *
351
+ * @param nodeId the kinotic node to set the trace log patterns on
352
+ * @param traceLog the include and exclude patterns to apply
353
+ */
354
+ configureTraceLog(nodeId: string, traceLog: TraceLogProperties): Promise<void>;
531
355
  }
532
356
  import { IKinotic as IKinotic5 } from "@kinotic-ai/core";
533
357
  /**
@@ -538,6 +362,8 @@ declare class KinoticNodeInfo {
538
362
  nodeId: string;
539
363
  order: number;
540
364
  local: boolean;
365
+ addresses: string[];
366
+ hostNames: string[];
541
367
  version: string;
542
368
  }
543
369
  /**
@@ -585,6 +411,12 @@ interface ISystemOrganizationService {
585
411
  findMembers(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
586
412
  searchMembers(searchText: string, organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
587
413
  findPendingInvites(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<PendingInviteSummary>>;
414
+ /**
415
+ * Provisions the organization again: runs the provisioning job that its creation ran, which
416
+ * does whatever an earlier run left undone, and records the new run on the organization.
417
+ * @param organizationId the organization to provision
418
+ */
419
+ provisionOrganization(organizationId: string): Promise<Organization>;
588
420
  }
589
421
  declare class SystemOrganizationService implements ISystemOrganizationService {
590
422
  private readonly serviceProxy;
@@ -598,6 +430,7 @@ declare class SystemOrganizationService implements ISystemOrganizationService {
598
430
  findMembers(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
599
431
  searchMembers(searchText: string, organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
600
432
  findPendingInvites(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<PendingInviteSummary>>;
433
+ provisionOrganization(organizationId: string): Promise<Organization>;
601
434
  }
602
435
  interface ISystemApiExtension {
603
436
  vmNodes: IVmNodeService;
@@ -615,8 +448,10 @@ declare class LogManager implements ILogManager {
615
448
  loggers(nodeId: string): Promise<LoggersDescriptor>;
616
449
  loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
617
450
  configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
451
+ traceLog(nodeId: string): Promise<TraceLogProperties>;
452
+ configureTraceLog(nodeId: string, traceLog: TraceLogProperties): Promise<void>;
618
453
  }
619
454
  declare module "@kinotic-ai/core" {
620
455
  interface KinoticSingleton extends ISystemApiExtension {}
621
456
  }
622
- export { WorkloadStatusReport, WorkloadStatus, WorkloadServiceProxy, WorkloadOrchestrationService, Workload, VolumeMount, VmProviderType, VmNodeStatusType, VmNodeStatus, VmNodeServiceProxy, VmNodeRegistration, VmNodeOrchestrationServiceProxy, VmNode, SystemOrganizationService, SystemApiPlugin, SingleLoggerLevelsDescriptor, SYSTEM_API_ZONE, PortProtocol, PortMapping, NetworkPolicy, NetworkMode, LoggersDescriptor, LoggerLevelsDescriptor, LogPolicy, LogManager, LogLevel, KinoticNodeInfo, KinoticClusterInfoService, KinoticClusterInfo, IWorkloadService, IWorkloadOrchestrationService, IVmNodeService, ISystemOrganizationService, ISystemApiExtension, ILogManager, IKinoticClusterInfoService, GroupLoggerLevelsDescriptor };
457
+ export { WorkloadStatusReport, WorkloadServiceProxy, WorkloadOrchestrationService, VmProviderType, VmNodeStatusType, VmNodeStatus, VmNodeServiceProxy, VmNodeRegistration, VmNodeOrchestrationServiceProxy, VmNode, TraceLogProperties, SystemOrganizationService, SystemApiPlugin, SingleLoggerLevelsDescriptor, SYSTEM_API_ZONE, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticNodeInfo, KinoticClusterInfoService, KinoticClusterInfo, IWorkloadService, IWorkloadOrchestrationService, IVmNodeService, ISystemOrganizationService, ISystemApiExtension, ILogManager, IKinoticClusterInfoService, GroupLoggerLevelsDescriptor };
package/dist/index.js CHANGED
@@ -1,28 +1,6 @@
1
1
  // packages/system-api/src/index.ts
2
2
  import { SYSTEM_API_ZONE as SYSTEM_API_ZONE8 } from "@kinotic-ai/management-api";
3
3
 
4
- // packages/system-api/src/api/model/workload/LogPolicy.ts
5
- class LogPolicy {
6
- maxSizeMb = 10;
7
- maxFiles = 3;
8
- }
9
- // packages/system-api/src/api/model/workload/NetworkMode.ts
10
- var NetworkMode;
11
- ((NetworkMode2) => {
12
- NetworkMode2["ENABLED"] = "ENABLED";
13
- NetworkMode2["DISABLED"] = "DISABLED";
14
- })(NetworkMode ||= {});
15
- // packages/system-api/src/api/model/workload/NetworkPolicy.ts
16
- class NetworkPolicy {
17
- mode = "ENABLED" /* ENABLED */;
18
- allowedHosts = [];
19
- }
20
- // packages/system-api/src/api/model/workload/PortProtocol.ts
21
- var PortProtocol;
22
- ((PortProtocol2) => {
23
- PortProtocol2["TCP"] = "TCP";
24
- PortProtocol2["UDP"] = "UDP";
25
- })(PortProtocol ||= {});
26
4
  // packages/system-api/src/api/model/workload/VmNodeStatusType.ts
27
5
  var VmNodeStatusType;
28
6
  ((VmNodeStatusType2) => {
@@ -54,9 +32,9 @@ class VmNode {
54
32
  totalCpus = 0;
55
33
  totalMemoryMb = 0;
56
34
  totalDiskMb = 0;
57
- allocatedCpus = 0;
58
- allocatedMemoryMb = 0;
59
- allocatedDiskMb = 0;
35
+ availableCpus = 0;
36
+ availableMemoryMb = 0;
37
+ availableDiskMb = 0;
60
38
  lastSeen = null;
61
39
  workloadDataDir = null;
62
40
  constructor(id, name, hostname) {
@@ -65,48 +43,6 @@ class VmNode {
65
43
  this.hostname = hostname;
66
44
  }
67
45
  }
68
- // packages/system-api/src/api/model/workload/WorkloadStatus.ts
69
- var WorkloadStatus;
70
- ((WorkloadStatus2) => {
71
- WorkloadStatus2["PENDING"] = "PENDING";
72
- WorkloadStatus2["STARTING"] = "STARTING";
73
- WorkloadStatus2["RUNNING"] = "RUNNING";
74
- WorkloadStatus2["STOPPING"] = "STOPPING";
75
- WorkloadStatus2["STOPPED"] = "STOPPED";
76
- WorkloadStatus2["FAILED"] = "FAILED";
77
- })(WorkloadStatus ||= {});
78
-
79
- // packages/system-api/src/api/model/workload/Workload.ts
80
- class Workload {
81
- id = null;
82
- name;
83
- description;
84
- nodeId = null;
85
- organizationId = null;
86
- applicationId = null;
87
- image;
88
- vcpus = 1;
89
- memoryMb = 512;
90
- diskSizeMb = 1024;
91
- network = new NetworkPolicy;
92
- logPolicy = new LogPolicy;
93
- detached = true;
94
- autoRemove = false;
95
- status = "PENDING" /* PENDING */;
96
- exitCode = null;
97
- environment = {};
98
- secrets = {};
99
- portMappings = [];
100
- volumeMounts = [];
101
- entrypoint = [];
102
- cmd = [];
103
- created = null;
104
- updated = null;
105
- constructor(name, image) {
106
- this.name = name;
107
- this.image = image;
108
- }
109
- }
110
46
  // packages/system-api/src/api/model/VmNodeRegistration.ts
111
47
  class VmNodeRegistration {
112
48
  id;
@@ -235,6 +171,11 @@ class LoggersDescriptor {
235
171
  groups = new Map;
236
172
  }
237
173
 
174
+ class TraceLogProperties {
175
+ includes = [];
176
+ excludes = [];
177
+ }
178
+
238
179
  // packages/system-api/src/api/services/LogManager.ts
239
180
  class LogManager {
240
181
  serviceProxy;
@@ -260,6 +201,15 @@ class LogManager {
260
201
  configureLogLevel(nodeId, name, level) {
261
202
  return this.serviceProxy.invoke("configureLogLevel", [name, level], nodeId);
262
203
  }
204
+ async traceLog(nodeId) {
205
+ const data = await this.serviceProxy.invoke("traceLog", null, nodeId);
206
+ const ret = new TraceLogProperties;
207
+ Object.assign(ret, data);
208
+ return ret;
209
+ }
210
+ configureTraceLog(nodeId, traceLog) {
211
+ return this.serviceProxy.invoke("configureTraceLog", [traceLog], nodeId);
212
+ }
263
213
  }
264
214
 
265
215
  // packages/system-api/src/api/services/IKinoticClusterInfoService.ts
@@ -312,6 +262,9 @@ class SystemOrganizationService {
312
262
  findPendingInvites(organizationId, applicationId, pageable) {
313
263
  return this.serviceProxy.invoke("findPendingInvites", [organizationId, applicationId, pageable]);
314
264
  }
265
+ provisionOrganization(organizationId) {
266
+ return this.serviceProxy.invoke("provisionOrganization", [organizationId]);
267
+ }
315
268
  }
316
269
 
317
270
  // packages/system-api/src/api/SystemApiPlugin.ts
@@ -341,13 +294,13 @@ class KinoticNodeInfo {
341
294
  nodeId = "";
342
295
  order = 0;
343
296
  local = false;
297
+ addresses = [];
298
+ hostNames = [];
344
299
  version = "";
345
300
  }
346
301
  export {
347
- WorkloadStatus,
348
302
  WorkloadServiceProxy,
349
303
  WorkloadOrchestrationService,
350
- Workload,
351
304
  VmProviderType,
352
305
  VmNodeStatusType,
353
306
  VmNodeStatus,
@@ -355,16 +308,13 @@ export {
355
308
  VmNodeRegistration,
356
309
  VmNodeOrchestrationServiceProxy,
357
310
  VmNode,
311
+ TraceLogProperties,
358
312
  SystemOrganizationService,
359
313
  SystemApiPlugin,
360
314
  SingleLoggerLevelsDescriptor,
361
315
  SYSTEM_API_ZONE8 as SYSTEM_API_ZONE,
362
- PortProtocol,
363
- NetworkPolicy,
364
- NetworkMode,
365
316
  LoggersDescriptor,
366
317
  LoggerLevelsDescriptor,
367
- LogPolicy,
368
318
  LogManager,
369
319
  LogLevel,
370
320
  KinoticNodeInfo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinotic-ai/system-api",
3
- "version": "5.0.0-beta.1",
3
+ "version": "5.0.0-beta.10",
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": [
@@ -38,13 +38,13 @@
38
38
  "coverage": "bun test --coverage --pass-with-no-tests"
39
39
  },
40
40
  "dependencies": {
41
- "@kinotic-ai/management-api": "5.0.0-beta.17"
41
+ "@kinotic-ai/management-api": "^5.0.0-beta.26"
42
42
  },
43
43
  "peerDependencies": {
44
- "@kinotic-ai/core": ">=5.0.0-beta.5"
44
+ "@kinotic-ai/core": ">=5.0.0-beta.9"
45
45
  },
46
46
  "devDependencies": {
47
- "@kinotic-ai/core": "5.0.0-beta.5",
47
+ "@kinotic-ai/core": "5.0.0-beta.10",
48
48
  "@types/bun": "^1.3.9",
49
49
  "typescript": "^5.9.3"
50
50
  }