@agent-relay/wrapper 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__fixtures__/claude-outputs.d.ts +49 -0
- package/dist/__fixtures__/claude-outputs.d.ts.map +1 -0
- package/dist/__fixtures__/claude-outputs.js +443 -0
- package/dist/__fixtures__/claude-outputs.js.map +1 -0
- package/dist/__fixtures__/codex-outputs.d.ts +9 -0
- package/dist/__fixtures__/codex-outputs.d.ts.map +1 -0
- package/dist/__fixtures__/codex-outputs.js +94 -0
- package/dist/__fixtures__/codex-outputs.js.map +1 -0
- package/dist/__fixtures__/gemini-outputs.d.ts +19 -0
- package/dist/__fixtures__/gemini-outputs.d.ts.map +1 -0
- package/dist/__fixtures__/gemini-outputs.js +144 -0
- package/dist/__fixtures__/gemini-outputs.js.map +1 -0
- package/dist/__fixtures__/index.d.ts +68 -0
- package/dist/__fixtures__/index.d.ts.map +1 -0
- package/dist/__fixtures__/index.js +44 -0
- package/dist/__fixtures__/index.js.map +1 -0
- package/dist/auth-detection.d.ts +49 -0
- package/dist/auth-detection.d.ts.map +1 -0
- package/dist/auth-detection.js +199 -0
- package/dist/auth-detection.js.map +1 -0
- package/dist/base-wrapper.d.ts +225 -0
- package/dist/base-wrapper.d.ts.map +1 -0
- package/dist/base-wrapper.js +572 -0
- package/dist/base-wrapper.js.map +1 -0
- package/dist/client.d.ts +254 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +801 -0
- package/dist/client.js.map +1 -0
- package/dist/id-generator.d.ts +35 -0
- package/dist/id-generator.d.ts.map +1 -0
- package/dist/id-generator.js +60 -0
- package/dist/id-generator.js.map +1 -0
- package/dist/idle-detector.d.ts +110 -0
- package/dist/idle-detector.d.ts.map +1 -0
- package/dist/idle-detector.js +304 -0
- package/dist/idle-detector.js.map +1 -0
- package/dist/inbox.d.ts +37 -0
- package/dist/inbox.d.ts.map +1 -0
- package/dist/inbox.js +73 -0
- package/dist/inbox.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/parser.d.ts +236 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +1238 -0
- package/dist/parser.js.map +1 -0
- package/dist/prompt-composer.d.ts +67 -0
- package/dist/prompt-composer.d.ts.map +1 -0
- package/dist/prompt-composer.js +168 -0
- package/dist/prompt-composer.js.map +1 -0
- package/dist/relay-pty-orchestrator.d.ts +407 -0
- package/dist/relay-pty-orchestrator.d.ts.map +1 -0
- package/dist/relay-pty-orchestrator.js +1885 -0
- package/dist/relay-pty-orchestrator.js.map +1 -0
- package/dist/shared.d.ts +201 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +341 -0
- package/dist/shared.js.map +1 -0
- package/dist/stuck-detector.d.ts +161 -0
- package/dist/stuck-detector.d.ts.map +1 -0
- package/dist/stuck-detector.js +402 -0
- package/dist/stuck-detector.js.map +1 -0
- package/dist/tmux-resolver.d.ts +55 -0
- package/dist/tmux-resolver.d.ts.map +1 -0
- package/dist/tmux-resolver.js +175 -0
- package/dist/tmux-resolver.js.map +1 -0
- package/dist/tmux-wrapper.d.ts +345 -0
- package/dist/tmux-wrapper.d.ts.map +1 -0
- package/dist/tmux-wrapper.js +1747 -0
- package/dist/tmux-wrapper.js.map +1 -0
- package/dist/trajectory-integration.d.ts +292 -0
- package/dist/trajectory-integration.d.ts.map +1 -0
- package/dist/trajectory-integration.js +979 -0
- package/dist/trajectory-integration.js.map +1 -0
- package/dist/wrapper-types.d.ts +41 -0
- package/dist/wrapper-types.d.ts.map +1 -0
- package/dist/wrapper-types.js +7 -0
- package/dist/wrapper-types.js.map +1 -0
- package/package.json +63 -0
- package/src/__fixtures__/claude-outputs.ts +471 -0
- package/src/__fixtures__/codex-outputs.ts +99 -0
- package/src/__fixtures__/gemini-outputs.ts +151 -0
- package/src/__fixtures__/index.ts +47 -0
- package/src/auth-detection.ts +244 -0
- package/src/base-wrapper.test.ts +540 -0
- package/src/base-wrapper.ts +741 -0
- package/src/client.test.ts +262 -0
- package/src/client.ts +984 -0
- package/src/id-generator.test.ts +71 -0
- package/src/id-generator.ts +69 -0
- package/src/idle-detector.test.ts +390 -0
- package/src/idle-detector.ts +370 -0
- package/src/inbox.test.ts +233 -0
- package/src/inbox.ts +89 -0
- package/src/index.ts +170 -0
- package/src/parser.regression.test.ts +251 -0
- package/src/parser.test.ts +1359 -0
- package/src/parser.ts +1477 -0
- package/src/prompt-composer.test.ts +219 -0
- package/src/prompt-composer.ts +231 -0
- package/src/relay-pty-orchestrator.test.ts +1027 -0
- package/src/relay-pty-orchestrator.ts +2270 -0
- package/src/shared.test.ts +221 -0
- package/src/shared.ts +454 -0
- package/src/stuck-detector.test.ts +303 -0
- package/src/stuck-detector.ts +511 -0
- package/src/tmux-resolver.test.ts +104 -0
- package/src/tmux-resolver.ts +207 -0
- package/src/tmux-wrapper.test.ts +316 -0
- package/src/tmux-wrapper.ts +2010 -0
- package/src/trajectory-detection.test.ts +151 -0
- package/src/trajectory-integration.ts +1261 -0
- package/src/wrapper-types.ts +45 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TmuxWrapper - Attach-based tmux wrapper
|
|
3
|
+
*
|
|
4
|
+
* Architecture:
|
|
5
|
+
* 1. Start agent in detached tmux session
|
|
6
|
+
* 2. Attach user to tmux (they see real terminal)
|
|
7
|
+
* 3. Background: poll capture-pane silently (no stdout writes)
|
|
8
|
+
* 4. Background: parse ->relay commands, send to daemon
|
|
9
|
+
* 5. Background: inject messages via send-keys
|
|
10
|
+
*
|
|
11
|
+
* The key insight: user sees the REAL tmux session, not a proxy.
|
|
12
|
+
* We just do background parsing and injection.
|
|
13
|
+
*/
|
|
14
|
+
import { BaseWrapper, type BaseWrapperConfig } from './base-wrapper.js';
|
|
15
|
+
import { type ParsedCommand, type ParsedSummary } from './parser.js';
|
|
16
|
+
import type { SendPayload, SendMeta } from '@agent-relay/protocol/types';
|
|
17
|
+
import { type CliType } from './shared.js';
|
|
18
|
+
export interface TmuxWrapperConfig extends BaseWrapperConfig {
|
|
19
|
+
cols?: number;
|
|
20
|
+
rows?: number;
|
|
21
|
+
/** Optional program identifier (e.g., 'claude', 'gpt-4o') */
|
|
22
|
+
program?: string;
|
|
23
|
+
/** Optional model identifier (e.g., 'claude-3-opus') */
|
|
24
|
+
model?: string;
|
|
25
|
+
/** Use file-based inbox in addition to injection */
|
|
26
|
+
useInbox?: boolean;
|
|
27
|
+
/** Custom inbox directory */
|
|
28
|
+
inboxDir?: string;
|
|
29
|
+
/** Polling interval for capture-pane (ms) */
|
|
30
|
+
pollInterval?: number;
|
|
31
|
+
/** Enable debug logging to stderr */
|
|
32
|
+
debug?: boolean;
|
|
33
|
+
/** Throttle debug logs (ms) */
|
|
34
|
+
debugLogIntervalMs?: number;
|
|
35
|
+
/** Idle time after last output before injecting (ms) */
|
|
36
|
+
idleBeforeInjectMs?: number;
|
|
37
|
+
/** Retry interval while waiting for idle window (ms) */
|
|
38
|
+
injectRetryMs?: number;
|
|
39
|
+
/** How long with no output before marking session idle (ms) */
|
|
40
|
+
activityIdleThresholdMs?: number;
|
|
41
|
+
/** Max time to wait for clear input before injecting (ms) */
|
|
42
|
+
inputWaitTimeoutMs?: number;
|
|
43
|
+
/** Polling interval when waiting for clear input (ms) */
|
|
44
|
+
inputWaitPollMs?: number;
|
|
45
|
+
/** Enable tmux mouse mode for scroll passthrough (default: true) */
|
|
46
|
+
mouseMode?: boolean;
|
|
47
|
+
/** Max time to wait for stable pane output before injection (ms) */
|
|
48
|
+
outputStabilityTimeoutMs?: number;
|
|
49
|
+
/** Poll interval when checking pane stability before injection (ms) */
|
|
50
|
+
outputStabilityPollMs?: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get the default relay prefix for a given CLI type.
|
|
54
|
+
* All agents now use '->relay:' as the unified prefix.
|
|
55
|
+
* @deprecated Use getDefaultRelayPrefix() from shared.js instead
|
|
56
|
+
*/
|
|
57
|
+
export declare function getDefaultPrefix(_cliType: CliType): string;
|
|
58
|
+
export declare class TmuxWrapper extends BaseWrapper {
|
|
59
|
+
protected config: TmuxWrapperConfig;
|
|
60
|
+
private sessionName;
|
|
61
|
+
private parser;
|
|
62
|
+
private inbox?;
|
|
63
|
+
private storage?;
|
|
64
|
+
private storageReady;
|
|
65
|
+
private pollTimer?;
|
|
66
|
+
private attachProcess?;
|
|
67
|
+
private lastCapturedOutput;
|
|
68
|
+
private lastOutputTime;
|
|
69
|
+
private lastActivityTime;
|
|
70
|
+
private activityState;
|
|
71
|
+
private recentlySentMessages;
|
|
72
|
+
private processedOutputLength;
|
|
73
|
+
private lastLoggedLength;
|
|
74
|
+
private lastDebugLog;
|
|
75
|
+
private lastSummaryHash;
|
|
76
|
+
private pendingRelayCommands;
|
|
77
|
+
private queuedMessageHashes;
|
|
78
|
+
private readonly MAX_PENDING_RELAY_COMMANDS;
|
|
79
|
+
private receivedMessageIdSet;
|
|
80
|
+
private receivedMessageIdOrder;
|
|
81
|
+
private readonly MAX_RECEIVED_MESSAGES;
|
|
82
|
+
private tmuxPath;
|
|
83
|
+
private trajectory?;
|
|
84
|
+
private lastDetectedPhase?;
|
|
85
|
+
private seenToolCalls;
|
|
86
|
+
private seenErrors;
|
|
87
|
+
private authRevoked;
|
|
88
|
+
private lastAuthCheck;
|
|
89
|
+
private readonly AUTH_CHECK_INTERVAL;
|
|
90
|
+
private throttle;
|
|
91
|
+
constructor(config: TmuxWrapperConfig);
|
|
92
|
+
/**
|
|
93
|
+
* Inject content into the tmux session via paste
|
|
94
|
+
*/
|
|
95
|
+
protected performInjection(content: string): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Get cleaned output for parsing (strip ANSI codes)
|
|
98
|
+
*/
|
|
99
|
+
protected getCleanOutput(): string;
|
|
100
|
+
/**
|
|
101
|
+
* Log to stderr (safe - doesn't interfere with tmux display)
|
|
102
|
+
*/
|
|
103
|
+
private logStderr;
|
|
104
|
+
/**
|
|
105
|
+
* Detect PDERO phase from output content and auto-transition if needed.
|
|
106
|
+
* Also detects tool calls and errors, recording them to the trajectory.
|
|
107
|
+
*/
|
|
108
|
+
private detectAndTransitionPhase;
|
|
109
|
+
/**
|
|
110
|
+
* Build the full command with proper quoting
|
|
111
|
+
* Args containing spaces need to be quoted
|
|
112
|
+
*/
|
|
113
|
+
private buildCommand;
|
|
114
|
+
/**
|
|
115
|
+
* Check if tmux session exists
|
|
116
|
+
*/
|
|
117
|
+
private sessionExists;
|
|
118
|
+
/**
|
|
119
|
+
* Start the wrapped agent process
|
|
120
|
+
*/
|
|
121
|
+
start(): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Initialize trajectory tracking
|
|
124
|
+
* Auto-starts a trajectory if task is provided in config
|
|
125
|
+
*/
|
|
126
|
+
private initializeTrajectory;
|
|
127
|
+
/**
|
|
128
|
+
* Initialize agent ID for continuity/resume functionality (uses logStderr for tmux)
|
|
129
|
+
*/
|
|
130
|
+
protected initializeAgentId(): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Initialize the idle detector with the tmux pane PID.
|
|
133
|
+
* This enables process state inspection on Linux for more reliable idle detection.
|
|
134
|
+
*/
|
|
135
|
+
private initializeIdleDetectorPid;
|
|
136
|
+
/**
|
|
137
|
+
* Wait for the agent to be ready for input.
|
|
138
|
+
* Uses idle detection instead of a fixed delay.
|
|
139
|
+
*/
|
|
140
|
+
private waitForAgentReady;
|
|
141
|
+
/**
|
|
142
|
+
* Inject usage instructions for the agent including persistence protocol
|
|
143
|
+
*/
|
|
144
|
+
private injectInstructions;
|
|
145
|
+
/**
|
|
146
|
+
* Inject continuity context from previous session
|
|
147
|
+
*/
|
|
148
|
+
private injectContinuityContext;
|
|
149
|
+
/**
|
|
150
|
+
* Wait for tmux session to be ready
|
|
151
|
+
*/
|
|
152
|
+
private waitForSession;
|
|
153
|
+
/**
|
|
154
|
+
* Wait for shell prompt to appear (shell is ready for input)
|
|
155
|
+
*/
|
|
156
|
+
private waitForShellReady;
|
|
157
|
+
/**
|
|
158
|
+
* Attach user to tmux session
|
|
159
|
+
* This spawns tmux attach and lets it take over stdin/stdout
|
|
160
|
+
*/
|
|
161
|
+
private attachToSession;
|
|
162
|
+
/**
|
|
163
|
+
* Start silent polling for ->relay commands
|
|
164
|
+
* Does NOT write to stdout - just parses and sends to daemon
|
|
165
|
+
*/
|
|
166
|
+
private startSilentPolling;
|
|
167
|
+
/**
|
|
168
|
+
* Poll for ->relay commands in output (silent)
|
|
169
|
+
*/
|
|
170
|
+
private pollForRelayCommands;
|
|
171
|
+
/**
|
|
172
|
+
* Record recent activity and transition back to active if needed.
|
|
173
|
+
*/
|
|
174
|
+
private markActivity;
|
|
175
|
+
/**
|
|
176
|
+
* Update activity state based on idle threshold and trigger injections when idle.
|
|
177
|
+
*/
|
|
178
|
+
private updateActivityState;
|
|
179
|
+
/**
|
|
180
|
+
* Check if the CLI output indicates auth has been revoked.
|
|
181
|
+
* This can happen when the user authenticates elsewhere (limited sessions).
|
|
182
|
+
*/
|
|
183
|
+
private checkAuthRevocation;
|
|
184
|
+
/**
|
|
185
|
+
* Reset auth revocation state (called after successful re-authentication)
|
|
186
|
+
*/
|
|
187
|
+
resetAuthState(): void;
|
|
188
|
+
/**
|
|
189
|
+
* Check if auth has been revoked
|
|
190
|
+
*/
|
|
191
|
+
isAuthRevoked(): boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Send relay command to daemon (overrides BaseWrapper for offline queue support)
|
|
194
|
+
*/
|
|
195
|
+
protected sendRelayCommand(cmd: ParsedCommand): void;
|
|
196
|
+
/**
|
|
197
|
+
* Flush any queued relay commands when the client reconnects.
|
|
198
|
+
*/
|
|
199
|
+
private flushQueuedRelayCommands;
|
|
200
|
+
/**
|
|
201
|
+
* Parse [[SUMMARY]] blocks from output and save to storage.
|
|
202
|
+
* Agents can output summaries to maintain running context:
|
|
203
|
+
*
|
|
204
|
+
* [[SUMMARY]]
|
|
205
|
+
* {"currentTask": "Implementing auth", "context": "Completed login flow"}
|
|
206
|
+
* [[/SUMMARY]]
|
|
207
|
+
*/
|
|
208
|
+
private parseSummaryAndSave;
|
|
209
|
+
/**
|
|
210
|
+
* Save a parsed summary to the continuity ledger (uses logStderr for tmux).
|
|
211
|
+
* Maps summary fields to ledger fields for session recovery.
|
|
212
|
+
*/
|
|
213
|
+
protected saveSummaryToLedger(summary: ParsedSummary): Promise<void>;
|
|
214
|
+
/**
|
|
215
|
+
* Parse ->continuity: commands from output and handle them.
|
|
216
|
+
* Supported commands:
|
|
217
|
+
* ->continuity:save <<<...>>> - Save session state to ledger
|
|
218
|
+
* ->continuity:load - Request context injection
|
|
219
|
+
* ->continuity:search "query" - Search past handoffs
|
|
220
|
+
* ->continuity:uncertain "..." - Mark item as uncertain
|
|
221
|
+
* ->continuity:handoff <<<...>>> - Create explicit handoff
|
|
222
|
+
*/
|
|
223
|
+
protected parseContinuityCommands(content: string): Promise<void>;
|
|
224
|
+
/**
|
|
225
|
+
* Parse [[SESSION_END]] blocks from output and close session explicitly.
|
|
226
|
+
* Agents output this to mark their work session as complete:
|
|
227
|
+
*
|
|
228
|
+
* [[SESSION_END]]
|
|
229
|
+
* {"summary": "Completed auth module", "completedTasks": ["login", "logout"]}
|
|
230
|
+
* [[/SESSION_END]]
|
|
231
|
+
*
|
|
232
|
+
* Also stores the data for use in autoSave to populate handoff (fixes empty handoff issue).
|
|
233
|
+
*/
|
|
234
|
+
private parseSessionEndAndClose;
|
|
235
|
+
/**
|
|
236
|
+
* Execute spawn via API (if dashboardPort set) or callback.
|
|
237
|
+
* After spawning, waits for the agent to come online and sends the task via relay.
|
|
238
|
+
*/
|
|
239
|
+
protected executeSpawn(name: string, cli: string, task: string): Promise<void>;
|
|
240
|
+
/**
|
|
241
|
+
* Wait for a spawned agent to come online, then send the task via relay.
|
|
242
|
+
* Uses the wrapper's own relay client so the message comes "from" this agent,
|
|
243
|
+
* not from the dashboard's relay client.
|
|
244
|
+
*/
|
|
245
|
+
private waitAndSendTask;
|
|
246
|
+
/**
|
|
247
|
+
* Execute release via API (if dashboardPort set) or callback
|
|
248
|
+
*/
|
|
249
|
+
protected executeRelease(name: string): Promise<void>;
|
|
250
|
+
/**
|
|
251
|
+
* Parse ->relay:spawn and ->relay:release commands from output.
|
|
252
|
+
* Supports two formats:
|
|
253
|
+
* Single-line: ->relay:spawn WorkerName cli "task description"
|
|
254
|
+
* Multi-line (fenced): ->relay:spawn WorkerName cli <<<
|
|
255
|
+
* task description here
|
|
256
|
+
* can span multiple lines>>>
|
|
257
|
+
* ->relay:release WorkerName
|
|
258
|
+
*/
|
|
259
|
+
protected parseSpawnReleaseCommands(content: string): void;
|
|
260
|
+
/**
|
|
261
|
+
* Handle incoming message from relay
|
|
262
|
+
* @param originalTo - The original 'to' field from sender. '*' indicates this was a broadcast message.
|
|
263
|
+
* Agents should reply to originalTo to maintain channel routing (e.g., respond to #general, not DM).
|
|
264
|
+
*/
|
|
265
|
+
protected handleIncomingMessage(from: string, payload: SendPayload, messageId: string, meta?: SendMeta, originalTo?: string): void;
|
|
266
|
+
/**
|
|
267
|
+
* Handle incoming channel message from relay.
|
|
268
|
+
* Channel messages include a channel indicator so the agent knows to reply to the channel.
|
|
269
|
+
*/
|
|
270
|
+
protected handleIncomingChannelMessage(from: string, channel: string, body: string, envelope: import('@agent-relay/protocol/types').Envelope<import('@agent-relay/protocol/channels').ChannelMessagePayload>): void;
|
|
271
|
+
/**
|
|
272
|
+
* Check if we should inject a message.
|
|
273
|
+
* Uses UniversalIdleDetector (from BaseWrapper) for robust cross-CLI idle detection.
|
|
274
|
+
*/
|
|
275
|
+
private checkForInjectionOpportunity;
|
|
276
|
+
/**
|
|
277
|
+
* Inject message via tmux send-keys.
|
|
278
|
+
* Uses shared injection logic with tmux-specific callbacks.
|
|
279
|
+
*/
|
|
280
|
+
private injectNextMessage;
|
|
281
|
+
private hasSeenIncoming;
|
|
282
|
+
/**
|
|
283
|
+
* Send special keys to tmux
|
|
284
|
+
*/
|
|
285
|
+
private sendKeys;
|
|
286
|
+
/**
|
|
287
|
+
* Send literal text to tmux
|
|
288
|
+
*/
|
|
289
|
+
private sendKeysLiteral;
|
|
290
|
+
/**
|
|
291
|
+
* Paste text using tmux buffer with optional bracketed paste to avoid interleaving with ongoing output.
|
|
292
|
+
* Some CLIs (like droid) don't handle bracketed paste sequences properly, so we skip -p for them.
|
|
293
|
+
*/
|
|
294
|
+
private pasteLiteral;
|
|
295
|
+
/**
|
|
296
|
+
* Reset session-specific state for wrapper reuse.
|
|
297
|
+
* Call this when starting a new session with the same wrapper instance.
|
|
298
|
+
*/
|
|
299
|
+
resetSessionState(): void;
|
|
300
|
+
/**
|
|
301
|
+
* Get the prompt pattern for the current CLI type.
|
|
302
|
+
*/
|
|
303
|
+
private getPromptPattern;
|
|
304
|
+
/**
|
|
305
|
+
* Capture the last non-empty line from the tmux pane.
|
|
306
|
+
*/
|
|
307
|
+
private getLastLine;
|
|
308
|
+
/**
|
|
309
|
+
* Detect if the provided line contains visible user input (beyond the prompt).
|
|
310
|
+
*/
|
|
311
|
+
private hasVisibleInput;
|
|
312
|
+
/**
|
|
313
|
+
* Check if the input line is clear (no user-typed text after the prompt).
|
|
314
|
+
* Returns true if the last visible line appears to be just a prompt.
|
|
315
|
+
*/
|
|
316
|
+
private isInputClear;
|
|
317
|
+
/**
|
|
318
|
+
* Get cursor X position to detect input length.
|
|
319
|
+
* Returns the cursor column (0-indexed).
|
|
320
|
+
*/
|
|
321
|
+
private getCursorX;
|
|
322
|
+
/**
|
|
323
|
+
* Wait for the input line to be clear before injecting.
|
|
324
|
+
* Polls until the input appears empty or timeout is reached.
|
|
325
|
+
*
|
|
326
|
+
* @param maxWaitMs Maximum time to wait (default 5000ms)
|
|
327
|
+
* @param pollIntervalMs How often to check (default 200ms)
|
|
328
|
+
* @returns true if input became clear, false if timed out
|
|
329
|
+
*/
|
|
330
|
+
private waitForClearInput;
|
|
331
|
+
/**
|
|
332
|
+
* Capture a signature of the current pane content for stability checks.
|
|
333
|
+
* Uses hash+length to cheaply detect changes without storing full content.
|
|
334
|
+
*/
|
|
335
|
+
private capturePaneSignature;
|
|
336
|
+
/**
|
|
337
|
+
* Wait for pane output to stabilize before injecting to avoid interleaving with ongoing output.
|
|
338
|
+
*/
|
|
339
|
+
private waitForStablePane;
|
|
340
|
+
/**
|
|
341
|
+
* Stop and cleanup
|
|
342
|
+
*/
|
|
343
|
+
stop(): void;
|
|
344
|
+
}
|
|
345
|
+
//# sourceMappingURL=tmux-wrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tmux-wrapper.d.ts","sourceRoot":"","sources":["../src/tmux-wrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,aAAa,EAAsD,MAAM,aAAa,CAAC;AAMvI,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAiBzE,OAAO,EACL,KAAK,OAAO,EAUb,MAAM,aAAa,CAAC;AAgBrB,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+BAA+B;IAC/B,kBAAkB,C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