Navigácia
ELOWEN · Dokumentácia

Posledná aktualizácia: 27. októbra 2026

Prechádzať dokumentáciu · Terminal API contracts

Tento článok zatiaľ nie je preložený. Je dostupný v angličtine.

Developer reference

Terminal API contracts

The pure root apiContract.mjs exports all ten authenticated apiRoutes. Runtime registrations spread these descriptors; process query/path and foreground-control JSON inputs use their exact registered Zod schemas lazily, after the existing operator gate. The existing foreground-control error strings are preserved. JSON syntax failures still propagate outside the action-conflict catch. Importing declarations performs no I/O.

Process/command management requires the current instance-operator identity; interactive terminals instead retain their native account gate. Ordinary agent credentials and personal API tokens cannot open an interactive shell, while administrator agents retain their established access. An absent owned terminal id is still looked up before credential refusal and returns 404. The native gate and its tests are unchanged. Declared credential policy describes these existing limits; it does not replace ownership, Project membership, plugin grants or live shell authorization.

PTY open and ticket bodies retain arbitrary JSON wire schemas because the native operation reads and coerces individual values after its gates, rather than requiring a JSON object. Numeric Project conversion, shared size clamping and finite replay-offset conversion retain their existing defaults and accepted values. Unknown fields are not newly refused. Capacity reservation remains before body parsing, and malformed PTY JSON still returns TERMINAL_FAILED/500 with reservation cleanup. Delete/acknowledge bodies remain ignored. Native ownership lookup uses already-decoded path fields so its historical denial order stays intact.

The Project terminal dock and existing process controls are real consumers. JSON APIs issue 15-second one-shot tickets; byte input/output and resize frames remain on the native WebSocket, with existing permission rechecks and cleanup. Missing host process API returns 503; absent terminal ownership returns 404. No sessionless Bash API, new shell authorization, native-control replacement or peer token is introduced.