tandem-editor 0.17.0 → 0.18.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.
@@ -93543,8 +93543,8 @@ function resolveChannelDist(env3 = process.env, exists = existsSync) {
93543
93543
  return resolve3(PACKAGE_ROOT, "dist/channel/index.js");
93544
93544
  }
93545
93545
  function resolveCliVersion() {
93546
- if (true) return "0.17.0";
93547
- if (true) return "0.17.0";
93546
+ if (true) return "0.18.0";
93547
+ if (true) return "0.18.0";
93548
93548
  for (const rel of ["../../package.json", "../../../package.json"]) {
93549
93549
  try {
93550
93550
  const pkg = JSON.parse(readFileSync2(resolve3(__dirname2, rel), "utf8"));
@@ -130092,7 +130092,7 @@ function evaluateStaleGlobal(bundled, globalVersion) {
130092
130092
  };
130093
130093
  }
130094
130094
  async function checkStaleGlobal(r) {
130095
- const bundled = true ? "0.17.0" : null;
130095
+ const bundled = true ? "0.18.0" : null;
130096
130096
  if (!bundled) return;
130097
130097
  let globalVersion;
130098
130098
  try {
@@ -175131,7 +175131,7 @@ function registerAwarenessTools(server) {
175131
175131
  server.registerTool(
175132
175132
  "tandem_checkInbox",
175133
175133
  {
175134
- description: "Check for user actions you haven't seen yet \u2014 new comments, chat messages, and responses to your annotations. Call after completing any task, between steps, and whenever you pause. Low token cost.",
175134
+ description: "Check for user actions you haven't seen yet \u2014 new comments, chat messages, and responses to your annotations. You cannot tell whether real-time push is reaching you, so poll at a steady cadence: every 2-3 tool calls, after completing any task, between steps, and whenever you pause. Already-seen items are de-duplicated, so frequent calls are cheap and never double-report. Low token cost \u2014 when in doubt, call it.",
175135
175135
  inputSchema: {
175136
175136
  documentId: external_exports.string().optional().describe("Target document ID (defaults to active document)")
175137
175137
  },
@@ -188222,6 +188222,10 @@ function sseHandler(req, res) {
188222
188222
  }
188223
188223
  res.write(": connected\n\n");
188224
188224
  let keepalive;
188225
+ function cleanup() {
188226
+ clearInterval(keepalive);
188227
+ unsubscribe(onEvent);
188228
+ }
188225
188229
  const onEvent = (event) => {
188226
188230
  try {
188227
188231
  writeEvent(res, event);
@@ -188230,17 +188234,23 @@ function sseHandler(req, res) {
188230
188234
  "[SSE] Write failed, cleaning up subscriber:",
188231
188235
  err instanceof Error ? err.message : err
188232
188236
  );
188233
- clearInterval(keepalive);
188234
- unsubscribe(onEvent);
188237
+ cleanup();
188235
188238
  }
188236
188239
  };
188237
188240
  subscribe2(onEvent);
188238
188241
  keepalive = setInterval(() => {
188239
- res.write(": keepalive\n\n");
188242
+ try {
188243
+ if (!res.writableEnded) res.write(": keepalive\n\n");
188244
+ } catch (err) {
188245
+ console.error(
188246
+ "[SSE] Keepalive write failed, cleaning up subscriber:",
188247
+ err instanceof Error ? err.message : err
188248
+ );
188249
+ cleanup();
188250
+ }
188240
188251
  }, CHANNEL_SSE_KEEPALIVE_MS);
188241
188252
  req.on("close", () => {
188242
- clearInterval(keepalive);
188243
- unsubscribe(onEvent);
188253
+ cleanup();
188244
188254
  console.error("[SSE] Client disconnected from /api/events");
188245
188255
  });
188246
188256
  console.error("[SSE] Client connected to /api/events");
@@ -188414,7 +188424,7 @@ init_document2();
188414
188424
  init_document_service();
188415
188425
  init_docx_apply2();
188416
188426
  var esmRequire2 = createRequire2(import.meta.url);
188417
- var APP_VERSION = true ? "0.17.0" : _readVersionFromDisk();
188427
+ var APP_VERSION = true ? "0.18.0" : _readVersionFromDisk();
188418
188428
  var MCP_SDK_VERSION = true ? "1.27.1" : "0.0.0-unknown";
188419
188429
  var __dirname3 = dirname3(fileURLToPath4(import.meta.url));
188420
188430
  var CLIENT_DIST = join7(__dirname3, "../client");