fix(server): honor explicit provider runtime env overrides

Restore runtime controls only from configured provider env, while preserving inherited and session filtering. Carry finalized provider environments through spawn boundaries so a second scrub cannot drop explicit settings.

Cover configured controls across ACP launches and OpenCode V2 reconnect/resume, including both environment-builder consumer paths. Keep parent-session and inherited control filtering checks, and identify Pi/OMP Node RPC fixture coverage accurately.
This commit is contained in:
Okan YILDIRIM
2026-11-02 15:01:51 +00:00
committed by paseo-bot[bot]
parent 8018231a00
commit 2857aeb13d
14 changed files with 199 additions and 39 deletions
+2 -1
View File
@@ -493,7 +493,8 @@ export default function contribute(server: PluginServerContext) {
Declare `command: ["agent", "serve"]` when your provider launches an executable. The daemon applies
`agents.providers.<id>.command` and `env`, resolves the executable against the effective PATH, and
removes parent-session and daemon-control environment variables. `connect({ launch })` receives
removes parent-session variables and inherited/session daemon-control values; explicitly configured
provider env survives. `connect({ launch })` receives
`{ command, args, env }`: an executable path, effective arguments, and the complete sanitized
environment. Spawn with those values; do not merge the plugin process's environment back in.
The launch travels as data through the same provider protocol for built-in and subprocess plugins.