@cursor/july 0.1.86 → 0.1.88
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/agent-serve.js +7 -0
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +4 -2
- package/dist/internal/cli-docs.js +11 -0
- package/dist/internal/cloud-merge.d.ts +3 -1
- package/dist/internal/cloud-merge.d.ts.map +1 -1
- package/dist/internal/cloud-merge.js +10 -2
- package/dist/internal/cursor/backend-client.d.ts +4 -0
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +4 -0
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +87 -11
- package/dist/internal/docs-site.d.ts +13 -2
- package/dist/internal/docs-site.d.ts.map +1 -1
- package/dist/internal/docs-site.js +76 -13
- package/dist/internal/grokbot/runner.d.ts +61 -0
- package/dist/internal/grokbot/runner.d.ts.map +1 -0
- package/dist/internal/grokbot/runner.js +278 -0
- package/dist/internal/mcp-endpoint.js +4 -2
- package/dist/internal/mcp-host.d.ts +14 -1
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +41 -2
- package/dist/internal/runtime-dispatch-runner.d.ts +30 -0
- package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -0
- package/dist/internal/runtime-dispatch-runner.js +60 -0
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +7 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +24 -1
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +36 -18
- package/dist/types.d.ts +64 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/bin/agent-serve.ts +8 -0
- package/src/internal/advertise-tools.ts +6 -0
- package/src/internal/cli-docs.ts +11 -0
- package/src/internal/cloud-merge.ts +12 -2
- package/src/internal/cursor/backend-client.ts +4 -0
- package/src/internal/discovery.ts +133 -13
- package/src/internal/docs-site.ts +83 -13
- package/src/internal/grokbot/runner.ts +361 -0
- package/src/internal/mcp-endpoint.ts +4 -0
- package/src/internal/mcp-host.ts +48 -0
- package/src/internal/runtime-dispatch-runner.ts +63 -0
- package/src/internal/sdk-runner.ts +9 -0
- package/src/internal/server.ts +32 -4
- package/src/internal/session-engine.ts +40 -15
- package/src/types.ts +65 -2
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The grokbot runtime's remote client — a thin client like `"cloud"`.
|
|
3
|
+
* Turns execute on Cursor's hosted Grok Bot (Sand) harness (the Temporal
|
|
4
|
+
* turn workflow and the account's own computer), reached through the
|
|
5
|
+
* public `/v0/grokbot` session API.
|
|
6
|
+
*
|
|
7
|
+
* Sand delivery contract, preserved end to end: only content the agent
|
|
8
|
+
* delivers through SendToUser becomes the user-visible reply. The hosted
|
|
9
|
+
* transcript exposes those deliveries as `send-message` entries; the
|
|
10
|
+
* agent's internal monologue never appears in the transcript, so it can
|
|
11
|
+
* never leak into the session reply.
|
|
12
|
+
*/
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
import { randomUUID } from "node:crypto";
|
|
23
|
+
import { cursorBackendUrl } from "../cursor/credentials.js";
|
|
24
|
+
const DEFAULT_POLL_INTERVAL_MS = 750;
|
|
25
|
+
const DEFAULT_TURN_TIMEOUT_MS = 20 * 60 * 1000;
|
|
26
|
+
/**
|
|
27
|
+
* Idle polls required after a send before the turn is considered settled
|
|
28
|
+
* when the workflow never reported busy — covers the window between the
|
|
29
|
+
* accepted dispatch and the workflow picking the signal up.
|
|
30
|
+
*/
|
|
31
|
+
const MIN_IDLE_POLLS_WITHOUT_BUSY = 4;
|
|
32
|
+
class GrokBotApiError extends Error {
|
|
33
|
+
constructor(status, path, body) {
|
|
34
|
+
super(`Grok Bot API ${path} failed (HTTP ${status}): ${body.slice(0, 300)}`);
|
|
35
|
+
this.status = status;
|
|
36
|
+
this.path = path;
|
|
37
|
+
this.name = "GrokBotApiError";
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** Minimal `/v0/grokbot` client: bearer API key, JSON in/out. */
|
|
41
|
+
class GrokBotApiClient {
|
|
42
|
+
constructor(options) {
|
|
43
|
+
var _a, _b, _c;
|
|
44
|
+
this.fetchImpl = (_a = options.fetchImpl) !== null && _a !== void 0 ? _a : fetch;
|
|
45
|
+
this.baseUrl = ((_b = options.backendUrl) !== null && _b !== void 0 ? _b : cursorBackendUrl()).replace(/\/$/, "");
|
|
46
|
+
const apiKey = (_c = options.apiKey) !== null && _c !== void 0 ? _c : process.env.CURSOR_API_KEY;
|
|
47
|
+
if (apiKey === undefined || apiKey === "") {
|
|
48
|
+
throw new Error('runtime: "grokbot" needs a Cursor API key (CURSOR_API_KEY or agent-sdk login) to reach the hosted Grok Bot harness.');
|
|
49
|
+
}
|
|
50
|
+
this.apiKey = apiKey;
|
|
51
|
+
}
|
|
52
|
+
request(args) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const headers = {
|
|
55
|
+
authorization: `Bearer ${this.apiKey}`,
|
|
56
|
+
};
|
|
57
|
+
if (args.body !== undefined) {
|
|
58
|
+
headers["content-type"] = "application/json";
|
|
59
|
+
}
|
|
60
|
+
const response = yield this.fetchImpl(`${this.baseUrl}${args.path}`, {
|
|
61
|
+
method: args.method,
|
|
62
|
+
headers,
|
|
63
|
+
body: args.body === undefined ? undefined : JSON.stringify(args.body),
|
|
64
|
+
});
|
|
65
|
+
if (!response.ok) {
|
|
66
|
+
throw new GrokBotApiError(response.status, args.path, yield response.text().catch(() => ""));
|
|
67
|
+
}
|
|
68
|
+
return (yield response.json());
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
createSession(args) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
return yield this.request({
|
|
74
|
+
method: "POST",
|
|
75
|
+
path: "/v0/grokbot/sessions",
|
|
76
|
+
body: { name: args.name, instructions: args.instructions },
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
sendMessage(args) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
return yield this.request({
|
|
83
|
+
method: "POST",
|
|
84
|
+
path: `/v0/grokbot/sessions/${args.sessionId}/messages`,
|
|
85
|
+
body: { text: args.text, messageId: randomUUID() },
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
listEntries(args) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
return yield this.request({
|
|
92
|
+
method: "GET",
|
|
93
|
+
path: `/v0/grokbot/sessions/${args.sessionId}/entries?afterUpdatedSeq=${args.afterUpdatedSeq}`,
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
interrupt(args) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
yield this.request({
|
|
100
|
+
method: "POST",
|
|
101
|
+
path: `/v0/grokbot/sessions/${args.sessionId}/interrupt`,
|
|
102
|
+
body: { reason: args.reason },
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
export class GrokBotRunner {
|
|
108
|
+
constructor(options = {}) {
|
|
109
|
+
this.options = options;
|
|
110
|
+
/**
|
|
111
|
+
* One hosted Grok Bot agent per SDK agent name — the backend
|
|
112
|
+
* get-or-creates by name, so every SDK session forwards into the same
|
|
113
|
+
* hosted agent and conversation, and the Grok Bot app shows one agent
|
|
114
|
+
* rather than one per session.
|
|
115
|
+
*/
|
|
116
|
+
this.agents = new Map();
|
|
117
|
+
/**
|
|
118
|
+
* Per-hosted-agent turn chain. Sessions share one hosted conversation
|
|
119
|
+
* and one transcript cursor, so turns run one at a time per agent:
|
|
120
|
+
* deliveries attribute to the turn that sent them, and an abort only
|
|
121
|
+
* interrupts its own turn — mirroring the hosted workflow's own queue.
|
|
122
|
+
*/
|
|
123
|
+
this.turns = new Map();
|
|
124
|
+
}
|
|
125
|
+
runTurn(request) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
var _a;
|
|
128
|
+
if (request.runtime !== "grokbot") {
|
|
129
|
+
throw new Error(`Session ${request.sessionId} is a ${request.runtime} turn, which the Grok Bot runner cannot execute.`);
|
|
130
|
+
}
|
|
131
|
+
if (request.images !== undefined && request.images.length > 0) {
|
|
132
|
+
// Attachments ride the hosted box's upload path, which the /v0
|
|
133
|
+
// session API does not expose yet. Refuse rather than silently
|
|
134
|
+
// dropping what the user attached.
|
|
135
|
+
throw new Error("Image attachments are not supported on grokbot turns yet.");
|
|
136
|
+
}
|
|
137
|
+
const name = hostedAgentName(request);
|
|
138
|
+
const previous = (_a = this.turns.get(name)) !== null && _a !== void 0 ? _a : Promise.resolve();
|
|
139
|
+
const run = previous.then(() => this.executeTurn(request));
|
|
140
|
+
this.turns.set(name, run.catch(() => { }));
|
|
141
|
+
return yield run;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
executeTurn(request) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
var _a, _b;
|
|
147
|
+
const signal = request.signal;
|
|
148
|
+
if ((signal === null || signal === void 0 ? void 0 : signal.aborted) === true) {
|
|
149
|
+
return { status: "cancelled" };
|
|
150
|
+
}
|
|
151
|
+
const client = this.ensureClient();
|
|
152
|
+
const entry = yield this.getAgent(client, request);
|
|
153
|
+
const send = yield client.sendMessage({
|
|
154
|
+
sessionId: entry.remoteId,
|
|
155
|
+
text: request.prompt,
|
|
156
|
+
});
|
|
157
|
+
if (send.delivery !== "accepted_temporal" &&
|
|
158
|
+
send.delivery !== "duplicate") {
|
|
159
|
+
throw new Error(`The hosted Grok Bot harness did not accept the turn (delivery: ${send.delivery}).`);
|
|
160
|
+
}
|
|
161
|
+
const pollIntervalMs = (_a = this.options.pollIntervalMs) !== null && _a !== void 0 ? _a : DEFAULT_POLL_INTERVAL_MS;
|
|
162
|
+
const turnTimeoutMs = (_b = this.options.turnTimeoutMs) !== null && _b !== void 0 ? _b : DEFAULT_TURN_TIMEOUT_MS;
|
|
163
|
+
const deadline = Date.now() + turnTimeoutMs;
|
|
164
|
+
const delivered = [];
|
|
165
|
+
let sawBusy = false;
|
|
166
|
+
let idlePolls = 0;
|
|
167
|
+
while (true) {
|
|
168
|
+
// On abort: interrupt the hosted run, drain entries once so a reply
|
|
169
|
+
// that already landed still streams out, then cancel.
|
|
170
|
+
const aborted = isAborted(signal);
|
|
171
|
+
if (aborted) {
|
|
172
|
+
yield client
|
|
173
|
+
.interrupt({
|
|
174
|
+
sessionId: entry.remoteId,
|
|
175
|
+
reason: "The user sent a new message.",
|
|
176
|
+
})
|
|
177
|
+
.catch(() => { });
|
|
178
|
+
}
|
|
179
|
+
const page = yield client.listEntries({
|
|
180
|
+
sessionId: entry.remoteId,
|
|
181
|
+
afterUpdatedSeq: entry.lastUpdatedSeq,
|
|
182
|
+
});
|
|
183
|
+
entry.lastUpdatedSeq = BigInt(page.latestUpdatedSeq);
|
|
184
|
+
for (const item of page.entries) {
|
|
185
|
+
if (item.kind !== "send-message" || item.text === undefined) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
const delta = delivered.length === 0 ? item.text : `\n\n${item.text}`;
|
|
189
|
+
delivered.push(item.text);
|
|
190
|
+
// The emit callback may be async; a rejection must never escape
|
|
191
|
+
// the poll loop.
|
|
192
|
+
void Promise.resolve(request.onUpdate({ type: "text-delta", text: delta })).catch(() => { });
|
|
193
|
+
}
|
|
194
|
+
if (aborted) {
|
|
195
|
+
return { status: "cancelled" };
|
|
196
|
+
}
|
|
197
|
+
if (page.turn.inFlight || page.turn.queued > 0) {
|
|
198
|
+
sawBusy = true;
|
|
199
|
+
}
|
|
200
|
+
else if (page.turn.idle) {
|
|
201
|
+
idlePolls += 1;
|
|
202
|
+
if (sawBusy || idlePolls >= MIN_IDLE_POLLS_WITHOUT_BUSY) {
|
|
203
|
+
return {
|
|
204
|
+
status: "finished",
|
|
205
|
+
result: delivered.length === 0 ? undefined : delivered.join("\n\n"),
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (Date.now() >= deadline) {
|
|
210
|
+
throw new Error(`The grokbot turn for session ${request.sessionId} did not settle within ${Math.round(turnTimeoutMs / 60000)} minutes.`);
|
|
211
|
+
}
|
|
212
|
+
yield this.sleep(pollIntervalMs, signal);
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
dispose() {
|
|
217
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
218
|
+
// Hosted agents live server-side (the account's Grok Bot agents);
|
|
219
|
+
// nothing in this process holds conversation state.
|
|
220
|
+
this.agents.clear();
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
ensureClient() {
|
|
224
|
+
var _a;
|
|
225
|
+
(_a = this.client) !== null && _a !== void 0 ? _a : (this.client = new GrokBotApiClient(this.options));
|
|
226
|
+
return this.client;
|
|
227
|
+
}
|
|
228
|
+
getAgent(client, request) {
|
|
229
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
const name = hostedAgentName(request);
|
|
231
|
+
const existing = this.agents.get(name);
|
|
232
|
+
if (existing !== undefined) {
|
|
233
|
+
return existing;
|
|
234
|
+
}
|
|
235
|
+
// Get-or-create: a reconnect (new process, same agent name) lands on
|
|
236
|
+
// the existing hosted agent. The returned tail seq starts the cursor
|
|
237
|
+
// after the hosted conversation's history so an old transcript never
|
|
238
|
+
// replays into this turn's reply.
|
|
239
|
+
const created = yield client.createSession({
|
|
240
|
+
name,
|
|
241
|
+
instructions: request.instructions,
|
|
242
|
+
});
|
|
243
|
+
const entry = {
|
|
244
|
+
remoteId: created.id,
|
|
245
|
+
lastUpdatedSeq: BigInt(created.latestUpdatedSeq),
|
|
246
|
+
};
|
|
247
|
+
this.agents.set(name, entry);
|
|
248
|
+
return entry;
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
sleep(ms, signal) {
|
|
252
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
253
|
+
yield new Promise((resolve) => {
|
|
254
|
+
const timer = setTimeout(() => {
|
|
255
|
+
signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", onAbort);
|
|
256
|
+
resolve();
|
|
257
|
+
}, ms);
|
|
258
|
+
const onAbort = () => {
|
|
259
|
+
clearTimeout(timer);
|
|
260
|
+
resolve();
|
|
261
|
+
};
|
|
262
|
+
signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", onAbort, { once: true });
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
function hostedAgentName(request) {
|
|
268
|
+
var _a;
|
|
269
|
+
return (_a = request.agentName) !== null && _a !== void 0 ? _a : "Agent SDK agent";
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* `AbortSignal.aborted` is readonly to TypeScript, so an inline recheck
|
|
273
|
+
* after an await narrows to the stale pre-await value; the function
|
|
274
|
+
* boundary keeps the recheck honest.
|
|
275
|
+
*/
|
|
276
|
+
function isAborted(signal) {
|
|
277
|
+
return (signal === null || signal === void 0 ? void 0 : signal.aborted) === true;
|
|
278
|
+
}
|
|
@@ -202,11 +202,13 @@ function buildConnectionBridgeMcpServer(engine, sessionId, connectionName) {
|
|
|
202
202
|
}
|
|
203
203
|
const tools = yield engine.host.mcp.listTools(connectionName);
|
|
204
204
|
return {
|
|
205
|
-
tools: tools.map((tool) => { var _a; return (Object.assign(Object.assign(Object.assign({ name: tool.name }, (tool.description === undefined
|
|
205
|
+
tools: tools.map((tool) => { var _a; return (Object.assign(Object.assign(Object.assign(Object.assign({ name: tool.name }, (tool.description === undefined
|
|
206
206
|
? {}
|
|
207
207
|
: { description: tool.description })), { inputSchema: (_a = tool.inputSchema) !== null && _a !== void 0 ? _a : { type: "object" } }), (tool.outputSchema === undefined
|
|
208
208
|
? {}
|
|
209
|
-
: { outputSchema: tool.outputSchema }))
|
|
209
|
+
: { outputSchema: tool.outputSchema })), (tool.annotations === undefined
|
|
210
|
+
? {}
|
|
211
|
+
: { annotations: tool.annotations }))); }),
|
|
210
212
|
};
|
|
211
213
|
}));
|
|
212
214
|
server.setRequestHandler(CallToolRequestSchema, (request) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - channel / webhook route handlers through
|
|
9
9
|
* {@link HostMcpRegistry} on {@link ChannelHandlerArgs.host}.mcp
|
|
10
10
|
*/
|
|
11
|
-
import type { DiscoveredConnection, HostMcpCallResult, HostMcpRegistry, HostMcpToolInfo } from "../types.js";
|
|
11
|
+
import type { DiscoveredConnection, HostMcpCallResult, HostMcpRegistry, HostMcpToolInfo, McpToolAnnotations } from "../types.js";
|
|
12
12
|
/**
|
|
13
13
|
* A non-caching view of one connection: every operation opens a fresh
|
|
14
14
|
* client and closes it afterwards. See {@link McpHost.oneOff}.
|
|
@@ -56,4 +56,17 @@ export declare class McpHost implements HostMcpRegistry {
|
|
|
56
56
|
}
|
|
57
57
|
/** Exported for unit tests. */
|
|
58
58
|
export declare function isStaleMcpSessionError(error: unknown): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Bound a server's `Tool.annotations` to the MCP-spec fields: the four
|
|
61
|
+
* boolean hints plus a length-capped `title`. A server cannot stuff
|
|
62
|
+
* arbitrary payloads into every listing, and malformed values (a non-boolean
|
|
63
|
+
* hint, a non-object) behave like absent ones so consumers fail closed.
|
|
64
|
+
*
|
|
65
|
+
* Mirrors `@anysphere/mcp-core/mcp-tool-annotations` (`toolAnnotationsJsonField`),
|
|
66
|
+
* which this package cannot import: it publishes to npm and cannot take a
|
|
67
|
+
* workspace-only runtime dependency. Keep the two in sync.
|
|
68
|
+
*
|
|
69
|
+
* Exported for unit tests.
|
|
70
|
+
*/
|
|
71
|
+
export declare function boundedToolAnnotations(annotations: unknown): McpToolAnnotations | undefined;
|
|
59
72
|
//# sourceMappingURL=mcp-host.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-host.d.ts","sourceRoot":"","sources":["../../src/internal/mcp-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,eAAe,
|
|
1
|
+
{"version":3,"file":"mcp-host.d.ts","sourceRoot":"","sources":["../../src/internal/mcp-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,eAAe,EAEf,kBAAkB,EACnB,MAAM,aAAa,CAAC;AASrB;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IACxC,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC/B;AAED,qBAAa,OAAQ,YAAW,eAAe;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2C;IAClE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgD;IAExE,YAAY,WAAW,EAAE,oBAAoB,EAAE,EAI9C;IAED;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,oBAAoB,GAAG,IAAI,CAEpD;IAED,KAAK,IAAI,MAAM,EAAE,CAEhB;IAEK,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAKlE;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAU,EAAE,oBAAoB,GAAG,aAAa,CA0BtD;IAEK,QAAQ,CACZ,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACjC,OAAO,CAAC,iBAAiB,CAAC,CAQ5B;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAU3B;IAED;;;;;;;;OAQG;YACW,UAAU;IAiBxB,OAAO,CAAC,SAAS;YAYH,gBAAgB;YAiBhB,OAAO;CAUtB;AAED,+BAA+B;AAC/B,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAU9D;AAKD;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,OAAO,GACnB,kBAAkB,GAAG,SAAS,CAyBhC"}
|
|
@@ -180,14 +180,53 @@ export function isStaleMcpSessionError(error) {
|
|
|
180
180
|
const code = error.code;
|
|
181
181
|
return code === 404;
|
|
182
182
|
}
|
|
183
|
+
/** Longest server-supplied annotation title carried off a listing. */
|
|
184
|
+
const MAX_TOOL_ANNOTATION_TITLE_LENGTH = 256;
|
|
185
|
+
/**
|
|
186
|
+
* Bound a server's `Tool.annotations` to the MCP-spec fields: the four
|
|
187
|
+
* boolean hints plus a length-capped `title`. A server cannot stuff
|
|
188
|
+
* arbitrary payloads into every listing, and malformed values (a non-boolean
|
|
189
|
+
* hint, a non-object) behave like absent ones so consumers fail closed.
|
|
190
|
+
*
|
|
191
|
+
* Mirrors `@anysphere/mcp-core/mcp-tool-annotations` (`toolAnnotationsJsonField`),
|
|
192
|
+
* which this package cannot import: it publishes to npm and cannot take a
|
|
193
|
+
* workspace-only runtime dependency. Keep the two in sync.
|
|
194
|
+
*
|
|
195
|
+
* Exported for unit tests.
|
|
196
|
+
*/
|
|
197
|
+
export function boundedToolAnnotations(annotations) {
|
|
198
|
+
if (typeof annotations !== "object" ||
|
|
199
|
+
annotations === null ||
|
|
200
|
+
Array.isArray(annotations)) {
|
|
201
|
+
return undefined;
|
|
202
|
+
}
|
|
203
|
+
const record = annotations;
|
|
204
|
+
const bounded = {};
|
|
205
|
+
if (typeof record.title === "string" && record.title.length > 0) {
|
|
206
|
+
bounded.title = record.title.slice(0, MAX_TOOL_ANNOTATION_TITLE_LENGTH);
|
|
207
|
+
}
|
|
208
|
+
for (const key of [
|
|
209
|
+
"readOnlyHint",
|
|
210
|
+
"destructiveHint",
|
|
211
|
+
"idempotentHint",
|
|
212
|
+
"openWorldHint",
|
|
213
|
+
]) {
|
|
214
|
+
const value = record[key];
|
|
215
|
+
if (typeof value === "boolean") {
|
|
216
|
+
bounded[key] = value;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return Object.keys(bounded).length === 0 ? undefined : bounded;
|
|
220
|
+
}
|
|
183
221
|
function toToolInfo(tool) {
|
|
184
|
-
|
|
222
|
+
const annotations = boundedToolAnnotations(tool.annotations);
|
|
223
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({ name: tool.name }, (tool.description === undefined
|
|
185
224
|
? {}
|
|
186
225
|
: { description: tool.description })), (tool.inputSchema === undefined
|
|
187
226
|
? {}
|
|
188
227
|
: { inputSchema: tool.inputSchema })), (tool.outputSchema === undefined
|
|
189
228
|
? {}
|
|
190
|
-
: { outputSchema: tool.outputSchema }));
|
|
229
|
+
: { outputSchema: tool.outputSchema })), (annotations === undefined ? {} : { annotations }));
|
|
191
230
|
}
|
|
192
231
|
function openConnection(connection) {
|
|
193
232
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routes each turn to the runner that owns its runtime: local and cloud
|
|
3
|
+
* turns stay on the Cursor SDK runner, grokbot turns go to the Grok Bot
|
|
4
|
+
* remote client (`internal/grokbot/runner.ts`), which drives the hosted
|
|
5
|
+
* Grok Bot (Sand) harness through the public `/v0/grokbot` session API.
|
|
6
|
+
* Both runners ship in the published package.
|
|
7
|
+
*/
|
|
8
|
+
import type { RunnerTurnRequest, TurnOutcome } from "../types.js";
|
|
9
|
+
import type { GrokBotRunnerOptions } from "./grokbot/runner.js";
|
|
10
|
+
import type { AgentRunner, PrewarmOutcome, RunnerPrewarmRequest } from "./sdk-runner.js";
|
|
11
|
+
export interface RuntimeDispatchingRunnerOptions {
|
|
12
|
+
sdkRunner: AgentRunner;
|
|
13
|
+
grokbot?: GrokBotRunnerOptions;
|
|
14
|
+
/** Test seam — replaces the real Grok Bot remote client. */
|
|
15
|
+
createGrokBotRunner?: (options: GrokBotRunnerOptions) => AgentRunner;
|
|
16
|
+
}
|
|
17
|
+
export declare class RuntimeDispatchingRunner implements AgentRunner {
|
|
18
|
+
private readonly options;
|
|
19
|
+
private grokbotRunner;
|
|
20
|
+
constructor(options: RuntimeDispatchingRunnerOptions);
|
|
21
|
+
/**
|
|
22
|
+
* The Grok Bot remote client, created on first use; a missing API key
|
|
23
|
+
* surfaces on the first grokbot turn, not at serve start.
|
|
24
|
+
*/
|
|
25
|
+
ensureGrokBotRunner(): AgentRunner;
|
|
26
|
+
runTurn(request: RunnerTurnRequest): Promise<TurnOutcome>;
|
|
27
|
+
prewarm(request: RunnerPrewarmRequest): Promise<PrewarmOutcome>;
|
|
28
|
+
dispose(): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=runtime-dispatch-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-dispatch-runner.d.ts","sourceRoot":"","sources":["../../src/internal/runtime-dispatch-runner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,+BAA+B;IAC9C,SAAS,EAAE,WAAW,CAAC;IACvB,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,4DAA4D;IAC5D,mBAAmB,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,WAAW,CAAC;CACtE;AAED,qBAAa,wBAAyB,YAAW,WAAW;IAG9C,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,aAAa,CAA0B;IAE/C,YAA6B,OAAO,EAAE,+BAA+B,EAAI;IAEzE;;;OAGG;IACH,mBAAmB,IAAI,WAAW,CAKjC;IAEK,OAAO,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAK9D;IAEK,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CASpE;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAG7B;CACF"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routes each turn to the runner that owns its runtime: local and cloud
|
|
3
|
+
* turns stay on the Cursor SDK runner, grokbot turns go to the Grok Bot
|
|
4
|
+
* remote client (`internal/grokbot/runner.ts`), which drives the hosted
|
|
5
|
+
* Grok Bot (Sand) harness through the public `/v0/grokbot` session API.
|
|
6
|
+
* Both runners ship in the published package.
|
|
7
|
+
*/
|
|
8
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
10
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
12
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
13
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
14
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
import { GrokBotRunner } from "./grokbot/runner.js";
|
|
18
|
+
export class RuntimeDispatchingRunner {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this.options = options;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The Grok Bot remote client, created on first use; a missing API key
|
|
24
|
+
* surfaces on the first grokbot turn, not at serve start.
|
|
25
|
+
*/
|
|
26
|
+
ensureGrokBotRunner() {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
var _c, _d, _e;
|
|
29
|
+
const options = (_c = this.options.grokbot) !== null && _c !== void 0 ? _c : {};
|
|
30
|
+
(_d = this.grokbotRunner) !== null && _d !== void 0 ? _d : (this.grokbotRunner = (_e = (_b = (_a = this.options).createGrokBotRunner) === null || _b === void 0 ? void 0 : _b.call(_a, options)) !== null && _e !== void 0 ? _e : new GrokBotRunner(options));
|
|
31
|
+
return this.grokbotRunner;
|
|
32
|
+
}
|
|
33
|
+
runTurn(request) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (request.runtime === "grokbot") {
|
|
36
|
+
return this.ensureGrokBotRunner().runTurn(request);
|
|
37
|
+
}
|
|
38
|
+
return this.options.sdkRunner.runTurn(request);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
prewarm(request) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
var _c;
|
|
45
|
+
// Prewarming is a local-harness concern; the engine only calls it for
|
|
46
|
+
// local-runtime agents.
|
|
47
|
+
return ((_c = (_b = (_a = this.options.sdkRunner).prewarm) === null || _b === void 0 ? void 0 : _b.call(_a, request)) !== null && _c !== void 0 ? _c : {
|
|
48
|
+
warmed: false,
|
|
49
|
+
reason: "the Cursor SDK runner does not support prewarming",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
dispose() {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
var _a, _b, _c, _d;
|
|
56
|
+
yield (_b = (_a = this.options.sdkRunner).dispose) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
57
|
+
yield (_d = (_c = this.grokbotRunner) === null || _c === void 0 ? void 0 : _c.dispose) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-runner.d.ts","sourceRoot":"","sources":["../../src/internal/sdk-runner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAOL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,SAAS,EAEf,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAEjB,MAAM,aAAa,CAAC;AAGrB,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1D;;;;;OAKG;IACH,OAAO,CAAC,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IACjE,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,iBAAiB,EACf,cAAc,GACd,gBAAgB,GAChB,SAAS,GACT,OAAO,GACP,YAAY,GACZ,mBAAmB,GACnB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C,SAAS,EAAE,OAAO,CAAC,GAAG,MAAM,CAExE"}
|
|
@@ -107,6 +107,13 @@ export class CursorSdkRunner {
|
|
|
107
107
|
runTurn(request) {
|
|
108
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
109
|
var _a;
|
|
110
|
+
// Fail closed: this runner only knows the Cursor SDK's local and cloud
|
|
111
|
+
// harnesses. A grokbot turn reaching it means the serve wiring skipped
|
|
112
|
+
// the Grok Bot runner — running it on the local harness would silently
|
|
113
|
+
// swap the box (and the SendToUser contract) out from under the agent.
|
|
114
|
+
if (request.runtime === "grokbot") {
|
|
115
|
+
throw new Error(`Session ${request.sessionId} is a grokbot turn, which the Cursor SDK runner cannot execute. Serve must route grokbot turns to the Grok Bot runner.`);
|
|
116
|
+
}
|
|
110
117
|
let sawUpdate = false;
|
|
111
118
|
const tracked = Object.assign(Object.assign({}, request), { onUpdate: (update) => {
|
|
112
119
|
sawUpdate = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/internal/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA0CH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAOhB,YAAY,EACb,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/internal/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA0CH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAOhB,YAAY,EACb,MAAM,aAAa,CAAC;AA0HrB,OAAO,EAAE,KAAK,WAAW,EAAmB,MAAM,iBAAiB,CAAC;AAwBpE,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,CAAC;CACvB;AAmCD,6EAA6E;AAC7E,MAAM,WAAW,0BAA0B;IACzC,oEAAoE;IACpE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,UAAU,EAAE,EACpB,OAAO,GAAE,YAAY,GAAG,0BAA+B,GACtD,OAAO,CAAC,gBAAgB,CAAC,CAo5B3B"}
|
package/dist/internal/server.js
CHANGED
|
@@ -78,6 +78,7 @@ import { collectMemoryHealthFields, sumEventLogStats, } from "./process-memory-t
|
|
|
78
78
|
import { ReminderRunner, ReminderValidationError, UnknownReminderError, } from "./reminder-runner.js";
|
|
79
79
|
import { assertAccountConnectionsNotAnonymous, resolveMountConnections, validateMountConnectionsConfig, } from "./resolved-connections.js";
|
|
80
80
|
import { Router } from "./router.js";
|
|
81
|
+
import { RuntimeDispatchingRunner } from "./runtime-dispatch-runner.js";
|
|
81
82
|
import { ScheduleRunner, UnknownScheduleError } from "./schedule-runner.js";
|
|
82
83
|
import { CursorSdkRunner } from "./sdk-runner.js";
|
|
83
84
|
import { SessionAuthError, SessionBusyError, SessionEngine, ToolInputError, ToolNotDirectlyCallableError, UnknownToolError, } from "./session-engine.js";
|
|
@@ -298,7 +299,29 @@ export function startServer(mounts_1) {
|
|
|
298
299
|
if (options.allowAnonymous === true) {
|
|
299
300
|
logger("[agent-sdk] warning: --allow-anonymous admits every HTTP caller as the same principal; use only on a trusted network (e.g. Tailscale) and prefer --bearer-token for shared hosts");
|
|
300
301
|
}
|
|
301
|
-
const
|
|
302
|
+
const sdkRunner = (_t = options.runner) !== null && _t !== void 0 ? _t : new CursorSdkRunner({ apiKey: accountKey === null || accountKey === void 0 ? void 0 : accountKey.apiKey, logger });
|
|
303
|
+
// Grok Bot turns run on Cursor's hosted Grok Bot (Sand) harness through
|
|
304
|
+
// the /v0/grokbot session API; the SDK side is a thin remote client. The
|
|
305
|
+
// dispatching runner is only interposed when a mount needs it. An
|
|
306
|
+
// injected test runner receives every turn, grokbot included.
|
|
307
|
+
const hasGrokBotMounts = mounts.some((mount) => mount.project.agent.runtime === "grokbot");
|
|
308
|
+
// Fail closed like cursor-account GitHub/MCP: grokbot turns execute on the
|
|
309
|
+
// signed-in account's hosted computer, so anonymous admission needs its
|
|
310
|
+
// own opt-in.
|
|
311
|
+
if (hasGrokBotMounts && options.allowAnonymous === true) {
|
|
312
|
+
if (options.allowAnonymousGrokbot !== true) {
|
|
313
|
+
throw new Error('runtime: "grokbot" cannot be served with --allow-anonymous because admitted callers could drive the signed-in account\'s hosted Grok Bot computer. If every admitted caller is trusted (e.g. behind an SSO proxy), opt in with --allow-anonymous-grokbot.');
|
|
314
|
+
}
|
|
315
|
+
logger("[agent-sdk] warning: --allow-anonymous-grokbot — every admitted HTTP caller can drive turns on the signed-in account's hosted Grok Bot computer; serve this only behind a trusted boundary (e.g. an SSO proxy)");
|
|
316
|
+
}
|
|
317
|
+
let runner = sdkRunner;
|
|
318
|
+
if (hasGrokBotMounts && options.runner === undefined) {
|
|
319
|
+
runner = new RuntimeDispatchingRunner({
|
|
320
|
+
sdkRunner,
|
|
321
|
+
grokbot: { apiKey: accountKey === null || accountKey === void 0 ? void 0 : accountKey.apiKey },
|
|
322
|
+
});
|
|
323
|
+
logger("[agent-sdk] grokbot runtime: remote client (turns run on the hosted Grok Bot harness)");
|
|
324
|
+
}
|
|
302
325
|
const router = new Router();
|
|
303
326
|
const runtimes = [];
|
|
304
327
|
const channelStopHooks = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-engine.d.ts","sourceRoot":"","sources":["../../src/internal/session-engine.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAShD,OAAO,EACL,mBAAmB,EACnB,eAAe,EAChB,MAAM,kCAAkC,CAAC;AAW1C,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,YAAY,EAEjB,KAAK,WAAW,EACh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