gogcli-mcp-gmail 2.19.1 → 2.20.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.
package/dist/index.js CHANGED
@@ -31124,6 +31124,13 @@ function isGogFileArg(arg) {
31124
31124
  return typeof arg !== "string";
31125
31125
  }
31126
31126
  var runExecutor = new AsyncLocalStorage();
31127
+ var defaultExecutor;
31128
+ function setDefaultGogExecutor(executor) {
31129
+ defaultExecutor = executor ? { executor } : void 0;
31130
+ }
31131
+ function activeExecutor() {
31132
+ return runExecutor.getStore() ?? defaultExecutor;
31133
+ }
31127
31134
  var TIMEOUT_MS = 3e4;
31128
31135
  function readonlyEnvEnabled() {
31129
31136
  return readEnvVar("GOG_READONLY") !== void 0 && parseBoolEnv("GOG_READONLY", { default: true });
@@ -31284,7 +31291,7 @@ async function run(args, options = {}) {
31284
31291
  const { account, spawner, interactive = false, timeout, readonly: readonly2 = false, redactMode = "full" } = options;
31285
31292
  const redact = redactMode === "tokens" ? redactGoogleTokens : redactSecrets2;
31286
31293
  const fullArgs = assembleArgs(args, { account, interactive, readonly: readonly2 });
31287
- const store = runExecutor.getStore();
31294
+ const store = activeExecutor();
31288
31295
  try {
31289
31296
  let output;
31290
31297
  if (spawner) {
@@ -31830,16 +31837,17 @@ var failIfNotEmptyParam = external_exports.boolean().optional().describe(
31830
31837
  );
31831
31838
 
31832
31839
  // ../gogcli-mcp/src/server.ts
31833
- var VERSION = true ? "2.19.1" : "0.0.0";
31840
+ var VERSION = true ? "2.20.0" : "0.0.0";
31834
31841
 
31835
31842
  // ../gogcli-mcp/src/connector-runtime.ts
31836
31843
  var DEFAULT_TIMEOUT_MS = 3e4;
31837
31844
  var DEADLINE_GRACE_MS = 5e3;
31838
31845
  var RUNNER_GOG_FAILED = 422;
31839
31846
  var RUNNER_DRAINING = 503;
31840
- function makeFlyExecutor(endpoint, key) {
31847
+ function makeFlyExecutor(endpoint, key, readAccessToken) {
31841
31848
  return async (args, opts) => {
31842
31849
  const deadlineMs = (opts?.timeout ?? DEFAULT_TIMEOUT_MS) + DEADLINE_GRACE_MS;
31850
+ const accessToken = readAccessToken?.();
31843
31851
  let res;
31844
31852
  try {
31845
31853
  res = await fetch(endpoint + "/run", {
@@ -31848,7 +31856,7 @@ function makeFlyExecutor(endpoint, key) {
31848
31856
  Authorization: "Bearer " + key,
31849
31857
  "Content-Type": "application/json"
31850
31858
  },
31851
- body: JSON.stringify({ args }),
31859
+ body: JSON.stringify(accessToken ? { args, accessToken } : { args }),
31852
31860
  signal: AbortSignal.timeout(deadlineMs)
31853
31861
  });
31854
31862
  } catch (err) {
@@ -31889,7 +31897,9 @@ function useRemoteGogRunner(env = process.env) {
31889
31897
  const endpoint = readEnvVar("GOG_RUNNER_URL", { env });
31890
31898
  const key = readEnvVar("GOG_RUNNER_KEY", { env });
31891
31899
  if (!endpoint || !key) return false;
31892
- runExecutor.enterWith({ executor: makeFlyExecutor(endpoint.replace(/\/+$/, ""), key) });
31900
+ setDefaultGogExecutor(
31901
+ makeFlyExecutor(endpoint.replace(/\/+$/, ""), key, () => readEnvVar("GOG_ACCESS_TOKEN", { env }))
31902
+ );
31893
31903
  return true;
31894
31904
  }
31895
31905
 
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.19.1",
6
+ "version": "2.20.0",
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.19.1",
3
+ "version": "2.20.0",
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>",