@finalai/agent-provider 0.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.
Potentially problematic release.
This version of @finalai/agent-provider might be problematic. Click here for more details.
- package/README.md +12 -0
- package/dist/modules/channel-context.d.mts +102 -0
- package/dist/modules/channel-context.mjs +52 -0
- package/dist/modules/channel-context.mjs.map +7 -0
- package/dist/modules/channel-socket.d.mts +65 -0
- package/dist/modules/channel-socket.mjs +188 -0
- package/dist/modules/channel-socket.mjs.map +7 -0
- package/dist/modules/channel.d.mts +382 -0
- package/dist/modules/channel.mjs +146 -0
- package/dist/modules/channel.mjs.map +7 -0
- package/dist/modules/conformance/agent.d.mts +20 -0
- package/dist/modules/conformance/agent.mjs +623 -0
- package/dist/modules/conformance/agent.mjs.map +7 -0
- package/dist/modules/conformance/fixtures.d.mts +41 -0
- package/dist/modules/conformance/fixtures.mjs +190 -0
- package/dist/modules/conformance/fixtures.mjs.map +7 -0
- package/dist/modules/conformance/harness-kit.d.mts +82 -0
- package/dist/modules/conformance/harness-kit.mjs +1303 -0
- package/dist/modules/conformance/harness-kit.mjs.map +7 -0
- package/dist/modules/conformance/image.d.mts +2 -0
- package/dist/modules/conformance/image.mjs +79 -0
- package/dist/modules/conformance/image.mjs.map +7 -0
- package/dist/modules/conformance/index.d.mts +8 -0
- package/dist/modules/conformance/index.mjs +12 -0
- package/dist/modules/conformance/index.mjs.map +7 -0
- package/dist/modules/conformance/local-harness.d.mts +25 -0
- package/dist/modules/conformance/local-harness.mjs +108 -0
- package/dist/modules/conformance/local-harness.mjs.map +7 -0
- package/dist/modules/conformance/protocol.d.mts +30 -0
- package/dist/modules/conformance/protocol.mjs +56 -0
- package/dist/modules/conformance/protocol.mjs.map +7 -0
- package/dist/modules/conformance/sandbox-kit.d.mts +19 -0
- package/dist/modules/conformance/sandbox-kit.mjs +320 -0
- package/dist/modules/conformance/sandbox-kit.mjs.map +7 -0
- package/dist/modules/conformance/scripted-model/chat-completions.d.mts +30 -0
- package/dist/modules/conformance/scripted-model/chat-completions.mjs +125 -0
- package/dist/modules/conformance/scripted-model/chat-completions.mjs.map +7 -0
- package/dist/modules/conformance/scripted-model/directives.d.mts +84 -0
- package/dist/modules/conformance/scripted-model/directives.mjs +304 -0
- package/dist/modules/conformance/scripted-model/directives.mjs.map +7 -0
- package/dist/modules/conformance/scripted-model/handler.d.mts +14 -0
- package/dist/modules/conformance/scripted-model/handler.mjs +133 -0
- package/dist/modules/conformance/scripted-model/handler.mjs.map +7 -0
- package/dist/modules/conformance/scripted-model/index.d.mts +6 -0
- package/dist/modules/conformance/scripted-model/index.mjs +7 -0
- package/dist/modules/conformance/scripted-model/index.mjs.map +7 -0
- package/dist/modules/conformance/scripted-model/messages.d.mts +39 -0
- package/dist/modules/conformance/scripted-model/messages.mjs +139 -0
- package/dist/modules/conformance/scripted-model/messages.mjs.map +7 -0
- package/dist/modules/conformance/scripted-model/responses.d.mts +62 -0
- package/dist/modules/conformance/scripted-model/responses.mjs +273 -0
- package/dist/modules/conformance/scripted-model/responses.mjs.map +7 -0
- package/dist/modules/conformance/scripted-model/sse.d.mts +15 -0
- package/dist/modules/conformance/scripted-model/sse.mjs +75 -0
- package/dist/modules/conformance/scripted-model/sse.mjs.map +7 -0
- package/dist/modules/conformance/v1-agent.d.mts +24 -0
- package/dist/modules/conformance/v1-agent.mjs +40 -0
- package/dist/modules/conformance/v1-agent.mjs.map +7 -0
- package/dist/modules/credential-routes.d.mts +24 -0
- package/dist/modules/credential-routes.mjs +25 -0
- package/dist/modules/credential-routes.mjs.map +7 -0
- package/dist/modules/credentials.d.mts +206 -0
- package/dist/modules/credentials.mjs +207 -0
- package/dist/modules/credentials.mjs.map +7 -0
- package/dist/modules/dynamic.d.mts +32 -0
- package/dist/modules/dynamic.mjs +77 -0
- package/dist/modules/dynamic.mjs.map +7 -0
- package/dist/modules/harness.d.mts +397 -0
- package/dist/modules/harness.mjs +213 -0
- package/dist/modules/harness.mjs.map +7 -0
- package/dist/modules/index.d.mts +15 -0
- package/dist/modules/index.mjs +40 -0
- package/dist/modules/index.mjs.map +7 -0
- package/dist/modules/json.d.mts +12 -0
- package/dist/modules/json.mjs +19 -0
- package/dist/modules/json.mjs.map +7 -0
- package/dist/modules/local-channel-socket.d.mts +23 -0
- package/dist/modules/local-channel-socket.mjs +141 -0
- package/dist/modules/local-channel-socket.mjs.map +7 -0
- package/dist/modules/manifest.d.mts +558 -0
- package/dist/modules/manifest.mjs +266 -0
- package/dist/modules/manifest.mjs.map +7 -0
- package/dist/modules/mcp-content.d.mts +21 -0
- package/dist/modules/mcp-content.mjs +86 -0
- package/dist/modules/mcp-content.mjs.map +7 -0
- package/dist/modules/provider-ref.d.mts +29 -0
- package/dist/modules/provider-ref.mjs +55 -0
- package/dist/modules/provider-ref.mjs.map +7 -0
- package/dist/modules/sandbox/bytes.d.mts +9 -0
- package/dist/modules/sandbox/bytes.mjs +154 -0
- package/dist/modules/sandbox/bytes.mjs.map +7 -0
- package/dist/modules/sandbox/client.d.mts +51 -0
- package/dist/modules/sandbox/client.mjs +500 -0
- package/dist/modules/sandbox/client.mjs.map +7 -0
- package/dist/modules/sandbox/confined-files.d.mts +22 -0
- package/dist/modules/sandbox/confined-files.mjs +142 -0
- package/dist/modules/sandbox/confined-files.mjs.map +7 -0
- package/dist/modules/sandbox/convenience.d.mts +10 -0
- package/dist/modules/sandbox/convenience.mjs +116 -0
- package/dist/modules/sandbox/convenience.mjs.map +7 -0
- package/dist/modules/sandbox/editor.d.mts +49 -0
- package/dist/modules/sandbox/editor.mjs +43 -0
- package/dist/modules/sandbox/editor.mjs.map +7 -0
- package/dist/modules/sandbox/frame-channel.d.mts +47 -0
- package/dist/modules/sandbox/frame-channel.mjs +153 -0
- package/dist/modules/sandbox/frame-channel.mjs.map +7 -0
- package/dist/modules/sandbox/index.d.mts +18 -0
- package/dist/modules/sandbox/index.mjs +70 -0
- package/dist/modules/sandbox/index.mjs.map +7 -0
- package/dist/modules/sandbox/mcp-channel.d.mts +9 -0
- package/dist/modules/sandbox/mcp-channel.mjs +77 -0
- package/dist/modules/sandbox/mcp-channel.mjs.map +7 -0
- package/dist/modules/sandbox/mcp-hosted.d.mts +46 -0
- package/dist/modules/sandbox/mcp-hosted.mjs +221 -0
- package/dist/modules/sandbox/mcp-hosted.mjs.map +7 -0
- package/dist/modules/sandbox/mcp-search.d.mts +51 -0
- package/dist/modules/sandbox/mcp-search.mjs +129 -0
- package/dist/modules/sandbox/mcp-search.mjs.map +7 -0
- package/dist/modules/sandbox/mcp-shell.d.mts +21 -0
- package/dist/modules/sandbox/mcp-shell.mjs +205 -0
- package/dist/modules/sandbox/mcp-shell.mjs.map +7 -0
- package/dist/modules/sandbox/mcp-testing.d.mts +11 -0
- package/dist/modules/sandbox/mcp-testing.mjs +33 -0
- package/dist/modules/sandbox/mcp-testing.mjs.map +7 -0
- package/dist/modules/sandbox/mcp.d.mts +83 -0
- package/dist/modules/sandbox/mcp.mjs +971 -0
- package/dist/modules/sandbox/mcp.mjs.map +7 -0
- package/dist/modules/sandbox/memory-sandbox.d.mts +32 -0
- package/dist/modules/sandbox/memory-sandbox.mjs +416 -0
- package/dist/modules/sandbox/memory-sandbox.mjs.map +7 -0
- package/dist/modules/sandbox/memory-shell.d.mts +29 -0
- package/dist/modules/sandbox/memory-shell.mjs +278 -0
- package/dist/modules/sandbox/memory-shell.mjs.map +7 -0
- package/dist/modules/sandbox/open-scope-node.d.mts +4 -0
- package/dist/modules/sandbox/open-scope-node.mjs +19 -0
- package/dist/modules/sandbox/open-scope-node.mjs.map +7 -0
- package/dist/modules/sandbox/open-scope.d.mts +16 -0
- package/dist/modules/sandbox/open-scope.mjs +66 -0
- package/dist/modules/sandbox/open-scope.mjs.map +7 -0
- package/dist/modules/sandbox/paths.d.mts +7 -0
- package/dist/modules/sandbox/paths.mjs +50 -0
- package/dist/modules/sandbox/paths.mjs.map +7 -0
- package/dist/modules/sandbox/rpc-peer.d.mts +35 -0
- package/dist/modules/sandbox/rpc-peer.mjs +224 -0
- package/dist/modules/sandbox/rpc-peer.mjs.map +7 -0
- package/dist/modules/sandbox/seeds.d.mts +26 -0
- package/dist/modules/sandbox/seeds.mjs +228 -0
- package/dist/modules/sandbox/seeds.mjs.map +7 -0
- package/dist/modules/sandbox/server.d.mts +66 -0
- package/dist/modules/sandbox/server.mjs +567 -0
- package/dist/modules/sandbox/server.mjs.map +7 -0
- package/dist/modules/sandbox/snapshots.d.mts +49 -0
- package/dist/modules/sandbox/snapshots.mjs +55 -0
- package/dist/modules/sandbox/snapshots.mjs.map +7 -0
- package/dist/modules/sandbox/stream-mux.d.mts +18 -0
- package/dist/modules/sandbox/stream-mux.mjs +285 -0
- package/dist/modules/sandbox/stream-mux.mjs.map +7 -0
- package/dist/modules/sandbox/testing.d.mts +25 -0
- package/dist/modules/sandbox/testing.mjs +64 -0
- package/dist/modules/sandbox/testing.mjs.map +7 -0
- package/dist/modules/sandbox/types.d.mts +352 -0
- package/dist/modules/sandbox/types.mjs +86 -0
- package/dist/modules/sandbox/types.mjs.map +7 -0
- package/dist/modules/sandbox/wire.d.mts +671 -0
- package/dist/modules/sandbox/wire.mjs +537 -0
- package/dist/modules/sandbox/wire.mjs.map +7 -0
- package/dist/modules/sandbox/workspace-root.d.mts +8 -0
- package/dist/modules/sandbox/workspace-root.mjs +79 -0
- package/dist/modules/sandbox/workspace-root.mjs.map +7 -0
- package/dist/modules/schemas.d.mts +121 -0
- package/dist/modules/schemas.mjs +146 -0
- package/dist/modules/schemas.mjs.map +7 -0
- package/dist/modules/semantic-events.d.mts +31 -0
- package/dist/modules/semantic-events.mjs +23 -0
- package/dist/modules/semantic-events.mjs.map +7 -0
- package/package.json +199 -0
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { type JsonValue } from "../json.mjs";
|
|
3
|
+
import { NetworkPolicy, PortProtocol, SandboxCapability, SandboxEntryType } from "./types.mjs";
|
|
4
|
+
export declare const HANDLE_RPC_VERSION = 1;
|
|
5
|
+
export declare const HANDLE_RPC_SUBPROTOCOL = "final.handle-rpc.v1";
|
|
6
|
+
export declare const HANDLE_RPC_BEARER_PROTOCOL_PREFIX = "bearer.";
|
|
7
|
+
export declare const MAX_CHUNK_BYTES: number;
|
|
8
|
+
export declare const INITIAL_STREAM_WINDOW_BYTES: number;
|
|
9
|
+
export declare const MAX_INLINE_WRITE_BYTES: number;
|
|
10
|
+
export declare const BINARY_FRAME_MAGIC = 241;
|
|
11
|
+
export declare const BINARY_FRAME_HEADER_BYTES = 6;
|
|
12
|
+
export declare enum BinaryFrameKind {
|
|
13
|
+
Chunk = 1
|
|
14
|
+
}
|
|
15
|
+
export declare enum HandleRpcCloseCode {
|
|
16
|
+
Normal = 1000,
|
|
17
|
+
ProtocolError = 4400,
|
|
18
|
+
Unauthorized = 4401
|
|
19
|
+
}
|
|
20
|
+
export declare enum HandleRpcErrorCode {
|
|
21
|
+
ParseError = -32700,
|
|
22
|
+
InvalidRequest = -32600,
|
|
23
|
+
MethodNotFound = -32601,
|
|
24
|
+
InvalidParams = -32602,
|
|
25
|
+
Internal = -32603,
|
|
26
|
+
Unauthorized = -32001,
|
|
27
|
+
NotInitialized = -32002,
|
|
28
|
+
Forbidden = -32010,
|
|
29
|
+
NotFound = -32011,
|
|
30
|
+
Unsupported = -32012,
|
|
31
|
+
ConnectionClosed = -32013,
|
|
32
|
+
Timeout = -32014,
|
|
33
|
+
Cancelled = -32800
|
|
34
|
+
}
|
|
35
|
+
export declare enum HandleRpcMethod {
|
|
36
|
+
Initialize = "initialize",
|
|
37
|
+
Describe = "sandbox/describe",
|
|
38
|
+
ReadFile = "sandbox/readFile",
|
|
39
|
+
ReadTextFile = "sandbox/readTextFile",
|
|
40
|
+
WriteFile = "sandbox/writeFile",
|
|
41
|
+
Spawn = "sandbox/spawn",
|
|
42
|
+
Run = "sandbox/run",
|
|
43
|
+
Stat = "sandbox/stat",
|
|
44
|
+
ReadDir = "sandbox/readDir",
|
|
45
|
+
RemovePath = "sandbox/removePath",
|
|
46
|
+
GetPortEndpoint = "sandbox/getPortEndpoint",
|
|
47
|
+
Stop = "sandbox/stop",
|
|
48
|
+
Destroy = "sandbox/destroy",
|
|
49
|
+
SetNetworkPolicy = "sandbox/setNetworkPolicy",
|
|
50
|
+
OnSandboxStop = "handle/onSandboxStop",
|
|
51
|
+
OnSandboxDelete = "handle/onSandboxDelete",
|
|
52
|
+
OnRuntimeShutdown = "handle/onRuntimeShutdown",
|
|
53
|
+
ComputerUse = "sandbox/computerUse",
|
|
54
|
+
Screen = "sandbox/screen",
|
|
55
|
+
LocalMcp = "sandbox/localMcp",
|
|
56
|
+
McpOpen = "mcp/open",
|
|
57
|
+
McpSend = "mcp/send",
|
|
58
|
+
McpReceive = "mcp/receive",
|
|
59
|
+
McpClose = "mcp/close",
|
|
60
|
+
ProcessWait = "process/wait",
|
|
61
|
+
ProcessKill = "process/kill",
|
|
62
|
+
AuthRefresh = "auth/refresh"
|
|
63
|
+
}
|
|
64
|
+
export declare enum HandleRpcNotification {
|
|
65
|
+
CancelRequest = "$/cancel_request",
|
|
66
|
+
StreamChunk = "stream/chunk",
|
|
67
|
+
StreamEnd = "stream/end",
|
|
68
|
+
StreamError = "stream/error",
|
|
69
|
+
StreamCredit = "stream/credit",
|
|
70
|
+
StreamCancel = "stream/cancel"
|
|
71
|
+
}
|
|
72
|
+
export interface HandleRpcErrorIface extends Error {
|
|
73
|
+
readonly code: HandleRpcErrorCode;
|
|
74
|
+
readonly retryable: boolean;
|
|
75
|
+
readonly errno: string | null;
|
|
76
|
+
readonly data: JsonValue | null;
|
|
77
|
+
}
|
|
78
|
+
export declare const handleRpcError: (args: {
|
|
79
|
+
code: HandleRpcErrorCode;
|
|
80
|
+
message: string;
|
|
81
|
+
retryable?: boolean;
|
|
82
|
+
errno?: string | null;
|
|
83
|
+
data?: JsonValue | null;
|
|
84
|
+
}) => HandleRpcErrorIface;
|
|
85
|
+
export declare const isHandleRpcError: (cause: unknown) => cause is HandleRpcErrorIface;
|
|
86
|
+
export declare const errnoOf: (cause: unknown) => string | null;
|
|
87
|
+
declare const jsonRpcIdSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
88
|
+
export type JsonRpcId = z.infer<typeof jsonRpcIdSchema>;
|
|
89
|
+
export declare const jsonRpcRequestSchema: z.ZodObject<{
|
|
90
|
+
jsonrpc: z.ZodLiteral<"2.0">;
|
|
91
|
+
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
92
|
+
method: z.ZodString;
|
|
93
|
+
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export declare const jsonRpcNotificationSchema: z.ZodObject<{
|
|
96
|
+
jsonrpc: z.ZodLiteral<"2.0">;
|
|
97
|
+
method: z.ZodString;
|
|
98
|
+
params: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export declare const jsonRpcErrorObjectSchema: z.ZodObject<{
|
|
101
|
+
code: z.ZodNumber;
|
|
102
|
+
message: z.ZodString;
|
|
103
|
+
data: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
export declare const jsonRpcSuccessSchema: z.ZodObject<{
|
|
106
|
+
jsonrpc: z.ZodLiteral<"2.0">;
|
|
107
|
+
id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
108
|
+
result: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export declare const jsonRpcErrorResponseSchema: z.ZodObject<{
|
|
111
|
+
jsonrpc: z.ZodLiteral<"2.0">;
|
|
112
|
+
id: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
113
|
+
error: z.ZodObject<{
|
|
114
|
+
code: z.ZodNumber;
|
|
115
|
+
message: z.ZodString;
|
|
116
|
+
data: z.ZodOptional<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
export type JsonRpcRequestIface = z.infer<typeof jsonRpcRequestSchema>;
|
|
120
|
+
export type JsonRpcNotificationIface = z.infer<typeof jsonRpcNotificationSchema>;
|
|
121
|
+
export type JsonRpcErrorObjectIface = z.infer<typeof jsonRpcErrorObjectSchema>;
|
|
122
|
+
export declare const handleRpcErrorDataSchema: z.ZodObject<{
|
|
123
|
+
errno: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
124
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
export declare const sandboxCapabilitiesSchema: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<SandboxCapability[], string[]>>;
|
|
127
|
+
export declare const statSchema: z.ZodObject<{
|
|
128
|
+
path: z.ZodString;
|
|
129
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<SandboxEntryType, string>>;
|
|
130
|
+
size: z.ZodNumber;
|
|
131
|
+
modifiedAt: z.ZodNullable<z.ZodString>;
|
|
132
|
+
mode: z.ZodNullable<z.ZodNumber>;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
export declare const dirEntrySchema: z.ZodObject<{
|
|
135
|
+
name: z.ZodString;
|
|
136
|
+
path: z.ZodString;
|
|
137
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<SandboxEntryType, string>>;
|
|
138
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
export declare const mcpEndpointSchema: z.ZodObject<{
|
|
141
|
+
name: z.ZodString;
|
|
142
|
+
url: z.ZodString;
|
|
143
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export declare const mcpChannelEndpointSchema: z.ZodObject<{
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
endpointKey: z.ZodString;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
export declare const sandboxMcpEndpointSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
150
|
+
name: z.ZodString;
|
|
151
|
+
url: z.ZodString;
|
|
152
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
153
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
154
|
+
name: z.ZodString;
|
|
155
|
+
endpointKey: z.ZodString;
|
|
156
|
+
}, z.core.$strip>]>;
|
|
157
|
+
export declare const screenOptionsSchema: z.ZodObject<{
|
|
158
|
+
viewOnly: z.ZodDefault<z.ZodBoolean>;
|
|
159
|
+
}, z.core.$strict>;
|
|
160
|
+
export declare const screenSessionSchema: z.ZodObject<{
|
|
161
|
+
url: z.ZodString;
|
|
162
|
+
token: z.ZodString;
|
|
163
|
+
expiresAt: z.ZodString;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export declare const describeResultSchema: z.ZodObject<{
|
|
166
|
+
handleRpcVersion: z.ZodLiteral<1>;
|
|
167
|
+
id: z.ZodString;
|
|
168
|
+
defaultWorkingDirectory: z.ZodString;
|
|
169
|
+
ports: z.ZodArray<z.ZodNumber>;
|
|
170
|
+
capabilities: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<SandboxCapability[], string[]>>;
|
|
171
|
+
description: z.ZodString;
|
|
172
|
+
confinedFiles: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
providerHooks: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
mcpChannels: z.ZodOptional<z.ZodBoolean>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
export declare const initializeParamsSchema: z.ZodObject<{
|
|
177
|
+
handleRpcVersion: z.ZodLiteral<1>;
|
|
178
|
+
token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
179
|
+
client: z.ZodOptional<z.ZodObject<{
|
|
180
|
+
name: z.ZodString;
|
|
181
|
+
version: z.ZodString;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
export declare const initializeResultSchema: z.ZodObject<{
|
|
185
|
+
handleRpcVersion: z.ZodLiteral<1>;
|
|
186
|
+
id: z.ZodString;
|
|
187
|
+
defaultWorkingDirectory: z.ZodString;
|
|
188
|
+
ports: z.ZodArray<z.ZodNumber>;
|
|
189
|
+
capabilities: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<SandboxCapability[], string[]>>;
|
|
190
|
+
description: z.ZodString;
|
|
191
|
+
confinedFiles: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
+
providerHooks: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
+
mcpChannels: z.ZodOptional<z.ZodBoolean>;
|
|
194
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
195
|
+
}, z.core.$strip>;
|
|
196
|
+
export declare const readFileParamsSchema: z.ZodObject<{
|
|
197
|
+
root: z.ZodOptional<z.ZodString>;
|
|
198
|
+
path: z.ZodString;
|
|
199
|
+
streamId: z.ZodNumber;
|
|
200
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
export declare const readFileResultSchema: z.ZodObject<{
|
|
204
|
+
found: z.ZodBoolean;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
export declare const readTextFileParamsSchema: z.ZodObject<{
|
|
207
|
+
path: z.ZodString;
|
|
208
|
+
encoding: z.ZodOptional<z.ZodString>;
|
|
209
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
}, z.core.$strip>;
|
|
212
|
+
export declare const readTextFileResultSchema: z.ZodObject<{
|
|
213
|
+
text: z.ZodNullable<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
export declare const writeFileParamsSchema: z.ZodObject<{
|
|
216
|
+
path: z.ZodString;
|
|
217
|
+
streamId: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
contentBase64: z.ZodOptional<z.ZodString>;
|
|
219
|
+
}, z.core.$strip>;
|
|
220
|
+
export declare const spawnParamsSchema: z.ZodObject<{
|
|
221
|
+
processId: z.ZodString;
|
|
222
|
+
stdinStreamId: z.ZodNullable<z.ZodNumber>;
|
|
223
|
+
stdoutStreamId: z.ZodNumber;
|
|
224
|
+
stderrStreamId: z.ZodNumber;
|
|
225
|
+
command: z.ZodString;
|
|
226
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
227
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
228
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
229
|
+
shell: z.ZodOptional<z.ZodBoolean>;
|
|
230
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
}, z.core.$strip>;
|
|
232
|
+
export declare const spawnResultSchema: z.ZodObject<{
|
|
233
|
+
pid: z.ZodNullable<z.ZodString>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
export declare const runParamsSchema: z.ZodObject<{
|
|
236
|
+
stdin: z.ZodOptional<z.ZodString>;
|
|
237
|
+
command: z.ZodString;
|
|
238
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
239
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
240
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
241
|
+
shell: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
243
|
+
}, z.core.$strip>;
|
|
244
|
+
export declare const runResultSchema: z.ZodObject<{
|
|
245
|
+
exitCode: z.ZodNumber;
|
|
246
|
+
stdout: z.ZodString;
|
|
247
|
+
stderr: z.ZodString;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
export declare const pathParamsSchema: z.ZodObject<{
|
|
250
|
+
path: z.ZodString;
|
|
251
|
+
root: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
export declare const statResultSchema: z.ZodObject<{
|
|
254
|
+
stat: z.ZodNullable<z.ZodObject<{
|
|
255
|
+
path: z.ZodString;
|
|
256
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<SandboxEntryType, string>>;
|
|
257
|
+
size: z.ZodNumber;
|
|
258
|
+
modifiedAt: z.ZodNullable<z.ZodString>;
|
|
259
|
+
mode: z.ZodNullable<z.ZodNumber>;
|
|
260
|
+
}, z.core.$strip>>;
|
|
261
|
+
}, z.core.$strip>;
|
|
262
|
+
export declare const readDirResultSchema: z.ZodObject<{
|
|
263
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
264
|
+
name: z.ZodString;
|
|
265
|
+
path: z.ZodString;
|
|
266
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<SandboxEntryType, string>>;
|
|
267
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
268
|
+
}, z.core.$strip>>;
|
|
269
|
+
}, z.core.$strip>;
|
|
270
|
+
export declare const removePathParamsSchema: z.ZodObject<{
|
|
271
|
+
path: z.ZodString;
|
|
272
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
273
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
export declare const getPortEndpointParamsSchema: z.ZodObject<{
|
|
276
|
+
port: z.ZodNumber;
|
|
277
|
+
protocol: z.ZodOptional<z.ZodEnum<typeof PortProtocol>>;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
export declare const getPortEndpointResultSchema: z.ZodObject<{
|
|
280
|
+
url: z.ZodString;
|
|
281
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
282
|
+
}, z.core.$strip>;
|
|
283
|
+
export declare const setNetworkPolicyParamsSchema: z.ZodObject<{
|
|
284
|
+
mode: z.ZodEnum<typeof NetworkPolicy>;
|
|
285
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
export declare const sandboxDeleteHookParamsSchema: z.ZodObject<{
|
|
288
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
289
|
+
}, z.core.$strip>;
|
|
290
|
+
export declare const localMcpResultSchema: z.ZodObject<{
|
|
291
|
+
endpoints: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
292
|
+
name: z.ZodString;
|
|
293
|
+
url: z.ZodString;
|
|
294
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
295
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
296
|
+
name: z.ZodString;
|
|
297
|
+
endpointKey: z.ZodString;
|
|
298
|
+
}, z.core.$strip>]>>;
|
|
299
|
+
}, z.core.$strip>;
|
|
300
|
+
export declare const mcpOpenParamsSchema: z.ZodObject<{
|
|
301
|
+
endpointKey: z.ZodString;
|
|
302
|
+
}, z.core.$strip>;
|
|
303
|
+
export declare const mcpChannelParamsSchema: z.ZodObject<{
|
|
304
|
+
channelId: z.ZodString;
|
|
305
|
+
}, z.core.$strip>;
|
|
306
|
+
export declare const mcpSendParamsSchema: z.ZodObject<{
|
|
307
|
+
channelId: z.ZodString;
|
|
308
|
+
message: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
309
|
+
}, z.core.$strip>;
|
|
310
|
+
export declare const mcpOpenResultSchema: z.ZodObject<{
|
|
311
|
+
channelId: z.ZodString;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
export declare const mcpReceiveResultSchema: z.ZodObject<{
|
|
314
|
+
messages: z.ZodArray<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
315
|
+
}, z.core.$strip>;
|
|
316
|
+
export declare const processIdParamsSchema: z.ZodObject<{
|
|
317
|
+
processId: z.ZodString;
|
|
318
|
+
}, z.core.$strip>;
|
|
319
|
+
export declare const processWaitResultSchema: z.ZodObject<{
|
|
320
|
+
exitCode: z.ZodNumber;
|
|
321
|
+
}, z.core.$strip>;
|
|
322
|
+
export declare const processKillParamsSchema: z.ZodObject<{
|
|
323
|
+
processId: z.ZodString;
|
|
324
|
+
signal: z.ZodOptional<z.ZodString>;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
export declare const authRefreshParamsSchema: z.ZodObject<{
|
|
327
|
+
token: z.ZodString;
|
|
328
|
+
}, z.core.$strip>;
|
|
329
|
+
export declare const authRefreshResultSchema: z.ZodObject<{
|
|
330
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
331
|
+
}, z.core.$strip>;
|
|
332
|
+
export declare const cancelRequestParamsSchema: z.ZodObject<{
|
|
333
|
+
requestId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
334
|
+
}, z.core.$strip>;
|
|
335
|
+
export declare const streamChunkParamsSchema: z.ZodObject<{
|
|
336
|
+
streamId: z.ZodNumber;
|
|
337
|
+
data: z.ZodString;
|
|
338
|
+
}, z.core.$strip>;
|
|
339
|
+
export declare const streamEndParamsSchema: z.ZodObject<{
|
|
340
|
+
streamId: z.ZodNumber;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
export declare const streamErrorParamsSchema: z.ZodObject<{
|
|
343
|
+
streamId: z.ZodNumber;
|
|
344
|
+
message: z.ZodString;
|
|
345
|
+
code: z.ZodOptional<z.ZodNumber>;
|
|
346
|
+
errno: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
347
|
+
}, z.core.$strip>;
|
|
348
|
+
export declare const streamCreditParamsSchema: z.ZodObject<{
|
|
349
|
+
streamId: z.ZodNumber;
|
|
350
|
+
bytes: z.ZodNumber;
|
|
351
|
+
}, z.core.$strip>;
|
|
352
|
+
export declare const streamCancelParamsSchema: z.ZodObject<{
|
|
353
|
+
streamId: z.ZodNumber;
|
|
354
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
355
|
+
}, z.core.$strip>;
|
|
356
|
+
export type DescribeResultIface = z.infer<typeof describeResultSchema>;
|
|
357
|
+
export type InitializeResultIface = z.infer<typeof initializeResultSchema>;
|
|
358
|
+
export declare const handleRpcMethodSchemas: {
|
|
359
|
+
readonly initialize: {
|
|
360
|
+
readonly params: z.ZodObject<{
|
|
361
|
+
handleRpcVersion: z.ZodLiteral<1>;
|
|
362
|
+
token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
363
|
+
client: z.ZodOptional<z.ZodObject<{
|
|
364
|
+
name: z.ZodString;
|
|
365
|
+
version: z.ZodString;
|
|
366
|
+
}, z.core.$strip>>;
|
|
367
|
+
}, z.core.$strip>;
|
|
368
|
+
readonly result: z.ZodObject<{
|
|
369
|
+
handleRpcVersion: z.ZodLiteral<1>;
|
|
370
|
+
id: z.ZodString;
|
|
371
|
+
defaultWorkingDirectory: z.ZodString;
|
|
372
|
+
ports: z.ZodArray<z.ZodNumber>;
|
|
373
|
+
capabilities: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<SandboxCapability[], string[]>>;
|
|
374
|
+
description: z.ZodString;
|
|
375
|
+
confinedFiles: z.ZodOptional<z.ZodBoolean>;
|
|
376
|
+
providerHooks: z.ZodOptional<z.ZodBoolean>;
|
|
377
|
+
mcpChannels: z.ZodOptional<z.ZodBoolean>;
|
|
378
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
};
|
|
381
|
+
readonly "sandbox/describe": {
|
|
382
|
+
readonly params: z.ZodObject<{}, z.core.$loose>;
|
|
383
|
+
readonly result: z.ZodObject<{
|
|
384
|
+
handleRpcVersion: z.ZodLiteral<1>;
|
|
385
|
+
id: z.ZodString;
|
|
386
|
+
defaultWorkingDirectory: z.ZodString;
|
|
387
|
+
ports: z.ZodArray<z.ZodNumber>;
|
|
388
|
+
capabilities: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<SandboxCapability[], string[]>>;
|
|
389
|
+
description: z.ZodString;
|
|
390
|
+
confinedFiles: z.ZodOptional<z.ZodBoolean>;
|
|
391
|
+
providerHooks: z.ZodOptional<z.ZodBoolean>;
|
|
392
|
+
mcpChannels: z.ZodOptional<z.ZodBoolean>;
|
|
393
|
+
}, z.core.$strip>;
|
|
394
|
+
};
|
|
395
|
+
readonly "sandbox/readFile": {
|
|
396
|
+
readonly params: z.ZodObject<{
|
|
397
|
+
root: z.ZodOptional<z.ZodString>;
|
|
398
|
+
path: z.ZodString;
|
|
399
|
+
streamId: z.ZodNumber;
|
|
400
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
length: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
}, z.core.$strip>;
|
|
403
|
+
readonly result: z.ZodObject<{
|
|
404
|
+
found: z.ZodBoolean;
|
|
405
|
+
}, z.core.$strip>;
|
|
406
|
+
};
|
|
407
|
+
readonly "sandbox/readTextFile": {
|
|
408
|
+
readonly params: z.ZodObject<{
|
|
409
|
+
path: z.ZodString;
|
|
410
|
+
encoding: z.ZodOptional<z.ZodString>;
|
|
411
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
412
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
413
|
+
}, z.core.$strip>;
|
|
414
|
+
readonly result: z.ZodObject<{
|
|
415
|
+
text: z.ZodNullable<z.ZodString>;
|
|
416
|
+
}, z.core.$strip>;
|
|
417
|
+
};
|
|
418
|
+
readonly "sandbox/writeFile": {
|
|
419
|
+
readonly params: z.ZodObject<{
|
|
420
|
+
path: z.ZodString;
|
|
421
|
+
streamId: z.ZodOptional<z.ZodNumber>;
|
|
422
|
+
contentBase64: z.ZodOptional<z.ZodString>;
|
|
423
|
+
}, z.core.$strip>;
|
|
424
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
425
|
+
};
|
|
426
|
+
readonly "sandbox/spawn": {
|
|
427
|
+
readonly params: z.ZodObject<{
|
|
428
|
+
processId: z.ZodString;
|
|
429
|
+
stdinStreamId: z.ZodNullable<z.ZodNumber>;
|
|
430
|
+
stdoutStreamId: z.ZodNumber;
|
|
431
|
+
stderrStreamId: z.ZodNumber;
|
|
432
|
+
command: z.ZodString;
|
|
433
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
434
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
435
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
436
|
+
shell: z.ZodOptional<z.ZodBoolean>;
|
|
437
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
438
|
+
}, z.core.$strip>;
|
|
439
|
+
readonly result: z.ZodObject<{
|
|
440
|
+
pid: z.ZodNullable<z.ZodString>;
|
|
441
|
+
}, z.core.$strip>;
|
|
442
|
+
};
|
|
443
|
+
readonly "sandbox/run": {
|
|
444
|
+
readonly params: z.ZodObject<{
|
|
445
|
+
stdin: z.ZodOptional<z.ZodString>;
|
|
446
|
+
command: z.ZodString;
|
|
447
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
448
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
449
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
450
|
+
shell: z.ZodOptional<z.ZodBoolean>;
|
|
451
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
452
|
+
}, z.core.$strip>;
|
|
453
|
+
readonly result: z.ZodObject<{
|
|
454
|
+
exitCode: z.ZodNumber;
|
|
455
|
+
stdout: z.ZodString;
|
|
456
|
+
stderr: z.ZodString;
|
|
457
|
+
}, z.core.$strip>;
|
|
458
|
+
};
|
|
459
|
+
readonly "sandbox/stat": {
|
|
460
|
+
readonly params: z.ZodObject<{
|
|
461
|
+
path: z.ZodString;
|
|
462
|
+
root: z.ZodOptional<z.ZodString>;
|
|
463
|
+
}, z.core.$strip>;
|
|
464
|
+
readonly result: z.ZodObject<{
|
|
465
|
+
stat: z.ZodNullable<z.ZodObject<{
|
|
466
|
+
path: z.ZodString;
|
|
467
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<SandboxEntryType, string>>;
|
|
468
|
+
size: z.ZodNumber;
|
|
469
|
+
modifiedAt: z.ZodNullable<z.ZodString>;
|
|
470
|
+
mode: z.ZodNullable<z.ZodNumber>;
|
|
471
|
+
}, z.core.$strip>>;
|
|
472
|
+
}, z.core.$strip>;
|
|
473
|
+
};
|
|
474
|
+
readonly "sandbox/readDir": {
|
|
475
|
+
readonly params: z.ZodObject<{
|
|
476
|
+
path: z.ZodString;
|
|
477
|
+
root: z.ZodOptional<z.ZodString>;
|
|
478
|
+
}, z.core.$strip>;
|
|
479
|
+
readonly result: z.ZodObject<{
|
|
480
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
481
|
+
name: z.ZodString;
|
|
482
|
+
path: z.ZodString;
|
|
483
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<SandboxEntryType, string>>;
|
|
484
|
+
size: z.ZodNullable<z.ZodNumber>;
|
|
485
|
+
}, z.core.$strip>>;
|
|
486
|
+
}, z.core.$strip>;
|
|
487
|
+
};
|
|
488
|
+
readonly "sandbox/removePath": {
|
|
489
|
+
readonly params: z.ZodObject<{
|
|
490
|
+
path: z.ZodString;
|
|
491
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
492
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
493
|
+
}, z.core.$strip>;
|
|
494
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
495
|
+
};
|
|
496
|
+
readonly "sandbox/getPortEndpoint": {
|
|
497
|
+
readonly params: z.ZodObject<{
|
|
498
|
+
port: z.ZodNumber;
|
|
499
|
+
protocol: z.ZodOptional<z.ZodEnum<typeof PortProtocol>>;
|
|
500
|
+
}, z.core.$strip>;
|
|
501
|
+
readonly result: z.ZodObject<{
|
|
502
|
+
url: z.ZodString;
|
|
503
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
504
|
+
}, z.core.$strip>;
|
|
505
|
+
};
|
|
506
|
+
readonly "sandbox/stop": {
|
|
507
|
+
readonly params: z.ZodObject<{}, z.core.$loose>;
|
|
508
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
509
|
+
};
|
|
510
|
+
readonly "sandbox/destroy": {
|
|
511
|
+
readonly params: z.ZodObject<{}, z.core.$loose>;
|
|
512
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
513
|
+
};
|
|
514
|
+
readonly "handle/onSandboxStop": {
|
|
515
|
+
readonly params: z.ZodObject<{}, z.core.$loose>;
|
|
516
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
517
|
+
};
|
|
518
|
+
readonly "handle/onSandboxDelete": {
|
|
519
|
+
readonly params: z.ZodObject<{
|
|
520
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
521
|
+
}, z.core.$strip>;
|
|
522
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
523
|
+
};
|
|
524
|
+
readonly "handle/onRuntimeShutdown": {
|
|
525
|
+
readonly params: z.ZodObject<{}, z.core.$loose>;
|
|
526
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
527
|
+
};
|
|
528
|
+
readonly "sandbox/setNetworkPolicy": {
|
|
529
|
+
readonly params: z.ZodObject<{
|
|
530
|
+
mode: z.ZodEnum<typeof NetworkPolicy>;
|
|
531
|
+
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
532
|
+
}, z.core.$strip>;
|
|
533
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
534
|
+
};
|
|
535
|
+
readonly "sandbox/computerUse": {
|
|
536
|
+
readonly params: z.ZodObject<{}, z.core.$loose>;
|
|
537
|
+
readonly result: z.ZodUnion<readonly [z.ZodObject<{
|
|
538
|
+
name: z.ZodString;
|
|
539
|
+
url: z.ZodString;
|
|
540
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
541
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
542
|
+
name: z.ZodString;
|
|
543
|
+
endpointKey: z.ZodString;
|
|
544
|
+
}, z.core.$strip>]>;
|
|
545
|
+
};
|
|
546
|
+
readonly "sandbox/screen": {
|
|
547
|
+
readonly params: z.ZodObject<{
|
|
548
|
+
viewOnly: z.ZodDefault<z.ZodBoolean>;
|
|
549
|
+
}, z.core.$strict>;
|
|
550
|
+
readonly result: z.ZodObject<{
|
|
551
|
+
url: z.ZodString;
|
|
552
|
+
token: z.ZodString;
|
|
553
|
+
expiresAt: z.ZodString;
|
|
554
|
+
}, z.core.$strip>;
|
|
555
|
+
};
|
|
556
|
+
readonly "sandbox/localMcp": {
|
|
557
|
+
readonly params: z.ZodObject<{}, z.core.$loose>;
|
|
558
|
+
readonly result: z.ZodObject<{
|
|
559
|
+
endpoints: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
560
|
+
name: z.ZodString;
|
|
561
|
+
url: z.ZodString;
|
|
562
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
563
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
564
|
+
name: z.ZodString;
|
|
565
|
+
endpointKey: z.ZodString;
|
|
566
|
+
}, z.core.$strip>]>>;
|
|
567
|
+
}, z.core.$strip>;
|
|
568
|
+
};
|
|
569
|
+
readonly "mcp/open": {
|
|
570
|
+
readonly params: z.ZodObject<{
|
|
571
|
+
endpointKey: z.ZodString;
|
|
572
|
+
}, z.core.$strip>;
|
|
573
|
+
readonly result: z.ZodObject<{
|
|
574
|
+
channelId: z.ZodString;
|
|
575
|
+
}, z.core.$strip>;
|
|
576
|
+
};
|
|
577
|
+
readonly "mcp/send": {
|
|
578
|
+
readonly params: z.ZodObject<{
|
|
579
|
+
channelId: z.ZodString;
|
|
580
|
+
message: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
581
|
+
}, z.core.$strip>;
|
|
582
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
583
|
+
};
|
|
584
|
+
readonly "mcp/receive": {
|
|
585
|
+
readonly params: z.ZodObject<{
|
|
586
|
+
channelId: z.ZodString;
|
|
587
|
+
}, z.core.$strip>;
|
|
588
|
+
readonly result: z.ZodObject<{
|
|
589
|
+
messages: z.ZodArray<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
};
|
|
592
|
+
readonly "mcp/close": {
|
|
593
|
+
readonly params: z.ZodObject<{
|
|
594
|
+
channelId: z.ZodString;
|
|
595
|
+
}, z.core.$strip>;
|
|
596
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
597
|
+
};
|
|
598
|
+
readonly "process/wait": {
|
|
599
|
+
readonly params: z.ZodObject<{
|
|
600
|
+
processId: z.ZodString;
|
|
601
|
+
}, z.core.$strip>;
|
|
602
|
+
readonly result: z.ZodObject<{
|
|
603
|
+
exitCode: z.ZodNumber;
|
|
604
|
+
}, z.core.$strip>;
|
|
605
|
+
};
|
|
606
|
+
readonly "process/kill": {
|
|
607
|
+
readonly params: z.ZodObject<{
|
|
608
|
+
processId: z.ZodString;
|
|
609
|
+
signal: z.ZodOptional<z.ZodString>;
|
|
610
|
+
}, z.core.$strip>;
|
|
611
|
+
readonly result: z.ZodObject<{}, z.core.$loose>;
|
|
612
|
+
};
|
|
613
|
+
readonly "auth/refresh": {
|
|
614
|
+
readonly params: z.ZodObject<{
|
|
615
|
+
token: z.ZodString;
|
|
616
|
+
}, z.core.$strip>;
|
|
617
|
+
readonly result: z.ZodObject<{
|
|
618
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
619
|
+
}, z.core.$strip>;
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
export declare const handleRpcNotificationSchemas: {
|
|
623
|
+
readonly "$/cancel_request": z.ZodObject<{
|
|
624
|
+
requestId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
625
|
+
}, z.core.$strip>;
|
|
626
|
+
readonly "stream/chunk": z.ZodObject<{
|
|
627
|
+
streamId: z.ZodNumber;
|
|
628
|
+
data: z.ZodString;
|
|
629
|
+
}, z.core.$strip>;
|
|
630
|
+
readonly "stream/end": z.ZodObject<{
|
|
631
|
+
streamId: z.ZodNumber;
|
|
632
|
+
}, z.core.$strip>;
|
|
633
|
+
readonly "stream/error": z.ZodObject<{
|
|
634
|
+
streamId: z.ZodNumber;
|
|
635
|
+
message: z.ZodString;
|
|
636
|
+
code: z.ZodOptional<z.ZodNumber>;
|
|
637
|
+
errno: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
638
|
+
}, z.core.$strip>;
|
|
639
|
+
readonly "stream/credit": z.ZodObject<{
|
|
640
|
+
streamId: z.ZodNumber;
|
|
641
|
+
bytes: z.ZodNumber;
|
|
642
|
+
}, z.core.$strip>;
|
|
643
|
+
readonly "stream/cancel": z.ZodObject<{
|
|
644
|
+
streamId: z.ZodNumber;
|
|
645
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
646
|
+
}, z.core.$strip>;
|
|
647
|
+
};
|
|
648
|
+
export type HandleRpcParams<M extends HandleRpcMethod> = z.input<(typeof handleRpcMethodSchemas)[M]['params']>;
|
|
649
|
+
export type HandleRpcResult<M extends HandleRpcMethod> = z.output<(typeof handleRpcMethodSchemas)[M]['result']>;
|
|
650
|
+
export type HandleRpcNotificationParams<N extends HandleRpcNotification> = z.input<(typeof handleRpcNotificationSchemas)[N]>;
|
|
651
|
+
export type HandleRpcResultParsers = {
|
|
652
|
+
[M in HandleRpcMethod]: (raw: JsonValue) => HandleRpcResult<M>;
|
|
653
|
+
};
|
|
654
|
+
export declare const handleRpcResultParsers: HandleRpcResultParsers;
|
|
655
|
+
export declare const parseHandleRpcResult: <M extends HandleRpcMethod>(method: M, raw: JsonValue) => HandleRpcResult<M>;
|
|
656
|
+
export declare const parseHandleRpcMethod: (method: string) => HandleRpcMethod | null;
|
|
657
|
+
export declare const HANDLE_RPC_FILE_WRITE_METHODS: readonly HandleRpcMethod[];
|
|
658
|
+
export declare const HANDLE_RPC_EXECUTE_METHODS: readonly HandleRpcMethod[];
|
|
659
|
+
export declare const HANDLE_RPC_WRITE_METHODS: readonly HandleRpcMethod[];
|
|
660
|
+
export declare const HANDLE_RPC_LIFECYCLE_METHODS: readonly HandleRpcMethod[];
|
|
661
|
+
export declare const HANDLE_RPC_IDEMPOTENT_METHODS: readonly HandleRpcMethod[];
|
|
662
|
+
export declare const encodeChunkFrame: (streamId: number, payload: Uint8Array) => Uint8Array;
|
|
663
|
+
export declare const decodeBinaryFrame: (frame: Uint8Array) => {
|
|
664
|
+
kind: BinaryFrameKind;
|
|
665
|
+
streamId: number;
|
|
666
|
+
payload: Uint8Array;
|
|
667
|
+
} | null;
|
|
668
|
+
export declare const encodeJsonRpc: (message: JsonValue) => string;
|
|
669
|
+
export declare const handleRpcTokenFromRequest: (request: Request) => string | null;
|
|
670
|
+
export declare const handleRpcClientProtocols: (token: string) => string[];
|
|
671
|
+
export * from "./frame-channel.mjs";
|