Skip to content

Latest commit

 

History

History

README.md

Integration Adapter Parity

This directory contains framework adapters that demonstrate the same Gait execution contract across runtimes.

Use these examples only when you control a real tool-dispatch seam. If your runtime is managed or preloaded and does not expose that seam, stay on the observe, verify, capture, and regress paths instead of describing the integration as strict inline enforcement.

Official lane:

  • langchain (official middleware with optional callback correlation)

Reference boundary demo:

  • openai_agents

Reference-demo versus official-lane rule:

  • openai_agents is the in-repo reference boundary demo
  • langchain is the official middleware lane

Quick commands:

python3 examples/integrations/openai_agents/quickstart.py --scenario allow
(cd sdk/python && uv run --python 3.11 --extra langchain python ../../examples/integrations/langchain/quickstart.py --scenario allow)

Reference adapters:

  • autogen
  • openclaw
  • autogpt
  • gastown
  • claude_code (reference adapter; hook errors fail closed by default, GAIT_CLAUDE_UNSAFE_FAIL_OPEN=1 is an unsafe opt-in override)
  • voice_reference
  • template (canonical copy/paste template)

Do not promote an adapter into public launch copy until it has an in-repo lane and clears the integration scorecard threshold.

Contract (Must Stay Identical)

Every adapter must implement:

  1. Framework tool-call payload -> normalized intent payload.
  2. gait gate eval using local policy + intent files.
  3. Execute tool exactly once only on allow.
  4. Persist deterministic trace/evidence paths for local debugging and CI.

Any verdict other than allow is fail-closed (executed=false).

Adapter Acceptance Checklist

Each examples/integrations/<adapter>/ folder must include:

  • README.md with copy/paste allow/block commands and expected output fields.
  • Runnable quickstart script.
  • Deterministic artifact output paths under gait-out/integrations/<adapter>/.
  • No raw side-effecting tool path exposed without Gate evaluation.

Parity Rules

  • No adapter-specific policy language, no policy forks.
  • No framework gets a bypass path around Gate.
  • No adapter-specific semantics for approval or block outcomes.
  • New features must be added in a framework-neutral way first, then adopted by adapters.

Validation

Run before opening a PR:

go build -o ./gait ./cmd/gait
make lint
make test
make test-adapter-parity
make test-adoption

Production Maintainer Checklist

Before merging adapter changes intended for production use:

  1. Non-allow decisions remain fail-closed (executed=false) with no side effects.
  2. Service-mode adapters use auth for non-loopback bindings.
  3. Service-mode adapters use strict verdict HTTP semantics where supported.
  4. Service-mode adapters configure payload and retention caps.
  5. SDK/adapter subprocess calls remain time-bounded and fail-closed.