@dexto/core 1.6.26 → 1.7.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/dist/agent/DextoAgent.cjs +75 -90
- package/dist/agent/DextoAgent.d.ts +7 -7
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +76 -91
- package/dist/agent/error-codes.cjs +1 -0
- package/dist/agent/error-codes.d.ts +1 -0
- package/dist/agent/error-codes.d.ts.map +1 -1
- package/dist/agent/error-codes.js +1 -0
- package/dist/agent/errors.cjs +13 -0
- package/dist/agent/errors.d.ts +6 -0
- package/dist/agent/errors.d.ts.map +1 -1
- package/dist/agent/errors.js +13 -0
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/schemas.cjs +5 -5
- package/dist/agent/schemas.d.ts +69 -980
- package/dist/agent/schemas.d.ts.map +1 -1
- package/dist/agent/schemas.js +5 -5
- package/dist/agent/types.d.ts +11 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/approval/factory.cjs +1 -0
- package/dist/approval/factory.d.ts.map +1 -1
- package/dist/approval/factory.js +1 -0
- package/dist/approval/manager.cjs +19 -6
- package/dist/approval/manager.d.ts +6 -0
- package/dist/approval/manager.d.ts.map +1 -1
- package/dist/approval/manager.js +19 -6
- package/dist/approval/schemas.cjs +16 -6
- package/dist/approval/schemas.d.ts +373 -1044
- package/dist/approval/schemas.d.ts.map +1 -1
- package/dist/approval/schemas.js +16 -6
- package/dist/approval/session-approval-store.cjs +1 -1
- package/dist/approval/session-approval-store.d.ts +12 -30
- package/dist/approval/session-approval-store.d.ts.map +1 -1
- package/dist/approval/session-approval-store.js +1 -1
- package/dist/events/index.cjs +210 -75
- package/dist/events/index.d.ts +44 -181
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +206 -74
- package/dist/hooks/manager.cjs +5 -2
- package/dist/hooks/manager.d.ts +2 -0
- package/dist/hooks/manager.d.ts.map +1 -1
- package/dist/hooks/manager.js +5 -2
- package/dist/hooks/types.d.ts +3 -0
- package/dist/hooks/types.d.ts.map +1 -1
- package/dist/index.browser.d.ts +1 -0
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/llm/executor/turn-executor.cjs +8 -4
- package/dist/llm/executor/turn-executor.d.ts +3 -1
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +8 -4
- package/dist/llm/providers/local/schemas.d.ts +102 -262
- package/dist/llm/providers/local/schemas.d.ts.map +1 -1
- package/dist/llm/registry/index.d.ts +5 -3
- package/dist/llm/registry/index.d.ts.map +1 -1
- package/dist/llm/resolver.cjs +0 -1
- package/dist/llm/resolver.d.ts.map +1 -1
- package/dist/llm/resolver.js +0 -1
- package/dist/llm/schemas.d.ts +95 -199
- package/dist/llm/schemas.d.ts.map +1 -1
- package/dist/llm/services/vercel.cjs +29 -6
- package/dist/llm/services/vercel.d.ts +3 -0
- package/dist/llm/services/vercel.d.ts.map +1 -1
- package/dist/llm/services/vercel.js +27 -5
- package/dist/logger/default-logger-factory.d.ts +28 -256
- package/dist/logger/default-logger-factory.d.ts.map +1 -1
- package/dist/logger/v2/schemas.d.ts +18 -120
- package/dist/logger/v2/schemas.d.ts.map +1 -1
- package/dist/mcp/manager.cjs +7 -2
- package/dist/mcp/manager.d.ts +3 -1
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.js +7 -2
- package/dist/mcp/mcp-client.cjs +71 -62
- package/dist/mcp/mcp-client.d.ts +3 -2
- package/dist/mcp/mcp-client.d.ts.map +1 -1
- package/dist/mcp/mcp-client.js +71 -62
- package/dist/mcp/schemas.cjs +4 -4
- package/dist/mcp/schemas.d.ts +77 -270
- package/dist/mcp/schemas.d.ts.map +1 -1
- package/dist/mcp/schemas.js +4 -4
- package/dist/memory/schemas.d.ts +37 -117
- package/dist/memory/schemas.d.ts.map +1 -1
- package/dist/prompts/schemas.d.ts +46 -190
- package/dist/prompts/schemas.d.ts.map +1 -1
- package/dist/resources/handlers/filesystem-handler.cjs +22 -3
- package/dist/resources/handlers/filesystem-handler.d.ts.map +1 -1
- package/dist/resources/handlers/filesystem-handler.js +22 -3
- package/dist/resources/schemas.d.ts +14 -68
- package/dist/resources/schemas.d.ts.map +1 -1
- package/dist/runtime/host-runtime.cjs +163 -0
- package/dist/runtime/host-runtime.d.ts +19 -0
- package/dist/runtime/host-runtime.d.ts.map +1 -0
- package/dist/runtime/host-runtime.js +133 -0
- package/dist/runtime/index.cjs +42 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +21 -0
- package/dist/runtime/run-context.cjs +53 -0
- package/dist/runtime/run-context.d.ts +13 -0
- package/dist/runtime/run-context.d.ts.map +1 -0
- package/dist/runtime/run-context.js +34 -0
- package/dist/session/chat-session.cjs +30 -32
- package/dist/session/chat-session.d.ts +5 -15
- package/dist/session/chat-session.d.ts.map +1 -1
- package/dist/session/chat-session.js +31 -33
- package/dist/session/error-codes.cjs +1 -0
- package/dist/session/error-codes.d.ts +2 -1
- package/dist/session/error-codes.d.ts.map +1 -1
- package/dist/session/error-codes.js +1 -0
- package/dist/session/errors.cjs +13 -0
- package/dist/session/errors.d.ts +6 -0
- package/dist/session/errors.d.ts.map +1 -1
- package/dist/session/errors.js +13 -0
- package/dist/session/schemas.d.ts +1 -7
- package/dist/session/schemas.d.ts.map +1 -1
- package/dist/systemPrompt/schemas.cjs +2 -10
- package/dist/systemPrompt/schemas.d.ts +53 -343
- package/dist/systemPrompt/schemas.d.ts.map +1 -1
- package/dist/systemPrompt/schemas.js +2 -10
- package/dist/telemetry/decorators.cjs +75 -57
- package/dist/telemetry/decorators.d.ts +2 -0
- package/dist/telemetry/decorators.d.ts.map +1 -1
- package/dist/telemetry/decorators.js +75 -57
- package/dist/telemetry/schemas.cjs +1 -1
- package/dist/telemetry/schemas.d.ts +9 -44
- package/dist/telemetry/schemas.d.ts.map +1 -1
- package/dist/telemetry/schemas.js +1 -1
- package/dist/telemetry/utils.cjs +9 -6
- package/dist/telemetry/utils.d.ts +3 -0
- package/dist/telemetry/utils.d.ts.map +1 -1
- package/dist/telemetry/utils.js +9 -6
- package/dist/tools/schemas.cjs +1 -1
- package/dist/tools/schemas.d.ts +19 -62
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +1 -1
- package/dist/tools/session-tool-preferences-store.d.ts +3 -9
- package/dist/tools/session-tool-preferences-store.d.ts.map +1 -1
- package/dist/tools/tool-manager.cjs +92 -36
- package/dist/tools/tool-manager.d.ts +12 -3
- package/dist/tools/tool-manager.d.ts.map +1 -1
- package/dist/tools/tool-manager.js +92 -36
- package/dist/tools/types.d.ts +7 -1
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils/result.cjs +11 -8
- package/dist/utils/result.d.ts +6 -6
- package/dist/utils/result.d.ts.map +1 -1
- package/dist/utils/result.js +12 -9
- package/dist/utils/schema.cjs +6 -2
- package/dist/utils/schema.d.ts +2 -7
- package/dist/utils/schema.d.ts.map +1 -1
- package/dist/utils/schema.js +6 -2
- package/dist/utils/zod-schema-converter.cjs +66 -66
- package/dist/utils/zod-schema-converter.d.ts +3 -2
- package/dist/utils/zod-schema-converter.d.ts.map +1 -1
- package/dist/utils/zod-schema-converter.js +66 -66
- package/package.json +4 -5
|
@@ -5,15 +5,33 @@ import type { ToolPresentationSnapshotV1 } from '../tools/types.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* Schema for approval types
|
|
7
7
|
*/
|
|
8
|
-
export declare const ApprovalTypeSchema: z.ZodEnum<
|
|
8
|
+
export declare const ApprovalTypeSchema: z.ZodEnum<{
|
|
9
|
+
custom: "custom";
|
|
10
|
+
tool_confirmation: "tool_confirmation";
|
|
11
|
+
command_confirmation: "command_confirmation";
|
|
12
|
+
elicitation: "elicitation";
|
|
13
|
+
directory_access: "directory_access";
|
|
14
|
+
}>;
|
|
9
15
|
/**
|
|
10
16
|
* Schema for approval status
|
|
11
17
|
*/
|
|
12
|
-
export declare const ApprovalStatusSchema: z.ZodEnum<
|
|
18
|
+
export declare const ApprovalStatusSchema: z.ZodEnum<{
|
|
19
|
+
approved: "approved";
|
|
20
|
+
denied: "denied";
|
|
21
|
+
cancelled: "cancelled";
|
|
22
|
+
}>;
|
|
13
23
|
/**
|
|
14
24
|
* Schema for denial/cancellation reasons
|
|
15
25
|
*/
|
|
16
|
-
export declare const DenialReasonSchema: z.ZodEnum<
|
|
26
|
+
export declare const DenialReasonSchema: z.ZodEnum<{
|
|
27
|
+
timeout: "timeout";
|
|
28
|
+
user_denied: "user_denied";
|
|
29
|
+
system_denied: "system_denied";
|
|
30
|
+
user_cancelled: "user_cancelled";
|
|
31
|
+
system_cancelled: "system_cancelled";
|
|
32
|
+
validation_failed: "validation_failed";
|
|
33
|
+
elicitation_disabled: "elicitation_disabled";
|
|
34
|
+
}>;
|
|
17
35
|
/**
|
|
18
36
|
* Directory access metadata schema
|
|
19
37
|
* Used when a tool tries to access files outside the working directory
|
|
@@ -21,75 +39,35 @@ export declare const DenialReasonSchema: z.ZodEnum<["user_denied", "system_denie
|
|
|
21
39
|
export declare const DirectoryAccessMetadataSchema: z.ZodObject<{
|
|
22
40
|
path: z.ZodString;
|
|
23
41
|
parentDir: z.ZodString;
|
|
24
|
-
operation: z.ZodEnum<
|
|
42
|
+
operation: z.ZodEnum<{
|
|
43
|
+
read: "read";
|
|
44
|
+
write: "write";
|
|
45
|
+
edit: "edit";
|
|
46
|
+
}>;
|
|
25
47
|
toolName: z.ZodString;
|
|
26
|
-
},
|
|
27
|
-
path: string;
|
|
28
|
-
parentDir: string;
|
|
29
|
-
operation: "read" | "write" | "edit";
|
|
30
|
-
toolName: string;
|
|
31
|
-
}, {
|
|
32
|
-
path: string;
|
|
33
|
-
parentDir: string;
|
|
34
|
-
operation: "read" | "write" | "edit";
|
|
35
|
-
toolName: string;
|
|
36
|
-
}>;
|
|
48
|
+
}, z.core.$strict>;
|
|
37
49
|
/**
|
|
38
50
|
* Tool approval metadata schema
|
|
39
51
|
*/
|
|
40
52
|
export declare const ToolApprovalMetadataSchema: z.ZodObject<{
|
|
41
53
|
toolName: z.ZodString;
|
|
42
|
-
presentationSnapshot: z.ZodOptional<z.
|
|
54
|
+
presentationSnapshot: z.ZodOptional<z.ZodCustom<ToolPresentationSnapshotV1, ToolPresentationSnapshotV1>>;
|
|
43
55
|
toolCallId: z.ZodString;
|
|
44
56
|
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
45
57
|
description: z.ZodOptional<z.ZodString>;
|
|
46
|
-
displayPreview: z.ZodOptional<z.
|
|
58
|
+
displayPreview: z.ZodOptional<z.ZodCustom<ToolDisplayData, ToolDisplayData>>;
|
|
47
59
|
directoryAccess: z.ZodOptional<z.ZodObject<{
|
|
48
60
|
path: z.ZodString;
|
|
49
61
|
parentDir: z.ZodString;
|
|
50
|
-
operation: z.ZodEnum<
|
|
62
|
+
operation: z.ZodEnum<{
|
|
63
|
+
read: "read";
|
|
64
|
+
write: "write";
|
|
65
|
+
edit: "edit";
|
|
66
|
+
}>;
|
|
51
67
|
toolName: z.ZodString;
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
operation: "read" | "write" | "edit";
|
|
56
|
-
toolName: string;
|
|
57
|
-
}, {
|
|
58
|
-
path: string;
|
|
59
|
-
parentDir: string;
|
|
60
|
-
operation: "read" | "write" | "edit";
|
|
61
|
-
toolName: string;
|
|
62
|
-
}>>;
|
|
63
|
-
suggestedPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
64
|
-
}, "strict", z.ZodTypeAny, {
|
|
65
|
-
toolName: string;
|
|
66
|
-
toolCallId: string;
|
|
67
|
-
args: Record<string, unknown>;
|
|
68
|
-
description?: string | undefined;
|
|
69
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
70
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
71
|
-
directoryAccess?: {
|
|
72
|
-
path: string;
|
|
73
|
-
parentDir: string;
|
|
74
|
-
operation: "read" | "write" | "edit";
|
|
75
|
-
toolName: string;
|
|
76
|
-
} | undefined;
|
|
77
|
-
suggestedPatterns?: string[] | undefined;
|
|
78
|
-
}, {
|
|
79
|
-
toolName: string;
|
|
80
|
-
toolCallId: string;
|
|
81
|
-
args: Record<string, unknown>;
|
|
82
|
-
description?: string | undefined;
|
|
83
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
84
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
85
|
-
directoryAccess?: {
|
|
86
|
-
path: string;
|
|
87
|
-
parentDir: string;
|
|
88
|
-
operation: "read" | "write" | "edit";
|
|
89
|
-
toolName: string;
|
|
90
|
-
} | undefined;
|
|
91
|
-
suggestedPatterns?: string[] | undefined;
|
|
92
|
-
}>;
|
|
68
|
+
}, z.core.$strict>>;
|
|
69
|
+
suggestedPatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
70
|
+
}, z.core.$strict>;
|
|
93
71
|
/**
|
|
94
72
|
* Command confirmation metadata schema
|
|
95
73
|
* TODO: Consider combining this with regular tools schemas for consistency
|
|
@@ -98,34 +76,16 @@ export declare const CommandConfirmationMetadataSchema: z.ZodObject<{
|
|
|
98
76
|
toolName: z.ZodString;
|
|
99
77
|
command: z.ZodString;
|
|
100
78
|
originalCommand: z.ZodOptional<z.ZodString>;
|
|
101
|
-
},
|
|
102
|
-
toolName: string;
|
|
103
|
-
command: string;
|
|
104
|
-
originalCommand?: string | undefined;
|
|
105
|
-
}, {
|
|
106
|
-
toolName: string;
|
|
107
|
-
command: string;
|
|
108
|
-
originalCommand?: string | undefined;
|
|
109
|
-
}>;
|
|
79
|
+
}, z.core.$strict>;
|
|
110
80
|
/**
|
|
111
81
|
* Elicitation metadata schema
|
|
112
82
|
*/
|
|
113
83
|
export declare const ElicitationMetadataSchema: z.ZodObject<{
|
|
114
|
-
schema: z.ZodType<JSONSchema7, z.
|
|
84
|
+
schema: z.ZodType<JSONSchema7, unknown, z.core.$ZodTypeInternals<JSONSchema7, unknown>>;
|
|
115
85
|
prompt: z.ZodString;
|
|
116
86
|
serverName: z.ZodString;
|
|
117
87
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
118
|
-
},
|
|
119
|
-
prompt: string;
|
|
120
|
-
schema: JSONSchema7;
|
|
121
|
-
serverName: string;
|
|
122
|
-
context?: Record<string, unknown> | undefined;
|
|
123
|
-
}, {
|
|
124
|
-
prompt: string;
|
|
125
|
-
schema: JSONSchema7;
|
|
126
|
-
serverName: string;
|
|
127
|
-
context?: Record<string, unknown> | undefined;
|
|
128
|
-
}>;
|
|
88
|
+
}, z.core.$strict>;
|
|
129
89
|
/**
|
|
130
90
|
* Custom approval metadata schema - flexible
|
|
131
91
|
*/
|
|
@@ -135,567 +95,216 @@ export declare const CustomApprovalMetadataSchema: z.ZodRecord<z.ZodString, z.Zo
|
|
|
135
95
|
*/
|
|
136
96
|
export declare const BaseApprovalRequestSchema: z.ZodObject<{
|
|
137
97
|
approvalId: z.ZodString;
|
|
138
|
-
type: z.ZodEnum<
|
|
98
|
+
type: z.ZodEnum<{
|
|
99
|
+
custom: "custom";
|
|
100
|
+
tool_confirmation: "tool_confirmation";
|
|
101
|
+
command_confirmation: "command_confirmation";
|
|
102
|
+
elicitation: "elicitation";
|
|
103
|
+
directory_access: "directory_access";
|
|
104
|
+
}>;
|
|
139
105
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
106
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
108
|
+
}, z.core.$strict>>;
|
|
140
109
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
141
110
|
timestamp: z.ZodDate;
|
|
142
|
-
},
|
|
143
|
-
type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
|
|
144
|
-
approvalId: string;
|
|
145
|
-
timestamp: Date;
|
|
146
|
-
timeout?: number | undefined;
|
|
147
|
-
sessionId?: string | undefined;
|
|
148
|
-
}, {
|
|
149
|
-
type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
|
|
150
|
-
approvalId: string;
|
|
151
|
-
timestamp: Date;
|
|
152
|
-
timeout?: number | undefined;
|
|
153
|
-
sessionId?: string | undefined;
|
|
154
|
-
}>;
|
|
111
|
+
}, z.core.$strip>;
|
|
155
112
|
/**
|
|
156
113
|
* Tool approval request schema
|
|
157
114
|
*/
|
|
158
115
|
export declare const ToolApprovalRequestSchema: z.ZodObject<{
|
|
159
116
|
approvalId: z.ZodString;
|
|
160
117
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
118
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
120
|
+
}, z.core.$strict>>;
|
|
161
121
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
162
122
|
timestamp: z.ZodDate;
|
|
163
|
-
} & {
|
|
164
123
|
type: z.ZodLiteral<"tool_confirmation">;
|
|
165
124
|
metadata: z.ZodObject<{
|
|
166
125
|
toolName: z.ZodString;
|
|
167
|
-
presentationSnapshot: z.ZodOptional<z.
|
|
126
|
+
presentationSnapshot: z.ZodOptional<z.ZodCustom<ToolPresentationSnapshotV1, ToolPresentationSnapshotV1>>;
|
|
168
127
|
toolCallId: z.ZodString;
|
|
169
128
|
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
170
129
|
description: z.ZodOptional<z.ZodString>;
|
|
171
|
-
displayPreview: z.ZodOptional<z.
|
|
130
|
+
displayPreview: z.ZodOptional<z.ZodCustom<ToolDisplayData, ToolDisplayData>>;
|
|
172
131
|
directoryAccess: z.ZodOptional<z.ZodObject<{
|
|
173
132
|
path: z.ZodString;
|
|
174
133
|
parentDir: z.ZodString;
|
|
175
|
-
operation: z.ZodEnum<
|
|
134
|
+
operation: z.ZodEnum<{
|
|
135
|
+
read: "read";
|
|
136
|
+
write: "write";
|
|
137
|
+
edit: "edit";
|
|
138
|
+
}>;
|
|
176
139
|
toolName: z.ZodString;
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
toolName: string;
|
|
182
|
-
}, {
|
|
183
|
-
path: string;
|
|
184
|
-
parentDir: string;
|
|
185
|
-
operation: "read" | "write" | "edit";
|
|
186
|
-
toolName: string;
|
|
187
|
-
}>>;
|
|
188
|
-
suggestedPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
189
|
-
}, "strict", z.ZodTypeAny, {
|
|
190
|
-
toolName: string;
|
|
191
|
-
toolCallId: string;
|
|
192
|
-
args: Record<string, unknown>;
|
|
193
|
-
description?: string | undefined;
|
|
194
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
195
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
196
|
-
directoryAccess?: {
|
|
197
|
-
path: string;
|
|
198
|
-
parentDir: string;
|
|
199
|
-
operation: "read" | "write" | "edit";
|
|
200
|
-
toolName: string;
|
|
201
|
-
} | undefined;
|
|
202
|
-
suggestedPatterns?: string[] | undefined;
|
|
203
|
-
}, {
|
|
204
|
-
toolName: string;
|
|
205
|
-
toolCallId: string;
|
|
206
|
-
args: Record<string, unknown>;
|
|
207
|
-
description?: string | undefined;
|
|
208
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
209
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
210
|
-
directoryAccess?: {
|
|
211
|
-
path: string;
|
|
212
|
-
parentDir: string;
|
|
213
|
-
operation: "read" | "write" | "edit";
|
|
214
|
-
toolName: string;
|
|
215
|
-
} | undefined;
|
|
216
|
-
suggestedPatterns?: string[] | undefined;
|
|
217
|
-
}>;
|
|
218
|
-
}, "strict", z.ZodTypeAny, {
|
|
219
|
-
type: "tool_confirmation";
|
|
220
|
-
approvalId: string;
|
|
221
|
-
timestamp: Date;
|
|
222
|
-
metadata: {
|
|
223
|
-
toolName: string;
|
|
224
|
-
toolCallId: string;
|
|
225
|
-
args: Record<string, unknown>;
|
|
226
|
-
description?: string | undefined;
|
|
227
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
228
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
229
|
-
directoryAccess?: {
|
|
230
|
-
path: string;
|
|
231
|
-
parentDir: string;
|
|
232
|
-
operation: "read" | "write" | "edit";
|
|
233
|
-
toolName: string;
|
|
234
|
-
} | undefined;
|
|
235
|
-
suggestedPatterns?: string[] | undefined;
|
|
236
|
-
};
|
|
237
|
-
timeout?: number | undefined;
|
|
238
|
-
sessionId?: string | undefined;
|
|
239
|
-
}, {
|
|
240
|
-
type: "tool_confirmation";
|
|
241
|
-
approvalId: string;
|
|
242
|
-
timestamp: Date;
|
|
243
|
-
metadata: {
|
|
244
|
-
toolName: string;
|
|
245
|
-
toolCallId: string;
|
|
246
|
-
args: Record<string, unknown>;
|
|
247
|
-
description?: string | undefined;
|
|
248
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
249
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
250
|
-
directoryAccess?: {
|
|
251
|
-
path: string;
|
|
252
|
-
parentDir: string;
|
|
253
|
-
operation: "read" | "write" | "edit";
|
|
254
|
-
toolName: string;
|
|
255
|
-
} | undefined;
|
|
256
|
-
suggestedPatterns?: string[] | undefined;
|
|
257
|
-
};
|
|
258
|
-
timeout?: number | undefined;
|
|
259
|
-
sessionId?: string | undefined;
|
|
260
|
-
}>;
|
|
140
|
+
}, z.core.$strict>>;
|
|
141
|
+
suggestedPatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
142
|
+
}, z.core.$strict>;
|
|
143
|
+
}, z.core.$strict>;
|
|
261
144
|
/**
|
|
262
145
|
* Command confirmation request schema
|
|
263
146
|
*/
|
|
264
147
|
export declare const CommandConfirmationRequestSchema: z.ZodObject<{
|
|
265
148
|
approvalId: z.ZodString;
|
|
266
149
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
150
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
152
|
+
}, z.core.$strict>>;
|
|
267
153
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
268
154
|
timestamp: z.ZodDate;
|
|
269
|
-
} & {
|
|
270
155
|
type: z.ZodLiteral<"command_confirmation">;
|
|
271
156
|
metadata: z.ZodObject<{
|
|
272
157
|
toolName: z.ZodString;
|
|
273
158
|
command: z.ZodString;
|
|
274
159
|
originalCommand: z.ZodOptional<z.ZodString>;
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
command: string;
|
|
278
|
-
originalCommand?: string | undefined;
|
|
279
|
-
}, {
|
|
280
|
-
toolName: string;
|
|
281
|
-
command: string;
|
|
282
|
-
originalCommand?: string | undefined;
|
|
283
|
-
}>;
|
|
284
|
-
}, "strict", z.ZodTypeAny, {
|
|
285
|
-
type: "command_confirmation";
|
|
286
|
-
approvalId: string;
|
|
287
|
-
timestamp: Date;
|
|
288
|
-
metadata: {
|
|
289
|
-
toolName: string;
|
|
290
|
-
command: string;
|
|
291
|
-
originalCommand?: string | undefined;
|
|
292
|
-
};
|
|
293
|
-
timeout?: number | undefined;
|
|
294
|
-
sessionId?: string | undefined;
|
|
295
|
-
}, {
|
|
296
|
-
type: "command_confirmation";
|
|
297
|
-
approvalId: string;
|
|
298
|
-
timestamp: Date;
|
|
299
|
-
metadata: {
|
|
300
|
-
toolName: string;
|
|
301
|
-
command: string;
|
|
302
|
-
originalCommand?: string | undefined;
|
|
303
|
-
};
|
|
304
|
-
timeout?: number | undefined;
|
|
305
|
-
sessionId?: string | undefined;
|
|
306
|
-
}>;
|
|
160
|
+
}, z.core.$strict>;
|
|
161
|
+
}, z.core.$strict>;
|
|
307
162
|
/**
|
|
308
163
|
* Elicitation request schema
|
|
309
164
|
*/
|
|
310
165
|
export declare const ElicitationRequestSchema: z.ZodObject<{
|
|
311
166
|
approvalId: z.ZodString;
|
|
312
167
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
168
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
169
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
170
|
+
}, z.core.$strict>>;
|
|
313
171
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
314
172
|
timestamp: z.ZodDate;
|
|
315
|
-
} & {
|
|
316
173
|
type: z.ZodLiteral<"elicitation">;
|
|
317
174
|
metadata: z.ZodObject<{
|
|
318
|
-
schema: z.ZodType<JSONSchema7, z.
|
|
175
|
+
schema: z.ZodType<JSONSchema7, unknown, z.core.$ZodTypeInternals<JSONSchema7, unknown>>;
|
|
319
176
|
prompt: z.ZodString;
|
|
320
177
|
serverName: z.ZodString;
|
|
321
178
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
322
|
-
},
|
|
323
|
-
|
|
324
|
-
schema: JSONSchema7;
|
|
325
|
-
serverName: string;
|
|
326
|
-
context?: Record<string, unknown> | undefined;
|
|
327
|
-
}, {
|
|
328
|
-
prompt: string;
|
|
329
|
-
schema: JSONSchema7;
|
|
330
|
-
serverName: string;
|
|
331
|
-
context?: Record<string, unknown> | undefined;
|
|
332
|
-
}>;
|
|
333
|
-
}, "strict", z.ZodTypeAny, {
|
|
334
|
-
type: "elicitation";
|
|
335
|
-
approvalId: string;
|
|
336
|
-
timestamp: Date;
|
|
337
|
-
metadata: {
|
|
338
|
-
prompt: string;
|
|
339
|
-
schema: JSONSchema7;
|
|
340
|
-
serverName: string;
|
|
341
|
-
context?: Record<string, unknown> | undefined;
|
|
342
|
-
};
|
|
343
|
-
timeout?: number | undefined;
|
|
344
|
-
sessionId?: string | undefined;
|
|
345
|
-
}, {
|
|
346
|
-
type: "elicitation";
|
|
347
|
-
approvalId: string;
|
|
348
|
-
timestamp: Date;
|
|
349
|
-
metadata: {
|
|
350
|
-
prompt: string;
|
|
351
|
-
schema: JSONSchema7;
|
|
352
|
-
serverName: string;
|
|
353
|
-
context?: Record<string, unknown> | undefined;
|
|
354
|
-
};
|
|
355
|
-
timeout?: number | undefined;
|
|
356
|
-
sessionId?: string | undefined;
|
|
357
|
-
}>;
|
|
179
|
+
}, z.core.$strict>;
|
|
180
|
+
}, z.core.$strict>;
|
|
358
181
|
/**
|
|
359
182
|
* Custom approval request schema
|
|
360
183
|
*/
|
|
361
184
|
export declare const CustomApprovalRequestSchema: z.ZodObject<{
|
|
362
185
|
approvalId: z.ZodString;
|
|
363
186
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
187
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
188
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
189
|
+
}, z.core.$strict>>;
|
|
364
190
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
365
191
|
timestamp: z.ZodDate;
|
|
366
|
-
} & {
|
|
367
192
|
type: z.ZodLiteral<"custom">;
|
|
368
193
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
369
|
-
},
|
|
370
|
-
type: "custom";
|
|
371
|
-
approvalId: string;
|
|
372
|
-
timestamp: Date;
|
|
373
|
-
metadata: Record<string, unknown>;
|
|
374
|
-
timeout?: number | undefined;
|
|
375
|
-
sessionId?: string | undefined;
|
|
376
|
-
}, {
|
|
377
|
-
type: "custom";
|
|
378
|
-
approvalId: string;
|
|
379
|
-
timestamp: Date;
|
|
380
|
-
metadata: Record<string, unknown>;
|
|
381
|
-
timeout?: number | undefined;
|
|
382
|
-
sessionId?: string | undefined;
|
|
383
|
-
}>;
|
|
194
|
+
}, z.core.$strict>;
|
|
384
195
|
/**
|
|
385
196
|
* Directory access request schema
|
|
386
197
|
*/
|
|
387
198
|
export declare const DirectoryAccessRequestSchema: z.ZodObject<{
|
|
388
199
|
approvalId: z.ZodString;
|
|
389
200
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
201
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
202
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
203
|
+
}, z.core.$strict>>;
|
|
390
204
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
391
205
|
timestamp: z.ZodDate;
|
|
392
|
-
} & {
|
|
393
206
|
type: z.ZodLiteral<"directory_access">;
|
|
394
207
|
metadata: z.ZodObject<{
|
|
395
208
|
path: z.ZodString;
|
|
396
209
|
parentDir: z.ZodString;
|
|
397
|
-
operation: z.ZodEnum<
|
|
210
|
+
operation: z.ZodEnum<{
|
|
211
|
+
read: "read";
|
|
212
|
+
write: "write";
|
|
213
|
+
edit: "edit";
|
|
214
|
+
}>;
|
|
398
215
|
toolName: z.ZodString;
|
|
399
|
-
},
|
|
400
|
-
|
|
401
|
-
parentDir: string;
|
|
402
|
-
operation: "read" | "write" | "edit";
|
|
403
|
-
toolName: string;
|
|
404
|
-
}, {
|
|
405
|
-
path: string;
|
|
406
|
-
parentDir: string;
|
|
407
|
-
operation: "read" | "write" | "edit";
|
|
408
|
-
toolName: string;
|
|
409
|
-
}>;
|
|
410
|
-
}, "strict", z.ZodTypeAny, {
|
|
411
|
-
type: "directory_access";
|
|
412
|
-
approvalId: string;
|
|
413
|
-
timestamp: Date;
|
|
414
|
-
metadata: {
|
|
415
|
-
path: string;
|
|
416
|
-
parentDir: string;
|
|
417
|
-
operation: "read" | "write" | "edit";
|
|
418
|
-
toolName: string;
|
|
419
|
-
};
|
|
420
|
-
timeout?: number | undefined;
|
|
421
|
-
sessionId?: string | undefined;
|
|
422
|
-
}, {
|
|
423
|
-
type: "directory_access";
|
|
424
|
-
approvalId: string;
|
|
425
|
-
timestamp: Date;
|
|
426
|
-
metadata: {
|
|
427
|
-
path: string;
|
|
428
|
-
parentDir: string;
|
|
429
|
-
operation: "read" | "write" | "edit";
|
|
430
|
-
toolName: string;
|
|
431
|
-
};
|
|
432
|
-
timeout?: number | undefined;
|
|
433
|
-
sessionId?: string | undefined;
|
|
434
|
-
}>;
|
|
216
|
+
}, z.core.$strict>;
|
|
217
|
+
}, z.core.$strict>;
|
|
435
218
|
/**
|
|
436
219
|
* Discriminated union for all approval requests
|
|
437
220
|
*/
|
|
438
|
-
export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<
|
|
221
|
+
export declare const ApprovalRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
439
222
|
approvalId: z.ZodString;
|
|
440
223
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
224
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
225
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
226
|
+
}, z.core.$strict>>;
|
|
441
227
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
442
228
|
timestamp: z.ZodDate;
|
|
443
|
-
} & {
|
|
444
229
|
type: z.ZodLiteral<"tool_confirmation">;
|
|
445
230
|
metadata: z.ZodObject<{
|
|
446
231
|
toolName: z.ZodString;
|
|
447
|
-
presentationSnapshot: z.ZodOptional<z.
|
|
232
|
+
presentationSnapshot: z.ZodOptional<z.ZodCustom<ToolPresentationSnapshotV1, ToolPresentationSnapshotV1>>;
|
|
448
233
|
toolCallId: z.ZodString;
|
|
449
234
|
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
450
235
|
description: z.ZodOptional<z.ZodString>;
|
|
451
|
-
displayPreview: z.ZodOptional<z.
|
|
236
|
+
displayPreview: z.ZodOptional<z.ZodCustom<ToolDisplayData, ToolDisplayData>>;
|
|
452
237
|
directoryAccess: z.ZodOptional<z.ZodObject<{
|
|
453
238
|
path: z.ZodString;
|
|
454
239
|
parentDir: z.ZodString;
|
|
455
|
-
operation: z.ZodEnum<
|
|
240
|
+
operation: z.ZodEnum<{
|
|
241
|
+
read: "read";
|
|
242
|
+
write: "write";
|
|
243
|
+
edit: "edit";
|
|
244
|
+
}>;
|
|
456
245
|
toolName: z.ZodString;
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
toolName: string;
|
|
462
|
-
}, {
|
|
463
|
-
path: string;
|
|
464
|
-
parentDir: string;
|
|
465
|
-
operation: "read" | "write" | "edit";
|
|
466
|
-
toolName: string;
|
|
467
|
-
}>>;
|
|
468
|
-
suggestedPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
469
|
-
}, "strict", z.ZodTypeAny, {
|
|
470
|
-
toolName: string;
|
|
471
|
-
toolCallId: string;
|
|
472
|
-
args: Record<string, unknown>;
|
|
473
|
-
description?: string | undefined;
|
|
474
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
475
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
476
|
-
directoryAccess?: {
|
|
477
|
-
path: string;
|
|
478
|
-
parentDir: string;
|
|
479
|
-
operation: "read" | "write" | "edit";
|
|
480
|
-
toolName: string;
|
|
481
|
-
} | undefined;
|
|
482
|
-
suggestedPatterns?: string[] | undefined;
|
|
483
|
-
}, {
|
|
484
|
-
toolName: string;
|
|
485
|
-
toolCallId: string;
|
|
486
|
-
args: Record<string, unknown>;
|
|
487
|
-
description?: string | undefined;
|
|
488
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
489
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
490
|
-
directoryAccess?: {
|
|
491
|
-
path: string;
|
|
492
|
-
parentDir: string;
|
|
493
|
-
operation: "read" | "write" | "edit";
|
|
494
|
-
toolName: string;
|
|
495
|
-
} | undefined;
|
|
496
|
-
suggestedPatterns?: string[] | undefined;
|
|
497
|
-
}>;
|
|
498
|
-
}, "strict", z.ZodTypeAny, {
|
|
499
|
-
type: "tool_confirmation";
|
|
500
|
-
approvalId: string;
|
|
501
|
-
timestamp: Date;
|
|
502
|
-
metadata: {
|
|
503
|
-
toolName: string;
|
|
504
|
-
toolCallId: string;
|
|
505
|
-
args: Record<string, unknown>;
|
|
506
|
-
description?: string | undefined;
|
|
507
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
508
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
509
|
-
directoryAccess?: {
|
|
510
|
-
path: string;
|
|
511
|
-
parentDir: string;
|
|
512
|
-
operation: "read" | "write" | "edit";
|
|
513
|
-
toolName: string;
|
|
514
|
-
} | undefined;
|
|
515
|
-
suggestedPatterns?: string[] | undefined;
|
|
516
|
-
};
|
|
517
|
-
timeout?: number | undefined;
|
|
518
|
-
sessionId?: string | undefined;
|
|
519
|
-
}, {
|
|
520
|
-
type: "tool_confirmation";
|
|
521
|
-
approvalId: string;
|
|
522
|
-
timestamp: Date;
|
|
523
|
-
metadata: {
|
|
524
|
-
toolName: string;
|
|
525
|
-
toolCallId: string;
|
|
526
|
-
args: Record<string, unknown>;
|
|
527
|
-
description?: string | undefined;
|
|
528
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
529
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
530
|
-
directoryAccess?: {
|
|
531
|
-
path: string;
|
|
532
|
-
parentDir: string;
|
|
533
|
-
operation: "read" | "write" | "edit";
|
|
534
|
-
toolName: string;
|
|
535
|
-
} | undefined;
|
|
536
|
-
suggestedPatterns?: string[] | undefined;
|
|
537
|
-
};
|
|
538
|
-
timeout?: number | undefined;
|
|
539
|
-
sessionId?: string | undefined;
|
|
540
|
-
}>, z.ZodObject<{
|
|
246
|
+
}, z.core.$strict>>;
|
|
247
|
+
suggestedPatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
248
|
+
}, z.core.$strict>;
|
|
249
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
541
250
|
approvalId: z.ZodString;
|
|
542
251
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
252
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
253
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
254
|
+
}, z.core.$strict>>;
|
|
543
255
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
544
256
|
timestamp: z.ZodDate;
|
|
545
|
-
} & {
|
|
546
257
|
type: z.ZodLiteral<"command_confirmation">;
|
|
547
258
|
metadata: z.ZodObject<{
|
|
548
259
|
toolName: z.ZodString;
|
|
549
260
|
command: z.ZodString;
|
|
550
261
|
originalCommand: z.ZodOptional<z.ZodString>;
|
|
551
|
-
},
|
|
552
|
-
|
|
553
|
-
command: string;
|
|
554
|
-
originalCommand?: string | undefined;
|
|
555
|
-
}, {
|
|
556
|
-
toolName: string;
|
|
557
|
-
command: string;
|
|
558
|
-
originalCommand?: string | undefined;
|
|
559
|
-
}>;
|
|
560
|
-
}, "strict", z.ZodTypeAny, {
|
|
561
|
-
type: "command_confirmation";
|
|
562
|
-
approvalId: string;
|
|
563
|
-
timestamp: Date;
|
|
564
|
-
metadata: {
|
|
565
|
-
toolName: string;
|
|
566
|
-
command: string;
|
|
567
|
-
originalCommand?: string | undefined;
|
|
568
|
-
};
|
|
569
|
-
timeout?: number | undefined;
|
|
570
|
-
sessionId?: string | undefined;
|
|
571
|
-
}, {
|
|
572
|
-
type: "command_confirmation";
|
|
573
|
-
approvalId: string;
|
|
574
|
-
timestamp: Date;
|
|
575
|
-
metadata: {
|
|
576
|
-
toolName: string;
|
|
577
|
-
command: string;
|
|
578
|
-
originalCommand?: string | undefined;
|
|
579
|
-
};
|
|
580
|
-
timeout?: number | undefined;
|
|
581
|
-
sessionId?: string | undefined;
|
|
582
|
-
}>, z.ZodObject<{
|
|
262
|
+
}, z.core.$strict>;
|
|
263
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
583
264
|
approvalId: z.ZodString;
|
|
584
265
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
266
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
267
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
268
|
+
}, z.core.$strict>>;
|
|
585
269
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
586
270
|
timestamp: z.ZodDate;
|
|
587
|
-
} & {
|
|
588
271
|
type: z.ZodLiteral<"elicitation">;
|
|
589
272
|
metadata: z.ZodObject<{
|
|
590
|
-
schema: z.ZodType<JSONSchema7, z.
|
|
273
|
+
schema: z.ZodType<JSONSchema7, unknown, z.core.$ZodTypeInternals<JSONSchema7, unknown>>;
|
|
591
274
|
prompt: z.ZodString;
|
|
592
275
|
serverName: z.ZodString;
|
|
593
276
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
594
|
-
},
|
|
595
|
-
|
|
596
|
-
schema: JSONSchema7;
|
|
597
|
-
serverName: string;
|
|
598
|
-
context?: Record<string, unknown> | undefined;
|
|
599
|
-
}, {
|
|
600
|
-
prompt: string;
|
|
601
|
-
schema: JSONSchema7;
|
|
602
|
-
serverName: string;
|
|
603
|
-
context?: Record<string, unknown> | undefined;
|
|
604
|
-
}>;
|
|
605
|
-
}, "strict", z.ZodTypeAny, {
|
|
606
|
-
type: "elicitation";
|
|
607
|
-
approvalId: string;
|
|
608
|
-
timestamp: Date;
|
|
609
|
-
metadata: {
|
|
610
|
-
prompt: string;
|
|
611
|
-
schema: JSONSchema7;
|
|
612
|
-
serverName: string;
|
|
613
|
-
context?: Record<string, unknown> | undefined;
|
|
614
|
-
};
|
|
615
|
-
timeout?: number | undefined;
|
|
616
|
-
sessionId?: string | undefined;
|
|
617
|
-
}, {
|
|
618
|
-
type: "elicitation";
|
|
619
|
-
approvalId: string;
|
|
620
|
-
timestamp: Date;
|
|
621
|
-
metadata: {
|
|
622
|
-
prompt: string;
|
|
623
|
-
schema: JSONSchema7;
|
|
624
|
-
serverName: string;
|
|
625
|
-
context?: Record<string, unknown> | undefined;
|
|
626
|
-
};
|
|
627
|
-
timeout?: number | undefined;
|
|
628
|
-
sessionId?: string | undefined;
|
|
629
|
-
}>, z.ZodObject<{
|
|
277
|
+
}, z.core.$strict>;
|
|
278
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
630
279
|
approvalId: z.ZodString;
|
|
631
280
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
281
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
282
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
283
|
+
}, z.core.$strict>>;
|
|
632
284
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
633
285
|
timestamp: z.ZodDate;
|
|
634
|
-
} & {
|
|
635
286
|
type: z.ZodLiteral<"custom">;
|
|
636
287
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
637
|
-
},
|
|
638
|
-
type: "custom";
|
|
639
|
-
approvalId: string;
|
|
640
|
-
timestamp: Date;
|
|
641
|
-
metadata: Record<string, unknown>;
|
|
642
|
-
timeout?: number | undefined;
|
|
643
|
-
sessionId?: string | undefined;
|
|
644
|
-
}, {
|
|
645
|
-
type: "custom";
|
|
646
|
-
approvalId: string;
|
|
647
|
-
timestamp: Date;
|
|
648
|
-
metadata: Record<string, unknown>;
|
|
649
|
-
timeout?: number | undefined;
|
|
650
|
-
sessionId?: string | undefined;
|
|
651
|
-
}>, z.ZodObject<{
|
|
288
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
652
289
|
approvalId: z.ZodString;
|
|
653
290
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
291
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
292
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
293
|
+
}, z.core.$strict>>;
|
|
654
294
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
655
295
|
timestamp: z.ZodDate;
|
|
656
|
-
} & {
|
|
657
296
|
type: z.ZodLiteral<"directory_access">;
|
|
658
297
|
metadata: z.ZodObject<{
|
|
659
298
|
path: z.ZodString;
|
|
660
299
|
parentDir: z.ZodString;
|
|
661
|
-
operation: z.ZodEnum<
|
|
300
|
+
operation: z.ZodEnum<{
|
|
301
|
+
read: "read";
|
|
302
|
+
write: "write";
|
|
303
|
+
edit: "edit";
|
|
304
|
+
}>;
|
|
662
305
|
toolName: z.ZodString;
|
|
663
|
-
},
|
|
664
|
-
|
|
665
|
-
parentDir: string;
|
|
666
|
-
operation: "read" | "write" | "edit";
|
|
667
|
-
toolName: string;
|
|
668
|
-
}, {
|
|
669
|
-
path: string;
|
|
670
|
-
parentDir: string;
|
|
671
|
-
operation: "read" | "write" | "edit";
|
|
672
|
-
toolName: string;
|
|
673
|
-
}>;
|
|
674
|
-
}, "strict", z.ZodTypeAny, {
|
|
675
|
-
type: "directory_access";
|
|
676
|
-
approvalId: string;
|
|
677
|
-
timestamp: Date;
|
|
678
|
-
metadata: {
|
|
679
|
-
path: string;
|
|
680
|
-
parentDir: string;
|
|
681
|
-
operation: "read" | "write" | "edit";
|
|
682
|
-
toolName: string;
|
|
683
|
-
};
|
|
684
|
-
timeout?: number | undefined;
|
|
685
|
-
sessionId?: string | undefined;
|
|
686
|
-
}, {
|
|
687
|
-
type: "directory_access";
|
|
688
|
-
approvalId: string;
|
|
689
|
-
timestamp: Date;
|
|
690
|
-
metadata: {
|
|
691
|
-
path: string;
|
|
692
|
-
parentDir: string;
|
|
693
|
-
operation: "read" | "write" | "edit";
|
|
694
|
-
toolName: string;
|
|
695
|
-
};
|
|
696
|
-
timeout?: number | undefined;
|
|
697
|
-
sessionId?: string | undefined;
|
|
698
|
-
}>]>;
|
|
306
|
+
}, z.core.$strict>;
|
|
307
|
+
}, z.core.$strict>], "type">;
|
|
699
308
|
/**
|
|
700
309
|
* Tool approval response data schema
|
|
701
310
|
*/
|
|
@@ -703,29 +312,17 @@ export declare const ToolApprovalResponseDataSchema: z.ZodObject<{
|
|
|
703
312
|
rememberChoice: z.ZodOptional<z.ZodBoolean>;
|
|
704
313
|
rememberPattern: z.ZodOptional<z.ZodString>;
|
|
705
314
|
rememberDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
706
|
-
},
|
|
707
|
-
rememberChoice?: boolean | undefined;
|
|
708
|
-
rememberPattern?: string | undefined;
|
|
709
|
-
rememberDirectory?: boolean | undefined;
|
|
710
|
-
}, {
|
|
711
|
-
rememberChoice?: boolean | undefined;
|
|
712
|
-
rememberPattern?: string | undefined;
|
|
713
|
-
rememberDirectory?: boolean | undefined;
|
|
714
|
-
}>;
|
|
315
|
+
}, z.core.$strict>;
|
|
715
316
|
/**
|
|
716
317
|
* Command confirmation response data schema
|
|
717
318
|
*/
|
|
718
|
-
export declare const CommandConfirmationResponseDataSchema: z.ZodObject<{},
|
|
319
|
+
export declare const CommandConfirmationResponseDataSchema: z.ZodObject<{}, z.core.$strict>;
|
|
719
320
|
/**
|
|
720
321
|
* Elicitation response data schema
|
|
721
322
|
*/
|
|
722
323
|
export declare const ElicitationResponseDataSchema: z.ZodObject<{
|
|
723
324
|
formData: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
724
|
-
},
|
|
725
|
-
formData: Record<string, unknown>;
|
|
726
|
-
}, {
|
|
727
|
-
formData: Record<string, unknown>;
|
|
728
|
-
}>;
|
|
325
|
+
}, z.core.$strict>;
|
|
729
326
|
/**
|
|
730
327
|
* Custom approval response data schema
|
|
731
328
|
*/
|
|
@@ -735,625 +332,357 @@ export declare const CustomApprovalResponseDataSchema: z.ZodRecord<z.ZodString,
|
|
|
735
332
|
*/
|
|
736
333
|
export declare const DirectoryAccessResponseDataSchema: z.ZodObject<{
|
|
737
334
|
rememberDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
738
|
-
},
|
|
739
|
-
rememberDirectory?: boolean | undefined;
|
|
740
|
-
}, {
|
|
741
|
-
rememberDirectory?: boolean | undefined;
|
|
742
|
-
}>;
|
|
335
|
+
}, z.core.$strict>;
|
|
743
336
|
/**
|
|
744
337
|
* Base approval response schema
|
|
745
338
|
*/
|
|
746
339
|
export declare const BaseApprovalResponseSchema: z.ZodObject<{
|
|
747
340
|
approvalId: z.ZodString;
|
|
748
|
-
status: z.ZodEnum<
|
|
341
|
+
status: z.ZodEnum<{
|
|
342
|
+
approved: "approved";
|
|
343
|
+
denied: "denied";
|
|
344
|
+
cancelled: "cancelled";
|
|
345
|
+
}>;
|
|
749
346
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
750
|
-
|
|
347
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
348
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
349
|
+
}, z.core.$strict>>;
|
|
350
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
351
|
+
timeout: "timeout";
|
|
352
|
+
user_denied: "user_denied";
|
|
353
|
+
system_denied: "system_denied";
|
|
354
|
+
user_cancelled: "user_cancelled";
|
|
355
|
+
system_cancelled: "system_cancelled";
|
|
356
|
+
validation_failed: "validation_failed";
|
|
357
|
+
elicitation_disabled: "elicitation_disabled";
|
|
358
|
+
}>>;
|
|
751
359
|
message: z.ZodOptional<z.ZodString>;
|
|
752
360
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
753
|
-
},
|
|
754
|
-
status: "approved" | "denied" | "cancelled";
|
|
755
|
-
approvalId: string;
|
|
756
|
-
message?: string | undefined;
|
|
757
|
-
sessionId?: string | undefined;
|
|
758
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
759
|
-
timeoutMs?: number | undefined;
|
|
760
|
-
}, {
|
|
761
|
-
status: "approved" | "denied" | "cancelled";
|
|
762
|
-
approvalId: string;
|
|
763
|
-
message?: string | undefined;
|
|
764
|
-
sessionId?: string | undefined;
|
|
765
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
766
|
-
timeoutMs?: number | undefined;
|
|
767
|
-
}>;
|
|
361
|
+
}, z.core.$strip>;
|
|
768
362
|
/**
|
|
769
363
|
* Tool approval response schema
|
|
770
364
|
*/
|
|
771
365
|
export declare const ToolApprovalResponseSchema: z.ZodObject<{
|
|
772
366
|
approvalId: z.ZodString;
|
|
773
|
-
status: z.ZodEnum<
|
|
367
|
+
status: z.ZodEnum<{
|
|
368
|
+
approved: "approved";
|
|
369
|
+
denied: "denied";
|
|
370
|
+
cancelled: "cancelled";
|
|
371
|
+
}>;
|
|
774
372
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
775
|
-
|
|
373
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
374
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
375
|
+
}, z.core.$strict>>;
|
|
376
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
377
|
+
timeout: "timeout";
|
|
378
|
+
user_denied: "user_denied";
|
|
379
|
+
system_denied: "system_denied";
|
|
380
|
+
user_cancelled: "user_cancelled";
|
|
381
|
+
system_cancelled: "system_cancelled";
|
|
382
|
+
validation_failed: "validation_failed";
|
|
383
|
+
elicitation_disabled: "elicitation_disabled";
|
|
384
|
+
}>>;
|
|
776
385
|
message: z.ZodOptional<z.ZodString>;
|
|
777
386
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
778
|
-
} & {
|
|
779
387
|
data: z.ZodOptional<z.ZodObject<{
|
|
780
388
|
rememberChoice: z.ZodOptional<z.ZodBoolean>;
|
|
781
389
|
rememberPattern: z.ZodOptional<z.ZodString>;
|
|
782
390
|
rememberDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
783
|
-
},
|
|
784
|
-
|
|
785
|
-
rememberPattern?: string | undefined;
|
|
786
|
-
rememberDirectory?: boolean | undefined;
|
|
787
|
-
}, {
|
|
788
|
-
rememberChoice?: boolean | undefined;
|
|
789
|
-
rememberPattern?: string | undefined;
|
|
790
|
-
rememberDirectory?: boolean | undefined;
|
|
791
|
-
}>>;
|
|
792
|
-
}, "strict", z.ZodTypeAny, {
|
|
793
|
-
status: "approved" | "denied" | "cancelled";
|
|
794
|
-
approvalId: string;
|
|
795
|
-
data?: {
|
|
796
|
-
rememberChoice?: boolean | undefined;
|
|
797
|
-
rememberPattern?: string | undefined;
|
|
798
|
-
rememberDirectory?: boolean | undefined;
|
|
799
|
-
} | undefined;
|
|
800
|
-
message?: string | undefined;
|
|
801
|
-
sessionId?: string | undefined;
|
|
802
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
803
|
-
timeoutMs?: number | undefined;
|
|
804
|
-
}, {
|
|
805
|
-
status: "approved" | "denied" | "cancelled";
|
|
806
|
-
approvalId: string;
|
|
807
|
-
data?: {
|
|
808
|
-
rememberChoice?: boolean | undefined;
|
|
809
|
-
rememberPattern?: string | undefined;
|
|
810
|
-
rememberDirectory?: boolean | undefined;
|
|
811
|
-
} | undefined;
|
|
812
|
-
message?: string | undefined;
|
|
813
|
-
sessionId?: string | undefined;
|
|
814
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
815
|
-
timeoutMs?: number | undefined;
|
|
816
|
-
}>;
|
|
391
|
+
}, z.core.$strict>>;
|
|
392
|
+
}, z.core.$strict>;
|
|
817
393
|
/**
|
|
818
394
|
* Command confirmation response schema
|
|
819
395
|
*/
|
|
820
396
|
export declare const CommandConfirmationResponseSchema: z.ZodObject<{
|
|
821
397
|
approvalId: z.ZodString;
|
|
822
|
-
status: z.ZodEnum<
|
|
398
|
+
status: z.ZodEnum<{
|
|
399
|
+
approved: "approved";
|
|
400
|
+
denied: "denied";
|
|
401
|
+
cancelled: "cancelled";
|
|
402
|
+
}>;
|
|
823
403
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
824
|
-
|
|
404
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
405
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
406
|
+
}, z.core.$strict>>;
|
|
407
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
408
|
+
timeout: "timeout";
|
|
409
|
+
user_denied: "user_denied";
|
|
410
|
+
system_denied: "system_denied";
|
|
411
|
+
user_cancelled: "user_cancelled";
|
|
412
|
+
system_cancelled: "system_cancelled";
|
|
413
|
+
validation_failed: "validation_failed";
|
|
414
|
+
elicitation_disabled: "elicitation_disabled";
|
|
415
|
+
}>>;
|
|
825
416
|
message: z.ZodOptional<z.ZodString>;
|
|
826
417
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
}, "strict", z.ZodTypeAny, {
|
|
830
|
-
status: "approved" | "denied" | "cancelled";
|
|
831
|
-
approvalId: string;
|
|
832
|
-
data?: {} | undefined;
|
|
833
|
-
message?: string | undefined;
|
|
834
|
-
sessionId?: string | undefined;
|
|
835
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
836
|
-
timeoutMs?: number | undefined;
|
|
837
|
-
}, {
|
|
838
|
-
status: "approved" | "denied" | "cancelled";
|
|
839
|
-
approvalId: string;
|
|
840
|
-
data?: {} | undefined;
|
|
841
|
-
message?: string | undefined;
|
|
842
|
-
sessionId?: string | undefined;
|
|
843
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
844
|
-
timeoutMs?: number | undefined;
|
|
845
|
-
}>;
|
|
418
|
+
data: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
419
|
+
}, z.core.$strict>;
|
|
846
420
|
/**
|
|
847
421
|
* Elicitation response schema
|
|
848
422
|
*/
|
|
849
423
|
export declare const ElicitationResponseSchema: z.ZodObject<{
|
|
850
424
|
approvalId: z.ZodString;
|
|
851
|
-
status: z.ZodEnum<
|
|
425
|
+
status: z.ZodEnum<{
|
|
426
|
+
approved: "approved";
|
|
427
|
+
denied: "denied";
|
|
428
|
+
cancelled: "cancelled";
|
|
429
|
+
}>;
|
|
852
430
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
853
|
-
|
|
431
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
432
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
433
|
+
}, z.core.$strict>>;
|
|
434
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
435
|
+
timeout: "timeout";
|
|
436
|
+
user_denied: "user_denied";
|
|
437
|
+
system_denied: "system_denied";
|
|
438
|
+
user_cancelled: "user_cancelled";
|
|
439
|
+
system_cancelled: "system_cancelled";
|
|
440
|
+
validation_failed: "validation_failed";
|
|
441
|
+
elicitation_disabled: "elicitation_disabled";
|
|
442
|
+
}>>;
|
|
854
443
|
message: z.ZodOptional<z.ZodString>;
|
|
855
444
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
856
|
-
} & {
|
|
857
445
|
data: z.ZodOptional<z.ZodObject<{
|
|
858
446
|
formData: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
859
|
-
},
|
|
860
|
-
|
|
861
|
-
}, {
|
|
862
|
-
formData: Record<string, unknown>;
|
|
863
|
-
}>>;
|
|
864
|
-
}, "strict", z.ZodTypeAny, {
|
|
865
|
-
status: "approved" | "denied" | "cancelled";
|
|
866
|
-
approvalId: string;
|
|
867
|
-
data?: {
|
|
868
|
-
formData: Record<string, unknown>;
|
|
869
|
-
} | undefined;
|
|
870
|
-
message?: string | undefined;
|
|
871
|
-
sessionId?: string | undefined;
|
|
872
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
873
|
-
timeoutMs?: number | undefined;
|
|
874
|
-
}, {
|
|
875
|
-
status: "approved" | "denied" | "cancelled";
|
|
876
|
-
approvalId: string;
|
|
877
|
-
data?: {
|
|
878
|
-
formData: Record<string, unknown>;
|
|
879
|
-
} | undefined;
|
|
880
|
-
message?: string | undefined;
|
|
881
|
-
sessionId?: string | undefined;
|
|
882
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
883
|
-
timeoutMs?: number | undefined;
|
|
884
|
-
}>;
|
|
447
|
+
}, z.core.$strict>>;
|
|
448
|
+
}, z.core.$strict>;
|
|
885
449
|
/**
|
|
886
450
|
* Custom approval response schema
|
|
887
451
|
*/
|
|
888
452
|
export declare const CustomApprovalResponseSchema: z.ZodObject<{
|
|
889
453
|
approvalId: z.ZodString;
|
|
890
|
-
status: z.ZodEnum<
|
|
454
|
+
status: z.ZodEnum<{
|
|
455
|
+
approved: "approved";
|
|
456
|
+
denied: "denied";
|
|
457
|
+
cancelled: "cancelled";
|
|
458
|
+
}>;
|
|
891
459
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
892
|
-
|
|
460
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
461
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
462
|
+
}, z.core.$strict>>;
|
|
463
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
464
|
+
timeout: "timeout";
|
|
465
|
+
user_denied: "user_denied";
|
|
466
|
+
system_denied: "system_denied";
|
|
467
|
+
user_cancelled: "user_cancelled";
|
|
468
|
+
system_cancelled: "system_cancelled";
|
|
469
|
+
validation_failed: "validation_failed";
|
|
470
|
+
elicitation_disabled: "elicitation_disabled";
|
|
471
|
+
}>>;
|
|
893
472
|
message: z.ZodOptional<z.ZodString>;
|
|
894
473
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
895
|
-
} & {
|
|
896
474
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
897
|
-
},
|
|
898
|
-
status: "approved" | "denied" | "cancelled";
|
|
899
|
-
approvalId: string;
|
|
900
|
-
data?: Record<string, unknown> | undefined;
|
|
901
|
-
message?: string | undefined;
|
|
902
|
-
sessionId?: string | undefined;
|
|
903
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
904
|
-
timeoutMs?: number | undefined;
|
|
905
|
-
}, {
|
|
906
|
-
status: "approved" | "denied" | "cancelled";
|
|
907
|
-
approvalId: string;
|
|
908
|
-
data?: Record<string, unknown> | undefined;
|
|
909
|
-
message?: string | undefined;
|
|
910
|
-
sessionId?: string | undefined;
|
|
911
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
912
|
-
timeoutMs?: number | undefined;
|
|
913
|
-
}>;
|
|
475
|
+
}, z.core.$strict>;
|
|
914
476
|
/**
|
|
915
477
|
* Directory access response schema
|
|
916
478
|
*/
|
|
917
479
|
export declare const DirectoryAccessResponseSchema: z.ZodObject<{
|
|
918
480
|
approvalId: z.ZodString;
|
|
919
|
-
status: z.ZodEnum<
|
|
481
|
+
status: z.ZodEnum<{
|
|
482
|
+
approved: "approved";
|
|
483
|
+
denied: "denied";
|
|
484
|
+
cancelled: "cancelled";
|
|
485
|
+
}>;
|
|
920
486
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
921
|
-
|
|
487
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
488
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
489
|
+
}, z.core.$strict>>;
|
|
490
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
491
|
+
timeout: "timeout";
|
|
492
|
+
user_denied: "user_denied";
|
|
493
|
+
system_denied: "system_denied";
|
|
494
|
+
user_cancelled: "user_cancelled";
|
|
495
|
+
system_cancelled: "system_cancelled";
|
|
496
|
+
validation_failed: "validation_failed";
|
|
497
|
+
elicitation_disabled: "elicitation_disabled";
|
|
498
|
+
}>>;
|
|
922
499
|
message: z.ZodOptional<z.ZodString>;
|
|
923
500
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
924
|
-
} & {
|
|
925
501
|
data: z.ZodOptional<z.ZodObject<{
|
|
926
502
|
rememberDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
927
|
-
},
|
|
928
|
-
|
|
929
|
-
}, {
|
|
930
|
-
rememberDirectory?: boolean | undefined;
|
|
931
|
-
}>>;
|
|
932
|
-
}, "strict", z.ZodTypeAny, {
|
|
933
|
-
status: "approved" | "denied" | "cancelled";
|
|
934
|
-
approvalId: string;
|
|
935
|
-
data?: {
|
|
936
|
-
rememberDirectory?: boolean | undefined;
|
|
937
|
-
} | undefined;
|
|
938
|
-
message?: string | undefined;
|
|
939
|
-
sessionId?: string | undefined;
|
|
940
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
941
|
-
timeoutMs?: number | undefined;
|
|
942
|
-
}, {
|
|
943
|
-
status: "approved" | "denied" | "cancelled";
|
|
944
|
-
approvalId: string;
|
|
945
|
-
data?: {
|
|
946
|
-
rememberDirectory?: boolean | undefined;
|
|
947
|
-
} | undefined;
|
|
948
|
-
message?: string | undefined;
|
|
949
|
-
sessionId?: string | undefined;
|
|
950
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
951
|
-
timeoutMs?: number | undefined;
|
|
952
|
-
}>;
|
|
503
|
+
}, z.core.$strict>>;
|
|
504
|
+
}, z.core.$strict>;
|
|
953
505
|
/**
|
|
954
506
|
* Union of all approval responses
|
|
955
507
|
*/
|
|
956
|
-
export declare const ApprovalResponseSchema: z.ZodUnion<[z.ZodObject<{
|
|
508
|
+
export declare const ApprovalResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
957
509
|
approvalId: z.ZodString;
|
|
958
|
-
status: z.ZodEnum<
|
|
510
|
+
status: z.ZodEnum<{
|
|
511
|
+
approved: "approved";
|
|
512
|
+
denied: "denied";
|
|
513
|
+
cancelled: "cancelled";
|
|
514
|
+
}>;
|
|
959
515
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
960
|
-
|
|
516
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
517
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
518
|
+
}, z.core.$strict>>;
|
|
519
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
520
|
+
timeout: "timeout";
|
|
521
|
+
user_denied: "user_denied";
|
|
522
|
+
system_denied: "system_denied";
|
|
523
|
+
user_cancelled: "user_cancelled";
|
|
524
|
+
system_cancelled: "system_cancelled";
|
|
525
|
+
validation_failed: "validation_failed";
|
|
526
|
+
elicitation_disabled: "elicitation_disabled";
|
|
527
|
+
}>>;
|
|
961
528
|
message: z.ZodOptional<z.ZodString>;
|
|
962
529
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
963
|
-
} & {
|
|
964
530
|
data: z.ZodOptional<z.ZodObject<{
|
|
965
531
|
rememberChoice: z.ZodOptional<z.ZodBoolean>;
|
|
966
532
|
rememberPattern: z.ZodOptional<z.ZodString>;
|
|
967
533
|
rememberDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
968
|
-
},
|
|
969
|
-
|
|
970
|
-
rememberPattern?: string | undefined;
|
|
971
|
-
rememberDirectory?: boolean | undefined;
|
|
972
|
-
}, {
|
|
973
|
-
rememberChoice?: boolean | undefined;
|
|
974
|
-
rememberPattern?: string | undefined;
|
|
975
|
-
rememberDirectory?: boolean | undefined;
|
|
976
|
-
}>>;
|
|
977
|
-
}, "strict", z.ZodTypeAny, {
|
|
978
|
-
status: "approved" | "denied" | "cancelled";
|
|
979
|
-
approvalId: string;
|
|
980
|
-
data?: {
|
|
981
|
-
rememberChoice?: boolean | undefined;
|
|
982
|
-
rememberPattern?: string | undefined;
|
|
983
|
-
rememberDirectory?: boolean | undefined;
|
|
984
|
-
} | undefined;
|
|
985
|
-
message?: string | undefined;
|
|
986
|
-
sessionId?: string | undefined;
|
|
987
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
988
|
-
timeoutMs?: number | undefined;
|
|
989
|
-
}, {
|
|
990
|
-
status: "approved" | "denied" | "cancelled";
|
|
991
|
-
approvalId: string;
|
|
992
|
-
data?: {
|
|
993
|
-
rememberChoice?: boolean | undefined;
|
|
994
|
-
rememberPattern?: string | undefined;
|
|
995
|
-
rememberDirectory?: boolean | undefined;
|
|
996
|
-
} | undefined;
|
|
997
|
-
message?: string | undefined;
|
|
998
|
-
sessionId?: string | undefined;
|
|
999
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1000
|
-
timeoutMs?: number | undefined;
|
|
1001
|
-
}>, z.ZodObject<{
|
|
534
|
+
}, z.core.$strict>>;
|
|
535
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1002
536
|
approvalId: z.ZodString;
|
|
1003
|
-
status: z.ZodEnum<
|
|
537
|
+
status: z.ZodEnum<{
|
|
538
|
+
approved: "approved";
|
|
539
|
+
denied: "denied";
|
|
540
|
+
cancelled: "cancelled";
|
|
541
|
+
}>;
|
|
1004
542
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
1005
|
-
|
|
543
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
544
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
545
|
+
}, z.core.$strict>>;
|
|
546
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
547
|
+
timeout: "timeout";
|
|
548
|
+
user_denied: "user_denied";
|
|
549
|
+
system_denied: "system_denied";
|
|
550
|
+
user_cancelled: "user_cancelled";
|
|
551
|
+
system_cancelled: "system_cancelled";
|
|
552
|
+
validation_failed: "validation_failed";
|
|
553
|
+
elicitation_disabled: "elicitation_disabled";
|
|
554
|
+
}>>;
|
|
1006
555
|
message: z.ZodOptional<z.ZodString>;
|
|
1007
556
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
}, "strict", z.ZodTypeAny, {
|
|
1011
|
-
status: "approved" | "denied" | "cancelled";
|
|
1012
|
-
approvalId: string;
|
|
1013
|
-
data?: {} | undefined;
|
|
1014
|
-
message?: string | undefined;
|
|
1015
|
-
sessionId?: string | undefined;
|
|
1016
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1017
|
-
timeoutMs?: number | undefined;
|
|
1018
|
-
}, {
|
|
1019
|
-
status: "approved" | "denied" | "cancelled";
|
|
1020
|
-
approvalId: string;
|
|
1021
|
-
data?: {} | undefined;
|
|
1022
|
-
message?: string | undefined;
|
|
1023
|
-
sessionId?: string | undefined;
|
|
1024
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1025
|
-
timeoutMs?: number | undefined;
|
|
1026
|
-
}>, z.ZodObject<{
|
|
557
|
+
data: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
558
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1027
559
|
approvalId: z.ZodString;
|
|
1028
|
-
status: z.ZodEnum<
|
|
560
|
+
status: z.ZodEnum<{
|
|
561
|
+
approved: "approved";
|
|
562
|
+
denied: "denied";
|
|
563
|
+
cancelled: "cancelled";
|
|
564
|
+
}>;
|
|
1029
565
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
1030
|
-
|
|
566
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
567
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
568
|
+
}, z.core.$strict>>;
|
|
569
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
570
|
+
timeout: "timeout";
|
|
571
|
+
user_denied: "user_denied";
|
|
572
|
+
system_denied: "system_denied";
|
|
573
|
+
user_cancelled: "user_cancelled";
|
|
574
|
+
system_cancelled: "system_cancelled";
|
|
575
|
+
validation_failed: "validation_failed";
|
|
576
|
+
elicitation_disabled: "elicitation_disabled";
|
|
577
|
+
}>>;
|
|
1031
578
|
message: z.ZodOptional<z.ZodString>;
|
|
1032
579
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
1033
|
-
} & {
|
|
1034
580
|
data: z.ZodOptional<z.ZodObject<{
|
|
1035
581
|
formData: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1036
|
-
},
|
|
1037
|
-
|
|
1038
|
-
}, {
|
|
1039
|
-
formData: Record<string, unknown>;
|
|
1040
|
-
}>>;
|
|
1041
|
-
}, "strict", z.ZodTypeAny, {
|
|
1042
|
-
status: "approved" | "denied" | "cancelled";
|
|
1043
|
-
approvalId: string;
|
|
1044
|
-
data?: {
|
|
1045
|
-
formData: Record<string, unknown>;
|
|
1046
|
-
} | undefined;
|
|
1047
|
-
message?: string | undefined;
|
|
1048
|
-
sessionId?: string | undefined;
|
|
1049
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1050
|
-
timeoutMs?: number | undefined;
|
|
1051
|
-
}, {
|
|
1052
|
-
status: "approved" | "denied" | "cancelled";
|
|
1053
|
-
approvalId: string;
|
|
1054
|
-
data?: {
|
|
1055
|
-
formData: Record<string, unknown>;
|
|
1056
|
-
} | undefined;
|
|
1057
|
-
message?: string | undefined;
|
|
1058
|
-
sessionId?: string | undefined;
|
|
1059
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1060
|
-
timeoutMs?: number | undefined;
|
|
1061
|
-
}>, z.ZodObject<{
|
|
582
|
+
}, z.core.$strict>>;
|
|
583
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1062
584
|
approvalId: z.ZodString;
|
|
1063
|
-
status: z.ZodEnum<
|
|
585
|
+
status: z.ZodEnum<{
|
|
586
|
+
approved: "approved";
|
|
587
|
+
denied: "denied";
|
|
588
|
+
cancelled: "cancelled";
|
|
589
|
+
}>;
|
|
1064
590
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
1065
|
-
|
|
591
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
592
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
593
|
+
}, z.core.$strict>>;
|
|
594
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
595
|
+
timeout: "timeout";
|
|
596
|
+
user_denied: "user_denied";
|
|
597
|
+
system_denied: "system_denied";
|
|
598
|
+
user_cancelled: "user_cancelled";
|
|
599
|
+
system_cancelled: "system_cancelled";
|
|
600
|
+
validation_failed: "validation_failed";
|
|
601
|
+
elicitation_disabled: "elicitation_disabled";
|
|
602
|
+
}>>;
|
|
1066
603
|
message: z.ZodOptional<z.ZodString>;
|
|
1067
604
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
1068
|
-
} & {
|
|
1069
605
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1070
|
-
},
|
|
1071
|
-
status: "approved" | "denied" | "cancelled";
|
|
1072
|
-
approvalId: string;
|
|
1073
|
-
data?: Record<string, unknown> | undefined;
|
|
1074
|
-
message?: string | undefined;
|
|
1075
|
-
sessionId?: string | undefined;
|
|
1076
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1077
|
-
timeoutMs?: number | undefined;
|
|
1078
|
-
}, {
|
|
1079
|
-
status: "approved" | "denied" | "cancelled";
|
|
1080
|
-
approvalId: string;
|
|
1081
|
-
data?: Record<string, unknown> | undefined;
|
|
1082
|
-
message?: string | undefined;
|
|
1083
|
-
sessionId?: string | undefined;
|
|
1084
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1085
|
-
timeoutMs?: number | undefined;
|
|
1086
|
-
}>, z.ZodObject<{
|
|
606
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1087
607
|
approvalId: z.ZodString;
|
|
1088
|
-
status: z.ZodEnum<
|
|
608
|
+
status: z.ZodEnum<{
|
|
609
|
+
approved: "approved";
|
|
610
|
+
denied: "denied";
|
|
611
|
+
cancelled: "cancelled";
|
|
612
|
+
}>;
|
|
1089
613
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
1090
|
-
|
|
614
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
615
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
616
|
+
}, z.core.$strict>>;
|
|
617
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
618
|
+
timeout: "timeout";
|
|
619
|
+
user_denied: "user_denied";
|
|
620
|
+
system_denied: "system_denied";
|
|
621
|
+
user_cancelled: "user_cancelled";
|
|
622
|
+
system_cancelled: "system_cancelled";
|
|
623
|
+
validation_failed: "validation_failed";
|
|
624
|
+
elicitation_disabled: "elicitation_disabled";
|
|
625
|
+
}>>;
|
|
1091
626
|
message: z.ZodOptional<z.ZodString>;
|
|
1092
627
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
1093
|
-
} & {
|
|
1094
628
|
data: z.ZodOptional<z.ZodObject<{
|
|
1095
629
|
rememberDirectory: z.ZodOptional<z.ZodBoolean>;
|
|
1096
|
-
},
|
|
1097
|
-
|
|
1098
|
-
}, {
|
|
1099
|
-
rememberDirectory?: boolean | undefined;
|
|
1100
|
-
}>>;
|
|
1101
|
-
}, "strict", z.ZodTypeAny, {
|
|
1102
|
-
status: "approved" | "denied" | "cancelled";
|
|
1103
|
-
approvalId: string;
|
|
1104
|
-
data?: {
|
|
1105
|
-
rememberDirectory?: boolean | undefined;
|
|
1106
|
-
} | undefined;
|
|
1107
|
-
message?: string | undefined;
|
|
1108
|
-
sessionId?: string | undefined;
|
|
1109
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1110
|
-
timeoutMs?: number | undefined;
|
|
1111
|
-
}, {
|
|
1112
|
-
status: "approved" | "denied" | "cancelled";
|
|
1113
|
-
approvalId: string;
|
|
1114
|
-
data?: {
|
|
1115
|
-
rememberDirectory?: boolean | undefined;
|
|
1116
|
-
} | undefined;
|
|
1117
|
-
message?: string | undefined;
|
|
1118
|
-
sessionId?: string | undefined;
|
|
1119
|
-
reason?: "timeout" | "user_denied" | "system_denied" | "user_cancelled" | "system_cancelled" | "validation_failed" | "elicitation_disabled" | undefined;
|
|
1120
|
-
timeoutMs?: number | undefined;
|
|
1121
|
-
}>]>;
|
|
630
|
+
}, z.core.$strict>>;
|
|
631
|
+
}, z.core.$strict>]>;
|
|
1122
632
|
/**
|
|
1123
633
|
* Approval request details schema for creating requests
|
|
1124
634
|
*/
|
|
1125
|
-
export declare const ApprovalRequestDetailsSchema: z.
|
|
1126
|
-
type: z.ZodEnum<
|
|
635
|
+
export declare const ApprovalRequestDetailsSchema: z.ZodObject<{
|
|
636
|
+
type: z.ZodEnum<{
|
|
637
|
+
custom: "custom";
|
|
638
|
+
tool_confirmation: "tool_confirmation";
|
|
639
|
+
command_confirmation: "command_confirmation";
|
|
640
|
+
elicitation: "elicitation";
|
|
641
|
+
directory_access: "directory_access";
|
|
642
|
+
}>;
|
|
1127
643
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
644
|
+
hostRuntime: z.ZodOptional<z.ZodObject<{
|
|
645
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
646
|
+
}, z.core.$strict>>;
|
|
1128
647
|
timeout: z.ZodOptional<z.ZodNumber>;
|
|
1129
|
-
metadata: z.ZodUnion<[z.ZodObject<{
|
|
648
|
+
metadata: z.ZodUnion<readonly [z.ZodObject<{
|
|
1130
649
|
toolName: z.ZodString;
|
|
1131
|
-
presentationSnapshot: z.ZodOptional<z.
|
|
650
|
+
presentationSnapshot: z.ZodOptional<z.ZodCustom<ToolPresentationSnapshotV1, ToolPresentationSnapshotV1>>;
|
|
1132
651
|
toolCallId: z.ZodString;
|
|
1133
652
|
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1134
653
|
description: z.ZodOptional<z.ZodString>;
|
|
1135
|
-
displayPreview: z.ZodOptional<z.
|
|
654
|
+
displayPreview: z.ZodOptional<z.ZodCustom<ToolDisplayData, ToolDisplayData>>;
|
|
1136
655
|
directoryAccess: z.ZodOptional<z.ZodObject<{
|
|
1137
656
|
path: z.ZodString;
|
|
1138
657
|
parentDir: z.ZodString;
|
|
1139
|
-
operation: z.ZodEnum<
|
|
658
|
+
operation: z.ZodEnum<{
|
|
659
|
+
read: "read";
|
|
660
|
+
write: "write";
|
|
661
|
+
edit: "edit";
|
|
662
|
+
}>;
|
|
1140
663
|
toolName: z.ZodString;
|
|
1141
|
-
},
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
operation: "read" | "write" | "edit";
|
|
1145
|
-
toolName: string;
|
|
1146
|
-
}, {
|
|
1147
|
-
path: string;
|
|
1148
|
-
parentDir: string;
|
|
1149
|
-
operation: "read" | "write" | "edit";
|
|
1150
|
-
toolName: string;
|
|
1151
|
-
}>>;
|
|
1152
|
-
suggestedPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1153
|
-
}, "strict", z.ZodTypeAny, {
|
|
1154
|
-
toolName: string;
|
|
1155
|
-
toolCallId: string;
|
|
1156
|
-
args: Record<string, unknown>;
|
|
1157
|
-
description?: string | undefined;
|
|
1158
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
1159
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
1160
|
-
directoryAccess?: {
|
|
1161
|
-
path: string;
|
|
1162
|
-
parentDir: string;
|
|
1163
|
-
operation: "read" | "write" | "edit";
|
|
1164
|
-
toolName: string;
|
|
1165
|
-
} | undefined;
|
|
1166
|
-
suggestedPatterns?: string[] | undefined;
|
|
1167
|
-
}, {
|
|
1168
|
-
toolName: string;
|
|
1169
|
-
toolCallId: string;
|
|
1170
|
-
args: Record<string, unknown>;
|
|
1171
|
-
description?: string | undefined;
|
|
1172
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
1173
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
1174
|
-
directoryAccess?: {
|
|
1175
|
-
path: string;
|
|
1176
|
-
parentDir: string;
|
|
1177
|
-
operation: "read" | "write" | "edit";
|
|
1178
|
-
toolName: string;
|
|
1179
|
-
} | undefined;
|
|
1180
|
-
suggestedPatterns?: string[] | undefined;
|
|
1181
|
-
}>, z.ZodObject<{
|
|
664
|
+
}, z.core.$strict>>;
|
|
665
|
+
suggestedPatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
666
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1182
667
|
toolName: z.ZodString;
|
|
1183
668
|
command: z.ZodString;
|
|
1184
669
|
originalCommand: z.ZodOptional<z.ZodString>;
|
|
1185
|
-
},
|
|
1186
|
-
|
|
1187
|
-
command: string;
|
|
1188
|
-
originalCommand?: string | undefined;
|
|
1189
|
-
}, {
|
|
1190
|
-
toolName: string;
|
|
1191
|
-
command: string;
|
|
1192
|
-
originalCommand?: string | undefined;
|
|
1193
|
-
}>, z.ZodObject<{
|
|
1194
|
-
schema: z.ZodType<JSONSchema7, z.ZodTypeDef, JSONSchema7>;
|
|
670
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
671
|
+
schema: z.ZodType<JSONSchema7, unknown, z.core.$ZodTypeInternals<JSONSchema7, unknown>>;
|
|
1195
672
|
prompt: z.ZodString;
|
|
1196
673
|
serverName: z.ZodString;
|
|
1197
674
|
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1198
|
-
},
|
|
1199
|
-
prompt: string;
|
|
1200
|
-
schema: JSONSchema7;
|
|
1201
|
-
serverName: string;
|
|
1202
|
-
context?: Record<string, unknown> | undefined;
|
|
1203
|
-
}, {
|
|
1204
|
-
prompt: string;
|
|
1205
|
-
schema: JSONSchema7;
|
|
1206
|
-
serverName: string;
|
|
1207
|
-
context?: Record<string, unknown> | undefined;
|
|
1208
|
-
}>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
|
|
675
|
+
}, z.core.$strict>, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodObject<{
|
|
1209
676
|
path: z.ZodString;
|
|
1210
677
|
parentDir: z.ZodString;
|
|
1211
|
-
operation: z.ZodEnum<
|
|
678
|
+
operation: z.ZodEnum<{
|
|
679
|
+
read: "read";
|
|
680
|
+
write: "write";
|
|
681
|
+
edit: "edit";
|
|
682
|
+
}>;
|
|
1212
683
|
toolName: z.ZodString;
|
|
1213
|
-
},
|
|
1214
|
-
|
|
1215
|
-
parentDir: string;
|
|
1216
|
-
operation: "read" | "write" | "edit";
|
|
1217
|
-
toolName: string;
|
|
1218
|
-
}, {
|
|
1219
|
-
path: string;
|
|
1220
|
-
parentDir: string;
|
|
1221
|
-
operation: "read" | "write" | "edit";
|
|
1222
|
-
toolName: string;
|
|
1223
|
-
}>]>;
|
|
1224
|
-
}, "strip", z.ZodTypeAny, {
|
|
1225
|
-
type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
|
|
1226
|
-
metadata: Record<string, unknown> | {
|
|
1227
|
-
path: string;
|
|
1228
|
-
parentDir: string;
|
|
1229
|
-
operation: "read" | "write" | "edit";
|
|
1230
|
-
toolName: string;
|
|
1231
|
-
} | {
|
|
1232
|
-
toolName: string;
|
|
1233
|
-
toolCallId: string;
|
|
1234
|
-
args: Record<string, unknown>;
|
|
1235
|
-
description?: string | undefined;
|
|
1236
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
1237
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
1238
|
-
directoryAccess?: {
|
|
1239
|
-
path: string;
|
|
1240
|
-
parentDir: string;
|
|
1241
|
-
operation: "read" | "write" | "edit";
|
|
1242
|
-
toolName: string;
|
|
1243
|
-
} | undefined;
|
|
1244
|
-
suggestedPatterns?: string[] | undefined;
|
|
1245
|
-
} | {
|
|
1246
|
-
toolName: string;
|
|
1247
|
-
command: string;
|
|
1248
|
-
originalCommand?: string | undefined;
|
|
1249
|
-
} | {
|
|
1250
|
-
prompt: string;
|
|
1251
|
-
schema: JSONSchema7;
|
|
1252
|
-
serverName: string;
|
|
1253
|
-
context?: Record<string, unknown> | undefined;
|
|
1254
|
-
};
|
|
1255
|
-
timeout?: number | undefined;
|
|
1256
|
-
sessionId?: string | undefined;
|
|
1257
|
-
}, {
|
|
1258
|
-
type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
|
|
1259
|
-
metadata: Record<string, unknown> | {
|
|
1260
|
-
path: string;
|
|
1261
|
-
parentDir: string;
|
|
1262
|
-
operation: "read" | "write" | "edit";
|
|
1263
|
-
toolName: string;
|
|
1264
|
-
} | {
|
|
1265
|
-
toolName: string;
|
|
1266
|
-
toolCallId: string;
|
|
1267
|
-
args: Record<string, unknown>;
|
|
1268
|
-
description?: string | undefined;
|
|
1269
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
1270
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
1271
|
-
directoryAccess?: {
|
|
1272
|
-
path: string;
|
|
1273
|
-
parentDir: string;
|
|
1274
|
-
operation: "read" | "write" | "edit";
|
|
1275
|
-
toolName: string;
|
|
1276
|
-
} | undefined;
|
|
1277
|
-
suggestedPatterns?: string[] | undefined;
|
|
1278
|
-
} | {
|
|
1279
|
-
toolName: string;
|
|
1280
|
-
command: string;
|
|
1281
|
-
originalCommand?: string | undefined;
|
|
1282
|
-
} | {
|
|
1283
|
-
prompt: string;
|
|
1284
|
-
schema: JSONSchema7;
|
|
1285
|
-
serverName: string;
|
|
1286
|
-
context?: Record<string, unknown> | undefined;
|
|
1287
|
-
};
|
|
1288
|
-
timeout?: number | undefined;
|
|
1289
|
-
sessionId?: string | undefined;
|
|
1290
|
-
}>, {
|
|
1291
|
-
type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
|
|
1292
|
-
metadata: Record<string, unknown> | {
|
|
1293
|
-
path: string;
|
|
1294
|
-
parentDir: string;
|
|
1295
|
-
operation: "read" | "write" | "edit";
|
|
1296
|
-
toolName: string;
|
|
1297
|
-
} | {
|
|
1298
|
-
toolName: string;
|
|
1299
|
-
toolCallId: string;
|
|
1300
|
-
args: Record<string, unknown>;
|
|
1301
|
-
description?: string | undefined;
|
|
1302
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
1303
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
1304
|
-
directoryAccess?: {
|
|
1305
|
-
path: string;
|
|
1306
|
-
parentDir: string;
|
|
1307
|
-
operation: "read" | "write" | "edit";
|
|
1308
|
-
toolName: string;
|
|
1309
|
-
} | undefined;
|
|
1310
|
-
suggestedPatterns?: string[] | undefined;
|
|
1311
|
-
} | {
|
|
1312
|
-
toolName: string;
|
|
1313
|
-
command: string;
|
|
1314
|
-
originalCommand?: string | undefined;
|
|
1315
|
-
} | {
|
|
1316
|
-
prompt: string;
|
|
1317
|
-
schema: JSONSchema7;
|
|
1318
|
-
serverName: string;
|
|
1319
|
-
context?: Record<string, unknown> | undefined;
|
|
1320
|
-
};
|
|
1321
|
-
timeout?: number | undefined;
|
|
1322
|
-
sessionId?: string | undefined;
|
|
1323
|
-
}, {
|
|
1324
|
-
type: "custom" | "tool_confirmation" | "command_confirmation" | "elicitation" | "directory_access";
|
|
1325
|
-
metadata: Record<string, unknown> | {
|
|
1326
|
-
path: string;
|
|
1327
|
-
parentDir: string;
|
|
1328
|
-
operation: "read" | "write" | "edit";
|
|
1329
|
-
toolName: string;
|
|
1330
|
-
} | {
|
|
1331
|
-
toolName: string;
|
|
1332
|
-
toolCallId: string;
|
|
1333
|
-
args: Record<string, unknown>;
|
|
1334
|
-
description?: string | undefined;
|
|
1335
|
-
presentationSnapshot?: ToolPresentationSnapshotV1 | undefined;
|
|
1336
|
-
displayPreview?: ToolDisplayData | undefined;
|
|
1337
|
-
directoryAccess?: {
|
|
1338
|
-
path: string;
|
|
1339
|
-
parentDir: string;
|
|
1340
|
-
operation: "read" | "write" | "edit";
|
|
1341
|
-
toolName: string;
|
|
1342
|
-
} | undefined;
|
|
1343
|
-
suggestedPatterns?: string[] | undefined;
|
|
1344
|
-
} | {
|
|
1345
|
-
toolName: string;
|
|
1346
|
-
command: string;
|
|
1347
|
-
originalCommand?: string | undefined;
|
|
1348
|
-
} | {
|
|
1349
|
-
prompt: string;
|
|
1350
|
-
schema: JSONSchema7;
|
|
1351
|
-
serverName: string;
|
|
1352
|
-
context?: Record<string, unknown> | undefined;
|
|
1353
|
-
};
|
|
1354
|
-
timeout?: number | undefined;
|
|
1355
|
-
sessionId?: string | undefined;
|
|
1356
|
-
}>;
|
|
684
|
+
}, z.core.$strict>]>;
|
|
685
|
+
}, z.core.$strip>;
|
|
1357
686
|
/**
|
|
1358
687
|
* Type inference for validated schemas
|
|
1359
688
|
*/
|