Metadata-Version: 2.4
Name: weboql
Version: 0.1.2
Summary: WebOQL — Web-based OQL scenario editor and executor
License-Expression: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.110
Requires-Dist: uvicorn>=0.28
Requires-Dist: pydantic>=2.0
Requires-Dist: oqlos>=0.1.0
Requires-Dist: goal>=2.1.0
Requires-Dist: costs>=0.1.20
Requires-Dist: pfix>=0.1.60
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: httpx; extra == "dev"
Requires-Dist: goal>=2.1.0; extra == "dev"
Requires-Dist: costs>=0.1.20; extra == "dev"
Requires-Dist: pfix>=0.1.60; extra == "dev"
Dynamic: license-file

# WebOQL — Web-based OQL Scenario Editor


## AI Cost Tracking

![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.2-blue) ![Python](https://img.shields.io/badge/python-3.9+-blue) ![License](https://img.shields.io/badge/license-Apache--2.0-green)
![AI Cost](https://img.shields.io/badge/AI%20Cost-$0.75-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-3.6h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)

- 🤖 **LLM usage:** $0.7500 (5 commits)
- 👤 **Human dev:** ~$360 (3.6h @ $100/h, 30min dedup)

Generated on 2026-04-15 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)

---

Web-based editor and executor for OQL (Operation Query Language) scenarios.

## Features

- **File Browser**: Browse and select OQL scenario files from the scenarios directory
- **Code Editor**: Edit scenario files with syntax highlighting
- **Execution**: Run scenarios using OqlOS runtime in mock or real mode
- **Live Preview**: Real-time execution logs and status updates

## Installation

### Development Mode

```bash
make install
```

### With Development Dependencies

```bash
make dev
```

## Usage

### Start the Server

```bash
make run
```

The editor will be available at `http://localhost:8203`

### Production Mode

```bash
make run-prod
```

## API Endpoints

- `GET /api/v1/editor/files` - List all scenario files
- `GET /api/v1/editor/file/{path}` - Read file content
- `POST /api/v1/editor/file/{path}` - Write file content
- `POST /api/v1/editor/execute` - Execute a scenario

## Configuration

Environment variables:
- `WEB_PORT` - Server port (default: 8203)
- `HARDWARE_MODE` - Hardware mode: mock|real (default: mock)

## Development

### Build Distribution Packages

```bash
make build
```

### Run Tests

```bash
make test
```

### Clean Build Artifacts

```bash
make clean
```

## Publishing

### Publish to PyPI

```bash
make publish
```

### Publish to Test PyPI

```bash
make publish-test
```

## Project Structure

```
weboql/
├── weboql/
│   ├── __init__.py
│   ├── main.py          # FastAPI application entry point
│   └── api/
│       ├── __init__.py
│       ├── editor.py    # Editor API endpoints
│       └── static/
│           └── editor.html  # Web interface
├── pyproject.toml       # Project configuration
├── Makefile            # Build and deployment automation
└── README.md           # This file
```

## License

Licensed under Apache-2.0.
