Skip to content

v3.2.3 — Python library API layer

Latest

Choose a tag to compare

@FutronPrime FutronPrime released this 08 May 13:03
· 1 commit to main since this release

What changed

Root cause fixed: import synapse_forge resolved to the package directory (synapse_forge/__init__.py) rather than the standalone synapse_forge.py file. The __init__.py was a 9-line stub that added the parent to sys.path and nothing else — leaving plan, compose, dispatch, run, call_llm, and all registry helpers absent from the imported module.

Changes

synapse_forge/__init__.py (rewritten — +281 LOC)

  • Loads synapse_forge.py as _forge_core via importlib.util
  • Re-exports all public names into the package namespace
  • Defines thin wrappers for dispatch, call_llm_with_fallback, and run in the package's own __dict__ so patch("synapse_forge.call_llm") intercepts correctly in tests (mock patching works by replacing the name in the target module's dict; wrappers defined here resolve call_llm through this module's globals at call time)
  • Exposes detect_providers from synapse_forge/detect.py

synapse_forge.py (+3 LOC changed)

  • plan_id now uses time.time_ns() instead of int(time.time() * 1000) — guarantees uniqueness across rapid same-millisecond calls
  • Version string bumped to 3.2.3 in docstring, main() parser, and status output

Test results

Before After
14/51 passing 51/51 passing

Backwards compatibility

  • CLI invocation (python synapse_forge.py run "...", synapse-cor run "...") unchanged
  • Adapter imports (from synapse_forge.adapters.gemini import Adapter) unchanged
  • install.sh / bootstrap.sh flow unchanged