The user sees pi talking to Attractor directly, while the implementation stays grounded in Attractor's stable Python host API.
Good for workflow authoring guidance. Not enough for first-class runtime integration.
In user terms: a skill would only tell pi how to improvise Attractor operations; the extension makes those operations real.
.pi/extensions/attractor/index.ts .pi/extensions/attractor/README.md
This is the user-facing layer inside pi.
scripts/pi/attractor_bridge.py
This is the trusted translator between pi and the stable Attractor Python API.
tests/test_pi_bridge.py
This protects the user flow from validate through paused-gate resume.
pi extension (TypeScript)
↓
uv run python scripts/pi/attractor_bridge.py
↓
from attractor import Engine, parse, validate, InputCopy, ...
↓
Attractor repo + worktrees + journals
/attractor-validate <workflow.dot>/attractor-run <workflow.dot>/attractor-list/attractor-show <run-id>/attractor-resume <run-id>/attractor-respond <run-id> <choice> [reason]attractor_validate_workflowattractor_run_workflowattractor_resume_runattractor_respond_gateattractor_list_runsattractor_show_run{"type":"event","event":"run_started",...}
{"type":"event","event":"node_started",...}
{"type":"event","event":"human_gate",...}
{"type":"result","command":"run",...}
uv run pytest -q tests/test_pi_bridge.pyuv run ruff check scripts/pi/attractor_bridge.py tests/test_pi_bridge.pyuv run pyright scripts/pi/attractor_bridge.pyThat sequence mirrors how a real user would experience the integration.
pi /reload /attractor-validate workflows/tool-only.dot /attractor-run workflows/tool-only.dot /attractor-list /attractor-show <run-id>
This version is written to center the user's experience: