@neopress/mcp 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +23 -56
- package/dist/http-bin.cjs +26 -59
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11 -12
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -34,7 +34,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
34
34
|
}
|
|
35
35
|
return to;
|
|
36
36
|
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
38
38
|
value: mod,
|
|
39
39
|
enumerable: true
|
|
40
40
|
}) : target, mod));
|
|
@@ -9338,7 +9338,8 @@ var ZodPromise = class extends ZodType {
|
|
|
9338
9338
|
});
|
|
9339
9339
|
return INVALID;
|
|
9340
9340
|
}
|
|
9341
|
-
|
|
9341
|
+
const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
|
|
9342
|
+
return OK(promisified.then((data) => {
|
|
9342
9343
|
return this._def.type.parseAsync(data, {
|
|
9343
9344
|
path: ctx.path,
|
|
9344
9345
|
errorMap: ctx.common.contextualErrorMap
|
|
@@ -10073,9 +10074,7 @@ function parseBigintDef(def, refs) {
|
|
|
10073
10074
|
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
10074
10075
|
}
|
|
10075
10076
|
break;
|
|
10076
|
-
case "multipleOf":
|
|
10077
|
-
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
10078
|
-
break;
|
|
10077
|
+
case "multipleOf": setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
10079
10078
|
}
|
|
10080
10079
|
return res;
|
|
10081
10080
|
}
|
|
@@ -10122,9 +10121,7 @@ const integerDateParser = (def, refs) => {
|
|
|
10122
10121
|
case "min":
|
|
10123
10122
|
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
10124
10123
|
break;
|
|
10125
|
-
case "max":
|
|
10126
|
-
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
10127
|
-
break;
|
|
10124
|
+
case "max": setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
10128
10125
|
}
|
|
10129
10126
|
return res;
|
|
10130
10127
|
};
|
|
@@ -10276,9 +10273,7 @@ function parseStringDef(def, refs) {
|
|
|
10276
10273
|
case "format:idn-email":
|
|
10277
10274
|
addFormat(res, "idn-email", check.message, refs);
|
|
10278
10275
|
break;
|
|
10279
|
-
case "pattern:zod":
|
|
10280
|
-
addPattern(res, zodPatterns.email, check.message, refs);
|
|
10281
|
-
break;
|
|
10276
|
+
case "pattern:zod": addPattern(res, zodPatterns.email, check.message, refs);
|
|
10282
10277
|
}
|
|
10283
10278
|
break;
|
|
10284
10279
|
case "url":
|
|
@@ -10349,16 +10344,10 @@ function parseStringDef(def, refs) {
|
|
|
10349
10344
|
case "contentEncoding:base64":
|
|
10350
10345
|
setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs);
|
|
10351
10346
|
break;
|
|
10352
|
-
case "pattern:zod":
|
|
10353
|
-
addPattern(res, zodPatterns.base64, check.message, refs);
|
|
10354
|
-
break;
|
|
10347
|
+
case "pattern:zod": addPattern(res, zodPatterns.base64, check.message, refs);
|
|
10355
10348
|
}
|
|
10356
10349
|
break;
|
|
10357
10350
|
case "nanoid": addPattern(res, zodPatterns.nanoid, check.message, refs);
|
|
10358
|
-
case "toLowerCase":
|
|
10359
|
-
case "toUpperCase":
|
|
10360
|
-
case "trim": break;
|
|
10361
|
-
default:
|
|
10362
10351
|
}
|
|
10363
10352
|
return res;
|
|
10364
10353
|
}
|
|
@@ -10705,9 +10694,7 @@ function parseNumberDef(def, refs) {
|
|
|
10705
10694
|
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
10706
10695
|
}
|
|
10707
10696
|
break;
|
|
10708
|
-
case "multipleOf":
|
|
10709
|
-
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
10710
|
-
break;
|
|
10697
|
+
case "multipleOf": setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
10711
10698
|
}
|
|
10712
10699
|
return res;
|
|
10713
10700
|
}
|
|
@@ -18352,9 +18339,7 @@ var ExperimentalServerTasks = class {
|
|
|
18352
18339
|
case "url":
|
|
18353
18340
|
if (!clientCapabilities?.elicitation?.url) throw new Error("Client does not support url elicitation.");
|
|
18354
18341
|
break;
|
|
18355
|
-
case "form":
|
|
18356
|
-
if (!clientCapabilities?.elicitation?.form) throw new Error("Client does not support form elicitation.");
|
|
18357
|
-
break;
|
|
18342
|
+
case "form": if (!clientCapabilities?.elicitation?.form) throw new Error("Client does not support form elicitation.");
|
|
18358
18343
|
}
|
|
18359
18344
|
const normalizedParams = mode === "form" && params.mode === void 0 ? {
|
|
18360
18345
|
...params,
|
|
@@ -18436,10 +18421,7 @@ var ExperimentalServerTasks = class {
|
|
|
18436
18421
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
18437
18422
|
if (!requests) throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
18438
18423
|
switch (method) {
|
|
18439
|
-
case "tools/call":
|
|
18440
|
-
if (!requests.tools?.call) throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
|
|
18441
|
-
break;
|
|
18442
|
-
default: break;
|
|
18424
|
+
case "tools/call": if (!requests.tools?.call) throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
|
|
18443
18425
|
}
|
|
18444
18426
|
}
|
|
18445
18427
|
/**
|
|
@@ -18459,10 +18441,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
18459
18441
|
case "sampling/createMessage":
|
|
18460
18442
|
if (!requests.sampling?.createMessage) throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
|
|
18461
18443
|
break;
|
|
18462
|
-
case "elicitation/create":
|
|
18463
|
-
if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
|
|
18464
|
-
break;
|
|
18465
|
-
default: break;
|
|
18444
|
+
case "elicitation/create": if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
|
|
18466
18445
|
}
|
|
18467
18446
|
}
|
|
18468
18447
|
//#endregion
|
|
@@ -18590,10 +18569,7 @@ var Server = class extends Protocol {
|
|
|
18590
18569
|
case "elicitation/create":
|
|
18591
18570
|
if (!this._clientCapabilities?.elicitation) throw new Error(`Client does not support elicitation (required for ${method})`);
|
|
18592
18571
|
break;
|
|
18593
|
-
case "roots/list":
|
|
18594
|
-
if (!this._clientCapabilities?.roots) throw new Error(`Client does not support listing roots (required for ${method})`);
|
|
18595
|
-
break;
|
|
18596
|
-
case "ping": break;
|
|
18572
|
+
case "roots/list": if (!this._clientCapabilities?.roots) throw new Error(`Client does not support listing roots (required for ${method})`);
|
|
18597
18573
|
}
|
|
18598
18574
|
}
|
|
18599
18575
|
assertNotificationCapability(method) {
|
|
@@ -18611,11 +18587,7 @@ var Server = class extends Protocol {
|
|
|
18611
18587
|
case "notifications/prompts/list_changed":
|
|
18612
18588
|
if (!this._capabilities.prompts) throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);
|
|
18613
18589
|
break;
|
|
18614
|
-
case "notifications/elicitation/complete":
|
|
18615
|
-
if (!this._clientCapabilities?.elicitation?.url) throw new Error(`Client does not support URL elicitation (required for ${method})`);
|
|
18616
|
-
break;
|
|
18617
|
-
case "notifications/cancelled": break;
|
|
18618
|
-
case "notifications/progress": break;
|
|
18590
|
+
case "notifications/elicitation/complete": if (!this._clientCapabilities?.elicitation?.url) throw new Error(`Client does not support URL elicitation (required for ${method})`);
|
|
18619
18591
|
}
|
|
18620
18592
|
}
|
|
18621
18593
|
assertRequestHandlerCapability(method) {
|
|
@@ -18643,11 +18615,7 @@ var Server = class extends Protocol {
|
|
|
18643
18615
|
case "tasks/get":
|
|
18644
18616
|
case "tasks/list":
|
|
18645
18617
|
case "tasks/result":
|
|
18646
|
-
case "tasks/cancel":
|
|
18647
|
-
if (!this._capabilities.tasks) throw new Error(`Server does not support tasks capability (required for ${method})`);
|
|
18648
|
-
break;
|
|
18649
|
-
case "ping":
|
|
18650
|
-
case "initialize": break;
|
|
18618
|
+
case "tasks/cancel": if (!this._capabilities.tasks) throw new Error(`Server does not support tasks capability (required for ${method})`);
|
|
18651
18619
|
}
|
|
18652
18620
|
}
|
|
18653
18621
|
assertTaskCapability(method) {
|
|
@@ -32873,7 +32841,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
32873
32841
|
exports.JWKS_TTL = exports.BASE64URL_REGEX = exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD = exports.AUTO_REFRESH_TICK_DURATION_MS = void 0;
|
|
32874
32842
|
const version_1 = require_version();
|
|
32875
32843
|
/** Current session will be checked for refresh at this interval. */
|
|
32876
|
-
exports.AUTO_REFRESH_TICK_DURATION_MS =
|
|
32844
|
+
exports.AUTO_REFRESH_TICK_DURATION_MS = 3e4;
|
|
32877
32845
|
/**
|
|
32878
32846
|
* A token refresh will be attempted this many ticks before the current session expires. */
|
|
32879
32847
|
exports.AUTO_REFRESH_TICK_THRESHOLD = 3;
|
|
@@ -32892,7 +32860,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
32892
32860
|
name: "2024-01-01"
|
|
32893
32861
|
} };
|
|
32894
32862
|
exports.BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
|
|
32895
|
-
exports.JWKS_TTL =
|
|
32863
|
+
exports.JWKS_TTL = 6e5;
|
|
32896
32864
|
}));
|
|
32897
32865
|
//#endregion
|
|
32898
32866
|
//#region ../../node_modules/@supabase/auth-js/dist/main/lib/errors.js
|
|
@@ -39315,10 +39283,7 @@ var require_GoTrueClient = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
39315
39283
|
case "implicit":
|
|
39316
39284
|
if (this.flowType === "pkce") throw new errors_1.AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");
|
|
39317
39285
|
break;
|
|
39318
|
-
case "pkce":
|
|
39319
|
-
if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
39320
|
-
break;
|
|
39321
|
-
default:
|
|
39286
|
+
case "pkce": if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
39322
39287
|
}
|
|
39323
39288
|
if (callbackUrlType === "pkce") {
|
|
39324
39289
|
this._debug("#_initialize()", "begin", "is PKCE flow", true);
|
|
@@ -44009,7 +43974,7 @@ Use these rules before generating pages, collection schemas, entries, forms, or
|
|
|
44009
43974
|
- Reusable templates are normal Neopress sites marked by a \`templates\` metadata row.
|
|
44010
43975
|
- \`templates.id\` equals \`sites.id\`.
|
|
44011
43976
|
- Build layout, pages, collections, entries, forms, assets, compile, publish, and verify before marking a finished template.
|
|
44012
|
-
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\`.
|
|
43977
|
+
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\` and \`previewVideoUrl\`. The gallery card renders \`previewImgUrls[0]\` at rest and cross-fades to \`previewVideoUrl\` on hover, so the first preview image must be that video's first frame.
|
|
44013
43978
|
- \`referenceUrl\` is a single http(s) provenance URL. \`description\` is an optional summary of the template (max 150 characters).
|
|
44014
43979
|
- Template metadata does not replace page TSX, CMS content, forms, or publish state.
|
|
44015
43980
|
- Use \`neopress_template_delete\` only for explicit template-site hard deletion. It removes the metadata row and connected site.
|
|
@@ -44347,20 +44312,22 @@ const toolDefinitions = [
|
|
|
44347
44312
|
{
|
|
44348
44313
|
name: "neopress_template_mark",
|
|
44349
44314
|
title: "Mark Site As Template",
|
|
44350
|
-
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl.",
|
|
44315
|
+
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl. The gallery card shows previewImgUrls[0] at rest and plays previewVideoUrl on hover, so pass the video together with its own first frame as the first preview image.",
|
|
44351
44316
|
inputSchema: {
|
|
44352
44317
|
...siteIdShape,
|
|
44353
44318
|
name: string(),
|
|
44354
44319
|
description: string().max(150).optional(),
|
|
44355
44320
|
referenceUrl: httpUrlSchema,
|
|
44356
|
-
previewImgUrls: array(string()).min(1)
|
|
44321
|
+
previewImgUrls: array(string()).min(1),
|
|
44322
|
+
previewVideoUrl: httpUrlSchema.optional()
|
|
44357
44323
|
},
|
|
44358
44324
|
handler: async (input, context, extra) => {
|
|
44359
44325
|
return (await context.createClient({ siteId: siteId(input) }, extra)).templates.mark({
|
|
44360
44326
|
name: asString(input, "name"),
|
|
44361
44327
|
description: asOptionalString(input, "description"),
|
|
44362
44328
|
referenceUrl: asString(input, "referenceUrl"),
|
|
44363
|
-
previewImgUrls: input.previewImgUrls
|
|
44329
|
+
previewImgUrls: input.previewImgUrls,
|
|
44330
|
+
previewVideoUrl: asOptionalString(input, "previewVideoUrl")
|
|
44364
44331
|
});
|
|
44365
44332
|
}
|
|
44366
44333
|
},
|
package/dist/http-bin.cjs
CHANGED
|
@@ -34,7 +34,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
34
34
|
}
|
|
35
35
|
return to;
|
|
36
36
|
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
37
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
38
38
|
value: mod,
|
|
39
39
|
enumerable: true
|
|
40
40
|
}) : target, mod));
|
|
@@ -338,7 +338,7 @@ if (typeof global.crypto === "undefined") global.crypto = crypto$1.default;
|
|
|
338
338
|
var outgoingEnded = Symbol("outgoingEnded");
|
|
339
339
|
var incomingDraining = Symbol("incomingDraining");
|
|
340
340
|
var DRAIN_TIMEOUT_MS = 500;
|
|
341
|
-
var MAX_DRAIN_BYTES =
|
|
341
|
+
var MAX_DRAIN_BYTES = 67108864;
|
|
342
342
|
var drainIncoming = (incoming) => {
|
|
343
343
|
const incomingWithDrainState = incoming;
|
|
344
344
|
if (incoming.destroyed || incomingWithDrainState[incomingDraining]) return;
|
|
@@ -10447,7 +10447,8 @@ var ZodPromise = class extends ZodType {
|
|
|
10447
10447
|
});
|
|
10448
10448
|
return INVALID;
|
|
10449
10449
|
}
|
|
10450
|
-
|
|
10450
|
+
const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
|
|
10451
|
+
return OK(promisified.then((data) => {
|
|
10451
10452
|
return this._def.type.parseAsync(data, {
|
|
10452
10453
|
path: ctx.path,
|
|
10453
10454
|
errorMap: ctx.common.contextualErrorMap
|
|
@@ -11182,9 +11183,7 @@ function parseBigintDef(def, refs) {
|
|
|
11182
11183
|
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
11183
11184
|
}
|
|
11184
11185
|
break;
|
|
11185
|
-
case "multipleOf":
|
|
11186
|
-
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
11187
|
-
break;
|
|
11186
|
+
case "multipleOf": setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
11188
11187
|
}
|
|
11189
11188
|
return res;
|
|
11190
11189
|
}
|
|
@@ -11231,9 +11230,7 @@ const integerDateParser = (def, refs) => {
|
|
|
11231
11230
|
case "min":
|
|
11232
11231
|
setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
|
|
11233
11232
|
break;
|
|
11234
|
-
case "max":
|
|
11235
|
-
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
11236
|
-
break;
|
|
11233
|
+
case "max": setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
11237
11234
|
}
|
|
11238
11235
|
return res;
|
|
11239
11236
|
};
|
|
@@ -11385,9 +11382,7 @@ function parseStringDef(def, refs) {
|
|
|
11385
11382
|
case "format:idn-email":
|
|
11386
11383
|
addFormat(res, "idn-email", check.message, refs);
|
|
11387
11384
|
break;
|
|
11388
|
-
case "pattern:zod":
|
|
11389
|
-
addPattern(res, zodPatterns.email, check.message, refs);
|
|
11390
|
-
break;
|
|
11385
|
+
case "pattern:zod": addPattern(res, zodPatterns.email, check.message, refs);
|
|
11391
11386
|
}
|
|
11392
11387
|
break;
|
|
11393
11388
|
case "url":
|
|
@@ -11458,16 +11453,10 @@ function parseStringDef(def, refs) {
|
|
|
11458
11453
|
case "contentEncoding:base64":
|
|
11459
11454
|
setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs);
|
|
11460
11455
|
break;
|
|
11461
|
-
case "pattern:zod":
|
|
11462
|
-
addPattern(res, zodPatterns.base64, check.message, refs);
|
|
11463
|
-
break;
|
|
11456
|
+
case "pattern:zod": addPattern(res, zodPatterns.base64, check.message, refs);
|
|
11464
11457
|
}
|
|
11465
11458
|
break;
|
|
11466
11459
|
case "nanoid": addPattern(res, zodPatterns.nanoid, check.message, refs);
|
|
11467
|
-
case "toLowerCase":
|
|
11468
|
-
case "toUpperCase":
|
|
11469
|
-
case "trim": break;
|
|
11470
|
-
default:
|
|
11471
11460
|
}
|
|
11472
11461
|
return res;
|
|
11473
11462
|
}
|
|
@@ -11814,9 +11803,7 @@ function parseNumberDef(def, refs) {
|
|
|
11814
11803
|
setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
|
|
11815
11804
|
}
|
|
11816
11805
|
break;
|
|
11817
|
-
case "multipleOf":
|
|
11818
|
-
setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
11819
|
-
break;
|
|
11806
|
+
case "multipleOf": setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
|
|
11820
11807
|
}
|
|
11821
11808
|
return res;
|
|
11822
11809
|
}
|
|
@@ -19461,9 +19448,7 @@ var ExperimentalServerTasks = class {
|
|
|
19461
19448
|
case "url":
|
|
19462
19449
|
if (!clientCapabilities?.elicitation?.url) throw new Error("Client does not support url elicitation.");
|
|
19463
19450
|
break;
|
|
19464
|
-
case "form":
|
|
19465
|
-
if (!clientCapabilities?.elicitation?.form) throw new Error("Client does not support form elicitation.");
|
|
19466
|
-
break;
|
|
19451
|
+
case "form": if (!clientCapabilities?.elicitation?.form) throw new Error("Client does not support form elicitation.");
|
|
19467
19452
|
}
|
|
19468
19453
|
const normalizedParams = mode === "form" && params.mode === void 0 ? {
|
|
19469
19454
|
...params,
|
|
@@ -19545,10 +19530,7 @@ var ExperimentalServerTasks = class {
|
|
|
19545
19530
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
19546
19531
|
if (!requests) throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
19547
19532
|
switch (method) {
|
|
19548
|
-
case "tools/call":
|
|
19549
|
-
if (!requests.tools?.call) throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
|
|
19550
|
-
break;
|
|
19551
|
-
default: break;
|
|
19533
|
+
case "tools/call": if (!requests.tools?.call) throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
|
|
19552
19534
|
}
|
|
19553
19535
|
}
|
|
19554
19536
|
/**
|
|
@@ -19568,10 +19550,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
19568
19550
|
case "sampling/createMessage":
|
|
19569
19551
|
if (!requests.sampling?.createMessage) throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
|
|
19570
19552
|
break;
|
|
19571
|
-
case "elicitation/create":
|
|
19572
|
-
if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
|
|
19573
|
-
break;
|
|
19574
|
-
default: break;
|
|
19553
|
+
case "elicitation/create": if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
|
|
19575
19554
|
}
|
|
19576
19555
|
}
|
|
19577
19556
|
//#endregion
|
|
@@ -19699,10 +19678,7 @@ var Server = class extends Protocol {
|
|
|
19699
19678
|
case "elicitation/create":
|
|
19700
19679
|
if (!this._clientCapabilities?.elicitation) throw new Error(`Client does not support elicitation (required for ${method})`);
|
|
19701
19680
|
break;
|
|
19702
|
-
case "roots/list":
|
|
19703
|
-
if (!this._clientCapabilities?.roots) throw new Error(`Client does not support listing roots (required for ${method})`);
|
|
19704
|
-
break;
|
|
19705
|
-
case "ping": break;
|
|
19681
|
+
case "roots/list": if (!this._clientCapabilities?.roots) throw new Error(`Client does not support listing roots (required for ${method})`);
|
|
19706
19682
|
}
|
|
19707
19683
|
}
|
|
19708
19684
|
assertNotificationCapability(method) {
|
|
@@ -19720,11 +19696,7 @@ var Server = class extends Protocol {
|
|
|
19720
19696
|
case "notifications/prompts/list_changed":
|
|
19721
19697
|
if (!this._capabilities.prompts) throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);
|
|
19722
19698
|
break;
|
|
19723
|
-
case "notifications/elicitation/complete":
|
|
19724
|
-
if (!this._clientCapabilities?.elicitation?.url) throw new Error(`Client does not support URL elicitation (required for ${method})`);
|
|
19725
|
-
break;
|
|
19726
|
-
case "notifications/cancelled": break;
|
|
19727
|
-
case "notifications/progress": break;
|
|
19699
|
+
case "notifications/elicitation/complete": if (!this._clientCapabilities?.elicitation?.url) throw new Error(`Client does not support URL elicitation (required for ${method})`);
|
|
19728
19700
|
}
|
|
19729
19701
|
}
|
|
19730
19702
|
assertRequestHandlerCapability(method) {
|
|
@@ -19752,11 +19724,7 @@ var Server = class extends Protocol {
|
|
|
19752
19724
|
case "tasks/get":
|
|
19753
19725
|
case "tasks/list":
|
|
19754
19726
|
case "tasks/result":
|
|
19755
|
-
case "tasks/cancel":
|
|
19756
|
-
if (!this._capabilities.tasks) throw new Error(`Server does not support tasks capability (required for ${method})`);
|
|
19757
|
-
break;
|
|
19758
|
-
case "ping":
|
|
19759
|
-
case "initialize": break;
|
|
19727
|
+
case "tasks/cancel": if (!this._capabilities.tasks) throw new Error(`Server does not support tasks capability (required for ${method})`);
|
|
19760
19728
|
}
|
|
19761
19729
|
}
|
|
19762
19730
|
assertTaskCapability(method) {
|
|
@@ -33982,7 +33950,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
33982
33950
|
exports.JWKS_TTL = exports.BASE64URL_REGEX = exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD = exports.AUTO_REFRESH_TICK_DURATION_MS = void 0;
|
|
33983
33951
|
const version_1 = require_version();
|
|
33984
33952
|
/** Current session will be checked for refresh at this interval. */
|
|
33985
|
-
exports.AUTO_REFRESH_TICK_DURATION_MS =
|
|
33953
|
+
exports.AUTO_REFRESH_TICK_DURATION_MS = 3e4;
|
|
33986
33954
|
/**
|
|
33987
33955
|
* A token refresh will be attempted this many ticks before the current session expires. */
|
|
33988
33956
|
exports.AUTO_REFRESH_TICK_THRESHOLD = 3;
|
|
@@ -34001,7 +33969,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
34001
33969
|
name: "2024-01-01"
|
|
34002
33970
|
} };
|
|
34003
33971
|
exports.BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
|
|
34004
|
-
exports.JWKS_TTL =
|
|
33972
|
+
exports.JWKS_TTL = 6e5;
|
|
34005
33973
|
}));
|
|
34006
33974
|
//#endregion
|
|
34007
33975
|
//#region ../../node_modules/@supabase/auth-js/dist/main/lib/errors.js
|
|
@@ -40424,10 +40392,7 @@ var require_GoTrueClient = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
40424
40392
|
case "implicit":
|
|
40425
40393
|
if (this.flowType === "pkce") throw new errors_1.AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");
|
|
40426
40394
|
break;
|
|
40427
|
-
case "pkce":
|
|
40428
|
-
if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
40429
|
-
break;
|
|
40430
|
-
default:
|
|
40395
|
+
case "pkce": if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
40431
40396
|
}
|
|
40432
40397
|
if (callbackUrlType === "pkce") {
|
|
40433
40398
|
this._debug("#_initialize()", "begin", "is PKCE flow", true);
|
|
@@ -45118,7 +45083,7 @@ Use these rules before generating pages, collection schemas, entries, forms, or
|
|
|
45118
45083
|
- Reusable templates are normal Neopress sites marked by a \`templates\` metadata row.
|
|
45119
45084
|
- \`templates.id\` equals \`sites.id\`.
|
|
45120
45085
|
- Build layout, pages, collections, entries, forms, assets, compile, publish, and verify before marking a finished template.
|
|
45121
|
-
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\`.
|
|
45086
|
+
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\` and \`previewVideoUrl\`. The gallery card renders \`previewImgUrls[0]\` at rest and cross-fades to \`previewVideoUrl\` on hover, so the first preview image must be that video's first frame.
|
|
45122
45087
|
- \`referenceUrl\` is a single http(s) provenance URL. \`description\` is an optional summary of the template (max 150 characters).
|
|
45123
45088
|
- Template metadata does not replace page TSX, CMS content, forms, or publish state.
|
|
45124
45089
|
- Use \`neopress_template_delete\` only for explicit template-site hard deletion. It removes the metadata row and connected site.
|
|
@@ -45456,20 +45421,22 @@ const toolDefinitions = [
|
|
|
45456
45421
|
{
|
|
45457
45422
|
name: "neopress_template_mark",
|
|
45458
45423
|
title: "Mark Site As Template",
|
|
45459
|
-
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl.",
|
|
45424
|
+
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl. The gallery card shows previewImgUrls[0] at rest and plays previewVideoUrl on hover, so pass the video together with its own first frame as the first preview image.",
|
|
45460
45425
|
inputSchema: {
|
|
45461
45426
|
...siteIdShape,
|
|
45462
45427
|
name: string(),
|
|
45463
45428
|
description: string().max(150).optional(),
|
|
45464
45429
|
referenceUrl: httpUrlSchema,
|
|
45465
|
-
previewImgUrls: array(string()).min(1)
|
|
45430
|
+
previewImgUrls: array(string()).min(1),
|
|
45431
|
+
previewVideoUrl: httpUrlSchema.optional()
|
|
45466
45432
|
},
|
|
45467
45433
|
handler: async (input, context, extra) => {
|
|
45468
45434
|
return (await context.createClient({ siteId: siteId(input) }, extra)).templates.mark({
|
|
45469
45435
|
name: asString(input, "name"),
|
|
45470
45436
|
description: asOptionalString(input, "description"),
|
|
45471
45437
|
referenceUrl: asString(input, "referenceUrl"),
|
|
45472
|
-
previewImgUrls: input.previewImgUrls
|
|
45438
|
+
previewImgUrls: input.previewImgUrls,
|
|
45439
|
+
previewVideoUrl: asOptionalString(input, "previewVideoUrl")
|
|
45473
45440
|
});
|
|
45474
45441
|
}
|
|
45475
45442
|
},
|
|
@@ -46342,7 +46309,7 @@ function createRemoteToolContext(options) {
|
|
|
46342
46309
|
}
|
|
46343
46310
|
};
|
|
46344
46311
|
}
|
|
46345
|
-
const DEFAULT_CLIENT_TTL_SECONDS =
|
|
46312
|
+
const DEFAULT_CLIENT_TTL_SECONDS = 2592e3;
|
|
46346
46313
|
let generatedClientSecret;
|
|
46347
46314
|
var OAuthProtocolError = class extends Error {
|
|
46348
46315
|
status;
|
|
@@ -46604,7 +46571,7 @@ async function readBody(request) {
|
|
|
46604
46571
|
for await (const chunk of request) {
|
|
46605
46572
|
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
46606
46573
|
size += buffer.byteLength;
|
|
46607
|
-
if (size >
|
|
46574
|
+
if (size > 1048576) throw new OAuthProtocolError(413, "invalid_request", "Request body is too large.");
|
|
46608
46575
|
chunks.push(buffer);
|
|
46609
46576
|
}
|
|
46610
46577
|
return Buffer.concat(chunks).toString("utf-8");
|
package/dist/index.d.ts
CHANGED
|
@@ -602,6 +602,10 @@ interface TemplateMarkParams {
|
|
|
602
602
|
description?: string | null;
|
|
603
603
|
referenceUrl: string;
|
|
604
604
|
previewImgUrls?: string[] | null;
|
|
605
|
+
/** Gallery hover video. Pair it with the poster in `previewImgUrls[0]` — the
|
|
606
|
+
* card cross-fades from poster to video, so the poster must be the video's
|
|
607
|
+
* first frame. Omit to leave an existing value untouched; `null` clears it. */
|
|
608
|
+
previewVideoUrl?: string | null;
|
|
605
609
|
}
|
|
606
610
|
interface TemplateDeleteResult {
|
|
607
611
|
siteId: number;
|
package/dist/index.js
CHANGED
|
@@ -13359,7 +13359,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13359
13359
|
exports.JWKS_TTL = exports.BASE64URL_REGEX = exports.API_VERSIONS = exports.API_VERSION_HEADER_NAME = exports.NETWORK_FAILURE = exports.DEFAULT_HEADERS = exports.AUDIENCE = exports.STORAGE_KEY = exports.GOTRUE_URL = exports.EXPIRY_MARGIN_MS = exports.AUTO_REFRESH_TICK_THRESHOLD = exports.AUTO_REFRESH_TICK_DURATION_MS = void 0;
|
|
13360
13360
|
const version_1 = require_version();
|
|
13361
13361
|
/** Current session will be checked for refresh at this interval. */
|
|
13362
|
-
exports.AUTO_REFRESH_TICK_DURATION_MS =
|
|
13362
|
+
exports.AUTO_REFRESH_TICK_DURATION_MS = 3e4;
|
|
13363
13363
|
/**
|
|
13364
13364
|
* A token refresh will be attempted this many ticks before the current session expires. */
|
|
13365
13365
|
exports.AUTO_REFRESH_TICK_THRESHOLD = 3;
|
|
@@ -13378,7 +13378,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13378
13378
|
name: "2024-01-01"
|
|
13379
13379
|
} };
|
|
13380
13380
|
exports.BASE64URL_REGEX = /^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
|
|
13381
|
-
exports.JWKS_TTL =
|
|
13381
|
+
exports.JWKS_TTL = 6e5;
|
|
13382
13382
|
}));
|
|
13383
13383
|
//#endregion
|
|
13384
13384
|
//#region ../../node_modules/@supabase/auth-js/dist/main/lib/errors.js
|
|
@@ -19801,10 +19801,7 @@ var require_GoTrueClient = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
19801
19801
|
case "implicit":
|
|
19802
19802
|
if (this.flowType === "pkce") throw new errors_1.AuthPKCEGrantCodeExchangeError("Not a valid PKCE flow url.");
|
|
19803
19803
|
break;
|
|
19804
|
-
case "pkce":
|
|
19805
|
-
if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
19806
|
-
break;
|
|
19807
|
-
default:
|
|
19804
|
+
case "pkce": if (this.flowType === "implicit") throw new errors_1.AuthImplicitGrantRedirectError("Not a valid implicit grant flow url.");
|
|
19808
19805
|
}
|
|
19809
19806
|
if (callbackUrlType === "pkce") {
|
|
19810
19807
|
this._debug("#_initialize()", "begin", "is PKCE flow", true);
|
|
@@ -24500,7 +24497,7 @@ Use these rules before generating pages, collection schemas, entries, forms, or
|
|
|
24500
24497
|
- Reusable templates are normal Neopress sites marked by a \`templates\` metadata row.
|
|
24501
24498
|
- \`templates.id\` equals \`sites.id\`.
|
|
24502
24499
|
- Build layout, pages, collections, entries, forms, assets, compile, publish, and verify before marking a finished template.
|
|
24503
|
-
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\`.
|
|
24500
|
+
- Use \`neopress_template_mark\` to create or update the metadata row with \`name\`, required \`referenceUrl\`, required \`previewImgUrls\` (at least one), and optional \`description\` and \`previewVideoUrl\`. The gallery card renders \`previewImgUrls[0]\` at rest and cross-fades to \`previewVideoUrl\` on hover, so the first preview image must be that video's first frame.
|
|
24504
24501
|
- \`referenceUrl\` is a single http(s) provenance URL. \`description\` is an optional summary of the template (max 150 characters).
|
|
24505
24502
|
- Template metadata does not replace page TSX, CMS content, forms, or publish state.
|
|
24506
24503
|
- Use \`neopress_template_delete\` only for explicit template-site hard deletion. It removes the metadata row and connected site.
|
|
@@ -24838,20 +24835,22 @@ const toolDefinitions = [
|
|
|
24838
24835
|
{
|
|
24839
24836
|
name: "neopress_template_mark",
|
|
24840
24837
|
title: "Mark Site As Template",
|
|
24841
|
-
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl.",
|
|
24838
|
+
description: "Create or update the template metadata row for a finished template site. The template id is the site id. Requires at least one previewImgUrl. The gallery card shows previewImgUrls[0] at rest and plays previewVideoUrl on hover, so pass the video together with its own first frame as the first preview image.",
|
|
24842
24839
|
inputSchema: {
|
|
24843
24840
|
...siteIdShape,
|
|
24844
24841
|
name: z.string(),
|
|
24845
24842
|
description: z.string().max(150).optional(),
|
|
24846
24843
|
referenceUrl: httpUrlSchema,
|
|
24847
|
-
previewImgUrls: z.array(z.string()).min(1)
|
|
24844
|
+
previewImgUrls: z.array(z.string()).min(1),
|
|
24845
|
+
previewVideoUrl: httpUrlSchema.optional()
|
|
24848
24846
|
},
|
|
24849
24847
|
handler: async (input, context, extra) => {
|
|
24850
24848
|
return (await context.createClient({ siteId: siteId(input) }, extra)).templates.mark({
|
|
24851
24849
|
name: asString(input, "name"),
|
|
24852
24850
|
description: asOptionalString(input, "description"),
|
|
24853
24851
|
referenceUrl: asString(input, "referenceUrl"),
|
|
24854
|
-
previewImgUrls: input.previewImgUrls
|
|
24852
|
+
previewImgUrls: input.previewImgUrls,
|
|
24853
|
+
previewVideoUrl: asOptionalString(input, "previewVideoUrl")
|
|
24855
24854
|
});
|
|
24856
24855
|
}
|
|
24857
24856
|
},
|
|
@@ -25724,7 +25723,7 @@ function createRemoteToolContext(options) {
|
|
|
25724
25723
|
}
|
|
25725
25724
|
};
|
|
25726
25725
|
}
|
|
25727
|
-
const DEFAULT_CLIENT_TTL_SECONDS =
|
|
25726
|
+
const DEFAULT_CLIENT_TTL_SECONDS = 2592e3;
|
|
25728
25727
|
let generatedClientSecret;
|
|
25729
25728
|
var OAuthProtocolError = class extends Error {
|
|
25730
25729
|
status;
|
|
@@ -25986,7 +25985,7 @@ async function readBody(request) {
|
|
|
25986
25985
|
for await (const chunk of request) {
|
|
25987
25986
|
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
25988
25987
|
size += buffer.byteLength;
|
|
25989
|
-
if (size >
|
|
25988
|
+
if (size > 1048576) throw new OAuthProtocolError(413, "invalid_request", "Request body is too large.");
|
|
25990
25989
|
chunks.push(buffer);
|
|
25991
25990
|
}
|
|
25992
25991
|
return Buffer.concat(chunks).toString("utf-8");
|