Metadata-Version: 2.4
Name: uri2flow
Version: 0.1.7
Summary: Compact URI flow to workflow graph compiler for uri3/nl2uri pipelines
License-Expression: Apache-2.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: PyYAML>=6.0
Requires-Dist: uri2pact
Requires-Dist: uri2ops
Requires-Dist: uri3
Provides-Extra: dev
Requires-Dist: pytest>=8.0; 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"
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Provides-Extra: jsonschema
Requires-Dist: jsonschema>=4.0; extra == "jsonschema"

# uri2flow v0.1


## AI Cost Tracking

![PyPI](https://img.shields.io/badge/pypi-costs-blue) ![Version](https://img.shields.io/badge/version-0.1.7-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.67-orange) ![Human Time](https://img.shields.io/badge/Human%20Time-7.2h-blue) ![Model](https://img.shields.io/badge/Model-openrouter%2Fqwen%2Fqwen3--coder--next-lightgrey)

- 🤖 **LLM usage:** $0.6733 (12 commits)
- 👤 **Human dev:** ~$724 (7.2h @ $100/h, 30min dedup)

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

---

`uri2flow` is a small compiler for compact URI flows.

It converts human/LLM-friendly YAML:

```yaml
flow:
  id: weather-agent-local-health

do:
  - agent://weather-generator
  - hypervisor://local/weather-agent/run
  - browser://chrome/page/open:
      url: http://localhost:8101/health
```

into an expanded `workflow_graph` manifest for `uri3`.

## Why this exists

Full workflow YAML is useful for machines, debugging and audit, but it is too verbose for humans and LLMs. The preferred input format should be URI-first and compact. `uri2flow` handles the expansion step.

## Role in the system

```text
nl2uri    -> natural language -> compact URI flow / URI graph
uri2flow  -> compact URI flow -> expanded workflow graph
uri3      -> validate, plan, route and execute graph
uri2ops   -> execute UI/OS/browser operations
hypervisor -> lifecycle, deployment, policy, registry
```

## Install

```bash
pip install -e .
```

## Commands

```bash
uri2flow validate examples/15_compact_uri_flow/weather.uri.flow.yaml
uri2flow expand examples/15_compact_uri_flow/weather.uri.flow.yaml --out output/weather.uri.graph.yaml
uri2flow print examples/15_compact_uri_flow/weather.uri.flow.yaml
```

## Example

See [`examples/15_compact_uri_flow`](examples/15_compact_uri_flow/README.md).

## Design rule

`uri2flow` does not execute anything. It only parses, normalizes and expands compact URI flows.

## Links

- [TODO](TODO.md) · [CHANGELOG](CHANGELOG.md)
- [nl2uri](../nl2uri) · [uri3](../uri3)
- Org status: [`../TODO_STATUS.md`](../TODO_STATUS.md)


## License

Licensed under Apache-2.0.
