feat(FN-3961): propagate taskEnv into agent subprocess sessions

Propagates `taskEnv` (task-scoped environment variables) through the agent session creation pipeline, including executor sessions, spawned child agents, and workflow sessions. The engine's session factory (`agent-session-helpers.ts`), executor, PI agent creation (`pi.ts`), and step session executor

Fusion-Task-Id: FN-3961
This commit is contained in:
Fusion
2026-05-10 21:02:45 -07:00
committed by gsxdsm
parent 2aec3474b0
commit bccc39f741
10 changed files with 178 additions and 17 deletions

View File

@@ -45,13 +45,9 @@ export interface ResolvedSessionOptions extends AgentRuntimeOptions {
/** Optional runtime hint from task/agent configuration */
runtimeHint?: string;
/**
* `beforeSpawnSession` is inherited from {@link AgentRuntimeOptions} — see
* its definition there for the contract. Callers (e.g. the reviewer's
* pause gate) throw from this callback to cancel session creation when
* external state changed during the async setup window. Forwarded
* verbatim to `runtime.createSession()`; the runtime is responsible for
* invoking it at its latest synchronous point before the underlying LLM
* session is instantiated.
* `beforeSpawnSession` and `taskEnv` are inherited from
* {@link AgentRuntimeOptions}. Both are forwarded verbatim to
* `runtime.createSession()`.
*/
}