Skip to main content

PeerHub

A durable communication layer for collaborating AI peers. The Core owns only Peer, Stream, Record and Offset. Runtime delivery, observations, diagnostics, work continuity and collaboration capabilities are extensions.

Develop from this checkout

Requires Python 3.11–3.14.

python -m pip install -e ".[dev]"
peerhub --help
peerhub --version

This describes current source, not a newly published release. The public command is peerhub; the temporary milestone-specific entrypoint has been retired. python -m peerhub and python -m peerhub.cli use the same public CLI.

Everyday commands

# Persist the prompt, execute one provider, and persist its response.
peerhub ask cx "Summarize this repository" --stream review --request-id review-001

# Explicit collection may contact provider CLIs.
peerhub observation refresh --peers cx cc ag
peerhub observation refresh --peers cc --system-dir D:\tools\portable  # explicit provider installation directory

# Read committed observations without probing or writing.
peerhub diag
peerhub diag quota --json
peerhub diag health
peerhub diag --live --interval-seconds 2
peerhub diag --view rich

# Collect quota evidence and watch the dashboard in one loop.
peerhub monitor --interval-seconds 60
peerhub monitor --view plain --cycles 1

# Prompt files, provider working directory, and explicit model binding.
peerhub ask ag --query-file prompt.txt --workspace . --model MODEL --json
peerhub ask cx "Reply briefly" --profile cx.standard --silence-timeout-seconds 30

Builtin provider names are cx/codex, cc/claude and ag/agy. Custom Peer identities can be registered with peer register --peer worker --adapter cx.

ask supports explicit --profile, --model, --effort, --timeout-seconds, optional --silence-timeout-seconds, --max-output-bytes, --author-peer and --json. Profile policy resolves workspace → global → packaged defaults; it does not assert measured model availability. Retrying the same --request-id reuses a completed response. A different prompt or binding conflicts, and an uncertain execution requires explicit reconciliation before another execution. Conversation continuity currently uses bounded Stream history; native provider-session resume is not claimed.

Quota is collected separately from diagnostics. diag --fresh has been replaced by observation refresh. Unmeasured values remain UNKNOWN or another explicit evidence state, and expired measurements become STALE.

diag --live repeatedly reads committed snapshots only. --cycles N bounds the number of frames; --json emits one JSON object per line in live mode. Watching never refreshes quota or changes stored data.

Store selection and existing data

The store is .peerhub/core.db. Discovery picks the nearest one (current directory, <cwd>/peerhub, then parents); --db PATH or PEERHUB_DB choose explicitly. peerhub diag health reports store_selection (the path and how it was chosen: env, explicit, discovered, workspace-default, default). Developer scratch (live-gate JUnit etc.) goes under .peerhub/work/; the top of .peerhub/ holds the database and its restore.epoch metadata.

Use global --db PATH before the command, or PEERHUB_DB, to select a store explicitly. An explicit missing path is never redirected to another store. ask --workspace DIR uses that directory's store unless a database was explicitly selected. Read-only commands do not create a missing store.

The v0 runtime, its importer, the PEERHUB_CLI selector and the 109-command table were removed (2026-10-08); the v0 source is kept only on the Git branch legacy/v0-main-final.

Package structure

peerhub/
  core/          Peer, Stream, Record, Offset; SQLite and data import
  extensions/    Bridge, Observation, Diag, Artifact, Work, Search, Routing, …
  cli/           public parser and command handlers
  config_data/   packaged provider model defaults
tests/
  communication/ Core, delivery, observations, migration and package gates
  continuity/    extension host, artifacts, work, skills, backup and eval
  collaboration/ federation, memory, search, routing, orchestration and approval
tools/
  command_inventory.py
  traceability.py
  release_evidence.py

Milestones describe development progress, not runtime ownership. Frozen specifications, historical evidence and existing durable wire/storage identifiers retain their original names. See the cleanup decisions and AG review.

Validation

python -m pytest -q
pyright
python tools/command_inventory.py --check
python tools/traceability.py --upto 9

# Real provider canaries spend quota: local only, never in CI (refuses when CI is set).
python -m tools.live_gate --yes

Real providers are opt-in: set PEERHUB_LIVE=1 and select live, slow or e2e under tests/communication/live. Soak is separately opt-in with PEERHUB_SOAK=1. Local checks do not promote a milestone or authorize a release; candidate-matched CI, live and package evidence still apply.

Historical evidence is retained separately: the 2026-10-04 archived snapshot has VERIFIED-LOCAL records, and the recorded CI head has VERIFIED-CI records. Those records preserve their original paths and apply only to the recorded snapshot/head, not this changed worktree.

Metadata

Release files for peerhub 0.12.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peerhub 0.12.2
File Size Uploaded Provenance
peerhub-0.12.2.tar.gz 189.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for peerhub 0.12.2
File Interpreter ABI Platform
peerhub-0.12.2-py3-none-any.whl Python 3 none any Details

Total release size: 407.3 kB

Release files / peerhub-0.12.2.tar.gz

Download URL peerhub-0.12.2.tar.gz
Size 189.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cccc80fdb75dd78ed1501aa077ebf468b98fd458e0b5628dfac987c27b8df36b
BLAKE2b-256 checksum
How to use checksums
4dc9b6da19a64950ca9f06da5f4b055f2048559910923b273026a45da81b23a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / peerhub-0.12.2-py3-none-any.whl

Download URL peerhub-0.12.2-py3-none-any.whl
Size 217.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a4649f7432e7279e18501557fd571de97e694cde789afb8a3495ebaa3ff9cb9
BLAKE2b-256 checksum
How to use checksums
9a4ba669e7f32fbd6f0268161a9bd3c0d5ab7c43ef9478280acc72a407b496d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Security for peerhub 0.12.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for peerhub-0.12.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.12.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page