@kinotic-ai/system-api 5.0.0-beta.7 → 5.0.0-beta.9
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 +15 -0
- package/dist/index.d.cts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +15 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -49,6 +49,7 @@ __export(exports_src, {
|
|
|
49
49
|
VmNodeRegistration: () => VmNodeRegistration,
|
|
50
50
|
VmNodeOrchestrationServiceProxy: () => VmNodeOrchestrationServiceProxy,
|
|
51
51
|
VmNode: () => VmNode,
|
|
52
|
+
TraceLogProperties: () => TraceLogProperties,
|
|
52
53
|
SystemOrganizationService: () => SystemOrganizationService,
|
|
53
54
|
SystemApiPlugin: () => SystemApiPlugin,
|
|
54
55
|
SingleLoggerLevelsDescriptor: () => SingleLoggerLevelsDescriptor,
|
|
@@ -235,6 +236,11 @@ class LoggersDescriptor {
|
|
|
235
236
|
groups = new Map;
|
|
236
237
|
}
|
|
237
238
|
|
|
239
|
+
class TraceLogProperties {
|
|
240
|
+
includes = [];
|
|
241
|
+
excludes = [];
|
|
242
|
+
}
|
|
243
|
+
|
|
238
244
|
// packages/system-api/src/api/services/LogManager.ts
|
|
239
245
|
class LogManager {
|
|
240
246
|
serviceProxy;
|
|
@@ -260,6 +266,15 @@ class LogManager {
|
|
|
260
266
|
configureLogLevel(nodeId, name, level) {
|
|
261
267
|
return this.serviceProxy.invoke("configureLogLevel", [name, level], nodeId);
|
|
262
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
|
+
}
|
|
263
278
|
}
|
|
264
279
|
|
|
265
280
|
// packages/system-api/src/api/services/IKinoticClusterInfoService.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -300,6 +300,22 @@ declare class LoggersDescriptor {
|
|
|
300
300
|
groups: Map<string, GroupLoggerLevelsDescriptor>;
|
|
301
301
|
}
|
|
302
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
|
+
/**
|
|
303
319
|
* Provides the ability to manage loggers
|
|
304
320
|
*/
|
|
305
321
|
interface ILogManager {
|
|
@@ -321,6 +337,21 @@ interface ILogManager {
|
|
|
321
337
|
* @param level the {@link LogLevel} to set for the logger with the given name
|
|
322
338
|
*/
|
|
323
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>;
|
|
324
355
|
}
|
|
325
356
|
import { IKinotic as IKinotic5 } from "@kinotic-ai/core";
|
|
326
357
|
/**
|
|
@@ -410,8 +441,10 @@ declare class LogManager implements ILogManager {
|
|
|
410
441
|
loggers(nodeId: string): Promise<LoggersDescriptor>;
|
|
411
442
|
loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
|
|
412
443
|
configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
|
|
444
|
+
traceLog(nodeId: string): Promise<TraceLogProperties>;
|
|
445
|
+
configureTraceLog(nodeId: string, traceLog: TraceLogProperties): Promise<void>;
|
|
413
446
|
}
|
|
414
447
|
declare module "@kinotic-ai/core" {
|
|
415
448
|
interface KinoticSingleton extends ISystemApiExtension {}
|
|
416
449
|
}
|
|
417
|
-
export { WorkloadStatusReport, WorkloadServiceProxy, WorkloadOrchestrationService, VmProviderType, VmNodeStatusType, VmNodeStatus, VmNodeServiceProxy, VmNodeRegistration, VmNodeOrchestrationServiceProxy, VmNode, SystemOrganizationService, SystemApiPlugin, SingleLoggerLevelsDescriptor, SYSTEM_API_ZONE, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticNodeInfo, KinoticClusterInfoService, KinoticClusterInfo, IWorkloadService, IWorkloadOrchestrationService, IVmNodeService, ISystemOrganizationService, ISystemApiExtension, ILogManager, IKinoticClusterInfoService, GroupLoggerLevelsDescriptor };
|
|
450
|
+
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
|
@@ -300,6 +300,22 @@ declare class LoggersDescriptor {
|
|
|
300
300
|
groups: Map<string, GroupLoggerLevelsDescriptor>;
|
|
301
301
|
}
|
|
302
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
|
+
/**
|
|
303
319
|
* Provides the ability to manage loggers
|
|
304
320
|
*/
|
|
305
321
|
interface ILogManager {
|
|
@@ -321,6 +337,21 @@ interface ILogManager {
|
|
|
321
337
|
* @param level the {@link LogLevel} to set for the logger with the given name
|
|
322
338
|
*/
|
|
323
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>;
|
|
324
355
|
}
|
|
325
356
|
import { IKinotic as IKinotic5 } from "@kinotic-ai/core";
|
|
326
357
|
/**
|
|
@@ -410,8 +441,10 @@ declare class LogManager implements ILogManager {
|
|
|
410
441
|
loggers(nodeId: string): Promise<LoggersDescriptor>;
|
|
411
442
|
loggerLevels(nodeId: string, name: string): Promise<LoggerLevelsDescriptor>;
|
|
412
443
|
configureLogLevel(nodeId: string, name: string, level: LogLevel): Promise<void>;
|
|
444
|
+
traceLog(nodeId: string): Promise<TraceLogProperties>;
|
|
445
|
+
configureTraceLog(nodeId: string, traceLog: TraceLogProperties): Promise<void>;
|
|
413
446
|
}
|
|
414
447
|
declare module "@kinotic-ai/core" {
|
|
415
448
|
interface KinoticSingleton extends ISystemApiExtension {}
|
|
416
449
|
}
|
|
417
|
-
export { WorkloadStatusReport, WorkloadServiceProxy, WorkloadOrchestrationService, VmProviderType, VmNodeStatusType, VmNodeStatus, VmNodeServiceProxy, VmNodeRegistration, VmNodeOrchestrationServiceProxy, VmNode, SystemOrganizationService, SystemApiPlugin, SingleLoggerLevelsDescriptor, SYSTEM_API_ZONE, LoggersDescriptor, LoggerLevelsDescriptor, LogManager, LogLevel, KinoticNodeInfo, KinoticClusterInfoService, KinoticClusterInfo, IWorkloadService, IWorkloadOrchestrationService, IVmNodeService, ISystemOrganizationService, ISystemApiExtension, ILogManager, IKinoticClusterInfoService, GroupLoggerLevelsDescriptor };
|
|
450
|
+
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
|
@@ -171,6 +171,11 @@ class LoggersDescriptor {
|
|
|
171
171
|
groups = new Map;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
class TraceLogProperties {
|
|
175
|
+
includes = [];
|
|
176
|
+
excludes = [];
|
|
177
|
+
}
|
|
178
|
+
|
|
174
179
|
// packages/system-api/src/api/services/LogManager.ts
|
|
175
180
|
class LogManager {
|
|
176
181
|
serviceProxy;
|
|
@@ -196,6 +201,15 @@ class LogManager {
|
|
|
196
201
|
configureLogLevel(nodeId, name, level) {
|
|
197
202
|
return this.serviceProxy.invoke("configureLogLevel", [name, level], nodeId);
|
|
198
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
|
+
}
|
|
199
213
|
}
|
|
200
214
|
|
|
201
215
|
// packages/system-api/src/api/services/IKinoticClusterInfoService.ts
|
|
@@ -291,6 +305,7 @@ export {
|
|
|
291
305
|
VmNodeRegistration,
|
|
292
306
|
VmNodeOrchestrationServiceProxy,
|
|
293
307
|
VmNode,
|
|
308
|
+
TraceLogProperties,
|
|
294
309
|
SystemOrganizationService,
|
|
295
310
|
SystemApiPlugin,
|
|
296
311
|
SingleLoggerLevelsDescriptor,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinotic-ai/system-api",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.9",
|
|
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,7 +38,7 @@
|
|
|
38
38
|
"coverage": "bun test --coverage --pass-with-no-tests"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@kinotic-ai/management-api": "5.0.0-beta.
|
|
41
|
+
"@kinotic-ai/management-api": "^5.0.0-beta.25"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@kinotic-ai/core": ">=5.0.0-beta.9"
|