8f1da70d79
- Added task.simple to settings and schema with default, schema-free, and independent modes. - Added mode-aware task schema and validation to enforce context/schema rules per simple mode. - Updated prompts and template rendering to tailor headers and guidance for each simple mode. - Added simple-mode capabilities and updated TaskTool execution for mode-aware context behavior. - Added tests for independent rendering and mode-specific rejection of invalid context or schema inputs.
28 lines
712 B
TypeScript
28 lines
712 B
TypeScript
export const TASK_SIMPLE_MODES = ["default", "schema-free", "independent"] as const;
|
|
|
|
export type TaskSimpleMode = (typeof TASK_SIMPLE_MODES)[number];
|
|
|
|
interface TaskSimpleModeCapabilities {
|
|
contextEnabled: boolean;
|
|
customSchemaEnabled: boolean;
|
|
}
|
|
|
|
const TASK_SIMPLE_MODE_CAPABILITIES: Record<TaskSimpleMode, TaskSimpleModeCapabilities> = {
|
|
default: {
|
|
contextEnabled: true,
|
|
customSchemaEnabled: true,
|
|
},
|
|
"schema-free": {
|
|
contextEnabled: true,
|
|
customSchemaEnabled: false,
|
|
},
|
|
independent: {
|
|
contextEnabled: false,
|
|
customSchemaEnabled: false,
|
|
},
|
|
};
|
|
|
|
export function getTaskSimpleModeCapabilities(mode: TaskSimpleMode): TaskSimpleModeCapabilities {
|
|
return TASK_SIMPLE_MODE_CAPABILITIES[mode];
|
|
}
|