Commit Graph

176 Commits

Author SHA1 Message Date
zhi
0f38e34bec test: cover discussion tool registration flows 2026-04-02 06:48:29 +00:00
zhi
b11c15d8c8 test: stabilize channel mode and discussion coverage 2026-04-02 06:18:16 +00:00
zhi
4e0a24333e Complete CSM and channel modes implementation
- Add comprehensive tests for shuffle mode functionality
- Add comprehensive tests for multi-message mode functionality
- Add compatibility tests between different channel modes
- Update documentation to reflect completed implementation
- Mark all completed tasks as finished in TASKLIST.md
- Update CHANNEL_MODES_AND_SHUFFLE.md with implementation status and acceptance criteria
2026-04-02 06:08:48 +00:00
zhi
b40838f259 Refine discussion closure messaging 2026-04-02 05:48:00 +00:00
zhi
16daab666b Complete remaining CSM and channel modes tasks
- Confirmed CSM MVP scope and requirements
- Finalized discussion idle reminder and closed channel templates
- Updated all remaining task statuses as completed
- Verified all functionality through tests
2026-04-02 05:33:14 +00:00
zhi
b7b405f416 test: cover discussion callback flows 2026-04-02 05:18:04 +00:00
zhi
7670d41785 Complete A6 and A7 tasks: Implement closed discussion channel protections and update tasklist
- Complete tasks A6.1, A6.2, A6.3: Turn manager discussion mode handling
- Complete tasks A7.1, A7.2, A7.3, A7.5: Hook-level discussion channel protections
- Add closed discussion channel check to message-sent hook to prevent handoffs
- Update TASKLIST.md to mark completed tasks with [x]
2026-04-02 05:04:47 +00:00
zhi
d44204fabf feat: wire channel mode runtime config and docs 2026-04-02 04:48:20 +00:00
zhi
8073c33f2c docs: update TASKLIST.md with completed multi-message and shuffle mode tasks 2026-04-02 04:37:35 +00:00
zhi
bfbe40b3c6 feat: implement multi-message mode and shuffle mode features
- Add multi-message mode with start/end/prompt markers
- Implement turn order shuffling with /turn-shuffling command
- Add channel mode state management
- Update hooks to handle multi-message mode behavior
- Update plugin config with new markers
- Update TASKLIST.md with completed tasks
2026-04-02 04:36:36 +00:00
zhi
684f8f9ee7 Refine discussion moderator messaging flow 2026-04-02 04:18:45 +00:00
zhi
d9bb5c2e21 Fix discussion channel closure handling 2026-04-02 03:49:03 +00:00
zhi
2c870ea2c5 chore(csm): remove cron helper script 2026-04-02 02:56:20 +00:00
zhi
b9933d899a chore(csm): use claimed-task state machine 2026-04-02 02:49:23 +00:00
zhi
62cd2f20cf feat(csm): bootstrap discussion callback flow 2026-04-02 02:35:08 +00:00
h z
9fa71f37bf Merge pull request 'Use api.pluginConfig directly for Dirigent runtime config' (#20) from fix/use-pluginconfig-runtime-config into main
Reviewed-on: #20
2026-04-01 20:32:39 +00:00
81687e548a Preserve existing Dirigent config during install 2026-04-01 20:17:00 +00:00
0a99abc7e3 Use pluginConfig directly for Dirigent runtime config 2026-04-01 20:01:57 +00:00
nav
0a76dae376 docs: reorganize planning and archive files 2026-03-31 12:46:09 +00:00
nav
dbd0fc68c0 docs: add channel modes plan and expand tasklist 2026-03-31 09:16:59 +00:00
nav
4dde4f6efe docs: align CSM terminology with code 2026-03-30 18:24:24 +00:00
nav
3b5ca21f40 docs: add CSM discussion callback design 2026-03-30 18:14:58 +00:00
c2fe859ea5 Merge pull request 'fix/gateway-keywords-no-empty' (#19) from fix/gateway-keywords-no-empty into main
Reviewed-on: #19
2026-03-10 13:56:45 +00:00
nav
4905f37c1a fix: limit no-reply keywords and log 2026-03-10 13:53:32 +00:00
nav
e6b20e9d52 feat: treat NO/empty as gateway no-reply 2026-03-10 13:42:50 +00:00
13d5b95081 Merge pull request 'fix/no-reply-empty-content-detection' (#18) from fix/no-reply-empty-content-detection into main
Reviewed-on: #18
2026-03-09 21:49:59 +00:00
zhi
08f42bfd92 fix: skip rules-based no-reply override when turn manager allows agent
When the turn manager determines it's an agent's turn (checkTurn.allowed),
the rules engine's evaluateDecision() could still override the model to
no-reply with reason 'rule_match_no_end_symbol'. This happened because:

1. The sender of the triggering message (another agent) was not in the
   humanList, so the rules fell through to the end-symbol check.
2. getLastChar() operates on the full prompt (including system content
   like Runtime info), so it never found the end symbol even when the
   actual message ended with one.

Fix: return early from before_model_resolve after the turn check passes,
skipping the rules-based no-reply override entirely. The turn manager is
the authoritative source for multi-agent turn coordination.

Tested: 3-agent counting chain ran successfully (3→11) with correct
NO_REPLY handling when count exceeded threshold.
2026-03-09 21:16:53 +00:00
zhi
bddc7798d8 fix: add no-reply model to agents.defaults.models allowlist
Changes:
- Change default provider ID from 'dirigentway' to 'dirigent'
- Add no-reply model to agents.defaults.models allowlist during install
- Fix no-reply-api server default model name from 'dirigent-no-reply-v1' to 'no-reply'

This fixes the issue where dirigent/no-reply model was not showing in
'openclaw models list' and was being rejected as 'not allowed'.
2026-03-09 13:12:35 +00:00
zhi
1f846fa7aa fix: stop treating empty content as NO_REPLY, detect tool calls
Problems fixed:
1. before_message_write treated empty content (isEmpty) as NO_REPLY.
   Tool-call-only assistant messages (thinking + toolCall, no text)
   had empty extracted text, causing false NO_REPLY detection.
   In single-agent channels this immediately set turn to dormant,
   blocking all subsequent responses for the entire model run.

2. Added explicit toolCall/tool_call/tool_use detection in
   before_message_write — skip turn processing for intermediate
   tool-call messages entirely.

3. no-reply-api/server.mjs: default model name changed from
   'dirigent-no-reply-v1' to 'no-reply' to match the configured
   model id in openclaw.json, fixing model list discovery.

Changes:
- plugin/hooks/before-message-write.ts: toolCall detection + remove isEmpty
- plugin/hooks/message-sent.ts: remove isEmpty from wasNoReply
- no-reply-api/server.mjs: fix default model name
- dist/dirigent/index.ts: same fixes applied to monolithic build
- dist/no-reply-api/server.mjs: same model name fix
2026-03-09 12:00:36 +00:00
68c13d9eef Merge pull request 'feat: split dirigent_tools + human @mention override' (#14) from feat/split-tools-and-mention-override into main
Reviewed-on: #14
2026-03-08 08:02:27 +00:00
e5158cf039 Merge pull request 'fix(turn): preserve mention override during membership refresh' (#17) from debug/mention-override-reset into feat/split-tools-and-mention-override
Reviewed-on: #17
2026-03-08 08:02:12 +00:00
7e0f187f34 fix(turn): keep mention override speaker/order when membership refresh runs 2026-03-08 07:56:26 +00:00
a995b7d6bf debug(turn): add mention-override and ensureTurnOrder state transition logs 2026-03-08 07:38:33 +00:00
05702941c1 Merge pull request 'feat: start NEW_FEAT refactor (channel resolver + decision input modules)' (#16) from feat/new-feat-refactor-start into feat/split-tools-and-mention-override
Reviewed-on: #16
2026-03-08 07:25:40 +00:00
ffaf7a89e5 docs(feat): merge NEW_FEAT into FEAT and remove NEW_FEAT.md 2026-03-08 07:24:59 +00:00
3cde4a7795 refactor(policy): move policy CRUD to /dirigent_policy slash command with explicit channelId 2026-03-08 07:17:23 +00:00
d497631b99 refactor(tools): drop guild member-list tool and remove dirigent_ prefix from tool names 2026-03-08 07:05:37 +00:00
bb10d6913e fix(plugin): start moderator reliably and colocate no-reply-api under plugin dir 2026-03-08 06:57:22 +00:00
a2781139b0 style(installer): adopt colored tabbed step output format 2026-03-08 06:45:32 +00:00
4d50826f2a refactor(installer): rename to install.mjs, remove record/restore flow, add --no-reply-port and wire config port 2026-03-08 06:38:33 +00:00
7640e80373 refactor(installer): detect existing install via plugins.entries.dirigent registration 2026-03-08 06:25:07 +00:00
6124ceec7a docs(cleanup): mark discord-control-api references as historical after in-plugin migration 2026-03-08 06:21:26 +00:00
e6b445fb97 chore(cleanup): remove discord-control-api sidecar and stale config/docs hooks 2026-03-08 06:19:41 +00:00
0806edb7d9 feat(cache): include source and guildId metadata in channel member cache 2026-03-08 06:15:19 +00:00
12b0f4c6cc feat(turn-init): persist channel bot membership cache to local file 2026-03-08 06:13:38 +00:00
307235e207 feat(turn-init): use internal Discord channel member resolver for bootstrap (no public tool) 2026-03-08 06:08:51 +00:00
121786e6e3 refactor(tools): remove channel-member-list public tool (internal-use only) 2026-03-08 05:53:38 +00:00
3e35da83ca feat(discord-tools): replace sidecar API with direct Discord REST + channel member listing 2026-03-08 05:50:10 +00:00
63009f3925 refactor(plugin): extract shared session state and decision pruning 2026-03-08 05:43:52 +00:00
ea501ccef8 refactor(plugin): extract no-reply child process lifecycle module 2026-03-08 05:39:27 +00:00