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

推荐订阅源

M
MIT News - Artificial intelligence
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
月光博客
月光博客
博客园 - Franky
腾讯CDC
T
Tailwind CSS Blog
Recent Announcements
Recent Announcements
V
V2EX
N
Netflix TechBlog - Medium
量子位
Jina AI
Jina AI
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
爱范儿
爱范儿
博客园 - 叶小钗
D
Docker
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss

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(qqbot): harden clientSecret SecretRefs · openclaw/ope...
steipete · 2026-05-03 · via Recent Commits to openclaw:main

@@ -2,12 +2,13 @@ import {

22

collectConditionalChannelFieldAssignments,

33

getChannelSurface,

44

hasConfiguredSecretInputValue,

5-

normalizeSecretStringValue,

65

type ResolverContext,

76

type SecretDefaults,

87

type SecretTargetRegistryEntry,

98

} from "openclaw/plugin-sdk/channel-secret-basic-runtime";

10910+

const DEFAULT_ACCOUNT_ID = "default";

11+1112

export const secretTargetRegistryEntries = [

1213

{

1314

id: "channels.qqbot.accounts.*.clientSecret",

@@ -33,8 +34,11 @@ export const secretTargetRegistryEntries = [

3334

},

3435

] satisfies SecretTargetRegistryEntry[];

353636-

function hasClientSecretFile(value: unknown): boolean {

37-

return normalizeSecretStringValue(value).length > 0;

37+

function hasTopLevelAppId(qqbot: Record<string, unknown>): boolean {

38+

if (typeof qqbot.appId === "string") {

39+

return qqbot.appId.trim().length > 0;

40+

}

41+

return typeof qqbot.appId === "number";

3842

}

39434044

export function collectRuntimeConfigAssignments(params: {

@@ -48,9 +52,9 @@ export function collectRuntimeConfigAssignments(params: {

4852

}

49535054

const { channel: qqbot, surface } = resolved;

51-

const baseClientSecretFile = hasClientSecretFile(qqbot.clientSecretFile);

52-

const accountClientSecretFile = (account: Record<string, unknown>) =>

53-

hasClientSecretFile(account.clientSecretFile);

55+

const hasExplicitDefaultAccount = surface.accounts.some(

56+

({ accountId }) => accountId === DEFAULT_ACCOUNT_ID,

57+

);

54585559

collectConditionalChannelFieldAssignments({

5660

channelKey: "qqbot",

@@ -59,20 +63,16 @@ export function collectRuntimeConfigAssignments(params: {

5963

surface,

6064

defaults: params.defaults,

6165

context: params.context,

62-

topLevelActiveWithoutAccounts: !baseClientSecretFile,

63-

topLevelInheritedAccountActive: ({ account, enabled }) => {

64-

if (!enabled || baseClientSecretFile) {

65-

return false;

66+

topLevelActiveWithoutAccounts: true,

67+

topLevelInheritedAccountActive: ({ accountId, account, enabled }) => {

68+

if (accountId === DEFAULT_ACCOUNT_ID) {

69+

return enabled && !hasConfiguredSecretInputValue(account.clientSecret, params.defaults);

6670

}

67-

return (

68-

!hasConfiguredSecretInputValue(account.clientSecret, params.defaults) &&

69-

!accountClientSecretFile(account)

70-

);

71+

return !hasExplicitDefaultAccount && hasTopLevelAppId(qqbot);

7172

},

72-

accountActive: ({ account, enabled }) => enabled && !accountClientSecretFile(account),

73-

topInactiveReason:

74-

"no enabled QQBot surface inherits this top-level clientSecret (clientSecretFile is configured).",

75-

accountInactiveReason: "QQBot account is disabled or clientSecretFile is configured.",

73+

accountActive: ({ enabled }) => enabled,

74+

topInactiveReason: "no enabled QQ Bot default surface uses this top-level clientSecret.",

75+

accountInactiveReason: "QQ Bot account is disabled.",

7676

});

7777

}

7878