Metadata-Version: 2.4
Name: tide-runtime
Version: 0.2.6
Summary: Tide runtime policy, approvals, and earned-use ledger for AI agent tools.
Project-URL: Repository, https://github.com/rippletideco/rippletide-package
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# Tide Runtime SDK

Python SDK for wrapping production agent tools with Tide policy, approvals, and
earned-use logging.

```bash
pip install tide-runtime
tide init --pack support-refunds --environment prod
```

`tide init --dry-run --pack <name>` prints the policy before writing it.
Built-in packs: `baseline`, `support-refunds`, `sql-analyst`, `mcp-baseline`.

```python
from tide import configure, controlled_tool, record_outcome

configure(agent_id="crm-agent", workflow_id="lead-sync", environment="prod")

@controlled_tool(name="crm.update_lead", risk_class="internal_write", capture=["lead_id"])
def update_lead(lead_id, status):
    return {"lead_id": lead_id, "status": status}

try:
    update_lead("L-1", "qualified")
    record_outcome("success")
except Exception:
    record_outcome("failure")
    raise
```

Default files live in `.tide/ledger/`. Override with `TIDE_LEDGER_DIR` or
`configure(project="...")`.

```bash
tide approvals
tide approve <id>
tide deny <id> --reason "not in scope"
tide report
```
