Skip to content

Documentation / @agentick/sandbox / SandboxAccessError

Class: SandboxAccessError ​

Defined in: errors.ts:9

Sandbox Access Error

Thrown when a file operation targets a path outside the sandbox workspace and allowed mounts. Carries metadata for upstream recovery (confirmation prompt → mount/allow → retry).

Extends ​

  • Error

Constructors ​

Constructor ​

new SandboxAccessError(requestedPath, resolvedPath, mode): SandboxAccessError

Defined in: errors.ts:12

Parameters ​

requestedPath ​

string

resolvedPath ​

string

mode ​

"read" | "write"

Returns ​

SandboxAccessError

Overrides ​

Error.constructor

Properties ​

mode ​

readonly mode: "read" | "write"

Defined in: errors.ts:15


name ​

readonly name: "SandboxAccessError" = "SandboxAccessError"

Defined in: errors.ts:10

Overrides ​

Error.name


recover()? ​

optional recover: (always) => Promise<void | () => void>

Defined in: errors.ts:25

Attached by the sandbox implementation after catching. Adds a mount for the parent directory of the resolved path. Returns a cleanup function if the allow is temporary (!always).

Parameters ​

always ​

boolean

Returns ​

Promise<void | () => void>


requestedPath ​

readonly requestedPath: string

Defined in: errors.ts:13


resolvedPath ​

readonly resolvedPath: string

Defined in: errors.ts:14

Released under the ISC License.