Files
openclaw/extensions/voice-call/src/runtime-state.ts
Ayaan Zaidi 16c14e5bbf feat(channels): expose the turn-adoption lifecycle seam
Replace the bare onTurnAdopted callback and queuedFollowupLifecycle with one
turnAdoptionLifecycle surface (onSettled guaranteed via finally; adoption-loss
aborts queued steering turns without transcript replay), threaded through the
turn kernel and agent runner, exposed to plugins via
runtime.state.openChannelIngressDrain and the channel-outbound SDK barrel,
with surface budgets re-measured against the narrowed baselines (#108656).
2026-07-17 10:12:54 +05:30

25 lines
848 B
TypeScript

// Voice Call plugin module implements runtime state behavior.
import { createPluginRuntimeStore, type PluginRuntime } from "openclaw/plugin-sdk/runtime-store";
// Process-local runtime store used by voice-call persistence helpers.
/** Runtime subset needed by voice-call state persistence. */
export type VoiceCallStateRuntime = {
state: Pick<
PluginRuntime["state"],
| "resolveStateDir"
| "openKeyedStore"
| "openSyncKeyedStore"
| "openChannelIngressQueue"
| "openChannelIngressDrain"
>;
};
const { setRuntime: setVoiceCallStateRuntime, tryGetRuntime: getOptionalVoiceCallStateRuntime } =
createPluginRuntimeStore<VoiceCallStateRuntime>({
pluginId: "voice-call-state",
errorMessage: "Voice Call state runtime not initialized",
});
export { getOptionalVoiceCallStateRuntime, setVoiceCallStateRuntime };