tools.parallax_tool module
Parallax 4.5 Passive Reasoning Tool – Sigma Expanse + NCM + Gemini Compat.
Stargazer-callable tool for structured contradiction-holding reasoning. Star invokes this on complex, paradoxical, or multi-perspective analysis.
Reads NCM state from Redis DB12, runs the full Parallax manifold pipeline, writes ERAC deltas and Omega-field state back, returns structured JSON.
Zero LLM calls. Pure symbolic computation. Contradiction = Fertility.
- async tools.parallax_tool.run(action, prompt='', collapse_mode='', axioms='[]', axiom_id='', ctx=None)[source]
Dispatch one Parallax reasoning action and return a JSON string result.
The single public handler for the
parallax_reasoningtool (this module’srunentry point, dispatched bytool_loader.pybased on the module’sTOOL_NAME/TOOL_PARAMETERS; not called directly elsewhere in the repo). It resolves the per-channel engine via_get_engine()and then branches onaction:analyzereads the live NCM vector (_read_ncm_vector()), parses any caller-supplied axiom texts, runs the full manifold pipeline viaengine.analyze, persists the resulting state (_write_parallax_state()), appends protocol reminders, and hoists any fail-state warnings (failsafe, monocular, dominant-flip, pcl-stuck, coherence) ahead of the JSON body;predictre-reads the NCM vector and callsengine.predictto project manifold drift;check_eracreturns all tracked axioms plus those pending Prime Architect review;get_omegareturns the current omega-field;erodelooks up a single axiom by id. The computation is purely symbolic with zero LLM calls; its only external touches are the two best-effort Redis DB12 reads/writes above. Outcomes and key metrics are logged at info level, and any unexpected exception is caught, logged with a traceback, and returned as a JSONerror.- Parameters:
action (
str) – One ofanalyze,predict,erode,check_erac,get_omega. Anything else returns a JSON usage error.prompt (
str) – Text/topic to analyze; required foranalyze.collapse_mode (
str) – Optional collapse override (opus,sigma,hybrid); auto-selected from manifold state when empty.axioms (
str) – JSON array string of axiom texts to track ERAC for; unparseable or empty input is treated as no axioms.axiom_id (
str) – Axiom id required by theerodeaction.ctx (
ToolContext|None) – The activeToolContext(supplieschannel_idand the Redis handle used for NCM reads and state writes).
- Returns:
for
analyzethe structured manifold (optionally prefixed by warning text), for other actions their respective payloads, or a JSONerrorobject on unknown action or failure.- Return type: