gogcli-mcp-docs 4.7.1 → 4.8.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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "Extended Google Docs for Claude via gogcli — auth + full Docs and comments support",
10
- "version": "4.7.1"
10
+ "version": "4.8.1"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "gogcli (Docs)",
16
16
  "source": "./",
17
17
  "description": "Extended Google Docs for Claude via gogcli — auth + full Docs and comments support",
18
- "version": "4.7.1",
18
+ "version": "4.8.1",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gogcli-mcp-docs",
3
3
  "displayName": "gogcli (Docs)",
4
- "version": "4.7.1",
4
+ "version": "4.8.1",
5
5
  "description": "Extended Google Docs for Claude via gogcli — auth + full Docs and comments support",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/.mcp.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "mcpServers": {
3
3
  "gogcli-docs": {
4
- "command": "node",
4
+ "command": "npx",
5
5
  "args": [
6
- "${CLAUDE_PLUGIN_ROOT}/dist/index.js"
6
+ "-y",
7
+ "gogcli-mcp-docs"
7
8
  ],
8
9
  "env": {
9
10
  "GOG_ACCOUNT": "${GOG_ACCOUNT}",
package/dist/index.js CHANGED
@@ -773,6 +773,7 @@ __export(util_exports, {
773
773
  required: () => required,
774
774
  safeExtend: () => safeExtend,
775
775
  shallowClone: () => shallowClone,
776
+ sizeCaps: () => sizeCaps,
776
777
  slugify: () => slugify,
777
778
  stringifyPrimitive: () => stringifyPrimitive,
778
779
  toZod: () => toZod,
@@ -1292,6 +1293,18 @@ function prefixIssues(path, issues) {
1292
1293
  function unwrapMessage(message) {
1293
1294
  return typeof message === "string" ? message : message?.message;
1294
1295
  }
1296
+ function sizeCaps(defChecks) {
1297
+ const caps = [];
1298
+ for (const ch of defChecks ?? []) {
1299
+ const d = ch._zod.def;
1300
+ if (!/_(length|size)$|_equals$/.test(d.check))
1301
+ break;
1302
+ const max = d.maximum ?? d.length ?? d.size;
1303
+ if (max >= 0)
1304
+ caps.push([max, ch]);
1305
+ }
1306
+ return caps;
1307
+ }
1295
1308
  function attachSchema(issues, start, inst) {
1296
1309
  var _a3;
1297
1310
  for (let i = start; i < issues.length; i++) {
@@ -2712,7 +2725,7 @@ ${content.join("\n")}
2712
2725
  var version = {
2713
2726
  major: 4,
2714
2727
  minor: 6,
2715
- patch: 5
2728
+ patch: 7
2716
2729
  };
2717
2730
 
2718
2731
  // ../../node_modules/zod/v4/core/schemas.js
@@ -3468,6 +3481,31 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
3468
3481
  return payload;
3469
3482
  };
3470
3483
  });
3484
+ function capSize(inst, size) {
3485
+ const caps = sizeCaps(inst._zod.def.checks);
3486
+ if (!caps.length)
3487
+ return;
3488
+ const cap = Math.min(...caps.map((c) => c[0]));
3489
+ const parse3 = inst._zod.parse;
3490
+ inst._zod.parse = (payload, ctx) => {
3491
+ const n = size(payload.value);
3492
+ if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
3493
+ for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
3494
+ if (n > max && ch._zod.def.when(payload)) {
3495
+ const start = payload.issues.length;
3496
+ ch._zod.check(payload);
3497
+ payload.issues[start].continue = false;
3498
+ attachSchema(payload.issues, start, inst);
3499
+ return payload;
3500
+ }
3501
+ }
3502
+ }
3503
+ return parse3(payload, ctx);
3504
+ };
3505
+ }
3506
+ var arraySize = (input2) => Array.isArray(input2) ? input2.length : -1;
3507
+ var mapSize = (input2) => input2 instanceof Map ? input2.size : -1;
3508
+ var setSize = (input2) => input2 instanceof Set ? input2.size : -1;
3471
3509
  function handleArrayResult(result, final, index) {
3472
3510
  if (result.issues.length) {
3473
3511
  final.issues.push(...prefixIssues(index, result.issues));
@@ -3511,6 +3549,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
3511
3549
  }
3512
3550
  return payload;
3513
3551
  };
3552
+ capSize(inst, arraySize);
3514
3553
  });
3515
3554
  function handlePropertyResult(result, final, key, input2, optin, optout) {
3516
3555
  const isPresent = key in input2;
@@ -4467,6 +4506,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
4467
4506
  return Promise.all(proms).then(() => payload);
4468
4507
  return payload;
4469
4508
  };
4509
+ capSize(inst, mapSize);
4470
4510
  });
4471
4511
  function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
4472
4512
  if (keyResult.issues.length) {
@@ -4533,6 +4573,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
4533
4573
  return Promise.all(proms).then(() => payload);
4534
4574
  return payload;
4535
4575
  };
4576
+ capSize(inst, setSize);
4536
4577
  });
4537
4578
  function handleSetResult(result, final) {
4538
4579
  if (result.issues.length) {
@@ -14063,9 +14104,15 @@ function generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {
14063
14104
  doc.write(`}`);
14064
14105
  return outputVar;
14065
14106
  }
14107
+ function generateSizeGate(doc, schema, size) {
14108
+ for (const [max, check2] of sizeCaps(schema._zod.def.checks)) {
14109
+ doc.write(`if (${size} > ${numericOperand(max, check2._zod.def.check)}) return INVALID;`);
14110
+ }
14111
+ }
14066
14112
  function generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {
14067
14113
  const def = schema._zod.def;
14068
14114
  doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);
14115
+ generateSizeGate(doc, schema, `${accessor}.length`);
14069
14116
  const outputVar = buildsValue ? newVar(ctx) : null;
14070
14117
  const iVar = newVar(ctx);
14071
14118
  const elemVar = newVar(ctx);
@@ -14465,6 +14512,7 @@ function literalPropertyKey(ctx, key) {
14465
14512
  function generateMapCheck(doc, ctx, schema, accessor) {
14466
14513
  const def = schema._zod.def;
14467
14514
  doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);
14515
+ generateSizeGate(doc, schema, `${accessor}.size`);
14468
14516
  const outputVar = newVar(ctx);
14469
14517
  const kVar = newVar(ctx);
14470
14518
  const valVar = newVar(ctx);
@@ -14481,6 +14529,7 @@ function generateMapCheck(doc, ctx, schema, accessor) {
14481
14529
  function generateSetCheck(doc, ctx, schema, accessor) {
14482
14530
  const def = schema._zod.def;
14483
14531
  doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);
14532
+ generateSizeGate(doc, schema, `${accessor}.size`);
14484
14533
  const outputVar = newVar(ctx);
14485
14534
  const valVar = newVar(ctx);
14486
14535
  doc.write(`const ${outputVar} = new Set();`);
@@ -19790,7 +19839,7 @@ function date4(params) {
19790
19839
  return _coercedDate(ZodDate, params);
19791
19840
  }
19792
19841
 
19793
- // ../../node_modules/@modelcontextprotocol/core/dist/auth-BNDyLTqp.mjs
19842
+ // ../../node_modules/@modelcontextprotocol/server/node_modules/@modelcontextprotocol/core/dist/auth-BNDyLTqp.mjs
19794
19843
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
19795
19844
  var SUPPORTED_PROTOCOL_VERSIONS = [
19796
19845
  LATEST_PROTOCOL_VERSION,
@@ -34574,7 +34623,7 @@ var API_KEY_RE = new RegExp([
34574
34623
  // webhook signing secret (Stripe-style)
34575
34624
  ].map((p) => `\\b${p}`).join("|"), "g");
34576
34625
  var GOOGLE_OAUTH_TOKEN_RE = /(?<![A-Za-z0-9+/])(?:ya29\.|1\/\/)[A-Za-z0-9._-]{8,}/g;
34577
- var QUERY_SECRET_RE = new RegExp(`([?&](?:(?:access|refresh|id|auth|session|csrf|xsrf)[_-]?token|client[_-]?secret|api[_-]?secret|api[_-]?key|password|passwd|signature|token|key|sig|(?:code[_-]?)?verifier|(?:php|j)?sess(?:ion)?[_-]?id|sid|x[-_]${HEADER_NAME_RUN}?(?:api[-_]?key|token|secret|auth)${HEADER_NAME_RUN})=)[^&#\\s"'<>\`]+`, "gi");
34626
+ var QUERY_SECRET_RE = new RegExp(`([?&#;](?:(?:access|refresh|id|auth|session|csrf|xsrf|api)[_-]?token|client[_-]?secret|api[_-]?secret|api[_-]?key|password|passwd|signature|secret|token|auth|key|sig|(?:code[_-]?)?verifier|(?:php|j)?sess(?:ion)?[_-]?id|sid|x[-_]${HEADER_NAME_RUN}?(?:api[-_]?key|token|secret|auth)${HEADER_NAME_RUN})=)[^&#\\s"'<>\`]+`, "gi");
34578
34627
  var OAUTH_CODE_RE = /([?&]code=)(?=[^&#\s"'<>`]{16,})[^&#\s"'<>`]+/gi;
34579
34628
  var FORM_PASSWORD_RE = /((?:^|[\s,;:"'(\[{])(?:password|passwd)=)[^&#\s"'<>`]+/gim;
34580
34629
  var HEADER_SECRET_RE = new RegExp(`(\\b(?:x[-_]${HEADER_NAME_RUN}?(?:api[-_]?key|token|secret|auth)${HEADER_NAME_RUN}|api[-_]?key)\\s*:\\s*)[^\\s,;"'<>\`]+`, "gi");
@@ -34585,6 +34634,8 @@ var JSON_SECRET_KEYS = [
34585
34634
  "api[_-]?secret",
34586
34635
  "(?:x[_-])?api[_-]?key",
34587
34636
  "private[_-]?key",
34637
+ "aws[_-]?secret[_-]?access[_-]?key",
34638
+ // fleet-audit#1297
34588
34639
  "code[_-]?verifier",
34589
34640
  // PKCE; a bare `verifier` key is too generic for JSON
34590
34641
  `x[_-]${HEADER_NAME_RUN}?(?:api[_-]?key|token|secret|auth)${HEADER_NAME_RUN}`,
@@ -36097,7 +36148,7 @@ var PATH_FLAGS = /* @__PURE__ */ new Set(["out", "output", "out-dir", "output-di
36097
36148
  var ID_FLAGS = {
36098
36149
  drive: /* @__PURE__ */ new Set(["file", "filter-file"])
36099
36150
  };
36100
- var EXEC_FLAGS = /* @__PURE__ */ new Set(["on-change", "on-new", "mmdc"]);
36151
+ var EXEC_FLAGS = /* @__PURE__ */ new Set(["on-change", "on-new", "mmdc", "deploy"]);
36101
36152
  var SHORT_PATH_CLUSTER = /^-(?!-)[A-Za-z]*[of]/;
36102
36153
  var LONG_FLAG = /^--([A-Za-z0-9][A-Za-z0-9-]*)(?:=([\s\S]*))?$/;
36103
36154
  function isPathFlag(service, name) {
@@ -36759,6 +36810,11 @@ function commentMentions(text) {
36759
36810
  }
36760
36811
 
36761
36812
  // ../gogcli-mcp/src/tools/gmail.ts
36813
+ var signatureSchema = {
36814
+ signature: external_exports.boolean().optional().describe("Append the Gmail signature from the active send-as address"),
36815
+ signatureFrom: external_exports.string().optional().describe("Append the Gmail signature from this send-as email address"),
36816
+ signatureFile: external_exports.string().optional().describe("Append a local signature file (plain text or HTML), read on the gog server. Must be inside GOG_FILE_ROOTS. Cannot be combined with signature/signatureFrom.")
36817
+ };
36762
36818
  var replySchema = {
36763
36819
  messageId: external_exports.string().describe("Gmail message ID to reply to \u2014 the short hex `id` from gog_gmail_get / _search (or gog_gmail_messages_search, gogcli-mcp-gmail only). NOT the threadId, NOT the RFC822 `<\u2026@host>` Message-Id header."),
36764
36820
  body: external_exports.string().optional().describe("Reply body (plain text; required unless bodyHtml or bodyHtmlFile is set). Any size \u2014 a large body is written to a temp file on the gog server rather than inlined into the command line. Note gog strips trailing newlines from a file-delivered body."),
@@ -36774,9 +36830,7 @@ var replySchema = {
36774
36830
  attachInline: attachInlineParam,
36775
36831
  from: external_exports.string().optional().describe("Send from this email address (must be a verified send-as alias)"),
36776
36832
  autoFromAddressedAlias: external_exports.boolean().optional().describe("When from is omitted, send from the verified send-as alias the original message was addressed TO, instead of the account's primary address \u2014 so a reply to mail sent to an alias goes back out from that alias. Ignored when from is set."),
36777
- signature: external_exports.boolean().optional().describe("Append the Gmail signature from the active send-as address"),
36778
- signatureFrom: external_exports.string().optional().describe("Append the Gmail signature from this send-as email address"),
36779
- signatureFile: external_exports.string().optional().describe("Append a local signature file (plain text or HTML), read on the gog server"),
36833
+ ...signatureSchema,
36780
36834
  account: accountParam
36781
36835
  };
36782
36836
  var sendReplySchema = external_exports.object({ ...replySchema, confirmToken: confirmTokenParam });
@@ -36791,7 +36845,7 @@ var failIfNotEmptyParam = external_exports.boolean().optional().describe(
36791
36845
  );
36792
36846
 
36793
36847
  // ../gogcli-mcp/src/server.ts
36794
- var VERSION = true ? "4.7.1" : "0.0.0";
36848
+ var VERSION = true ? "4.8.1" : "0.0.0";
36795
36849
 
36796
36850
  // ../gogcli-mcp/src/bootstrap-auth.ts
36797
36851
  import { join as join7 } from "node:path";
@@ -36913,7 +36967,7 @@ function registerExtraDocsTools(server) {
36913
36967
  if (at) args.push(`--at=${at}`);
36914
36968
  if (occurrence !== void 0) args.push(`--occurrence=${occurrence}`);
36915
36969
  if (matchCase) args.push("--match-case");
36916
- if (tabId) args.push(`--tab-id=${tabId}`);
36970
+ if (tabId) args.push(`--tab=${tabId}`);
36917
36971
  if (segment) args.push(`--segment=${segment}`);
36918
36972
  if (batch) args.push(`--batch=${batch}`);
36919
36973
  return runOrDiagnose(args, { account });
@@ -37112,7 +37166,7 @@ function registerExtraDocsTools(server) {
37112
37166
  if (at) args.push(`--at=${at}`);
37113
37167
  if (occurrence !== void 0) args.push(`--occurrence=${occurrence}`);
37114
37168
  if (matchCase) args.push("--match-case");
37115
- if (tabId) args.push(`--tab-id=${tabId}`);
37169
+ if (tabId) args.push(`--tab=${tabId}`);
37116
37170
  if (segment) args.push(`--segment=${segment}`);
37117
37171
  if (batch) args.push(`--batch=${batch}`);
37118
37172
  return runOrDiagnose(args, { account });
@@ -37201,7 +37255,7 @@ function registerExtraDocsTools(server) {
37201
37255
  if (at) args.push(`--at=${at}`);
37202
37256
  if (occurrence !== void 0) args.push(`--occurrence=${occurrence}`);
37203
37257
  if (matchCase) args.push("--match-case");
37204
- if (tabId) args.push(`--tab-id=${tabId}`);
37258
+ if (tabId) args.push(`--tab=${tabId}`);
37205
37259
  if (segment) args.push(`--segment=${segment}`);
37206
37260
  if (pageless) args.push("--pageless");
37207
37261
  if (batch) args.push(`--batch=${batch}`);
package/manifest.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifest_version": "0.3",
4
4
  "name": "gogcli-mcp-docs",
5
5
  "display_name": "gogcli (Docs)",
6
- "version": "4.7.1",
6
+ "version": "4.8.1",
7
7
  "description": "Extended Google Docs for Claude via gogcli — auth + full Docs and comments support",
8
8
  "author": {
9
9
  "name": "Chris Hall",
package/mint.yaml CHANGED
@@ -92,7 +92,7 @@ dependencies:
92
92
  # bumping these nine pins, and the pin stored on each mcp-host registration.
93
93
  - kind: github-release
94
94
  repo: openclaw/gogcli
95
- tag: v0.43.0
95
+ tag: v0.44.0
96
96
  asset: "gogcli_*_linux_amd64.tar.gz"
97
97
  bin: [gog]
98
98
  state:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gogcli-mcp-docs",
3
- "version": "4.7.1",
3
+ "version": "4.8.1",
4
4
  "mcpName": "io.github.chrischall/gogcli-mcp-docs",
5
5
  "description": "Extended Google Docs MCP server via gogcli — all base tools plus full Docs support",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
@@ -24,8 +24,8 @@
24
24
  "test:coverage": "vitest run --coverage"
25
25
  },
26
26
  "dependencies": {
27
- "@chrischall/mcp-utils": "^3.0.0",
28
- "@modelcontextprotocol/server": "^2.3.0",
27
+ "@chrischall/mcp-utils": "^3.0.3",
28
+ "@modelcontextprotocol/server": "^2.3.1",
29
29
  "zod": "^4.6.1"
30
30
  },
31
31
  "license": "MIT",
package/server.json CHANGED
@@ -7,12 +7,12 @@
7
7
  "source": "github",
8
8
  "subfolder": "packages/gogcli-mcp-docs"
9
9
  },
10
- "version": "4.7.1",
10
+ "version": "4.8.1",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "gogcli-mcp-docs",
15
- "version": "4.7.1",
15
+ "version": "4.8.1",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },
@@ -68,7 +68,7 @@ export function registerExtraDocsTools(server: McpServer): void {
68
68
  if (at) args.push(`--at=${at}`);
69
69
  if (occurrence !== undefined) args.push(`--occurrence=${occurrence}`);
70
70
  if (matchCase) args.push('--match-case');
71
- if (tabId) args.push(`--tab-id=${tabId}`);
71
+ if (tabId) args.push(`--tab=${tabId}`);
72
72
  if (segment) args.push(`--segment=${segment}`);
73
73
  if (batch) args.push(`--batch=${batch}`);
74
74
  return runOrDiagnose(args, { account });
@@ -302,7 +302,7 @@ export function registerExtraDocsTools(server: McpServer): void {
302
302
  if (at) args.push(`--at=${at}`);
303
303
  if (occurrence !== undefined) args.push(`--occurrence=${occurrence}`);
304
304
  if (matchCase) args.push('--match-case');
305
- if (tabId) args.push(`--tab-id=${tabId}`);
305
+ if (tabId) args.push(`--tab=${tabId}`);
306
306
  if (segment) args.push(`--segment=${segment}`);
307
307
  if (batch) args.push(`--batch=${batch}`);
308
308
  return runOrDiagnose(args, { account });
@@ -395,7 +395,7 @@ export function registerExtraDocsTools(server: McpServer): void {
395
395
  if (at) args.push(`--at=${at}`);
396
396
  if (occurrence !== undefined) args.push(`--occurrence=${occurrence}`);
397
397
  if (matchCase) args.push('--match-case');
398
- if (tabId) args.push(`--tab-id=${tabId}`);
398
+ if (tabId) args.push(`--tab=${tabId}`);
399
399
  if (segment) args.push(`--segment=${segment}`);
400
400
  if (pageless) args.push('--pageless');
401
401
  if (batch) args.push(`--batch=${batch}`);
@@ -79,17 +79,17 @@ describe('gog_docs_delete', () => {
79
79
  );
80
80
  });
81
81
 
82
- it('includes --tab-id when provided', async () => {
82
+ it('includes --tab when provided', async () => {
83
83
  vi.mocked(lib.runOrDiagnose).mockResolvedValue(rawTextResult('{}'));
84
84
  const harness = await setupHandlers();
85
85
  await harness.callTool('gog_docs_delete', { docId: 'abc', start: 1, end: 5, tabId: 'tab1' });
86
86
  expect(lib.runOrDiagnose).toHaveBeenCalledWith(
87
- ['docs', 'delete', '--start=1', '--end=5', pos('abc'), '--tab-id=tab1'],
87
+ ['docs', 'delete', '--start=1', '--end=5', pos('abc'), '--tab=tab1'],
88
88
  { account: undefined },
89
89
  );
90
90
  });
91
91
 
92
- it('omits --tab-id when not provided', async () => {
92
+ it('omits --tab when not provided', async () => {
93
93
  vi.mocked(lib.runOrDiagnose).mockResolvedValue(rawTextResult('{}'));
94
94
  const harness = await setupHandlers();
95
95
  await harness.callTool('gog_docs_delete', { docId: 'abc', start: 1, end: 5 });
@@ -246,12 +246,12 @@ describe('gog_docs_insert', () => {
246
246
  );
247
247
  });
248
248
 
249
- it('includes --tab-id when provided', async () => {
249
+ it('includes --tab when provided', async () => {
250
250
  vi.mocked(lib.runOrDiagnose).mockResolvedValue(rawTextResult('{}'));
251
251
  const harness = await setupHandlers();
252
252
  await harness.callTool('gog_docs_insert', { docId: 'abc', content: 'hi', tabId: 'tab1' });
253
253
  expect(lib.runOrDiagnose).toHaveBeenCalledWith(
254
- ['docs', 'insert', pos('abc'), pos('hi'), '--tab-id=tab1'],
254
+ ['docs', 'insert', pos('abc'), pos('hi'), '--tab=tab1'],
255
255
  { account: undefined },
256
256
  );
257
257
  });
@@ -390,12 +390,12 @@ describe('gog_docs_update', () => {
390
390
  );
391
391
  });
392
392
 
393
- it('includes --tab-id when provided', async () => {
393
+ it('includes --tab when provided', async () => {
394
394
  vi.mocked(lib.runOrDiagnose).mockResolvedValue(rawTextResult('{}'));
395
395
  const harness = await setupHandlers();
396
396
  await harness.callTool('gog_docs_update', { docId: 'abc', text: 'hi', tabId: 'tab1' });
397
397
  expect(lib.runOrDiagnose).toHaveBeenCalledWith(
398
- ['docs', 'update', pos('abc'), '--text=hi', '--tab-id=tab1'],
398
+ ['docs', 'update', pos('abc'), '--text=hi', '--tab=tab1'],
399
399
  { account: undefined },
400
400
  );
401
401
  });