gogcli-mcp-drive 2.0.4 → 2.0.7
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 +8 -3
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/tests/tools/drive-extra.test.ts +2 -19
|
@@ -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": "2.0.
|
|
10
|
+
"version": "2.0.7"
|
|
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": "2.0.
|
|
18
|
+
"version": "2.0.7",
|
|
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": "2.0.
|
|
4
|
+
"version": "2.0.7",
|
|
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
|
@@ -30864,6 +30864,11 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
30864
30864
|
// ../gogcli-mcp/src/runner.ts
|
|
30865
30865
|
import { spawn } from "node:child_process";
|
|
30866
30866
|
var TIMEOUT_MS = 3e4;
|
|
30867
|
+
function envOrUndefined(key) {
|
|
30868
|
+
const value = process.env[key];
|
|
30869
|
+
if (!value || value.startsWith("${")) return void 0;
|
|
30870
|
+
return value;
|
|
30871
|
+
}
|
|
30867
30872
|
function formatTimeout(ms) {
|
|
30868
30873
|
const seconds = Math.round(ms / 1e3);
|
|
30869
30874
|
if (seconds >= 60) {
|
|
@@ -30874,7 +30879,7 @@ function formatTimeout(ms) {
|
|
|
30874
30879
|
}
|
|
30875
30880
|
async function run(args, options = {}) {
|
|
30876
30881
|
const { account, spawner = spawn, interactive = false, timeout } = options;
|
|
30877
|
-
const effectiveAccount = account ??
|
|
30882
|
+
const effectiveAccount = account ?? envOrUndefined("GOG_ACCOUNT");
|
|
30878
30883
|
const fullArgs = ["--json", "--color=never"];
|
|
30879
30884
|
if (!interactive) {
|
|
30880
30885
|
fullArgs.push("--no-input");
|
|
@@ -30886,7 +30891,7 @@ async function run(args, options = {}) {
|
|
|
30886
30891
|
const effectiveTimeout = timeout ?? TIMEOUT_MS;
|
|
30887
30892
|
return new Promise((resolve, reject) => {
|
|
30888
30893
|
const { GOG_ACCESS_TOKEN: _, ...cleanEnv } = process.env;
|
|
30889
|
-
const child = spawner(
|
|
30894
|
+
const child = spawner(envOrUndefined("GOG_PATH") ?? "gog", fullArgs, { env: cleanEnv });
|
|
30890
30895
|
const stdoutChunks = [];
|
|
30891
30896
|
const stderrChunks = [];
|
|
30892
30897
|
let settled = false;
|
|
@@ -31146,7 +31151,7 @@ function registerDriveTools(server2) {
|
|
|
31146
31151
|
}
|
|
31147
31152
|
|
|
31148
31153
|
// ../gogcli-mcp/src/server.ts
|
|
31149
|
-
var VERSION = true ? "2.0.
|
|
31154
|
+
var VERSION = true ? "2.0.7" : "0.0.0";
|
|
31150
31155
|
function createServer(options) {
|
|
31151
31156
|
return new McpServer({
|
|
31152
31157
|
name: options?.name ?? "gogcli",
|
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": "2.0.
|
|
6
|
+
"version": "2.0.7",
|
|
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": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
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>",
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/gogcli-mcp-drive"
|
|
9
9
|
},
|
|
10
|
-
"version": "2.0.
|
|
10
|
+
"version": "2.0.7",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "gogcli-mcp-drive",
|
|
15
|
-
"version": "2.0.
|
|
15
|
+
"version": "2.0.7",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
2
|
-
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
2
|
import { registerExtraDriveTools } from '../../src/tools/drive-extra.js';
|
|
4
3
|
import * as lib from '../../../gogcli-mcp/src/lib.js';
|
|
4
|
+
import { setupExtrasHandlers, toText, type ToolHandler } from '../../../gogcli-mcp/tests/helpers/extras-harness.js';
|
|
5
5
|
|
|
6
6
|
vi.mock('../../../gogcli-mcp/src/lib.js', async (importOriginal) => {
|
|
7
7
|
const actual = await importOriginal<typeof lib>();
|
|
@@ -11,29 +11,12 @@ vi.mock('../../../gogcli-mcp/src/lib.js', async (importOriginal) => {
|
|
|
11
11
|
};
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
type ToolHandler = (args: Record<string, unknown>) => Promise<{ content: Array<{ type: string; text: string }> }>;
|
|
15
|
-
|
|
16
|
-
function toText(text: string) {
|
|
17
|
-
return { content: [{ type: 'text', text }] };
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function setupHandlers(): Map<string, ToolHandler> {
|
|
21
|
-
const server = new McpServer({ name: 'test', version: '0.0.0' });
|
|
22
|
-
const handlers = new Map<string, ToolHandler>();
|
|
23
|
-
vi.spyOn(server, 'registerTool').mockImplementation((name, _config, cb) => {
|
|
24
|
-
handlers.set(name, cb as ToolHandler);
|
|
25
|
-
return undefined as never;
|
|
26
|
-
});
|
|
27
|
-
registerExtraDriveTools(server);
|
|
28
|
-
return handlers;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
14
|
let handlers: Map<string, ToolHandler>;
|
|
32
15
|
|
|
33
16
|
beforeEach(() => {
|
|
34
17
|
vi.clearAllMocks();
|
|
35
18
|
vi.mocked(lib.runOrDiagnose).mockResolvedValue(toText('{}'));
|
|
36
|
-
handlers =
|
|
19
|
+
handlers = setupExtrasHandlers(registerExtraDriveTools);
|
|
37
20
|
});
|
|
38
21
|
|
|
39
22
|
describe('gog_drive_download', () => {
|