circle-codex 0.154.3__tar.gz → 0.154.4__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 (25) hide show
  1. {circle_codex-0.154.3 → circle_codex-0.154.4}/PKG-INFO +2 -2
  2. {circle_codex-0.154.3 → circle_codex-0.154.4}/pyproject.toml +2 -2
  3. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/client.py +12 -5
  4. {circle_codex-0.154.3 → circle_codex-0.154.4}/README.md +0 -0
  5. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/__init__.py +0 -0
  6. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/_approval_mode.py +0 -0
  7. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/_goal.py +0 -0
  8. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/_initialize_metadata.py +0 -0
  9. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/_inputs.py +0 -0
  10. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/_login.py +0 -0
  11. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/_message_router.py +0 -0
  12. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/_run.py +0 -0
  13. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/_runtime_requirements.py +0 -0
  14. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/_sandbox.py +0 -0
  15. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/_version.py +0 -0
  16. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/api.py +0 -0
  17. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/async_client.py +0 -0
  18. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/errors.py +0 -0
  19. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/generated/__init__.py +0 -0
  20. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/generated/notification_registry.py +0 -0
  21. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/generated/v2_all.py +0 -0
  22. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/models.py +0 -0
  23. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/py.typed +0 -0
  24. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/retry.py +0 -0
  25. {circle_codex-0.154.3 → circle_codex-0.154.4}/src/openai_codex/types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: circle-codex
3
- Version: 0.154.3
3
+ Version: 0.154.4
4
4
  Summary: Unofficial Codex Python SDK fork with a built-in xAI provider
5
5
  Keywords: codex,sdk,llm,ai,agents,xai,grok
6
6
  Author: Ashish Verma
@@ -10,7 +10,7 @@ Classifier: Intended Audience :: Developers
10
10
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
11
11
  Requires-Dist: pydantic>=2.12
12
12
  Requires-Dist: packaging>=26.2
13
- Requires-Dist: circle-codex-cli-bin==0.154.3
13
+ Requires-Dist: circle-codex-cli-bin==0.154.4
14
14
  Requires-Python: >=3.10
15
15
  Project-URL: Homepage, https://github.com/ashish447344/codex
16
16
  Project-URL: Repository, https://github.com/ashish447344/codex
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "circle-codex"
7
- version = "0.154.3"
7
+ version = "0.154.4"
8
8
  description = "Unofficial Codex Python SDK fork with a built-in xAI provider"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "Intended Audience :: Developers",
17
17
  "Topic :: Software Development :: Libraries :: Python Modules",
18
18
  ]
19
- dependencies = ["pydantic>=2.12", "packaging>=26.2", "circle-codex-cli-bin==0.154.3"]
19
+ dependencies = ["pydantic>=2.12", "packaging>=26.2", "circle-codex-cli-bin==0.154.4"]
20
20
 
21
21
  [project.urls]
22
22
  Homepage = "https://github.com/ashish447344/codex"
@@ -197,7 +197,9 @@ class CodexConfig:
197
197
  """Configuration for launching and identifying the local Codex runtime.
198
198
 
199
199
  Most callers can use ``Codex()`` without configuration. Set ``codex_bin``
200
- only when intentionally using a specific local Codex executable.
200
+ only when intentionally using a specific local Codex executable. Set
201
+ ``inherit_env=False`` to omit parent environment variables from the runtime
202
+ process. The SDK may still prepend its bundled binary directory to ``PATH``.
201
203
  """
202
204
 
203
205
  codex_bin: str | None = None
@@ -205,12 +207,20 @@ class CodexConfig:
205
207
  config_overrides: tuple[str, ...] = ()
206
208
  cwd: str | None = None
207
209
  env: dict[str, str] | None = None
210
+ inherit_env: bool = True
208
211
  client_name: str = "codex_python_sdk"
209
212
  client_title: str = "Codex Python SDK"
210
213
  client_version: str = SDK_VERSION
211
214
  experimental_api: bool = True
212
215
 
213
216
 
217
+ def _subprocess_env(config: CodexConfig, path_dirs: tuple[Path, ...]) -> dict[str, str]:
218
+ env = os.environ.copy() if config.inherit_env else {}
219
+ env.update(config.env or {})
220
+ _prepend_path_dirs(env, path_dirs)
221
+ return env
222
+
223
+
214
224
  class CodexClient:
215
225
  """Synchronous typed JSON-RPC client for `codex app-server` over stdio."""
216
226
 
@@ -255,10 +265,7 @@ class CodexClient:
255
265
  args.extend(["--config", kv])
256
266
  args.extend(["app-server", "--listen", "stdio://"])
257
267
 
258
- env = os.environ.copy()
259
- if self.config.env:
260
- env.update(self.config.env)
261
- _prepend_path_dirs(env, path_dirs)
268
+ env = _subprocess_env(self.config, path_dirs)
262
269
 
263
270
  if self.config.launch_args_override is None:
264
271
  self._checkout_capabilities = CheckoutCapabilities(
File without changes