codexed 0.1.4__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.4 → codexed-1.0.0}/PKG-INFO +1 -1
  2. {codexed-0.1.4 → codexed-1.0.0}/pyproject.toml +4 -4
  3. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/README.md +7 -9
  4. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/__init__.py +73 -89
  5. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/client/client.py +150 -614
  6. codexed-1.0.0/src/codexed/client/dispatch.py +151 -0
  7. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/client/fs.py +9 -9
  8. codexed-1.0.0/src/codexed/client/session.py +465 -0
  9. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/models/__init__.py +398 -429
  10. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/models/codex_types.py +2 -85
  11. codexed-1.0.0/src/codexed/models/event_data.py +68 -0
  12. codexed-1.0.0/src/codexed/models/events.py +318 -0
  13. codexed-1.0.0/src/codexed/models/misc.py +255 -0
  14. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/models/request_params.py +43 -259
  15. codexed-1.0.0/src/codexed/models/response_item.py +99 -0
  16. codexed-1.0.0/src/codexed/models/responses.py +175 -0
  17. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/models/thread_item.py +13 -62
  18. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/models/user_input.py +1 -20
  19. codexed-1.0.0/src/codexed/models/v2_protocol.py +5179 -0
  20. codexed-0.1.4/src/codexed/client/session.py +0 -238
  21. codexed-0.1.4/src/codexed/models/command_action.py +0 -48
  22. codexed-0.1.4/src/codexed/models/event_data.py +0 -384
  23. codexed-0.1.4/src/codexed/models/events.py +0 -704
  24. codexed-0.1.4/src/codexed/models/fuzzy_search.py +0 -106
  25. codexed-0.1.4/src/codexed/models/hooks.py +0 -88
  26. codexed-0.1.4/src/codexed/models/misc.py +0 -572
  27. codexed-0.1.4/src/codexed/models/realtime.py +0 -135
  28. codexed-0.1.4/src/codexed/models/response_item.py +0 -295
  29. codexed-0.1.4/src/codexed/models/responses.py +0 -381
  30. codexed-0.1.4/src/codexed/models/terminal.py +0 -84
  31. codexed-0.1.4/src/codexed/models/thread_status.py +0 -38
  32. codexed-0.1.4/src/codexed/models/token_usage.py +0 -31
  33. codexed-0.1.4/src/codexed/models/web_search.py +0 -42
  34. {codexed-0.1.4 → codexed-1.0.0}/LICENSE +0 -0
  35. {codexed-0.1.4 → codexed-1.0.0}/README.md +0 -0
  36. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/client/__init__.py +0 -0
  37. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/exceptions.py +0 -0
  38. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/helpers.py +0 -0
  39. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/log.py +0 -0
  40. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/models/base.py +0 -0
  41. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/models/mcp_server.py +0 -0
  42. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/models/tool_config.py +0 -0
  43. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/py.typed +0 -0
  44. {codexed-0.1.4 → codexed-1.0.0}/src/codexed/request_handlers.py +0 -0
  45. {codexed-0.1.4 → 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.4
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.4"
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
@@ -32,115 +32,106 @@ from codexed.exceptions import (
32
32
  TransportClosedError,
33
33
  TurnFailedError,
34
34
  is_retryable_error,
35
- map_jsonrpc_error,
36
35
  )
37
36
  from codexed.models import (
38
- AgentMessageDeltaData,
37
+ AgentMessageDeltaNotification,
39
38
  AppInfo,
40
- AppListUpdatedData,
39
+ AppListUpdatedNotification,
41
40
  CommandExecResponse,
42
- CommandExecutionOutputDeltaData,
43
- ConfigWarningData,
44
- EventData,
41
+ CommandExecutionOutputDeltaNotification,
42
+ ConfigWarningNotification,
45
43
  ExperimentalFeature,
46
- ModelData,
47
- ModelReroutedData,
48
- PlanDeltaData,
49
- ReasoningTextDeltaData,
44
+ Model,
45
+ ModelReroutedNotification,
46
+ PlanDeltaNotification,
47
+ ReasoningTextDeltaNotification,
50
48
  ReviewStartResponse,
51
- SkillData,
52
- ThreadArchivedData,
49
+ SkillMetadata,
50
+ ThreadArchivedNotification,
53
51
  Thread,
54
52
  ThreadListResponse,
55
- ThreadNameUpdatedData,
53
+ ThreadNameUpdatedNotification,
56
54
  ThreadReadResponse,
57
55
  ThreadResponse,
58
56
  ThreadRollbackResponse,
59
57
  ThreadStartedData,
60
- ThreadStatusChangedData,
58
+ ThreadStatusChangedNotification,
61
59
  ThreadTokenUsage,
62
- ThreadUnarchivedData,
60
+ ThreadUnarchiveParams,
63
61
  ThreadUnarchiveResponse,
64
62
  TokenUsageBreakdown,
65
63
  TurnCompletedData,
66
64
  TurnErrorData,
67
65
  TurnStartedData,
68
66
  TurnSteerResponse,
69
- Usage,
70
67
  UserInput,
71
68
  UserInputImage,
72
69
  UserInputLocalImage,
73
70
  UserInputMention,
74
71
  UserInputSkill,
75
72
  UserInputText,
76
- )
77
- from codexed.models.codex_types import (
78
73
  ApprovalPolicy,
79
74
  AskForApproval,
80
- CollabAgentStatus,
81
- CollabAgentTool,
82
75
  CollaborationMode,
83
- CollaborationModeSettings,
84
- CommandExecutionSource,
85
- CommandExecutionStatus,
76
+ Settings,
86
77
  DangerFullAccessSandboxPolicy,
87
78
  ExternalSandboxPolicy,
88
79
  ApprovalDecision,
89
- InputModality,
90
80
  ItemStatus,
91
- ItemType,
92
- McpAuthStatusValue,
93
- ToolCallStatus,
81
+ CollabAgentStatus,
82
+ CollabAgentTool,
83
+ CommandExecutionSource,
84
+ CommandExecutionStatus,
85
+ McpAuthStatus,
86
+ InputModality,
87
+ ModelRerouteReason,
88
+ PatchApplyStatus,
94
89
  MessagePhase,
90
+ ReviewDelivery,
91
+ SandboxMode,
92
+ SkillScope,
95
93
  ModeKind,
96
- ModelProvider,
97
- ModelRerouteReason,
98
94
  NetworkAccess,
99
- PatchApplyStatus,
100
95
  Personality,
101
96
  ReadOnlySandboxPolicy,
102
97
  ReasoningEffort,
103
98
  ReasoningSummary,
104
99
  RejectApprovalPolicy,
105
100
  RejectConfig,
106
- ReviewDelivery,
107
- SandboxMode,
108
101
  SandboxPolicy,
109
102
  SessionSource,
110
103
  SkillApprovalDecision,
111
- SkillScope,
112
104
  ThreadActiveFlag,
113
105
  ThreadSortKey,
114
106
  ThreadSourceKind,
115
107
  TurnStatus,
116
108
  WorkspaceWriteSandboxPolicy,
117
- )
118
- from codexed.models.events import (
119
- AgentMessageDeltaEvent,
120
- AppListUpdatedEvent,
109
+ ItemAgentMessageDeltaNotification,
110
+ AppListUpdatedMessage,
121
111
  CodexEvent,
122
- CommandExecutionOutputDeltaEvent,
123
- ConfigWarningEvent,
112
+ ItemCommandExecutionOutputDeltaNotification,
113
+ ConfigWarningMessage,
124
114
  EventType,
125
- FileChangeOutputDeltaEvent,
126
- FsChangedEvent,
115
+ ItemFileChangeOutputDeltaNotification,
116
+ FsChangedMessage,
127
117
  ItemCompletedEvent,
128
118
  ItemStartedEvent,
129
- ModelReroutedEvent,
130
- PlanDeltaEvent,
131
- ReasoningTextDeltaEvent,
132
- ThreadArchivedEvent,
133
- ThreadCompactedEvent,
134
- ThreadNameUpdatedEvent,
119
+ ModelReroutedMessage,
120
+ ItemPlanDeltaNotification,
121
+ ItemReasoningTextDeltaNotification,
122
+ ThreadArchivedMessage,
123
+ ThreadCompactedMessage,
124
+ ThreadNameUpdatedMessage,
135
125
  ThreadStartedEvent,
136
- ThreadStatusChangedEvent,
137
- ThreadUnarchivedEvent,
126
+ ThreadStatusChangedMessage,
127
+ ThreadUnarchivedMessage,
138
128
  TurnCompletedEvent,
139
- TurnErrorEvent,
140
- TurnPlanUpdatedEvent,
129
+ TurnPlanUpdatedMessage,
141
130
  TurnStartedEvent,
131
+ HttpMcpServer,
132
+ McpServerConfig,
133
+ StdioMcpServer,
142
134
  )
143
- from codexed.models.mcp_server import HttpMcpServer, McpServerConfig, StdioMcpServer
144
135
  from codexed.transport import StdioTransport, WebSocketTransport
145
136
  from codexed.models.tool_config import BuiltinToolsConfig, ToolConfig, tools_to_config_dict
146
137
  from codexed.request_handlers import (
@@ -154,11 +145,10 @@ from codexed.request_handlers import (
154
145
 
155
146
 
156
147
  __all__ = [
157
- "AgentMessageDeltaData",
158
- "AgentMessageDeltaEvent",
148
+ "AgentMessageDeltaNotification",
159
149
  "AppInfo",
160
- "AppListUpdatedData",
161
- "AppListUpdatedEvent",
150
+ "AppListUpdatedMessage",
151
+ "AppListUpdatedNotification",
162
152
  "ApprovalDecision",
163
153
  "ApprovalHandler",
164
154
  "ApprovalParams",
@@ -174,53 +164,50 @@ __all__ = [
174
164
  "CollabAgentStatus",
175
165
  "CollabAgentTool",
176
166
  "CollaborationMode",
177
- "CollaborationModeSettings",
178
167
  "CommandExecResponse",
179
- "CommandExecutionOutputDeltaData",
180
- "CommandExecutionOutputDeltaEvent",
168
+ "CommandExecutionOutputDeltaNotification",
181
169
  "CommandExecutionSource",
182
170
  "CommandExecutionStatus",
183
- "ConfigWarningData",
184
- "ConfigWarningEvent",
171
+ "ConfigWarningMessage",
172
+ "ConfigWarningNotification",
185
173
  "DangerFullAccessSandboxPolicy",
186
174
  "DynamicToolCallHandler",
187
- "EventData",
188
175
  "EventType",
189
176
  "ExperimentalFeature",
190
177
  "ExternalSandboxPolicy",
191
- "FileChangeOutputDeltaEvent",
192
- "FsChangedEvent",
178
+ "FsChangedMessage",
193
179
  "HttpMcpServer",
194
180
  "InputModality",
195
181
  "InternalRpcError",
196
182
  "InvalidParamsError",
197
183
  "InvalidRequestError",
184
+ "ItemAgentMessageDeltaNotification",
185
+ "ItemCommandExecutionOutputDeltaNotification",
198
186
  "ItemCompletedEvent",
187
+ "ItemFileChangeOutputDeltaNotification",
188
+ "ItemPlanDeltaNotification",
189
+ "ItemReasoningTextDeltaNotification",
199
190
  "ItemStartedEvent",
200
191
  "ItemStatus",
201
- "ItemType",
202
- "McpAuthStatusValue",
192
+ "McpAuthStatus",
203
193
  "McpElicitationHandler",
204
194
  "McpServerConfig",
205
195
  "MessagePhase",
206
196
  "MethodNotFoundError",
207
197
  "ModeKind",
208
- "ModelData",
209
- "ModelProvider",
198
+ "Model",
210
199
  "ModelRerouteReason",
211
- "ModelReroutedData",
212
- "ModelReroutedEvent",
200
+ "ModelReroutedMessage",
201
+ "ModelReroutedNotification",
213
202
  "NetworkAccess",
214
203
  "ParseError",
215
204
  "PatchApplyStatus",
216
205
  "Personality",
217
- "PlanDeltaData",
218
- "PlanDeltaEvent",
206
+ "PlanDeltaNotification",
219
207
  "ReadOnlySandboxPolicy",
220
208
  "ReasoningEffort",
221
209
  "ReasoningSummary",
222
- "ReasoningTextDeltaData",
223
- "ReasoningTextDeltaEvent",
210
+ "ReasoningTextDeltaNotification",
224
211
  "RejectApprovalPolicy",
225
212
  "RejectConfig",
226
213
  "RetryLimitExceededError",
@@ -231,19 +218,20 @@ __all__ = [
231
218
  "ServerBusyError",
232
219
  "Session",
233
220
  "SessionSource",
221
+ "Settings",
234
222
  "SkillApprovalDecision",
235
- "SkillData",
223
+ "SkillMetadata",
236
224
  "SkillScope",
237
225
  "StdioMcpServer",
238
226
  "StdioTransport",
239
227
  "Thread",
240
228
  "ThreadActiveFlag",
241
- "ThreadArchivedData",
242
- "ThreadArchivedEvent",
243
- "ThreadCompactedEvent",
229
+ "ThreadArchivedMessage",
230
+ "ThreadArchivedNotification",
231
+ "ThreadCompactedMessage",
244
232
  "ThreadListResponse",
245
- "ThreadNameUpdatedData",
246
- "ThreadNameUpdatedEvent",
233
+ "ThreadNameUpdatedMessage",
234
+ "ThreadNameUpdatedNotification",
247
235
  "ThreadReadResponse",
248
236
  "ThreadResponse",
249
237
  "ThreadRollbackResponse",
@@ -251,27 +239,24 @@ __all__ = [
251
239
  "ThreadSourceKind",
252
240
  "ThreadStartedData",
253
241
  "ThreadStartedEvent",
254
- "ThreadStatusChangedData",
255
- "ThreadStatusChangedEvent",
242
+ "ThreadStatusChangedMessage",
243
+ "ThreadStatusChangedNotification",
256
244
  "ThreadTokenUsage",
245
+ "ThreadUnarchiveParams",
257
246
  "ThreadUnarchiveResponse",
258
- "ThreadUnarchivedData",
259
- "ThreadUnarchivedEvent",
247
+ "ThreadUnarchivedMessage",
260
248
  "TokenUsageBreakdown",
261
- "ToolCallStatus",
262
249
  "ToolConfig",
263
250
  "TransportClosedError",
264
251
  "TurnCompletedData",
265
252
  "TurnCompletedEvent",
266
253
  "TurnErrorData",
267
- "TurnErrorEvent",
268
254
  "TurnFailedError",
269
- "TurnPlanUpdatedEvent",
255
+ "TurnPlanUpdatedMessage",
270
256
  "TurnStartedData",
271
257
  "TurnStartedEvent",
272
258
  "TurnStatus",
273
259
  "TurnSteerResponse",
274
- "Usage",
275
260
  "UserInput",
276
261
  "UserInputHandler",
277
262
  "UserInputImage",
@@ -282,6 +267,5 @@ __all__ = [
282
267
  "WebSocketTransport",
283
268
  "WorkspaceWriteSandboxPolicy",
284
269
  "is_retryable_error",
285
- "map_jsonrpc_error",
286
270
  "tools_to_config_dict",
287
271
  ]