| 13 | } |
| 14 | |
| 15 | export function parameterSchema() { |
| 16 | return Schema.Struct({ |
| 17 | command: Schema.String.annotate({ description: "The command to execute" }), |
| 18 | timeout: Schema.optional(PositiveInt).annotate({ description: "Optional timeout in milliseconds" }), |
| 19 | workdir: Schema.optional(Schema.String).annotate({ |
| 20 | description: `The working directory to run the command in. Defaults to the current directory. Use this instead of 'cd' commands.`, |
| 21 | }), |
| 22 | }) |
| 23 | } |
| 24 | |
| 25 | export const Parameters = parameterSchema() |
| 26 | export type Parameters = Schema.Schema.Type<typeof Parameters> |