Versions in this module Expand all Collapse all v0 v0.5.0 Nov 21, 2026 v0.4.1 Nov 21, 2026 v0.4.0 Nov 21, 2026 Changes in this version + const MaxCallStackDepth type OpTrace + StartMs int64 + Wave int v0.3.0 Nov 21, 2026 Changes in this version type ExecutionEnv + ExecID string v0.2.0 Nov 21, 2026 Changes in this version + const DefaultMaxOps + const DefaultTimeout + const KindAmbiguous + const KindBadArgs + const KindCmdFailed + const KindDenied + const KindError + const KindNeedsApproval + const KindNoMatch + const KindNotFound + const KindTimeout + const MaxLogBytes + const MaxLogEntries + const MaxTimeout + func EffectiveDefaultTimeout() time.Duration + func EffectiveMaxTimeout() time.Duration + func IsSideEffectOp(op string) bool + func PublicOpName(capability string) string + type AsyncHostFunc func(ctx context.Context, args []any) (any, error) + type Binder interface + Bind func(env *ExecutionEnv) error + type ExecRequest struct + Code string + Cwd string + MaxOps int + OnOpStart func(capability, target string, seq int) + Payloads map[string]string + Timeout time.Duration + Title string + type ExecResult struct + DurationMs int64 + HasValue bool + Logs []string + Traces []OpTrace + Value any + Warnings []string + func Execute(parentCtx context.Context, req ExecRequest, binders ...Binder) (result *ExecResult, retErr error) + type ExecutionEnv struct + Ctx context.Context + Cwd string + VM *goja.Runtime + func (env *ExecutionEnv) AddWarning(msg string) + func (env *ExecutionEnv) RegisterCleanup(fn func()) + func (env *ExecutionEnv) SetNamespace(ns string, asyncMethods map[string]AsyncHostFunc, ...) error + type ExecutionError struct + DurationMs int64 + Logs []string + Message string + Phase string + TimedOutOps []string + Traces []OpTrace + Warnings []string + func (e *ExecutionError) Error() string + type HostError struct + Data map[string]any + Kind string + Msg string + func NewHostError(kind string, data map[string]any, format string, args ...any) *HostError + func (e *HostError) Error() string + type KindedError interface + Detail func() string + Kind func() string + type OpTrace struct + Bytes int + Capability string + DurationMs int64 + Error string + Kind string + Seq int + Status string + Target string + type OrderedMap struct + Keys []string + Vals []any + type SyncHostFunc func(ctx context.Context, args []any) (any, error)