Arcane OS Docs Development only

Reference

Arcane.session.logout()

Requests logout of the current host operating-system session. This is not an Arcane-only application exit, and acceptance does not prove logout completed. Shell-only; requires session.control.

  • Reference

This focused page is derived from the mechanically checked full member inventory.

Syntax

Arcane.session.logout()

Parameters

None

Return value

Promise<{requested:true, accepted:true, simulated:true, command, args}|{requested:true, accepted:true, simulated:false, command, pid}>

Description

Requests logout of the current host operating-system session. This is not an Arcane-only application exit, and acceptance does not prove logout completed. Shell-only; requires session.control.

Overview

Requests logout of the current operating-system session. It does not merely close the Arcane window: other applications in the same desktop session may be closed and unsaved work may be lost.

This method is restricted to a Shell application with session.control and is an exclusive host mutation. Present an explicit confirmation immediately before calling it.

Return value and completion

On a real host the promise resolves after the operating system accepted process creation, with {requested:true,accepted:true,simulated:false,command,pid}. Simulation has a distinct shape: {requested:true,accepted:true,simulated:true,command,args}. It starts no process and therefore has no pid. Acceptance is not proof that a real logout completed; the renderer may lose its connection as the session ends.

Unsupported session controllers, process-dispatch failure, and a ten-second dispatch timeout reject with a structured Arcane.Error.

Example

async function requestOperatingSystemLogout() {
    const access = await Arcane.capabilities.list();
    if (!access.methods.includes('session.logout')) {
        throw new Error('Logout is unavailable in this application');
    }
    return Arcane.session.logout();
}

document.querySelector('#confirm-logout')?.addEventListener(
    'click',
    async function handleConfirmedLogout() {
        await requestOperatingSystemLogout();
    }
);

Reference group

Session, provisioning, diagnostics, and development

Repository and reviewed source access