@@ -42,7 +42,7 @@ const returnSchema = z.union([
4242 error : z . string ( ) . optional ( ) ,
4343 } )
4444 . describe (
45- "Synchronous execution results when command completes within timeout" ,
45+ "Synchronous execution results when command completes within timeout"
4646 ) ,
4747 z
4848 . object ( {
@@ -58,6 +58,8 @@ const returnSchema = z.union([
5858type Parameters = z . infer < typeof parameterSchema > ;
5959type ReturnType = z . infer < typeof returnSchema > ;
6060
61+ const DEFAULT_TIMEOUT = 100 ;
62+
6163export const shellStartTool : Tool < Parameters , ReturnType > = {
6264 name : "shellStart" ,
6365 description :
@@ -66,8 +68,8 @@ export const shellStartTool: Tool<Parameters, ReturnType> = {
6668 returns : zodToJsonSchema ( returnSchema ) ,
6769
6870 execute : async (
69- { command, timeout = 100 } ,
70- { logger } ,
71+ { command, timeout = DEFAULT_TIMEOUT } ,
72+ { logger }
7173 ) : Promise < ReturnType > => {
7274 logger . verbose ( `Starting shell command: ${ command } ` ) ;
7375
@@ -122,7 +124,7 @@ export const shellStartTool: Tool<Parameters, ReturnType> = {
122124
123125 process . on ( "exit" , ( code , signal ) => {
124126 logger . verbose (
125- `[${ instanceId } ] Process exited with code ${ code } and signal ${ signal } ` ,
127+ `[${ instanceId } ] Process exited with code ${ code } and signal ${ signal } `
126128 ) ;
127129
128130 processState . state . completed = true ;
@@ -170,9 +172,12 @@ export const shellStartTool: Tool<Parameters, ReturnType> = {
170172 } ) ;
171173 } ,
172174
173- logParameters : ( input , { logger } ) => {
175+ logParameters : (
176+ { command, description, timeout = DEFAULT_TIMEOUT } ,
177+ { logger }
178+ ) => {
174179 logger . info (
175- `Starting "${ input . command } ", ${ input . description } (timeout: ${ input . timeout } ms)` ,
180+ `Starting "${ command } ", ${ description } (timeout: ${ timeout } ms)`
176181 ) ;
177182 } ,
178183 logReturns : ( output , { logger } ) => {
0 commit comments