@cyanheads/git-mcp-server 2.14.2 → 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 +1 -1
  2. package/dist/index.js +582 -147
  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.14.2",
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
  }
@@ -145211,19 +145656,9 @@ init_zod();
145211
145656
  var PathSchema = exports_external.string().default(".").describe("Path to the Git repository. Defaults to session working directory set via git_set_working_dir.");
145212
145657
  var ForceSchema = exports_external.boolean().default(false).describe("Force the operation, bypassing safety checks.");
145213
145658
  var DryRunSchema = exports_external.boolean().default(false).describe("Preview the operation without executing it.");
145214
- var ConfirmSchema = exports_external.enum(["Y", "y", "Yes", "yes"]).optional().describe("Explicit confirmation required for protected operations (Y/y/Yes/yes).");
145215
145659
  var BranchNameSchema = exports_external.string().min(1).max(255).regex(/^[^~^:?*\[\\]+$/, "Invalid branch name format").describe("Branch name (must follow git naming conventions).");
145216
145660
  var CommitRefSchema = exports_external.string().min(1).describe("Commit reference: full/short hash, branch name, tag name, or relative ref (HEAD~1).");
145217
- var AuthorSchema = exports_external.object({
145218
- name: exports_external.string().min(1).describe("Author's name"),
145219
- email: exports_external.string().email().describe("Author's email address")
145220
- });
145221
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).");
145222
- var SuccessResponseSchema = exports_external.object({
145223
- success: exports_external.boolean().describe("Indicates if the operation was successful."),
145224
- message: exports_external.string().describe("Human-readable summary of the result.")
145225
- });
145226
- 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.");
145227
145662
  var TagNameSchema = exports_external.string().min(1).max(255).regex(/^[^~^:?*\[\\]+$/, "Invalid tag name format").describe("Tag name (must follow git naming conventions).");
145228
145663
  function normalizeMessage(message) {
145229
145664
  return message.replace(/\\r\\n/g, `
@@ -145233,9 +145668,6 @@ function normalizeMessage(message) {
145233
145668
  var CommitMessageSchema = exports_external.string().min(1, "Commit message cannot be empty").max(1e4, "Commit message too long").transform(normalizeMessage).describe("Commit message.");
145234
145669
  var LimitSchema = exports_external.number().int().min(1).max(1000).optional().describe("Maximum number of items to return (1-1000).");
145235
145670
  var SkipSchema = exports_external.number().int().nonnegative().optional().describe("Number of items to skip for pagination.");
145236
- var VerboseSchema = exports_external.boolean().default(false).describe("Include verbose/detailed information in output.");
145237
- var QuietSchema = exports_external.boolean().default(false).describe("Suppress informational output (errors only).");
145238
- var RecursiveSchema = exports_external.boolean().default(false).describe("Operate recursively on subdirectories.");
145239
145671
  var AllSchema = exports_external.boolean().default(false).describe("Include all items (varies by operation).");
145240
145672
  var MergeStrategySchema = exports_external.enum(["ort", "recursive", "octopus", "ours", "subtree"]).optional().describe("Merge strategy to use (ort, recursive, octopus, ours, subtree).");
145241
145673
  var PruneSchema = exports_external.boolean().default(false).describe("Prune remote-tracking references that no longer exist on remote.");
@@ -145642,7 +146074,7 @@ var InputSchema = exports_external.object({
145642
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."),
145643
146075
  sinceTag: exports_external.string().optional().describe('Only include git history since this tag (e.g., "v1.2.0"). Narrows the analysis window.'),
145644
146076
  branch: CommitRefSchema.optional().describe("Branch to analyze (defaults to current branch).")
145645
- });
146077
+ }).strict();
145646
146078
  var CommitSummarySchema = exports_external.object({
145647
146079
  hash: exports_external.string().describe("Short commit hash."),
145648
146080
  subject: exports_external.string().describe("Commit subject line."),
@@ -145756,11 +146188,11 @@ var TOOL_TITLE2 = "Git Blame";
145756
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.";
145757
146189
  var InputSchema2 = exports_external.object({
145758
146190
  path: PathSchema,
145759
- 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)."),
145760
146192
  startLine: exports_external.number().int().min(1).optional().describe("Start line number (1-indexed)."),
145761
146193
  endLine: exports_external.number().int().min(1).optional().describe("End line number (1-indexed)."),
145762
146194
  ignoreWhitespace: exports_external.boolean().default(false).describe("Ignore whitespace changes.")
145763
- });
146195
+ }).strict();
145764
146196
  var BlameLineSchema = exports_external.object({
145765
146197
  lineNumber: exports_external.number().int().min(1).describe("Line number in the file (1-indexed)."),
145766
146198
  commitHash: exports_external.string().describe("Full commit hash of the last change to this line."),
@@ -145770,13 +146202,13 @@ var BlameLineSchema = exports_external.object({
145770
146202
  });
145771
146203
  var OutputSchema3 = exports_external.object({
145772
146204
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
145773
- file: exports_external.string().describe("The file that was blamed."),
146205
+ filePath: exports_external.string().describe("The file that was blamed."),
145774
146206
  lines: exports_external.array(BlameLineSchema).describe("Array of blame information for each line."),
145775
146207
  totalLines: exports_external.number().int().describe("Total number of lines in the output.")
145776
146208
  });
145777
146209
  async function gitBlameLogic(input, { provider, targetPath, appContext }) {
145778
146210
  const blameOptions = {
145779
- file: input.file,
146211
+ file: input.filePath,
145780
146212
  ignoreWhitespace: input.ignoreWhitespace
145781
146213
  };
145782
146214
  if (input.startLine !== undefined) {
@@ -145792,7 +146224,7 @@ async function gitBlameLogic(input, { provider, targetPath, appContext }) {
145792
146224
  });
145793
146225
  return {
145794
146226
  success: result.success,
145795
- file: result.file,
146227
+ filePath: result.file,
145796
146228
  lines: result.lines,
145797
146229
  totalLines: result.totalLines
145798
146230
  };
@@ -145801,7 +146233,7 @@ function filterGitBlameOutput(result, level) {
145801
146233
  if (level === "minimal") {
145802
146234
  return {
145803
146235
  success: result.success,
145804
- file: result.file,
146236
+ filePath: result.filePath,
145805
146237
  totalLines: result.totalLines
145806
146238
  };
145807
146239
  }
@@ -145832,7 +146264,7 @@ var InputSchema3 = exports_external.object({
145832
146264
  dryRun: DryRunSchema,
145833
146265
  directories: exports_external.boolean().default(false).describe("Remove untracked directories in addition to files."),
145834
146266
  ignored: exports_external.boolean().default(false).describe("Remove ignored files as well.")
145835
- }).refine((data) => data.force === true || data.dryRun === true, {
146267
+ }).strict().refine((data) => data.force === true || data.dryRun === true, {
145836
146268
  message: "force flag must be set to true to clean untracked files (or use dryRun to preview)",
145837
146269
  path: ["force"]
145838
146270
  });
@@ -145889,7 +146321,7 @@ var TOOL_TITLE4 = "Git Clear Working Directory";
145889
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.";
145890
146322
  var InputSchema4 = exports_external.object({
145891
146323
  confirm: exports_external.enum(["Y", "y", "Yes", "yes"]).describe("Explicit confirmation required to clear working directory. Accepted values: 'Y', 'y', 'Yes', or 'yes'.")
145892
- });
146324
+ }).strict();
145893
146325
  var OutputSchema5 = exports_external.object({
145894
146326
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
145895
146327
  message: exports_external.string().describe("Confirmation message."),
@@ -145933,26 +146365,26 @@ var gitClearWorkingDirTool = {
145933
146365
  init_zod();
145934
146366
  var TOOL_NAME5 = "git_clone";
145935
146367
  var TOOL_TITLE5 = "Git Clone";
145936
- 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.";
145937
146369
  var InputSchema5 = exports_external.object({
145938
- url: exports_external.string().url().describe("Remote repository URL to clone from."),
145939
- 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."),
145940
146372
  branch: exports_external.string().optional().describe("Specific branch to clone (defaults to remote HEAD)."),
145941
146373
  depth: DepthSchema,
145942
146374
  bare: exports_external.boolean().default(false).describe("Create a bare repository (no working directory)."),
145943
146375
  mirror: exports_external.boolean().default(false).describe("Create a mirror clone (implies bare).")
145944
- });
146376
+ }).strict();
145945
146377
  var OutputSchema6 = exports_external.object({
145946
146378
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
145947
- remoteUrl: exports_external.string().describe("The remote URL that was cloned."),
145948
- 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."),
145949
146381
  branch: exports_external.string().describe("The branch that was checked out."),
145950
146382
  commitHash: exports_external.string().optional().describe("Current HEAD commit hash.")
145951
146383
  });
145952
146384
  async function gitCloneLogic(input, { provider, appContext }) {
145953
146385
  const cloneOptions = {
145954
146386
  remoteUrl: input.url,
145955
- localPath: input.localPath,
146387
+ localPath: input.path,
145956
146388
  bare: input.bare,
145957
146389
  mirror: input.mirror
145958
146390
  };
@@ -145970,7 +146402,7 @@ async function gitCloneLogic(input, { provider, appContext }) {
145970
146402
  return {
145971
146403
  success: result.success,
145972
146404
  remoteUrl: result.remoteUrl,
145973
- localPath: result.localPath,
146405
+ path: result.localPath,
145974
146406
  branch: result.branch,
145975
146407
  commitHash: result.commitHash
145976
146408
  };
@@ -145980,7 +146412,7 @@ function filterGitCloneOutput(result, level) {
145980
146412
  return {
145981
146413
  success: result.success,
145982
146414
  remoteUrl: result.remoteUrl,
145983
- localPath: result.localPath
146415
+ path: result.path
145984
146416
  };
145985
146417
  }
145986
146418
  return result;
@@ -146008,7 +146440,7 @@ var InputSchema6 = exports_external.object({
146008
146440
  path: PathSchema,
146009
146441
  initialBranch: exports_external.string().optional().describe("Name of the initial branch (default: main)."),
146010
146442
  bare: exports_external.boolean().default(false).describe("Create a bare repository (no working directory).")
146011
- });
146443
+ }).strict();
146012
146444
  var OutputSchema7 = exports_external.object({
146013
146445
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
146014
146446
  path: exports_external.string().describe("Path where repository was initialized."),
@@ -146073,9 +146505,9 @@ var TOOL_TITLE7 = "Git Reflog";
146073
146505
  var TOOL_DESCRIPTION7 = "View the reference logs (reflog) to track when branch tips and other references were updated. Useful for recovering lost commits.";
146074
146506
  var InputSchema7 = exports_external.object({
146075
146507
  path: PathSchema,
146076
- 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."),
146077
146509
  maxCount: LimitSchema.default(25)
146078
- });
146510
+ }).strict();
146079
146511
  var ReflogEntrySchema = exports_external.object({
146080
146512
  hash: exports_external.string().describe("Commit hash for this reflog entry."),
146081
146513
  refName: exports_external.string().describe("Reference name (e.g., HEAD@{0}, main@{1})."),
@@ -146090,10 +146522,9 @@ var OutputSchema8 = exports_external.object({
146090
146522
  totalEntries: exports_external.number().int().describe("Total number of reflog entries.")
146091
146523
  });
146092
146524
  async function gitReflogLogic(input, { provider, targetPath, appContext }) {
146093
- const reflogOptions = {};
146094
- if (input.ref !== undefined) {
146095
- reflogOptions.ref = input.ref;
146096
- }
146525
+ const reflogOptions = {
146526
+ ref: input.ref
146527
+ };
146097
146528
  if (input.maxCount !== undefined) {
146098
146529
  reflogOptions.maxCount = input.maxCount;
146099
146530
  }
@@ -146316,7 +146747,7 @@ var InputSchema8 = exports_external.object({
146316
146747
  path: exports_external.string().min(1).describe("Absolute path to the git repository to use as the working directory."),
146317
146748
  validateGitRepo: exports_external.boolean().default(true).describe("Validate that the path is a Git repository."),
146318
146749
  initializeIfNotPresent: exports_external.boolean().default(false).describe("If not a Git repository, initialize it with 'git init'.")
146319
- });
146750
+ }).strict();
146320
146751
  var OutputSchema9 = exports_external.object({
146321
146752
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
146322
146753
  path: exports_external.string().describe("The working directory that was set."),
@@ -146400,7 +146831,7 @@ var TOOL_DESCRIPTION9 = "Show the working tree status including staged, unstaged
146400
146831
  var InputSchema9 = exports_external.object({
146401
146832
  path: PathSchema,
146402
146833
  includeUntracked: exports_external.boolean().default(true).describe("Include untracked files in the output.")
146403
- });
146834
+ }).strict();
146404
146835
  var OutputSchema10 = exports_external.object({
146405
146836
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
146406
146837
  currentBranch: exports_external.string().nullable().describe("Current branch name."),
@@ -146479,7 +146910,7 @@ var TOOL_DESCRIPTION10 = "Returns a Git wrap-up protocol: an acceptance-criteria
146479
146910
  var InputSchema10 = exports_external.object({
146480
146911
  acknowledgement: exports_external.enum(["Y", "y", "Yes", "yes"]).describe("Acknowledgement to initiate the wrap-up workflow."),
146481
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.")
146482
- });
146913
+ }).strict();
146483
146914
  var OutputSchema11 = exports_external.object({
146484
146915
  instructions: exports_external.string().describe("The wrap-up protocol to satisfy before the session ships."),
146485
146916
  repository: exports_external.object({
@@ -146629,13 +147060,13 @@ var TOOL_TITLE11 = "Git Add";
146629
147060
  var TOOL_DESCRIPTION11 = "Stage files for commit. Add file contents to the staging area (index) to prepare for the next commit.";
146630
147061
  var InputSchema11 = exports_external.object({
146631
147062
  path: PathSchema,
146632
- 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.'),
146633
147064
  update: exports_external.boolean().default(false).describe("Stage only modified and deleted files (skip untracked files)."),
146634
147065
  all: AllSchema,
146635
147066
  force: exports_external.boolean().default(false).describe("Allow adding otherwise ignored files.")
146636
- }).refine((data) => data.all || data.update || data.files.length > 0, {
146637
- message: "Either files must be provided, or all/update must be true.",
146638
- 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"]
146639
147070
  });
146640
147071
  var OutputSchema12 = exports_external.object({
146641
147072
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
@@ -146651,9 +147082,9 @@ var OutputSchema12 = exports_external.object({
146651
147082
  }).describe("Repository status after staging files.")
146652
147083
  });
146653
147084
  async function gitAddLogic(input, { provider, targetPath, appContext }) {
146654
- const { path: _path, files, ...rest } = input;
147085
+ const { path: _path, paths, ...rest } = input;
146655
147086
  const addOptions = {
146656
- paths: files,
147087
+ paths,
146657
147088
  ...rest
146658
147089
  };
146659
147090
  const result = await provider.add(addOptions, {
@@ -146749,7 +147180,7 @@ var InputSchema12 = exports_external.object({
146749
147180
  allowEmpty: exports_external.boolean().default(false).describe("Allow creating a commit with no changes."),
146750
147181
  noVerify: NoVerifySchema,
146751
147182
  filesToStage: exports_external.array(exports_external.string()).optional().describe("File paths to stage before committing (atomic stage+commit operation).")
146752
- });
147183
+ }).strict();
146753
147184
  var OutputSchema13 = exports_external.object({
146754
147185
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
146755
147186
  commitHash: exports_external.string().describe("SHA-1 hash of the created commit."),
@@ -146913,7 +147344,7 @@ var InputSchema13 = exports_external.object({
146913
147344
  stat: exports_external.boolean().default(false).describe("Show diffstat (summary of changes) instead of full diff content."),
146914
147345
  contextLines: exports_external.number().int().min(0).max(100).default(3).describe("Number of context lines to show around changes."),
146915
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.")
146916
- });
147347
+ }).strict();
146917
147348
  var OutputSchema14 = exports_external.object({
146918
147349
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
146919
147350
  diff: exports_external.string().describe("The diff output in unified diff format."),
@@ -146996,7 +147427,7 @@ var InputSchema14 = exports_external.object({
146996
147427
  stat: exports_external.boolean().default(false).describe("Include file change statistics for each commit."),
146997
147428
  patch: exports_external.boolean().default(false).describe("Include the full diff patch for each commit."),
146998
147429
  showSignature: exports_external.boolean().default(false).describe("Show GPG signature verification information for each commit.")
146999
- });
147430
+ }).strict();
147000
147431
  var CommitSchema = exports_external.object({
147001
147432
  hash: exports_external.string().describe("Full commit SHA-1 hash."),
147002
147433
  shortHash: exports_external.string().describe("Abbreviated commit hash (7 characters)."),
@@ -147090,7 +147521,7 @@ var InputSchema15 = exports_external.object({
147090
147521
  format: exports_external.enum(["raw"]).optional().describe('Output format for the git object. Use "raw" for unprocessed git output.'),
147091
147522
  stat: exports_external.boolean().default(false).describe("Show diffstat instead of full diff."),
147092
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.")
147093
- });
147524
+ }).strict();
147094
147525
  var OutputSchema16 = exports_external.object({
147095
147526
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147096
147527
  object: exports_external.string().describe("Object identifier."),
@@ -147164,17 +147595,17 @@ var TOOL_TITLE16 = "Git Branch";
147164
147595
  var TOOL_DESCRIPTION16 = "Manage branches: list all branches, show current branch, create a new branch, delete a branch, or rename a branch.";
147165
147596
  var InputSchema16 = exports_external.object({
147166
147597
  path: PathSchema,
147167
- operation: exports_external.enum(["list", "create", "delete", "rename", "show-current"]).default("list").describe("The branch operation to perform."),
147168
- name: BranchNameSchema.optional().describe("Branch name for create/delete/rename operations."),
147169
- 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."),
147170
147601
  startPoint: CommitRefSchema.optional().describe("Starting point (commit/branch) for new branch creation."),
147171
147602
  force: ForceSchema,
147172
- all: AllSchema.describe("For list operation: show both local and remote branches."),
147173
- remote: exports_external.boolean().default(false).describe("For list operation: show only remote branches."),
147174
- 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)."),
147175
- 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)."),
147176
- limit: LimitSchema.describe("For list operation: cap the number of branches returned (applied at the git command). Use on repos with many branches.")
147177
- });
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();
147178
147609
  var BranchInfoSchema = exports_external.object({
147179
147610
  name: exports_external.string().describe("Branch name."),
147180
147611
  current: exports_external.boolean().describe("True if this is the current branch."),
@@ -147185,13 +147616,13 @@ var BranchInfoSchema = exports_external.object({
147185
147616
  });
147186
147617
  var OutputSchema17 = exports_external.object({
147187
147618
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147188
- operation: exports_external.enum(["list", "create", "delete", "rename", "show-current"]),
147189
- 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)."),
147190
147621
  currentBranch: exports_external.string().optional().describe("Name of current branch."),
147191
- 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.")
147192
147623
  });
147193
147624
  async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147194
- if (input.operation === "show-current") {
147625
+ if (input.mode === "show-current") {
147195
147626
  const result2 = await provider.branch({ mode: "show-current" }, {
147196
147627
  workingDirectory: targetPath,
147197
147628
  requestContext: appContext,
@@ -147200,21 +147631,21 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147200
147631
  const current = result2.mode === "show-current" ? result2.current : null;
147201
147632
  return {
147202
147633
  success: true,
147203
- operation: "show-current",
147634
+ mode: "show-current",
147204
147635
  branches: undefined,
147205
147636
  currentBranch: current ?? undefined,
147206
147637
  message: current ? `Current branch: ${current}` : "Not on any branch (detached HEAD)"
147207
147638
  };
147208
147639
  }
147209
- const { path: _path, operation, name, newName, ...rest } = input;
147640
+ const { path: _path, mode, branchName, newBranchName, ...rest } = input;
147210
147641
  const branchOptions = {
147211
- mode: operation
147642
+ mode
147212
147643
  };
147213
- if (name !== undefined) {
147214
- branchOptions.branchName = name;
147644
+ if (branchName !== undefined) {
147645
+ branchOptions.branchName = branchName;
147215
147646
  }
147216
- if (newName !== undefined) {
147217
- branchOptions.newBranchName = newName;
147647
+ if (newBranchName !== undefined) {
147648
+ branchOptions.newBranchName = newBranchName;
147218
147649
  }
147219
147650
  if (rest.startPoint !== undefined) {
147220
147651
  branchOptions.startPoint = rest.startPoint;
@@ -147244,7 +147675,7 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147244
147675
  if (result.mode === "list") {
147245
147676
  return {
147246
147677
  success: true,
147247
- operation: "list",
147678
+ mode: "list",
147248
147679
  branches: result.branches,
147249
147680
  currentBranch: result.branches.find((b) => b.current)?.name,
147250
147681
  message: undefined
@@ -147252,7 +147683,7 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147252
147683
  } else if (result.mode === "create") {
147253
147684
  return {
147254
147685
  success: true,
147255
- operation: "create",
147686
+ mode: "create",
147256
147687
  branches: undefined,
147257
147688
  currentBranch: undefined,
147258
147689
  message: `Branch '${result.created}' created successfully.`
@@ -147260,7 +147691,7 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147260
147691
  } else if (result.mode === "delete") {
147261
147692
  return {
147262
147693
  success: true,
147263
- operation: "delete",
147694
+ mode: "delete",
147264
147695
  branches: undefined,
147265
147696
  currentBranch: undefined,
147266
147697
  message: `Branch '${result.deleted}' deleted successfully.`
@@ -147268,7 +147699,7 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
147268
147699
  } else if (result.mode === "rename") {
147269
147700
  return {
147270
147701
  success: true,
147271
- operation: "rename",
147702
+ mode: "rename",
147272
147703
  branches: undefined,
147273
147704
  currentBranch: undefined,
147274
147705
  message: `Branch '${result.renamed.from}' renamed to '${result.renamed.to}'.`
@@ -147280,7 +147711,7 @@ function filterGitBranchOutput(result, level) {
147280
147711
  if (level === "minimal") {
147281
147712
  return {
147282
147713
  success: result.success,
147283
- operation: result.operation,
147714
+ mode: result.mode,
147284
147715
  currentBranch: result.currentBranch
147285
147716
  };
147286
147717
  }
@@ -147312,7 +147743,7 @@ var InputSchema17 = exports_external.object({
147312
147743
  force: ForceSchema,
147313
147744
  paths: exports_external.array(exports_external.string()).optional().describe("Specific file paths to checkout/restore (relative to repository root)."),
147314
147745
  track: exports_external.boolean().optional().describe("Set up tracking relationship with remote branch when creating new branch.")
147315
- });
147746
+ }).strict();
147316
147747
  var OutputSchema18 = exports_external.object({
147317
147748
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147318
147749
  target: exports_external.string().describe("Checked out branch or commit."),
@@ -147380,12 +147811,13 @@ var InputSchema18 = exports_external.object({
147380
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.)."),
147381
147812
  strategy: MergeStrategySchema.describe("Merge strategy to use for cherry-pick."),
147382
147813
  signoff: exports_external.boolean().default(false).describe("Add Signed-off-by line to the commit message.")
147383
- });
147814
+ }).strict();
147384
147815
  var OutputSchema19 = exports_external.object({
147385
147816
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147386
147817
  pickedCommits: exports_external.array(exports_external.string()).describe("Commits that were successfully cherry-picked."),
147387
147818
  conflicts: exports_external.boolean().describe("Whether operation had conflicts."),
147388
- 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.")
147389
147821
  });
147390
147822
  async function gitCherryPickLogic(input, { provider, targetPath, appContext }) {
147391
147823
  const cherryPickOptions = {
@@ -147406,11 +147838,13 @@ async function gitCherryPickLogic(input, { provider, targetPath, appContext }) {
147406
147838
  requestContext: appContext,
147407
147839
  tenantId: appContext.tenantId || "default-tenant"
147408
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;
147409
147842
  return {
147410
147843
  success: result.success,
147411
147844
  pickedCommits: result.pickedCommits,
147412
147845
  conflicts: result.conflicts,
147413
- conflictedFiles: result.conflictedFiles
147846
+ conflictedFiles: result.conflictedFiles,
147847
+ message
147414
147848
  };
147415
147849
  }
147416
147850
  function filterGitCherryPickOutput(result, level) {
@@ -147449,7 +147883,7 @@ var InputSchema19 = exports_external.object({
147449
147883
  squash: exports_external.boolean().default(false).describe("Squash all commits from the branch into a single commit."),
147450
147884
  message: CommitMessageSchema.optional().describe("Custom merge commit message."),
147451
147885
  abort: exports_external.boolean().default(false).describe("Abort an in-progress merge that has conflicts.")
147452
- });
147886
+ }).strict();
147453
147887
  var OutputSchema20 = exports_external.object({
147454
147888
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147455
147889
  strategy: exports_external.string().describe("Merge strategy used."),
@@ -147531,13 +147965,14 @@ var InputSchema20 = exports_external.object({
147531
147965
  interactive: exports_external.boolean().default(false).describe("Interactive rebase (not supported in all providers)."),
147532
147966
  onto: CommitRefSchema.optional().describe("Rebase onto different commit than upstream."),
147533
147967
  preserve: exports_external.boolean().default(false).describe("Preserve merge commits during rebase.")
147534
- });
147968
+ }).strict();
147535
147969
  var OutputSchema21 = exports_external.object({
147536
147970
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147537
147971
  conflicts: exports_external.boolean().describe("Whether rebase had conflicts."),
147538
147972
  conflictedFiles: exports_external.array(exports_external.string()).describe("Files with conflicts that need resolution."),
147539
147973
  rebasedCommits: exports_external.number().int().describe("Number of commits that were rebased."),
147540
- 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.")
147541
147976
  });
147542
147977
  async function gitRebaseLogic(input, { provider, targetPath, appContext }) {
147543
147978
  const rebaseOptions = {};
@@ -147564,12 +147999,14 @@ async function gitRebaseLogic(input, { provider, targetPath, appContext }) {
147564
147999
  requestContext: appContext,
147565
148000
  tenantId: appContext.tenantId || "default-tenant"
147566
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;
147567
148003
  return {
147568
148004
  success: result.success,
147569
148005
  conflicts: result.conflicts,
147570
148006
  conflictedFiles: result.conflictedFiles,
147571
148007
  rebasedCommits: result.rebasedCommits,
147572
- currentCommit: result.currentCommit
148008
+ currentCommit: result.currentCommit,
148009
+ message
147573
148010
  };
147574
148011
  }
147575
148012
  function filterGitRebaseOutput(result, level) {
@@ -147607,7 +148044,7 @@ var InputSchema21 = exports_external.object({
147607
148044
  prune: PruneSchema,
147608
148045
  tags: exports_external.boolean().default(false).describe("Fetch all tags from the remote."),
147609
148046
  depth: DepthSchema
147610
- });
148047
+ }).strict();
147611
148048
  var OutputSchema22 = exports_external.object({
147612
148049
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147613
148050
  remote: exports_external.string().describe("Remote name that was fetched from."),
@@ -147674,7 +148111,7 @@ var InputSchema22 = exports_external.object({
147674
148111
  branch: BranchNameSchema.optional().describe("Branch name (default: current branch)."),
147675
148112
  rebase: exports_external.boolean().default(false).describe("Use rebase instead of merge when integrating changes."),
147676
148113
  fastForwardOnly: exports_external.boolean().default(false).describe("Fail if can't fast-forward (no merge commit).")
147677
- });
148114
+ }).strict();
147678
148115
  var OutputSchema23 = exports_external.object({
147679
148116
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147680
148117
  remote: exports_external.string().describe("Remote name that was pulled from."),
@@ -147760,7 +148197,7 @@ var InputSchema23 = exports_external.object({
147760
148197
  delete: exports_external.boolean().default(false).describe("Delete the specified remote branch."),
147761
148198
  remoteBranch: BranchNameSchema.optional().describe("Remote branch name to push to (if different from local branch name)."),
147762
148199
  confirmed: exports_external.boolean().default(false).describe("Explicit confirmation required for force push or branch deletion on protected branches (main, master, production, etc.).")
147763
- });
148200
+ }).strict();
147764
148201
  var OutputSchema24 = exports_external.object({
147765
148202
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147766
148203
  remote: exports_external.string().describe("Remote name that was pushed to."),
@@ -147863,7 +148300,7 @@ var InputSchema24 = exports_external.object({
147863
148300
  url: exports_external.string().url().optional().describe("Remote URL for add/set-url operations."),
147864
148301
  newName: RemoteNameSchema.optional().describe("New remote name for rename operation."),
147865
148302
  push: exports_external.boolean().default(false).describe("Set push URL separately (for set-url operation).")
147866
- });
148303
+ }).strict();
147867
148304
  var RemoteInfoSchema = exports_external.object({
147868
148305
  name: exports_external.string().describe("Remote name."),
147869
148306
  fetchUrl: exports_external.string().describe("Fetch URL."),
@@ -147946,10 +148383,10 @@ var TOOL_DESCRIPTION25 = "Reset current HEAD to specified state. Can be used to
147946
148383
  var InputSchema25 = exports_external.object({
147947
148384
  path: PathSchema,
147948
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)."),
147949
- 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."),
147950
148387
  paths: exports_external.array(exports_external.string()).optional().describe("Specific file paths to reset (leaves HEAD unchanged)."),
147951
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.).")
147952
- });
148389
+ }).strict();
147953
148390
  var OutputSchema26 = exports_external.object({
147954
148391
  success: exports_external.boolean().describe("Indicates if the operation was successful."),
147955
148392
  mode: exports_external.string().describe("Reset mode that was used."),
@@ -147969,11 +148406,9 @@ async function gitResetLogic(input, { provider, targetPath, appContext }) {
147969
148406
  }
147970
148407
  }
147971
148408
  const resetOptions = {
147972
- mode: input.mode
148409
+ mode: input.mode,
148410
+ commit: input.target
147973
148411
  };
147974
- if (input.target !== undefined) {
147975
- resetOptions.commit = input.target;
147976
- }
147977
148412
  if (input.paths !== undefined) {
147978
148413
  resetOptions.paths = input.paths;
147979
148414
  }
@@ -148034,7 +148469,7 @@ var InputSchema26 = exports_external.object({
148034
148469
  includeUntracked: exports_external.boolean().default(false).describe("Include untracked files in the stash (for push operation)."),
148035
148470
  keepIndex: exports_external.boolean().default(false).describe("Don't revert staged changes (for push operation)."),
148036
148471
  limit: LimitSchema.describe("For list mode: cap the number of stash entries returned (applied at the git command).")
148037
- });
148472
+ }).strict();
148038
148473
  var StashInfoSchema = exports_external.object({
148039
148474
  ref: exports_external.string().describe("Stash reference (e.g., stash@{0})."),
148040
148475
  index: exports_external.number().int().describe("Stash index number."),
@@ -148123,7 +148558,7 @@ var InputSchema27 = exports_external.object({
148123
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.'),
148124
148559
  force: ForceSchema.describe("Overwrite an existing tag (create mode only; has no effect on list or delete)."),
148125
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.")
148126
- });
148561
+ }).strict();
148127
148562
  var TagInfoSchema = exports_external.object({
148128
148563
  name: exports_external.string().describe("Tag name."),
148129
148564
  commit: exports_external.string().describe("Commit hash the tag points to."),
@@ -148250,14 +148685,14 @@ var InputSchema28 = exports_external.object({
148250
148685
  path: PathSchema,
148251
148686
  mode: exports_external.enum(["list", "add", "remove", "move", "prune"]).default("list").describe("The worktree operation to perform."),
148252
148687
  worktreePath: exports_external.string().optional().describe("Path for the new worktree (for add/move operations)."),
148253
- branch: BranchNameSchema.optional().describe("Branch to checkout in the new worktree (for add operation)."),
148254
- 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)."),
148255
148690
  force: exports_external.boolean().default(false).describe("Force operation (for remove operation with uncommitted changes)."),
148256
148691
  newPath: exports_external.string().optional().describe("New path for the worktree (for move operation)."),
148257
148692
  detach: exports_external.boolean().default(false).describe("Create worktree with detached HEAD (for add operation)."),
148258
148693
  verbose: exports_external.boolean().default(false).describe("Provide detailed output for worktree operations."),
148259
148694
  dryRun: exports_external.boolean().default(false).describe("Preview the operation without executing it (for prune operation).")
148260
- });
148695
+ }).strict();
148261
148696
  var WorktreeInfoSchema = exports_external.object({
148262
148697
  path: exports_external.string().describe("Absolute path to the worktree."),
148263
148698
  head: exports_external.string().describe("HEAD commit hash in this worktree."),
@@ -153569,7 +154004,7 @@ function isCloudflareWorkers() {
153569
154004
  var USER_AGENT;
153570
154005
  if (typeof navigator === "undefined" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) {
153571
154006
  const NAME2 = "jose";
153572
- const VERSION = "v6.2.2";
154007
+ const VERSION = "v6.2.3";
153573
154008
  USER_AGENT = `${NAME2}/${VERSION}`;
153574
154009
  }
153575
154010
  var customFetch = Symbol();