gogcli-mcp-docs 2.18.4 → 2.19.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 Docs for Claude via gogcli — auth + full Docs and comments support",
10
- "version": "2.18.4"
10
+ "version": "2.19.0"
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": "2.18.4",
18
+ "version": "2.19.0",
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": "2.18.4",
4
+ "version": "2.19.0",
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/dist/index.js CHANGED
@@ -3644,7 +3644,12 @@ var require_fast_uri = __commonJS({
3644
3644
  }
3645
3645
  function resolve(baseURI, relativeURI, options) {
3646
3646
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3647
- const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
3647
+ const { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed } = parseWithStatus(baseURI, schemelessOptions);
3648
+ const { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed } = parseWithStatus(relativeURI, schemelessOptions);
3649
+ if (baseMalformed || relativeMalformed) {
3650
+ throw new Error(baseParsed.error || relativeParsed.error || "URI is malformed.");
3651
+ }
3652
+ const resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);
3648
3653
  schemelessOptions.skipEscape = true;
3649
3654
  return serialize(resolved, schemelessOptions);
3650
3655
  }
@@ -3770,6 +3775,7 @@ var require_fast_uri = __commonJS({
3770
3775
  }
3771
3776
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3772
3777
  var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
3778
+ var AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
3773
3779
  function getParseError(parsed, matches) {
3774
3780
  if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
3775
3781
  return 'URI path must start with "/" when authority is present.';
@@ -3804,6 +3810,20 @@ var require_fast_uri = __commonJS({
3804
3810
  parsed.error = "URI authority must not contain a literal backslash.";
3805
3811
  malformedAuthorityOrPort = true;
3806
3812
  }
3813
+ const introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);
3814
+ if (introducerMatch !== null) {
3815
+ const region = introducerMatch[1];
3816
+ const normalizedRegion = region.replace(/[\t\n\r]/g, "");
3817
+ if (normalizedRegion.length >= 2) {
3818
+ if (normalizedRegion.slice(0, 2) !== "//") {
3819
+ parsed.error = parsed.error || "URI authority must not contain a literal backslash.";
3820
+ malformedAuthorityOrPort = true;
3821
+ } else if (region.length !== normalizedRegion.length) {
3822
+ parsed.error = parsed.error || "URI authority introducer must not contain whitespace.";
3823
+ malformedAuthorityOrPort = true;
3824
+ }
3825
+ }
3826
+ }
3807
3827
  const matches = uri.match(URI_PARSE);
3808
3828
  if (matches) {
3809
3829
  parsed.scheme = matches[1];
@@ -31853,7 +31873,68 @@ var failIfNotEmptyParam = external_exports.boolean().optional().describe(
31853
31873
  );
31854
31874
 
31855
31875
  // ../gogcli-mcp/src/server.ts
31856
- var VERSION = true ? "2.18.4" : "0.0.0";
31876
+ var VERSION = true ? "2.19.0" : "0.0.0";
31877
+
31878
+ // ../gogcli-mcp/src/connector-runtime.ts
31879
+ var DEFAULT_TIMEOUT_MS = 3e4;
31880
+ var DEADLINE_GRACE_MS = 5e3;
31881
+ var RUNNER_GOG_FAILED = 422;
31882
+ var RUNNER_DRAINING = 503;
31883
+ function makeFlyExecutor(endpoint, key) {
31884
+ return async (args, opts) => {
31885
+ const deadlineMs = (opts?.timeout ?? DEFAULT_TIMEOUT_MS) + DEADLINE_GRACE_MS;
31886
+ let res;
31887
+ try {
31888
+ res = await fetch(endpoint + "/run", {
31889
+ method: "POST",
31890
+ headers: {
31891
+ Authorization: "Bearer " + key,
31892
+ "Content-Type": "application/json"
31893
+ },
31894
+ body: JSON.stringify({ args }),
31895
+ signal: AbortSignal.timeout(deadlineMs)
31896
+ });
31897
+ } catch (err) {
31898
+ const name = err instanceof Error ? err.name : "";
31899
+ if (name === "TimeoutError" || name === "AbortError") {
31900
+ throw new Error(
31901
+ `gog-runner did not respond within ${deadlineMs}ms (${endpoint}) \u2014 the Fly backend may be cold or wedged`
31902
+ );
31903
+ }
31904
+ throw err;
31905
+ }
31906
+ if (!res.ok) {
31907
+ const body = await res.json().catch(() => null);
31908
+ const detail = body && typeof body.error === "string" ? body.stderr && body.stderr.trim() && body.stderr.trim() !== body.error.trim() ? `${body.error}
31909
+ ${body.stderr}` : body.error : "";
31910
+ if (res.status === RUNNER_GOG_FAILED) {
31911
+ throw new Error(detail || "gog failed on the runner (no detail supplied)");
31912
+ }
31913
+ if (res.status === RUNNER_DRAINING || body?.retryable === true) {
31914
+ throw new Error(
31915
+ `gog-runner is restarting; retry this call.${detail ? ` ${detail}` : ""}`
31916
+ );
31917
+ }
31918
+ if (detail) {
31919
+ throw new Error(detail);
31920
+ }
31921
+ throw new Error(
31922
+ `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.`
31923
+ );
31924
+ }
31925
+ const { stdout } = await res.json();
31926
+ return stdout;
31927
+ };
31928
+ }
31929
+
31930
+ // ../gogcli-mcp/src/remote-runner.ts
31931
+ function useRemoteGogRunner(env = process.env) {
31932
+ const endpoint = readEnvVar("GOG_RUNNER_URL", { env });
31933
+ const key = readEnvVar("GOG_RUNNER_KEY", { env });
31934
+ if (!endpoint || !key) return false;
31935
+ runExecutor.enterWith({ executor: makeFlyExecutor(endpoint.replace(/\/+$/, ""), key) });
31936
+ return true;
31937
+ }
31857
31938
 
31858
31939
  // src/tools/docs-extra.ts
31859
31940
  function registerExtraDocsTools(server) {
@@ -33202,6 +33283,7 @@ function registerExtraDocsTools(server) {
33202
33283
  }
33203
33284
 
33204
33285
  // src/index.ts
33286
+ useRemoteGogRunner();
33205
33287
  await runMcp({
33206
33288
  name: "gogcli-docs",
33207
33289
  version: VERSION,
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": "2.18.4",
6
+ "version": "2.19.0",
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gogcli-mcp-docs",
3
- "version": "2.18.4",
3
+ "version": "2.19.0",
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>",
package/server.json CHANGED
@@ -7,12 +7,12 @@
7
7
  "source": "github",
8
8
  "subfolder": "packages/gogcli-mcp-docs"
9
9
  },
10
- "version": "2.18.4",
10
+ "version": "2.19.0",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "gogcli-mcp-docs",
15
- "version": "2.18.4",
15
+ "version": "2.19.0",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },
package/src/index.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { runMcp } from '@chrischall/mcp-utils';
3
- import { VERSION, authToolsFor, registerDocsTools } from '../../gogcli-mcp/src/lib.js';
3
+ import { VERSION, authToolsFor, registerDocsTools, useRemoteGogRunner } from '../../gogcli-mcp/src/lib.js';
4
4
  import { registerExtraDocsTools } from './tools/docs-extra.js';
5
5
 
6
+
7
+ // Execute `gog` on the Fly backend when the host points us at one; without
8
+ // it, nothing changes and we spawn the local binary as before.
9
+ useRemoteGogRunner();
10
+
6
11
  await runMcp({
7
12
  name: 'gogcli-docs',
8
13
  version: VERSION,