refactor: share channel runtime state defaults

This commit is contained in:
Peter Steinberger
2026-03-22 23:11:37 +00:00
parent 023394bc0b
commit 4cc0d05cfb
15 changed files with 52 additions and 109 deletions

View File

@@ -16,6 +16,7 @@ import {
listResolvedDirectoryEntriesFromSources,
} from "openclaw/plugin-sdk/directory-runtime";
import { runStoppablePassiveMonitor } from "openclaw/plugin-sdk/extension-shared";
import { createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
import {
listIrcAccountIds,
resolveDefaultIrcAccountId,
@@ -253,13 +254,7 @@ export const ircPlugin: ChannelPlugin<ResolvedIrcAccount, IrcProbe> = createChat
},
}),
status: {
defaultRuntime: {
accountId: DEFAULT_ACCOUNT_ID,
running: false,
lastStartAt: null,
lastStopAt: null,
lastError: null,
},
defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID),
buildChannelSummary: ({ account, snapshot }) => ({
...buildBaseChannelStatusSummary(snapshot),
host: account.host,