codex-python 0.2.13__tar.gz → 0.2.14__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.
- {codex_python-0.2.13 → codex_python-0.2.14}/PKG-INFO +1 -1
- {codex_python-0.2.13 → codex_python-0.2.14}/codex/__init__.py +1 -1
- {codex_python-0.2.13 → codex_python-0.2.14}/codex/api.py +23 -3
- codex_python-0.2.14/codex/event.py +29 -0
- {codex_python-0.2.13 → codex_python-0.2.14}/codex/protocol/types.py +13 -5
- {codex_python-0.2.13 → codex_python-0.2.14}/crates/codex_native/Cargo.lock +232 -6
- {codex_python-0.2.13 → codex_python-0.2.14}/crates/codex_native/Cargo.toml +3 -3
- {codex_python-0.2.13 → codex_python-0.2.14}/crates/codex_native/src/lib.rs +0 -2
- codex_python-0.2.13/codex/event.py +0 -16
- {codex_python-0.2.13 → codex_python-0.2.14}/LICENSE +0 -0
- {codex_python-0.2.13 → codex_python-0.2.14}/README.md +0 -0
- {codex_python-0.2.13 → codex_python-0.2.14}/codex/config.py +0 -0
- {codex_python-0.2.13 → codex_python-0.2.14}/codex/native.py +0 -0
- {codex_python-0.2.13 → codex_python-0.2.14}/codex/protocol/_base_model.py +0 -0
- {codex_python-0.2.13 → codex_python-0.2.14}/codex/py.typed +0 -0
- {codex_python-0.2.13 → codex_python-0.2.14}/crates/codex_native/src/bin/protocol_schema.rs +0 -0
- {codex_python-0.2.13 → codex_python-0.2.14}/pyproject.toml +0 -0
|
@@ -4,7 +4,7 @@ from collections.abc import Iterable, Iterator, Mapping, Sequence
|
|
|
4
4
|
from dataclasses import dataclass
|
|
5
5
|
|
|
6
6
|
from .config import CodexConfig
|
|
7
|
-
from .event import Event
|
|
7
|
+
from .event import AnyEventMsg, Event
|
|
8
8
|
from .native import run_exec_collect as native_run_exec_collect
|
|
9
9
|
from .native import start_exec_stream as native_start_exec_stream
|
|
10
10
|
|
|
@@ -32,7 +32,15 @@ class Conversation:
|
|
|
32
32
|
def __iter__(self) -> Iterator[Event]:
|
|
33
33
|
"""Yield `Event` objects from the native stream."""
|
|
34
34
|
for item in self._stream:
|
|
35
|
-
|
|
35
|
+
try:
|
|
36
|
+
yield Event.model_validate(item)
|
|
37
|
+
except Exception:
|
|
38
|
+
ev_id = item.get("id") if isinstance(item, dict) else None
|
|
39
|
+
msg_obj = item.get("msg") if isinstance(item, dict) else None
|
|
40
|
+
if isinstance(msg_obj, dict) and isinstance(msg_obj.get("type"), str):
|
|
41
|
+
yield Event(id=ev_id or "unknown", msg=AnyEventMsg(**msg_obj))
|
|
42
|
+
else:
|
|
43
|
+
yield Event(id=ev_id or "unknown", msg=AnyEventMsg(type="unknown"))
|
|
36
44
|
|
|
37
45
|
|
|
38
46
|
@dataclass(slots=True)
|
|
@@ -88,6 +96,18 @@ def run_exec(
|
|
|
88
96
|
config_overrides=config.to_dict() if config else None,
|
|
89
97
|
load_default_config=load_default_config,
|
|
90
98
|
)
|
|
91
|
-
return [Event.model_validate(e) for e in events]
|
|
92
99
|
except RuntimeError as e:
|
|
93
100
|
raise CodexNativeError() from e
|
|
101
|
+
|
|
102
|
+
out: list[Event] = []
|
|
103
|
+
for item in events:
|
|
104
|
+
try:
|
|
105
|
+
out.append(Event.model_validate(item))
|
|
106
|
+
except Exception:
|
|
107
|
+
ev_id = item.get("id") if isinstance(item, dict) else None
|
|
108
|
+
msg_obj = item.get("msg") if isinstance(item, dict) else None
|
|
109
|
+
if isinstance(msg_obj, dict) and isinstance(msg_obj.get("type"), str):
|
|
110
|
+
out.append(Event(id=ev_id or "unknown", msg=AnyEventMsg(**msg_obj)))
|
|
111
|
+
else:
|
|
112
|
+
out.append(Event(id=ev_id or "unknown", msg=AnyEventMsg(type="unknown")))
|
|
113
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pydantic import BaseModel
|
|
4
|
+
from pydantic.config import ConfigDict
|
|
5
|
+
|
|
6
|
+
from .protocol.types import EventMsg
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AnyEventMsg(BaseModel):
|
|
10
|
+
"""Fallback event payload that preserves the original `type` and fields.
|
|
11
|
+
|
|
12
|
+
Accepts any additional keys to retain upstream payloads when strict
|
|
13
|
+
validation fails for generated models.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
type: str
|
|
17
|
+
|
|
18
|
+
# Allow arbitrary extra fields so we don't lose information
|
|
19
|
+
model_config = ConfigDict(extra="allow")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Event(BaseModel):
|
|
23
|
+
"""Protocol event envelope with typed `msg` (union of EventMsg_*)."""
|
|
24
|
+
|
|
25
|
+
id: str
|
|
26
|
+
msg: EventMsg | AnyEventMsg
|
|
27
|
+
|
|
28
|
+
# Allow forward compatibility with additional envelope fields
|
|
29
|
+
model_config = ConfigDict(extra="allow")
|
|
@@ -7,7 +7,7 @@ from __future__ import annotations
|
|
|
7
7
|
from enum import Enum
|
|
8
8
|
from typing import Any, Literal
|
|
9
9
|
|
|
10
|
-
from pydantic import Field, RootModel
|
|
10
|
+
from pydantic import ConfigDict, Field, RootModel
|
|
11
11
|
|
|
12
12
|
from codex.protocol._base_model import BaseModelWithExtras
|
|
13
13
|
|
|
@@ -140,10 +140,18 @@ class ExecCommandApprovalParams(BaseModelWithExtras):
|
|
|
140
140
|
reason: str | None = None
|
|
141
141
|
|
|
142
142
|
|
|
143
|
+
class Duration(BaseModelWithExtras):
|
|
144
|
+
model_config = ConfigDict(
|
|
145
|
+
extra="forbid",
|
|
146
|
+
)
|
|
147
|
+
secs: int
|
|
148
|
+
nanos: int
|
|
149
|
+
|
|
150
|
+
|
|
143
151
|
class ExecCommandEndEvent(BaseModelWithExtras):
|
|
144
152
|
aggregated_output: str = Field(..., description="Captured aggregated output")
|
|
145
153
|
call_id: str = Field(..., description="Identifier for the ExecCommandBegin that finished.")
|
|
146
|
-
duration: str
|
|
154
|
+
duration: str | Duration
|
|
147
155
|
exit_code: int = Field(..., description="The command's exit code.")
|
|
148
156
|
formatted_output: str = Field(
|
|
149
157
|
..., description="Formatted output from the command, as seen by the model."
|
|
@@ -765,7 +773,7 @@ class EventMsgExecCommandOutputDelta(BaseModelWithExtras):
|
|
|
765
773
|
class EventMsgExecCommandEnd(BaseModelWithExtras):
|
|
766
774
|
aggregated_output: str = Field(..., description="Captured aggregated output")
|
|
767
775
|
call_id: str = Field(..., description="Identifier for the ExecCommandBegin that finished.")
|
|
768
|
-
duration: str
|
|
776
|
+
duration: str | Duration
|
|
769
777
|
exit_code: int = Field(..., description="The command's exit code.")
|
|
770
778
|
formatted_output: str = Field(
|
|
771
779
|
..., description="Formatted output from the command, as seen by the model."
|
|
@@ -1438,7 +1446,7 @@ class McpToolCallEndEvent(BaseModelWithExtras):
|
|
|
1438
1446
|
...,
|
|
1439
1447
|
description="Identifier for the corresponding McpToolCallBegin that finished.",
|
|
1440
1448
|
)
|
|
1441
|
-
duration: str
|
|
1449
|
+
duration: str | Duration
|
|
1442
1450
|
invocation: McpInvocation
|
|
1443
1451
|
result: Result | Result1 = Field(
|
|
1444
1452
|
..., description="Result of the tool call. Note this could be an error."
|
|
@@ -1450,7 +1458,7 @@ class EventMsgMcpToolCallEnd(BaseModelWithExtras):
|
|
|
1450
1458
|
...,
|
|
1451
1459
|
description="Identifier for the corresponding McpToolCallBegin that finished.",
|
|
1452
1460
|
)
|
|
1453
|
-
duration: str
|
|
1461
|
+
duration: str | Duration
|
|
1454
1462
|
invocation: McpInvocation
|
|
1455
1463
|
result: Result | Result1 = Field(
|
|
1456
1464
|
..., description="Result of the tool call. Note this could be an error."
|
|
@@ -91,6 +91,50 @@ version = "1.0.99"
|
|
|
91
91
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
92
92
|
checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100"
|
|
93
93
|
|
|
94
|
+
[[package]]
|
|
95
|
+
name = "askama"
|
|
96
|
+
version = "0.12.1"
|
|
97
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
98
|
+
checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28"
|
|
99
|
+
dependencies = [
|
|
100
|
+
"askama_derive",
|
|
101
|
+
"askama_escape",
|
|
102
|
+
"humansize",
|
|
103
|
+
"num-traits",
|
|
104
|
+
"percent-encoding",
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
[[package]]
|
|
108
|
+
name = "askama_derive"
|
|
109
|
+
version = "0.12.5"
|
|
110
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
111
|
+
checksum = "19fe8d6cb13c4714962c072ea496f3392015f0989b1a2847bb4b2d9effd71d83"
|
|
112
|
+
dependencies = [
|
|
113
|
+
"askama_parser",
|
|
114
|
+
"basic-toml",
|
|
115
|
+
"mime",
|
|
116
|
+
"mime_guess",
|
|
117
|
+
"proc-macro2",
|
|
118
|
+
"quote",
|
|
119
|
+
"serde",
|
|
120
|
+
"syn",
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
[[package]]
|
|
124
|
+
name = "askama_escape"
|
|
125
|
+
version = "0.10.3"
|
|
126
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
127
|
+
checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341"
|
|
128
|
+
|
|
129
|
+
[[package]]
|
|
130
|
+
name = "askama_parser"
|
|
131
|
+
version = "0.2.1"
|
|
132
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
133
|
+
checksum = "acb1161c6b64d1c3d83108213c2a2533a342ac225aabd0bda218278c2ddb00c0"
|
|
134
|
+
dependencies = [
|
|
135
|
+
"nom",
|
|
136
|
+
]
|
|
137
|
+
|
|
94
138
|
[[package]]
|
|
95
139
|
name = "async-channel"
|
|
96
140
|
version = "2.5.0"
|
|
@@ -136,6 +180,15 @@ version = "0.22.1"
|
|
|
136
180
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
137
181
|
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
|
138
182
|
|
|
183
|
+
[[package]]
|
|
184
|
+
name = "basic-toml"
|
|
185
|
+
version = "0.1.10"
|
|
186
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
187
|
+
checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a"
|
|
188
|
+
dependencies = [
|
|
189
|
+
"serde",
|
|
190
|
+
]
|
|
191
|
+
|
|
139
192
|
[[package]]
|
|
140
193
|
name = "bitflags"
|
|
141
194
|
version = "1.3.2"
|
|
@@ -157,6 +210,16 @@ dependencies = [
|
|
|
157
210
|
"generic-array",
|
|
158
211
|
]
|
|
159
212
|
|
|
213
|
+
[[package]]
|
|
214
|
+
name = "bstr"
|
|
215
|
+
version = "1.12.0"
|
|
216
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
217
|
+
checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4"
|
|
218
|
+
dependencies = [
|
|
219
|
+
"memchr",
|
|
220
|
+
"serde",
|
|
221
|
+
]
|
|
222
|
+
|
|
160
223
|
[[package]]
|
|
161
224
|
name = "bumpalo"
|
|
162
225
|
version = "3.19.0"
|
|
@@ -248,7 +311,7 @@ checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"
|
|
|
248
311
|
[[package]]
|
|
249
312
|
name = "codex-apply-patch"
|
|
250
313
|
version = "0.0.0"
|
|
251
|
-
source = "git+https://github.com/openai/codex?
|
|
314
|
+
source = "git+https://github.com/openai/codex?branch=main#fdf4a686463f13b56ee83f807bccbe3457542564"
|
|
252
315
|
dependencies = [
|
|
253
316
|
"anyhow",
|
|
254
317
|
"once_cell",
|
|
@@ -261,14 +324,16 @@ dependencies = [
|
|
|
261
324
|
[[package]]
|
|
262
325
|
name = "codex-core"
|
|
263
326
|
version = "0.0.0"
|
|
264
|
-
source = "git+https://github.com/openai/codex?
|
|
327
|
+
source = "git+https://github.com/openai/codex?branch=main#fdf4a686463f13b56ee83f807bccbe3457542564"
|
|
265
328
|
dependencies = [
|
|
266
329
|
"anyhow",
|
|
330
|
+
"askama",
|
|
267
331
|
"async-channel",
|
|
268
332
|
"base64",
|
|
269
333
|
"bytes",
|
|
270
334
|
"chrono",
|
|
271
335
|
"codex-apply-patch",
|
|
336
|
+
"codex-file-search",
|
|
272
337
|
"codex-mcp-client",
|
|
273
338
|
"codex-protocol",
|
|
274
339
|
"dirs",
|
|
@@ -306,10 +371,24 @@ dependencies = [
|
|
|
306
371
|
"wildmatch",
|
|
307
372
|
]
|
|
308
373
|
|
|
374
|
+
[[package]]
|
|
375
|
+
name = "codex-file-search"
|
|
376
|
+
version = "0.0.0"
|
|
377
|
+
source = "git+https://github.com/openai/codex?branch=main#fdf4a686463f13b56ee83f807bccbe3457542564"
|
|
378
|
+
dependencies = [
|
|
379
|
+
"anyhow",
|
|
380
|
+
"clap",
|
|
381
|
+
"ignore",
|
|
382
|
+
"nucleo-matcher",
|
|
383
|
+
"serde",
|
|
384
|
+
"serde_json",
|
|
385
|
+
"tokio",
|
|
386
|
+
]
|
|
387
|
+
|
|
309
388
|
[[package]]
|
|
310
389
|
name = "codex-mcp-client"
|
|
311
390
|
version = "0.0.0"
|
|
312
|
-
source = "git+https://github.com/openai/codex?
|
|
391
|
+
source = "git+https://github.com/openai/codex?branch=main#fdf4a686463f13b56ee83f807bccbe3457542564"
|
|
313
392
|
dependencies = [
|
|
314
393
|
"anyhow",
|
|
315
394
|
"mcp-types",
|
|
@@ -323,7 +402,7 @@ dependencies = [
|
|
|
323
402
|
[[package]]
|
|
324
403
|
name = "codex-protocol"
|
|
325
404
|
version = "0.0.0"
|
|
326
|
-
source = "git+https://github.com/openai/codex?
|
|
405
|
+
source = "git+https://github.com/openai/codex?branch=main#fdf4a686463f13b56ee83f807bccbe3457542564"
|
|
327
406
|
dependencies = [
|
|
328
407
|
"base64",
|
|
329
408
|
"icu_decimal",
|
|
@@ -343,7 +422,7 @@ dependencies = [
|
|
|
343
422
|
|
|
344
423
|
[[package]]
|
|
345
424
|
name = "codex_native"
|
|
346
|
-
version = "0.2.
|
|
425
|
+
version = "0.2.14"
|
|
347
426
|
dependencies = [
|
|
348
427
|
"anyhow",
|
|
349
428
|
"clap",
|
|
@@ -400,6 +479,25 @@ dependencies = [
|
|
|
400
479
|
"libc",
|
|
401
480
|
]
|
|
402
481
|
|
|
482
|
+
[[package]]
|
|
483
|
+
name = "crossbeam-deque"
|
|
484
|
+
version = "0.8.6"
|
|
485
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
486
|
+
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
|
|
487
|
+
dependencies = [
|
|
488
|
+
"crossbeam-epoch",
|
|
489
|
+
"crossbeam-utils",
|
|
490
|
+
]
|
|
491
|
+
|
|
492
|
+
[[package]]
|
|
493
|
+
name = "crossbeam-epoch"
|
|
494
|
+
version = "0.9.18"
|
|
495
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
496
|
+
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
|
497
|
+
dependencies = [
|
|
498
|
+
"crossbeam-utils",
|
|
499
|
+
]
|
|
500
|
+
|
|
403
501
|
[[package]]
|
|
404
502
|
name = "crossbeam-utils"
|
|
405
503
|
version = "0.8.21"
|
|
@@ -796,6 +894,19 @@ version = "0.31.1"
|
|
|
796
894
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
797
895
|
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
|
|
798
896
|
|
|
897
|
+
[[package]]
|
|
898
|
+
name = "globset"
|
|
899
|
+
version = "0.4.16"
|
|
900
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
901
|
+
checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5"
|
|
902
|
+
dependencies = [
|
|
903
|
+
"aho-corasick",
|
|
904
|
+
"bstr",
|
|
905
|
+
"log",
|
|
906
|
+
"regex-automata",
|
|
907
|
+
"regex-syntax",
|
|
908
|
+
]
|
|
909
|
+
|
|
799
910
|
[[package]]
|
|
800
911
|
name = "h2"
|
|
801
912
|
version = "0.4.12"
|
|
@@ -888,6 +999,15 @@ version = "1.10.1"
|
|
|
888
999
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
889
1000
|
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
|
|
890
1001
|
|
|
1002
|
+
[[package]]
|
|
1003
|
+
name = "humansize"
|
|
1004
|
+
version = "2.1.3"
|
|
1005
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1006
|
+
checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7"
|
|
1007
|
+
dependencies = [
|
|
1008
|
+
"libm",
|
|
1009
|
+
]
|
|
1010
|
+
|
|
891
1011
|
[[package]]
|
|
892
1012
|
name = "hyper"
|
|
893
1013
|
version = "1.7.0"
|
|
@@ -1150,6 +1270,22 @@ dependencies = [
|
|
|
1150
1270
|
"icu_properties",
|
|
1151
1271
|
]
|
|
1152
1272
|
|
|
1273
|
+
[[package]]
|
|
1274
|
+
name = "ignore"
|
|
1275
|
+
version = "0.4.23"
|
|
1276
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1277
|
+
checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b"
|
|
1278
|
+
dependencies = [
|
|
1279
|
+
"crossbeam-deque",
|
|
1280
|
+
"globset",
|
|
1281
|
+
"log",
|
|
1282
|
+
"memchr",
|
|
1283
|
+
"regex-automata",
|
|
1284
|
+
"same-file",
|
|
1285
|
+
"walkdir",
|
|
1286
|
+
"winapi-util",
|
|
1287
|
+
]
|
|
1288
|
+
|
|
1153
1289
|
[[package]]
|
|
1154
1290
|
name = "indexmap"
|
|
1155
1291
|
version = "1.9.3"
|
|
@@ -1250,6 +1386,12 @@ version = "0.2.175"
|
|
|
1250
1386
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1251
1387
|
checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
|
|
1252
1388
|
|
|
1389
|
+
[[package]]
|
|
1390
|
+
name = "libm"
|
|
1391
|
+
version = "0.2.15"
|
|
1392
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1393
|
+
checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
|
|
1394
|
+
|
|
1253
1395
|
[[package]]
|
|
1254
1396
|
name = "libredox"
|
|
1255
1397
|
version = "0.1.10"
|
|
@@ -1278,6 +1420,16 @@ version = "0.8.0"
|
|
|
1278
1420
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1279
1421
|
checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956"
|
|
1280
1422
|
|
|
1423
|
+
[[package]]
|
|
1424
|
+
name = "lock_api"
|
|
1425
|
+
version = "0.4.13"
|
|
1426
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1427
|
+
checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"
|
|
1428
|
+
dependencies = [
|
|
1429
|
+
"autocfg",
|
|
1430
|
+
"scopeguard",
|
|
1431
|
+
]
|
|
1432
|
+
|
|
1281
1433
|
[[package]]
|
|
1282
1434
|
name = "log"
|
|
1283
1435
|
version = "0.4.28"
|
|
@@ -1296,7 +1448,7 @@ dependencies = [
|
|
|
1296
1448
|
[[package]]
|
|
1297
1449
|
name = "mcp-types"
|
|
1298
1450
|
version = "0.0.0"
|
|
1299
|
-
source = "git+https://github.com/openai/codex?
|
|
1451
|
+
source = "git+https://github.com/openai/codex?branch=main#fdf4a686463f13b56ee83f807bccbe3457542564"
|
|
1300
1452
|
dependencies = [
|
|
1301
1453
|
"serde",
|
|
1302
1454
|
"serde_json",
|
|
@@ -1408,6 +1560,16 @@ dependencies = [
|
|
|
1408
1560
|
"windows-sys 0.52.0",
|
|
1409
1561
|
]
|
|
1410
1562
|
|
|
1563
|
+
[[package]]
|
|
1564
|
+
name = "nucleo-matcher"
|
|
1565
|
+
version = "0.3.1"
|
|
1566
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1567
|
+
checksum = "bf33f538733d1a5a3494b836ba913207f14d9d4a1d3cd67030c5061bdd2cac85"
|
|
1568
|
+
dependencies = [
|
|
1569
|
+
"memchr",
|
|
1570
|
+
"unicode-segmentation",
|
|
1571
|
+
]
|
|
1572
|
+
|
|
1411
1573
|
[[package]]
|
|
1412
1574
|
name = "num-conv"
|
|
1413
1575
|
version = "0.1.0"
|
|
@@ -1531,6 +1693,29 @@ version = "2.2.1"
|
|
|
1531
1693
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1532
1694
|
checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"
|
|
1533
1695
|
|
|
1696
|
+
[[package]]
|
|
1697
|
+
name = "parking_lot"
|
|
1698
|
+
version = "0.12.4"
|
|
1699
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1700
|
+
checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"
|
|
1701
|
+
dependencies = [
|
|
1702
|
+
"lock_api",
|
|
1703
|
+
"parking_lot_core",
|
|
1704
|
+
]
|
|
1705
|
+
|
|
1706
|
+
[[package]]
|
|
1707
|
+
name = "parking_lot_core"
|
|
1708
|
+
version = "0.9.11"
|
|
1709
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1710
|
+
checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5"
|
|
1711
|
+
dependencies = [
|
|
1712
|
+
"cfg-if",
|
|
1713
|
+
"libc",
|
|
1714
|
+
"redox_syscall",
|
|
1715
|
+
"smallvec",
|
|
1716
|
+
"windows-targets 0.52.6",
|
|
1717
|
+
]
|
|
1718
|
+
|
|
1534
1719
|
[[package]]
|
|
1535
1720
|
name = "pathdiff"
|
|
1536
1721
|
version = "0.2.3"
|
|
@@ -1749,6 +1934,15 @@ dependencies = [
|
|
|
1749
1934
|
"getrandom 0.3.3",
|
|
1750
1935
|
]
|
|
1751
1936
|
|
|
1937
|
+
[[package]]
|
|
1938
|
+
name = "redox_syscall"
|
|
1939
|
+
version = "0.5.17"
|
|
1940
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1941
|
+
checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77"
|
|
1942
|
+
dependencies = [
|
|
1943
|
+
"bitflags 2.9.4",
|
|
1944
|
+
]
|
|
1945
|
+
|
|
1752
1946
|
[[package]]
|
|
1753
1947
|
name = "redox_users"
|
|
1754
1948
|
version = "0.5.2"
|
|
@@ -1949,6 +2143,15 @@ version = "1.0.20"
|
|
|
1949
2143
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1950
2144
|
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
|
1951
2145
|
|
|
2146
|
+
[[package]]
|
|
2147
|
+
name = "same-file"
|
|
2148
|
+
version = "1.0.6"
|
|
2149
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2150
|
+
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
|
2151
|
+
dependencies = [
|
|
2152
|
+
"winapi-util",
|
|
2153
|
+
]
|
|
2154
|
+
|
|
1952
2155
|
[[package]]
|
|
1953
2156
|
name = "schannel"
|
|
1954
2157
|
version = "0.1.28"
|
|
@@ -1982,6 +2185,12 @@ dependencies = [
|
|
|
1982
2185
|
"serde_json",
|
|
1983
2186
|
]
|
|
1984
2187
|
|
|
2188
|
+
[[package]]
|
|
2189
|
+
name = "scopeguard"
|
|
2190
|
+
version = "1.2.0"
|
|
2191
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2192
|
+
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
2193
|
+
|
|
1985
2194
|
[[package]]
|
|
1986
2195
|
name = "seccompiler"
|
|
1987
2196
|
version = "0.5.0"
|
|
@@ -2434,6 +2643,7 @@ dependencies = [
|
|
|
2434
2643
|
"io-uring",
|
|
2435
2644
|
"libc",
|
|
2436
2645
|
"mio",
|
|
2646
|
+
"parking_lot",
|
|
2437
2647
|
"pin-project-lite",
|
|
2438
2648
|
"signal-hook-registry",
|
|
2439
2649
|
"slab",
|
|
@@ -2723,6 +2933,12 @@ version = "1.0.19"
|
|
|
2723
2933
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2724
2934
|
checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
|
|
2725
2935
|
|
|
2936
|
+
[[package]]
|
|
2937
|
+
name = "unicode-segmentation"
|
|
2938
|
+
version = "1.12.0"
|
|
2939
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2940
|
+
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
|
|
2941
|
+
|
|
2726
2942
|
[[package]]
|
|
2727
2943
|
name = "unindent"
|
|
2728
2944
|
version = "0.2.4"
|
|
@@ -2789,6 +3005,16 @@ version = "0.9.5"
|
|
|
2789
3005
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2790
3006
|
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
|
2791
3007
|
|
|
3008
|
+
[[package]]
|
|
3009
|
+
name = "walkdir"
|
|
3010
|
+
version = "2.5.0"
|
|
3011
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3012
|
+
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
|
|
3013
|
+
dependencies = [
|
|
3014
|
+
"same-file",
|
|
3015
|
+
"winapi-util",
|
|
3016
|
+
]
|
|
3017
|
+
|
|
2792
3018
|
[[package]]
|
|
2793
3019
|
name = "want"
|
|
2794
3020
|
version = "0.3.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "codex_native"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.14"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
|
|
6
6
|
[lib]
|
|
@@ -25,8 +25,8 @@ pathdiff = "0.2"
|
|
|
25
25
|
|
|
26
26
|
# Upstream Codex crates from the monorepo (use git deps; pin to main for now)
|
|
27
27
|
# Pin to a specific commit of the upstream Codex monorepo to avoid breaking API changes
|
|
28
|
-
codex-core = { git = "https://github.com/openai/codex", package = "codex-core",
|
|
29
|
-
codex-protocol = { git = "https://github.com/openai/codex", package = "codex-protocol",
|
|
28
|
+
codex-core = { git = "https://github.com/openai/codex", package = "codex-core", branch = "main" }
|
|
29
|
+
codex-protocol = { git = "https://github.com/openai/codex", package = "codex-protocol", branch = "main" }
|
|
30
30
|
|
|
31
31
|
# Tell maturin to include the Python sources from the repo root (mixed project)
|
|
32
32
|
[package.metadata.maturin]
|
|
@@ -40,7 +40,6 @@ fn run_exec_collect(
|
|
|
40
40
|
async fn run_exec_impl(prompt: String, config: Config) -> Result<Vec<JsonValue>> {
|
|
41
41
|
let conversation_manager = ConversationManager::new(AuthManager::shared(
|
|
42
42
|
config.codex_home.clone(),
|
|
43
|
-
config.preferred_auth_method,
|
|
44
43
|
));
|
|
45
44
|
let new_conv = conversation_manager.new_conversation(config).await?;
|
|
46
45
|
let conversation = new_conv.conversation.clone();
|
|
@@ -400,7 +399,6 @@ fn run_exec_stream_impl(prompt: String, config: Config, tx: mpsc::Sender<JsonVal
|
|
|
400
399
|
rt.block_on(async move {
|
|
401
400
|
let conversation_manager = ConversationManager::new(AuthManager::shared(
|
|
402
401
|
config.codex_home.clone(),
|
|
403
|
-
config.preferred_auth_method,
|
|
404
402
|
));
|
|
405
403
|
let new_conv = conversation_manager.new_conversation(config).await?;
|
|
406
404
|
let conversation = new_conv.conversation.clone();
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from pydantic import BaseModel
|
|
4
|
-
from pydantic.config import ConfigDict
|
|
5
|
-
|
|
6
|
-
from .protocol.types import EventMsg
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Event(BaseModel):
|
|
10
|
-
"""Protocol event envelope with typed `msg` (union of EventMsg_*)."""
|
|
11
|
-
|
|
12
|
-
id: str
|
|
13
|
-
msg: EventMsg
|
|
14
|
-
|
|
15
|
-
# Allow forward compatibility with additional envelope fields
|
|
16
|
-
model_config = ConfigDict(extra="allow")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|