@llamaindex/llama-cloud-mcp 2.1.0 → 2.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/code-tool-worker.js +5 -5
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +5 -5
- package/code-tool-worker.mjs.map +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.js +10 -3
- package/http.js.map +1 -1
- package/http.mjs +10 -3
- package/http.mjs.map +1 -1
- package/instructions.js +1 -1
- package/instructions.js.map +1 -1
- package/instructions.mjs +1 -1
- package/instructions.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +146 -149
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +146 -149
- package/local-docs-search.mjs.map +1 -1
- package/methods.js +30 -30
- package/methods.js.map +1 -1
- package/methods.mjs +30 -30
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +5 -5
- package/src/http.ts +13 -4
- package/src/instructions.ts +1 -1
- package/src/local-docs-search.ts +171 -178
- package/src/methods.ts +30 -30
- package/src/server.ts +1 -1
package/server.js
CHANGED
|
@@ -19,7 +19,7 @@ const instructions_1 = require("./instructions.js");
|
|
|
19
19
|
const methods_1 = require("./methods.js");
|
|
20
20
|
const newMcpServer = async ({ stainlessApiKey, customInstructionsPath, }) => new mcp_js_1.McpServer({
|
|
21
21
|
name: 'llamaindex_llama_cloud_api',
|
|
22
|
-
version: '2.
|
|
22
|
+
version: '2.3.0',
|
|
23
23
|
}, {
|
|
24
24
|
instructions: await (0, instructions_1.getInstructions)({ stainlessApiKey, customInstructionsPath }),
|
|
25
25
|
capabilities: { tools: {}, logging: {} },
|
package/server.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { getInstructions } from "./instructions.mjs";
|
|
|
10
10
|
import { blockedMethodsForCodeTool } from "./methods.mjs";
|
|
11
11
|
export const newMcpServer = async ({ stainlessApiKey, customInstructionsPath, }) => new McpServer({
|
|
12
12
|
name: 'llamaindex_llama_cloud_api',
|
|
13
|
-
version: '2.
|
|
13
|
+
version: '2.3.0',
|
|
14
14
|
}, {
|
|
15
15
|
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
|
|
16
16
|
capabilities: { tools: {}, logging: {} },
|
package/src/code-tool-worker.ts
CHANGED
|
@@ -129,6 +129,11 @@ const fuse = new Fuse(
|
|
|
129
129
|
'client.classify.create',
|
|
130
130
|
'client.classify.get',
|
|
131
131
|
'client.classify.list',
|
|
132
|
+
'client.configurations.create',
|
|
133
|
+
'client.configurations.delete',
|
|
134
|
+
'client.configurations.list',
|
|
135
|
+
'client.configurations.retrieve',
|
|
136
|
+
'client.configurations.update',
|
|
132
137
|
'client.projects.get',
|
|
133
138
|
'client.projects.list',
|
|
134
139
|
'client.dataSinks.create',
|
|
@@ -191,11 +196,6 @@ const fuse = new Fuse(
|
|
|
191
196
|
'client.beta.agentData.get',
|
|
192
197
|
'client.beta.agentData.search',
|
|
193
198
|
'client.beta.agentData.update',
|
|
194
|
-
'client.beta.parseConfigurations.create',
|
|
195
|
-
'client.beta.parseConfigurations.delete',
|
|
196
|
-
'client.beta.parseConfigurations.get',
|
|
197
|
-
'client.beta.parseConfigurations.list',
|
|
198
|
-
'client.beta.parseConfigurations.update',
|
|
199
199
|
'client.beta.sheets.create',
|
|
200
200
|
'client.beta.sheets.deleteJob',
|
|
201
201
|
'client.beta.sheets.get',
|
package/src/http.ts
CHANGED
|
@@ -69,6 +69,11 @@ const newServer = async ({
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
const mcpClientInfo =
|
|
73
|
+
typeof req.body?.params?.clientInfo?.name === 'string' ?
|
|
74
|
+
{ name: req.body.params.clientInfo.name, version: String(req.body.params.clientInfo.version ?? '') }
|
|
75
|
+
: undefined;
|
|
76
|
+
|
|
72
77
|
await initMcpServer({
|
|
73
78
|
server: server,
|
|
74
79
|
mcpOptions: effectiveMcpOptions,
|
|
@@ -79,12 +84,13 @@ const newServer = async ({
|
|
|
79
84
|
stainlessApiKey: stainlessApiKey,
|
|
80
85
|
upstreamClientEnvs,
|
|
81
86
|
mcpSessionId: (req as any).mcpSessionId,
|
|
82
|
-
mcpClientInfo
|
|
83
|
-
typeof req.body?.params?.clientInfo?.name === 'string' ?
|
|
84
|
-
{ name: req.body.params.clientInfo.name, version: String(req.body.params.clientInfo.version ?? '') }
|
|
85
|
-
: undefined,
|
|
87
|
+
mcpClientInfo,
|
|
86
88
|
});
|
|
87
89
|
|
|
90
|
+
if (mcpClientInfo) {
|
|
91
|
+
getLogger().info({ mcpSessionId: (req as any).mcpSessionId, mcpClientInfo }, 'MCP client connected');
|
|
92
|
+
}
|
|
93
|
+
|
|
88
94
|
return server;
|
|
89
95
|
};
|
|
90
96
|
|
|
@@ -154,6 +160,9 @@ export const streamableHTTPApp = ({
|
|
|
154
160
|
app.use(
|
|
155
161
|
pinoHttp({
|
|
156
162
|
logger: getLogger(),
|
|
163
|
+
customProps: (req) => ({
|
|
164
|
+
mcpSessionId: (req as any).mcpSessionId,
|
|
165
|
+
}),
|
|
157
166
|
customLogLevel: (req, res) => {
|
|
158
167
|
if (res.statusCode >= 500) {
|
|
159
168
|
return 'error';
|
package/src/instructions.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import fs from 'fs/promises';
|
|
4
|
-
import { readEnv } from './util';
|
|
5
4
|
import { getLogger } from './logger';
|
|
5
|
+
import { readEnv } from './util';
|
|
6
6
|
|
|
7
7
|
const INSTRUCTIONS_CACHE_TTL_MS = 15 * 60 * 1000; // 15 minutes
|
|
8
8
|
|