UNPKG

@openai/agents-core

Version:

The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.

30 lines (29 loc) • 1.07 kB
import { type SandboxPathGrant, type SandboxPathGrantInit } from './pathGrants'; export type WorkspacePathPolicyOptions = { root: string; extraPathGrants?: SandboxPathGrantInit[]; }; export type ResolveSandboxPathOptions = { forWrite?: boolean; }; export type ResolvedSandboxPath = { path: string; workspaceRelativePath?: string; grant?: SandboxPathGrant; }; export declare class SandboxWorkspaceScope { readonly cwd?: string; constructor(cwd?: string); static fromCwd(cwd?: string): SandboxWorkspaceScope; anchor(path?: string): string | undefined; modelResourcePath(workspaceRoot: string, path: string): string; absoluteCwd(workspaceRoot: string): string | undefined; } export declare function normalizeSandboxCwd(cwd: string): string; export declare class WorkspacePathPolicy { readonly root: string; readonly extraPathGrants: SandboxPathGrant[]; constructor(options: WorkspacePathPolicyOptions); resolve(path?: string, options?: ResolveSandboxPathOptions): ResolvedSandboxPath; private matchingGrant; }