knolo-core icon indicating copy to clipboard operation
knolo-core copied to clipboard

Feature request: Self-hostable store-and-forward relay for @knolo/exchange offers

Open The3seus opened this issue 3 weeks ago • 1 comments

Problem

@knolo/exchange 0.1.0 (#167) moves a verified V5 image between two agents with a signed KIP-0028 offer. Today that needs either a live peer (knolo exchange serve plus pull) or a manual directory handoff (export / import). When the sender and receiver are not online at the same time, there is no host to leave the offer with. The package README already describes a "future relay" that speaks GET /v1/offers/:id, POST /v1/offers/:id/decision, and GET /v1/blobs/:sha256, and states that this package does not run a relay process and that Knolo Hub is not that relay.

Proposal

Ship a small, self-hostable reference relay for exchange offers:

  • knolo exchange relay --config relay.json stores offer CBOR and image blobs by digest and serves the three documented routes.
  • knolo exchange offer --via <relay-url> uploads the offer and blob to a relay instead of the local server. knolo exchange pull --from <relay-url> works unchanged on the receiving side.
  • The relay is a dumb store. It never verifies on behalf of the recipient, never mounts or adopts, and never rewrites bytes. The recipient still checks signature, recipient, expiry, receive policy, SHA-256, and state root.

Scope and acceptance criteria

  • Relay config sets listen address, storage directory, maximum blob size, retention period, and an allow-list of sender keys.
  • Expired offers and their unreferenced blobs are removed after the retention period.
  • An end-to-end test: sender offers through the relay and goes offline, recipient pulls later, the receipt matches a direct pull of the same offer.
  • A tampered blob on the relay is refused by the recipient and the cache is left unchanged.
  • packages/exchange/README.md documents the relay, its threat model, and that it is not Knolo Hub.

Out of scope

  • A hosted relay service.
  • Any change to KIP-0028 offer signing, KIP-0029 capsules, or adopt policy (shipped configs stay deny).
  • Hub integration.

Related

  • #167 (exchange 0.1.0)
  • #168 (exchange release)
  • #165 / #166 (agents sharing knowledge docs)

A human maintainer will review and implement this manually.

The3seus avatar Nov 15 '26 11:11 The3seus

knolo exchange relay shipped in #193 and is in npm latest @knolo/[email protected] and @knolo/[email protected]. @knolo/[email protected] has no relay.

knolo exchange relay --config relay.json stores offer CBOR and image blobs by digest and serves GET /v1/offers/:id, POST /v1/offers/:id/decision, and GET /v1/blobs/:sha256. offer --via uploads to that host. pull --from accepts the relay URL. The relay does not verify, mount, adopt, or rewrite bytes. The recipient still checks the offer. Shipped configs stay adopt: deny. Knolo Hub is not this relay.

The exchange tests offer through the relay, drop the sender, pull later, and refuse a tampered blob without changing the cache. packages/exchange/README.md documents the relay and that threat model.

Closing this issue.

HiveForensicsAI avatar Nov 18 '26 11:11 HiveForensicsAI