claude-garage 0.3.3 → 0.4.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/README.md +56 -1
- package/bin/garage.js +115 -2
- package/daemon/src/daemon-restart.js +87 -0
- package/daemon/src/index.js +33 -8
- package/daemon/src/poller.js +18 -2
- package/daemon/src/sessions.js +183 -22
- package/daemon/src/status.js +11 -0
- package/daemon/src/tmux.js +27 -1
- package/package.json +1 -1
- package/ui/dist/assets/{index-bVL5DcKG.js → index-CK8OO0D_.js} +18 -18
- package/ui/dist/index.html +1 -1
- package/wall/dist/garage-wall-darwin-arm64 +0 -0
package/daemon/src/tmux.js
CHANGED
|
@@ -175,8 +175,27 @@ export async function createSession(id, dir, command, extraArgs = []) {
|
|
|
175
175
|
await run("tmux", ["set-option", "-t", id, "status", "off"]).catch(() => {});
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
// p16-restart D1: in-place restart — kills the pane's running process (tmux
|
|
179
|
+
// sends SIGHUP) and starts `command` in the SAME pane/session/tmux identity
|
|
180
|
+
// in one call, so the tmux session (and everything the daemon/UI key off
|
|
181
|
+
// its name) never dies. `-c <dir>` re-roots the new command exactly the way
|
|
182
|
+
// `createSession`'s `-c` does; extraArgs join the same way createSession's
|
|
183
|
+
// do — see the comment above it. No try/catch: a tmux failure (unknown
|
|
184
|
+
// target, bad dir) rejects with tmux's stderr in the message, same as every
|
|
185
|
+
// other call through `run`.
|
|
186
|
+
//
|
|
187
|
+
// Target: `-t <id>` targets a PANE, not a session (unlike every other
|
|
188
|
+
// single-target call here, which targets a session) — bare `=<id>` exact-
|
|
189
|
+
// matches nothing (tmux looks for a pane literally named that), so a
|
|
190
|
+
// trailing `:` is required to say "this session, exactly; its active
|
|
191
|
+
// window's active pane" (garage sessions only ever have the one pane).
|
|
192
|
+
export async function respawnPane(id, dir, command, extraArgs = []) {
|
|
193
|
+
await run("tmux", ["respawn-pane", "-k", "-c", dir, "-t", `${exact(id)}:`, command, ...extraArgs]);
|
|
194
|
+
}
|
|
195
|
+
|
|
178
196
|
// p14: Claude Code's Shift+Enter (kitty protocol, ESC[13;2u) only reaches a
|
|
179
|
-
// pane if the tmux server has extended keys on and advertises them
|
|
197
|
+
// pane if the tmux server has extended keys on and advertises them (and,
|
|
198
|
+
// since 0.3.4, re-encodes in csi-u form so Option+Enter survives too) —
|
|
180
199
|
// exactly the tmux config Claude Code's own terminal docs prescribe. Server
|
|
181
200
|
// options survive until the tmux server exits, so this runs at daemon boot
|
|
182
201
|
// AND on every createSession (the server may have been started later by a
|
|
@@ -185,6 +204,13 @@ export async function createSession(id, dir, command, extraArgs = []) {
|
|
|
185
204
|
export async function ensureExtendedKeys() {
|
|
186
205
|
try {
|
|
187
206
|
await run("tmux", ["set-option", "-s", "extended-keys", "on"]);
|
|
207
|
+
// csi-u, not the default xterm `CSI 27;m;k~` form: with extended keys
|
|
208
|
+
// on, tmux re-encodes every modified key for a pane that asked for
|
|
209
|
+
// them — Option+Enter becomes `ESC[27;3;13~`, which Claude Code does
|
|
210
|
+
// not parse, so Option+Enter (its own newline binding on macOS) died
|
|
211
|
+
// inside every garage session. The kitty form (`ESC[13;3u`) is the one
|
|
212
|
+
// Claude Code already understands for Shift+Enter. tmux ≥ 3.5.
|
|
213
|
+
await run("tmux", ["set-option", "-s", "extended-keys-format", "csi-u"]).catch(() => {});
|
|
188
214
|
const { stdout } = await run("tmux", ["show-options", "-s", "terminal-features"]).catch(
|
|
189
215
|
() => ({ stdout: "" })
|
|
190
216
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-garage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Multiple Claude agents driving you crazy? Park them all in one garage: a needs-input queue that follows you across projects, a full-screen terminal TUI, and a browser wall with diff review. tmux owns the sessions; close the app and nothing dies.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Saiful Islam <saifulislamadar@gmail.com>",
|