refactor(channels): own the lifecycle status contract in SDK patch factories (#118795)

* refactor(sdk): add channel lifecycle patch factories

* refactor(channels): adopt lifecycle patches in a-m

* refactor(channels): adopt lifecycle patches in n-z

* refactor(runtime): lifecycle-own ambient registries

* test(slack): assert lifecycle factory fields

* fix(sdk): preserve lifecycle patch extras types

* test(zalouser): widen lifecycle status sink

* test(irc): avoid shadowed status patch

* fix(zalo): reuse account-agnostic media route

* fix(gateway): accept explicit channel ready recovery

* test(qa): assert terminal Slack block fact

* test(qa): restore Slack blocked lifecycle scenario

* test(gateway): lock explicit lifecycle recovery contract
This commit is contained in:
Peter Steinberger
2026-08-03 12:39:48 -07:00
committed by GitHub
parent c218c539ab
commit f9d9d1225a
66 changed files with 805 additions and 381 deletions
+2 -8
View File
@@ -10,6 +10,7 @@ import {
type ChannelPlugin,
} from "openclaw/plugin-sdk/core";
import { createChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-runtime";
import { channelReadyPatch } from "openclaw/plugin-sdk/gateway-runtime";
import { runReefChannelLifecycle } from "./channel-lifecycle.js";
import {
ReefChannelConfigSchema,
@@ -438,14 +439,7 @@ export const reefPlugin: ChannelPlugin<ReefAccount> = {
}
ctx.setStatus(
state === "connected"
? {
accountId: "default",
running: true,
connected: true,
lifecycle: "ready",
lastConnectedAt: Date.now(),
lastError: null,
}
? channelReadyPatch({ accountId: "default" })
: {
accountId: "default",
running: true,