mmggws 0.1.0 → 0.1.1
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 +1 -1
- package/bin/abom.js +1 -7
- package/bin/check-package.js +33 -18
- package/bin/targets.js +16 -0
- package/package.json +1 -1
- package/vendor/SHA256SUMS +5 -5
- package/vendor/abom-darwin-amd64 +0 -0
- package/vendor/abom-darwin-arm64 +0 -0
- package/vendor/abom-linux-amd64 +0 -0
- package/vendor/abom-linux-arm64 +0 -0
- package/vendor/abom-windows-amd64.exe +0 -0
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Zero-config launcher for the `abom` Google Workspace MCP server.
|
|
|
5
5
|
## Claude Code
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
claude mcp add
|
|
8
|
+
claude mcp add google-workspace -e ABOM_TOOLSETS=core -- npx -y mmggws
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
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];
|
package/bin/check-package.js
CHANGED
|
@@ -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
package/vendor/SHA256SUMS
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
7b90185547a359742750a76e4258a60cb9c4dc134c7b0f984a7bb0211aa16029 abom-darwin-amd64
|
|
2
|
+
70e30f8a7227c60ad0e8dd6dce7692096249754e261172d9af2d2afac07c4f0e abom-darwin-arm64
|
|
3
|
+
dc92b66c9e62da8216988342e7be5dbcf4b7c8dcdedda82ba0da0e99e4a8c568 abom-linux-amd64
|
|
4
|
+
bc93dd4076c92b98ef0669b1c7b66bbd1454d489955af71aa655748252cbff25 abom-linux-arm64
|
|
5
|
+
b3fb4a5a8217d4273ee3e0a52889461afbaa489fbe6766c4765e9791f1865a2f abom-windows-amd64.exe
|
package/vendor/abom-darwin-amd64
CHANGED
|
Binary file
|
package/vendor/abom-darwin-arm64
CHANGED
|
Binary file
|
package/vendor/abom-linux-amd64
CHANGED
|
Binary file
|
package/vendor/abom-linux-arm64
CHANGED
|
Binary file
|
|
Binary file
|