gogcli-mcp-drive 4.1.0 → 4.2.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/index.js +73 -12
- package/manifest.json +1 -1
- package/package.json +2 -2
- package/server.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "Extended Google Drive for Claude via gogcli — auth + full Drive support (upload, download, permissions, comments, shared drives)",
|
|
10
|
-
"version": "4.
|
|
10
|
+
"version": "4.2.0"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"displayName": "gogcli (Drive)",
|
|
16
16
|
"source": "./",
|
|
17
17
|
"description": "Extended Google Drive for Claude via gogcli — auth + full Drive support (upload, download, permissions, comments, shared drives)",
|
|
18
|
-
"version": "4.
|
|
18
|
+
"version": "4.2.0",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gogcli-mcp-drive",
|
|
3
3
|
"displayName": "gogcli (Drive)",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.2.0",
|
|
5
5
|
"description": "Extended Google Drive for Claude via gogcli — auth + full Drive support (upload, download, permissions, comments, shared drives)",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Chris Hall",
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,32 @@ var __export = (target, all) => {
|
|
|
5
5
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
+
// ../../node_modules/@chrischall/mcp-utils/dist/cancel/index.js
|
|
9
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
10
|
+
var storage = new AsyncLocalStorage();
|
|
11
|
+
function withCallSignal(signal, fn) {
|
|
12
|
+
return signal ? storage.run({ signal }, fn) : fn();
|
|
13
|
+
}
|
|
14
|
+
function currentCallSignal() {
|
|
15
|
+
return storage.getStore()?.signal;
|
|
16
|
+
}
|
|
17
|
+
function killOnCancel(child, signal = "SIGTERM") {
|
|
18
|
+
const ambient = currentCallSignal();
|
|
19
|
+
if (!ambient)
|
|
20
|
+
return () => {
|
|
21
|
+
};
|
|
22
|
+
if (ambient.aborted) {
|
|
23
|
+
child.kill(signal);
|
|
24
|
+
return () => {
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
const onAbort = () => {
|
|
28
|
+
child.kill(signal);
|
|
29
|
+
};
|
|
30
|
+
ambient.addEventListener("abort", onAbort, { once: true });
|
|
31
|
+
return () => ambient.removeEventListener("abort", onAbort);
|
|
32
|
+
}
|
|
33
|
+
|
|
8
34
|
// ../../node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs
|
|
9
35
|
var __create = Object.create;
|
|
10
36
|
var __defProp2 = Object.defineProperty;
|
|
@@ -34454,17 +34480,41 @@ Hint: ${err.hint}`);
|
|
|
34454
34480
|
}
|
|
34455
34481
|
throw err;
|
|
34456
34482
|
}
|
|
34483
|
+
function callSignalFrom(args) {
|
|
34484
|
+
const ctx = args.at(-1);
|
|
34485
|
+
if (typeof ctx !== "object" || ctx === null)
|
|
34486
|
+
return void 0;
|
|
34487
|
+
const req = ctx.mcpReq;
|
|
34488
|
+
if (typeof req !== "object" || req === null)
|
|
34489
|
+
return void 0;
|
|
34490
|
+
const signal = req.signal;
|
|
34491
|
+
return signal instanceof AbortSignal ? signal : void 0;
|
|
34492
|
+
}
|
|
34457
34493
|
function surfaceToolHints(server) {
|
|
34458
34494
|
const register2 = server.registerTool.bind(server);
|
|
34459
|
-
server.registerTool = (name, config2, cb) => register2(name, config2, (...args) =>
|
|
34460
|
-
|
|
34461
|
-
|
|
34462
|
-
|
|
34463
|
-
|
|
34464
|
-
|
|
34465
|
-
|
|
34466
|
-
|
|
34467
|
-
|
|
34495
|
+
server.registerTool = (name, config2, cb) => register2(name, config2, (...args) => (
|
|
34496
|
+
// THE CALLER'S CANCELLATION, made ambient for the whole handler
|
|
34497
|
+
// (`cancel/index.ts`). The SDK delivers it and the fleet ignored it:
|
|
34498
|
+
// measured against @modelcontextprotocol/server 2.0.0, a cancelled
|
|
34499
|
+
// call aborts `ctx.mcpReq.signal` with the caller's reason and the
|
|
34500
|
+
// handler runs to completion regardless — so the HTTP request stays
|
|
34501
|
+
// in flight, the child keeps burning metered CPU, and the upstream
|
|
34502
|
+
// keeps being hit for somebody who has gone. claude.ai sent 101
|
|
34503
|
+
// cancellations in the week to 2026-09-20.
|
|
34504
|
+
//
|
|
34505
|
+
// Here because this is the one wrapper every tool already passes
|
|
34506
|
+
// through: threading the signal by hand would mean editing several
|
|
34507
|
+
// hundred handlers and missing exactly the ones nobody edits.
|
|
34508
|
+
withCallSignal(callSignalFrom(args), () => {
|
|
34509
|
+
let result;
|
|
34510
|
+
try {
|
|
34511
|
+
result = cb(...args);
|
|
34512
|
+
} catch (err) {
|
|
34513
|
+
return hintResultOrRethrow(err);
|
|
34514
|
+
}
|
|
34515
|
+
return result instanceof Promise ? result.catch(hintResultOrRethrow) : result;
|
|
34516
|
+
})
|
|
34517
|
+
));
|
|
34468
34518
|
}
|
|
34469
34519
|
async function createMcpServer(opts) {
|
|
34470
34520
|
const server = new McpServer({ name: opts.name, version: opts.version }, { supportedProtocolVersions: [...SERVER_PROTOCOL_VERSIONS] });
|
|
@@ -34899,8 +34949,15 @@ async function spawnGog(fullArgs, opts) {
|
|
|
34899
34949
|
const stdoutChunks = [];
|
|
34900
34950
|
const stderrChunks = [];
|
|
34901
34951
|
let settled = false;
|
|
34952
|
+
const cancelled = currentCallSignal();
|
|
34953
|
+
const stopWatchingCancel = killOnCancel(child);
|
|
34954
|
+
const stopWatching = () => {
|
|
34955
|
+
clearTimeout(timer);
|
|
34956
|
+
stopWatchingCancel();
|
|
34957
|
+
};
|
|
34902
34958
|
const timer = setTimeout(() => {
|
|
34903
34959
|
settled = true;
|
|
34960
|
+
stopWatchingCancel();
|
|
34904
34961
|
child.kill();
|
|
34905
34962
|
reject(new Error(`gog timed out after ${formatTimeout(effectiveTimeout)}`));
|
|
34906
34963
|
}, effectiveTimeout);
|
|
@@ -34911,9 +34968,13 @@ async function spawnGog(fullArgs, opts) {
|
|
|
34911
34968
|
stderrChunks.push(chunk);
|
|
34912
34969
|
});
|
|
34913
34970
|
child.on("close", (code) => {
|
|
34914
|
-
|
|
34971
|
+
stopWatching();
|
|
34915
34972
|
if (settled) return;
|
|
34916
34973
|
settled = true;
|
|
34974
|
+
if (cancelled?.aborted) {
|
|
34975
|
+
reject(cancelled.reason instanceof Error ? cancelled.reason : new Error("the caller cancelled this call"));
|
|
34976
|
+
return;
|
|
34977
|
+
}
|
|
34917
34978
|
const stderr = Buffer.concat(stderrChunks).toString().trim();
|
|
34918
34979
|
if (code === 0) {
|
|
34919
34980
|
if (binary) {
|
|
@@ -34931,7 +34992,7 @@ async function spawnGog(fullArgs, opts) {
|
|
|
34931
34992
|
}
|
|
34932
34993
|
});
|
|
34933
34994
|
child.on("error", (err) => {
|
|
34934
|
-
|
|
34995
|
+
stopWatching();
|
|
34935
34996
|
if (settled) return;
|
|
34936
34997
|
settled = true;
|
|
34937
34998
|
if (err.code === "ENOENT") {
|
|
@@ -35652,7 +35713,7 @@ var failIfNotEmptyParam = external_exports.boolean().optional().describe(
|
|
|
35652
35713
|
);
|
|
35653
35714
|
|
|
35654
35715
|
// ../gogcli-mcp/src/server.ts
|
|
35655
|
-
var VERSION = true ? "4.
|
|
35716
|
+
var VERSION = true ? "4.2.0" : "0.0.0";
|
|
35656
35717
|
|
|
35657
35718
|
// ../gogcli-mcp/src/bootstrap-auth.ts
|
|
35658
35719
|
import { join as join2 } from "node:path";
|
package/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifest_version": "0.3",
|
|
4
4
|
"name": "gogcli-mcp-drive",
|
|
5
5
|
"display_name": "gogcli (Drive)",
|
|
6
|
-
"version": "4.
|
|
6
|
+
"version": "4.2.0",
|
|
7
7
|
"description": "Extended Google Drive for Claude via gogcli — auth + full Drive support (upload, download, permissions, comments, shared drives)",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Chris Hall",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gogcli-mcp-drive",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"mcpName": "io.github.chrischall/gogcli-mcp-drive",
|
|
5
5
|
"description": "Extended Google Drive MCP server via gogcli — auth + full Drive support (upload/download/permissions/comments/shared drives)",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test:coverage": "vitest run --coverage"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@chrischall/mcp-utils": "^
|
|
27
|
+
"@chrischall/mcp-utils": "^2.0.0",
|
|
28
28
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
29
29
|
"zod": "^4.6.1"
|
|
30
30
|
},
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/gogcli-mcp-drive"
|
|
9
9
|
},
|
|
10
|
-
"version": "4.
|
|
10
|
+
"version": "4.2.0",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "gogcli-mcp-drive",
|
|
15
|
-
"version": "4.
|
|
15
|
+
"version": "4.2.0",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|