7f7868f7cf
---ci--- phase: 5 milestone: v0.1 status: complete requirements: covered: [REQ-01, REQ-02, REQ-03, REQ-04, REQ-05, REQ-06, REQ-07, REQ-08, REQ-09, REQ-10, REQ-11, REQ-12, REQ-13, REQ-14, REQ-15, REQ-16, REQ-17, REQ-18, REQ-19, REQ-20] partial: [] ---/ci---
Reference Tools
Templates for Open WebUI tool authors wiring tools to the CoreCI Broker. They contain no secrets and no live-infrastructure client.
proxmox_readonly_reference.py- the full broker flow (spec section 11): first call registers and persists agent state, then fetchescoreci/proxmox; later calls load the persisted token viaget_state.minimal_auth_showcase.py- the minimal pattern: authenticate with the broker, then use a second tool.
The flow both templates follow:
- The CEO allowlists the tool's app UUID and user id in the broker UI.
- Fetch the client from
/static/coreci_broker_client.pyand import it. ensure_registered(state)registers (idempotent) and merges the token into your state dict;put_state(state)persists it as the tool's only durable state channel.read_secret("coreci/<agent_id>", state)fetches the credential; on a 401 the client re-registers and retries once.
Downstream calls default to a safe dry-run with no live credential use; replace the dry-run block with real calls in your own tool.
Client module: coreci_broker_client.py (stdlib urllib only, zero deps).