tmux-ide 2.9.18 → 2.9.20
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/bin/cli.js +20 -18
- package/package.json +1 -1
- package/packages/daemon/dist/doctor.js +12 -5
- package/packages/daemon/dist/lib/native-split-capability.js +13 -15
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/Info.plist +2 -2
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/MacOS/tmux-ide-notifier +0 -0
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/Resources/Assets.car +0 -0
- package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/_CodeSignature/CodeResources +2 -2
- package/packages/daemon/dist/terminal/mirror/session-channel.js +3 -2
- package/packages/daemon/dist/terminal/mirror/window-split-authority.js +1 -1
- package/packages/daemon/src/doctor.ts +12 -5
- package/packages/daemon/src/lib/native-split-capability.ts +12 -13
- package/packages/daemon/src/terminal/mirror/session-channel.ts +3 -2
- package/packages/daemon/src/terminal/mirror/window-split-authority.ts +3 -2
package/bin/cli.js
CHANGED
|
@@ -13145,7 +13145,7 @@ var require_package = __commonJS({
|
|
|
13145
13145
|
"package.json"(exports, module) {
|
|
13146
13146
|
module.exports = {
|
|
13147
13147
|
name: "tmux-ide",
|
|
13148
|
-
version: "2.9.
|
|
13148
|
+
version: "2.9.20",
|
|
13149
13149
|
description: "The open-source workspace for coding agents: run Claude Code, Codex and other agents in tmux with live status",
|
|
13150
13150
|
type: "module",
|
|
13151
13151
|
bin: {
|
|
@@ -27006,27 +27006,23 @@ function createNativeSplitReadiness(options) {
|
|
|
27006
27006
|
});
|
|
27007
27007
|
}
|
|
27008
27008
|
function createStockSplitProbe(options) {
|
|
27009
|
+
const command3 = "tmux-ide-resize-split";
|
|
27009
27010
|
return async () => {
|
|
27010
|
-
|
|
27011
|
-
|
|
27012
|
-
|
|
27013
|
-
|
|
27014
|
-
|
|
27015
|
-
|
|
27016
|
-
|
|
27017
|
-
if (!new RegExp(`^unknown command: ${command3}$`, "mu").test(text2)) return false;
|
|
27018
|
-
}
|
|
27011
|
+
try {
|
|
27012
|
+
await options.runPinnedTmux([command3, "-V"]);
|
|
27013
|
+
return false;
|
|
27014
|
+
} catch (error) {
|
|
27015
|
+
const failure4 = error;
|
|
27016
|
+
const text2 = String(failure4?.cause?.stderr ?? failure4?.stderr ?? "");
|
|
27017
|
+
return new RegExp(`^unknown command: ${command3}$`, "mu").test(text2);
|
|
27019
27018
|
}
|
|
27020
|
-
return true;
|
|
27021
27019
|
};
|
|
27022
27020
|
}
|
|
27023
|
-
var NATIVE_COMMANDS;
|
|
27024
27021
|
var init_native_split_capability = __esm({
|
|
27025
27022
|
"packages/daemon/src/lib/native-split-capability.ts"() {
|
|
27026
27023
|
"use strict";
|
|
27027
27024
|
init_src2();
|
|
27028
27025
|
init_native_split_resize();
|
|
27029
|
-
NATIVE_COMMANDS = ["tmux-ide-resize-split", "tmux-ide-events"];
|
|
27030
27026
|
}
|
|
27031
27027
|
});
|
|
27032
27028
|
|
|
@@ -31893,14 +31889,15 @@ var init_session_channel = __esm({
|
|
|
31893
31889
|
const panes = native2.leaves.map((leaf) => {
|
|
31894
31890
|
const pane = this.panesByRuntime.get(leaf.id);
|
|
31895
31891
|
const birth = pane?.descriptor?.nativePaneBirthId;
|
|
31896
|
-
if (!pane || pane.windowRuntimeId !== resolved2.runtimeWindowId || pane.descriptor?.runtimeSessionId !== identity4.runtimeSessionId || pane.descriptor?.windowId !== resolved2.runtimeWindowId || this.panesBySemantic.get(pane.semanticId) !== pane ||
|
|
31892
|
+
if (!pane || pane.windowRuntimeId !== resolved2.runtimeWindowId || pane.descriptor?.runtimeSessionId !== identity4.runtimeSessionId || pane.descriptor?.windowId !== resolved2.runtimeWindowId || this.panesBySemantic.get(pane.semanticId) !== pane || // A stock server has no birth ids; a server that has them must give valid ones.
|
|
31893
|
+
(!stock || birth) && (!birth || !/^[1-9]\d*$/u.test(birth)) || !layout.leaves.some(
|
|
31897
31894
|
(visible) => visible.id === leaf.id && visible.left === leaf.left && visible.top === leaf.top && visible.width === leaf.width && visible.height === leaf.height
|
|
31898
31895
|
))
|
|
31899
31896
|
throw new Error("Split layout pane identity incomplete");
|
|
31900
31897
|
return Object.freeze({
|
|
31901
31898
|
runtimePaneId: pane.runtimeId,
|
|
31902
31899
|
semanticPaneId: pane.semanticId,
|
|
31903
|
-
nativePaneBirthId:
|
|
31900
|
+
nativePaneBirthId: birth || ""
|
|
31904
31901
|
});
|
|
31905
31902
|
});
|
|
31906
31903
|
return Object.freeze({
|
|
@@ -34496,7 +34493,7 @@ var init_window_split_authority = __esm({
|
|
|
34496
34493
|
if (!tree || tree.width > 4096 || tree.height > 4096 || snapshot3.panes.length > 256)
|
|
34497
34494
|
throw new WindowSplitLayoutUnavailable();
|
|
34498
34495
|
snapshot3.panes.forEach((pane) => {
|
|
34499
|
-
if (!/^%(0|[1-9][0-9]{0,9})$/u.test(pane.runtimePaneId) || Number(pane.runtimePaneId.slice(1)) > 4294967295 || !this.options.stock && !NativeJournalUint64SchemaZ.refine((birth) => birth !== "0").safeParse(
|
|
34496
|
+
if (!/^%(0|[1-9][0-9]{0,9})$/u.test(pane.runtimePaneId) || Number(pane.runtimePaneId.slice(1)) > 4294967295 || !(this.options.stock && pane.nativePaneBirthId === "") && !NativeJournalUint64SchemaZ.refine((birth) => birth !== "0").safeParse(
|
|
34500
34497
|
pane.nativePaneBirthId
|
|
34501
34498
|
).success)
|
|
34502
34499
|
throw new WindowSplitLayoutUnavailable();
|
|
@@ -99330,7 +99327,11 @@ function nativeCommands(probe) {
|
|
|
99330
99327
|
if (failures.some((text2) => /no server running|error connecting/u.test(text2)))
|
|
99331
99328
|
return "no-server";
|
|
99332
99329
|
const refused3 = (answer, command3) => answer.failure !== void 0 && UNKNOWN(command3).test(answer.failure);
|
|
99333
|
-
if (refused3(split, "tmux-ide-resize-split")
|
|
99330
|
+
if (refused3(split, "tmux-ide-resize-split")) {
|
|
99331
|
+
if (refused3(events, "tmux-ide-events")) return "stock";
|
|
99332
|
+
if (events.output !== void 0) return "older";
|
|
99333
|
+
return "unknown";
|
|
99334
|
+
}
|
|
99334
99335
|
if (split.output !== void 0 && events.output !== void 0) {
|
|
99335
99336
|
try {
|
|
99336
99337
|
return nativeSplitCapability(split.output) ? "full" : "partial";
|
|
@@ -99346,13 +99347,14 @@ function tmuxFeaturesRow(probeServer, probeBinary) {
|
|
|
99346
99347
|
const details = {
|
|
99347
99348
|
full: "bundled tmux: full features",
|
|
99348
99349
|
stock: "stock tmux: reduced features",
|
|
99350
|
+
older: "older tmux-ide tmux: reduced features (restart it with tmux-ide's own tmux for every feature; that ends its sessions)",
|
|
99349
99351
|
partial: "this tmux has only some tmux-ide commands: no pane dividers",
|
|
99350
99352
|
"no-server": "could not read the tmux server's features",
|
|
99351
99353
|
unknown: "could not read the tmux server's features"
|
|
99352
99354
|
};
|
|
99353
99355
|
return {
|
|
99354
99356
|
label: "tmux features",
|
|
99355
|
-
pass: answer === "full" || answer === "stock",
|
|
99357
|
+
pass: answer === "full" || answer === "stock" || answer === "older",
|
|
99356
99358
|
detail: details[answer],
|
|
99357
99359
|
optional: true
|
|
99358
99360
|
};
|
package/package.json
CHANGED
|
@@ -153,8 +153,8 @@ function check(label, fn, { optional = false } = {}) {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
const UNKNOWN = (command) => new RegExp(`^unknown command: ${command}$`, "mu");
|
|
156
|
-
/** The same reading of the server as the mirror's: stock
|
|
157
|
-
*
|
|
156
|
+
/** The same reading of the server as the mirror's: the stock resize when it refuses
|
|
157
|
+
* the split command by name, and full only with the split capability it requires. */
|
|
158
158
|
function nativeCommands(probe) {
|
|
159
159
|
const ask = (command) => {
|
|
160
160
|
try {
|
|
@@ -171,8 +171,14 @@ function nativeCommands(probe) {
|
|
|
171
171
|
if (failures.some((text) => /no server running|error connecting/u.test(text)))
|
|
172
172
|
return "no-server";
|
|
173
173
|
const refused = (answer, command) => answer.failure !== undefined && UNKNOWN(command).test(answer.failure);
|
|
174
|
-
if (refused(split, "tmux-ide-resize-split")
|
|
175
|
-
|
|
174
|
+
if (refused(split, "tmux-ide-resize-split")) {
|
|
175
|
+
if (refused(events, "tmux-ide-events"))
|
|
176
|
+
return "stock";
|
|
177
|
+
// The journal answers: a tmux-ide tmux built before the split command.
|
|
178
|
+
if (events.output !== undefined)
|
|
179
|
+
return "older";
|
|
180
|
+
return "unknown";
|
|
181
|
+
}
|
|
176
182
|
if (split.output !== undefined && events.output !== undefined) {
|
|
177
183
|
try {
|
|
178
184
|
return nativeSplitCapability(split.output) ? "full" : "partial";
|
|
@@ -192,13 +198,14 @@ export function tmuxFeaturesRow(probeServer, probeBinary) {
|
|
|
192
198
|
const details = {
|
|
193
199
|
full: "bundled tmux: full features",
|
|
194
200
|
stock: "stock tmux: reduced features",
|
|
201
|
+
older: "older tmux-ide tmux: reduced features (restart it with tmux-ide's own tmux for every feature; that ends its sessions)",
|
|
195
202
|
partial: "this tmux has only some tmux-ide commands: no pane dividers",
|
|
196
203
|
"no-server": "could not read the tmux server's features",
|
|
197
204
|
unknown: "could not read the tmux server's features",
|
|
198
205
|
};
|
|
199
206
|
return {
|
|
200
207
|
label: "tmux features",
|
|
201
|
-
pass: answer === "full" || answer === "stock",
|
|
208
|
+
pass: answer === "full" || answer === "stock" || answer === "older",
|
|
202
209
|
detail: details[answer],
|
|
203
210
|
optional: true,
|
|
204
211
|
};
|
|
@@ -80,23 +80,21 @@ export function createNativeSplitReadiness(options) {
|
|
|
80
80
|
pending = null;
|
|
81
81
|
}));
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
* timeout, a lost server or any other failure says nothing, so it
|
|
83
|
+
/** True only when the selected server refuses `tmux-ide-resize-split` by name: a
|
|
84
|
+
* stock tmux, or a tmux-ide tmux built before that command, which may still have
|
|
85
|
+
* the journal. A timeout, a lost server or any other failure says nothing, so it
|
|
86
|
+
* stays false. */
|
|
86
87
|
export function createStockSplitProbe(options) {
|
|
88
|
+
const command = "tmux-ide-resize-split";
|
|
87
89
|
return async () => {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if (!new RegExp(`^unknown command: ${command}$`, "mu").test(text))
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
90
|
+
try {
|
|
91
|
+
await options.runPinnedTmux([command, "-V"]);
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
const failure = error;
|
|
96
|
+
const text = String(failure?.cause?.stderr ?? failure?.stderr ?? "");
|
|
97
|
+
return new RegExp(`^unknown command: ${command}$`, "mu").test(text);
|
|
99
98
|
}
|
|
100
|
-
return true;
|
|
101
99
|
};
|
|
102
100
|
}
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
<key>CFBundlePackageType</key>
|
|
22
22
|
<string>APPL</string>
|
|
23
23
|
<key>CFBundleShortVersionString</key>
|
|
24
|
-
<string>2.9.
|
|
24
|
+
<string>2.9.20</string>
|
|
25
25
|
<key>CFBundleVersion</key>
|
|
26
|
-
<string>2.9.
|
|
26
|
+
<string>2.9.20</string>
|
|
27
27
|
<key>LSMinimumSystemVersion</key>
|
|
28
28
|
<string>11.0</string>
|
|
29
29
|
<key>LSUIElement</key>
|
|
Binary file
|
|
Binary file
|
package/packages/daemon/dist/native/TmuxIdeNotifier.app/Contents/_CodeSignature/CodeResources
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Resources/Assets.car</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
i7NYcRFn5KWT9s02gBWS2lV7Llc=
|
|
14
14
|
</data>
|
|
15
15
|
</dict>
|
|
16
16
|
<key>files2</key>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<dict>
|
|
27
27
|
<key>hash2</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
AITW218ObXrpylURnyD4C2ud6DjNc/w8unCYkbG/UDY=
|
|
30
30
|
</data>
|
|
31
31
|
</dict>
|
|
32
32
|
</dict>
|
|
@@ -588,7 +588,8 @@ export class SessionChannel {
|
|
|
588
588
|
pane.descriptor?.runtimeSessionId !== identity.runtimeSessionId ||
|
|
589
589
|
pane.descriptor?.windowId !== resolved.runtimeWindowId ||
|
|
590
590
|
this.panesBySemantic.get(pane.semanticId) !== pane ||
|
|
591
|
-
|
|
591
|
+
// A stock server has no birth ids; a server that has them must give valid ones.
|
|
592
|
+
((!stock || birth) && (!birth || !/^[1-9]\d*$/u.test(birth))) ||
|
|
592
593
|
!layout.leaves.some((visible) => visible.id === leaf.id &&
|
|
593
594
|
visible.left === leaf.left &&
|
|
594
595
|
visible.top === leaf.top &&
|
|
@@ -598,7 +599,7 @@ export class SessionChannel {
|
|
|
598
599
|
return Object.freeze({
|
|
599
600
|
runtimePaneId: pane.runtimeId,
|
|
600
601
|
semanticPaneId: pane.semanticId,
|
|
601
|
-
nativePaneBirthId:
|
|
602
|
+
nativePaneBirthId: birth || "",
|
|
602
603
|
});
|
|
603
604
|
});
|
|
604
605
|
return Object.freeze({
|
|
@@ -44,7 +44,7 @@ export class WindowSplitAuthority {
|
|
|
44
44
|
snapshot.panes.forEach((pane) => {
|
|
45
45
|
if (!/^%(0|[1-9][0-9]{0,9})$/u.test(pane.runtimePaneId) ||
|
|
46
46
|
Number(pane.runtimePaneId.slice(1)) > 0xffffffff ||
|
|
47
|
-
(!this.options.stock &&
|
|
47
|
+
(!(this.options.stock && pane.nativePaneBirthId === "") &&
|
|
48
48
|
!NativeJournalUint64SchemaZ.refine((birth) => birth !== "0").safeParse(pane.nativePaneBirthId).success))
|
|
49
49
|
throw new WindowSplitLayoutUnavailable();
|
|
50
50
|
});
|
|
@@ -182,9 +182,9 @@ function check(
|
|
|
182
182
|
type TmuxProbe = (args: readonly string[]) => string;
|
|
183
183
|
const UNKNOWN = (command: string) => new RegExp(`^unknown command: ${command}$`, "mu");
|
|
184
184
|
|
|
185
|
-
type NativeAnswer = "full" | "stock" | "partial" | "no-server" | "unknown";
|
|
186
|
-
/** The same reading of the server as the mirror's: stock
|
|
187
|
-
*
|
|
185
|
+
type NativeAnswer = "full" | "stock" | "older" | "partial" | "no-server" | "unknown";
|
|
186
|
+
/** The same reading of the server as the mirror's: the stock resize when it refuses
|
|
187
|
+
* the split command by name, and full only with the split capability it requires. */
|
|
188
188
|
function nativeCommands(probe: TmuxProbe): NativeAnswer {
|
|
189
189
|
const ask = (command: string) => {
|
|
190
190
|
try {
|
|
@@ -201,7 +201,12 @@ function nativeCommands(probe: TmuxProbe): NativeAnswer {
|
|
|
201
201
|
return "no-server";
|
|
202
202
|
const refused = (answer: { failure?: string }, command: string) =>
|
|
203
203
|
answer.failure !== undefined && UNKNOWN(command).test(answer.failure);
|
|
204
|
-
if (refused(split, "tmux-ide-resize-split")
|
|
204
|
+
if (refused(split, "tmux-ide-resize-split")) {
|
|
205
|
+
if (refused(events, "tmux-ide-events")) return "stock";
|
|
206
|
+
// The journal answers: a tmux-ide tmux built before the split command.
|
|
207
|
+
if (events.output !== undefined) return "older";
|
|
208
|
+
return "unknown";
|
|
209
|
+
}
|
|
205
210
|
if (split.output !== undefined && events.output !== undefined) {
|
|
206
211
|
try {
|
|
207
212
|
return nativeSplitCapability(split.output) ? "full" : "partial";
|
|
@@ -220,13 +225,15 @@ export function tmuxFeaturesRow(probeServer: TmuxProbe, probeBinary: TmuxProbe):
|
|
|
220
225
|
const details: Record<NativeAnswer, string> = {
|
|
221
226
|
full: "bundled tmux: full features",
|
|
222
227
|
stock: "stock tmux: reduced features",
|
|
228
|
+
older:
|
|
229
|
+
"older tmux-ide tmux: reduced features (restart it with tmux-ide's own tmux for every feature; that ends its sessions)",
|
|
223
230
|
partial: "this tmux has only some tmux-ide commands: no pane dividers",
|
|
224
231
|
"no-server": "could not read the tmux server's features",
|
|
225
232
|
unknown: "could not read the tmux server's features",
|
|
226
233
|
};
|
|
227
234
|
return {
|
|
228
235
|
label: "tmux features",
|
|
229
|
-
pass: answer === "full" || answer === "stock",
|
|
236
|
+
pass: answer === "full" || answer === "stock" || answer === "older",
|
|
230
237
|
detail: details[answer],
|
|
231
238
|
optional: true,
|
|
232
239
|
};
|
|
@@ -103,23 +103,22 @@ export function createNativeSplitReadiness(options: {
|
|
|
103
103
|
}));
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
* timeout, a lost server or any other failure says nothing, so it
|
|
106
|
+
/** True only when the selected server refuses `tmux-ide-resize-split` by name: a
|
|
107
|
+
* stock tmux, or a tmux-ide tmux built before that command, which may still have
|
|
108
|
+
* the journal. A timeout, a lost server or any other failure says nothing, so it
|
|
109
|
+
* stays false. */
|
|
109
110
|
export function createStockSplitProbe(options: {
|
|
110
111
|
runPinnedTmux: NativeSplitRunner;
|
|
111
112
|
}): () => Promise<boolean> {
|
|
113
|
+
const command = "tmux-ide-resize-split";
|
|
112
114
|
return async () => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (!new RegExp(`^unknown command: ${command}$`, "mu").test(text)) return false;
|
|
121
|
-
}
|
|
115
|
+
try {
|
|
116
|
+
await options.runPinnedTmux([command, "-V"]);
|
|
117
|
+
return false;
|
|
118
|
+
} catch (error) {
|
|
119
|
+
const failure = error as { stderr?: unknown; cause?: { stderr?: unknown } } | undefined;
|
|
120
|
+
const text = String(failure?.cause?.stderr ?? failure?.stderr ?? "");
|
|
121
|
+
return new RegExp(`^unknown command: ${command}$`, "mu").test(text);
|
|
122
122
|
}
|
|
123
|
-
return true;
|
|
124
123
|
};
|
|
125
124
|
}
|
|
@@ -1002,7 +1002,8 @@ export class SessionChannel {
|
|
|
1002
1002
|
pane.descriptor?.runtimeSessionId !== identity.runtimeSessionId ||
|
|
1003
1003
|
pane.descriptor?.windowId !== resolved.runtimeWindowId ||
|
|
1004
1004
|
this.panesBySemantic.get(pane.semanticId) !== pane ||
|
|
1005
|
-
|
|
1005
|
+
// A stock server has no birth ids; a server that has them must give valid ones.
|
|
1006
|
+
((!stock || birth) && (!birth || !/^[1-9]\d*$/u.test(birth))) ||
|
|
1006
1007
|
!layout.leaves.some(
|
|
1007
1008
|
(visible) =>
|
|
1008
1009
|
visible.id === leaf.id &&
|
|
@@ -1016,7 +1017,7 @@ export class SessionChannel {
|
|
|
1016
1017
|
return Object.freeze({
|
|
1017
1018
|
runtimePaneId: pane.runtimeId,
|
|
1018
1019
|
semanticPaneId: pane.semanticId,
|
|
1019
|
-
nativePaneBirthId:
|
|
1020
|
+
nativePaneBirthId: birth || "",
|
|
1020
1021
|
});
|
|
1021
1022
|
});
|
|
1022
1023
|
return Object.freeze({
|
|
@@ -45,7 +45,8 @@ export class WindowSplitAuthority {
|
|
|
45
45
|
private readonly options: {
|
|
46
46
|
describe(window: WindowLinkTarget): NativeSplitLayoutSnapshot;
|
|
47
47
|
serverEpoch(): string | null;
|
|
48
|
-
/** A
|
|
48
|
+
/** A server without the native split command: pane birth ids may be missing,
|
|
49
|
+
* and some splits have no resize target. */
|
|
49
50
|
stock?: boolean;
|
|
50
51
|
},
|
|
51
52
|
) {}
|
|
@@ -72,7 +73,7 @@ export class WindowSplitAuthority {
|
|
|
72
73
|
if (
|
|
73
74
|
!/^%(0|[1-9][0-9]{0,9})$/u.test(pane.runtimePaneId) ||
|
|
74
75
|
Number(pane.runtimePaneId.slice(1)) > 0xffffffff ||
|
|
75
|
-
(!this.options.stock &&
|
|
76
|
+
(!(this.options.stock && pane.nativePaneBirthId === "") &&
|
|
76
77
|
!NativeJournalUint64SchemaZ.refine((birth) => birth !== "0").safeParse(
|
|
77
78
|
pane.nativePaneBirthId,
|
|
78
79
|
).success)
|