Skip to content

adapter contracts

Hanwen Cheng edited this page Nov 1, 2026 · 13 revisions

The public core uses the concrete interfaces below. Local implementations are part of this repository; a downstream integration implements the same contract without adding deployment discovery, credentials or provider selection to the shared core. There is no general plugin loader or promise of compatibility between arbitrary development revisions.

Canonical interfaces

Boundary One contract owner Local implementation and required behavior
Agent lifecycle and image identity SandboxRuntime The Docker controller enforces device/actor ownership, serializes creation, supplies explicit service endpoints and preserves state on ordinary teardown. A preloaded image is required. See image requirements.
Object access and authorization ObjectStore and ObjectRequest/ObjectResponse The local object service uses a separate database for each data class. Every request independently checks signature, actor proof, current chain authority and the operation/key boundary. Compare-and-swap and create-only writes retain their atomic behavior. See storage.
Wallet and device signing auth wire types and SignerClient/DeviceSignerClient The explicitly development-only signer retains keys locally. Native clients, browser clients and handlers share response types; missing, noninteger or out-of-range key versions fail rather than defaulting or truncating. Request authorization and cryptographic proof checks remain independent of schema parsing.
Local inference and caller provisioning model_config, model_relay, model_runtime One pinned model recipe supplies model IDs, dimensions and defaults. The authenticated relay provisions/revokes callers and passes their configured local requests. There is no automatic hosted fallback. See model qualification.
Runtime bootstrap and persistent layout RuntimeBootstrap, runtime_layout Explicit bounded bootstrap input carries the active local chain profile and permitted runtime fields. Unsupported bootstrap versions and unknown fields fail. The state layout is generated for image consumers from the protocol owner.
Local composition services.py, composed by stack.py One supervisor owns configured services, exact endpoints, original keys and saved configuration. The CLI and terminal manager call it; adapters do not introduce another supervisor or credential store.

Optional speech uses the existing SpeechBackend interface; the public executable has no real speech implementation and returns an explicit unavailable result. Development email uses the broker's EmailSender interface and local outbox. These are separate from the qualified chat/tool/stream/embedding recipe.

Versioning and compatibility

For this development release, pin the source commit, Cargo/npm lockfiles, image identity and model recipe together. Package versions alone do not identify a qualified combination. A downstream adapter must compile against that exact interface revision and pass its contract checks before adoption. Do not reuse production identities in local acceptance.

  • Change wire definitions in agentkeys-protocol first. Update generated consumers and committed fixtures through their owners in the same change. Signed capability field/byte changes require an explicit coordinated migration; serialization compatibility is part of signature verification.
  • Runtime bootstrap versioning is owned by BOOTSTRAP_VERSION; the local transport checks its protocol identifier at startup. An incompatible image requires a coordinated host/image update and real Docker qualification. A health response alone does not prove application compatibility.
  • Signer key_version identifies the derivation domain, not the HTTP schema version. A response must carry a valid byte value. It must never be synthesized from a missing field or truncated from a larger integer. Existing address/signature and actor-binding checks still apply.
  • Local state migration is owned by each controller's manifest/database version. Preserve existing keys; a missing original key is an error. Unsupported state is refused rather than silently recreated. Contract deployment versioning remains owned by the chain package's VERSION and active profile.
  • Adding an optional field is compatible only when the old and new consumers' tested decoding policies permit it. Required fields, new enum variants, changed defaults and authorization behavior need explicit compatibility evidence. Do not infer compatibility merely because a JSON request parses.

Verify a change

Local, from the prepared public checkout, use the CLI test lanes: ./terrier test affected --changed-file crates/agentkeys-core/src/signer_client.rs for changed-source coverage (supply every changed path), terrier test focused --component signer for signer routes/startup, and explicit services/storage/Docker/model qualification for the adapter boundary touched. Real model and browser acceptance remain distinct from deterministic test doubles.

This page defines ownership and compatibility policy. It does not certify the remaining browser, application-memory, clean-install or complete release gates in epic #1.


Canonical source · revision 3a342af62a92a0d9b5f807b7ee469130b12f9454.

Clone this wiki locally