@rvry/mcp 0.11.0 → 0.11.1
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/client.d.ts +1 -1
- package/dist/client.js +4 -1
- package/dist/index.js +22 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -39,4 +39,4 @@ export interface ThinkResponse {
|
|
|
39
39
|
* Call the RVRY engine /api/v1/think endpoint with a specific tool.
|
|
40
40
|
* Start a new session by omitting sessionId, or continue by providing one.
|
|
41
41
|
*/
|
|
42
|
-
export declare function callTool(tool: RvryTool, input: string, token: string, sessionId?: string, skipScoping?: boolean, userConstraints?: string[]): Promise<ThinkResponse>;
|
|
42
|
+
export declare function callTool(tool: RvryTool, input: string, token: string, sessionId?: string, skipScoping?: boolean, userConstraints?: string[], requiresCurrentData?: boolean): Promise<ThinkResponse>;
|
package/dist/client.js
CHANGED
|
@@ -7,7 +7,7 @@ const DEFAULT_ENGINE_URL = 'https://engine.rvry.ai';
|
|
|
7
7
|
* Call the RVRY engine /api/v1/think endpoint with a specific tool.
|
|
8
8
|
* Start a new session by omitting sessionId, or continue by providing one.
|
|
9
9
|
*/
|
|
10
|
-
export async function callTool(tool, input, token, sessionId, skipScoping, userConstraints) {
|
|
10
|
+
export async function callTool(tool, input, token, sessionId, skipScoping, userConstraints, requiresCurrentData) {
|
|
11
11
|
const baseUrl = process.env.RVRY_ENGINE_URL ?? DEFAULT_ENGINE_URL;
|
|
12
12
|
const body = { input, tool };
|
|
13
13
|
if (sessionId) {
|
|
@@ -19,6 +19,9 @@ export async function callTool(tool, input, token, sessionId, skipScoping, userC
|
|
|
19
19
|
if (userConstraints && userConstraints.length > 0) {
|
|
20
20
|
body.userConstraints = userConstraints;
|
|
21
21
|
}
|
|
22
|
+
if (requiresCurrentData) {
|
|
23
|
+
body.requiresCurrentData = true;
|
|
24
|
+
}
|
|
22
25
|
const res = await fetch(`${baseUrl}/api/v1/think`, {
|
|
23
26
|
method: 'POST',
|
|
24
27
|
headers: {
|
package/dist/index.js
CHANGED
|
@@ -67,6 +67,10 @@ const TOOL_DEFS = [
|
|
|
67
67
|
items: { type: 'string' },
|
|
68
68
|
description: 'User-stated directives or requirements to track throughout the session.',
|
|
69
69
|
},
|
|
70
|
+
requiresCurrentData: {
|
|
71
|
+
type: 'boolean',
|
|
72
|
+
description: 'Set to true when the question depends on facts, policies, prices, regulations, or events that may have changed.',
|
|
73
|
+
},
|
|
70
74
|
},
|
|
71
75
|
required: ['input'],
|
|
72
76
|
},
|
|
@@ -101,6 +105,10 @@ const TOOL_DEFS = [
|
|
|
101
105
|
items: { type: 'string' },
|
|
102
106
|
description: 'User-stated directives or requirements to track throughout the session.',
|
|
103
107
|
},
|
|
108
|
+
requiresCurrentData: {
|
|
109
|
+
type: 'boolean',
|
|
110
|
+
description: 'Set to true when the question depends on facts, policies, prices, regulations, or events that may have changed.',
|
|
111
|
+
},
|
|
104
112
|
},
|
|
105
113
|
required: ['input'],
|
|
106
114
|
},
|
|
@@ -134,6 +142,10 @@ const TOOL_DEFS = [
|
|
|
134
142
|
items: { type: 'string' },
|
|
135
143
|
description: 'User-stated directives or requirements to track throughout the session.',
|
|
136
144
|
},
|
|
145
|
+
requiresCurrentData: {
|
|
146
|
+
type: 'boolean',
|
|
147
|
+
description: 'Set to true when the question depends on facts, policies, prices, regulations, or events that may have changed.',
|
|
148
|
+
},
|
|
137
149
|
},
|
|
138
150
|
required: ['input'],
|
|
139
151
|
},
|
|
@@ -167,6 +179,10 @@ const TOOL_DEFS = [
|
|
|
167
179
|
items: { type: 'string' },
|
|
168
180
|
description: 'User-stated directives or requirements to track throughout the session.',
|
|
169
181
|
},
|
|
182
|
+
requiresCurrentData: {
|
|
183
|
+
type: 'boolean',
|
|
184
|
+
description: 'Set to true when the question depends on facts, policies, prices, regulations, or events that may have changed.',
|
|
185
|
+
},
|
|
170
186
|
},
|
|
171
187
|
required: ['input'],
|
|
172
188
|
},
|
|
@@ -191,6 +207,10 @@ const TOOL_DEFS = [
|
|
|
191
207
|
type: 'string',
|
|
192
208
|
description: 'Session ID for continuing an existing session. Omit to start a new session.',
|
|
193
209
|
},
|
|
210
|
+
requiresCurrentData: {
|
|
211
|
+
type: 'boolean',
|
|
212
|
+
description: 'Set to true when the question depends on facts, policies, prices, regulations, or events that may have changed.',
|
|
213
|
+
},
|
|
194
214
|
},
|
|
195
215
|
required: ['input'],
|
|
196
216
|
},
|
|
@@ -262,6 +282,7 @@ async function main() {
|
|
|
262
282
|
}
|
|
263
283
|
const sessionId = typeof typedArgs?.sessionId === 'string' ? typedArgs.sessionId : undefined;
|
|
264
284
|
const skipScoping = typedArgs?.skipScoping === true;
|
|
285
|
+
const requiresCurrentData = typedArgs?.requiresCurrentData === true;
|
|
265
286
|
const userConstraints = Array.isArray(typedArgs?.userConstraints)
|
|
266
287
|
? typedArgs.userConstraints.filter(s => typeof s === 'string')
|
|
267
288
|
: undefined;
|
|
@@ -275,7 +296,7 @@ async function main() {
|
|
|
275
296
|
question = questionCache.get(sessionId) ?? input;
|
|
276
297
|
}
|
|
277
298
|
try {
|
|
278
|
-
const result = await callTool(rvryTool, input, token, sessionId, skipScoping || undefined, userConstraints);
|
|
299
|
+
const result = await callTool(rvryTool, input, token, sessionId, skipScoping || undefined, userConstraints, requiresCurrentData || undefined);
|
|
279
300
|
// Cache question on first call (now we have the sessionId)
|
|
280
301
|
if (!sessionId) {
|
|
281
302
|
questionCache.set(result.sessionId, input);
|