Skip to content

Commit 320cf75

Browse files
committed
refactor(sandbox-blaxel): tighten public API surface and SDK config typing
Drop the `SandboxCreateConfiguration` re-export from index.ts. It was unnecessary (BlaxelSandboxConfig already extends it, so consumers get the full SDK shape transitively) and inconsistent with sandbox-daytona and sandbox-e2b, which don't re-export their SDK config types. Consumers who genuinely need the raw SDK type can import it directly from `@blaxel/core`. Annotate `getSdkConfig` with an explicit return type (`Omit<BlaxelSandboxConfig, voltagent-extras>`) so the SDK contract is declared at the function boundary and typos in the omit list become a type error instead of a silent runtime no-op.
1 parent 57b160a commit 320cf75

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎packages/sandbox-blaxel/src/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export type { SandboxCreateConfiguration } from "@blaxel/core";
21
export { BlaxelSandbox } from "./sandbox";
32
export type {
43
BlaxelSandboxConfig,

‎packages/sandbox-blaxel/src/sandbox.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,10 @@ export class BlaxelSandbox implements WorkspaceSandbox {
359359
* `this.config` with voltagent-specific extras stripped — what gets
360360
* forwarded to `SandboxInstance.createIfNotExists()`.
361361
*/
362-
private getSdkConfig() {
362+
private getSdkConfig(): Omit<
363+
BlaxelSandboxConfig,
364+
"cwd" | "defaultTimeoutMs" | "maxOutputBytes" | "pollIntervalMs"
365+
> {
363366
return omit(this.config ?? {}, ["cwd", "defaultTimeoutMs", "maxOutputBytes", "pollIntervalMs"]);
364367
}
365368
}

0 commit comments

Comments
 (0)