@mindstone/mcp-server-google-workspace 0.5.2 → 0.5.4

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.
Files changed (45) hide show
  1. package/README.md +27 -1
  2. package/dist/file-read-context.d.ts +57 -0
  3. package/dist/file-read-context.js +36 -0
  4. package/dist/modules/calendar/service.js +97 -90
  5. package/dist/modules/comments/service.js +6 -6
  6. package/dist/modules/docs/service.js +15 -11
  7. package/dist/modules/docs/types.d.ts +4 -0
  8. package/dist/modules/drive/service.js +1 -17
  9. package/dist/modules/forms/service.js +4 -4
  10. package/dist/modules/gmail/services/attachment.js +3 -1
  11. package/dist/modules/gmail/services/base.js +3 -1
  12. package/dist/modules/gmail/services/draft.js +13 -1
  13. package/dist/modules/gmail/services/email.js +13 -4
  14. package/dist/modules/gmail/services/label.js +19 -1
  15. package/dist/modules/gmail/services/settings.js +7 -1
  16. package/dist/modules/sheets/service.js +18 -18
  17. package/dist/modules/slides/service.js +7 -7
  18. package/dist/modules/tasks/service.js +7 -7
  19. package/dist/resources/compose-email-template.d.ts +1 -1
  20. package/dist/resources/compose-email-template.js +107 -53
  21. package/dist/services/base/BaseGoogleService.js +2 -2
  22. package/dist/services/chat/index.js +3 -0
  23. package/dist/services/contacts/index.js +8 -5
  24. package/dist/services/meet/index.js +3 -0
  25. package/dist/tools/calendar-handlers.js +7 -7
  26. package/dist/tools/chat-handlers.js +4 -4
  27. package/dist/tools/contacts-handlers.js +5 -5
  28. package/dist/tools/definitions/gmail.js +4 -0
  29. package/dist/tools/docs-handlers.js +14 -6
  30. package/dist/tools/drive-handlers.d.ts +2 -1
  31. package/dist/tools/drive-handlers.js +21 -16
  32. package/dist/tools/gmail-handlers.d.ts +6 -5
  33. package/dist/tools/gmail-handlers.js +39 -27
  34. package/dist/tools/meet-handlers.js +4 -4
  35. package/dist/tools/server.js +24 -10
  36. package/dist/tools/sheets-handlers.js +4 -4
  37. package/dist/tools/slides-handlers.js +4 -4
  38. package/dist/utils/apiError.d.ts +7 -3
  39. package/dist/utils/apiError.js +37 -16
  40. package/dist/utils/google-retry.d.ts +15 -0
  41. package/dist/utils/google-retry.js +108 -0
  42. package/dist/utils/request-timeout.js +2 -0
  43. package/dist/utils/untrusted-content.d.ts +9 -0
  44. package/dist/utils/untrusted-content.js +37 -0
  45. package/package.json +3 -2
@@ -1,6 +1,6 @@
1
1
  import { google } from 'googleapis';
2
2
  import { BaseGoogleService } from '../../../services/base/BaseGoogleService.js';
3
- import { describeApiError } from '../../../utils/apiError.js';
3
+ import { describeApiError, isPassthroughGoogleError } from '../../../utils/apiError.js';
4
4
  import { GmailError } from '../types.js';
5
5
  import { EmailService } from './email.js';
6
6
  import { SearchService } from './search.js';
@@ -43,6 +43,8 @@ export class GmailService extends BaseGoogleService {
43
43
  this.initialized = true;
44
44
  }
45
45
  catch (error) {
46
+ if (isPassthroughGoogleError(error))
47
+ throw error;
46
48
  throw new GmailError('Failed to initialize Gmail service', 'INIT_ERROR', describeApiError(error));
47
49
  }
48
50
  }
@@ -1,6 +1,6 @@
1
1
  import { GmailError } from '../types.js';
2
2
  import { buildMimeMessage } from './mime-builder.js';
3
- import { describeApiError } from '../../../utils/apiError.js';
3
+ import { describeApiError, isPassthroughGoogleError } from '../../../utils/apiError.js';
4
4
  import logger from '../../../utils/logger.js';
5
5
  export class DraftService {
6
6
  attachmentService;
@@ -63,6 +63,8 @@ export class DraftService {
63
63
  };
64
64
  }
65
65
  catch (error) {
66
+ if (isPassthroughGoogleError(error))
67
+ throw error;
66
68
  const details = describeApiError(error);
67
69
  logger.warn(`Failed to create draft: ${details}`);
68
70
  throw new GmailError('Failed to create draft', 'CREATE_ERROR', details);
@@ -96,6 +98,8 @@ export class DraftService {
96
98
  };
97
99
  }
98
100
  catch (error) {
101
+ if (isPassthroughGoogleError(error))
102
+ throw error;
99
103
  throw new GmailError('Failed to list drafts', 'LIST_ERROR', describeApiError(error));
100
104
  }
101
105
  }
@@ -121,6 +125,8 @@ export class DraftService {
121
125
  };
122
126
  }
123
127
  catch (error) {
128
+ if (isPassthroughGoogleError(error))
129
+ throw error;
124
130
  throw new GmailError('Failed to get draft', 'GET_ERROR', describeApiError(error));
125
131
  }
126
132
  }
@@ -191,6 +197,8 @@ export class DraftService {
191
197
  };
192
198
  }
193
199
  catch (error) {
200
+ if (isPassthroughGoogleError(error))
201
+ throw error;
194
202
  const details = describeApiError(error);
195
203
  logger.warn(`Failed to update draft ${draftId}: ${details}`);
196
204
  throw new GmailError('Failed to update draft', 'UPDATE_ERROR', details);
@@ -206,6 +214,8 @@ export class DraftService {
206
214
  return;
207
215
  }
208
216
  catch (error) {
217
+ if (isPassthroughGoogleError(error))
218
+ throw error;
209
219
  throw new GmailError('Failed to delete draft', 'DELETE_ERROR', describeApiError(error));
210
220
  }
211
221
  }
@@ -260,6 +270,8 @@ export class DraftService {
260
270
  };
261
271
  }
262
272
  catch (error) {
273
+ if (isPassthroughGoogleError(error))
274
+ throw error;
263
275
  throw new GmailError('Failed to send draft', 'SEND_ERROR', describeApiError(error));
264
276
  }
265
277
  }
@@ -1,9 +1,10 @@
1
+ import { isGoogleRecoveryExhausted, preserveGoogleRetryDecision } from '../../../utils/google-retry.js';
1
2
  import { GmailError } from '../types.js';
2
3
  import { buildMimeMessage } from './mime-builder.js';
3
4
  import { AttachmentResponseTransformer } from '../../attachments/response-transformer.js';
4
5
  import { AttachmentIndexService } from '../../attachments/index-service.js';
5
6
  import logger from '../../../utils/logger.js';
6
- import { describeApiError } from '../../../utils/apiError.js';
7
+ import { describeApiError, isPassthroughGoogleError } from '../../../utils/apiError.js';
7
8
  /**
8
9
  * Google/Gaxios not-found shapes differ by call site and transport.
9
10
  */
@@ -160,6 +161,8 @@ export class EmailService {
160
161
  };
161
162
  }
162
163
  catch (error) {
164
+ if (isPassthroughGoogleError(error) && !isGoogleRecoveryExhausted(error))
165
+ throw error;
163
166
  if (isNotFoundError(error)) {
164
167
  logger.warn({ err: error, messageId }, 'getMessage failed; treating as not found');
165
168
  return null;
@@ -252,7 +255,9 @@ export class EmailService {
252
255
  };
253
256
  }
254
257
  catch (error) {
255
- throw new GmailError(`Failed to get thread ${threadId}`, 'THREAD_ERROR', `Error: ${describeApiError(error)}`);
258
+ if (isPassthroughGoogleError(error) && !isGoogleRecoveryExhausted(error))
259
+ throw error;
260
+ throw preserveGoogleRetryDecision(new GmailError(`Failed to get thread ${threadId}`, 'THREAD_ERROR', `Error: ${describeApiError(error)}`), error);
256
261
  }
257
262
  }
258
263
  /**
@@ -386,10 +391,12 @@ export class EmailService {
386
391
  return transformedResponse;
387
392
  }
388
393
  catch (error) {
394
+ if (isPassthroughGoogleError(error) && !isGoogleRecoveryExhausted(error))
395
+ throw error;
389
396
  if (error instanceof GmailError) {
390
397
  throw error;
391
398
  }
392
- throw new GmailError('Failed to get emails', 'FETCH_ERROR', `Error: ${describeApiError(error)}`);
399
+ throw preserveGoogleRetryDecision(new GmailError('Failed to get emails', 'FETCH_ERROR', `Error: ${describeApiError(error)}`), error);
393
400
  }
394
401
  }
395
402
  /**
@@ -453,10 +460,12 @@ export class EmailService {
453
460
  return response;
454
461
  }
455
462
  catch (error) {
463
+ if (isPassthroughGoogleError(error) && !isGoogleRecoveryExhausted(error))
464
+ throw error;
456
465
  if (error instanceof GmailError) {
457
466
  throw error;
458
467
  }
459
- throw new GmailError('Failed to send email', 'SEND_ERROR', `Error: ${describeApiError(error)}`);
468
+ throw preserveGoogleRetryDecision(new GmailError('Failed to send email', 'SEND_ERROR', `Error: ${describeApiError(error)}`), error);
460
469
  }
461
470
  }
462
471
  }
@@ -1,4 +1,4 @@
1
- import { describeApiError } from '../../../utils/apiError.js';
1
+ import { describeApiError, isPassthroughGoogleError } from '../../../utils/apiError.js';
2
2
  import { GmailError } from '../types.js';
3
3
  import { isValidGmailLabelColor, getNearestGmailLabelColor, LABEL_ERROR_MESSAGES } from '../constants.js';
4
4
  export class LabelService {
@@ -220,6 +220,8 @@ export class LabelService {
220
220
  return this.mapGmailLabel(response.data);
221
221
  }
222
222
  catch (error) {
223
+ if (isPassthroughGoogleError(error))
224
+ throw error;
223
225
  if (error instanceof Error && 'code' in error && error.code === '401') {
224
226
  throw new GmailError('Authentication failed', 'AUTH_ERROR', 'Please re-authenticate your account');
225
227
  }
@@ -242,6 +244,8 @@ export class LabelService {
242
244
  };
243
245
  }
244
246
  catch (error) {
247
+ if (isPassthroughGoogleError(error))
248
+ throw error;
245
249
  throw new GmailError('Failed to fetch labels', 'FETCH_ERROR', describeApiError(error));
246
250
  }
247
251
  }
@@ -276,6 +280,8 @@ export class LabelService {
276
280
  return this.mapGmailLabel(response.data);
277
281
  }
278
282
  catch (error) {
283
+ if (isPassthroughGoogleError(error))
284
+ throw error;
279
285
  if (error instanceof Error && 'code' in error && error.code === '401') {
280
286
  throw new GmailError('Authentication failed', 'AUTH_ERROR', 'Please re-authenticate your account');
281
287
  }
@@ -293,6 +299,8 @@ export class LabelService {
293
299
  });
294
300
  }
295
301
  catch (error) {
302
+ if (isPassthroughGoogleError(error))
303
+ throw error;
296
304
  throw new GmailError('Failed to delete label', 'DELETE_ERROR', describeApiError(error));
297
305
  }
298
306
  }
@@ -308,6 +316,8 @@ export class LabelService {
308
316
  });
309
317
  }
310
318
  catch (error) {
319
+ if (isPassthroughGoogleError(error))
320
+ throw error;
311
321
  throw new GmailError('Failed to modify message labels', 'MODIFY_ERROR', describeApiError(error));
312
322
  }
313
323
  }
@@ -362,6 +372,8 @@ export class LabelService {
362
372
  };
363
373
  }
364
374
  catch (error) {
375
+ if (isPassthroughGoogleError(error))
376
+ throw error;
365
377
  throw new GmailError('Failed to create label filter', 'CREATE_ERROR', describeApiError(error));
366
378
  }
367
379
  }
@@ -409,6 +421,8 @@ export class LabelService {
409
421
  return { filters };
410
422
  }
411
423
  catch (error) {
424
+ if (isPassthroughGoogleError(error))
425
+ throw error;
412
426
  throw new GmailError('Failed to get label filters', 'FETCH_ERROR', describeApiError(error));
413
427
  }
414
428
  }
@@ -468,6 +482,8 @@ export class LabelService {
468
482
  };
469
483
  }
470
484
  catch (error) {
485
+ if (isPassthroughGoogleError(error))
486
+ throw error;
471
487
  throw new GmailError('Failed to update label filter', 'UPDATE_ERROR', describeApiError(error));
472
488
  }
473
489
  }
@@ -479,6 +495,8 @@ export class LabelService {
479
495
  });
480
496
  }
481
497
  catch (error) {
498
+ if (isPassthroughGoogleError(error))
499
+ throw error;
482
500
  throw new GmailError('Failed to delete label filter', 'DELETE_ERROR', describeApiError(error));
483
501
  }
484
502
  }
@@ -1,4 +1,4 @@
1
- import { describeApiError } from '../../../utils/apiError.js';
1
+ import { describeApiError, isPassthroughGoogleError } from '../../../utils/apiError.js';
2
2
  import { GmailError } from '../types.js';
3
3
  export class SettingsService {
4
4
  gmailClient;
@@ -95,6 +95,8 @@ export class SettingsService {
95
95
  return response;
96
96
  }
97
97
  catch (error) {
98
+ if (isPassthroughGoogleError(error))
99
+ throw error;
98
100
  if (error instanceof GmailError) {
99
101
  throw error;
100
102
  }
@@ -164,6 +166,8 @@ export class SettingsService {
164
166
  };
165
167
  }
166
168
  catch (error) {
169
+ if (isPassthroughGoogleError(error))
170
+ throw error;
167
171
  if (error instanceof GmailError) {
168
172
  throw error;
169
173
  }
@@ -189,6 +193,8 @@ export class SettingsService {
189
193
  return { sendAs };
190
194
  }
191
195
  catch (error) {
196
+ if (isPassthroughGoogleError(error))
197
+ throw error;
192
198
  if (error instanceof GmailError) {
193
199
  throw error;
194
200
  }
@@ -1,6 +1,6 @@
1
1
  import { google } from 'googleapis';
2
2
  import { BaseGoogleService } from '../../services/base/BaseGoogleService.js';
3
- import { describeApiErrorUntrusted, isAuthHandoffError } from '../../utils/apiError.js';
3
+ import { describeApiErrorUntrusted, isPassthroughGoogleError } from '../../utils/apiError.js';
4
4
  import { computeMoveApiIndex } from '../../utils/tabPosition.js';
5
5
  import { SheetsInputError, } from './types.js';
6
6
  import { SHEETS_SCOPES } from './scopes.js';
@@ -524,7 +524,7 @@ export class SheetsService extends BaseGoogleService {
524
524
  }
525
525
  catch (error) {
526
526
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
527
- if (isAuthHandoffError(error))
527
+ if (isPassthroughGoogleError(error))
528
528
  throw error;
529
529
  return {
530
530
  success: false,
@@ -585,7 +585,7 @@ export class SheetsService extends BaseGoogleService {
585
585
  }
586
586
  catch (error) {
587
587
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
588
- if (isAuthHandoffError(error))
588
+ if (isPassthroughGoogleError(error))
589
589
  throw error;
590
590
  if (error instanceof ContinuationTokenError) {
591
591
  return {
@@ -654,7 +654,7 @@ export class SheetsService extends BaseGoogleService {
654
654
  }
655
655
  catch (error) {
656
656
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
657
- if (isAuthHandoffError(error))
657
+ if (isPassthroughGoogleError(error))
658
658
  throw error;
659
659
  if (error instanceof ContinuationTokenError) {
660
660
  return {
@@ -762,7 +762,7 @@ export class SheetsService extends BaseGoogleService {
762
762
  }
763
763
  catch (error) {
764
764
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
765
- if (isAuthHandoffError(error))
765
+ if (isPassthroughGoogleError(error))
766
766
  throw error;
767
767
  const kind = this.classifyFormulaPreReadError(error);
768
768
  const rewrittenError = rewriteSheetsApiError(error, {
@@ -963,7 +963,7 @@ export class SheetsService extends BaseGoogleService {
963
963
  }
964
964
  catch (error) {
965
965
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
966
- if (isAuthHandoffError(error))
966
+ if (isPassthroughGoogleError(error))
967
967
  throw error;
968
968
  return {
969
969
  success: false,
@@ -1022,7 +1022,7 @@ export class SheetsService extends BaseGoogleService {
1022
1022
  }
1023
1023
  catch (error) {
1024
1024
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1025
- if (isAuthHandoffError(error))
1025
+ if (isPassthroughGoogleError(error))
1026
1026
  throw error;
1027
1027
  return {
1028
1028
  success: false,
@@ -1086,7 +1086,7 @@ export class SheetsService extends BaseGoogleService {
1086
1086
  }
1087
1087
  catch (error) {
1088
1088
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1089
- if (isAuthHandoffError(error))
1089
+ if (isPassthroughGoogleError(error))
1090
1090
  throw error;
1091
1091
  return {
1092
1092
  success: false,
@@ -1119,7 +1119,7 @@ export class SheetsService extends BaseGoogleService {
1119
1119
  }
1120
1120
  catch (error) {
1121
1121
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1122
- if (isAuthHandoffError(error))
1122
+ if (isPassthroughGoogleError(error))
1123
1123
  throw error;
1124
1124
  return {
1125
1125
  success: false,
@@ -1175,7 +1175,7 @@ export class SheetsService extends BaseGoogleService {
1175
1175
  }
1176
1176
  catch (error) {
1177
1177
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1178
- if (isAuthHandoffError(error))
1178
+ if (isPassthroughGoogleError(error))
1179
1179
  throw error;
1180
1180
  return {
1181
1181
  success: false,
@@ -1215,7 +1215,7 @@ export class SheetsService extends BaseGoogleService {
1215
1215
  }
1216
1216
  catch (error) {
1217
1217
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1218
- if (isAuthHandoffError(error))
1218
+ if (isPassthroughGoogleError(error))
1219
1219
  throw error;
1220
1220
  return {
1221
1221
  success: false,
@@ -1251,7 +1251,7 @@ export class SheetsService extends BaseGoogleService {
1251
1251
  }
1252
1252
  catch (error) {
1253
1253
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1254
- if (isAuthHandoffError(error))
1254
+ if (isPassthroughGoogleError(error))
1255
1255
  throw error;
1256
1256
  return {
1257
1257
  success: false,
@@ -1551,7 +1551,7 @@ export class SheetsService extends BaseGoogleService {
1551
1551
  }
1552
1552
  catch (error) {
1553
1553
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1554
- if (isAuthHandoffError(error))
1554
+ if (isPassthroughGoogleError(error))
1555
1555
  throw error;
1556
1556
  if (error instanceof ContinuationTokenError) {
1557
1557
  return {
@@ -1660,7 +1660,7 @@ export class SheetsService extends BaseGoogleService {
1660
1660
  }
1661
1661
  catch (error) {
1662
1662
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1663
- if (isAuthHandoffError(error))
1663
+ if (isPassthroughGoogleError(error))
1664
1664
  throw error;
1665
1665
  if (error instanceof ContinuationTokenError) {
1666
1666
  return {
@@ -1744,7 +1744,7 @@ export class SheetsService extends BaseGoogleService {
1744
1744
  }
1745
1745
  catch (error) {
1746
1746
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1747
- if (isAuthHandoffError(error))
1747
+ if (isPassthroughGoogleError(error))
1748
1748
  throw error;
1749
1749
  return {
1750
1750
  success: false,
@@ -1795,7 +1795,7 @@ export class SheetsService extends BaseGoogleService {
1795
1795
  }
1796
1796
  catch (error) {
1797
1797
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1798
- if (isAuthHandoffError(error))
1798
+ if (isPassthroughGoogleError(error))
1799
1799
  throw error;
1800
1800
  return {
1801
1801
  success: false,
@@ -1918,7 +1918,7 @@ export class SheetsService extends BaseGoogleService {
1918
1918
  }
1919
1919
  catch (error) {
1920
1920
  // Keep the reconnect signal: an expired/revoked grant must not collapse to a plain string.
1921
- if (isAuthHandoffError(error))
1921
+ if (isPassthroughGoogleError(error))
1922
1922
  throw error;
1923
1923
  return {
1924
1924
  success: false,
@@ -1934,7 +1934,7 @@ export class SheetsService extends BaseGoogleService {
1934
1934
  */
1935
1935
  function toSheetTabFailure(error) {
1936
1936
  // An expired/revoked grant must keep its reconnect signal.
1937
- if (isAuthHandoffError(error))
1937
+ if (isPassthroughGoogleError(error))
1938
1938
  throw error;
1939
1939
  if (error instanceof SheetsInputError)
1940
1940
  throw error;
@@ -1,7 +1,7 @@
1
1
  import { google } from 'googleapis';
2
2
  import { BaseGoogleService } from '../../services/base/BaseGoogleService.js';
3
3
  import { SLIDES_SCOPES } from './scopes.js';
4
- import { describeApiError, isAuthHandoffError } from '../../utils/apiError.js';
4
+ import { describeApiError, isPassthroughGoogleError } from '../../utils/apiError.js';
5
5
  const DEFAULT_MAX_CHARS = 50000;
6
6
  const TRUNCATION_MARKER = '\n\n[TRUNCATED - presentation exceeds character limit]';
7
7
  export class SlidesService extends BaseGoogleService {
@@ -202,7 +202,7 @@ export class SlidesService extends BaseGoogleService {
202
202
  catch (error) {
203
203
  // An expired/revoked grant must keep its reconnect signal — folding it
204
204
  // into a plain error string would skip the host's auth_required handoff.
205
- if (isAuthHandoffError(error))
205
+ if (isPassthroughGoogleError(error))
206
206
  throw error;
207
207
  return {
208
208
  success: false,
@@ -245,7 +245,7 @@ export class SlidesService extends BaseGoogleService {
245
245
  catch (error) {
246
246
  // An expired/revoked grant must keep its reconnect signal — folding it
247
247
  // into a plain error string would skip the host's auth_required handoff.
248
- if (isAuthHandoffError(error))
248
+ if (isPassthroughGoogleError(error))
249
249
  throw error;
250
250
  return {
251
251
  success: false,
@@ -275,7 +275,7 @@ export class SlidesService extends BaseGoogleService {
275
275
  catch (error) {
276
276
  // An expired/revoked grant must keep its reconnect signal — folding it
277
277
  // into a plain error string would skip the host's auth_required handoff.
278
- if (isAuthHandoffError(error))
278
+ if (isPassthroughGoogleError(error))
279
279
  throw error;
280
280
  return {
281
281
  success: false,
@@ -330,7 +330,7 @@ export class SlidesService extends BaseGoogleService {
330
330
  catch (error) {
331
331
  // An expired/revoked grant must keep its reconnect signal — folding it
332
332
  // into a plain error string would skip the host's auth_required handoff.
333
- if (isAuthHandoffError(error))
333
+ if (isPassthroughGoogleError(error))
334
334
  throw error;
335
335
  return {
336
336
  success: false,
@@ -368,7 +368,7 @@ export class SlidesService extends BaseGoogleService {
368
368
  catch (error) {
369
369
  // An expired/revoked grant must keep its reconnect signal — folding it
370
370
  // into a plain error string would skip the host's auth_required handoff.
371
- if (isAuthHandoffError(error))
371
+ if (isPassthroughGoogleError(error))
372
372
  throw error;
373
373
  return {
374
374
  success: false,
@@ -407,7 +407,7 @@ export class SlidesService extends BaseGoogleService {
407
407
  catch (error) {
408
408
  // An expired/revoked grant must keep its reconnect signal — folding it
409
409
  // into a plain error string would skip the host's auth_required handoff.
410
- if (isAuthHandoffError(error))
410
+ if (isPassthroughGoogleError(error))
411
411
  throw error;
412
412
  return {
413
413
  success: false,
@@ -1,6 +1,6 @@
1
1
  import { google } from 'googleapis';
2
2
  import { BaseGoogleService } from '../../services/base/BaseGoogleService.js';
3
- import { describeApiError, isAuthHandoffError } from '../../utils/apiError.js';
3
+ import { describeApiError, isPassthroughGoogleError } from '../../utils/apiError.js';
4
4
  import { TASKS_SCOPES } from './scopes.js';
5
5
  /**
6
6
  * Service for interacting with Google Tasks API.
@@ -81,7 +81,7 @@ export class TasksService extends BaseGoogleService {
81
81
  catch (error) {
82
82
  // An expired/revoked grant must keep its reconnect signal — folding it
83
83
  // into a plain error string would skip the host's auth_required handoff.
84
- if (isAuthHandoffError(error))
84
+ if (isPassthroughGoogleError(error))
85
85
  throw error;
86
86
  return {
87
87
  success: false,
@@ -145,7 +145,7 @@ export class TasksService extends BaseGoogleService {
145
145
  catch (error) {
146
146
  // An expired/revoked grant must keep its reconnect signal — folding it
147
147
  // into a plain error string would skip the host's auth_required handoff.
148
- if (isAuthHandoffError(error))
148
+ if (isPassthroughGoogleError(error))
149
149
  throw error;
150
150
  return {
151
151
  success: false,
@@ -197,7 +197,7 @@ export class TasksService extends BaseGoogleService {
197
197
  catch (error) {
198
198
  // An expired/revoked grant must keep its reconnect signal — folding it
199
199
  // into a plain error string would skip the host's auth_required handoff.
200
- if (isAuthHandoffError(error))
200
+ if (isPassthroughGoogleError(error))
201
201
  throw error;
202
202
  return {
203
203
  success: false,
@@ -242,7 +242,7 @@ export class TasksService extends BaseGoogleService {
242
242
  catch (error) {
243
243
  // An expired/revoked grant must keep its reconnect signal — folding it
244
244
  // into a plain error string would skip the host's auth_required handoff.
245
- if (isAuthHandoffError(error))
245
+ if (isPassthroughGoogleError(error))
246
246
  throw error;
247
247
  return {
248
248
  success: false,
@@ -301,7 +301,7 @@ export class TasksService extends BaseGoogleService {
301
301
  catch (error) {
302
302
  // An expired/revoked grant must keep its reconnect signal — folding it
303
303
  // into a plain error string would skip the host's auth_required handoff.
304
- if (isAuthHandoffError(error))
304
+ if (isPassthroughGoogleError(error))
305
305
  throw error;
306
306
  return {
307
307
  success: false,
@@ -332,7 +332,7 @@ export class TasksService extends BaseGoogleService {
332
332
  catch (error) {
333
333
  // An expired/revoked grant must keep its reconnect signal — folding it
334
334
  // into a plain error string would skip the host's auth_required handoff.
335
- if (isAuthHandoffError(error))
335
+ if (isPassthroughGoogleError(error))
336
336
  throw error;
337
337
  return {
338
338
  success: false,