Files
clawpal/src-tauri/recipes.json
zhixian 1a97705f2b feat: add dependsOn for conditional params, boolean checkbox support
Add "Create independent agent" checkbox that toggles visibility of
name/emoji/persona fields. Params with dependsOn are hidden when the
referenced boolean is unchecked, and their steps are auto-skipped.
Template substitution now converts "true"/"false" to native booleans.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 23:23:10 +09:00

44 lines
2.7 KiB
JSON

{
"recipes": [
{
"id": "dedicated-channel-agent",
"name": "Create dedicated Agent for Channel",
"description": "Create an agent, optionally independent with its own identity and persona, and bind it to a Discord channel",
"version": "1.0.0",
"tags": ["discord", "agent", "persona"],
"difficulty": "easy",
"params": [
{ "id": "agent_id", "label": "Agent ID", "type": "string", "required": true, "placeholder": "e.g. my-bot" },
{ "id": "guild_id", "label": "Guild", "type": "discord_guild", "required": true },
{ "id": "channel_id", "label": "Channel", "type": "discord_channel", "required": true },
{ "id": "independent", "label": "Create independent agent", "type": "boolean", "required": false },
{ "id": "name", "label": "Display Name", "type": "string", "required": false, "placeholder": "e.g. MyBot", "dependsOn": "independent" },
{ "id": "emoji", "label": "Emoji", "type": "string", "required": false, "placeholder": "e.g. \ud83e\udd16", "dependsOn": "independent" },
{ "id": "persona", "label": "Persona", "type": "textarea", "required": false, "placeholder": "You are...", "dependsOn": "independent" }
],
"steps": [
{ "action": "create_agent", "label": "Create agent", "args": { "agentId": "{{agent_id}}", "independent": "{{independent}}" } },
{ "action": "setup_identity", "label": "Set agent identity", "args": { "agentId": "{{agent_id}}", "name": "{{name}}", "emoji": "{{emoji}}" } },
{ "action": "bind_channel", "label": "Bind channel to agent", "args": { "channelType": "discord", "peerId": "{{channel_id}}", "agentId": "{{agent_id}}" } },
{ "action": "config_patch", "label": "Set channel persona", "args": { "patchTemplate": "{\"channels\":{\"discord\":{\"guilds\":{\"{{guild_id}}\":{\"channels\":{\"{{channel_id}}\":{\"systemPrompt\":\"{{persona}}\"}}}}}}}" } }
]
},
{
"id": "discord-channel-persona",
"name": "Channel Persona",
"description": "Set a custom persona for a Discord channel",
"version": "1.0.0",
"tags": ["discord", "persona", "beginner"],
"difficulty": "easy",
"params": [
{ "id": "guild_id", "label": "Guild", "type": "discord_guild", "required": true },
{ "id": "channel_id", "label": "Channel", "type": "discord_channel", "required": true },
{ "id": "persona", "label": "Persona", "type": "textarea", "required": true, "placeholder": "You are..." }
],
"steps": [
{ "action": "config_patch", "label": "Set channel persona", "args": { "patchTemplate": "{\"channels\":{\"discord\":{\"guilds\":{\"{{guild_id}}\":{\"channels\":{\"{{channel_id}}\":{\"systemPrompt\":\"{{persona}}\"}}}}}}}" } }
]
}
]
}