File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ repository.workspace = true
88homepage.workspace = true
99
1010[lib ]
11- name = " devsper "
11+ name = " _core "
1212crate-type = [" cdylib" ]
1313
1414[dependencies ]
Original file line number Diff line number Diff line change @@ -440,7 +440,7 @@ fn run_specs_async<'py>(
440440// ── Module registration ───────────────────────────────────────────────────────
441441
442442#[ pymodule]
443- fn devsper ( m : & Bound < ' _ , PyModule > ) -> PyResult < ( ) > {
443+ fn _core ( m : & Bound < ' _ , PyModule > ) -> PyResult < ( ) > {
444444 m. add_class :: < PyNodeSpec > ( ) ?;
445445 m. add_class :: < PyWorkflowIr > ( ) ?;
446446 m. add_function ( wrap_pyfunction ! ( run, m) ?) ?;
Original file line number Diff line number Diff line change 1+ from devsper ._core import (
2+ NodeSpec ,
3+ WorkflowIr ,
4+ load_workflow ,
5+ run ,
6+ run_async ,
7+ run_specs ,
8+ run_specs_async ,
9+ run_workflow ,
10+ run_workflow_async ,
11+ )
12+
13+ __all__ = [
14+ "NodeSpec" ,
15+ "WorkflowIr" ,
16+ "load_workflow" ,
17+ "run" ,
18+ "run_async" ,
19+ "run_specs" ,
20+ "run_specs_async" ,
21+ "run_workflow" ,
22+ "run_workflow_async" ,
23+ ]
Original file line number Diff line number Diff line change 1+ import argparse
2+ import json
3+ import sys
4+
5+
6+ def main () -> None :
7+ parser = argparse .ArgumentParser (
8+ prog = "devsper" ,
9+ description = "Devsper — self-evolving AI workflow engine" ,
10+ )
11+ sub = parser .add_subparsers (dest = "command" , required = True )
12+
13+ run_p = sub .add_parser ("run" , help = "Run a .devsper workflow" )
14+ run_p .add_argument ("spec" , help = "Path to .devsper file" )
15+ run_p .add_argument (
16+ "--input" ,
17+ metavar = "KEY=VALUE" ,
18+ action = "append" ,
19+ default = [],
20+ dest = "inputs" ,
21+ help = "Workflow input (repeatable)" ,
22+ )
23+
24+ args = parser .parse_args ()
25+
26+ if args .command == "run" :
27+ inputs : dict [str , str ] = {}
28+ for kv in args .inputs :
29+ if "=" not in kv :
30+ print (f"error: expected KEY=VALUE, got '{ kv } '" , file = sys .stderr )
31+ sys .exit (1 )
32+ k , v = kv .split ("=" , 1 )
33+ inputs [k ] = v
34+
35+ from devsper ._core import run as _run
36+
37+ results = _run (args .spec , inputs or None )
38+ print (json .dumps (results , indent = 2 ))
39+
40+
41+ if __name__ == "__main__" :
42+ main ()
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "maturin"
44
55[project ]
66name = " devsper"
7- version = " 3.1.2 "
7+ version = " 3.1.3 "
88description = " Devsper — self-evolving AI workflow engine"
99readme = " README.md"
1010requires-python = " >=3.11"
@@ -18,7 +18,11 @@ classifiers = [
1818]
1919dependencies = []
2020
21+ [project .scripts ]
22+ devsper = " devsper._cli:main"
23+
2124[tool .maturin ]
2225bindings = " pyo3"
26+ module-name = " devsper._core"
2327manifest-path = " ../crates/devsper-py/Cargo.toml"
2428strip = true
You can’t perform that action at this time.
0 commit comments