Metadata-Version: 2.4
Name: pointiv-extension-sdk
Version: 0.3.3
Summary: Python SDK for building Pointiv WASM extensions
Project-URL: Repository, https://github.com/katkodeorg/pointiv-extension-sdk-python
Author: Katkode
License-Expression: MIT
License-File: LICENSE
Keywords: extension,plugin,pointiv,sdk,wasm
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: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# pointiv-extension-sdk

Python SDK for [Pointiv](https://pointiv.katkode.com) WASM extensions.

## Install

```sh
pip install pointiv-extension-sdk
```

## Setup

```python
from pointiv_extension_sdk import Input, output, storage


def execute(input: Input) -> dict[str, str]:
    count = int(storage.read("run_count") or "0") + 1
    storage.write("run_count", str(count))
    result = output.text(f"Hello, {input.text or 'World'}! Run #{count}")
    return {"type": result.type, "value": result.value}
```

Build to WASM with [`extism-py`](https://github.com/extism/python-pdk), then set `runtime: "wasm"` and `main: "extension.wasm"` in `pointiv-extension.json`.

## APIs

| Module | Permission | What it does |
|--------|------------|--------------|
| `storage` | `storage` | Per-extension key/value store |
| `clipboard` | `clipboard_read` | Read clipboard |
| `ai` | `ai` | LLM completion |
| `http` | `network` | Outbound HTTP |
| `google_calendar` | `google_calendar` | Create Calendar events |
| `google_gmail` | `google_gmail` | Send Gmail |
| `log` | none | Log to `~/.pointiv/trace.jsonl` |

Calls without permission fail safely.

## Manifest

```json
{
  "name": "My Extension",
  "description": "What it does",
  "version": "1.0.0",
  "author": "your-name",
  "keywords": ["tag"],
  "runtime": "wasm",
  "main": "extension.wasm",
  "permissions": ["storage", "network", "google_calendar", "google_gmail"]
}
```

## License

MIT
