Commit Graph

155 Commits

Author SHA1 Message Date
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
0c06aeb36c refactor(plugin): extract common utils and moderator discord helpers 2026-03-08 05:31:08 +00:00
f9ac401877 refactor(plugin): extract turn bootstrap/cache helpers into core module 2026-03-08 05:25:53 +00:00
05b902c0b2 refactor(plugin): extract identity and mention helpers into core modules 2026-03-08 05:19:40 +00:00
e258e99ed2 refactor(plugin): extract live config and policy store modules 2026-03-07 22:38:11 +00:00
d021b0c06c refactor(plugin): extract discord/policy tool registration module 2026-03-07 22:33:28 +00:00
3a8b85eb7b refactor(plugin): extract dirigent slash command and fix recursive prepare copy 2026-03-07 22:27:03 +00:00
b63c1dfe94 refactor(plugin): extract message_received hook and slim index imports 2026-03-07 22:24:48 +00:00
5c4340d5a9 refactor(plugin): extract before_prompt_build and before_message_write hooks 2026-03-07 22:21:16 +00:00
c15ea0d471 refactor(plugin): extract before_model_resolve and message_sent hooks 2026-03-07 22:18:09 +00:00
96a1f18d1b refactor(plugin): extract channel/decision parsing modules and unify channelId resolution 2026-03-07 22:12:27 +00:00
b7381395fe Merge pull request 'fix: align no-reply-api install path with plugin runtime expectation' (#15) from fix/no-reply-api-install-path into feat/split-tools-and-mention-override
Reviewed-on: #15
2026-03-07 19:24:26 +00:00
e8de773ee4 fix(installer): install no-reply API at expected plugins/no-reply-api path 2026-03-07 19:22:11 +00:00
zhi
fc2cdf0eee refactor: simplify openclaw dir resolution priority
Priority: --openclaw-profile-path arg >  env > ~/.openclaw
Remove openclaw CLI command attempts, simplify to 3 clear sources
2026-03-07 18:39:55 +00:00
zhi
211ad9246f feat: wait for human reply (waitIdentifier 👤)
- Add waitIdentifier config (default: 👤) to DirigentConfig and plugin schema
- Prompt injection: tells agents to end with 👤 when they need a human reply,
  warns to use sparingly (only when human is actively participating)
- Detection in before_message_write and message_sent hooks
- Turn manager: new waitingForHuman state
  - checkTurn() blocks all agents when waiting
  - onNewMessage() clears state on human message
  - Non-human messages ignored while waiting
  - resetTurn() also clears waiting state
- All agents routed to no-reply model during waiting state
- Update docs (FEAT.md, CHANGELOG.md, TASKLIST.md, README.md)
2026-03-07 17:32:28 +00:00
zhi
e4454bfc1a refactor: remove turn tools, rename discord tools, rewrite installer
- Remove turn management tools (turn-status/advance/reset) — internal only,
  accessible via /dirigent slash commands
- Rename discord tools: dirigent_discord_channel_create,
  dirigent_discord_channel_update, dirigent_discord_member_list
- Rewrite install script:
  - Dynamic OpenClaw dir resolution (OPENCLAW_DIR env → openclaw CLI → ~/.openclaw)
  - Plugin installed to $(openclaw_dir)/plugins/dirigent
  - New --update mode: git pull from latest branch + reinstall
  - Cleaner uninstall: removes installed plugin files
- Update docs (FEAT.md, README.md, CHANGELOG.md, TASKLIST.md)
2026-03-07 17:24:36 +00:00
zhi
7b93db3ed9 docs: replace NEW_FEAT.md with comprehensive FEAT.md, update README
- Delete NEW_FEAT.md
- Create FEAT.md with complete feature documentation across all versions
- Update README.md to reflect individual tool names and add @mention override
2026-03-07 17:04:42 +00:00
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
nav
bbd18cd90c docs: add new feature notes 2026-03-07 16:46:33 +00:00
nav
d55eac8dc1 docs: add human mention override requirement 2026-03-05 11:34:07 +00:00
ac65d7e036 Merge pull request 'fix: resolve pluginDir correctly and ensure no-reply-api is copied during install' (#13) from no-reply-api-fix into main
Reviewed-on: #13
2026-03-03 20:25:21 +00:00
zhi
5c9c979f26 fix: resolve pluginDir correctly and ensure no-reply-api is copied during install
- Use import.meta.url instead of api.resolvePath('.') to get script directory
- Add debug logging for no-reply-api and moderator bot startup
- Copy no-reply-api to dist during installation
2026-03-03 20:23:29 +00:00