claude-threads 1.37.2 → 1.38.1
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/CHANGELOG.md +14 -1
- package/README.md +1 -1
- package/bin/claude-threads-daemon +7 -6
- package/dist/index.js +610 -58
- package/dist/mcp/mcp-server.js +467 -18
- package/docs/CONFIGURATION.md +52 -0
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,20 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [1.38.1] - 2026-09-24
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Sessions start on Windows again** (#600). On Windows the bot spawned the Claude CLI with `shell: true`, which makes Node join the arguments into one cmd.exe command line without escaping them. The `|` in the session context passed as `--append-system-prompt` was read as a pipe, so every session exited with code 255 before Claude answered. Any other shell character in an argument had the same effect, including text from a user's message in the one-shot haiku calls, which made this a command-injection path too. Spawning now goes through the `cross-spawn` package: it runs a native `claude.exe` directly and escapes arguments for cmd.exe when the target is an npm `.cmd` shim. The auto-update installer (which spawned `npm.cmd` without a shell, rejected by Node since 20.12) and the self-respawn after an update use the same path. A new `windows-latest` CI job round-trips shell characters through a real `.cmd` shim, so this path is tested on Windows from now on.
|
|
12
|
+
- **Auto-restart on Windows no longer picks the WSL `bash.exe`** (#600). `bash` on PATH is often the WSL launcher, which runs the daemon script inside Linux, where the Windows paths it gets do not exist. The bot now looks for Git for Windows' bash and starts without auto-restart, with a notice, when there is none. The daemon script also stopped using `eval` to start the bot, which dropped the backslashes from a Windows path and split any path containing a space, on macOS and Linux too.
|
|
13
|
+
|
|
14
|
+
## [1.38.0] - 2026-09-24
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- **`mode: assistant` names the replies-only shape** (#590, building on #505). A platform entry already carried three fields deciding how much of the bot's scaffolding a channel sees (`sessionHeader`, `stickyMessage`, `lifecycle`), and two deployments described the same combination of all three in nearly the same words. `mode` names it: `full` (default) is the current behaviour, `assistant` hides all three so Claude's reply is the whole thread. A field set explicitly still wins, so `mode: assistant` with `sessionHeader: full` means "replies only, but keep the header". The preset expands when the config loads, so everything downstream reads the same concrete values as before and omitting `mode` behaves identically to today. `turnMarker` stays outside the preset: it is a signal for integrations reading the channel, not something a human sees. Startup warns when a preset is countermanded by an explicit field, because the setup wizard writes `sessionHeader` and `stickyMessage` whenever your answer differed from the default: adding `mode: assistant` to a wizard-made config would otherwise move `lifecycle` alone while looking like it moved everything.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- **A failed auto-update no longer retries every second forever** (#601). When the first scheduling check already met the restart condition (quiet or scheduled mode with idle sessions, ask mode with no threads), the countdown started before the 10-second check interval existed, so that interval survived and started a second countdown. The first countdown's interval was orphaned: at zero it cleared the new one instead of itself and kept firing "ready" once a second. A successful install exits the process, so this only showed when the install failed, as two posts per second (installing, failed) for as long as the bot ran. The check interval is now armed before the first check, a running countdown is never restarted, and a countdown clears its own interval at zero.
|
|
21
|
+
- **Deferring, cancelling or forcing an update now controls a running countdown** (#601). `!update defer` during the 60-second countdown left the countdown running, so the update installed anyway, and afterwards nothing re-armed the scheduler: a one-hour deferral silently became "until the next release". A deferral now stops the countdown, holds off every trigger (including late ask votes) for the window, and resumes checking when the window ends, asking again in ask mode. `!update now` during a countdown no longer installs a second time when the countdown reaches zero, and cancelling the schedule stops the countdown too.
|
|
9
22
|
|
|
10
23
|
## [1.37.2] - 2026-09-18
|
|
11
24
|
|
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
- **Files both ways** - Drop any file into the chat for Claude to read, with full multimodal for images and PDFs; Claude posts screenshots, plots, or PDFs back with `send_file` (100 MB cap)
|
|
60
60
|
- **Voice notes** - With `transcription:` configured (ElevenLabs Scribe), an audio clip is transcribed before Claude sees it and the transcript is echoed into the thread; see [Configuration](docs/CONFIGURATION.md#transcription-transcription)
|
|
61
61
|
- **Quiet mode and verbosity dials** - `!mentions on` makes a session respond only when mentioned; session headers and the channel sticky each have `full`/`minimal`/`hidden` modes
|
|
62
|
-
- **Runs on macOS, Linux, and Windows** - Windows
|
|
62
|
+
- **Runs on macOS, Linux, and Windows** - natively or inside WSL; on native Windows, auto-restart needs Git for Windows' bash
|
|
63
63
|
- **Auto-update** - The bot watches npm for new versions; `!update now` applies one from chat
|
|
64
64
|
|
|
65
65
|
## What Claude can do in your chat
|
|
@@ -52,12 +52,12 @@ if [ -n "$CLAUDE_THREADS_BIN" ]; then
|
|
|
52
52
|
echo "[daemon] Error: node not found in PATH" >&2
|
|
53
53
|
exit 1
|
|
54
54
|
fi
|
|
55
|
-
CLAUDE_THREADS_CMD=
|
|
55
|
+
CLAUDE_THREADS_CMD=(node "$CLAUDE_THREADS_BIN")
|
|
56
56
|
else
|
|
57
|
-
CLAUDE_THREADS_CMD="$CLAUDE_THREADS_BIN"
|
|
57
|
+
CLAUDE_THREADS_CMD=("$CLAUDE_THREADS_BIN")
|
|
58
58
|
fi
|
|
59
59
|
else
|
|
60
|
-
CLAUDE_THREADS_CMD=
|
|
60
|
+
CLAUDE_THREADS_CMD=(claude-threads)
|
|
61
61
|
fi
|
|
62
62
|
|
|
63
63
|
# Track restart count
|
|
@@ -115,7 +115,7 @@ log() {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
log "Starting claude-threads daemon"
|
|
118
|
-
log "Binary: $CLAUDE_THREADS_CMD"
|
|
118
|
+
log "Binary: ${CLAUDE_THREADS_CMD[*]}"
|
|
119
119
|
log "Max restarts: ${MAX_RESTARTS:-unlimited}"
|
|
120
120
|
log "Restart delay: ${RESTART_DELAY}s"
|
|
121
121
|
log "Restart on error: $RESTART_ON_ERROR"
|
|
@@ -140,9 +140,10 @@ while true; do
|
|
|
140
140
|
log "Starting claude-threads (restart #$restart_count)..."
|
|
141
141
|
|
|
142
142
|
# Run claude-threads with any remaining arguments
|
|
143
|
-
#
|
|
143
|
+
# An array, not eval: eval re-parses the path, dropping the backslashes
|
|
144
|
+
# of a Windows path and splitting one that contains a space (#600).
|
|
144
145
|
set +e
|
|
145
|
-
|
|
146
|
+
"${CLAUDE_THREADS_CMD[@]}" "$@" &
|
|
146
147
|
child_pid=$!
|
|
147
148
|
wait $child_pid
|
|
148
149
|
exit_code=$?
|