gogcli-mcp-slides 2.23.2 → 2.25.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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "Extended Google Slides for Claude via gogcli — auth + full Slides support (create, edit, export, templates, markdown)",
10
- "version": "2.23.2"
10
+ "version": "2.25.0"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "gogcli (Slides)",
16
16
  "source": "./",
17
17
  "description": "Extended Google Slides for Claude via gogcli — auth + full Slides support (create, edit, export, templates, markdown)",
18
- "version": "2.23.2",
18
+ "version": "2.25.0",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gogcli-mcp-slides",
3
3
  "displayName": "gogcli (Slides)",
4
- "version": "2.23.2",
4
+ "version": "2.25.0",
5
5
  "description": "Extended Google Slides for Claude via gogcli — auth + full Slides support (create, edit, export, templates, markdown)",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/dist/index.js CHANGED
@@ -31177,10 +31177,11 @@ function sanitizedEnv() {
31177
31177
  }
31178
31178
  return result;
31179
31179
  }
31180
+ var TOKEN_LEFT_BOUNDARY = "(?<![A-Za-z0-9+/])";
31180
31181
  var GOOGLE_TOKEN_PATTERNS = [
31181
- /ya29\.[A-Za-z0-9._\-]+/g,
31182
+ new RegExp(`${TOKEN_LEFT_BOUNDARY}ya29\\.[A-Za-z0-9._\\-]+`, "g"),
31182
31183
  // OAuth2 access tokens
31183
- /1\/\/[A-Za-z0-9._\-]+/g
31184
+ new RegExp(`${TOKEN_LEFT_BOUNDARY}1//[A-Za-z0-9._\\-]+`, "g")
31184
31185
  // OAuth2 refresh tokens
31185
31186
  ];
31186
31187
  function redactGoogleTokens(text) {
@@ -31193,6 +31194,26 @@ function redactGoogleTokens(text) {
31193
31194
  function redactSecrets2(text) {
31194
31195
  return redactGoogleTokens(redactSecrets(text));
31195
31196
  }
31197
+ var OPAQUE_FIELD_VALUE = "[A-Za-z0-9+/_-]{16,}={0,2}";
31198
+ var opaquePlaceholder = (i) => `\0gogOpaque${i}\0`;
31199
+ function redactPreservingOpaqueFields(text, fields, redact) {
31200
+ const lifted = [];
31201
+ let staged = text;
31202
+ for (const field of fields) {
31203
+ const escaped = field.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
31204
+ const re = new RegExp(`("${escaped}"\\s*:\\s*")(${OPAQUE_FIELD_VALUE})(")`, "g");
31205
+ staged = staged.replace(re, (_m, open, value, close) => {
31206
+ lifted.push(value);
31207
+ return `${open}${opaquePlaceholder(lifted.length - 1)}${close}`;
31208
+ });
31209
+ }
31210
+ if (lifted.length === 0) return redact(text);
31211
+ let redacted = redact(staged);
31212
+ lifted.forEach((value, i) => {
31213
+ redacted = redacted.split(opaquePlaceholder(i)).join(value);
31214
+ });
31215
+ return redacted;
31216
+ }
31196
31217
  function augmentedPath() {
31197
31218
  const home = process.env.HOME;
31198
31219
  const candidates = [
@@ -31223,19 +31244,24 @@ function formatTimeout(ms) {
31223
31244
  return `${ms}ms`;
31224
31245
  }
31225
31246
  async function spawnWithTempFiles(args, opts) {
31226
- const { mkdtemp, writeFile, rm } = await import("node:fs/promises");
31247
+ const { mkdtemp, mkdir, writeFile, rm } = await import("node:fs/promises");
31227
31248
  const { tmpdir } = await import("node:os");
31228
31249
  const dir = await mkdtemp(join(tmpdir(), "gogcli-mcp-"));
31229
31250
  try {
31230
31251
  const argv = [];
31252
+ let seq = 0;
31231
31253
  for (const arg of args) {
31232
31254
  if (!isGogFileArg(arg)) {
31233
31255
  argv.push(arg);
31234
31256
  continue;
31235
31257
  }
31236
- const path = join(dir, `${arg.flag}.${arg.ext ?? "txt"}`);
31237
- await writeFile(path, arg.contents, { encoding: "utf8", mode: 384 });
31238
- argv.push(`--${arg.flag}=${path}`);
31258
+ const sub = join(dir, String(seq));
31259
+ seq += 1;
31260
+ await mkdir(sub, { recursive: true, mode: 448 });
31261
+ const path = join(sub, arg.filename ?? `${arg.flag}.${arg.ext ?? "txt"}`);
31262
+ const data = arg.encoding === "base64" ? Buffer.from(arg.contents, "base64") : Buffer.from(arg.contents, "utf8");
31263
+ await writeFile(path, data, { mode: 384 });
31264
+ argv.push(arg.positional ? path : `--${arg.flag}=${path}`);
31239
31265
  }
31240
31266
  return await spawnGog(argv, opts);
31241
31267
  } finally {
@@ -31320,8 +31346,9 @@ function assembleArgs(args, opts) {
31320
31346
  return fullArgs;
31321
31347
  }
31322
31348
  async function run(args, options = {}) {
31323
- const { account, spawner, interactive = false, timeout, readonly: readonly2 = false, redactMode = "full" } = options;
31324
- const redact = redactMode === "tokens" ? redactGoogleTokens : redactSecrets2;
31349
+ const { account, spawner, interactive = false, timeout, readonly: readonly2 = false, redactMode = "full", opaqueFields } = options;
31350
+ const base = redactMode === "tokens" ? redactGoogleTokens : redactSecrets2;
31351
+ const redact = opaqueFields?.length ? (text) => redactPreservingOpaqueFields(text, opaqueFields, base) : base;
31325
31352
  const fullArgs = assembleArgs(args, { account, interactive, readonly: readonly2 });
31326
31353
  const store = activeExecutor();
31327
31354
  try {
@@ -31335,7 +31362,7 @@ async function run(args, options = {}) {
31335
31362
  }
31336
31363
  return redact(output);
31337
31364
  } catch (err) {
31338
- const message = redact(err instanceof Error ? err.message : String(err));
31365
+ const message = base(err instanceof Error ? err.message : String(err));
31339
31366
  if (isRunnerTransportError(err)) {
31340
31367
  throw new RunnerTransportError(message, err.kind, err.status);
31341
31368
  }
@@ -31731,6 +31758,7 @@ function formatAuthHealth(raw, now) {
31731
31758
  // ../gogcli-mcp/src/tools/auth.ts
31732
31759
  function registerAuthToolsWith(server, defaultServices) {
31733
31760
  const servicesDescribe = `Services to authorize: "all" or comma-separated list (e.g. "sheets,gmail,calendar"). Default: "${defaultServices}". Prefer the narrowest set you need \u2014 requesting a service whose Google API is not enabled on the OAuth client's project makes Google reject the WHOLE request with invalid_scope.`;
31761
+ const extraScopesDescribe = "Additional raw OAuth scope URIs to request, comma-separated, on top of the ones `services` implies. Use for scopes no service covers \u2014 e.g. https://www.googleapis.com/auth/bigquery.readonly, required before gog_sheets_datasource_* can read BigQuery-backed Connected Sheets. Leave unset otherwise: an extra scope whose API is not enabled on the OAuth client project makes Google reject the WHOLE authorization with invalid_scope.";
31734
31762
  server.registerTool("gog_auth_list", {
31735
31763
  description: "List the Google accounts stored in gogcli, with their scopes. This reads local configuration only \u2014 it does not contact Google and does NOT tell you whether an account still works: a signed-out account whose refresh token expired or was revoked is listed here exactly like a healthy one, scopes and all. Use gog_auth_health to check whether an account can actually authenticate.",
31736
31764
  annotations: { readOnlyHint: true },
@@ -31780,11 +31808,14 @@ function registerAuthToolsWith(server, defaultServices) {
31780
31808
  annotations: { destructiveHint: true },
31781
31809
  inputSchema: {
31782
31810
  email: external_exports.string().describe("Google account email to authorize"),
31783
- services: external_exports.string().optional().default(defaultServices).describe(servicesDescribe)
31811
+ services: external_exports.string().optional().default(defaultServices).describe(servicesDescribe),
31812
+ extraScopes: external_exports.string().optional().describe(extraScopesDescribe)
31784
31813
  }
31785
- }, async ({ email: email3, services = defaultServices }) => {
31814
+ }, async ({ email: email3, services = defaultServices, extraScopes }) => {
31786
31815
  try {
31787
- return rawTextResult(await run(["auth", "add", email3, "--services", services], {
31816
+ const args = ["auth", "add", email3, "--services", services];
31817
+ if (extraScopes) args.push(`--extra-scopes=${extraScopes}`, "--force-consent");
31818
+ return rawTextResult(await run(args, {
31788
31819
  interactive: true,
31789
31820
  timeout: 3e5
31790
31821
  }));
@@ -31796,14 +31827,14 @@ function registerAuthToolsWith(server, defaultServices) {
31796
31827
  description: "Begin REMOTE/headless Google authorization (step 1 of 2). Returns a sign-in URL to open in any browser \u2014 no local server or terminal on the gogcli host is needed, so this works over the hosted connector where the interactive gog_auth_add cannot. Hand the URL to the user; after they sign in, the browser is redirected to a localhost URL that fails to load \u2014 that is expected. They copy that full redirected URL (from the address bar) and you pass it to gog_auth_add_complete. The link is valid for 10 minutes. If you pass a custom `services` here, pass the SAME value to gog_auth_add_complete or the second step will not match this one.",
31797
31828
  inputSchema: {
31798
31829
  email: external_exports.string().describe("Google account email to authorize"),
31799
- services: external_exports.string().optional().default(defaultServices).describe(servicesDescribe)
31830
+ services: external_exports.string().optional().default(defaultServices).describe(servicesDescribe),
31831
+ extraScopes: external_exports.string().optional().describe(`${extraScopesDescribe} Pass the SAME value to gog_auth_add_complete.`)
31800
31832
  }
31801
- }, async ({ email: email3, services = defaultServices }) => {
31833
+ }, async ({ email: email3, services = defaultServices, extraScopes }) => {
31802
31834
  try {
31803
- return rawTextResult(await run(
31804
- ["auth", "add", email3, "--remote", "--step", "1", "--services", services, "--force-consent"],
31805
- { redactMode: "tokens" }
31806
- ));
31835
+ const args = ["auth", "add", email3, "--remote", "--step", "1", "--services", services, "--force-consent"];
31836
+ if (extraScopes) args.push(`--extra-scopes=${extraScopes}`);
31837
+ return rawTextResult(await run(args, { redactMode: "tokens" }));
31807
31838
  } catch (err) {
31808
31839
  return errorResult(errorText(err));
31809
31840
  }
@@ -31818,25 +31849,28 @@ function registerAuthToolsWith(server, defaultServices) {
31818
31849
  ),
31819
31850
  services: external_exports.string().optional().default(defaultServices).describe(
31820
31851
  `Services authorized \u2014 MUST match the value passed to gog_auth_add_url. Default: "${defaultServices}".`
31852
+ ),
31853
+ extraScopes: external_exports.string().optional().describe(
31854
+ "Extra OAuth scope URIs \u2014 MUST match the value passed to gog_auth_add_url, for the same reason `services` must: the two steps have to describe the same grant."
31821
31855
  )
31822
31856
  }
31823
- }, async ({ email: email3, redirectUrl, services = defaultServices }) => {
31857
+ }, async ({ email: email3, redirectUrl, services = defaultServices, extraScopes }) => {
31824
31858
  try {
31825
- return rawTextResult(await run(
31826
- [
31827
- "auth",
31828
- "add",
31829
- email3,
31830
- "--remote",
31831
- "--step",
31832
- "2",
31833
- "--auth-url",
31834
- redirectUrl,
31835
- "--services",
31836
- services,
31837
- "--force-consent"
31838
- ]
31839
- ));
31859
+ const args = [
31860
+ "auth",
31861
+ "add",
31862
+ email3,
31863
+ "--remote",
31864
+ "--step",
31865
+ "2",
31866
+ "--auth-url",
31867
+ redirectUrl,
31868
+ "--services",
31869
+ services,
31870
+ "--force-consent"
31871
+ ];
31872
+ if (extraScopes) args.push(`--extra-scopes=${extraScopes}`);
31873
+ return rawTextResult(await run(args));
31840
31874
  } catch (err) {
31841
31875
  return errorResult(errorText(err));
31842
31876
  }
@@ -31852,6 +31886,26 @@ function authToolsFor(defaultServices) {
31852
31886
  return (server) => registerAuthToolsWith(server, defaultServices);
31853
31887
  }
31854
31888
 
31889
+ // ../gogcli-mcp/src/attachments.ts
31890
+ var MAX_INLINE_ATTACHMENT_BYTES = 8 * 1024 * 1024;
31891
+ var RUNNER_MAX_BODY_BYTES = 32 * 1024 * 1024;
31892
+ var RUNNER_BODY_JSON_RESERVE_BYTES = 256 * 1024;
31893
+ var MAX_REQUEST_PAYLOAD_WIRE_BYTES = RUNNER_MAX_BODY_BYTES - RUNNER_BODY_JSON_RESERVE_BYTES;
31894
+ var MAX_INLINE_ATTACHMENT_TOTAL_BYTES = Math.floor(MAX_REQUEST_PAYLOAD_WIRE_BYTES * 3 / 4);
31895
+ var formatMiB = (bytes) => `${Math.floor(bytes / (1024 * 1024))} MiB`;
31896
+ var INLINE_ATTACHMENT_LIMITS_TEXT = `up to ${formatMiB(MAX_INLINE_ATTACHMENT_BYTES)} per file and ${formatMiB(MAX_INLINE_ATTACHMENT_TOTAL_BYTES)} in total`;
31897
+ var inlineAttachmentSchema = external_exports.object({
31898
+ filename: external_exports.string().min(1).describe(
31899
+ `Filename the recipient will see, e.g. "pendant-layouts.png". gog infers the attachment's MIME type from this extension, so give it the right one \u2014 a .png sent as "layouts" arrives as an untyped blob. Must be a single filename, not a path.`
31900
+ ),
31901
+ contentBase64: external_exports.string().min(1).describe(
31902
+ "The file's bytes, base64-encoded (standard alphabet, with padding). This is the whole point of this parameter: the bytes travel with the request, so nothing needs to exist on the gog server's filesystem."
31903
+ )
31904
+ });
31905
+ var attachInlineParam = external_exports.array(inlineAttachmentSchema).optional().describe(
31906
+ `Attachments supplied as BYTES rather than as server-side paths \u2014 use this whenever you hold a file and the gog server does not, which is always the case on the hosted connector and on any remote deployment. Each entry is {filename, contentBase64} (${INLINE_ATTACHMENT_LIMITS_TEXT}). Can be combined with \`attach\`: the two name disjoint files (paths read on the server vs. bytes sent with the call), and both end up as ordinary attachments on the message.`
31907
+ );
31908
+
31855
31909
  // ../gogcli-mcp/src/tools/sheets.ts
31856
31910
  var cellValueParam = external_exports.union([external_exports.string(), external_exports.number(), external_exports.boolean(), external_exports.null()]);
31857
31911
  var dryRunParam = external_exports.boolean().optional().describe(
@@ -31945,7 +31999,7 @@ function registerSlidesTools(server) {
31945
31999
  }
31946
32000
 
31947
32001
  // ../gogcli-mcp/src/server.ts
31948
- var VERSION = true ? "2.23.2" : "0.0.0";
32002
+ var VERSION = true ? "2.25.0" : "0.0.0";
31949
32003
 
31950
32004
  // ../gogcli-mcp/src/auth-log.ts
31951
32005
  var FAILURES = /* @__PURE__ */ new Set([
package/manifest.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifest_version": "0.3",
4
4
  "name": "gogcli-mcp-slides",
5
5
  "display_name": "gogcli (Slides)",
6
- "version": "2.23.2",
6
+ "version": "2.25.0",
7
7
  "description": "Extended Google Slides for Claude via gogcli — auth + full Slides support (create, edit, export, templates, markdown)",
8
8
  "author": {
9
9
  "name": "Chris Hall",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gogcli-mcp-slides",
3
- "version": "2.23.2",
3
+ "version": "2.25.0",
4
4
  "mcpName": "io.github.chrischall/gogcli-mcp-slides",
5
5
  "description": "Extended Google Slides MCP server via gogcli — auth + full Slides support",
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-slides"
9
9
  },
10
- "version": "2.23.2",
10
+ "version": "2.25.0",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "gogcli-mcp-slides",
15
- "version": "2.23.2",
15
+ "version": "2.25.0",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },