fix(wsl): forward scrub-safe pane identity into WSL (#31205)

Forward the scrub-safe pane identity aliases (ORCA_AGENT_PANE, ORCA_AGENT_LAUNCH) into WSL via WSLENV so hooks inside WSL (DSH, Claude scrub restore, Hermes) can report to the right pane.
This commit is contained in:
denchu
2026-10-24 19:13:00 -07:00
committed by GitHub
parent 3c80fb1193
commit 672ee2c53e
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -87,9 +87,11 @@ describe('addOrcaWslInteropEnv', () => {
ORCA_OMP_STATUS_EXTENSION: 'C:\\Users\\jin\\.omp\\agent\\extensions\\orca-agent-status.ts',
ORCA_PRIME_AGENT_STATUS_EXTENSION: 'C:\\stale\\orca-agent-status.ts',
ORCA_PANE_KEY: 'tab-1:leaf-1',
ORCA_AGENT_PANE: 'tab-1:leaf-1',
ORCA_TAB_ID: 'tab-1',
ORCA_WORKTREE_ID: 'repo::\\\\wsl.localhost\\Ubuntu\\home\\jin\\repo',
ORCA_AGENT_LAUNCH_TOKEN: 'launch-secret',
ORCA_AGENT_LAUNCH: 'launch-secret',
ORCA_OPENCODE_AGENT: 'opencode2',
ORCA_AGENT_HOOK_PORT: '4567',
ORCA_AGENT_HOOK_TOKEN: 'token',
@@ -117,9 +119,11 @@ describe('addOrcaWslInteropEnv', () => {
expect(env.WSLENV).toContain('ORCA_OMP_FRESH_CONFIG/p')
expect(env.WSLENV).not.toContain('ORCA_PRIME_AGENT_STATUS_EXTENSION')
expect(env.WSLENV).toContain('ORCA_PANE_KEY/u')
expect(env.WSLENV).toContain('ORCA_AGENT_PANE/u')
expect(env.WSLENV).toContain('ORCA_TAB_ID/u')
expect(env.WSLENV).toContain('ORCA_WORKTREE_ID/u')
expect(env.WSLENV).toContain('ORCA_AGENT_LAUNCH_TOKEN/u')
expect(env.WSLENV).toContain('ORCA_AGENT_LAUNCH/u')
expect(env.WSLENV).toContain('ORCA_OPENCODE_AGENT/u')
expect(env.WSLENV).toContain('ORCA_AGENT_HOOK_PORT/u')
expect(env.WSLENV).toContain('ORCA_AGENT_HOOK_TOKEN/u')
+6
View File
@@ -1,3 +1,7 @@
import {
ORCA_SCRUB_SAFE_PANE_ENV,
ORCA_SCRUB_SAFE_LAUNCH_ENV
} from '../../shared/agent-hook-scrub-safe-env'
import {
ORCHESTRATION_COMPATIBILITY_ATTACHMENT_ENV,
ORCHESTRATION_COMPATIBILITY_HOST_ID_ENV,
@@ -90,11 +94,13 @@ export function addOrcaWslInteropEnv(env: Record<string, string>): void {
'ORCA_CODEX_LAUNCH_PREFLIGHT/p',
'ORCA_CODEX_ISOLATE/u',
'ORCA_PANE_KEY/u',
`${ORCA_SCRUB_SAFE_PANE_ENV}/u`,
'ORCA_TAB_ID/u',
'ORCA_WORKTREE_ID/u',
// An id, never a path; agent wrappers and the guest CLI read it like ORCA_WORKTREE_ID.
'ORCA_WORKSPACE_ID/u',
'ORCA_AGENT_LAUNCH_TOKEN/u',
`${ORCA_SCRUB_SAFE_LAUNCH_ENV}/u`,
// The guest plugin uses this marker to select the OpenCode variant that
// owns the pane when both native and WSL installations are present.
'ORCA_OPENCODE_AGENT/u',