Quickstart
Install from PyPI and run a first end to end ToolGate decision locally.
bash
pip install sdf-planMinimal example
python
from sdf_plan import GateContext, confirm, propose
ctx = GateContext(workspace_id="demo-ws")
first = propose(
tool_name="filesystem.write",
args={"path": "/tmp/demo.txt", "content": "hello"},
ctx=ctx,
)
print(first.decision.value)
token = first.resume.token
confirm(token, user_ok=True)
second = propose(
tool_name="filesystem.write",
args={"path": "/tmp/demo.txt", "content": "hello"},
ctx=ctx,
meta={"confirmed_token": token},
)
print(second.decision.value)Expected flow
REQUIRE_CONFIRM then CONFIRM then ALLOW