agentOS API Reference - v0.0.1
    Preparing search index...

    Interface AgentOsActorExtras

    interface AgentOsActorExtras {
        maxDynamicMounts?: number;
        maxLinkedSoftware?: number;
        maxSessionSubscriptions?: number;
        onVmDisposed?: (
            c: ActorContext,
            reason: "sleep" | "destroy" | "error",
        ) => void | Promise<void>;
        onVmStart?: (c: ActorContext, vm: AgentOs) => void | Promise<void>;
        onVmStop?: (
            c: ActorContext,
            vm: AgentOs,
            reason: "sleep" | "destroy" | "error",
        ) => void | Promise<void>;
        preview?: {
            defaultExpiresInSeconds?: number;
            maxActiveTokens?: number;
            maxExpiresInSeconds?: number;
        };
        resolveOptions?: (c: ActorContext) => any;
    }

    Hierarchy (View Summary)

    Index
    maxDynamicMounts?: number

    Maximum durable dynamic mount descriptors per actor. Default: 10,000.

    maxLinkedSoftware?: number

    Maximum durable linked software descriptors per actor. Default: 10,000.

    maxSessionSubscriptions?: number

    Maximum live session event subscriptions per actor VM. Default: 10,000.

    onVmDisposed?: (
        c: ActorContext,
        reason: "sleep" | "destroy" | "error",
    ) => void | Promise<void>

    Clean up host resources after the VM and lazy mount readers close.

    onVmStart?: (c: ActorContext, vm: AgentOs) => void | Promise<void>

    Start long-lived processes after each VM boot. Trusted host code only.

    onVmStop?: (
        c: ActorContext,
        vm: AgentOs,
        reason: "sleep" | "destroy" | "error",
    ) => void | Promise<void>

    Gracefully stop long-lived processes before the VM is disposed.

    preview?: {
        defaultExpiresInSeconds?: number;
        maxActiveTokens?: number;
        maxExpiresInSeconds?: number;
    }
    resolveOptions?: (c: ActorContext) => any

    Resolve trusted VM options from actor state immediately before the VM's first boot. Evaluated once per wake. The actor-owned root filesystem and database cannot be replaced.