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
`If provided, this shell command is aggregated as in
78
76
\`src/packages/backend/aggregate.js\`. This parameter allows one to specify
79
77
multiple callbacks to be executed against the output of the same command
80
78
(given identical arguments) within a 60-second window.`,
81
-
),
82
-
err_on_exit: z
83
-
.boolean()
84
-
.optional()
85
-
.describe(
86
-
`When \`true\` (the default),
79
+
),
80
+
err_on_exit: z
81
+
.boolean()
82
+
.optional()
83
+
.describe(
84
+
`When \`true\` (the default),
87
85
this call will throw an error whenever the provided shell command
88
86
exits with a non-zero exit code.`,
89
-
),
90
-
env: z
91
-
.record(z.string(),z.string())
92
-
.optional()
93
-
.describe(
94
-
"Environment variables to be passed to the shell command upon execution.",
95
-
),
96
-
async_call: z.boolean().optional()
97
-
.describe(`If \`true\`, the execution happens asynchronously.
87
+
),
88
+
env: z
89
+
.record(z.string(),z.string())
90
+
.optional()
91
+
.describe(
92
+
"Environment variables to be passed to the shell command upon execution.",
93
+
),
94
+
async_call: z.boolean().optional()
95
+
.describe(`If \`true\`, the execution happens asynchronously.
98
96
The API call does not block and returns an ID (\`job_id\`).
97
+
99
98
Later, use that ID in a call to \`async_get\` to get status updates, partial output, and eventually the final result.
99
+
In such a call, you also have to set the \`project_id\`, because the results are cached in the project.
100
+
101
+
Additionally and if not specified, \`max_output\` is set to 1MB and and \`timeout\` to 10 minutes.
100
102
101
-
This does not support executing code on compute servers – only inside the project itself.
103
+
NOTE: This does not support executing code on compute servers – only inside the project itself.
102
104
103
-
Additionally and if not specified, \`max_output\` is set to 1MB and and \`timeout\` to 10 minutes.`),
104
-
}),
105
+
HINT: set \`err_on_exit=false\`, to recieve the real \`exit_code\` of the executed command and status ends with "completed", unless there is a fundamental problem running the command.
106
+
`),
107
+
}),
108
+
);
105
109
106
-
z.object({
107
-
project_id: ProjectIdSchema,
108
-
async_get: z.string().optional()
109
-
.describe(`For a given \`job_id\`, returned when setting \`async_call=true\`,
110
+
constExecInputSchemaAsync=ExecInputCommon.merge(
111
+
z.object({
112
+
project_id: ProjectIdSchema,
113
+
async_get: z.string().optional()
114
+
.describe(`For a given \`job_id\`, which has been returned when setting \`async_call=true\`,
110
115
retrieve the corresponding status or the result.
116
+
117
+
The returned object contains the current \`stdout\` and \`stderr\` output,
118
+
as well as a status field indicating if the job is still running or has completed.
0 commit comments