import { Sandbox } from "just-bash"; import { HarnessV1NetworkSandboxSession, HarnessV1SandboxProvider, HarnessV1SandboxSessionCreateOptions, HarnessV1SandboxSessionResumeOptions } from "@ai-sdk/harness"; import { Experimental_SandboxSession } from "@ai-sdk/provider-utils"; //#region src/just-bash-legacy-sandbox-provider.d.ts type JustBashSandboxCreateParams$1 = NonNullable[0]>; type JustBashCreationSettings$1 = JustBashSandboxCreateParams$1 & { sandbox?: never; }; /** * Settings for `createJustBashSandbox`. Two mutually-exclusive shapes: * * - `{ sandbox }` — wrap an already-created `just-bash` `Sandbox`. The caller * owns its lifecycle. * - {@link JustBashSandboxCreateParams} fields — provider calls * `Sandbox.create(settings)` on every `createSession()`. * * just-bash has no port exposure and no snapshot mechanism, so image * management is a per-call no-op: if an adapter declares a bootstrap recipe * the provider runs it once on the freshly-created sandbox before returning. * * @deprecated Use `JustBashNetworkSandboxSessionCreateOptions` for new sessions. */ type JustBashSandboxSettings = { sandbox: Sandbox; } | JustBashCreationSettings$1; /** @deprecated Use `createJustBashNetworkSandboxSession` instead. */ export declare function createJustBashSandbox(settings?: JustBashSandboxSettings): HarnessV1SandboxProvider; /** * `HarnessV1SandboxProvider` implementation backed by `just-bash`. Useful for * non-bridge harness flows and for handing a local `Experimental_SandboxSession` * to AI SDK tools — use `provider.createSession()` then * `sandboxSession.restricted()` to get the latter. * * Note: just-bash cannot expose ports, so bridge-backed harness adapters * (claude-code, codex) will reject this provider at start. */ /** @deprecated Use `createJustBashNetworkSandboxSession` instead. */ export declare class JustBashSandboxProvider implements HarnessV1SandboxProvider { private readonly settings; readonly specificationVersion: "harness-sandbox-v1"; readonly providerId = "just-bash-sandbox"; constructor(settings: JustBashSandboxSettings); createSession: (options?: { sessionId?: string; abortSignal?: AbortSignal; identity?: string; onFirstCreate?: (session: Experimental_SandboxSession, opts: { abortSignal?: AbortSignal; }) => Promise; }) => Promise; } //#endregion //#region src/just-bash-sandbox.d.ts /** * Flattens an intersection of object types into a single object type so the * resolved shape displays as its named properties rather than a chain of * `A & B & C`. */ type Prettify = { [K in keyof T]: T[K]; } & {}; type JustBashNativeSandboxSession = Sandbox; /** * Parameters forwarded to `just-bash`'s `Sandbox.create` when creating a * sandbox from scratch. Aliased directly from the underlying SDK so the full * surface is available without us re-declaring it. */ type JustBashSandboxCreateParams = NonNullable[0]>; type JustBashCreationSettings = Omit; type JustBashNetworkSandboxSessionCreateOptions = Prettify & { sandbox?: never; }>; type JustBashLookupSettings = Record; type JustBashNetworkSandboxSessionResumeOptions = Prettify>; export declare function createJustBashNetworkSandboxSession(options?: JustBashNetworkSandboxSessionCreateOptions): Promise; export declare function resumeJustBashNetworkSandboxSession(options: JustBashNetworkSandboxSessionResumeOptions): Promise; export declare function createJustBashSandboxSessionFromNativeSandbox(nativeSandbox: JustBashNativeSandboxSession): Experimental_SandboxSession; export declare function createJustBashNetworkSandboxSessionFromNativeSandbox(nativeSandbox: JustBashNativeSandboxSession): HarnessV1NetworkSandboxSession; //#endregion export type { JustBashNativeSandboxSession, JustBashNetworkSandboxSessionCreateOptions, JustBashNetworkSandboxSessionResumeOptions, JustBashSandboxSettings }; //# sourceMappingURL=index.d.ts.map