Metadata-Version: 2.4
Name: talocode-screenlane
Version: 0.2.0
Summary: Python SDK and CLI for ScreenLane — screen-aware voice command layer for AI agents
Author: Talocode
License: MIT
Project-URL: Homepage, https://github.com/talocode/screenlane
Project-URL: Repository, https://github.com/talocode/screenlane
Keywords: screenlane,talocode,ai-agents,mcp,voice,screen-aware
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"

# ScreenLane (Python)

**Screen-aware voice / text command layer for AI agents** — capture screen context, dictate intent, route commands to Codra, Tera, and other targets.

Part of **[Talocode](https://talocode.site)**.

| | |
|--|--|
| **Package** | `pip install talocode-screenlane` |
| **Import** | `from talocode_screenlane import ScreenLaneClient` |
| **CLI** | `screenlane-py` |
| **Local default** | `http://127.0.0.1:3070` |
| **Cloud** | `https://api.talocode.site` + `TALOCODE_API_KEY` |
| **Repo** | [github.com/talocode/screenlane](https://github.com/talocode/screenlane) |
| **License** | MIT |

---

## Why ScreenLane?

Agents often lack **what’s on the user’s screen**. ScreenLane sits between:

1. **Capture** — screen / context text  
2. **Intent** — voice transcript or typed command  
3. **Route** — structured command for Codra, Tera, GateLane, etc.  

Open-source local server + cloud routes so you can demo offline and scale with Talocode Cloud.

---

## Install

```bash
pip install -U talocode-screenlane
```

Python **3.10+**.

---

## Quickstart

### Local server

```bash
# In the ScreenLane Node package / monorepo:
# screenlane serve   → http://127.0.0.1:3070

from talocode_screenlane import ScreenLaneClient

client = ScreenLaneClient()  # local default

print(client.health())
print(client.doctor())
print(client.demo())

result = client.command({
    "text": "Fix this error",
    "contextText": "TypeError: Cannot read properties of undefined",
    "target": "codra",
})
print(result)
```

### Android workflow foundation

ScreenLane plans Android workflows locally before a future companion bridge can execute anything. Inspection can be planned without approval. Tap, type, and scroll require explicit approval. Sensitive app classes are blocked, and every request records a local receipt.

```python
from talocode_screenlane import ScreenLaneClient

client = ScreenLaneClient()

print(client.android_doctor())

pending = client.plan_android_action({
    "action": "tap",
    "appId": "com.example.notes",
    "target": "New note",
})
print(pending["status"])  # pending_approval

approved = client.plan_android_action({
    "action": "tap",
    "appId": "com.example.notes",
    "target": "New note",
    "approved": True,
})
print(approved["status"])

print(client.list_android_receipts())
```

The local API exposes `GET /v1/screenlane/android/doctor`, `POST /v1/screenlane/android/actions`, and `GET /v1/screenlane/android/receipts`.

### Cloud

```python
import os
from talocode_screenlane import ScreenLaneClient

cloud = ScreenLaneClient(
    base_url="https://api.talocode.site",
    api_key=os.environ["TALOCODE_API_KEY"],
)

cloud.command({
    "text": "Summarize this screen",
    "contextText": "...",
    "target": "tera",
})
```

### Environment

| Variable | Purpose |
|----------|---------|
| `TALOCODE_API_KEY` | Cloud auth |
| `TALOCODE_BASE_URL` | Optional cloud base |
| Local URL | Passed as `base_url` / client default `http://127.0.0.1:3070` |

---

## Client API

| Method | Purpose |
|--------|---------|
| `health()` | Liveness |
| `doctor()` | Dependency / config checks |
| `android_doctor()` | Android companion readiness and safety policy |
| `plan_android_action(payload)` | Plan an Android inspection or approval-gated action |
| `list_android_receipts()` | List local Android workflow receipts |
| `capture(payload)` | Screen / context capture |
| `dictate(payload)` | Speech / text dictation |
| `command(payload)` | Build / run agent command |
| `send(payload)` | Dispatch to target |
| `list_contexts()` | Known contexts |
| `list_commands()` | Command catalog |
| `demo()` | Deterministic demo flow |

Typical payload fields: `text`, `contextText`, `target`, `sessionId`, offline flags (see CLI).

---

## CLI

```bash
screenlane-py --help
screenlane-py demo
screenlane-py command --text "Fix this error" --context-text "..." --offline
```

---

## How it fits Talocode

```
User screen / voice
        ↓
   ScreenLane (this)
        ↓
  Codra / Tera / GateLane / custom target
```

Pair with **Codra** for code fixes and **Tera** for general LLM actions.

---

## Related packages

| Package | Role |
|---------|------|
| `talocode-screenlane` | **This package** |
| `talocode-codra` | Coding agent target |
| `talocode-tera` | Chat / rewrite target |
| `talocode` | Unified cloud client |

---

## Talocode ecosystem

| Project | Role |
|---------|------|
| **[ScreenLane](https://github.com/talocode/screenlane)** | This product |
| **[Codra](https://github.com/talocode/codra)** | Coding agent |
| **[Tera](https://github.com/talocode/tera)** | AI capabilities |
| **[GateLane](https://github.com/talocode/gatelane)** | MCP gateway |
| **[StackLane](https://github.com/talocode/stacklane)** | Cloud control plane |
| **[SearchLane](https://github.com/talocode/searchlane)** | Search capabilities for agents |
| **[Agent Browser](https://github.com/talocode/agent-browser)** | Browser automation |
| **[ClipLoop](https://github.com/talocode/cliploop)** | Short-form video workflows |
| **[InvoiceLane](https://github.com/talocode/invoicelane)** | Invoicing workflows |
| **[ContextLane](https://github.com/talocode/contextlane)** | Context ingestion |
| **[MemoryLane](https://github.com/talocode/memorylane)** | Agent memory |
| **[Tradia](https://github.com/talocode/tradia)** | Trading intelligence |

More: [github.com/talocode](https://github.com/talocode) · [talocode.site](https://talocode.site) · [docs.talocode.site](https://docs.talocode.site)

## License

MIT © Talocode
