Skip to main content
This is the substrate the whole multi-runtime executor is built on: a single RuntimeAdapter interface over every runtime (OpenClaw, clawboo-native, Claude Code, Codex, Hermes), a 7-variant RuntimeEvent union the orchestrator/board/UI consume so they stay decoupled from per-runtime quirks, a runAdapterContract suite every adapter must pass, and cache-discipline helpers for prompt assembly. Three barrels, each its own subpath in package.json exports:
  • .src/index.ts: the app-safe barrel (trait, event union, registry, async queue, session rotation, integration plan). No test deps.
  • ./contractsrc/contract.ts: the adapter contract test suite. Imports vitest; never pulled through ..
  • ./tierssrc/tiers/index.ts: KV-/prompt-cache discipline primitives.

Public API

., main barrel (src/index.ts)

Functions

Types & interfaces

Classes

Constants

./tiers, prompt-cache discipline (src/tiers/index.ts)

KV-/prompt-cache primitives: stable → context → volatile tier ordering, deterministically-sorted tool definitions, date-only timestamps. Pure + browser-safe.

Functions

Types & interfaces

cacheBreakpoints are suggestions for an Anthropic-style consumer. OpenAI auto-prefix-caches and ignores them; OpenClaw’s Gateway owns caching and ignores them too.

./contract, adapter contract suite (src/contract.ts)

The suite every RuntimeAdapter must pass. Imports vitest, so it lives only under this subpath and is never re-exported from the main barrel.

Functions

Types & interfaces

Used by

  • @clawboo/adapter-openclaw, -native, -claude-code, -codex, -hermes, implement RuntimeAdapter, emit RuntimeEvent, declare Capabilities, and run the ./contract suite (RecordedCall imported in each adapter’s testing/fake*Driver.ts).
  • apps/web, executorRunner.ts imports assembleTiers from ./tiers and drives the trait + rotation; runtimes/native/conversation.ts imports dateStamp. The runner uses RuntimeRegistry, shouldRotate/rotateSession/DEFAULT_ROTATION, and resolveRuntimeIntegration.
  • @clawboo/evals, depends on the executor surface for its harness.

Source

  • Main barrel: packages/executor/src/index.ts
  • Contract barrel: packages/executor/src/contract.ts
  • Tiers barrel: packages/executor/src/tiers/index.ts
  • Subpath mapping: packages/executor/package.json exports + packages/executor/tsup.config.ts

See also

Last modified on August 21, 2026