uricontrol
AI Cost Tracking
- 🤖 LLM usage: $0.7622 (29 commits)
- 👤 Human dev: ~$1710 (17.1h @ $100/h, 30min dedup)
Generated on 2026-10-04 using openrouter/qwen/qwen3-coder-next
uricontrol is a small URI-native control-plane core. It provides a thin deterministic layer over software, services, devices and operating-system capabilities.
The Python distribution is named uricontrol (renamed from uricore — that PyPI name is squatted by an unrelated project), while the runtime module is uri_control:
from uri_control import CapabilityRegistry, UriControlRuntime, JsonlEventStore
URI intent routing (resolve targets, HTTP/MQTT delegate, wire envelopes) lives in the sibling package uriresolver (uri_resolver). uri_control.resolver, .transport, and .envelope are compatibility shims over uri_resolver.
The repository also contains placeholder SDK folders for Node/TypeScript, Go and PHP. Those SDKs intentionally remain thin: the source of truth is the URI, the manifest, and the protobuf-style command/event envelope.
Edge runtime (uri_control.edge)
Edge HTTP server, flow runner, and pack composition — formerly the separate uri_control.edge package (removed 2026-06):
from uri_control.edge.runtime import Runtime, run_flow
from uri_control.edge.compose import build_runtime
from uri_control.edge.http import serve
Used by edge CLIs (urirdpedge, urikvmedge, …) and orchestrated by urisys.
Runtime.call resolves the URI via uriresolver
(resolve_uri → optional transport delegation), then — for local execution —
enforces resolver-declared policy (uri_resolver.policy.check_operation_limits /
check_shell_policy) before loading the handler, and emits a *.policy_denied
event on violation. Supported handler schemes: python://, http(s)://, node://,
urisys://flow/<id> (built-in process flow runner) and runtime://resolver/<op>
(resolver-bound placeholder: mock under dry-run/environment: mock, else a clear
no_runtime_binding error).
Architecture
URI
↓
Capability manifest
↓
Policy decision
↓
Command / Query dispatch
↓
Handler in Python / Node / Go / PHP / any runtime
↓
Append-only event log
↓
Projection / status / result
Core rules:
- URI does not execute.
- URI identifies a resource, operation or intent.
- Manifest declares capabilities, handlers and policy.
- Handler performs the technical work.
- Event store records facts.
- Projection builds read models from events.
Repository layout
uricore/
core/
python/
uri_control/
parser.py
registry.py
dispatcher.py
event_store.py
projection.py
policy.py
node/uri-control/
go/uricontrol/
php/UriControl/
contracts/
proto/uricore/v1/envelope.proto
examples/
packs/browser_mock/
packs/systemd_mock/
call_browser_mock.py
call_systemd_mock.py
tests/
Install locally
cd uricore
python -m pip install -e .
For tests:
python -m pip install -e .[dev]
python -m pytest
CLI examples
Explain a URI against a manifest:
uricore explain browser://default/page/open \
--manifest examples/packs/browser_mock/manifest.yaml
Call a command:
uricore call browser://default/page/open \
--manifest examples/packs/browser_mock/manifest.yaml \
--payload '{"url":"https://example.com","wait_until_loaded":true}' \
--approve \
--events output/events.jsonl
Query a projection from JSONL events:
uricore projection latest --events output/events.jsonl
Minimal Python usage
from uri_control import CapabilityRegistry, JsonlEventStore, UriControlRuntime
registry = CapabilityRegistry.from_manifest_files([
"examples/packs/browser_mock/manifest.yaml"
])
runtime = UriControlRuntime(
registry=registry,
event_store=JsonlEventStore("output/events.jsonl"),
)
result = runtime.call(
"browser://default/page/open",
payload={"url": "https://example.com"},
context={"approved": True, "environment": "mock"},
)
print(result.ok, result.result)
Manifest example
id: browser-mock-pack
version: 1
scheme: browser
uri_patterns:
- pattern: browser://{session}/page/open
kind: command
operation: open_page
command_type: browser.v1.OpenPageCommand
success_event_type: browser.v1.PageOpenedEvent
side_effects: true
approval: required
handlers:
python:
open_page: python://examples.packs.browser_mock.handlers:open_page
Relationship to urisys
uricore should stay small and deterministic. A future urisys project can reuse it and add:
- concrete device/software packs,
- HTTP or gRPC gateway,
- dashboard,
- scheduler,
- LLM planner,
- policy UI,
- multi-language runners.
uricore should not contain those heavier orchestration concerns.
Ekosystem TellMesh
Orchestrator: urisys · Mapa: MESH.md · Model: ECOSYSTEM.md
| Pole | Wartość |
|---|---|
| Warstwa | Control plane + edge runtime |
| Moduł | uri_control, uri_control.edge |
| Zależności | uriguard |
| Rola | CapabilityRegistry, policy, handlers, Runtime, compose, http.serve |
| Uwaga | Zastępuje legacy PyPI uricore i urisysedge (usunięty 2026-06) |
Runtime edge: uri_control.edge w pakiecie uricontrol (legacy PyPI uricore / urisysedge usunięty 2026-06).
Resolver intencji: uriresolver (uri_resolver) + transport w uritransport; policy gate: uriguard (uri_guard).
License
Licensed under Apache-2.0.
Metadata
Release files for uricontrol 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| uricontrol-0.1.16.tar.gz | 46.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uricontrol-0.1.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.6 kB
Release files / uricontrol-0.1.16.tar.gz
| Download URL | uricontrol-0.1.16.tar.gz |
|---|---|
| Size | 46.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b874a9cd160aca41a513cdfe6e81ee72384d61889a21de694b02db28c9dd8d7b
|
|
BLAKE2b-256 checksum How to use checksums |
567969f6ac84d501fc0bab8486dbc7656689cfe0a091e9852c319feeef9eef25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / uricontrol-0.1.16-py3-none-any.whl
| Download URL | uricontrol-0.1.16-py3-none-any.whl |
|---|---|
| Size | 47.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e0a603977ffb0fe00b2f186de0ed1fbf11adfc5bd2e008d49aadb8eba5457ef
|
|
BLAKE2b-256 checksum How to use checksums |
3cfc3ceed7b75d76b3eefb80b9eedad5724bbc1e90d7b97dce8636bbb6d78c45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|