| @@ -8,15 +8,9 @@ import { · 7 unmodified lines |
| 8 | TerminalSessionStatus, | 8 | TerminalSessionStatus, |
| 9 | TerminalWriteInput, | 9 | TerminalWriteInput, |
| 10 | } from "@t3tools/contracts"; | 10 | } from "@t3tools/contracts"; |
| 11 | import { PtyAdapterShape, PtyProcess } from "./PTY"; | 11 | import { PtyProcess } from "./PTY"; |
| 12 | import { Effect, ServiceMap } from "effect"; | 12 | import { Effect, ServiceMap } from "effect"; |
| 13 | | 13 | |
| 14 | type TerminalSubprocessChecker = (terminalPid: number) => Promise<boolean>; | | |
| 15 | | | |
| 16 | export interface TerminalManagerEvents { | | |
| 17 | event: [event: TerminalEvent]; | | |
| 18 | } | | |
| 19 | | | |
| 20 | export interface TerminalSessionState { | 14 | export interface TerminalSessionState { |
| 21 | threadId: string; | 15 | threadId: string; |
| 22 | terminalId: string; | 16 | terminalId: string; |
| @@ -46,15 +40,6 @@ export interface TerminalStartInput extends TerminalOpenInput { · 23 unmodified lines |
| 46 | rows: number; | 40 | rows: number; |
| 47 | } | 41 | } |
| 48 | | 42 | |
| 49 | export interface TerminalManagerOptions { | | |
| 50 | logsDir?: string; | | |
| 51 | historyLineLimit?: number; | | |
| 52 | ptyAdapter: PtyAdapterShape; | | |
| 53 | shellResolver?: () => string; | | |
| 54 | subprocessChecker?: TerminalSubprocessChecker; | | |
| 55 | subprocessPollIntervalMs?: number; | | |
| 56 | } | | |
| 57 | | | |
| 58 | export interface TerminalManagerShape { | 43 | export interface TerminalManagerShape { |
| 59 | readonly open: (input: TerminalOpenInput) => Effect.Effect<TerminalSessionSnapshot, unknown>; | 44 | readonly open: (input: TerminalOpenInput) => Effect.Effect<TerminalSessionSnapshot, unknown>; |
| 60 | readonly write: (input: TerminalWriteInput) => Effect.Effect<void, unknown>; | 45 | readonly write: (input: TerminalWriteInput) => Effect.Effect<void, unknown>; |