@unhuman/wsync-cli 0.4.0 → 0.5.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.
- package/README.md +11 -2
- package/dist/wsync.mjs +20 -6
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -4,8 +4,17 @@ Connects Claude Code to a **Work Context** workstream's memories over MCP, so ev
|
|
|
4
4
|
machine or another — reads and writes the same Markdown notes: how to build, conventions, gotchas,
|
|
5
5
|
decisions, where a piece of work stands.
|
|
6
6
|
|
|
7
|
-
The CLI records nothing. It writes a link for a directory, registers the
|
|
8
|
-
(`claude mcp add …`), and then gets out of the way.
|
|
7
|
+
The CLI records nothing. It writes a link for a directory, registers the MCP server for it
|
|
8
|
+
(`claude mcp add … unhuman …`), and then gets out of the way.
|
|
9
|
+
|
|
10
|
+
The server is registered as **`unhuman`** (it was `wsync` before 0.5.0). `link` and `connect` remove an
|
|
11
|
+
old `wsync` registration for the directory, so Claude never sees the same server twice.
|
|
12
|
+
|
|
13
|
+
## What a device key reaches
|
|
14
|
+
|
|
15
|
+
A device key reaches **Work Context memories only** by default. To let Claude on that device also work
|
|
16
|
+
with flows, scenarios, runs and the rest as you, either tick **Full platform access** in **Connect a
|
|
17
|
+
device**, or widen the device later on the workstream's **Devices** tab. Narrow it again there at any time.
|
|
9
18
|
|
|
10
19
|
## Quick start
|
|
11
20
|
|
package/dist/wsync.mjs
CHANGED
|
@@ -100,7 +100,7 @@ var init_package = __esm({
|
|
|
100
100
|
"package.json"() {
|
|
101
101
|
package_default = {
|
|
102
102
|
name: "@unhuman/wsync-cli",
|
|
103
|
-
version: "0.
|
|
103
|
+
version: "0.5.0",
|
|
104
104
|
description: "Connect Claude Code to a Work Context workstream's memories over MCP: one command links a checkout and registers the MCP server.",
|
|
105
105
|
license: "UNLICENSED",
|
|
106
106
|
repository: {
|
|
@@ -230,6 +230,16 @@ var init_legacy = __esm({
|
|
|
230
230
|
}
|
|
231
231
|
});
|
|
232
232
|
|
|
233
|
+
// src/mcp.ts
|
|
234
|
+
var MCP_NAME, LEGACY_MCP_NAME;
|
|
235
|
+
var init_mcp = __esm({
|
|
236
|
+
"src/mcp.ts"() {
|
|
237
|
+
"use strict";
|
|
238
|
+
MCP_NAME = "unhuman";
|
|
239
|
+
LEGACY_MCP_NAME = "wsync";
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
|
|
233
243
|
// src/commands/link.ts
|
|
234
244
|
var link_exports = {};
|
|
235
245
|
__export(link_exports, {
|
|
@@ -271,7 +281,8 @@ async function link(key, opts = {}) {
|
|
|
271
281
|
console.log("\n Start Claude Code. Nothing else to do.");
|
|
272
282
|
}
|
|
273
283
|
function registerMcp(cwd, server, key) {
|
|
274
|
-
spawnSync("claude", ["mcp", "remove",
|
|
284
|
+
const hadLegacy = spawnSync("claude", ["mcp", "remove", LEGACY_MCP_NAME, "--scope", "local"], { cwd, stdio: "ignore" }).status === 0;
|
|
285
|
+
spawnSync("claude", ["mcp", "remove", MCP_NAME, "--scope", "local"], { cwd, stdio: "ignore" });
|
|
275
286
|
const mcp = spawnSync("claude", [
|
|
276
287
|
"mcp",
|
|
277
288
|
"add",
|
|
@@ -279,16 +290,17 @@ function registerMcp(cwd, server, key) {
|
|
|
279
290
|
"local",
|
|
280
291
|
"--transport",
|
|
281
292
|
"http",
|
|
282
|
-
|
|
293
|
+
MCP_NAME,
|
|
283
294
|
`${server}/mcp`,
|
|
284
295
|
"--header",
|
|
285
296
|
`Authorization: Bearer ${key}`
|
|
286
297
|
], { cwd, stdio: "ignore" });
|
|
287
298
|
if (mcp.status === 0) {
|
|
288
|
-
console.log(
|
|
299
|
+
console.log(` \u2713 MCP server registered for this directory as \`${MCP_NAME}\``);
|
|
300
|
+
if (hadLegacy) console.log(` \u2713 the old \`${LEGACY_MCP_NAME}\` registration for this directory is removed`);
|
|
289
301
|
} else {
|
|
290
302
|
console.log(" ! could not register MCP automatically. Run this here:");
|
|
291
|
-
console.log(` claude mcp add --scope local --transport http
|
|
303
|
+
console.log(` claude mcp add --scope local --transport http ${MCP_NAME} ${server}/mcp \\`);
|
|
292
304
|
console.log(` --header "Authorization: Bearer ${key}"`);
|
|
293
305
|
}
|
|
294
306
|
}
|
|
@@ -318,6 +330,7 @@ var init_link = __esm({
|
|
|
318
330
|
init_config();
|
|
319
331
|
init_links();
|
|
320
332
|
init_legacy();
|
|
333
|
+
init_mcp();
|
|
321
334
|
}
|
|
322
335
|
});
|
|
323
336
|
|
|
@@ -384,7 +397,7 @@ __export(status_exports, {
|
|
|
384
397
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
385
398
|
import { resolve as resolve3 } from "node:path";
|
|
386
399
|
function mcpRegistered(cwd) {
|
|
387
|
-
const r = spawnSync2("claude", ["mcp", "get",
|
|
400
|
+
const r = spawnSync2("claude", ["mcp", "get", MCP_NAME], { cwd, stdio: "ignore" });
|
|
388
401
|
if (r.error) return null;
|
|
389
402
|
return r.status === 0;
|
|
390
403
|
}
|
|
@@ -424,6 +437,7 @@ var init_status = __esm({
|
|
|
424
437
|
init_config();
|
|
425
438
|
init_links();
|
|
426
439
|
init_install();
|
|
440
|
+
init_mcp();
|
|
427
441
|
}
|
|
428
442
|
});
|
|
429
443
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhuman/wsync-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Connect Claude Code to a Work Context workstream's memories over MCP: one command links a checkout and registers the MCP server.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -29,15 +29,16 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "esbuild --bundle --platform=node --format=esm --packages=bundle --banner:js=\"import{createRequire as __wsyncCreateRequire}from'module';const require=__wsyncCreateRequire(import.meta.url);\" --outfile=dist/wsync.mjs src/bin.ts",
|
|
34
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
35
|
+
"prepublishOnly": "pnpm run build",
|
|
36
|
+
"test": "vitest run"
|
|
37
|
+
},
|
|
32
38
|
"devDependencies": {
|
|
33
39
|
"@types/node": "^22.10.0",
|
|
34
40
|
"esbuild": "^0.24.0",
|
|
35
41
|
"typescript": "^5.7.0",
|
|
36
42
|
"vitest": "^3.2.0"
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"build": "esbuild --bundle --platform=node --format=esm --packages=bundle --banner:js=\"import{createRequire as __wsyncCreateRequire}from'module';const require=__wsyncCreateRequire(import.meta.url);\" --outfile=dist/wsync.mjs src/bin.ts",
|
|
40
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
41
|
-
"test": "vitest run"
|
|
42
43
|
}
|
|
43
|
-
}
|
|
44
|
+
}
|