mise API - v0.0.0
    Preparing search index...

    Interface Backend

    One backend, as the core sees it.

    interface Backend {
        answerKinds?: readonly AnswerKindLook[];
        completion?: BackendCompletion;
        debug_get?: () => boolean | null;
        debug_set?: (on: boolean) => void;
        elevate?: (
            credentials: ElevationCredentials,
            run: () => Promise<
                {
                    errors?: { message: string; type: "error"
                    | "warning" }[];
                    model?: { data: unknown; kind: string };
                    rendered: string;
                    renderedErr?: string;
                    status: "error" | "ok";
                    trace?: {
                        executed?: string;
                        input: string;
                        proposed: string;
                        validated: boolean;
                    };
                },
            >,
        ) => Promise<
            {
                errors?: { message: string; type: "error"
                | "warning" }[];
                model?: { data: unknown; kind: string };
                rendered: string;
                renderedErr?: string;
                status: "error" | "ok";
                trace?: {
                    executed?: string;
                    input: string;
                    proposed: string;
                    validated: boolean;
                };
            },
        >;
        expectSubjects?: readonly ExpectSubject[];
        fallback?: BackendFallback;
        files?: {
            read: (path: string) => Promise<Buffer<ArrayBufferLike>>;
            stream?: (path: string) => Promise<FileByteStream>;
            write: (path: string, bytes: Buffer) => Promise<void>;
        };
        id: string;
        jobs?: readonly JobSource[];
        lineStatuses?: readonly LineStatusProvider[];
        listingLook?: ListingLook;
        prompt?: (
            last?: PromptLastCommand,
        ) => Promise<
            {
                cwd: string;
                lastCommandDurationMs: number;
                lastExitCode: number;
                pacsserver: string
                | null;
                physicalMode: boolean;
                procIndex?: { feeds: number; jobs: number };
                procWarmup?: {
                    arrived?: number[];
                    feed?: { failed?: string; id: number; loaded: number; total: number };
                    feeds?: { failed?: string; id: number; loaded: number; total: number }[];
                    landed?: {
                        chain: string[];
                        groups: {
                            count: ...;
                            errored: ...;
                            parent: ...;
                            plugin: ...;
                            status: ...;
                        }[];
                        id: number;
                        jobs: number;
                        status: string;
                        title: string;
                    }[];
                    loaded: number;
                    restored?: boolean;
                    roster?: "delta"
                    | "full";
                    state?: "failed" | "cold" | "cached";
                    sweeping?: boolean;
                    total?: number;
                };
                questions?: number;
                segments?: {
                    key: string;
                    label: string;
                    tone: | "path"
                    | "note"
                    | "leader"
                    | "place"
                    | "identity"
                    | "work"
                    | "alert";
                    value: string;
                }[];
                uri: string;
                user: string;
                warmupFailures?: { label: string; message: string }[];
            },
        >;
        references?: readonly ReferenceSource[];
        session: BackendSession;
        tasks?: readonly TaskSource[];
        telemetry?: () => BackendTelemetry;
        verbTakes?: readonly VerbTakes[];
        vfs?: BackendFilesystem;
        watch?: {
            release: (owner: string) => void;
            set: (
                subject: string,
                owner: string,
                on: boolean,
            ) => "live" | "settled" | "stale" | null;
        };
    }
    Index
    answerKinds?: readonly AnswerKindLook[]

    The kinds of row its listings number; they lead the core's (FIL, DIR) wherever kinds are listed.

    completion?: BackendCompletion

    What it adds to completion.

    debug_get?: () => boolean | null

    Whether the backend is debugging (error messages keep their function stamp), or null before it can say.

    debug_set?: (on: boolean) => void

    Turns the backend's debugging on or off.

    elevate?: (
        credentials: ElevationCredentials,
        run: () => Promise<
            {
                errors?: { message: string; type: "error"
                | "warning" }[];
                model?: { data: unknown; kind: string };
                rendered: string;
                renderedErr?: string;
                status: "error" | "ok";
                trace?: {
                    executed?: string;
                    input: string;
                    proposed: string;
                    validated: boolean;
                };
            },
        >,
    ) => Promise<
        {
            errors?: { message: string; type: "error"
            | "warning" }[];
            model?: { data: unknown; kind: string };
            rendered: string;
            renderedErr?: string;
            status: "error" | "ok";
            trace?: {
                executed?: string;
                input: string;
                proposed: string;
                validated: boolean;
            };
        },
    >

    Runs one command with administrator rights (sudo); absent, sudo is refused.

    expectSubjects?: readonly ExpectSubject[]

    What expect can make claims about in this backend's world, beside the core's path.

    fallback?: BackendFallback

    What it does with words the registry does not answer.

    files?: {
        read: (path: string) => Promise<Buffer<ArrayBufferLike>>;
        stream?: (path: string) => Promise<FileByteStream>;
        write: (path: string, bytes: Buffer) => Promise<void>;
    }

    Reads and writes one file's bytes for a surface, at a path the session resolves.

    Type Declaration

    • Readonlyread: (path: string) => Promise<Buffer<ArrayBufferLike>>
    • Optional Readonlystream?: (path: string) => Promise<FileByteStream>

      Opens one file's bytes as a stream, never read whole; absent, a surface is served read's buffer.

    • Readonlywrite: (path: string, bytes: Buffer) => Promise<void>
    id: string

    Stable id naming the backend.

    jobs?: readonly JobSource[]

    The long jobs it hands the core's runner, by kind (core/runner.ts); each is mounted under /proc as a task source.

    lineStatuses?: readonly LineStatusProvider[]

    How play --status reads a line of this backend's verbs against what it keeps.

    listingLook?: ListingLook

    How its listings show: the kinds it lists beside the core's, and how a name is coloured.

    prompt?: (
        last?: PromptLastCommand,
    ) => Promise<
        {
            cwd: string;
            lastCommandDurationMs: number;
            lastExitCode: number;
            pacsserver: string
            | null;
            physicalMode: boolean;
            procIndex?: { feeds: number; jobs: number };
            procWarmup?: {
                arrived?: number[];
                feed?: { failed?: string; id: number; loaded: number; total: number };
                feeds?: { failed?: string; id: number; loaded: number; total: number }[];
                landed?: {
                    chain: string[];
                    groups: {
                        count: ...;
                        errored: ...;
                        parent: ...;
                        plugin: ...;
                        status: ...;
                    }[];
                    id: number;
                    jobs: number;
                    status: string;
                    title: string;
                }[];
                loaded: number;
                restored?: boolean;
                roster?: "delta"
                | "full";
                state?: "failed" | "cold" | "cached";
                sweeping?: boolean;
                total?: number;
            };
            questions?: number;
            segments?: {
                key: string;
                label: string;
                tone: | "path"
                | "note"
                | "leader"
                | "place"
                | "identity"
                | "work"
                | "alert";
                value: string;
            }[];
            uri: string;
            user: string;
            warmupFailures?: { label: string; message: string }[];
        },
    >

    The session facts a prompt shows, in the wire's prompt context.

    references?: readonly ReferenceSource[]

    The ${name} references it answers, beside the core's cwd.

    The session it serves.

    tasks?: readonly TaskSource[]

    Its long-running steps, by kind; the core mounts those that bring no mount of their own under /proc.

    telemetry?: () => BackendTelemetry

    The daemon's heartbeat about the backend's state; read often, so it is cheap.

    verbTakes?: readonly VerbTakes[]

    The kinds its verbs take by index, and those it adds to the core's verbs.

    Its filesystem; absent, the session has only the core's own mounts.

    watch?: {
        release: (owner: string) => void;
        set: (
            subject: string,
            owner: string,
            on: boolean,
        ) => "live" | "settled" | "stale" | null;
    }

    Watches a subject a surface named (ChRIS: a feed's jobs), on behalf of an owner.