UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

33 lines • 1.47 kB
import type { WorkerLaunchClient } from "./worker-launch.ts"; interface BunSubprocess { readonly pid: number; readonly exited: Promise<number>; readonly stdin?: { write(chunk: string): unknown; end(): unknown; flush?(): unknown; } | number | null; } interface BunSpawnOptions { readonly cmd?: readonly string[]; readonly stdin?: unknown; readonly detached?: boolean; readonly [key: string]: unknown; } export interface BunLaunchGlobals { spawn(commandOrOptions: readonly string[] | BunSpawnOptions, options?: BunSpawnOptions): BunSubprocess; spawnSync(commandOrOptions: readonly string[] | BunSpawnOptions, options?: BunSpawnOptions): { readonly exitCode: number | null; }; $: (strings: TemplateStringsArray, ...values: unknown[]) => unknown; } /** Runs `fn` with the gated Bun launch globals passing straight through to the real ones. */ export type BunGateBypass = <T>(fn: () => T) => T; /** * Gates the Bun launch globals and returns the bypass the gated `child_process` runs its real calls in: in Bun, * `node:child_process` launches through `Bun.spawn`, and that launch is already gated (ack, proof, record, shim) by * the outer call - gating it again would record it twice and wrap the command in a second go-line shim. */ export declare function installGatedBun(bun: BunLaunchGlobals, client: WorkerLaunchClient): BunGateBypass; export {}; //# sourceMappingURL=gated-bun.d.ts.map