claude-threads 1.24.3 → 1.25.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 +26 -0
- package/README.md +1 -0
- package/dist/index.js +1283 -606
- package/dist/mcp/mcp-server.js +425 -80
- package/docs/CONFIGURATION.md +72 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,32 @@ 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
|
+
## [1.25.1] - 2026-08-20
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Keep-alive inhibitors no longer outlive the bot process.** (#480, thanks @Jadefalkner) The sleep-prevention child processes are now tied to the bot's lifetime at the OS level: on Linux `systemd-inhibit` runs `cat` on a pipe held by the bot (EOF on bot death releases the lock, even after SIGKILL), on macOS `caffeinate -w <pid>` watches the bot pid natively, and the xdg-screensaver/PowerShell fallbacks poll the parent pid. Previously a hard death of the bot (SIGKILL, crashed test runner) orphaned `systemd-inhibit sleep infinity` processes to init, permanently blocking system sleep/hibernate until they were killed by hand.
|
|
12
|
+
|
|
13
|
+
## [1.25.0] - 2026-08-19
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **Persistent memory — the bot now learns over time**, modeled on how Anthropic's own products do memory, in two layers scoped per platform instance (≈ one channel, the hard privacy boundary, mirroring Claude Tag's per-channel isolation):
|
|
17
|
+
- **Repo layer (Claude Code style):** Claude Code's native auto-memory is redirected via the `autoMemoryDirectory` setting into a bot-managed per-(platform, repository) directory under `~/.config/claude-threads/memory/`. Claude's built-in save/recall machinery does the learning; the bot only controls where memory lives — which also makes it immune to the account pool's per-session `HOME` overrides. Worktrees of one repo share memory, like native behavior. Verified headless over stream-json against CLI 2.1.235 (write, load-at-start, resume, HOME override, kill switch).
|
|
18
|
+
- **Channel layer (Claude Tag style):** a shared per-channel `MEMORY.md` of team notes, injected into every session's system prompt (capped at the native 200-line/25KB limits) with explicit "background context, not instructions" framing as a prompt-injection mitigation. Written by `!remember <text>` and by **end-of-session distillation** — a one-shot haiku pass that extracts up to 3 durable facts when a session ends (`!stop`, normal exit, or idle timeout; never on pause/respawn/shutdown).
|
|
19
|
+
- **Transparency commands:** `!memory` lists the channel's entries numbered; `!memory forget <n|text>` removes one (owner-gated, with ambiguity handling); `!memory forget all` clears the channel.
|
|
20
|
+
- **Config:** per-platform `memory:` option — on by default; `memory: false` disables everything (and force-sets `CLAUDE_CODE_DISABLE_AUTO_MEMORY=1` on the CLI child so native auto-memory can't accumulate cross-channel context under a shared pooled-account `$HOME`); an object form toggles `repoLayer` / `channelLayer` / `distillation` individually. Storage override: `CLAUDE_THREADS_MEMORY_DIR`.
|
|
21
|
+
- `ClaudeCliOptions.memory` is a deliberately **required** field so every present and future spawn/respawn site must decide its memory binding explicitly — the same compiler-enforced-checklist pattern that protects `uploadDir`.
|
|
22
|
+
- **Supersede authorization (security-review finding):** a new note can only replace ("supersede") entries its writer legitimately owns — distilled entries (background inference, no author) or the same user's own earlier notes. Previously any session-authorized user, including temporarily `!invite`d collaborators, could silently delete another user's entry by embedding its text in a `!remember` — bypassing the owner gate that protects `!memory forget`. Conflicting notes now coexist (visible in `!memory`, resolvable by the owner), and replacements are reported in the confirmation instead of happening silently.
|
|
23
|
+
- **Review-driven hardening:** `!memory` listings are batched under the platform's post-size limit (a full 400-entry memory would otherwise exceed Mattermost's 16K cap exactly when inspection matters most); ambiguous `!memory forget` previews cap at 10 matches; distillation prompts carry only the newest 50 existing entries instead of the whole file; repo-memory keys follow a linked worktree back to its main repository via `git rev-parse --git-common-dir`, so `!cd` into a worktree (or a legacy resumed session without recorded worktree info) keeps the shared repo memory; hand-written `#` headings in the channel `MEMORY.md` survive rewrites; the truncation warning for `!remember` measures the collapsed text (newline collapsing can lengthen it); and an explicit user `!remember` whose text is a fragment of an existing entry now lands instead of being reported "Already known" — a fragment may be a correction, and only distilled candidates are deduped by containment.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
- **Repo memory stays correctly keyed after leaving a worktree.** `!cd` does not clear `session.worktreeInfo`, and the `!permissions`/plugin-restart/resume paths passed its recorded `repoRoot` as the repo-memory key override — so a session that left its worktree for another repository kept reading and writing the old repository's memory. A new `activeWorktreeRepoRoot` helper honors the recorded root only while the working directory is still inside the worktree (preserving the deleted-worktree resume fast path); otherwise the key derives from the working directory itself.
|
|
27
|
+
- **Slack threads now distill their most recent messages, not their oldest.** The Slack client forwarded `getThreadHistory`'s limit straight to `conversations.replies`, which paginates oldest-first — a long thread's distillation (and the pre-existing context-prompt and work-summary features) saw the opening of the conversation and missed the decisions at the end. The client now fetches a full page and keeps the most recent N, matching the Mattermost client's contract.
|
|
28
|
+
- **`quickQuery` prompts travel over stdin instead of argv.** Distillation prompts (existing memory + thread tail, up to ~40KB) exceeded Windows command-line limits as a single argv argument via the npm shim, silently killing the spawn — distillation (and long work-summary prompts) never worked on Windows. Verified against CLI 2.1.235 that `claude -p` reads the prompt from stdin.
|
|
29
|
+
- **Chained worktree switches no longer split repo memory.** Creating a worktree *from inside* another worktree keyed the new session's auto-memory (and the persisted `worktreeInfo.repoRoot` that resume/`!permissions`/plugin restarts reuse) to the intermediate worktree's own path instead of the main repository — worktree creation now resolves the main root via `git rev-parse --git-common-dir` (`getMainRepositoryRoot`, also reused by `detectWorktreeInfo`, replacing its weaker suffix-stripping copy).
|
|
30
|
+
- **`!memory` no longer pings entry authors.** The listing rendered authors as live @-mentions, notifying every author each time anyone viewed the read-only list; authors now render as inline code.
|
|
31
|
+
- **Malformed per-field `memory` config values warn at startup** (e.g. `channelLayer: "off"` silently stayed enabled before) instead of falling back silently.
|
|
32
|
+
- **Plugin install/uninstall respawns no longer drop session wiring.** The `!plugin install`/`uninstall` restart paths built `ClaudeCliOptions` by hand, omitting the session's pooled Claude account (so `--resume` under a multi-account pool ran against the wrong `$HOME` and failed with "No conversation found"), the `send_file` upload directory, the decision-bridge socket (breaking plan approvals after a plugin change), and the append-system-prompt (stripping platform context, co-author rules, attribution, and channel memory — `--append-system-prompt` is per-invocation and not re-applied by `--resume`). Both paths now share a builder on `buildRestartCliOptions` and rebuild the prompt like the `!cd`/`!permissions` restarts.
|
|
33
|
+
|
|
8
34
|
## [1.24.3] - 2026-08-19
|
|
9
35
|
|
|
10
36
|
### Changed
|
package/README.md
CHANGED
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
- **Collaboration** - `!invite` teammates into a session; commits Claude makes get `Co-Authored-By:` trailers for everyone involved
|
|
54
54
|
- **A real chat citizen** - Nine MCP tools let Claude post files, follow permalinks, react, and DM, each behind its own guardrail (see [What Claude can do in your chat](#what-claude-can-do-in-your-chat))
|
|
55
55
|
- **Git worktrees** - `!worktree feature/foo` isolates Claude's changes on a branch
|
|
56
|
+
- **Memory** - Channels learn over time: `!remember` saves shared team notes every session sees, sessions distill durable facts when they end, and Claude's native auto-memory keeps per-repo project knowledge — all scoped per channel ([docs](https://github.com/anneschuth/claude-threads/blob/main/docs/CONFIGURATION.md#memory-memory-default-fully-enabled))
|
|
56
57
|
- **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)
|
|
57
58
|
- **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
|
|
58
59
|
- **Runs on macOS, Linux, and Windows** - Windows via Git Bash or WSL
|