| 1 | export const inject=['tools','commands','prompt','skills','agentPresets']; |
| 2 | export function apply(ctx,config){ |
| 3 | const id=ctx.agentPresets.composedPreset(); |
| 4 | const value=config.text+':'+id; |
| 5 | ctx.tools.register({name:'preset_echo',description:'Selected preset echo',parameters:{type:'object',properties:{}},execute:()=>value}); |
| 6 | ctx.commands.register({name:'preset-echo',description:'Selected preset echo',handler:()=>value}); |
| 7 | ctx.prompt.registerSection({id:'selected',text:value}); |
| 8 | ctx.skills.registerRoot({path:'source/skills/'+id}); |
| 9 | ctx.on('tools/pre-execute',()=>({kind:'annotate',text:value})); |
| 10 | } |
| 11 |