@systemdox/mcp-server 0.1.45 → 0.1.47
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 +115 -0
- package/dist/cli.js +2319 -219
- package/dist/http.js +1270 -73
- package/dist/index.js +1270 -73
- package/dist/install-skill.js +117 -12
- package/dist/lib/api-client.d.ts +81 -0
- package/dist/lib/api-client.js +119 -13
- package/dist/lib/memory-sync.d.ts +150 -0
- package/dist/lib/memory-sync.js +363 -0
- package/dist/lib/person-values.d.ts +78 -0
- package/dist/lib/person-values.js +99 -0
- package/dist/lib/skills.d.ts +20 -0
- package/dist/lib/skills.js +18 -13
- package/dist/lib/team-setup-files.d.ts +88 -0
- package/dist/lib/team-setup-files.js +191 -0
- package/dist/lib/team-setup-types.d.ts +153 -0
- package/dist/plugin-path.d.ts +55 -0
- package/dist/plugin-path.js +544 -0
- package/dist/setup-team.d.ts +80 -0
- package/dist/setup-team.js +1593 -0
- package/dist/sync-memory.d.ts +53 -0
- package/dist/sync-memory.js +1219 -0
- package/dist/tools/skills.js +15 -12
- package/dist/tools/team-setup.d.ts +37 -0
- package/dist/tools/team-setup.js +1152 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -140,6 +140,121 @@ npx -y @systemdox/mcp-server install-skill <name> [--version n] [--target dir] [
|
|
|
140
140
|
Exit codes: `0` installed, `1` usage / no key / API error, `2` refused because
|
|
141
141
|
files there were edited.
|
|
142
142
|
|
|
143
|
+
### Team setup (ADR-217)
|
|
144
|
+
|
|
145
|
+
Your workspace's Claude Code setup (hooks, MCP servers, agents, commands, the
|
|
146
|
+
skills your team chose, and one team `CLAUDE.md`) is published to SystemDox and
|
|
147
|
+
reaches every member's computer as one plugin, `<workspace>-setup`.
|
|
148
|
+
|
|
149
|
+
- **`publish_setup_part`** (both servers) publishes one part: `hooks`
|
|
150
|
+
(`hooks/hooks.json` and the `scripts/` it calls), `mcp` (`.mcp.json`),
|
|
151
|
+
`agents` (`agents/*.md`), `commands` (`commands/*.md`) or `instructions`
|
|
152
|
+
(`CLAUDE.md`). On your own computer pass `directory`: only the files the part
|
|
153
|
+
accepts are read, and a link, a binary file or a file over the limits stops it
|
|
154
|
+
before anything is sent. Every part but `instructions` makes a new plugin
|
|
155
|
+
version, which each member accepts at their next update. For `mcp`, every
|
|
156
|
+
`env` and `headers` value is replaced by a `${NAME}` reference to each
|
|
157
|
+
member's own environment variable. Publishing `hooks`, `mcp`, `agents` or
|
|
158
|
+
`commands` needs the admin role (SYD-A003 otherwise).
|
|
159
|
+
- **`resolve_person`** (both servers) reads back a person a team memory names
|
|
160
|
+
by identifier (`` `con_…` (reseller, sales) ``): their label, name, phone
|
|
161
|
+
number and email address. The details are for that session only; the memory
|
|
162
|
+
keeps the identifier. It writes nothing.
|
|
163
|
+
- **`sync_memory`** (your own computer only) syncs a project's team memory, as
|
|
164
|
+
`sync-memory` below does with no one at the terminal: it never answers a
|
|
165
|
+
question about a person and never rewrites a file for one. A file that still
|
|
166
|
+
holds a phone number, an email address or a home-folder path is skipped and
|
|
167
|
+
listed with the command to run yourself. Inputs: `project`, `dryRun`.
|
|
168
|
+
|
|
169
|
+
One command sets up your computer, and the same command updates it:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npx -y @systemdox/mcp-server setup [--project <name>] [--dir <checkout>] [--yes] [--overwrite]
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
- It first writes the SystemDox MCP server into your AI tool's config, as it
|
|
176
|
+
always has. Then, when your workspace has anything published, it checks that
|
|
177
|
+
Claude Code is 2.1.316 or later (`claude update` otherwise) and shows you
|
|
178
|
+
everything it will add: the marketplace entry for `~/.claude/settings.json`,
|
|
179
|
+
the plugin with every hook command and every MCP server's command or URL
|
|
180
|
+
verbatim, the import block for `~/.claude/CLAUDE.md`, each team memory with
|
|
181
|
+
its file count and folder, and the `autoMemoryDirectory` it will set. On an
|
|
182
|
+
update it shows only what changed, with a line diff for hooks and
|
|
183
|
+
instructions. Nothing changes until you answer `y`.
|
|
184
|
+
- Then, in this order: your key goes into
|
|
185
|
+
`~/.claude/systemdox/credentials.json` (readable by you alone, and nowhere
|
|
186
|
+
else); the team instructions into `~/.claude/systemdox/<workspace>/CLAUDE.md`
|
|
187
|
+
(if you edited that file, it stops unless `--overwrite`); one marked import
|
|
188
|
+
block into `~/.claude/CLAUDE.md`; one `extraKnownMarketplaces` entry,
|
|
189
|
+
`systemdox-<workspace>`, into `~/.claude/settings.json` (nothing else in
|
|
190
|
+
either file is touched); and, for the project (`--project`, or the only
|
|
191
|
+
one), `autoMemoryDirectory` in `<checkout>/.claude/settings.local.json`
|
|
192
|
+
(`--dir`, or the current folder), followed by its first sync.
|
|
193
|
+
- Two steps are left for you, because Claude Code registers a marketplace only
|
|
194
|
+
once a session has started: open Claude Code once in any folder and close
|
|
195
|
+
it, then run `claude plugin install <workspace>-setup@systemdox-<workspace>`
|
|
196
|
+
in your own terminal and accept the command it shows. `setup` never adds the
|
|
197
|
+
marketplace through `claude` and never enables the plugin for you.
|
|
198
|
+
- `--yes` answers for you only without a terminal, and only for what you have
|
|
199
|
+
accepted before; anything new or changed is listed and stops the run.
|
|
200
|
+
- Exit codes: `0` done, `1` usage / no key / API error, `2` your edited team
|
|
201
|
+
`CLAUDE.md` would be replaced (named), `3` Claude Code missing or too old,
|
|
202
|
+
`4` not confirmed (you answered N, or `--yes` met something new).
|
|
203
|
+
|
|
204
|
+
Each project's team memory is synced file by file with one command, which you
|
|
205
|
+
run in your own terminal:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
npx -y @systemdox/mcp-server sync-memory [--project <name>] [--dir <folder>] [--import <folder>] [--dry-run]
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
- The folder is `--dir`, or `~/.claude/systemdox/<workspace>/memory/<project>/`.
|
|
212
|
+
Only `feedback`, `project` and `reference` memories and `MEMORY.md` are
|
|
213
|
+
shared; a `user` memory, a file with `share: false` and a
|
|
214
|
+
`<name>.local-<date>.md` conflict copy never leave your computer, and the
|
|
215
|
+
sync never touches them.
|
|
216
|
+
- A file changed only here goes up, one changed only by the team comes down,
|
|
217
|
+
and one changed on both sides keeps the team's text under its name and yours
|
|
218
|
+
beside it as `<name>.local-<date>.md`. `MEMORY.md` is merged line by line.
|
|
219
|
+
- Each phone number or email address is asked about once for the whole
|
|
220
|
+
workspace: `m` a member's contact, `p` someone else (with a role label, never
|
|
221
|
+
a name), `o` ours, not a person, `x` leave these files out (`share: false`),
|
|
222
|
+
`s` skip for now. After one `y/N` over the whole diff, each person becomes
|
|
223
|
+
their identifier (`` `con_…` (reseller, sales) ``) and a home folder `~`.
|
|
224
|
+
- `--import <folder>` merges a second copy of the same memory in (your first
|
|
225
|
+
sync), keeping every difference as a pair; that folder is not changed.
|
|
226
|
+
`--dry-run` shows what would be pulled, pushed, deleted, conflicted and
|
|
227
|
+
skipped, and how many values are still to answer; it asks, writes and sends
|
|
228
|
+
nothing.
|
|
229
|
+
- Exit codes: `0` synced (conflict copies and skipped files are listed, not
|
|
230
|
+
errors), `1` usage / no key / API error, `2` the team memory moved on twice
|
|
231
|
+
while syncing (your folder holds the merge; run it again).
|
|
232
|
+
|
|
233
|
+
Claude Code runs two commands itself; you never type them:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
npx -y @systemdox/mcp-server marketplace-auth
|
|
237
|
+
npx -y @systemdox/mcp-server plugin-path <workspace> --version <n> --sha256 <hash>
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
- `marketplace-auth` gives Claude Code the header for your team's marketplace.
|
|
241
|
+
It gives your key only for a SystemDox team marketplace on the API's own host
|
|
242
|
+
(`SYSTEMDOX_API_URL`, https), and only for that workspace; anything else gets
|
|
243
|
+
nothing and exit `1`. No network call, nothing written.
|
|
244
|
+
- `plugin-path` prints the folder of your team's plugin version. A version
|
|
245
|
+
already on your computer is printed with no network call. Otherwise it
|
|
246
|
+
downloads the zip, refuses it unless its SHA-256 is the one Claude Code
|
|
247
|
+
named, refuses an entry that is absolute, contains `..`, is a link or takes
|
|
248
|
+
the plugin past 20 MB, and only then unpacks it into
|
|
249
|
+
`~/.claude/systemdox/<workspace>/plugin/<n>/`. Exit codes: `0` the folder is
|
|
250
|
+
printed, `1` usage / no key / API error, `2` the SHA-256 differs or an entry
|
|
251
|
+
was refused.
|
|
252
|
+
|
|
253
|
+
Both read your key from `SYSTEMDOX_API_KEY`, then from
|
|
254
|
+
`~/.claude/systemdox/credentials.json` for the workspace (readable by you
|
|
255
|
+
alone). A key is never written into a settings file, a plugin entry or a
|
|
256
|
+
command line.
|
|
257
|
+
|
|
143
258
|
### `get_context`
|
|
144
259
|
|
|
145
260
|
The aggregator. It ranks checks, specs and docs against the task, then
|