feat: add private mcp tunnel tool

This commit is contained in:
Nathan Flurry 2026-02-04 14:04:51 -08:00
parent cc5a9e0d73
commit e3aee90cf4
13 changed files with 1923 additions and 614 deletions

View file

@ -9,6 +9,7 @@ import type {
EventsResponse,
HealthResponse,
MessageRequest,
McpTunnelToolResponseRequest,
PermissionReplyRequest,
ProblemDetails,
QuestionReplyRequest,
@ -207,6 +208,18 @@ export class SandboxAgent {
);
}
async replyMcpTunnelCall(
sessionId: string,
callId: string,
request: McpTunnelToolResponseRequest,
): Promise<void> {
await this.requestJson(
"POST",
`${API_PREFIX}/sessions/${encodeURIComponent(sessionId)}/mcp-tunnel/calls/${encodeURIComponent(callId)}/response`,
{ body: request },
);
}
async terminateSession(sessionId: string): Promise<void> {
await this.requestJson("POST", `${API_PREFIX}/sessions/${encodeURIComponent(sessionId)}/terminate`);
}

File diff suppressed because it is too large Load diff

View file

@ -28,6 +28,9 @@ export type {
ItemRole,
ItemStatus,
MessageRequest,
McpTunnelConfig,
McpTunnelTool,
McpTunnelToolResponseRequest,
PermissionEventData,
PermissionReply,
PermissionReplyRequest,

View file

@ -24,6 +24,9 @@ export type ItemKind = S["ItemKind"];
export type ItemRole = S["ItemRole"];
export type ItemStatus = S["ItemStatus"];
export type MessageRequest = S["MessageRequest"];
export type McpTunnelConfig = S["McpTunnelConfig"];
export type McpTunnelTool = S["McpTunnelTool"];
export type McpTunnelToolResponseRequest = S["McpTunnelToolResponseRequest"];
export type PermissionEventData = S["PermissionEventData"];
export type PermissionReply = S["PermissionReply"];
export type PermissionReplyRequest = S["PermissionReplyRequest"];