Identity-bound causal command substrate from sealed caps. Implements lane_collision_policy + coffee_lane_policy (frozen vs fork-on-hop-off resume) for AI continuity governance.
Project description
tibet-cap-bus
Identity-bound causal command substrate from sealed caps.
Implements lane_collision_policy and coffee_lane_policy
(frozen-continuity vs fork-on-hop-off resume semantics) for
AI continuity governance.
lane_collision_policydecides what happens when actors meet.coffee_lane_policydecides what happens when they should not.
Pipeline
sender
-> causal-time (place: assign causal rank)
-> mux (distribute: lane + policy)
-> spaceshuttle (inject: executor-bound memory slot)
-> tibet-dgx (align: cluster alignment)
-> executor (execute)
-> receipt cap (sealed audit record)
What this package provides
- Clean data model —
Cap,LanePolicy,PhaseEvidence,UsageEvent,CapReceipt - Protocol adapters (
adapters.py) — drop-in interface fortibet-mux,tibet-causal-time,tibet-store-mmu,tibet-dgx,tibet-phantom - In-memory default implementations — runnable out-of-the-box for local development
- Branching continuations —
receipt/continue/fork(alpha/beta) /resync-needed/reject - Lane policies —
lane_collision_policy(5 values) +coffee_lane_policy(7 values) - Resume semantics —
freeze_resumeandfork_on_hop_offas first-class runtime modes - Gateway-compatible event export —
tibet-cap-bus.gateway-event.v1contract - Validator + fixture —
validate-gateway-eventCLI + reference JSON fixture - First-class
.aintactor binding + JIS attestation fields
In-memory adapters are placeholders. Real implementations land via Protocol replacement
(see ROADMAP.md for the 0.2.x release line).
Why this exists
The concept is bigger than messaging:
cmailmoves continuitycapcarries a sealed instruction unitcap-streammoves causally ordered actionmuxdistributes those actions across isolated lanes
This package is the first code sketch of that execution-oriented substrate.
Commands
Demo
tibet-cap-bus demo
Runs a small cap flow with:
- one sender
- lamport-style causal placement
- mux-style lane distribution
- executor-bound memory slot injection
- optional cluster alignment marker
- receipt cap emission
Emit a single cap
tibet-cap-bus emit \
--actor codex.aint \
--intent agent.tool.high \
--authority sam:tool \
--payload '{\"tool\": \"search\", \"query\": \"cap-stream\"}' \
--continuation-mode fork
Trace view
tibet-cap-bus trace
Continuation chain
tibet-cap-bus chain
tibet-cap-bus chain --hops 4
Triage lanes
tibet-cap-bus triage
Governance export
tibet-cap-bus governance-export
tibet-cap-bus governance-export --source chain
tibet-cap-bus governance-export --source triage
CBOM export
tibet-cap-bus cbom-export
tibet-cap-bus cbom-export --source chain
tibet-cap-bus cbom-export --source triage
Combined export
tibet-cap-bus export-all
tibet-cap-bus export-all --source chain
tibet-cap-bus export-all --source triage
Gateway-compatible JSONL export
tibet-cap-bus gateway-export
tibet-cap-bus gateway-export --source chain
tibet-cap-bus gateway-export --json
Validate common event lane records
tibet-cap-bus validate-gateway-event
tibet-cap-bus validate-gateway-event --source chain
tibet-cap-bus validate-gateway-event --input fixtures/gateway-event.resume.example.json
This validates the shared event lane used by:
tibet-cap-bustibet-gatewaytibet-ai-sbom- future live emitters such as
brain_api,service_api, ortelecom_api
The current contract is tibet-cap-bus.gateway-event.v1.
Package structure
models.py- canonical records
adapters.py- phase protocols
runtime.py- in-memory default implementation
cli.py- operator surface
Current phases
- emit
- place
- distribute
- inject
- align
- execute
Each phase returns explicit evidence so a future CBOM / audit / usage-event layer can attach cleanly.
The current runtime also projects:
cap-dispatchedcap-executed
events as a first bridge toward:
- AI-SBOM usage events
- CBOM / continuity walkability
- governance/audit conclusions
It can now also translate receipts back into follow-up caps for bounded chain execution, so the sketch behaves more like a real continuity substrate instead of a single-hop runner.
Fork mode now spawns multiple follow-up caps from one parent, making the chain runner branch rather than only continue linearly.
Each distributed cap now also carries a lane policy so branch children can
be treated differently by a future real tibet-mux integration.
Lane policy also now carries an explicit lane_collision_policy:
graceful_yieldassert_rootoverride_allqueuereject
Naast conflict-policy heeft de sketch nu ook een tweede primitive:
coffee_lane_policy, voor avoidance en graceful degradation.
Waarden die nu in de sandbox voorkomen:
sip_anywaypolite_avoidhard_avoidrebuildoffline_fallbackfreeze_resumefork_on_hop_off
Daarmee kunnen trust-, outage- en time-diff signalen per event zichtbaar worden zonder meteen hard in runtimegedrag vast te lopen.
De sandbox vertaalt resume nu ook echt naar verschillend vervolggedrag:
freeze_resume-> één.resume.frozenfollow-upfork_on_hop_off->.resume.catchup+.resume.liverebuild->.resume.rebuildoffline_fallback->.resume.offline
resync-needed and reject now route into explicit triage lanes, so
failure and recovery paths are modeled as first-class continuation flows
instead of dead ends.
The sketch can now also export a governance-shaped document that mirrors
the structure used by tibet-ai-sbom:
governance.questionsgovernance.trust_foundationgovernance.actor_model_provider_linksgovernance.continuation_graphgovernance.usage_events
And a small CBOM/SoM-shaped document with:
cbom.documentscanonical_surfacesurface_statusauthoritymaterial_factscontinuitysom_events
export-all combines both dialects from the same run so governance and
continuity/object views stay aligned.
The sketch can also emit a tibet-gateway-compatible JSONL shape so the
sandbox can act as a direct fixture/data generator for tibet-ai-sbom
ingest without adapter glue.
That same lane can now also be validated directly, so future emitters can
test their records before wiring them into tibet-ai-sbom or tibet-audit.
That event shape now also carries lane-level operational semantics per record, including:
lane_classlane_collision_policypreemptiblelane_priority_emitter
And the sandbox now ships a first fixture file:
fixtures/gateway-event.resume.example.json
The cap and usage-event models now carry:
actor_aintactor_jis_pubkeyattestation_layerattestation_ref
So the runtime can express not only execution and continuation, but also:
- who the actor is in
.aintterms - what trust lane the event claims
- where later real JIS attestations can attach
Future replacement plan
place
Replace LamportCausalPlacer with real tibet-causal-time.
distribute
Replace IntentMuxDistributor with real tibet-mux.
inject
Replace MemorySlotInjector with real tibet-store-mmu / spaceshuttle hooks.
align
Replace NoopAligner with real tibet-dgx.
execute
Replace EchoExecutor with:
- agent tools
- service calls
- model invocation
- industrial control adapters
Short framing
This sketch is not the product. It is the attachment point for the product.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tibet_cap_bus-0.1.0.tar.gz.
File metadata
- Download URL: tibet_cap_bus-0.1.0.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
608b8b729110a0af05da4756ddc19b1549094dd31206747502f7205277da7c99
|
|
| MD5 |
8c3ebc478e0ed22d4bc5818574146ebc
|
|
| BLAKE2b-256 |
2ee8cb54e2cae2da1f5cee1feab55080d254d95d6690bef8aff600eb61284cf7
|
File details
Details for the file tibet_cap_bus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tibet_cap_bus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d83c5b6f9f6bf1af0d7339304b3987811c2d890bcb454f03b5eac0af810f905
|
|
| MD5 |
da469d654c39f204924fee6fb21301cc
|
|
| BLAKE2b-256 |
36e14b5f503efded60d5a3a2c2a59c3c2413330945df6e2a4f0151e836b16a7c
|