@perplexity-ai/mcp-server 0.14.0 → 1.1.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/.claude-plugin/marketplace.json +49 -0
- package/LICENSE +21 -201
- package/README.md +105 -157
- package/dist/http.d.ts +15 -0
- package/dist/http.js +190 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +23 -0
- package/dist/logger.d.ts +19 -0
- package/dist/logger.js +82 -0
- package/dist/server.d.ts +61 -0
- package/dist/server.js +613 -0
- package/dist/types.d.ts +93 -0
- package/dist/types.js +1 -0
- package/dist/validation.d.ts +1063 -0
- package/dist/validation.js +62 -0
- package/package.json +67 -155
- package/compat.d.mts +0 -58
- package/compat.d.mts.map +0 -1
- package/compat.d.ts +0 -58
- package/compat.d.ts.map +0 -1
- package/compat.js +0 -387
- package/compat.js.map +0 -1
- package/compat.mjs +0 -378
- package/compat.mjs.map +0 -1
- package/dynamic-tools.d.mts +0 -12
- package/dynamic-tools.d.mts.map +0 -1
- package/dynamic-tools.d.ts +0 -12
- package/dynamic-tools.d.ts.map +0 -1
- package/dynamic-tools.js +0 -135
- package/dynamic-tools.js.map +0 -1
- package/dynamic-tools.mjs +0 -132
- package/dynamic-tools.mjs.map +0 -1
- package/filtering.d.mts +0 -2
- package/filtering.d.mts.map +0 -1
- package/filtering.d.ts +0 -2
- package/filtering.d.ts.map +0 -1
- package/filtering.js +0 -20
- package/filtering.js.map +0 -1
- package/filtering.mjs +0 -13
- package/filtering.mjs.map +0 -1
- package/headers.d.mts +0 -4
- package/headers.d.mts.map +0 -1
- package/headers.d.ts +0 -4
- package/headers.d.ts.map +0 -1
- package/headers.js +0 -22
- package/headers.js.map +0 -1
- package/headers.mjs +0 -18
- package/headers.mjs.map +0 -1
- package/http.d.mts +0 -9
- package/http.d.mts.map +0 -1
- package/http.d.ts +0 -9
- package/http.d.ts.map +0 -1
- package/http.js +0 -108
- package/http.js.map +0 -1
- package/http.mjs +0 -100
- package/http.mjs.map +0 -1
- package/index.d.mts +0 -3
- package/index.d.mts.map +0 -1
- package/index.d.ts +0 -3
- package/index.d.ts.map +0 -1
- package/index.js +0 -91
- package/index.js.map +0 -1
- package/index.mjs +0 -89
- package/index.mjs.map +0 -1
- package/options.d.mts +0 -18
- package/options.d.mts.map +0 -1
- package/options.d.ts +0 -18
- package/options.d.ts.map +0 -1
- package/options.js +0 -415
- package/options.js.map +0 -1
- package/options.mjs +0 -408
- package/options.mjs.map +0 -1
- package/server.d.mts +0 -35
- package/server.d.mts.map +0 -1
- package/server.d.ts +0 -35
- package/server.d.ts.map +0 -1
- package/server.js +0 -166
- package/server.js.map +0 -1
- package/server.mjs +0 -152
- package/server.mjs.map +0 -1
- package/src/compat.ts +0 -483
- package/src/dynamic-tools.ts +0 -159
- package/src/filtering.ts +0 -14
- package/src/headers.ts +0 -23
- package/src/http.ts +0 -127
- package/src/index.ts +0 -108
- package/src/options.ts +0 -453
- package/src/server.ts +0 -201
- package/src/stdio.ts +0 -13
- package/src/tools/chat/completions/create-chat-completions.ts +0 -1323
- package/src/tools/index.ts +0 -73
- package/src/tools/search/create-search.ts +0 -89
- package/src/tools/types.ts +0 -103
- package/src/tools.ts +0 -1
- package/src/tsconfig.json +0 -11
- package/stdio.d.mts +0 -3
- package/stdio.d.mts.map +0 -1
- package/stdio.d.ts +0 -3
- package/stdio.d.ts.map +0 -1
- package/stdio.js +0 -14
- package/stdio.js.map +0 -1
- package/stdio.mjs +0 -10
- package/stdio.mjs.map +0 -1
- package/tools/chat/completions/create-chat-completions.d.mts +0 -45
- package/tools/chat/completions/create-chat-completions.d.mts.map +0 -1
- package/tools/chat/completions/create-chat-completions.d.ts +0 -45
- package/tools/chat/completions/create-chat-completions.d.ts.map +0 -1
- package/tools/chat/completions/create-chat-completions.js +0 -1320
- package/tools/chat/completions/create-chat-completions.js.map +0 -1
- package/tools/chat/completions/create-chat-completions.mjs +0 -1316
- package/tools/chat/completions/create-chat-completions.mjs.map +0 -1
- package/tools/index.d.mts +0 -10
- package/tools/index.d.mts.map +0 -1
- package/tools/index.d.ts +0 -10
- package/tools/index.d.ts.map +0 -1
- package/tools/index.js +0 -57
- package/tools/index.js.map +0 -1
- package/tools/index.mjs +0 -50
- package/tools/index.mjs.map +0 -1
- package/tools/search/create-search.d.mts +0 -45
- package/tools/search/create-search.d.mts.map +0 -1
- package/tools/search/create-search.d.ts +0 -45
- package/tools/search/create-search.d.ts.map +0 -1
- package/tools/search/create-search.js +0 -86
- package/tools/search/create-search.js.map +0 -1
- package/tools/search/create-search.mjs +0 -82
- package/tools/search/create-search.mjs.map +0 -1
- package/tools/types.d.mts +0 -51
- package/tools/types.d.mts.map +0 -1
- package/tools/types.d.ts +0 -51
- package/tools/types.d.ts.map +0 -1
- package/tools/types.js +0 -46
- package/tools/types.js.map +0 -1
- package/tools/types.mjs +0 -42
- package/tools/types.mjs.map +0 -1
- package/tools.d.mts +0 -2
- package/tools.d.mts.map +0 -1
- package/tools.d.ts +0 -2
- package/tools.d.ts.map +0 -1
- package/tools.js +0 -18
- package/tools.js.map +0 -1
- package/tools.mjs +0 -2
- package/tools.mjs.map +0 -1
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { ProxyAgent } from "undici";
|
|
2
|
+
export interface Message {
|
|
3
|
+
role: string;
|
|
4
|
+
content: string;
|
|
5
|
+
}
|
|
6
|
+
export interface AgentInputMessage {
|
|
7
|
+
type: "message";
|
|
8
|
+
role: string;
|
|
9
|
+
content: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AgentAnnotation {
|
|
12
|
+
type?: string | null;
|
|
13
|
+
url?: string | null;
|
|
14
|
+
title?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface AgentContentPart {
|
|
17
|
+
type: string;
|
|
18
|
+
text?: string | null;
|
|
19
|
+
annotations?: AgentAnnotation[] | null;
|
|
20
|
+
}
|
|
21
|
+
export interface AgentSearchResult {
|
|
22
|
+
id?: number | null;
|
|
23
|
+
url?: string | null;
|
|
24
|
+
title?: string | null;
|
|
25
|
+
snippet?: string | null;
|
|
26
|
+
date?: string | null;
|
|
27
|
+
}
|
|
28
|
+
export interface AgentOutputItem {
|
|
29
|
+
type: string;
|
|
30
|
+
role?: string | null;
|
|
31
|
+
content?: AgentContentPart[] | null;
|
|
32
|
+
results?: AgentSearchResult[] | null;
|
|
33
|
+
}
|
|
34
|
+
export interface AgentCost {
|
|
35
|
+
total_cost?: number;
|
|
36
|
+
currency?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface AgentUsage {
|
|
39
|
+
input_tokens?: number;
|
|
40
|
+
output_tokens?: number;
|
|
41
|
+
total_tokens?: number;
|
|
42
|
+
cost?: AgentCost;
|
|
43
|
+
}
|
|
44
|
+
export interface AgentResponse {
|
|
45
|
+
id?: string | null;
|
|
46
|
+
status?: string | null;
|
|
47
|
+
model?: string | null;
|
|
48
|
+
output: AgentOutputItem[];
|
|
49
|
+
usage?: AgentUsage;
|
|
50
|
+
error?: {
|
|
51
|
+
message?: string | null;
|
|
52
|
+
type?: string | null;
|
|
53
|
+
} | null;
|
|
54
|
+
}
|
|
55
|
+
export interface SearchResult {
|
|
56
|
+
title: string;
|
|
57
|
+
url: string;
|
|
58
|
+
snippet?: string;
|
|
59
|
+
date?: string;
|
|
60
|
+
score?: number;
|
|
61
|
+
}
|
|
62
|
+
export interface SearchUsage {
|
|
63
|
+
tokens?: number;
|
|
64
|
+
}
|
|
65
|
+
export interface SearchResponse {
|
|
66
|
+
results: SearchResult[];
|
|
67
|
+
query?: string;
|
|
68
|
+
usage?: SearchUsage;
|
|
69
|
+
}
|
|
70
|
+
export interface SearchRequestBody {
|
|
71
|
+
query: string;
|
|
72
|
+
max_results: number;
|
|
73
|
+
max_tokens_per_page: number;
|
|
74
|
+
country?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface AgentToolOptions {
|
|
77
|
+
search_recency_filter?: "hour" | "day" | "week" | "month" | "year";
|
|
78
|
+
search_domain_filter?: string[];
|
|
79
|
+
search_context_size?: "low" | "medium" | "high";
|
|
80
|
+
}
|
|
81
|
+
export interface AgentProgressUpdate {
|
|
82
|
+
message: string;
|
|
83
|
+
}
|
|
84
|
+
export interface AgentCallHooks {
|
|
85
|
+
/** Abort signal from the MCP request; triggers server-side cancellation. */
|
|
86
|
+
signal?: AbortSignal;
|
|
87
|
+
/** Called with human-readable progress while the agent run is in flight. */
|
|
88
|
+
onProgress?: (update: AgentProgressUpdate) => void;
|
|
89
|
+
}
|
|
90
|
+
export interface UndiciRequestOptions {
|
|
91
|
+
[key: string]: unknown;
|
|
92
|
+
dispatcher?: ProxyAgent;
|
|
93
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|