claude-tmux 1.0.13 → 1.0.15
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/index.js +8 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -99,9 +99,9 @@ const server = new McpServer({
|
|
|
99
99
|
name: "claude-tmux",
|
|
100
100
|
version: "1.1.0",
|
|
101
101
|
}, {
|
|
102
|
-
instructions: `# claude-tmux
|
|
102
|
+
instructions: `# claude-tmux
|
|
103
103
|
|
|
104
|
-
Spawn Claude Code instances in tmux sessions for long-running
|
|
104
|
+
Spawn Claude Code instances in tmux sessions for long-running tasks.
|
|
105
105
|
|
|
106
106
|
## Tools
|
|
107
107
|
- **spawn**: Start a new Claude session with a prompt.
|
|
@@ -111,10 +111,9 @@ Spawn Claude Code instances in tmux sessions for long-running, independent tasks
|
|
|
111
111
|
- **kill**: Terminate a session.
|
|
112
112
|
|
|
113
113
|
## Tips
|
|
114
|
-
- Verify
|
|
115
|
-
- User can attach manually: \`tmux attach -t claude-<name>\``,
|
|
114
|
+
- Verify completion before killing. Idle sessions are fine.`,
|
|
116
115
|
});
|
|
117
|
-
server.tool("spawn", "
|
|
116
|
+
server.tool("spawn", "Start a Claude Code instance in a tmux session.", {
|
|
118
117
|
name: z.string().min(1).max(50).describe("Unique session name (e.g., 'refactor-auth', 'debug-api')"),
|
|
119
118
|
prompt: z.string().describe("Initial prompt to send to Claude on startup"),
|
|
120
119
|
workdir: z.string().describe("Working directory for Claude to operate in"),
|
|
@@ -132,7 +131,7 @@ server.tool("spawn", "Launch a new Claude Code instance in a tmux session. Creat
|
|
|
132
131
|
runTmux(`send-keys -t "${session}" 'claude --dangerously-skip-permissions "$(cat ${tempFile})" && rm ${tempFile}' Enter`);
|
|
133
132
|
return response(`Started ${session}`);
|
|
134
133
|
});
|
|
135
|
-
server.tool("read", "Wait for a
|
|
134
|
+
server.tool("read", "Wait for a session to finish and return output.", {
|
|
136
135
|
name: z.string().describe("Session name (as provided to spawn)"),
|
|
137
136
|
}, async ({ name }) => {
|
|
138
137
|
const session = sessionName(name);
|
|
@@ -142,7 +141,7 @@ server.tool("read", "Wait for a Claude session to finish working and return the
|
|
|
142
141
|
const output = await waitForIdle(session);
|
|
143
142
|
return response(output);
|
|
144
143
|
});
|
|
145
|
-
server.tool("send", "Send a
|
|
144
|
+
server.tool("send", "Send a message to a running session.", {
|
|
146
145
|
name: z.string().describe("Session name (as provided to spawn)"),
|
|
147
146
|
text: z.string().describe("Message to send to Claude"),
|
|
148
147
|
}, async ({ name, text }) => {
|
|
@@ -164,7 +163,7 @@ server.tool("send", "Send a follow-up message to a running Claude session. Use t
|
|
|
164
163
|
return response(`Error: ${errorMessage(e)}`);
|
|
165
164
|
}
|
|
166
165
|
});
|
|
167
|
-
server.tool("kill", "Terminate a
|
|
166
|
+
server.tool("kill", "Terminate a session.", {
|
|
168
167
|
name: z.string().describe("Session name (as provided to spawn)"),
|
|
169
168
|
}, async ({ name }) => {
|
|
170
169
|
const session = sessionName(name);
|
|
@@ -179,7 +178,7 @@ server.tool("kill", "Terminate a Claude tmux session and clean up resources.", {
|
|
|
179
178
|
return response(`Error: ${errorMessage(e)}`);
|
|
180
179
|
}
|
|
181
180
|
});
|
|
182
|
-
server.tool("list", "List
|
|
181
|
+
server.tool("list", "List active sessions.", {}, async () => {
|
|
183
182
|
const output = runTmuxSafe(`list-sessions -F "#{session_name}"`) ?? "";
|
|
184
183
|
const sessions = output.split('\n')
|
|
185
184
|
.filter(s => s.startsWith(SESSION_PREFIX))
|