mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
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:
committed by
GitHub
parent
c218c539ab
commit
f9d9d1225a
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user