From 2797ae158396eecb56f80c3d0dbd7e0c176fd016 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 18 Mar 2026 12:26:18 -0700 Subject: [PATCH] docs: add missing voice-call CLI commands and contract test section to testing --- docs/help/testing.md | 49 ++++++++++++++++++++++++++++++++++++++ docs/plugins/voice-call.md | 7 ++++++ 2 files changed, 56 insertions(+) diff --git a/docs/help/testing.md b/docs/help/testing.md index 6fb91982f1d..ee0a5b357a0 100644 --- a/docs/help/testing.md +++ b/docs/help/testing.md @@ -461,6 +461,55 @@ Future evals should stay deterministic first: - A small suite of skill-focused scenarios (use vs avoid, gating, prompt injection). - Optional live evals (opt-in, env-gated) only after the CI-safe suite is in place. +## Contract tests (plugin and channel shape) + +Contract tests verify that every registered plugin and channel conforms to its +interface contract. They iterate over all discovered plugins and run a suite of +shape and behavior assertions. + +### Commands + +- All contracts: `pnpm test:contracts` +- Channel contracts only: `pnpm test:contracts:channels` +- Provider contracts only: `pnpm test:contracts:plugins` + +### Channel contracts + +Located in `src/channels/plugins/contracts/*.contract.test.ts`: + +- **plugin** - Basic plugin shape (id, name, capabilities) +- **setup** - Setup wizard contract +- **session-binding** - Session binding behavior +- **outbound-payload** - Message payload structure +- **inbound** - Inbound message handling +- **actions** - Channel action handlers +- **threading** - Thread ID handling +- **directory** - Directory/roster API +- **group-policy** - Group policy enforcement +- **status** - Channel status probes +- **registry** - Plugin registry shape + +### Provider contracts + +Located in `src/plugins/contracts/*.contract.test.ts`: + +- **auth** - Auth flow contract +- **auth-choice** - Auth choice/selection +- **catalog** - Model catalog API +- **discovery** - Plugin discovery +- **loader** - Plugin loading +- **runtime** - Provider runtime +- **shape** - Plugin shape/interface +- **wizard** - Setup wizard + +### When to run + +- After changing plugin-sdk exports or subpaths +- After adding or modifying a channel or provider plugin +- After refactoring plugin registration or discovery + +Contract tests run in CI and do not require real API keys. + ## Adding regressions (guidance) When you fix a provider/model issue discovered in live: diff --git a/docs/plugins/voice-call.md b/docs/plugins/voice-call.md index 531b6c48595..51c0f1efccd 100644 --- a/docs/plugins/voice-call.md +++ b/docs/plugins/voice-call.md @@ -312,14 +312,21 @@ Auto-responses use the agent system. Tune with: ```bash openclaw voicecall call --to "+15555550123" --message "Hello from OpenClaw" +openclaw voicecall start --to "+15555550123" # alias for call openclaw voicecall continue --call-id --message "Any questions?" openclaw voicecall speak --call-id --message "One moment" openclaw voicecall end --call-id openclaw voicecall status --call-id openclaw voicecall tail +openclaw voicecall latency # summarize turn latency from logs openclaw voicecall expose --mode funnel ``` +`latency` reads `calls.jsonl` from the default voice-call storage path. Use +`--file ` to point at a different log and `--last ` to limit analysis +to the last N records (default 200). Output includes p50/p90/p99 for turn +latency and listen-wait times. + ## Agent tool Tool name: `voice_call`