import { type Conversation } from "./protocol.js"; import type { TerminalControlSendResult } from "./terminal-command-dispatch-transport.js"; import { type TerminalCommandPortView, type TerminalCommandTarget } from "./terminal-command-cli-ports.js"; export type TerminalHumanExplicitSendCliPorts = TerminalCommandPortView<"acquireFileLock" | "acquireTerminalBridgeSendLock" | "assertExpectedHandoffTokenUsesExactTerminalSelector" | "attachUserExplicitFallbackWatch" | "createTerminalAgentBridge" | "loadTerminalBridgeDispatchLedger" | "loadTerminalDispatchLedgerOwner" | "prepareUserExplicitFallbackWatch" | "processIncarnationForPid" | "required" | "resolveTerminalBridgeDispatchLedger" | "storeDirFromOptions" | "terminalBridgeRuntimeKey" | "terminalControlFromTakeover" | "terminalDispatchRecordMatchesControl" | "terminalRuntimeForLiveIdentity" | "textSummary" | "userExplicitFallbackWatchReceipt">; export interface TerminalHumanExplicitSendRuntime { env(): NodeJS.ProcessEnv; now(): Date; log(level: "info" | "warn" | "error", event: string, fields: Record): void; printJson(value: unknown): void; durableTerminalInputDispatched(conversation: Conversation): boolean; } export interface TerminalHumanExplicitManagedAttempt { terminalControlSendInvoked: boolean; result?: TerminalControlSendResult; } export interface TerminalHumanExplicitSendDependencies { ports: TerminalHumanExplicitSendCliPorts; runtime: TerminalHumanExplicitSendRuntime; managedSendAttempt(options: Record, messageBody: string, terminal: TerminalCommandTarget, deferZeroInputFailurePresentation: boolean, attempt: TerminalHumanExplicitManagedAttempt): Promise; } declare function assertFreshUserExplicitTerminalSendToken(options: Record, terminal: TerminalCommandTarget): void; declare function assertFreshUserExplicitTerminalSendTargetWhileLocked(options: Record, terminal: TerminalCommandTarget): Promise; export declare function runHumanExplicitTerminalSend(dependencies: TerminalHumanExplicitSendDependencies, options: Record, messageBody: string, terminal: TerminalCommandTarget): Promise; export { assertFreshUserExplicitTerminalSendTargetWhileLocked }; export { assertFreshUserExplicitTerminalSendToken };