Skip to content

Commit d4ec549

Browse files
committed
tool results are strings in handleSteps. Make terminal params optional
1 parent 31862b4 commit d4ec549

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

common/src/tools/params/tool/run-terminal-command.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const runTerminalCommandParams = {
1717
process_type: z
1818
.enum(['SYNC', 'BACKGROUND'])
1919
.default('SYNC')
20+
.optional()
2021
.describe(
2122
`Either SYNC (waits, returns output) or BACKGROUND (runs in background). Default SYNC`,
2223
),
@@ -29,6 +30,7 @@ export const runTerminalCommandParams = {
2930
timeout_seconds: z
3031
.number()
3132
.default(30)
33+
.optional()
3234
.describe(
3335
`Set to -1 for no timeout. Does not apply for BACKGROUND commands. Default 30`,
3436
),

common/src/util/types/agent-config.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export interface AgentConfig {
148148
) => Generator<
149149
ToolCall | 'STEP' | 'STEP_ALL',
150150
void,
151-
{ agentState: AgentState; toolResult: ToolResult | undefined }
151+
{ agentState: AgentState; toolResult: string | undefined }
152152
>
153153
}
154154

common/src/util/types/tools.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ export interface RunTerminalCommandParams {
157157
/** CLI command valid for user's OS. */
158158
command: string
159159
/** Either SYNC (waits, returns output) or BACKGROUND (runs in background). Default SYNC */
160-
process_type: 'SYNC' | 'BACKGROUND'
160+
process_type?: 'SYNC' | 'BACKGROUND'
161161
/** The working directory to run the command in. Default is the project root. */
162162
cwd?: string
163163
/** Set to -1 for no timeout. Does not apply for BACKGROUND commands. Default 30 */
164-
timeout_seconds: number
164+
timeout_seconds?: number
165165
}
166166

167167
/**

0 commit comments

Comments
 (0)