Metadata-Version: 2.4
Name: wizelit-acp
Version: 0.1.6
Summary: Wizelit ACP stdio proxy — connect IDEs to Wizelit over Agent Client Protocol
Author-email: Wizeline <engineering@wizeline.com>
License-Expression: MIT
License-File: LICENSE
Keywords: acp,agent-client-protocol,cursor,ide,wizelit,zed
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: httpx>=0.27.0
Requires-Dist: websockets>=15.0
Requires-Dist: wizelit-client==0.1.19
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# wizelit-acp

Stdin/stdout bridge between an [ACP](https://agentclientprotocol.com)-compatible editor and the Wizelit `/acp` WebSocket.

Editors spawn it via **`uvx`** — no separate install step.

## Setup

1. Install [uv](https://docs.astral.sh/uv/): `brew install uv`
2. Add to your editor (replace the hub URL with your team's deployment):

```json
{
  "agent_servers": {
    "wizelit-hub": {
      "type": "custom",
      "command": "uvx",
      "args": ["wizelit-acp@latest"],
      "env": {
        "WIZELIT_API_URL": "https://your-wizelit-hub.example.com"
      }
    }
  }
}
```

3. **Connect** from the editor. On first use, the browser opens for device-link pairing — sign in with Google and **Approve**.

Credentials are saved to `~/.wizelit/credentials.json`. Later connects reuse the token.

## How it works

- `uvx` fetches this package from PyPI on first run.
- ACP JSON-RPC on stdin/stdout ↔ WebSocket to `WIZELIT_API_URL` + `/acp`.
- Agent execution happens on the Wizelit server, not locally.

## Optional CLI

```bash
uvx wizelit-acp auth login    # manual pairing
uvx wizelit-acp auth logout   # revoke local credentials
```

## Environment

| Variable | Purpose |
|----------|---------|
| `WIZELIT_API_URL` | REST base URL (default `http://127.0.0.1:8000`) |
| `WIZELIT_ACP_URL` | Override WebSocket URL |
| `WIZELIT_CLIENT_NAME` | Pairing label (default `ACP IDE`) |
| `WIZELIT_ALLOW_INSECURE` | `1` to allow plain `http://` / `ws://` to non-loopback hosts (not recommended) |

## Troubleshooting

| Symptom | What to do |
|---------|------------|
| Package not found on PyPI | Pin a published version or ask your platform team to release |
| `uvx: command not found` | `brew install uv` |
| Browser does not open on Connect | Open the pairing URL in your editor's agent log, or run `uvx wizelit-acp auth login` |
| Pairing never completes | Sign in with an allowed Google workspace account and click Approve before expiry |
| Auth errors after weeks | `uvx wizelit-acp auth logout`, then Connect again |
