@lightsage/mcp 0.4.26 → 0.4.27

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 (56) hide show
  1. package/README.md +2 -2
  2. package/bin/mcp-server.js +521 -145
  3. package/bin/mcp-server.js.map +23 -18
  4. package/esm/funcs/promptsCreate.d.ts +1 -1
  5. package/esm/funcs/promptsCreate.js +1 -1
  6. package/esm/funcs/promptsTagsList.d.ts +15 -0
  7. package/esm/funcs/promptsTagsList.d.ts.map +1 -0
  8. package/esm/funcs/promptsTagsList.js +72 -0
  9. package/esm/funcs/promptsTagsList.js.map +1 -0
  10. package/esm/funcs/promptsUpdate.d.ts +1 -1
  11. package/esm/funcs/promptsUpdate.js +1 -1
  12. package/esm/landing-page.js +1 -1
  13. package/esm/lib/config.d.ts +2 -2
  14. package/esm/lib/config.js +2 -2
  15. package/esm/mcp-server/mcp-server.js +1 -1
  16. package/esm/mcp-server/server.d.ts.map +1 -1
  17. package/esm/mcp-server/server.js +3 -1
  18. package/esm/mcp-server/server.js.map +1 -1
  19. package/esm/mcp-server/tools/promptsCreate.js +1 -1
  20. package/esm/mcp-server/tools/promptsCreate.js.map +1 -1
  21. package/esm/mcp-server/tools/promptsTagsList.d.ts +3 -0
  22. package/esm/mcp-server/tools/promptsTagsList.d.ts.map +1 -0
  23. package/esm/mcp-server/tools/promptsTagsList.js +30 -0
  24. package/esm/mcp-server/tools/promptsTagsList.js.map +1 -0
  25. package/esm/mcp-server/tools/promptsUpdate.js +1 -1
  26. package/esm/mcp-server/tools/promptsUpdate.js.map +1 -1
  27. package/esm/models/createv2promptrequest.d.ts +1 -0
  28. package/esm/models/createv2promptrequest.d.ts.map +1 -1
  29. package/esm/models/createv2promptrequest.js +1 -0
  30. package/esm/models/createv2promptrequest.js.map +1 -1
  31. package/esm/models/updatev2promptrequest.d.ts +1 -0
  32. package/esm/models/updatev2promptrequest.d.ts.map +1 -1
  33. package/esm/models/updatev2promptrequest.js +1 -0
  34. package/esm/models/updatev2promptrequest.js.map +1 -1
  35. package/esm/models/v2prompttagsresponse.d.ts +8 -0
  36. package/esm/models/v2prompttagsresponse.d.ts.map +1 -0
  37. package/esm/models/v2prompttagsresponse.js +12 -0
  38. package/esm/models/v2prompttagsresponse.js.map +1 -0
  39. package/esm/tool-names.d.ts.map +1 -1
  40. package/esm/tool-names.js +6 -2
  41. package/esm/tool-names.js.map +1 -1
  42. package/package.json +1 -1
  43. package/src/funcs/promptsCreate.ts +1 -1
  44. package/src/funcs/promptsTagsList.ts +124 -0
  45. package/src/funcs/promptsUpdate.ts +1 -1
  46. package/src/landing-page.ts +1 -1
  47. package/src/lib/config.ts +2 -2
  48. package/src/mcp-server/mcp-server.ts +1 -1
  49. package/src/mcp-server/server.ts +3 -1
  50. package/src/mcp-server/tools/promptsCreate.ts +1 -1
  51. package/src/mcp-server/tools/promptsTagsList.ts +36 -0
  52. package/src/mcp-server/tools/promptsUpdate.ts +1 -1
  53. package/src/models/createv2promptrequest.ts +4 -0
  54. package/src/models/updatev2promptrequest.ts +4 -0
  55. package/src/models/v2prompttagsresponse.ts +21 -0
  56. package/src/tool-names.ts +6 -2
package/bin/mcp-server.js CHANGED
@@ -6659,8 +6659,8 @@ var RequestError, nonJoinedHeaders, validHeaderName, isHttpWhitespace = (code) =
6659
6659
  result = newBodyUnusableError();
6660
6660
  else {
6661
6661
  const bodyChunks = chunks ?? [];
6662
- const chunk = incoming.read();
6663
- if (chunk !== null)
6662
+ let chunk;
6663
+ while ((chunk = incoming.read()) !== null)
6664
6664
  bodyChunks.push(toBufferChunk(chunk, incoming.readableEncoding));
6665
6665
  const buffer = bodyChunks.length === 1 ? bodyChunks[0] : Buffer.concat(bodyChunks);
6666
6666
  result = buffer;
@@ -7409,7 +7409,12 @@ var init_dist = __esm(() => {
7409
7409
  reDotSegment = /\/\.\.?(?:[/?#]|$)/;
7410
7410
  reValidHost = /^[a-z0-9._-]+(?::(?:[1-5]\d{3,4}|[6-9]\d{3}))?$/;
7411
7411
  GlobalRequest = global.Request;
7412
- Request$1 = class extends GlobalRequest {
7412
+ Request$1 = class Request$1 extends GlobalRequest {
7413
+ static [Symbol.hasInstance](instance) {
7414
+ if (this === Request$1)
7415
+ return instance instanceof GlobalRequest || Function.prototype[Symbol.hasInstance].call(this, instance);
7416
+ return Function.prototype[Symbol.hasInstance].call(this, instance);
7417
+ }
7413
7418
  constructor(input, options) {
7414
7419
  if (typeof input === "object" && getRequestCache in input) {
7415
7420
  const hasReplacementBody = options !== undefined && "body" in options && options.body != null;
@@ -7556,6 +7561,9 @@ var init_dist = __esm(() => {
7556
7561
  return new Response(buf, init).blob();
7557
7562
  });
7558
7563
  } });
7564
+ Object.defineProperty(requestPrototype, "bytes", { value: function() {
7565
+ return this.arrayBuffer().then((buf) => new Uint8Array(buf));
7566
+ } });
7559
7567
  Object.defineProperty(requestPrototype, "json", { value: function() {
7560
7568
  if (this[bodyConsumedDirectlyKey])
7561
7569
  return rejectBodyUnusable();
@@ -7580,6 +7588,11 @@ var init_dist = __esm(() => {
7580
7588
  Response$1 = class Response$1 {
7581
7589
  #body;
7582
7590
  #init;
7591
+ static [Symbol.hasInstance](instance) {
7592
+ if (this === Response$1)
7593
+ return instance instanceof GlobalResponse || Function.prototype[Symbol.hasInstance].call(this, instance);
7594
+ return Function.prototype[Symbol.hasInstance].call(this, instance);
7595
+ }
7583
7596
  [getResponseCache]() {
7584
7597
  const cache = this[cacheKey];
7585
7598
  const liveHeaders = cache && cache[2] instanceof Headers ? cache[2] : undefined;
@@ -7600,7 +7613,7 @@ var init_dist = __esm(() => {
7600
7613
  this[getResponseCache]();
7601
7614
  return;
7602
7615
  }
7603
- this.#init = init instanceof Response$1 ? init.#init : init;
7616
+ this.#init = #init in init ? init.#init : init;
7604
7617
  headers = new Headers(init.headers);
7605
7618
  } else
7606
7619
  this.#init = init;
@@ -7644,6 +7657,7 @@ var init_dist = __esm(() => {
7644
7657
  [
7645
7658
  "arrayBuffer",
7646
7659
  "blob",
7660
+ "bytes",
7647
7661
  "clone",
7648
7662
  "formData",
7649
7663
  "json",
@@ -29790,6 +29804,42 @@ var require_is_promise = __commonJS(function(exports, module) {
29790
29804
  }
29791
29805
  });
29792
29806
 
29807
+ // node_modules/router/lib/param.js
29808
+ var require_param = __commonJS(function(exports, module) {
29809
+ /*!
29810
+ * router
29811
+ * MIT Licensed
29812
+ */
29813
+ var isPromise = require_is_promise();
29814
+ var deprecate = require_depd()("router");
29815
+ module.exports = callParam;
29816
+ function callParam(fn, req, res, next, value, name, onSettle) {
29817
+ try {
29818
+ const ret = fn(req, res, next, value, name);
29819
+ if (isPromise(ret)) {
29820
+ if (!(ret instanceof Promise)) {
29821
+ deprecate("parameters that are Promise-like are deprecated, use a native Promise instead");
29822
+ }
29823
+ try {
29824
+ ret.then(onSettle || noop, function(err) {
29825
+ rejected(err || new Error("Rejected promise"));
29826
+ });
29827
+ } catch (err) {
29828
+ rejected(err);
29829
+ }
29830
+ }
29831
+ } catch (err) {
29832
+ next(err);
29833
+ }
29834
+ function rejected(err) {
29835
+ next(err);
29836
+ if (onSettle)
29837
+ onSettle(err, true);
29838
+ }
29839
+ }
29840
+ function noop() {}
29841
+ });
29842
+
29793
29843
  // node_modules/path-to-regexp/dist/index.js
29794
29844
  var require_dist4 = __commonJS(function(exports) {
29795
29845
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -30158,6 +30208,140 @@ var require_dist4 = __commonJS(function(exports) {
30158
30208
  }
30159
30209
  });
30160
30210
 
30211
+ // node_modules/router/lib/symbols.js
30212
+ var require_symbols = __commonJS(function(exports) {
30213
+ exports.matchedRoute = Symbol("router.tracing.matchedRoute");
30214
+ });
30215
+
30216
+ // node_modules/router/lib/tracing.js
30217
+ var require_tracing = __commonJS(function(exports) {
30218
+ /*!
30219
+ * router
30220
+ * MIT Licensed
30221
+ */
30222
+ var dc = __require("node:diagnostics_channel");
30223
+ var isPromise = require_is_promise();
30224
+ var callParam = require_param();
30225
+ var requestChannel = dc.tracingChannel && dc.tracingChannel("express.router.request");
30226
+ var seenErrors = Symbol.for("router.tracing.publishedErrors");
30227
+ exports.publishEnd = publishEnd;
30228
+ exports.recordError = recordError;
30229
+ exports.recordThrown = recordThrown;
30230
+ exports.requestChannel = requestChannel;
30231
+ exports.shouldTrace = shouldTrace;
30232
+ exports.traceAsyncEnd = traceAsyncEnd;
30233
+ exports.traceParam = traceParam;
30234
+ exports.wrapNext = wrapNext;
30235
+ function shouldTrace(ch) {
30236
+ return Boolean(ch) && (ch.start.hasSubscribers || ch.end.hasSubscribers || ch.asyncStart.hasSubscribers || ch.asyncEnd.hasSubscribers || ch.error.hasSubscribers);
30237
+ }
30238
+ function recordError(req, err) {
30239
+ if (!err || isRoutingSignal(err))
30240
+ return false;
30241
+ let seen = req[seenErrors];
30242
+ if (!seen) {
30243
+ seen = req[seenErrors] = new Set;
30244
+ } else if (seen.has(err)) {
30245
+ return false;
30246
+ }
30247
+ seen.add(err);
30248
+ return true;
30249
+ }
30250
+ function isRoutingSignal(err) {
30251
+ return err === "route" || err === "router";
30252
+ }
30253
+ function recordThrown(ctx, err, sync) {
30254
+ if (isRoutingSignal(err)) {
30255
+ if (sync)
30256
+ ctx.result = undefined;
30257
+ return;
30258
+ }
30259
+ if (!("error" in ctx))
30260
+ ctx.error = err;
30261
+ }
30262
+ function forgetError(req, err) {
30263
+ const seen = req[seenErrors];
30264
+ if (seen)
30265
+ seen.delete(err);
30266
+ }
30267
+ function wrapNext(ctx, next) {
30268
+ if (ctx.errorHandler)
30269
+ recordError(ctx.req, ctx.incomingError);
30270
+ return function wrappedNext(err) {
30271
+ if (ctx.errorHandler && err !== ctx.incomingError)
30272
+ forgetError(ctx.req, ctx.incomingError);
30273
+ if (err && recordError(ctx.req, err)) {
30274
+ ctx.error = err;
30275
+ requestChannel.error.publish(ctx);
30276
+ }
30277
+ next(err);
30278
+ };
30279
+ }
30280
+ function publishEnd(ctx, async) {
30281
+ if (!async || !("error" in ctx))
30282
+ return requestChannel.end.publish(ctx);
30283
+ const error = ctx.error;
30284
+ delete ctx.error;
30285
+ requestChannel.end.publish(ctx);
30286
+ ctx.error = error;
30287
+ }
30288
+ function traceAsyncEnd(ctx) {
30289
+ requestChannel.asyncStart.runStores(ctx, publishAsyncEnd, null, ctx);
30290
+ }
30291
+ function publishAsyncEnd(ctx) {
30292
+ requestChannel.asyncEnd.publish(ctx);
30293
+ }
30294
+ function traceParam(fn, ctx, next, value, name) {
30295
+ const wrappedNext = wrapNext(ctx, next);
30296
+ let async = false;
30297
+ let ended = false;
30298
+ let settled = false;
30299
+ let early;
30300
+ requestChannel.start.runStores(ctx, function() {
30301
+ try {
30302
+ callParam(invoke, ctx.req, ctx.res, wrappedNext, value, name, settle);
30303
+ } finally {
30304
+ publishEnd(ctx, async);
30305
+ ended = true;
30306
+ if (early)
30307
+ early();
30308
+ }
30309
+ });
30310
+ function invoke(req, res, next, value, name) {
30311
+ let ret;
30312
+ try {
30313
+ ret = fn(req, res, next, value, name);
30314
+ } catch (err) {
30315
+ recordThrown(ctx, err, true);
30316
+ throw err;
30317
+ }
30318
+ async = isPromise(ret);
30319
+ if (!async)
30320
+ ctx.result = ret;
30321
+ return ret;
30322
+ }
30323
+ function settle(value, rejected) {
30324
+ if (settled)
30325
+ return;
30326
+ settled = true;
30327
+ if (!ended) {
30328
+ early = function() {
30329
+ finish(value, rejected);
30330
+ };
30331
+ return;
30332
+ }
30333
+ finish(value, rejected);
30334
+ }
30335
+ function finish(value, rejected) {
30336
+ if (!rejected)
30337
+ ctx.result = value;
30338
+ else
30339
+ recordThrown(ctx, value, false);
30340
+ traceAsyncEnd(ctx);
30341
+ }
30342
+ }
30343
+ });
30344
+
30161
30345
  // node_modules/router/lib/layer.js
30162
30346
  var require_layer = __commonJS(function(exports, module) {
30163
30347
  /*!
@@ -30170,6 +30354,8 @@ var require_layer = __commonJS(function(exports, module) {
30170
30354
  var pathRegexp = require_dist4();
30171
30355
  var debug = require_src()("router:layer");
30172
30356
  var deprecate = require_depd()("router");
30357
+ var { matchedRoute } = require_symbols();
30358
+ var { publishEnd, recordThrown, requestChannel, shouldTrace, traceAsyncEnd, wrapNext } = require_tracing();
30173
30359
  var TRAILING_SLASH_REGEXP = /\/+$/;
30174
30360
  var MATCHING_GROUP_REGEXP = /\((?:\?<(.*?)>)?(?!\?)/g;
30175
30361
  module.exports = Layer;
@@ -30180,10 +30366,8 @@ var require_layer = __commonJS(function(exports, module) {
30180
30366
  debug("new %o", path);
30181
30367
  const opts = options || {};
30182
30368
  this.handle = fn;
30183
- this.keys = [];
30184
30369
  this.name = fn.name || "<anonymous>";
30185
- this.params = undefined;
30186
- this.path = undefined;
30370
+ this.rawPath = Array.isArray(path) ? path.flat(Infinity) : path;
30187
30371
  this.slash = path === "/" && opts.end === false;
30188
30372
  function matcher(_path) {
30189
30373
  if (_path instanceof RegExp) {
@@ -30223,72 +30407,141 @@ var require_layer = __commonJS(function(exports, module) {
30223
30407
  decode: decodeParam
30224
30408
  });
30225
30409
  }
30226
- this.matchers = Array.isArray(path) ? path.map(matcher) : [matcher(path)];
30410
+ this.matchers = Array.isArray(this.rawPath) ? this.rawPath.map(matcher) : [matcher(path)];
30227
30411
  }
30228
30412
  Layer.prototype.handleError = function handleError(error, req, res, next) {
30229
30413
  const fn = this.handle;
30230
30414
  if (fn.length !== 4) {
30231
30415
  return next(error);
30232
30416
  }
30233
- try {
30234
- const ret = fn(error, req, res, next);
30235
- if (isPromise(ret)) {
30236
- if (!(ret instanceof Promise)) {
30237
- deprecate("handlers that are Promise-like are deprecated, use a native Promise instead");
30417
+ if (!shouldTrace(requestChannel)) {
30418
+ try {
30419
+ const ret = handlePromise(fn(error, req, res, next));
30420
+ if (ret) {
30421
+ ret.then(noop, function(error) {
30422
+ next(error || new Error("Rejected promise"));
30423
+ });
30238
30424
  }
30239
- ret.then(null, function(error) {
30240
- next(error || new Error("Rejected promise"));
30241
- });
30425
+ } catch (err) {
30426
+ next(err);
30242
30427
  }
30243
- } catch (err) {
30244
- next(err);
30428
+ return;
30245
30429
  }
30430
+ invokeWithTrace(function(wrappedNext) {
30431
+ return fn(error, req, res, wrappedNext);
30432
+ }, {
30433
+ req,
30434
+ res,
30435
+ incomingError: error,
30436
+ layer: this,
30437
+ handler: fn,
30438
+ route: req[matchedRoute],
30439
+ errorHandler: true
30440
+ }, next);
30246
30441
  };
30247
30442
  Layer.prototype.handleRequest = function handleRequest(req, res, next) {
30248
30443
  const fn = this.handle;
30249
30444
  if (fn.length > 3) {
30250
30445
  return next();
30251
30446
  }
30252
- try {
30253
- const ret = fn(req, res, next);
30254
- if (isPromise(ret)) {
30255
- if (!(ret instanceof Promise)) {
30256
- deprecate("handlers that are Promise-like are deprecated, use a native Promise instead");
30447
+ if (this.route || !shouldTrace(requestChannel)) {
30448
+ try {
30449
+ const ret = handlePromise(fn(req, res, next));
30450
+ if (ret) {
30451
+ ret.then(noop, function(error) {
30452
+ next(error || new Error("Rejected promise"));
30453
+ });
30257
30454
  }
30258
- ret.then(null, function(error) {
30259
- next(error || new Error("Rejected promise"));
30455
+ } catch (err) {
30456
+ next(err);
30457
+ }
30458
+ return;
30459
+ }
30460
+ invokeWithTrace(function(wrappedNext) {
30461
+ return fn(req, res, wrappedNext);
30462
+ }, {
30463
+ req,
30464
+ res,
30465
+ layer: this,
30466
+ handler: fn,
30467
+ route: req[matchedRoute]
30468
+ }, next);
30469
+ };
30470
+ function invokeWithTrace(exec, ctx, next) {
30471
+ const wrappedNext = wrapNext(ctx, next);
30472
+ let settled = false;
30473
+ requestChannel.start.runStores(ctx, function() {
30474
+ let out;
30475
+ try {
30476
+ const ret = exec(wrappedNext);
30477
+ out = handlePromise(ret);
30478
+ if (!out)
30479
+ ctx.result = ret;
30480
+ } catch (err) {
30481
+ wrappedNext(err);
30482
+ recordThrown(ctx, err, true);
30483
+ publishEnd(ctx, false);
30484
+ return;
30485
+ }
30486
+ publishEnd(ctx, Boolean(out));
30487
+ if (!out)
30488
+ return;
30489
+ try {
30490
+ out.then(function(value) {
30491
+ if (settled)
30492
+ return;
30493
+ settled = true;
30494
+ ctx.result = value;
30495
+ traceAsyncEnd(ctx);
30496
+ }, function(err) {
30497
+ rejected(err || new Error("Rejected promise"));
30260
30498
  });
30499
+ } catch (err) {
30500
+ rejected(err);
30261
30501
  }
30262
- } catch (err) {
30263
- next(err);
30502
+ });
30503
+ function rejected(err) {
30504
+ wrappedNext(err);
30505
+ if (settled)
30506
+ return;
30507
+ settled = true;
30508
+ recordThrown(ctx, err, false);
30509
+ traceAsyncEnd(ctx);
30264
30510
  }
30265
- };
30511
+ }
30512
+ function noop() {}
30513
+ function handlePromise(ret) {
30514
+ if (isPromise(ret)) {
30515
+ if (!(ret instanceof Promise)) {
30516
+ deprecate("handlers that are Promise-like are deprecated, use a native Promise instead");
30517
+ }
30518
+ return ret;
30519
+ }
30520
+ }
30266
30521
  Layer.prototype.match = function match(path) {
30267
30522
  let match;
30523
+ let i = 0;
30268
30524
  if (path != null) {
30269
30525
  if (this.slash) {
30270
- this.params = {};
30271
- this.path = "";
30272
- return true;
30526
+ return { params: {}, path: "", keys: [], pattern: this.rawPath };
30273
30527
  }
30274
- let i = 0;
30275
30528
  while (!match && i < this.matchers.length) {
30276
30529
  match = this.matchers[i](path);
30277
30530
  i++;
30278
30531
  }
30279
30532
  }
30280
30533
  if (!match) {
30281
- this.params = undefined;
30282
- this.path = undefined;
30283
30534
  return false;
30284
30535
  }
30285
- this.params = match.params;
30286
- this.path = match.path;
30287
- this.keys = Object.keys(match.params);
30288
- return true;
30536
+ return {
30537
+ params: match.params,
30538
+ path: match.path,
30539
+ keys: Object.keys(match.params),
30540
+ pattern: Array.isArray(this.rawPath) ? this.rawPath[i - 1] : this.rawPath
30541
+ };
30289
30542
  };
30290
30543
  function decodeParam(val) {
30291
- if (typeof val !== "string" || val.length === 0) {
30544
+ if (typeof val !== "string" || val.length === 0 || val.indexOf("%") === -1) {
30292
30545
  return val;
30293
30546
  }
30294
30547
  try {
@@ -30296,7 +30549,7 @@ var require_layer = __commonJS(function(exports, module) {
30296
30549
  } catch (err) {
30297
30550
  if (err instanceof URIError) {
30298
30551
  err.message = "Failed to decode param '" + val + "'";
30299
- err.status = 400;
30552
+ err.status = err.statusCode = 400;
30300
30553
  }
30301
30554
  throw err;
30302
30555
  }
@@ -30342,13 +30595,19 @@ var require_route = __commonJS(function(exports, module) {
30342
30595
  }
30343
30596
  return Boolean(this.methods[name]);
30344
30597
  };
30345
- Route.prototype._methods = function _methods() {
30346
- const methods = Object.keys(this.methods);
30347
- if (this.methods.get && !this.methods.head) {
30348
- methods.push("head");
30598
+ Route.prototype._methods = function _methods(includeAll) {
30599
+ const methods = [];
30600
+ for (const method of Object.keys(this.methods)) {
30601
+ if (method === "_all") {
30602
+ if (includeAll) {
30603
+ methods.push("*");
30604
+ }
30605
+ } else {
30606
+ methods.push(method.toUpperCase());
30607
+ }
30349
30608
  }
30350
- for (let i = 0;i < methods.length; i++) {
30351
- methods[i] = methods[i].toUpperCase();
30609
+ if (this.methods.get && !this.methods.head) {
30610
+ methods.push("HEAD");
30352
30611
  }
30353
30612
  return methods;
30354
30613
  };
@@ -30442,13 +30701,14 @@ var require_router = __commonJS(function(exports, module) {
30442
30701
  * Copyright(c) 2014-2022 Douglas Christopher Wilson
30443
30702
  * MIT Licensed
30444
30703
  */
30445
- var isPromise = require_is_promise();
30704
+ var callParam = require_param();
30446
30705
  var Layer = require_layer();
30706
+ var { matchedRoute } = require_symbols();
30707
+ var { recordError, requestChannel, shouldTrace, traceParam } = require_tracing();
30447
30708
  var { METHODS } = __require("node:http");
30448
30709
  var parseUrl = require_parseurl();
30449
30710
  var Route = require_route();
30450
30711
  var debug = require_src()("router");
30451
- var deprecate = require_depd()("router");
30452
30712
  var slice = Array.prototype.slice;
30453
30713
  var flatten = Array.prototype.flat;
30454
30714
  var methods = METHODS.map((method) => method.toLowerCase());
@@ -30507,7 +30767,7 @@ var require_router = __commonJS(function(exports, module) {
30507
30767
  const stack = this.stack;
30508
30768
  const parentParams = req.params;
30509
30769
  const parentUrl = req.baseUrl || "";
30510
- let done = restore(callback, req, "baseUrl", "next", "params");
30770
+ let done = restore(callback, req, "baseUrl", "next", "params", matchedRoute);
30511
30771
  req.next = next;
30512
30772
  if (req.method === "OPTIONS") {
30513
30773
  methods = [];
@@ -30517,9 +30777,14 @@ var require_router = __commonJS(function(exports, module) {
30517
30777
  req.originalUrl = req.originalUrl || req.url;
30518
30778
  next();
30519
30779
  function next(err) {
30780
+ if (err)
30781
+ recordError(req, err);
30520
30782
  let layerError = err === "route" ? null : err;
30521
30783
  if (slashAdded) {
30522
- req.url = req.url.slice(1);
30784
+ const pathIsRoot = req.url === "/" || req.url.startsWith("/?");
30785
+ if (pathIsRoot || removed.endsWith("/") && req.url[0] === "/") {
30786
+ req.url = req.url.slice(1);
30787
+ }
30523
30788
  slashAdded = false;
30524
30789
  }
30525
30790
  if (removed.length !== 0) {
@@ -30545,14 +30810,17 @@ var require_router = __commonJS(function(exports, module) {
30545
30810
  let layer;
30546
30811
  let match;
30547
30812
  let route;
30548
- while (match !== true && idx < stack.length) {
30813
+ while (!match && idx < stack.length) {
30549
30814
  layer = stack[idx++];
30550
- match = matchLayer(layer, path);
30551
30815
  route = layer.route;
30552
- if (typeof match !== "boolean") {
30553
- layerError = layerError || match;
30816
+ try {
30817
+ match = layer.match(path);
30818
+ } catch (err) {
30819
+ recordError(req, err);
30820
+ layerError = layerError || err;
30821
+ match = false;
30554
30822
  }
30555
- if (match !== true) {
30823
+ if (!match) {
30556
30824
  continue;
30557
30825
  }
30558
30826
  if (!route) {
@@ -30571,21 +30839,21 @@ var require_router = __commonJS(function(exports, module) {
30571
30839
  match = false;
30572
30840
  }
30573
30841
  }
30574
- if (match !== true) {
30842
+ if (!match) {
30575
30843
  return done(layerError);
30576
30844
  }
30577
30845
  if (route) {
30578
30846
  req.route = route;
30579
30847
  }
30580
- req.params = self.mergeParams ? mergeParams(layer.params, parentParams) : layer.params;
30581
- const layerPath = layer.path;
30582
- processParams(self.params, layer, paramcalled, req, res, function(err) {
30848
+ req[matchedRoute] = match.pattern;
30849
+ req.params = self.mergeParams ? mergeParams(match.params, parentParams) : match.params;
30850
+ processParams(self.params, layer, match.keys, paramcalled, req, res, function(err) {
30583
30851
  if (err) {
30584
30852
  next(layerError || err);
30585
30853
  } else if (route) {
30586
30854
  layer.handleRequest(req, res, next);
30587
30855
  } else {
30588
- trimPrefix(layer, layerError, layerPath, path);
30856
+ trimPrefix(layer, layerError, match.path, path);
30589
30857
  }
30590
30858
  sync = 0;
30591
30859
  });
@@ -30665,6 +30933,25 @@ var require_router = __commonJS(function(exports, module) {
30665
30933
  this.stack.push(layer);
30666
30934
  return route;
30667
30935
  };
30936
+ Router.prototype.listRoutes = function listRoutes() {
30937
+ const routes = [];
30938
+ for (const layer of this.stack) {
30939
+ const route = layer.route;
30940
+ const router = !route && Array.isArray(layer.handle.stack) ? layer.handle : undefined;
30941
+ if (!route && !router) {
30942
+ continue;
30943
+ }
30944
+ const methods = route ? route._methods(true) : undefined;
30945
+ if (Array.isArray(layer.rawPath)) {
30946
+ for (const path of layer.rawPath) {
30947
+ routes.push({ path, methods: methods && methods.slice(), router });
30948
+ }
30949
+ } else {
30950
+ routes.push({ path: layer.rawPath, methods, router });
30951
+ }
30952
+ }
30953
+ return routes;
30954
+ };
30668
30955
  methods.concat("all").forEach(function(method) {
30669
30956
  Router.prototype[method] = function(path) {
30670
30957
  const route = this.route(path);
@@ -30696,13 +30983,6 @@ var require_router = __commonJS(function(exports, module) {
30696
30983
  const fqdnIndex = url.substring(0, pathLength).indexOf("://");
30697
30984
  return fqdnIndex !== -1 ? url.substring(0, url.indexOf("/", 3 + fqdnIndex)) : undefined;
30698
30985
  }
30699
- function matchLayer(layer, path) {
30700
- try {
30701
- return layer.match(path);
30702
- } catch (err) {
30703
- return err;
30704
- }
30705
- }
30706
30986
  function mergeParams(params, parent) {
30707
30987
  if (typeof parent !== "object" || !parent) {
30708
30988
  return params;
@@ -30727,8 +31007,7 @@ var require_router = __commonJS(function(exports, module) {
30727
31007
  }
30728
31008
  return Object.assign(obj, params);
30729
31009
  }
30730
- function processParams(params, layer, called, req, res, done) {
30731
- const keys = layer.keys;
31010
+ function processParams(params, layer, keys, called, req, res, done) {
30732
31011
  if (!keys || keys.length === 0) {
30733
31012
  return done();
30734
31013
  }
@@ -30774,19 +31053,18 @@ var require_router = __commonJS(function(exports, module) {
30774
31053
  }
30775
31054
  if (!fn)
30776
31055
  return param();
30777
- try {
30778
- const ret = fn(req, res, paramCallback, paramVal, key);
30779
- if (isPromise(ret)) {
30780
- if (!(ret instanceof Promise)) {
30781
- deprecate("parameters that are Promise-like are deprecated, use a native Promise instead");
30782
- }
30783
- ret.then(null, function(error) {
30784
- paramCallback(error || new Error("Rejected promise"));
30785
- });
30786
- }
30787
- } catch (e) {
30788
- paramCallback(e);
31056
+ if (shouldTrace(requestChannel)) {
31057
+ traceParam(fn, {
31058
+ req,
31059
+ res,
31060
+ layer,
31061
+ handler: fn,
31062
+ route: req[matchedRoute],
31063
+ param: key
31064
+ }, paramCallback, paramVal, key);
31065
+ return;
30789
31066
  }
31067
+ callParam(fn, req, res, paramCallback, paramVal, key);
30790
31068
  }
30791
31069
  param();
30792
31070
  }
@@ -54493,9 +54771,9 @@ var init_config = __esm(() => {
54493
54771
  SDK_METADATA = {
54494
54772
  language: "typescript",
54495
54773
  openapiDocVersion: "1.0.0",
54496
- sdkVersion: "0.4.26",
54774
+ sdkVersion: "0.4.27",
54497
54775
  genVersion: "2.948.4",
54498
- userAgent: "speakeasy-sdk/mcp-typescript 0.4.26 2.948.4 1.0.0 @lightsage/mcp"
54776
+ userAgent: "speakeasy-sdk/mcp-typescript 0.4.27 2.948.4 1.0.0 @lightsage/mcp"
54499
54777
  };
54500
54778
  });
54501
54779
 
@@ -62484,6 +62762,7 @@ var init_createv2promptrequest = __esm(() => {
62484
62762
  CreateV2PromptRequest$zodSchema = object({
62485
62763
  platform_ids: array(string2()).optional().describe("Platform IDs, as returned in `platforms` on `GET /v2/prompts`. Omit to attach none. To choose which coding-agent models a run uses, pass `agent` to `POST /v2/prompts/runs`."),
62486
62764
  run_settings: V2PromptRunSettingsInput$zodSchema.nullable().optional().describe("Run settings that apply to coding-agent runs of this prompt. Omitted fields keep their current or default values."),
62765
+ tags: array(string2()).optional().describe("Tag names. A name matches an existing prompt tag of the organization regardless of case; a name with no match creates a new tag. CLI clients may expose this string array as a repeatable `--tag` flag. Omit to create the prompt untagged."),
62487
62766
  text: string2(),
62488
62767
  topic_id: string2().describe("Prompt topic ID from `GET /v2/prompts/topics`.")
62489
62768
  });
@@ -62585,7 +62864,7 @@ var init_promptsCreate2 = __esm(() => {
62585
62864
  name: "prompts-create",
62586
62865
  description: `Create Prompts
62587
62866
 
62588
- Creates prompts in a batch. Each item is validated independently, so the response can contain both created prompts and individual errors.`,
62867
+ Creates prompts in a batch. Each item is validated independently, so the response can contain both created prompts and individual errors. Tag names that match no existing prompt tag create new tags.`,
62589
62868
  annotations: {
62590
62869
  title: "",
62591
62870
  destructiveHint: false,
@@ -63982,6 +64261,98 @@ Individual stored results are available from \`GET /v2/prompts/runs\`.`,
63982
64261
  };
63983
64262
  });
63984
64263
 
64264
+ // src/funcs/promptsTagsList.ts
64265
+ function promptsTagsList(client$, options) {
64266
+ return new APIPromise($do52(client$, options));
64267
+ }
64268
+ async function $do52(client$, options) {
64269
+ const path$ = pathToFunc("/v2/prompts/tags")();
64270
+ const headers$ = new Headers(compactMap({
64271
+ Accept: "application/json"
64272
+ }));
64273
+ const securityInput = await extractSecurity(client$._options.security);
64274
+ const requestSecurity = resolveGlobalSecurity(securityInput);
64275
+ const context = {
64276
+ options: client$._options,
64277
+ baseURL: options?.serverURL ?? client$._baseURL ?? "",
64278
+ operationID: "v2_prompt_tags_list",
64279
+ oAuth2Scopes: null,
64280
+ resolvedSecurity: requestSecurity,
64281
+ securitySource: client$._options.security,
64282
+ retryConfig: options?.retries || client$._options.retryConfig || { strategy: "none" },
64283
+ retryCodes: options?.retryCodes || [
64284
+ "429",
64285
+ "500",
64286
+ "502",
64287
+ "503",
64288
+ "504"
64289
+ ]
64290
+ };
64291
+ const requestRes = client$._createRequest(context, {
64292
+ security: requestSecurity,
64293
+ method: "GET",
64294
+ baseURL: options?.serverURL,
64295
+ path: path$,
64296
+ headers: headers$,
64297
+ userAgent: client$._options.userAgent,
64298
+ timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
64299
+ }, options);
64300
+ if (!requestRes.ok) {
64301
+ return [requestRes, { status: "invalid" }];
64302
+ }
64303
+ const req$ = requestRes.value;
64304
+ const doResult = await client$._do(req$, {
64305
+ context,
64306
+ errorCodes: [],
64307
+ retryConfig: context.retryConfig,
64308
+ retryCodes: context.retryCodes
64309
+ });
64310
+ if (!doResult.ok) {
64311
+ return [doResult, { status: "request-error", request: req$ }];
64312
+ }
64313
+ return [doResult, {
64314
+ status: "complete",
64315
+ request: req$,
64316
+ response: doResult.value
64317
+ }];
64318
+ }
64319
+ var init_promptsTagsList = __esm(() => {
64320
+ init_primitives();
64321
+ init_security();
64322
+ init_url();
64323
+ init_async();
64324
+ });
64325
+
64326
+ // src/mcp-server/tools/promptsTagsList.ts
64327
+ var tool$promptsTagsList;
64328
+ var init_promptsTagsList2 = __esm(() => {
64329
+ init_promptsTagsList();
64330
+ init_tools();
64331
+ tool$promptsTagsList = {
64332
+ name: "prompts-tags-list",
64333
+ description: `List Tags
64334
+
64335
+ Returns the organization's prompt tags. Set tags on a prompt by name with \`tags\` on \`POST /v2/prompts\` or \`PATCH /v2/prompts/{prompt_id}\`; a name with no match creates the tag.`,
64336
+ annotations: {
64337
+ title: "",
64338
+ destructiveHint: false,
64339
+ idempotentHint: false,
64340
+ openWorldHint: false,
64341
+ readOnlyHint: true
64342
+ },
64343
+ tool: async (client, ctx) => {
64344
+ const [result] = await promptsTagsList(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
64345
+ if (!result.ok) {
64346
+ return {
64347
+ content: [{ type: "text", text: result.error.message }],
64348
+ isError: true
64349
+ };
64350
+ }
64351
+ return formatResult(result.value);
64352
+ }
64353
+ };
64354
+ });
64355
+
63985
64356
  // src/models/v2prompttarget.ts
63986
64357
  var V2PromptTargetKind$zodSchema, V2PromptTargetFrequency$zodSchema, V2PromptTarget$zodSchema;
63987
64358
  var init_v2prompttarget = __esm(() => {
@@ -64038,9 +64409,9 @@ var init_v2prompttargetslistop = __esm(() => {
64038
64409
 
64039
64410
  // src/funcs/promptsTargetsList.ts
64040
64411
  function promptsTargetsList(client$, request, options) {
64041
- return new APIPromise($do52(client$, request, options));
64412
+ return new APIPromise($do53(client$, request, options));
64042
64413
  }
64043
- async function $do52(client$, request, options) {
64414
+ async function $do53(client$, request, options) {
64044
64415
  const parsed$ = safeParse4(request, (value$) => V2PromptTargetsListRequest$zodSchema.optional().parse(value$), "Input validation failed");
64045
64416
  if (!parsed$.ok) {
64046
64417
  return [parsed$, { status: "invalid" }];
@@ -64186,9 +64557,9 @@ var init_setv2prompttargetsrequest = __esm(() => {
64186
64557
 
64187
64558
  // src/funcs/promptsTargetsSet.ts
64188
64559
  function promptsTargetsSet(client$, request, options) {
64189
- return new APIPromise($do53(client$, request, options));
64560
+ return new APIPromise($do54(client$, request, options));
64190
64561
  }
64191
- async function $do53(client$, request, options) {
64562
+ async function $do54(client$, request, options) {
64192
64563
  const parsed$ = safeParse4(request, (value$) => SetV2PromptTargetsRequest$zodSchema.parse(value$), "Input validation failed");
64193
64564
  if (!parsed$.ok) {
64194
64565
  return [parsed$, { status: "invalid" }];
@@ -64303,9 +64674,9 @@ var init_createprompttopicrequest = __esm(() => {
64303
64674
 
64304
64675
  // src/funcs/promptsTopicsCreate.ts
64305
64676
  function promptsTopicsCreate(client$, request, options) {
64306
- return new APIPromise($do54(client$, request, options));
64677
+ return new APIPromise($do55(client$, request, options));
64307
64678
  }
64308
- async function $do54(client$, request, options) {
64679
+ async function $do55(client$, request, options) {
64309
64680
  const parsed$ = safeParse4(request, (value$) => CreatePromptTopicRequest$zodSchema.parse(value$), "Input validation failed");
64310
64681
  if (!parsed$.ok) {
64311
64682
  return [parsed$, { status: "invalid" }];
@@ -64427,9 +64798,9 @@ var init_v2prompttopicsdeleteop = __esm(() => {
64427
64798
 
64428
64799
  // src/funcs/promptsTopicsDelete.ts
64429
64800
  function promptsTopicsDelete(client$, request, options) {
64430
- return new APIPromise($do55(client$, request, options));
64801
+ return new APIPromise($do56(client$, request, options));
64431
64802
  }
64432
- async function $do55(client$, request, options) {
64803
+ async function $do56(client$, request, options) {
64433
64804
  const parsed$ = safeParse4(request, (value$) => V2PromptTopicsDeleteRequest$zodSchema.parse(value$), "Input validation failed");
64434
64805
  if (!parsed$.ok) {
64435
64806
  return [parsed$, { status: "invalid" }];
@@ -64544,9 +64915,9 @@ Archives a prompt topic. Set \`archive_prompts\` to archive remaining prompts; o
64544
64915
 
64545
64916
  // src/funcs/promptsTopicsList.ts
64546
64917
  function promptsTopicsList(client$, options) {
64547
- return new APIPromise($do56(client$, options));
64918
+ return new APIPromise($do57(client$, options));
64548
64919
  }
64549
- async function $do56(client$, options) {
64920
+ async function $do57(client$, options) {
64550
64921
  const path$ = pathToFunc("/v2/prompts/topics")();
64551
64922
  const headers$ = new Headers(compactMap({
64552
64923
  Accept: "application/json"
@@ -64662,9 +65033,9 @@ var init_v2prompttopicsupdateop = __esm(() => {
64662
65033
 
64663
65034
  // src/funcs/promptsTopicsUpdate.ts
64664
65035
  function promptsTopicsUpdate(client$, request, options) {
64665
- return new APIPromise($do57(client$, request, options));
65036
+ return new APIPromise($do58(client$, request, options));
64666
65037
  }
64667
- async function $do57(client$, request, options) {
65038
+ async function $do58(client$, request, options) {
64668
65039
  const parsed$ = safeParse4(request, (value$) => V2PromptTopicsUpdateRequest$zodSchema.parse(value$), "Input validation failed");
64669
65040
  if (!parsed$.ok) {
64670
65041
  return [parsed$, { status: "invalid" }];
@@ -64788,6 +65159,7 @@ var init_updatev2promptrequest = __esm(() => {
64788
65159
  platform_ids: array(string2()).nullable().optional().describe("Replacement list of platform IDs, as returned in `platforms` on `GET /v2/prompts`."),
64789
65160
  run_settings: V2PromptRunSettingsInput$zodSchema.nullable().optional().describe("Run settings that apply to coding-agent runs of this prompt. Omitted fields keep their current or default values."),
64790
65161
  status: UpdateV2PromptRequestStatus$zodSchema.optional(),
65162
+ tags: array(string2()).nullable().optional().describe("Tag names. A name matches an existing prompt tag of the organization regardless of case; a name with no match creates a new tag. CLI clients may expose this string array as a repeatable `--tag` flag. Replaces the prompt's tags. Pass an empty array to clear them; omit to keep the current tags."),
64791
65163
  text: string2().optional(),
64792
65164
  topic_id: string2().optional().describe("Prompt topic ID from `GET /v2/prompts/topics`.")
64793
65165
  });
@@ -64812,9 +65184,9 @@ var init_v2promptsupdateop = __esm(() => {
64812
65184
 
64813
65185
  // src/funcs/promptsUpdate.ts
64814
65186
  function promptsUpdate(client$, request, options) {
64815
- return new APIPromise($do58(client$, request, options));
65187
+ return new APIPromise($do59(client$, request, options));
64816
65188
  }
64817
- async function $do58(client$, request, options) {
65189
+ async function $do59(client$, request, options) {
64818
65190
  const parsed$ = safeParse4(request, (value$) => V2PromptsUpdateRequest$zodSchema.parse(value$), "Input validation failed");
64819
65191
  if (!parsed$.ok) {
64820
65192
  return [parsed$, { status: "invalid" }];
@@ -64902,7 +65274,7 @@ var init_promptsUpdate2 = __esm(() => {
64902
65274
  name: "prompts-update",
64903
65275
  description: `Update Prompt
64904
65276
 
64905
- Updates a prompt's text, topic, platforms, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged.`,
65277
+ Updates a prompt's text, topic, platforms, tags, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged; \`tags\` replaces the prompt's tags.`,
64906
65278
  annotations: {
64907
65279
  title: "",
64908
65280
  destructiveHint: false,
@@ -64953,9 +65325,9 @@ var init_createv2repositoryrequest = __esm(() => {
64953
65325
 
64954
65326
  // src/funcs/repositoriesCreate.ts
64955
65327
  function repositoriesCreate(client$, request, options) {
64956
- return new APIPromise($do59(client$, request, options));
65328
+ return new APIPromise($do60(client$, request, options));
64957
65329
  }
64958
- async function $do59(client$, request, options) {
65330
+ async function $do60(client$, request, options) {
64959
65331
  const parsed$ = safeParse4(request, (value$) => CreateV2RepositoryRequest$zodSchema.parse(value$), "Input validation failed");
64960
65332
  if (!parsed$.ok) {
64961
65333
  return [parsed$, { status: "invalid" }];
@@ -65118,9 +65490,9 @@ var init_v2repositoriesdeleteop = __esm(() => {
65118
65490
 
65119
65491
  // src/funcs/repositoriesDelete.ts
65120
65492
  function repositoriesDelete(client$, request, options) {
65121
- return new APIPromise($do60(client$, request, options));
65493
+ return new APIPromise($do61(client$, request, options));
65122
65494
  }
65123
- async function $do60(client$, request, options) {
65495
+ async function $do61(client$, request, options) {
65124
65496
  const parsed$ = safeParse4(request, (value$) => V2RepositoriesDeleteRequest$zodSchema.parse(value$), "Input validation failed");
65125
65497
  if (!parsed$.ok) {
65126
65498
  return [parsed$, { status: "invalid" }];
@@ -65231,9 +65603,9 @@ Permanently deletes a repository workspace and returns its last saved state.`,
65231
65603
 
65232
65604
  // src/funcs/repositoriesList.ts
65233
65605
  function repositoriesList(client$, options) {
65234
- return new APIPromise($do61(client$, options));
65606
+ return new APIPromise($do62(client$, options));
65235
65607
  }
65236
- async function $do61(client$, options) {
65608
+ async function $do62(client$, options) {
65237
65609
  const path$ = pathToFunc("/v2/repositories")();
65238
65610
  const headers$ = new Headers(compactMap({
65239
65611
  Accept: "application/json"
@@ -65338,9 +65710,9 @@ var init_v2repositoriesretrieveop = __esm(() => {
65338
65710
 
65339
65711
  // src/funcs/repositoriesRetrieve.ts
65340
65712
  function repositoriesRetrieve(client$, request, options) {
65341
- return new APIPromise($do62(client$, request, options));
65713
+ return new APIPromise($do63(client$, request, options));
65342
65714
  }
65343
- async function $do62(client$, request, options) {
65715
+ async function $do63(client$, request, options) {
65344
65716
  const parsed$ = safeParse4(request, (value$) => V2RepositoriesRetrieveRequest$zodSchema.parse(value$), "Input validation failed");
65345
65717
  if (!parsed$.ok) {
65346
65718
  return [parsed$, { status: "invalid" }];
@@ -65495,9 +65867,9 @@ var init_v2repositoriesupdateop = __esm(() => {
65495
65867
 
65496
65868
  // src/funcs/repositoriesUpdate.ts
65497
65869
  function repositoriesUpdate(client$, request, options) {
65498
- return new APIPromise($do63(client$, request, options));
65870
+ return new APIPromise($do64(client$, request, options));
65499
65871
  }
65500
- async function $do63(client$, request, options) {
65872
+ async function $do64(client$, request, options) {
65501
65873
  const parsed$ = safeParse4(request, (value$) => V2RepositoriesUpdateRequest$zodSchema.parse(value$), "Input validation failed");
65502
65874
  if (!parsed$.ok) {
65503
65875
  return [parsed$, { status: "invalid" }];
@@ -65609,9 +65981,9 @@ Updates a repository workspace; omitted fields remain unchanged.`,
65609
65981
 
65610
65982
  // src/funcs/siteAuditsList.ts
65611
65983
  function siteAuditsList(client$, options) {
65612
- return new APIPromise($do64(client$, options));
65984
+ return new APIPromise($do65(client$, options));
65613
65985
  }
65614
- async function $do64(client$, options) {
65986
+ async function $do65(client$, options) {
65615
65987
  const path$ = pathToFunc("/v2/site-audits")();
65616
65988
  const headers$ = new Headers(compactMap({
65617
65989
  Accept: "application/json"
@@ -65752,9 +66124,9 @@ var init_v2siteauditsretrieveop = __esm(() => {
65752
66124
 
65753
66125
  // src/funcs/siteAuditsRetrieve.ts
65754
66126
  function siteAuditsRetrieve(client$, request, options) {
65755
- return new APIPromise($do65(client$, request, options));
66127
+ return new APIPromise($do66(client$, request, options));
65756
66128
  }
65757
- async function $do65(client$, request, options) {
66129
+ async function $do66(client$, request, options) {
65758
66130
  const parsed$ = safeParse4(request, (value$) => V2SiteAuditsRetrieveRequest$zodSchema.parse(value$), "Input validation failed");
65759
66131
  if (!parsed$.ok) {
65760
66132
  return [parsed$, { status: "invalid" }];
@@ -65865,9 +66237,9 @@ Returns one audited page with its score, priority, supporting evidence, and reco
65865
66237
 
65866
66238
  // src/funcs/skillsList.ts
65867
66239
  function skillsList(client$, options) {
65868
- return new APIPromise($do66(client$, options));
66240
+ return new APIPromise($do67(client$, options));
65869
66241
  }
65870
- async function $do66(client$, options) {
66242
+ async function $do67(client$, options) {
65871
66243
  const path$ = pathToFunc("/v2/skills")();
65872
66244
  const headers$ = new Headers(compactMap({
65873
66245
  Accept: "application/json"
@@ -65957,9 +66329,9 @@ Returns reusable skills available to workflows and eval configurations.`,
65957
66329
 
65958
66330
  // src/funcs/statusAuthStatusGet.ts
65959
66331
  function statusAuthStatusGet(client$, options) {
65960
- return new APIPromise($do67(client$, options));
66332
+ return new APIPromise($do68(client$, options));
65961
66333
  }
65962
- async function $do67(client$, options) {
66334
+ async function $do68(client$, options) {
65963
66335
  const path$ = pathToFunc("/v2/auth/status")();
65964
66336
  const headers$ = new Headers(compactMap({
65965
66337
  Accept: "application/json"
@@ -66049,9 +66421,9 @@ Validates the API key and returns its organization ID, API key ID, scopes, and a
66049
66421
 
66050
66422
  // src/funcs/statusGet.ts
66051
66423
  function statusGet(client$, options) {
66052
- return new APIPromise($do68(client$, options));
66424
+ return new APIPromise($do69(client$, options));
66053
66425
  }
66054
- async function $do68(client$, options) {
66426
+ async function $do69(client$, options) {
66055
66427
  const path$ = pathToFunc("/v2/status")();
66056
66428
  const headers$ = new Headers(compactMap({
66057
66429
  Accept: "application/json"
@@ -66180,9 +66552,9 @@ var init_createtaskrequest = __esm(() => {
66180
66552
 
66181
66553
  // src/funcs/tasksCreate.ts
66182
66554
  function tasksCreate(client$, request, options) {
66183
- return new APIPromise($do69(client$, request, options));
66555
+ return new APIPromise($do70(client$, request, options));
66184
66556
  }
66185
- async function $do69(client$, request, options) {
66557
+ async function $do70(client$, request, options) {
66186
66558
  const parsed$ = safeParse4(request, (value$) => CreateTaskRequest$zodSchema.parse(value$), "Input validation failed");
66187
66559
  if (!parsed$.ok) {
66188
66560
  return [parsed$, { status: "invalid" }];
@@ -66432,9 +66804,9 @@ var init_v2taskslistop = __esm(() => {
66432
66804
 
66433
66805
  // src/funcs/tasksList.ts
66434
66806
  function tasksList(client$, request, options) {
66435
- return new APIPromise($do70(client$, request, options));
66807
+ return new APIPromise($do71(client$, request, options));
66436
66808
  }
66437
- async function $do70(client$, request, options) {
66809
+ async function $do71(client$, request, options) {
66438
66810
  const parsed$ = safeParse4(request, (value$) => V2TasksListRequest$zodSchema.optional().parse(value$), "Input validation failed");
66439
66811
  if (!parsed$.ok) {
66440
66812
  return [parsed$, { status: "invalid" }];
@@ -66559,9 +66931,9 @@ var init_v2tasksretrieveop = __esm(() => {
66559
66931
 
66560
66932
  // src/funcs/tasksRetrieve.ts
66561
66933
  function tasksRetrieve(client$, request, options) {
66562
- return new APIPromise($do71(client$, request, options));
66934
+ return new APIPromise($do72(client$, request, options));
66563
66935
  }
66564
- async function $do71(client$, request, options) {
66936
+ async function $do72(client$, request, options) {
66565
66937
  const parsed$ = safeParse4(request, (value$) => V2TasksRetrieveRequest$zodSchema.parse(value$), "Input validation failed");
66566
66938
  if (!parsed$.ok) {
66567
66939
  return [parsed$, { status: "invalid" }];
@@ -66719,9 +67091,9 @@ var init_v2tasksupdateop = __esm(() => {
66719
67091
 
66720
67092
  // src/funcs/tasksUpdate.ts
66721
67093
  function tasksUpdate(client$, request, options) {
66722
- return new APIPromise($do72(client$, request, options));
67094
+ return new APIPromise($do73(client$, request, options));
66723
67095
  }
66724
- async function $do72(client$, request, options) {
67096
+ async function $do73(client$, request, options) {
66725
67097
  const parsed$ = safeParse4(request, (value$) => V2TasksUpdateRequest$zodSchema.parse(value$), "Input validation failed");
66726
67098
  if (!parsed$.ok) {
66727
67099
  return [parsed$, { status: "invalid" }];
@@ -67009,9 +67381,9 @@ var init_v2visibilitycitationslistop = __esm(() => {
67009
67381
 
67010
67382
  // src/funcs/visibilityCitationsList.ts
67011
67383
  function visibilityCitationsList(client$, request, options) {
67012
- return new APIPromise($do73(client$, request, options));
67384
+ return new APIPromise($do74(client$, request, options));
67013
67385
  }
67014
- async function $do73(client$, request, options) {
67386
+ async function $do74(client$, request, options) {
67015
67387
  const parsed$ = safeParse4(request, (value$) => V2VisibilityCitationsListRequest$zodSchema.optional().parse(value$), "Input validation failed");
67016
67388
  if (!parsed$.ok) {
67017
67389
  return [parsed$, { status: "invalid" }];
@@ -67234,9 +67606,9 @@ var init_v2visibilitycitationssummaryretrieveop = __esm(() => {
67234
67606
 
67235
67607
  // src/funcs/visibilityCitationsSummaryRetrieve.ts
67236
67608
  function visibilityCitationsSummaryRetrieve(client$, request, options) {
67237
- return new APIPromise($do74(client$, request, options));
67609
+ return new APIPromise($do75(client$, request, options));
67238
67610
  }
67239
- async function $do74(client$, request, options) {
67611
+ async function $do75(client$, request, options) {
67240
67612
  const parsed$ = safeParse4(request, (value$) => V2VisibilityCitationsSummaryRetrieveRequest$zodSchema.optional().parse(value$), "Input validation failed");
67241
67613
  if (!parsed$.ok) {
67242
67614
  return [parsed$, { status: "invalid" }];
@@ -67425,9 +67797,9 @@ var init_v2visibilitycurrentretrieveop = __esm(() => {
67425
67797
 
67426
67798
  // src/funcs/visibilityCurrentRetrieve.ts
67427
67799
  function visibilityCurrentRetrieve(client$, request, options) {
67428
- return new APIPromise($do75(client$, request, options));
67800
+ return new APIPromise($do76(client$, request, options));
67429
67801
  }
67430
- async function $do75(client$, request, options) {
67802
+ async function $do76(client$, request, options) {
67431
67803
  const parsed$ = safeParse4(request, (value$) => V2VisibilityCurrentRetrieveRequest$zodSchema.optional().parse(value$), "Input validation failed");
67432
67804
  if (!parsed$.ok) {
67433
67805
  return [parsed$, { status: "invalid" }];
@@ -67678,9 +68050,9 @@ var init_v2visibilityoverviewretrieveop = __esm(() => {
67678
68050
 
67679
68051
  // src/funcs/visibilityOverviewRetrieve.ts
67680
68052
  function visibilityOverviewRetrieve(client$, request, options) {
67681
- return new APIPromise($do76(client$, request, options));
68053
+ return new APIPromise($do77(client$, request, options));
67682
68054
  }
67683
- async function $do76(client$, request, options) {
68055
+ async function $do77(client$, request, options) {
67684
68056
  const parsed$ = safeParse4(request, (value$) => V2VisibilityOverviewRetrieveRequest$zodSchema.optional().parse(value$), "Input validation failed");
67685
68057
  if (!parsed$.ok) {
67686
68058
  return [parsed$, { status: "invalid" }];
@@ -67897,9 +68269,9 @@ var init_v2visibilitypromptsretrieveop = __esm(() => {
67897
68269
 
67898
68270
  // src/funcs/visibilityPromptsRetrieve.ts
67899
68271
  function visibilityPromptsRetrieve(client$, request, options) {
67900
- return new APIPromise($do77(client$, request, options));
68272
+ return new APIPromise($do78(client$, request, options));
67901
68273
  }
67902
- async function $do77(client$, request, options) {
68274
+ async function $do78(client$, request, options) {
67903
68275
  const parsed$ = safeParse4(request, (value$) => V2VisibilityPromptsRetrieveRequest$zodSchema.optional().parse(value$), "Input validation failed");
67904
68276
  if (!parsed$.ok) {
67905
68277
  return [parsed$, { status: "invalid" }];
@@ -68018,7 +68390,7 @@ function createMCPServer(deps) {
68018
68390
  sizes: ["any"]
68019
68391
  }],
68020
68392
  name: "LightsageMcp",
68021
- version: "0.4.26"
68393
+ version: "0.4.27"
68022
68394
  });
68023
68395
  const getClient = deps.getSDK || (() => new LightsageMcpCore({
68024
68396
  security: deps.security,
@@ -68046,6 +68418,7 @@ function createMCPServer(deps) {
68046
68418
  tool(tool$visibilityCitationsSummaryRetrieve);
68047
68419
  tool(tool$promptsList);
68048
68420
  tool(tool$promptsCreate);
68421
+ tool(tool$promptsTagsList);
68049
68422
  tool(tool$promptsTopicsList);
68050
68423
  tool(tool$promptsTopicsCreate);
68051
68424
  tool(tool$promptsTopicsUpdate);
@@ -68175,6 +68548,7 @@ var init_server3 = __esm(() => {
68175
68548
  init_promptsRunsList2();
68176
68549
  init_promptsRunsRetrieve2();
68177
68550
  init_promptsRunStatus2();
68551
+ init_promptsTagsList2();
68178
68552
  init_promptsTargetsList2();
68179
68553
  init_promptsTargetsSet2();
68180
68554
  init_promptsTopicsCreate2();
@@ -68251,7 +68625,11 @@ Returns per-topic and per-prompt visibility metrics including recommendation sco
68251
68625
  name: "prompts-create",
68252
68626
  description: `Create Prompts
68253
68627
 
68254
- Creates prompts in a batch. Each item is validated independently, so the response can contain both created prompts and individual errors.`
68628
+ Creates prompts in a batch. Each item is validated independently, so the response can contain both created prompts and individual errors. Tag names that match no existing prompt tag create new tags.`
68629
+ },
68630
+ {
68631
+ name: "prompts-tags-list",
68632
+ description: "List Tags\n\nReturns the organization's prompt tags. Set tags on a prompt by name with `tags` on `POST /v2/prompts` or `PATCH /v2/prompts/{prompt_id}`; a name with no match creates the tag."
68255
68633
  },
68256
68634
  {
68257
68635
  name: "prompts-topics-list",
@@ -68303,9 +68681,7 @@ Returns a prompt with its topic, platforms, tags, lifecycle status, and coding-a
68303
68681
  },
68304
68682
  {
68305
68683
  name: "prompts-update",
68306
- description: `Update Prompt
68307
-
68308
- Updates a prompt's text, topic, platforms, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged.`
68684
+ description: "Update Prompt\n\nUpdates a prompt's text, topic, platforms, tags, lifecycle status, or coding-agent run settings. Omitted fields remain unchanged; `tags` replaces the prompt's tags."
68309
68685
  },
68310
68686
  {
68311
68687
  name: "prompts-delete",
@@ -69519,7 +69895,7 @@ http_headers = { "lightsage-api-key-auth" = "YOUR_LIGHTSAGE_API_KEY_AUTH" }`;
69519
69895
  <h1>Instructions</h1>
69520
69896
  <p>One-click installation for Claude Desktop users</p>
69521
69897
  <div class="instruction-item">
69522
- <a href="https://github.com/lightsagehq/mcp/releases/download/v0.4.26/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
69898
+ <a href="https://github.com/lightsagehq/mcp/releases/download/v0.4.27/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
69523
69899
  \uD83D\uDCE5 Download MCP Bundle
69524
69900
  </a>
69525
69901
  </div>
@@ -72419,7 +72795,7 @@ var routes = buildRouteMap({
72419
72795
  var app = buildApplication(routes, {
72420
72796
  name: "mcp",
72421
72797
  versionInfo: {
72422
- currentVersion: "0.4.26"
72798
+ currentVersion: "0.4.27"
72423
72799
  }
72424
72800
  });
72425
72801
  run(app, process3.argv.slice(2), buildContext(process3));
@@ -72427,5 +72803,5 @@ export {
72427
72803
  app
72428
72804
  };
72429
72805
 
72430
- //# debugId=A812670F0A0B790464756E2164756E21
72806
+ //# debugId=B0B36497F126894D64756E2164756E21
72431
72807
  //# sourceMappingURL=mcp-server.js.map