MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / get_or_create_state

Function get_or_create_state

orchestrate.py:187–201  ·  view source on GitHub ↗

Load existing state, or create one from the optimization plan.

()

Source from the content-addressed store, hash-verified

185
186
187def get_or_create_state() -> dict:
188 """Load existing state, or create one from the optimization plan."""
189 state = load_state()
190 if state is not None:
191 return state
192
193 plan = load_plan()
194 if plan is None:
195 print("ERROR: No optimization_plan.json found. Run extract.py first.")
196 sys.exit(1)
197
198 print("Initializing orchestration state from optimization_plan.json ...")
199 state = _initialize_state_from_plan(plan)
200 save_state(state)
201 return state
202
203
204# ---------------------------------------------------------------------------

Callers 1

mainFunction · 0.85

Calls 4

load_stateFunction · 0.85
load_planFunction · 0.85
save_stateFunction · 0.85

Tested by

no test coverage detected