@codebolt/codeboltjs 5.1.12 → 5.1.13
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.
|
@@ -13,6 +13,16 @@ export interface ThreadCreateBackgroundParams {
|
|
|
13
13
|
userMessage?: string;
|
|
14
14
|
selectedAgent?: any;
|
|
15
15
|
isGrouped?: boolean;
|
|
16
|
+
/** If true, creates a remote environment and starts the agent there. If false/undefined, runs locally. */
|
|
17
|
+
remoteEnv?: boolean;
|
|
18
|
+
/** The environment provider to use when remoteEnv is true. */
|
|
19
|
+
environmentProvider?: {
|
|
20
|
+
name: string;
|
|
21
|
+
unique_id?: string;
|
|
22
|
+
providerId?: string;
|
|
23
|
+
};
|
|
24
|
+
/** Optional custom name for the remote environment. */
|
|
25
|
+
environmentName?: string;
|
|
16
26
|
}
|
|
17
27
|
export declare class ThreadCreateBackgroundTool extends BaseDeclarativeTool<ThreadCreateBackgroundParams, ToolResult> {
|
|
18
28
|
static readonly Name: string;
|
|
@@ -25,6 +25,9 @@ class ThreadCreateBackgroundInvocation extends base_tool_1.BaseToolInvocation {
|
|
|
25
25
|
selectedAgent: { id: this.params.selectedAgent },
|
|
26
26
|
isGrouped: this.params.isGrouped,
|
|
27
27
|
groupId: this.params.groupId,
|
|
28
|
+
...(this.params.remoteEnv !== undefined && { remoteEnv: this.params.remoteEnv }),
|
|
29
|
+
...(this.params.environmentProvider && { environmentProvider: this.params.environmentProvider }),
|
|
30
|
+
...(this.params.environmentName && { environmentName: this.params.environmentName }),
|
|
28
31
|
};
|
|
29
32
|
const response = await thread_1.default.createThreadInBackground(optionsWithGroup);
|
|
30
33
|
if (response && !response.success && response.success !== undefined) {
|
|
@@ -98,6 +101,18 @@ class ThreadCreateBackgroundTool extends base_tool_1.BaseDeclarativeTool {
|
|
|
98
101
|
description: 'Whether the thread belongs to a group',
|
|
99
102
|
type: 'boolean',
|
|
100
103
|
},
|
|
104
|
+
remoteEnv: {
|
|
105
|
+
description: 'If true, creates a remote environment and starts the agent there. If false/undefined, runs locally.',
|
|
106
|
+
type: 'boolean',
|
|
107
|
+
},
|
|
108
|
+
environmentProvider: {
|
|
109
|
+
description: 'The environment provider to use when remoteEnv is true. Object with name, optional unique_id and providerId.',
|
|
110
|
+
type: 'object',
|
|
111
|
+
},
|
|
112
|
+
environmentName: {
|
|
113
|
+
description: 'Optional custom name for the remote environment.',
|
|
114
|
+
type: 'string',
|
|
115
|
+
},
|
|
101
116
|
},
|
|
102
117
|
required: ['task', 'selectedAgent'],
|
|
103
118
|
type: 'object',
|
|
@@ -7,6 +7,16 @@ import { BaseDeclarativeTool } from '../base-tool';
|
|
|
7
7
|
export interface ThreadCreateStartParams {
|
|
8
8
|
/** Thread creation and start options */
|
|
9
9
|
options: Record<string, any>;
|
|
10
|
+
/** If true, creates a remote environment and starts the agent there. If false/undefined, runs locally. */
|
|
11
|
+
remoteEnv?: boolean;
|
|
12
|
+
/** The environment provider to use when remoteEnv is true. */
|
|
13
|
+
environmentProvider?: {
|
|
14
|
+
name: string;
|
|
15
|
+
unique_id?: string;
|
|
16
|
+
providerId?: string;
|
|
17
|
+
};
|
|
18
|
+
/** Optional custom name for the remote environment. */
|
|
19
|
+
environmentName?: string;
|
|
10
20
|
}
|
|
11
21
|
export declare class ThreadCreateStartTool extends BaseDeclarativeTool<ThreadCreateStartParams, ToolResult> {
|
|
12
22
|
static readonly Name: string;
|
|
@@ -18,7 +18,13 @@ class ThreadCreateStartInvocation extends base_tool_1.BaseToolInvocation {
|
|
|
18
18
|
async execute() {
|
|
19
19
|
var _a;
|
|
20
20
|
try {
|
|
21
|
-
const
|
|
21
|
+
const options = {
|
|
22
|
+
...this.params.options,
|
|
23
|
+
...(this.params.remoteEnv !== undefined && { remoteEnv: this.params.remoteEnv }),
|
|
24
|
+
...(this.params.environmentProvider && { environmentProvider: this.params.environmentProvider }),
|
|
25
|
+
...(this.params.environmentName && { environmentName: this.params.environmentName }),
|
|
26
|
+
};
|
|
27
|
+
const response = await thread_1.default.createAndStartThread(options);
|
|
22
28
|
if (response && !response.success && response.success !== undefined) {
|
|
23
29
|
const errorMsg = typeof response.error === 'string'
|
|
24
30
|
? response.error
|
|
@@ -66,6 +72,18 @@ class ThreadCreateStartTool extends base_tool_1.BaseDeclarativeTool {
|
|
|
66
72
|
description: 'Thread creation and start options object containing thread parameters.',
|
|
67
73
|
type: 'object',
|
|
68
74
|
},
|
|
75
|
+
remoteEnv: {
|
|
76
|
+
description: 'If true, creates a remote environment and starts the agent there. If false/undefined, runs locally.',
|
|
77
|
+
type: 'boolean',
|
|
78
|
+
},
|
|
79
|
+
environmentProvider: {
|
|
80
|
+
description: 'The environment provider to use when remoteEnv is true. Object with name, optional unique_id and providerId.',
|
|
81
|
+
type: 'object',
|
|
82
|
+
},
|
|
83
|
+
environmentName: {
|
|
84
|
+
description: 'Optional custom name for the remote environment.',
|
|
85
|
+
type: 'string',
|
|
86
|
+
},
|
|
69
87
|
},
|
|
70
88
|
required: ['options'],
|
|
71
89
|
type: 'object',
|