Files
Dirigent/plugin
zhi 0729e83b38 feat: split dirigent_tools into individual tools + human @mention override
Feature 1: Split dirigent_tools
- Replace monolithic dirigent_tools (9 actions) with 9 individual tools
- Discord: dirigent_channel_create, dirigent_channel_update, dirigent_member_list
- Policy: dirigent_policy_get, dirigent_policy_set, dirigent_policy_delete
- Turn: dirigent_turn_status, dirigent_turn_advance, dirigent_turn_reset
- Extract shared executeDiscordAction() helper

Feature 2: Human @mention override
- When humanList user @mentions agents, temporarily override turn order
- Only mentioned agents cycle, ordered by their turn order position
- Original order restores when cycle returns to first agent or all NO_REPLY
- New: setMentionOverride(), hasMentionOverride(), extractMentionedUserIds()
- New: buildUserIdToAccountIdMap() for reverse userId→accountId resolution

Bump version to 0.3.0
2026-03-07 16:55:01 +00:00
..

Dirigent Plugin

Hook strategy

  • message:received caches a per-session decision from deterministic rules.
  • before_model_resolve applies providerOverride + modelOverride when decision says no-reply.
  • before_prompt_build prepends end-marker instruction + scheduling identifier instruction when decision allows speaking.

Rules (in order)

  1. non-discord -> skip
  2. bypass sender -> skip
  3. end symbol matched -> skip
  4. else -> no-reply override

Config

See docs/CONFIG.example.json.

Required:

  • noReplyProvider
  • noReplyModel

Optional:

  • enabled (default true)
  • discordOnly (default true)
  • listMode (human-list | agent-list, default human-list)
  • humanList (default [])
  • agentList (default [])
  • channelPoliciesFile (per-channel overrides in a standalone JSON file)
  • schedulingIdentifier (default ➡️) — moderator handoff identifier
  • enableDirigentPolicyTool (default true)

Unified optional tool:

  • dirigent_tools
    • Discord actions: channel-private-create, channel-private-update, member-list
    • Policy actions: policy-get, policy-set-channel, policy-delete-channel
    • Turn actions: turn-status, turn-advance, turn-reset
  • bypassUserIds (deprecated alias of humanList)
  • endSymbols (default ["🔚"])
  • enableDiscordControlTool (default true)
  • discordControlApiBaseUrl (default http://127.0.0.1:8790)
  • discordControlApiToken
  • discordControlCallerId
  • enableDebugLogs (default false)
  • debugLogChannelIds (default [], empty = all channels when debug enabled)

Per-channel policy file example: docs/channel-policies.example.json.

Policy file behavior:

  • loaded once on startup into memory
  • runtime decisions read memory state only
  • direct file edits do NOT affect memory state
  • dirigent_tools policy actions update memory first, then persist to file (atomic write)

Moderator handoff format

When the current speaker NO_REPLYs, the moderator bot sends: <@NEXT_USER_ID>➡️

This is a non-semantic scheduling message. The scheduling identifier (➡️ by default) carries no meaning — it simply signals the next agent to check chat history and decide whether to speak.

Slash command (Discord)

/dirigent status
/dirigent turn-status
/dirigent turn-advance
/dirigent turn-reset

Debug logging:

  • set enableDebugLogs: true to emit detailed hook diagnostics
  • optionally set debugLogChannelIds to only log selected channel IDs