Metadata-Version: 2.4
Name: optio-cursor
Version: 0.1.0
Summary: Run Cursor CLI (cursor-agent) as an optio task; local subprocess or remote via SSH; ttyd-served TUI iframe.
Author-email: Kristof Csillag <kristof.csillag@deai-labs.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/deai-network/optio
Project-URL: Repository, https://github.com/deai-network/optio
Project-URL: Issues, https://github.com/deai-network/optio/issues
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Code Generators
Classifier: Framework :: AsyncIO
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: optio-core<0.4,>=0.3
Requires-Dist: optio-host<0.3,>=0.2
Requires-Dist: optio-agents<0.4,>=0.3
Requires-Dist: asyncssh>=2.14
Requires-Dist: aiohttp>=3.9
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"

# optio-cursor

Run Cursor CLI (`cursor-agent`) as an `optio` task — either as a local
subprocess or on a remote host over SSH — with the interactive TUI
embedded in the optio dashboard via an iframe widget served by `ttyd`.

## Install

```bash
pip install optio-cursor
```

Requires Python 3.11+. Pulls `optio-core`, `optio-host`, `optio-agents`,
`asyncssh`, and `aiohttp`.

## What it does

Cursor CLI is a near-twin of Grok Build / Claude Code. optio-cursor
adapts the `optio-grok` machinery: it launches `cursor-agent` inside a
detached tmux session, serves the TUI over `ttyd`, and coordinates with
the host harness through the `optio.log` keyword channel (STATUS /
DELIVERABLE / DONE / ERROR). The agent reads its task from an
`AGENTS.md` file planted in the workdir.

### Isolation

Each task runs under an isolated `HOME` (`<workdir>/home`) with the XDG
base dirs (`XDG_CONFIG_HOME`, `XDG_CACHE_HOME`, `XDG_DATA_HOME`) pinned
under it, so cursor's `~/.cursor` and `~/.cache` state never touches the
operator's real home. Permission rules are config-planted (cursor has no
`--allow`/`--deny` argv): they go into `<home>/.cursor/cli-config.json`.
At login cursor spawns `xdg-open` for the auth URL; the redirect
browser-shim (front of PATH) captures it and surfaces the URL to the
operator on a `BROWSER:` line instead of a browser popping on the host.

## Status

Stage 0 (MVP): iframe/ttyd mode, local host. Resume, seeds,
conversation mode, and filesystem isolation arrive in later stages.
