Skip to main content
Version 0.1.0 · Purity pure (browser-safe; deps: @clawboo/executor, zod) · Purpose the pure RuntimeAdapter for clawboo’s native runtime, the in-process conversational harness driving provider SDKs directly, mapped onto the normalized executor event stream.
  • Workspace deps: @clawboo/executor
  • External deps: zod (^3.25.0)
The package is the dependency-light translation layer the contract suite can drive with an in-memory fake. The real harness (turn loop, provider clients, MCP bridge) lives server-side in apps/web/server/lib/runtimes/native/; this package owns only the adapter, the event mapper, and the persisted AgentConfig shape.

Public API

Functions

Classes

NativeAdapter.capabilities() returns: streaming, mcp, worktrees, resume, toolApproval all true; contextWindowTokens: 200000; runtimeClass: 'native'; nativeHome: { scope: 'per-identity', persist: true }; nativeSkills: 'none'; nativeMemory: 'preserve'; nativeChannels: 'none'; nativeScheduler: false. It also exposes a sessionCodec that serializes the captured native session id so a same-runtime resume continues the persisted transcript.

Types & interfaces

Constants

The turn event carries the per-response token delta, not a running total; the host records spend per cost event so the budget kill-switch sees live mid-run spend. On the terminal result/done, usage.inputTokens is the final turn’s input (≈ live context size, the rotation watermark’s signal) and costUsd is the run-cumulative total (never re-billed). See the executor runner internals.
tenantId (on AgentConfig) is a dormant multi-tenant seam, always null today. participantKind is an open-set string ('agent' today; a human teammate slots in without code branching). Both are future seams, not built.

Used by

  • apps/web/server/lib/runtimes/index.ts, wires NativeAdapter into the runtime registry with the real server-side driver factory.
  • apps/web/server/lib/runtimes/native/*, the harness (nativeDriver.ts, conversation.ts, routeCall.ts, agentConfigStore.ts) consumes NativeDriver/NativeEvent, AgentConfig, DEFAULT_MAX_TURNS, envVarForProvider, parseAgentConfig, DEFAULT_AGENT_CONFIG.
  • apps/web/server/lib/agentSource/clawbooNativeAgentSource.ts, uses agentConfigSchema / DEFAULT_AGENT_CONFIG / AgentConfig to mint and persist native agent rows.
  • apps/web/server/api/onboardingSeed.ts and apps/web/server/api/runtimes.ts, use envVarForProvider / KNOWN_PROVIDERS for native key routing.

Source

Barrel: packages/adapters/native/src/index.ts. Single export entry (.); no subpath barrels.

See also

Last modified on August 21, 2026