gogcli-mcp 2.18.0 → 2.18.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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "Google Sheets (and more) for Claude via gogcli — read, write, and manage spreadsheets",
10
- "version": "2.18.0"
10
+ "version": "2.18.2"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "gogcli",
16
16
  "source": "./",
17
17
  "description": "Google Sheets (and more) for Claude via gogcli — read, write, and manage spreadsheets",
18
- "version": "2.18.0",
18
+ "version": "2.18.2",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gogcli-mcp",
3
3
  "displayName": "gogcli",
4
- "version": "2.18.0",
4
+ "version": "2.18.2",
5
5
  "description": "Google Sheets (and more) for Claude via gogcli — read, write, and manage spreadsheets",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/dist/index.js CHANGED
@@ -31271,7 +31271,7 @@ async function run(args, options = {}) {
31271
31271
  }
31272
31272
  return redact(output);
31273
31273
  } catch (err) {
31274
- throw new Error(redact(err.message));
31274
+ throw new Error(redact(err instanceof Error ? err.message : String(err)));
31275
31275
  }
31276
31276
  }
31277
31277
  async function runBinary(args, options = {}) {
@@ -32412,7 +32412,9 @@ function registerDriveTools(server) {
32412
32412
  `--params=${params}`,
32413
32413
  `--body=${body}`
32414
32414
  ],
32415
- { account }
32415
+ // OCR on a large scanned PDF routinely outruns the default 30s.
32416
+ // Same precedent as the interactive auth flow in tools/auth.ts.
32417
+ { account, timeout: 3e5 }
32416
32418
  ));
32417
32419
  tempDocId = copied.id ?? copied.result?.id;
32418
32420
  if (!tempDocId) throw new Error("OCR conversion did not return a document id");
@@ -32855,7 +32857,7 @@ function registerTasksTools(server) {
32855
32857
  }
32856
32858
 
32857
32859
  // src/server.ts
32858
- var VERSION = true ? "2.18.0" : "0.0.0";
32860
+ var VERSION = true ? "2.18.2" : "0.0.0";
32859
32861
  var BASE_TOOL_REGISTRARS = [
32860
32862
  registerApiTools,
32861
32863
  registerAuthTools,
package/dist/lib.js CHANGED
@@ -23169,7 +23169,7 @@ async function run(args, options = {}) {
23169
23169
  }
23170
23170
  return redact(output);
23171
23171
  } catch (err) {
23172
- throw new Error(redact(err.message));
23172
+ throw new Error(redact(err instanceof Error ? err.message : String(err)));
23173
23173
  }
23174
23174
  }
23175
23175
  async function runBinary(args, options = {}) {
@@ -24318,7 +24318,9 @@ function registerDriveTools(server) {
24318
24318
  `--params=${params}`,
24319
24319
  `--body=${body}`
24320
24320
  ],
24321
- { account }
24321
+ // OCR on a large scanned PDF routinely outruns the default 30s.
24322
+ // Same precedent as the interactive auth flow in tools/auth.ts.
24323
+ { account, timeout: 3e5 }
24322
24324
  ));
24323
24325
  tempDocId = copied.id ?? copied.result?.id;
24324
24326
  if (!tempDocId) throw new Error("OCR conversion did not return a document id");
@@ -24761,7 +24763,7 @@ function registerTasksTools(server) {
24761
24763
  }
24762
24764
 
24763
24765
  // src/server.ts
24764
- var VERSION = true ? "2.18.0" : "0.0.0";
24766
+ var VERSION = true ? "2.18.2" : "0.0.0";
24765
24767
  var BASE_TOOL_REGISTRARS = [
24766
24768
  registerApiTools,
24767
24769
  registerAuthTools,
package/manifest.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifest_version": "0.3",
4
4
  "name": "gogcli-mcp",
5
5
  "display_name": "gogcli",
6
- "version": "2.18.0",
6
+ "version": "2.18.2",
7
7
  "description": "Google Sheets (and more) for Claude via gogcli — read, write, and manage spreadsheets",
8
8
  "author": {
9
9
  "name": "Chris Hall",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gogcli-mcp",
3
- "version": "2.18.0",
3
+ "version": "2.18.2",
4
4
  "mcpName": "io.github.chrischall/gogcli-mcp",
5
5
  "description": "MCP server wrapping gogcli for Google service access",
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"
9
9
  },
10
- "version": "2.18.0",
10
+ "version": "2.18.2",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "gogcli-mcp",
15
- "version": "2.18.0",
15
+ "version": "2.18.2",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },
package/src/runner.ts CHANGED
@@ -340,7 +340,10 @@ export async function run(args: GogArg[], options: RunOptions = {}): Promise<str
340
340
  }
341
341
  return redact(output);
342
342
  } catch (err) {
343
- throw new Error(redact((err as Error).message));
343
+ // A thrown non-Error would make `.message` undefined and redact() blow up
344
+ // with a TypeError, masking the real failure. Same instanceof guard the
345
+ // codebase already uses in errorText() (tools/utils.ts).
346
+ throw new Error(redact(err instanceof Error ? err.message : String(err)));
344
347
  }
345
348
  }
346
349
 
@@ -168,7 +168,9 @@ export function registerDriveTools(server: McpServer): void {
168
168
  const copied = JSON.parse(await run(
169
169
  ['api', 'call', 'drive', 'v3', 'files.copy', '--allow-write', '--force',
170
170
  `--params=${params}`, `--body=${body}`],
171
- { account },
171
+ // OCR on a large scanned PDF routinely outruns the default 30s.
172
+ // Same precedent as the interactive auth flow in tools/auth.ts.
173
+ { account, timeout: 300_000 },
172
174
  )) as { id?: string; result?: { id?: string } };
173
175
  tempDocId = copied.id ?? copied.result?.id;
174
176
  if (!tempDocId) throw new Error('OCR conversion did not return a document id');
package/src/worker.ts CHANGED
@@ -38,7 +38,7 @@ import { gogAuth, type GogProps } from './connector-auth.js';
38
38
  // connector with all ~360 tools at once. Add whichever paths you want as separate
39
39
  // connectors in claude.ai (each authorizes with the same connector key).
40
40
 
41
- const VERSION = '2.18.0'; // x-release-please-version
41
+ const VERSION = '2.18.2'; // x-release-please-version
42
42
 
43
43
  // Build an McpAgent subclass whose init() registers `registrars` onto its server,
44
44
  // each handler wrapped in the ALS scope carrying the per-session Fly executor.
@@ -202,6 +202,14 @@ describe('run', () => {
202
202
  .rejects.toThrow('gog exited with code 2');
203
203
  });
204
204
 
205
+ it('surfaces a non-Error throw instead of masking it with a TypeError', async () => {
206
+ // A custom executor that throws a string used to reach `(err as Error).message`
207
+ // -> undefined -> redact(undefined) -> TypeError, hiding the real cause.
208
+ const spawner = vi.fn(() => { throw 'gog binary vanished'; }) as unknown as Spawner;
209
+ await expect(run(['sheets', 'get', 'x', 'A1'], { spawner }))
210
+ .rejects.toThrow('gog binary vanished');
211
+ });
212
+
205
213
  it('rejects on spawn error', async () => {
206
214
  const spawner = vi.fn(() => {
207
215
  const proc = new EventEmitter() as ReturnType<Spawner>;
@@ -244,10 +244,13 @@ describe('gog_drive_extract_text', () => {
244
244
  const j = JSON.parse(result.content[0].text as string);
245
245
  expect(j).toMatchObject({ fileId: 'pdf1', name: 'Guest_Copy.pdf', mimeType: 'application/pdf', extractedVia: 'ocr-convert' });
246
246
  expect(j.text).toBe('UTOPIA OF THE SEAS itinerary'); // BOM stripped
247
+ // The copy is the OCR pass itself and carries an extended timeout: a large
248
+ // scanned PDF routinely outruns the runner's 30s default, and the whole
249
+ // conversion is wasted when it does.
247
250
  expect(runner.run).toHaveBeenCalledWith(
248
251
  ['api', 'call', 'drive', 'v3', 'files.copy', '--allow-write', '--force',
249
252
  '--params={"fileId":"pdf1"}', '--body={"name":"gogcli-ocr-pdf1","mimeType":"application/vnd.google-apps.document"}'],
250
- { account: undefined },
253
+ { account: undefined, timeout: 300_000 },
251
254
  );
252
255
  expect(runner.run).toHaveBeenCalledWith(
253
256
  ['api', 'call', 'drive', 'v3', 'files.export', '--params={"fileId":"tmpDoc1","mimeType":"text/plain"}'],
@@ -267,7 +270,7 @@ describe('gog_drive_extract_text', () => {
267
270
  expect(runner.run).toHaveBeenCalledWith(
268
271
  ['api', 'call', 'drive', 'v3', 'files.copy', '--allow-write', '--force',
269
272
  '--params={"fileId":"pdf1","ocrLanguage":"fr"}', '--body={"name":"gogcli-ocr-pdf1","mimeType":"application/vnd.google-apps.document"}'],
270
- { account: undefined },
273
+ { account: undefined, timeout: 300_000 },
271
274
  );
272
275
  expect(runner.run).toHaveBeenCalledWith(['drive', 'delete', 'tmpDoc2', '--permanent', '--force'], { account: undefined });
273
276
  });