codexed 0.1.5__tar.gz → 1.0.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.
Files changed (45) hide show
  1. {codexed-0.1.5 → codexed-1.0.0}/PKG-INFO +1 -1
  2. {codexed-0.1.5 → codexed-1.0.0}/pyproject.toml +4 -4
  3. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/README.md +7 -9
  4. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/__init__.py +73 -87
  5. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/client/client.py +75 -381
  6. codexed-1.0.0/src/codexed/client/session.py +465 -0
  7. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/models/__init__.py +398 -433
  8. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/models/codex_types.py +1 -85
  9. codexed-1.0.0/src/codexed/models/event_data.py +68 -0
  10. codexed-1.0.0/src/codexed/models/events.py +318 -0
  11. codexed-1.0.0/src/codexed/models/misc.py +255 -0
  12. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/models/request_params.py +43 -259
  13. codexed-1.0.0/src/codexed/models/response_item.py +99 -0
  14. codexed-1.0.0/src/codexed/models/responses.py +175 -0
  15. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/models/thread_item.py +13 -62
  16. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/models/user_input.py +1 -20
  17. codexed-1.0.0/src/codexed/models/v2_protocol.py +5179 -0
  18. codexed-0.1.5/src/codexed/client/session.py +0 -238
  19. codexed-0.1.5/src/codexed/models/command_action.py +0 -48
  20. codexed-0.1.5/src/codexed/models/event_data.py +0 -394
  21. codexed-0.1.5/src/codexed/models/events.py +0 -716
  22. codexed-0.1.5/src/codexed/models/fuzzy_search.py +0 -106
  23. codexed-0.1.5/src/codexed/models/hooks.py +0 -88
  24. codexed-0.1.5/src/codexed/models/misc.py +0 -572
  25. codexed-0.1.5/src/codexed/models/realtime.py +0 -135
  26. codexed-0.1.5/src/codexed/models/response_item.py +0 -295
  27. codexed-0.1.5/src/codexed/models/responses.py +0 -381
  28. codexed-0.1.5/src/codexed/models/terminal.py +0 -84
  29. codexed-0.1.5/src/codexed/models/thread_status.py +0 -38
  30. codexed-0.1.5/src/codexed/models/token_usage.py +0 -31
  31. codexed-0.1.5/src/codexed/models/web_search.py +0 -42
  32. {codexed-0.1.5 → codexed-1.0.0}/LICENSE +0 -0
  33. {codexed-0.1.5 → codexed-1.0.0}/README.md +0 -0
  34. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/client/__init__.py +0 -0
  35. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/client/dispatch.py +0 -0
  36. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/client/fs.py +0 -0
  37. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/exceptions.py +0 -0
  38. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/helpers.py +0 -0
  39. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/log.py +0 -0
  40. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/models/base.py +0 -0
  41. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/models/mcp_server.py +0 -0
  42. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/models/tool_config.py +0 -0
  43. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/py.typed +0 -0
  44. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/request_handlers.py +0 -0
  45. {codexed-0.1.5 → codexed-1.0.0}/src/codexed/transport.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codexed
3
- Version: 0.1.5
3
+ Version: 1.0.0
4
4
  Summary: Alternative codex app-server client
5
5
  Keywords:
6
6
  Author: Philipp Temminghoff
@@ -2,7 +2,7 @@
2
2
 
3
3
  [project]
4
4
  name = "codexed"
5
- version = "0.1.5"
5
+ version = "1.0.0"
6
6
  description = "Alternative codex app-server client"
7
7
  readme = "README.md"
8
8
  requires-python = ">=3.13"
@@ -96,7 +96,7 @@ python_version = "3.13"
96
96
  disable_error_code = ["misc", "import"]
97
97
  pretty = true
98
98
  check_untyped_defs = true
99
- exclude = ["venv/", ".venv/", "reference/"]
99
+ exclude = ["venv/", ".venv/", "src/codexed/models/v2_protocol.py"]
100
100
  plugins = ["pydantic.mypy"]
101
101
 
102
102
  [tool.pyright]
@@ -128,7 +128,7 @@ asyncio_mode = "auto"
128
128
 
129
129
  [tool.ruff]
130
130
  line-length = 100
131
- extend-exclude = ["docs", "reference"]
131
+ extend-exclude = ["docs", "src/codexed/models/v2_protocol.py"]
132
132
  target-version = "py313"
133
133
 
134
134
  [tool.ruff.lint]
@@ -271,7 +271,7 @@ max-complexity = 15
271
271
  preview = true
272
272
 
273
273
  [tool.ty.src]
274
- exclude = ["reference"]
274
+ exclude = ["src/codexed/models/v2_protocol.py"]
275
275
 
276
276
  [tool.ty.environment]
277
277
  python-version = "3.13"
@@ -7,7 +7,7 @@ Python adapter for the [Codex](https://github.com/openai/codex) app-server JSON-
7
7
  ```python
8
8
  import asyncio
9
9
  from codexed import CodexClient
10
- from codexed.models import AgentMessageDeltaEvent, TurnCompletedEvent
10
+ from codexed.models import ItemAgentMessageDeltaNotification, TurnCompletedEvent
11
11
 
12
12
  async def main():
13
13
  async with CodexClient() as client:
@@ -15,7 +15,7 @@ async def main():
15
15
 
16
16
  async for event in session.turn_stream("Help me refactor this code"):
17
17
  match event:
18
- case AgentMessageDeltaEvent(data=data):
18
+ case ItemAgentMessageDeltaNotification(data=data):
19
19
  print(data.delta, end="", flush=True)
20
20
  case TurnCompletedEvent():
21
21
  break
@@ -47,20 +47,18 @@ Events are a discriminated union. Use pattern matching or helper functions:
47
47
 
48
48
  ```python
49
49
  from codexed.models import (
50
- AgentMessageDeltaEvent,
51
- CommandExecutionOutputDeltaEvent,
50
+ ItemAgentMessageDeltaNotification,
51
+ ItemCommandExecutionOutputDeltaNotification,
52
52
  TurnCompletedEvent,
53
- TurnErrorEvent,
54
53
  )
55
54
 
56
- async for event in client.turn_stream(thread_id, message):
55
+ async for event in session.turn_stream(message):
57
56
  match event:
58
- case AgentMessageDeltaEvent(data=data) | CommandExecutionOutputDeltaEvent(data=data):
57
+ case ItemAgentMessageDeltaNotification(data=data) | ItemCommandExecutionOutputDeltaNotification(data=data):
59
58
  print(data.delta, end="")
60
59
  case TurnCompletedEvent():
61
60
  break
62
- case TurnErrorEvent(data=data):
63
- print(f"Error: {data.error}")
61
+
64
62
  ```
65
63
 
66
64
  ## See Also
@@ -34,112 +34,104 @@ from codexed.exceptions import (
34
34
  is_retryable_error,
35
35
  )
36
36
  from codexed.models import (
37
- AgentMessageDeltaData,
37
+ AgentMessageDeltaNotification,
38
38
  AppInfo,
39
- AppListUpdatedData,
39
+ AppListUpdatedNotification,
40
40
  CommandExecResponse,
41
- CommandExecutionOutputDeltaData,
42
- ConfigWarningData,
43
- EventData,
41
+ CommandExecutionOutputDeltaNotification,
42
+ ConfigWarningNotification,
44
43
  ExperimentalFeature,
45
- ModelData,
46
- ModelReroutedData,
47
- PlanDeltaData,
48
- ReasoningTextDeltaData,
44
+ Model,
45
+ ModelReroutedNotification,
46
+ PlanDeltaNotification,
47
+ ReasoningTextDeltaNotification,
49
48
  ReviewStartResponse,
50
- SkillData,
51
- ThreadArchivedData,
49
+ SkillMetadata,
50
+ ThreadArchivedNotification,
52
51
  Thread,
53
52
  ThreadListResponse,
54
- ThreadNameUpdatedData,
53
+ ThreadNameUpdatedNotification,
55
54
  ThreadReadResponse,
56
55
  ThreadResponse,
57
56
  ThreadRollbackResponse,
58
57
  ThreadStartedData,
59
- ThreadStatusChangedData,
58
+ ThreadStatusChangedNotification,
60
59
  ThreadTokenUsage,
61
- ThreadUnarchivedData,
60
+ ThreadUnarchiveParams,
62
61
  ThreadUnarchiveResponse,
63
62
  TokenUsageBreakdown,
64
63
  TurnCompletedData,
65
64
  TurnErrorData,
66
65
  TurnStartedData,
67
66
  TurnSteerResponse,
68
- Usage,
69
67
  UserInput,
70
68
  UserInputImage,
71
69
  UserInputLocalImage,
72
70
  UserInputMention,
73
71
  UserInputSkill,
74
72
  UserInputText,
75
- )
76
- from codexed.models.codex_types import (
77
73
  ApprovalPolicy,
78
74
  AskForApproval,
79
- CollabAgentStatus,
80
- CollabAgentTool,
81
75
  CollaborationMode,
82
- CollaborationModeSettings,
83
- CommandExecutionSource,
84
- CommandExecutionStatus,
76
+ Settings,
85
77
  DangerFullAccessSandboxPolicy,
86
78
  ExternalSandboxPolicy,
87
79
  ApprovalDecision,
88
- InputModality,
89
80
  ItemStatus,
90
- ItemType,
91
- McpAuthStatusValue,
92
- ToolCallStatus,
81
+ CollabAgentStatus,
82
+ CollabAgentTool,
83
+ CommandExecutionSource,
84
+ CommandExecutionStatus,
85
+ McpAuthStatus,
86
+ InputModality,
87
+ ModelRerouteReason,
88
+ PatchApplyStatus,
93
89
  MessagePhase,
90
+ ReviewDelivery,
91
+ SandboxMode,
92
+ SkillScope,
94
93
  ModeKind,
95
- ModelProvider,
96
- ModelRerouteReason,
97
94
  NetworkAccess,
98
- PatchApplyStatus,
99
95
  Personality,
100
96
  ReadOnlySandboxPolicy,
101
97
  ReasoningEffort,
102
98
  ReasoningSummary,
103
99
  RejectApprovalPolicy,
104
100
  RejectConfig,
105
- ReviewDelivery,
106
- SandboxMode,
107
101
  SandboxPolicy,
108
102
  SessionSource,
109
103
  SkillApprovalDecision,
110
- SkillScope,
111
104
  ThreadActiveFlag,
112
105
  ThreadSortKey,
113
106
  ThreadSourceKind,
114
107
  TurnStatus,
115
108
  WorkspaceWriteSandboxPolicy,
116
- )
117
- from codexed.models.events import (
118
- AgentMessageDeltaEvent,
119
- AppListUpdatedEvent,
109
+ ItemAgentMessageDeltaNotification,
110
+ AppListUpdatedMessage,
120
111
  CodexEvent,
121
- CommandExecutionOutputDeltaEvent,
122
- ConfigWarningEvent,
112
+ ItemCommandExecutionOutputDeltaNotification,
113
+ ConfigWarningMessage,
123
114
  EventType,
124
- FileChangeOutputDeltaEvent,
125
- FsChangedEvent,
115
+ ItemFileChangeOutputDeltaNotification,
116
+ FsChangedMessage,
126
117
  ItemCompletedEvent,
127
118
  ItemStartedEvent,
128
- ModelReroutedEvent,
129
- PlanDeltaEvent,
130
- ReasoningTextDeltaEvent,
131
- ThreadArchivedEvent,
132
- ThreadCompactedEvent,
133
- ThreadNameUpdatedEvent,
119
+ ModelReroutedMessage,
120
+ ItemPlanDeltaNotification,
121
+ ItemReasoningTextDeltaNotification,
122
+ ThreadArchivedMessage,
123
+ ThreadCompactedMessage,
124
+ ThreadNameUpdatedMessage,
134
125
  ThreadStartedEvent,
135
- ThreadStatusChangedEvent,
136
- ThreadUnarchivedEvent,
126
+ ThreadStatusChangedMessage,
127
+ ThreadUnarchivedMessage,
137
128
  TurnCompletedEvent,
138
- TurnErrorEvent,
139
- TurnPlanUpdatedEvent,
129
+ TurnPlanUpdatedMessage,
140
130
  TurnStartedEvent,
131
+ HttpMcpServer,
132
+ McpServerConfig,
133
+ StdioMcpServer,
141
134
  )
142
- from codexed.models.mcp_server import HttpMcpServer, McpServerConfig, StdioMcpServer
143
135
  from codexed.transport import StdioTransport, WebSocketTransport
144
136
  from codexed.models.tool_config import BuiltinToolsConfig, ToolConfig, tools_to_config_dict
145
137
  from codexed.request_handlers import (
@@ -153,11 +145,10 @@ from codexed.request_handlers import (
153
145
 
154
146
 
155
147
  __all__ = [
156
- "AgentMessageDeltaData",
157
- "AgentMessageDeltaEvent",
148
+ "AgentMessageDeltaNotification",
158
149
  "AppInfo",
159
- "AppListUpdatedData",
160
- "AppListUpdatedEvent",
150
+ "AppListUpdatedMessage",
151
+ "AppListUpdatedNotification",
161
152
  "ApprovalDecision",
162
153
  "ApprovalHandler",
163
154
  "ApprovalParams",
@@ -173,53 +164,50 @@ __all__ = [
173
164
  "CollabAgentStatus",
174
165
  "CollabAgentTool",
175
166
  "CollaborationMode",
176
- "CollaborationModeSettings",
177
167
  "CommandExecResponse",
178
- "CommandExecutionOutputDeltaData",
179
- "CommandExecutionOutputDeltaEvent",
168
+ "CommandExecutionOutputDeltaNotification",
180
169
  "CommandExecutionSource",
181
170
  "CommandExecutionStatus",
182
- "ConfigWarningData",
183
- "ConfigWarningEvent",
171
+ "ConfigWarningMessage",
172
+ "ConfigWarningNotification",
184
173
  "DangerFullAccessSandboxPolicy",
185
174
  "DynamicToolCallHandler",
186
- "EventData",
187
175
  "EventType",
188
176
  "ExperimentalFeature",
189
177
  "ExternalSandboxPolicy",
190
- "FileChangeOutputDeltaEvent",
191
- "FsChangedEvent",
178
+ "FsChangedMessage",
192
179
  "HttpMcpServer",
193
180
  "InputModality",
194
181
  "InternalRpcError",
195
182
  "InvalidParamsError",
196
183
  "InvalidRequestError",
184
+ "ItemAgentMessageDeltaNotification",
185
+ "ItemCommandExecutionOutputDeltaNotification",
197
186
  "ItemCompletedEvent",
187
+ "ItemFileChangeOutputDeltaNotification",
188
+ "ItemPlanDeltaNotification",
189
+ "ItemReasoningTextDeltaNotification",
198
190
  "ItemStartedEvent",
199
191
  "ItemStatus",
200
- "ItemType",
201
- "McpAuthStatusValue",
192
+ "McpAuthStatus",
202
193
  "McpElicitationHandler",
203
194
  "McpServerConfig",
204
195
  "MessagePhase",
205
196
  "MethodNotFoundError",
206
197
  "ModeKind",
207
- "ModelData",
208
- "ModelProvider",
198
+ "Model",
209
199
  "ModelRerouteReason",
210
- "ModelReroutedData",
211
- "ModelReroutedEvent",
200
+ "ModelReroutedMessage",
201
+ "ModelReroutedNotification",
212
202
  "NetworkAccess",
213
203
  "ParseError",
214
204
  "PatchApplyStatus",
215
205
  "Personality",
216
- "PlanDeltaData",
217
- "PlanDeltaEvent",
206
+ "PlanDeltaNotification",
218
207
  "ReadOnlySandboxPolicy",
219
208
  "ReasoningEffort",
220
209
  "ReasoningSummary",
221
- "ReasoningTextDeltaData",
222
- "ReasoningTextDeltaEvent",
210
+ "ReasoningTextDeltaNotification",
223
211
  "RejectApprovalPolicy",
224
212
  "RejectConfig",
225
213
  "RetryLimitExceededError",
@@ -230,19 +218,20 @@ __all__ = [
230
218
  "ServerBusyError",
231
219
  "Session",
232
220
  "SessionSource",
221
+ "Settings",
233
222
  "SkillApprovalDecision",
234
- "SkillData",
223
+ "SkillMetadata",
235
224
  "SkillScope",
236
225
  "StdioMcpServer",
237
226
  "StdioTransport",
238
227
  "Thread",
239
228
  "ThreadActiveFlag",
240
- "ThreadArchivedData",
241
- "ThreadArchivedEvent",
242
- "ThreadCompactedEvent",
229
+ "ThreadArchivedMessage",
230
+ "ThreadArchivedNotification",
231
+ "ThreadCompactedMessage",
243
232
  "ThreadListResponse",
244
- "ThreadNameUpdatedData",
245
- "ThreadNameUpdatedEvent",
233
+ "ThreadNameUpdatedMessage",
234
+ "ThreadNameUpdatedNotification",
246
235
  "ThreadReadResponse",
247
236
  "ThreadResponse",
248
237
  "ThreadRollbackResponse",
@@ -250,27 +239,24 @@ __all__ = [
250
239
  "ThreadSourceKind",
251
240
  "ThreadStartedData",
252
241
  "ThreadStartedEvent",
253
- "ThreadStatusChangedData",
254
- "ThreadStatusChangedEvent",
242
+ "ThreadStatusChangedMessage",
243
+ "ThreadStatusChangedNotification",
255
244
  "ThreadTokenUsage",
245
+ "ThreadUnarchiveParams",
256
246
  "ThreadUnarchiveResponse",
257
- "ThreadUnarchivedData",
258
- "ThreadUnarchivedEvent",
247
+ "ThreadUnarchivedMessage",
259
248
  "TokenUsageBreakdown",
260
- "ToolCallStatus",
261
249
  "ToolConfig",
262
250
  "TransportClosedError",
263
251
  "TurnCompletedData",
264
252
  "TurnCompletedEvent",
265
253
  "TurnErrorData",
266
- "TurnErrorEvent",
267
254
  "TurnFailedError",
268
- "TurnPlanUpdatedEvent",
255
+ "TurnPlanUpdatedMessage",
269
256
  "TurnStartedData",
270
257
  "TurnStartedEvent",
271
258
  "TurnStatus",
272
259
  "TurnSteerResponse",
273
- "Usage",
274
260
  "UserInput",
275
261
  "UserInputHandler",
276
262
  "UserInputImage",