agentOS API Reference - v0.2.0-rc.3
    Preparing search index...

    Type Alias AgentOsActions

    The agentOS VM actor's action map. Keep one method per Rust dispatch arm.

    Declared as a type (not interface) so it satisfies RivetKit's Actions<…> constraint, which expects an implicit string index signature.

    type AgentOsActions = {
        allProcesses: (c: Ctx) => Promise<defineSoftware[]>;
        cancelCronJob: (c: Ctx, id: string) => Promise<void>;
        closeProcessStdin: (c: Ctx, pid: number) => Promise<void>;
        closeSession: (c: Ctx, sessionId: string) => Promise<void>;
        createSession: (
            c: Ctx,
            agentType: string,
            options?: CreateSessionOptions,
        ) => Promise<string>;
        createSignedPreviewUrl: (
            c: Ctx,
            port: number,
            ttlSeconds: number,
        ) => Promise<SignedPreviewUrl>;
        deleteFile: (
            c: Ctx,
            path: string,
            options?: { recursive?: boolean },
        ) => Promise<void>;
        exec: (c: Ctx, command: string) => Promise<defineSoftware>;
        exists: (c: Ctx, path: string) => Promise<boolean>;
        expireSignedPreviewUrl: (c: Ctx, token: string) => Promise<void>;
        getProcess: (c: Ctx, pid: number) => Promise<defineSoftware>;
        getSessionEvents: (
            c: Ctx,
            sessionId: string,
        ) => Promise<PersistedSessionEvent[]>;
        killProcess: (c: Ctx, pid: number) => Promise<void>;
        listCronJobs: (c: Ctx) => Promise<SerializableCronJobInfo[]>;
        listMounts: (c: Ctx) => Promise<MountInfo[]>;
        listPersistedSessions: (c: Ctx) => Promise<PersistedSessionRecord[]>;
        listProcesses: (c: Ctx) => Promise<defineSoftware[]>;
        listSoftware: (c: Ctx) => Promise<SoftwareInfo[]>;
        mkdir: (c: Ctx, path: string) => Promise<void>;
        move: (c: Ctx, from: string, to: string) => Promise<void>;
        processTree: (c: Ctx) => Promise<defineSoftware[]>;
        readdir: (c: Ctx, path: string) => Promise<DirEntry[]>;
        readdirRecursive: (c: Ctx, path: string) => Promise<DirEntry[]>;
        readFile: (c: Ctx, path: string) => Promise<Uint8Array>;
        readFiles: (c: Ctx, paths: string[]) => Promise<ReadFileResult[]>;
        scheduleCron: (
            c: Ctx,
            options: SerializableCronJobOptions,
        ) => Promise<ScheduledCronJob>;
        sendPrompt: (
            c: Ctx,
            sessionId: string,
            text: string,
        ) => Promise<PromptResult>;
        spawn: (c: Ctx, command: string, args: string[]) => Promise<SpawnedProcess>;
        stat: (c: Ctx, path: string) => Promise<defineSoftware>;
        stopProcess: (c: Ctx, pid: number) => Promise<void>;
        vmFetch: (
            c: Ctx,
            port: number,
            url: string,
            options?: VmFetchOptions,
        ) => Promise<VmFetchResponse>;
        waitProcess: (c: Ctx, pid: number) => Promise<number>;
        writeFile: (
            c: Ctx,
            path: string,
            content: string | Uint8Array,
        ) => Promise<void>;
        writeFiles: (
            c: Ctx,
            entries: { content: string | Uint8Array; path: string }[],
        ) => Promise<WriteFileResult[]>;
        writeProcessStdin: (
            c: Ctx,
            pid: number,
            data: string | Uint8Array,
        ) => Promise<void>;
    }
    Index

    Properties

    allProcesses: (c: Ctx) => Promise<defineSoftware[]>
    cancelCronJob: (c: Ctx, id: string) => Promise<void>
    closeProcessStdin: (c: Ctx, pid: number) => Promise<void>
    closeSession: (c: Ctx, sessionId: string) => Promise<void>
    createSession: (
        c: Ctx,
        agentType: string,
        options?: CreateSessionOptions,
    ) => Promise<string>
    createSignedPreviewUrl: (
        c: Ctx,
        port: number,
        ttlSeconds: number,
    ) => Promise<SignedPreviewUrl>
    deleteFile: (
        c: Ctx,
        path: string,
        options?: { recursive?: boolean },
    ) => Promise<void>
    exec: (c: Ctx, command: string) => Promise<defineSoftware>
    exists: (c: Ctx, path: string) => Promise<boolean>
    expireSignedPreviewUrl: (c: Ctx, token: string) => Promise<void>
    getProcess: (c: Ctx, pid: number) => Promise<defineSoftware>
    getSessionEvents: (
        c: Ctx,
        sessionId: string,
    ) => Promise<PersistedSessionEvent[]>
    killProcess: (c: Ctx, pid: number) => Promise<void>
    listCronJobs: (c: Ctx) => Promise<SerializableCronJobInfo[]>
    listMounts: (c: Ctx) => Promise<MountInfo[]>
    listPersistedSessions: (c: Ctx) => Promise<PersistedSessionRecord[]>
    listProcesses: (c: Ctx) => Promise<defineSoftware[]>
    listSoftware: (c: Ctx) => Promise<SoftwareInfo[]>
    mkdir: (c: Ctx, path: string) => Promise<void>
    move: (c: Ctx, from: string, to: string) => Promise<void>
    processTree: (c: Ctx) => Promise<defineSoftware[]>
    readdir: (c: Ctx, path: string) => Promise<DirEntry[]>
    readdirRecursive: (c: Ctx, path: string) => Promise<DirEntry[]>
    readFile: (c: Ctx, path: string) => Promise<Uint8Array>
    readFiles: (c: Ctx, paths: string[]) => Promise<ReadFileResult[]>
    scheduleCron: (
        c: Ctx,
        options: SerializableCronJobOptions,
    ) => Promise<ScheduledCronJob>
    sendPrompt: (c: Ctx, sessionId: string, text: string) => Promise<PromptResult>
    spawn: (c: Ctx, command: string, args: string[]) => Promise<SpawnedProcess>
    stat: (c: Ctx, path: string) => Promise<defineSoftware>
    stopProcess: (c: Ctx, pid: number) => Promise<void>
    vmFetch: (
        c: Ctx,
        port: number,
        url: string,
        options?: VmFetchOptions,
    ) => Promise<VmFetchResponse>
    waitProcess: (c: Ctx, pid: number) => Promise<number>
    writeFile: (c: Ctx, path: string, content: string | Uint8Array) => Promise<void>
    writeFiles: (
        c: Ctx,
        entries: { content: string | Uint8Array; path: string }[],
    ) => Promise<WriteFileResult[]>
    writeProcessStdin: (
        c: Ctx,
        pid: number,
        data: string | Uint8Array,
    ) => Promise<void>