mcp-google-tasks 1.1.1 → 1.1.2

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/telemetry.js CHANGED
@@ -135,10 +135,10 @@ const OUTCOME_PATTERNS = [
135
135
  ["error_timeout", /timed?[ _-]?out|таймаут|ETIMEDOUT|AbortError|не был готов|not ready/i],
136
136
  ["error_network", /ECONNRESET|ECONNREFUSED|ENOTFOUND|EAI_AGAIN|EPIPE|fetch failed|socket hang up/i],
137
137
  ["error_rate_limit", /\b429\b|rate[ _-]?limit|too many requests|quota|квот|лимит|\[(?:56|152|506|9000)\]/i],
138
- ["error_permission", /нет доступа к кабинету|не подключ[её]н к аккаунту/i],
138
+ ["error_permission", /нет доступа к кабинету|не подключ[её]н к аккаунту|accessNotConfigured|SERVICE_DISABLED/i],
139
139
  [
140
140
  "error_auth",
141
- /\b401\b|unauthori[sz]ed|unauthenticated|invalid[ _-]?(?:token|grant|credentials)|token (?:expired|revoked)|login required|AuthRequired|авториз|не подключ|\[53\]/i,
141
+ /\b401\b|unauthori[sz]ed|unauthenticated|invalid[ _-]?(?:token|grant|credentials)|token (?:expired|revoked)|login required|AuthRequired|OAuthError|авториз|не подключ|\[53\]/i,
142
142
  ],
143
143
  ["error_permission", /\b403\b|forbidden|access[ _-]?denied|permission|insufficient[ _-]?scope|нет доступа|\[(?:54|3228)\]/i],
144
144
  ["error_not_found", /\b404\b|not[ _-]?found|не найден|не существует|\[8800\]/i],
@@ -248,6 +248,10 @@ function jsBug(err) {
248
248
  function errorText(err) {
249
249
  if (!(err instanceof Error) || "errno" in err || "syscall" in err)
250
250
  return undefined;
251
+ // OAuthError's code is a fixed OAuth/Google vocabulary (invalid_grant, accessNotConfigured), not user data.
252
+ const code = err.code;
253
+ if (err.name === "OAuthError" && typeof code === "string" && /^[A-Za-z_]{2,40}$/.test(code))
254
+ return `OAuthError ${code}`;
251
255
  return /^[A-Z][A-Za-z0-9]*(?:Error|Exception)$/.test(err.name) && err.name !== "Error" ? err.name : undefined;
252
256
  }
253
257
  /**
@@ -1,6 +1,7 @@
1
1
  import { OAuthError, registerGoogleAuth, TokenProvider, unconfiguredPrefix, USERINFO_URL, } from "@a1-x-tech/mcp-google-auth";
2
2
  import { probeApi } from "../client.js";
3
3
  import { GoogleTasksError } from "../types.js";
4
+ import { fail } from "./util.js";
4
5
  /**
5
6
  * The scopes an in-chat login requests (the per-task table lives in
6
7
  * docs/TOOLS.md). The component always adds the identity scopes on top.
@@ -92,6 +93,8 @@ export const AUTH_OPTIONS = {
92
93
  envPrefix: "GOOGLE_TASKS",
93
94
  scopes: LOGIN_SCOPES,
94
95
  verifyIdentity,
96
+ // Login-tool failures go through the server's own renderer, so telemetry gets their origin.
97
+ fail,
95
98
  };
96
99
  /**
97
100
  * Registers the six onboarding tools (auth_status, setup_instructions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-google-tasks",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "MCP server for the Google Tasks API — manage task lists, create and organize tasks with due dates, notes and subtasks, track completion and sync changes. For Claude, Cursor, Codex and other AI clients.",
5
5
  "mcpName": "io.github.A1-x-Tech/mcp-google-tasks",
6
6
  "type": "module",
@@ -49,7 +49,7 @@
49
49
  "url": "https://github.com/A1-x-Tech/mcp-google-tasks/issues"
50
50
  },
51
51
  "dependencies": {
52
- "@a1-x-tech/mcp-google-auth": "^0.1.0",
52
+ "@a1-x-tech/mcp-google-auth": "^0.1.2",
53
53
  "@modelcontextprotocol/sdk": "^1.29.0",
54
54
  "zod": "^3.25.0"
55
55
  },