Metadata-Version: 2.4
Name: aiui-code
Version: 0.1.2
Summary: Multi-agent coding workspace Web UI plugin for PraisonAIUI (aiui)
Project-URL: Homepage, https://github.com/MervinPraison/aiui-code
Project-URL: Repository, https://github.com/MervinPraison/aiui-code
Project-URL: Documentation, https://github.com/MervinPraison/PraisonAIUI/blob/main/docs/features/plugins.md
Project-URL: Issues, https://github.com/MervinPraison/aiui-code/issues
Author: Mervin Praison
License: MIT
License-File: LICENSE
Keywords: aiui,coding-agent,diff-review,plugin,praisonai,praisonaiui,worktree
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.10
Requires-Dist: aiui>=0.3.197
Requires-Dist: starlette>=0.37
Requires-Dist: typer>=0.9
Provides-Extra: code
Requires-Dist: praisonai-code>=0.2.0; extra == 'code'
Provides-Extra: dev
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# `aiui-code` — PraisonAI Code Web UI Plugin

Standalone multi-agent coding workspace Web UI plugin for [PraisonAIUI (`aiui`)](https://ui.praison.ai). Plugs dynamically into `PraisonAIUI` via Python entry points (`praisonaiui.plugins`) with **zero UI code in `praisonaiagents` or `praisonai-code`** and **zero coding-domain bloat in `aiui`**.

## Features

- **Workspaces → Parallel Agent Runs:** Register multiple local folders/repos, launch concurrent runs, and `Cmd/Ctrl`-click a second run for **2-pane split comparison**.
- **Isolated Git Worktrees:** Automatic per-run `.praisonai/worktrees/<slug>` isolation (backed lazily by `praisonaiagents.GitWorktreeAdapter`) with one-click **Commit**, **Merge Worktree**, and **Discard**.
- **Live Diff Review + Inline Line Comments:** Unified & side-by-side split diff viewer; click any line to attach inline review comments and press **`Cmd/Ctrl+Enter`** to send structured `file:line` feedback directly back to the agent.
- **Unified Agent Inbox & Per-Agent Approvals:** Per-agent `WebApprovalBackend` prevents concurrent runs from colliding, syncs to `@aiui/sdk` notifications, and persists narrow "Allow Always" rules strictly outside cloned repos (`~/.praisonai/permissions/`).
- **Multi-Engine Choice:** PraisonAI Agent (100+ LLMs / Ollama), Claude Code CLI, OpenAI Codex CLI, Gemini CLI, and Grok CLI.
- **Mid-Flight Steering, Interrupts, Checkpoints & OpenShip:** Steer running agents mid-flight, restore file checkpoints, run OpenShip Self-Review, or open Draft PRs (never auto-merges).
- **Opt-In Terminal & 390 px Mobile Handoff:** Structured read-only command logs by default; pass `--enable-terminal` for an interactive workspace PTY. Responsive 4-tab layout on mobile.

## Quickstart

```bash
pip install aiui-code
aiui code serve --workspace /path/to/your/repo
# → http://127.0.0.1:8766/code
```

With authentication for remote/Tailscale access:

```bash
export GATEWAY_AUTH_TOKEN="your-secret-token"
export AIUI_REQUIRE_TOKEN=1
aiui code serve --workspace /path/to/repo --host 0.0.0.0 --port 8766 --require-auth
```

List detected engines:

```bash
aiui code engines
```

## Full CLI Parity (Control the Live Dashboard)

Every dashboard action is available via `aiui code ...` or `aiui-code ...` (supports `--url`, `--token`, and `--json`):

```bash
aiui code status
aiui code workspaces list
aiui code workspaces add /path/to/another/repo
aiui code runs start <ws_id> "Add unit tests for auth" --engine praisonai --mode safe --focus
aiui code runs watch <run_id>
aiui code runs steer <run_id> "Use pytest fixtures instead"
aiui code runs message <run_id> "Address review" --comment "app.py:12:Handle None input"
aiui code diff <run_id> --patch
aiui code commit <run_id> -m "feat: add auth tests"
aiui code merge <run_id>
aiui code approvals list --status pending
aiui code approvals approve <approval_id>
aiui code ui --run <run_id> --tab diff          # Live-control the open browser dashboard
```

## MCP Server (Let Any Agent Control the Dashboard)

`aiui-code` exposes **23 MCP tools** and **4 live resources** (`code://status`, `code://workspaces`, `code://runs`, `code://approvals`) over **both** transports:

1. **Stdio MCP** (`aiui code mcp` / `aiui-code mcp`) — for Antigravity, Claude Desktop, Claude Code, Cursor, Codex:
   ```bash
   aiui code mcp-config --transport stdio
   ```
2. **Embedded HTTP MCP** (`POST http://127.0.0.1:8766/api/plugins/code/mcp`) — mounted directly on the running dashboard behind PraisonAIUI's auth/origin guards:
   ```bash
   aiui code mcp-config --transport http
   ```

## Development

```bash
# Frontend (externalizes react & @aiui/sdk)
cd frontend && npm ci && npm test && npm run build

# Backend + plugin contract tests
pip install -e ".[dev]"
ruff check src tests
pytest -v
```
