codexed 1.1.1__tar.gz → 1.1.2__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 (34) hide show
  1. {codexed-1.1.1 → codexed-1.1.2}/PKG-INFO +1 -1
  2. {codexed-1.1.1 → codexed-1.1.2}/pyproject.toml +1 -1
  3. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/client/__init__.py +2 -1
  4. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/client/client.py +7 -3
  5. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/client/session.py +0 -3
  6. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/request_params.py +2 -4
  7. codexed-1.1.2/src/codexed/models/user_input.py +43 -0
  8. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/v2_protocol.py +63 -3
  9. codexed-1.1.1/src/codexed/models/user_input.py +0 -58
  10. {codexed-1.1.1 → codexed-1.1.2}/LICENSE +0 -0
  11. {codexed-1.1.1 → codexed-1.1.2}/README.md +0 -0
  12. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/README.md +0 -0
  13. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/__init__.py +0 -0
  14. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/client/dispatch.py +0 -0
  15. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/client/fs.py +0 -0
  16. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/client/realtime.py +0 -0
  17. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/client/skills.py +0 -0
  18. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/exceptions.py +0 -0
  19. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/helpers.py +0 -0
  20. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/log.py +0 -0
  21. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/__init__.py +0 -0
  22. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/base.py +0 -0
  23. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/codex_types.py +0 -0
  24. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/event_data.py +0 -0
  25. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/events.py +0 -0
  26. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/mcp_server.py +0 -0
  27. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/misc.py +0 -0
  28. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/response_item.py +0 -0
  29. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/responses.py +0 -0
  30. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/thread_item.py +0 -0
  31. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/models/tool_config.py +0 -0
  32. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/py.typed +0 -0
  33. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/request_handlers.py +0 -0
  34. {codexed-1.1.1 → codexed-1.1.2}/src/codexed/transport.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codexed
3
- Version: 1.1.1
3
+ Version: 1.1.2
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.1"
5
+ version = "1.1.2"
6
6
  description = "Alternative codex app-server client"
7
7
  readme = "README.md"
8
8
  requires-python = ">=3.13"
@@ -2,7 +2,8 @@
2
2
 
3
3
  from .client import CodexClient
4
4
  from .fs import CodexFS
5
+ from .skills import CodexSkills
5
6
  from .realtime import RealtimeSession
6
7
  from .session import Session
7
8
 
8
- __all__ = ["CodexClient", "CodexFS", "RealtimeSession", "Session"]
9
+ __all__ = ["CodexClient", "CodexFS", "CodexSkills", "RealtimeSession", "Session"]
@@ -11,6 +11,7 @@ from pydantic import TypeAdapter
11
11
 
12
12
  from codexed.client.dispatch import Dispatch
13
13
  from codexed.client.fs import CodexFS
14
+ from codexed.client.skills import CodexSkills
14
15
  from codexed.helpers import merge_config
15
16
  from codexed.models import (
16
17
  AppsListParams,
@@ -88,6 +89,7 @@ if TYPE_CHECKING:
88
89
  Model,
89
90
  Personality,
90
91
  SandboxMode,
92
+ SandboxPolicy,
91
93
  ServiceTier,
92
94
  ThreadSortKey,
93
95
  ThreadSourceKind,
@@ -173,6 +175,7 @@ class CodexClient:
173
175
  self._mcp_elicitation_for_approvals = mcp_elicitation_for_approvals
174
176
  self._server_request_handlers: dict[str, ServerRequestHandler] = {}
175
177
  self.fs = CodexFS(self)
178
+ self.skills = CodexSkills(self)
176
179
  if on_approval:
177
180
  self.register_handler(SERVER_REQUEST_COMMAND_APPROVAL, on_approval) # type: ignore[arg-type]
178
181
  self.register_handler(SERVER_REQUEST_FILE_CHANGE_APPROVAL, on_approval) # type: ignore[arg-type]
@@ -379,7 +382,6 @@ class CodexClient:
379
382
  tools: list[ToolConfig] | None = None,
380
383
  code_mode: bool | None = None,
381
384
  service_tier: ServiceTier | None = None,
382
- personality: Personality | None = None,
383
385
  ephemeral: bool | None = None,
384
386
  mcp_servers: Mapping[str, McpServerConfig] | None = None,
385
387
  turn_id: str | None = None,
@@ -433,7 +435,6 @@ class CodexClient:
433
435
  sandbox=sandbox,
434
436
  config=cfg,
435
437
  service_tier=service_tier,
436
- personality=personality,
437
438
  ephemeral=ephemeral,
438
439
  persist_extended_history=persist_extended_history,
439
440
  )
@@ -528,7 +529,8 @@ class CodexClient:
528
529
  command: list[str],
529
530
  *,
530
531
  cwd: str | None = None,
531
- sandbox_policy: dict[str, Any] | None = None,
532
+ sandbox_policy: SandboxPolicy | None = None,
533
+ output_bytes_cap: int | None = None,
532
534
  timeout_ms: int | None = None,
533
535
  ) -> CommandExecResponse:
534
536
  """Execute a command without creating a thread/turn.
@@ -537,6 +539,7 @@ class CodexClient:
537
539
  command: Command and arguments as list (e.g., ["ls", "-la"])
538
540
  cwd: Working directory for command
539
541
  sandbox_policy: Sandbox policy override
542
+ output_bytes_cap: Cap output based on bytes
540
543
  timeout_ms: Timeout in milliseconds
541
544
 
542
545
  Returns:
@@ -545,6 +548,7 @@ class CodexClient:
545
548
  params = CommandExecParams(
546
549
  command=command,
547
550
  cwd=cwd,
551
+ output_bytes_cap=output_bytes_cap,
548
552
  sandbox_policy=sandbox_policy,
549
553
  timeout_ms=timeout_ms,
550
554
  )
@@ -425,7 +425,6 @@ class Session:
425
425
  tools: list[ToolConfig] | None = None,
426
426
  code_mode: bool | None = None,
427
427
  service_tier: ServiceTier | None = None,
428
- personality: Personality | None = None,
429
428
  ephemeral: bool | None = None,
430
429
  mcp_servers: Mapping[str, McpServerConfig] | None = None,
431
430
  turn_id: str | None = None,
@@ -447,7 +446,6 @@ class Session:
447
446
  tools: Builtin tool configurations for forked thread
448
447
  code_mode: Enable experimental code mode feature flag
449
448
  service_tier: Service tier (fast/flex)
450
- personality: Personality for forked thread
451
449
  ephemeral: If true, forked thread is not persisted
452
450
  mcp_servers: Per-thread MCP server configurations
453
451
  turn_id: If provided, rollback the forked thread to this turn
@@ -471,7 +469,6 @@ class Session:
471
469
  tools=tools,
472
470
  code_mode=code_mode,
473
471
  service_tier=service_tier,
474
- personality=personality,
475
472
  ephemeral=ephemeral,
476
473
  mcp_servers=mcp_servers,
477
474
  turn_id=turn_id,
@@ -229,11 +229,10 @@ class McpElicitationFormParams(_McpElicitationBase):
229
229
  turn_id: str | None = None,
230
230
  ) -> McpElicitationFormParams:
231
231
  """Create from MCP ElicitRequestFormParams."""
232
- meta = params.meta.model_dump(exclude={"progressToken"}) if params.meta else None
233
232
  return cls(
234
233
  message=params.message,
235
234
  requested_schema=dict(params.requestedSchema),
236
- meta=meta,
235
+ meta=params.meta.model_dump(exclude={"progressToken"}) if params.meta else None,
237
236
  thread_id=thread_id,
238
237
  server_name=server_name,
239
238
  turn_id=turn_id,
@@ -268,12 +267,11 @@ class McpElicitationUrlParams(_McpElicitationBase):
268
267
  turn_id: str | None = None,
269
268
  ) -> McpElicitationUrlParams:
270
269
  """Create from MCP ElicitRequestURLParams."""
271
- meta = params.meta.model_dump(exclude={"progressToken"}) if params.meta else None
272
270
  return cls(
273
271
  message=params.message,
274
272
  url=params.url,
275
273
  elicitation_id=params.elicitationId,
276
- meta=meta,
274
+ meta=params.meta.model_dump(exclude={"progressToken"}) if params.meta else None,
277
275
  thread_id=thread_id,
278
276
  server_name=server_name,
279
277
  turn_id=turn_id,
@@ -0,0 +1,43 @@
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
@@ -1,7 +1,7 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: codex_app_server_protocol.v2.schemas.json
3
- # timestamp: 2026-03-30T21:53:33+00:00
4
- # command: datamodel-codegen --input /tmp/user/1000/codex-schema-sj0e4jie/codex_app_server_protocol.v2.schemas.json --input-file-type jsonschema --output /home/phil65/dev/oss/codexed/src/codexed/models/v2_protocol.py --output-model-type pydantic_v2.BaseModel --target-python-version 3.13 --target-pydantic-version 2 --use-standard-collections --use-standard-primitive-types --snake-case-field --no-alias --base-class codexed.models.base.CodexBaseModel --field-constraints --use-schema-description --use-field-description --use-double-quotes --enum-field-as-literal all --use-one-literal-as-default --keep-model-order --use-title-as-name --enable-command-header --use-type-alias --formatters ruff-check ruff-format
3
+ # timestamp: 2026-04-01T16:01:18+00:00
4
+ # command: datamodel-codegen --input /tmp/user/1000/codex-schema-4fyk5nzw/codex_app_server_protocol.v2.schemas.json --input-file-type jsonschema --output /home/phil65/dev/oss/codexed/src/codexed/models/v2_protocol.py --output-model-type pydantic_v2.BaseModel --target-python-version 3.13 --target-pydantic-version 2 --use-standard-collections --use-standard-primitive-types --snake-case-field --no-alias --base-class codexed.models.base.CodexBaseModel --field-constraints --use-schema-description --use-field-description --use-double-quotes --enum-field-as-literal all --use-one-literal-as-default --keep-model-order --use-title-as-name --enable-command-header --use-type-alias --formatters ruff-check ruff-format
5
5
 
6
6
  from __future__ import annotations
7
7
 
@@ -414,6 +414,27 @@ class ChatgptAuthTokensv2LoginAccountResponse(CodexBaseModel):
414
414
 
415
415
 
416
416
 
417
+ class ChatgptDeviceCodev2LoginAccountParams(CodexBaseModel):
418
+ type: Literal["chatgptDeviceCode"] = "chatgptDeviceCode"
419
+
420
+
421
+
422
+
423
+ class ChatgptDeviceCodev2LoginAccountResponse(CodexBaseModel):
424
+ login_id: str
425
+ type: Literal["chatgptDeviceCode"] = "chatgptDeviceCode"
426
+ user_code: str
427
+ """
428
+ One-time code the user must enter after signing in.
429
+ """
430
+ verification_url: str
431
+ """
432
+ URL the client should open in a browser to complete device code authorization.
433
+ """
434
+
435
+
436
+
437
+
417
438
  class Chatgptv2LoginAccountParams(CodexBaseModel):
418
439
  type: Literal["chatgpt"] = "chatgpt"
419
440
 
@@ -2421,6 +2442,7 @@ type LocalShellStatus = Literal["completed", "in_progress", "incomplete"]
2421
2442
  type LoginAccountParams = Annotated[
2422
2443
  ApiKeyv2LoginAccountParams
2423
2444
  | Chatgptv2LoginAccountParams
2445
+ | ChatgptDeviceCodev2LoginAccountParams
2424
2446
  | ChatgptAuthTokensv2LoginAccountParams,
2425
2447
  Field(..., title="LoginAccountParams"),
2426
2448
  ]
@@ -2429,6 +2451,7 @@ type LoginAccountParams = Annotated[
2429
2451
  type LoginAccountResponse = Annotated[
2430
2452
  ApiKeyv2LoginAccountResponse
2431
2453
  | Chatgptv2LoginAccountResponse
2454
+ | ChatgptDeviceCodev2LoginAccountResponse
2432
2455
  | ChatgptAuthTokensv2LoginAccountResponse,
2433
2456
  Field(..., title="LoginAccountResponse"),
2434
2457
  ]
@@ -2726,17 +2749,44 @@ class ModelUpgradeInfo(CodexBaseModel):
2726
2749
  type NetworkAccess = Literal["restricted", "enabled"]
2727
2750
 
2728
2751
 
2752
+ type NetworkDomainPermission = Literal["allow", "deny"]
2753
+
2754
+
2729
2755
  class NetworkRequirements(CodexBaseModel):
2730
2756
  allow_local_binding: bool | None = None
2731
2757
  allow_unix_sockets: list[str] | None = None
2758
+ """
2759
+ Legacy compatibility view derived from `unix_sockets`.
2760
+ """
2732
2761
  allow_upstream_proxy: bool | None = None
2733
2762
  allowed_domains: list[str] | None = None
2763
+ """
2764
+ Legacy compatibility view derived from `domains`.
2765
+ """
2734
2766
  dangerously_allow_all_unix_sockets: bool | None = None
2735
2767
  dangerously_allow_non_loopback_proxy: bool | None = None
2736
2768
  denied_domains: list[str] | None = None
2769
+ """
2770
+ Legacy compatibility view derived from `domains`.
2771
+ """
2772
+ domains: dict[str, Any] | None = None
2773
+ """
2774
+ Canonical network permission map for `experimental_network`.
2775
+ """
2737
2776
  enabled: bool | None = None
2738
2777
  http_port: int | None = Field(None, ge=0)
2778
+ managed_allowed_domains_only: bool | None = None
2779
+ """
2780
+ When true, only managed allowlist entries are respected while managed network enforcement is active.
2781
+ """
2739
2782
  socks_port: int | None = Field(None, ge=0)
2783
+ unix_sockets: dict[str, Any] | None = None
2784
+ """
2785
+ Canonical unix socket permission map for `experimental_network`.
2786
+ """
2787
+
2788
+
2789
+ type NetworkUnixSocketPermission = Literal["allow", "none"]
2740
2790
 
2741
2791
 
2742
2792
  type NonSteerableTurnKind = Literal["review", "compact"]
@@ -2829,7 +2879,17 @@ class PlanThreadItem(CodexBaseModel):
2829
2879
 
2830
2880
 
2831
2881
  type PlanType = Literal[
2832
- "free", "go", "plus", "pro", "team", "business", "enterprise", "edu", "unknown"
2882
+ "free",
2883
+ "go",
2884
+ "plus",
2885
+ "pro",
2886
+ "team",
2887
+ "self_serve_business_usage_based",
2888
+ "business",
2889
+ "enterprise_cbp_usage_based",
2890
+ "enterprise",
2891
+ "edu",
2892
+ "unknown",
2833
2893
  ]
2834
2894
 
2835
2895
 
@@ -1,58 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import base64
4
- from typing import Literal, Self
5
-
6
- from pydantic import Field
7
-
8
- from codexed.models.base import CodexBaseModel
9
- from codexed.models.v2_protocol import TextElement
10
-
11
-
12
- class TextUserInput(CodexBaseModel):
13
- """Text user input."""
14
-
15
- type: Literal["text"] = "text"
16
- text: str
17
- text_elements: list[TextElement] = Field(default_factory=list)
18
-
19
-
20
- class ImageUserInput(CodexBaseModel):
21
- """Image URL user input."""
22
-
23
- type: Literal["image"] = "image"
24
- url: str
25
-
26
- @classmethod
27
- def from_bytes(cls, data: bytes, media_type: str) -> Self:
28
- """Create from raw bytes as a base64 data URI."""
29
- b64 = base64.b64encode(data).decode()
30
- data_uri = f"data:{media_type};base64,{b64}"
31
- return cls(url=data_uri)
32
-
33
-
34
- class LocalImageUserInput(CodexBaseModel):
35
- """Local image file user input."""
36
-
37
- type: Literal["localImage"] = "localImage"
38
- path: str
39
-
40
-
41
- class SkillUserInput(CodexBaseModel):
42
- """Skill file user input."""
43
-
44
- type: Literal["skill"] = "skill"
45
- name: str
46
- path: str
47
-
48
-
49
- class MentionUserInput(CodexBaseModel):
50
- """Mention user input."""
51
-
52
- type: Literal["mention"] = "mention"
53
- name: str
54
- path: str
55
-
56
-
57
- # Discriminated union of user input types
58
- 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