fix: include gateway plugin commands in TUI autocomplete#83941
Conversation
|
Codex review: passed. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. PR egg Rarity: 🌱 uncommon. What is this egg doing here?
Real behavior proof Next step before merge Security Review detailsBest possible solution: Merge the narrow TUI integration after exact-head required checks pass, keeping Gateway Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main builds TUI autocomplete without any Is this the best way to solve the issue? Yes. Reusing Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 6da73ac90f1e. |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
f13d2d1 to
7e30007
Compare
## Summary
Fix TUI slash autocomplete so gateway-connected TUI sessions can suggest plugin-owned slash commands exposed by the running Gateway.
Before this change, `openclaw tui` built autocomplete from the local/static slash command list only. Plugin commands such as `/dreaming`, `/phone`, or `/pair` could be present in the Gateway command surface but missing from TUI suggestions.
## Changes
- Add Gateway command listing support to the TUI backend through the existing `commands.list` RPC.
- Fetch text-scope command entries for the current agent/provider when the TUI is connected to the Gateway.
- Merge returned Gateway command aliases into `getSlashCommands(...)` so plugin-owned commands appear in slash autocomplete.
- Keep existing built-in/static commands available and add focused coverage for the dynamic command merge path.
## Verification
- `COREPACK_HOME=/tmp/corepack PNPM_HOME=/tmp/pnpm node scripts/run-vitest.mjs run src/tui/commands.test.ts src/tui/gateway-chat.test.ts src/tui/embedded-backend.test.ts`
- `COREPACK_HOME=/tmp/corepack PNPM_HOME=/tmp/pnpm pnpm exec tsc --noEmit --pretty false --project tsconfig.core.json`
- `git diff --check`
After updating the fixture to use the existing `/dreaming` plugin command example, the focused TUI command test was re-run:
- `COREPACK_HOME=/tmp/corepack PNPM_HOME=/tmp/pnpm node scripts/run-vitest.mjs run src/tui/commands.test.ts --reporter=verbose`
- Result: 1 file passed, 9 tests passed
## Real behavior proof
Behavior or issue addressed: plugin commands present in the running Gateway command registry did not appear in `openclaw tui` slash autocomplete because the TUI used only its local/static command list.
Real environment tested: local OpenClaw checkout on this branch, loopback Gateway, existing plugin command surface exposed through `commands.list`.
I verified the behavior by checking that the running Gateway exposes an existing plugin-owned text command that should be available to gateway-connected TUI autocomplete:
```bash
openclaw gateway call commands.list --params '{"scope":"text","includeArgs":false}' --json \
| jq '.commands[] | select(.name == "dreaming" or (.textAliases // [] | index("/dreaming")))'
```
The Gateway returned the existing `/dreaming` plugin command:
```json
{
"name": "dreaming",
"nativeName": "dreaming",
"textAliases": [
"/dreaming"
],
"description": "Enable or disable memory dreaming.",
"source": "plugin",
"scope": "both",
"acceptsArgs": true
}
```
Observed result after fix: gateway-connected TUI autocomplete can include dynamic text command aliases from the Gateway command surface, including plugin-owned commands such as `/dreaming`.
What was not tested: Discord native slash command registration/sync, `openclaw agent --message` plugin dispatch, and embedded/local TUI dynamic plugin discovery.
## AI assistance
Prepared with AI assistance and human-reviewed before opening.
Co-authored-by: Se7en <285117352+se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
…0 (1) Co-authored-by: Se7en <285117352+se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
081f5fe to
2eba76a
Compare
Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a42dbe146d0f2595f3d56d7dc205b17836. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a42dbe146d0f2595f3d56d7dc205b17836 Review: openclaw/openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a42dbe146d0f2595f3d56d7dc205b17836. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a42dbe146d0f2595f3d56d7dc205b17836 Review: openclaw/openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
) Summary: - The PR adds TUI-side Gateway `commands.list` fetching, dynamic slash-command merging, backend typing/tests, and a changelog entry so Gateway-connected TUI sessions suggest plugin-owned slash commands. - Reproducibility: yes. Source inspection shows current main builds TUI autocomplete without any `commands.lis ... y exposes text-scope plugin commands, and the source PR supplies after-fix command output plus screenshots. Automerge notes: - PR branch already contained follow-up commit before automerge: fix: include gateway plugin commands in TUI autocomplete - PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8364… Validation: - ClawSweeper review passed for head 2eba76a. - Required merge gates passed before the squash merge. Prepared head SHA: 2eba76a Review: openclaw#83941 (comment) Co-authored-by: Se7en <se7en-agent@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Makes #83640 merge-ready for the ClawSweeper automerge loop.
The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.
ClawSweeper 🐠 replacement reef notes:
Co-author credit kept:
fish notes: model gpt-5.5, reasoning high; reviewed against f13d2d1.