@neopress/mcp 1.3.1 → 1.4.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/README.md +82 -18
- package/dist/bin.cjs +319 -11
- package/dist/http-bin.cjs +5400 -470
- package/dist/index.d.ts +14 -6
- package/dist/index.js +429 -297
- package/integrations/README.md +7 -7
- package/integrations/chatgpt/app-draft.md +111 -17
- package/integrations/claude-remote/connector-draft.md +53 -16
- package/integrations/submission-guide.md +60 -0
- package/package.json +3 -1
- package/scripts/check-dist-contract.mjs +28 -0
- package/scripts/deploy-cloud-run.sh +32 -13
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { AddressInfo } from "node:net";
|
|
3
4
|
import { Server } from "node:http";
|
|
5
|
+
import { Redis } from "@upstash/redis";
|
|
4
6
|
import { ServerNotification, ServerRequest } from "@modelcontextprotocol/sdk/types.js";
|
|
5
7
|
import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
6
|
-
import { AddressInfo } from "node:net";
|
|
7
8
|
//#region ../sdk/src/types.d.ts
|
|
8
9
|
/**
|
|
9
10
|
* @neopress/sdk — First-party API types
|
|
@@ -50,6 +51,8 @@ interface Template {
|
|
|
50
51
|
referenceUrl: string;
|
|
51
52
|
previewImgUrls: string[] | null;
|
|
52
53
|
previewVideoUrl: string | null;
|
|
54
|
+
/** Primary language of the template's content, as an ISO 639-1 code (ko/en/es). */
|
|
55
|
+
language: string | null;
|
|
53
56
|
createdAt: string | null;
|
|
54
57
|
}
|
|
55
58
|
interface TemplateListItem {
|
|
@@ -60,6 +63,7 @@ interface TemplateListItem {
|
|
|
60
63
|
referenceUrl: string;
|
|
61
64
|
previewImgUrls: string[] | null;
|
|
62
65
|
description: string | null;
|
|
66
|
+
language: string | null;
|
|
63
67
|
createdAt: string;
|
|
64
68
|
}
|
|
65
69
|
interface Page {
|
|
@@ -606,6 +610,11 @@ interface TemplateMarkParams {
|
|
|
606
610
|
* card cross-fades from poster to video, so the poster must be the video's
|
|
607
611
|
* first frame. Omit to leave an existing value untouched; `null` clears it. */
|
|
608
612
|
previewVideoUrl?: string | null;
|
|
613
|
+
/** Primary language of the template's content — required, ISO 639-1 lowercase
|
|
614
|
+
* two-letter code (`ko`, `en`, `es`). Region-qualified locales (`en-US`) are
|
|
615
|
+
* rejected: the gallery filters on this key and must not see one language
|
|
616
|
+
* under two spellings. */
|
|
617
|
+
language: string;
|
|
609
618
|
}
|
|
610
619
|
interface TemplateDeleteResult {
|
|
611
620
|
siteId: number;
|
|
@@ -850,7 +859,7 @@ interface ToolContext {
|
|
|
850
859
|
size: number;
|
|
851
860
|
};
|
|
852
861
|
fetch: typeof fetch;
|
|
853
|
-
setActiveSiteId(siteId: number, extra?: ToolRequestExtra): void
|
|
862
|
+
setActiveSiteId(siteId: number, extra?: ToolRequestExtra): Promise<void>;
|
|
854
863
|
getBaseUrl(): string;
|
|
855
864
|
}
|
|
856
865
|
interface NeopressToolDefinition {
|
|
@@ -875,8 +884,8 @@ declare function createNeopressMcpServer(options?: NeopressMcpServerOptions): Mc
|
|
|
875
884
|
//#endregion
|
|
876
885
|
//#region src/remote/context.d.ts
|
|
877
886
|
interface RemoteSiteSelectionStore {
|
|
878
|
-
get(userKey: string): number | undefined
|
|
879
|
-
set(userKey: string, siteId: number): void
|
|
887
|
+
get(userKey: string): Promise<number | undefined>;
|
|
888
|
+
set(userKey: string, siteId: number): Promise<void>;
|
|
880
889
|
}
|
|
881
890
|
interface RemoteToolContextOptions {
|
|
882
891
|
baseUrl: string;
|
|
@@ -893,8 +902,7 @@ interface NeopressMcpHttpServerOptions {
|
|
|
893
902
|
corsOrigins?: string[] | '*';
|
|
894
903
|
fetch?: typeof fetch;
|
|
895
904
|
host?: string;
|
|
896
|
-
|
|
897
|
-
oauthProvider?: string;
|
|
905
|
+
openaiAppsChallengeToken?: string;
|
|
898
906
|
port?: number;
|
|
899
907
|
publicUrl?: string;
|
|
900
908
|
siteSelectionStore?: RemoteSiteSelectionStore;
|