@systemdox/mcp-server 0.1.58 → 0.1.59

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/README.md CHANGED
@@ -301,12 +301,16 @@ npx -y @systemdox/mcp-server sync-memory --hook <workspace>
301
301
  - It syncs only the projects this computer synced before (the first sync is
302
302
  yours, in your terminal), asks nothing and rewrites nothing.
303
303
  - It prints one line per project, which Claude Code adds to the session, plus a
304
- line naming any conflict copy to tidy and one for files waiting for you, with
305
- the command to run. A value is never printed. The full report is appended to
304
+ line naming any conflict copy to tidy and one naming the files waiting for you
305
+ (the first five, then how many more), with the command to run. A value is
306
+ never printed. The full report is appended to
306
307
  `~/.claude/systemdox/<workspace>/sync-memory.log`.
307
- - One run at a time per workspace (`sync.lock`), a 20-second budget, and exit
308
- `0` always: offline or slow, it says the memory was not synced and the next
309
- session tries again.
308
+ - One run at a time per workspace (`sync.lock`), a 20-second budget counted from
309
+ the start of the process, and exit `0` always: offline or slow, it says the
310
+ memory was not synced and the next session tries again.
311
+ - A key for another workspace, or a team memory SystemDox no longer serves,
312
+ syncs nothing and leaves the folder as it is. Every file is written whole
313
+ (a temporary file, then a rename).
310
314
 
311
315
  Claude Code runs two commands itself; you never type them:
312
316
 
package/dist/cli.js CHANGED
@@ -884,6 +884,7 @@ __export(sync_memory_exports, {
884
884
  HOOK_BUDGET_MS: () => HOOK_BUDGET_MS,
885
885
  HOOK_LOCK_STALE_MS: () => HOOK_LOCK_STALE_MS,
886
886
  HOOK_LOG_MAX_BYTES: () => HOOK_LOG_MAX_BYTES,
887
+ HOOK_WAITING_NAMED: () => HOOK_WAITING_NAMED,
887
888
  SYNC_MEMORY_COMMAND: () => SYNC_MEMORY_COMMAND,
888
889
  SYNC_MEMORY_USAGE: () => SYNC_MEMORY_USAGE,
889
890
  hookLines: () => hookLines,
@@ -1411,9 +1412,14 @@ async function syncMemory(opts) {
1411
1412
  return 1;
1412
1413
  }
1413
1414
  }
1415
+ function firstNames(names) {
1416
+ const shown = names.slice(0, HOOK_WAITING_NAMED).join(", ");
1417
+ const rest = names.length - HOOK_WAITING_NAMED;
1418
+ return rest > 0 ? `${shown} and ${rest} more` : shown;
1419
+ }
1414
1420
  function hookLines(ws, project, folder, s) {
1415
1421
  if (s.outcome !== "synced") {
1416
- return [`Team memory ${ws}/${project}: not synced (${s.reason ?? "it did not finish"}); your files are unchanged and the next session tries again.`];
1422
+ return [`Team memory ${ws}/${project}: not synced (${s.reason ?? "it did not finish"}); the next session tries again.`];
1417
1423
  }
1418
1424
  const lines = [`Team memory ${ws}/${project}: version ${s.version}, ${s.pulled} pulled, ${s.pushed} pushed, ${s.deleted} deleted.`];
1419
1425
  if (s.conflictCopies.length) {
@@ -1421,7 +1427,7 @@ function hookLines(ws, project, folder, s) {
1421
1427
  }
1422
1428
  if (s.waiting.length) {
1423
1429
  lines.push(
1424
- ` ${plural(s.waiting.length, "file waits", "files wait")} for you: run \`${SYNC_MEMORY_COMMAND} --project ${project}\` in your terminal.`
1430
+ ` ${plural(s.waiting.length, "file waits", "files wait")} for you (${firstNames(s.waiting)}): run \`${SYNC_MEMORY_COMMAND} --project ${project}\` in your terminal.`
1425
1431
  );
1426
1432
  }
1427
1433
  return lines;
@@ -1595,7 +1601,7 @@ async function runSyncMemory(argv, io, env = process.env) {
1595
1601
  }
1596
1602
  return syncMemory({ ...args2, client, out: (...lines) => lines.forEach((l) => io.out(l)), ask: io.ask, now: io.now });
1597
1603
  }
1598
- var SYNC_MEMORY_USAGE, HOOK_BUDGET_MS, HOOK_LOCK_STALE_MS, HOOK_LOG_MAX_BYTES, SYNC_MEMORY_COMMAND, SyncFailed, SyncStopped, toPath, LEFT_TEMP_RE, Report, ANSWER_WORDS, sameManifest, plural;
1604
+ var SYNC_MEMORY_USAGE, HOOK_BUDGET_MS, HOOK_LOCK_STALE_MS, HOOK_LOG_MAX_BYTES, SYNC_MEMORY_COMMAND, SyncFailed, SyncStopped, toPath, LEFT_TEMP_RE, Report, ANSWER_WORDS, sameManifest, plural, HOOK_WAITING_NAMED;
1599
1605
  var init_sync_memory = __esm({
1600
1606
  "src/sync-memory.ts"() {
1601
1607
  "use strict";
@@ -1702,6 +1708,7 @@ var init_sync_memory = __esm({
1702
1708
  };
1703
1709
  sameManifest = (a, b) => Object.keys(a).length === Object.keys(b).length && Object.entries(a).every(([p, h]) => b[p] === h);
1704
1710
  plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
1711
+ HOOK_WAITING_NAMED = 5;
1705
1712
  }
1706
1713
  });
1707
1714
 
@@ -5758,7 +5765,7 @@ var init_server = __esm({
5758
5765
  init_create_prompt_template();
5759
5766
  init_skills2();
5760
5767
  init_team_setup();
5761
- SERVER_VERSION = true ? "0.1.58" : "0.0.0-dev";
5768
+ SERVER_VERSION = true ? "0.1.59" : "0.0.0-dev";
5762
5769
  READ_TOOLS = [
5763
5770
  "get_context",
5764
5771
  "get_checks",
package/dist/http.js CHANGED
@@ -4102,7 +4102,7 @@ function registerTeamSetupTools(server, apiClient, { localFiles }) {
4102
4102
  }
4103
4103
 
4104
4104
  // src/server.ts
4105
- var SERVER_VERSION = true ? "0.1.58" : "0.0.0-dev";
4105
+ var SERVER_VERSION = true ? "0.1.59" : "0.0.0-dev";
4106
4106
  var READ_TOOLS = [
4107
4107
  "get_context",
4108
4108
  "get_checks",
package/dist/index.js CHANGED
@@ -4156,7 +4156,7 @@ function registerTeamSetupTools(server, apiClient2, { localFiles }) {
4156
4156
  }
4157
4157
 
4158
4158
  // src/server.ts
4159
- var SERVER_VERSION = true ? "0.1.58" : "0.0.0-dev";
4159
+ var SERVER_VERSION = true ? "0.1.59" : "0.0.0-dev";
4160
4160
  var READ_TOOLS = [
4161
4161
  "get_context",
4162
4162
  "get_checks",
package/dist/server.js CHANGED
@@ -3769,7 +3769,7 @@ function registerTeamSetupTools(server, apiClient, { localFiles }) {
3769
3769
  }
3770
3770
 
3771
3771
  // src/server.ts
3772
- var SERVER_VERSION = true ? "0.1.58" : "0.0.0-dev";
3772
+ var SERVER_VERSION = true ? "0.1.59" : "0.0.0-dev";
3773
3773
  var READ_TOOLS = [
3774
3774
  "get_context",
3775
3775
  "get_checks",
@@ -53,7 +53,11 @@ export interface SyncSummary {
53
53
  deleted: number;
54
54
  /** The `.local-<date>.md` copies this run wrote. */
55
55
  conflictCopies: string[];
56
- /** The files skipped this run (waiting for the member, or refused). */
56
+ /**
57
+ * The files held back for the member at a terminal (a value nobody answered
58
+ * for, a value to rewrite, the vault not answering), sorted. A secret or a
59
+ * refusal is not here: it is in the log.
60
+ */
57
61
  waiting: string[];
58
62
  }
59
63
  export interface SyncMemoryOptions extends SyncMemoryArgs {
@@ -79,7 +83,14 @@ export declare function parseSyncMemoryArgs(argv: string[]): SyncMemoryArgs;
79
83
  * report goes to `opts.out`.
80
84
  */
81
85
  export declare function syncMemory(opts: SyncMemoryOptions): Promise<number>;
82
- /** The lines the hook prints for one project (contract.md "--hook"): never a value. */
86
+ /** How many waiting files the hook's line names before it says "and n more". */
87
+ export declare const HOOK_WAITING_NAMED = 5;
88
+ /**
89
+ * The lines the hook prints for one project (contract.md "--hook"): files and
90
+ * counts, never a value. A run that did not finish says only that the next
91
+ * session tries again: a push refused twice leaves the merge in the folder,
92
+ * so the files are not always as they were.
93
+ */
83
94
  export declare function hookLines(ws: string, project: string, folder: string, s: SyncSummary): string[];
84
95
  export interface HookIo extends CommandIo {
85
96
  client?: SyncClient;
@@ -1358,9 +1358,15 @@ async function syncMemory(opts) {
1358
1358
  }
1359
1359
  }
1360
1360
  var plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
1361
+ var HOOK_WAITING_NAMED = 5;
1362
+ function firstNames(names) {
1363
+ const shown = names.slice(0, HOOK_WAITING_NAMED).join(", ");
1364
+ const rest = names.length - HOOK_WAITING_NAMED;
1365
+ return rest > 0 ? `${shown} and ${rest} more` : shown;
1366
+ }
1361
1367
  function hookLines(ws, project, folder, s) {
1362
1368
  if (s.outcome !== "synced") {
1363
- return [`Team memory ${ws}/${project}: not synced (${s.reason ?? "it did not finish"}); your files are unchanged and the next session tries again.`];
1369
+ return [`Team memory ${ws}/${project}: not synced (${s.reason ?? "it did not finish"}); the next session tries again.`];
1364
1370
  }
1365
1371
  const lines = [`Team memory ${ws}/${project}: version ${s.version}, ${s.pulled} pulled, ${s.pushed} pushed, ${s.deleted} deleted.`];
1366
1372
  if (s.conflictCopies.length) {
@@ -1368,7 +1374,7 @@ function hookLines(ws, project, folder, s) {
1368
1374
  }
1369
1375
  if (s.waiting.length) {
1370
1376
  lines.push(
1371
- ` ${plural(s.waiting.length, "file waits", "files wait")} for you: run \`${SYNC_MEMORY_COMMAND} --project ${project}\` in your terminal.`
1377
+ ` ${plural(s.waiting.length, "file waits", "files wait")} for you (${firstNames(s.waiting)}): run \`${SYNC_MEMORY_COMMAND} --project ${project}\` in your terminal.`
1372
1378
  );
1373
1379
  }
1374
1380
  return lines;
@@ -1546,6 +1552,7 @@ export {
1546
1552
  HOOK_BUDGET_MS,
1547
1553
  HOOK_LOCK_STALE_MS,
1548
1554
  HOOK_LOG_MAX_BYTES,
1555
+ HOOK_WAITING_NAMED,
1549
1556
  SYNC_MEMORY_COMMAND,
1550
1557
  SYNC_MEMORY_USAGE,
1551
1558
  hookLines,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@systemdox/mcp-server",
3
- "version": "0.1.58",
3
+ "version": "0.1.59",
4
4
  "mcpName": "io.github.puglieseweb/systemdox",
5
5
  "type": "module",
6
6
  "description": "Give AI coding agents your architecture context over MCP — checks, specs, ADRs, project rules, and docs from SystemDox, delivered at write time",