/** * tm layer — the host `$` shell bridge + shell error hygiene. Split out of * the former tools.ts hub. */ /** * Run a command through the host `$` bridge. The REAL host `$` is a * Bun-shell tagged template (probed keys: Shell/ShellPromise/ShellError/ * braces/escape) — both `$(["cmd"])` and `$("cmd")` are rejected with * "Please use '$' as a tagged template function", which failed every * tm_bash call at phase=execute. A tagged-template call desugars to * `$(Object.assign([command], { raw: [command] }))` — tester-verified OK on * the real host — so that shape goes FIRST; the legacy call shapes stay as * fallbacks for other hosts and the test fakes (which only need *some* * call to return `{text}`). Returns stdout text. * * `cwd` (fix batch T3): the workspace root the command is pinned to — the * platform-shell fallback inherits the HOST process cwd without it (the * user HOME on the desktop sidecar), so relative paths in commands * resolved outside the workspace. */ export declare function runShellCommand($: unknown, command: string, cwd?: string): Promise; /** Strip ANSI + empty-line noise, cap length, best-effort line number. */ export declare function cleanShellError(err: unknown): { message: string; line?: number; }; /** * Spawn the platform shell directly. `cwd` pins the command to the * workspace root (fix batch T3/C3): without it the child inherits the HOST * process cwd — the user HOME on the desktop sidecar — so every relative * path in a command resolved against the wrong directory. A spawn failure * names the cwd explicitly; there is no silent fallback to another cwd. */ export declare function spawnShellFallback(command: string, cwd?: string): Promise; //# sourceMappingURL=shell-bridge.d.ts.map