Cross-Org Swarms
Send one step of a delegated task graph to a partner’s agents and see which checks and signatures its action class requires.
On this page
Each step a task graph sends to a partner’s agents carries the scope, route, and budget it started with, and it meets two doors before it runs. Your kernel checks the hop against the graph that authorized it; the partner’s kernel admits the action under your treaty and its own governance, and runs its own tools.
The Quickstart grants a partner’s agents part of a fork under a treaty, delegating up to 2 deep and 4 wide. The running example here is a financial step: an agent at Org A delegates a task to Org B that names credit.facility_bind, the class that binds a credit facility.
Four checks stand between the hop and the partner’s tool
Two checks run where the hop departs and two where it arrives. Each is a separate function with its own error type, and passing one never stands in for another.
The hop is admitted at both doors
Your kernel checks the hop against the signed graph and its route plan. The partner kernel admits credit.facility_bind under the treaty intersection, and the bilateral authorization the class requires verifies. Only then does the partner’s tool run. The facility binding.
Your kernel runs the departing pair. verify_swarm_authority_bundle refuses a hop whose continuation, witness chain, route plan, budget allocation, join receipt, or revocation epoch does not tie back to the signed graph; it refuses an empty set of trusted witness issuer keys before reading the bundle, and a bundle with no continuation tokens or no witness chains before reading a hop. validate_route_plan_target then refuses a route plan whose selected route, protocol target, and egress contract do not all name the same bridge.
The partner’s kernel runs the arriving pair at its own door. evaluate_cross_boundary_admission refuses an action class outside the treaty scope, an intersection whose digest is not the expected one, and required evidence that is absent or unverified. The class’s joint signature must then resolve; for a quorum class, verify_for_execution refuses an aggregated group signature without an active roster and a completed authorization slot.
The graph layer reads no treaty, ladder manifest, or peer kernel id. It proves that the graph’s own issuer authorized the hop and that the egress fields agree. Acceptance belongs to the treaty, whose shared contract keeps the stricter governance mode and co-sign requirement of the two operators.
Read more in Swarm Authority, which walks the bundle and the order of its checks.
The partner admits action classes under the stricter of two ladders
A treaty admits action classes. Each participant publishes a signed governance ladder naming the classes it takes part in and the governance each carries, and each kernel folds the two ladders on its own.
One LadderIntersection over 3 action classes.
One LadderIntersection over 3 action classes.
In Rust · treaty.rs:27634 lines
for participant in &treaty_scope.participant_kernel_ids {
// … find this participant's action class
let rank = ladder_mode_rank(&action.mode)?;
if rank > mode_rank {
mode_rank = rank;
mode.clone_from(&action.mode);
}
destructive |= action.destructive;
if let Some(existing) = consistency_model.as_ref() {
if existing != &action.consistency_model {
return rejected(
"chio_federation_ladder_consistency_mismatch",
"governance ladder consistency models do not intersect",
);
}
} else {
consistency_model = Some(action.consistency_model.clone());
}
if co_sign_requirement_rank(&action.co_sign)? > co_sign_requirement_rank(&co_sign)? {
co_sign.clone_from(&action.co_sign);
}
// … merge the co-sign quorum
for item in &action.evidence_required {
evidence_required.insert(item.clone());
}
// … record participant_modes
}
if destructive && mode_rank < ladder_mode_rank("receipt_backed")? {
return rejected(
"chio_federation_ladder_destructive_below_floor",
"intersected destructive action resolves below receipt backed mode",
);
}
// … then the destructive crdt-commutative check
The fold takes the strictest mode and co-sign requirement, the union of required evidence, and equal consistency models; participants that disagree on consistency are refused with chio_federation_ladder_consistency_mismatch. The financial domain ladder of spec/CHIO_LADDER.md section 5.2 is the economy’s own set, and it gives the settlement, clearing, and credit classes their co-signature requirement:
| Action class | Mode | Destructive | Cross-org visibility | Co-sign | Consistency model |
|---|---|---|---|---|---|
market.bid_publish | observation | false | federated | none | crdt-commutative |
market.ask_response | guarded | false | treaty_only | none | totally-ordered |
autonomy.pricing_decision | guarded | false | treaty_only | none | totally-ordered |
autonomy.capital_pool_recommendation | guarded | false | private | none | crdt-commutative |
credit.scorecard_publish | observation | false | treaty_only | none | crdt-commutative |
credit.facility_bind | receipt_backed | true | federated | bilateral_required | totally-ordered |
fiscal.amendment_activate | receipt_backed | true | private | none | totally-ordered |
factor.assignment_bind | receipt_backed | true | federated | bilateral_required | totally-ordered |
market.liability_auto_bind | receipt_backed | true | federated | bilateral_required | totally-ordered |
clearing.round_finalize | receipt_backed | true | federated | n_of_m | quorum-required |
channel.close | receipt_backed | true | federated | n_of_m | quorum-required |
settle.commitment | receipt_backed | true | federated | n_of_m | quorum-required |
settle.rollback | receipt_backed | true | treaty_only | bilateral_required | totally-ordered |
settle.evidence_export | maintenance | false | private | none | totally-ordered |
Every class marked destructive: true sits at receipt_backed or above, the manifest’s declared destructive_floor, and none uses crdt-commutative. Manifest validation rejects a destructive class below its floor with chio_federation_ladder_destructive_below_floor, one paired with commutative consistency with chio_federation_ladder_destructive_crdt_not_allowed, and one with an empty evidenceRequired list.
Read more in Governance Ladder, which covers the five modes and every per-class field.
Each financial class names the signature it needs
The intersection decides which co-sign mode governs a class, and the admission report turns that mode into evidence the caller must hold. required_evidence_for_action adds bilateral_invocation when the mode is bilateral_required and quorum_signature when it is n_of_m; bilateral_if_cross_org adds neither, which makes that mode conditional.
ecurrent epochscompleted slotxexpected inputsΣgroup signature
Two of three signers authorize one message
Each selected signer contributes a share over the same authorization message. The coordinator verifies the shares against the roster and aggregates them into one signature under the roster’s group public key; C stays in the roster without signing this session. The registered action class fixes the quorum, 2 of 3 or 3 of 5, scoped to a treaty. FROST Quorum.
settle.commitment, signing one authorization message, and the checks that run before the effect. Distributed key generation, epoch rotation, and the slot anchor’s storage are left out.FROST QuorumAll three quorum classes in the financial ladder are 2-of-3 at scope: treaty; the compliance ladder in the same document raises governance.case_enforce_sanction and governance.roster_rotate to 3-of-5. The FROST registry hard-codes a quorum per class and refuses a roster whose threshold and participant count disagree with a class it lists. Before the effect runs, verify_for_execution checks the group signature, the active roster and current epoch, the completed slot holding the exact proof bytes, and eight expected inputs.
Each path accepts only its own kind of authorization. A predicate declaring co_sign: n_of_m through the ordinary path is rejected with co_sign n_of_m requires the strict verifier API with VerifiedFrostAuthorization, and a verified authorization supplied with a bilateral_required predicate is itself an error. bind_frost_authorization_to_predicate binds a supplied authorization on five axes, and TreatyBindingRef carries the SHA-256 of the treaty scope, the ladder intersection, and the admission report, so a co-signed invocation names the exact fold and decision it was admitted under.
Read more in FROST Quorum and Bilateral Co-Sign.
A facility binding runs only with every check satisfied
Your swarm on issue #418 hands a step to your partner: bind the USD 5.00 credit facility that pays for the partner's agents. The signed graph, continuation, attenuation chain, and budget are valid, and credit.facility_bind is receipt-backed with bilateral authorization required. The analysis the partner's fixer-2 returned in an earlier step authorizes nothing here; the financial step carries its own authorization, and the partner's kernel admits it at its own door, in five stages:
- Authority and egress. Assemble the signed graph, continuation, witness chain, and budget allocation, then run
verify_swarm_authority_bundleand the route-target validation against trusted inputs. The peer and capability integration comes first. - Shared contract. From trusted participant manifests and a scope that binds their digests,
compute_ladder_intersectionproduces the shared requirements andladder_intersection_sha256its canonical digest. - Evidence. Authenticate each required artifact through its own verifier and populate
CrossBoundaryEvidenceReffrom the results. The treaty evaluator reads the supplied verification flags and opens none of the referenced artifacts. - Admission. Evaluate the class against the trusted scope, the expected intersection digest, the evidence references, and the current time. A structural error and a valid refusal report both stop the action.
- Joint authorization. Bind the bilateral verification to this invocation and treaty, continue only after every required check succeeds, and retain the contract, the report, and the invocation evidence.
// Embedding host. input is a CrossBoundaryAdmissionInput assembled from the
// trusted contract and independently verified evidence. The enclosing function's
// error type accepts the treaty error and a string error.
let report = evaluate_cross_boundary_admission(input)?;
if !report.accepted {
// A policy refusal can be Ok(report). Returning here prevents dispatch.
return Err(report.failure_code.as_deref()
.unwrap_or("cross_boundary_admission_denied").into());
}
// Continue with the applicable joint-authorization checks before dispatch.? handles structural errors only. A policy refusal returns Ok(report) with accepted false, so the explicit check is what prevents dispatch. Remove the required co-signature and the binding stops at the last check; point the target at a bridge outside the egress contract and the route check refuses it first.
The treaty CLI walkthrough runs the same sequence with captured output: intersection, admission, a missing-evidence denial, and packet verification. Its --evidence class=digest arguments assert verification the caller already performed, and a digest on the command line is not a verified signature.
A changed contract needs a new admission
A saved admission report records one decision under particular digests. When the shared terms change, the operators coordinate a replacement contract and admit the action under it.
- A participant changes its manifest. The trusted replacement’s digest is bound in the scope and the intersection is recomputed. Consistency models that disagree are reconciled in the operators’ configuration, since the same inputs reproduce the mismatch.
- The scope or intersection expires. Admission reruns on current inputs at the current time. The intersection expires at the earliest manifest or scope deadline, and an old accepted report keeps that deadline.
- An action leaves the allowed scope. It stops, and resumes only under a contract that includes it or as a different authorized operation. Renaming the request supplies no authority.
- Required evidence or a signature is missing. The artifact is obtained and verified for this invocation before admission reruns. A quorum class takes the strict quorum path, and a bilateral artifact cannot replace it.
Each refusal names its cause in failure_code, beside the report’s required evidence, present evidence, and bound digests. Stale contracts, intersection mismatches, excluded action classes, missing evidence, and unverified evidence each have their own outcome. The operator fixes the named input and reruns the checks, and the report’s accepted boolean is the decision.
If communication fails after the partner’s tool may have run, the question becomes reconciling that invocation. A new treaty decision cannot establish whether the first effect happened, or roll it back.
Route plans, ladder entries, and treaty artifacts
Try egressContractId, coSignQuorum, or ladder-intersection.
Route plan egress fields
A task that reaches anything outside the kernel does so through a signed SwarmRoutePlanReceipt. Four of its fields describe the exit: selectedRoute, bridgeId, protocolTarget, and egressContractId. The verifier takes a prefix of each of the other three and requires it to equal bridgeId: the segment before the first colon of the selected route, the scheme of the protocol target, and the segment before the first colon of the egress contract. Three separate error strings say which one disagreed.
egressConstraints must be non-empty and unique, and the accepted vocabulary has exactly one member, deny-private-network; any other string is refused by name. The receipt is also refused when its attenuationDecision is anything other than accepted, when it has expired against the bundle’s clock, and when its issuer is not one of the pinned witness keys. Route Plans covers the receipt field by field.
Verifier entry points
| Check | Crate | Entry point |
|---|---|---|
Graph authority | chio- | verify_ |
Egress | chio- | validate_ |
Treaty admission | chio-federation | evaluate_ |
Joint authorization | chio-federation | verify_ |
The treaty implementation defines the admission input, the intersection, the digest functions, and the accepted and refused report branches.
Refused bundle fixtures
The graph layer’s named refusals are whole bundles the authority verifier refuses. Each is a negative fixture you can generate and verify yourself; chio proof fixture list --family swarm-authority --negatives names them:
budget-allocations-exceed-poolegress-constraint-unsupportedgraph-cyclejoin-parent-set-mismatchmax-depth-exceededreplayed-continuation-noncerevoked-taskroute-plan-mismatchstale-continuationstale-route-planwitness-child-scope-mismatch
Task Graphs covers the graph object itself.
Two shapes of one ladder entry
The specification writes each class as a snake_case entry. This is settle.commitment in the financial ladder:
{
"id": "settle.commitment",
"title": "SettlementCommitment dispatch",
"mode": "receipt_backed",
"destructive": true,
"cross_org_visibility": "federated",
"evidence_required": [
"trust_activation",
"workflow_receipt",
"anchor_epoch"
],
"co_sign": "n_of_m",
"co_sign_quorum": { "n": 2, "m": 3, "scope": "treaty" },
"consistency_model": "quorum-required",
"consistency_anchor": "frost-quorum"
}A peer sends a smaller shape. The wire manifest, published as spec/schemas/chio-federation/v1/governance-ladder-manifest.schema.json and deserialized into GovernanceLadderManifest, is camelCase, forbids unknown fields, and carries actionClassId, mode, destructive, consistencyModel, coSign, evidenceRequired, and the optional coSignQuorum and aliases. It has no crossOrgVisibility, consistencyAnchor, or title. The schema pins defaultUnknownMode to the constant deny, and the crate checks the deserialized value again.
The snake_case entry still carries weight. Each of the seven registered FROST classes hard-codes its own ladder entry in that shape and takes the SHA-256 of the canonical encoding as ladderContractDigest. Every authorization body carries that digest, and validation recomputes it from the registration, so a deployment that words one of those rows differently fails with ContractMismatch("ladder_contract_digest").
Ladder field values
mode:observation,guarded,receipt_backed,partition_contingency,maintenance, in that intensity order.consistencyModel:crdt-commutative,totally-ordered,single-kernel,quorum-required.coSign:none,bilateral_if_cross_org,bilateral_required,n_of_m, in that strictness order.coSignQuorum.scope:treaty,kernel,operator, with2 ≤ n ≤ m.evidenceRequired: unique lowercase labels of[a-z0-9_].
coSignQuorum is required when coSign is n_of_m and forbidden otherwise, in the JSON Schema and again in the crate. Visibility reaches the wire elsewhere: chio.bilateral-signature-slice.v1 requires cross_org_visibility over private, treaty_only, federated, and public, and admits only bilateral_required or bilateral_if_cross_org in its own co_sign enum.
Quorum binding axes
bind_frost_authorization_to_predicate binds a supplied authorization to its predicate on five separate axes:
- The predicate names a
treaty_binding_refto bind against. - Its
consistency_modelisquorum-requiredand itsconsistency_anchorisfrost-quorum. - The authorization’s ladder action class equals the treaty binding’s
action_class_id. - Its scope id equals the treaty id, and its resource id equals the predicate’s
invocation_id. - It is current at the verifier’s pinned epoch, which the local clock never substitutes for.
TreatyBindingRef carries the action class and consistency model beside the three digests.
Treaty artifacts
Four contract objects carry a cross-boundary decision, each with a published JSON Schema under spec/schemas/chio-federation/v1/.
| File | Registry id | Carries |
|---|---|---|
governance- | chio. | One participant’s own ladder: its kernel id, its validity window, its destructive floor, and its action classes. |
treaty- | chio. | The participant kernel ids and public keys, one manifest digest per participant, the allowed action classes, and the revocation epoch and trust bundle digests. |
ladder- | chio. | The folded classes and, per class, each participant’s own declared mode. |
cross- | chio. | One decision for one action class: accepted or a failure code, the governance that applied, the required and present evidence, and the two digests it was decided against. |
A treaty scope binds at least two participant kernels, one manifest digest and one public key each, and refuses duplicates in any of the three lists.
Treaty commands
chio federation treaty intersecttakes a treaty scope and one--manifestper participant and writes the intersection.chio federation treaty admittakes the scope, the intersection, an expected intersection digest, an action class id, and one--evidencepair per verified evidence class, and writes the admission report.chio federation treaty verify-packetchecks a buyer packet against the admission report and the bilateral invocation together.
Treaties runs that sequence end to end.