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

推荐订阅源

月光博客
月光博客
MyScale Blog
MyScale Blog
博客园 - Franky
The Cloudflare Blog
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
WordPress大学
WordPress大学
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
The Blog of Author Tim Ferriss
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
aimingoo的专栏
aimingoo的专栏
J
Java Code Geeks
腾讯CDC
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
博客园 - 【当耐特】
美团技术团队
云风的 BLOG
云风的 BLOG

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): accept setup aliases for add · openclaw/op...
steipete · 2026-04-24 · via Recent Commits to openclaw:main

@@ -193,6 +193,9 @@ function registerExternalChatSetupPlugin(pluginId = "@vendor/external-chat-plugi

193193

type SignalAfterAccountConfigWritten = NonNullable<

194194

NonNullable<ChannelPlugin["setup"]>["afterAccountConfigWritten"]

195195

>;

196+

type ApplyAccountConfigParams = Parameters<

197+

NonNullable<NonNullable<ChannelPlugin["setup"]>["applyAccountConfig"]>

198+

>[0];

196199197200

function createSignalPlugin(

198201

afterAccountConfigWritten: SignalAfterAccountConfigWritten,

@@ -306,6 +309,154 @@ describe("channelsAddCommand", () => {

306309

expect(lifecycleMocks.onAccountConfigChanged).not.toHaveBeenCalled();

307310

});

308311312+

it("maps legacy Nextcloud Talk add flags to setup input fields", async () => {

313+

const applyAccountConfig = vi.fn(({ cfg, input }) => ({

314+

...cfg,

315+

channels: {

316+

...cfg.channels,

317+

"nextcloud-talk": {

318+

enabled: true,

319+

baseUrl: input.baseUrl,

320+

botSecret: input.secret,

321+

botSecretFile: input.secretFile,

322+

},

323+

},

324+

}));

325+

setActivePluginRegistry(

326+

createTestRegistry([

327+

{

328+

pluginId: "nextcloud-talk",

329+

plugin: {

330+

...createChannelTestPluginBase({

331+

id: "nextcloud-talk",

332+

label: "Nextcloud Talk",

333+

}),

334+

setup: { applyAccountConfig },

335+

},

336+

source: "test",

337+

},

338+

]),

339+

);

340+

configMocks.readConfigFileSnapshot.mockResolvedValue({ ...baseConfigSnapshot });

341+342+

await channelsAddCommand(

343+

{

344+

channel: "nextcloud-talk",

345+

account: "default",

346+

url: "https://cloud.example.com/",

347+

token: "shared-secret",

348+

},

349+

runtime,

350+

{ hasFlags: true },

351+

);

352+353+

expect(applyAccountConfig).toHaveBeenCalledWith(

354+

expect.objectContaining({

355+

input: expect.objectContaining({

356+

url: "https://cloud.example.com/",

357+

token: "shared-secret",

358+

baseUrl: "https://cloud.example.com/",

359+

secret: "shared-secret",

360+

}),

361+

}),

362+

);

363+

expect(configMocks.writeConfigFile).toHaveBeenCalledWith(

364+

expect.objectContaining({

365+

channels: {

366+

"nextcloud-talk": {

367+

enabled: true,

368+

baseUrl: "https://cloud.example.com/",

369+

botSecret: "shared-secret",

370+

botSecretFile: undefined,

371+

},

372+

},

373+

}),

374+

);

375+376+

configMocks.writeConfigFile.mockClear();

377+

applyAccountConfig.mockClear();

378+

await channelsAddCommand(

379+

{

380+

channel: "nextcloud-talk",

381+

account: "default",

382+

url: "https://cloud.example.com",

383+

tokenFile: "/tmp/nextcloud-secret",

384+

},

385+

runtime,

386+

{ hasFlags: true },

387+

);

388+389+

expect(applyAccountConfig).toHaveBeenCalledWith(

390+

expect.objectContaining({

391+

input: expect.objectContaining({

392+

baseUrl: "https://cloud.example.com",

393+

secretFile: "/tmp/nextcloud-secret",

394+

}),

395+

}),

396+

);

397+

});

398+399+

it("passes channel auth directory overrides through add setup input", async () => {

400+

setActivePluginRegistry(

401+

createTestRegistry([

402+

{

403+

pluginId: "whatsapp",

404+

plugin: {

405+

...createChannelTestPluginBase({

406+

id: "whatsapp",

407+

label: "WhatsApp",

408+

}),

409+

setup: {

410+

applyAccountConfig: (params: ApplyAccountConfigParams) => ({

411+

...params.cfg,

412+

channels: {

413+

...params.cfg.channels,

414+

whatsapp: {

415+

enabled: true,

416+

accounts: {

417+

[params.accountId]: {

418+

enabled: true,

419+

authDir: params.input.authDir,

420+

},

421+

},

422+

},

423+

},

424+

}),

425+

},

426+

},

427+

source: "test",

428+

},

429+

]),

430+

);

431+

configMocks.readConfigFileSnapshot.mockResolvedValue({ ...baseConfigSnapshot });

432+433+

await channelsAddCommand(

434+

{

435+

channel: "whatsapp",

436+

account: "work",

437+

authDir: "/tmp/openclaw-wa-auth",

438+

},

439+

runtime,

440+

{ hasFlags: true },

441+

);

442+443+

expect(configMocks.writeConfigFile).toHaveBeenCalledWith(

444+

expect.objectContaining({

445+

channels: {

446+

whatsapp: {

447+

enabled: true,

448+

accounts: {

449+

work: {

450+

enabled: true,

451+

authDir: "/tmp/openclaw-wa-auth",

452+

},

453+

},

454+

},

455+

},

456+

}),

457+

);

458+

});

459+309460

it("loads external channel setup snapshots for newly installed and existing plugins", async () => {

310461

configMocks.readConfigFileSnapshot.mockResolvedValue({ ...baseConfigSnapshot });

311462

setActivePluginRegistry(createTestRegistry());