levain-cli 0.1.19__tar.gz → 0.1.20__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 (27) hide show
  1. {levain_cli-0.1.19 → levain_cli-0.1.20}/PKG-INFO +1 -1
  2. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/models.py +16 -0
  3. {levain_cli-0.1.19 → levain_cli-0.1.20}/pyproject.toml +1 -1
  4. {levain_cli-0.1.19 → levain_cli-0.1.20}/.gitignore +0 -0
  5. {levain_cli-0.1.19 → levain_cli-0.1.20}/LICENSE +0 -0
  6. {levain_cli-0.1.19 → levain_cli-0.1.20}/README.md +0 -0
  7. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/__init__.py +0 -0
  8. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/__main__.py +0 -0
  9. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/_format.py +0 -0
  10. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/_java.py +0 -0
  11. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/auth.py +0 -0
  12. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/cli.py +0 -0
  13. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/codegen.py +0 -0
  14. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/graph.py +0 -0
  15. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/harness.py +0 -0
  16. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/integrations_check.py +0 -0
  17. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/known_recipes.py +0 -0
  18. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/mcp.py +0 -0
  19. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/parser.py +0 -0
  20. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/profile.py +0 -0
  21. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/py.typed +0 -0
  22. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/reducers.py +0 -0
  23. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/source_check.py +0 -0
  24. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/tlc.py +0 -0
  25. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/translate.py +0 -0
  26. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/user_input.py +0 -0
  27. {levain_cli-0.1.19 → levain_cli-0.1.20}/levain_recipe/validate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: levain-cli
3
- Version: 0.1.19
3
+ Version: 0.1.20
4
4
  Summary: Levain recipe toolchain: PlusCal validator, TLC model checking, and GraphState codegen for agent recipes
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -5,6 +5,7 @@ and sandbox modules. Other modules should import from here
5
5
  rather than defining their own copies.
6
6
  """
7
7
 
8
+ import dataclasses
8
9
  from dataclasses import dataclass, field
9
10
  from typing import Any
10
11
 
@@ -190,6 +191,21 @@ def recipe_kind_of(spec: RecipeSpec) -> str:
190
191
  return "harness" if isinstance(spec, HarnessSpec) else "graph"
191
192
 
192
193
 
194
+ def graph_payload(spec: ValidatedSpec) -> dict[str, Any]:
195
+ """The spec in its runtime shape: what the sandbox graph engine builds.
196
+
197
+ Plain JSON (the turn params carry it), so the sandbox needs none of
198
+ this package to run a graph; the spec's source and invariants stay
199
+ behind, they are the validator's.
200
+ """
201
+ return {
202
+ "variables": [dataclasses.asdict(v) for v in spec.variables],
203
+ "nodes": [dataclasses.asdict(n) for n in spec.nodes],
204
+ "routing": [dataclasses.asdict(t) for t in spec.routing],
205
+ "constants": dict(spec.constants),
206
+ }
207
+
208
+
193
209
  def mcp_server_names(spec: RecipeSpec) -> set[str]:
194
210
  """Every MCP server name the recipe declares, whichever its kind."""
195
211
  if isinstance(spec, HarnessSpec):
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "levain-cli"
3
- version = "0.1.19"
3
+ version = "0.1.20"
4
4
  description = "Levain recipe toolchain: PlusCal validator, TLC model checking, and GraphState codegen for agent recipes"
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
File without changes
File without changes
File without changes