Cotal TypeScript packages
    Preparing search index...

    Interface LocalProcess

    A workstation process provider. Legacy providers record custody under a mesh root; a controllerOnly service uses the protected service instance store instead. Metadata is cached at install time, without executable hooks. Legacy status/down never import package code. A legacy extension process claims its pidfile with exclusive create; removal reserves that path. Controller-only providers use service launch intents and instance-based removal guards.

    interface LocalProcess {
        abandonServiceStop?: (
            context: ServiceAdapterContext & {
                process: ProcessIdentityRecord;
                requestId: string;
            },
        ) => ServiceAdapterStopAbandonment;
        aliases?: readonly string[];
        artifacts?: readonly string[];
        buildServiceLaunch?: (
            context: ServiceAdapterContext,
        ) => ServiceAdapterLaunch | Promise<ServiceAdapterLaunch>;
        checkServiceReadiness?: (
            context: ServiceAdapterContext & {
                process: ProcessIdentityRecord;
                signal: AbortSignal;
            },
        ) => Promise<ServiceAdapterReadiness>;
        clearsMesh?: boolean;
        controllerOnly?: true;
        cooperativeStop?: boolean;
        isOwnCommand?: (command: string) => boolean;
        kind: "local-process";
        label: string;
        name: string;
        observeKernelStop?: (
            context: ServiceAdapterContext & { process: ProcessIdentityRecord },
        ) => "ports-file-removed" | "ports-file-retained";
        order?: number;
        pidFile: string;
        prepareKernelStop?: (
            context: ServiceAdapterKernelStopContext,
        ) => Promise<ServiceAdapterKernelStopPlan>;
        prepareServiceStop?: (
            context: ServiceAdapterStopContext,
        ) => Promise<ServiceAdapterStopPlan>;
        service?: ServiceAdapterDeclaration;
        settleServiceStop?: (
            context: ServiceAdapterContext & {
                process: ProcessIdentityRecord;
                requestId: string;
            },
        ) => ServiceAdapterStopResult
        | ServiceAdapterStopRefusal
        | undefined;
        stopLast?: boolean;
        stopService?: (
            context: ServiceAdapterContext & {
                preserved?: ServiceAdapterPreservedStop;
                process: ProcessIdentityRecord;
                signal: AbortSignal;
                withAgents: boolean;
            } & { plan: ServiceAdapterStopPlan; requestId: string },
        ) => Promise<ServiceAdapterStopResult>;
        visibleWhen?: "user-auth";
    }

    Hierarchy (View Summary)

    Index
    abandonServiceStop?: (
        context: ServiceAdapterContext & {
            process: ProcessIdentityRecord;
            requestId: string;
        },
    ) => ServiceAdapterStopAbandonment

    An operator's abandon of a native stop request no receipt settles. Only once its exact process and the stopper that published it have both exited, this releases the reservation, removes the request and anything else that request armed, and returns the abandonment. Otherwise it throws a refusal and changes nothing.

    aliases?: readonly string[]

    Other names that resolve to this extension within its kind. A name or alias already claimed in the kind is refused at registration, so resolution never depends on load order.

    artifacts?: readonly string[]

    Files removed only after the process is confirmed gone. Same template rules as pidFile.

    buildServiceLaunch?: (
        context: ServiceAdapterContext,
    ) => ServiceAdapterLaunch | Promise<ServiceAdapterLaunch>
    checkServiceReadiness?: (
        context: ServiceAdapterContext & {
            process: ProcessIdentityRecord;
            signal: AbortSignal;
        },
    ) => Promise<ServiceAdapterReadiness>
    clearsMesh?: boolean

    Removing this process also clears transient run state and the machine mesh registry entry.

    controllerOnly?: true

    Controller records only. Legacy PID inventory/down must not interpret pidFile as custody.

    cooperativeStop?: boolean

    Windows stops use the process-bound local control capability instead of forceful SIGTERM.

    isOwnCommand?: (command: string) => boolean

    Whether a live process's command line is this process's. A stop consults it once, and only for a record with no identity pin: a pin that names another start refuses first and keeps the record, for every component. When this rejects a readable command, the stop never signals that pid. The record outlived its process and the pid was reused, so the stale record is cleared. A function cannot be cached for an installed extension, so only this CLI's own processes set it.

    kind: "local-process"
    label: string
    name: string
    observeKernelStop?: (
        context: ServiceAdapterContext & { process: ProcessIdentityRecord },
    ) => "ports-file-removed" | "ports-file-retained"

    After the exact process exit, report only the broker's own launch-bound shutdown trace.

    order?: number

    Lower orders stop first; the broker should remain last so dependants can shut down cleanly.

    pidFile: string

    Path relative to <root>/.cotal; {space} expands to the injective hex space key (spaceKey — case-safe, so two case-differing spaces can never share a pid/log file).

    prepareKernelStop?: (
        context: ServiceAdapterKernelStopContext,
    ) => Promise<ServiceAdapterKernelStopPlan>

    Kernel-exit stop scope: the exact binding and every dependant guard, rechecked at effect.

    prepareServiceStop?: (
        context: ServiceAdapterStopContext,
    ) => Promise<ServiceAdapterStopPlan>

    Optional service ABI. Cached declarations contain no executable hooks or native grants.

    settleServiceStop?: (
        context: ServiceAdapterContext & {
            process: ProcessIdentityRecord;
            requestId: string;
        },
    ) => ServiceAdapterStopResult
    | ServiceAdapterStopRefusal
    | undefined

    A native stop request that outlived its stopService call. Returns the same returned result once this adapter's own completed receipt for requestId and the exact process exit are both on record, or the refusal once the child's refused receipt is its only one and the request is removed. Either answer comes after releasing the reservation that request took. Undefined retains both.

    stopLast?: boolean

    Refuse selective shutdown while any unselected registered process is still live.

    stopService?: (
        context: ServiceAdapterContext & {
            preserved?: ServiceAdapterPreservedStop;
            process: ProcessIdentityRecord;
            signal: AbortSignal;
            withAgents: boolean;
        } & { plan: ServiceAdapterStopPlan; requestId: string },
    ) => Promise<ServiceAdapterStopResult>
    visibleWhen?: "user-auth"

    Hide this process from status unless the selected mesh uses per-user auth.