@systemdox/mcp-server 0.1.58 → 0.1.60
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 +19 -5
- package/dist/cli.js +11 -4
- package/dist/http.js +1 -1
- package/dist/index.js +1 -1
- package/dist/server.js +1 -1
- package/dist/sync-memory.d.ts +13 -2
- package/dist/sync-memory.js +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -226,6 +226,16 @@ One command sets up your computer, and the same command updates it:
|
|
|
226
226
|
npx -y @systemdox/mcp-server setup [--project <name>] [--dir <checkout>] [--import <folder>]... [--yes] [--overwrite]
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
+
- **The key must be able to sync.** Create it in the console under Settings ›
|
|
230
|
+
API keys with **Developer** or **Architect** access on **All spaces**, with
|
|
231
|
+
**Allow changes** ticked. A key made with the defaults is a **Reader** key:
|
|
232
|
+
it reads the team setup, but SystemDox refuses its pushes (`SYD-A001`), so it
|
|
233
|
+
cannot sync a team memory.
|
|
234
|
+
- **The workspace's first team memory needs a name.** With no team memory yet,
|
|
235
|
+
name it once with `--project <name>`. Without it, `setup` installs the plugin
|
|
236
|
+
and the instructions and sets up no memory. Later computers find the only
|
|
237
|
+
team memory by themselves, and with several they ask which is the checkout's.
|
|
238
|
+
|
|
229
239
|
- It first writes the SystemDox MCP server into your AI tool's config, without
|
|
230
240
|
your key: the key is stored once, in `~/.claude/systemdox/credentials.json`
|
|
231
241
|
(readable by you alone), and a key an earlier `setup` wrote into that config
|
|
@@ -301,12 +311,16 @@ npx -y @systemdox/mcp-server sync-memory --hook <workspace>
|
|
|
301
311
|
- It syncs only the projects this computer synced before (the first sync is
|
|
302
312
|
yours, in your terminal), asks nothing and rewrites nothing.
|
|
303
313
|
- 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
|
|
305
|
-
the
|
|
314
|
+
line naming any conflict copy to tidy and one naming the files waiting for you
|
|
315
|
+
(the first five, then how many more), with the command to run. A value is
|
|
316
|
+
never printed. The full report is appended to
|
|
306
317
|
`~/.claude/systemdox/<workspace>/sync-memory.log`.
|
|
307
|
-
- One run at a time per workspace (`sync.lock`), a 20-second budget
|
|
308
|
-
`0` always: offline or slow, it says the
|
|
309
|
-
session tries again.
|
|
318
|
+
- One run at a time per workspace (`sync.lock`), a 20-second budget counted from
|
|
319
|
+
the start of the process, and exit `0` always: offline or slow, it says the
|
|
320
|
+
memory was not synced and the next session tries again.
|
|
321
|
+
- A key for another workspace, or a team memory SystemDox no longer serves,
|
|
322
|
+
syncs nothing and leaves the folder as it is. Every file is written whole
|
|
323
|
+
(a temporary file, then a rename).
|
|
310
324
|
|
|
311
325
|
Claude Code runs two commands itself; you never type them:
|
|
312
326
|
|
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"});
|
|
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.
|
|
5768
|
+
SERVER_VERSION = true ? "0.1.60" : "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.
|
|
4105
|
+
var SERVER_VERSION = true ? "0.1.60" : "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.
|
|
4159
|
+
var SERVER_VERSION = true ? "0.1.60" : "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.
|
|
3772
|
+
var SERVER_VERSION = true ? "0.1.60" : "0.0.0-dev";
|
|
3773
3773
|
var READ_TOOLS = [
|
|
3774
3774
|
"get_context",
|
|
3775
3775
|
"get_checks",
|
package/dist/sync-memory.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
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
|
-
/**
|
|
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;
|
package/dist/sync-memory.js
CHANGED
|
@@ -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"});
|
|
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.
|
|
3
|
+
"version": "0.1.60",
|
|
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",
|