gogcli-mcp-contacts 4.6.3 → 4.7.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.
package/dist/index.js CHANGED
@@ -34731,6 +34731,7 @@ function escapeKey(key) {
34731
34731
  var DEFAULT_REQUEST_KEY = "confirmation";
34732
34732
  var DEFAULT_CONFIRMATION_LABEL = "Confirm this action should proceed.";
34733
34733
  var UNSUPPORTED_NOTE = "Nothing was done because this client cannot show a confirmation prompt (it declares no MCP elicitation capability), and this action is never taken without one";
34734
+ var DISABLED_NOTE = "Nothing was done because confirmation prompts are turned off for this server, and this action is never taken without one";
34734
34735
  var STATE_PREFIX = "mcpu.confirm.v1.";
34735
34736
  function bindingKey(binding) {
34736
34737
  if (binding.ttlSeconds !== void 0 && !(Number.isFinite(binding.ttlSeconds) && binding.ttlSeconds > 0)) {
@@ -34803,6 +34804,15 @@ ${JSON.stringify(preview, null, 2)}`,
34803
34804
  };
34804
34805
  const response = inputResponse(ctx.mcpReq.inputResponses, requestKey);
34805
34806
  const accepted = acceptedContent(ctx.mcpReq.inputResponses, requestKey, confirmationSchema);
34807
+ if (options.elicitation === false) {
34808
+ return textResult({
34809
+ confirmed: false,
34810
+ dispatched: false,
34811
+ action: options.action,
34812
+ reason: "confirmation-unsupported",
34813
+ note: options.unsupportedNote ? `${DISABLED_NOTE}. ${options.unsupportedNote}` : `${DISABLED_NOTE}.`
34814
+ });
34815
+ }
34806
34816
  if (response.kind === "missing") {
34807
34817
  if (callerAcceptsFormElicitation(ctx) === false) {
34808
34818
  return textResult({
@@ -34997,7 +35007,7 @@ async function tokenConfirmation(action, fb) {
34997
35007
  }
34998
35008
  async function requireConfirmationWithFallback(ctx, options) {
34999
35009
  const { tokenFallback, ...confirmation } = options;
35000
- if (tokenFallback && callerAcceptsFormElicitation(ctx) === false) {
35010
+ if (tokenFallback && (options.elicitation === false || callerAcceptsFormElicitation(ctx) === false)) {
35001
35011
  return tokenConfirmation(options.action, tokenFallback);
35002
35012
  }
35003
35013
  return requireConfirmation(ctx, confirmation);
@@ -35143,6 +35153,20 @@ function readConfirmMode(env = process.env) {
35143
35153
  }
35144
35154
  return "refuse";
35145
35155
  }
35156
+ function readConfirmElicitation(env = process.env) {
35157
+ const raw = readEnvVar("MCP_CONFIRM_ELICITATION", { env })?.trim().toLowerCase();
35158
+ if (!raw || raw === "on")
35159
+ return "on";
35160
+ if (raw === "off")
35161
+ return "off";
35162
+ const key = `elicitation:${raw}`;
35163
+ if (!warned.has(key)) {
35164
+ warned.add(key);
35165
+ process.stderr.write(`MCP_CONFIRM_ELICITATION="${raw}" is not one of on, off; treating it as on.
35166
+ `);
35167
+ }
35168
+ return "on";
35169
+ }
35146
35170
  function readConfirmTtl(env) {
35147
35171
  const raw = readEnvVar("MCP_CONFIRM_TTL_SECONDS", { env })?.trim();
35148
35172
  if (!raw)
@@ -35187,6 +35211,7 @@ function spentTokenStoreFromEnv(env = process.env) {
35187
35211
  }
35188
35212
  var CONFIRM_TOKEN_AUTO_INSTRUCTION = "Nothing has been done yet. Review this preview; if it is what was intended, call again with the same arguments plus confirmToken. (This server runs with MCP_CONFIRM_MODE=auto, so the user's approval in chat is not required.)";
35189
35213
  var REFUSE_HINT = "Set MCP_CONFIRM_MODE=ask-user on the server to allow two-step confirmation instead.";
35214
+ var ELICITATION_OFF_HINT = "MCP_CONFIRM_ELICITATION=off on the server turns confirmation prompts off.";
35190
35215
  var BAD_TTL_HINT = "MCP_CONFIRM_TTL_SECONDS on the server is not a positive whole number of seconds; fix it to allow two-step confirmation.";
35191
35216
  function boundArgs(args) {
35192
35217
  if (args === null || typeof args !== "object" || Array.isArray(args) || !("confirmToken" in args))
@@ -35200,10 +35225,13 @@ function confirmationFromEnv(options) {
35200
35225
  const spent2 = callerSpent ?? spentTokenStoreFromEnv(env);
35201
35226
  const mode = readConfirmMode(env);
35202
35227
  const ttlSeconds = readConfirmTtl(env);
35228
+ const elicitationOff = readConfirmElicitation(env) === "off";
35203
35229
  const bound = args === void 0 ? void 0 : boundArgs(args);
35204
- const confirmation = bound === void 0 || rest.binding ? rest : { ...rest, binding: { key: confirmKeyFromEnv(env), args: bound, ttlSeconds: ttlSeconds ?? DEFAULT_TTL_SECONDS2 } };
35230
+ const bindingAdded = bound === void 0 || rest.binding ? rest : { ...rest, binding: { key: confirmKeyFromEnv(env), args: bound, ttlSeconds: ttlSeconds ?? DEFAULT_TTL_SECONDS2 } };
35231
+ const confirmation = elicitationOff ? { ...bindingAdded, elicitation: false } : bindingAdded;
35205
35232
  if (mode === "refuse" || ttlSeconds === void 0) {
35206
- const hint = mode === "refuse" ? REFUSE_HINT : BAD_TTL_HINT;
35233
+ const reason = mode === "refuse" ? REFUSE_HINT : BAD_TTL_HINT;
35234
+ const hint = elicitationOff ? `${ELICITATION_OFF_HINT} ${reason}` : reason;
35207
35235
  return {
35208
35236
  ...confirmation,
35209
35237
  unsupportedNote: confirmation.unsupportedNote ? `${confirmation.unsupportedNote} ${hint}` : hint
@@ -36330,7 +36358,15 @@ async function requireDispatchConfirmation(ctx, options) {
36330
36358
  confirmationLabel: options.confirmationLabel,
36331
36359
  ...options.unsupportedNote ? { unsupportedNote: options.unsupportedNote } : {}
36332
36360
  };
36333
- if (!fallback) return requireConfirmationWithFallback(ctx, confirmation);
36361
+ if (!fallback) {
36362
+ if (readConfirmElicitation() !== "off") return requireConfirmationWithFallback(ctx, confirmation);
36363
+ const offNote = "MCP_CONFIRM_ELICITATION=off on the server turns confirmation prompts off.";
36364
+ return requireConfirmationWithFallback(ctx, {
36365
+ ...confirmation,
36366
+ elicitation: false,
36367
+ unsupportedNote: confirmation.unsupportedNote ? `${offNote} ${confirmation.unsupportedNote}` : offNote
36368
+ });
36369
+ }
36334
36370
  return requireConfirmationWithFallback(ctx, confirmationFromEnv({
36335
36371
  ...confirmation,
36336
36372
  tool: fallback.tool,
@@ -36620,7 +36656,7 @@ var failIfNotEmptyParam = external_exports.boolean().optional().describe(
36620
36656
  );
36621
36657
 
36622
36658
  // ../gogcli-mcp/src/server.ts
36623
- var VERSION = true ? "4.6.3" : "0.0.0";
36659
+ var VERSION = true ? "4.7.0" : "0.0.0";
36624
36660
 
36625
36661
  // ../gogcli-mcp/src/bootstrap-auth.ts
36626
36662
  import { join as join7 } 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.6.3",
6
+ "version": "4.7.0",
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.6.3",
3
+ "version": "4.7.0",
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.14.0",
27
+ "@chrischall/mcp-utils": "^2.15.0",
28
28
  "@modelcontextprotocol/server": "^2.3.0",
29
29
  "zod": "^4.6.1"
30
30
  },