@dexto/tools-process 1.5.8 → 1.6.1
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/bash-exec-tool.cjs +40 -23
- package/dist/bash-exec-tool.d.ts +27 -9
- package/dist/bash-exec-tool.d.ts.map +1 -0
- package/dist/bash-exec-tool.js +43 -23
- package/dist/bash-output-tool.cjs +13 -5
- package/dist/bash-output-tool.d.ts +13 -8
- package/dist/bash-output-tool.d.ts.map +1 -0
- package/dist/bash-output-tool.js +13 -5
- package/dist/command-pattern-utils.cjs +83 -0
- package/dist/command-pattern-utils.d.ts +29 -0
- package/dist/command-pattern-utils.d.ts.map +1 -0
- package/dist/command-pattern-utils.js +56 -0
- package/dist/command-pattern-utils.test.cjs +80 -0
- package/dist/command-pattern-utils.test.d.ts +2 -0
- package/dist/command-pattern-utils.test.d.ts.map +1 -0
- package/dist/command-pattern-utils.test.js +83 -0
- package/dist/command-validator.d.ts +5 -8
- package/dist/command-validator.d.ts.map +1 -0
- package/dist/error-codes.d.ts +2 -3
- package/dist/error-codes.d.ts.map +1 -0
- package/dist/errors.d.ts +4 -7
- package/dist/errors.d.ts.map +1 -0
- package/dist/index.cjs +6 -3
- package/dist/index.d.cts +485 -11
- package/dist/index.d.ts +10 -4
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -2
- package/dist/kill-process-tool.cjs +13 -5
- package/dist/kill-process-tool.d.ts +13 -8
- package/dist/kill-process-tool.d.ts.map +1 -0
- package/dist/kill-process-tool.js +13 -5
- package/dist/process-service.cjs +11 -1
- package/dist/process-service.d.ts +12 -11
- package/dist/process-service.d.ts.map +1 -0
- package/dist/process-service.js +11 -1
- package/dist/{tool-provider.cjs → tool-factory-config.cjs} +6 -48
- package/dist/{tool-provider.d.ts → tool-factory-config.d.ts} +8 -27
- package/dist/tool-factory-config.d.ts.map +1 -0
- package/dist/{tool-provider.js → tool-factory-config.js} +2 -44
- package/dist/tool-factory.cjs +89 -0
- package/dist/tool-factory.d.ts +4 -0
- package/dist/tool-factory.d.ts.map +1 -0
- package/dist/tool-factory.js +65 -0
- package/dist/types.d.ts +9 -10
- package/dist/types.d.ts.map +1 -0
- package/package.json +5 -4
- package/dist/bash-exec-tool.d.cts +0 -17
- package/dist/bash-output-tool.d.cts +0 -16
- package/dist/command-validator.d.cts +0 -52
- package/dist/error-codes.d.cts +0 -26
- package/dist/errors.d.cts +0 -90
- package/dist/kill-process-tool.d.cts +0 -16
- package/dist/process-service.d.cts +0 -96
- package/dist/tool-provider.d.cts +0 -72
- package/dist/types.d.cts +0 -108
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { ProcessConfig, ExecuteOptions, ProcessResult, ProcessHandle, ProcessOutput, ProcessInfo } from './types.js';
|
|
2
|
-
import { IDextoLogger } from '@dexto/core';
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
2
|
* Process Service
|
|
6
3
|
*
|
|
7
4
|
* Secure command execution and process management for Dexto internal tools
|
|
8
5
|
*/
|
|
9
|
-
|
|
6
|
+
import { ProcessConfig, ExecuteOptions, ProcessResult, ProcessHandle, ProcessOutput, ProcessInfo } from './types.js';
|
|
7
|
+
import type { Logger } from '@dexto/core';
|
|
10
8
|
/**
|
|
11
9
|
* ProcessService - Handles command execution and process management
|
|
12
10
|
*
|
|
13
|
-
* This service receives fully-validated configuration from the Process Tools
|
|
14
|
-
* All defaults have been applied by the
|
|
11
|
+
* This service receives fully-validated configuration from the Process Tools Factory.
|
|
12
|
+
* All defaults have been applied by the factory's schema, so the service trusts the config
|
|
15
13
|
* and uses it as-is without any fallback logic.
|
|
16
14
|
*
|
|
17
15
|
* TODO: Add tests for this class
|
|
18
16
|
*/
|
|
19
|
-
declare class ProcessService {
|
|
17
|
+
export declare class ProcessService {
|
|
20
18
|
private config;
|
|
21
19
|
private commandValidator;
|
|
22
20
|
private initialized;
|
|
@@ -26,11 +24,11 @@ declare class ProcessService {
|
|
|
26
24
|
/**
|
|
27
25
|
* Create a new ProcessService with validated configuration.
|
|
28
26
|
*
|
|
29
|
-
* @param config - Fully-validated configuration from
|
|
27
|
+
* @param config - Fully-validated configuration from the factory schema.
|
|
30
28
|
* All required fields have values, defaults already applied.
|
|
31
29
|
* @param logger - Logger instance for this service
|
|
32
30
|
*/
|
|
33
|
-
constructor(config: ProcessConfig, logger:
|
|
31
|
+
constructor(config: ProcessConfig, logger: Logger);
|
|
34
32
|
/**
|
|
35
33
|
* Initialize the service.
|
|
36
34
|
* Safe to call multiple times - subsequent calls return the same promise.
|
|
@@ -83,6 +81,10 @@ declare class ProcessService {
|
|
|
83
81
|
* Get service configuration
|
|
84
82
|
*/
|
|
85
83
|
getConfig(): Readonly<ProcessConfig>;
|
|
84
|
+
/**
|
|
85
|
+
* Update the working directory at runtime (e.g., when workspace changes).
|
|
86
|
+
*/
|
|
87
|
+
setWorkingDirectory(workingDirectory: string): void;
|
|
86
88
|
/**
|
|
87
89
|
* Resolve and confine cwd to the configured working directory
|
|
88
90
|
*/
|
|
@@ -92,5 +94,4 @@ declare class ProcessService {
|
|
|
92
94
|
*/
|
|
93
95
|
cleanup(): Promise<void>;
|
|
94
96
|
}
|
|
95
|
-
|
|
96
|
-
export { ProcessService };
|
|
97
|
+
//# sourceMappingURL=process-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-service.d.ts","sourceRoot":"","sources":["../src/process-service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EACH,aAAa,EACb,cAAc,EACd,aAAa,EACb,aAAa,EACb,aAAa,EACb,WAAW,EAEd,MAAM,YAAY,CAAC;AAGpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAoB1C;;;;;;;;GAQG;AACH,qBAAa,cAAc;IACvB,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,mBAAmB,CAA6C;IACxE,OAAO,CAAC,MAAM,CAAS;IAEvB;;;;;;OAMG;gBACS,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM;IAQjD;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAS3B;;OAEG;YACW,YAAY;IAa1B;;;;OAIG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAOxC;;OAEG;IACG,cAAc,CAChB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,cAAmB,GAC7B,OAAO,CAAC,aAAa,GAAG,aAAa,CAAC;IAqDzC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAO;IAEjD;;OAEG;YACW,eAAe;IA6B7B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA8KzB;;OAEG;YACW,mBAAmB;IAoKjC;;OAEG;IACG,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA6BjE;;OAEG;IACG,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiCnD;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAe7C;;OAEG;IACH,OAAO,CAAC,aAAa;IAMrB;;OAEG;IACH,SAAS,IAAI,QAAQ,CAAC,aAAa,CAAC;IAIpC;;OAEG;IACH,mBAAmB,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI;IAQnD;;OAEG;IACH,OAAO,CAAC,cAAc;IAetB;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAcjC"}
|
package/dist/process-service.js
CHANGED
|
@@ -15,7 +15,7 @@ class ProcessService {
|
|
|
15
15
|
/**
|
|
16
16
|
* Create a new ProcessService with validated configuration.
|
|
17
17
|
*
|
|
18
|
-
* @param config - Fully-validated configuration from
|
|
18
|
+
* @param config - Fully-validated configuration from the factory schema.
|
|
19
19
|
* All required fields have values, defaults already applied.
|
|
20
20
|
* @param logger - Logger instance for this service
|
|
21
21
|
*/
|
|
@@ -471,6 +471,16 @@ Process terminated by signal ${signal ?? "UNKNOWN"}`;
|
|
|
471
471
|
getConfig() {
|
|
472
472
|
return { ...this.config };
|
|
473
473
|
}
|
|
474
|
+
/**
|
|
475
|
+
* Update the working directory at runtime (e.g., when workspace changes).
|
|
476
|
+
*/
|
|
477
|
+
setWorkingDirectory(workingDirectory) {
|
|
478
|
+
const normalized = workingDirectory?.trim();
|
|
479
|
+
if (!normalized) return;
|
|
480
|
+
if (this.config.workingDirectory === normalized) return;
|
|
481
|
+
this.config = { ...this.config, workingDirectory: normalized };
|
|
482
|
+
this.logger.info(`ProcessService working directory set to ${normalized}`);
|
|
483
|
+
}
|
|
474
484
|
/**
|
|
475
485
|
* Resolve and confine cwd to the configured working directory
|
|
476
486
|
*/
|
|
@@ -16,16 +16,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
|
|
19
|
+
var tool_factory_config_exports = {};
|
|
20
|
+
__export(tool_factory_config_exports, {
|
|
21
|
+
ProcessToolsConfigSchema: () => ProcessToolsConfigSchema
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(tool_factory_config_exports);
|
|
24
24
|
var import_zod = require("zod");
|
|
25
|
-
var import_process_service = require("./process-service.js");
|
|
26
|
-
var import_bash_exec_tool = require("./bash-exec-tool.js");
|
|
27
|
-
var import_bash_output_tool = require("./bash-output-tool.js");
|
|
28
|
-
var import_kill_process_tool = require("./kill-process-tool.js");
|
|
29
25
|
const DEFAULT_SECURITY_LEVEL = "moderate";
|
|
30
26
|
const DEFAULT_MAX_TIMEOUT = 6e5;
|
|
31
27
|
const DEFAULT_MAX_CONCURRENT_PROCESSES = 5;
|
|
@@ -50,47 +46,9 @@ const ProcessToolsConfigSchema = import_zod.z.object({
|
|
|
50
46
|
"Explicitly allowed commands (empty = all allowed with approval, strict mode only)"
|
|
51
47
|
),
|
|
52
48
|
blockedCommands: import_zod.z.array(import_zod.z.string()).default(DEFAULT_BLOCKED_COMMANDS).describe("Blocked command patterns (applies to all security levels)"),
|
|
53
|
-
environment: import_zod.z.record(import_zod.z.string()).default(DEFAULT_ENVIRONMENT).describe("Custom environment variables to set for command execution")
|
|
54
|
-
timeout: import_zod.z.number().int().positive().max(DEFAULT_MAX_TIMEOUT).optional().describe(
|
|
55
|
-
`Default timeout in milliseconds (max: ${DEFAULT_MAX_TIMEOUT / 1e3 / 60} minutes)`
|
|
56
|
-
)
|
|
49
|
+
environment: import_zod.z.record(import_zod.z.string()).default(DEFAULT_ENVIRONMENT).describe("Custom environment variables to set for command execution")
|
|
57
50
|
}).strict();
|
|
58
|
-
const processToolsProvider = {
|
|
59
|
-
type: "process-tools",
|
|
60
|
-
configSchema: ProcessToolsConfigSchema,
|
|
61
|
-
create: (config, context) => {
|
|
62
|
-
const { logger } = context;
|
|
63
|
-
logger.debug("Creating ProcessService for process tools");
|
|
64
|
-
const processService = new import_process_service.ProcessService(
|
|
65
|
-
{
|
|
66
|
-
securityLevel: config.securityLevel,
|
|
67
|
-
maxTimeout: config.maxTimeout,
|
|
68
|
-
maxConcurrentProcesses: config.maxConcurrentProcesses,
|
|
69
|
-
maxOutputBuffer: config.maxOutputBuffer,
|
|
70
|
-
workingDirectory: config.workingDirectory || process.cwd(),
|
|
71
|
-
allowedCommands: config.allowedCommands,
|
|
72
|
-
blockedCommands: config.blockedCommands,
|
|
73
|
-
environment: config.environment
|
|
74
|
-
},
|
|
75
|
-
logger
|
|
76
|
-
);
|
|
77
|
-
processService.initialize().catch((error) => {
|
|
78
|
-
logger.error(`Failed to initialize ProcessService: ${error.message}`);
|
|
79
|
-
});
|
|
80
|
-
logger.debug("ProcessService created - initialization will complete on first tool use");
|
|
81
|
-
return [
|
|
82
|
-
(0, import_bash_exec_tool.createBashExecTool)(processService),
|
|
83
|
-
(0, import_bash_output_tool.createBashOutputTool)(processService),
|
|
84
|
-
(0, import_kill_process_tool.createKillProcessTool)(processService)
|
|
85
|
-
];
|
|
86
|
-
},
|
|
87
|
-
metadata: {
|
|
88
|
-
displayName: "Process Tools",
|
|
89
|
-
description: "Process execution and management (bash, output, kill)",
|
|
90
|
-
category: "process"
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
51
|
// Annotate the CommonJS export names for ESM import in node:
|
|
94
52
|
0 && (module.exports = {
|
|
95
|
-
|
|
53
|
+
ProcessToolsConfigSchema
|
|
96
54
|
});
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { CustomToolProvider } from '@dexto/core';
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
|
-
* Process Tools
|
|
2
|
+
* Process Tools Factory
|
|
6
3
|
*
|
|
7
4
|
* Provides process execution and management tools by wrapping ProcessService.
|
|
8
|
-
* When registered, the
|
|
5
|
+
* When registered, the factory initializes ProcessService and creates tools
|
|
9
6
|
* for command execution and process management.
|
|
10
7
|
*/
|
|
11
|
-
|
|
8
|
+
import { z } from 'zod';
|
|
12
9
|
/**
|
|
13
|
-
* Configuration schema for Process tools
|
|
10
|
+
* Configuration schema for Process tools factory.
|
|
14
11
|
*
|
|
15
12
|
* This is the SINGLE SOURCE OF TRUTH for all configuration:
|
|
16
13
|
* - Validation rules
|
|
@@ -21,7 +18,7 @@ import { CustomToolProvider } from '@dexto/core';
|
|
|
21
18
|
* Services receive fully-validated config from this schema and use it as-is,
|
|
22
19
|
* with no additional defaults or fallbacks needed.
|
|
23
20
|
*/
|
|
24
|
-
declare const ProcessToolsConfigSchema: z.ZodObject<{
|
|
21
|
+
export declare const ProcessToolsConfigSchema: z.ZodObject<{
|
|
25
22
|
type: z.ZodLiteral<"process-tools">;
|
|
26
23
|
securityLevel: z.ZodDefault<z.ZodEnum<["strict", "moderate", "permissive"]>>;
|
|
27
24
|
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
@@ -31,9 +28,7 @@ declare const ProcessToolsConfigSchema: z.ZodObject<{
|
|
|
31
28
|
allowedCommands: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
32
29
|
blockedCommands: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
33
30
|
environment: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
34
|
-
timeout: z.ZodOptional<z.ZodNumber>;
|
|
35
31
|
}, "strict", z.ZodTypeAny, {
|
|
36
|
-
type: "process-tools";
|
|
37
32
|
securityLevel: "strict" | "moderate" | "permissive";
|
|
38
33
|
maxTimeout: number;
|
|
39
34
|
maxConcurrentProcesses: number;
|
|
@@ -41,11 +36,10 @@ declare const ProcessToolsConfigSchema: z.ZodObject<{
|
|
|
41
36
|
allowedCommands: string[];
|
|
42
37
|
blockedCommands: string[];
|
|
43
38
|
environment: Record<string, string>;
|
|
44
|
-
|
|
39
|
+
type: "process-tools";
|
|
45
40
|
workingDirectory?: string | undefined;
|
|
46
41
|
}, {
|
|
47
42
|
type: "process-tools";
|
|
48
|
-
timeout?: number | undefined;
|
|
49
43
|
securityLevel?: "strict" | "moderate" | "permissive" | undefined;
|
|
50
44
|
maxTimeout?: number | undefined;
|
|
51
45
|
maxConcurrentProcesses?: number | undefined;
|
|
@@ -55,18 +49,5 @@ declare const ProcessToolsConfigSchema: z.ZodObject<{
|
|
|
55
49
|
environment?: Record<string, string> | undefined;
|
|
56
50
|
workingDirectory?: string | undefined;
|
|
57
51
|
}>;
|
|
58
|
-
type ProcessToolsConfig = z.output<typeof ProcessToolsConfigSchema>;
|
|
59
|
-
|
|
60
|
-
* Process tools provider.
|
|
61
|
-
*
|
|
62
|
-
* Wraps ProcessService and provides process operation tools:
|
|
63
|
-
* - bash_exec: Execute bash commands (foreground or background)
|
|
64
|
-
* - bash_output: Retrieve output from background processes
|
|
65
|
-
* - kill_process: Terminate background processes
|
|
66
|
-
*
|
|
67
|
-
* When registered via customToolRegistry, ProcessService is automatically
|
|
68
|
-
* initialized and process operation tools become available to the agent.
|
|
69
|
-
*/
|
|
70
|
-
declare const processToolsProvider: CustomToolProvider<'process-tools', ProcessToolsConfig>;
|
|
71
|
-
|
|
72
|
-
export { processToolsProvider };
|
|
52
|
+
export type ProcessToolsConfig = z.output<typeof ProcessToolsConfigSchema>;
|
|
53
|
+
//# sourceMappingURL=tool-factory-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-factory-config.d.ts","sourceRoot":"","sources":["../src/tool-factory-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDxB,CAAC;AAEd,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { ProcessService } from "./process-service.js";
|
|
3
|
-
import { createBashExecTool } from "./bash-exec-tool.js";
|
|
4
|
-
import { createBashOutputTool } from "./bash-output-tool.js";
|
|
5
|
-
import { createKillProcessTool } from "./kill-process-tool.js";
|
|
6
2
|
const DEFAULT_SECURITY_LEVEL = "moderate";
|
|
7
3
|
const DEFAULT_MAX_TIMEOUT = 6e5;
|
|
8
4
|
const DEFAULT_MAX_CONCURRENT_PROCESSES = 5;
|
|
@@ -27,46 +23,8 @@ const ProcessToolsConfigSchema = z.object({
|
|
|
27
23
|
"Explicitly allowed commands (empty = all allowed with approval, strict mode only)"
|
|
28
24
|
),
|
|
29
25
|
blockedCommands: z.array(z.string()).default(DEFAULT_BLOCKED_COMMANDS).describe("Blocked command patterns (applies to all security levels)"),
|
|
30
|
-
environment: z.record(z.string()).default(DEFAULT_ENVIRONMENT).describe("Custom environment variables to set for command execution")
|
|
31
|
-
timeout: z.number().int().positive().max(DEFAULT_MAX_TIMEOUT).optional().describe(
|
|
32
|
-
`Default timeout in milliseconds (max: ${DEFAULT_MAX_TIMEOUT / 1e3 / 60} minutes)`
|
|
33
|
-
)
|
|
26
|
+
environment: z.record(z.string()).default(DEFAULT_ENVIRONMENT).describe("Custom environment variables to set for command execution")
|
|
34
27
|
}).strict();
|
|
35
|
-
const processToolsProvider = {
|
|
36
|
-
type: "process-tools",
|
|
37
|
-
configSchema: ProcessToolsConfigSchema,
|
|
38
|
-
create: (config, context) => {
|
|
39
|
-
const { logger } = context;
|
|
40
|
-
logger.debug("Creating ProcessService for process tools");
|
|
41
|
-
const processService = new ProcessService(
|
|
42
|
-
{
|
|
43
|
-
securityLevel: config.securityLevel,
|
|
44
|
-
maxTimeout: config.maxTimeout,
|
|
45
|
-
maxConcurrentProcesses: config.maxConcurrentProcesses,
|
|
46
|
-
maxOutputBuffer: config.maxOutputBuffer,
|
|
47
|
-
workingDirectory: config.workingDirectory || process.cwd(),
|
|
48
|
-
allowedCommands: config.allowedCommands,
|
|
49
|
-
blockedCommands: config.blockedCommands,
|
|
50
|
-
environment: config.environment
|
|
51
|
-
},
|
|
52
|
-
logger
|
|
53
|
-
);
|
|
54
|
-
processService.initialize().catch((error) => {
|
|
55
|
-
logger.error(`Failed to initialize ProcessService: ${error.message}`);
|
|
56
|
-
});
|
|
57
|
-
logger.debug("ProcessService created - initialization will complete on first tool use");
|
|
58
|
-
return [
|
|
59
|
-
createBashExecTool(processService),
|
|
60
|
-
createBashOutputTool(processService),
|
|
61
|
-
createKillProcessTool(processService)
|
|
62
|
-
];
|
|
63
|
-
},
|
|
64
|
-
metadata: {
|
|
65
|
-
displayName: "Process Tools",
|
|
66
|
-
description: "Process execution and management (bash, output, kill)",
|
|
67
|
-
category: "process"
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
28
|
export {
|
|
71
|
-
|
|
29
|
+
ProcessToolsConfigSchema
|
|
72
30
|
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var tool_factory_exports = {};
|
|
20
|
+
__export(tool_factory_exports, {
|
|
21
|
+
processToolsFactory: () => processToolsFactory
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(tool_factory_exports);
|
|
24
|
+
var import_process_service = require("./process-service.js");
|
|
25
|
+
var import_bash_exec_tool = require("./bash-exec-tool.js");
|
|
26
|
+
var import_bash_output_tool = require("./bash-output-tool.js");
|
|
27
|
+
var import_kill_process_tool = require("./kill-process-tool.js");
|
|
28
|
+
var import_tool_factory_config = require("./tool-factory-config.js");
|
|
29
|
+
const processToolsFactory = {
|
|
30
|
+
configSchema: import_tool_factory_config.ProcessToolsConfigSchema,
|
|
31
|
+
metadata: {
|
|
32
|
+
displayName: "Process Tools",
|
|
33
|
+
description: "Process execution and management (bash, output, kill)",
|
|
34
|
+
category: "process"
|
|
35
|
+
},
|
|
36
|
+
create: (config) => {
|
|
37
|
+
const processConfig = {
|
|
38
|
+
securityLevel: config.securityLevel,
|
|
39
|
+
maxTimeout: config.maxTimeout,
|
|
40
|
+
maxConcurrentProcesses: config.maxConcurrentProcesses,
|
|
41
|
+
maxOutputBuffer: config.maxOutputBuffer,
|
|
42
|
+
workingDirectory: config.workingDirectory ?? process.cwd(),
|
|
43
|
+
allowedCommands: config.allowedCommands,
|
|
44
|
+
blockedCommands: config.blockedCommands,
|
|
45
|
+
environment: config.environment
|
|
46
|
+
};
|
|
47
|
+
let processService;
|
|
48
|
+
const resolveWorkingDirectory = (context) => context.workspace?.path ?? processConfig.workingDirectory ?? process.cwd();
|
|
49
|
+
const applyWorkspace = (context, service) => {
|
|
50
|
+
const workingDirectory = resolveWorkingDirectory(context);
|
|
51
|
+
service.setWorkingDirectory(workingDirectory);
|
|
52
|
+
};
|
|
53
|
+
const resolveInjectedService = (context) => {
|
|
54
|
+
const candidate = context.services?.processService;
|
|
55
|
+
if (!candidate) return null;
|
|
56
|
+
if (candidate instanceof import_process_service.ProcessService) return candidate;
|
|
57
|
+
const hasMethods = typeof candidate.executeCommand === "function" && typeof candidate.killProcess === "function" && typeof candidate.setWorkingDirectory === "function" && typeof candidate.getConfig === "function";
|
|
58
|
+
return hasMethods ? candidate : null;
|
|
59
|
+
};
|
|
60
|
+
const getProcessService = async (context) => {
|
|
61
|
+
const injectedService = resolveInjectedService(context);
|
|
62
|
+
if (injectedService) {
|
|
63
|
+
applyWorkspace(context, injectedService);
|
|
64
|
+
return injectedService;
|
|
65
|
+
}
|
|
66
|
+
if (processService) {
|
|
67
|
+
applyWorkspace(context, processService);
|
|
68
|
+
return processService;
|
|
69
|
+
}
|
|
70
|
+
const logger = context.logger;
|
|
71
|
+
processService = new import_process_service.ProcessService(processConfig, logger);
|
|
72
|
+
applyWorkspace(context, processService);
|
|
73
|
+
processService.initialize().catch((error) => {
|
|
74
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
75
|
+
logger.error(`Failed to initialize ProcessService: ${message}`);
|
|
76
|
+
});
|
|
77
|
+
return processService;
|
|
78
|
+
};
|
|
79
|
+
return [
|
|
80
|
+
(0, import_bash_exec_tool.createBashExecTool)(getProcessService),
|
|
81
|
+
(0, import_bash_output_tool.createBashOutputTool)(getProcessService),
|
|
82
|
+
(0, import_kill_process_tool.createKillProcessTool)(getProcessService)
|
|
83
|
+
];
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
+
0 && (module.exports = {
|
|
88
|
+
processToolsFactory
|
|
89
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-factory.d.ts","sourceRoot":"","sources":["../src/tool-factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAMvD,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG7F,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,kBAAkB,CA0E/D,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ProcessService } from "./process-service.js";
|
|
2
|
+
import { createBashExecTool } from "./bash-exec-tool.js";
|
|
3
|
+
import { createBashOutputTool } from "./bash-output-tool.js";
|
|
4
|
+
import { createKillProcessTool } from "./kill-process-tool.js";
|
|
5
|
+
import { ProcessToolsConfigSchema } from "./tool-factory-config.js";
|
|
6
|
+
const processToolsFactory = {
|
|
7
|
+
configSchema: ProcessToolsConfigSchema,
|
|
8
|
+
metadata: {
|
|
9
|
+
displayName: "Process Tools",
|
|
10
|
+
description: "Process execution and management (bash, output, kill)",
|
|
11
|
+
category: "process"
|
|
12
|
+
},
|
|
13
|
+
create: (config) => {
|
|
14
|
+
const processConfig = {
|
|
15
|
+
securityLevel: config.securityLevel,
|
|
16
|
+
maxTimeout: config.maxTimeout,
|
|
17
|
+
maxConcurrentProcesses: config.maxConcurrentProcesses,
|
|
18
|
+
maxOutputBuffer: config.maxOutputBuffer,
|
|
19
|
+
workingDirectory: config.workingDirectory ?? process.cwd(),
|
|
20
|
+
allowedCommands: config.allowedCommands,
|
|
21
|
+
blockedCommands: config.blockedCommands,
|
|
22
|
+
environment: config.environment
|
|
23
|
+
};
|
|
24
|
+
let processService;
|
|
25
|
+
const resolveWorkingDirectory = (context) => context.workspace?.path ?? processConfig.workingDirectory ?? process.cwd();
|
|
26
|
+
const applyWorkspace = (context, service) => {
|
|
27
|
+
const workingDirectory = resolveWorkingDirectory(context);
|
|
28
|
+
service.setWorkingDirectory(workingDirectory);
|
|
29
|
+
};
|
|
30
|
+
const resolveInjectedService = (context) => {
|
|
31
|
+
const candidate = context.services?.processService;
|
|
32
|
+
if (!candidate) return null;
|
|
33
|
+
if (candidate instanceof ProcessService) return candidate;
|
|
34
|
+
const hasMethods = typeof candidate.executeCommand === "function" && typeof candidate.killProcess === "function" && typeof candidate.setWorkingDirectory === "function" && typeof candidate.getConfig === "function";
|
|
35
|
+
return hasMethods ? candidate : null;
|
|
36
|
+
};
|
|
37
|
+
const getProcessService = async (context) => {
|
|
38
|
+
const injectedService = resolveInjectedService(context);
|
|
39
|
+
if (injectedService) {
|
|
40
|
+
applyWorkspace(context, injectedService);
|
|
41
|
+
return injectedService;
|
|
42
|
+
}
|
|
43
|
+
if (processService) {
|
|
44
|
+
applyWorkspace(context, processService);
|
|
45
|
+
return processService;
|
|
46
|
+
}
|
|
47
|
+
const logger = context.logger;
|
|
48
|
+
processService = new ProcessService(processConfig, logger);
|
|
49
|
+
applyWorkspace(context, processService);
|
|
50
|
+
processService.initialize().catch((error) => {
|
|
51
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
52
|
+
logger.error(`Failed to initialize ProcessService: ${message}`);
|
|
53
|
+
});
|
|
54
|
+
return processService;
|
|
55
|
+
};
|
|
56
|
+
return [
|
|
57
|
+
createBashExecTool(getProcessService),
|
|
58
|
+
createBashOutputTool(getProcessService),
|
|
59
|
+
createKillProcessTool(getProcessService)
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
processToolsFactory
|
|
65
|
+
};
|
package/dist/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Process execution options
|
|
8
8
|
*/
|
|
9
|
-
interface ExecuteOptions {
|
|
9
|
+
export interface ExecuteOptions {
|
|
10
10
|
/** Working directory */
|
|
11
11
|
cwd?: string | undefined;
|
|
12
12
|
/** Timeout in milliseconds (max: 600000) */
|
|
@@ -24,7 +24,7 @@ interface ExecuteOptions {
|
|
|
24
24
|
* Process execution result (foreground execution only)
|
|
25
25
|
* For background execution, see ProcessHandle
|
|
26
26
|
*/
|
|
27
|
-
interface ProcessResult {
|
|
27
|
+
export interface ProcessResult {
|
|
28
28
|
stdout: string;
|
|
29
29
|
stderr: string;
|
|
30
30
|
exitCode: number;
|
|
@@ -33,7 +33,7 @@ interface ProcessResult {
|
|
|
33
33
|
/**
|
|
34
34
|
* Background process handle
|
|
35
35
|
*/
|
|
36
|
-
interface ProcessHandle {
|
|
36
|
+
export interface ProcessHandle {
|
|
37
37
|
processId: string;
|
|
38
38
|
command: string;
|
|
39
39
|
pid?: number | undefined;
|
|
@@ -43,7 +43,7 @@ interface ProcessHandle {
|
|
|
43
43
|
/**
|
|
44
44
|
* Process output (for retrieving from background processes)
|
|
45
45
|
*/
|
|
46
|
-
interface ProcessOutput {
|
|
46
|
+
export interface ProcessOutput {
|
|
47
47
|
stdout: string;
|
|
48
48
|
stderr: string;
|
|
49
49
|
status: 'running' | 'completed' | 'failed';
|
|
@@ -53,7 +53,7 @@ interface ProcessOutput {
|
|
|
53
53
|
/**
|
|
54
54
|
* Process information
|
|
55
55
|
*/
|
|
56
|
-
interface ProcessInfo {
|
|
56
|
+
export interface ProcessInfo {
|
|
57
57
|
processId: string;
|
|
58
58
|
command: string;
|
|
59
59
|
pid?: number | undefined;
|
|
@@ -66,7 +66,7 @@ interface ProcessInfo {
|
|
|
66
66
|
/**
|
|
67
67
|
* Command validation result
|
|
68
68
|
*/
|
|
69
|
-
interface CommandValidation {
|
|
69
|
+
export interface CommandValidation {
|
|
70
70
|
isValid: boolean;
|
|
71
71
|
error?: string;
|
|
72
72
|
normalizedCommand?: string;
|
|
@@ -75,7 +75,7 @@ interface CommandValidation {
|
|
|
75
75
|
/**
|
|
76
76
|
* Process service configuration
|
|
77
77
|
*/
|
|
78
|
-
interface ProcessConfig {
|
|
78
|
+
export interface ProcessConfig {
|
|
79
79
|
/** Security level for command execution */
|
|
80
80
|
securityLevel: 'strict' | 'moderate' | 'permissive';
|
|
81
81
|
/** Maximum timeout for commands in milliseconds */
|
|
@@ -96,7 +96,7 @@ interface ProcessConfig {
|
|
|
96
96
|
/**
|
|
97
97
|
* Output buffer management
|
|
98
98
|
*/
|
|
99
|
-
interface OutputBuffer {
|
|
99
|
+
export interface OutputBuffer {
|
|
100
100
|
stdout: string[];
|
|
101
101
|
stderr: string[];
|
|
102
102
|
complete: boolean;
|
|
@@ -104,5 +104,4 @@ interface OutputBuffer {
|
|
|
104
104
|
bytesUsed: number;
|
|
105
105
|
truncated?: boolean;
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
export type { CommandValidation, ExecuteOptions, OutputBuffer, ProcessConfig, ProcessHandle, ProcessInfo, ProcessOutput, ProcessResult };
|
|
107
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,wBAAwB;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,gCAAgC;IAChC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,4BAA4B;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACzC,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACzC;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3C,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,2CAA2C;IAC3C,aAAa,EAAE,QAAQ,GAAG,UAAU,GAAG,YAAY,CAAC;IACpD,mDAAmD;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,sBAAsB,EAAE,MAAM,CAAC;IAC/B,0CAA0C;IAC1C,eAAe,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,+BAA+B;IAC/B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexto/tools-process",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Process tools
|
|
3
|
+
"version": "1.6.1",
|
|
4
|
+
"description": "Process tools factory for Dexto agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"zod": "^3.25.0",
|
|
23
|
-
"@dexto/
|
|
23
|
+
"@dexto/agent-config": "1.6.1",
|
|
24
|
+
"@dexto/core": "1.6.1"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"tsup": "^8.0.0",
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"README.md"
|
|
32
33
|
],
|
|
33
34
|
"scripts": {
|
|
34
|
-
"build": "tsup",
|
|
35
|
+
"build": "tsup && node ../../scripts/clean-tsbuildinfo.mjs && tsc -b tsconfig.json --emitDeclarationOnly",
|
|
35
36
|
"typecheck": "tsc --noEmit",
|
|
36
37
|
"clean": "rm -rf dist"
|
|
37
38
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { InternalTool } from '@dexto/core';
|
|
2
|
-
import { ProcessService } from './process-service.cjs';
|
|
3
|
-
import './types.cjs';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Bash Execute Tool
|
|
7
|
-
*
|
|
8
|
-
* Internal tool for executing shell commands.
|
|
9
|
-
* Approval is handled at the ToolManager level with pattern-based approval.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Create the bash_exec internal tool
|
|
14
|
-
*/
|
|
15
|
-
declare function createBashExecTool(processService: ProcessService): InternalTool;
|
|
16
|
-
|
|
17
|
-
export { createBashExecTool };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { InternalTool } from '@dexto/core';
|
|
2
|
-
import { ProcessService } from './process-service.cjs';
|
|
3
|
-
import './types.cjs';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Bash Output Tool
|
|
7
|
-
*
|
|
8
|
-
* Internal tool for retrieving output from background processes
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Create the bash_output internal tool
|
|
13
|
-
*/
|
|
14
|
-
declare function createBashOutputTool(processService: ProcessService): InternalTool;
|
|
15
|
-
|
|
16
|
-
export { createBashOutputTool };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { ProcessConfig, CommandValidation } from './types.cjs';
|
|
2
|
-
import { IDextoLogger } from '@dexto/core';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Command Validator
|
|
6
|
-
*
|
|
7
|
-
* Security-focused command validation for process execution
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* CommandValidator - Validates commands for security and policy compliance
|
|
12
|
-
*
|
|
13
|
-
* Security checks:
|
|
14
|
-
* 1. Command length limits
|
|
15
|
-
* 2. Dangerous command patterns
|
|
16
|
-
* 3. Command injection detection
|
|
17
|
-
* 4. Allowed/blocked command lists
|
|
18
|
-
* 5. Shell metacharacter analysis
|
|
19
|
-
* TODO: Add tests for this class
|
|
20
|
-
*/
|
|
21
|
-
declare class CommandValidator {
|
|
22
|
-
private config;
|
|
23
|
-
private logger;
|
|
24
|
-
constructor(config: ProcessConfig, logger: IDextoLogger);
|
|
25
|
-
/**
|
|
26
|
-
* Validate a command for security and policy compliance
|
|
27
|
-
*/
|
|
28
|
-
validateCommand(command: string): CommandValidation;
|
|
29
|
-
/**
|
|
30
|
-
* Detect command injection attempts
|
|
31
|
-
*/
|
|
32
|
-
private detectInjection;
|
|
33
|
-
/**
|
|
34
|
-
* Determine if a command requires approval
|
|
35
|
-
* Handles compound commands (with &&, ||, ;) by checking each sub-command
|
|
36
|
-
*/
|
|
37
|
-
private determineApprovalRequirement;
|
|
38
|
-
/**
|
|
39
|
-
* Get list of blocked commands
|
|
40
|
-
*/
|
|
41
|
-
getBlockedCommands(): string[];
|
|
42
|
-
/**
|
|
43
|
-
* Get list of allowed commands
|
|
44
|
-
*/
|
|
45
|
-
getAllowedCommands(): string[];
|
|
46
|
-
/**
|
|
47
|
-
* Get security level
|
|
48
|
-
*/
|
|
49
|
-
getSecurityLevel(): string;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { CommandValidator };
|