gogcli-mcp-contacts 4.4.0 → 4.5.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
@@ -34468,6 +34468,67 @@ function errorResult(message) {
34468
34468
  };
34469
34469
  }
34470
34470
 
34471
+ // ../../node_modules/@chrischall/mcp-utils/dist/server/confirm-token.js
34472
+ function createSpentTokenStore() {
34473
+ const spent2 = /* @__PURE__ */ new Map();
34474
+ return {
34475
+ has: (nonce) => spent2.has(nonce),
34476
+ add: (nonce, exp) => {
34477
+ spent2.set(nonce, exp);
34478
+ },
34479
+ prune: (now) => {
34480
+ for (const [nonce, exp] of spent2)
34481
+ if (exp < now)
34482
+ spent2.delete(nonce);
34483
+ },
34484
+ clear: () => spent2.clear(),
34485
+ get size() {
34486
+ return spent2.size;
34487
+ }
34488
+ };
34489
+ }
34490
+ var PROCESS_SPENT = createSpentTokenStore();
34491
+ var confirmTokenParam = external_exports.string().optional().describe(`ONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has seen that preview and explicitly approved it in chat \u2014 never on the first call, never invented, never reused. Call again with the same arguments. Ignored when the client supports elicitation.`);
34492
+
34493
+ // ../../node_modules/@chrischall/mcp-utils/dist/config/index.js
34494
+ import { homedir } from "node:os";
34495
+ import { isAbsolute, join, resolve } from "node:path";
34496
+ var PLACEHOLDER_RE = /^\$\{[^}]*\}$/;
34497
+ function readEnvVar(key, opts = {}) {
34498
+ const env = opts.env ?? process.env;
34499
+ const raw = env[key];
34500
+ if (typeof raw === "string") {
34501
+ const trimmed = raw.trim();
34502
+ if (trimmed.length > 0 && trimmed !== "undefined" && trimmed !== "null" && !PLACEHOLDER_RE.test(trimmed)) {
34503
+ return trimmed;
34504
+ }
34505
+ }
34506
+ return opts.default;
34507
+ }
34508
+ var TRUE_TOKENS = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
34509
+ var FALSE_TOKENS = /* @__PURE__ */ new Set(["0", "false", "no", "off"]);
34510
+ function parseBoolEnv(key, opts = {}) {
34511
+ const fallback = opts.default ?? false;
34512
+ const raw = readEnvVar(key, { env: opts.env });
34513
+ if (raw === void 0)
34514
+ return fallback;
34515
+ const token = raw.toLowerCase();
34516
+ if (TRUE_TOKENS.has(token))
34517
+ return true;
34518
+ if (FALSE_TOKENS.has(token))
34519
+ return false;
34520
+ return fallback;
34521
+ }
34522
+ function expandPath(p) {
34523
+ let expanded = p;
34524
+ if (p === "~") {
34525
+ expanded = homedir();
34526
+ } else if (p.startsWith("~/")) {
34527
+ expanded = join(homedir(), p.slice(2));
34528
+ }
34529
+ return isAbsolute(expanded) ? expanded : resolve(expanded);
34530
+ }
34531
+
34471
34532
  // ../../node_modules/@chrischall/mcp-utils/dist/server/index.js
34472
34533
  var SERVER_PROTOCOL_VERSIONS = Object.freeze([
34473
34534
  "2026-07-28",
@@ -34643,45 +34704,6 @@ function runMcp(opts) {
34643
34704
  return handle;
34644
34705
  }
34645
34706
 
34646
- // ../../node_modules/@chrischall/mcp-utils/dist/config/index.js
34647
- import { homedir } from "node:os";
34648
- import { isAbsolute, join, resolve } from "node:path";
34649
- var PLACEHOLDER_RE = /^\$\{[^}]*\}$/;
34650
- function readEnvVar(key, opts = {}) {
34651
- const env = opts.env ?? process.env;
34652
- const raw = env[key];
34653
- if (typeof raw === "string") {
34654
- const trimmed = raw.trim();
34655
- if (trimmed.length > 0 && trimmed !== "undefined" && trimmed !== "null" && !PLACEHOLDER_RE.test(trimmed)) {
34656
- return trimmed;
34657
- }
34658
- }
34659
- return opts.default;
34660
- }
34661
- var TRUE_TOKENS = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
34662
- var FALSE_TOKENS = /* @__PURE__ */ new Set(["0", "false", "no", "off"]);
34663
- function parseBoolEnv(key, opts = {}) {
34664
- const fallback = opts.default ?? false;
34665
- const raw = readEnvVar(key, { env: opts.env });
34666
- if (raw === void 0)
34667
- return fallback;
34668
- const token = raw.toLowerCase();
34669
- if (TRUE_TOKENS.has(token))
34670
- return true;
34671
- if (FALSE_TOKENS.has(token))
34672
- return false;
34673
- return fallback;
34674
- }
34675
- function expandPath(p) {
34676
- let expanded = p;
34677
- if (p === "~") {
34678
- expanded = homedir();
34679
- } else if (p.startsWith("~/")) {
34680
- expanded = join(homedir(), p.slice(2));
34681
- }
34682
- return isAbsolute(expanded) ? expanded : resolve(expanded);
34683
- }
34684
-
34685
34707
  // ../../node_modules/@chrischall/mcp-utils/dist/fs/confine.js
34686
34708
  import { existsSync, realpathSync } from "node:fs";
34687
34709
  import { dirname, isAbsolute as isAbsolute2, relative, resolve as resolve2, sep } from "node:path";
@@ -35462,6 +35484,7 @@ async function diagnose(err) {
35462
35484
  const isAuthError = !isTransientError && AUTH_ERROR_PATTERN.test(errText);
35463
35485
  const isGridLimitError = GRID_LIMIT_ERROR_PATTERN.test(errText);
35464
35486
  const hint = isInvalidGrant ? INVALID_GRANT_HINT : isAuthError ? AUTH_HINT : isTransientError ? TRANSIENT_HINT : isGridLimitError ? GRID_LIMIT_HINT : "";
35487
+ if (!isAuthError && !isInvalidGrant) return errorResult(`${errText}${hint}`);
35465
35488
  try {
35466
35489
  const accounts = formatAccountList(await run(["auth", "list"]));
35467
35490
  return errorResult(`${errText}
@@ -35550,10 +35573,8 @@ function formatAuthHealth(raw, now) {
35550
35573
  return accounts.map((a) => formatOneAccountHealth(a, now)).join("\n\n");
35551
35574
  }
35552
35575
 
35553
- // ../gogcli-mcp/src/dispatch-confirmation.ts
35554
- var confirmTokenParam = external_exports.string().optional().describe(
35555
- `ONLY for the two-step fallback (client without MCP elicitation, server with GOG_SEND_CONFIRM_FALLBACK=token). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has seen that preview and explicitly approved it in chat \u2014 never on the first call, never invented, never reused. Call again with the same arguments. Ignored when the client supports elicitation.`
35556
- );
35576
+ // ../gogcli-mcp/src/send-confirm-token.ts
35577
+ var spent = createSpentTokenStore();
35557
35578
 
35558
35579
  // ../gogcli-mcp/src/tools/auth.ts
35559
35580
  var AUTH_RUN_SUBCOMMANDS = ["list", "status", "services", "remove", "alias"];
@@ -35690,6 +35711,27 @@ function authToolsFor(defaultServices) {
35690
35711
  }
35691
35712
 
35692
35713
  // ../gogcli-mcp/src/tools/calendar.ts
35714
+ var ASKS = (tool) => `Use ${tool}, which asks the user to confirm.`;
35715
+ var CALENDAR_REFUSED = {
35716
+ create: { does: "can change what guests see", instead: ASKS("gog_calendar_create") },
35717
+ add: { does: "can change what guests see", instead: ASKS("gog_calendar_create") },
35718
+ new: { does: "can change what guests see", instead: ASKS("gog_calendar_create") },
35719
+ update: { does: "can change what guests see", instead: ASKS("gog_calendar_update") },
35720
+ edit: { does: "can change what guests see", instead: ASKS("gog_calendar_update") },
35721
+ set: { does: "can change what guests see", instead: ASKS("gog_calendar_update") },
35722
+ respond: { does: "can change what guests see", instead: ASKS("gog_calendar_respond") },
35723
+ rsvp: { does: "can change what guests see", instead: ASKS("gog_calendar_respond") },
35724
+ reply: { does: "can change what guests see", instead: ASKS("gog_calendar_respond") },
35725
+ move: { does: "moves an event off guests' calendars (and can email them)", instead: ASKS("gog_calendar_move") },
35726
+ transfer: { does: "moves an event off guests' calendars (and can email them)", instead: ASKS("gog_calendar_move") },
35727
+ delete: { does: "removes an event from every guest's calendar (the whole series by default)", instead: ASKS("gog_calendar_delete") },
35728
+ del: { does: "removes an event from every guest's calendar (the whole series by default)", instead: ASKS("gog_calendar_delete") },
35729
+ rm: { does: "removes an event from every guest's calendar (the whole series by default)", instead: ASKS("gog_calendar_delete") },
35730
+ remove: { does: "removes an event from every guest's calendar (the whole series by default)", instead: ASKS("gog_calendar_delete") },
35731
+ "delete-calendar": { does: "deletes a calendar and every event on it", instead: ASKS("gog_calendar_delete_calendar") },
35732
+ "out-of-office": { does: "auto-declines invitations and notifies their organizers", instead: ASKS("gog_calendar_out_of_office") },
35733
+ ooo: { does: "auto-declines invitations and notifies their organizers", instead: ASKS("gog_calendar_out_of_office") }
35734
+ };
35693
35735
  var reminderParams = {
35694
35736
  reminders: external_exports.array(external_exports.string()).max(5).optional().describe(
35695
35737
  `Reminders as method:duration, e.g. ["popup:30m", "email:1d"]. Method is popup or email; duration accepts m/h/d (max 40320 minutes = 4 weeks). Google allows at most 5. These REPLACE the event's reminders \u2014 on update, pass an EMPTY array to drop custom reminders and go back to the calendar's defaults. Cannot be combined with noReminders.`
@@ -35807,7 +35849,7 @@ var failIfNotEmptyParam = external_exports.boolean().optional().describe(
35807
35849
  );
35808
35850
 
35809
35851
  // ../gogcli-mcp/src/server.ts
35810
- var VERSION = true ? "4.4.0" : "0.0.0";
35852
+ var VERSION = true ? "4.5.1" : "0.0.0";
35811
35853
 
35812
35854
  // ../gogcli-mcp/src/bootstrap-auth.ts
35813
35855
  import { join as join5 } from "node:path";
package/manifest.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifest_version": "0.3",
4
4
  "name": "gogcli-mcp-contacts",
5
5
  "display_name": "gogcli (Contacts)",
6
- "version": "4.4.0",
6
+ "version": "4.5.1",
7
7
  "description": "Extended Google Contacts for Claude via gogcli — auth + Contacts + Workspace directory (People API)",
8
8
  "author": {
9
9
  "name": "Chris Hall",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gogcli-mcp-contacts",
3
- "version": "4.4.0",
3
+ "version": "4.5.1",
4
4
  "mcpName": "io.github.chrischall/gogcli-mcp-contacts",
5
5
  "description": "Extended Google Contacts + People MCP server via gogcli — auth + Contacts + Workspace directory (People API)",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
@@ -24,7 +24,7 @@
24
24
  "test:coverage": "vitest run --coverage"
25
25
  },
26
26
  "dependencies": {
27
- "@chrischall/mcp-utils": "^2.4.0",
27
+ "@chrischall/mcp-utils": "^2.6.0",
28
28
  "@modelcontextprotocol/server": "^2.0.0",
29
29
  "zod": "^4.6.1"
30
30
  },