diff --git a/plugin/index.js b/plugin/index.js index 39e3165..da7e3b0 100644 --- a/plugin/index.js +++ b/plugin/index.js @@ -3,7 +3,8 @@ * * Tools: dialectic_list_topics, dialectic_topic_detail, * dialectic_propose_topic, dialectic_signup, - * dialectic_post_argument, dialectic_view_verdict + * dialectic_post_argument, dialectic_submit_verdict, + * dialectic_view_verdict * * Loader gotchas (per [[reference-meridian-plugin-contract]]): * - openclaw.plugin.json MUST declare `activation.onStartup: true` diff --git a/plugin/src/tools.js b/plugin/src/tools.js index 8a0a9f3..cb07ffc 100644 --- a/plugin/src/tools.js +++ b/plugin/src/tools.js @@ -76,7 +76,12 @@ export function registerDialecticTools(api) { description: 'Create a new Dialectic debate topic. Provide the title, summary, the 4 lifecycle ' + 'timestamps (RFC3339, signup_open < signup_close <= debate_start < debate_end), and the ' + "verdict_schema_id ('binary' | 'claim-resolution' | 'policy-recommendation' | 'free-form'). " + - 'visibility defaults to private — flip to public via UI after creation if appropriate.', + 'visibility defaults to private — flip to public via UI after creation if appropriate. ' + + 'announce_guild_base_url + announce_channel_id (BOTH or NEITHER) pick a Fabric announce ' + + 'channel for backend-driven lifecycle broadcasts (signup_open / signup_closed / debating / ' + + 'completed / cancelled). Discover candidates via the Fabric channel-list tools — pick the ' + + "guild whose audience matches your topic's purpose and a channel of xType=announce. Omit " + + 'both → no broadcasts for this topic (agents must poll detail to track state).', parameters: { type: 'object', additionalProperties: false, @@ -89,6 +94,16 @@ export function registerDialecticTools(api) { signup_close_at: { type: 'string' }, debate_start_at: { type: 'string' }, debate_end_at: { type: 'string' }, + announce_guild_base_url: { + type: 'string', + description: "Fabric guild HTTP base URL for the broadcast target (e.g. https://fabric-api.hangman-lab.top). " + + "Required if announce_channel_id is set, must be omitted otherwise.", + }, + announce_channel_id: { + type: 'string', + description: "Fabric channel UUID of an xType=announce channel in the chosen guild. " + + "Required if announce_guild_base_url is set, must be omitted otherwise.", + }, }, required: [ 'title', 'summary', 'verdict_schema_id', @@ -108,6 +123,10 @@ export function registerDialecticTools(api) { }; if (params.visibility) body.visibility = params.visibility; + if (params.announce_guild_base_url) + body.announce_guild_base_url = params.announce_guild_base_url; + if (params.announce_channel_id) + body.announce_channel_id = params.announce_channel_id; return await client.post(`/api/topics`, body); }), })); diff --git a/plugin/src/tools.ts b/plugin/src/tools.ts index 9d82735..e1d1222 100644 --- a/plugin/src/tools.ts +++ b/plugin/src/tools.ts @@ -94,7 +94,12 @@ export function registerDialecticTools(api: ToolApi): void { 'Create a new Dialectic debate topic. Provide the title, summary, the 4 lifecycle ' + 'timestamps (RFC3339, signup_open < signup_close <= debate_start < debate_end), and the ' + "verdict_schema_id ('binary' | 'claim-resolution' | 'policy-recommendation' | 'free-form'). " + - 'visibility defaults to private — flip to public via UI after creation if appropriate.', + 'visibility defaults to private — flip to public via UI after creation if appropriate. ' + + 'announce_guild_base_url + announce_channel_id (BOTH or NEITHER) pick a Fabric announce ' + + 'channel for backend-driven lifecycle broadcasts (signup_open / signup_closed / debating / ' + + 'completed / cancelled). Discover candidates via the Fabric channel-list tools — pick the ' + + "guild whose audience matches your topic's purpose and a channel of xType=announce. Omit " + + 'both → no broadcasts for this topic (agents must poll detail to track state).', parameters: { type: 'object', additionalProperties: false, @@ -107,6 +112,18 @@ export function registerDialecticTools(api: ToolApi): void { signup_close_at: { type: 'string' }, debate_start_at: { type: 'string' }, debate_end_at: { type: 'string' }, + announce_guild_base_url: { + type: 'string', + description: + "Fabric guild HTTP base URL for the broadcast target (e.g. https://fabric-api.hangman-lab.top). " + + "Required if announce_channel_id is set, must be omitted otherwise.", + }, + announce_channel_id: { + type: 'string', + description: + "Fabric channel UUID of an xType=announce channel in the chosen guild. " + + "Required if announce_guild_base_url is set, must be omitted otherwise.", + }, }, required: [ 'title', 'summary', 'verdict_schema_id', @@ -126,6 +143,8 @@ export function registerDialecticTools(api: ToolApi): void { debate_end_at: params.debate_end_at, }; if (params.visibility) body.visibility = params.visibility; + if (params.announce_guild_base_url) body.announce_guild_base_url = params.announce_guild_base_url; + if (params.announce_channel_id) body.announce_channel_id = params.announce_channel_id; return await client.post(`/api/topics`, body); }), }));