@kinotic-ai/system-api 5.0.0-beta.5 → 5.0.0-beta.51
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/README.md +1 -1
- package/dist/index.cjs +353 -95
- package/dist/index.d.cts +537 -101
- package/dist/index.d.ts +537 -101
- package/dist/index.js +355 -95
- package/package.json +6 -7
package/dist/index.d.cts
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { SYSTEM_API_ZONE } from "@kinotic-ai/management-api";
|
|
2
|
-
import {
|
|
2
|
+
import { ReconcileState, Reconcilable } from "@kinotic-ai/management-api";
|
|
3
|
+
/**
|
|
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.
|
|
7
|
+
*/
|
|
3
8
|
declare enum VmNodeStatusType {
|
|
4
9
|
ONLINE = "ONLINE",
|
|
5
|
-
|
|
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
|
+
*/
|
|
6
14
|
DRAINING = "DRAINING"
|
|
7
15
|
}
|
|
8
16
|
/**
|
|
9
|
-
*
|
|
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.
|
|
10
20
|
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
*/
|
|
15
|
-
type: VmNodeStatusType;
|
|
16
|
-
/**
|
|
17
|
-
* Why the node is not taking workloads, or null when it is. Set from the node's own report
|
|
18
|
-
* of the guarantees it can still make — a data root that stopped enforcing disk limits, or
|
|
19
|
-
* a firewall that stopped hiding host credentials from guests.
|
|
20
|
-
*/
|
|
21
|
-
healthMessage: string | null;
|
|
21
|
+
interface VmNodeState {
|
|
22
|
+
/** Whether the node takes workloads. */
|
|
23
|
+
phase: VmNodeStatusType;
|
|
22
24
|
}
|
|
23
25
|
declare enum VmProviderType {
|
|
24
26
|
BOXLITE = "BOXLITE",
|
|
@@ -28,7 +30,7 @@ declare enum VmProviderType {
|
|
|
28
30
|
* Represents a node in the cluster that is running a VmManager process
|
|
29
31
|
* and is capable of hosting workloads.
|
|
30
32
|
*/
|
|
31
|
-
declare class VmNode implements
|
|
33
|
+
declare class VmNode implements Reconcilable<VmNodeState> {
|
|
32
34
|
/**
|
|
33
35
|
* Unique identifier for this node.
|
|
34
36
|
*/
|
|
@@ -42,9 +44,17 @@ declare class VmNode implements Identifiable<string> {
|
|
|
42
44
|
*/
|
|
43
45
|
hostname: string;
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
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.
|
|
46
50
|
*/
|
|
47
|
-
|
|
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;
|
|
48
58
|
/**
|
|
49
59
|
* The VM provider this node runs every workload on, determined by how the node was
|
|
50
60
|
* provisioned and reported when it registers.
|
|
@@ -63,21 +73,22 @@ declare class VmNode implements Identifiable<string> {
|
|
|
63
73
|
*/
|
|
64
74
|
totalDiskMb: number;
|
|
65
75
|
/**
|
|
66
|
-
*
|
|
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.
|
|
67
78
|
*/
|
|
68
|
-
|
|
79
|
+
freeCpus: number;
|
|
69
80
|
/**
|
|
70
|
-
* Memory
|
|
81
|
+
* Memory not allocated to any workload, in megabytes.
|
|
71
82
|
*/
|
|
72
|
-
|
|
83
|
+
freeMemoryMb: number;
|
|
73
84
|
/**
|
|
74
|
-
* Disk space
|
|
85
|
+
* Disk space not allocated to any workload, in megabytes.
|
|
75
86
|
*/
|
|
76
|
-
|
|
87
|
+
freeDiskMb: number;
|
|
77
88
|
/**
|
|
78
89
|
* The date and time the node was last seen/heartbeat.
|
|
79
90
|
*/
|
|
80
|
-
lastSeen:
|
|
91
|
+
lastSeen: string | null;
|
|
81
92
|
/**
|
|
82
93
|
* Base directory every workload volume mount on this node must live under. Reported by
|
|
83
94
|
* the node at registration; deployment flows compose host paths under it.
|
|
@@ -86,18 +97,10 @@ declare class VmNode implements Identifiable<string> {
|
|
|
86
97
|
constructor(id: string, name: string, hostname: string);
|
|
87
98
|
}
|
|
88
99
|
/**
|
|
89
|
-
* DTO sent by a vm-manager process when it registers with the server.
|
|
90
|
-
*
|
|
100
|
+
* DTO sent by a vm-manager process when it registers with the server. Contains only the information the node
|
|
101
|
+
* knows about itself: the node's id and name are those of the machine it authenticates as.
|
|
91
102
|
*/
|
|
92
103
|
declare class VmNodeRegistration {
|
|
93
|
-
/**
|
|
94
|
-
* Unique identifier for this node.
|
|
95
|
-
*/
|
|
96
|
-
id: string;
|
|
97
|
-
/**
|
|
98
|
-
* Human-readable name for the node.
|
|
99
|
-
*/
|
|
100
|
-
name: string;
|
|
101
104
|
/**
|
|
102
105
|
* The hostname or address of the node.
|
|
103
106
|
*/
|
|
@@ -122,7 +125,7 @@ declare class VmNodeRegistration {
|
|
|
122
125
|
* Base directory every workload volume mount on this node must live under.
|
|
123
126
|
*/
|
|
124
127
|
workloadDataDir: string | null;
|
|
125
|
-
constructor(
|
|
128
|
+
constructor(hostname: string);
|
|
126
129
|
}
|
|
127
130
|
import { WorkloadStatus } from "@kinotic-ai/management-api";
|
|
128
131
|
/**
|
|
@@ -138,17 +141,51 @@ interface WorkloadStatusReport {
|
|
|
138
141
|
/** When the node recorded this status, in epoch milliseconds. */
|
|
139
142
|
updated: number;
|
|
140
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* The provider whose API an LlmConfiguration calls.
|
|
146
|
+
*/
|
|
147
|
+
declare enum LlmProviderType {
|
|
148
|
+
/** Anthropic's Messages API, serving the Claude models. */
|
|
149
|
+
ANTHROPIC = "ANTHROPIC",
|
|
150
|
+
/** OpenAI's Chat Completions API, or a server compatible with it. */
|
|
151
|
+
OPENAI = "OPENAI"
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* A large language model the system's services call: the provider, the model, where the provider's API is
|
|
155
|
+
* reached and the options each request carries. The API key the provider is called with is held in the secret
|
|
156
|
+
* storage and is never a field of the configuration; apiKeyHeld says whether one is held.
|
|
157
|
+
*/
|
|
158
|
+
declare class LlmConfiguration {
|
|
159
|
+
id: string | null;
|
|
160
|
+
/** The name a service selects the configuration by, unique in the system. */
|
|
161
|
+
name: string;
|
|
162
|
+
provider: LlmProviderType;
|
|
163
|
+
/** The provider's id of the model, such as claude-opus-5-5. */
|
|
164
|
+
model: string;
|
|
165
|
+
/** The base URL of the provider's API, or null for the provider's public API. */
|
|
166
|
+
endpoint: string | null;
|
|
167
|
+
/** The most tokens a response may hold, or null for the calling service's default. */
|
|
168
|
+
maxTokens: number | null;
|
|
169
|
+
/** The sampling temperature, or null for the provider's default. */
|
|
170
|
+
temperature: number | null;
|
|
171
|
+
/** Whether an API key is held for the configuration. */
|
|
172
|
+
apiKeyHeld: boolean;
|
|
173
|
+
created: string | null;
|
|
174
|
+
updated: string | null;
|
|
175
|
+
constructor(name: string, provider: LlmProviderType, model: string);
|
|
176
|
+
}
|
|
177
|
+
import { WatchEvent } from "@kinotic-ai/management-api";
|
|
141
178
|
import { IKinotic } from "@kinotic-ai/core";
|
|
142
|
-
import { CrudServiceProxy, ICrudServiceProxy } from "@kinotic-ai/core";
|
|
179
|
+
import { CrudServiceProxy, ICrudServiceProxy, IterablePage, Page, Pageable } from "@kinotic-ai/core";
|
|
143
180
|
interface IVmNodeService extends ICrudServiceProxy<VmNode> {
|
|
144
181
|
/**
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* @param
|
|
148
|
-
* @param
|
|
149
|
-
* @return a Promise resolving to a
|
|
182
|
+
* Lists what happened to the node, newest first: each change of what it should be and of what it
|
|
183
|
+
* reports, and each mark set beside them, with what caused it.
|
|
184
|
+
* @param nodeId the id of the node
|
|
185
|
+
* @param pageable the page to return
|
|
186
|
+
* @return a Promise resolving to a page of ledger entries, empty when the node is not registered
|
|
150
187
|
*/
|
|
151
|
-
|
|
188
|
+
findHistory(nodeId: string, pageable: Pageable): Promise<IterablePage<WatchEvent>>;
|
|
152
189
|
/**
|
|
153
190
|
* This operation makes all the recent writes immediately available for search.
|
|
154
191
|
* @return a Promise that resolves when the operation is complete
|
|
@@ -157,11 +194,12 @@ interface IVmNodeService extends ICrudServiceProxy<VmNode> {
|
|
|
157
194
|
}
|
|
158
195
|
declare class VmNodeServiceProxy extends CrudServiceProxy<VmNode> implements IVmNodeService {
|
|
159
196
|
constructor(kinotic: IKinotic);
|
|
160
|
-
|
|
197
|
+
findHistory(nodeId: string, pageable: Pageable): Promise<IterablePage<WatchEvent>>;
|
|
198
|
+
findHistorySinglePage(nodeId: string, pageable: Pageable): Promise<Page<WatchEvent>>;
|
|
161
199
|
syncIndex(): Promise<void>;
|
|
162
200
|
}
|
|
163
|
-
import { Workload } from "@kinotic-ai/management-api";
|
|
164
|
-
import { CrudServiceProxy as CrudServiceProxy2, IKinotic as IKinotic2, ICrudServiceProxy as ICrudServiceProxy2, IterablePage, Page, Pageable } from "@kinotic-ai/core";
|
|
201
|
+
import { Workload, WatchEvent as WatchEvent2 } from "@kinotic-ai/management-api";
|
|
202
|
+
import { CrudServiceProxy as CrudServiceProxy2, IKinotic as IKinotic2, ICrudServiceProxy as ICrudServiceProxy2, IterablePage as IterablePage2, Page as Page2, Pageable as Pageable2 } from "@kinotic-ai/core";
|
|
165
203
|
interface IWorkloadService extends ICrudServiceProxy2<Workload> {
|
|
166
204
|
/**
|
|
167
205
|
* Finds all workloads deployed on the given node.
|
|
@@ -169,13 +207,15 @@ interface IWorkloadService extends ICrudServiceProxy2<Workload> {
|
|
|
169
207
|
* @param pageable the page to return
|
|
170
208
|
* @return a Promise resolving to a page of workloads
|
|
171
209
|
*/
|
|
172
|
-
findAllForNode(nodeId: string, pageable:
|
|
210
|
+
findAllForNode(nodeId: string, pageable: Pageable2): Promise<IterablePage2<Workload>>;
|
|
173
211
|
/**
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* @
|
|
212
|
+
* Lists what happened to the workload, newest first: each status its run passed through and each
|
|
213
|
+
* mark set beside it, with what caused it.
|
|
214
|
+
* @param workloadId the workload
|
|
215
|
+
* @param pageable the page to return
|
|
216
|
+
* @return a Promise resolving to a page of ledger entries, empty when the workload does not exist
|
|
177
217
|
*/
|
|
178
|
-
|
|
218
|
+
findHistory(workloadId: string, pageable: Pageable2): Promise<IterablePage2<WatchEvent2>>;
|
|
179
219
|
/**
|
|
180
220
|
* This operation makes all the recent writes immediately available for search.
|
|
181
221
|
* @return a Promise that resolves when the operation is complete
|
|
@@ -184,9 +224,10 @@ interface IWorkloadService extends ICrudServiceProxy2<Workload> {
|
|
|
184
224
|
}
|
|
185
225
|
declare class WorkloadServiceProxy extends CrudServiceProxy2<Workload> implements IWorkloadService {
|
|
186
226
|
constructor(kinotic: IKinotic2);
|
|
187
|
-
findAllForNode(nodeId: string, pageable:
|
|
188
|
-
findAllForNodeSinglePage(nodeId: string, pageable:
|
|
189
|
-
|
|
227
|
+
findAllForNode(nodeId: string, pageable: Pageable2): Promise<IterablePage2<Workload>>;
|
|
228
|
+
findAllForNodeSinglePage(nodeId: string, pageable: Pageable2): Promise<Page2<Workload>>;
|
|
229
|
+
findHistory(workloadId: string, pageable: Pageable2): Promise<IterablePage2<WatchEvent2>>;
|
|
230
|
+
findHistorySinglePage(workloadId: string, pageable: Pageable2): Promise<Page2<WatchEvent2>>;
|
|
190
231
|
syncIndex(): Promise<void>;
|
|
191
232
|
}
|
|
192
233
|
import { Workload as Workload2 } from "@kinotic-ai/management-api";
|
|
@@ -208,33 +249,46 @@ interface IWorkloadOrchestrationService {
|
|
|
208
249
|
*/
|
|
209
250
|
deployWorkload(workload: Workload2): Promise<Workload2>;
|
|
210
251
|
/**
|
|
211
|
-
* Restarts a stopped workload in place on the node it is deployed to. Fails unless the
|
|
212
|
-
* workload is stopped; a workload stopped with autoRemove true has no VM left to restart.
|
|
213
|
-
* Honors the workload's detached flag the same way as {@link deployWorkload}.
|
|
214
|
-
* @param workloadId the id of the workload to restart
|
|
215
|
-
* @return a Promise resolving to the restarted workload
|
|
216
|
-
*/
|
|
217
|
-
restartWorkload(workloadId: string): Promise<Workload2>;
|
|
218
|
-
/**
|
|
219
252
|
* Stops a running workload.
|
|
220
253
|
* @param workloadId the id of the workload to stop
|
|
221
254
|
* @return a Promise that resolves when the workload has been stopped
|
|
222
255
|
*/
|
|
223
256
|
stopWorkload(workloadId: string): Promise<void>;
|
|
224
257
|
/**
|
|
225
|
-
* Destroys a workload
|
|
258
|
+
* Destroys a workload's VM on its node, with its disk, and returns its room. A run still open is
|
|
259
|
+
* recorded STOPPED. The record stays as the run's outcome, and its logs stay in the log store,
|
|
260
|
+
* until deleteWorkload.
|
|
226
261
|
* @param workloadId the id of the workload to destroy
|
|
227
|
-
* @return a Promise that resolves when the
|
|
262
|
+
* @return a Promise that resolves when the VM has been destroyed
|
|
228
263
|
*/
|
|
229
264
|
destroyWorkload(workloadId: string): Promise<void>;
|
|
265
|
+
/**
|
|
266
|
+
* Deletes a workload's record and every log line it wrote from the organization's log store, the
|
|
267
|
+
* one way either is removed. A run still open on its node — starting, running, or a stop the node
|
|
268
|
+
* has not answered — is refused: stop or destroy it first.
|
|
269
|
+
* @param workloadId the id of the workload to delete
|
|
270
|
+
* @return a Promise that resolves when the record and its logs are gone, or rejects if the run is
|
|
271
|
+
* still open
|
|
272
|
+
*/
|
|
273
|
+
deleteWorkload(workloadId: string): Promise<void>;
|
|
274
|
+
/**
|
|
275
|
+
* Deletes the given workloads' records and every log line they wrote, as deleteWorkload does for
|
|
276
|
+
* one, with the log store asked once per organization. Any run still open refuses the whole batch
|
|
277
|
+
* before anything is deleted.
|
|
278
|
+
* @param workloadIds the ids of the workloads to delete
|
|
279
|
+
* @return a Promise that resolves when the records and their logs are gone, or rejects if any run
|
|
280
|
+
* is still open
|
|
281
|
+
*/
|
|
282
|
+
deleteWorkloads(workloadIds: string[]): Promise<void>;
|
|
230
283
|
}
|
|
231
284
|
declare class WorkloadOrchestrationService implements IWorkloadOrchestrationService {
|
|
232
285
|
private readonly serviceProxy;
|
|
233
286
|
constructor(kinotic: IKinotic3);
|
|
234
287
|
deployWorkload(workload: Workload2): Promise<Workload2>;
|
|
235
|
-
restartWorkload(workloadId: string): Promise<Workload2>;
|
|
236
288
|
stopWorkload(workloadId: string): Promise<void>;
|
|
237
289
|
destroyWorkload(workloadId: string): Promise<void>;
|
|
290
|
+
deleteWorkload(workloadId: string): Promise<void>;
|
|
291
|
+
deleteWorkloads(workloadIds: string[]): Promise<void>;
|
|
238
292
|
}
|
|
239
293
|
import { IKinotic as IKinotic4 } from "@kinotic-ai/core";
|
|
240
294
|
/**
|
|
@@ -245,7 +299,8 @@ declare class VmNodeOrchestrationServiceProxy {
|
|
|
245
299
|
private readonly serviceProxy;
|
|
246
300
|
constructor(kinotic: IKinotic4);
|
|
247
301
|
/**
|
|
248
|
-
* Registers this
|
|
302
|
+
* Registers the machine this client authenticated as with the orchestrator, as a node whose id is the
|
|
303
|
+
* machine's id and whose name is the machine's display name.
|
|
249
304
|
* @param registration the node registration info
|
|
250
305
|
* @return a Promise resolving to the registered VmNode
|
|
251
306
|
*/
|
|
@@ -253,21 +308,19 @@ declare class VmNodeOrchestrationServiceProxy {
|
|
|
253
308
|
/**
|
|
254
309
|
* Sends a heartbeat to indicate this node is still alive, carrying what it can still
|
|
255
310
|
* guarantee. A node reporting problems stops receiving workloads until it reports none.
|
|
256
|
-
* @param nodeId the id of this node
|
|
257
311
|
* @param problems what the node can no longer guarantee, empty when it is fit
|
|
258
312
|
* @return a Promise resolving to the updated VmNode
|
|
259
313
|
*/
|
|
260
|
-
heartbeat(
|
|
314
|
+
heartbeat(problems: string[]): Promise<VmNode>;
|
|
261
315
|
/**
|
|
262
316
|
* Reports the actual status of workloads on this node so the server's records track
|
|
263
317
|
* transitions the orchestrator did not initiate.
|
|
264
|
-
* @param nodeId the id of this node
|
|
265
318
|
* @param reports one report per workload
|
|
266
319
|
*/
|
|
267
|
-
reportWorkloadStatus(
|
|
320
|
+
reportWorkloadStatus(reports: WorkloadStatusReport[]): Promise<void>;
|
|
268
321
|
/**
|
|
269
|
-
*
|
|
270
|
-
* @param nodeId the id of
|
|
322
|
+
* Asks for a node's removal from the orchestrator.
|
|
323
|
+
* @param nodeId the id of the node
|
|
271
324
|
*/
|
|
272
325
|
deregisterNode(nodeId: string): Promise<void>;
|
|
273
326
|
}
|
|
@@ -299,6 +352,22 @@ declare class LoggersDescriptor {
|
|
|
299
352
|
groups: Map<string, GroupLoggerLevelsDescriptor>;
|
|
300
353
|
}
|
|
301
354
|
/**
|
|
355
|
+
* The CRI patterns that decide what trace logging prints.
|
|
356
|
+
*
|
|
357
|
+
* Each pattern is matched against the fully qualified CRI with Ant wildcards, where `*` matches
|
|
358
|
+
* within one segment and `**` across segments, so
|
|
359
|
+
* `srv://system-api~com.acme.HeartbeatService/*` covers every method of that service and
|
|
360
|
+
* `srv://system-api~com.acme.HeartbeatService/ping` covers only that one.
|
|
361
|
+
* An include wins over an exclude, so `excludes: ['**']` plus the handful of includes worth
|
|
362
|
+
* watching narrows trace logging to those services alone.
|
|
363
|
+
*/
|
|
364
|
+
declare class TraceLogProperties {
|
|
365
|
+
/** CRIs kept in trace logging whatever the excludes say. Empty leaves the excludes to decide. */
|
|
366
|
+
includes: string[];
|
|
367
|
+
/** CRIs left out of trace logging, request and reply both, unless an include covers them. */
|
|
368
|
+
excludes: string[];
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
302
371
|
* Provides the ability to manage loggers
|
|
303
372
|
*/
|
|
304
373
|
interface ILogManager {
|
|
@@ -320,24 +389,46 @@ interface ILogManager {
|
|
|
320
389
|
* @param level the {@link LogLevel} to set for the logger with the given name
|
|
321
390
|
*/
|
|
322
391
|
configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
|
|
392
|
+
/**
|
|
393
|
+
* @param nodeId the kinotic node to get the trace log patterns from
|
|
394
|
+
* @return the CRI patterns currently deciding what the node trace logs
|
|
395
|
+
*/
|
|
396
|
+
traceLog(nodeId: string): Promise<TraceLogProperties>;
|
|
397
|
+
/**
|
|
398
|
+
* Configures the CRI patterns deciding what the node trace logs, silencing a service that
|
|
399
|
+
* would otherwise bury the log while trace logging is on.
|
|
400
|
+
* The patterns replace whatever the node is using and last until it restarts, which returns it
|
|
401
|
+
* to the `kinotic.traceLog` it was configured with.
|
|
402
|
+
*
|
|
403
|
+
* @param nodeId the kinotic node to set the trace log patterns on
|
|
404
|
+
* @param traceLog the include and exclude patterns to apply
|
|
405
|
+
*/
|
|
406
|
+
configureTraceLog(nodeId: string, traceLog: TraceLogProperties): Promise<void>;
|
|
323
407
|
}
|
|
324
408
|
import { IKinotic as IKinotic5 } from "@kinotic-ai/core";
|
|
325
409
|
/**
|
|
326
|
-
* A single
|
|
327
|
-
* {@code org.kinotic.
|
|
410
|
+
* A single server node in the cluster, of the org, system or app server. Mirrors the server's
|
|
411
|
+
* {@code org.kinotic.system.api.model.cluster.KinoticNodeInfo}.
|
|
328
412
|
*/
|
|
329
413
|
declare class KinoticNodeInfo {
|
|
330
414
|
nodeId: string;
|
|
331
415
|
order: number;
|
|
332
|
-
|
|
333
|
-
|
|
416
|
+
/** The server kind the node runs, such as management, system or app. */
|
|
417
|
+
serverName: string;
|
|
418
|
+
addresses: string[];
|
|
419
|
+
hostNames: string[];
|
|
420
|
+
/** The Kinotic version the node runs; null when the node runs from classes rather than a packaged jar. */
|
|
421
|
+
version: string | null;
|
|
422
|
+
/** The service name that labels the logs of the server the node runs, for LogService's server log methods; null when the deployment configures none. */
|
|
423
|
+
telemetryServiceName: string | null;
|
|
424
|
+
/** The service instance id that labels the node's own logs, narrowing a server log query to this node; null when the deployment configures none. */
|
|
425
|
+
telemetryServiceInstanceId: string | null;
|
|
334
426
|
}
|
|
335
427
|
/**
|
|
336
|
-
* The
|
|
337
|
-
* {@code org.kinotic.
|
|
428
|
+
* The current topology and state of the cluster the org, system and app servers form. Mirrors the
|
|
429
|
+
* server's {@code org.kinotic.system.api.model.cluster.KinoticClusterInfo}.
|
|
338
430
|
*/
|
|
339
431
|
declare class KinoticClusterInfo {
|
|
340
|
-
localNodeId: string;
|
|
341
432
|
serverNodeCount: number;
|
|
342
433
|
topologyVersion: number;
|
|
343
434
|
clusterState: string;
|
|
@@ -345,7 +436,7 @@ declare class KinoticClusterInfo {
|
|
|
345
436
|
active: boolean;
|
|
346
437
|
}
|
|
347
438
|
/**
|
|
348
|
-
* Queries the
|
|
439
|
+
* Queries the topology and state of the cluster the org, system and app servers form.
|
|
349
440
|
*/
|
|
350
441
|
interface IKinoticClusterInfoService {
|
|
351
442
|
/**
|
|
@@ -358,38 +449,374 @@ declare class KinoticClusterInfoService implements IKinoticClusterInfoService {
|
|
|
358
449
|
constructor(kinotic: IKinotic5);
|
|
359
450
|
getClusterInfo(): Promise<KinoticClusterInfo>;
|
|
360
451
|
}
|
|
361
|
-
import {
|
|
362
|
-
import {
|
|
452
|
+
import { IKinotic as IKinotic6 } from "@kinotic-ai/core";
|
|
453
|
+
import { VulnerabilityFinding } from "@kinotic-ai/management-api";
|
|
454
|
+
/**
|
|
455
|
+
* The advisories affecting the libraries one build of a Kinotic server runs, with the cluster nodes
|
|
456
|
+
* running that build. Mirrors the server's org.kinotic.system.api.model.cluster.ServerVulnerabilities.
|
|
457
|
+
*/
|
|
458
|
+
declare class ServerVulnerabilities {
|
|
459
|
+
/** The server kind the build is, such as management, system or app. */
|
|
460
|
+
serverName: string;
|
|
461
|
+
/** The Kinotic version of the build; null when its nodes run from classes rather than a packaged jar. */
|
|
462
|
+
version: string | null;
|
|
463
|
+
/** How many nodes run the build. */
|
|
464
|
+
nodeCount: number;
|
|
465
|
+
/** How many libraries the build runs; none when its nodes' classpath holds no library list, such as when an IDE runs them from classes. */
|
|
466
|
+
componentCount: number;
|
|
467
|
+
/** The advisories affecting the build's libraries, the most severe first. */
|
|
468
|
+
findings: VulnerabilityFinding[];
|
|
469
|
+
/** Why the build's libraries could not be checked, or null when they were; a build that could not be checked has no findings. */
|
|
470
|
+
error: string | null;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* The vulnerability advisories affecting the Kinotic cluster itself: the libraries each running
|
|
474
|
+
* server build was built with, checked against the advisories read from OSV.
|
|
475
|
+
*/
|
|
476
|
+
interface IClusterVulnerabilityService {
|
|
477
|
+
/**
|
|
478
|
+
* Checks the libraries of every server build the cluster's nodes run against the advisories.
|
|
479
|
+
* @return one entry per server build running, the nodes of one server kind and version that list
|
|
480
|
+
* the same libraries, ordered by server kind then version
|
|
481
|
+
*/
|
|
482
|
+
findAll(): Promise<ServerVulnerabilities[]>;
|
|
483
|
+
}
|
|
484
|
+
declare class ClusterVulnerabilityService implements IClusterVulnerabilityService {
|
|
485
|
+
private readonly serviceProxy;
|
|
486
|
+
constructor(kinotic: IKinotic6);
|
|
487
|
+
findAll(): Promise<ServerVulnerabilities[]>;
|
|
488
|
+
}
|
|
489
|
+
import { PackageEcosystem as PackageEcosystem2, VulnerabilityAdvisory, VulnerabilityAlert } from "@kinotic-ai/management-api";
|
|
490
|
+
import { IKinotic as IKinotic7, Page as Page3, Pageable as Pageable3 } from "@kinotic-ai/core";
|
|
491
|
+
import { PackageEcosystem } from "@kinotic-ai/management-api";
|
|
492
|
+
/**
|
|
493
|
+
* How far the advisories of one PackageEcosystem have been read from OSV, and how many of them are
|
|
494
|
+
* stored.
|
|
495
|
+
*/
|
|
496
|
+
interface OsvImportStatus {
|
|
497
|
+
ecosystem: PackageEcosystem;
|
|
498
|
+
/**
|
|
499
|
+
* The newest modification time of an advisory read; every advisory OSV changed up to it is stored
|
|
500
|
+
* as OSV holds it. Null until the ecosystem's first import completes.
|
|
501
|
+
*/
|
|
502
|
+
syncedThrough: string | null;
|
|
503
|
+
/**
|
|
504
|
+
* How many advisories naming a package of the ecosystem are stored and not withdrawn.
|
|
505
|
+
*/
|
|
506
|
+
advisoryCount: number;
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* The vulnerability advisories read from OSV, for system users: how far each ecosystem's import
|
|
510
|
+
* has read, and, for an advisory, the projects of every organization it affects.
|
|
511
|
+
*/
|
|
512
|
+
interface IVulnerabilityAdvisoryService {
|
|
513
|
+
/**
|
|
514
|
+
* Reports how far the advisories of each package ecosystem have been read from OSV.
|
|
515
|
+
* @return one status per ecosystem, in the order of PackageEcosystem
|
|
516
|
+
*/
|
|
517
|
+
findImportStatus(): Promise<OsvImportStatus[]>;
|
|
518
|
+
/**
|
|
519
|
+
* Finds the stored advisories by OSV id, by alias such as a CVE, or by package.
|
|
520
|
+
* @param search an OSV id or an alias, matched ignoring case and including withdrawn advisories,
|
|
521
|
+
* or a package URL such as pkg:npm/lodash, matched by its package without the
|
|
522
|
+
* version and listing the advisories not withdrawn
|
|
523
|
+
* @param pageable the page to return
|
|
524
|
+
*/
|
|
525
|
+
findAdvisories(search: string, pageable: Pageable3): Promise<Page3<VulnerabilityAdvisory>>;
|
|
526
|
+
/**
|
|
527
|
+
* Lists the stored advisories of a package ecosystem that are not withdrawn, the ones the
|
|
528
|
+
* ecosystem's OsvImportStatus counts, as findImportStatus reports it.
|
|
529
|
+
* @param ecosystem the ecosystem whose advisories to list
|
|
530
|
+
* @param pageable the page to return
|
|
531
|
+
*/
|
|
532
|
+
findAdvisoriesOf(ecosystem: PackageEcosystem2, pageable: Pageable3): Promise<Page3<VulnerabilityAdvisory>>;
|
|
533
|
+
/**
|
|
534
|
+
* Lists the alerts an advisory has raised, one per affected project, across every organization.
|
|
535
|
+
* @param advisoryId the advisory's OSV id
|
|
536
|
+
* @param pageable the page to return
|
|
537
|
+
*/
|
|
538
|
+
findAlerts(advisoryId: string, pageable: Pageable3): Promise<Page3<VulnerabilityAlert>>;
|
|
539
|
+
}
|
|
540
|
+
declare class VulnerabilityAdvisoryService implements IVulnerabilityAdvisoryService {
|
|
541
|
+
private readonly serviceProxy;
|
|
542
|
+
constructor(kinotic: IKinotic7);
|
|
543
|
+
findImportStatus(): Promise<OsvImportStatus[]>;
|
|
544
|
+
findAdvisories(search: string, pageable: Pageable3): Promise<Page3<VulnerabilityAdvisory>>;
|
|
545
|
+
findAdvisoriesOf(ecosystem: PackageEcosystem2, pageable: Pageable3): Promise<Page3<VulnerabilityAdvisory>>;
|
|
546
|
+
findAlerts(advisoryId: string, pageable: Pageable3): Promise<Page3<VulnerabilityAlert>>;
|
|
547
|
+
}
|
|
548
|
+
import { Application, Organization, Project, ApplicationParticipantIdentity, OrganizationParticipantIdentity, PendingInviteSummary } from "@kinotic-ai/management-api";
|
|
549
|
+
import { IKinotic as IKinotic8, Page as Page4, Pageable as Pageable4 } from "@kinotic-ai/core";
|
|
363
550
|
/**
|
|
364
|
-
* Cross-organization reads for
|
|
551
|
+
* Cross-organization reads for system users. Published in the system zone, which only
|
|
365
552
|
* SYSTEM participants may address, so every method takes the target organization explicitly
|
|
366
553
|
* instead of resolving it from the caller's scope.
|
|
367
554
|
*/
|
|
368
555
|
interface ISystemOrganizationService {
|
|
369
|
-
findOrganizations(pageable:
|
|
370
|
-
searchOrganizations(searchText: string, pageable:
|
|
556
|
+
findOrganizations(pageable: Pageable4): Promise<Page4<Organization>>;
|
|
557
|
+
searchOrganizations(searchText: string, pageable: Pageable4): Promise<Page4<Organization>>;
|
|
371
558
|
/** Resolves null when no organization has the given id. */
|
|
372
559
|
findOrganizationById(organizationId: string): Promise<Organization | null>;
|
|
373
560
|
countOrganizations(): Promise<number>;
|
|
374
|
-
findApplications(organizationId: string, pageable:
|
|
375
|
-
findProjects(organizationId: string, pageable:
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
561
|
+
findApplications(organizationId: string, pageable: Pageable4): Promise<Page4<Application>>;
|
|
562
|
+
findProjects(organizationId: string, pageable: Pageable4): Promise<Page4<Project>>;
|
|
563
|
+
findMembers(organizationId: string, pageable: Pageable4): Promise<Page4<OrganizationParticipantIdentity>>;
|
|
564
|
+
searchMembers(searchText: string, organizationId: string, pageable: Pageable4): Promise<Page4<OrganizationParticipantIdentity>>;
|
|
565
|
+
findApplicationUsers(organizationId: string, applicationId: string, pageable: Pageable4): Promise<Page4<ApplicationParticipantIdentity>>;
|
|
566
|
+
searchApplicationUsers(searchText: string, organizationId: string, applicationId: string, pageable: Pageable4): Promise<Page4<ApplicationParticipantIdentity>>;
|
|
567
|
+
findPendingInvites(organizationId: string, applicationId: string | null, pageable: Pageable4): Promise<Page4<PendingInviteSummary>>;
|
|
380
568
|
}
|
|
381
569
|
declare class SystemOrganizationService implements ISystemOrganizationService {
|
|
382
570
|
private readonly serviceProxy;
|
|
383
|
-
constructor(kinotic:
|
|
384
|
-
findOrganizations(pageable:
|
|
385
|
-
searchOrganizations(searchText: string, pageable:
|
|
571
|
+
constructor(kinotic: IKinotic8);
|
|
572
|
+
findOrganizations(pageable: Pageable4): Promise<Page4<Organization>>;
|
|
573
|
+
searchOrganizations(searchText: string, pageable: Pageable4): Promise<Page4<Organization>>;
|
|
386
574
|
findOrganizationById(organizationId: string): Promise<Organization | null>;
|
|
387
575
|
countOrganizations(): Promise<number>;
|
|
388
|
-
findApplications(organizationId: string, pageable:
|
|
389
|
-
findProjects(organizationId: string, pageable:
|
|
390
|
-
findMembers(organizationId: string,
|
|
391
|
-
searchMembers(searchText: string, organizationId: string,
|
|
392
|
-
|
|
576
|
+
findApplications(organizationId: string, pageable: Pageable4): Promise<Page4<Application>>;
|
|
577
|
+
findProjects(organizationId: string, pageable: Pageable4): Promise<Page4<Project>>;
|
|
578
|
+
findMembers(organizationId: string, pageable: Pageable4): Promise<Page4<OrganizationParticipantIdentity>>;
|
|
579
|
+
searchMembers(searchText: string, organizationId: string, pageable: Pageable4): Promise<Page4<OrganizationParticipantIdentity>>;
|
|
580
|
+
findApplicationUsers(organizationId: string, applicationId: string, pageable: Pageable4): Promise<Page4<ApplicationParticipantIdentity>>;
|
|
581
|
+
searchApplicationUsers(searchText: string, organizationId: string, applicationId: string, pageable: Pageable4): Promise<Page4<ApplicationParticipantIdentity>>;
|
|
582
|
+
findPendingInvites(organizationId: string, applicationId: string | null, pageable: Pageable4): Promise<Page4<PendingInviteSummary>>;
|
|
583
|
+
}
|
|
584
|
+
import { MachineParticipantIdentity, MachineProvisionResult, SystemParticipantIdentity } from "@kinotic-ai/management-api";
|
|
585
|
+
import { IKinotic as IKinotic9, Page as Page5, Pageable as Pageable5 } from "@kinotic-ai/core";
|
|
586
|
+
/**
|
|
587
|
+
* The system's own members: the system users who sign in to the system console, and the
|
|
588
|
+
* SYSTEM-scope machines that connect as system daemons, such as a worker node's vm-manager.
|
|
589
|
+
* Published in the system zone, which only SYSTEM participants may address; every method works
|
|
590
|
+
* on SYSTEM scope alone, so an organization's users and machines stay that organization's to
|
|
591
|
+
* manage through IMachineService.
|
|
592
|
+
*/
|
|
593
|
+
interface ISystemMemberService {
|
|
594
|
+
findUsers(pageable: Pageable5): Promise<Page5<SystemParticipantIdentity>>;
|
|
595
|
+
searchUsers(searchText: string, pageable: Pageable5): Promise<Page5<SystemParticipantIdentity>>;
|
|
596
|
+
/**
|
|
597
|
+
* Adds a system user, who holds the system's full authority once signed in. The user is pending until it first
|
|
598
|
+
* signs in: through one of the providers the system console's login offers, which signs in the account whose
|
|
599
|
+
* verified email is `email`, or with a password `resetUserPassword` issues.
|
|
600
|
+
*/
|
|
601
|
+
addUser(email: string, displayName: string | null): Promise<SystemParticipantIdentity>;
|
|
602
|
+
/**
|
|
603
|
+
* Enables or disables a system user. A disabled user cannot sign in; a session it already holds lasts until it
|
|
604
|
+
* expires. Callers cannot disable themselves.
|
|
605
|
+
*/
|
|
606
|
+
setUserEnabled(userId: string, enabled: boolean): Promise<void>;
|
|
607
|
+
/**
|
|
608
|
+
* Replaces a system user's password with a generated one, returned exactly once. Refused while the system
|
|
609
|
+
* console's login takes no password.
|
|
610
|
+
*/
|
|
611
|
+
resetUserPassword(userId: string): Promise<string>;
|
|
612
|
+
/** Lists the system's machines, disabled ones included. */
|
|
613
|
+
findMachines(pageable: Pageable5): Promise<Page5<MachineParticipantIdentity>>;
|
|
614
|
+
/**
|
|
615
|
+
* Provisions a system machine and returns it together with its generated client secret.
|
|
616
|
+
* The secret is disclosed exactly once — it cannot be retrieved later.
|
|
617
|
+
*/
|
|
618
|
+
createMachine(displayName: string): Promise<MachineProvisionResult>;
|
|
619
|
+
/**
|
|
620
|
+
* Replaces a system machine's client secret, returning the new secret exactly once. The
|
|
621
|
+
* old secret stops working immediately; a connection the machine already holds lasts until
|
|
622
|
+
* it disconnects.
|
|
623
|
+
*/
|
|
624
|
+
rotateSecret(machineId: string): Promise<string>;
|
|
625
|
+
/**
|
|
626
|
+
* Enables or disables a system machine. A disabled machine is cut off on its next
|
|
627
|
+
* connection, and enabling it restores access with the same credential.
|
|
628
|
+
*/
|
|
629
|
+
setMachineEnabled(machineId: string, enabled: boolean): Promise<void>;
|
|
630
|
+
/**
|
|
631
|
+
* Permanently removes a system machine, including its stored credential. A removed
|
|
632
|
+
* machine's id cannot authenticate again.
|
|
633
|
+
*/
|
|
634
|
+
removeMachine(machineId: string): Promise<void>;
|
|
635
|
+
}
|
|
636
|
+
declare class SystemMemberService implements ISystemMemberService {
|
|
637
|
+
private readonly serviceProxy;
|
|
638
|
+
constructor(kinotic: IKinotic9);
|
|
639
|
+
findUsers(pageable: Pageable5): Promise<Page5<SystemParticipantIdentity>>;
|
|
640
|
+
searchUsers(searchText: string, pageable: Pageable5): Promise<Page5<SystemParticipantIdentity>>;
|
|
641
|
+
addUser(email: string, displayName: string | null): Promise<SystemParticipantIdentity>;
|
|
642
|
+
setUserEnabled(userId: string, enabled: boolean): Promise<void>;
|
|
643
|
+
resetUserPassword(userId: string): Promise<string>;
|
|
644
|
+
findMachines(pageable: Pageable5): Promise<Page5<MachineParticipantIdentity>>;
|
|
645
|
+
createMachine(displayName: string): Promise<MachineProvisionResult>;
|
|
646
|
+
rotateSecret(machineId: string): Promise<string>;
|
|
647
|
+
setMachineEnabled(machineId: string, enabled: boolean): Promise<void>;
|
|
648
|
+
removeMachine(machineId: string): Promise<void>;
|
|
649
|
+
}
|
|
650
|
+
import { WatchEvent as WatchEvent3 } from "@kinotic-ai/management-api";
|
|
651
|
+
import { IKinotic as IKinotic10 } from "@kinotic-ai/core";
|
|
652
|
+
import { IterablePage as IterablePage3, Pageable as Pageable6 } from "@kinotic-ai/core";
|
|
653
|
+
/**
|
|
654
|
+
* The ledger of every watched record on the platform.
|
|
655
|
+
*/
|
|
656
|
+
interface IWatchEventService {
|
|
657
|
+
/**
|
|
658
|
+
* Lists what happened to every watched record, newest first: each change of what a record should
|
|
659
|
+
* be and of what it reports, each mark set beside them, and each status a run passed through, with
|
|
660
|
+
* what caused it.
|
|
661
|
+
* @param pageable the page to return
|
|
662
|
+
* @return a Promise resolving to a page of ledger entries
|
|
663
|
+
*/
|
|
664
|
+
findAll(pageable: Pageable6): Promise<IterablePage3<WatchEvent3>>;
|
|
665
|
+
}
|
|
666
|
+
declare class WatchEventService implements IWatchEventService {
|
|
667
|
+
private readonly serviceProxy;
|
|
668
|
+
constructor(kinotic: IKinotic10);
|
|
669
|
+
findAll(pageable: Pageable6): Promise<IterablePage3<WatchEvent3>>;
|
|
670
|
+
private findAllSinglePage;
|
|
671
|
+
}
|
|
672
|
+
import { IKinotic as IKinotic11, Page as Page6, Pageable as Pageable7 } from "@kinotic-ai/core";
|
|
673
|
+
/**
|
|
674
|
+
* The large language models the system's services call, each an LlmConfiguration that system users
|
|
675
|
+
* manage and a service selects by name. A configuration's API key is given on save and held in the system's
|
|
676
|
+
* scope of the secret storage until a save gives another or the configuration is deleted. Published in the
|
|
677
|
+
* system zone, which only SYSTEM participants and the system's own cluster members may address.
|
|
678
|
+
*/
|
|
679
|
+
interface ILlmConfigurationService {
|
|
680
|
+
findAll(pageable: Pageable7): Promise<Page6<LlmConfiguration>>;
|
|
681
|
+
/** Resolves null when no configuration has the given id. */
|
|
682
|
+
findById(id: string): Promise<LlmConfiguration | null>;
|
|
683
|
+
/** Resolves null when no configuration has the given name. */
|
|
684
|
+
findByName(name: string): Promise<LlmConfiguration | null>;
|
|
685
|
+
/**
|
|
686
|
+
* Saves a configuration, new or changed, and makes apiKey, when given, the key it calls its provider with.
|
|
687
|
+
* A null or blank apiKey keeps the key held for the configuration, if any. Its name must be one no other
|
|
688
|
+
* configuration has.
|
|
689
|
+
*/
|
|
690
|
+
save(configuration: LlmConfiguration, apiKey: string | null): Promise<LlmConfiguration>;
|
|
691
|
+
/** Deletes the configuration and the API key held for it. */
|
|
692
|
+
deleteById(id: string): Promise<void>;
|
|
693
|
+
}
|
|
694
|
+
declare class LlmConfigurationService implements ILlmConfigurationService {
|
|
695
|
+
private readonly serviceProxy;
|
|
696
|
+
constructor(kinotic: IKinotic11);
|
|
697
|
+
findAll(pageable: Pageable7): Promise<Page6<LlmConfiguration>>;
|
|
698
|
+
findById(id: string): Promise<LlmConfiguration | null>;
|
|
699
|
+
findByName(name: string): Promise<LlmConfiguration | null>;
|
|
700
|
+
save(configuration: LlmConfiguration, apiKey: string | null): Promise<LlmConfiguration>;
|
|
701
|
+
deleteById(id: string): Promise<void>;
|
|
702
|
+
}
|
|
703
|
+
import { JobRun } from "@kinotic-ai/management-api";
|
|
704
|
+
import { IKinotic as IKinotic12 } from "@kinotic-ai/core";
|
|
705
|
+
/**
|
|
706
|
+
* A grind job system users can start on demand, as the console lists it.
|
|
707
|
+
*/
|
|
708
|
+
interface SystemJobDescriptor {
|
|
709
|
+
/**
|
|
710
|
+
* The name identifying the job, which is also the name recorded on each of its runs.
|
|
711
|
+
*/
|
|
712
|
+
readonly name: string;
|
|
713
|
+
/**
|
|
714
|
+
* The version of the job's definition, recorded on each of its runs.
|
|
715
|
+
*/
|
|
716
|
+
readonly version: string | null;
|
|
717
|
+
/**
|
|
718
|
+
* What the job does.
|
|
719
|
+
*/
|
|
720
|
+
readonly description: string | null;
|
|
721
|
+
}
|
|
722
|
+
/**
|
|
723
|
+
* Starts the system jobs on demand. A run is owned by the system and executes on the
|
|
724
|
+
* node that started it, and is listed, watched and read through Kinotic.jobMonitoring like any
|
|
725
|
+
* other job run.
|
|
726
|
+
*/
|
|
727
|
+
interface ISystemJobService {
|
|
728
|
+
/**
|
|
729
|
+
* Lists the system jobs that can be started, ordered by name.
|
|
730
|
+
*/
|
|
731
|
+
findSystemJobs(): Promise<SystemJobDescriptor[]>;
|
|
732
|
+
/**
|
|
733
|
+
* Starts a run of the named system job, resolving with the run once it and its task ledger are
|
|
734
|
+
* recorded; rejects when no system job has the given name.
|
|
735
|
+
* @param name the name of the job to run
|
|
736
|
+
*/
|
|
737
|
+
startSystemJob(name: string): Promise<JobRun>;
|
|
738
|
+
}
|
|
739
|
+
declare class SystemJobService implements ISystemJobService {
|
|
740
|
+
private readonly serviceProxy;
|
|
741
|
+
constructor(kinotic: IKinotic12);
|
|
742
|
+
findSystemJobs(): Promise<SystemJobDescriptor[]>;
|
|
743
|
+
startSystemJob(name: string): Promise<JobRun>;
|
|
744
|
+
}
|
|
745
|
+
import { IKinotic as IKinotic13 } from "@kinotic-ai/core";
|
|
746
|
+
/**
|
|
747
|
+
* The Enterprise Features a Kinotic Enterprise License key turns on.
|
|
748
|
+
*/
|
|
749
|
+
declare enum EnterpriseFeature {
|
|
750
|
+
/** Azure Key Vault secret storage. */
|
|
751
|
+
AZURE_KEY_VAULT = "AZURE_KEY_VAULT",
|
|
752
|
+
/** Okta and Microsoft Entra sign-in through an organization's own client. */
|
|
753
|
+
ENTERPRISE_IDENTITY_PROVIDERS = "ENTERPRISE_IDENTITY_PROVIDERS"
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Where a Kinotic Enterprise License stands now.
|
|
757
|
+
*/
|
|
758
|
+
declare enum LicenseStatus {
|
|
759
|
+
/** Before its expiry: its features are on. */
|
|
760
|
+
ACTIVE = "ACTIVE",
|
|
761
|
+
/** Expired less than the grace period ago: its features stay on until the grace period ends. */
|
|
762
|
+
GRACE_PERIOD = "GRACE_PERIOD",
|
|
763
|
+
/** Its grace period has ended: its features are off. */
|
|
764
|
+
EXPIRED = "EXPIRED"
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* A verified Kinotic Enterprise License: who it is issued to, the cluster it is bound to, when it was issued and
|
|
768
|
+
* expires, and the Enterprise Features it turns on until its grace period ends.
|
|
769
|
+
*/
|
|
770
|
+
declare class License {
|
|
771
|
+
/** The party the license is issued to. */
|
|
772
|
+
licensee: string;
|
|
773
|
+
/**
|
|
774
|
+
* The id of the one cluster the license works on, the UID of that cluster's kube-system namespace, or null when
|
|
775
|
+
* it works on any cluster.
|
|
776
|
+
*/
|
|
777
|
+
clusterId: string | null;
|
|
778
|
+
/** When the license was issued, or null when its key does not say. */
|
|
779
|
+
issuedAt: string | null;
|
|
780
|
+
/** When the license expires. */
|
|
781
|
+
expiresAt: string;
|
|
782
|
+
/** When the license stops turning its features on, a grace period after it expires. */
|
|
783
|
+
graceEndsAt: string;
|
|
784
|
+
/** Where the license stands at the time it was handed out. */
|
|
785
|
+
status: LicenseStatus;
|
|
786
|
+
/** The Enterprise Features the license turns on while it is active or in its grace period. */
|
|
787
|
+
features: EnterpriseFeature[];
|
|
788
|
+
constructor(licensee: string, expiresAt: string, graceEndsAt: string, status: LicenseStatus);
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* The Kinotic Enterprise License key the whole cluster runs on, which system users read and replace without
|
|
792
|
+
* restarting a server. A key bound to the cluster is renewed from Minds Ignited's license server once a day. Published in the system zone, which only SYSTEM participants and the system's own cluster
|
|
793
|
+
* members may address.
|
|
794
|
+
*/
|
|
795
|
+
interface ILicenseService {
|
|
796
|
+
/** Resolves null when no valid key is installed. */
|
|
797
|
+
findCurrent(): Promise<License | null>;
|
|
798
|
+
/**
|
|
799
|
+
* Installs licenseKey for the whole cluster in place of the installed key, resolving with the license it holds.
|
|
800
|
+
* The call resolves once the key is stored and the node that took the call runs on it; every other node runs on
|
|
801
|
+
* it shortly after, except a node the cluster could not reach, which reads it within ten minutes. Rejects a key
|
|
802
|
+
* Minds Ignited did not sign, one naming no licensee or expiry, one bound to another cluster, one whose grace
|
|
803
|
+
* period has ended, and, on a cluster that stores secrets in Azure Key Vault, one that does not turn
|
|
804
|
+
* AZURE_KEY_VAULT on.
|
|
805
|
+
*/
|
|
806
|
+
install(licenseKey: string): Promise<License>;
|
|
807
|
+
/**
|
|
808
|
+
* The id of this cluster, the UID of its kube-system namespace, which a customer gives Minds Ignited to get a key
|
|
809
|
+
* bound to the cluster. Resolves null when the cluster does not run in Kubernetes, or has not been able to read
|
|
810
|
+
* the namespace yet.
|
|
811
|
+
*/
|
|
812
|
+
findClusterId(): Promise<string | null>;
|
|
813
|
+
}
|
|
814
|
+
declare class LicenseService implements ILicenseService {
|
|
815
|
+
private readonly serviceProxy;
|
|
816
|
+
constructor(kinotic: IKinotic13);
|
|
817
|
+
findCurrent(): Promise<License | null>;
|
|
818
|
+
install(licenseKey: string): Promise<License>;
|
|
819
|
+
findClusterId(): Promise<string | null>;
|
|
393
820
|
}
|
|
394
821
|
interface ISystemApiExtension {
|
|
395
822
|
vmNodes: IVmNodeService;
|
|
@@ -397,18 +824,27 @@ interface ISystemApiExtension {
|
|
|
397
824
|
workloadOrchestration: IWorkloadOrchestrationService;
|
|
398
825
|
logManager: ILogManager;
|
|
399
826
|
clusterInfo: IKinoticClusterInfoService;
|
|
827
|
+
clusterVulnerabilities: IClusterVulnerabilityService;
|
|
828
|
+
vulnerabilityAdvisories: IVulnerabilityAdvisoryService;
|
|
400
829
|
systemOrganizations: ISystemOrganizationService;
|
|
830
|
+
systemMembers: ISystemMemberService;
|
|
831
|
+
watchEvents: IWatchEventService;
|
|
832
|
+
llmConfigurations: ILlmConfigurationService;
|
|
833
|
+
systemJobs: ISystemJobService;
|
|
834
|
+
licenses: ILicenseService;
|
|
401
835
|
}
|
|
402
836
|
declare const SystemApiPlugin: KinoticPlugin<ISystemApiExtension>;
|
|
403
|
-
import { IKinotic as
|
|
837
|
+
import { IKinotic as IKinotic14 } from "@kinotic-ai/core";
|
|
404
838
|
declare class LogManager implements ILogManager {
|
|
405
839
|
private readonly serviceProxy;
|
|
406
|
-
constructor(kinotic:
|
|
840
|
+
constructor(kinotic: IKinotic14);
|
|
407
841
|
loggers(nodeId: string): Promise<LoggersDescriptor>;
|
|
408
842
|
loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
|
|
409
843
|
configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
|
|
844
|
+
traceLog(nodeId: string): Promise<TraceLogProperties>;
|
|
845
|
+
configureTraceLog(nodeId: string, traceLog: TraceLogProperties): Promise<void>;
|
|
410
846
|
}
|
|
411
847
|
declare module "@kinotic-ai/core" {
|
|
412
848
|
interface KinoticSingleton extends ISystemApiExtension {}
|
|
413
849
|
}
|
|
414
|
-
export {
|
|
850
|
+
export { ClusterVulnerabilityService, EnterpriseFeature, GroupLoggerLevelsDescriptor, IClusterVulnerabilityService, IKinoticClusterInfoService, ILicenseService, ILlmConfigurationService, ILogManager, ISystemApiExtension, ISystemJobService, ISystemMemberService, ISystemOrganizationService, IVmNodeService, IVulnerabilityAdvisoryService, IWatchEventService, IWorkloadOrchestrationService, IWorkloadService, KinoticClusterInfo, KinoticClusterInfoService, KinoticNodeInfo, License, LicenseService, LicenseStatus, LlmConfiguration, LlmConfigurationService, LlmProviderType, LogLevel, LogManager, LoggerLevelsDescriptor, LoggersDescriptor, OsvImportStatus, SYSTEM_API_ZONE, ServerVulnerabilities, SingleLoggerLevelsDescriptor, SystemApiPlugin, SystemJobDescriptor, SystemJobService, SystemMemberService, SystemOrganizationService, TraceLogProperties, VmNode, VmNodeOrchestrationServiceProxy, VmNodeRegistration, VmNodeServiceProxy, VmNodeState, VmNodeStatusType, VmProviderType, VulnerabilityAdvisoryService, WatchEventService, WorkloadOrchestrationService, WorkloadServiceProxy, WorkloadStatusReport };
|