codexcw 0.5.0__tar.gz → 0.6.0__tar.gz
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.
- {codexcw-0.5.0 → codexcw-0.6.0}/Cargo.lock +108 -95
- {codexcw-0.5.0 → codexcw-0.6.0}/Cargo.toml +2 -2
- {codexcw-0.5.0 → codexcw-0.6.0}/PKG-INFO +3 -3
- {codexcw-0.5.0 → codexcw-0.6.0}/bindings/python/src/lib.rs +17 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/bindings/python/tests/test_smoke.py +42 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/bindings/python/uv.lock +8 -69
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/args.rs +14 -1
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/claude.rs +7 -1
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/grok.rs +7 -1
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/lib.rs +2 -1
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/request.rs +36 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/pyproject.toml +5 -2
- {codexcw-0.5.0 → codexcw-0.6.0}/python/codexcw/__init__.py +6 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/README.md +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/bindings/python/Cargo.toml +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/bindings/python/README.md +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/bindings/python/tests/fixtures/fake_claude.sh +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/bindings/python/tests/fixtures/fake_codex.sh +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/bindings/python/tests/fixtures/fake_grok.sh +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/Cargo.toml +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/README.md +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/examples/run.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/account_usage.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/claude_account_usage.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/decoder.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/error.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/event.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/group.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/runner.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/session.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/src/tail.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/tests/account_usage_it.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/tests/claude_account_usage_it.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/tests/common/mod.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/tests/grok_it.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/crates/codexcw/tests/runner_it.rs +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/python/codexcw/_codexcw.pyi +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/python/codexcw/aio.py +0 -0
- {codexcw-0.5.0 → codexcw-0.6.0}/python/codexcw/py.typed +0 -0
|
@@ -4,15 +4,15 @@ version = 4
|
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "bitflags"
|
|
7
|
-
version = "2.13.
|
|
7
|
+
version = "2.13.1"
|
|
8
8
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
-
checksum = "
|
|
9
|
+
checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
|
|
10
10
|
|
|
11
11
|
[[package]]
|
|
12
12
|
name = "bytes"
|
|
13
|
-
version = "1.12.
|
|
13
|
+
version = "1.12.1"
|
|
14
14
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
-
checksum = "
|
|
15
|
+
checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
|
|
16
16
|
|
|
17
17
|
[[package]]
|
|
18
18
|
name = "cfg-if"
|
|
@@ -22,7 +22,7 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
|
22
22
|
|
|
23
23
|
[[package]]
|
|
24
24
|
name = "codexcw"
|
|
25
|
-
version = "0.
|
|
25
|
+
version = "0.6.0"
|
|
26
26
|
dependencies = [
|
|
27
27
|
"serde",
|
|
28
28
|
"serde_json",
|
|
@@ -35,7 +35,7 @@ dependencies = [
|
|
|
35
35
|
|
|
36
36
|
[[package]]
|
|
37
37
|
name = "codexcw-node"
|
|
38
|
-
version = "0.
|
|
38
|
+
version = "0.6.0"
|
|
39
39
|
dependencies = [
|
|
40
40
|
"codexcw",
|
|
41
41
|
"napi",
|
|
@@ -47,7 +47,7 @@ dependencies = [
|
|
|
47
47
|
|
|
48
48
|
[[package]]
|
|
49
49
|
name = "codexcw-py"
|
|
50
|
-
version = "0.
|
|
50
|
+
version = "0.6.0"
|
|
51
51
|
dependencies = [
|
|
52
52
|
"codexcw",
|
|
53
53
|
"pyo3",
|
|
@@ -66,9 +66,9 @@ dependencies = [
|
|
|
66
66
|
|
|
67
67
|
[[package]]
|
|
68
68
|
name = "ctor"
|
|
69
|
-
version = "1.0.
|
|
69
|
+
version = "1.0.13"
|
|
70
70
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
71
|
-
checksum = "
|
|
71
|
+
checksum = "914a755b7c2d4af2bdcff7ce1739e2db9a1b81a9b07123d8015786ae03c0980d"
|
|
72
72
|
|
|
73
73
|
[[package]]
|
|
74
74
|
name = "errno"
|
|
@@ -82,15 +82,15 @@ dependencies = [
|
|
|
82
82
|
|
|
83
83
|
[[package]]
|
|
84
84
|
name = "fastrand"
|
|
85
|
-
version = "2.
|
|
85
|
+
version = "2.5.0"
|
|
86
86
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
87
|
-
checksum = "
|
|
87
|
+
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
|
88
88
|
|
|
89
89
|
[[package]]
|
|
90
90
|
name = "futures"
|
|
91
|
-
version = "0.3.
|
|
91
|
+
version = "0.3.34"
|
|
92
92
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
93
|
-
checksum = "
|
|
93
|
+
checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3"
|
|
94
94
|
dependencies = [
|
|
95
95
|
"futures-channel",
|
|
96
96
|
"futures-core",
|
|
@@ -103,9 +103,9 @@ dependencies = [
|
|
|
103
103
|
|
|
104
104
|
[[package]]
|
|
105
105
|
name = "futures-channel"
|
|
106
|
-
version = "0.3.
|
|
106
|
+
version = "0.3.34"
|
|
107
107
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
108
|
-
checksum = "
|
|
108
|
+
checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
|
|
109
109
|
dependencies = [
|
|
110
110
|
"futures-core",
|
|
111
111
|
"futures-sink",
|
|
@@ -113,15 +113,15 @@ dependencies = [
|
|
|
113
113
|
|
|
114
114
|
[[package]]
|
|
115
115
|
name = "futures-core"
|
|
116
|
-
version = "0.3.
|
|
116
|
+
version = "0.3.34"
|
|
117
117
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
118
|
-
checksum = "
|
|
118
|
+
checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
|
|
119
119
|
|
|
120
120
|
[[package]]
|
|
121
121
|
name = "futures-executor"
|
|
122
|
-
version = "0.3.
|
|
122
|
+
version = "0.3.34"
|
|
123
123
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
124
|
-
checksum = "
|
|
124
|
+
checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432"
|
|
125
125
|
dependencies = [
|
|
126
126
|
"futures-core",
|
|
127
127
|
"futures-task",
|
|
@@ -130,38 +130,38 @@ dependencies = [
|
|
|
130
130
|
|
|
131
131
|
[[package]]
|
|
132
132
|
name = "futures-io"
|
|
133
|
-
version = "0.3.
|
|
133
|
+
version = "0.3.34"
|
|
134
134
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
|
-
checksum = "
|
|
135
|
+
checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
|
|
136
136
|
|
|
137
137
|
[[package]]
|
|
138
138
|
name = "futures-macro"
|
|
139
|
-
version = "0.3.
|
|
139
|
+
version = "0.3.34"
|
|
140
140
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
141
|
-
checksum = "
|
|
141
|
+
checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
|
|
142
142
|
dependencies = [
|
|
143
143
|
"proc-macro2",
|
|
144
144
|
"quote",
|
|
145
|
-
"syn",
|
|
145
|
+
"syn 3.0.4",
|
|
146
146
|
]
|
|
147
147
|
|
|
148
148
|
[[package]]
|
|
149
149
|
name = "futures-sink"
|
|
150
|
-
version = "0.3.
|
|
150
|
+
version = "0.3.34"
|
|
151
151
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
152
|
-
checksum = "
|
|
152
|
+
checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
|
|
153
153
|
|
|
154
154
|
[[package]]
|
|
155
155
|
name = "futures-task"
|
|
156
|
-
version = "0.3.
|
|
156
|
+
version = "0.3.34"
|
|
157
157
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
158
|
-
checksum = "
|
|
158
|
+
checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
|
|
159
159
|
|
|
160
160
|
[[package]]
|
|
161
161
|
name = "futures-util"
|
|
162
|
-
version = "0.3.
|
|
162
|
+
version = "0.3.34"
|
|
163
163
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
164
|
-
checksum = "
|
|
164
|
+
checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
|
|
165
165
|
dependencies = [
|
|
166
166
|
"futures-channel",
|
|
167
167
|
"futures-core",
|
|
@@ -199,9 +199,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
|
199
199
|
|
|
200
200
|
[[package]]
|
|
201
201
|
name = "libc"
|
|
202
|
-
version = "0.2.
|
|
202
|
+
version = "0.2.189"
|
|
203
203
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
204
|
-
checksum = "
|
|
204
|
+
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
205
205
|
|
|
206
206
|
[[package]]
|
|
207
207
|
name = "libloading"
|
|
@@ -221,15 +221,15 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
|
|
221
221
|
|
|
222
222
|
[[package]]
|
|
223
223
|
name = "memchr"
|
|
224
|
-
version = "2.8.
|
|
224
|
+
version = "2.8.3"
|
|
225
225
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
226
|
-
checksum = "
|
|
226
|
+
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
227
227
|
|
|
228
228
|
[[package]]
|
|
229
229
|
name = "mio"
|
|
230
|
-
version = "1.2.
|
|
230
|
+
version = "1.2.2"
|
|
231
231
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
232
|
-
checksum = "
|
|
232
|
+
checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427"
|
|
233
233
|
dependencies = [
|
|
234
234
|
"libc",
|
|
235
235
|
"wasi",
|
|
@@ -238,13 +238,14 @@ dependencies = [
|
|
|
238
238
|
|
|
239
239
|
[[package]]
|
|
240
240
|
name = "napi"
|
|
241
|
-
version = "3.
|
|
241
|
+
version = "3.12.2"
|
|
242
242
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
243
|
-
checksum = "
|
|
243
|
+
checksum = "58c5f4d5375213fdb7be2655e152386e82f026f9a5ba36a75556e11359aafe09"
|
|
244
244
|
dependencies = [
|
|
245
245
|
"bitflags",
|
|
246
246
|
"ctor",
|
|
247
247
|
"futures",
|
|
248
|
+
"libc",
|
|
248
249
|
"napi-build",
|
|
249
250
|
"napi-sys",
|
|
250
251
|
"nohash-hasher",
|
|
@@ -254,42 +255,42 @@ dependencies = [
|
|
|
254
255
|
|
|
255
256
|
[[package]]
|
|
256
257
|
name = "napi-build"
|
|
257
|
-
version = "2.
|
|
258
|
+
version = "2.4.1"
|
|
258
259
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
259
|
-
checksum = "
|
|
260
|
+
checksum = "60fdf9b392c50e7c4170fa633bd909490ed7835cea4c046776d1a4dd8d2ae0ab"
|
|
260
261
|
|
|
261
262
|
[[package]]
|
|
262
263
|
name = "napi-derive"
|
|
263
|
-
version = "3.
|
|
264
|
+
version = "3.6.3"
|
|
264
265
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
265
|
-
checksum = "
|
|
266
|
+
checksum = "0fa55ea69990c90b888e9e77044410e304ce7f35de599dc6d0b5c1923d2e59af"
|
|
266
267
|
dependencies = [
|
|
267
268
|
"convert_case",
|
|
268
269
|
"ctor",
|
|
269
270
|
"napi-derive-backend",
|
|
270
271
|
"proc-macro2",
|
|
271
272
|
"quote",
|
|
272
|
-
"syn",
|
|
273
|
+
"syn 2.0.119",
|
|
273
274
|
]
|
|
274
275
|
|
|
275
276
|
[[package]]
|
|
276
277
|
name = "napi-derive-backend"
|
|
277
|
-
version = "
|
|
278
|
+
version = "6.1.2"
|
|
278
279
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
279
|
-
checksum = "
|
|
280
|
+
checksum = "df4056ac7c18e4438ccf0edaed4340ca0d269278c8ec19284f7b23cb039fd0ae"
|
|
280
281
|
dependencies = [
|
|
281
282
|
"convert_case",
|
|
282
283
|
"proc-macro2",
|
|
283
284
|
"quote",
|
|
284
285
|
"semver",
|
|
285
|
-
"syn",
|
|
286
|
+
"syn 2.0.119",
|
|
286
287
|
]
|
|
287
288
|
|
|
288
289
|
[[package]]
|
|
289
290
|
name = "napi-sys"
|
|
290
|
-
version = "3.
|
|
291
|
+
version = "3.3.0"
|
|
291
292
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
292
|
-
checksum = "
|
|
293
|
+
checksum = "85fbf1fa9f1babfe396d74bbbf52b3643770243e8f5b0b46715d4caf7f0dfc9a"
|
|
293
294
|
dependencies = [
|
|
294
295
|
"libloading",
|
|
295
296
|
]
|
|
@@ -314,24 +315,24 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
|
|
314
315
|
|
|
315
316
|
[[package]]
|
|
316
317
|
name = "portable-atomic"
|
|
317
|
-
version = "1.
|
|
318
|
+
version = "1.15.0"
|
|
318
319
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
319
|
-
checksum = "
|
|
320
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
320
321
|
|
|
321
322
|
[[package]]
|
|
322
323
|
name = "proc-macro2"
|
|
323
|
-
version = "1.0.
|
|
324
|
+
version = "1.0.107"
|
|
324
325
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
325
|
-
checksum = "
|
|
326
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
326
327
|
dependencies = [
|
|
327
328
|
"unicode-ident",
|
|
328
329
|
]
|
|
329
330
|
|
|
330
331
|
[[package]]
|
|
331
332
|
name = "pyo3"
|
|
332
|
-
version = "0.29.
|
|
333
|
+
version = "0.29.2"
|
|
333
334
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
334
|
-
checksum = "
|
|
335
|
+
checksum = "4688ddedf473e32662b9b067670129a8afb8c18e351482c70d62ba4a88171e8b"
|
|
335
336
|
dependencies = [
|
|
336
337
|
"libc",
|
|
337
338
|
"once_cell",
|
|
@@ -343,18 +344,18 @@ dependencies = [
|
|
|
343
344
|
|
|
344
345
|
[[package]]
|
|
345
346
|
name = "pyo3-build-config"
|
|
346
|
-
version = "0.29.
|
|
347
|
+
version = "0.29.2"
|
|
347
348
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
348
|
-
checksum = "
|
|
349
|
+
checksum = "f41027e41b4bd03f6e60f9f417fe24a6341a6bb744edd62b6f709f2a52ea30e9"
|
|
349
350
|
dependencies = [
|
|
350
351
|
"target-lexicon",
|
|
351
352
|
]
|
|
352
353
|
|
|
353
354
|
[[package]]
|
|
354
355
|
name = "pyo3-ffi"
|
|
355
|
-
version = "0.29.
|
|
356
|
+
version = "0.29.2"
|
|
356
357
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
357
|
-
checksum = "
|
|
358
|
+
checksum = "e591a95526fead067432c3b3a33fc74770b87b1e04e73671090d9c2055a2b327"
|
|
358
359
|
dependencies = [
|
|
359
360
|
"libc",
|
|
360
361
|
"pyo3-build-config",
|
|
@@ -362,33 +363,33 @@ dependencies = [
|
|
|
362
363
|
|
|
363
364
|
[[package]]
|
|
364
365
|
name = "pyo3-macros"
|
|
365
|
-
version = "0.29.
|
|
366
|
+
version = "0.29.2"
|
|
366
367
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
367
|
-
checksum = "
|
|
368
|
+
checksum = "73225868fc1cd84eef2c3c230ddb91273bf1de46aeb8a4248da76d32a0924a1c"
|
|
368
369
|
dependencies = [
|
|
369
370
|
"proc-macro2",
|
|
370
371
|
"pyo3-macros-backend",
|
|
371
372
|
"quote",
|
|
372
|
-
"syn",
|
|
373
|
+
"syn 2.0.119",
|
|
373
374
|
]
|
|
374
375
|
|
|
375
376
|
[[package]]
|
|
376
377
|
name = "pyo3-macros-backend"
|
|
377
|
-
version = "0.29.
|
|
378
|
+
version = "0.29.2"
|
|
378
379
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
379
|
-
checksum = "
|
|
380
|
+
checksum = "571575aa3749fa6216757dd47d2a3e7ef360f329a40f0666a9fbd14889024952"
|
|
380
381
|
dependencies = [
|
|
381
382
|
"heck",
|
|
382
383
|
"proc-macro2",
|
|
383
384
|
"quote",
|
|
384
|
-
"syn",
|
|
385
|
+
"syn 2.0.119",
|
|
385
386
|
]
|
|
386
387
|
|
|
387
388
|
[[package]]
|
|
388
389
|
name = "quote"
|
|
389
|
-
version = "1.0.
|
|
390
|
+
version = "1.0.47"
|
|
390
391
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
391
|
-
checksum = "
|
|
392
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
392
393
|
dependencies = [
|
|
393
394
|
"proc-macro2",
|
|
394
395
|
]
|
|
@@ -401,9 +402,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
|
401
402
|
|
|
402
403
|
[[package]]
|
|
403
404
|
name = "rustc-hash"
|
|
404
|
-
version = "2.1.
|
|
405
|
+
version = "2.1.3"
|
|
405
406
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
406
|
-
checksum = "
|
|
407
|
+
checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
|
|
407
408
|
|
|
408
409
|
[[package]]
|
|
409
410
|
name = "rustix"
|
|
@@ -426,9 +427,9 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
|
|
|
426
427
|
|
|
427
428
|
[[package]]
|
|
428
429
|
name = "serde"
|
|
429
|
-
version = "1.0.
|
|
430
|
+
version = "1.0.229"
|
|
430
431
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
431
|
-
checksum = "
|
|
432
|
+
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
432
433
|
dependencies = [
|
|
433
434
|
"serde_core",
|
|
434
435
|
"serde_derive",
|
|
@@ -436,29 +437,29 @@ dependencies = [
|
|
|
436
437
|
|
|
437
438
|
[[package]]
|
|
438
439
|
name = "serde_core"
|
|
439
|
-
version = "1.0.
|
|
440
|
+
version = "1.0.229"
|
|
440
441
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
441
|
-
checksum = "
|
|
442
|
+
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
442
443
|
dependencies = [
|
|
443
444
|
"serde_derive",
|
|
444
445
|
]
|
|
445
446
|
|
|
446
447
|
[[package]]
|
|
447
448
|
name = "serde_derive"
|
|
448
|
-
version = "1.0.
|
|
449
|
+
version = "1.0.229"
|
|
449
450
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
450
|
-
checksum = "
|
|
451
|
+
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
451
452
|
dependencies = [
|
|
452
453
|
"proc-macro2",
|
|
453
454
|
"quote",
|
|
454
|
-
"syn",
|
|
455
|
+
"syn 3.0.4",
|
|
455
456
|
]
|
|
456
457
|
|
|
457
458
|
[[package]]
|
|
458
459
|
name = "serde_json"
|
|
459
|
-
version = "1.0.
|
|
460
|
+
version = "1.0.151"
|
|
460
461
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
461
|
-
checksum = "
|
|
462
|
+
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
|
|
462
463
|
dependencies = [
|
|
463
464
|
"itoa",
|
|
464
465
|
"memchr",
|
|
@@ -485,9 +486,20 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
|
|
|
485
486
|
|
|
486
487
|
[[package]]
|
|
487
488
|
name = "syn"
|
|
488
|
-
version = "2.0.
|
|
489
|
+
version = "2.0.119"
|
|
490
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
491
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
492
|
+
dependencies = [
|
|
493
|
+
"proc-macro2",
|
|
494
|
+
"quote",
|
|
495
|
+
"unicode-ident",
|
|
496
|
+
]
|
|
497
|
+
|
|
498
|
+
[[package]]
|
|
499
|
+
name = "syn"
|
|
500
|
+
version = "3.0.4"
|
|
489
501
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
490
|
-
checksum = "
|
|
502
|
+
checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f"
|
|
491
503
|
dependencies = [
|
|
492
504
|
"proc-macro2",
|
|
493
505
|
"quote",
|
|
@@ -515,29 +527,29 @@ dependencies = [
|
|
|
515
527
|
|
|
516
528
|
[[package]]
|
|
517
529
|
name = "thiserror"
|
|
518
|
-
version = "2.0.
|
|
530
|
+
version = "2.0.20"
|
|
519
531
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
520
|
-
checksum = "
|
|
532
|
+
checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
|
|
521
533
|
dependencies = [
|
|
522
534
|
"thiserror-impl",
|
|
523
535
|
]
|
|
524
536
|
|
|
525
537
|
[[package]]
|
|
526
538
|
name = "thiserror-impl"
|
|
527
|
-
version = "2.0.
|
|
539
|
+
version = "2.0.20"
|
|
528
540
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
529
|
-
checksum = "
|
|
541
|
+
checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
|
|
530
542
|
dependencies = [
|
|
531
543
|
"proc-macro2",
|
|
532
544
|
"quote",
|
|
533
|
-
"syn",
|
|
545
|
+
"syn 3.0.4",
|
|
534
546
|
]
|
|
535
547
|
|
|
536
548
|
[[package]]
|
|
537
549
|
name = "tokio"
|
|
538
|
-
version = "1.
|
|
550
|
+
version = "1.53.3"
|
|
539
551
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
540
|
-
checksum = "
|
|
552
|
+
checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e"
|
|
541
553
|
dependencies = [
|
|
542
554
|
"bytes",
|
|
543
555
|
"libc",
|
|
@@ -550,20 +562,20 @@ dependencies = [
|
|
|
550
562
|
|
|
551
563
|
[[package]]
|
|
552
564
|
name = "tokio-macros"
|
|
553
|
-
version = "2.7.
|
|
565
|
+
version = "2.7.2"
|
|
554
566
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
555
|
-
checksum = "
|
|
567
|
+
checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e"
|
|
556
568
|
dependencies = [
|
|
557
569
|
"proc-macro2",
|
|
558
570
|
"quote",
|
|
559
|
-
"syn",
|
|
571
|
+
"syn 3.0.4",
|
|
560
572
|
]
|
|
561
573
|
|
|
562
574
|
[[package]]
|
|
563
575
|
name = "tokio-stream"
|
|
564
|
-
version = "0.1.
|
|
576
|
+
version = "0.1.19"
|
|
565
577
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
566
|
-
checksum = "
|
|
578
|
+
checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b"
|
|
567
579
|
dependencies = [
|
|
568
580
|
"futures-core",
|
|
569
581
|
"pin-project-lite",
|
|
@@ -572,14 +584,15 @@ dependencies = [
|
|
|
572
584
|
|
|
573
585
|
[[package]]
|
|
574
586
|
name = "tokio-util"
|
|
575
|
-
version = "0.7.
|
|
587
|
+
version = "0.7.19"
|
|
576
588
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
577
|
-
checksum = "
|
|
589
|
+
checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52"
|
|
578
590
|
dependencies = [
|
|
579
591
|
"bytes",
|
|
580
592
|
"futures-core",
|
|
581
593
|
"futures-sink",
|
|
582
594
|
"futures-util",
|
|
595
|
+
"libc",
|
|
583
596
|
"pin-project-lite",
|
|
584
597
|
"tokio",
|
|
585
598
|
]
|
|
@@ -619,6 +632,6 @@ dependencies = [
|
|
|
619
632
|
|
|
620
633
|
[[package]]
|
|
621
634
|
name = "zmij"
|
|
622
|
-
version = "1.0.
|
|
635
|
+
version = "1.0.23"
|
|
623
636
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
624
|
-
checksum = "
|
|
637
|
+
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
|
|
@@ -3,7 +3,7 @@ resolver = "2"
|
|
|
3
3
|
members = ["crates/codexcw", "bindings/python"]
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "0.
|
|
6
|
+
version = "0.6.0"
|
|
7
7
|
edition = "2021"
|
|
8
8
|
rust-version = "1.90"
|
|
9
9
|
license = "CC0-1.0"
|
|
@@ -12,7 +12,7 @@ homepage = "https://github.com/c3-oss/codexcw"
|
|
|
12
12
|
authors = ["c3-oss"]
|
|
13
13
|
|
|
14
14
|
[workspace.dependencies]
|
|
15
|
-
codexcw = { path = "crates/codexcw", version = "0.
|
|
15
|
+
codexcw = { path = "crates/codexcw", version = "0.6.0" }
|
|
16
16
|
tokio = { version = "1", default-features = false, features = [
|
|
17
17
|
"process",
|
|
18
18
|
"io-util",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codexcw
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
|
6
6
|
Classifier: Operating System :: POSIX
|
|
7
7
|
Classifier: Operating System :: MacOS
|
|
8
8
|
Classifier: Topic :: Software Development :: Libraries
|
|
9
|
-
Requires-Dist: pytest>=
|
|
10
|
-
Requires-Dist: pytest-asyncio>=0.24 ; extra == 'dev'
|
|
9
|
+
Requires-Dist: pytest>=9.0.3 ; python_full_version >= '3.10' and extra == 'dev'
|
|
10
|
+
Requires-Dist: pytest-asyncio>=0.24 ; python_full_version >= '3.10' and extra == 'dev'
|
|
11
11
|
Provides-Extra: dev
|
|
12
12
|
Summary: Run Codex, Claude Code, or Grok Build non-interactively from Python, backed by a Rust core.
|
|
13
13
|
Keywords: codex,automation,agent,cli
|
|
@@ -429,6 +429,7 @@ struct ReqData {
|
|
|
429
429
|
persistent: Option<bool>,
|
|
430
430
|
ignore_user_config: Option<bool>,
|
|
431
431
|
ignore_rules: Option<bool>,
|
|
432
|
+
cyber_access_program: Option<String>,
|
|
432
433
|
require_git_repo: Option<bool>,
|
|
433
434
|
output_schema_path: Option<String>,
|
|
434
435
|
output_schema: Option<String>,
|
|
@@ -451,6 +452,10 @@ impl ReqData {
|
|
|
451
452
|
Some(value) => Some(parse_approval(value)?),
|
|
452
453
|
None => None,
|
|
453
454
|
};
|
|
455
|
+
let cyber_access_program = match self.cyber_access_program.as_deref() {
|
|
456
|
+
Some(value) => Some(parse_cyber_access_program(value)?),
|
|
457
|
+
None => None,
|
|
458
|
+
};
|
|
454
459
|
Ok(Request {
|
|
455
460
|
prompt: self.prompt.unwrap_or_default(),
|
|
456
461
|
stdin: self.stdin.map(|s| s.into_bytes()),
|
|
@@ -476,6 +481,7 @@ impl ReqData {
|
|
|
476
481
|
persistent: self.persistent.unwrap_or(false),
|
|
477
482
|
ignore_user_config: self.ignore_user_config.unwrap_or(false),
|
|
478
483
|
ignore_rules: self.ignore_rules.unwrap_or(false),
|
|
484
|
+
cyber_access_program,
|
|
479
485
|
require_git_repo: self.require_git_repo.unwrap_or(false),
|
|
480
486
|
output_schema_path: self.output_schema_path,
|
|
481
487
|
output_schema: self.output_schema.map(|s| s.into_bytes()),
|
|
@@ -558,6 +564,17 @@ fn parse_approval(value: &str) -> Result<ApprovalPolicy, PyError> {
|
|
|
558
564
|
}
|
|
559
565
|
}
|
|
560
566
|
|
|
567
|
+
fn parse_cyber_access_program(value: &str) -> Result<codexcw::CyberAccessProgram, PyError> {
|
|
568
|
+
match value {
|
|
569
|
+
"standard" => Ok(codexcw::CyberAccessProgram::Standard),
|
|
570
|
+
"daybreak_blue" => Ok(codexcw::CyberAccessProgram::DaybreakBlue),
|
|
571
|
+
"daybreak_red" => Ok(codexcw::CyberAccessProgram::DaybreakRed),
|
|
572
|
+
other => Err(invalid_request(format!(
|
|
573
|
+
"unknown cyber access program: {other}"
|
|
574
|
+
))),
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
561
578
|
fn invalid_request(message: String) -> PyError {
|
|
562
579
|
PyError {
|
|
563
580
|
kind: "invalidRequest".to_string(),
|
|
@@ -142,6 +142,48 @@ def test_missing_prompt_raises_typed_error(tmp_path):
|
|
|
142
142
|
assert excinfo.value.kind == "promptRequired"
|
|
143
143
|
|
|
144
144
|
|
|
145
|
+
def test_cyber_access_program_is_passed_to_codex(tmp_path):
|
|
146
|
+
runner, args_file, _ = _runner_with_capture(tmp_path)
|
|
147
|
+
|
|
148
|
+
runner.run(Request(prompt="x", cyber_access_program="daybreak_blue"))
|
|
149
|
+
|
|
150
|
+
args = args_file.read_text().strip().split("\n")
|
|
151
|
+
index = args.index("--cyber-access-program")
|
|
152
|
+
assert args[index + 1] == "daybreak_blue"
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def test_cyber_access_program_keeps_request_positional_order():
|
|
156
|
+
fields = list(Request.__dataclass_fields__)
|
|
157
|
+
|
|
158
|
+
assert fields.index("require_git_repo") == 19
|
|
159
|
+
assert fields.index("resume_all") == 28
|
|
160
|
+
assert fields.index("cyber_access_program") == 29
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def test_unknown_cyber_access_program_is_rejected_before_codex_starts(tmp_path):
|
|
164
|
+
runner, args_file, _ = _runner_with_capture(tmp_path)
|
|
165
|
+
|
|
166
|
+
with pytest.raises(CodexcwError) as excinfo:
|
|
167
|
+
runner.run(Request(prompt="x", cyber_access_program="daybreak_green"))
|
|
168
|
+
|
|
169
|
+
assert excinfo.value.kind == "invalidRequest"
|
|
170
|
+
assert "unknown cyber access program" in str(excinfo.value)
|
|
171
|
+
assert not args_file.exists()
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
@pytest.mark.parametrize(
|
|
175
|
+
("agent", "executable"), [("claude", FAKE_CLAUDE), ("grok", FAKE_GROK)]
|
|
176
|
+
)
|
|
177
|
+
def test_claude_and_grok_agents_reject_cyber_access_program(agent, executable):
|
|
178
|
+
runner = Runner(agent=agent, executable=str(executable))
|
|
179
|
+
|
|
180
|
+
with pytest.raises(CodexcwError) as excinfo:
|
|
181
|
+
runner.run(Request(prompt="x", cyber_access_program="standard"))
|
|
182
|
+
|
|
183
|
+
assert excinfo.value.kind == "invalidRequest"
|
|
184
|
+
assert "cyber access program is not supported" in str(excinfo.value)
|
|
185
|
+
|
|
186
|
+
|
|
145
187
|
def test_invalid_agent_is_rejected_instead_of_falling_back_to_codex():
|
|
146
188
|
with pytest.raises(CodexcwError) as excinfo:
|
|
147
189
|
Runner(agent="unknown-agent")
|
|
@@ -17,21 +17,19 @@ wheels = [
|
|
|
17
17
|
|
|
18
18
|
[[package]]
|
|
19
19
|
name = "codexcw"
|
|
20
|
-
version = "0.
|
|
20
|
+
version = "0.6.0"
|
|
21
21
|
source = { editable = "." }
|
|
22
22
|
|
|
23
23
|
[package.optional-dependencies]
|
|
24
24
|
dev = [
|
|
25
|
-
{ name = "pytest",
|
|
26
|
-
{ name = "pytest",
|
|
27
|
-
{ name = "pytest-asyncio", version = "1.2.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" },
|
|
28
|
-
{ name = "pytest-asyncio", version = "1.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" },
|
|
25
|
+
{ name = "pytest", marker = "python_full_version >= '3.10'" },
|
|
26
|
+
{ name = "pytest-asyncio", marker = "python_full_version >= '3.10'" },
|
|
29
27
|
]
|
|
30
28
|
|
|
31
29
|
[package.metadata]
|
|
32
30
|
requires-dist = [
|
|
33
|
-
{ name = "pytest", marker = "extra == 'dev'", specifier = ">=
|
|
34
|
-
{ name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.24" },
|
|
31
|
+
{ name = "pytest", marker = "python_full_version >= '3.10' and extra == 'dev'", specifier = ">=9.0.3" },
|
|
32
|
+
{ name = "pytest-asyncio", marker = "python_full_version >= '3.10' and extra == 'dev'", specifier = ">=0.24" },
|
|
35
33
|
]
|
|
36
34
|
provides-extras = ["dev"]
|
|
37
35
|
|
|
@@ -49,32 +47,17 @@ name = "exceptiongroup"
|
|
|
49
47
|
version = "1.3.1"
|
|
50
48
|
source = { registry = "https://pypi.org/simple" }
|
|
51
49
|
dependencies = [
|
|
52
|
-
{ name = "typing-extensions", marker = "python_full_version < '3.13'" },
|
|
50
|
+
{ name = "typing-extensions", marker = "python_full_version >= '3.10' and python_full_version < '3.13'" },
|
|
53
51
|
]
|
|
54
52
|
sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" }
|
|
55
53
|
wheels = [
|
|
56
54
|
{ url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" },
|
|
57
55
|
]
|
|
58
56
|
|
|
59
|
-
[[package]]
|
|
60
|
-
name = "iniconfig"
|
|
61
|
-
version = "2.1.0"
|
|
62
|
-
source = { registry = "https://pypi.org/simple" }
|
|
63
|
-
resolution-markers = [
|
|
64
|
-
"python_full_version < '3.10'",
|
|
65
|
-
]
|
|
66
|
-
sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload-time = "2025-03-19T20:09:59.721Z" }
|
|
67
|
-
wheels = [
|
|
68
|
-
{ url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" },
|
|
69
|
-
]
|
|
70
|
-
|
|
71
57
|
[[package]]
|
|
72
58
|
name = "iniconfig"
|
|
73
59
|
version = "2.3.0"
|
|
74
60
|
source = { registry = "https://pypi.org/simple" }
|
|
75
|
-
resolution-markers = [
|
|
76
|
-
"python_full_version >= '3.10'",
|
|
77
|
-
]
|
|
78
61
|
sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" }
|
|
79
62
|
wheels = [
|
|
80
63
|
{ url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" },
|
|
@@ -107,38 +90,14 @@ wheels = [
|
|
|
107
90
|
{ url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" },
|
|
108
91
|
]
|
|
109
92
|
|
|
110
|
-
[[package]]
|
|
111
|
-
name = "pytest"
|
|
112
|
-
version = "8.4.2"
|
|
113
|
-
source = { registry = "https://pypi.org/simple" }
|
|
114
|
-
resolution-markers = [
|
|
115
|
-
"python_full_version < '3.10'",
|
|
116
|
-
]
|
|
117
|
-
dependencies = [
|
|
118
|
-
{ name = "colorama", marker = "python_full_version < '3.10' and sys_platform == 'win32'" },
|
|
119
|
-
{ name = "exceptiongroup", marker = "python_full_version < '3.10'" },
|
|
120
|
-
{ name = "iniconfig", version = "2.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" },
|
|
121
|
-
{ name = "packaging", marker = "python_full_version < '3.10'" },
|
|
122
|
-
{ name = "pluggy", marker = "python_full_version < '3.10'" },
|
|
123
|
-
{ name = "pygments", marker = "python_full_version < '3.10'" },
|
|
124
|
-
{ name = "tomli", marker = "python_full_version < '3.10'" },
|
|
125
|
-
]
|
|
126
|
-
sdist = { url = "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01", size = 1519618, upload-time = "2025-09-04T14:34:22.711Z" }
|
|
127
|
-
wheels = [
|
|
128
|
-
{ url = "https://files.pythonhosted.org/packages/a8/a4/20da314d277121d6534b3a980b29035dcd51e6744bd79075a6ce8fa4eb8d/pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79", size = 365750, upload-time = "2025-09-04T14:34:20.226Z" },
|
|
129
|
-
]
|
|
130
|
-
|
|
131
93
|
[[package]]
|
|
132
94
|
name = "pytest"
|
|
133
95
|
version = "9.1.1"
|
|
134
96
|
source = { registry = "https://pypi.org/simple" }
|
|
135
|
-
resolution-markers = [
|
|
136
|
-
"python_full_version >= '3.10'",
|
|
137
|
-
]
|
|
138
97
|
dependencies = [
|
|
139
98
|
{ name = "colorama", marker = "python_full_version >= '3.10' and sys_platform == 'win32'" },
|
|
140
99
|
{ name = "exceptiongroup", marker = "python_full_version == '3.10.*'" },
|
|
141
|
-
{ name = "iniconfig",
|
|
100
|
+
{ name = "iniconfig", marker = "python_full_version >= '3.10'" },
|
|
142
101
|
{ name = "packaging", marker = "python_full_version >= '3.10'" },
|
|
143
102
|
{ name = "pluggy", marker = "python_full_version >= '3.10'" },
|
|
144
103
|
{ name = "pygments", marker = "python_full_version >= '3.10'" },
|
|
@@ -149,33 +108,13 @@ wheels = [
|
|
|
149
108
|
{ url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" },
|
|
150
109
|
]
|
|
151
110
|
|
|
152
|
-
[[package]]
|
|
153
|
-
name = "pytest-asyncio"
|
|
154
|
-
version = "1.2.0"
|
|
155
|
-
source = { registry = "https://pypi.org/simple" }
|
|
156
|
-
resolution-markers = [
|
|
157
|
-
"python_full_version < '3.10'",
|
|
158
|
-
]
|
|
159
|
-
dependencies = [
|
|
160
|
-
{ name = "backports-asyncio-runner", marker = "python_full_version < '3.10'" },
|
|
161
|
-
{ name = "pytest", version = "8.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" },
|
|
162
|
-
{ name = "typing-extensions", marker = "python_full_version < '3.10'" },
|
|
163
|
-
]
|
|
164
|
-
sdist = { url = "https://files.pythonhosted.org/packages/42/86/9e3c5f48f7b7b638b216e4b9e645f54d199d7abbbab7a64a13b4e12ba10f/pytest_asyncio-1.2.0.tar.gz", hash = "sha256:c609a64a2a8768462d0c99811ddb8bd2583c33fd33cf7f21af1c142e824ffb57", size = 50119, upload-time = "2025-09-12T07:33:53.816Z" }
|
|
165
|
-
wheels = [
|
|
166
|
-
{ url = "https://files.pythonhosted.org/packages/04/93/2fa34714b7a4ae72f2f8dad66ba17dd9a2c793220719e736dda28b7aec27/pytest_asyncio-1.2.0-py3-none-any.whl", hash = "sha256:8e17ae5e46d8e7efe51ab6494dd2010f4ca8dae51652aa3c8d55acf50bfb2e99", size = 15095, upload-time = "2025-09-12T07:33:52.639Z" },
|
|
167
|
-
]
|
|
168
|
-
|
|
169
111
|
[[package]]
|
|
170
112
|
name = "pytest-asyncio"
|
|
171
113
|
version = "1.4.0"
|
|
172
114
|
source = { registry = "https://pypi.org/simple" }
|
|
173
|
-
resolution-markers = [
|
|
174
|
-
"python_full_version >= '3.10'",
|
|
175
|
-
]
|
|
176
115
|
dependencies = [
|
|
177
116
|
{ name = "backports-asyncio-runner", marker = "python_full_version == '3.10.*'" },
|
|
178
|
-
{ name = "pytest",
|
|
117
|
+
{ name = "pytest", marker = "python_full_version >= '3.10'" },
|
|
179
118
|
{ name = "typing-extensions", marker = "python_full_version >= '3.10' and python_full_version < '3.13'" },
|
|
180
119
|
]
|
|
181
120
|
sdist = { url = "https://files.pythonhosted.org/packages/43/7c/d36d04db312ecf4298932ef77e6e4a9e8ad017906e24e34f0b0c361a2473/pytest_asyncio-1.4.0.tar.gz", hash = "sha256:c6c0d2259945122819f171a32ecea2c349ead889ee28176caaf492143424be42", size = 58514, upload-time = "2026-05-26T09:56:04.083Z" }
|
|
@@ -175,6 +175,10 @@ fn append_common_args(
|
|
|
175
175
|
if req.ignore_rules {
|
|
176
176
|
args.push("--ignore-rules".to_string());
|
|
177
177
|
}
|
|
178
|
+
if let Some(program) = req.cyber_access_program {
|
|
179
|
+
args.push("--cyber-access-program".to_string());
|
|
180
|
+
args.push(program.as_str().to_string());
|
|
181
|
+
}
|
|
178
182
|
if req.dangerously_bypass_sandbox {
|
|
179
183
|
args.push("--dangerously-bypass-approvals-and-sandbox".to_string());
|
|
180
184
|
} else {
|
|
@@ -240,7 +244,7 @@ pub(crate) fn nonempty(value: &Option<String>) -> Option<String> {
|
|
|
240
244
|
#[cfg(test)]
|
|
241
245
|
mod tests {
|
|
242
246
|
use super::*;
|
|
243
|
-
use crate::request::ConfigOverride;
|
|
247
|
+
use crate::request::{ConfigOverride, CyberAccessProgram};
|
|
244
248
|
|
|
245
249
|
fn defaults() -> (SandboxMode, ApprovalPolicy) {
|
|
246
250
|
(SandboxMode::ReadOnly, ApprovalPolicy::Never)
|
|
@@ -286,6 +290,7 @@ mod tests {
|
|
|
286
290
|
strict_config: true,
|
|
287
291
|
ignore_user_config: true,
|
|
288
292
|
ignore_rules: true,
|
|
293
|
+
cyber_access_program: Some(CyberAccessProgram::DaybreakBlue),
|
|
289
294
|
output_schema: Some(br#"{"type":"object"}"#.to_vec()),
|
|
290
295
|
output_last_message_path: Some("last.txt".to_string()),
|
|
291
296
|
dangerously_bypass_hooks: true,
|
|
@@ -320,6 +325,8 @@ mod tests {
|
|
|
320
325
|
"--ephemeral",
|
|
321
326
|
"--ignore-user-config",
|
|
322
327
|
"--ignore-rules",
|
|
328
|
+
"--cyber-access-program",
|
|
329
|
+
"daybreak_blue",
|
|
323
330
|
"--sandbox",
|
|
324
331
|
"workspace-write",
|
|
325
332
|
"-c",
|
|
@@ -349,12 +356,18 @@ mod tests {
|
|
|
349
356
|
persistent: true,
|
|
350
357
|
sandbox: Some(SandboxMode::DangerFullAccess),
|
|
351
358
|
approval: Some(ApprovalPolicy::Untrusted),
|
|
359
|
+
cyber_access_program: Some(CyberAccessProgram::Standard),
|
|
352
360
|
..Default::default()
|
|
353
361
|
};
|
|
354
362
|
let prepared = prepare(&req, s, a).unwrap();
|
|
355
363
|
let args = &prepared.args;
|
|
356
364
|
assert_eq!(args[0], "exec");
|
|
357
365
|
assert_eq!(args[1], "resume");
|
|
366
|
+
let program_index = args
|
|
367
|
+
.iter()
|
|
368
|
+
.position(|a| a == "--cyber-access-program")
|
|
369
|
+
.unwrap();
|
|
370
|
+
assert_eq!(args[program_index + 1], "standard");
|
|
358
371
|
assert!(args.contains(&"--all".to_string()));
|
|
359
372
|
assert!(args.contains(&"thread-id".to_string()));
|
|
360
373
|
assert!(args.contains(&r#"sandbox_mode="danger-full-access""#.to_string()));
|
|
@@ -97,7 +97,7 @@ pub(crate) fn validate_claude_request(req: &Request) -> Result<(), Error> {
|
|
|
97
97
|
));
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
let unsupported: [(bool, &str);
|
|
100
|
+
let unsupported: [(bool, &str); 15] = [
|
|
101
101
|
(!req.images.is_empty(), "images"),
|
|
102
102
|
(
|
|
103
103
|
req.profile.as_deref().is_some_and(|p| !p.is_empty()),
|
|
@@ -111,6 +111,7 @@ pub(crate) fn validate_claude_request(req: &Request) -> Result<(), Error> {
|
|
|
111
111
|
(req.strict_config, "strict config"),
|
|
112
112
|
(req.ignore_user_config, "ignore user config"),
|
|
113
113
|
(req.ignore_rules, "ignore rules"),
|
|
114
|
+
(req.cyber_access_program.is_some(), "cyber access program"),
|
|
114
115
|
(req.require_git_repo, "require git repo"),
|
|
115
116
|
(
|
|
116
117
|
req.output_last_message_path
|
|
@@ -795,6 +796,11 @@ mod tests {
|
|
|
795
796
|
images: vec!["a.png".to_string()],
|
|
796
797
|
..Default::default()
|
|
797
798
|
},
|
|
799
|
+
Request {
|
|
800
|
+
prompt: "x".to_string(),
|
|
801
|
+
cyber_access_program: Some(crate::request::CyberAccessProgram::Standard),
|
|
802
|
+
..Default::default()
|
|
803
|
+
},
|
|
798
804
|
Request {
|
|
799
805
|
prompt: "x".to_string(),
|
|
800
806
|
resume_id: Some("id".to_string()),
|
|
@@ -141,7 +141,7 @@ fn validate_grok_request(req: &Request) -> Result<(), Error> {
|
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
let unsupported: [(bool, &str);
|
|
144
|
+
let unsupported: [(bool, &str); 13] = [
|
|
145
145
|
(!req.add_dirs.is_empty(), "add dirs"),
|
|
146
146
|
(!req.images.is_empty(), "images"),
|
|
147
147
|
(!req.config.is_empty(), "config overrides"),
|
|
@@ -150,6 +150,7 @@ fn validate_grok_request(req: &Request) -> Result<(), Error> {
|
|
|
150
150
|
(req.strict_config, "strict config"),
|
|
151
151
|
(req.ignore_user_config, "ignore user config"),
|
|
152
152
|
(req.ignore_rules, "ignore rules"),
|
|
153
|
+
(req.cyber_access_program.is_some(), "cyber access program"),
|
|
153
154
|
(req.require_git_repo, "require git repo"),
|
|
154
155
|
(
|
|
155
156
|
req.output_last_message_path
|
|
@@ -307,6 +308,11 @@ mod tests {
|
|
|
307
308
|
add_dirs: vec!["/other".to_string()],
|
|
308
309
|
..Default::default()
|
|
309
310
|
},
|
|
311
|
+
Request {
|
|
312
|
+
prompt: "x".to_string(),
|
|
313
|
+
cyber_access_program: Some(crate::request::CyberAccessProgram::Standard),
|
|
314
|
+
..Default::default()
|
|
315
|
+
},
|
|
310
316
|
Request {
|
|
311
317
|
prompt: "x".to_string(),
|
|
312
318
|
approval: Some(ApprovalPolicy::Never),
|
|
@@ -85,7 +85,8 @@ pub use event::{
|
|
|
85
85
|
};
|
|
86
86
|
pub use group::{Group, GroupResult, ManyOptions, RunEvent};
|
|
87
87
|
pub use request::{
|
|
88
|
-
claude_model, permission_mode, ApprovalPolicy, ConfigOverride,
|
|
88
|
+
claude_model, permission_mode, ApprovalPolicy, ConfigOverride, CyberAccessProgram, Request,
|
|
89
|
+
SandboxMode,
|
|
89
90
|
};
|
|
90
91
|
pub use runner::{handler, Agent, Handler, RunOptions, Runner, RunnerBuilder};
|
|
91
92
|
pub use session::{RunResult, Session};
|
|
@@ -56,6 +56,34 @@ impl std::fmt::Display for ApprovalPolicy {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/// Cyber access program requested from Codex for a run.
|
|
60
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
61
|
+
pub enum CyberAccessProgram {
|
|
62
|
+
/// The standard Cyber access program.
|
|
63
|
+
Standard,
|
|
64
|
+
/// The Daybreak Blue program.
|
|
65
|
+
DaybreakBlue,
|
|
66
|
+
/// The Daybreak Red program.
|
|
67
|
+
DaybreakRed,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
impl CyberAccessProgram {
|
|
71
|
+
/// Returns the wire string for this Cyber access program.
|
|
72
|
+
pub fn as_str(&self) -> &'static str {
|
|
73
|
+
match self {
|
|
74
|
+
CyberAccessProgram::Standard => "standard",
|
|
75
|
+
CyberAccessProgram::DaybreakBlue => "daybreak_blue",
|
|
76
|
+
CyberAccessProgram::DaybreakRed => "daybreak_red",
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
impl std::fmt::Display for CyberAccessProgram {
|
|
82
|
+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
83
|
+
f.write_str(self.as_str())
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
59
87
|
/// Model aliases accepted by the claude agent's `--model` flag.
|
|
60
88
|
pub mod claude_model {
|
|
61
89
|
/// The latest Claude Haiku model.
|
|
@@ -155,6 +183,8 @@ pub struct Request {
|
|
|
155
183
|
pub ignore_user_config: bool,
|
|
156
184
|
/// Skip user and project execpolicy `.rules` files.
|
|
157
185
|
pub ignore_rules: bool,
|
|
186
|
+
/// Cyber access program requested from Codex.
|
|
187
|
+
pub cyber_access_program: Option<CyberAccessProgram>,
|
|
158
188
|
/// Let Codex enforce its Git repository check.
|
|
159
189
|
pub require_git_repo: bool,
|
|
160
190
|
/// Path to a JSON Schema file for the final response.
|
|
@@ -216,6 +246,12 @@ impl Request {
|
|
|
216
246
|
self
|
|
217
247
|
}
|
|
218
248
|
|
|
249
|
+
/// Sets the Codex Cyber access program.
|
|
250
|
+
pub fn cyber_access_program(mut self, program: CyberAccessProgram) -> Self {
|
|
251
|
+
self.cyber_access_program = Some(program);
|
|
252
|
+
self
|
|
253
|
+
}
|
|
254
|
+
|
|
219
255
|
pub(crate) fn is_resume(&self) -> bool {
|
|
220
256
|
self.resume_id.as_deref().is_some_and(|id| !id.is_empty()) || self.resume_last
|
|
221
257
|
}
|
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "codexcw"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.6.0"
|
|
8
8
|
description = "Run Codex, Claude Code, or Grok Build non-interactively from Python, backed by a Rust core."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -24,7 +24,10 @@ Homepage = "https://github.com/c3-oss/codexcw"
|
|
|
24
24
|
Repository = "https://github.com/c3-oss/codexcw"
|
|
25
25
|
|
|
26
26
|
[project.optional-dependencies]
|
|
27
|
-
dev = [
|
|
27
|
+
dev = [
|
|
28
|
+
"pytest>=9.0.3; python_version >= '3.10'",
|
|
29
|
+
"pytest-asyncio>=0.24; python_version >= '3.10'",
|
|
30
|
+
]
|
|
28
31
|
|
|
29
32
|
[tool.maturin]
|
|
30
33
|
module-name = "codexcw._codexcw"
|
|
@@ -71,6 +71,7 @@ __all__ = [
|
|
|
71
71
|
"ApprovalPolicy",
|
|
72
72
|
"CodexcwError",
|
|
73
73
|
"ConfigOverride",
|
|
74
|
+
"CyberAccessProgram",
|
|
74
75
|
"Event",
|
|
75
76
|
"FileChange",
|
|
76
77
|
"Group",
|
|
@@ -92,6 +93,10 @@ __all__ = [
|
|
|
92
93
|
SandboxMode = str
|
|
93
94
|
ApprovalPolicy = str
|
|
94
95
|
|
|
96
|
+
# String literals accepted by ``Request.cyber_access_program``: ``standard``,
|
|
97
|
+
# ``daybreak_blue``, or ``daybreak_red``. Codex only.
|
|
98
|
+
CyberAccessProgram = str
|
|
99
|
+
|
|
95
100
|
# String literals accepted by ``Runner(agent=...)`` and
|
|
96
101
|
# ``Request.permission_mode``.
|
|
97
102
|
Agent = str
|
|
@@ -232,6 +237,7 @@ class Request:
|
|
|
232
237
|
resume_id: Optional[str] = None
|
|
233
238
|
resume_last: bool = False
|
|
234
239
|
resume_all: bool = False
|
|
240
|
+
cyber_access_program: Optional[CyberAccessProgram] = None
|
|
235
241
|
|
|
236
242
|
|
|
237
243
|
@dataclass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|