@lightsage/mcp 0.4.25 → 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 (130) hide show
  1. package/README.md +2 -2
  2. package/bin/mcp-server.js +548 -156
  3. package/bin/mcp-server.js.map +37 -32
  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/createevaltemplaterequest.d.ts +2 -2
  28. package/esm/models/createevaltemplaterequest.d.ts.map +1 -1
  29. package/esm/models/createevaltemplaterequest.js +1 -1
  30. package/esm/models/createevaltemplaterequest.js.map +1 -1
  31. package/esm/models/createv2agentpreferenceevalrequest.d.ts +1 -0
  32. package/esm/models/createv2agentpreferenceevalrequest.d.ts.map +1 -1
  33. package/esm/models/createv2agentpreferenceevalrequest.js +1 -0
  34. package/esm/models/createv2agentpreferenceevalrequest.js.map +1 -1
  35. package/esm/models/createv2evalrequest.d.ts +1 -0
  36. package/esm/models/createv2evalrequest.d.ts.map +1 -1
  37. package/esm/models/createv2evalrequest.js +1 -0
  38. package/esm/models/createv2evalrequest.js.map +1 -1
  39. package/esm/models/createv2promptrequest.d.ts +1 -0
  40. package/esm/models/createv2promptrequest.d.ts.map +1 -1
  41. package/esm/models/createv2promptrequest.js +1 -0
  42. package/esm/models/createv2promptrequest.js.map +1 -1
  43. package/esm/models/createv2repositoryrequest.d.ts.map +1 -1
  44. package/esm/models/createv2repositoryrequest.js +1 -1
  45. package/esm/models/createv2repositoryrequest.js.map +1 -1
  46. package/esm/models/evaltemplate.d.ts +2 -2
  47. package/esm/models/evaltemplate.d.ts.map +1 -1
  48. package/esm/models/evaltemplate.js +1 -1
  49. package/esm/models/evaltemplate.js.map +1 -1
  50. package/esm/models/updateevaltemplaterequest.d.ts +2 -2
  51. package/esm/models/updateevaltemplaterequest.d.ts.map +1 -1
  52. package/esm/models/updateevaltemplaterequest.js +1 -1
  53. package/esm/models/updateevaltemplaterequest.js.map +1 -1
  54. package/esm/models/updatev2agentpreferenceevalrequest.d.ts +1 -0
  55. package/esm/models/updatev2agentpreferenceevalrequest.d.ts.map +1 -1
  56. package/esm/models/updatev2agentpreferenceevalrequest.js +1 -0
  57. package/esm/models/updatev2agentpreferenceevalrequest.js.map +1 -1
  58. package/esm/models/updatev2evalrequest.d.ts +1 -0
  59. package/esm/models/updatev2evalrequest.d.ts.map +1 -1
  60. package/esm/models/updatev2evalrequest.js +1 -0
  61. package/esm/models/updatev2evalrequest.js.map +1 -1
  62. package/esm/models/updatev2promptrequest.d.ts +1 -0
  63. package/esm/models/updatev2promptrequest.d.ts.map +1 -1
  64. package/esm/models/updatev2promptrequest.js +1 -0
  65. package/esm/models/updatev2promptrequest.js.map +1 -1
  66. package/esm/models/v2agent.d.ts +2 -0
  67. package/esm/models/v2agent.d.ts.map +1 -1
  68. package/esm/models/v2agent.js +2 -0
  69. package/esm/models/v2agent.js.map +1 -1
  70. package/esm/models/v2agentpreferenceeval.d.ts +1 -0
  71. package/esm/models/v2agentpreferenceeval.d.ts.map +1 -1
  72. package/esm/models/v2agentpreferenceeval.js +1 -0
  73. package/esm/models/v2agentpreferenceeval.js.map +1 -1
  74. package/esm/models/v2eval.d.ts +1 -0
  75. package/esm/models/v2eval.d.ts.map +1 -1
  76. package/esm/models/v2eval.js +1 -0
  77. package/esm/models/v2eval.js.map +1 -1
  78. package/esm/models/v2evalresultsummary.d.ts +1 -0
  79. package/esm/models/v2evalresultsummary.d.ts.map +1 -1
  80. package/esm/models/v2evalresultsummary.js +1 -0
  81. package/esm/models/v2evalresultsummary.js.map +1 -1
  82. package/esm/models/v2promptrundetail.d.ts +1 -0
  83. package/esm/models/v2promptrundetail.d.ts.map +1 -1
  84. package/esm/models/v2promptrundetail.js +3 -2
  85. package/esm/models/v2promptrundetail.js.map +1 -1
  86. package/esm/models/v2promptrunsummary.d.ts +1 -0
  87. package/esm/models/v2promptrunsummary.d.ts.map +1 -1
  88. package/esm/models/v2promptrunsummary.js +3 -2
  89. package/esm/models/v2promptrunsummary.js.map +1 -1
  90. package/esm/models/v2prompttagsresponse.d.ts +8 -0
  91. package/esm/models/v2prompttagsresponse.d.ts.map +1 -0
  92. package/esm/models/v2prompttagsresponse.js +12 -0
  93. package/esm/models/v2prompttagsresponse.js.map +1 -0
  94. package/esm/models/v2repository.d.ts +19 -0
  95. package/esm/models/v2repository.d.ts.map +1 -1
  96. package/esm/models/v2repository.js +15 -0
  97. package/esm/models/v2repository.js.map +1 -1
  98. package/esm/tool-names.d.ts.map +1 -1
  99. package/esm/tool-names.js +6 -2
  100. package/esm/tool-names.js.map +1 -1
  101. package/package.json +1 -1
  102. package/src/funcs/promptsCreate.ts +1 -1
  103. package/src/funcs/promptsTagsList.ts +124 -0
  104. package/src/funcs/promptsUpdate.ts +1 -1
  105. package/src/landing-page.ts +1 -1
  106. package/src/lib/config.ts +2 -2
  107. package/src/mcp-server/mcp-server.ts +1 -1
  108. package/src/mcp-server/server.ts +3 -1
  109. package/src/mcp-server/tools/promptsCreate.ts +1 -1
  110. package/src/mcp-server/tools/promptsTagsList.ts +36 -0
  111. package/src/mcp-server/tools/promptsUpdate.ts +1 -1
  112. package/src/models/createevaltemplaterequest.ts +4 -4
  113. package/src/models/createv2agentpreferenceevalrequest.ts +4 -0
  114. package/src/models/createv2evalrequest.ts +4 -0
  115. package/src/models/createv2promptrequest.ts +4 -0
  116. package/src/models/createv2repositoryrequest.ts +3 -1
  117. package/src/models/evaltemplate.ts +4 -4
  118. package/src/models/updateevaltemplaterequest.ts +4 -2
  119. package/src/models/updatev2agentpreferenceevalrequest.ts +4 -0
  120. package/src/models/updatev2evalrequest.ts +4 -0
  121. package/src/models/updatev2promptrequest.ts +4 -0
  122. package/src/models/v2agent.ts +12 -1
  123. package/src/models/v2agentpreferenceeval.ts +4 -0
  124. package/src/models/v2eval.ts +4 -0
  125. package/src/models/v2evalresultsummary.ts +4 -0
  126. package/src/models/v2promptrundetail.ts +6 -2
  127. package/src/models/v2promptrunsummary.ts +6 -2
  128. package/src/models/v2prompttagsresponse.ts +21 -0
  129. package/src/models/v2repository.ts +29 -0
  130. 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.25",
54774
+ sdkVersion: "0.4.27",
54497
54775
  genVersion: "2.948.4",
54498
- userAgent: "speakeasy-sdk/mcp-typescript 0.4.25 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
 
@@ -57155,6 +57433,7 @@ var init_createv2agentpreferenceevalrequest = __esm(() => {
57155
57433
  name: string2().optional().describe("Display name. Defaults to `<your company> vs <competitor>` when omitted."),
57156
57434
  persona: string2().optional().describe("Optional perspective applied to the whole comparison."),
57157
57435
  prompts: array(string2()).describe("Buying or build questions the agent answers by choosing between your company and the competitor. CLI clients expose this as repeatable `--prompt`."),
57436
+ repository: string2().optional().describe("Repository every run starts from: a saved repository ID or a built-in alias such as `nextjs-starter` from `GET /v2/repositories`. Save a private repository with `POST /v2/repositories` first; it must be shared with your organization's Lightsage GitHub App."),
57158
57437
  runs: int().default(1).describe("Independent attempts for every prompt-agent pair."),
57159
57438
  search_grounding: SearchGroundingMode$zodSchema.optional().describe("Requested web-retrieval behavior for an eval run."),
57160
57439
  tags: array(string2()).optional()
@@ -57296,6 +57575,7 @@ var init_v2agentpreferenceeval = __esm(() => {
57296
57575
  name: string2(),
57297
57576
  persona: string2().nullable().optional(),
57298
57577
  prompts: array(string2()).optional(),
57578
+ repository: string2().nullable().optional().describe("Saved repository ID or built-in alias every run starts from; null for an empty workspace."),
57299
57579
  runs: int().default(1),
57300
57580
  search_grounding: SearchGroundingMode$zodSchema.optional().describe("Requested web-retrieval behavior for an eval run."),
57301
57581
  tags: array(string2()).optional(),
@@ -57842,6 +58122,7 @@ var init_updatev2agentpreferenceevalrequest = __esm(() => {
57842
58122
  name: string2().optional(),
57843
58123
  persona: string2().optional().describe("Set to null to clear the saved persona."),
57844
58124
  prompts: array(string2()).nullable().optional().describe("Buying or build questions the agent answers by choosing between your company and the competitor. CLI clients expose this as repeatable `--prompt`."),
58125
+ repository: string2().optional().describe("Replacement starting repository: a saved repository ID or a built-in alias. Pass null to start from an empty workspace; omit it to keep the saved repository."),
57845
58126
  runs: int().optional(),
57846
58127
  search_grounding: SearchGroundingMode$zodSchema.nullable().optional(),
57847
58128
  tags: array(string2()).nullable().optional()
@@ -59677,6 +59958,7 @@ var init_createv2evalrequest = __esm(() => {
59677
59958
  name: string2(),
59678
59959
  persona: string2().optional().describe("Optional perspective applied to the whole eval. It is stored as metadata and does not change prompts or multiply attempts."),
59679
59960
  prompts: array(string2()).describe("Task prompts. CLI clients expose this as repeatable `--prompt`."),
59961
+ repository: string2().optional().describe("Repository every run starts from: a saved repository ID or a built-in alias such as `nextjs-starter` from `GET /v2/repositories`. Save a private repository with `POST /v2/repositories` first; it must be shared with your organization's Lightsage GitHub App."),
59680
59962
  runs: int().default(1).describe("Independent attempts for every prompt-agent pair."),
59681
59963
  search_grounding: SearchGroundingMode$zodSchema.optional().describe("Requested web-retrieval behavior for an eval run."),
59682
59964
  setup_commands: array(string2()).optional().describe("Shell commands run sequentially in the prepared repository before the agent starts. CLI clients expose repeatable `--setup-command`."),
@@ -59847,6 +60129,7 @@ var init_v2eval = __esm(() => {
59847
60129
  name: string2(),
59848
60130
  persona: string2().nullable().optional(),
59849
60131
  prompts: array(string2()).optional(),
60132
+ repository: string2().nullable().optional().describe("Saved repository ID or built-in alias every run starts from; null for an empty workspace."),
59850
60133
  runs: int().default(1),
59851
60134
  search_grounding: SearchGroundingMode$zodSchema.optional().describe("Requested web-retrieval behavior for an eval run."),
59852
60135
  setup_commands: array(string2()).optional(),
@@ -60076,6 +60359,7 @@ var init_v2evalresultsummary = __esm(() => {
60076
60359
  init_v2setupcommandoutput();
60077
60360
  V2EvalResultSummary$zodSchema = object({
60078
60361
  agent: string2().nullable().optional().describe("Runnable agent combining the harness and model."),
60362
+ agent_version: string2().nullable().optional().describe("Version of the coding agent that ran this attempt, as reported by the agent itself, for example `2.1.293` for Claude Code or `0.154.0` for Codex. Cursor reports its SDK version with the CLI build in brackets. Null for text models, for attempts that did not start an agent, and for attempts before agent versions were recorded."),
60079
60363
  created_at: string2().nullable().optional(),
60080
60364
  environment: PublicEvalRunEnvironment$zodSchema.nullable().optional().describe("The environment this attempt used, without secret values. Null when the attempt had no environment."),
60081
60365
  eval_id: string2().nullable().optional(),
@@ -60864,6 +61148,7 @@ var init_updatev2evalrequest = __esm(() => {
60864
61148
  name: string2().optional(),
60865
61149
  persona: string2().optional().describe("Replacement eval persona. Pass null to clear it; omit it to leave the saved value unchanged."),
60866
61150
  prompts: array(string2()).nullable().optional(),
61151
+ repository: string2().optional().describe("Replacement starting repository: a saved repository ID or a built-in alias. Pass null to start from an empty workspace; omit it to keep the saved repository."),
60867
61152
  runs: int().optional(),
60868
61153
  search_grounding: SearchGroundingMode$zodSchema.nullable().optional().describe("Replacement web-retrieval policy. Omit it to keep the saved value."),
60869
61154
  setup_commands: array(string2()).nullable().optional().describe("Replacement setup commands. Pass an empty array to clear all saved setup commands."),
@@ -61094,6 +61379,7 @@ var init_createevaltemplaterequest = __esm(() => {
61094
61379
  "runtime_commands"
61095
61380
  ]);
61096
61381
  CreateEvalTemplateRequest$zodSchema = object({
61382
+ agent: array(string2()).optional().describe("Runnable agents from `GET /v2/agents`, copied when `targets` is included. CLI clients expose repeatable `--agent`."),
61097
61383
  category_name: string2().optional().describe("Optional category copied when `category` is included."),
61098
61384
  competitor_ids: array(string2()).optional().describe("Competitor IDs that create additional variants when `competitors` is included."),
61099
61385
  description: string2().optional().describe("Optional guidance describing when to use the template."),
@@ -61106,8 +61392,7 @@ var init_createevaltemplaterequest = __esm(() => {
61106
61392
  runs_per_execution: int().default(1).describe("Attempt count copied when `runs` is included."),
61107
61393
  runtime: EvalTemplateRuntime$zodSchema.optional().describe("Reusable runtime resources copied into each created eval."),
61108
61394
  schedule: EvalTemplateSchedule$zodSchema.optional().describe("Schedule copied into every eval created from the template."),
61109
- tag: string2().optional().describe("Optional tag copied when `tag` is included."),
61110
- target_keys: array(string2()).optional().describe("Runnable target keys copied when `targets` is included, such as `agent:codex:gpt-5.6-terra`.")
61395
+ tag: string2().optional().describe("Optional tag copied when `tag` is included.")
61111
61396
  }).describe("Create a reusable eval that can be applied to many brands or prompts.");
61112
61397
  });
61113
61398
 
@@ -61250,6 +61535,7 @@ var init_evaltemplate = __esm(() => {
61250
61535
  "runtime_commands"
61251
61536
  ]);
61252
61537
  EvalTemplate$zodSchema = object({
61538
+ agent: array(string2()).optional().describe("Runnable agents from `GET /v2/agents`, copied when `targets` is included. CLI clients expose repeatable `--agent`."),
61253
61539
  category_name: string2().nullable().optional().describe("Optional category copied when `category` is included."),
61254
61540
  competitor_ids: array(string2()).optional().describe("Competitor IDs that create additional variants when `competitors` is included."),
61255
61541
  created_at: string2(),
@@ -61268,7 +61554,6 @@ var init_evaltemplate = __esm(() => {
61268
61554
  runtime: EvalTemplateRuntime$zodSchema.optional().describe("Reusable runtime resources copied into each created eval."),
61269
61555
  schedule: EvalTemplateSchedule$zodSchema.optional().describe("Schedule copied into every eval created from the template."),
61270
61556
  tag: string2().nullable().optional().describe("Optional tag copied when `tag` is included."),
61271
- target_keys: array(string2()).optional().describe("Runnable target keys copied when `targets` is included, such as `agent:codex:gpt-5.6-terra`."),
61272
61557
  updated_at: string2(),
61273
61558
  version: int()
61274
61559
  });
@@ -61665,6 +61950,7 @@ var init_updateevaltemplaterequest = __esm(() => {
61665
61950
  "runtime_commands"
61666
61951
  ]);
61667
61952
  UpdateEvalTemplateRequest$zodSchema = object({
61953
+ agent: array(string2()).nullable().optional().describe("Replacement agents from `GET /v2/agents`. Omit to leave the saved agents unchanged."),
61668
61954
  category_name: string2().optional(),
61669
61955
  competitor_ids: array(string2()).nullable().optional(),
61670
61956
  description: string2().optional(),
@@ -61678,8 +61964,7 @@ var init_updateevaltemplaterequest = __esm(() => {
61678
61964
  runs_per_execution: int().optional(),
61679
61965
  runtime: EvalTemplateRuntime$zodSchema.nullable().optional(),
61680
61966
  schedule: EvalTemplateSchedule$zodSchema.nullable().optional(),
61681
- tag: string2().optional(),
61682
- target_keys: array(string2()).nullable().optional()
61967
+ tag: string2().optional()
61683
61968
  });
61684
61969
  });
61685
61970
 
@@ -62477,6 +62762,7 @@ var init_createv2promptrequest = __esm(() => {
62477
62762
  CreateV2PromptRequest$zodSchema = object({
62478
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`."),
62479
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."),
62480
62766
  text: string2(),
62481
62767
  topic_id: string2().describe("Prompt topic ID from `GET /v2/prompts/topics`.")
62482
62768
  });
@@ -62578,7 +62864,7 @@ var init_promptsCreate2 = __esm(() => {
62578
62864
  name: "prompts-create",
62579
62865
  description: `Create Prompts
62580
62866
 
62581
- 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.`,
62582
62868
  annotations: {
62583
62869
  title: "",
62584
62870
  destructiveHint: false,
@@ -63454,14 +63740,15 @@ var init_v2promptrunsummary = __esm(() => {
63454
63740
  "coding_agent"
63455
63741
  ]);
63456
63742
  V2PromptRunSummary$zodSchema = object({
63743
+ agent: string2().nullable().optional().describe("The agent from `GET /v2/agents` that ran a coding-agent prompt, such as `claude-code:claude-sonnet-5-5`; null for answer engines."),
63457
63744
  citation_count: int().default(0),
63458
63745
  created_at: string2().nullable().optional(),
63459
63746
  grounding_qualification_reason: string2().nullable().optional(),
63460
63747
  grounding_qualified: boolean2().nullable().optional().describe("Whether the run satisfied the requested web access mode. Null means the default mode was used or isolation could not be proven."),
63461
- harness: string2().nullable().optional().describe("Coding-agent harness for agent runs; otherwise the answer platform identifier."),
63748
+ harness: string2().nullable().optional().describe("Deprecated for coding agents: use `agent`. Coding-agent harness for agent runs; otherwise the answer platform identifier."),
63462
63749
  id: string2(),
63463
63750
  is_brand_mentioned: boolean2().nullable().optional(),
63464
- model_id: string2().nullable().optional().describe("Public model ID. Internal hosting providers are never returned."),
63751
+ model_id: string2().nullable().optional().describe("Deprecated for coding agents: use `agent`. Public model ID. Internal hosting providers are never returned."),
63465
63752
  platform: V2PromptRunPlatform$zodSchema.nullable().optional(),
63466
63753
  prompt: V2PromptRunPrompt$zodSchema.nullable().optional(),
63467
63754
  prompt_id: string2(),
@@ -63680,17 +63967,18 @@ var init_v2promptrundetail = __esm(() => {
63680
63967
  "coding_agent"
63681
63968
  ]);
63682
63969
  V2PromptRunDetail$zodSchema = object({
63970
+ agent: string2().nullable().optional().describe("The agent from `GET /v2/agents` that ran a coding-agent prompt, such as `claude-code:claude-sonnet-5-5`; null for answer engines."),
63683
63971
  citation_count: int().default(0),
63684
63972
  citations: array(V2PromptRunCitation$zodSchema).optional(),
63685
63973
  conversation_turns: array(record(string2(), any())).optional().describe("Sanitized interleaved text and tool-call trace captured for this run. It interleaves the agent's `text` turns with `tool_call` turns, so its length is not a tool-call count; use `tool_calls` or `tool_call_count`."),
63686
63974
  created_at: string2().nullable().optional(),
63687
63975
  grounding_qualification_reason: string2().nullable().optional(),
63688
63976
  grounding_qualified: boolean2().nullable().optional().describe("Whether the run satisfied the requested web access mode. Null means the default mode was used or isolation could not be proven."),
63689
- harness: string2().nullable().optional().describe("Coding-agent harness for agent runs; otherwise the answer platform identifier."),
63977
+ harness: string2().nullable().optional().describe("Deprecated for coding agents: use `agent`. Coding-agent harness for agent runs; otherwise the answer platform identifier."),
63690
63978
  id: string2(),
63691
63979
  is_brand_mentioned: boolean2().nullable().optional(),
63692
63980
  mentions: array(V2PromptRunMention$zodSchema).optional(),
63693
- model_id: string2().nullable().optional().describe("Public model ID. Internal hosting providers are never returned."),
63981
+ model_id: string2().nullable().optional().describe("Deprecated for coding agents: use `agent`. Public model ID. Internal hosting providers are never returned."),
63694
63982
  platform: V2PromptRunPlatform$zodSchema.nullable().optional(),
63695
63983
  prompt: V2PromptRunPrompt$zodSchema.nullable().optional(),
63696
63984
  prompt_id: string2(),
@@ -63973,6 +64261,98 @@ Individual stored results are available from \`GET /v2/prompts/runs\`.`,
63973
64261
  };
63974
64262
  });
63975
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
+
63976
64356
  // src/models/v2prompttarget.ts
63977
64357
  var V2PromptTargetKind$zodSchema, V2PromptTargetFrequency$zodSchema, V2PromptTarget$zodSchema;
63978
64358
  var init_v2prompttarget = __esm(() => {
@@ -64029,9 +64409,9 @@ var init_v2prompttargetslistop = __esm(() => {
64029
64409
 
64030
64410
  // src/funcs/promptsTargetsList.ts
64031
64411
  function promptsTargetsList(client$, request, options) {
64032
- return new APIPromise($do52(client$, request, options));
64412
+ return new APIPromise($do53(client$, request, options));
64033
64413
  }
64034
- async function $do52(client$, request, options) {
64414
+ async function $do53(client$, request, options) {
64035
64415
  const parsed$ = safeParse4(request, (value$) => V2PromptTargetsListRequest$zodSchema.optional().parse(value$), "Input validation failed");
64036
64416
  if (!parsed$.ok) {
64037
64417
  return [parsed$, { status: "invalid" }];
@@ -64177,9 +64557,9 @@ var init_setv2prompttargetsrequest = __esm(() => {
64177
64557
 
64178
64558
  // src/funcs/promptsTargetsSet.ts
64179
64559
  function promptsTargetsSet(client$, request, options) {
64180
- return new APIPromise($do53(client$, request, options));
64560
+ return new APIPromise($do54(client$, request, options));
64181
64561
  }
64182
- async function $do53(client$, request, options) {
64562
+ async function $do54(client$, request, options) {
64183
64563
  const parsed$ = safeParse4(request, (value$) => SetV2PromptTargetsRequest$zodSchema.parse(value$), "Input validation failed");
64184
64564
  if (!parsed$.ok) {
64185
64565
  return [parsed$, { status: "invalid" }];
@@ -64294,9 +64674,9 @@ var init_createprompttopicrequest = __esm(() => {
64294
64674
 
64295
64675
  // src/funcs/promptsTopicsCreate.ts
64296
64676
  function promptsTopicsCreate(client$, request, options) {
64297
- return new APIPromise($do54(client$, request, options));
64677
+ return new APIPromise($do55(client$, request, options));
64298
64678
  }
64299
- async function $do54(client$, request, options) {
64679
+ async function $do55(client$, request, options) {
64300
64680
  const parsed$ = safeParse4(request, (value$) => CreatePromptTopicRequest$zodSchema.parse(value$), "Input validation failed");
64301
64681
  if (!parsed$.ok) {
64302
64682
  return [parsed$, { status: "invalid" }];
@@ -64418,9 +64798,9 @@ var init_v2prompttopicsdeleteop = __esm(() => {
64418
64798
 
64419
64799
  // src/funcs/promptsTopicsDelete.ts
64420
64800
  function promptsTopicsDelete(client$, request, options) {
64421
- return new APIPromise($do55(client$, request, options));
64801
+ return new APIPromise($do56(client$, request, options));
64422
64802
  }
64423
- async function $do55(client$, request, options) {
64803
+ async function $do56(client$, request, options) {
64424
64804
  const parsed$ = safeParse4(request, (value$) => V2PromptTopicsDeleteRequest$zodSchema.parse(value$), "Input validation failed");
64425
64805
  if (!parsed$.ok) {
64426
64806
  return [parsed$, { status: "invalid" }];
@@ -64535,9 +64915,9 @@ Archives a prompt topic. Set \`archive_prompts\` to archive remaining prompts; o
64535
64915
 
64536
64916
  // src/funcs/promptsTopicsList.ts
64537
64917
  function promptsTopicsList(client$, options) {
64538
- return new APIPromise($do56(client$, options));
64918
+ return new APIPromise($do57(client$, options));
64539
64919
  }
64540
- async function $do56(client$, options) {
64920
+ async function $do57(client$, options) {
64541
64921
  const path$ = pathToFunc("/v2/prompts/topics")();
64542
64922
  const headers$ = new Headers(compactMap({
64543
64923
  Accept: "application/json"
@@ -64653,9 +65033,9 @@ var init_v2prompttopicsupdateop = __esm(() => {
64653
65033
 
64654
65034
  // src/funcs/promptsTopicsUpdate.ts
64655
65035
  function promptsTopicsUpdate(client$, request, options) {
64656
- return new APIPromise($do57(client$, request, options));
65036
+ return new APIPromise($do58(client$, request, options));
64657
65037
  }
64658
- async function $do57(client$, request, options) {
65038
+ async function $do58(client$, request, options) {
64659
65039
  const parsed$ = safeParse4(request, (value$) => V2PromptTopicsUpdateRequest$zodSchema.parse(value$), "Input validation failed");
64660
65040
  if (!parsed$.ok) {
64661
65041
  return [parsed$, { status: "invalid" }];
@@ -64779,6 +65159,7 @@ var init_updatev2promptrequest = __esm(() => {
64779
65159
  platform_ids: array(string2()).nullable().optional().describe("Replacement list of platform IDs, as returned in `platforms` on `GET /v2/prompts`."),
64780
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."),
64781
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."),
64782
65163
  text: string2().optional(),
64783
65164
  topic_id: string2().optional().describe("Prompt topic ID from `GET /v2/prompts/topics`.")
64784
65165
  });
@@ -64803,9 +65184,9 @@ var init_v2promptsupdateop = __esm(() => {
64803
65184
 
64804
65185
  // src/funcs/promptsUpdate.ts
64805
65186
  function promptsUpdate(client$, request, options) {
64806
- return new APIPromise($do58(client$, request, options));
65187
+ return new APIPromise($do59(client$, request, options));
64807
65188
  }
64808
- async function $do58(client$, request, options) {
65189
+ async function $do59(client$, request, options) {
64809
65190
  const parsed$ = safeParse4(request, (value$) => V2PromptsUpdateRequest$zodSchema.parse(value$), "Input validation failed");
64810
65191
  if (!parsed$.ok) {
64811
65192
  return [parsed$, { status: "invalid" }];
@@ -64893,7 +65274,7 @@ var init_promptsUpdate2 = __esm(() => {
64893
65274
  name: "prompts-update",
64894
65275
  description: `Update Prompt
64895
65276
 
64896
- 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.`,
64897
65278
  annotations: {
64898
65279
  title: "",
64899
65280
  destructiveHint: false,
@@ -64937,16 +65318,16 @@ var init_createv2repositoryrequest = __esm(() => {
64937
65318
  install_steps: array(string2()).optional(),
64938
65319
  name: string2(),
64939
65320
  ref: string2().default("main").describe("Branch, tag, or commit SHA."),
64940
- repo_url: string2(),
65321
+ repo_url: string2().describe("An https://github.com/<owner>/<repo> URL. A private repository must be shared with your organization's Lightsage GitHub App."),
64941
65322
  subdir: string2().default("").describe("Project root inside the repository.")
64942
65323
  });
64943
65324
  });
64944
65325
 
64945
65326
  // src/funcs/repositoriesCreate.ts
64946
65327
  function repositoriesCreate(client$, request, options) {
64947
- return new APIPromise($do59(client$, request, options));
65328
+ return new APIPromise($do60(client$, request, options));
64948
65329
  }
64949
- async function $do59(client$, request, options) {
65330
+ async function $do60(client$, request, options) {
64950
65331
  const parsed$ = safeParse4(request, (value$) => CreateV2RepositoryRequest$zodSchema.parse(value$), "Input validation failed");
64951
65332
  if (!parsed$.ok) {
64952
65333
  return [parsed$, { status: "invalid" }];
@@ -65051,7 +65432,7 @@ Adds a reusable Git repository workspace for eval configurations.`,
65051
65432
  });
65052
65433
 
65053
65434
  // src/models/v2repository.ts
65054
- var V2RepositoryKind$zodSchema, V2RepositoryFramework$zodSchema, V2Repository$zodSchema;
65435
+ var V2RepositoryKind$zodSchema, V2RepositoryFramework$zodSchema, Access$zodSchema, V2Repository$zodSchema;
65055
65436
  var init_v2repository = __esm(() => {
65056
65437
  init_zod();
65057
65438
  V2RepositoryKind$zodSchema = _enum([
@@ -65070,7 +65451,13 @@ var init_v2repository = __esm(() => {
65070
65451
  "nextjs",
65071
65452
  "custom"
65072
65453
  ]);
65454
+ Access$zodSchema = _enum([
65455
+ "public",
65456
+ "github_app",
65457
+ "lost"
65458
+ ]).describe("How runs clone the repository: `public` without credentials, or `github_app` through your organization's Lightsage GitHub App installation, which is how private repositories are reached. `lost` means it was saved as private but the GitHub App can no longer read it, so runs using it fail until access is restored.");
65073
65459
  V2Repository$zodSchema = object({
65460
+ access: Access$zodSchema.default("public").describe("How runs clone the repository: `public` without credentials, or `github_app` through your organization's Lightsage GitHub App installation, which is how private repositories are reached. `lost` means it was saved as private but the GitHub App can no longer read it, so runs using it fail until access is restored."),
65074
65461
  created_at: string2().nullable().optional(),
65075
65462
  enabled: boolean2(),
65076
65463
  framework: V2RepositoryFramework$zodSchema.default("custom"),
@@ -65078,6 +65465,7 @@ var init_v2repository = __esm(() => {
65078
65465
  install_steps: array(string2()).optional(),
65079
65466
  kind: V2RepositoryKind$zodSchema.describe("Whether the repository is a read-only built-in template or an organization-owned saved repository."),
65080
65467
  name: string2(),
65468
+ private: boolean2().default(false).describe("Whether the repository is private on GitHub."),
65081
65469
  ref: string2(),
65082
65470
  repo_url: string2(),
65083
65471
  subdir: string2().default(""),
@@ -65102,9 +65490,9 @@ var init_v2repositoriesdeleteop = __esm(() => {
65102
65490
 
65103
65491
  // src/funcs/repositoriesDelete.ts
65104
65492
  function repositoriesDelete(client$, request, options) {
65105
- return new APIPromise($do60(client$, request, options));
65493
+ return new APIPromise($do61(client$, request, options));
65106
65494
  }
65107
- async function $do60(client$, request, options) {
65495
+ async function $do61(client$, request, options) {
65108
65496
  const parsed$ = safeParse4(request, (value$) => V2RepositoriesDeleteRequest$zodSchema.parse(value$), "Input validation failed");
65109
65497
  if (!parsed$.ok) {
65110
65498
  return [parsed$, { status: "invalid" }];
@@ -65215,9 +65603,9 @@ Permanently deletes a repository workspace and returns its last saved state.`,
65215
65603
 
65216
65604
  // src/funcs/repositoriesList.ts
65217
65605
  function repositoriesList(client$, options) {
65218
- return new APIPromise($do61(client$, options));
65606
+ return new APIPromise($do62(client$, options));
65219
65607
  }
65220
- async function $do61(client$, options) {
65608
+ async function $do62(client$, options) {
65221
65609
  const path$ = pathToFunc("/v2/repositories")();
65222
65610
  const headers$ = new Headers(compactMap({
65223
65611
  Accept: "application/json"
@@ -65322,9 +65710,9 @@ var init_v2repositoriesretrieveop = __esm(() => {
65322
65710
 
65323
65711
  // src/funcs/repositoriesRetrieve.ts
65324
65712
  function repositoriesRetrieve(client$, request, options) {
65325
- return new APIPromise($do62(client$, request, options));
65713
+ return new APIPromise($do63(client$, request, options));
65326
65714
  }
65327
- async function $do62(client$, request, options) {
65715
+ async function $do63(client$, request, options) {
65328
65716
  const parsed$ = safeParse4(request, (value$) => V2RepositoriesRetrieveRequest$zodSchema.parse(value$), "Input validation failed");
65329
65717
  if (!parsed$.ok) {
65330
65718
  return [parsed$, { status: "invalid" }];
@@ -65479,9 +65867,9 @@ var init_v2repositoriesupdateop = __esm(() => {
65479
65867
 
65480
65868
  // src/funcs/repositoriesUpdate.ts
65481
65869
  function repositoriesUpdate(client$, request, options) {
65482
- return new APIPromise($do63(client$, request, options));
65870
+ return new APIPromise($do64(client$, request, options));
65483
65871
  }
65484
- async function $do63(client$, request, options) {
65872
+ async function $do64(client$, request, options) {
65485
65873
  const parsed$ = safeParse4(request, (value$) => V2RepositoriesUpdateRequest$zodSchema.parse(value$), "Input validation failed");
65486
65874
  if (!parsed$.ok) {
65487
65875
  return [parsed$, { status: "invalid" }];
@@ -65593,9 +65981,9 @@ Updates a repository workspace; omitted fields remain unchanged.`,
65593
65981
 
65594
65982
  // src/funcs/siteAuditsList.ts
65595
65983
  function siteAuditsList(client$, options) {
65596
- return new APIPromise($do64(client$, options));
65984
+ return new APIPromise($do65(client$, options));
65597
65985
  }
65598
- async function $do64(client$, options) {
65986
+ async function $do65(client$, options) {
65599
65987
  const path$ = pathToFunc("/v2/site-audits")();
65600
65988
  const headers$ = new Headers(compactMap({
65601
65989
  Accept: "application/json"
@@ -65736,9 +66124,9 @@ var init_v2siteauditsretrieveop = __esm(() => {
65736
66124
 
65737
66125
  // src/funcs/siteAuditsRetrieve.ts
65738
66126
  function siteAuditsRetrieve(client$, request, options) {
65739
- return new APIPromise($do65(client$, request, options));
66127
+ return new APIPromise($do66(client$, request, options));
65740
66128
  }
65741
- async function $do65(client$, request, options) {
66129
+ async function $do66(client$, request, options) {
65742
66130
  const parsed$ = safeParse4(request, (value$) => V2SiteAuditsRetrieveRequest$zodSchema.parse(value$), "Input validation failed");
65743
66131
  if (!parsed$.ok) {
65744
66132
  return [parsed$, { status: "invalid" }];
@@ -65849,9 +66237,9 @@ Returns one audited page with its score, priority, supporting evidence, and reco
65849
66237
 
65850
66238
  // src/funcs/skillsList.ts
65851
66239
  function skillsList(client$, options) {
65852
- return new APIPromise($do66(client$, options));
66240
+ return new APIPromise($do67(client$, options));
65853
66241
  }
65854
- async function $do66(client$, options) {
66242
+ async function $do67(client$, options) {
65855
66243
  const path$ = pathToFunc("/v2/skills")();
65856
66244
  const headers$ = new Headers(compactMap({
65857
66245
  Accept: "application/json"
@@ -65941,9 +66329,9 @@ Returns reusable skills available to workflows and eval configurations.`,
65941
66329
 
65942
66330
  // src/funcs/statusAuthStatusGet.ts
65943
66331
  function statusAuthStatusGet(client$, options) {
65944
- return new APIPromise($do67(client$, options));
66332
+ return new APIPromise($do68(client$, options));
65945
66333
  }
65946
- async function $do67(client$, options) {
66334
+ async function $do68(client$, options) {
65947
66335
  const path$ = pathToFunc("/v2/auth/status")();
65948
66336
  const headers$ = new Headers(compactMap({
65949
66337
  Accept: "application/json"
@@ -66033,9 +66421,9 @@ Validates the API key and returns its organization ID, API key ID, scopes, and a
66033
66421
 
66034
66422
  // src/funcs/statusGet.ts
66035
66423
  function statusGet(client$, options) {
66036
- return new APIPromise($do68(client$, options));
66424
+ return new APIPromise($do69(client$, options));
66037
66425
  }
66038
- async function $do68(client$, options) {
66426
+ async function $do69(client$, options) {
66039
66427
  const path$ = pathToFunc("/v2/status")();
66040
66428
  const headers$ = new Headers(compactMap({
66041
66429
  Accept: "application/json"
@@ -66164,9 +66552,9 @@ var init_createtaskrequest = __esm(() => {
66164
66552
 
66165
66553
  // src/funcs/tasksCreate.ts
66166
66554
  function tasksCreate(client$, request, options) {
66167
- return new APIPromise($do69(client$, request, options));
66555
+ return new APIPromise($do70(client$, request, options));
66168
66556
  }
66169
- async function $do69(client$, request, options) {
66557
+ async function $do70(client$, request, options) {
66170
66558
  const parsed$ = safeParse4(request, (value$) => CreateTaskRequest$zodSchema.parse(value$), "Input validation failed");
66171
66559
  if (!parsed$.ok) {
66172
66560
  return [parsed$, { status: "invalid" }];
@@ -66416,9 +66804,9 @@ var init_v2taskslistop = __esm(() => {
66416
66804
 
66417
66805
  // src/funcs/tasksList.ts
66418
66806
  function tasksList(client$, request, options) {
66419
- return new APIPromise($do70(client$, request, options));
66807
+ return new APIPromise($do71(client$, request, options));
66420
66808
  }
66421
- async function $do70(client$, request, options) {
66809
+ async function $do71(client$, request, options) {
66422
66810
  const parsed$ = safeParse4(request, (value$) => V2TasksListRequest$zodSchema.optional().parse(value$), "Input validation failed");
66423
66811
  if (!parsed$.ok) {
66424
66812
  return [parsed$, { status: "invalid" }];
@@ -66543,9 +66931,9 @@ var init_v2tasksretrieveop = __esm(() => {
66543
66931
 
66544
66932
  // src/funcs/tasksRetrieve.ts
66545
66933
  function tasksRetrieve(client$, request, options) {
66546
- return new APIPromise($do71(client$, request, options));
66934
+ return new APIPromise($do72(client$, request, options));
66547
66935
  }
66548
- async function $do71(client$, request, options) {
66936
+ async function $do72(client$, request, options) {
66549
66937
  const parsed$ = safeParse4(request, (value$) => V2TasksRetrieveRequest$zodSchema.parse(value$), "Input validation failed");
66550
66938
  if (!parsed$.ok) {
66551
66939
  return [parsed$, { status: "invalid" }];
@@ -66703,9 +67091,9 @@ var init_v2tasksupdateop = __esm(() => {
66703
67091
 
66704
67092
  // src/funcs/tasksUpdate.ts
66705
67093
  function tasksUpdate(client$, request, options) {
66706
- return new APIPromise($do72(client$, request, options));
67094
+ return new APIPromise($do73(client$, request, options));
66707
67095
  }
66708
- async function $do72(client$, request, options) {
67096
+ async function $do73(client$, request, options) {
66709
67097
  const parsed$ = safeParse4(request, (value$) => V2TasksUpdateRequest$zodSchema.parse(value$), "Input validation failed");
66710
67098
  if (!parsed$.ok) {
66711
67099
  return [parsed$, { status: "invalid" }];
@@ -66993,9 +67381,9 @@ var init_v2visibilitycitationslistop = __esm(() => {
66993
67381
 
66994
67382
  // src/funcs/visibilityCitationsList.ts
66995
67383
  function visibilityCitationsList(client$, request, options) {
66996
- return new APIPromise($do73(client$, request, options));
67384
+ return new APIPromise($do74(client$, request, options));
66997
67385
  }
66998
- async function $do73(client$, request, options) {
67386
+ async function $do74(client$, request, options) {
66999
67387
  const parsed$ = safeParse4(request, (value$) => V2VisibilityCitationsListRequest$zodSchema.optional().parse(value$), "Input validation failed");
67000
67388
  if (!parsed$.ok) {
67001
67389
  return [parsed$, { status: "invalid" }];
@@ -67218,9 +67606,9 @@ var init_v2visibilitycitationssummaryretrieveop = __esm(() => {
67218
67606
 
67219
67607
  // src/funcs/visibilityCitationsSummaryRetrieve.ts
67220
67608
  function visibilityCitationsSummaryRetrieve(client$, request, options) {
67221
- return new APIPromise($do74(client$, request, options));
67609
+ return new APIPromise($do75(client$, request, options));
67222
67610
  }
67223
- async function $do74(client$, request, options) {
67611
+ async function $do75(client$, request, options) {
67224
67612
  const parsed$ = safeParse4(request, (value$) => V2VisibilityCitationsSummaryRetrieveRequest$zodSchema.optional().parse(value$), "Input validation failed");
67225
67613
  if (!parsed$.ok) {
67226
67614
  return [parsed$, { status: "invalid" }];
@@ -67409,9 +67797,9 @@ var init_v2visibilitycurrentretrieveop = __esm(() => {
67409
67797
 
67410
67798
  // src/funcs/visibilityCurrentRetrieve.ts
67411
67799
  function visibilityCurrentRetrieve(client$, request, options) {
67412
- return new APIPromise($do75(client$, request, options));
67800
+ return new APIPromise($do76(client$, request, options));
67413
67801
  }
67414
- async function $do75(client$, request, options) {
67802
+ async function $do76(client$, request, options) {
67415
67803
  const parsed$ = safeParse4(request, (value$) => V2VisibilityCurrentRetrieveRequest$zodSchema.optional().parse(value$), "Input validation failed");
67416
67804
  if (!parsed$.ok) {
67417
67805
  return [parsed$, { status: "invalid" }];
@@ -67662,9 +68050,9 @@ var init_v2visibilityoverviewretrieveop = __esm(() => {
67662
68050
 
67663
68051
  // src/funcs/visibilityOverviewRetrieve.ts
67664
68052
  function visibilityOverviewRetrieve(client$, request, options) {
67665
- return new APIPromise($do76(client$, request, options));
68053
+ return new APIPromise($do77(client$, request, options));
67666
68054
  }
67667
- async function $do76(client$, request, options) {
68055
+ async function $do77(client$, request, options) {
67668
68056
  const parsed$ = safeParse4(request, (value$) => V2VisibilityOverviewRetrieveRequest$zodSchema.optional().parse(value$), "Input validation failed");
67669
68057
  if (!parsed$.ok) {
67670
68058
  return [parsed$, { status: "invalid" }];
@@ -67881,9 +68269,9 @@ var init_v2visibilitypromptsretrieveop = __esm(() => {
67881
68269
 
67882
68270
  // src/funcs/visibilityPromptsRetrieve.ts
67883
68271
  function visibilityPromptsRetrieve(client$, request, options) {
67884
- return new APIPromise($do77(client$, request, options));
68272
+ return new APIPromise($do78(client$, request, options));
67885
68273
  }
67886
- async function $do77(client$, request, options) {
68274
+ async function $do78(client$, request, options) {
67887
68275
  const parsed$ = safeParse4(request, (value$) => V2VisibilityPromptsRetrieveRequest$zodSchema.optional().parse(value$), "Input validation failed");
67888
68276
  if (!parsed$.ok) {
67889
68277
  return [parsed$, { status: "invalid" }];
@@ -68002,7 +68390,7 @@ function createMCPServer(deps) {
68002
68390
  sizes: ["any"]
68003
68391
  }],
68004
68392
  name: "LightsageMcp",
68005
- version: "0.4.25"
68393
+ version: "0.4.27"
68006
68394
  });
68007
68395
  const getClient = deps.getSDK || (() => new LightsageMcpCore({
68008
68396
  security: deps.security,
@@ -68030,6 +68418,7 @@ function createMCPServer(deps) {
68030
68418
  tool(tool$visibilityCitationsSummaryRetrieve);
68031
68419
  tool(tool$promptsList);
68032
68420
  tool(tool$promptsCreate);
68421
+ tool(tool$promptsTagsList);
68033
68422
  tool(tool$promptsTopicsList);
68034
68423
  tool(tool$promptsTopicsCreate);
68035
68424
  tool(tool$promptsTopicsUpdate);
@@ -68159,6 +68548,7 @@ var init_server3 = __esm(() => {
68159
68548
  init_promptsRunsList2();
68160
68549
  init_promptsRunsRetrieve2();
68161
68550
  init_promptsRunStatus2();
68551
+ init_promptsTagsList2();
68162
68552
  init_promptsTargetsList2();
68163
68553
  init_promptsTargetsSet2();
68164
68554
  init_promptsTopicsCreate2();
@@ -68235,7 +68625,11 @@ Returns per-topic and per-prompt visibility metrics including recommendation sco
68235
68625
  name: "prompts-create",
68236
68626
  description: `Create Prompts
68237
68627
 
68238
- 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."
68239
68633
  },
68240
68634
  {
68241
68635
  name: "prompts-topics-list",
@@ -68287,9 +68681,7 @@ Returns a prompt with its topic, platforms, tags, lifecycle status, and coding-a
68287
68681
  },
68288
68682
  {
68289
68683
  name: "prompts-update",
68290
- description: `Update Prompt
68291
-
68292
- 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."
68293
68685
  },
68294
68686
  {
68295
68687
  name: "prompts-delete",
@@ -69503,7 +69895,7 @@ http_headers = { "lightsage-api-key-auth" = "YOUR_LIGHTSAGE_API_KEY_AUTH" }`;
69503
69895
  <h1>Instructions</h1>
69504
69896
  <p>One-click installation for Claude Desktop users</p>
69505
69897
  <div class="instruction-item">
69506
- <a href="https://github.com/lightsagehq/mcp/releases/download/v0.4.25/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;">
69507
69899
  \uD83D\uDCE5 Download MCP Bundle
69508
69900
  </a>
69509
69901
  </div>
@@ -72403,7 +72795,7 @@ var routes = buildRouteMap({
72403
72795
  var app = buildApplication(routes, {
72404
72796
  name: "mcp",
72405
72797
  versionInfo: {
72406
- currentVersion: "0.4.25"
72798
+ currentVersion: "0.4.27"
72407
72799
  }
72408
72800
  });
72409
72801
  run(app, process3.argv.slice(2), buildContext(process3));
@@ -72411,5 +72803,5 @@ export {
72411
72803
  app
72412
72804
  };
72413
72805
 
72414
- //# debugId=98ECBEB84095AB7964756E2164756E21
72806
+ //# debugId=B0B36497F126894D64756E2164756E21
72415
72807
  //# sourceMappingURL=mcp-server.js.map