Package ai.badmonkey.agentspaces.content


package ai.badmonkey.agentspaces.content
The content swarm, aspace:cap/content-swarm (srad/large-networks-bulk-data.md): Content publishes a large artifact as a signed manifest in the group's content space, advertises what it holds as leased holdings, and fetches pieces from every reachable holder at once over capability pipes on whatever transport sessions exist, verifying each piece against the manifest and storing it through the PieceStore SPI. Stability: API for Content, PieceStore, ContentPolicy, and the options; internal for the session and messages.
  • Class
    Description
    A collection is an AssetCard that lists the roots a holder serves (srad/large-networks-bulk-data.md §3.8, group K).
    One named collection: which of the holder's roots it lists.
    The peer's view over its backends (LB-T-07): reads consult backends in order, writes go to the first writable one, have is the union, and (when enabled, LB-T-08) a range served by a read-only backend is cached into the writable one so an external registry is read once per range per peer.
    The content swarm capability, aspace:cap/content-swarm (srad/large-networks-bulk-data.md).
    Builds a Content.
    Counters an operator reads.
    What the console's Content panel shows for one group (LB-O-03): the roots the replica knows with their holder counts and this peer's share, the store's bytes and quota, the active fetches with progress and sources, and the capability's counters.
    Who may fetch and serve, how a peer seeds, and what it spends (srad/large-networks-bulk-data.md §3.6, group P).
    How a peer publishes holdings after a fetch.
    The hashing rules of a content root (srad/large-networks-bulk-data.md §3.1 and §6.3): each piece is sha2-256; the table is the piece hashes in order; the root is a CIDv1 (multibase base32, multicodec raw, multihash sha2-256) over the table.
    A hashed artifact: its table, its size, and its root.
    The content space seen through the two reserved records (srad/large-networks-bulk-data.md §3.1, §3.2): manifests and holdings are ordinary signed, leased entries, found by tag without decoding, replicated and lapsing like any entry.
    Encryption at rest for a piece store (srad/large-networks-bulk-data.md LB-T-11): every piece is written through AES-256-CTR under a local key, with a counter that starts from a value derived from the root and the index, so a range anywhere in a piece decrypts on its own and the file on disk holds no plaintext.
    The handle of a fetch (LB-S-01): progress, completion, cancellation, the artifact once complete, and a trace of what the scheduler did.
    A snapshot of progress.
    The file-backed piece store (LB-T-01, LB-T-02): one directory per root under the store path holding data (pieces written at their offsets), have (the verified bitfield, fsynced after each piece), and manifest.cbor.
    Serves artifacts from files the peer already has, where they lie (LB-T-06): nothing is copied, every registered root is complete and external, and eviction never touches it.
    A heap-backed piece store for tests, for browsers without persistent storage, and for small artifacts.
    The pipe messages of aspace:cap/content-swarm (srad/large-networks-bulk-data.md §3.3): CBOR maps with the fields in the declared order and an integer tag t first, carried as the payload of a PIPE_DATA frame.
    Withdraws a want.
    An optional push of newly held pieces to current sources.
    A manifest record, CBOR of the Manifest entry value.
    Asks a holder for the manifest of a root it advertises (§3.8).
    A range of a piece, answering a want.
    A request for a range of a piece.
    Refuses a want, with a reason.
    One backend of the piece store (srad/large-networks-bulk-data.md §3.5).
    The content swarm as a space's bulk-payload seam (group E): a payload above the space's threshold becomes an artifact (opaque bytes, application/cbor, never sealed again because the space sealed it already when it seals), the record carries its root, and a reader's space acquires it through a fetch and decodes once complete.