mmggws 0.1.0 → 0.1.2

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
@@ -2,10 +2,18 @@
2
2
 
3
3
  Zero-config launcher for the `abom` Google Workspace MCP server.
4
4
 
5
- ## Claude Code
5
+ ## One command (Claude Code + Claude Desktop)
6
6
 
7
7
  ```bash
8
- claude mcp add abom -e ABOM_TOOLSETS=core -- npx -y mmggws
8
+ npx mmggws install
9
+ ```
10
+
11
+ Registers `abom` with both Claude Code and Claude Desktop on macOS, Linux, and Windows, each set to launch `npx -y mmggws`. Restart Claude Desktop afterward. Flags: `--clients`, `--scope`, `--name`, `--toolsets`, `--disclosure`, `--dry-run`.
12
+
13
+ ## Claude Code (manual, single client)
14
+
15
+ ```bash
16
+ claude mcp add google-workspace -e ABOM_TOOLSETS=core -- npx -y mmggws
9
17
  ```
10
18
 
11
19
  Running `abom` with no arguments starts the MCP server over stdio. If no Google token exists yet, ask Claude to call `auth_login`; it opens browser consent and stores OAuth tokens outside the package at `~/.config/gwmcp/token.json`.
package/bin/abom.js CHANGED
@@ -4,13 +4,7 @@ const { spawn } = require("node:child_process");
4
4
  const { existsSync } = require("node:fs");
5
5
  const { join } = require("node:path");
6
6
 
7
- const targets = {
8
- "darwin-arm64": "abom-darwin-arm64",
9
- "darwin-x64": "abom-darwin-amd64",
10
- "linux-arm64": "abom-linux-arm64",
11
- "linux-x64": "abom-linux-amd64",
12
- "win32-x64": "abom-windows-amd64.exe"
13
- };
7
+ const { targets } = require("./targets");
14
8
 
15
9
  const target = `${process.platform}-${process.arch}`;
16
10
  const executable = targets[target];
@@ -1,27 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const { existsSync, statSync } = require("node:fs");
3
+ const { existsSync, statSync, readFileSync } = require("node:fs");
4
4
  const { join } = require("node:path");
5
5
  const { spawnSync } = require("node:child_process");
6
+ const { createHash } = require("node:crypto");
6
7
 
7
8
  const packageJson = require("../package.json");
8
-
9
- const targets = {
10
- "darwin-arm64": "abom-darwin-arm64",
11
- "darwin-x64": "abom-darwin-amd64",
12
- "linux-arm64": "abom-linux-arm64",
13
- "linux-x64": "abom-linux-amd64",
14
- "win32-x64": "abom-windows-amd64.exe"
15
- };
16
-
17
- const required = [
18
- "abom-darwin-arm64",
19
- "abom-darwin-amd64",
20
- "abom-linux-arm64",
21
- "abom-linux-amd64",
22
- "abom-windows-amd64.exe",
23
- "SHA256SUMS"
24
- ];
9
+ const { targets, requiredArtifacts: required } = require("./targets");
25
10
 
26
11
  const vendorDir = join(__dirname, "..", "vendor");
27
12
  const missing = required.filter((name) => {
@@ -35,6 +20,36 @@ if (missing.length > 0) {
35
20
  process.exit(1);
36
21
  }
37
22
 
23
+ // Verify each vendored binary against the bundled SHA256SUMS manifest so a
24
+ // corrupted or swapped binary is caught before publish rather than by users.
25
+ const expectedSums = new Map(
26
+ readFileSync(join(vendorDir, "SHA256SUMS"), "utf8")
27
+ .split("\n")
28
+ .map((line) => line.trim())
29
+ .filter(Boolean)
30
+ .map((line) => {
31
+ const [hash, name] = line.split(/\s+/);
32
+ return [name, hash];
33
+ })
34
+ );
35
+
36
+ const mismatched = required
37
+ .filter((name) => name !== "SHA256SUMS")
38
+ .flatMap((name) => {
39
+ const want = expectedSums.get(name);
40
+ if (!want) {
41
+ return [`${name} (no SHA256SUMS entry)`];
42
+ }
43
+ const got = createHash("sha256").update(readFileSync(join(vendorDir, name))).digest("hex");
44
+ return got === want ? [] : [`${name} (expected ${want}, got ${got})`];
45
+ });
46
+
47
+ if (mismatched.length > 0) {
48
+ console.error(`abom: vendored binaries do not match SHA256SUMS: ${mismatched.join("; ")}`);
49
+ console.error("Re-run scripts/build-release.sh <version> and scripts/prepare-npm-package.sh <version>.");
50
+ process.exit(1);
51
+ }
52
+
38
53
  const currentTarget = targets[`${process.platform}-${process.arch}`];
39
54
  if (currentTarget) {
40
55
  const binaryPath = join(vendorDir, currentTarget);
package/bin/targets.js ADDED
@@ -0,0 +1,16 @@
1
+ // Single source of truth for the platform -> bundled-binary mapping shared by
2
+ // the launcher (abom.js) and the prepublish guard (check-package.js). Keep this
3
+ // list in step with the GOOS/GOARCH matrix in scripts/build-release.sh.
4
+ const targets = {
5
+ "darwin-arm64": "abom-darwin-arm64",
6
+ "darwin-x64": "abom-darwin-amd64",
7
+ "linux-arm64": "abom-linux-arm64",
8
+ "linux-x64": "abom-linux-amd64",
9
+ "win32-x64": "abom-windows-amd64.exe"
10
+ };
11
+
12
+ // The artifacts a complete package must vendor: every mapped binary plus the
13
+ // checksum manifest used to verify them.
14
+ const requiredArtifacts = [...new Set(Object.values(targets)), "SHA256SUMS"];
15
+
16
+ module.exports = { targets, requiredArtifacts };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mmggws",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Zero-config launcher for the abom Google Workspace MCP server",
5
5
  "bin": {
6
6
  "abom": "bin/abom.js"
package/vendor/SHA256SUMS CHANGED
@@ -1,5 +1,5 @@
1
- 90a250ef598a6fd0dfdc9ae46dfb865d1717f22257f47cac030a752252d5e370 abom-darwin-amd64
2
- 5ff18fff07b704630306e35d44681d1bb12ed95534f7547e3357999bdd1ee110 abom-darwin-arm64
3
- 0ba872da21e67980e8e9433765988e42e45df7c3b1fc7363b407adcca4c1a009 abom-linux-amd64
4
- 65422427a98159ec72ca9164c83bb60cf9add9135c4b16fa839cea0efca70d47 abom-linux-arm64
5
- 0e71309cf63f1d613ca598e50cc59429b2768347d36492879d3f382bd7808318 abom-windows-amd64.exe
1
+ b74b30a974da8634a76dbf11c0f9bbe771406f3d28162a768a805216f223b12e abom-darwin-amd64
2
+ 69882cf9fe8aac555d2b9b05adf4515c80480a1051a5b106117442303b49f270 abom-darwin-arm64
3
+ 6bb14ca0b0a0437796a665ccb13adb31ed4461276344f9e8d47486a8fe127fab abom-linux-amd64
4
+ dba3679f3b3713a0f71ac2cfb787f1370171f41bba2e6683a7c8230efd1fe6cd abom-linux-arm64
5
+ c49cfead32f8b881a731e8caa19617c32512e0feb264c14c9a7f7a2c2be42409 abom-windows-amd64.exe
Binary file
Binary file
Binary file
Binary file
Binary file