tandem-editor 0.2.7 → 0.2.8

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 ADDED
@@ -0,0 +1,75 @@
1
+ # Changelog
2
+
3
+ All notable changes to Tandem will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.2.8] - 2026-04-05
9
+
10
+ ### Added
11
+
12
+ - CHANGELOG.md opens as the active tab on first startup after an npm update
13
+ - `checkVersionChange` helper tracks version transitions via `last-seen-version` file
14
+ - CHANGELOG.md now ships in the npm package
15
+
16
+ ## [0.2.7] - 2026-04-05
17
+
18
+ ### Fixed
19
+
20
+ - Force-reload (`tandem_open` with `force: true`) now clears Y.Doc in-place instead of destroying the Hocuspocus room — sidebar, observers, and connections survive
21
+ - TOCTOU fix: session deletion moved after successful reload transaction
22
+ - Observer ownership table corrected in architecture docs
23
+
24
+ ### Added
25
+
26
+ - 4 new tests for force-reload (annotation clearing, awareness clearing, .txt reload, metadata)
27
+
28
+ ## [0.2.6] - 2026-04-05
29
+
30
+ ### Fixed
31
+
32
+ - Demo script rewritten to be self-referential for recording
33
+ - Observer ownership documentation added to architecture.md
34
+
35
+ ## [0.2.5] - 2026-04-05
36
+
37
+ ### Fixed
38
+
39
+ - `tandem setup` Claude Code MCP config path updated
40
+
41
+ ## [0.2.4] - 2026-04-05
42
+
43
+ ### Fixed
44
+
45
+ - Security audit findings (DNS rebinding, CORS, input validation)
46
+
47
+ ## [0.2.3] - 2026-04-05
48
+
49
+ ### Fixed
50
+
51
+ - `tandem setup` now writes Claude Code MCP config to `~/.claude.json` instead of `~/.claude/mcp_settings.json`, which Claude Code no longer reads
52
+
53
+ ## [0.2.2] - 2025-04-05
54
+
55
+ ### Fixed
56
+
57
+ - Silent failure review findings
58
+
59
+ ## [0.2.1] - 2025-04-05
60
+
61
+ ### Fixed
62
+
63
+ - Full security audit — 25 findings across 7 categories (#172)
64
+
65
+ ## [0.2.0] - 2025-04-04
66
+
67
+ ### Added
68
+
69
+ - Initial public release on npm as `tandem-editor`
70
+ - 30 MCP tools for collaborative document editing
71
+ - Multi-document tabs with CRDT-anchored annotations
72
+ - Chat sidebar with real-time channel push
73
+ - Support for .md, .docx, .txt, .html files
74
+ - `tandem` CLI with `setup` and `start` commands
75
+ - Claude Code skill auto-installation
package/dist/cli/index.js CHANGED
@@ -337,7 +337,7 @@ var init_start = __esm({
337
337
 
338
338
  // src/cli/index.ts
339
339
  import updateNotifier from "update-notifier";
340
- var version = true ? "0.2.7" : "0.0.0-dev";
340
+ var version = true ? "0.2.8" : "0.0.0-dev";
341
341
  updateNotifier({ pkg: { name: "tandem-editor", version } }).notify();
342
342
  var args = process.argv.slice(2);
343
343
  if (args.includes("--help") || args.includes("-h")) {
@@ -214,12 +214,13 @@ function freePortUnix(port) {
214
214
  }
215
215
  }
216
216
  }
217
- var paths, SESSION_DIR;
217
+ var paths, SESSION_DIR, LAST_SEEN_VERSION_FILE;
218
218
  var init_platform = __esm({
219
219
  "src/server/platform.ts"() {
220
220
  "use strict";
221
221
  paths = envPaths("tandem", { suffix: "" });
222
222
  SESSION_DIR = path.join(paths.data, "sessions");
223
+ LAST_SEEN_VERSION_FILE = path.join(paths.data, "last-seen-version");
223
224
  }
224
225
  });
225
226
 
@@ -3577,7 +3578,7 @@ var init_launcher = __esm({
3577
3578
  });
3578
3579
 
3579
3580
  // src/server/index.ts
3580
- import path9 from "path";
3581
+ import path10 from "path";
3581
3582
  import { fileURLToPath as fileURLToPath2 } from "url";
3582
3583
 
3583
3584
  // src/server/mcp/server.ts
@@ -5678,6 +5679,26 @@ init_constants();
5678
5679
  init_manager();
5679
5680
  init_platform();
5680
5681
 
5682
+ // src/server/version-check.ts
5683
+ import fs6 from "fs/promises";
5684
+ import path9 from "path";
5685
+ async function checkVersionChange(currentVersion, versionFilePath) {
5686
+ let storedVersion = null;
5687
+ try {
5688
+ storedVersion = (await fs6.readFile(versionFilePath, "utf-8")).trim();
5689
+ } catch (err) {
5690
+ if (err.code !== "ENOENT") {
5691
+ console.error("[Tandem] Failed to read last-seen-version:", err);
5692
+ }
5693
+ }
5694
+ const result = storedVersion === null ? "first-install" : storedVersion === currentVersion ? "current" : "upgraded";
5695
+ if (result !== "current") {
5696
+ await fs6.mkdir(path9.dirname(versionFilePath), { recursive: true });
5697
+ await fs6.writeFile(versionFilePath, currentVersion, "utf-8");
5698
+ }
5699
+ return result;
5700
+ }
5701
+
5681
5702
  // src/server/error-filter.ts
5682
5703
  function isKnownHocuspocusError(err) {
5683
5704
  if (!(err instanceof Error)) return false;
@@ -5894,9 +5915,22 @@ async function main() {
5894
5915
  })
5895
5916
  ]);
5896
5917
  httpServer = srv;
5918
+ try {
5919
+ const versionStatus = await checkVersionChange(APP_VERSION, LAST_SEEN_VERSION_FILE);
5920
+ if (versionStatus === "upgraded") {
5921
+ const changelogPath = path10.resolve(
5922
+ path10.dirname(fileURLToPath2(import.meta.url)),
5923
+ "../../CHANGELOG.md"
5924
+ );
5925
+ await openFileByPath(changelogPath);
5926
+ console.error(`[Tandem] Opened CHANGELOG.md (upgraded to v${APP_VERSION})`);
5927
+ }
5928
+ } catch (err) {
5929
+ console.error("[Tandem] Version check / changelog open failed (non-fatal):", err);
5930
+ }
5897
5931
  if (getOpenDocs().size === 0 && !process.env.TANDEM_NO_SAMPLE) {
5898
- const samplePath = path9.resolve(
5899
- path9.dirname(fileURLToPath2(import.meta.url)),
5932
+ const samplePath = path10.resolve(
5933
+ path10.dirname(fileURLToPath2(import.meta.url)),
5900
5934
  "../../sample/welcome.md"
5901
5935
  );
5902
5936
  openFileByPath(samplePath).then(() => {