codexed 0.0.8__tar.gz → 0.0.9__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.
- {codexed-0.0.8 → codexed-0.0.9}/PKG-INFO +1 -1
- {codexed-0.0.8 → codexed-0.0.9}/pyproject.toml +1 -1
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/__init__.py +2 -6
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/client.py +2 -6
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/__init__.py +2 -8
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/codex_types.py +3 -3
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/request_params.py +0 -6
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/response_item.py +20 -24
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/thread_item.py +4 -6
- {codexed-0.0.8 → codexed-0.0.9}/LICENSE +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/README.md +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/README.md +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/exceptions.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/helpers.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/log.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/base.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/command_action.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/event_data.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/events.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/mcp_server.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/misc.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/responses.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/thread_status.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/token_usage.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/tool_config.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/user_input.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/models/web_search.py +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/py.typed +0 -0
- {codexed-0.0.8 → codexed-0.0.9}/src/codexed/request_handlers.py +0 -0
|
@@ -83,19 +83,17 @@ from codexed.models.codex_types import (
|
|
|
83
83
|
AskForApproval,
|
|
84
84
|
CollabAgentStatus,
|
|
85
85
|
CollabAgentTool,
|
|
86
|
-
CollabAgentToolCallStatus,
|
|
87
86
|
CollaborationMode,
|
|
88
87
|
CollaborationModeSettings,
|
|
89
88
|
CommandExecutionStatus,
|
|
90
89
|
DangerFullAccessSandboxPolicy,
|
|
91
|
-
DynamicToolCallStatus,
|
|
92
90
|
ExternalSandboxPolicy,
|
|
93
91
|
ApprovalDecision,
|
|
94
92
|
InputModality,
|
|
95
93
|
ItemStatus,
|
|
96
94
|
ItemType,
|
|
97
95
|
McpAuthStatusValue,
|
|
98
|
-
|
|
96
|
+
ToolCallStatus,
|
|
99
97
|
MessagePhase,
|
|
100
98
|
ModeKind,
|
|
101
99
|
ModelProvider,
|
|
@@ -184,7 +182,6 @@ __all__ = [
|
|
|
184
182
|
"CodexRequestError",
|
|
185
183
|
"CollabAgentStatus",
|
|
186
184
|
"CollabAgentTool",
|
|
187
|
-
"CollabAgentToolCallStatus",
|
|
188
185
|
"CollaborationMode",
|
|
189
186
|
"CollaborationModeSettings",
|
|
190
187
|
"CommandExecResponse",
|
|
@@ -195,7 +192,6 @@ __all__ = [
|
|
|
195
192
|
"ConfigWarningEvent",
|
|
196
193
|
"DangerFullAccessSandboxPolicy",
|
|
197
194
|
"DynamicToolCallHandler",
|
|
198
|
-
"DynamicToolCallStatus",
|
|
199
195
|
"EventData",
|
|
200
196
|
"EventType",
|
|
201
197
|
"ExperimentalFeature",
|
|
@@ -213,7 +209,6 @@ __all__ = [
|
|
|
213
209
|
"McpAuthStatusValue",
|
|
214
210
|
"McpElicitationHandler",
|
|
215
211
|
"McpServerConfig",
|
|
216
|
-
"McpToolCallStatus",
|
|
217
212
|
"MessagePhase",
|
|
218
213
|
"MethodNotFoundError",
|
|
219
214
|
"ModeKind",
|
|
@@ -269,6 +264,7 @@ __all__ = [
|
|
|
269
264
|
"ThreadUnarchivedData",
|
|
270
265
|
"ThreadUnarchivedEvent",
|
|
271
266
|
"TokenUsageBreakdown",
|
|
267
|
+
"ToolCallStatus",
|
|
272
268
|
"ToolConfig",
|
|
273
269
|
"TransportClosedError",
|
|
274
270
|
"TurnCompletedData",
|
|
@@ -698,7 +698,7 @@ class CodexClient:
|
|
|
698
698
|
self._active_threads.add(response.thread.id)
|
|
699
699
|
session = Session(self, response)
|
|
700
700
|
if turn_id is not None:
|
|
701
|
-
await
|
|
701
|
+
await session.rollback_to_turn(turn_id)
|
|
702
702
|
return session
|
|
703
703
|
|
|
704
704
|
async def thread_list(
|
|
@@ -1157,11 +1157,7 @@ class CodexClient:
|
|
|
1157
1157
|
# Model methods
|
|
1158
1158
|
# ========================================================================
|
|
1159
1159
|
|
|
1160
|
-
async def model_list(
|
|
1161
|
-
self,
|
|
1162
|
-
*,
|
|
1163
|
-
include_hidden: bool | None = None,
|
|
1164
|
-
) -> list[ModelData]:
|
|
1160
|
+
async def model_list(self, *, include_hidden: bool | None = None) -> list[ModelData]:
|
|
1165
1161
|
"""List available models with reasoning effort options.
|
|
1166
1162
|
|
|
1167
1163
|
Args:
|
|
@@ -14,12 +14,10 @@ from codexed.models.codex_types import (
|
|
|
14
14
|
AskForApproval,
|
|
15
15
|
CollabAgentStatus,
|
|
16
16
|
CollabAgentTool,
|
|
17
|
-
CollabAgentToolCallStatus,
|
|
18
17
|
CollaborationMode,
|
|
19
18
|
CollaborationModeSettings,
|
|
20
19
|
CommandExecutionStatus,
|
|
21
20
|
DangerFullAccessSandboxPolicy,
|
|
22
|
-
DynamicToolCallStatus,
|
|
23
21
|
ElicitationAction,
|
|
24
22
|
ExperimentalFeatureStage,
|
|
25
23
|
ExternalAgentConfigMigrationItemType,
|
|
@@ -30,7 +28,7 @@ from codexed.models.codex_types import (
|
|
|
30
28
|
ItemStatus,
|
|
31
29
|
ItemType,
|
|
32
30
|
McpAuthStatusValue,
|
|
33
|
-
|
|
31
|
+
ToolCallStatus,
|
|
34
32
|
MergeStrategy,
|
|
35
33
|
MessagePhase,
|
|
36
34
|
ModeKind,
|
|
@@ -240,7 +238,6 @@ from codexed.models.request_params import (
|
|
|
240
238
|
ListMcpServerStatusParams,
|
|
241
239
|
LoginAccountParams,
|
|
242
240
|
LoginType,
|
|
243
|
-
McpElicitationAction,
|
|
244
241
|
McpElicitationFormParams,
|
|
245
242
|
McpElicitationUrlParams,
|
|
246
243
|
McpServerElicitationRequestParams,
|
|
@@ -449,7 +446,6 @@ __all__ = [
|
|
|
449
446
|
"CollabAgentState",
|
|
450
447
|
"CollabAgentStatus",
|
|
451
448
|
"CollabAgentTool",
|
|
452
|
-
"CollabAgentToolCallStatus",
|
|
453
449
|
"CollabToolsConfig",
|
|
454
450
|
"CollaborationMode",
|
|
455
451
|
"CollaborationModeListParams",
|
|
@@ -498,7 +494,6 @@ __all__ = [
|
|
|
498
494
|
"DynamicToolCallOutputContentItem",
|
|
499
495
|
"DynamicToolCallParams",
|
|
500
496
|
"DynamicToolCallResponse",
|
|
501
|
-
"DynamicToolCallStatus",
|
|
502
497
|
"ElicitationAction",
|
|
503
498
|
"ErrorEvent",
|
|
504
499
|
"ErrorEventData",
|
|
@@ -574,7 +569,6 @@ __all__ = [
|
|
|
574
569
|
"LoginChatGptCompleteEvent",
|
|
575
570
|
"LoginType",
|
|
576
571
|
"McpAuthStatusValue",
|
|
577
|
-
"McpElicitationAction",
|
|
578
572
|
"McpElicitationFormParams",
|
|
579
573
|
"McpElicitationUrlParams",
|
|
580
574
|
"McpResource",
|
|
@@ -594,7 +588,6 @@ __all__ = [
|
|
|
594
588
|
"McpToolCallProgressData",
|
|
595
589
|
"McpToolCallProgressEvent",
|
|
596
590
|
"McpToolCallResult",
|
|
597
|
-
"McpToolCallStatus",
|
|
598
591
|
"MergeStrategy",
|
|
599
592
|
"MessagePhase",
|
|
600
593
|
"MessageResponseItem",
|
|
@@ -743,6 +736,7 @@ __all__ = [
|
|
|
743
736
|
"ThreadUnsubscribeParams",
|
|
744
737
|
"ThreadUnsubscribeResponse",
|
|
745
738
|
"TokenUsageBreakdown",
|
|
739
|
+
"ToolCallStatus",
|
|
746
740
|
"ToolConfig",
|
|
747
741
|
"ToolRequestUserInputAnswer",
|
|
748
742
|
"ToolRequestUserInputOption",
|
|
@@ -27,6 +27,8 @@ ItemType = Literal[
|
|
|
27
27
|
"mcp_tool_call",
|
|
28
28
|
]
|
|
29
29
|
ItemStatus = Literal["pending", "running", "completed", "error"]
|
|
30
|
+
McpElicitationAction = Literal["accept", "decline", "cancel"]
|
|
31
|
+
"""Action taken by the user on an elicitation request."""
|
|
30
32
|
|
|
31
33
|
# New type aliases
|
|
32
34
|
SessionSource = Literal["cli", "vscode", "exec", "appServer", "unknown"]
|
|
@@ -46,10 +48,8 @@ ThreadSourceKind = Literal[
|
|
|
46
48
|
MessagePhase = Literal["commentary", "final_answer"]
|
|
47
49
|
PatchApplyStatus = Literal["inProgress", "completed", "failed", "declined"]
|
|
48
50
|
CommandExecutionStatus = Literal["inProgress", "completed", "failed", "declined"]
|
|
49
|
-
|
|
50
|
-
DynamicToolCallStatus = Literal["inProgress", "completed", "failed"]
|
|
51
|
+
ToolCallStatus = Literal["inProgress", "completed", "failed"]
|
|
51
52
|
CollabAgentTool = Literal["spawnAgent", "sendInput", "resumeAgent", "wait", "closeAgent"]
|
|
52
|
-
CollabAgentToolCallStatus = Literal["inProgress", "completed", "failed"]
|
|
53
53
|
CollabAgentStatus = Literal[
|
|
54
54
|
"pendingInit", "running", "completed", "errored", "shutdown", "notFound"
|
|
55
55
|
]
|
|
@@ -504,12 +504,6 @@ class DynamicToolCallParams(CodexBaseModel):
|
|
|
504
504
|
arguments: Any
|
|
505
505
|
|
|
506
506
|
|
|
507
|
-
# --- MCP Elicitation ---
|
|
508
|
-
|
|
509
|
-
McpElicitationAction = Literal["accept", "decline", "cancel"]
|
|
510
|
-
"""Action taken by the user on an elicitation request."""
|
|
511
|
-
|
|
512
|
-
|
|
513
507
|
class _McpElicitationBase(CodexBaseModel):
|
|
514
508
|
"""Common fields for MCP elicitation requests."""
|
|
515
509
|
|
|
@@ -8,7 +8,7 @@ from __future__ import annotations
|
|
|
8
8
|
|
|
9
9
|
from typing import Annotated, Literal
|
|
10
10
|
|
|
11
|
-
from pydantic import Discriminator, Field
|
|
11
|
+
from pydantic import Discriminator, Field
|
|
12
12
|
|
|
13
13
|
from codexed.models.base import CodexBaseModel
|
|
14
14
|
|
|
@@ -38,9 +38,7 @@ class OutputTextContent(CodexBaseModel):
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
ContentItem = Annotated[
|
|
41
|
-
|
|
42
|
-
| Annotated[InputImageContent, Tag("input_image")]
|
|
43
|
-
| Annotated[OutputTextContent, Tag("output_text")],
|
|
41
|
+
InputTextContent | InputImageContent | OutputTextContent,
|
|
44
42
|
Discriminator("type"),
|
|
45
43
|
]
|
|
46
44
|
|
|
@@ -63,8 +61,7 @@ class ReasoningPlainTextContent(CodexBaseModel):
|
|
|
63
61
|
|
|
64
62
|
|
|
65
63
|
ReasoningItemContent = Annotated[
|
|
66
|
-
|
|
67
|
-
| Annotated[ReasoningPlainTextContent, Tag("text")],
|
|
64
|
+
ReasoningTextContent | ReasoningPlainTextContent,
|
|
68
65
|
Discriminator("type"),
|
|
69
66
|
]
|
|
70
67
|
|
|
@@ -95,8 +92,7 @@ class FunctionCallOutputImageItem(CodexBaseModel):
|
|
|
95
92
|
|
|
96
93
|
|
|
97
94
|
FunctionCallOutputContentItem = Annotated[
|
|
98
|
-
|
|
99
|
-
| Annotated[FunctionCallOutputImageItem, Tag("input_image")],
|
|
95
|
+
FunctionCallOutputTextItem | FunctionCallOutputImageItem,
|
|
100
96
|
Discriminator("type"),
|
|
101
97
|
]
|
|
102
98
|
|
|
@@ -158,10 +154,10 @@ class WebSearchActionOther(CodexBaseModel):
|
|
|
158
154
|
|
|
159
155
|
|
|
160
156
|
WebSearchAction = Annotated[
|
|
161
|
-
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
157
|
+
WebSearchActionSearch
|
|
158
|
+
| WebSearchActionOpenPage
|
|
159
|
+
| WebSearchActionFindInPage
|
|
160
|
+
| WebSearchActionOther,
|
|
165
161
|
Discriminator("type"),
|
|
166
162
|
]
|
|
167
163
|
|
|
@@ -283,17 +279,17 @@ class OtherResponseItem(CodexBaseModel):
|
|
|
283
279
|
|
|
284
280
|
|
|
285
281
|
ResponseItem = Annotated[
|
|
286
|
-
|
|
287
|
-
|
|
|
288
|
-
|
|
|
289
|
-
|
|
|
290
|
-
|
|
|
291
|
-
|
|
|
292
|
-
|
|
|
293
|
-
|
|
|
294
|
-
|
|
|
295
|
-
|
|
|
296
|
-
|
|
|
297
|
-
|
|
|
282
|
+
MessageResponseItem
|
|
283
|
+
| ReasoningResponseItem
|
|
284
|
+
| LocalShellCallResponseItem
|
|
285
|
+
| FunctionCallResponseItem
|
|
286
|
+
| FunctionCallOutputResponseItem
|
|
287
|
+
| CustomToolCallResponseItem
|
|
288
|
+
| CustomToolCallOutputResponseItem
|
|
289
|
+
| WebSearchCallResponseItem
|
|
290
|
+
| ImageGenerationCallResponseItem
|
|
291
|
+
| GhostSnapshotResponseItem
|
|
292
|
+
| CompactionResponseItem
|
|
293
|
+
| OtherResponseItem,
|
|
298
294
|
Discriminator("type"),
|
|
299
295
|
]
|
|
@@ -9,12 +9,10 @@ from codexed.models.base import CodexBaseModel
|
|
|
9
9
|
from codexed.models.codex_types import ( # noqa: TC001
|
|
10
10
|
CollabAgentStatus,
|
|
11
11
|
CollabAgentTool,
|
|
12
|
-
CollabAgentToolCallStatus,
|
|
13
12
|
CommandExecutionStatus,
|
|
14
|
-
DynamicToolCallStatus,
|
|
15
|
-
McpToolCallStatus,
|
|
16
13
|
MessagePhase,
|
|
17
14
|
PatchApplyStatus,
|
|
15
|
+
ToolCallStatus,
|
|
18
16
|
)
|
|
19
17
|
from codexed.models.command_action import CommandAction # noqa: TC001
|
|
20
18
|
from codexed.models.user_input import UserInput # noqa: TC001
|
|
@@ -160,7 +158,7 @@ class ThreadItemMcpToolCall(BaseThreadItem):
|
|
|
160
158
|
type: Literal["mcpToolCall"] = "mcpToolCall"
|
|
161
159
|
server: str
|
|
162
160
|
tool: str
|
|
163
|
-
status:
|
|
161
|
+
status: ToolCallStatus
|
|
164
162
|
arguments: dict[str, Any] | None = None
|
|
165
163
|
result: McpToolCallResult | None = None
|
|
166
164
|
error: McpToolCallError | None = None
|
|
@@ -182,7 +180,7 @@ class ThreadItemDynamicToolCall(BaseThreadItem):
|
|
|
182
180
|
type: Literal["dynamicToolCall"] = "dynamicToolCall"
|
|
183
181
|
tool: str
|
|
184
182
|
arguments: dict[str, Any] | None = None
|
|
185
|
-
status:
|
|
183
|
+
status: ToolCallStatus
|
|
186
184
|
content_items: list[DynamicToolCallOutputContentItem] | None = None
|
|
187
185
|
success: bool | None = None
|
|
188
186
|
duration_ms: int | None = None
|
|
@@ -248,7 +246,7 @@ class ThreadItemCollabAgentToolCall(BaseThreadItem):
|
|
|
248
246
|
|
|
249
247
|
type: Literal["collabAgentToolCall"] = "collabAgentToolCall"
|
|
250
248
|
tool: CollabAgentTool
|
|
251
|
-
status:
|
|
249
|
+
status: ToolCallStatus
|
|
252
250
|
sender_thread_id: str
|
|
253
251
|
receiver_thread_ids: list[str] = Field(default_factory=list)
|
|
254
252
|
prompt: str | None = None
|
|
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
|