codexed 1.1.8__tar.gz → 1.1.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-1.1.8 → codexed-1.1.9}/PKG-INFO +1 -1
- {codexed-1.1.8 → codexed-1.1.9}/pyproject.toml +1 -1
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/client/client.py +31 -11
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/client/session.py +10 -2
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/__init__.py +6 -7
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/thread_item.py +2 -16
- codexed-1.1.8/src/codexed/models/user_input.py +0 -43
- {codexed-1.1.8 → codexed-1.1.9}/LICENSE +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/README.md +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/README.md +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/__init__.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/client/__init__.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/client/dispatch.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/client/fs.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/client/realtime.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/client/skills.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/exceptions.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/helpers.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/log.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/base.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/codex_types.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/event_data.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/events.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/mcp_server.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/misc.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/request_params.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/responses.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/tool_config.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/models/v2_protocol.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/py.typed +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/request_handlers.py +0 -0
- {codexed-1.1.8 → codexed-1.1.9}/src/codexed/transport.py +0 -0
|
@@ -48,6 +48,7 @@ from codexed.models import (
|
|
|
48
48
|
ThreadForkParams,
|
|
49
49
|
ThreadListParams,
|
|
50
50
|
ThreadListResponse,
|
|
51
|
+
ThreadLoadedListParams,
|
|
51
52
|
ThreadLoadedListResponse,
|
|
52
53
|
ThreadResponse,
|
|
53
54
|
ThreadResumeParams,
|
|
@@ -86,7 +87,6 @@ if TYPE_CHECKING:
|
|
|
86
87
|
ExternalAgentConfigMigrationItem,
|
|
87
88
|
McpServerConfig,
|
|
88
89
|
MergeStrategy,
|
|
89
|
-
Model,
|
|
90
90
|
Personality,
|
|
91
91
|
SandboxMode,
|
|
92
92
|
SandboxPolicy,
|
|
@@ -489,29 +489,49 @@ class CodexClient:
|
|
|
489
489
|
result = await self.dispatch.send_request("thread/list", params)
|
|
490
490
|
return ThreadListResponse.model_validate(result)
|
|
491
491
|
|
|
492
|
-
async def thread_loaded_list(
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
492
|
+
async def thread_loaded_list(
|
|
493
|
+
self,
|
|
494
|
+
*,
|
|
495
|
+
cursor: str | None = None,
|
|
496
|
+
limit: int | None = None,
|
|
497
|
+
) -> ThreadLoadedListResponse:
|
|
498
|
+
"""List thread IDs currently loaded in memory.
|
|
499
|
+
|
|
500
|
+
Args:
|
|
501
|
+
cursor: Opaque pagination cursor from previous response
|
|
502
|
+
limit: Maximum number of thread IDs to return
|
|
503
|
+
|
|
504
|
+
Returns:
|
|
505
|
+
ThreadLoadedListResponse with data (list of thread IDs) and next_cursor
|
|
506
|
+
"""
|
|
507
|
+
params = ThreadLoadedListParams(cursor=cursor, limit=limit)
|
|
508
|
+
result = await self.dispatch.send_request("thread/loaded/list", params)
|
|
509
|
+
return ThreadLoadedListResponse.model_validate(result)
|
|
497
510
|
|
|
498
511
|
# ========================================================================
|
|
499
512
|
# Model methods
|
|
500
513
|
# ========================================================================
|
|
501
514
|
|
|
502
|
-
async def model_list(
|
|
515
|
+
async def model_list(
|
|
516
|
+
self,
|
|
517
|
+
*,
|
|
518
|
+
include_hidden: bool | None = None,
|
|
519
|
+
cursor: str | None = None,
|
|
520
|
+
limit: int | None = None,
|
|
521
|
+
) -> ModelListResponse:
|
|
503
522
|
"""List available models with reasoning effort options.
|
|
504
523
|
|
|
505
524
|
Args:
|
|
506
525
|
include_hidden: When true, include hidden models
|
|
526
|
+
cursor: Opaque pagination cursor from previous response
|
|
527
|
+
limit: Maximum number of models to return
|
|
507
528
|
|
|
508
529
|
Returns:
|
|
509
|
-
|
|
530
|
+
ModelListResponse with data (list of models) and next_cursor
|
|
510
531
|
"""
|
|
511
|
-
params = ModelListParams(include_hidden=include_hidden, limit=
|
|
532
|
+
params = ModelListParams(include_hidden=include_hidden, cursor=cursor, limit=limit)
|
|
512
533
|
result = await self.dispatch.send_request("model/list", params)
|
|
513
|
-
|
|
514
|
-
return response.data
|
|
534
|
+
return ModelListResponse.model_validate(result)
|
|
515
535
|
|
|
516
536
|
async def collaboration_mode_list(self) -> list[CollaborationModeMask]:
|
|
517
537
|
"""List available collaboration mode presets (experimental).
|
|
@@ -407,10 +407,14 @@ class Session:
|
|
|
407
407
|
self,
|
|
408
408
|
target: ReviewTarget,
|
|
409
409
|
*,
|
|
410
|
-
delivery: ReviewDelivery
|
|
410
|
+
delivery: ReviewDelivery = "inline",
|
|
411
411
|
) -> ReviewStartResponse:
|
|
412
412
|
"""Start a code review.
|
|
413
413
|
|
|
414
|
+
Inline delivery runs the review on the same thread, so review items
|
|
415
|
+
appear in the existing thread history. Detached delivery creates a new
|
|
416
|
+
thread for the review, keeping the original thread's history clean.
|
|
417
|
+
|
|
414
418
|
Args:
|
|
415
419
|
target: Review target (uncommittedChanges, baseBranch, commit, or custom)
|
|
416
420
|
delivery: Where to run the review (inline or detached)
|
|
@@ -426,10 +430,14 @@ class Session:
|
|
|
426
430
|
self,
|
|
427
431
|
target: ReviewTarget,
|
|
428
432
|
*,
|
|
429
|
-
delivery: ReviewDelivery
|
|
433
|
+
delivery: ReviewDelivery = "inline",
|
|
430
434
|
) -> AsyncIterator[CodexEvent]:
|
|
431
435
|
"""Start a code review and stream events.
|
|
432
436
|
|
|
437
|
+
Inline delivery runs the review on the same thread, so review items
|
|
438
|
+
appear in the existing thread history. Detached delivery creates a new
|
|
439
|
+
thread for the review, keeping the original thread's history clean.
|
|
440
|
+
|
|
433
441
|
Args:
|
|
434
442
|
target: Review target (uncommittedChanges, baseBranch, commit, or custom)
|
|
435
443
|
delivery: Where to run the review (inline or detached)
|
|
@@ -92,10 +92,8 @@ from codexed.models.responses import (
|
|
|
92
92
|
)
|
|
93
93
|
from codexed.models.thread_item import (
|
|
94
94
|
CollabAgentState,
|
|
95
|
-
FileUpdateChange,
|
|
96
95
|
McpToolCallError,
|
|
97
96
|
McpToolCallResult,
|
|
98
|
-
PatchChangeKind,
|
|
99
97
|
ThreadItem,
|
|
100
98
|
ThreadItemAgentMessage,
|
|
101
99
|
ThreadItemCollabAgentToolCall,
|
|
@@ -137,17 +135,18 @@ from codexed.models.tool_config import (
|
|
|
137
135
|
WebSearchToolConfig,
|
|
138
136
|
tools_to_config_dict,
|
|
139
137
|
)
|
|
140
|
-
|
|
138
|
+
|
|
139
|
+
from codexed.models.v2_protocol import (
|
|
140
|
+
ByteRange,
|
|
141
|
+
InitializeCapabilities,
|
|
141
142
|
UserInput,
|
|
142
143
|
ImageUserInput,
|
|
144
|
+
PatchChangeKind,
|
|
145
|
+
FileUpdateChange,
|
|
143
146
|
LocalImageUserInput,
|
|
144
147
|
MentionUserInput,
|
|
145
148
|
SkillUserInput,
|
|
146
149
|
TextUserInput,
|
|
147
|
-
)
|
|
148
|
-
from codexed.models.v2_protocol import (
|
|
149
|
-
ByteRange,
|
|
150
|
-
InitializeCapabilities,
|
|
151
150
|
LoginAccountResponse,
|
|
152
151
|
ThreadResumeParams,
|
|
153
152
|
RawResponseItemCompletedNotification,
|
|
@@ -6,7 +6,6 @@ from mcp.types import ContentBlock
|
|
|
6
6
|
from pydantic import Field
|
|
7
7
|
|
|
8
8
|
from codexed.models.base import CodexBaseModel
|
|
9
|
-
from codexed.models.user_input import UserInput
|
|
10
9
|
from codexed.models.v2_protocol import (
|
|
11
10
|
CollabAgentState,
|
|
12
11
|
CollabAgentTool,
|
|
@@ -16,29 +15,16 @@ from codexed.models.v2_protocol import (
|
|
|
16
15
|
CommandExecutionStatus,
|
|
17
16
|
DynamicToolCallOutputContentItem,
|
|
18
17
|
DynamicToolCallStatus,
|
|
18
|
+
FileUpdateChange,
|
|
19
19
|
McpToolCallError,
|
|
20
20
|
McpToolCallStatus,
|
|
21
21
|
MessagePhase,
|
|
22
22
|
PatchApplyStatus,
|
|
23
|
+
UserInput,
|
|
23
24
|
WebSearchAction,
|
|
24
25
|
)
|
|
25
26
|
|
|
26
27
|
|
|
27
|
-
class PatchChangeKind(CodexBaseModel):
|
|
28
|
-
"""Kind of file change (nested object in Codex's fileChange item)."""
|
|
29
|
-
|
|
30
|
-
kind: Literal["add", "delete", "update"] = Field(validation_alias="type")
|
|
31
|
-
move_path: str | None = None
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class FileUpdateChange(CodexBaseModel):
|
|
35
|
-
"""File update change."""
|
|
36
|
-
|
|
37
|
-
path: str
|
|
38
|
-
kind: PatchChangeKind
|
|
39
|
-
diff: str | None = None # May be absent in "inProgress" state
|
|
40
|
-
|
|
41
|
-
|
|
42
28
|
class McpToolCallResult(CodexBaseModel):
|
|
43
29
|
"""MCP tool call result."""
|
|
44
30
|
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import base64
|
|
4
|
-
from typing import Self
|
|
5
|
-
|
|
6
|
-
from codexed.models.v2_protocol import (
|
|
7
|
-
ImageUserInput as CodexImageUserInput,
|
|
8
|
-
LocalImageUserInput as CodexLocalImageUserInput,
|
|
9
|
-
MentionUserInput as CodexMentionUserInput,
|
|
10
|
-
SkillUserInput as CodexSkillUserInput,
|
|
11
|
-
TextUserInput as CodexTextUserInput,
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class TextUserInput(CodexTextUserInput):
|
|
16
|
-
"""Text user input."""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class ImageUserInput(CodexImageUserInput):
|
|
20
|
-
"""Image URL user input."""
|
|
21
|
-
|
|
22
|
-
@classmethod
|
|
23
|
-
def from_bytes(cls, data: bytes, media_type: str) -> Self:
|
|
24
|
-
"""Create from raw bytes as a base64 data URI."""
|
|
25
|
-
b64 = base64.b64encode(data).decode()
|
|
26
|
-
data_uri = f"data:{media_type};base64,{b64}"
|
|
27
|
-
return cls(url=data_uri)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class LocalImageUserInput(CodexLocalImageUserInput):
|
|
31
|
-
"""Local image file user input."""
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class SkillUserInput(CodexSkillUserInput):
|
|
35
|
-
"""Skill file user input."""
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class MentionUserInput(CodexMentionUserInput):
|
|
39
|
-
"""Mention user input."""
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
# Discriminated union of user input types
|
|
43
|
-
UserInput = TextUserInput | ImageUserInput | LocalImageUserInput | SkillUserInput | MentionUserInput
|
|
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
|