a2187628ce
- Delete document-writer.ts agent file - Remove from types, schema, utils, index exports - Remove tool restrictions entry - Remove migration mappings - Update atlas.ts to use category="writing" instead of agent="document-writer" - Update init-deep command template - Update all documentation (AGENTS.md, README.*, docs/) - Regenerate schema.json document-writer functionality is now handled via delegate_task with category="writing" which uses the writing category's model config.
45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
/**
|
|
* Agent tool restrictions for session.prompt calls.
|
|
* OpenCode SDK's session.prompt `tools` parameter expects boolean values.
|
|
* true = tool allowed, false = tool denied.
|
|
*/
|
|
|
|
const EXPLORATION_AGENT_DENYLIST: Record<string, boolean> = {
|
|
write: false,
|
|
edit: false,
|
|
task: false,
|
|
delegate_task: false,
|
|
call_omo_agent: false,
|
|
}
|
|
|
|
const AGENT_RESTRICTIONS: Record<string, Record<string, boolean>> = {
|
|
explore: EXPLORATION_AGENT_DENYLIST,
|
|
|
|
librarian: EXPLORATION_AGENT_DENYLIST,
|
|
|
|
oracle: {
|
|
write: false,
|
|
edit: false,
|
|
task: false,
|
|
delegate_task: false,
|
|
},
|
|
|
|
"multimodal-looker": {
|
|
read: true,
|
|
},
|
|
|
|
"Sisyphus-Junior": {
|
|
task: false,
|
|
delegate_task: false,
|
|
},
|
|
}
|
|
|
|
export function getAgentToolRestrictions(agentName: string): Record<string, boolean> {
|
|
return AGENT_RESTRICTIONS[agentName] ?? {}
|
|
}
|
|
|
|
export function hasAgentToolRestrictions(agentName: string): boolean {
|
|
const restrictions = AGENT_RESTRICTIONS[agentName]
|
|
return restrictions !== undefined && Object.keys(restrictions).length > 0
|
|
}
|