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../contract→src/contract.ts: the adapter contract test suite. Importsvitest; never pulled through.../tiers→src/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, implementRuntimeAdapter, emitRuntimeEvent, declareCapabilities, and run the./contractsuite (RecordedCallimported in each adapter’stesting/fake*Driver.ts).apps/web,executorRunner.tsimportsassembleTiersfrom./tiersand drives the trait + rotation;runtimes/native/conversation.tsimportsdateStamp. The runner usesRuntimeRegistry,shouldRotate/rotateSession/DEFAULT_ROTATION, andresolveRuntimeIntegration.@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.jsonexports+packages/executor/tsup.config.ts