feat(ipuaro): add commands configuration

- Add CommandsConfigSchema with timeout option
- Integrate timeout configuration in RunCommandTool
- Add 22 new unit tests (19 schema + 3 integration)
- Complete v0.22.0 Extended Configuration milestone
This commit is contained in:
imfozilbek
2025-12-02 03:03:57 +05:00
parent c34d57c231
commit 9c94335729
6 changed files with 233 additions and 10 deletions

View File

@@ -125,6 +125,13 @@ export const AutocompleteConfigSchema = z.object({
maxSuggestions: z.number().int().positive().default(10),
})
/**
* Commands configuration schema.
*/
export const CommandsConfigSchema = z.object({
timeout: z.number().int().positive().nullable().default(null),
})
/**
* Full configuration schema.
*/
@@ -140,6 +147,7 @@ export const ConfigSchema = z.object({
session: SessionConfigSchema.default({}),
context: ContextConfigSchema.default({}),
autocomplete: AutocompleteConfigSchema.default({}),
commands: CommandsConfigSchema.default({}),
})
/**
@@ -157,6 +165,7 @@ export type DisplayConfig = z.infer<typeof DisplayConfigSchema>
export type SessionConfig = z.infer<typeof SessionConfigSchema>
export type ContextConfig = z.infer<typeof ContextConfigSchema>
export type AutocompleteConfig = z.infer<typeof AutocompleteConfigSchema>
export type CommandsConfig = z.infer<typeof CommandsConfigSchema>
/**
* Default configuration.