spawnllm 0.1.2__tar.gz → 0.1.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spawnllm
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Subshell + MLX LLM-calling backends (Claude/Codex CLI, local MLX) shared across tools.
5
5
  Keywords:
6
6
  Author: Yasyf Mohamedali
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "spawnllm"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "Subshell + MLX LLM-calling backends (Claude/Codex CLI, local MLX) shared across tools."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -55,11 +55,10 @@ def parse_structured_output[M: BaseModel](raw: str, response_model: type[M] | No
55
55
  if not response_model:
56
56
  return raw
57
57
  data = json.loads(raw)
58
- if isinstance(data, list) and data:
59
- return extract_structured(
60
- cast(list[dict[str, Any]], data), response_model
61
- ) or response_model.model_validate_json(raw)
62
- return response_model.model_validate_json(raw)
58
+ events = data if isinstance(data, list) else [data] if isinstance(data, dict) else []
59
+ return extract_structured(
60
+ cast(list[dict[str, Any]], events), response_model
61
+ ) or response_model.model_validate_json(raw)
63
62
 
64
63
 
65
64
  def parse_result_envelope(stdout: bytes, *, argv: list[str], stderr: bytes) -> str:
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