spawnllm 0.6.1__tar.gz → 0.6.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 (29) hide show
  1. {spawnllm-0.6.1 → spawnllm-0.6.2}/PKG-INFO +1 -1
  2. {spawnllm-0.6.1 → spawnllm-0.6.2}/pyproject.toml +1 -1
  3. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/backends/codex.py +17 -2
  4. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/spec.py +12 -0
  5. {spawnllm-0.6.1 → spawnllm-0.6.2}/LICENSE +0 -0
  6. {spawnllm-0.6.1 → spawnllm-0.6.2}/README.md +0 -0
  7. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/__init__.py +0 -0
  8. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/__main__.py +0 -0
  9. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/backends/__init__.py +0 -0
  10. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/backends/base.py +0 -0
  11. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/backends/claude.py +0 -0
  12. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/backends/gemini.py +0 -0
  13. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/backends/mlx.py +0 -0
  14. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/backends/openai_endpoint.py +0 -0
  15. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/backends/registry.py +0 -0
  16. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/call.py +0 -0
  17. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/cli.py +0 -0
  18. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/extract.py +0 -0
  19. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/mlx/__init__.py +0 -0
  20. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/mlx/codec.py +0 -0
  21. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/mlx/engine.py +0 -0
  22. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/mlx/fuse.py +0 -0
  23. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/mlx/patches.py +0 -0
  24. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/proc.py +0 -0
  25. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/py.typed +0 -0
  26. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/response.py +0 -0
  27. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/run.py +0 -0
  28. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/structured.py +0 -0
  29. {spawnllm-0.6.1 → spawnllm-0.6.2}/spawnllm/types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spawnllm
3
- Version: 0.6.1
3
+ Version: 0.6.2
4
4
  Summary: Delete your subprocess wrappers around claude, codex, and gemini.
5
5
  Keywords:
6
6
  Author: Yasyf Mohamedali
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "spawnllm"
3
3
  # Inert sentinel: the real version is set from the release tag (uv version --frozen).
4
- version = "0.6.1"
4
+ version = "0.6.2"
5
5
  description = "Delete your subprocess wrappers around claude, codex, and gemini."
6
6
  readme = "README.md"
7
7
  license = "MIT"
@@ -25,8 +25,13 @@ class CodexCliBackend(CliBackend):
25
25
  ephemeral session in a read-only sandbox; `invocation` resolves the schema to
26
26
  a temp file and captures the final message to an `-o` file. The argv carries
27
27
  `--skip-git-repo-check` so a run in an untrusted or non-git `cwd` is not refused —
28
- the sandbox already confines it, so the trust gate adds nothing here. An optional
29
- `CodexConfig` overrides the sandbox and re-enables Codex hooks or MCP servers.
28
+ the sandbox already confines it, so the trust gate adds nothing here. The argv pins
29
+ `service_tier=fast` by default `--ignore-user-config` discards a user-level tier pin,
30
+ and the standard tier turns long prompts into multi-minute runs;
31
+ `CodexConfig(service_tier=None)` drops the flag (an isolated run still ignores the
32
+ user-level config, so a `config.toml` tier pin needs `isolated=False` too).
33
+ `--color never` keeps ANSI codes out of the streamed log. An optional `CodexConfig`
34
+ overrides the sandbox and re-enables Codex hooks or MCP servers.
30
35
 
31
36
  Attributes:
32
37
  models: Mapping from abstract model size to an OpenAI model name.
@@ -73,9 +78,19 @@ class CodexCliBackend(CliBackend):
73
78
  "--sandbox",
74
79
  cfg.sandbox or "read-only",
75
80
  "--skip-git-repo-check",
81
+ "--color",
82
+ "never",
76
83
  "--model",
77
84
  model,
78
85
  *(["-c", f"model_reasoning_effort={effort}"] if effort else []),
86
+ *(["-c", f"service_tier={cfg.service_tier}"] if cfg.service_tier is not None else []),
87
+ # codex parses -c values as TOML with a raw-string fallback; a JSON string is a
88
+ # valid TOML basic string, so words like `true` don't coerce to booleans.
89
+ *(
90
+ ["-c", f"developer_instructions={json.dumps(cfg.developer_instructions, ensure_ascii=False)}"]
91
+ if cfg.developer_instructions is not None
92
+ else []
93
+ ),
79
94
  *(["--ignore-user-config"] if spec.isolated else []),
80
95
  *(
81
96
  []
@@ -44,6 +44,16 @@ class ClaudeConfig:
44
44
  class CodexConfig:
45
45
  """Codex CLI knobs applied only by the Codex backend.
46
46
 
47
+ `service_tier` (default `"fast"`) is emitted as `-c service_tier=<value>` on
48
+ every invocation, isolated or not: isolated runs pass `--ignore-user-config`,
49
+ which drops a `service_tier` pin in the user's `~/.codex/config.toml`, and the
50
+ standard tier turns long prompts into multi-minute runs. Set it to `None` to
51
+ drop the flag; an isolated run still passes `--ignore-user-config`, so a
52
+ user-level tier pin applies only with `isolated=False`. `developer_instructions` injects
53
+ the system-prompt layer via `-c developer_instructions=<value>`, serialized as
54
+ a TOML string so any text — multi-line, or TOML-ambiguous words like `true` —
55
+ arrives as a string.
56
+
47
57
  Example:
48
58
  >>> CodexConfig(sandbox="read-only", enable_mcp=True)
49
59
  """
@@ -51,6 +61,8 @@ class CodexConfig:
51
61
  sandbox: str | None = None
52
62
  enable_hooks: bool = False
53
63
  enable_mcp: bool = False
64
+ service_tier: str | None = "fast"
65
+ developer_instructions: str | None = None
54
66
 
55
67
 
56
68
  @dataclass(frozen=True, slots=True)
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