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

@@ -13,6 +13,7 @@ import {
import { createAllowlistProviderRouteAllowlistWarningCollector } from "openclaw/plugin-sdk/channel-policy";
import { createChatChannelPlugin } from "openclaw/plugin-sdk/core";
import { runStoppablePassiveMonitor } from "openclaw/plugin-sdk/extension-shared";
import { createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
import {
buildBaseChannelStatusSummary,
buildChannelConfigSchema,
@@ -168,13 +169,7 @@ export const nextcloudTalkPlugin: ChannelPlugin<ResolvedNextcloudTalkAccount> =
},
setup: nextcloudTalkSetupAdapter,
status: {
defaultRuntime: {
accountId: DEFAULT_ACCOUNT_ID,
running: false,
lastStartAt: null,
lastStopAt: null,
lastError: null,
},
defaultRuntime: createDefaultChannelRuntimeState(DEFAULT_ACCOUNT_ID),
buildChannelSummary: ({ snapshot }) =>
buildBaseChannelStatusSummary(snapshot, {
secretSource: snapshot.secretSource ?? "none",