gogcli-mcp-calendar 2.19.0 → 2.19.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.
package/dist/index.js CHANGED
@@ -31895,7 +31895,68 @@ var failIfNotEmptyParam = external_exports.boolean().optional().describe(
31895
31895
  );
31896
31896
 
31897
31897
  // ../gogcli-mcp/src/server.ts
31898
- var VERSION = true ? "2.19.0" : "0.0.0";
31898
+ var VERSION = true ? "2.19.1" : "0.0.0";
31899
+
31900
+ // ../gogcli-mcp/src/connector-runtime.ts
31901
+ var DEFAULT_TIMEOUT_MS = 3e4;
31902
+ var DEADLINE_GRACE_MS = 5e3;
31903
+ var RUNNER_GOG_FAILED = 422;
31904
+ var RUNNER_DRAINING = 503;
31905
+ function makeFlyExecutor(endpoint, key) {
31906
+ return async (args, opts) => {
31907
+ const deadlineMs = (opts?.timeout ?? DEFAULT_TIMEOUT_MS) + DEADLINE_GRACE_MS;
31908
+ let res;
31909
+ try {
31910
+ res = await fetch(endpoint + "/run", {
31911
+ method: "POST",
31912
+ headers: {
31913
+ Authorization: "Bearer " + key,
31914
+ "Content-Type": "application/json"
31915
+ },
31916
+ body: JSON.stringify({ args }),
31917
+ signal: AbortSignal.timeout(deadlineMs)
31918
+ });
31919
+ } catch (err) {
31920
+ const name = err instanceof Error ? err.name : "";
31921
+ if (name === "TimeoutError" || name === "AbortError") {
31922
+ throw new Error(
31923
+ `gog-runner did not respond within ${deadlineMs}ms (${endpoint}) \u2014 the Fly backend may be cold or wedged`
31924
+ );
31925
+ }
31926
+ throw err;
31927
+ }
31928
+ if (!res.ok) {
31929
+ const body = await res.json().catch(() => null);
31930
+ const detail = body && typeof body.error === "string" ? body.stderr && body.stderr.trim() && body.stderr.trim() !== body.error.trim() ? `${body.error}
31931
+ ${body.stderr}` : body.error : "";
31932
+ if (res.status === RUNNER_GOG_FAILED) {
31933
+ throw new Error(detail || "gog failed on the runner (no detail supplied)");
31934
+ }
31935
+ if (res.status === RUNNER_DRAINING || body?.retryable === true) {
31936
+ throw new Error(
31937
+ `gog-runner is restarting; retry this call.${detail ? ` ${detail}` : ""}`
31938
+ );
31939
+ }
31940
+ if (detail) {
31941
+ throw new Error(detail);
31942
+ }
31943
+ throw new Error(
31944
+ `gog-runner HTTP ${res.status}: the response did not come from the runner, so the request never reached gog. The backend Machine was most likely starting or shutting down \u2014 this is transient, retry the same call.`
31945
+ );
31946
+ }
31947
+ const { stdout } = await res.json();
31948
+ return stdout;
31949
+ };
31950
+ }
31951
+
31952
+ // ../gogcli-mcp/src/remote-runner.ts
31953
+ function useRemoteGogRunner(env = process.env) {
31954
+ const endpoint = readEnvVar("GOG_RUNNER_URL", { env });
31955
+ const key = readEnvVar("GOG_RUNNER_KEY", { env });
31956
+ if (!endpoint || !key) return false;
31957
+ runExecutor.enterWith({ executor: makeFlyExecutor(endpoint.replace(/\/+$/, ""), key) });
31958
+ return true;
31959
+ }
31899
31960
 
31900
31961
  // src/tools/calendar-extra.ts
31901
31962
  var meetAccess = external_exports.enum(["open", "trusted", "restricted"]);
@@ -32181,6 +32242,7 @@ function registerExtraCalendarTools(server) {
32181
32242
  }
32182
32243
 
32183
32244
  // src/index.ts
32245
+ useRemoteGogRunner();
32184
32246
  await runMcp({
32185
32247
  name: "gogcli-calendar",
32186
32248
  version: VERSION,
package/manifest.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifest_version": "0.3",
4
4
  "name": "gogcli-mcp-calendar",
5
5
  "display_name": "gogcli (Calendar)",
6
- "version": "2.19.0",
6
+ "version": "2.19.1",
7
7
  "description": "Extended Google Calendar for Claude via gogcli — auth + Calendar events + Meet space management",
8
8
  "author": {
9
9
  "name": "Chris Hall",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gogcli-mcp-calendar",
3
- "version": "2.19.0",
3
+ "version": "2.19.1",
4
4
  "mcpName": "io.github.chrischall/gogcli-mcp-calendar",
5
5
  "description": "Extended Google Calendar + Meet MCP server via gogcli — auth + Calendar events + Meet space management",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
package/src/index.ts CHANGED
@@ -1,8 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { runMcp } from '@chrischall/mcp-utils';
3
- import { VERSION, authToolsFor, registerCalendarTools } from '../../gogcli-mcp/src/lib.js';
3
+ import { VERSION, authToolsFor, registerCalendarTools, useRemoteGogRunner } from '../../gogcli-mcp/src/lib.js';
4
4
  import { registerExtraCalendarTools } from './tools/calendar-extra.js';
5
5
 
6
+ // Execute `gog` on the Fly backend when the host points us at one; without
7
+ // it, nothing changes and we spawn the local binary as before.
8
+ useRemoteGogRunner();
9
+
6
10
  await runMcp({
7
11
  name: 'gogcli-calendar',
8
12
  version: VERSION,