Repository navigation
v0.13.0
Added
-
Unified capability contract (foundation of the single-client redesign):
CAPABILITY_TAXONOMYin./core/runtime— one provider-agnostic
capability list (the union of the legacy runtime surfaces and
control-plane modules, de-duplicated), withCapabilityKey,
CapabilityMap, andCapabilitySupporttypes.PROVIDER_CAPABILITIES— the single static declaration site per provider
(conservative fallback), with an equivalence test against the legacy
capability matrix.- Runtime capability sourcing in
./contracts:
ResolvedProviderCapabilities,ProviderCapabilityResolver, and
mergeCapabilitySupport(runtime authoritative, static fallback). - Provider transforms + resolvers:
transformHermesCapabilities/
createHermesCapabilityResolver(live API-server capabilities envelope →
unified supports +TeamManifestwith members/actions built from
provider-published paths) andtransformOpenClawHello/
createOpenClawCapabilityResolver(hello-ok handshake → unified supports;
manifest actions from the provider REST manifest + canonical media/wiki
tables).GatewayRpcClientnow retains the raw handshake payload and
exposesgetHelloFrame(). - The single client surface:
createCapabilityClientin./contractsand
thecreateApiClient(provider, options)front door — every capability
accessor exists on every provider (sessions, tasks, events, models, usage,
authStatus, workspace, kanban, teams, media, wiki, agentConfig plus the
universal execution surface); unsupported calls resolve a
CapabilityResultwith a notated gap (ok: false) rather than throwing;
gateway providers auto-wire their resolver and backends from
baseUrl/webSocketUrl. Additive — no existing export changed.
-
Extended
./testinginspectRuntimeProviderConformancewith streaming-path
duality (streamRunor gatewaycreateSseRunEventProvider), required
runLifecycleSemantics(omit|server|sync-store|unsupported-throw)
when getRun/cancelRun are present, and a sync-store foreign-getRunprobe. -
Added a canonical, provider-agnostic
./core/teamscapability:Team/
TeamMembervalue types and a pureTeamDirectoryresolver (resolve teams and
members by id/slug/code/alias), pluscreateTeamDirectoryFromManifestin
./contractsand a./testingconformance kit (validateTeam,
inspectTeamDirectoryConformance). The CAVI team registry now sources its
identifier normalizer from this canonical core. Additive; no runtime behavior
change to existing consumers. -
Added
CapabilityResult,classifyCapabilityFailure,CapabilityCallRejected,
CapabilityGated/CapabilityGatedMethod,StreamRunBody, and
RunStreamOutcomeas root exports — the typed vocabulary of the
CapabilityClientfacade's non-throwing contract.StreamRunBodyis
RuntimeRunStartBodyplus the optional gateway session-selection fields
(sessionKey/session_key/session_id), so
client.streamRun({ input, sessionKey })typechecks at the call site. -
Added gateway
streamRunbridging so the facade's execution surface streams
on every provider: Hermes streams over SSE run events (the run body's
sessionKey— aStreamRunBodyfield — selects the session; without one the
call resolvesok: falsewith arequest-invalidgap and starts no run), and
OpenClaw streams over control-plane WebSocket event frames. The gateway bridge
is wired internally bycreateApiClient; consumers assembling their own facade
supply it through thestreamRunBridgeoption on
CreateCapabilityClientOptions. The reusable control-plane → run-stream
adaptercreateRunEventStreamFromControlPlane(and the underlying
createControlPlaneRunStreamTranslator) is exported from the./core/runtime
subpath.streamRunresolves aCapabilityResult<RunStreamOutcome>with
unified per-provider semantics:okreflects the streaming CALL and the
payload carries the run's own terminal state as data (runIdplus
outcome: "completed" | "failed" | "cancelled" | null), so a run that fails
as arun.failedEVENT still resolvesok: true. A stream torn down by a
transport error (even one swallowed intoonErrorwith no terminal) resolves
ok: falsewith a classified gap; a caller-initiated abort (via
options.signal) or a provider-internal AbortError resolvesok: falsewith
arequest-abortedgap and, when arunIdis known and the runtime exposes
cancelRun, issues a best-effortcancelRun(runId)so no gateway run is
orphaned (the gap note records whether a cancel was requested). -
ContractGapReasongainscapability-unsupported(an undeclared or unwired
capability),request-invalid(a caller mistake the transport can name before
any request is made), andrequest-aborted(a caller-initiated or
provider-internal abort of a streaming call). -
Added
inspectCapabilityClientConformanceunder the./testingsubpath —
probes everyCapabilityClientsurface (execution, control-plane, kanban,
teams, media, wiki, agentConfig, events) and reports which calls fail to
resolve.
Removed
- Breaking (
./providers/hermes): the four pure-config mirror classes —
HermesApiClient,HermesMediaApiClient,HermesWikiApiClient,
HermesWebSocketClient(and theHermesCapabilities/HermesRunStatus
type aliases). They injected only a surface tag and/or endpoint table into
the shared gateway bases; the provider module andcreateApiClientnow pass
that config toGatewayApiClient/GatewayMediaApiClient/
GatewayWikiApiClient/GatewayWebSocketClientdirectly. Runtime behavior
(including thehermes-*surface tags) is unchanged.
Changed
-
RUNTIME_PROVIDER_CAPABILITY_MATRIX(and the per-provider
*_RUNTIME_SUPPORTconsts) now derive fromPROVIDER_CAPABILITIES— the
single declaration site — via runtime-surface / control-plane-module
projections. Two declared values were corrected: OpenClawmedia/wikiare
nowtrue— RPC-backed platform capabilities (media via the core tts/talk
gateway methods; wiki via the first-party memory-wiki plugin'swiki.*
methods), with instance-level presence runtime-resolved from the hello-ok
method advertisement — and Hermes gainscontrolPlane.modules.workspace
(member workspace routes served via the CAVI control plugin, verified live).
The live-diagnose prober now classifies 2xxtext/htmlresponses as
spa-fallbackinstead oflive(the control-UI catch-all had made any GET
look served). -
Documented
RuntimeClientgetRun/cancelRun as three real semantics (omit,
server, sync-store) and namedGatewayApiClientas the gateway implementer
(ReactGatewayClient*remains WS-RPC context only). AlignedCLAUDE.md/
AGENTS.mdwith SynchronousRunStore behavior for Claude Messages and Gemini. -
Hermes and OpenClaw provider modules now expose
createClientalongside the
legacycreateApiClientalias. Providerteam-registry-configre-exports are
marked@deprecatedtoward@cavi-ai/api-client/extensions/cavi. -
Replaced the provider-heavy README with a concise, wiki-first,
provider-neutral entry point and moved exports, provider selection, Claude
integrations, development checks, and consumer verification into focused
linked documents. -
CapabilityClient(the unreleased single-client facade) is now fully
non-throwing: every accessor across every gated surface (sessions,
tasks,events,models,usage,authStatus,workspace,kanban,
teams,media,wiki,agentConfig) and the universal execution surface
(startRun/getRun/cancelRun/streamRun/batch) resolves a
CapabilityResult<T>—ok: falsecarries a structuredContractGapfor
unsupported capabilities and degraded backends, instead of throwing
CapabilityUnavailable. Auth (401/403) and unknown-classified errors still
throw.CapabilityClientno longer extendsRuntimeClient. The execution
surface is always present on every provider, gateways included. -
createApiClient("openclaw")now runs on a single shared WebSocket. The
wiring's socket is injected into the OpenClaw runtime client via its
rpcClientoption, sostartRun/getRun/cancelRunand the resolver,
control plane, kanban, media, andstreamRunevent stream all ride one
connection instead of two. ThestreamRunevent client and provider are
memoized per client, so N concurrent streams share one native socket listener
rather than constructing one event client per call. The wiring'sonDispose
is the SOLE owner of the shared socket's lifecycle (dispose()closes it
exactly once): the injected runtime client never closes it (GatewayApiClient
has nodispose), and the control-plane backend is now wired with
takeRpcOwnership: falseso it tears down only its own raw-gateway resources.
This keeps facadedispose()ordering correct — the control plane is disposed
first without touching the socket, thenonDisposeaborts in-flight
streamRuns cleanly (a clean abort, not an F1 connection-error gap) and closes
the one socket.
Fixed
- OpenClaw reconnect-gap detection is seeded from the socket's live connection
state at (re)attach. An event client subscribing to an already-open socket
missed the initialconnection.open, so its first reconnect was mistaken for
the initial connect and skipped thestream.gapmarker; it now correctly
emitsstream.reconnected(+ a conditionalstream.gap) on the first
post-attach reconnect.
Fixed
- OpenClaw
getTask/cancelTasknow send thetaskIdRPC parameter (not
id) thattasks.get/tasks.cancelrequire — consistent with the
method-specific param naming already used elsewhere (sessions.*→key). - OpenClaw model wire validation now allowlists the optional
api,
available, andinputcatalog fields the gateway forwards, keeping live
model payloads forward-compatible instead of rejecting the whole list.