惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
GbyAI
GbyAI
爱范儿
爱范儿
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
M
MIT News - Artificial intelligence
量子位
宝玉的分享
宝玉的分享
MongoDB | Blog
MongoDB | Blog
V
Visual Studio Blog
罗磊的独立博客
F
Fortinet All Blogs
美团技术团队
博客园_首页
博客园 - 【当耐特】
L
LangChain Blog
月光博客
月光博客
腾讯CDC
The Cloudflare Blog
D
Docker
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(channels): improve health metadata and reply diagnost...
steipete · 2026-04-29 · via Recent Commits to openclaw:main

@@ -1,67 +1,61 @@

11

import type { OpenClawConfig } from "../../config/types.openclaw.js";

22

import { normalizeOptionalString } from "../../shared/string-coerce.js";

3+

import { inspectChannelAccount } from "../account-inspection.js";

34

import { projectSafeChannelAccountSnapshotFields } from "../account-snapshot-fields.js";

4-

import { inspectReadOnlyChannelAccount } from "../read-only-account-inspect.js";

55

import type { ChannelPlugin } from "./types.plugin.js";

66

import type { ChannelAccountSnapshot } from "./types.public.js";

7788

// Channel docking: status snapshots flow through plugin.status hooks here.

9-

async function buildSnapshotFromAccount<ResolvedAccount>(params: {

9+

export async function buildChannelAccountSnapshotFromAccount<ResolvedAccount>(params: {

1010

plugin: ChannelPlugin<ResolvedAccount>;

1111

cfg: OpenClawConfig;

1212

accountId: string;

1313

account: ResolvedAccount;

1414

runtime?: ChannelAccountSnapshot;

1515

probe?: unknown;

1616

audit?: unknown;

17+

enabledFallback?: boolean;

18+

configuredFallback?: boolean;

1719

}): Promise<ChannelAccountSnapshot> {

20+

let snapshot: ChannelAccountSnapshot;

1821

if (params.plugin.status?.buildAccountSnapshot) {

19-

const snapshot = await params.plugin.status.buildAccountSnapshot({

22+

snapshot = await params.plugin.status.buildAccountSnapshot({

2023

account: params.account,

2124

cfg: params.cfg,

2225

runtime: params.runtime,

2326

probe: params.probe,

2427

audit: params.audit,

2528

});

26-

return normalizeOptionalString(snapshot.accountId)

27-

? snapshot

28-

: {

29-

...snapshot,

30-

accountId: params.accountId,

31-

};

32-

}

33-

const enabled = params.plugin.config.isEnabled

34-

? params.plugin.config.isEnabled(params.account, params.cfg)

35-

: params.account && typeof params.account === "object"

36-

? (params.account as { enabled?: boolean }).enabled

37-

: undefined;

38-

const configured =

39-

params.account && typeof params.account === "object" && "configured" in params.account

40-

? (params.account as { configured?: boolean }).configured

41-

: params.plugin.config.isConfigured

42-

? await params.plugin.config.isConfigured(params.account, params.cfg)

29+

} else {

30+

const enabled = params.plugin.config.isEnabled

31+

? params.plugin.config.isEnabled(params.account, params.cfg)

32+

: params.account && typeof params.account === "object"

33+

? (params.account as { enabled?: boolean }).enabled

4334

: undefined;

35+

const configured =

36+

params.account && typeof params.account === "object" && "configured" in params.account

37+

? (params.account as { configured?: boolean }).configured

38+

: params.plugin.config.isConfigured

39+

? await params.plugin.config.isConfigured(params.account, params.cfg)

40+

: undefined;

41+

snapshot = {

42+

accountId: params.accountId,

43+

enabled,

44+

configured,

45+

...projectSafeChannelAccountSnapshotFields(params.account),

46+

...projectSafeChannelAccountSnapshotFields(params.runtime),

47+

};

48+

}

49+4450

return {

45-

accountId: params.accountId,

46-

enabled,

47-

configured,

48-

...projectSafeChannelAccountSnapshotFields(params.account),

51+

...snapshot,

52+

accountId: normalizeOptionalString(snapshot.accountId) ? snapshot.accountId : params.accountId,

53+

enabled: snapshot.enabled ?? params.enabledFallback,

54+

configured: snapshot.configured ?? params.configuredFallback,

55+

...(params.probe !== undefined && snapshot.probe === undefined ? { probe: params.probe } : {}),

4956

};

5057

}

515852-

async function inspectChannelAccount<ResolvedAccount>(params: {

53-

plugin: ChannelPlugin<ResolvedAccount>;

54-

cfg: OpenClawConfig;

55-

accountId: string;

56-

}): Promise<ResolvedAccount | null> {

57-

return (params.plugin.config.inspectAccount?.(params.cfg, params.accountId) ??

58-

(await inspectReadOnlyChannelAccount({

59-

channelId: params.plugin.id,

60-

cfg: params.cfg,

61-

accountId: params.accountId,

62-

}))) as ResolvedAccount | null;

63-

}

64-6559

export async function buildReadOnlySourceChannelAccountSnapshot<ResolvedAccount>(params: {

6660

plugin: ChannelPlugin<ResolvedAccount>;

6761

cfg: OpenClawConfig;

@@ -74,7 +68,7 @@ export async function buildReadOnlySourceChannelAccountSnapshot<ResolvedAccount>

7468

if (!inspectedAccount) {

7569

return null;

7670

}

77-

return await buildSnapshotFromAccount({

71+

return await buildChannelAccountSnapshotFromAccount({

7872

...params,

7973

account: inspectedAccount as ResolvedAccount,

8074

});

@@ -91,7 +85,7 @@ export async function buildChannelAccountSnapshot<ResolvedAccount>(params: {

9185

const inspectedAccount = await inspectChannelAccount(params);

9286

const account =

9387

inspectedAccount ?? params.plugin.config.resolveAccount(params.cfg, params.accountId);

94-

return await buildSnapshotFromAccount({

88+

return await buildChannelAccountSnapshotFromAccount({

9589

...params,

9690

account,

9791

});