codexed 1.1.4__tar.gz → 1.1.6__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 (33) hide show
  1. {codexed-1.1.4 → codexed-1.1.6}/PKG-INFO +1 -1
  2. {codexed-1.1.4 → codexed-1.1.6}/pyproject.toml +1 -1
  3. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/__init__.py +2 -4
  4. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/__init__.py +1 -4
  5. codexed-1.1.6/src/codexed/models/codex_types.py +13 -0
  6. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/events.py +0 -80
  7. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/responses.py +2 -5
  8. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/thread_item.py +41 -0
  9. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/transport.py +1 -1
  10. codexed-1.1.4/src/codexed/models/codex_types.py +0 -110
  11. {codexed-1.1.4 → codexed-1.1.6}/LICENSE +0 -0
  12. {codexed-1.1.4 → codexed-1.1.6}/README.md +0 -0
  13. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/README.md +0 -0
  14. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/client/__init__.py +0 -0
  15. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/client/client.py +0 -0
  16. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/client/dispatch.py +0 -0
  17. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/client/fs.py +0 -0
  18. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/client/realtime.py +0 -0
  19. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/client/session.py +0 -0
  20. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/client/skills.py +0 -0
  21. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/exceptions.py +0 -0
  22. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/helpers.py +0 -0
  23. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/log.py +0 -0
  24. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/base.py +0 -0
  25. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/event_data.py +0 -0
  26. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/mcp_server.py +0 -0
  27. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/misc.py +0 -0
  28. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/request_params.py +0 -0
  29. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/tool_config.py +0 -0
  30. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/user_input.py +0 -0
  31. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/models/v2_protocol.py +0 -0
  32. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/py.typed +0 -0
  33. {codexed-1.1.4 → codexed-1.1.6}/src/codexed/request_handlers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codexed
3
- Version: 1.1.4
3
+ Version: 1.1.6
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 = "1.1.4"
5
+ version = "1.1.6"
6
6
  description = "Alternative codex app-server client"
7
7
  readme = "README.md"
8
8
  requires-python = ">=3.13"
@@ -73,7 +73,7 @@ from codexed.models import (
73
73
  CollaborationMode,
74
74
  Settings,
75
75
  DangerFullAccessSandboxPolicy,
76
- ExternalSandboxPolicy,
76
+ ExternalSandboxSandboxPolicy,
77
77
  ApprovalDecision,
78
78
  CollabAgentStatus,
79
79
  CollabAgentTool,
@@ -106,7 +106,6 @@ from codexed.models import (
106
106
  CodexEvent,
107
107
  ItemCommandExecutionOutputDeltaNotification,
108
108
  ConfigWarningMessage,
109
- EventType,
110
109
  ItemFileChangeOutputDeltaNotification,
111
110
  FsChangedMessage,
112
111
  ItemCompletedEvent,
@@ -166,9 +165,8 @@ __all__ = [
166
165
  "ConfigWarningNotification",
167
166
  "DangerFullAccessSandboxPolicy",
168
167
  "DynamicToolCallHandler",
169
- "EventType",
170
168
  "ExperimentalFeature",
171
- "ExternalSandboxPolicy",
169
+ "ExternalSandboxSandboxPolicy",
172
170
  "FsChangedMessage",
173
171
  "HttpMcpServer",
174
172
  "ImageUserInput",
@@ -11,7 +11,6 @@ from codexed.models.base import (
11
11
  )
12
12
  from codexed.models.codex_types import (
13
13
  ElicitationAction,
14
- ExternalSandboxPolicy,
15
14
  ApprovalDecision,
16
15
  NetworkApprovalProtocol,
17
16
  NetworkPolicyRuleAction,
@@ -36,7 +35,6 @@ from codexed.models.events import (
36
35
  AppListUpdatedMessage,
37
36
  CodexEvent,
38
37
  DeltaEvent,
39
- EventType,
40
38
  ItemCompletedEvent,
41
39
  ItemStartedEvent,
42
40
  RawResponseItemCompletedEvent,
@@ -546,7 +544,6 @@ __all__ = [
546
544
  "ElicitationAction",
547
545
  "ErrorMessage",
548
546
  "ErrorNotification",
549
- "EventType",
550
547
  "ExecPolicyAmendment",
551
548
  "ExperimentalFeature",
552
549
  "ExperimentalFeatureListParams",
@@ -557,7 +554,7 @@ __all__ = [
557
554
  "ExternalAgentConfigImportParams",
558
555
  "ExternalAgentConfigMigrationItem",
559
556
  "ExternalAgentConfigMigrationItemType",
560
- "ExternalSandboxPolicy",
557
+ "ExternalSandboxSandboxPolicy",
561
558
  "ExternalSandboxSandboxPolicy",
562
559
  "FeedbackUploadParams",
563
560
  "FeedbackUploadResponse",
@@ -0,0 +1,13 @@
1
+ """Codex data types."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Literal
6
+
7
+
8
+ # Type aliases for Codex types
9
+ ApprovalDecision = Literal["allow", "allowForSession", "deny", "denyForSession"]
10
+ SkillApprovalDecision = Literal["allow", "deny"]
11
+ ElicitationAction = Literal["accept", "decline", "cancel"]
12
+ NetworkApprovalProtocol = Literal["http", "https", "socks5Tcp", "socks5Udp"]
13
+ NetworkPolicyRuleAction = Literal["allow", "deny"]
@@ -227,86 +227,6 @@ CodexEvent = Annotated[
227
227
  codex_event_adapter: TypeAdapter[CodexEvent] = TypeAdapter(CodexEvent)
228
228
 
229
229
 
230
- # ============================================================================
231
- # Event type literals (for external use)
232
- # ============================================================================
233
-
234
-
235
- EventType = Literal[
236
- # Error events
237
- "error",
238
- # Thread lifecycle
239
- "thread/started",
240
- "thread/status/changed",
241
- "thread/archived",
242
- "thread/unarchived",
243
- "thread/name/updated",
244
- "thread/tokenUsage/updated",
245
- "thread/compacted",
246
- # Turn lifecycle
247
- "turn/started",
248
- "turn/completed",
249
- "turn/error",
250
- "turn/diff/updated",
251
- "turn/plan/updated",
252
- # Hook events
253
- "hook/started",
254
- "hook/completed",
255
- # Realtime voice events (EXPERIMENTAL)
256
- "thread/realtime/started",
257
- "thread/realtime/itemAdded",
258
- "thread/realtime/transcriptUpdated",
259
- "thread/realtime/outputAudio/delta",
260
- "thread/realtime/error",
261
- "thread/realtime/closed",
262
- # Terminal control events
263
- "command/exec/outputDelta",
264
- # Fuzzy file search events (EXPERIMENTAL)
265
- "fuzzyFileSearch/sessionUpdated",
266
- "fuzzyFileSearch/sessionCompleted",
267
- # Item lifecycle
268
- "item/started",
269
- "item/completed",
270
- "rawResponseItem/completed",
271
- # Item deltas - agent messages
272
- "item/agentMessage/delta",
273
- # Item deltas - plan
274
- "item/plan/delta",
275
- # Item deltas - reasoning
276
- "item/reasoning/summaryTextDelta",
277
- "item/reasoning/summaryPartAdded",
278
- "item/reasoning/textDelta",
279
- # Item deltas - command execution
280
- "item/commandExecution/outputDelta",
281
- "item/commandExecution/terminalInteraction",
282
- # Item deltas - file changes
283
- "item/fileChange/outputDelta",
284
- # Item deltas - MCP tool calls
285
- "item/mcpToolCall/progress",
286
- # MCP server status
287
- "mcpServer/startupStatus/updated",
288
- # MCP OAuth
289
- "mcpServer/oauthLogin/completed",
290
- # Account/Auth events
291
- "account/updated",
292
- "account/rateLimits/updated",
293
- "account/login/completed",
294
- "authStatusChange",
295
- "loginChatGptComplete",
296
- # System events
297
- "sessionConfigured",
298
- "deprecationNotice",
299
- "windows/worldWritableWarning",
300
- # New events
301
- "model/rerouted",
302
- "configWarning",
303
- "app/list/updated",
304
- "fs/changed",
305
- "thread/compacted/v2",
306
- "serverRequest/resolved",
307
- ]
308
-
309
-
310
230
  # Type alias for all delta events
311
231
  DeltaEvent = (
312
232
  ItemAgentMessageDeltaNotification
@@ -5,11 +5,7 @@ from typing import Any
5
5
  import mcp.types
6
6
 
7
7
  from codexed.models.base import CodexBaseModel
8
- from codexed.models.codex_types import (
9
- ApprovalDecision,
10
- ElicitationAction,
11
- SandboxPolicy,
12
- )
8
+ from codexed.models.codex_types import ApprovalDecision, ElicitationAction
13
9
  from codexed.models.misc import (
14
10
  McpServerStatusEntry,
15
11
  Thread,
@@ -22,6 +18,7 @@ from codexed.models.v2_protocol import (
22
18
  AuthMode,
23
19
  DynamicToolCallOutputContentItem,
24
20
  ReasoningEffort,
21
+ SandboxPolicy,
25
22
  ServiceTier,
26
23
  )
27
24
 
@@ -51,6 +51,14 @@ class BaseThreadItem(CodexBaseModel):
51
51
 
52
52
  id: str
53
53
 
54
+ @property
55
+ def inferred_arguments(self) -> dict[str, Any] | None:
56
+ """Best-effort reconstruction of tool-call-like arguments.
57
+
58
+ Returns a dict for tool-like items, None for non-tool items.
59
+ """
60
+ return None
61
+
54
62
 
55
63
  class ThreadItemUserMessage(BaseThreadItem):
56
64
  """User message item."""
@@ -96,6 +104,10 @@ class ThreadItemCommandExecution(BaseThreadItem):
96
104
  exit_code: int | None = None
97
105
  duration_ms: int | None = None
98
106
 
107
+ @property
108
+ def inferred_arguments(self) -> dict[str, Any]:
109
+ return {"command": self.command, "cwd": self.cwd}
110
+
99
111
  @property
100
112
  def item_summary(self) -> str:
101
113
  """Human-readable summary of this command execution."""
@@ -113,6 +125,10 @@ class ThreadItemFileChange(BaseThreadItem):
113
125
  changes: list[FileUpdateChange]
114
126
  status: PatchApplyStatus
115
127
 
128
+ @property
129
+ def inferred_arguments(self) -> dict[str, Any]:
130
+ return {"changes": [c.model_dump() for c in self.changes]}
131
+
116
132
  @property
117
133
  def item_summary(self) -> str:
118
134
  """Human-readable summary of file changes."""
@@ -134,6 +150,10 @@ class ThreadItemMcpToolCall(BaseThreadItem):
134
150
  error: McpToolCallError | None = None
135
151
  duration_ms: int | None = None
136
152
 
153
+ @property
154
+ def inferred_arguments(self) -> dict[str, Any] | None:
155
+ return self.arguments
156
+
137
157
  @property
138
158
  def item_summary(self) -> str:
139
159
  """Human-readable summary of this MCP tool call."""
@@ -155,6 +175,10 @@ class ThreadItemDynamicToolCall(BaseThreadItem):
155
175
  success: bool | None = None
156
176
  duration_ms: int | None = None
157
177
 
178
+ @property
179
+ def inferred_arguments(self) -> dict[str, Any] | None:
180
+ return self.arguments
181
+
158
182
 
159
183
  class ThreadItemWebSearch(BaseThreadItem):
160
184
  """Web search item."""
@@ -163,6 +187,10 @@ class ThreadItemWebSearch(BaseThreadItem):
163
187
  query: str
164
188
  action: WebSearchAction | None = None
165
189
 
190
+ @property
191
+ def inferred_arguments(self) -> dict[str, Any]:
192
+ return {"query": self.query}
193
+
166
194
  @property
167
195
  def item_summary(self) -> str:
168
196
  """Human-readable summary of this web search."""
@@ -175,6 +203,10 @@ class ThreadItemImageView(BaseThreadItem):
175
203
  type: Literal["imageView"] = "imageView"
176
204
  path: str
177
205
 
206
+ @property
207
+ def inferred_arguments(self) -> dict[str, Any]:
208
+ return {"path": self.path}
209
+
178
210
  @property
179
211
  def item_summary(self) -> str:
180
212
  """Human-readable summary of this image view."""
@@ -222,6 +254,15 @@ class ThreadItemCollabAgentToolCall(BaseThreadItem):
222
254
  prompt: str | None = None
223
255
  agents_states: dict[str, CollabAgentState] = Field(default_factory=dict)
224
256
 
257
+ @property
258
+ def inferred_arguments(self) -> dict[str, Any]:
259
+ args: dict[str, Any] = {"tool": self.tool}
260
+ if self.prompt is not None:
261
+ args["prompt"] = self.prompt
262
+ if self.receiver_thread_ids:
263
+ args["receiver_thread_ids"] = self.receiver_thread_ids
264
+ return args
265
+
225
266
  @property
226
267
  def item_summary(self) -> str:
227
268
  """Human-readable summary of this collab agent tool call."""
@@ -178,7 +178,7 @@ class WebSocketTransport:
178
178
  if self._ws is None:
179
179
  return None
180
180
  try:
181
- raw = await self._ws.recv()
181
+ raw: str | bytes = await self._ws.recv()
182
182
  except Exception: # noqa: BLE001
183
183
  return None
184
184
  if isinstance(raw, bytes):
@@ -1,110 +0,0 @@
1
- """Codex data types."""
2
-
3
- from __future__ import annotations
4
-
5
- from typing import Annotated, Any, Literal
6
-
7
- from pydantic import BaseModel, Discriminator, Field, Tag
8
-
9
- from codexed.models.base import CodexBaseModel
10
- from codexed.models.v2_protocol import NetworkAccess, RestrictedReadOnlyAccess
11
-
12
-
13
- # Type aliases for Codex types
14
- ApprovalDecision = Literal["allow", "allowForSession", "deny", "denyForSession"]
15
- SkillApprovalDecision = Literal["allow", "deny"]
16
- ElicitationAction = Literal["accept", "decline", "cancel"]
17
- NetworkApprovalProtocol = Literal["http", "https", "socks5Tcp", "socks5Udp"]
18
- NetworkPolicyRuleAction = Literal["allow", "deny"]
19
-
20
-
21
- # ============================================================================
22
- # SandboxPolicy (discriminated union on 'type' field)
23
- # ============================================================================
24
-
25
-
26
- # Mapping from camelCase type values (turn-level API) to kebab-case (thread-level API)
27
- _SANDBOX_TYPE_ALIASES: dict[str, str] = {
28
- "workspaceWrite": "workspace-write",
29
- "dangerFullAccess": "danger-full-access",
30
- "readOnly": "read-only",
31
- "externalSandbox": "external-sandbox",
32
- }
33
-
34
- _READ_ONLY_ACCESS_TYPE_ALIASES: dict[str, str] = {
35
- "fullAccess": "full-access",
36
- }
37
-
38
-
39
- def _sandbox_policy_discriminator(v: Any) -> str:
40
- match v:
41
- case {"type": str(raw_type)}:
42
- return _SANDBOX_TYPE_ALIASES.get(raw_type, raw_type)
43
- case BaseModel():
44
- return str(type(v).model_fields["type"].default)
45
- case _:
46
- return str(v)
47
-
48
-
49
- def _read_only_access_discriminator(v: Any) -> str:
50
- match v:
51
- case {"type": str(raw_type)}:
52
- return _READ_ONLY_ACCESS_TYPE_ALIASES.get(raw_type, raw_type)
53
- case BaseModel():
54
- return str(type(v).model_fields["type"].default)
55
- case _:
56
- return str(v)
57
-
58
-
59
- class FullAccessReadOnlyAccess(CodexBaseModel):
60
- """Allow unrestricted file reads."""
61
-
62
- type: Literal["full-access", "fullAccess"]
63
-
64
-
65
- ReadOnlyAccess = Annotated[
66
- Annotated[RestrictedReadOnlyAccess, Tag("restricted")]
67
- | Annotated[FullAccessReadOnlyAccess, Tag("full-access")],
68
- Discriminator(_read_only_access_discriminator),
69
- ]
70
-
71
-
72
- class DangerFullAccessSandboxPolicy(CodexBaseModel):
73
- """No restrictions whatsoever. Use with caution."""
74
-
75
- type: Literal["danger-full-access", "dangerFullAccess"]
76
-
77
-
78
- class ReadOnlySandboxPolicy(CodexBaseModel):
79
- """Read-only access configuration."""
80
-
81
- type: Literal["read-only", "readOnly"]
82
- access: ReadOnlyAccess | None = None
83
-
84
-
85
- class ExternalSandboxPolicy(CodexBaseModel):
86
- """Process is already in an external sandbox."""
87
-
88
- type: Literal["external-sandbox", "externalSandbox"]
89
- network_access: NetworkAccess = "restricted"
90
-
91
-
92
- class WorkspaceWriteSandboxPolicy(CodexBaseModel):
93
- """Grants write access to the workspace directory."""
94
-
95
- type: Literal["workspace-write", "workspaceWrite"]
96
- writable_roots: list[str] = Field(default_factory=list)
97
- read_only_access: ReadOnlyAccess | None = None
98
- network_access: bool = False
99
- exclude_slash_tmp: bool = False
100
- exclude_tmpdir_env_var: bool = False
101
-
102
-
103
- SandboxPolicy = Annotated[
104
- Annotated[DangerFullAccessSandboxPolicy, Tag("danger-full-access")]
105
- | Annotated[ReadOnlySandboxPolicy, Tag("read-only")]
106
- | Annotated[ExternalSandboxPolicy, Tag("external-sandbox")]
107
- | Annotated[WorkspaceWriteSandboxPolicy, Tag("workspace-write")],
108
- Discriminator(_sandbox_policy_discriminator),
109
- ]
110
- """Discriminated union for sandbox execution restrictions."""
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes