import type { Container, TUI } from '@earendil-works/pi-tui'; import type { CanvasSource } from '../../../core/canvas/source.js'; import type { NodeMeta } from '../../../core/canvas/types.js'; import type { BrokerClient } from '../../../core/broker-client/index.js'; import type { AttachPalette } from '../config.js'; import type { TitledEditor } from '../input/titled-editor.js'; /** The bottom-anchored chrome stack plus the scrolling chat, in render order. * Owned by the layout step; every painter writes into exactly one of these. */ export interface AttachContainers { /** Scrolling transcript — the only container above the chat/chrome divider. */ readonly chat: Container; /** The themed divider itself (suppressed while the recap widget is present). */ readonly chrome: Container; /** Extension widgets placed `aboveEditor`, including the inactivity brief. */ readonly aboveWidgets: Container; /** Relationship roster / wait rows, below the editor. */ readonly reports: Container; /** Pending steering messages, above the editor. */ readonly queued: Container; /** Native pickers (/model etc.), inline directly under the editor. */ readonly pickerPanel: Container; /** Extension widgets placed `belowEditor`. */ readonly belowWidgets: Container; /** The status line. */ readonly footer: Container; } export interface AttachSession { /** The node this viewer drives. On a remote attach this id is meaningful only * to the remote canvas — never to local disk. */ readonly nodeId: string; /** THE single remote/read-only fact, derived once in `runAttach` from * `--canvas` and threaded from here. No collaborator may re-derive it. */ readonly remote: boolean; /** Viewer-LOCAL concerns only: `cwd` drives theming and this pane's own git * status, and is the CLI's own cwd for a remote attach — never the remote * node's directory. */ readonly meta: Pick; /** Canvas read authority for chrome and the graph overlay: an API source * locally, a relayed source under `--canvas`. */ readonly canvasSource: CanvasSource; /** The one socket to the node's headless broker. Attach owns no engine. */ readonly socket: BrokerClient; readonly tui: TUI; readonly pal: AttachPalette; readonly editor: TitledEditor; readonly containers: AttachContainers; }