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

推荐订阅源

P
Privacy International News Feed
I
Intezer
T
Tenable Blog
S
Schneier on Security
Project Zero
Project Zero
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
Know Your Adversary
Know Your Adversary
博客园 - 司徒正美
The Cloudflare Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News and Events Feed by Topic
博客园 - 叶小钗
宝玉的分享
宝玉的分享
L
LINUX DO - 热门话题
aimingoo的专栏
aimingoo的专栏
S
Secure Thoughts
Forbes - Security
Forbes - Security
T
The Exploit Database - CXSecurity.com
D
Darknet – Hacking Tools, Hacker News & Cyber Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
罗磊的独立博客
IT之家
IT之家
H
Hacker News: Front Page
I
InfoQ
云风的 BLOG
云风的 BLOG
S
Security Affairs
M
MIT News - Artificial intelligence
GbyAI
GbyAI
Jina AI
Jina AI
Help Net Security
Help Net Security
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
Webroot Blog
Webroot Blog
L
Lohrmann on Cybersecurity
A
About on SuperTechFans
Attack and Defense Labs
Attack and Defense Labs
The Register - Security
The Register - Security
V
V2EX
G
Google Developers Blog
D
DataBreaches.Net
Apple Machine Learning Research
Apple Machine Learning Research
C
Cybersecurity and Infrastructure Security Agency CISA
J
Java Code Geeks
W
WeLiveSecurity
Cloudbric
Cloudbric
T
Tor Project 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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
feat(plugins): read setup provider env vars (#71226) · openclaw/openclaw@7536993
vincentkoc · 2026-04-25 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -14,6 +14,7 @@ Docs: https://docs.openclaw.ai

1414

- Plugins/setup: honor explicit `setup.requiresRuntime: false` as a descriptor-only setup contract while keeping omitted values on the legacy setup-api fallback path. Thanks @vincentkoc.

1515

- Plugins/setup: report descriptor/runtime drift when setup-api registrations disagree with `setup.providers` or `setup.cliBackends`, without rejecting legacy setup plugins. Thanks @vincentkoc.

1616

- Plugin hooks: expose first-class run, message, sender, session, and trace correlation fields on message hook contexts and run lifecycle events. Thanks @vincentkoc.

17+

- Plugins/setup: include `setup.providers[].envVars` in generic provider auth/env lookups and warn non-bundled plugins that still rely on deprecated `providerAuthEnvVars` compatibility metadata. Thanks @vincentkoc.

1718

- TUI/dependencies: remove direct `cli-highlight` usage from the OpenClaw TUI code-block renderer, keeping themed code coloring without the extra root dependency. Thanks @vincentkoc.

1819

- Diagnostics/OTEL: export run, model-call, and tool-execution diagnostic lifecycle events as OTEL spans without retaining live span state. Thanks @vincentkoc.

1920

- Providers/Anthropic Vertex: move the Vertex SDK runtime behind the bundled provider plugin so core no longer owns that provider-specific dependency. Thanks @vincentkoc.

Original file line numberDiff line numberDiff line change

@@ -166,7 +166,8 @@ conversation, and it runs after core approval handling finishes.

166166
167167

Provider plugins have three layers:

168168
169-

- **Manifest metadata** for cheap pre-runtime lookup: `providerAuthEnvVars`,

169+

- **Manifest metadata** for cheap pre-runtime lookup:

170+

`setup.providers[].envVars`, deprecated compatibility `providerAuthEnvVars`,

170171

`providerAuthAliases`, `providerAuthChoices`, and `channelEnvVars`.

171172

- **Config-time hooks**: `catalog` (legacy `discovery`) plus

172173

`applyConfigDefaults`.

@@ -178,13 +179,16 @@ OpenClaw still owns the generic agent loop, failover, transcript handling, and

178179

tool policy. These hooks are the extension surface for provider-specific

179180

behavior without needing a whole custom inference transport.

180181
181-

Use manifest `providerAuthEnvVars` when the provider has env-based credentials

182-

that generic auth/status/model-picker paths should see without loading plugin

183-

runtime. Use manifest `providerAuthAliases` when one provider id should reuse

184-

another provider id's env vars, auth profiles, config-backed auth, and API-key

185-

onboarding choice. Use manifest `providerAuthChoices` when onboarding/auth-choice

186-

CLI surfaces should know the provider's choice id, group labels, and simple

187-

one-flag auth wiring without loading provider runtime. Keep provider runtime

182+

Use manifest `setup.providers[].envVars` when the provider has env-based

183+

credentials that generic auth/status/model-picker paths should see without

184+

loading plugin runtime. Deprecated `providerAuthEnvVars` is still read by the

185+

compatibility adapter during the deprecation window, and non-bundled plugins

186+

that use it receive a manifest diagnostic. Use manifest `providerAuthAliases`

187+

when one provider id should reuse another provider id's env vars, auth profiles,

188+

config-backed auth, and API-key onboarding choice. Use manifest

189+

`providerAuthChoices` when onboarding/auth-choice CLI surfaces should know the

190+

provider's choice id, group labels, and simple one-flag auth wiring without

191+

loading provider runtime. Keep provider runtime

188192

`envVars` for operator-facing hints such as onboarding labels or OAuth

189193

client-id/client-secret setup vars.

190194
Original file line numberDiff line numberDiff line change

@@ -148,7 +148,7 @@ or npm install metadata. Those belong in your plugin code and `package.json`.

148148

| `syntheticAuthRefs` | No | `string[]` | Provider or CLI backend refs whose plugin-owned synthetic auth hook should be probed during cold model discovery before runtime loads. |

149149

| `nonSecretAuthMarkers` | No | `string[]` | Bundled-plugin-owned placeholder API key values that represent non-secret local, OAuth, or ambient credential state. |

150150

| `commandAliases` | No | `object[]` | Command names owned by this plugin that should produce plugin-aware config and CLI diagnostics before runtime loads. |

151-

| `providerAuthEnvVars` | No | `Record<string, string[]>` | Cheap provider-auth env metadata that OpenClaw can inspect without loading plugin code. |

151+

| `providerAuthEnvVars` | No | `Record<string, string[]>` | Deprecated compatibility env metadata for provider auth/status lookup. Prefer `setup.providers[].envVars` for new plugins; OpenClaw still reads this during the deprecation window. |

152152

| `providerAuthAliases` | No | `Record<string, string>` | Provider ids that should reuse another provider id for auth lookup, for example a coding provider that shares the base provider API key and auth profiles. |

153153

| `channelEnvVars` | No | `Record<string, string[]>` | Cheap channel env metadata that OpenClaw can inspect without loading plugin code. Use this for env-driven channel setup or auth surfaces that generic startup/config helpers should see. |

154154

| `providerAuthChoices` | No | `object[]` | Cheap auth-choice metadata for onboarding pickers, preferred-provider resolution, and simple CLI flag wiring. |

@@ -327,6 +327,12 @@ narrows the candidate plugin and setup still needs richer setup-time runtime

327327

hooks, set `requiresRuntime: true` and keep `setup-api` in place as the

328328

fallback execution path.

329329
330+

OpenClaw also includes `setup.providers[].envVars` in generic provider auth and

331+

env-var lookups. `providerAuthEnvVars` remains supported through a compatibility

332+

adapter during the deprecation window, but non-bundled plugins that still use it

333+

receive a manifest diagnostic. New plugins should put setup/status env metadata

334+

on `setup.providers[].envVars`.

335+
330336

Set `requiresRuntime: false` only when those descriptors are sufficient for the

331337

setup surface. OpenClaw treats explicit `false` as a descriptor-only contract

332338

and will not execute `setup-api` for setup lookup. Omitted `requiresRuntime`

@@ -725,7 +731,7 @@ See [Configuration reference](/gateway/configuration) for the full `plugins.*` s

725731

- `channels`, `providers`, `cliBackends`, and `skills` can all be omitted when a plugin does not need them.

726732

- `providerDiscoveryEntry` must stay lightweight and should not import broad runtime code; use it for static provider catalog metadata or narrow discovery descriptors, not request-time execution.

727733

- Exclusive plugin kinds are selected through `plugins.slots.*`: `kind: "memory"` via `plugins.slots.memory`, `kind: "context-engine"` via `plugins.slots.contextEngine` (default `legacy`).

728-

- Env-var metadata (`providerAuthEnvVars`, `channelEnvVars`) is declarative only. Status, audit, cron delivery validation, and other read-only surfaces still apply plugin trust and effective activation policy before treating an env var as configured.

734+

- Env-var metadata (`setup.providers[].envVars`, deprecated `providerAuthEnvVars`, and `channelEnvVars`) is declarative only. Status, audit, cron delivery validation, and other read-only surfaces still apply plugin trust and effective activation policy before treating an env var as configured.

729735

- For runtime wizard metadata that requires provider code, see [Provider runtime hooks](/plugins/architecture-internals#provider-runtime-hooks).

730736

- If your plugin depends on native modules, document the build steps and any package-manager allowlist requirements (for example, pnpm `allow-build-scripts` + `pnpm rebuild <package>`).

731737
Original file line numberDiff line numberDiff line change

@@ -478,6 +478,38 @@ describe("loadPluginManifestRegistry", () => {

478478

]);

479479

});

480480
481+

it("reports non-bundled providerAuthEnvVars as deprecated compat metadata", () => {

482+

const dir = makeTempDir();

483+

writeManifest(dir, {

484+

id: "external-openai",

485+

providers: ["openai"],

486+

providerAuthEnvVars: {

487+

openai: ["OPENAI_API_KEY"],

488+

},

489+

configSchema: { type: "object" },

490+

});

491+
492+

const registry = loadSingleCandidateRegistry({

493+

idHint: "external-openai",

494+

rootDir: dir,

495+

origin: "global",

496+

});

497+
498+

expect(registry.plugins[0]?.providerAuthEnvVars).toEqual({

499+

openai: ["OPENAI_API_KEY"],

500+

});

501+

expect(registry.diagnostics).toContainEqual(

502+

expect.objectContaining({

503+

level: "warn",

504+

pluginId: "external-openai",

505+

source: path.join(dir, "openclaw.plugin.json"),

506+

message: expect.stringContaining(

507+

"providerAuthEnvVars is deprecated compatibility metadata",

508+

),

509+

}),

510+

);

511+

});

512+
481513

it("falls back providerDiscoverySource from .ts to emitted .js files", () => {

482514

const dir = makeTempDir();

483515

writeManifest(dir, {

Original file line numberDiff line numberDiff line change

@@ -450,6 +450,28 @@ function buildBundleRecord(params: {

450450

};

451451

}

452452
453+

function pushProviderAuthEnvVarsCompatDiagnostic(params: {

454+

record: PluginManifestRecord;

455+

diagnostics: PluginDiagnostic[];

456+

}): void {

457+

if (params.record.origin === "bundled" || !params.record.providerAuthEnvVars) {

458+

return;

459+

}

460+

const providerIds = Object.entries(params.record.providerAuthEnvVars)

461+

.filter(([providerId, envVars]) => providerId.trim() && envVars.length > 0)

462+

.map(([providerId]) => providerId)

463+

.toSorted((left, right) => left.localeCompare(right));

464+

if (providerIds.length === 0) {

465+

return;

466+

}

467+

params.diagnostics.push({

468+

level: "warn",

469+

pluginId: params.record.id,

470+

source: params.record.manifestPath,

471+

message: `providerAuthEnvVars is deprecated compatibility metadata for provider env-var lookup; mirror ${providerIds.join(", ")} env vars to setup.providers[].envVars before the deprecation window closes`,

472+

});

473+

}

474+
453475

function matchesInstalledPluginRecord(params: {

454476

pluginId: string;

455477

candidate: PluginCandidate;

@@ -642,6 +664,7 @@ export function loadPluginManifestRegistry(

642664

if (PLUGIN_ORIGIN_RANK[candidate.origin] < PLUGIN_ORIGIN_RANK[existing.candidate.origin]) {

643665

records[existing.recordIndex] = record;

644666

seenIds.set(manifest.id, { candidate, recordIndex: existing.recordIndex });

667+

pushProviderAuthEnvVarsCompatDiagnostic({ record, diagnostics });

645668

}

646669

continue;

647670

}

@@ -664,6 +687,7 @@ export function loadPluginManifestRegistry(

664687

if (candidateWins) {

665688

records[existing.recordIndex] = record;

666689

seenIds.set(manifest.id, { candidate, recordIndex: existing.recordIndex });

690+

pushProviderAuthEnvVarsCompatDiagnostic({ record, diagnostics });

667691

}

668692

diagnostics.push({

669693

level: "warn",

@@ -676,6 +700,7 @@ export function loadPluginManifestRegistry(

676700
677701

seenIds.set(manifest.id, { candidate, recordIndex: records.length });

678702

records.push(record);

703+

pushProviderAuthEnvVarsCompatDiagnostic({ record, diagnostics });

679704

}

680705
681706

const registry = { plugins: records, diagnostics };

Original file line numberDiff line numberDiff line change

@@ -194,7 +194,13 @@ export type PluginManifest = {

194194

* config diagnostics before runtime loads.

195195

*/

196196

commandAliases?: PluginManifestCommandAlias[];

197-

/** Cheap provider-auth env lookup without booting plugin runtime. */

197+

/**

198+

* Cheap provider-auth env lookup without booting plugin runtime.

199+

*

200+

* @deprecated Prefer setup.providers[].envVars for generic setup/status env

201+

* metadata. This field remains supported through the provider env-var

202+

* compatibility adapter during the deprecation window.

203+

*/

198204

providerAuthEnvVars?: Record<string, string[]>;

199205

/** Provider ids that should reuse another provider id for auth lookup. */

200206

providerAuthAliases?: Record<string, string>;

Original file line numberDiff line numberDiff line change

@@ -15,6 +15,12 @@ type MockManifestRegistry = {

1515

kind?: "memory" | "context-engine" | Array<"memory" | "context-engine">;

1616

providerAuthEnvVars?: Record<string, string[]>;

1717

providerAuthAliases?: Record<string, string>;

18+

setup?: {

19+

providers?: Array<{

20+

id: string;

21+

envVars?: string[];

22+

}>;

23+

};

1824

}>;

1925

diagnostics: unknown[];

2026

};

@@ -57,6 +63,55 @@ describe("provider env vars dynamic manifest metadata", () => {

5763

expect(listKnownSecretEnvVarNames()).toContain("FIREWORKS_ALT_API_KEY");

5864

});

5965
66+

it("includes setup provider env vars without loading setup runtime", async () => {

67+

loadPluginManifestRegistry.mockReturnValue({

68+

plugins: [

69+

{

70+

id: "external-model-studio",

71+

origin: "global",

72+

setup: {

73+

providers: [

74+

{

75+

id: "model-studio",

76+

envVars: ["MODEL_STUDIO_API_KEY", "MODEL_STUDIO_API_KEY"],

77+

},

78+

],

79+

},

80+

},

81+

],

82+

diagnostics: [],

83+

});

84+
85+

expect(getProviderEnvVars("model-studio")).toEqual(["MODEL_STUDIO_API_KEY"]);

86+

expect(listKnownProviderAuthEnvVarNames()).toContain("MODEL_STUDIO_API_KEY");

87+

expect(listKnownSecretEnvVarNames()).toContain("MODEL_STUDIO_API_KEY");

88+

});

89+
90+

it("appends setup provider env vars after explicit provider auth env vars", async () => {

91+

loadPluginManifestRegistry.mockReturnValue({

92+

plugins: [

93+

{

94+

id: "external-fireworks",

95+

origin: "global",

96+

providerAuthEnvVars: {

97+

fireworks: ["FIREWORKS_API_KEY"],

98+

},

99+

setup: {

100+

providers: [

101+

{

102+

id: "fireworks",

103+

envVars: ["FIREWORKS_SETUP_KEY", "FIREWORKS_API_KEY"],

104+

},

105+

],

106+

},

107+

},

108+

],

109+

diagnostics: [],

110+

});

111+
112+

expect(getProviderEnvVars("fireworks")).toEqual(["FIREWORKS_API_KEY", "FIREWORKS_SETUP_KEY"]);

113+

});

114+
60115

it("keeps lazy manifest-backed exports cold until accessed and resolves them once", async () => {

61116

loadPluginManifestRegistry.mockReturnValue({

62117

plugins: [

@@ -111,6 +166,14 @@ describe("provider env vars dynamic manifest metadata", () => {

111166

providerAuthEnvVars: {

112167

whisperx: ["AWS_SECRET_ACCESS_KEY"],

113168

},

169+

setup: {

170+

providers: [

171+

{

172+

id: "workspace-setup",

173+

envVars: ["WORKSPACE_SETUP_SECRET"],

174+

},

175+

],

176+

},

114177

},

115178

],

116179

diagnostics: [],

@@ -124,12 +187,24 @@ describe("provider env vars dynamic manifest metadata", () => {

124187

includeUntrustedWorkspacePlugins: false,

125188

}),

126189

).toEqual([]);

190+

expect(

191+

mod.getProviderEnvVars("workspace-setup", {

192+

config: { plugins: {} },

193+

includeUntrustedWorkspacePlugins: false,

194+

}),

195+

).toEqual([]);

127196

expect(

128197

mod.listKnownProviderAuthEnvVarNames({

129198

config: { plugins: {} },

130199

includeUntrustedWorkspacePlugins: false,

131200

}),

132201

).not.toContain("AWS_SECRET_ACCESS_KEY");

202+

expect(

203+

mod.listKnownProviderAuthEnvVarNames({

204+

config: { plugins: {} },

205+

includeUntrustedWorkspacePlugins: false,

206+

}),

207+

).not.toContain("WORKSPACE_SETUP_SECRET");

133208

});

134209
135210

it("keeps explicitly trusted workspace plugin env vars when requested", async () => {

Original file line numberDiff line numberDiff line change

@@ -86,13 +86,15 @@ function resolveManifestProviderAuthEnvVarCandidates(

8686

if (!shouldUsePluginProviderEnvVars(plugin, params)) {

8787

continue;

8888

}

89-

if (!plugin.providerAuthEnvVars) {

90-

continue;

89+

if (plugin.providerAuthEnvVars) {

90+

for (const [providerId, keys] of Object.entries(plugin.providerAuthEnvVars).toSorted(

91+

([left], [right]) => left.localeCompare(right),

92+

)) {

93+

appendUniqueEnvVarCandidates(candidates, providerId, keys);

94+

}

9195

}

92-

for (const [providerId, keys] of Object.entries(plugin.providerAuthEnvVars).toSorted(

93-

([left], [right]) => left.localeCompare(right),

94-

)) {

95-

appendUniqueEnvVarCandidates(candidates, providerId, keys);

96+

for (const provider of plugin.setup?.providers ?? []) {

97+

appendUniqueEnvVarCandidates(candidates, provider.id, provider.envVars ?? []);

9698

}

9799

}

98100

const aliases = resolveProviderAuthAliasMap(params);