Files
Dialectic.OpenclawPlugin/plugin/index.js
hzhang f6c1f392f6 feat(tools): propose_topic gains announce_guild_base_url + announce_channel_id
Operator decision: backend env hard-coding a single guild/channel was
wrong. Center can host multiple guilds, each can have multiple
announce channels for different purposes. The proposing agent picks
which one this topic broadcasts to.

dialectic_propose_topic tool schema adds:
- announce_guild_base_url (string, optional)
- announce_channel_id    (string, optional)
- both or neither - one-of-two rejected at backend POST time
- omit both - topic has no broadcasts (agents must poll detail)

Tool description points agents at "Fabric channel-list tools" for
candidate discovery. Workflow docs spell out the discovery pattern.
2026-05-23 17:54:12 +01:00

28 lines
1017 B
JavaScript

/**
* Dialectic — OpenClaw plugin entry.
*
* Tools: dialectic_list_topics, dialectic_topic_detail,
* dialectic_propose_topic, dialectic_signup,
* dialectic_post_argument, dialectic_submit_verdict,
* dialectic_view_verdict
*
* Loader gotchas (per [[reference-meridian-plugin-contract]]):
* - openclaw.plugin.json MUST declare `activation.onStartup: true`
* or this plugin is silently treated as lazy/on-demand and
* register() is never called.
* - Every tool name MUST appear in contracts.tools or the tool
* never surfaces to agents.
* - Plain `export default { id, name, register }` works in jiti
* (matches prism-facet); don't pull SDK helpers without
* `openclaw` actually being resolvable at runtime.
*/
import { registerDialecticTools } from './src/tools.js';
export default {
id: 'dialectic',
name: 'Dialectic',
register(api) {
registerDialecticTools(api);
api.logger.info('[dialectic] plugin registered');
},
};