@fastgpt-sdk/sandbox-adapter 0.0.33 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import type { Endpoint, ExecuteOptions, ExecuteResult, SandboxId, SandboxInfo, SandboxMetrics, StreamHandlers } from '@/types';
1
+ import type { Endpoint, ExecuteOptions, ExecuteResult, FileWriteEntry, FileWriteResult, SandboxId, SandboxInfo, SandboxMetrics, StreamHandlers } from '@/types';
2
2
  import { BaseSandboxAdapter } from '../BaseSandboxAdapter';
3
3
  import type { OpenSandboxConfigType } from './type';
4
4
  export type { OpenSandboxConfigType } from './type';
@@ -51,13 +51,13 @@ export interface OpenSandboxConnectionConfig {
51
51
  */
52
52
  export declare class OpenSandboxAdapter extends BaseSandboxAdapter {
53
53
  private connectionConfig;
54
- private createConfig;
54
+ private createConfig?;
55
55
  readonly provider: "opensandbox";
56
56
  readonly runtime: SandboxRuntimeType;
57
57
  private _sandbox?;
58
58
  private _connection;
59
59
  private _id?;
60
- constructor(connectionConfig: OpenSandboxConnectionConfig, createConfig: OpenSandboxConfigType);
60
+ constructor(connectionConfig: OpenSandboxConnectionConfig, createConfig?: OpenSandboxConfigType | undefined);
61
61
  get rootPath(): string;
62
62
  get id(): SandboxId | undefined;
63
63
  private set sandbox(value);
@@ -92,6 +92,7 @@ export declare class OpenSandboxAdapter extends BaseSandboxAdapter {
92
92
  getEndpoint(port: number): Promise<Endpoint>;
93
93
  getInfo(): Promise<SandboxInfo | null>;
94
94
  renewExpiration(additionalSeconds: number): Promise<void>;
95
+ writeFiles(entries: FileWriteEntry[]): Promise<FileWriteResult[]>;
95
96
  execute(command: string, options?: ExecuteOptions): Promise<ExecuteResult>;
96
97
  executeStream(command: string, handlers: StreamHandlers, options?: ExecuteOptions): Promise<void>;
97
98
  executeBackground(command: string, options?: ExecuteOptions): Promise<{
@@ -1,5 +1,5 @@
1
1
  import { ImageSpec, NetworkPolicy, ResourceLimits } from '@/types';
2
- import type { Volume } from '../../../opensandbox';
2
+ import type { Volume } from '@alibaba-group/opensandbox';
3
3
  /**
4
4
  * Configuration for creating a sandbox.
5
5
  */
@@ -6,7 +6,7 @@ export { SealosDevboxAdapter } from './SealosDevboxAdapter';
6
6
  export type { SealosDevboxConfig } from './SealosDevboxAdapter';
7
7
  export { OpenSandboxAdapter } from './OpenSandboxAdapter';
8
8
  export type { OpenSandboxConfigType, OpenSandboxConnectionConfig } from './OpenSandboxAdapter';
9
- export type { Volume as OpenSandboxVolume } from '../../opensandbox';
9
+ export type { Volume as OpenSandboxVolume } from '@alibaba-group/opensandbox';
10
10
  export { E2BAdapter } from './E2BAdapter';
11
11
  export type { E2BConfig } from './E2BAdapter';
12
12
  export type SandboxProviderType = 'opensandbox' | 'sealosdevbox' | 'e2b';