gogcli-mcp-gmail 2.0.6 → 2.0.8

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/dist/index.js CHANGED
@@ -8415,8 +8415,8 @@ function emoji() {
8415
8415
  }
8416
8416
  var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
8417
8417
  var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
8418
- var mac = (delimiter) => {
8419
- const escapedDelim = escapeRegex(delimiter ?? ":");
8418
+ var mac = (delimiter2) => {
8419
+ const escapedDelim = escapeRegex(delimiter2 ?? ":");
8420
8420
  return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
8421
8421
  };
8422
8422
  var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
@@ -30863,7 +30863,34 @@ var EMPTY_COMPLETION_RESULT = {
30863
30863
 
30864
30864
  // ../gogcli-mcp/src/runner.ts
30865
30865
  import { spawn } from "node:child_process";
30866
+ import { delimiter } from "node:path";
30866
30867
  var TIMEOUT_MS = 3e4;
30868
+ function envOrUndefined(key) {
30869
+ const value = process.env[key];
30870
+ if (!value || value.startsWith("${")) return void 0;
30871
+ return value;
30872
+ }
30873
+ function augmentedPath() {
30874
+ const home = process.env.HOME;
30875
+ const candidates = [
30876
+ process.env.PATH ?? "",
30877
+ "/opt/homebrew/bin",
30878
+ "/usr/local/bin",
30879
+ home ? `${home}/.local/bin` : "",
30880
+ home ? `${home}/go/bin` : ""
30881
+ ];
30882
+ const seen = /* @__PURE__ */ new Set();
30883
+ const parts = [];
30884
+ for (const c of candidates) {
30885
+ if (!c) continue;
30886
+ for (const dir of c.split(delimiter)) {
30887
+ if (!dir || seen.has(dir)) continue;
30888
+ seen.add(dir);
30889
+ parts.push(dir);
30890
+ }
30891
+ }
30892
+ return parts.join(delimiter);
30893
+ }
30867
30894
  function formatTimeout(ms) {
30868
30895
  const seconds = Math.round(ms / 1e3);
30869
30896
  if (seconds >= 60) {
@@ -30874,7 +30901,7 @@ function formatTimeout(ms) {
30874
30901
  }
30875
30902
  async function run(args, options = {}) {
30876
30903
  const { account, spawner = spawn, interactive = false, timeout } = options;
30877
- const effectiveAccount = account ?? process.env.GOG_ACCOUNT;
30904
+ const effectiveAccount = account ?? envOrUndefined("GOG_ACCOUNT");
30878
30905
  const fullArgs = ["--json", "--color=never"];
30879
30906
  if (!interactive) {
30880
30907
  fullArgs.push("--no-input");
@@ -30886,7 +30913,8 @@ async function run(args, options = {}) {
30886
30913
  const effectiveTimeout = timeout ?? TIMEOUT_MS;
30887
30914
  return new Promise((resolve, reject) => {
30888
30915
  const { GOG_ACCESS_TOKEN: _, ...cleanEnv } = process.env;
30889
- const child = spawner(process.env.GOG_PATH ?? "gog", fullArgs, { env: cleanEnv });
30916
+ const childEnv = { ...cleanEnv, PATH: augmentedPath() };
30917
+ const child = spawner(envOrUndefined("GOG_PATH") ?? "gog", fullArgs, { env: childEnv });
30890
30918
  const stdoutChunks = [];
30891
30919
  const stderrChunks = [];
30892
30920
  let settled = false;
@@ -30921,6 +30949,12 @@ async function run(args, options = {}) {
30921
30949
  clearTimeout(timer);
30922
30950
  if (settled) return;
30923
30951
  settled = true;
30952
+ if (err.code === "ENOENT") {
30953
+ reject(new Error(
30954
+ "gog executable not found. Install gogcli (https://github.com/steipete/gogcli) or set GOG_PATH in your MCP client config to the absolute binary path (run `which gog` in a terminal to find it)."
30955
+ ));
30956
+ return;
30957
+ }
30924
30958
  reject(err);
30925
30959
  });
30926
30960
  });
@@ -31090,7 +31124,7 @@ function registerGmailTools(server2) {
31090
31124
  }
31091
31125
 
31092
31126
  // ../gogcli-mcp/src/server.ts
31093
- var VERSION = true ? "2.0.5" : "0.0.0";
31127
+ var VERSION = true ? "2.0.8" : "0.0.0";
31094
31128
  function createServer(options) {
31095
31129
  return new McpServer({
31096
31130
  name: options?.name ?? "gogcli",
package/manifest.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifest_version": "0.3",
4
4
  "name": "gogcli-mcp-gmail",
5
5
  "display_name": "gogcli (Gmail)",
6
- "version": "2.0.6",
6
+ "version": "2.0.8",
7
7
  "description": "Extended Gmail for Claude via gogcli — auth + full Gmail support (threads, labels, drafts, attachments, forward, autoreply, bulk operations)",
8
8
  "author": {
9
9
  "name": "Chris Hall",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gogcli-mcp-gmail",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "mcpName": "io.github.chrischall/gogcli-mcp-gmail",
5
5
  "description": "Extended Gmail MCP server via gogcli — auth + full Gmail support (threads, labels, drafts, attachments, forward, autoreply, bulk operations)",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",