Commit Graph

54 Commits

Author SHA1 Message Date
c9bed19689 feat: add discord-guilds skill with table merge on install 2026-04-05 18:48:10 +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
81687e548a Preserve existing Dirigent config during install 2026-04-01 20:17:00 +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
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
e6b445fb97 chore(cleanup): remove discord-control-api sidecar and stale config/docs hooks 2026-03-08 06:19:41 +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
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
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
zhi
92799176bf fix(install): fix uninstall order to satisfy config validation
- Remove from plugins.allow BEFORE deleting plugins.entries.dirigent
- OpenClaw validates that allow[] entries must exist in entries{}
- New order: allow → entry → paths → provider
2026-03-03 18:28:44 +00:00
zhi
cd0ce6a910 fix(install): use unsetPath for plugin entry removal
- Use openclaw config unset instead of get-modify-set
- Avoids triggering full plugins config validation
- Handles both added and replaced entries uniformly
2026-03-03 18:23:01 +00:00
zhi
a177150554 fix(install): uninstall always deletes plugin entry
- For uninstall, always delete plugins.entries.dirigent
- Don't try to restore old config (which may fail validation due to missing required fields)
- Provider restoration still works (replaced providers are restored)
2026-03-03 18:20:48 +00:00
zhi
ed5ffd6c53 fix(install): clone function handle undefined
- clone(undefined) now returns undefined instead of throwing JSON.parse error
- This fixes install when plugins.entries.dirigent doesn't exist yet
2026-03-03 18:06:14 +00:00
zhi
be8fe835d0 fix(install): handle 'undefined' string from openclaw config get
- getJson now treats 'undefined' string as missing value
- Add try-catch to JSON.parse for robustness
2026-03-03 17:57:34 +00:00
zhi
91cd402627 fix(install): remove duplicate function definition
- Remove empty duplicate runOpenclaw function that caused syntax error
2026-03-03 17:02:08 +00:00
zhi
83c03b6934 feat(install): idempotent install/uninstall
- Repeat install = reinstall: auto-detect existing install, uninstall first, then install
- Repeat uninstall = no-op: if no install record found, exit 0 with message
- Uses spawnSync to re-exec uninstall phase during reinstall
2026-03-03 16:39:40 +00:00
zhi
6423dbcdfa fix(install): handle plugins.allow in install/uninstall
- Install: add 'dirigent' to plugins.allow if not present, record in delta
- Uninstall: remove 'dirigent' from plugins.allow if it was added by us
- Delta tracking preserves other allowlist entries
2026-03-03 16:36:33 +00:00
zhi
d378e27be9 fix(install): delta-tracking uninstall + remove sh script
- Rewrite install/uninstall to use delta-tracking (added/replaced/removed)
- Install records only what the plugin changed:
  * added: plugin新增的配置(卸载时删除)
  * replaced: plugin覆盖的旧配置(卸载时恢复)
- Uninstall only affects plugin-managed keys, preserving user changes elsewhere
- Remove install-dirigent-openclaw.sh to avoid confusion
2026-03-03 16:34:50 +00:00
zhi
2ea4f59a1e build: support both registry publish and git clone install
- Add root package.json with files[] for registry publishing
- Add prepare script to sync dist/ from plugin/
- Add postinstall to auto-run install script
- Modify install script: auto-create dist/ if missing (git clone case)
- Plugin works in both scenarios:
  * npm install @hangman-lab/dirigent -> uses bundled dist/
  * git clone + node scripts/install-dirigent-openclaw.mjs -> auto-creates dist/
2026-03-03 16:24:05 +00:00
zhi
fd1bf449a4 refine: cleanup remaining whispergate refs, improve docs and TASKLIST formatting
- Fix enableWhispergatePolicyTool → enableDirigentPolicyTool in config schema and example
- Fix whisper-gateway → dirigentway in install script
- Add v0.2.0 changelog entry
- Improve README with scheduling identifier docs and English text
- Clean up plugin README with moderator handoff format docs
- Reformat TASKLIST with cleaner done markers
2026-03-03 10:13:39 +00:00
zhi
af33d747d9 feat: complete Dirigent rename + all TASKLIST items
- Task 1: Identity prompt now includes Discord userId
- Task 2: Added configurable schedulingIdentifier (default: ➡️)
- Task 3: Moderator handoff uses <@userId>+identifier instead of semantic messages
- Task 4: All prompts/comments/help text converted to English
- Task 5: Full project rename WhisperGate → Dirigent across all files

Breaking: config key changed from plugins.entries.whispergate to plugins.entries.dirigent
Breaking: channel policies file renamed to dirigent-channel-policies.json
Breaking: tool name changed from whispergate_tools to dirigent_tools
2026-03-03 10:10:27 +00:00
zhi
a6f2be44b7 feat: moderator bot presence via Discord Gateway
Use Node.js built-in WebSocket to maintain a minimal Discord Gateway
connection for the moderator bot, keeping it 'online' with a
'Watching Moderating' status. Handles heartbeat, reconnect, and resume.

Also fix package-plugin.mjs to include moderator-presence.ts in dist.
2026-02-28 12:33:58 +00:00
zhi
fb50b62509 fix: include turn-manager.ts in package-plugin.mjs
The packaging script didn't copy turn-manager.ts to dist, causing
'Cannot find module ./turn-manager.js' at gateway startup.
2026-02-28 12:27:58 +00:00
zhi
f74b3978e7 fix(installer): resolve plugin path relative to repo instead of hardcoded operator path
PLUGIN_PATH defaulted to /root/.openclaw/workspace-operator/... regardless
of which workspace the installer was run from. Now resolves relative to
the script location (../dist/whispergate).
2026-02-27 14:25:12 +00:00
zhi
fd6c4dd3a2 fix: remove gateway restart from installer, let user restart manually
Root cause: installer called 'openclaw gateway restart' (async via systemd)
then immediately validated model visibility — race condition caused validation
to fail and rollback the correct config.

Fix: remove restart + validation from script entirely. Script only writes config.
User restarts gateway manually after install completes.

Also fix CONFIG.example.json: contextWindow 4096->200000, maxTokens 64->8192
(OpenClaw requires minimum 16000 contextWindow).
2026-02-26 08:47:43 +00:00
15975e3970 fix(installer): raise no-reply model contextWindow/maxTokens to satisfy OpenClaw minimums 2026-02-26 06:30:56 +00:00
8d34bf257b fix(installer): write providers map by object key to avoid quoted provider id and restore providers atomically on uninstall 2026-02-26 06:26:52 +00:00
875cd66d34 feat(installer): restart gateway and validate custom no-reply model visibility after install 2026-02-26 06:14:06 +00:00
1746fb33ad fix(installer): uninstall now selects latest install record instead of latest pointer 2026-02-26 06:04:17 +00:00
46e56c6760 refactor(installer): replace bash installer logic with node-only implementation 2026-02-26 00:41:56 +00:00
714168e4bf fix(installer): pass CHANNEL_POLICIES_FILE env when resolving policy path 2026-02-26 00:38:32 +00:00
682d9a336e feat(policy-file): move channel overrides to standalone channelPoliciesFile with hot reload 2026-02-26 00:28:34 +00:00
d6f908b813 feat(policy): add per-channel channelPolicies with hot-reload list mode/lists 2026-02-26 00:23:47 +00:00
6d463a4572 feat(config): add hot-reload config + listMode (human-list/agent-list) 2026-02-26 00:18:05 +00:00
7f1d6bb3f7 fix(plugin-path): align packaged dir with plugin id to remove mismatch warning 2026-02-25 23:27:16 +00:00
f5ec6f9b15 chore(installer): change default no-reply provider/model ids 2026-02-25 23:21:42 +00:00
c119697f7f fix(installer): make uninstall atomic for plugins and pass rollback test 2026-02-25 23:19:58 +00:00
6ff9858b18 fix(installer): atomic plugins write and valid json defaults for install flags 2026-02-25 23:18:07 +00:00
9d752ca090 feat(installer): add --install/--uninstall with recorded full rollback 2026-02-25 23:08:02 +00:00
2f269c25b4 feat(installer): add openclaw config-set installer with automatic rollback 2026-02-25 23:04:14 +00:00
8097ab7484 docs(discord-control): add runnable examples and smoke script 2026-02-25 22:02:00 +00:00
0c6d8bb2c5 feat(release): add plugin packaging script and release notes 2026-02-25 14:09:14 +00:00
1acaebf73f feat(dev): add no-touch OpenClaw config renderer and integration guide 2026-02-25 13:47:00 +00:00
b99ec7c281 test(api): add isolated no-reply API integration test script 2026-02-25 13:45:57 +00:00