You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bc3e2f9
Browse filesBrowse the repository at this point in the historyBrowse files
mode: z.literal(CodeToolMode.Sync).describe('Run synchronously and return the final output in this tool call'),
35
-
timeout: z.number().optional().default(60000).describe('Timeout in milliseconds, default 60000 (60 s)'),
36
-
}),
37
-
base.extend({
38
-
mode: z.literal(CodeToolMode.Background).describe('Run in the background and use read_process for later output'),
39
-
yieldMs: z.number().optional().default(1000).describe('How long to wait for immediate completion before returning a processId, default 1000 ms'),
40
-
interactive: z.boolean().optional().default(false).describe('Keep stdin open so write_process can send more input later. Use only for programs that prompt for stdin; this is pipe-based, not a full TTY.'),
41
-
}),
42
-
]);
32
+
returnbase.extend({
33
+
mode: z.enum(CodeToolMode).describe('sync = run synchronously and return final output; background = start a process and use read_process for later output'),
34
+
timeout: z.number().optional().describe('For mode=sync: timeout in milliseconds, default 60000 (60 s)'),
35
+
yieldMs: z.number().optional().describe('For mode=background: how long to wait for immediate completion before returning a processId, default 1000 ms'),
36
+
interactive: z.boolean().optional().describe('For mode=background: keep stdin open so write_process can send more input later. Use only for programs that prompt for stdin; this is pipe-based, not a full TTY.'),
processId: z.number().int().positive().describe('The numeric processId returned by shell/script mode="background"'),
62
-
yieldMs: z.number().optional().default(1000).describe('How long to wait for new output, default 1000 ms'),
57
+
yieldMs: z.number().optional().describe('How long to wait for new output, default 1000 ms'),
63
58
});
64
59
65
60
exportconstwriteProcessToolSchema=z.object({
66
61
processId: z.number().int().positive().describe('The numeric processId returned by shell/script mode="background" with interactive=true'),
67
62
stdin: z.any().optional().describe('Data to write to the background process stdin. Prefer a string and include a trailing newline for line prompts; objects/arrays are auto-serialized to JSON.'),
68
-
close: z.boolean().optional().default(false).describe('Whether to close stdin after writing. Use true when the process needs EOF to continue or finish.'),
63
+
close: z.boolean().optional().describe('Whether to close stdin after writing. Use true when the process needs EOF to continue or finish.'),
0 commit comments