External and classic adapters receive a small, explicit contract: a validated manifest, narrow context metadata, explicit environment values, terminal size, and optional dropfile paths. They do not receive Foglet internals.
Context JSON
The runner writes a temporary context file and exposes its path as FOGLET_DOOR_CONTEXT. The context includes:
door_iduser_idhandlerolesession_idterminal_widthterminal_height
The context file is removed during runner cleanup.
Environment variables
Foglet supplies:
FOGLET_DOOR_IDFOGLET_USER_IDFOGLET_USERNAMEFOGLET_SESSION_IDFOGLET_TERMINAL_WIDTHFOGLET_TERMINAL_HEIGHTFOGLET_DOOR_CONTEXTFOGLET_DROPFILES
Classic doors may also receive:
FOGLET_DROPFILE_DIRFOGLET_DROPFILE_DOOR32_SYSFOGLET_DROPFILE_DOOR_SYSFOGLET_DROPFILE_CHAIN_TXTFOGLET_DROPFILE_DORINFO_DEF
Manifest env entries are merged with these values. Foglet-owned FOGLET_* variables win.
Audit metadata
Foglet.Doors.launch_audit/1 builds a redacted record with door id, user id, handle, start/end times, terminal size, runtime, allowlisted env values, and safe status keys. It is a contract for runtime/reporting code, not a persistent database table yet.