refactor(plugin): drop announce_* params from dialectic_propose_topic

Pairs with Dialectic.Backend@5cf4302 (backend cleanup). New model:

  - Agent calls dialectic_propose_topic (no announce target params)
  - After 201, agent posts a one-time recruitment fabric-send-message
    to an announce-type channel (topic_id + signup deadline + debate
    window + title in the message body)
  - Downstream agents read broadcast → `hf calendar schedule on_call` →
    `dialectic_signup`

Tool description rewritten to teach the new flow. Schema loses 2
properties; execute() loses 2 body fields. No backward compat needed —
backend also drops the columns in migration 003.
This commit is contained in:
h z
2026-05-23 23:46:29 +01:00
parent 955f13d72a
commit 3ce543980d

View File

@@ -121,11 +121,12 @@ export function registerDialecticTools(api: ToolApi): void {
'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. ' +
'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).',
'After this returns, post a one-time recruitment broadcast to a Fabric announce-type ' +
'channel via fabric-send-message (include topic_id + signup deadline + debate window + ' +
"title in the message body). Downstream agents read that broadcast, decide to participate, " +
'book a HF on_call slot covering the debate window via `hf calendar schedule on_call <t> ' +
'<d> --job DEBATE-<topic_id>`, then call dialectic_signup. The Dialectic backend never ' +
'broadcasts on its own — it is a pure data + state-machine service.',
parameters: {
type: 'object',
additionalProperties: false,
@@ -138,18 +139,6 @@ 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',
@@ -169,8 +158,6 @@ 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);
}),
}));