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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
GbyAI
GbyAI
M
MIT News - Artificial intelligence
美团技术团队
罗磊的独立博客
雷峰网
雷峰网
量子位
博客园 - 【当耐特】
Last Week in AI
Last Week in AI
D
Docker
小众软件
小众软件
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
WordPress大学
WordPress大学
V
V2EX
博客园_首页
腾讯CDC
The Cloudflare Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

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
feat(plugins): derive setup auth choices · openclaw/openc...
vincentkoc · 2026-04-25 · via Recent Commits to openclaw:main

@@ -230,6 +230,177 @@ describe("provider auth choice manifest helpers", () => {

230230

]);

231231

});

232232233+

it("derives generic auth choices from descriptor-safe setup provider auth methods", () => {

234+

setManifestPlugins([

235+

{

236+

id: "demo-provider",

237+

name: "Demo Provider",

238+

origin: "global",

239+

setup: {

240+

providers: [

241+

{

242+

id: "demo-provider",

243+

authMethods: ["api-key", "oauth"],

244+

},

245+

],

246+

requiresRuntime: false,

247+

},

248+

},

249+

]);

250+251+

expect(resolveManifestProviderAuthChoices()).toEqual([

252+

{

253+

pluginId: "demo-provider",

254+

providerId: "demo-provider",

255+

methodId: "api-key",

256+

choiceId: "demo-provider-api-key",

257+

choiceLabel: "Demo Provider API key",

258+

groupId: "demo-provider",

259+

groupLabel: "Demo Provider",

260+

},

261+

{

262+

pluginId: "demo-provider",

263+

providerId: "demo-provider",

264+

methodId: "oauth",

265+

choiceId: "demo-provider-oauth",

266+

choiceLabel: "Demo Provider OAuth",

267+

groupId: "demo-provider",

268+

groupLabel: "Demo Provider",

269+

},

270+

]);

271+

});

272+273+

it("sanitizes setup provider auth descriptors before deriving prompt labels", () => {

274+

setManifestPlugins([

275+

{

276+

id: "evil-provider",

277+

origin: "workspace",

278+

setup: {

279+

providers: [

280+

{

281+

id: "evil\u001b[31m-provider",

282+

authMethods: ["jwt\u001b[2K", "oidc"],

283+

},

284+

],

285+

requiresRuntime: false,

286+

},

287+

},

288+

]);

289+290+

expect(resolveManifestProviderAuthChoices()).toEqual([

291+

{

292+

pluginId: "evil-provider",

293+

providerId: "evil-provider",

294+

methodId: "jwt",

295+

choiceId: "evil-provider-jwt",

296+

choiceLabel: "Evil Provider JWT",

297+

groupId: "evil-provider",

298+

groupLabel: "Evil Provider",

299+

},

300+

{

301+

pluginId: "evil-provider",

302+

providerId: "evil-provider",

303+

methodId: "oidc",

304+

choiceId: "evil-provider-oidc",

305+

choiceLabel: "Evil Provider OIDC",

306+

groupId: "evil-provider",

307+

groupLabel: "Evil Provider",

308+

},

309+

]);

310+

});

311+312+

it("uses setup provider auth methods when no setup entry exists", () => {

313+

setManifestPlugins([

314+

{

315+

id: "no-runtime-provider",

316+

origin: "global",

317+

setup: {

318+

providers: [

319+

{

320+

id: "no-runtime-provider",

321+

authMethods: ["api-key"],

322+

},

323+

],

324+

},

325+

},

326+

]);

327+328+

expect(resolveManifestProviderAuthChoice("no-runtime-provider-api-key")).toEqual({

329+

pluginId: "no-runtime-provider",

330+

providerId: "no-runtime-provider",

331+

methodId: "api-key",

332+

choiceId: "no-runtime-provider-api-key",

333+

choiceLabel: "No Runtime Provider API key",

334+

groupId: "no-runtime-provider",

335+

groupLabel: "No Runtime Provider",

336+

});

337+

});

338+339+

it("keeps setup-entry providers on explicit manifest or runtime auth choices", () => {

340+

setManifestPlugins([

341+

{

342+

id: "runtime-provider",

343+

origin: "global",

344+

setupSource: "/plugins/runtime-provider/setup-entry.cjs",

345+

setup: {

346+

providers: [

347+

{

348+

id: "runtime-provider",

349+

authMethods: ["api-key"],

350+

},

351+

],

352+

},

353+

},

354+

]);

355+356+

expect(resolveManifestProviderAuthChoices()).toEqual([]);

357+

});

358+359+

it("does not duplicate explicit provider auth choices with setup auth methods", () => {

360+

setManifestPlugins([

361+

{

362+

id: "explicit-provider",

363+

origin: "global",

364+

providerAuthChoices: [

365+

{

366+

provider: "explicit-provider",

367+

method: "api-key",

368+

choiceId: "explicit-api-key",

369+

choiceLabel: "Explicit API key",

370+

},

371+

],

372+

setup: {

373+

providers: [

374+

{

375+

id: "explicit-provider",

376+

authMethods: ["api-key", "oauth"],

377+

},

378+

],

379+

requiresRuntime: false,

380+

},

381+

},

382+

]);

383+384+

expect(resolveManifestProviderAuthChoices()).toEqual([

385+

{

386+

pluginId: "explicit-provider",

387+

providerId: "explicit-provider",

388+

methodId: "api-key",

389+

choiceId: "explicit-api-key",

390+

choiceLabel: "Explicit API key",

391+

},

392+

{

393+

pluginId: "explicit-provider",

394+

providerId: "explicit-provider",

395+

methodId: "oauth",

396+

choiceId: "explicit-provider-oauth",

397+

choiceLabel: "Explicit Provider OAuth",

398+

groupId: "explicit-provider",

399+

groupLabel: "Explicit Provider",

400+

},

401+

]);

402+

});

403+233404

it("prefers bundled auth-choice handlers when choice IDs collide across origins", () => {

234405

setManifestPlugins([

235406

{