@kinotic-ai/system-api 5.0.0-beta.2 → 5.0.0-beta.20

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.d.ts CHANGED
@@ -1,87 +1,26 @@
1
1
  import { SYSTEM_API_ZONE } from "@kinotic-ai/management-api";
2
+ import { ReconcileState, Reconcilable } from "@kinotic-ai/management-api";
2
3
  /**
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.
4
+ * Whether a node is taking workloads, as the node reports it. A node the platform cannot reach is
5
+ * not a phase the node can report: it carries the condition NODE_UNREACHABLE beside what it last
6
+ * reported.
6
7
  */
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
- import { Identifiable } from "@kinotic-ai/core";
66
8
  declare enum VmNodeStatusType {
67
9
  ONLINE = "ONLINE",
68
- OFFLINE = "OFFLINE",
10
+ /**
11
+ * The node reported something it can no longer guarantee: it keeps the workloads it has and takes
12
+ * no more until it reports no problems.
13
+ */
69
14
  DRAINING = "DRAINING"
70
15
  }
71
16
  /**
72
- * Whether a node is fit to receive workloads, and why when it is not.
17
+ * The reconciled state of a node: the shape both the intent and the observation take, so a node is
18
+ * in its desired state exactly when the two are equal. Intent is that the node takes workloads;
19
+ * observation is what the node reports it can do.
73
20
  */
74
- declare class VmNodeStatus {
75
- /**
76
- * Whether the node is taking workloads.
77
- */
78
- type: VmNodeStatusType;
79
- /**
80
- * Why the node is not taking workloads, or null when it is. Set from the node's own report
81
- * of the guarantees it can still make — a data root that stopped enforcing disk limits, or
82
- * a firewall that stopped hiding host credentials from guests.
83
- */
84
- healthMessage: string | null;
21
+ interface VmNodeState {
22
+ /** Whether the node takes workloads. */
23
+ phase: VmNodeStatusType;
85
24
  }
86
25
  declare enum VmProviderType {
87
26
  BOXLITE = "BOXLITE",
@@ -91,7 +30,7 @@ declare enum VmProviderType {
91
30
  * Represents a node in the cluster that is running a VmManager process
92
31
  * and is capable of hosting workloads.
93
32
  */
94
- declare class VmNode implements Identifiable<string> {
33
+ declare class VmNode implements Reconcilable<VmNodeState> {
95
34
  /**
96
35
  * Unique identifier for this node.
97
36
  */
@@ -105,9 +44,17 @@ declare class VmNode implements Identifiable<string> {
105
44
  */
106
45
  hostname: string;
107
46
  /**
108
- * Whether the node is fit to receive workloads, and why when it is not.
47
+ * What the node should be, taking workloads, and what it reports it is, with what the platform
48
+ * inferred beside the node's word: that it fell silent, or that a call to it could not be
49
+ * delivered. A node is placeable exactly when this is reconciled.
109
50
  */
110
- status: VmNodeStatus;
51
+ state: ReconcileState<VmNodeState>;
52
+ /**
53
+ * Why the node is not taking workloads, or null when it is. Set from the node's own report of
54
+ * the guarantees it can still make — a data root that stopped enforcing disk limits, or a
55
+ * firewall that stopped hiding host credentials from guests.
56
+ */
57
+ healthMessage: string | null;
111
58
  /**
112
59
  * The VM provider this node runs every workload on, determined by how the node was
113
60
  * provisioned and reported when it registers.
@@ -126,17 +73,18 @@ declare class VmNode implements Identifiable<string> {
126
73
  */
127
74
  totalDiskMb: number;
128
75
  /**
129
- * Number of vCPUs currently allocated to workloads.
76
+ * CPU not allocated to any workload, in cores. What is allocated is
77
+ * totalCpus - freeCpus, what the workloads running on the node are sized for.
130
78
  */
131
- allocatedCpus: number;
79
+ freeCpus: number;
132
80
  /**
133
- * Memory currently allocated to workloads in megabytes.
81
+ * Memory not allocated to any workload, in megabytes.
134
82
  */
135
- allocatedMemoryMb: number;
83
+ freeMemoryMb: number;
136
84
  /**
137
- * Disk space currently allocated to workloads in megabytes.
85
+ * Disk space not allocated to any workload, in megabytes.
138
86
  */
139
- allocatedDiskMb: number;
87
+ freeDiskMb: number;
140
88
  /**
141
89
  * The date and time the node was last seen/heartbeat.
142
90
  */
@@ -149,154 +97,6 @@ declare class VmNode implements Identifiable<string> {
149
97
  constructor(id: string, name: string, hostname: string);
150
98
  }
151
99
  /**
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
100
  * DTO sent by a vm-manager process when it registers with the server.
301
101
  * Contains only the information the node knows about itself.
302
102
  */
@@ -335,6 +135,7 @@ declare class VmNodeRegistration {
335
135
  workloadDataDir: string | null;
336
136
  constructor(id: string, name: string, hostname: string);
337
137
  }
138
+ import { WorkloadStatus } from "@kinotic-ai/management-api";
338
139
  /**
339
140
  * A vm-manager node's view of one workload's status, reported to the orchestrator.
340
141
  */
@@ -348,17 +149,18 @@ interface WorkloadStatusReport {
348
149
  /** When the node recorded this status, in epoch milliseconds. */
349
150
  updated: number;
350
151
  }
152
+ import { WatchEvent } from "@kinotic-ai/management-api";
351
153
  import { IKinotic } from "@kinotic-ai/core";
352
- import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
154
+ import { CrudServiceProxy, ICrudServiceProxy, IterablePage, Page, Pageable } from "@kinotic-ai/core";
353
155
  interface IVmNodeService extends ICrudServiceProxy<VmNode> {
354
156
  /**
355
- * Finds a node with sufficient resources to host a workload with the given requirements.
356
- * @param requiredCpus the number of vCPUs required
357
- * @param requiredMemoryMb the amount of memory required in megabytes
358
- * @param requiredDiskMb the amount of disk space required in megabytes
359
- * @return a Promise resolving to a suitable node, or null if none available
157
+ * Lists what happened to the node, newest first: each change of what it should be and of what it
158
+ * reports, and each mark set beside them, with what caused it.
159
+ * @param nodeId the id of the node
160
+ * @param pageable the page to return
161
+ * @return a Promise resolving to a page of ledger entries, empty when the node is not registered
360
162
  */
361
- findAvailableNode(requiredCpus: number, requiredMemoryMb: number, requiredDiskMb: number): Promise<VmNode | null>;
163
+ findHistory(nodeId: string, pageable: Pageable): Promise<IterablePage<WatchEvent>>;
362
164
  /**
363
165
  * This operation makes all the recent writes immediately available for search.
364
166
  * @return a Promise that resolves when the operation is complete
@@ -367,10 +169,12 @@ interface IVmNodeService extends ICrudServiceProxy<VmNode> {
367
169
  }
368
170
  declare class VmNodeServiceProxy extends CrudServiceProxy<VmNode> implements IVmNodeService {
369
171
  constructor(kinotic: IKinotic);
370
- findAvailableNode(requiredCpus: number, requiredMemoryMb: number, requiredDiskMb: number): Promise<VmNode | null>;
172
+ findHistory(nodeId: string, pageable: Pageable): Promise<IterablePage<WatchEvent>>;
173
+ findHistorySinglePage(nodeId: string, pageable: Pageable): Promise<Page<WatchEvent>>;
371
174
  syncIndex(): Promise<void>;
372
175
  }
373
- import { CrudServiceProxy as CrudServiceProxy2, IKinotic as IKinotic2, ICrudServiceProxy as ICrudServiceProxy2, IterablePage, Page, Pageable } from "@kinotic-ai/core";
176
+ import { Workload, WatchEvent as WatchEvent2 } from "@kinotic-ai/management-api";
177
+ import { CrudServiceProxy as CrudServiceProxy2, IKinotic as IKinotic2, ICrudServiceProxy as ICrudServiceProxy2, IterablePage as IterablePage2, Page as Page2, Pageable as Pageable2 } from "@kinotic-ai/core";
374
178
  interface IWorkloadService extends ICrudServiceProxy2<Workload> {
375
179
  /**
376
180
  * Finds all workloads deployed on the given node.
@@ -378,13 +182,15 @@ interface IWorkloadService extends ICrudServiceProxy2<Workload> {
378
182
  * @param pageable the page to return
379
183
  * @return a Promise resolving to a page of workloads
380
184
  */
381
- findAllForNode(nodeId: string, pageable: Pageable): Promise<IterablePage<Workload>>;
185
+ findAllForNode(nodeId: string, pageable: Pageable2): Promise<IterablePage2<Workload>>;
382
186
  /**
383
- * Counts all workloads deployed on the given node.
384
- * @param nodeId the id of the node to count workloads for
385
- * @return a Promise resolving to the number of workloads
187
+ * Lists what happened to the workload, newest first: each status its run passed through and each
188
+ * mark set beside it, with what caused it.
189
+ * @param workloadId the workload
190
+ * @param pageable the page to return
191
+ * @return a Promise resolving to a page of ledger entries, empty when the workload does not exist
386
192
  */
387
- countForNode(nodeId: string): Promise<number>;
193
+ findHistory(workloadId: string, pageable: Pageable2): Promise<IterablePage2<WatchEvent2>>;
388
194
  /**
389
195
  * This operation makes all the recent writes immediately available for search.
390
196
  * @return a Promise that resolves when the operation is complete
@@ -393,11 +199,13 @@ interface IWorkloadService extends ICrudServiceProxy2<Workload> {
393
199
  }
394
200
  declare class WorkloadServiceProxy extends CrudServiceProxy2<Workload> implements IWorkloadService {
395
201
  constructor(kinotic: IKinotic2);
396
- findAllForNode(nodeId: string, pageable: Pageable): Promise<IterablePage<Workload>>;
397
- findAllForNodeSinglePage(nodeId: string, pageable: Pageable): Promise<Page<Workload>>;
398
- countForNode(nodeId: string): Promise<number>;
202
+ findAllForNode(nodeId: string, pageable: Pageable2): Promise<IterablePage2<Workload>>;
203
+ findAllForNodeSinglePage(nodeId: string, pageable: Pageable2): Promise<Page2<Workload>>;
204
+ findHistory(workloadId: string, pageable: Pageable2): Promise<IterablePage2<WatchEvent2>>;
205
+ findHistorySinglePage(workloadId: string, pageable: Pageable2): Promise<Page2<WatchEvent2>>;
399
206
  syncIndex(): Promise<void>;
400
207
  }
208
+ import { Workload as Workload2 } from "@kinotic-ai/management-api";
401
209
  import { IKinotic as IKinotic3 } from "@kinotic-ai/core";
402
210
  /**
403
211
  * Orchestrates workload deployment across the cluster, acting as the intermediary between
@@ -414,15 +222,7 @@ interface IWorkloadOrchestrationService {
414
222
  * @param workload the workload configuration to deploy
415
223
  * @return a Promise resolving to the deployed workload (including assigned nodeId and id)
416
224
  */
417
- deployWorkload(workload: Workload): Promise<Workload>;
418
- /**
419
- * Restarts a stopped workload in place on the node it is deployed to. Fails unless the
420
- * workload is stopped; a workload stopped with autoRemove true has no VM left to restart.
421
- * Honors the workload's detached flag the same way as {@link deployWorkload}.
422
- * @param workloadId the id of the workload to restart
423
- * @return a Promise resolving to the restarted workload
424
- */
425
- restartWorkload(workloadId: string): Promise<Workload>;
225
+ deployWorkload(workload: Workload2): Promise<Workload2>;
426
226
  /**
427
227
  * Stops a running workload.
428
228
  * @param workloadId the id of the workload to stop
@@ -430,19 +230,40 @@ interface IWorkloadOrchestrationService {
430
230
  */
431
231
  stopWorkload(workloadId: string): Promise<void>;
432
232
  /**
433
- * Destroys a workload, removing it from the node and cleaning up all resources.
233
+ * Destroys a workload's VM on its node, with its disk, and returns its room. A run still open is
234
+ * recorded STOPPED. The record stays as the run's outcome, and its logs stay in the log store,
235
+ * until deleteWorkload.
434
236
  * @param workloadId the id of the workload to destroy
435
- * @return a Promise that resolves when the workload has been destroyed
237
+ * @return a Promise that resolves when the VM has been destroyed
436
238
  */
437
239
  destroyWorkload(workloadId: string): Promise<void>;
240
+ /**
241
+ * Deletes a workload's record and every log line it wrote from the organization's log store, the
242
+ * one way either is removed. A run still open on its node — starting, running, or a stop the node
243
+ * has not answered — is refused: stop or destroy it first.
244
+ * @param workloadId the id of the workload to delete
245
+ * @return a Promise that resolves when the record and its logs are gone, or rejects if the run is
246
+ * still open
247
+ */
248
+ deleteWorkload(workloadId: string): Promise<void>;
249
+ /**
250
+ * Deletes the given workloads' records and every log line they wrote, as deleteWorkload does for
251
+ * one, with the log store asked once per organization. Any run still open refuses the whole batch
252
+ * before anything is deleted.
253
+ * @param workloadIds the ids of the workloads to delete
254
+ * @return a Promise that resolves when the records and their logs are gone, or rejects if any run
255
+ * is still open
256
+ */
257
+ deleteWorkloads(workloadIds: string[]): Promise<void>;
438
258
  }
439
259
  declare class WorkloadOrchestrationService implements IWorkloadOrchestrationService {
440
260
  private readonly serviceProxy;
441
261
  constructor(kinotic: IKinotic3);
442
- deployWorkload(workload: Workload): Promise<Workload>;
443
- restartWorkload(workloadId: string): Promise<Workload>;
262
+ deployWorkload(workload: Workload2): Promise<Workload2>;
444
263
  stopWorkload(workloadId: string): Promise<void>;
445
264
  destroyWorkload(workloadId: string): Promise<void>;
265
+ deleteWorkload(workloadId: string): Promise<void>;
266
+ deleteWorkloads(workloadIds: string[]): Promise<void>;
446
267
  }
447
268
  import { IKinotic as IKinotic4 } from "@kinotic-ai/core";
448
269
  /**
@@ -507,6 +328,22 @@ declare class LoggersDescriptor {
507
328
  groups: Map<string, GroupLoggerLevelsDescriptor>;
508
329
  }
509
330
  /**
331
+ * The CRI patterns that decide what trace logging prints.
332
+ *
333
+ * Each pattern is matched against the fully qualified CRI with Ant wildcards, where `*` matches
334
+ * within one segment and `**` across segments, so
335
+ * `srv://system-api~com.acme.HeartbeatService/*` covers every method of that service and
336
+ * `srv://system-api~com.acme.HeartbeatService/ping` covers only that one.
337
+ * An include wins over an exclude, so `excludes: ['**']` plus the handful of includes worth
338
+ * watching narrows trace logging to those services alone.
339
+ */
340
+ declare class TraceLogProperties {
341
+ /** CRIs kept in trace logging whatever the excludes say. Empty leaves the excludes to decide. */
342
+ includes: string[];
343
+ /** CRIs left out of trace logging, request and reply both, unless an include covers them. */
344
+ excludes: string[];
345
+ }
346
+ /**
510
347
  * Provides the ability to manage loggers
511
348
  */
512
349
  interface ILogManager {
@@ -528,21 +365,38 @@ interface ILogManager {
528
365
  * @param level the {@link LogLevel} to set for the logger with the given name
529
366
  */
530
367
  configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
368
+ /**
369
+ * @param nodeId the kinotic node to get the trace log patterns from
370
+ * @return the CRI patterns currently deciding what the node trace logs
371
+ */
372
+ traceLog(nodeId: string): Promise<TraceLogProperties>;
373
+ /**
374
+ * Configures the CRI patterns deciding what the node trace logs, silencing a service that
375
+ * would otherwise bury the log while trace logging is on.
376
+ * The patterns replace whatever the node is using and last until it restarts, which returns it
377
+ * to the `kinotic.traceLog` it was configured with.
378
+ *
379
+ * @param nodeId the kinotic node to set the trace log patterns on
380
+ * @param traceLog the include and exclude patterns to apply
381
+ */
382
+ configureTraceLog(nodeId: string, traceLog: TraceLogProperties): Promise<void>;
531
383
  }
532
384
  import { IKinotic as IKinotic5 } from "@kinotic-ai/core";
533
385
  /**
534
- * A single kinotic-server node in the cluster. Mirrors the server's
535
- * {@code org.kinotic.domain.api.model.cluster.KinoticNodeInfo}.
386
+ * A single server node in the cluster, of the org, system or app server. Mirrors the server's
387
+ * {@code org.kinotic.system.api.model.cluster.KinoticNodeInfo}.
536
388
  */
537
389
  declare class KinoticNodeInfo {
538
390
  nodeId: string;
539
391
  order: number;
540
392
  local: boolean;
393
+ addresses: string[];
394
+ hostNames: string[];
541
395
  version: string;
542
396
  }
543
397
  /**
544
- * The kinotic-server cluster's current topology and state. Mirrors the server's
545
- * {@code org.kinotic.domain.api.model.cluster.KinoticClusterInfo}.
398
+ * The current topology and state of the cluster the org, system and app servers form. Mirrors the
399
+ * server's {@code org.kinotic.system.api.model.cluster.KinoticClusterInfo}.
546
400
  */
547
401
  declare class KinoticClusterInfo {
548
402
  localNodeId: string;
@@ -553,7 +407,7 @@ declare class KinoticClusterInfo {
553
407
  active: boolean;
554
408
  }
555
409
  /**
556
- * Queries the kinotic-server cluster's topology and state.
410
+ * Queries the topology and state of the cluster the org, system and app servers form.
557
411
  */
558
412
  interface IKinoticClusterInfoService {
559
413
  /**
@@ -567,37 +421,84 @@ declare class KinoticClusterInfoService implements IKinoticClusterInfoService {
567
421
  getClusterInfo(): Promise<KinoticClusterInfo>;
568
422
  }
569
423
  import { Application, Organization, Project, PendingInviteSummary, UserParticipantIdentity } from "@kinotic-ai/management-api";
570
- import { IKinotic as IKinotic6, Page as Page2, Pageable as Pageable2 } from "@kinotic-ai/core";
424
+ import { IKinotic as IKinotic6, Page as Page3, Pageable as Pageable3 } from "@kinotic-ai/core";
571
425
  /**
572
426
  * Cross-organization reads for platform operators. Published in the system zone, which only
573
427
  * SYSTEM participants may address, so every method takes the target organization explicitly
574
428
  * instead of resolving it from the caller's scope.
575
429
  */
576
430
  interface ISystemOrganizationService {
577
- findOrganizations(pageable: Pageable2): Promise<Page2<Organization>>;
578
- searchOrganizations(searchText: string, pageable: Pageable2): Promise<Page2<Organization>>;
431
+ findOrganizations(pageable: Pageable3): Promise<Page3<Organization>>;
432
+ searchOrganizations(searchText: string, pageable: Pageable3): Promise<Page3<Organization>>;
579
433
  /** Resolves null when no organization has the given id. */
580
434
  findOrganizationById(organizationId: string): Promise<Organization | null>;
581
435
  countOrganizations(): Promise<number>;
582
- findApplications(organizationId: string, pageable: Pageable2): Promise<Page2<Application>>;
583
- findProjects(organizationId: string, pageable: Pageable2): Promise<Page2<Project>>;
436
+ findApplications(organizationId: string, pageable: Pageable3): Promise<Page3<Application>>;
437
+ findProjects(organizationId: string, pageable: Pageable3): Promise<Page3<Project>>;
584
438
  /** applicationId null = the organization's members */
585
- findMembers(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
586
- searchMembers(searchText: string, organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
587
- findPendingInvites(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<PendingInviteSummary>>;
439
+ findMembers(organizationId: string, applicationId: string | null, pageable: Pageable3): Promise<Page3<UserParticipantIdentity>>;
440
+ searchMembers(searchText: string, organizationId: string, applicationId: string | null, pageable: Pageable3): Promise<Page3<UserParticipantIdentity>>;
441
+ findPendingInvites(organizationId: string, applicationId: string | null, pageable: Pageable3): Promise<Page3<PendingInviteSummary>>;
588
442
  }
589
443
  declare class SystemOrganizationService implements ISystemOrganizationService {
590
444
  private readonly serviceProxy;
591
445
  constructor(kinotic: IKinotic6);
592
- findOrganizations(pageable: Pageable2): Promise<Page2<Organization>>;
593
- searchOrganizations(searchText: string, pageable: Pageable2): Promise<Page2<Organization>>;
446
+ findOrganizations(pageable: Pageable3): Promise<Page3<Organization>>;
447
+ searchOrganizations(searchText: string, pageable: Pageable3): Promise<Page3<Organization>>;
594
448
  findOrganizationById(organizationId: string): Promise<Organization | null>;
595
449
  countOrganizations(): Promise<number>;
596
- findApplications(organizationId: string, pageable: Pageable2): Promise<Page2<Application>>;
597
- findProjects(organizationId: string, pageable: Pageable2): Promise<Page2<Project>>;
598
- findMembers(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
599
- searchMembers(searchText: string, organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<UserParticipantIdentity>>;
600
- findPendingInvites(organizationId: string, applicationId: string | null, pageable: Pageable2): Promise<Page2<PendingInviteSummary>>;
450
+ findApplications(organizationId: string, pageable: Pageable3): Promise<Page3<Application>>;
451
+ findProjects(organizationId: string, pageable: Pageable3): Promise<Page3<Project>>;
452
+ findMembers(organizationId: string, applicationId: string | null, pageable: Pageable3): Promise<Page3<UserParticipantIdentity>>;
453
+ searchMembers(searchText: string, organizationId: string, applicationId: string | null, pageable: Pageable3): Promise<Page3<UserParticipantIdentity>>;
454
+ findPendingInvites(organizationId: string, applicationId: string | null, pageable: Pageable3): Promise<Page3<PendingInviteSummary>>;
455
+ }
456
+ import { MachineParticipantIdentity, MachineProvisionResult, UserParticipantIdentity as UserParticipantIdentity2 } from "@kinotic-ai/management-api";
457
+ import { IKinotic as IKinotic7, Page as Page4, Pageable as Pageable4 } from "@kinotic-ai/core";
458
+ /**
459
+ * The platform's own members: the operators who sign in to the system console, and the
460
+ * SYSTEM-scope machines that connect as platform daemons, such as a worker node's vm-manager.
461
+ * Published in the system zone, which only SYSTEM participants may address; every method works
462
+ * on SYSTEM scope alone, so an organization's users and machines stay that organization's to
463
+ * manage through IMachineService.
464
+ */
465
+ interface ISystemMemberService {
466
+ findUsers(pageable: Pageable4): Promise<Page4<UserParticipantIdentity2>>;
467
+ searchUsers(searchText: string, pageable: Pageable4): Promise<Page4<UserParticipantIdentity2>>;
468
+ /** Lists the platform's machines, disabled ones included. */
469
+ findMachines(pageable: Pageable4): Promise<Page4<MachineParticipantIdentity>>;
470
+ /**
471
+ * Provisions a platform machine and returns it together with its generated client secret.
472
+ * The secret is disclosed exactly once — it cannot be retrieved later.
473
+ */
474
+ createMachine(displayName: string): Promise<MachineProvisionResult>;
475
+ /**
476
+ * Replaces a platform machine's client secret, returning the new secret exactly once. The
477
+ * old secret stops working immediately; a connection the machine already holds lasts until
478
+ * it disconnects.
479
+ */
480
+ rotateSecret(machineId: string): Promise<string>;
481
+ /**
482
+ * Enables or disables a platform machine. A disabled machine is cut off on its next
483
+ * connection, and enabling it restores access with the same credential.
484
+ */
485
+ setMachineEnabled(machineId: string, enabled: boolean): Promise<void>;
486
+ /**
487
+ * Permanently removes a platform machine, including its stored credential. A removed
488
+ * machine's id cannot authenticate again.
489
+ */
490
+ removeMachine(machineId: string): Promise<void>;
491
+ }
492
+ declare class SystemMemberService implements ISystemMemberService {
493
+ private readonly serviceProxy;
494
+ constructor(kinotic: IKinotic7);
495
+ findUsers(pageable: Pageable4): Promise<Page4<UserParticipantIdentity2>>;
496
+ searchUsers(searchText: string, pageable: Pageable4): Promise<Page4<UserParticipantIdentity2>>;
497
+ findMachines(pageable: Pageable4): Promise<Page4<MachineParticipantIdentity>>;
498
+ createMachine(displayName: string): Promise<MachineProvisionResult>;
499
+ rotateSecret(machineId: string): Promise<string>;
500
+ setMachineEnabled(machineId: string, enabled: boolean): Promise<void>;
501
+ removeMachine(machineId: string): Promise<void>;
601
502
  }
602
503
  interface ISystemApiExtension {
603
504
  vmNodes: IVmNodeService;
@@ -606,17 +507,20 @@ interface ISystemApiExtension {
606
507
  logManager: ILogManager;
607
508
  clusterInfo: IKinoticClusterInfoService;
608
509
  systemOrganizations: ISystemOrganizationService;
510
+ systemMembers: ISystemMemberService;
609
511
  }
610
512
  declare const SystemApiPlugin: KinoticPlugin<ISystemApiExtension>;
611
- import { IKinotic as IKinotic7 } from "@kinotic-ai/core";
513
+ import { IKinotic as IKinotic8 } from "@kinotic-ai/core";
612
514
  declare class LogManager implements ILogManager {
613
515
  private readonly serviceProxy;
614
- constructor(kinotic: IKinotic7);
516
+ constructor(kinotic: IKinotic8);
615
517
  loggers(nodeId: string): Promise<LoggersDescriptor>;
616
518
  loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
617
519
  configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
520
+ traceLog(nodeId: string): Promise<TraceLogProperties>;
521
+ configureTraceLog(nodeId: string, traceLog: TraceLogProperties): Promise<void>;
618
522
  }
619
523
  declare module "@kinotic-ai/core" {
620
524
  interface KinoticSingleton extends ISystemApiExtension {}
621
525
  }
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 };
526
+ export { WorkloadStatusReport, WorkloadServiceProxy, WorkloadOrchestrationService, VmProviderType, VmNodeStatusType, VmNodeState, 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 };