@cyanheads/git-mcp-server 2.14.0 → 2.15.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.
Files changed (3) hide show
  1. package/README.md +10 -10
  2. package/dist/index.js +729 -156
  3. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -15284,7 +15284,7 @@ var package_default;
15284
15284
  var init_package = __esm(() => {
15285
15285
  package_default = {
15286
15286
  name: "@cyanheads/git-mcp-server",
15287
- version: "2.13.0",
15287
+ version: "2.15.0",
15288
15288
  mcpName: "io.github.cyanheads/git-mcp-server",
15289
15289
  description: "A secure and scalable Git MCP server enabling AI agents to perform comprehensive Git version control operations via STDIO and Streamable HTTP.",
15290
15290
  main: "dist/index.js",
@@ -15343,7 +15343,7 @@ var init_package = __esm(() => {
15343
15343
  "publish-mcp": "bun scripts/validate-mcp-publish-schema.ts"
15344
15344
  },
15345
15345
  devDependencies: {
15346
- "@cloudflare/workers-types": "^4.20260423.1",
15346
+ "@cloudflare/workers-types": "^4.20260426.1",
15347
15347
  "@eslint/js": "^10.0.1",
15348
15348
  "@hono/mcp": "^0.2.5",
15349
15349
  "@hono/node-server": "^2.0.0",
@@ -15358,7 +15358,7 @@ var init_package = __esm(() => {
15358
15358
  "@opentelemetry/sdk-node": "^0.215.0",
15359
15359
  "@opentelemetry/sdk-trace-node": "^2.7.0",
15360
15360
  "@opentelemetry/semantic-conventions": "^1.40.0",
15361
- "@supabase/supabase-js": "^2.104.1",
15361
+ "@supabase/supabase-js": "^2.105.1",
15362
15362
  "@types/bun": "^1.3.13",
15363
15363
  "@types/cross-spawn": "^6.0.6",
15364
15364
  "@types/node": "^25.6.0",
@@ -15370,19 +15370,19 @@ var init_package = __esm(() => {
15370
15370
  eslint: "^10.2.1",
15371
15371
  execa: "^9.6.1",
15372
15372
  globals: "^17.5.0",
15373
- hono: "^4.12.14",
15373
+ hono: "^4.12.15",
15374
15374
  husky: "^9.1.7",
15375
15375
  ignore: "^7.0.5",
15376
- jose: "^6.2.2",
15377
- msw: "^2.13.5",
15376
+ jose: "^6.2.3",
15377
+ msw: "^2.13.6",
15378
15378
  prettier: "^3.8.3",
15379
15379
  "reflect-metadata": "^0.2.2",
15380
- repomix: "^1.13.1",
15380
+ repomix: "^1.14.0",
15381
15381
  tslib: "^2.8.1",
15382
15382
  tsyringe: "^4.10.0",
15383
15383
  typedoc: "^0.28.19",
15384
15384
  typescript: "^6.0.3",
15385
- "typescript-eslint": "^8.59.0",
15385
+ "typescript-eslint": "^8.59.1",
15386
15386
  validator: "^13.15.35",
15387
15387
  vite: "^8.0.10",
15388
15388
  "vite-tsconfig-paths": "^6.1.1",
@@ -114286,7 +114286,7 @@ Suggested solution: ${env.workaround}`;
114286
114286
  var require_version48 = __commonJS((exports) => {
114287
114287
  Object.defineProperty(exports, "__esModule", { value: true });
114288
114288
  exports.version = undefined;
114289
- exports.version = "2.104.1";
114289
+ exports.version = "2.105.1";
114290
114290
  });
114291
114291
 
114292
114292
  // node_modules/@supabase/realtime-js/dist/main/lib/constants.js
@@ -115806,7 +115806,7 @@ var require_phoenix_cjs = __commonJS((exports, module) => {
115806
115806
  } catch (e2) {
115807
115807
  this.log("error", "error in heartbeat callback", e2);
115808
115808
  }
115809
- this.triggerChanError();
115809
+ this.triggerChanError(new Error("heartbeat timeout"));
115810
115810
  this.closeWasClean = false;
115811
115811
  this.teardown(() => this.reconnectTimer.scheduleTimeout(), WS_CLOSE_NORMAL, "heartbeat timeout");
115812
115812
  }
@@ -115865,7 +115865,7 @@ var require_phoenix_cjs = __commonJS((exports, module) => {
115865
115865
  this.conn.onclose = () => {};
115866
115866
  if (this.hasLogger())
115867
115867
  this.log("transport", "close", event);
115868
- this.triggerChanError();
115868
+ this.triggerChanError(event);
115869
115869
  this.clearHeartbeats();
115870
115870
  if (!this.closeWasClean) {
115871
115871
  this.reconnectTimer.scheduleTimeout();
@@ -115874,18 +115874,18 @@ var require_phoenix_cjs = __commonJS((exports, module) => {
115874
115874
  }
115875
115875
  onConnError(error48) {
115876
115876
  if (this.hasLogger())
115877
- this.log("transport", error48);
115877
+ this.log("transport", "error", error48);
115878
115878
  let transportBefore = this.transport;
115879
115879
  let establishedBefore = this.establishedConnections;
115880
115880
  this.triggerStateCallbacks("error", error48, transportBefore, establishedBefore);
115881
115881
  if (transportBefore === this.transport || establishedBefore > 0) {
115882
- this.triggerChanError();
115882
+ this.triggerChanError(error48);
115883
115883
  }
115884
115884
  }
115885
- triggerChanError() {
115885
+ triggerChanError(reason) {
115886
115886
  this.channels.forEach((channel) => {
115887
115887
  if (!(channel.isErrored() || channel.isLeaving() || channel.isClosed())) {
115888
- channel.trigger(CHANNEL_EVENTS.error);
115888
+ channel.trigger(CHANNEL_EVENTS.error, reason);
115889
115889
  }
115890
115890
  });
115891
115891
  }
@@ -116120,6 +116120,29 @@ var require_RealtimePresence = __commonJS((exports) => {
116120
116120
  exports.default = RealtimePresence;
116121
116121
  });
116122
116122
 
116123
+ // node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js
116124
+ var require_normalizeChannelError = __commonJS((exports) => {
116125
+ Object.defineProperty(exports, "__esModule", { value: true });
116126
+ exports.normalizeChannelError = normalizeChannelError;
116127
+ function normalizeChannelError(reason) {
116128
+ if (reason instanceof Error) {
116129
+ return reason;
116130
+ }
116131
+ if (typeof reason === "string") {
116132
+ return new Error(reason);
116133
+ }
116134
+ if (reason && typeof reason === "object") {
116135
+ const obj = reason;
116136
+ if (typeof obj.code === "number") {
116137
+ const detail = typeof obj.reason === "string" && obj.reason ? ` (${obj.reason})` : "";
116138
+ return new Error(`socket closed: ${obj.code}${detail}`, { cause: reason });
116139
+ }
116140
+ return new Error("channel error: transport failure", { cause: reason });
116141
+ }
116142
+ return new Error("channel error: connection lost");
116143
+ }
116144
+ });
116145
+
116123
116146
  // node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js
116124
116147
  var require_channelAdapter = __commonJS((exports) => {
116125
116148
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -116231,6 +116254,7 @@ var require_RealtimeChannel = __commonJS((exports) => {
116231
116254
  var RealtimePresence_1 = tslib_1.__importDefault(require_RealtimePresence());
116232
116255
  var Transformers = tslib_1.__importStar(require_transformers());
116233
116256
  var transformers_1 = require_transformers();
116257
+ var normalizeChannelError_1 = require_normalizeChannelError();
116234
116258
  var channelAdapter_1 = tslib_1.__importDefault(require_channelAdapter());
116235
116259
  var REALTIME_POSTGRES_CHANGES_LISTEN_EVENT;
116236
116260
  (function(REALTIME_POSTGRES_CHANGES_LISTEN_EVENT2) {
@@ -116318,7 +116342,7 @@ var require_RealtimeChannel = __commonJS((exports) => {
116318
116342
  accessTokenPayload.access_token = this.socket.accessTokenValue;
116319
116343
  }
116320
116344
  this._onError((reason) => {
116321
- callback === null || callback === undefined || callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, reason);
116345
+ callback === null || callback === undefined || callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, (0, normalizeChannelError_1.normalizeChannelError)(reason));
116322
116346
  });
116323
116347
  this._onClose(() => callback === null || callback === undefined ? undefined : callback(REALTIME_SUBSCRIBE_STATES.CLOSED));
116324
116348
  this.updateJoinPayload(Object.assign({ config: config3 }, accessTokenPayload));
@@ -116334,7 +116358,8 @@ var require_RealtimeChannel = __commonJS((exports) => {
116334
116358
  this._updatePostgresBindings(postgres_changes2, callback);
116335
116359
  }).receive("error", (error48) => {
116336
116360
  this.state = constants_1.CHANNEL_STATES.errored;
116337
- callback === null || callback === undefined || callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, new Error(JSON.stringify(Object.values(error48).join(", ") || "error")));
116361
+ const message = Object.values(error48).join(", ") || "error";
116362
+ callback === null || callback === undefined || callback(REALTIME_SUBSCRIBE_STATES.CHANNEL_ERROR, new Error(message, { cause: error48 }));
116338
116363
  }).receive("timeout", () => {
116339
116364
  callback === null || callback === undefined || callback(REALTIME_SUBSCRIBE_STATES.TIMED_OUT);
116340
116365
  });
@@ -116799,6 +116824,8 @@ var require_RealtimeClient = __commonJS((exports) => {
116799
116824
  this._authPromise = null;
116800
116825
  this._workerHeartbeatTimer = undefined;
116801
116826
  this._pendingWorkerHeartbeatRef = null;
116827
+ this._pendingDisconnectTimer = null;
116828
+ this._disconnectOnEmptyChannelsAfterMs = 0;
116802
116829
  this._resolveFetch = (customFetch) => {
116803
116830
  if (customFetch) {
116804
116831
  return (...args) => customFetch(...args);
@@ -116850,6 +116877,7 @@ var require_RealtimeClient = __commonJS((exports) => {
116850
116877
  return this.socketAdapter.endPointURL();
116851
116878
  }
116852
116879
  async disconnect(code, reason) {
116880
+ this._cancelPendingDisconnect();
116853
116881
  if (this.isDisconnecting()) {
116854
116882
  return "ok";
116855
116883
  }
@@ -116866,9 +116894,6 @@ var require_RealtimeClient = __commonJS((exports) => {
116866
116894
  if (status === "ok") {
116867
116895
  channel.teardown();
116868
116896
  }
116869
- if (this.channels.length === 0) {
116870
- this.disconnect();
116871
- }
116872
116897
  return status;
116873
116898
  }
116874
116899
  async removeAllChannels() {
@@ -116878,7 +116903,7 @@ var require_RealtimeClient = __commonJS((exports) => {
116878
116903
  return result2;
116879
116904
  });
116880
116905
  const result = await Promise.all(promises);
116881
- this.disconnect();
116906
+ await this.disconnect();
116882
116907
  return result;
116883
116908
  }
116884
116909
  log(kind, msg, data) {
@@ -116901,6 +116926,7 @@ var require_RealtimeClient = __commonJS((exports) => {
116901
116926
  const exists = this.getChannels().find((c) => c.topic === realtimeTopic);
116902
116927
  if (!exists) {
116903
116928
  const chan = new RealtimeChannel_1.default(`realtime:${topic}`, params, this);
116929
+ this._cancelPendingDisconnect();
116904
116930
  this.channels.push(chan);
116905
116931
  return chan;
116906
116932
  } else {
@@ -116932,6 +116958,33 @@ var require_RealtimeClient = __commonJS((exports) => {
116932
116958
  }
116933
116959
  _remove(channel) {
116934
116960
  this.channels = this.channels.filter((c) => c.topic !== channel.topic);
116961
+ if (this.channels.length === 0) {
116962
+ this.log("transport", "no channels remaining, scheduling disconnect");
116963
+ this._schedulePendingDisconnect();
116964
+ }
116965
+ }
116966
+ _schedulePendingDisconnect() {
116967
+ this._cancelPendingDisconnect();
116968
+ if (this._disconnectOnEmptyChannelsAfterMs === 0) {
116969
+ this.log("transport", "disconnecting immediately - no channels");
116970
+ this.disconnect();
116971
+ return;
116972
+ }
116973
+ this._pendingDisconnectTimer = setTimeout(() => {
116974
+ this._pendingDisconnectTimer = null;
116975
+ if (this.channels.length === 0) {
116976
+ this.log("transport", "deferred disconnect fired - no channels, disconnecting");
116977
+ this.disconnect();
116978
+ }
116979
+ }, this._disconnectOnEmptyChannelsAfterMs);
116980
+ this.log("transport", `deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`);
116981
+ }
116982
+ _cancelPendingDisconnect() {
116983
+ if (this._pendingDisconnectTimer !== null) {
116984
+ this.log("transport", "pending disconnect cancelled - channel activity detected");
116985
+ clearTimeout(this._pendingDisconnectTimer);
116986
+ this._pendingDisconnectTimer = null;
116987
+ }
116935
116988
  }
116936
116989
  async _performAuth(token = null) {
116937
116990
  let tokenToSend;
@@ -117057,22 +117110,23 @@ var require_RealtimeClient = __commonJS((exports) => {
117057
117110
  return result_url;
117058
117111
  }
117059
117112
  _initializeOptions(options) {
117060
- var _a2, _b, _c, _d, _e, _f, _g, _h, _j;
117113
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
117061
117114
  this.worker = (_a2 = options === null || options === undefined ? undefined : options.worker) !== null && _a2 !== undefined ? _a2 : false;
117062
117115
  this.accessToken = (_b = options === null || options === undefined ? undefined : options.accessToken) !== null && _b !== undefined ? _b : null;
117063
117116
  const result = {};
117064
117117
  result.timeout = (_c = options === null || options === undefined ? undefined : options.timeout) !== null && _c !== undefined ? _c : constants_1.DEFAULT_TIMEOUT;
117065
117118
  result.heartbeatIntervalMs = (_d = options === null || options === undefined ? undefined : options.heartbeatIntervalMs) !== null && _d !== undefined ? _d : CONNECTION_TIMEOUTS.HEARTBEAT_INTERVAL;
117066
- result.transport = (_e = options === null || options === undefined ? undefined : options.transport) !== null && _e !== undefined ? _e : websocket_factory_1.default.getWebSocketConstructor();
117119
+ this._disconnectOnEmptyChannelsAfterMs = (_e = options === null || options === undefined ? undefined : options.disconnectOnEmptyChannelsAfterMs) !== null && _e !== undefined ? _e : 2 * ((_f = options === null || options === undefined ? undefined : options.heartbeatIntervalMs) !== null && _f !== undefined ? _f : CONNECTION_TIMEOUTS.HEARTBEAT_INTERVAL);
117120
+ result.transport = (_g = options === null || options === undefined ? undefined : options.transport) !== null && _g !== undefined ? _g : websocket_factory_1.default.getWebSocketConstructor();
117067
117121
  result.params = options === null || options === undefined ? undefined : options.params;
117068
117122
  result.logger = options === null || options === undefined ? undefined : options.logger;
117069
117123
  result.heartbeatCallback = this._wrapHeartbeatCallback(options === null || options === undefined ? undefined : options.heartbeatCallback);
117070
- result.reconnectAfterMs = (_f = options === null || options === undefined ? undefined : options.reconnectAfterMs) !== null && _f !== undefined ? _f : (tries) => {
117124
+ result.reconnectAfterMs = (_h = options === null || options === undefined ? undefined : options.reconnectAfterMs) !== null && _h !== undefined ? _h : (tries) => {
117071
117125
  return RECONNECT_INTERVALS[tries - 1] || DEFAULT_RECONNECT_FALLBACK;
117072
117126
  };
117073
117127
  let defaultEncode;
117074
117128
  let defaultDecode;
117075
- const vsn = (_g = options === null || options === undefined ? undefined : options.vsn) !== null && _g !== undefined ? _g : constants_1.DEFAULT_VSN;
117129
+ const vsn = (_j = options === null || options === undefined ? undefined : options.vsn) !== null && _j !== undefined ? _j : constants_1.DEFAULT_VSN;
117076
117130
  switch (vsn) {
117077
117131
  case constants_1.VSN_1_0_0:
117078
117132
  defaultEncode = (payload, callback) => {
@@ -117090,8 +117144,8 @@ var require_RealtimeClient = __commonJS((exports) => {
117090
117144
  throw new Error(`Unsupported serializer version: ${result.vsn}`);
117091
117145
  }
117092
117146
  result.vsn = vsn;
117093
- result.encode = (_h = options === null || options === undefined ? undefined : options.encode) !== null && _h !== undefined ? _h : defaultEncode;
117094
- result.decode = (_j = options === null || options === undefined ? undefined : options.decode) !== null && _j !== undefined ? _j : defaultDecode;
117147
+ result.encode = (_k = options === null || options === undefined ? undefined : options.encode) !== null && _k !== undefined ? _k : defaultEncode;
117148
+ result.decode = (_l = options === null || options === undefined ? undefined : options.decode) !== null && _l !== undefined ? _l : defaultDecode;
117095
117149
  result.beforeReconnect = this._reconnectAuth.bind(this);
117096
117150
  if ((options === null || options === undefined ? undefined : options.logLevel) || (options === null || options === undefined ? undefined : options.log_level)) {
117097
117151
  this.logLevel = options.logLevel || options.log_level;
@@ -117150,7 +117204,7 @@ var require_main3 = __commonJS((exports) => {
117150
117204
  var require_version49 = __commonJS((exports) => {
117151
117205
  Object.defineProperty(exports, "__esModule", { value: true });
117152
117206
  exports.version = undefined;
117153
- exports.version = "2.104.1";
117207
+ exports.version = "2.105.1";
117154
117208
  });
117155
117209
 
117156
117210
  // node_modules/@supabase/auth-js/dist/main/lib/constants.js
@@ -117543,6 +117597,7 @@ var require_helpers2 = __commonJS((exports) => {
117543
117597
  exports.validateExp = validateExp;
117544
117598
  exports.getAlgorithm = getAlgorithm;
117545
117599
  exports.validateUUID = validateUUID;
117600
+ exports.assertPasskeyExperimentalEnabled = assertPasskeyExperimentalEnabled;
117546
117601
  exports.userNotAvailableProxy = userNotAvailableProxy;
117547
117602
  exports.insecureUserWarningProxy = insecureUserWarningProxy;
117548
117603
  exports.deepClone = deepClone;
@@ -117787,6 +117842,11 @@ var require_helpers2 = __commonJS((exports) => {
117787
117842
  throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not");
117788
117843
  }
117789
117844
  }
117845
+ function assertPasskeyExperimentalEnabled(experimental) {
117846
+ if (!experimental.passkey) {
117847
+ throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).");
117848
+ }
117849
+ }
117790
117850
  function userNotAvailableProxy() {
117791
117851
  const proxyTarget = {};
117792
117852
  return new Proxy(proxyTarget, {
@@ -118004,10 +118064,11 @@ var require_GoTrueAdminApi = __commonJS((exports) => {
118004
118064
  var errors_1 = require_errors2();
118005
118065
 
118006
118066
  class GoTrueAdminApi {
118007
- constructor({ url: url2 = "", headers = {}, fetch: fetch3 }) {
118067
+ constructor({ url: url2 = "", headers = {}, fetch: fetch3, experimental }) {
118008
118068
  this.url = url2;
118009
118069
  this.headers = headers;
118010
118070
  this.fetch = (0, helpers_1.resolveFetch)(fetch3);
118071
+ this.experimental = experimental !== null && experimental !== undefined ? experimental : {};
118011
118072
  this.mfa = {
118012
118073
  listFactors: this._listFactors.bind(this),
118013
118074
  deleteFactor: this._deleteFactor.bind(this)
@@ -118027,6 +118088,10 @@ var require_GoTrueAdminApi = __commonJS((exports) => {
118027
118088
  updateProvider: this._updateCustomProvider.bind(this),
118028
118089
  deleteProvider: this._deleteCustomProvider.bind(this)
118029
118090
  };
118091
+ this.passkey = {
118092
+ listPasskeys: this._adminListPasskeys.bind(this),
118093
+ deletePasskey: this._adminDeletePasskey.bind(this)
118094
+ };
118030
118095
  }
118031
118096
  async signOut(jwt2, scope = types_1.SIGN_OUT_SCOPES[0]) {
118032
118097
  if (types_1.SIGN_OUT_SCOPES.indexOf(scope) < 0) {
@@ -118406,6 +118471,32 @@ var require_GoTrueAdminApi = __commonJS((exports) => {
118406
118471
  throw error48;
118407
118472
  }
118408
118473
  }
118474
+ async _adminListPasskeys(params) {
118475
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
118476
+ (0, helpers_1.validateUUID)(params.userId);
118477
+ try {
118478
+ return await (0, fetch_1._request)(this.fetch, "GET", `${this.url}/admin/users/${params.userId}/passkeys`, { headers: this.headers, xform: (data) => ({ data, error: null }) });
118479
+ } catch (error48) {
118480
+ if ((0, errors_1.isAuthError)(error48)) {
118481
+ return { data: null, error: error48 };
118482
+ }
118483
+ throw error48;
118484
+ }
118485
+ }
118486
+ async _adminDeletePasskey(params) {
118487
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
118488
+ (0, helpers_1.validateUUID)(params.userId);
118489
+ (0, helpers_1.validateUUID)(params.passkeyId);
118490
+ try {
118491
+ await (0, fetch_1._request)(this.fetch, "DELETE", `${this.url}/admin/users/${params.userId}/passkeys/${params.passkeyId}`, { headers: this.headers, noResolveJson: true });
118492
+ return { data: null, error: null };
118493
+ } catch (error48) {
118494
+ if ((0, errors_1.isAuthError)(error48)) {
118495
+ return { data: null, error: error48 };
118496
+ }
118497
+ throw error48;
118498
+ }
118499
+ }
118409
118500
  }
118410
118501
  exports.default = GoTrueAdminApi;
118411
118502
  });
@@ -118893,6 +118984,7 @@ var require_webauthn = __commonJS((exports) => {
118893
118984
  exports.serializeCredentialCreationResponse = serializeCredentialCreationResponse;
118894
118985
  exports.serializeCredentialRequestResponse = serializeCredentialRequestResponse;
118895
118986
  exports.isValidDomain = isValidDomain;
118987
+ exports.browserSupportsWebAuthn = browserSupportsWebAuthn;
118896
118988
  exports.createCredential = createCredential;
118897
118989
  exports.getCredential = getCredential;
118898
118990
  exports.mergeCredentialCreationOptions = mergeCredentialCreationOptions;
@@ -119366,7 +119458,8 @@ var require_GoTrueClient = __commonJS((exports) => {
119366
119458
  hasCustomAuthorizationHeader: false,
119367
119459
  throwOnError: false,
119368
119460
  lockAcquireTimeout: 5000,
119369
- skipAutoInitialize: false
119461
+ skipAutoInitialize: false,
119462
+ experimental: {}
119370
119463
  };
119371
119464
  async function lockNoOp(name, acquireTimeout, fn) {
119372
119465
  return await fn();
@@ -119389,7 +119482,7 @@ var require_GoTrueClient = __commonJS((exports) => {
119389
119482
  GLOBAL_JWKS[this.storageKey] = Object.assign(Object.assign({}, GLOBAL_JWKS[this.storageKey]), { cachedAt: value });
119390
119483
  }
119391
119484
  constructor(options) {
119392
- var _a2, _b, _c;
119485
+ var _a2, _b, _c, _d;
119393
119486
  this.userStorage = null;
119394
119487
  this.memoryStorage = null;
119395
119488
  this.stateChangeEmitters = new Map;
@@ -119422,10 +119515,12 @@ var require_GoTrueClient = __commonJS((exports) => {
119422
119515
  }
119423
119516
  this.persistSession = settings.persistSession;
119424
119517
  this.autoRefreshToken = settings.autoRefreshToken;
119518
+ this.experimental = (_b = settings.experimental) !== null && _b !== undefined ? _b : {};
119425
119519
  this.admin = new GoTrueAdminApi_1.default({
119426
119520
  url: settings.url,
119427
119521
  headers: settings.headers,
119428
- fetch: settings.fetch
119522
+ fetch: settings.fetch,
119523
+ experimental: this.experimental
119429
119524
  });
119430
119525
  this.url = settings.url;
119431
119526
  this.headers = settings.headers;
@@ -119438,7 +119533,7 @@ var require_GoTrueClient = __commonJS((exports) => {
119438
119533
  this.lockAcquireTimeout = settings.lockAcquireTimeout;
119439
119534
  if (settings.lock) {
119440
119535
  this.lock = settings.lock;
119441
- } else if (this.persistSession && (0, helpers_1.isBrowser)() && ((_b = globalThis === null || globalThis === undefined ? undefined : globalThis.navigator) === null || _b === undefined ? undefined : _b.locks)) {
119536
+ } else if (this.persistSession && (0, helpers_1.isBrowser)() && ((_c = globalThis === null || globalThis === undefined ? undefined : globalThis.navigator) === null || _c === undefined ? undefined : _c.locks)) {
119442
119537
  this.lock = locks_1.navigatorLock;
119443
119538
  } else {
119444
119539
  this.lock = lockNoOp;
@@ -119464,6 +119559,15 @@ var require_GoTrueClient = __commonJS((exports) => {
119464
119559
  listGrants: this._listOAuthGrants.bind(this),
119465
119560
  revokeGrant: this._revokeOAuthGrant.bind(this)
119466
119561
  };
119562
+ this.passkey = {
119563
+ startRegistration: this._startPasskeyRegistration.bind(this),
119564
+ verifyRegistration: this._verifyPasskeyRegistration.bind(this),
119565
+ startAuthentication: this._startPasskeyAuthentication.bind(this),
119566
+ verifyAuthentication: this._verifyPasskeyAuthentication.bind(this),
119567
+ list: this._listPasskeys.bind(this),
119568
+ update: this._updatePasskey.bind(this),
119569
+ delete: this._deletePasskey.bind(this)
119570
+ };
119467
119571
  if (this.persistSession) {
119468
119572
  if (settings.storage) {
119469
119573
  this.storage = settings.storage;
@@ -119488,7 +119592,7 @@ var require_GoTrueClient = __commonJS((exports) => {
119488
119592
  } catch (e2) {
119489
119593
  console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available", e2);
119490
119594
  }
119491
- (_c = this.broadcastChannel) === null || _c === undefined || _c.addEventListener("message", async (event) => {
119595
+ (_d = this.broadcastChannel) === null || _d === undefined || _d.addEventListener("message", async (event) => {
119492
119596
  this._debug("received broadcast notification from other tab or client", event);
119493
119597
  try {
119494
119598
  await this._notifyAllSubscribers(event.data.event, event.data.session, false);
@@ -121576,6 +121680,274 @@ var require_GoTrueClient = __commonJS((exports) => {
121576
121680
  throw error48;
121577
121681
  }
121578
121682
  }
121683
+ async signInWithPasskey(credentials) {
121684
+ var _a2, _b, _c;
121685
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
121686
+ try {
121687
+ if (!(0, webauthn_1.browserSupportsWebAuthn)()) {
121688
+ return this._returnResult({
121689
+ data: null,
121690
+ error: new errors_1.AuthUnknownError("Browser does not support WebAuthn", null)
121691
+ });
121692
+ }
121693
+ const { data: options, error: optionsError } = await this._startPasskeyAuthentication({
121694
+ options: { captchaToken: (_a2 = credentials === null || credentials === undefined ? undefined : credentials.options) === null || _a2 === undefined ? undefined : _a2.captchaToken }
121695
+ });
121696
+ if (optionsError || !options) {
121697
+ return this._returnResult({ data: null, error: optionsError });
121698
+ }
121699
+ const publicKeyOptions = (0, webauthn_1.deserializeCredentialRequestOptions)(options.options);
121700
+ const signal = (_c = (_b = credentials === null || credentials === undefined ? undefined : credentials.options) === null || _b === undefined ? undefined : _b.signal) !== null && _c !== undefined ? _c : webauthn_1.webAuthnAbortService.createNewAbortSignal();
121701
+ const { data: credential, error: credentialError } = await (0, webauthn_1.getCredential)({
121702
+ publicKey: publicKeyOptions,
121703
+ signal
121704
+ });
121705
+ if (credentialError || !credential) {
121706
+ return this._returnResult({
121707
+ data: null,
121708
+ error: credentialError !== null && credentialError !== undefined ? credentialError : new errors_1.AuthUnknownError("WebAuthn ceremony failed", null)
121709
+ });
121710
+ }
121711
+ const serialized = (0, webauthn_1.serializeCredentialRequestResponse)(credential);
121712
+ return this._verifyPasskeyAuthentication({
121713
+ challengeId: options.challenge_id,
121714
+ credential: serialized
121715
+ });
121716
+ } catch (error48) {
121717
+ if ((0, errors_1.isAuthError)(error48)) {
121718
+ return this._returnResult({ data: null, error: error48 });
121719
+ }
121720
+ throw error48;
121721
+ }
121722
+ }
121723
+ async registerPasskey(credentials) {
121724
+ var _a2, _b;
121725
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
121726
+ try {
121727
+ if (!(0, webauthn_1.browserSupportsWebAuthn)()) {
121728
+ return this._returnResult({
121729
+ data: null,
121730
+ error: new errors_1.AuthUnknownError("Browser does not support WebAuthn", null)
121731
+ });
121732
+ }
121733
+ const { data: options, error: optionsError } = await this._startPasskeyRegistration();
121734
+ if (optionsError || !options) {
121735
+ return this._returnResult({ data: null, error: optionsError });
121736
+ }
121737
+ const publicKeyOptions = (0, webauthn_1.deserializeCredentialCreationOptions)(options.options);
121738
+ const signal = (_b = (_a2 = credentials === null || credentials === undefined ? undefined : credentials.options) === null || _a2 === undefined ? undefined : _a2.signal) !== null && _b !== undefined ? _b : webauthn_1.webAuthnAbortService.createNewAbortSignal();
121739
+ const { data: credential, error: credentialError } = await (0, webauthn_1.createCredential)({
121740
+ publicKey: publicKeyOptions,
121741
+ signal
121742
+ });
121743
+ if (credentialError || !credential) {
121744
+ return this._returnResult({
121745
+ data: null,
121746
+ error: credentialError !== null && credentialError !== undefined ? credentialError : new errors_1.AuthUnknownError("WebAuthn ceremony failed", null)
121747
+ });
121748
+ }
121749
+ const serialized = (0, webauthn_1.serializeCredentialCreationResponse)(credential);
121750
+ return this._verifyPasskeyRegistration({
121751
+ challengeId: options.challenge_id,
121752
+ credential: serialized
121753
+ });
121754
+ } catch (error48) {
121755
+ if ((0, errors_1.isAuthError)(error48)) {
121756
+ return this._returnResult({ data: null, error: error48 });
121757
+ }
121758
+ throw error48;
121759
+ }
121760
+ }
121761
+ async _startPasskeyRegistration() {
121762
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
121763
+ try {
121764
+ return await this._useSession(async (result) => {
121765
+ const { data: { session }, error: sessionError } = result;
121766
+ if (sessionError) {
121767
+ return this._returnResult({ data: null, error: sessionError });
121768
+ }
121769
+ if (!session) {
121770
+ return this._returnResult({ data: null, error: new errors_1.AuthSessionMissingError });
121771
+ }
121772
+ const { data, error: error48 } = await (0, fetch_1._request)(this.fetch, "POST", `${this.url}/passkeys/registration/options`, {
121773
+ headers: this.headers,
121774
+ jwt: session.access_token,
121775
+ body: {}
121776
+ });
121777
+ if (error48) {
121778
+ return this._returnResult({ data: null, error: error48 });
121779
+ }
121780
+ return this._returnResult({ data, error: null });
121781
+ });
121782
+ } catch (error48) {
121783
+ if ((0, errors_1.isAuthError)(error48)) {
121784
+ return this._returnResult({ data: null, error: error48 });
121785
+ }
121786
+ throw error48;
121787
+ }
121788
+ }
121789
+ async _verifyPasskeyRegistration(params) {
121790
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
121791
+ try {
121792
+ return await this._useSession(async (result) => {
121793
+ const { data: { session }, error: sessionError } = result;
121794
+ if (sessionError) {
121795
+ return this._returnResult({ data: null, error: sessionError });
121796
+ }
121797
+ if (!session) {
121798
+ return this._returnResult({ data: null, error: new errors_1.AuthSessionMissingError });
121799
+ }
121800
+ const { data, error: error48 } = await (0, fetch_1._request)(this.fetch, "POST", `${this.url}/passkeys/registration/verify`, {
121801
+ headers: this.headers,
121802
+ jwt: session.access_token,
121803
+ body: {
121804
+ challenge_id: params.challengeId,
121805
+ credential: params.credential
121806
+ }
121807
+ });
121808
+ if (error48) {
121809
+ return this._returnResult({ data: null, error: error48 });
121810
+ }
121811
+ return this._returnResult({ data, error: null });
121812
+ });
121813
+ } catch (error48) {
121814
+ if ((0, errors_1.isAuthError)(error48)) {
121815
+ return this._returnResult({ data: null, error: error48 });
121816
+ }
121817
+ throw error48;
121818
+ }
121819
+ }
121820
+ async _startPasskeyAuthentication(params) {
121821
+ var _a2;
121822
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
121823
+ try {
121824
+ const { data, error: error48 } = await (0, fetch_1._request)(this.fetch, "POST", `${this.url}/passkeys/authentication/options`, {
121825
+ headers: this.headers,
121826
+ body: {
121827
+ gotrue_meta_security: { captcha_token: (_a2 = params === null || params === undefined ? undefined : params.options) === null || _a2 === undefined ? undefined : _a2.captchaToken }
121828
+ }
121829
+ });
121830
+ if (error48) {
121831
+ return this._returnResult({ data: null, error: error48 });
121832
+ }
121833
+ return this._returnResult({ data, error: null });
121834
+ } catch (error48) {
121835
+ if ((0, errors_1.isAuthError)(error48)) {
121836
+ return this._returnResult({ data: null, error: error48 });
121837
+ }
121838
+ throw error48;
121839
+ }
121840
+ }
121841
+ async _verifyPasskeyAuthentication(params) {
121842
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
121843
+ try {
121844
+ const { data, error: error48 } = await (0, fetch_1._request)(this.fetch, "POST", `${this.url}/passkeys/authentication/verify`, {
121845
+ headers: this.headers,
121846
+ body: {
121847
+ challenge_id: params.challengeId,
121848
+ credential: params.credential
121849
+ },
121850
+ xform: fetch_1._sessionResponse
121851
+ });
121852
+ if (error48) {
121853
+ return this._returnResult({ data: null, error: error48 });
121854
+ }
121855
+ if (data.session) {
121856
+ await this._saveSession(data.session);
121857
+ await this._notifyAllSubscribers("SIGNED_IN", data.session);
121858
+ }
121859
+ return this._returnResult({ data, error: null });
121860
+ } catch (error48) {
121861
+ if ((0, errors_1.isAuthError)(error48)) {
121862
+ return this._returnResult({ data: null, error: error48 });
121863
+ }
121864
+ throw error48;
121865
+ }
121866
+ }
121867
+ async _listPasskeys() {
121868
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
121869
+ try {
121870
+ return await this._useSession(async (result) => {
121871
+ const { data: { session }, error: sessionError } = result;
121872
+ if (sessionError) {
121873
+ return this._returnResult({ data: null, error: sessionError });
121874
+ }
121875
+ if (!session) {
121876
+ return this._returnResult({ data: null, error: new errors_1.AuthSessionMissingError });
121877
+ }
121878
+ const { data, error: error48 } = await (0, fetch_1._request)(this.fetch, "GET", `${this.url}/passkeys`, {
121879
+ headers: this.headers,
121880
+ jwt: session.access_token,
121881
+ xform: (data2) => ({ data: data2, error: null })
121882
+ });
121883
+ if (error48) {
121884
+ return this._returnResult({ data: null, error: error48 });
121885
+ }
121886
+ return this._returnResult({ data, error: null });
121887
+ });
121888
+ } catch (error48) {
121889
+ if ((0, errors_1.isAuthError)(error48)) {
121890
+ return this._returnResult({ data: null, error: error48 });
121891
+ }
121892
+ throw error48;
121893
+ }
121894
+ }
121895
+ async _updatePasskey(params) {
121896
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
121897
+ try {
121898
+ return await this._useSession(async (result) => {
121899
+ const { data: { session }, error: sessionError } = result;
121900
+ if (sessionError) {
121901
+ return this._returnResult({ data: null, error: sessionError });
121902
+ }
121903
+ if (!session) {
121904
+ return this._returnResult({ data: null, error: new errors_1.AuthSessionMissingError });
121905
+ }
121906
+ const { data, error: error48 } = await (0, fetch_1._request)(this.fetch, "PATCH", `${this.url}/passkeys/${params.passkeyId}`, {
121907
+ headers: this.headers,
121908
+ jwt: session.access_token,
121909
+ body: { friendly_name: params.friendlyName }
121910
+ });
121911
+ if (error48) {
121912
+ return this._returnResult({ data: null, error: error48 });
121913
+ }
121914
+ return this._returnResult({ data, error: null });
121915
+ });
121916
+ } catch (error48) {
121917
+ if ((0, errors_1.isAuthError)(error48)) {
121918
+ return this._returnResult({ data: null, error: error48 });
121919
+ }
121920
+ throw error48;
121921
+ }
121922
+ }
121923
+ async _deletePasskey(params) {
121924
+ (0, helpers_1.assertPasskeyExperimentalEnabled)(this.experimental);
121925
+ try {
121926
+ return await this._useSession(async (result) => {
121927
+ const { data: { session }, error: sessionError } = result;
121928
+ if (sessionError) {
121929
+ return this._returnResult({ data: null, error: sessionError });
121930
+ }
121931
+ if (!session) {
121932
+ return this._returnResult({ data: null, error: new errors_1.AuthSessionMissingError });
121933
+ }
121934
+ const { error: error48 } = await (0, fetch_1._request)(this.fetch, "DELETE", `${this.url}/passkeys/${params.passkeyId}`, {
121935
+ headers: this.headers,
121936
+ jwt: session.access_token,
121937
+ noResolveJson: true
121938
+ });
121939
+ if (error48) {
121940
+ return this._returnResult({ data: null, error: error48 });
121941
+ }
121942
+ return this._returnResult({ data: null, error: null });
121943
+ });
121944
+ } catch (error48) {
121945
+ if ((0, errors_1.isAuthError)(error48)) {
121946
+ return this._returnResult({ data: null, error: error48 });
121947
+ }
121948
+ throw error48;
121949
+ }
121950
+ }
121579
121951
  }
121580
121952
  GoTrueClient.nextInstanceID = {};
121581
121953
  exports.default = GoTrueClient;
@@ -131599,22 +131971,35 @@ var StorageFileApi = class extends BaseApiClient {
131599
131971
  return _this3.handleOperation(async () => {
131600
131972
  let body;
131601
131973
  const options = _objectSpread22(_objectSpread22({}, DEFAULT_FILE_OPTIONS), fileOptions);
131602
- const headers = _objectSpread22(_objectSpread22({}, _this3.headers), { "x-upsert": String(options.upsert) });
131974
+ let headers = _objectSpread22(_objectSpread22({}, _this3.headers), { "x-upsert": String(options.upsert) });
131975
+ const metadata = options.metadata;
131603
131976
  if (typeof Blob !== "undefined" && fileBody instanceof Blob) {
131604
131977
  body = new FormData;
131605
131978
  body.append("cacheControl", options.cacheControl);
131979
+ if (metadata)
131980
+ body.append("metadata", _this3.encodeMetadata(metadata));
131606
131981
  body.append("", fileBody);
131607
131982
  } else if (typeof FormData !== "undefined" && fileBody instanceof FormData) {
131608
131983
  body = fileBody;
131609
- body.append("cacheControl", options.cacheControl);
131984
+ if (!body.has("cacheControl"))
131985
+ body.append("cacheControl", options.cacheControl);
131986
+ if (metadata && !body.has("metadata"))
131987
+ body.append("metadata", _this3.encodeMetadata(metadata));
131610
131988
  } else {
131611
131989
  body = fileBody;
131612
131990
  headers["cache-control"] = `max-age=${options.cacheControl}`;
131613
131991
  headers["content-type"] = options.contentType;
131992
+ if (metadata)
131993
+ headers["x-metadata"] = _this3.toBase64(_this3.encodeMetadata(metadata));
131994
+ if ((typeof ReadableStream !== "undefined" && body instanceof ReadableStream || body && typeof body === "object" && ("pipe" in body) && typeof body.pipe === "function") && !options.duplex)
131995
+ options.duplex = "half";
131614
131996
  }
131997
+ if (fileOptions === null || fileOptions === undefined ? undefined : fileOptions.headers)
131998
+ for (const [key, value] of Object.entries(fileOptions.headers))
131999
+ headers = setHeader(headers, key, value);
131615
132000
  return {
131616
132001
  path: cleanPath,
131617
- fullPath: (await put(_this3.fetch, url2.toString(), body, { headers })).Key
132002
+ fullPath: (await put(_this3.fetch, url2.toString(), body, _objectSpread22({ headers }, (options === null || options === undefined ? undefined : options.duplex) ? { duplex: options.duplex } : {}))).Key
131618
132003
  };
131619
132004
  });
131620
132005
  }
@@ -131800,7 +132185,7 @@ var StorageFileApi = class extends BaseApiClient {
131800
132185
  return query;
131801
132186
  }
131802
132187
  };
131803
- var version2 = "2.104.1";
132188
+ var version2 = "2.105.1";
131804
132189
  var DEFAULT_HEADERS = { "X-Client-Info": `storage-js/${version2}` };
131805
132190
  var StorageBucketApi = class extends BaseApiClient {
131806
132191
  constructor(url2, headers = {}, fetch$1, opts) {
@@ -132183,7 +132568,7 @@ var StorageClient = class extends StorageBucketApi {
132183
132568
  var import_auth_js = __toESM(require_main4(), 1);
132184
132569
  __reExport(exports_dist3, __toESM(require_main3(), 1));
132185
132570
  __reExport(exports_dist3, __toESM(require_main4(), 1));
132186
- var version3 = "2.104.1";
132571
+ var version3 = "2.105.1";
132187
132572
  var JS_ENV = "";
132188
132573
  if (typeof Deno !== "undefined")
132189
132574
  JS_ENV = "deno";
@@ -132406,7 +132791,7 @@ var SupabaseClient = class {
132406
132791
  const { data } = await _this.auth.getSession();
132407
132792
  return (_data$session$access_ = (_data$session = data.session) === null || _data$session === undefined ? undefined : _data$session.access_token) !== null && _data$session$access_ !== undefined ? _data$session$access_ : _this.supabaseKey;
132408
132793
  }
132409
- _initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, storage, userStorage, storageKey, flowType, lock, debug, throwOnError }, headers, fetch$1) {
132794
+ _initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, storage, userStorage, storageKey, flowType, lock, debug, throwOnError, experimental }, headers, fetch$1) {
132410
132795
  const authHeaders = {
132411
132796
  Authorization: `Bearer ${this.supabaseKey}`,
132412
132797
  apikey: `${this.supabaseKey}`
@@ -132424,6 +132809,7 @@ var SupabaseClient = class {
132424
132809
  lock,
132425
132810
  debug,
132426
132811
  throwOnError,
132812
+ experimental,
132427
132813
  fetch: fetch$1,
132428
132814
  hasCustomAuthorizationHeader: Object.keys(this.headers).some((key) => key.toLowerCase() === "authorization")
132429
132815
  });
@@ -133558,6 +133944,51 @@ diff --git`);
133558
133944
  }
133559
133945
  }
133560
133946
  // src/services/git/providers/cli/operations/commits/show.ts
133947
+ var NUL = "\x00";
133948
+ var COMMIT_META_FORMAT = [
133949
+ "%H",
133950
+ "%h",
133951
+ "%an",
133952
+ "%ae",
133953
+ "%aI",
133954
+ "%cn",
133955
+ "%ce",
133956
+ "%cI",
133957
+ "%P",
133958
+ "%s",
133959
+ "%b"
133960
+ ].join(NUL);
133961
+ function parseCommitMetadata(stdout) {
133962
+ const fields = stdout.split(NUL);
133963
+ if (fields.length < 11)
133964
+ return null;
133965
+ const [
133966
+ hash2,
133967
+ shortHash,
133968
+ authorName,
133969
+ authorEmail,
133970
+ authorDate,
133971
+ committerName,
133972
+ committerEmail,
133973
+ committerDate,
133974
+ parents,
133975
+ subject,
133976
+ body
133977
+ ] = fields;
133978
+ return {
133979
+ hash: hash2,
133980
+ shortHash,
133981
+ author: { name: authorName, email: authorEmail, date: authorDate },
133982
+ committer: {
133983
+ name: committerName,
133984
+ email: committerEmail,
133985
+ date: committerDate
133986
+ },
133987
+ parents: parents.trim().split(" ").filter(Boolean),
133988
+ subject,
133989
+ body: body.replace(/\n+$/, "")
133990
+ };
133991
+ }
133561
133992
  async function executeShow(options, context, execGit) {
133562
133993
  try {
133563
133994
  const args = [];
@@ -133577,19 +134008,33 @@ async function executeShow(options, context, execGit) {
133577
134008
  args: ["-t", options.object]
133578
134009
  });
133579
134010
  const cmd = buildGitCommand({ command: "show", args });
133580
- const [typeResult, result] = await Promise.all([
134011
+ const metaCmd = buildGitCommand({
134012
+ command: "log",
134013
+ args: ["-1", `--format=${COMMIT_META_FORMAT}`, options.object]
134014
+ });
134015
+ const [typeSettled, contentSettled, metaSettled] = await Promise.allSettled([
133581
134016
  execGit(typeCmd, context.workingDirectory, context.requestContext),
133582
- execGit(cmd, context.workingDirectory, context.requestContext)
134017
+ execGit(cmd, context.workingDirectory, context.requestContext),
134018
+ execGit(metaCmd, context.workingDirectory, context.requestContext)
133583
134019
  ]);
133584
- const detectedType = typeResult.stdout.trim();
134020
+ if (typeSettled.status === "rejected")
134021
+ throw typeSettled.reason;
134022
+ if (contentSettled.status === "rejected")
134023
+ throw contentSettled.reason;
134024
+ const detectedType = typeSettled.value.stdout.trim();
133585
134025
  const objectType = ["commit", "tree", "blob", "tag"].includes(detectedType) ? detectedType : "commit";
133586
- const showResult = {
134026
+ let metadata = {};
134027
+ if (objectType === "commit" && metaSettled.status === "fulfilled" && metaSettled.value?.stdout) {
134028
+ const parsed = parseCommitMetadata(metaSettled.value.stdout);
134029
+ if (parsed)
134030
+ metadata = parsed;
134031
+ }
134032
+ return {
133587
134033
  object: options.object,
133588
134034
  type: objectType,
133589
- content: result.stdout,
133590
- metadata: {}
134035
+ content: contentSettled.value.stdout,
134036
+ metadata
133591
134037
  };
133592
- return showResult;
133593
134038
  } catch (error48) {
133594
134039
  throw mapGitError(error48, "show");
133595
134040
  }
@@ -134454,6 +134899,7 @@ function parseFilesChanged(stdout) {
134454
134899
  return files;
134455
134900
  }
134456
134901
  // src/services/git/providers/cli/operations/tags/tag.ts
134902
+ init_errors3();
134457
134903
  async function executeTag(options, context, execGit) {
134458
134904
  try {
134459
134905
  const args = [];
@@ -134572,6 +135018,17 @@ async function executeTag(options, context, execGit) {
134572
135018
  };
134573
135019
  return deleteResult;
134574
135020
  }
135021
+ case "verify": {
135022
+ if (!options.tagName) {
135023
+ throw new Error("Tag name is required for verify operation");
135024
+ }
135025
+ const cmd = buildGitCommand({
135026
+ command: "tag",
135027
+ args: ["-v", options.tagName]
135028
+ });
135029
+ const result = await execGit(cmd, context.workingDirectory, context.requestContext, { allowNonZeroExit: true });
135030
+ return parseVerifyOutput(options.tagName, result.stderr, result.exitCode ?? 0);
135031
+ }
134575
135032
  default:
134576
135033
  throw new Error("Unknown tag operation mode");
134577
135034
  }
@@ -134579,6 +135036,93 @@ async function executeTag(options, context, execGit) {
134579
135036
  throw mapGitError(error48, "tag");
134580
135037
  }
134581
135038
  }
135039
+ function parseVerifyOutput(tagName, stderr, exitCode) {
135040
+ if (/^error: tag '.+' not found/m.test(stderr)) {
135041
+ throw new McpError(-32600 /* InvalidRequest */, `Tag not found: ${tagName}`, { tagName });
135042
+ }
135043
+ const base = {
135044
+ mode: "verify",
135045
+ verifiedTag: tagName,
135046
+ rawOutput: stderr
135047
+ };
135048
+ if (/^error: no signature found$/m.test(stderr)) {
135049
+ return {
135050
+ ...base,
135051
+ verified: false,
135052
+ warning: "Tag has no signature. Create with a signing key and `GIT_SIGN_COMMITS=true` to produce a signed tag."
135053
+ };
135054
+ }
135055
+ if (/gpg\.ssh\.allowedSignersFile needs to be configured/.test(stderr) || /No principal matched/.test(stderr)) {
135056
+ return {
135057
+ ...base,
135058
+ verified: false,
135059
+ signatureType: "ssh",
135060
+ warning: "SSH signature verification requires `gpg.ssh.allowedSignersFile` to be configured. The tag may be validly signed; this environment cannot verify it."
135061
+ };
135062
+ }
135063
+ const gpgBadMatch = /(?:gpg|gpgsm): BAD signature from "([^"]+)"/.exec(stderr);
135064
+ if (gpgBadMatch) {
135065
+ return {
135066
+ ...base,
135067
+ verified: false,
135068
+ signatureType: stderr.includes("gpgsm:") ? "x509" : "gpg",
135069
+ signerIdentity: gpgBadMatch[1],
135070
+ warning: "Signature does not validate (BAD signature)."
135071
+ };
135072
+ }
135073
+ const sshBadMatch = /Signature verification failed.*? for "([^"]+)"|Could not verify signature/i.exec(stderr);
135074
+ if (sshBadMatch && exitCode !== 0) {
135075
+ const result = {
135076
+ ...base,
135077
+ verified: false,
135078
+ signatureType: "ssh",
135079
+ warning: "SSH signature does not validate."
135080
+ };
135081
+ if (sshBadMatch[1])
135082
+ result.signerIdentity = sshBadMatch[1];
135083
+ return result;
135084
+ }
135085
+ const gpgGoodMatch = /gpg: Good signature from "([^"]+)"/.exec(stderr);
135086
+ if (gpgGoodMatch) {
135087
+ const result = {
135088
+ ...base,
135089
+ verified: true,
135090
+ signatureType: "gpg",
135091
+ signerIdentity: gpgGoodMatch[1]
135092
+ };
135093
+ const keyMatch = /using \S+ key ([0-9A-Fa-f]{8,})/.exec(stderr);
135094
+ if (keyMatch)
135095
+ result.signerKey = keyMatch[1];
135096
+ return result;
135097
+ }
135098
+ const x509GoodMatch = /gpgsm: Good signature from "([^"]+)"/.exec(stderr);
135099
+ if (x509GoodMatch) {
135100
+ return {
135101
+ ...base,
135102
+ verified: true,
135103
+ signatureType: "x509",
135104
+ signerIdentity: x509GoodMatch[1]
135105
+ };
135106
+ }
135107
+ const sshGoodMatch = /Good "git" signature for (.+?) with \S+ key (SHA256:\S+)/.exec(stderr);
135108
+ if (sshGoodMatch) {
135109
+ return {
135110
+ ...base,
135111
+ verified: true,
135112
+ signatureType: "ssh",
135113
+ signerIdentity: sshGoodMatch[1].trim(),
135114
+ signerKey: sshGoodMatch[2]
135115
+ };
135116
+ }
135117
+ if (exitCode === 0) {
135118
+ return { ...base, verified: true };
135119
+ }
135120
+ return {
135121
+ ...base,
135122
+ verified: false,
135123
+ warning: "Verification failed but the output format was not recognized. See `rawOutput` for details."
135124
+ };
135125
+ }
134582
135126
  // src/services/git/providers/cli/operations/stash/stash.ts
134583
135127
  async function executeStash(options, context, execGit) {
134584
135128
  try {
@@ -145112,19 +145656,9 @@ init_zod();
145112
145656
  var PathSchema = exports_external.string().default(".").describe("Path to the Git repository. Defaults to session working directory set via git_set_working_dir.");
145113
145657
  var ForceSchema = exports_external.boolean().default(false).describe("Force the operation, bypassing safety checks.");
145114
145658
  var DryRunSchema = exports_external.boolean().default(false).describe("Preview the operation without executing it.");
145115
- var ConfirmSchema = exports_external.enum(["Y", "y", "Yes", "yes"]).optional().describe("Explicit confirmation required for protected operations (Y/y/Yes/yes).");
145116
145659
  var BranchNameSchema = exports_external.string().min(1).max(255).regex(/^[^~^:?*\[\\]+$/, "Invalid branch name format").describe("Branch name (must follow git naming conventions).");
145117
145660
  var CommitRefSchema = exports_external.string().min(1).describe("Commit reference: full/short hash, branch name, tag name, or relative ref (HEAD~1).");
145118
- var AuthorSchema = exports_external.object({
145119
- name: exports_external.string().min(1).describe("Author's name"),
145120
- email: exports_external.string().email().describe("Author's email address")
145121
- });
145122
145661
  var RemoteNameSchema = exports_external.string().min(1).max(255).regex(/^[a-zA-Z0-9._-]+$/, "Invalid remote name format").describe("Remote name (alphanumeric, dots, dashes, underscores only).");
145123
- var SuccessResponseSchema = exports_external.object({
145124
- success: exports_external.boolean().describe("Indicates if the operation was successful."),
145125
- message: exports_external.string().describe("Human-readable summary of the result.")
145126
- });
145127
- var FilePathSchema = exports_external.string().min(1).regex(/^[^/].*$/, "File path must be relative to repository root").regex(/^(?!.*\.\.).*$/, "File path cannot contain directory traversal").describe("File path relative to repository root.");
145128
145662
  var TagNameSchema = exports_external.string().min(1).max(255).regex(/^[^~^:?*\[\\]+$/, "Invalid tag name format").describe("Tag name (must follow git naming conventions).");
145129
145663
  function normalizeMessage(message) {
145130
145664
  return message.replace(/\\r\\n/g, `
@@ -145134,9 +145668,6 @@ function normalizeMessage(message) {
145134
145668
  var CommitMessageSchema = exports_external.string().min(1, "Commit message cannot be empty").max(1e4, "Commit message too long").transform(normalizeMessage).describe("Commit message.");
145135
145669
  var LimitSchema = exports_external.number().int().min(1).max(1000).optional().describe("Maximum number of items to return (1-1000).");
145136
145670
  var SkipSchema = exports_external.number().int().nonnegative().optional().describe("Number of items to skip for pagination.");
145137
- var VerboseSchema = exports_external.boolean().default(false).describe("Include verbose/detailed information in output.");
145138
- var QuietSchema = exports_external.boolean().default(false).describe("Suppress informational output (errors only).");
145139
- var RecursiveSchema = exports_external.boolean().default(false).describe("Operate recursively on subdirectories.");
145140
145671
  var AllSchema = exports_external.boolean().default(false).describe("Include all items (varies by operation).");
145141
145672
  var MergeStrategySchema = exports_external.enum(["ort", "recursive", "octopus", "ours", "subtree"]).optional().describe("Merge strategy to use (ort, recursive, octopus, ours, subtree).");
145142
145673
  var PruneSchema = exports_external.boolean().default(false).describe("Prune remote-tracking references that no longer exist on remote.");
@@ -145543,7 +146074,7 @@ var InputSchema = exports_external.object({
145543
146074
  maxTags: exports_external.number().int().min(1).max(1000).default(100).describe("Maximum recent tags to fetch for release context (1-1000). Applied at the git command so large tag catalogs do not bloat the response."),
145544
146075
  sinceTag: exports_external.string().optional().describe('Only include git history since this tag (e.g., "v1.2.0"). Narrows the analysis window.'),
145545
146076
  branch: CommitRefSchema.optional().describe("Branch to analyze (defaults to current branch).")
145546
- });
146077
+ }).strict();
145547
146078
  var CommitSummarySchema = exports_external.object({
145548
146079
  hash: exports_external.string().describe("Short commit hash."),
145549
146080
  subject: exports_external.string().describe("Commit subject line."),
@@ -145657,11 +146188,11 @@ var TOOL_TITLE2 = "Git Blame";
145657
146188
  var TOOL_DESCRIPTION2 = "Show line-by-line authorship information for a file, displaying who last modified each line and when. For large files, use startLine/endLine to limit output.";
145658
146189
  var InputSchema2 = exports_external.object({
145659
146190
  path: PathSchema,
145660
- file: exports_external.string().min(1).describe("Path to the file to blame (relative to repository root)."),
146191
+ filePath: exports_external.string().min(1).describe("Path to the file to blame (relative to repository root)."),
145661
146192
  startLine: exports_external.number().int().min(1).optional().describe("Start line number (1-indexed)."),
145662
146193
  endLine: exports_external.number().int().min(1).optional().describe("End line number (1-indexed)."),
145663
146194
  ignoreWhitespace: exports_external.boolean().default(false).describe("Ignore whitespace changes.")
145664
- });
146195
+ }).strict();
145665
146196
  var BlameLineSchema = exports_external.object({
145666
146197
  lineNumber: exports_external.number().int().min(1).describe("Line number in the file (1-indexed)."),
145667
146198
  commitHash: exports_external.string().describe("Full commit hash of the last change to this line."),
@@ -145671,13 +146202,13 @@ var BlameLineSchema = exports_external.object({
145671
146202
  });
145672
146203
  var OutputSchema3 = exports_external.object({
145673
146204
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
145674
- file: exports_external.string().describe("The file that was blamed."),
146205
+ filePath: exports_external.string().describe("The file that was blamed."),
145675
146206
  lines: exports_external.array(BlameLineSchema).describe("Array of blame information for each line."),
145676
146207
  totalLines: exports_external.number().int().describe("Total number of lines in the output.")
145677
146208
  });
145678
146209
  async function gitBlameLogic(input, { provider, targetPath, appContext }) {
145679
146210
  const blameOptions = {
145680
- file: input.file,
146211
+ file: input.filePath,
145681
146212
  ignoreWhitespace: input.ignoreWhitespace
145682
146213
  };
145683
146214
  if (input.startLine !== undefined) {
@@ -145693,7 +146224,7 @@ async function gitBlameLogic(input, { provider, targetPath, appContext }) {
145693
146224
  });
145694
146225
  return {
145695
146226
  success: result.success,
145696
- file: result.file,
146227
+ filePath: result.file,
145697
146228
  lines: result.lines,
145698
146229
  totalLines: result.totalLines
145699
146230
  };
@@ -145702,7 +146233,7 @@ function filterGitBlameOutput(result, level) {
145702
146233
  if (level === "minimal") {
145703
146234
  return {
145704
146235
  success: result.success,
145705
- file: result.file,
146236
+ filePath: result.filePath,
145706
146237
  totalLines: result.totalLines
145707
146238
  };
145708
146239
  }
@@ -145733,7 +146264,7 @@ var InputSchema3 = exports_external.object({
145733
146264
  dryRun: DryRunSchema,
145734
146265
  directories: exports_external.boolean().default(false).describe("Remove untracked directories in addition to files."),
145735
146266
  ignored: exports_external.boolean().default(false).describe("Remove ignored files as well.")
145736
- }).refine((data) => data.force === true || data.dryRun === true, {
146267
+ }).strict().refine((data) => data.force === true || data.dryRun === true, {
145737
146268
  message: "force flag must be set to true to clean untracked files (or use dryRun to preview)",
145738
146269
  path: ["force"]
145739
146270
  });
@@ -145790,7 +146321,7 @@ var TOOL_TITLE4 = "Git Clear Working Directory";
145790
146321
  var TOOL_DESCRIPTION4 = "Clear the session working directory setting. This resets the context without restarting the server. Subsequent git operations will require an explicit path parameter unless git_set_working_dir is called again.";
145791
146322
  var InputSchema4 = exports_external.object({
145792
146323
  confirm: exports_external.enum(["Y", "y", "Yes", "yes"]).describe("Explicit confirmation required to clear working directory. Accepted values: 'Y', 'y', 'Yes', or 'yes'.")
145793
- });
146324
+ }).strict();
145794
146325
  var OutputSchema5 = exports_external.object({
145795
146326
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
145796
146327
  message: exports_external.string().describe("Confirmation message."),
@@ -145834,26 +146365,26 @@ var gitClearWorkingDirTool = {
145834
146365
  init_zod();
145835
146366
  var TOOL_NAME5 = "git_clone";
145836
146367
  var TOOL_TITLE5 = "Git Clone";
145837
- var TOOL_DESCRIPTION5 = "Clone a repository from a remote URL to a local path. Supports HTTP/HTTPS and SSH URLs, with optional shallow cloning.";
146368
+ var TOOL_DESCRIPTION5 = "Clone a repository from a remote URL or local path. Accepts HTTP(S), SSH, git://, file://, and bare filesystem paths, with optional shallow cloning.";
145838
146369
  var InputSchema5 = exports_external.object({
145839
- url: exports_external.string().url().describe("Remote repository URL to clone from."),
145840
- localPath: exports_external.string().min(1).describe("Local path where the repository should be cloned."),
146370
+ url: exports_external.string().min(1).describe("Source to clone from: HTTP(S) URL, SSH URL (ssh://… or git@host:path), git:// URL, file:// URL, or a bare filesystem path (e.g. /tmp/repo.git)."),
146371
+ path: exports_external.string().min(1).describe("Destination path where the repository should be cloned."),
145841
146372
  branch: exports_external.string().optional().describe("Specific branch to clone (defaults to remote HEAD)."),
145842
146373
  depth: DepthSchema,
145843
146374
  bare: exports_external.boolean().default(false).describe("Create a bare repository (no working directory)."),
145844
146375
  mirror: exports_external.boolean().default(false).describe("Create a mirror clone (implies bare).")
145845
- });
146376
+ }).strict();
145846
146377
  var OutputSchema6 = exports_external.object({
145847
146378
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
145848
- remoteUrl: exports_external.string().describe("The remote URL that was cloned."),
145849
- localPath: exports_external.string().describe("Local path where repository was cloned."),
146379
+ remoteUrl: exports_external.string().describe("The remote URL or path that was cloned."),
146380
+ path: exports_external.string().describe("Local path where repository was cloned."),
145850
146381
  branch: exports_external.string().describe("The branch that was checked out."),
145851
146382
  commitHash: exports_external.string().optional().describe("Current HEAD commit hash.")
145852
146383
  });
145853
146384
  async function gitCloneLogic(input, { provider, appContext }) {
145854
146385
  const cloneOptions = {
145855
146386
  remoteUrl: input.url,
145856
- localPath: input.localPath,
146387
+ localPath: input.path,
145857
146388
  bare: input.bare,
145858
146389
  mirror: input.mirror
145859
146390
  };
@@ -145871,7 +146402,7 @@ async function gitCloneLogic(input, { provider, appContext }) {
145871
146402
  return {
145872
146403
  success: result.success,
145873
146404
  remoteUrl: result.remoteUrl,
145874
- localPath: result.localPath,
146405
+ path: result.localPath,
145875
146406
  branch: result.branch,
145876
146407
  commitHash: result.commitHash
145877
146408
  };
@@ -145881,7 +146412,7 @@ function filterGitCloneOutput(result, level) {
145881
146412
  return {
145882
146413
  success: result.success,
145883
146414
  remoteUrl: result.remoteUrl,
145884
- localPath: result.localPath
146415
+ path: result.path
145885
146416
  };
145886
146417
  }
145887
146418
  return result;
@@ -145909,7 +146440,7 @@ var InputSchema6 = exports_external.object({
145909
146440
  path: PathSchema,
145910
146441
  initialBranch: exports_external.string().optional().describe("Name of the initial branch (default: main)."),
145911
146442
  bare: exports_external.boolean().default(false).describe("Create a bare repository (no working directory).")
145912
- });
146443
+ }).strict();
145913
146444
  var OutputSchema7 = exports_external.object({
145914
146445
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
145915
146446
  path: exports_external.string().describe("Path where repository was initialized."),
@@ -145974,9 +146505,9 @@ var TOOL_TITLE7 = "Git Reflog";
145974
146505
  var TOOL_DESCRIPTION7 = "View the reference logs (reflog) to track when branch tips and other references were updated. Useful for recovering lost commits.";
145975
146506
  var InputSchema7 = exports_external.object({
145976
146507
  path: PathSchema,
145977
- ref: exports_external.string().optional().describe("Show reflog for specific reference (default: HEAD)."),
146508
+ ref: exports_external.string().default("HEAD").describe("Reference whose reflog to show. Defaults to HEAD."),
145978
146509
  maxCount: LimitSchema.default(25)
145979
- });
146510
+ }).strict();
145980
146511
  var ReflogEntrySchema = exports_external.object({
145981
146512
  hash: exports_external.string().describe("Commit hash for this reflog entry."),
145982
146513
  refName: exports_external.string().describe("Reference name (e.g., HEAD@{0}, main@{1})."),
@@ -145991,10 +146522,9 @@ var OutputSchema8 = exports_external.object({
145991
146522
  totalEntries: exports_external.number().int().describe("Total number of reflog entries.")
145992
146523
  });
145993
146524
  async function gitReflogLogic(input, { provider, targetPath, appContext }) {
145994
- const reflogOptions = {};
145995
- if (input.ref !== undefined) {
145996
- reflogOptions.ref = input.ref;
145997
- }
146525
+ const reflogOptions = {
146526
+ ref: input.ref
146527
+ };
145998
146528
  if (input.maxCount !== undefined) {
145999
146529
  reflogOptions.maxCount = input.maxCount;
146000
146530
  }
@@ -146217,7 +146747,7 @@ var InputSchema8 = exports_external.object({
146217
146747
  path: exports_external.string().min(1).describe("Absolute path to the git repository to use as the working directory."),
146218
146748
  validateGitRepo: exports_external.boolean().default(true).describe("Validate that the path is a Git repository."),
146219
146749
  initializeIfNotPresent: exports_external.boolean().default(false).describe("If not a Git repository, initialize it with 'git init'.")
146220
- });
146750
+ }).strict();
146221
146751
  var OutputSchema9 = exports_external.object({
146222
146752
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
146223
146753
  path: exports_external.string().describe("The working directory that was set."),
@@ -146301,7 +146831,7 @@ var TOOL_DESCRIPTION9 = "Show the working tree status including staged, unstaged
146301
146831
  var InputSchema9 = exports_external.object({
146302
146832
  path: PathSchema,
146303
146833
  includeUntracked: exports_external.boolean().default(true).describe("Include untracked files in the output.")
146304
- });
146834
+ }).strict();
146305
146835
  var OutputSchema10 = exports_external.object({
146306
146836
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
146307
146837
  currentBranch: exports_external.string().nullable().describe("Current branch name."),
@@ -146380,7 +146910,7 @@ var TOOL_DESCRIPTION10 = "Returns a Git wrap-up protocol: an acceptance-criteria
146380
146910
  var InputSchema10 = exports_external.object({
146381
146911
  acknowledgement: exports_external.enum(["Y", "y", "Yes", "yes"]).describe("Acknowledgement to initiate the wrap-up workflow."),
146382
146912
  createTag: exports_external.boolean().optional().describe("Controls whether the tag criterion appears in the emitted protocol. Omit or set `true` to include the tag step. Set `false` to omit it entirely — e.g., when tagging is deferred to a separate release step.")
146383
- });
146913
+ }).strict();
146384
146914
  var OutputSchema11 = exports_external.object({
146385
146915
  instructions: exports_external.string().describe("The wrap-up protocol to satisfy before the session ships."),
146386
146916
  repository: exports_external.object({
@@ -146530,13 +147060,13 @@ var TOOL_TITLE11 = "Git Add";
146530
147060
  var TOOL_DESCRIPTION11 = "Stage files for commit. Add file contents to the staging area (index) to prepare for the next commit.";
146531
147061
  var InputSchema11 = exports_external.object({
146532
147062
  path: PathSchema,
146533
- files: exports_external.array(exports_external.string()).default([]).describe('Array of file paths to stage (relative to repository root). Use ["."] to stage all changes. Can be omitted when all or update is true.'),
147063
+ paths: exports_external.array(exports_external.string()).default([]).describe('Array of file or directory paths to stage (relative to repository root). Use ["."] to stage all changes. Can be omitted when all or update is true.'),
146534
147064
  update: exports_external.boolean().default(false).describe("Stage only modified and deleted files (skip untracked files)."),
146535
147065
  all: AllSchema,
146536
147066
  force: exports_external.boolean().default(false).describe("Allow adding otherwise ignored files.")
146537
- }).refine((data) => data.all || data.update || data.files.length > 0, {
146538
- message: "Either files must be provided, or all/update must be true.",
146539
- path: ["files"]
147067
+ }).strict().refine((data) => data.all || data.update || data.paths.length > 0, {
147068
+ message: "Either paths must be provided, or all/update must be true.",
147069
+ path: ["paths"]
146540
147070
  });
146541
147071
  var OutputSchema12 = exports_external.object({
146542
147072
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
@@ -146552,9 +147082,9 @@ var OutputSchema12 = exports_external.object({
146552
147082
  }).describe("Repository status after staging files.")
146553
147083
  });
146554
147084
  async function gitAddLogic(input, { provider, targetPath, appContext }) {
146555
- const { path: _path, files, ...rest } = input;
147085
+ const { path: _path, paths, ...rest } = input;
146556
147086
  const addOptions = {
146557
- paths: files,
147087
+ paths,
146558
147088
  ...rest
146559
147089
  };
146560
147090
  const result = await provider.add(addOptions, {
@@ -146650,7 +147180,7 @@ var InputSchema12 = exports_external.object({
146650
147180
  allowEmpty: exports_external.boolean().default(false).describe("Allow creating a commit with no changes."),
146651
147181
  noVerify: NoVerifySchema,
146652
147182
  filesToStage: exports_external.array(exports_external.string()).optional().describe("File paths to stage before committing (atomic stage+commit operation).")
146653
- });
147183
+ }).strict();
146654
147184
  var OutputSchema13 = exports_external.object({
146655
147185
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
146656
147186
  commitHash: exports_external.string().describe("SHA-1 hash of the created commit."),
@@ -146814,7 +147344,7 @@ var InputSchema13 = exports_external.object({
146814
147344
  stat: exports_external.boolean().default(false).describe("Show diffstat (summary of changes) instead of full diff content."),
146815
147345
  contextLines: exports_external.number().int().min(0).max(100).default(3).describe("Number of context lines to show around changes."),
146816
147346
  autoExclude: exports_external.boolean().default(true).describe("Automatically exclude lock files and other generated files (e.g., package-lock.json, yarn.lock, bun.lock, poetry.lock, go.sum) from diff output to reduce context bloat. Set to false if you need to inspect these files.")
146817
- });
147347
+ }).strict();
146818
147348
  var OutputSchema14 = exports_external.object({
146819
147349
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
146820
147350
  diff: exports_external.string().describe("The diff output in unified diff format."),
@@ -146897,7 +147427,7 @@ var InputSchema14 = exports_external.object({
146897
147427
  stat: exports_external.boolean().default(false).describe("Include file change statistics for each commit."),
146898
147428
  patch: exports_external.boolean().default(false).describe("Include the full diff patch for each commit."),
146899
147429
  showSignature: exports_external.boolean().default(false).describe("Show GPG signature verification information for each commit.")
146900
- });
147430
+ }).strict();
146901
147431
  var CommitSchema = exports_external.object({
146902
147432
  hash: exports_external.string().describe("Full commit SHA-1 hash."),
146903
147433
  shortHash: exports_external.string().describe("Abbreviated commit hash (7 characters)."),
@@ -146991,7 +147521,7 @@ var InputSchema15 = exports_external.object({
146991
147521
  format: exports_external.enum(["raw"]).optional().describe('Output format for the git object. Use "raw" for unprocessed git output.'),
146992
147522
  stat: exports_external.boolean().default(false).describe("Show diffstat instead of full diff."),
146993
147523
  filePath: exports_external.string().optional().describe("View specific file at a given commit reference. When provided, shows the file content from the specified object.")
146994
- });
147524
+ }).strict();
146995
147525
  var OutputSchema16 = exports_external.object({
146996
147526
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
146997
147527
  object: exports_external.string().describe("Object identifier."),
@@ -147065,17 +147595,17 @@ var TOOL_TITLE16 = "Git Branch";
147065
147595
  var TOOL_DESCRIPTION16 = "Manage branches: list all branches, show current branch, create a new branch, delete a branch, or rename a branch.";
147066
147596
  var InputSchema16 = exports_external.object({
147067
147597
  path: PathSchema,
147068
- operation: exports_external.enum(["list", "create", "delete", "rename", "show-current"]).default("list").describe("The branch operation to perform."),
147069
- name: BranchNameSchema.optional().describe("Branch name for create/delete/rename operations."),
147070
- newName: BranchNameSchema.optional().describe("New branch name for rename operation."),
147598
+ mode: exports_external.enum(["list", "create", "delete", "rename", "show-current"]).default("list").describe("The branch operation to perform."),
147599
+ branchName: BranchNameSchema.optional().describe("Branch name for create/delete/rename operations."),
147600
+ newBranchName: BranchNameSchema.optional().describe("New branch name for rename operation."),
147071
147601
  startPoint: CommitRefSchema.optional().describe("Starting point (commit/branch) for new branch creation."),
147072
147602
  force: ForceSchema,
147073
- all: AllSchema.describe("For list operation: show both local and remote branches."),
147074
- remote: exports_external.boolean().default(false).describe("For list operation: show only remote branches."),
147075
- merged: exports_external.preprocess((val) => val === "true" ? true : val === "false" ? false : val, exports_external.union([exports_external.boolean(), CommitRefSchema])).optional().describe("For list operation: show only branches merged into HEAD (true) or specified commit (string)."),
147076
- noMerged: exports_external.preprocess((val) => val === "true" ? true : val === "false" ? false : val, exports_external.union([exports_external.boolean(), CommitRefSchema])).optional().describe("For list operation: show only branches not merged into HEAD (true) or specified commit (string)."),
147077
- limit: LimitSchema.describe("For list operation: cap the number of branches returned (applied at the git command). Use on repos with many branches.")
147078
- });
147603
+ all: AllSchema.describe("For list mode: show both local and remote branches."),
147604
+ remote: exports_external.boolean().default(false).describe("For list mode: show only remote branches."),
147605
+ merged: exports_external.preprocess((val) => val === "true" ? true : val === "false" ? false : val, exports_external.union([exports_external.boolean(), CommitRefSchema])).optional().describe("For list mode: show only branches merged into HEAD (true) or specified commit (string)."),
147606
+ noMerged: exports_external.preprocess((val) => val === "true" ? true : val === "false" ? false : val, exports_external.union([exports_external.boolean(), CommitRefSchema])).optional().describe("For list mode: show only branches not merged into HEAD (true) or specified commit (string)."),
147607
+ limit: LimitSchema.describe("For list mode: cap the number of branches returned (applied at the git command). Use on repos with many branches.")
147608
+ }).strict();
147079
147609
  var BranchInfoSchema = exports_external.object({
147080
147610
  name: exports_external.string().describe("Branch name."),
147081
147611
  current: exports_external.boolean().describe("True if this is the current branch."),
@@ -147086,13 +147616,13 @@ var BranchInfoSchema = exports_external.object({
147086
147616
  });
147087
147617
  var OutputSchema17 = exports_external.object({
147088
147618
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147089
- operation: exports_external.enum(["list", "create", "delete", "rename", "show-current"]),
147090
- branches: exports_external.array(BranchInfoSchema).optional().describe("List of branches (for list operation)."),
147619
+ mode: exports_external.enum(["list", "create", "delete", "rename", "show-current"]),
147620
+ branches: exports_external.array(BranchInfoSchema).optional().describe("List of branches (for list mode)."),
147091
147621
  currentBranch: exports_external.string().optional().describe("Name of current branch."),
147092
- message: exports_external.string().optional().describe("Success message for create/delete/rename operations.")
147622
+ message: exports_external.string().optional().describe("Success message for create/delete/rename modes.")
147093
147623
  });
147094
147624
  async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147095
- if (input.operation === "show-current") {
147625
+ if (input.mode === "show-current") {
147096
147626
  const result2 = await provider.branch({ mode: "show-current" }, {
147097
147627
  workingDirectory: targetPath,
147098
147628
  requestContext: appContext,
@@ -147101,21 +147631,21 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147101
147631
  const current = result2.mode === "show-current" ? result2.current : null;
147102
147632
  return {
147103
147633
  success: true,
147104
- operation: "show-current",
147634
+ mode: "show-current",
147105
147635
  branches: undefined,
147106
147636
  currentBranch: current ?? undefined,
147107
147637
  message: current ? `Current branch: ${current}` : "Not on any branch (detached HEAD)"
147108
147638
  };
147109
147639
  }
147110
- const { path: _path, operation, name, newName, ...rest } = input;
147640
+ const { path: _path, mode, branchName, newBranchName, ...rest } = input;
147111
147641
  const branchOptions = {
147112
- mode: operation
147642
+ mode
147113
147643
  };
147114
- if (name !== undefined) {
147115
- branchOptions.branchName = name;
147644
+ if (branchName !== undefined) {
147645
+ branchOptions.branchName = branchName;
147116
147646
  }
147117
- if (newName !== undefined) {
147118
- branchOptions.newBranchName = newName;
147647
+ if (newBranchName !== undefined) {
147648
+ branchOptions.newBranchName = newBranchName;
147119
147649
  }
147120
147650
  if (rest.startPoint !== undefined) {
147121
147651
  branchOptions.startPoint = rest.startPoint;
@@ -147145,7 +147675,7 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147145
147675
  if (result.mode === "list") {
147146
147676
  return {
147147
147677
  success: true,
147148
- operation: "list",
147678
+ mode: "list",
147149
147679
  branches: result.branches,
147150
147680
  currentBranch: result.branches.find((b) => b.current)?.name,
147151
147681
  message: undefined
@@ -147153,7 +147683,7 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147153
147683
  } else if (result.mode === "create") {
147154
147684
  return {
147155
147685
  success: true,
147156
- operation: "create",
147686
+ mode: "create",
147157
147687
  branches: undefined,
147158
147688
  currentBranch: undefined,
147159
147689
  message: `Branch '${result.created}' created successfully.`
@@ -147161,7 +147691,7 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147161
147691
  } else if (result.mode === "delete") {
147162
147692
  return {
147163
147693
  success: true,
147164
- operation: "delete",
147694
+ mode: "delete",
147165
147695
  branches: undefined,
147166
147696
  currentBranch: undefined,
147167
147697
  message: `Branch '${result.deleted}' deleted successfully.`
@@ -147169,7 +147699,7 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147169
147699
  } else if (result.mode === "rename") {
147170
147700
  return {
147171
147701
  success: true,
147172
- operation: "rename",
147702
+ mode: "rename",
147173
147703
  branches: undefined,
147174
147704
  currentBranch: undefined,
147175
147705
  message: `Branch '${result.renamed.from}' renamed to '${result.renamed.to}'.`
@@ -147181,7 +147711,7 @@ function filterGitBranchOutput(result, level) {
147181
147711
  if (level === "minimal") {
147182
147712
  return {
147183
147713
  success: result.success,
147184
- operation: result.operation,
147714
+ mode: result.mode,
147185
147715
  currentBranch: result.currentBranch
147186
147716
  };
147187
147717
  }
@@ -147213,7 +147743,7 @@ var InputSchema17 = exports_external.object({
147213
147743
  force: ForceSchema,
147214
147744
  paths: exports_external.array(exports_external.string()).optional().describe("Specific file paths to checkout/restore (relative to repository root)."),
147215
147745
  track: exports_external.boolean().optional().describe("Set up tracking relationship with remote branch when creating new branch.")
147216
- });
147746
+ }).strict();
147217
147747
  var OutputSchema18 = exports_external.object({
147218
147748
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147219
147749
  target: exports_external.string().describe("Checked out branch or commit."),
@@ -147281,12 +147811,13 @@ var InputSchema18 = exports_external.object({
147281
147811
  mainline: exports_external.number().int().min(1).optional().describe("For merge commits, specify which parent to follow (1 for first parent, 2 for second, etc.)."),
147282
147812
  strategy: MergeStrategySchema.describe("Merge strategy to use for cherry-pick."),
147283
147813
  signoff: exports_external.boolean().default(false).describe("Add Signed-off-by line to the commit message.")
147284
- });
147814
+ }).strict();
147285
147815
  var OutputSchema19 = exports_external.object({
147286
147816
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147287
147817
  pickedCommits: exports_external.array(exports_external.string()).describe("Commits that were successfully cherry-picked."),
147288
147818
  conflicts: exports_external.boolean().describe("Whether operation had conflicts."),
147289
- conflictedFiles: exports_external.array(exports_external.string()).describe("Files with conflicts that need resolution.")
147819
+ conflictedFiles: exports_external.array(exports_external.string()).describe("Files with conflicts that need resolution."),
147820
+ message: exports_external.string().optional().describe("Human-readable next-step guidance, especially for conflicts.")
147290
147821
  });
147291
147822
  async function gitCherryPickLogic(input, { provider, targetPath, appContext }) {
147292
147823
  const cherryPickOptions = {
@@ -147307,11 +147838,13 @@ async function gitCherryPickLogic(input, { provider, targetPath, appContext }) {
147307
147838
  requestContext: appContext,
147308
147839
  tenantId: appContext.tenantId || "default-tenant"
147309
147840
  });
147841
+ const message = result.conflicts ? `Cherry-pick paused with conflicts in ${result.conflictedFiles.length} file(s). Resolve them and run git_cherry_pick with continueOperation=true, or pass abort=true to cancel.` : undefined;
147310
147842
  return {
147311
147843
  success: result.success,
147312
147844
  pickedCommits: result.pickedCommits,
147313
147845
  conflicts: result.conflicts,
147314
- conflictedFiles: result.conflictedFiles
147846
+ conflictedFiles: result.conflictedFiles,
147847
+ message
147315
147848
  };
147316
147849
  }
147317
147850
  function filterGitCherryPickOutput(result, level) {
@@ -147350,7 +147883,7 @@ var InputSchema19 = exports_external.object({
147350
147883
  squash: exports_external.boolean().default(false).describe("Squash all commits from the branch into a single commit."),
147351
147884
  message: CommitMessageSchema.optional().describe("Custom merge commit message."),
147352
147885
  abort: exports_external.boolean().default(false).describe("Abort an in-progress merge that has conflicts.")
147353
- });
147886
+ }).strict();
147354
147887
  var OutputSchema20 = exports_external.object({
147355
147888
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147356
147889
  strategy: exports_external.string().describe("Merge strategy used."),
@@ -147432,13 +147965,14 @@ var InputSchema20 = exports_external.object({
147432
147965
  interactive: exports_external.boolean().default(false).describe("Interactive rebase (not supported in all providers)."),
147433
147966
  onto: CommitRefSchema.optional().describe("Rebase onto different commit than upstream."),
147434
147967
  preserve: exports_external.boolean().default(false).describe("Preserve merge commits during rebase.")
147435
- });
147968
+ }).strict();
147436
147969
  var OutputSchema21 = exports_external.object({
147437
147970
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147438
147971
  conflicts: exports_external.boolean().describe("Whether rebase had conflicts."),
147439
147972
  conflictedFiles: exports_external.array(exports_external.string()).describe("Files with conflicts that need resolution."),
147440
147973
  rebasedCommits: exports_external.number().int().describe("Number of commits that were rebased."),
147441
- currentCommit: exports_external.string().optional().describe("Current commit hash if rebase stopped due to conflict.")
147974
+ currentCommit: exports_external.string().optional().describe("Current commit hash if rebase stopped due to conflict."),
147975
+ message: exports_external.string().optional().describe("Human-readable next-step guidance, especially for conflicts.")
147442
147976
  });
147443
147977
  async function gitRebaseLogic(input, { provider, targetPath, appContext }) {
147444
147978
  const rebaseOptions = {};
@@ -147465,12 +147999,14 @@ async function gitRebaseLogic(input, { provider, targetPath, appContext }) {
147465
147999
  requestContext: appContext,
147466
148000
  tenantId: appContext.tenantId || "default-tenant"
147467
148001
  });
148002
+ const message = result.conflicts ? `Rebase paused with conflicts in ${result.conflictedFiles.length} file(s). Resolve them, then run git_rebase with mode='continue' (or mode='abort' to cancel, mode='skip' to drop the current commit).` : undefined;
147468
148003
  return {
147469
148004
  success: result.success,
147470
148005
  conflicts: result.conflicts,
147471
148006
  conflictedFiles: result.conflictedFiles,
147472
148007
  rebasedCommits: result.rebasedCommits,
147473
- currentCommit: result.currentCommit
148008
+ currentCommit: result.currentCommit,
148009
+ message
147474
148010
  };
147475
148011
  }
147476
148012
  function filterGitRebaseOutput(result, level) {
@@ -147508,7 +148044,7 @@ var InputSchema21 = exports_external.object({
147508
148044
  prune: PruneSchema,
147509
148045
  tags: exports_external.boolean().default(false).describe("Fetch all tags from the remote."),
147510
148046
  depth: DepthSchema
147511
- });
148047
+ }).strict();
147512
148048
  var OutputSchema22 = exports_external.object({
147513
148049
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147514
148050
  remote: exports_external.string().describe("Remote name that was fetched from."),
@@ -147575,7 +148111,7 @@ var InputSchema22 = exports_external.object({
147575
148111
  branch: BranchNameSchema.optional().describe("Branch name (default: current branch)."),
147576
148112
  rebase: exports_external.boolean().default(false).describe("Use rebase instead of merge when integrating changes."),
147577
148113
  fastForwardOnly: exports_external.boolean().default(false).describe("Fail if can't fast-forward (no merge commit).")
147578
- });
148114
+ }).strict();
147579
148115
  var OutputSchema23 = exports_external.object({
147580
148116
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147581
148117
  remote: exports_external.string().describe("Remote name that was pulled from."),
@@ -147661,7 +148197,7 @@ var InputSchema23 = exports_external.object({
147661
148197
  delete: exports_external.boolean().default(false).describe("Delete the specified remote branch."),
147662
148198
  remoteBranch: BranchNameSchema.optional().describe("Remote branch name to push to (if different from local branch name)."),
147663
148199
  confirmed: exports_external.boolean().default(false).describe("Explicit confirmation required for force push or branch deletion on protected branches (main, master, production, etc.).")
147664
- });
148200
+ }).strict();
147665
148201
  var OutputSchema24 = exports_external.object({
147666
148202
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147667
148203
  remote: exports_external.string().describe("Remote name that was pushed to."),
@@ -147764,7 +148300,7 @@ var InputSchema24 = exports_external.object({
147764
148300
  url: exports_external.string().url().optional().describe("Remote URL for add/set-url operations."),
147765
148301
  newName: RemoteNameSchema.optional().describe("New remote name for rename operation."),
147766
148302
  push: exports_external.boolean().default(false).describe("Set push URL separately (for set-url operation).")
147767
- });
148303
+ }).strict();
147768
148304
  var RemoteInfoSchema = exports_external.object({
147769
148305
  name: exports_external.string().describe("Remote name."),
147770
148306
  fetchUrl: exports_external.string().describe("Fetch URL."),
@@ -147847,10 +148383,10 @@ var TOOL_DESCRIPTION25 = "Reset current HEAD to specified state. Can be used to
147847
148383
  var InputSchema25 = exports_external.object({
147848
148384
  path: PathSchema,
147849
148385
  mode: exports_external.enum(["soft", "mixed", "hard", "merge", "keep"]).default("mixed").describe("Reset mode: soft (keep changes staged), mixed (unstage changes), hard (discard all changes), merge (reset and merge), keep (reset but keep local changes)."),
147850
- target: CommitRefSchema.optional().describe("Target commit to reset to (default: HEAD)."),
148386
+ target: CommitRefSchema.default("HEAD").describe("Target commit to reset to. Defaults to HEAD."),
147851
148387
  paths: exports_external.array(exports_external.string()).optional().describe("Specific file paths to reset (leaves HEAD unchanged)."),
147852
148388
  confirmed: exports_external.boolean().default(false).describe("Explicit confirmation required for hard, merge, and keep reset modes on protected branches (main, master, production, etc.).")
147853
- });
148389
+ }).strict();
147854
148390
  var OutputSchema26 = exports_external.object({
147855
148391
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147856
148392
  mode: exports_external.string().describe("Reset mode that was used."),
@@ -147870,11 +148406,9 @@ async function gitResetLogic(input, { provider, targetPath, appContext }) {
147870
148406
  }
147871
148407
  }
147872
148408
  const resetOptions = {
147873
- mode: input.mode
148409
+ mode: input.mode,
148410
+ commit: input.target
147874
148411
  };
147875
- if (input.target !== undefined) {
147876
- resetOptions.commit = input.target;
147877
- }
147878
148412
  if (input.paths !== undefined) {
147879
148413
  resetOptions.paths = input.paths;
147880
148414
  }
@@ -147935,7 +148469,7 @@ var InputSchema26 = exports_external.object({
147935
148469
  includeUntracked: exports_external.boolean().default(false).describe("Include untracked files in the stash (for push operation)."),
147936
148470
  keepIndex: exports_external.boolean().default(false).describe("Don't revert staged changes (for push operation)."),
147937
148471
  limit: LimitSchema.describe("For list mode: cap the number of stash entries returned (applied at the git command).")
147938
- });
148472
+ }).strict();
147939
148473
  var StashInfoSchema = exports_external.object({
147940
148474
  ref: exports_external.string().describe("Stash reference (e.g., stash@{0})."),
147941
148475
  index: exports_external.number().int().describe("Stash index number."),
@@ -148014,20 +148548,22 @@ init_zod();
148014
148548
  init_errors3();
148015
148549
  var TOOL_NAME27 = "git_tag";
148016
148550
  var TOOL_TITLE27 = "Git Tag";
148017
- var TOOL_DESCRIPTION27 = "Manage tags: list all tags, create a new tag, or delete a tag. Tags are used to mark specific points in history (releases, milestones).";
148551
+ var TOOL_DESCRIPTION27 = "Manage tags: list all tags, create a new tag, delete a tag, or verify a signed tag. Tags are used to mark specific points in history (releases, milestones). Verify runs `git tag -v` and returns a structured result distinguishing unsigned tags, missing trust configuration, bad signatures, and valid signatures.";
148018
148552
  var InputSchema27 = exports_external.object({
148019
148553
  path: PathSchema,
148020
- mode: exports_external.enum(["list", "create", "delete"]).default("list").describe("The tag operation to perform."),
148021
- tagName: TagNameSchema.optional().describe("Tag name for create/delete operations."),
148554
+ mode: exports_external.enum(["list", "create", "delete", "verify"]).default("list").describe("The tag operation to perform."),
148555
+ tagName: TagNameSchema.optional().describe("Tag name for create/delete/verify operations."),
148022
148556
  commit: CommitRefSchema.optional().describe("Commit to tag (default: HEAD for create operation)."),
148023
148557
  message: exports_external.string().optional().describe("Tag message. Providing a message always produces an annotated tag (git does not support messages on lightweight tags). For release tags, summarize notable changes."),
148024
148558
  annotated: exports_external.boolean().default(false).describe('Create an annotated tag with a default "Tag <name>" message. Only effective when no message is provided and signing is disabled — otherwise the tag is always annotated.'),
148025
- force: ForceSchema.describe("Overwrite an existing tag (create mode only; has no effect on list or delete).")
148026
- });
148559
+ force: ForceSchema.describe("Overwrite an existing tag (create mode only; has no effect on list or delete)."),
148560
+ limit: LimitSchema.describe("For list mode: cap the number of tags returned (applied at the git command via `--count=N`). Use on repos with many tags.")
148561
+ }).strict();
148027
148562
  var TagInfoSchema = exports_external.object({
148028
148563
  name: exports_external.string().describe("Tag name."),
148029
148564
  commit: exports_external.string().describe("Commit hash the tag points to."),
148030
- message: exports_external.string().optional().describe("Tag message (for annotated tags)."),
148565
+ message: exports_external.string().optional().describe("First line of the tag annotation (annotated tags only). See `annotationBody` for the remainder."),
148566
+ annotationBody: exports_external.string().optional().describe("Remaining annotation body after the subject line (annotated tags only)."),
148031
148567
  tagger: exports_external.string().optional().describe("Tagger name and email."),
148032
148568
  timestamp: exports_external.number().int().optional().describe("Tag creation timestamp.")
148033
148569
  });
@@ -148038,10 +148574,17 @@ var OutputSchema28 = exports_external.object({
148038
148574
  created: exports_external.string().optional().describe("Created tag name (for create mode)."),
148039
148575
  deleted: exports_external.string().optional().describe("Deleted tag name (for delete mode)."),
148040
148576
  signed: exports_external.boolean().optional().describe("Whether the created tag was signed. Only populated for create mode. False when GIT_SIGN_COMMITS=false or when signing failed and fell back to unsigned."),
148041
- signingWarning: exports_external.string().optional().describe("Populated only when signing was requested but failed, and the tag was created unsigned as a fallback.")
148577
+ signingWarning: exports_external.string().optional().describe("Populated only when signing was requested but failed, and the tag was created unsigned as a fallback."),
148578
+ verifiedTag: exports_external.string().optional().describe("Verified tag name (for verify mode). Echoes the input so callers can correlate results in batched flows."),
148579
+ verified: exports_external.boolean().optional().describe("Whether the signature validated (for verify mode). `false` for unsigned tags, missing trust config, bad signatures, or unparseable output — inspect `warning` to distinguish."),
148580
+ signatureType: exports_external.enum(["gpg", "ssh", "x509"]).optional().describe("Signature algorithm family when detectable from `git tag -v` output (verify mode). Absent for unsigned tags or unparseable output."),
148581
+ signerIdentity: exports_external.string().optional().describe("Signer identity as emitted by git — e.g., `Name <email>` for GPG or the SSH principal. Verify mode only."),
148582
+ signerKey: exports_external.string().optional().describe("Key material emitted by git — GPG fingerprint/key ID or SSH key fingerprint (`SHA256:…`). Verify mode only; absent when git did not surface it."),
148583
+ warning: exports_external.string().optional().describe("Populated on verify failure with a human-readable reason distinguishing unsigned tags, missing trust configuration, bad signatures, and unparseable output."),
148584
+ rawOutput: exports_external.string().optional().describe("Raw stderr from `git tag -v` for callers that need the full verification output (verify mode only).")
148042
148585
  });
148043
148586
  async function gitTagLogic(input, { provider, targetPath, appContext }) {
148044
- if ((input.mode === "create" || input.mode === "delete") && !input.tagName) {
148587
+ if ((input.mode === "create" || input.mode === "delete" || input.mode === "verify") && !input.tagName) {
148045
148588
  throw new McpError(-32602 /* InvalidParams */, `Tag name is required for ${input.mode} operation.`);
148046
148589
  }
148047
148590
  const tagOptions = {
@@ -148058,6 +148601,9 @@ async function gitTagLogic(input, { provider, targetPath, appContext }) {
148058
148601
  if (input.message !== undefined) {
148059
148602
  tagOptions.message = normalizeMessage(input.message);
148060
148603
  }
148604
+ if (input.limit !== undefined) {
148605
+ tagOptions.limit = input.limit;
148606
+ }
148061
148607
  const result = await provider.tag(tagOptions, {
148062
148608
  workingDirectory: targetPath,
148063
148609
  requestContext: appContext,
@@ -148076,6 +148622,27 @@ async function gitTagLogic(input, { provider, targetPath, appContext }) {
148076
148622
  if (result.signingWarning) {
148077
148623
  output.signingWarning = result.signingWarning;
148078
148624
  }
148625
+ if (result.verifiedTag !== undefined) {
148626
+ output.verifiedTag = result.verifiedTag;
148627
+ }
148628
+ if (result.verified !== undefined) {
148629
+ output.verified = result.verified;
148630
+ }
148631
+ if (result.signatureType !== undefined) {
148632
+ output.signatureType = result.signatureType;
148633
+ }
148634
+ if (result.signerIdentity !== undefined) {
148635
+ output.signerIdentity = result.signerIdentity;
148636
+ }
148637
+ if (result.signerKey !== undefined) {
148638
+ output.signerKey = result.signerKey;
148639
+ }
148640
+ if (result.warning !== undefined) {
148641
+ output.warning = result.warning;
148642
+ }
148643
+ if (result.rawOutput !== undefined) {
148644
+ output.rawOutput = result.rawOutput;
148645
+ }
148079
148646
  return output;
148080
148647
  }
148081
148648
  function filterGitTagOutput(result, level) {
@@ -148084,10 +148651,16 @@ function filterGitTagOutput(result, level) {
148084
148651
  success: result.success,
148085
148652
  mode: result.mode,
148086
148653
  ...result.signed !== undefined && { signed: result.signed },
148087
- ...result.signingWarning && { signingWarning: result.signingWarning }
148654
+ ...result.signingWarning && { signingWarning: result.signingWarning },
148655
+ ...result.verified !== undefined && { verified: result.verified },
148656
+ ...result.warning && { warning: result.warning }
148088
148657
  };
148089
148658
  }
148090
- return result;
148659
+ if (level === "full") {
148660
+ return result;
148661
+ }
148662
+ const { rawOutput: _raw, ...rest } = result;
148663
+ return rest;
148091
148664
  }
148092
148665
  var responseFormatter27 = createJsonFormatter({
148093
148666
  filter: filterGitTagOutput
@@ -148112,14 +148685,14 @@ var InputSchema28 = exports_external.object({
148112
148685
  path: PathSchema,
148113
148686
  mode: exports_external.enum(["list", "add", "remove", "move", "prune"]).default("list").describe("The worktree operation to perform."),
148114
148687
  worktreePath: exports_external.string().optional().describe("Path for the new worktree (for add/move operations)."),
148115
- branch: BranchNameSchema.optional().describe("Branch to checkout in the new worktree (for add operation)."),
148116
- commitish: CommitRefSchema.optional().describe("Commit/branch to base the worktree on (for add operation)."),
148688
+ branch: BranchNameSchema.optional().describe("For add operation: create a NEW branch with this name in the new worktree. Fails if the branch already exists — use `commitish` to check out an existing branch instead."),
148689
+ commitish: CommitRefSchema.optional().describe("For add operation: check out this existing branch/commit/tag in the new worktree (no new branch is created)."),
148117
148690
  force: exports_external.boolean().default(false).describe("Force operation (for remove operation with uncommitted changes)."),
148118
148691
  newPath: exports_external.string().optional().describe("New path for the worktree (for move operation)."),
148119
148692
  detach: exports_external.boolean().default(false).describe("Create worktree with detached HEAD (for add operation)."),
148120
148693
  verbose: exports_external.boolean().default(false).describe("Provide detailed output for worktree operations."),
148121
148694
  dryRun: exports_external.boolean().default(false).describe("Preview the operation without executing it (for prune operation).")
148122
- });
148695
+ }).strict();
148123
148696
  var WorktreeInfoSchema = exports_external.object({
148124
148697
  path: exports_external.string().describe("Absolute path to the worktree."),
148125
148698
  head: exports_external.string().describe("HEAD commit hash in this worktree."),
@@ -153431,7 +154004,7 @@ function isCloudflareWorkers() {
153431
154004
  var USER_AGENT;
153432
154005
  if (typeof navigator === "undefined" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) {
153433
154006
  const NAME2 = "jose";
153434
- const VERSION = "v6.2.2";
154007
+ const VERSION = "v6.2.3";
153435
154008
  USER_AGENT = `${NAME2}/${VERSION}`;
153436
154009
  }
153437
154010
  var customFetch = Symbol();