Skip to content

Adapters

Adapters define backend capabilities for durable and ephemeral storage.

Gittrix routes storage between two adapter roles.

  • DurableAdapter is the durable source of truth and must be git-capable.
  • EphemeralAdapter is the agent workspace and may be local, remote, git-backed, or non-git depending on adapter support.

The router is GitTrix from @gittrix/core.

flowchart LR
  Durable["DurableAdapter\ngit source of truth"] --> Router["GitTrix router"]
  Router --> Ephemeral["EphemeralAdapter\nagent workspace"]
  Agent["AgentSession"] --> Ephemeral
  User["UserSession"] --> Router
  Router --> Durable
interface AdapterCapabilities {
git: boolean
push: boolean
fetch: boolean
history: boolean
ttl: boolean
maxBlobSize?: number
latencyClass: 'local' | 'edge' | 'regional'
}

Rules:

  • Durable adapters must be git: true; construction throws CAPABILITY_MISSING otherwise.
  • Ephemeral adapters may be git-backed or non-git.
  • Forge-specific helpers, like GitHub PR creation, live as adapter methods outside the shared capabilities contract.

Provider matrix details live in the Adapters Overview.