interplane.Get Omega
Read in your language

aien-protocols-mv

Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem

Brought by drakestapleton

branch main Branches Tags History

aien-protocols-mv / specs / discovery-capsule / SPEC.md

229 lines · 18490 bytes Raw Blame History Source

Discovery Capsule, Owner Consent, Retraction and Experience Lineage: DCP1 family

Status: Draft v0.1 (SI GENESIS C2, 2026-10-24). Not yet produced or read by any runtime. Reference checker and vectors: tools/dcp_verify.c, vectors/. Rust reader, signature checks and recipient rules: crates/aien-discovery-capsule. Contract version: 0.1.0 (major zero: may change by minor bump, see VERSIONING.md) Wire version: 1 (the version byte of every record) License: Community Specification License 1.0 Tracking: aien-dev/aien-protocols-mv#51 (C2), parent aien-dev/aien-architecture-mv#307; consumes the microjob ABI of #50 (specs/microjob/) by digest; bootstrap issues aien-architecture-mv#310 (si-genesis) and #312 (si-legacy) consume this contract and must not define a second schema. Not in this document: transport and publication (Open Humanity), storage (Omega Cortex is the one local store), effect approval (AEGIS), scientific gain (Spark RSI and the independent judge), spendable credit (Sovereign Core ledger), a new cryptosystem.

1. Purpose

A Discovery Capsule carries one reusable, proof-carrying result (a typed .om claim or procedure, or a reference to it) from the owner who found it to recipients who may check and reuse it. It binds exactly what was found, how it was built, under which preconditions it holds, how it was independently verified, where it fails, what the owner consents to, and where the owner's retraction chain stood when it was signed.

Five fixed-width records make up the family:

MagicRecordSigned byLength
DCP1DiscoveryCapsuleV1owner676
DCC1OwnerConsentV1owner388
DCR1OwnerRetractionV1owner or a declared custodian284
DCA1RetractionAckV1recipient148
DCL1ExperienceLineageV1owner588

2. What a capsule is not

  1. A capsule never authorizes itself. It has no approval field, no grant, no capability token. Possessing a capsule, or its digest, gives no tool access, no GPU code execution and no proof. A recipient may execute a capsule only after its own independent verifier, run under the recipient's platform, passes it, and only within capabilities the recipient's authority (AEGIS, Omega skill / World authorization) grants. A verdict produced by the capsule's owner key is refused as self-authorization.
  2. Discoverability, reproducible correctness (the verifier and evidence references), the source signature, consent to read, consent to redistribute and permission to train are distinct fields. None implies another, except that redistributing or training requires reading.
  3. Private is the default. A PRIVATE capsule carries no permission bit. Nothing in this family uploads Cortex content; a capsule carries digests and a typed reference, and the bytes behind a reference move only through Open Humanity under the owner's consent.
  4. Retraction is not deletion. A retraction stops future availability, retrieval, training eligibility and republication at every compliant recipient that acknowledges it. It does not and cannot delete disconnected third-party copies or undo training already absorbed into weights. The wire format has no "erased" state, and a retraction that claims erasure is refused (DCP_FALSE_ERASURE_CLAIM).

3. Inventory of what already exists

Existing pieceWhereReused?Reason
P-256 ECDSA / SHA-256crates/aien-provenanceYesSame primitive as the signed source grants of this repository; low-S only. No new cryptosystem.
GrantPermissions (READ, TRAIN, REDISTRIBUTE...)crates/aien-provenancePattern onlyIts bits are a JSON grant; this family needs fixed-width bytes and a separate DISCOVER bit. Bit names match where they overlap.
MJB1 microjob DAGspecs/microjob/ (#50)Yes, by digestmicrojob_ref names the MJB1 dag_digest that produced the capsule; an MJB1 operand of kind CAPSULE names a capsule digest.
PST1 / OSH stream ABIspecs/pi-spark-task/, specs/osh-platform/ (#43)Carrier onlyRecords travel as opaque bytes; this family defines no transport.
Open Humanity consent and retractionopen-humanity #26/#27/#28, #33, #34Owner of transport and human approvalThis family is the wire contract they carry; OH owns publishing, privacy and delivery.
Omega experience eventomega-mv#699Yes, by digestExperienceLineageV1.content_digest names one verified experience.

4. Encoding rules

  1. All integers are big-endian and unsigned. Digests are 32 raw bytes (SHA-256). Keys are 33-byte SEC1 compressed P-256 points (first byte 0x02 or 0x03).
  2. Every reserved byte and every unused slot is zero on send and refused if non-zero on receipt. Every enumerated byte or bit set is closed; an unknown value is refused.
  3. Each record ends in a 64-byte signature: ECDSA P-256 / SHA-256 over every byte before it, r then s, low-S only.
  4. A record's identity is record_digest = SHA-256(every byte before the signature). The signature is excluded, so re-signing never changes identity.

5. DiscoveryCapsuleV1 (DCP1), 676 bytes

OffsetSizeFieldAllowed values
04magicDCP1
41version1
51share_scope0 PRIVATE, 1 NAMED, 2 COMMUNITY, 3 PUBLIC
61permissionsbit 0 DISCOVER, bit 1 READ, bit 2 REDISTRIBUTE, bit 3 TRAIN; bits 4 to 7 zero
71precision0 EXACT, 1 FP32, 2 BF16, 3 FP16, 4 FP8, 5 INT8, 6 INT4
82license1 Apache-2.0, 2 MIT, 3 CC-BY-4.0, 4 CC-BY-SA-4.0, 5 CDLA-Permissive-2.0, 6 OWNER-CONSENT-ONLY
102failure_countNumber of known counterexamples / failure cases
124abi_versionNot zero: the Omega / OSC ABI the executable targets
164required_capabilitiesbit 0 CPU_COMPUTE, 1 GPU_COMPUTE, 2 CORTEX_READ, 3 WORLD_READ, 4 WORLD_EFFECT, 5 NETWORK; bits 6 to 31 zero. A request, never a grant
201precondition_rank0 to 4
213reserved00
2416precondition_dims4 x u32; entries past the rank are zero
408valid_fromUnix seconds, not zero
488expires_atAbove valid_from
568revocation_seqThe owner's retraction chain head sequence when signed; 0 = no retraction yet
6432meaning_digestNot zero: the typed .om claim / procedure (the published fragment)
9632source_digestNot zero
12832compiler_digestNot zero
16032executable_digestNot zero
19232preconditions_digestNot zero: valid input preconditions and shape
22432verifier_refNot zero: the independent verifier
25632evidence_digestNot zero: benchmark provenance and verification evidence
28832failure_cases_digestNot zero exactly when failure_count is not zero
32032utility_verdict_refQuality / utility verdict reference; zero = NOT_RUN
35232science_verdict_refStrict scientific-T verdict reference; zero = NOT_RUN. Never implied by the other fields
38432recipient_policy_digestNot zero: the policy a recipient must run before reuse
41632recipient_set_digestNot zero exactly when share_scope is NAMED (section 9)
44832consent_refrecord_digest of the OwnerConsentV1; required when any of READ, REDISTRIBUTE, TRAIN is set or the scope is not PRIVATE
48032revocation_headrecord_digest of the retraction at revocation_seq; zero exactly when revocation_seq is 0
51232parent_capsulerecord_digest of the capsule this one derives from; zero = none
54432microjob_refMJB1 dag_digest that produced it; zero = none
57633owner_keyPseudonymous owner key
6093reserved10
61264signatureBy owner_key

6. OwnerConsentV1 (DCC1), 388 bytes

OffsetSizeFieldAllowed values
04magicDCC1
41version1
51purposesSame bits as permissions; not zero
61custodian_count0 to 4
71reserved00
84consent_versionAt least 1; a newer consent for the same fragment has a higher version
124notice_secondsAdvance notice the owner gives before a change takes effect
168issued_atUnix seconds, not zero
248retention_endAbove issued_at; no use after it
3232provenance_digestNot zero
6432recipient_digestNot zero: the exact recipient or destination set
9632fragment_digestNot zero: the published fragment (equals the capsule meaning_digest)
12832payload_digestNot zero: the canonical payload digest
160128custodians4 slots of SHA-256(custodian key); used slots not zero, unused slots zero. Successors or custodians exist only when declared here
28833owner_key
3213reserved10
32464signatureBy owner_key

7. OwnerRetractionV1 (DCR1), 284 bytes

OffsetSizeFieldAllowed values
04magicDCR1
41version1
51scopebit 0 FUTURE_AVAILABILITY, bit 1 RETRIEVAL, bit 2 TRAINING, bit 3 REPUBLICATION; not zero; bits 4 to 7 zero
61erasure_claim0 (NONE). Any other value is refused: no record may claim deletion of copies or trained weights
71reserved00
88seqAt least 1; the owner's chain is strictly monotonic
168effective_atUnix seconds, not zero
2432target_digestNot zero: a capsule record_digest, a capsule meaning_digest, or an experience content_digest (the lineage root)
5632prev_retractionrecord_digest of the retraction at seq - 1; zero exactly when seq is 1
8832provenance_digestNot zero
12032tombstone_digestNot zero: digest of the minimal privacy-safe tombstone (no private bytes)
15233owner_keyWhose chain this is
18533signer_keyowner_key, or a custodian declared in the owner's consent
2182reserved10
22064signatureBy signer_key

8. RetractionAckV1 (DCA1), 148 bytes

OffsetSizeFieldAllowed values
04magicDCA1
41version1
51status1 ENFORCED (future use stopped, no retained derived artifacts), 2 ENFORCED_WITH_RETAINED (future use stopped; the recipient holds copies or trained descendants it marks affected)
62reserved00
88acked_atUnix seconds, not zero
1632retraction_digestNot zero: the record_digest acknowledged
4833recipient_key
813reserved10
8464signatureBy recipient_key

9. ExperienceLineageV1 (DCL1), 588 bytes

OffsetSizeFieldAllowed values
04magicDCL1
41version1
51parent_count0 to 4
61influenced_count0 to 8
71reserved00
832content_digestNot zero: one verified experience (omega-mv#699 event)
4032dataset_idNot zero: the dataset this experience belongs to
7232consent_refNot zero: the owner's consent record
104128parents4 slots: content_digest of parent experiences; used slots not zero, distinct and not this record's own content_digest; unused zero
232256influenced8 slots: checkpoint or capsule digests this experience influenced; used not zero, unused zero
48833owner_key
5213reserved10
52464signatureBy owner_key

Named recipient set: recipient_set_digest = SHA-256("DCP1-RECIPIENTS" || keys), keys sorted bytewise ascending, no duplicates.

10. Static check order

One checker reads any record of the family and reports the first failing rule:

  1. Fewer than 5 bytes: DCP_BAD_LENGTH.
  2. Magic not one of the five: DCP_BAD_MAGIC.
  3. version 0: DCP_DOWNGRADE; above 1: DCP_BAD_VERSION.
  4. Length differs from the record length: DCP_BAD_LENGTH.
  5. A reserved byte, an unused slot or a dimension past the rank is not zero: DCP_RESERVED_NONZERO.
  6. An enumerated value or bit set is outside its closed set, including a zero purposes or scope, or a count above its slot count: DCP_BAD_ENUM.
  7. (DCP1) license is not 1 to 6: DCP_UNKNOWN_LICENSE.
  8. (DCR1) erasure_claim is not 0: DCP_FALSE_ERASURE_CLAIM.
  9. A field marked "not zero" is zero (including abi_version, consent_version, seq, a used slot): DCP_MISSING_FIELD.
  10. A key whose first byte is not 0x02 or 0x03: DCP_BAD_KEY.
  11. A time rule fails (valid_from zero or expires_at not above it; retention_end not above issued_at; issued_at, effective_at or acked_at zero): DCP_BAD_VALIDITY.
  12. A paired rule fails (failure_count vs failure_cases_digest; revocation_seq vs revocation_head; seq vs prev_retraction): DCP_INCONSISTENT.
  13. (DCP1) PRIVATE with any permission bit; or recipient_set_digest zero for NAMED, or not zero for another scope: DCP_SCOPE_CONFLICT.
  14. (DCP1, DCC1) REDISTRIBUTE or TRAIN without READ: DCP_PERMISSION_AMPLIFICATION.
  15. (DCP1) consent_ref zero while READ, REDISTRIBUTE or TRAIN is set or the scope is not PRIVATE: DCP_NO_CONSENT.
  16. (DCL1) A parent equal to the record's own content_digest: DCP_ANCESTOR_CYCLE. The same parent twice: DCP_DUPLICATE.

11. Recipient rules (stateful)

These need keys, a clock and the recipient's own records, so they live in the Rust crate, not the C checker. A refusal changes no state.

CodeRule
DCP_BAD_SIGNATUREThe signature does not verify under the record's signing key, or is high-S. An edited capsule lands here
DCP_OWNER_MISMATCHConsent, retraction or lineage owner differs from the capsule owner
DCP_NO_CONSENTconsent_ref is not the digest of the consent supplied, or the consent fragment_digest is not the capsule meaning_digest
DCP_PERMISSION_AMPLIFICATIONCapsule permissions not a subset of the consent purposes, or of the parent capsule's permissions
DCP_PRIVATEA PRIVATE capsule offered to anyone but its owner
DCP_NOT_RECIPIENTNAMED scope and the recipient is not in the set whose digest the capsule binds; or an ack from a key that was not sent the retraction
DCP_EXPIREDOutside [valid_from, expires_at], or after the consent retention_end
DCP_STALEThe capsule names a revocation_seq the recipient's copy of the owner's chain has not reached (the recipient must sync first), a newer consent_version for the same fragment is known, or the recipient holds no chain for the owner of a lineage ancestor
DCP_REVOKEDA retraction in the owner's chain targets the capsule (record or meaning digest) or a lineage ancestor, with a scope covering the requested use: serving needs neither FUTURE_AVAILABILITY nor RETRIEVAL; training needs no TRAINING; republication needs no REPUBLICATION
DCP_NOT_PERMITTEDThe requested use (READ, REDISTRIBUTE, TRAIN) is not in the capsule permissions
DCP_CONFLICTA retraction with a sequence already used but different bytes (concurrent conflicting owner operations), a sequence gap, a prev_retraction that is not the current head, a capsule whose revocation_head differs from the chain at its revocation_seq, a second different ack from one recipient, or an ack for another retraction. Fails closed
DCP_UNKNOWN_CUSTODIANA retraction signed by a key that is neither the owner nor a custodian declared in the owner's consent
DCP_SELF_AUTHORIZEDAn execution verdict produced by the capsule owner's key
DCP_UNVERIFIEDNo passing verdict from the recipient's own verifier for this exact capsule digest and recipient platform
DCP_CAPABILITY_DENIEDThe recipient's grant does not cover required_capabilities
DCP_DUPLICATETwo different lineage records for one content_digest
DCP_CROSS_DATASETA lineage parent from another dataset_id (cross-dataset injection)
DCP_ANCESTOR_CYCLEThe lineage parents form a cycle
DCP_UNKNOWN_PARENTA lineage parent the recipient does not hold when checking ancestry for training, or a parent_capsule the recipient was not given

A byte-identical repeat of an applied retraction or ack is a replay: accepted, no state change.

11.1 Retraction status is honest

For each retraction the owner's node tracks every recipient it was sent to as PENDING, ACKNOWLEDGED (with the ack status) or UNREACHABLE. A recipient that never answers stays PENDING; an offline recipient is never shown as acknowledged, and no state anywhere says "erased". ENFORCED_WITH_RETAINED acks are listed separately, with the influenced checkpoints of the affected lineage, so trained descendants can be quarantined, rebuilt or retired by their owner (aien-train#20).

12. Refusal codes

DCP_BAD_LENGTH, DCP_BAD_MAGIC, DCP_DOWNGRADE, DCP_BAD_VERSION, DCP_RESERVED_NONZERO, DCP_BAD_ENUM, DCP_UNKNOWN_LICENSE, DCP_FALSE_ERASURE_CLAIM, DCP_MISSING_FIELD, DCP_BAD_KEY, DCP_BAD_VALIDITY, DCP_INCONSISTENT, DCP_SCOPE_CONFLICT, DCP_PERMISSION_AMPLIFICATION, DCP_NO_CONSENT, DCP_ANCESTOR_CYCLE, DCP_DUPLICATE (static, section 10) and DCP_BAD_SIGNATURE, DCP_OWNER_MISMATCH, DCP_PRIVATE, DCP_NOT_RECIPIENT, DCP_EXPIRED, DCP_STALE, DCP_REVOKED, DCP_NOT_PERMITTED, DCP_CONFLICT, DCP_UNKNOWN_CUSTODIAN, DCP_SELF_AUTHORIZED, DCP_UNVERIFIED, DCP_CAPABILITY_DENIED, DCP_CROSS_DATASET, DCP_UNKNOWN_PARENT (recipient, section 11).

13. Privacy

No record carries private bytes: only digests, keys, counts, times and closed enumerations. The tombstone is referenced by digest and holds only what is needed to recognise the retracted target. Receipts and public metadata that cite a capsule cite its record_digest.

14. Open questions

  1. The license registry (6 entries) and the capability bits (6) are first-cut closed sets; additions are a minor version bump.
  2. Whether a custodian may also issue consent (today only retractions).
  3. How Open Humanity maps its transport identities to the 33-byte keys (owner: open-humanity#33/#34).