Skip to content

Commit 3f94edc

Browse files
authored
Plugin: switch slash commands to cas (#29)
1 parent 5c29a08 commit 3f94edc

File tree

7 files changed

+139
-113
lines changed

7 files changed

+139
-113
lines changed

README.md

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# OpenClaw App Server Bridge
1+
# OpenClaw Plugin For Codex App Server
22

3-
Independent OpenClaw bridge for using Codex App Server from Telegram and Discord conversations. Bind a chat to a Codex thread, talk to it with plain text, and control it with chat-native commands for resume, planning, review, model selection, compaction, and more.
3+
This project has no product name. It is just an OpenClaw plugin that connects OpenClaw to the Codex App Server protocol so you can interact with your existing threads from Codex Desktop and Codex TUI through Telegram and Discord conversations.
44

5-
This repository is a simple bridge for using Codex through OpenClaw. It is not affiliated with or endorsed by OpenAI.
5+
`Codex` is mentioned here only to describe the protocol and toolchain this plugin connects to. This repository is independent and is not official, provided, sponsored, endorsed, or affiliated with OpenAI or Codex.
66

77
If `codex` already works on the machine running OpenClaw, this plugin should work too. It uses the same local Codex CLI and shared login state. There is no separate plugin login requirement for normal use.
88

99
## Quick Start
1010

1111
1. Install the plugin into OpenClaw.
1212
2. Start in the Telegram or Discord conversation where you want the bridge bound.
13-
3. Run `/codex_resume`.
13+
3. Run `/cas_resume`.
1414
4. Pick a project and thread, or search directly.
1515
5. Once bound, plain text in that conversation routes to the selected Codex thread.
1616

@@ -39,58 +39,58 @@ Pre-release packages are published on matching npm dist-tags instead of `latest`
3939
## Why Try It
4040

4141
- Uses your existing local Codex CLI setup instead of a separate hosted bridge.
42-
- Feels natural in chat: bind once with `/codex_resume`, then just talk.
43-
- Keeps useful controls close at hand with `/codex_status`, `/codex_plan`, `/codex_review`, `/codex_model`, and more.
42+
- Feels natural in chat: bind once with `/cas_resume`, then just talk.
43+
- Keeps useful controls close at hand with `/cas_status`, `/cas_plan`, `/cas_review`, `/cas_model`, and more.
4444
- Works well for Telegram and Discord conversations that you want tied to a real Codex thread.
4545

4646
## Typical Workflow
4747

48-
1. Run `/codex_resume` in the conversation you want to bind.
49-
2. Use the picker buttons, or pass a filter like `/codex_resume release-fix` or `/codex_resume --projects`.
48+
1. Run `/cas_resume` in the conversation you want to bind.
49+
2. Use the picker buttons, or pass a filter like `/cas_resume release-fix` or `/cas_resume --projects`.
5050
3. Send normal chat messages once the thread is bound.
51-
4. Use control commands such as `/codex_status`, `/codex_plan`, `/codex_review`, `/codex_model`, and `/codex_stop` as needed.
52-
5. If you leave plan mode through the normal `Implement this plan` button, you do not need `/codex_plan off`; use `/codex_plan off` only when you want to exit planning manually instead.
51+
4. Use control commands such as `/cas_status`, `/cas_plan`, `/cas_review`, `/cas_model`, and `/cas_stop` as needed.
52+
5. If you leave plan mode through the normal `Implement this plan` button, you do not need `/cas_plan off`; use `/cas_plan off` only when you want to exit planning manually instead.
5353

5454
## Command Reference
5555

5656
| Command | What it does | Notes / examples |
5757
| --- | --- | --- |
58-
| `/codex_resume` | Bind this conversation to a Codex thread. | With no args, opens a picker for recent sessions in the current workspace. |
59-
| `/codex_resume --projects` | Browse projects first. | Opens a project picker, then a thread picker. |
60-
| `/codex_resume --all` | Search recent sessions across projects. | Useful when the thread is not in the current workspace. |
61-
| `/codex_resume --cwd ~/github/openclaw` | Restrict browsing/search to one workspace. | `--cwd` accepts an absolute path or `~/...`. |
62-
| `/codex_resume --sync` | Resume and try to sync the chat/topic name to the Codex thread. | You can combine this with other flags. |
63-
| `/codex_resume release-fix` | Resume a matching thread by title or id. | If more than one thread matches, you get buttons to choose. |
64-
| `/codex_status` | Show the current binding and thread state. | Includes thread id, model, workspace, sandbox, and permissions when available. |
65-
| `/codex_detach` | Unbind this conversation from Codex. | Stops routing plain text from this conversation into the bound thread. |
66-
| `/codex_stop` | Interrupt the active Codex run. | Only applies when a turn is currently in progress. |
67-
| `/codex_steer <message>` | Send follow-up steer text to an active run. | Example: `/codex_steer focus on the failing tests first` |
68-
| `/codex_plan <goal>` | Ask Codex to plan instead of execute. | The plugin relays plan questions and the final plan back into chat. |
69-
| `/codex_plan off` | Exit plan mode for this conversation. | Use this when you want to leave planning manually instead of through the normal `Implement this plan` button. |
70-
| `/codex_review` | Review the current uncommitted changes in the bound workspace. | Requires an existing binding. |
71-
| `/codex_review <focus>` | Review with custom instructions. | Example: `/codex_review focus on thread selection regressions` |
72-
| `/codex_compact` | Compact the bound Codex thread. | The plugin posts progress and final context usage. |
73-
| `/codex_skills` | List available Codex skills for the workspace. | Adds buttons for up to eight skill shortcuts. |
74-
| `/codex_skills review` | Filter the skills list. | Matches skill name, description, or cwd. |
75-
| `/codex_experimental` | List experimental features reported by Codex. | Read-only. |
76-
| `/codex_mcp` | List configured MCP servers. | Shows auth state and counts for tools/resources/templates. |
77-
| `/codex_mcp github` | Filter MCP servers. | Matches name and auth status. |
78-
| `/codex_fast` | Toggle fast mode for the bound thread. | Equivalent to switching the service tier between default and fast. |
79-
| `/codex_fast on|off|status` | Set or inspect fast mode explicitly. | Example: `/codex_fast status` |
80-
| `/codex_model` | List models and show model-selection buttons. | If the conversation is not bound yet, it lists models only. |
81-
| `/codex_model gpt-5.4` | Set the model for the bound thread. | Requires an existing binding. |
82-
| `/codex_permissions` | Show account, rate-limit, and thread permission information. | Works with or without a current binding. |
83-
| `/codex_init ...` | Forward `/init` to Codex. | Sends the alias straight through to the App Server. |
84-
| `/codex_diff ...` | Forward `/diff` to Codex. | Sends the alias straight through to the App Server. |
85-
| `/codex_rename <new name>` | Rename the bound Codex thread. | Example: `/codex_rename approval flow cleanup` |
86-
| `/codex_rename --sync <new name>` | Rename the thread and try to sync the conversation/topic name too. | Requires an existing binding. |
58+
| `/cas_resume` | Bind this conversation to a Codex thread. | With no args, opens a picker for recent sessions in the current workspace. |
59+
| `/cas_resume --projects` | Browse projects first. | Opens a project picker, then a thread picker. |
60+
| `/cas_resume --all` | Search recent sessions across projects. | Useful when the thread is not in the current workspace. |
61+
| `/cas_resume --cwd ~/github/openclaw` | Restrict browsing/search to one workspace. | `--cwd` accepts an absolute path or `~/...`. |
62+
| `/cas_resume --sync` | Resume and try to sync the chat/topic name to the Codex thread. | You can combine this with other flags. |
63+
| `/cas_resume release-fix` | Resume a matching thread by title or id. | If more than one thread matches, you get buttons to choose. |
64+
| `/cas_status` | Show the current binding and thread state. | Includes thread id, model, workspace, sandbox, and permissions when available. |
65+
| `/cas_detach` | Unbind this conversation from Codex. | Stops routing plain text from this conversation into the bound thread. |
66+
| `/cas_stop` | Interrupt the active Codex run. | Only applies when a turn is currently in progress. |
67+
| `/cas_steer <message>` | Send follow-up steer text to an active run. | Example: `/cas_steer focus on the failing tests first` |
68+
| `/cas_plan <goal>` | Ask Codex to plan instead of execute. | The plugin relays plan questions and the final plan back into chat. |
69+
| `/cas_plan off` | Exit plan mode for this conversation. | Use this when you want to leave planning manually instead of through the normal `Implement this plan` button. |
70+
| `/cas_review` | Review the current uncommitted changes in the bound workspace. | Requires an existing binding. |
71+
| `/cas_review <focus>` | Review with custom instructions. | Example: `/cas_review focus on thread selection regressions` |
72+
| `/cas_compact` | Compact the bound Codex thread. | The plugin posts progress and final context usage. |
73+
| `/cas_skills` | List available Codex skills for the workspace. | Adds buttons for up to eight skill shortcuts. |
74+
| `/cas_skills review` | Filter the skills list. | Matches skill name, description, or cwd. |
75+
| `/cas_experimental` | List experimental features reported by Codex. | Read-only. |
76+
| `/cas_mcp` | List configured MCP servers. | Shows auth state and counts for tools/resources/templates. |
77+
| `/cas_mcp github` | Filter MCP servers. | Matches name and auth status. |
78+
| `/cas_fast` | Toggle fast mode for the bound thread. | Equivalent to switching the service tier between default and fast. |
79+
| `/cas_fast on|off|status` | Set or inspect fast mode explicitly. | Example: `/cas_fast status` |
80+
| `/cas_model` | List models and show model-selection buttons. | If the conversation is not bound yet, it lists models only. |
81+
| `/cas_model gpt-5.4` | Set the model for the bound thread. | Requires an existing binding. |
82+
| `/cas_permissions` | Show account, rate-limit, and thread permission information. | Works with or without a current binding. |
83+
| `/cas_init ...` | Forward `/init` to Codex. | Sends the alias straight through to the App Server. |
84+
| `/cas_diff ...` | Forward `/diff` to Codex. | Sends the alias straight through to the App Server. |
85+
| `/cas_rename <new name>` | Rename the bound Codex thread. | Example: `/cas_rename approval flow cleanup` |
86+
| `/cas_rename --sync <new name>` | Rename the thread and try to sync the conversation/topic name too. | Requires an existing binding. |
8787

8888
## Screenshot Placeholders
8989

90-
- `[TODO screenshot] /codex_resume --projects` project picker
91-
- `[TODO screenshot] /codex_resume` thread picker with buttons
92-
- `[TODO screenshot] bound conversation after /codex_status`
93-
- `[TODO screenshot] /codex_model` button list
90+
- `[TODO screenshot] /cas_resume --projects` project picker
91+
- `[TODO screenshot] /cas_resume` thread picker with buttons
92+
- `[TODO screenshot] bound conversation after /cas_status`
93+
- `[TODO screenshot] /cas_model` button list
9494

9595
## Plugin Config Notes
9696

index.test.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,25 @@ describe("plugin registration", () => {
3636
expect(api.on).toHaveBeenCalledWith("inbound_claim", expect.any(Function));
3737
expect(api.registerInteractiveHandler).toHaveBeenCalledTimes(2);
3838
expect(api.registerCommand).toHaveBeenCalled();
39+
expect(api.registerCommand.mock.calls.map(([params]) => params.name)).toEqual([
40+
"cas_resume",
41+
"cas_detach",
42+
"cas_status",
43+
"cas_stop",
44+
"cas_steer",
45+
"cas_plan",
46+
"cas_review",
47+
"cas_compact",
48+
"cas_skills",
49+
"cas_experimental",
50+
"cas_mcp",
51+
"cas_fast",
52+
"cas_model",
53+
"cas_permissions",
54+
"cas_init",
55+
"cas_diff",
56+
"cas_rename",
57+
]);
3958
});
4059

4160
it("registers the binding resolved hook when available", () => {

index.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@ import { CodexPluginController } from "./src/controller.js";
33
import { INTERACTIVE_NAMESPACE } from "./src/types.js";
44

55
const COMMANDS = [
6-
["codex_resume", "Resume or bind an existing Codex thread."],
7-
["codex_detach", "Detach this conversation from the current Codex thread."],
8-
["codex_status", "Show the current Codex binding and thread state."],
9-
["codex_stop", "Stop the active Codex turn."],
10-
["codex_steer", "Send a steer message to the active Codex turn."],
11-
["codex_plan", "Ask Codex to produce a plan, or use 'off' to exit plan mode."],
12-
["codex_review", "Run Codex review on the current changes."],
13-
["codex_compact", "Compact the current Codex thread."],
14-
["codex_skills", "List Codex skills."],
15-
["codex_experimental", "List Codex experimental features."],
16-
["codex_mcp", "List Codex MCP servers."],
17-
["codex_fast", "Toggle Codex fast mode."],
18-
["codex_model", "List or switch the Codex model."],
19-
["codex_permissions", "Show Codex permissions and account status."],
20-
["codex_init", "Forward /init to Codex."],
21-
["codex_diff", "Forward /diff to Codex."],
22-
["codex_rename", "Rename the Codex thread and sync the channel name when possible."],
6+
["cas_resume", "Resume or bind an existing Codex thread."],
7+
["cas_detach", "Detach this conversation from the current Codex thread."],
8+
["cas_status", "Show the current Codex binding and thread state."],
9+
["cas_stop", "Stop the active Codex turn."],
10+
["cas_steer", "Send a steer message to the active Codex turn."],
11+
["cas_plan", "Ask Codex to produce a plan, or use 'off' to exit plan mode."],
12+
["cas_review", "Run Codex review on the current changes."],
13+
["cas_compact", "Compact the current Codex thread."],
14+
["cas_skills", "List Codex skills."],
15+
["cas_experimental", "List Codex experimental features."],
16+
["cas_mcp", "List Codex MCP servers."],
17+
["cas_fast", "Toggle Codex fast mode."],
18+
["cas_model", "List or switch the Codex model."],
19+
["cas_permissions", "Show Codex permissions and account status."],
20+
["cas_init", "Forward /init to Codex."],
21+
["cas_diff", "Forward /diff to Codex."],
22+
["cas_rename", "Rename the Codex thread and sync the channel name when possible."],
2323
] as const;
2424

2525
const plugin = {
2626
id: "openclaw-codex-app-server",
27-
name: "OpenClaw App Server Bridge",
28-
description: "Independent OpenClaw bridge for Codex App Server.",
27+
name: "OpenClaw Plugin For Codex App Server",
28+
description: "Independent OpenClaw plugin for the Codex App Server protocol.",
2929
register(api: OpenClawPluginApi) {
3030
const controller = new CodexPluginController(api);
3131

openclaw.plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "openclaw-codex-app-server",
3-
"name": "OpenClaw App Server Bridge",
4-
"description": "Independent OpenClaw bridge for Codex App Server with bound Telegram and Discord conversations.",
3+
"name": "OpenClaw Plugin For Codex App Server",
4+
"description": "Independent OpenClaw plugin for the Codex App Server protocol with bound Telegram and Discord conversations.",
55
"configSchema": {
66
"type": "object",
77
"additionalProperties": false,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "openclaw-codex-app-server",
33
"version": "0.0.0",
4-
"description": "Independent OpenClaw bridge for Codex App Server conversations",
4+
"description": "Independent OpenClaw plugin for the Codex App Server protocol",
55
"author": "PwrDrvr LLC",
66
"license": "MIT",
77
"packageManager": "pnpm@10.29.3",

0 commit comments

Comments
 (0)