spawnllm 0.6.1__tar.gz → 0.7.0__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.7.0}/PKG-INFO +1 -1
  2. {spawnllm-0.6.1 → spawnllm-0.7.0}/pyproject.toml +2 -2
  3. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/backends/claude.py +1 -1
  4. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/backends/codex.py +17 -2
  5. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/spec.py +17 -2
  6. {spawnllm-0.6.1 → spawnllm-0.7.0}/LICENSE +0 -0
  7. {spawnllm-0.6.1 → spawnllm-0.7.0}/README.md +0 -0
  8. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/__init__.py +0 -0
  9. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/__main__.py +0 -0
  10. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/backends/__init__.py +0 -0
  11. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/backends/base.py +0 -0
  12. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/backends/gemini.py +0 -0
  13. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/backends/mlx.py +0 -0
  14. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/backends/openai_endpoint.py +0 -0
  15. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/backends/registry.py +0 -0
  16. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/call.py +0 -0
  17. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/cli.py +0 -0
  18. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/extract.py +0 -0
  19. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/mlx/__init__.py +0 -0
  20. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/mlx/codec.py +0 -0
  21. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/mlx/engine.py +0 -0
  22. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/mlx/fuse.py +0 -0
  23. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/mlx/patches.py +0 -0
  24. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/proc.py +0 -0
  25. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/py.typed +0 -0
  26. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/response.py +0 -0
  27. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/run.py +0 -0
  28. {spawnllm-0.6.1 → spawnllm-0.7.0}/spawnllm/structured.py +0 -0
  29. {spawnllm-0.6.1 → spawnllm-0.7.0}/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.7.0
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.7.0"
5
5
  description = "Delete your subprocess wrappers around claude, codex, and gemini."
6
6
  readme = "README.md"
7
7
  license = "MIT"
@@ -127,5 +127,5 @@ docs = [
127
127
  # griffe (2.x) distribution, overriding the legacy griffe<2 pin great-docs
128
128
  # itself still declares.
129
129
  "griffelib>=2.0",
130
- "great-docs>=0.14",
130
+ "great-docs>=0.15,<0.16",
131
131
  ]
@@ -130,7 +130,7 @@ class ClaudeCliBackend(CliBackend):
130
130
  ),
131
131
  *(["--system-prompt", cfg.system_prompt] if cfg.system_prompt is not None else []),
132
132
  *(["--max-turns", str(cfg.max_turns)] if cfg.max_turns is not None else []),
133
- *(["--tools", cfg.tools] if cfg.tools is not None else []),
133
+ *(["--tools", *cfg.tools] if cfg.tools else ["--tools", ""] if cfg.tools is not None else []),
134
134
  *(["--disable-slash-commands"] if cfg.disable_slash_commands else []),
135
135
  *(
136
136
  ["--json-schema", schema, "--output-format", "json"]
@@ -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
  []
@@ -19,10 +19,13 @@ class ClaudeConfig:
19
19
  (`permission_mode`, `mcp_config`, `strict_mcp`, `append_system_prompt`,
20
20
  `system_prompt`, `settings`, `disallowed_tools`) and orthogonal extras
21
21
  (`max_turns`, `max_budget_usd`, `tools`, `disable_slash_commands`,
22
- `output_format`, `verbose`).
22
+ `output_format`, `verbose`). `tools` selects the built-in toolset: `None`
23
+ keeps the CLI default, `()` disables every built-in tool, and names
24
+ restrict the session to those tools.
23
25
 
24
26
  Example:
25
27
  >>> ClaudeConfig(permission_mode="bypassPermissions", strict_mcp=True)
28
+ >>> ClaudeConfig(tools=()) # bare session: no built-in tools
26
29
  """
27
30
 
28
31
  permission_mode: str | None = None
@@ -34,7 +37,7 @@ class ClaudeConfig:
34
37
  disallowed_tools: tuple[str, ...] = ()
35
38
  max_turns: int | None = None
36
39
  max_budget_usd: float | None = None
37
- tools: str | None = None
40
+ tools: tuple[str, ...] | None = None
38
41
  disable_slash_commands: bool = False
39
42
  output_format: str | None = None
40
43
  verbose: bool = False
@@ -44,6 +47,16 @@ class ClaudeConfig:
44
47
  class CodexConfig:
45
48
  """Codex CLI knobs applied only by the Codex backend.
46
49
 
50
+ `service_tier` (default `"fast"`) is emitted as `-c service_tier=<value>` on
51
+ every invocation, isolated or not: isolated runs pass `--ignore-user-config`,
52
+ which drops a `service_tier` pin in the user's `~/.codex/config.toml`, and the
53
+ standard tier turns long prompts into multi-minute runs. Set it to `None` to
54
+ drop the flag; an isolated run still passes `--ignore-user-config`, so a
55
+ user-level tier pin applies only with `isolated=False`. `developer_instructions` injects
56
+ the system-prompt layer via `-c developer_instructions=<value>`, serialized as
57
+ a TOML string so any text — multi-line, or TOML-ambiguous words like `true` —
58
+ arrives as a string.
59
+
47
60
  Example:
48
61
  >>> CodexConfig(sandbox="read-only", enable_mcp=True)
49
62
  """
@@ -51,6 +64,8 @@ class CodexConfig:
51
64
  sandbox: str | None = None
52
65
  enable_hooks: bool = False
53
66
  enable_mcp: bool = False
67
+ service_tier: str | None = "fast"
68
+ developer_instructions: str | None = None
54
69
 
55
70
 
56
71
  @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