cc-plugin-codex 0.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,223 @@
1
+ Metadata-Version: 2.4
2
+ Name: cc-plugin-codex
3
+ Version: 0.1.4
4
+ Summary: Call Claude Code from Codex for bounded, independent code review and second opinions
5
+ Project-URL: Homepage, https://github.com/briandconnelly/cc-plugin-codex
6
+ Project-URL: Repository, https://github.com/briandconnelly/cc-plugin-codex
7
+ Project-URL: Issues, https://github.com/briandconnelly/cc-plugin-codex/issues
8
+ Project-URL: Changelog, https://github.com/briandconnelly/cc-plugin-codex/blob/main/CHANGELOG.md
9
+ Project-URL: Security, https://github.com/briandconnelly/cc-plugin-codex/blob/main/SECURITY.md
10
+ Author: Brian Connelly
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: claude,code-review,codex,mcp,plugin
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Software Development
24
+ Requires-Python: >=3.11
25
+ Requires-Dist: anyio>=4
26
+ Requires-Dist: fastmcp>=3.4
27
+ Requires-Dist: pydantic>=2
28
+ Description-Content-Type: text/markdown
29
+
30
+ # cc-plugin-codex
31
+
32
+ Ask Claude Code for an independent code review or second opinion, straight from Codex.
33
+
34
+ `cc-plugin-codex` is review-only: Claude reviews, critiques, and advises. It does not edit
35
+ your code, run shell commands, or get write tools. It is the mirror image of
36
+ [`openai/codex-plugin-cc`](https://github.com/openai/codex-plugin-cc), which lets Claude call
37
+ Codex.
38
+
39
+ ## Quickstart
40
+
41
+ You need:
42
+
43
+ - Codex
44
+ - the `claude` CLI, installed and authenticated
45
+ - `uvx`
46
+ - `git`
47
+
48
+ Check the basics:
49
+
50
+ ```sh
51
+ claude --version
52
+ claude /login
53
+ uvx --version
54
+ git --version
55
+ ```
56
+
57
+ Add this repository as a Codex marketplace, then install the plugin from it:
58
+
59
+ ```sh
60
+ codex plugin marketplace add briandconnelly/cc-plugin-codex
61
+ codex plugin add cc-plugin-codex
62
+ ```
63
+
64
+ Restart Codex after installing. Then ask Codex:
65
+
66
+ > Ask Claude to run `claude_status`.
67
+
68
+ `claude_status` is free. It checks whether the `claude` CLI is installed, authenticated, and
69
+ compatible, and shows the defaults a paid call would use.
70
+
71
+ ## Distribution
72
+
73
+ The Codex plugin install path is the primary user-facing path. The bundled MCP config pins the
74
+ server to a versioned Git tag so installed users update deliberately.
75
+
76
+ The Python package publishes the MCP server entry point for direct use and release provenance.
77
+ After a PyPI release, the server can also be launched with:
78
+
79
+ ```sh
80
+ uvx --from cc-plugin-codex==0.1.4 cc-plugin-codex-mcp
81
+ ```
82
+
83
+ ## Use it
84
+
85
+ Once `claude_status` reports `ready: true`, ask Codex in plain language:
86
+
87
+ > Ask Claude to review my current diff. Pass `workspace_root` as this repository.
88
+
89
+ Passing `workspace_root` matters. It keeps reviews pointed at your project instead of the
90
+ plugin install directory when the MCP client does not provide a repo root.
91
+
92
+ Other useful prompts:
93
+
94
+ - "Ask Claude to review my staged changes for security issues."
95
+ - "Have Claude attack this plan for weaknesses."
96
+ - "Get an independent second opinion from Claude on this design."
97
+ - "Start a background Claude review of this branch against main."
98
+
99
+ Codex uses the plugin skill to choose the right tool and arguments. Direct MCP calls are also
100
+ available:
101
+
102
+ | Tool | Use | Cost |
103
+ | --- | --- | --- |
104
+ | `claude_review_changes` | Review a git diff now | paid |
105
+ | `claude_review_changes_async` | Start a background diff review | paid |
106
+ | `claude_adversarial_review` | Pressure-test a plan, claim, or change | paid |
107
+ | `claude_ask` | Ask for a free-form second opinion | paid |
108
+ | `claude_status` | Check readiness and defaults | free |
109
+ | `claude_review_dry_run` | Preview diff/context before a review | free |
110
+
111
+ Diff review scopes are `working_tree`, `staged`, and `branch`.
112
+
113
+ ```json
114
+ claude_review_changes({
115
+ "workspace_root": "/absolute/path/to/your/repo",
116
+ "scope": "staged",
117
+ "focus": "security"
118
+ })
119
+ ```
120
+
121
+ For a long review, launch it in the background:
122
+
123
+ ```json
124
+ claude_review_changes_async({
125
+ "workspace_root": "/absolute/path/to/your/repo",
126
+ "scope": "branch",
127
+ "base": "main"
128
+ })
129
+ ```
130
+
131
+ Poll with `claude_job_status`, then fetch the result with `claude_job_result`.
132
+
133
+ ## Safety and cost
134
+
135
+ - Paid tools run Claude and send code or prompts to Anthropic, billed through your existing
136
+ `claude` login or `ANTHROPIC_API_KEY`.
137
+ - Free tools only inspect local state, preflight a request, or manage background jobs.
138
+ - Claude never receives write or Bash tools from this plugin.
139
+ - `access=toolless` is the default: Claude receives gathered context as text and cannot read
140
+ more files. `access=readonly` lets Claude use `Read`, `Grep`, and `Glob` for extra context.
141
+ - Secret redaction is best-effort defense in depth. Use `access=toolless` when a workspace may
142
+ contain secrets.
143
+ - `max_budget_usd` is a best-effort Claude CLI stop threshold, not a hard cap. Results report
144
+ actual spend in `meta.cost_usd` when available.
145
+ - Reviews default to `effort=xhigh` for depth. Lower `effort` to `high` or `medium` for routine
146
+ reviews when cost matters.
147
+
148
+ If a requested diff scope has no changes, the review tools return a passing result without
149
+ invoking Claude.
150
+
151
+ ## Common knobs
152
+
153
+ Every setting is optional. These are the knobs most users are likely to change:
154
+
155
+ | Variable | Default | Purpose |
156
+ | --- | --- | --- |
157
+ | `CC_PLUGIN_CODEX_ACCESS` | `toolless` | `toolless` or `readonly` |
158
+ | `CC_PLUGIN_CODEX_CLAUDE_CONFIG` | `inherit` | `inherit`, `scoped`, or `bare` |
159
+ | `CC_PLUGIN_CODEX_EFFORT` | `xhigh` | `low`, `medium`, `high`, `xhigh`, or `max` |
160
+ | `CC_PLUGIN_CODEX_MAX_BUDGET_USD` | `1.00` | best-effort per-call budget threshold |
161
+ | `CC_PLUGIN_CODEX_MODEL` | unset | Claude model; unset uses the CLI default |
162
+ | `CC_PLUGIN_CODEX_TIMEOUT_SECONDS` | `180` | per-call timeout, clamped to 10-600 seconds |
163
+ | `ANTHROPIC_API_KEY` | unset | required only for `config_mode=bare` |
164
+
165
+ Set these in the environment you launch Codex from. The bundled MCP config forwards the common
166
+ cost, safety, model, timeout, and API-key variables to the server.
167
+
168
+ `config_mode=inherit` uses your normal Claude environment without persisting a session.
169
+ `scoped` drops user-global settings and user MCP servers but keeps `CLAUDE.md`. `bare` strips
170
+ `CLAUDE.md`, memory, and hooks, and requires `ANTHROPIC_API_KEY`.
171
+
172
+ ## Troubleshooting
173
+
174
+ Start with:
175
+
176
+ > Ask Claude to run `claude_status`.
177
+
178
+ Then:
179
+
180
+ - If `claude_authenticated` is false, run `claude /login`.
181
+ - If the workspace looks wrong, pass `workspace_root` explicitly.
182
+ - If a review is large or expensive, run `claude_review_dry_run` first.
183
+ - If a background job id is lost, use `claude_job_list`.
184
+ - If `config_mode=bare` fails, confirm `ANTHROPIC_API_KEY` is set in the environment that
185
+ launches Codex.
186
+
187
+ ## Advanced reference
188
+
189
+ Every tool returns a structured `ok`/`error` envelope. Paid results include usage metadata and
190
+ cost when the Claude CLI reports it. The tool contract is experimental and pre-1.0; clients can
191
+ pin `meta.fingerprint` to detect agent-visible changes.
192
+
193
+ The Claude CLI compatibility assumptions are centralized in
194
+ [`src/cc_plugin_codex/cli_contract.py`](./src/cc_plugin_codex/cli_contract.py) and documented
195
+ in [`COMPATIBILITY.md`](./COMPATIBILITY.md).
196
+
197
+ ## Local development
198
+
199
+ Run the MCP server from a checkout:
200
+
201
+ ```sh
202
+ codex mcp add cc-plugin-codex -- uv run --directory "$(pwd)" cc-plugin-codex-mcp
203
+ ```
204
+
205
+ Run tests:
206
+
207
+ ```sh
208
+ uv run pytest
209
+ ```
210
+
211
+ The full suite enforces a 95% coverage floor. For one-file iteration:
212
+
213
+ ```sh
214
+ uv run pytest tests/test_jobs.py --no-cov
215
+ ```
216
+
217
+ Live Claude integration tests are excluded by default:
218
+
219
+ ```sh
220
+ uv run pytest -m integration --no-cov
221
+ ```
222
+
223
+ They require the `claude` CLI and make a small paid API call.
@@ -0,0 +1,16 @@
1
+ cc_plugin_codex/__init__.py,sha256=dRZubbvcfmBzE9dIqzdajurmT8w8vsiMPrsNv9iIIT8,166
2
+ cc_plugin_codex/claude.py,sha256=xpCVX8Ylz0jmUx4tlX3WpjuMocA7r-7ofe86CtxOewo,10967
3
+ cc_plugin_codex/cli_contract.py,sha256=oEdWV4PRSPyT8XKBE8cYJ8UflVirV33HtKc9LGVgxkw,5084
4
+ cc_plugin_codex/config.py,sha256=AyjpFhYyKtrjn3xkmOpKdZLMVHgyekSgn6E8xbTecvs,6066
5
+ cc_plugin_codex/context.py,sha256=ysFUt3bW9AoRdbXJYfQcnBRFzvvaoRINylx2lDvm0dk,7147
6
+ cc_plugin_codex/jobs.py,sha256=qO9ezGeWfqMwt28ilDXs9ARtVMdN3xp-r2N4P-ZYvGw,19092
7
+ cc_plugin_codex/normalize.py,sha256=HqOBaJOnJ_wicB0nZZ_6oxLkYUkwOokfPrf_UcAyOJU,8885
8
+ cc_plugin_codex/preflight.py,sha256=DCjDrAMWh8TAu5ec_IsfBII_OT2Yh8ICJGv7C4oiMSo,3555
9
+ cc_plugin_codex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ cc_plugin_codex/schemas.py,sha256=htzWVuRJiOh6-bMhONDoXigrgbQw4ZCJqUkqBDXVIPg,12233
11
+ cc_plugin_codex/server.py,sha256=cPRCduRX6bcoCqW6gPhdeiFLddD7pKR19zRkps5zxtY,56665
12
+ cc_plugin_codex-0.1.4.dist-info/METADATA,sha256=CDVzt-n9kxMPH3dNDir-cxWje37WbD3ty7z_DJ5v09U,7819
13
+ cc_plugin_codex-0.1.4.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
14
+ cc_plugin_codex-0.1.4.dist-info/entry_points.txt,sha256=tZ2kvGG-lX8q1X3x_d1rJ1ikHalOpYYhiDHLPttlYy4,68
15
+ cc_plugin_codex-0.1.4.dist-info/licenses/LICENSE,sha256=YaQJd4_ERECQwwGfgX3yGHhQt-dpLRCS_o2jlDxKjOs,1071
16
+ cc_plugin_codex-0.1.4.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.30.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ cc-plugin-codex-mcp = cc_plugin_codex.server:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Brian Connelly
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.