@openrouter/sdk 1.5.53 → 1.5.54

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.
Files changed (42) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/index.d.ts +8 -1
  4. package/esm/models/index.js +8 -1
  5. package/esm/models/inputsunion.d.ts +4 -5
  6. package/esm/models/inputsunion.js +0 -3
  7. package/esm/models/mcpcallargumentsdeltaevent.d.ts +17 -0
  8. package/esm/models/mcpcallargumentsdeltaevent.js +25 -0
  9. package/esm/models/mcpcallargumentsdoneevent.d.ts +17 -0
  10. package/esm/models/mcpcallargumentsdoneevent.js +25 -0
  11. package/esm/models/mcpcallcompletedevent.d.ts +16 -0
  12. package/esm/models/mcpcallcompletedevent.js +24 -0
  13. package/esm/models/mcpcallfailedevent.d.ts +16 -0
  14. package/esm/models/mcpcallfailedevent.js +24 -0
  15. package/esm/models/mcpcallinprogressevent.d.ts +16 -0
  16. package/esm/models/mcpcallinprogressevent.js +24 -0
  17. package/esm/models/mcpcallitem.d.ts +7 -0
  18. package/esm/models/mcpcallitem.js +23 -2
  19. package/esm/models/mcphttperror.d.ts +7 -0
  20. package/esm/models/mcphttperror.js +14 -1
  21. package/esm/models/mcplisttoolscompletedevent.d.ts +16 -0
  22. package/esm/models/mcplisttoolscompletedevent.js +24 -0
  23. package/esm/models/mcplisttoolsfailedevent.d.ts +16 -0
  24. package/esm/models/mcplisttoolsfailedevent.js +24 -0
  25. package/esm/models/mcplisttoolsinprogressevent.d.ts +16 -0
  26. package/esm/models/mcplisttoolsinprogressevent.js +24 -0
  27. package/esm/models/mcplisttoolsitem.d.ts +10 -0
  28. package/esm/models/mcplisttoolsitem.js +33 -1
  29. package/esm/models/mcpprotocolerror.d.ts +7 -0
  30. package/esm/models/mcpprotocolerror.js +13 -1
  31. package/esm/models/mcptoolcallerror.d.ts +5 -0
  32. package/esm/models/mcptoolcallerror.js +14 -3
  33. package/esm/models/mcptoolexecutionerror.d.ts +7 -0
  34. package/esm/models/mcptoolexecutionerror.js +12 -1
  35. package/esm/models/outputitems.d.ts +6 -3
  36. package/esm/models/outputitems.js +4 -2
  37. package/esm/models/streamevents.d.ts +9 -1
  38. package/esm/models/streamevents.js +16 -0
  39. package/jsr.json +1 -1
  40. package/package.json +5 -5
  41. package/esm/models/outputmcpservertoolitem.d.ts +0 -38
  42. package/esm/models/outputmcpservertoolitem.js +0 -37
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
50
50
  export declare const SDK_METADATA: {
51
51
  readonly language: "typescript";
52
52
  readonly openapiDocVersion: "1.0.0";
53
- readonly sdkVersion: "1.5.53";
53
+ readonly sdkVersion: "1.5.54";
54
54
  readonly genVersion: "2.950.13";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.53 2.950.13 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.54 2.950.13 1.0.0 @openrouter/sdk";
56
56
  };
57
57
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
29
29
  export const SDK_METADATA = {
30
30
  language: "typescript",
31
31
  openapiDocVersion: "1.0.0",
32
- sdkVersion: "1.5.53",
32
+ sdkVersion: "1.5.54",
33
33
  genVersion: "2.950.13",
34
- userAgent: "speakeasy-sdk/typescript 1.5.53 2.950.13 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.54 2.950.13 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -489,8 +489,16 @@ export * from "./managedprivateendpoint.js";
489
489
  export * from "./managedprivateendpointresponse.js";
490
490
  export * from "./mcpapprovalrequestitem.js";
491
491
  export * from "./mcpapprovalresponseitem.js";
492
+ export * from "./mcpcallargumentsdeltaevent.js";
493
+ export * from "./mcpcallargumentsdoneevent.js";
494
+ export * from "./mcpcallcompletedevent.js";
495
+ export * from "./mcpcallfailedevent.js";
496
+ export * from "./mcpcallinprogressevent.js";
492
497
  export * from "./mcpcallitem.js";
493
498
  export * from "./mcphttperror.js";
499
+ export * from "./mcplisttoolscompletedevent.js";
500
+ export * from "./mcplisttoolsfailedevent.js";
501
+ export * from "./mcplisttoolsinprogressevent.js";
494
502
  export * from "./mcplisttoolsitem.js";
495
503
  export * from "./mcpprotocolerror.js";
496
504
  export * from "./mcpservertool.js";
@@ -611,7 +619,6 @@ export * from "./outputitemimagegenerationcall.js";
611
619
  export * from "./outputitemreasoning.js";
612
620
  export * from "./outputitems.js";
613
621
  export * from "./outputitemwebsearchcall.js";
614
- export * from "./outputmcpservertoolitem.js";
615
622
  export * from "./outputmemoryservertoolitem.js";
616
623
  export * from "./outputmessage.js";
617
624
  export * from "./outputmessageitem.js";
@@ -493,8 +493,16 @@ export * from "./managedprivateendpoint.js";
493
493
  export * from "./managedprivateendpointresponse.js";
494
494
  export * from "./mcpapprovalrequestitem.js";
495
495
  export * from "./mcpapprovalresponseitem.js";
496
+ export * from "./mcpcallargumentsdeltaevent.js";
497
+ export * from "./mcpcallargumentsdoneevent.js";
498
+ export * from "./mcpcallcompletedevent.js";
499
+ export * from "./mcpcallfailedevent.js";
500
+ export * from "./mcpcallinprogressevent.js";
496
501
  export * from "./mcpcallitem.js";
497
502
  export * from "./mcphttperror.js";
503
+ export * from "./mcplisttoolscompletedevent.js";
504
+ export * from "./mcplisttoolsfailedevent.js";
505
+ export * from "./mcplisttoolsinprogressevent.js";
498
506
  export * from "./mcplisttoolsitem.js";
499
507
  export * from "./mcpprotocolerror.js";
500
508
  export * from "./mcpservertool.js";
@@ -615,7 +623,6 @@ export * from "./outputitemimagegenerationcall.js";
615
623
  export * from "./outputitemreasoning.js";
616
624
  export * from "./outputitems.js";
617
625
  export * from "./outputitemwebsearchcall.js";
618
- export * from "./outputmcpservertoolitem.js";
619
626
  export * from "./outputmemoryservertoolitem.js";
620
627
  export * from "./outputmessage.js";
621
628
  export * from "./outputmessageitem.js";
@@ -37,7 +37,6 @@ import { OutputFilesServerToolItem, OutputFilesServerToolItem$Outbound } from ".
37
37
  import { OutputFusionServerToolItem, OutputFusionServerToolItem$Outbound } from "./outputfusionservertoolitem.js";
38
38
  import { OutputImageGenerationCallItem, OutputImageGenerationCallItem$Outbound } from "./outputimagegenerationcallitem.js";
39
39
  import { OutputImageGenerationServerToolItem, OutputImageGenerationServerToolItem$Outbound } from "./outputimagegenerationservertoolitem.js";
40
- import { OutputMcpServerToolItem, OutputMcpServerToolItem$Outbound } from "./outputmcpservertoolitem.js";
41
40
  import { OutputMemoryServerToolItem, OutputMemoryServerToolItem$Outbound } from "./outputmemoryservertoolitem.js";
42
41
  import { OutputSearchModelsServerToolItem, OutputSearchModelsServerToolItem$Outbound } from "./outputsearchmodelsservertoolitem.js";
43
42
  import { OutputShellServerToolItem, OutputShellServerToolItem$Outbound } from "./outputshellservertoolitem.js";
@@ -138,11 +137,11 @@ export type InputsMessage = {
138
137
  status?: InputsStatusCompleted1 | InputsStatusIncomplete1 | InputsStatusInProgress1 | undefined;
139
138
  type?: InputsTypeMessage | undefined;
140
139
  };
141
- export type InputsUnion1 = OutputArmorBlockedItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | FunctionCallItem | ApplyPatchCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ToolSearchOutputItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | ToolSearchCallItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | ConfigurationUpdateItem | EasyInputMessage | InputMessageItem | CompactionTriggerItem | ContextCompactionItem;
140
+ export type InputsUnion1 = OutputArmorBlockedItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | FunctionCallItem | ApplyPatchCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ToolSearchOutputItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | ToolSearchCallItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | ConfigurationUpdateItem | EasyInputMessage | InputMessageItem | CompactionTriggerItem | ContextCompactionItem;
142
141
  /**
143
142
  * Input for a response request - can be a string or array of items
144
143
  */
145
- export type InputsUnion = string | Array<OutputArmorBlockedItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | FunctionCallItem | ApplyPatchCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ToolSearchOutputItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | ToolSearchCallItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | ConfigurationUpdateItem | EasyInputMessage | InputMessageItem | CompactionTriggerItem | ContextCompactionItem>;
144
+ export type InputsUnion = string | Array<OutputArmorBlockedItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | FunctionCallItem | ApplyPatchCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ToolSearchOutputItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | ToolSearchCallItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | ConfigurationUpdateItem | EasyInputMessage | InputMessageItem | CompactionTriggerItem | ContextCompactionItem>;
146
145
  /** @internal */
147
146
  export declare const InputsStatusInProgress2$outboundSchema: z.ZodEnum<typeof InputsStatusInProgress2>;
148
147
  /** @internal */
@@ -217,12 +216,12 @@ export type InputsMessage$Outbound = {
217
216
  export declare const InputsMessage$outboundSchema: z.ZodType<InputsMessage$Outbound, InputsMessage>;
218
217
  export declare function inputsMessageToJSON(inputsMessage: InputsMessage): string;
219
218
  /** @internal */
220
- export type InputsUnion1$Outbound = OutputArmorBlockedItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | FunctionCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ToolSearchOutputItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | ToolSearchCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | ConfigurationUpdateItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | CompactionTriggerItem$Outbound | ContextCompactionItem$Outbound;
219
+ export type InputsUnion1$Outbound = OutputArmorBlockedItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | FunctionCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ToolSearchOutputItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | ToolSearchCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | ConfigurationUpdateItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | CompactionTriggerItem$Outbound | ContextCompactionItem$Outbound;
221
220
  /** @internal */
222
221
  export declare const InputsUnion1$outboundSchema: z.ZodType<InputsUnion1$Outbound, InputsUnion1>;
223
222
  export declare function inputsUnion1ToJSON(inputsUnion1: InputsUnion1): string;
224
223
  /** @internal */
225
- export type InputsUnion$Outbound = string | Array<OutputArmorBlockedItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | FunctionCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ToolSearchOutputItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | ToolSearchCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputMcpServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | ConfigurationUpdateItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | CompactionTriggerItem$Outbound | ContextCompactionItem$Outbound>;
224
+ export type InputsUnion$Outbound = string | Array<OutputArmorBlockedItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | FunctionCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$Outbound | ToolSearchOutputItem$Outbound | ReasoningItem$Outbound | FunctionCallOutputItem$Outbound | ApplyPatchCallOutputItem$Outbound | InputsMessage$Outbound | InputsReasoning$Outbound | OutputWebSearchCallItem$Outbound | OutputImageGenerationCallItem$Outbound | OutputCodeInterpreterCallItem$Outbound | LocalShellCallOutputItem$Outbound | ShellCallItem$Outbound | ShellCallOutputItem$Outbound | McpApprovalResponseItem$Outbound | CustomToolCallOutputItem$Outbound | AdditionalToolsItem$Outbound | ToolSearchCallItem$Outbound | OutputWebSearchServerToolItem$Outbound | OutputCodeInterpreterServerToolItem$Outbound | OutputFileSearchServerToolItem$Outbound | OutputImageGenerationServerToolItem$Outbound | OutputBrowserUseServerToolItem$Outbound | OutputBashServerToolItem$Outbound | OutputTextEditorServerToolItem$Outbound | OutputApplyPatchServerToolItem$Outbound | OutputWebFetchServerToolItem$Outbound | OutputToolSearchServerToolItem$Outbound | OutputMemoryServerToolItem$Outbound | OutputSearchModelsServerToolItem$Outbound | OutputFusionServerToolItem$Outbound | OutputAdvisorServerToolItem$Outbound | OutputSubagentServerToolItem$Outbound | OutputFilesServerToolItem$Outbound | OutputShellServerToolItem$Outbound | CompactionItem$Outbound | ItemReferenceItem$Outbound | ConfigurationUpdateItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | CompactionTriggerItem$Outbound | ContextCompactionItem$Outbound>;
226
225
  /** @internal */
227
226
  export declare const InputsUnion$outboundSchema: z.ZodType<InputsUnion$Outbound, InputsUnion>;
228
227
  export declare function inputsUnionToJSON(inputsUnion: InputsUnion): string;
@@ -41,7 +41,6 @@ import { OutputFilesServerToolItem$outboundSchema, } from "./outputfilesserverto
41
41
  import { OutputFusionServerToolItem$outboundSchema, } from "./outputfusionservertoolitem.js";
42
42
  import { OutputImageGenerationCallItem$outboundSchema, } from "./outputimagegenerationcallitem.js";
43
43
  import { OutputImageGenerationServerToolItem$outboundSchema, } from "./outputimagegenerationservertoolitem.js";
44
- import { OutputMcpServerToolItem$outboundSchema, } from "./outputmcpservertoolitem.js";
45
44
  import { OutputMemoryServerToolItem$outboundSchema, } from "./outputmemoryservertoolitem.js";
46
45
  import { OutputSearchModelsServerToolItem$outboundSchema, } from "./outputsearchmodelsservertoolitem.js";
47
46
  import { OutputShellServerToolItem$outboundSchema, } from "./outputshellservertoolitem.js";
@@ -248,7 +247,6 @@ export const InputsUnion1$outboundSchema = z.union([
248
247
  OutputWebFetchServerToolItem$outboundSchema,
249
248
  OutputToolSearchServerToolItem$outboundSchema,
250
249
  OutputMemoryServerToolItem$outboundSchema,
251
- OutputMcpServerToolItem$outboundSchema,
252
250
  OutputSearchModelsServerToolItem$outboundSchema,
253
251
  OutputFusionServerToolItem$outboundSchema,
254
252
  OutputAdvisorServerToolItem$outboundSchema,
@@ -309,7 +307,6 @@ export const InputsUnion$outboundSchema = z.union([
309
307
  OutputWebFetchServerToolItem$outboundSchema,
310
308
  OutputToolSearchServerToolItem$outboundSchema,
311
309
  OutputMemoryServerToolItem$outboundSchema,
312
- OutputMcpServerToolItem$outboundSchema,
313
310
  OutputSearchModelsServerToolItem$outboundSchema,
314
311
  OutputFusionServerToolItem$outboundSchema,
315
312
  OutputAdvisorServerToolItem$outboundSchema,
@@ -0,0 +1,17 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * A partial update to the JSON-encoded arguments of an MCP tool call.
6
+ */
7
+ export type McpCallArgumentsDeltaEvent = {
8
+ delta: string;
9
+ itemId: string;
10
+ outputIndex: number;
11
+ sequenceNumber: number;
12
+ type: "response.mcp_call_arguments.delta";
13
+ };
14
+ /** @internal */
15
+ export declare const McpCallArgumentsDeltaEvent$inboundSchema: z.ZodType<McpCallArgumentsDeltaEvent, unknown>;
16
+ export declare function mcpCallArgumentsDeltaEventFromJSON(jsonString: string): SafeParseResult<McpCallArgumentsDeltaEvent, SDKValidationError>;
17
+ //# sourceMappingURL=mcpcallargumentsdeltaevent.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 4fb2cd9acf27
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const McpCallArgumentsDeltaEvent$inboundSchema = z.object({
10
+ delta: z.string(),
11
+ item_id: z.string(),
12
+ output_index: z.int(),
13
+ sequence_number: z.int(),
14
+ type: z.literal("response.mcp_call_arguments.delta"),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ "item_id": "itemId",
18
+ "output_index": "outputIndex",
19
+ "sequence_number": "sequenceNumber",
20
+ });
21
+ });
22
+ export function mcpCallArgumentsDeltaEventFromJSON(jsonString) {
23
+ return safeParse(jsonString, (x) => McpCallArgumentsDeltaEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpCallArgumentsDeltaEvent' from JSON`);
24
+ }
25
+ //# sourceMappingURL=mcpcallargumentsdeltaevent.js.map
@@ -0,0 +1,17 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Emitted when the JSON-encoded arguments of an MCP tool call are finalized.
6
+ */
7
+ export type McpCallArgumentsDoneEvent = {
8
+ arguments: string;
9
+ itemId: string;
10
+ outputIndex: number;
11
+ sequenceNumber: number;
12
+ type: "response.mcp_call_arguments.done";
13
+ };
14
+ /** @internal */
15
+ export declare const McpCallArgumentsDoneEvent$inboundSchema: z.ZodType<McpCallArgumentsDoneEvent, unknown>;
16
+ export declare function mcpCallArgumentsDoneEventFromJSON(jsonString: string): SafeParseResult<McpCallArgumentsDoneEvent, SDKValidationError>;
17
+ //# sourceMappingURL=mcpcallargumentsdoneevent.d.ts.map
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ef6cab5a96a9
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const McpCallArgumentsDoneEvent$inboundSchema = z.object({
10
+ arguments: z.string(),
11
+ item_id: z.string(),
12
+ output_index: z.int(),
13
+ sequence_number: z.int(),
14
+ type: z.literal("response.mcp_call_arguments.done"),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ "item_id": "itemId",
18
+ "output_index": "outputIndex",
19
+ "sequence_number": "sequenceNumber",
20
+ });
21
+ });
22
+ export function mcpCallArgumentsDoneEventFromJSON(jsonString) {
23
+ return safeParse(jsonString, (x) => McpCallArgumentsDoneEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpCallArgumentsDoneEvent' from JSON`);
24
+ }
25
+ //# sourceMappingURL=mcpcallargumentsdoneevent.js.map
@@ -0,0 +1,16 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Emitted when an MCP tool call completes successfully.
6
+ */
7
+ export type McpCallCompletedEvent = {
8
+ itemId: string;
9
+ outputIndex: number;
10
+ sequenceNumber: number;
11
+ type: "response.mcp_call.completed";
12
+ };
13
+ /** @internal */
14
+ export declare const McpCallCompletedEvent$inboundSchema: z.ZodType<McpCallCompletedEvent, unknown>;
15
+ export declare function mcpCallCompletedEventFromJSON(jsonString: string): SafeParseResult<McpCallCompletedEvent, SDKValidationError>;
16
+ //# sourceMappingURL=mcpcallcompletedevent.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 36bda7f6e239
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const McpCallCompletedEvent$inboundSchema = z.object({
10
+ item_id: z.string(),
11
+ output_index: z.int(),
12
+ sequence_number: z.int(),
13
+ type: z.literal("response.mcp_call.completed"),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "item_id": "itemId",
17
+ "output_index": "outputIndex",
18
+ "sequence_number": "sequenceNumber",
19
+ });
20
+ });
21
+ export function mcpCallCompletedEventFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => McpCallCompletedEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpCallCompletedEvent' from JSON`);
23
+ }
24
+ //# sourceMappingURL=mcpcallcompletedevent.js.map
@@ -0,0 +1,16 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Emitted when an MCP tool call fails.
6
+ */
7
+ export type McpCallFailedEvent = {
8
+ itemId: string;
9
+ outputIndex: number;
10
+ sequenceNumber: number;
11
+ type: "response.mcp_call.failed";
12
+ };
13
+ /** @internal */
14
+ export declare const McpCallFailedEvent$inboundSchema: z.ZodType<McpCallFailedEvent, unknown>;
15
+ export declare function mcpCallFailedEventFromJSON(jsonString: string): SafeParseResult<McpCallFailedEvent, SDKValidationError>;
16
+ //# sourceMappingURL=mcpcallfailedevent.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 5e415e7ea4bd
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const McpCallFailedEvent$inboundSchema = z.object({
10
+ item_id: z.string(),
11
+ output_index: z.int(),
12
+ sequence_number: z.int(),
13
+ type: z.literal("response.mcp_call.failed"),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "item_id": "itemId",
17
+ "output_index": "outputIndex",
18
+ "sequence_number": "sequenceNumber",
19
+ });
20
+ });
21
+ export function mcpCallFailedEventFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => McpCallFailedEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpCallFailedEvent' from JSON`);
23
+ }
24
+ //# sourceMappingURL=mcpcallfailedevent.js.map
@@ -0,0 +1,16 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Emitted when an MCP tool call begins executing.
6
+ */
7
+ export type McpCallInProgressEvent = {
8
+ itemId: string;
9
+ outputIndex: number;
10
+ sequenceNumber: number;
11
+ type: "response.mcp_call.in_progress";
12
+ };
13
+ /** @internal */
14
+ export declare const McpCallInProgressEvent$inboundSchema: z.ZodType<McpCallInProgressEvent, unknown>;
15
+ export declare function mcpCallInProgressEventFromJSON(jsonString: string): SafeParseResult<McpCallInProgressEvent, SDKValidationError>;
16
+ //# sourceMappingURL=mcpcallinprogressevent.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 6142223f9b85
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const McpCallInProgressEvent$inboundSchema = z.object({
10
+ item_id: z.string(),
11
+ output_index: z.int(),
12
+ sequence_number: z.int(),
13
+ type: z.literal("response.mcp_call.in_progress"),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "item_id": "itemId",
17
+ "output_index": "outputIndex",
18
+ "sequence_number": "sequenceNumber",
19
+ });
20
+ });
21
+ export function mcpCallInProgressEventFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => McpCallInProgressEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpCallInProgressEvent' from JSON`);
23
+ }
24
+ //# sourceMappingURL=mcpcallinprogressevent.js.map
@@ -1,5 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
3
5
  import { McpToolCallError, McpToolCallError$Outbound } from "./mcptoolcallerror.js";
4
6
  export declare const McpCallItemType: {
5
7
  readonly McpCall: "mcp_call";
@@ -21,8 +23,12 @@ export type McpCallItem = {
21
23
  type: McpCallItemType;
22
24
  };
23
25
  /** @internal */
26
+ export declare const McpCallItemType$inboundSchema: z.ZodEnum<typeof McpCallItemType>;
27
+ /** @internal */
24
28
  export declare const McpCallItemType$outboundSchema: z.ZodEnum<typeof McpCallItemType>;
25
29
  /** @internal */
30
+ export declare const McpCallItem$inboundSchema: z.ZodType<McpCallItem, unknown>;
31
+ /** @internal */
26
32
  export type McpCallItem$Outbound = {
27
33
  arguments: string;
28
34
  error?: McpToolCallError$Outbound | null | undefined;
@@ -35,4 +41,5 @@ export type McpCallItem$Outbound = {
35
41
  /** @internal */
36
42
  export declare const McpCallItem$outboundSchema: z.ZodType<McpCallItem$Outbound, McpCallItem>;
37
43
  export declare function mcpCallItemToJSON(mcpCallItem: McpCallItem): string;
44
+ export declare function mcpCallItemFromJSON(jsonString: string): SafeParseResult<McpCallItem, SDKValidationError>;
38
45
  //# sourceMappingURL=mcpcallitem.d.ts.map
@@ -4,12 +4,30 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
- import { McpToolCallError$outboundSchema, } from "./mcptoolcallerror.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { McpToolCallError$inboundSchema, McpToolCallError$outboundSchema, } from "./mcptoolcallerror.js";
8
9
  export const McpCallItemType = {
9
10
  McpCall: "mcp_call",
10
11
  };
11
12
  /** @internal */
12
- export const McpCallItemType$outboundSchema = z.enum(McpCallItemType);
13
+ export const McpCallItemType$inboundSchema = z.enum(McpCallItemType);
14
+ /** @internal */
15
+ export const McpCallItemType$outboundSchema = McpCallItemType$inboundSchema;
16
+ /** @internal */
17
+ export const McpCallItem$inboundSchema = z
18
+ .object({
19
+ arguments: z.string(),
20
+ error: z.nullable(McpToolCallError$inboundSchema).optional(),
21
+ id: z.string(),
22
+ name: z.string(),
23
+ output: z.nullable(z.string()).optional(),
24
+ server_label: z.string(),
25
+ type: McpCallItemType$inboundSchema,
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "server_label": "serverLabel",
29
+ });
30
+ });
13
31
  /** @internal */
14
32
  export const McpCallItem$outboundSchema = z.object({
15
33
  arguments: z.string(),
@@ -27,4 +45,7 @@ export const McpCallItem$outboundSchema = z.object({
27
45
  export function mcpCallItemToJSON(mcpCallItem) {
28
46
  return JSON.stringify(McpCallItem$outboundSchema.parse(mcpCallItem));
29
47
  }
48
+ export function mcpCallItemFromJSON(jsonString) {
49
+ return safeParse(jsonString, (x) => McpCallItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpCallItem' from JSON`);
50
+ }
30
51
  //# sourceMappingURL=mcpcallitem.js.map
@@ -1,5 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
3
5
  export declare const McpHttpErrorType: {
4
6
  readonly HttpError: "http_error";
5
7
  };
@@ -13,8 +15,12 @@ export type McpHttpError = {
13
15
  type: McpHttpErrorType;
14
16
  };
15
17
  /** @internal */
18
+ export declare const McpHttpErrorType$inboundSchema: z.ZodEnum<typeof McpHttpErrorType>;
19
+ /** @internal */
16
20
  export declare const McpHttpErrorType$outboundSchema: z.ZodEnum<typeof McpHttpErrorType>;
17
21
  /** @internal */
22
+ export declare const McpHttpError$inboundSchema: z.ZodType<McpHttpError, unknown>;
23
+ /** @internal */
18
24
  export type McpHttpError$Outbound = {
19
25
  code: number;
20
26
  message: string;
@@ -23,4 +29,5 @@ export type McpHttpError$Outbound = {
23
29
  /** @internal */
24
30
  export declare const McpHttpError$outboundSchema: z.ZodType<McpHttpError$Outbound, McpHttpError>;
25
31
  export declare function mcpHttpErrorToJSON(mcpHttpError: McpHttpError): string;
32
+ export declare function mcpHttpErrorFromJSON(jsonString: string): SafeParseResult<McpHttpError, SDKValidationError>;
26
33
  //# sourceMappingURL=mcphttperror.d.ts.map
@@ -3,11 +3,21 @@
3
3
  * @generated-id: afc8132b7d81
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
6
7
  export const McpHttpErrorType = {
7
8
  HttpError: "http_error",
8
9
  };
9
10
  /** @internal */
10
- export const McpHttpErrorType$outboundSchema = z.enum(McpHttpErrorType);
11
+ export const McpHttpErrorType$inboundSchema = z.enum(McpHttpErrorType);
12
+ /** @internal */
13
+ export const McpHttpErrorType$outboundSchema = McpHttpErrorType$inboundSchema;
14
+ /** @internal */
15
+ export const McpHttpError$inboundSchema = z
16
+ .object({
17
+ code: z.int(),
18
+ message: z.string(),
19
+ type: McpHttpErrorType$inboundSchema,
20
+ });
11
21
  /** @internal */
12
22
  export const McpHttpError$outboundSchema = z.object({
13
23
  code: z.int(),
@@ -17,4 +27,7 @@ export const McpHttpError$outboundSchema = z.object({
17
27
  export function mcpHttpErrorToJSON(mcpHttpError) {
18
28
  return JSON.stringify(McpHttpError$outboundSchema.parse(mcpHttpError));
19
29
  }
30
+ export function mcpHttpErrorFromJSON(jsonString) {
31
+ return safeParse(jsonString, (x) => McpHttpError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpHttpError' from JSON`);
32
+ }
20
33
  //# sourceMappingURL=mcphttperror.js.map
@@ -0,0 +1,16 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Emitted when tool discovery against an MCP server succeeds.
6
+ */
7
+ export type McpListToolsCompletedEvent = {
8
+ itemId: string;
9
+ outputIndex: number;
10
+ sequenceNumber: number;
11
+ type: "response.mcp_list_tools.completed";
12
+ };
13
+ /** @internal */
14
+ export declare const McpListToolsCompletedEvent$inboundSchema: z.ZodType<McpListToolsCompletedEvent, unknown>;
15
+ export declare function mcpListToolsCompletedEventFromJSON(jsonString: string): SafeParseResult<McpListToolsCompletedEvent, SDKValidationError>;
16
+ //# sourceMappingURL=mcplisttoolscompletedevent.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 7cb9d6817ed6
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const McpListToolsCompletedEvent$inboundSchema = z.object({
10
+ item_id: z.string(),
11
+ output_index: z.int(),
12
+ sequence_number: z.int(),
13
+ type: z.literal("response.mcp_list_tools.completed"),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "item_id": "itemId",
17
+ "output_index": "outputIndex",
18
+ "sequence_number": "sequenceNumber",
19
+ });
20
+ });
21
+ export function mcpListToolsCompletedEventFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => McpListToolsCompletedEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpListToolsCompletedEvent' from JSON`);
23
+ }
24
+ //# sourceMappingURL=mcplisttoolscompletedevent.js.map
@@ -0,0 +1,16 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Emitted when tool discovery against an MCP server fails.
6
+ */
7
+ export type McpListToolsFailedEvent = {
8
+ itemId: string;
9
+ outputIndex: number;
10
+ sequenceNumber: number;
11
+ type: "response.mcp_list_tools.failed";
12
+ };
13
+ /** @internal */
14
+ export declare const McpListToolsFailedEvent$inboundSchema: z.ZodType<McpListToolsFailedEvent, unknown>;
15
+ export declare function mcpListToolsFailedEventFromJSON(jsonString: string): SafeParseResult<McpListToolsFailedEvent, SDKValidationError>;
16
+ //# sourceMappingURL=mcplisttoolsfailedevent.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: f00816be6d69
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const McpListToolsFailedEvent$inboundSchema = z.object({
10
+ item_id: z.string(),
11
+ output_index: z.int(),
12
+ sequence_number: z.int(),
13
+ type: z.literal("response.mcp_list_tools.failed"),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "item_id": "itemId",
17
+ "output_index": "outputIndex",
18
+ "sequence_number": "sequenceNumber",
19
+ });
20
+ });
21
+ export function mcpListToolsFailedEventFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => McpListToolsFailedEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpListToolsFailedEvent' from JSON`);
23
+ }
24
+ //# sourceMappingURL=mcplisttoolsfailedevent.js.map
@@ -0,0 +1,16 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Emitted when tool discovery against an MCP server begins.
6
+ */
7
+ export type McpListToolsInProgressEvent = {
8
+ itemId: string;
9
+ outputIndex: number;
10
+ sequenceNumber: number;
11
+ type: "response.mcp_list_tools.in_progress";
12
+ };
13
+ /** @internal */
14
+ export declare const McpListToolsInProgressEvent$inboundSchema: z.ZodType<McpListToolsInProgressEvent, unknown>;
15
+ export declare function mcpListToolsInProgressEventFromJSON(jsonString: string): SafeParseResult<McpListToolsInProgressEvent, SDKValidationError>;
16
+ //# sourceMappingURL=mcplisttoolsinprogressevent.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: b43ece9164f7
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ /** @internal */
9
+ export const McpListToolsInProgressEvent$inboundSchema = z.object({
10
+ item_id: z.string(),
11
+ output_index: z.int(),
12
+ sequence_number: z.int(),
13
+ type: z.literal("response.mcp_list_tools.in_progress"),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "item_id": "itemId",
17
+ "output_index": "outputIndex",
18
+ "sequence_number": "sequenceNumber",
19
+ });
20
+ });
21
+ export function mcpListToolsInProgressEventFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => McpListToolsInProgressEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpListToolsInProgressEvent' from JSON`);
23
+ }
24
+ //# sourceMappingURL=mcplisttoolsinprogressevent.js.map
@@ -1,5 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
3
5
  export type McpListToolsItemTool = {
4
6
  annotations?: any | undefined;
5
7
  description?: string | null | undefined;
@@ -23,6 +25,8 @@ export type McpListToolsItem = {
23
25
  type: McpListToolsItemType;
24
26
  };
25
27
  /** @internal */
28
+ export declare const McpListToolsItemTool$inboundSchema: z.ZodType<McpListToolsItemTool, unknown>;
29
+ /** @internal */
26
30
  export type McpListToolsItemTool$Outbound = {
27
31
  annotations?: any | undefined;
28
32
  description?: string | null | undefined;
@@ -34,9 +38,14 @@ export type McpListToolsItemTool$Outbound = {
34
38
  /** @internal */
35
39
  export declare const McpListToolsItemTool$outboundSchema: z.ZodType<McpListToolsItemTool$Outbound, McpListToolsItemTool>;
36
40
  export declare function mcpListToolsItemToolToJSON(mcpListToolsItemTool: McpListToolsItemTool): string;
41
+ export declare function mcpListToolsItemToolFromJSON(jsonString: string): SafeParseResult<McpListToolsItemTool, SDKValidationError>;
42
+ /** @internal */
43
+ export declare const McpListToolsItemType$inboundSchema: z.ZodEnum<typeof McpListToolsItemType>;
37
44
  /** @internal */
38
45
  export declare const McpListToolsItemType$outboundSchema: z.ZodEnum<typeof McpListToolsItemType>;
39
46
  /** @internal */
47
+ export declare const McpListToolsItem$inboundSchema: z.ZodType<McpListToolsItem, unknown>;
48
+ /** @internal */
40
49
  export type McpListToolsItem$Outbound = {
41
50
  error?: string | null | undefined;
42
51
  id: string;
@@ -47,4 +56,5 @@ export type McpListToolsItem$Outbound = {
47
56
  /** @internal */
48
57
  export declare const McpListToolsItem$outboundSchema: z.ZodType<McpListToolsItem$Outbound, McpListToolsItem>;
49
58
  export declare function mcpListToolsItemToJSON(mcpListToolsItem: McpListToolsItem): string;
59
+ export declare function mcpListToolsItemFromJSON(jsonString: string): SafeParseResult<McpListToolsItem, SDKValidationError>;
50
60
  //# sourceMappingURL=mcplisttoolsitem.d.ts.map
@@ -4,10 +4,22 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
7
8
  export const McpListToolsItemType = {
8
9
  McpListTools: "mcp_list_tools",
9
10
  };
10
11
  /** @internal */
12
+ export const McpListToolsItemTool$inboundSchema = z.object({
13
+ annotations: z.any().optional(),
14
+ description: z.nullable(z.string()).optional(),
15
+ input_schema: z.record(z.string(), z.any()),
16
+ name: z.string(),
17
+ }).transform((v) => {
18
+ return remap$(v, {
19
+ "input_schema": "inputSchema",
20
+ });
21
+ });
22
+ /** @internal */
11
23
  export const McpListToolsItemTool$outboundSchema = z.object({
12
24
  annotations: z.any().optional(),
13
25
  description: z.nullable(z.string()).optional(),
@@ -21,8 +33,25 @@ export const McpListToolsItemTool$outboundSchema = z.object({
21
33
  export function mcpListToolsItemToolToJSON(mcpListToolsItemTool) {
22
34
  return JSON.stringify(McpListToolsItemTool$outboundSchema.parse(mcpListToolsItemTool));
23
35
  }
36
+ export function mcpListToolsItemToolFromJSON(jsonString) {
37
+ return safeParse(jsonString, (x) => McpListToolsItemTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpListToolsItemTool' from JSON`);
38
+ }
24
39
  /** @internal */
25
- export const McpListToolsItemType$outboundSchema = z.enum(McpListToolsItemType);
40
+ export const McpListToolsItemType$inboundSchema = z.enum(McpListToolsItemType);
41
+ /** @internal */
42
+ export const McpListToolsItemType$outboundSchema = McpListToolsItemType$inboundSchema;
43
+ /** @internal */
44
+ export const McpListToolsItem$inboundSchema = z.object({
45
+ error: z.nullable(z.string()).optional(),
46
+ id: z.string(),
47
+ server_label: z.string(),
48
+ tools: z.array(z.lazy(() => McpListToolsItemTool$inboundSchema)),
49
+ type: McpListToolsItemType$inboundSchema,
50
+ }).transform((v) => {
51
+ return remap$(v, {
52
+ "server_label": "serverLabel",
53
+ });
54
+ });
26
55
  /** @internal */
27
56
  export const McpListToolsItem$outboundSchema = z.object({
28
57
  error: z.nullable(z.string()).optional(),
@@ -38,4 +67,7 @@ export const McpListToolsItem$outboundSchema = z.object({
38
67
  export function mcpListToolsItemToJSON(mcpListToolsItem) {
39
68
  return JSON.stringify(McpListToolsItem$outboundSchema.parse(mcpListToolsItem));
40
69
  }
70
+ export function mcpListToolsItemFromJSON(jsonString) {
71
+ return safeParse(jsonString, (x) => McpListToolsItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpListToolsItem' from JSON`);
72
+ }
41
73
  //# sourceMappingURL=mcplisttoolsitem.js.map
@@ -1,5 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
3
5
  export declare const McpProtocolErrorType: {
4
6
  readonly McpProtocolError: "mcp_protocol_error";
5
7
  };
@@ -13,8 +15,12 @@ export type McpProtocolError = {
13
15
  type: McpProtocolErrorType;
14
16
  };
15
17
  /** @internal */
18
+ export declare const McpProtocolErrorType$inboundSchema: z.ZodEnum<typeof McpProtocolErrorType>;
19
+ /** @internal */
16
20
  export declare const McpProtocolErrorType$outboundSchema: z.ZodEnum<typeof McpProtocolErrorType>;
17
21
  /** @internal */
22
+ export declare const McpProtocolError$inboundSchema: z.ZodType<McpProtocolError, unknown>;
23
+ /** @internal */
18
24
  export type McpProtocolError$Outbound = {
19
25
  code: number;
20
26
  message: string;
@@ -23,4 +29,5 @@ export type McpProtocolError$Outbound = {
23
29
  /** @internal */
24
30
  export declare const McpProtocolError$outboundSchema: z.ZodType<McpProtocolError$Outbound, McpProtocolError>;
25
31
  export declare function mcpProtocolErrorToJSON(mcpProtocolError: McpProtocolError): string;
32
+ export declare function mcpProtocolErrorFromJSON(jsonString: string): SafeParseResult<McpProtocolError, SDKValidationError>;
26
33
  //# sourceMappingURL=mcpprotocolerror.d.ts.map
@@ -3,11 +3,20 @@
3
3
  * @generated-id: b13cde8f9b88
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
6
7
  export const McpProtocolErrorType = {
7
8
  McpProtocolError: "mcp_protocol_error",
8
9
  };
9
10
  /** @internal */
10
- export const McpProtocolErrorType$outboundSchema = z.enum(McpProtocolErrorType);
11
+ export const McpProtocolErrorType$inboundSchema = z.enum(McpProtocolErrorType);
12
+ /** @internal */
13
+ export const McpProtocolErrorType$outboundSchema = McpProtocolErrorType$inboundSchema;
14
+ /** @internal */
15
+ export const McpProtocolError$inboundSchema = z.object({
16
+ code: z.int(),
17
+ message: z.string(),
18
+ type: McpProtocolErrorType$inboundSchema,
19
+ });
11
20
  /** @internal */
12
21
  export const McpProtocolError$outboundSchema = z.object({
13
22
  code: z.int(),
@@ -17,4 +26,7 @@ export const McpProtocolError$outboundSchema = z.object({
17
26
  export function mcpProtocolErrorToJSON(mcpProtocolError) {
18
27
  return JSON.stringify(McpProtocolError$outboundSchema.parse(mcpProtocolError));
19
28
  }
29
+ export function mcpProtocolErrorFromJSON(jsonString) {
30
+ return safeParse(jsonString, (x) => McpProtocolError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpProtocolError' from JSON`);
31
+ }
20
32
  //# sourceMappingURL=mcpprotocolerror.js.map
@@ -1,4 +1,6 @@
1
1
  import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
2
4
  import { McpHttpError, McpHttpError$Outbound } from "./mcphttperror.js";
3
5
  import { McpProtocolError, McpProtocolError$Outbound } from "./mcpprotocolerror.js";
4
6
  import { McpToolExecutionError, McpToolExecutionError$Outbound } from "./mcptoolexecutionerror.js";
@@ -7,8 +9,11 @@ import { McpToolExecutionError, McpToolExecutionError$Outbound } from "./mcptool
7
9
  */
8
10
  export type McpToolCallError = McpProtocolError | McpHttpError | McpToolExecutionError | string;
9
11
  /** @internal */
12
+ export declare const McpToolCallError$inboundSchema: z.ZodType<McpToolCallError, unknown>;
13
+ /** @internal */
10
14
  export type McpToolCallError$Outbound = McpProtocolError$Outbound | McpHttpError$Outbound | McpToolExecutionError$Outbound | string;
11
15
  /** @internal */
12
16
  export declare const McpToolCallError$outboundSchema: z.ZodType<McpToolCallError$Outbound, McpToolCallError>;
13
17
  export declare function mcpToolCallErrorToJSON(mcpToolCallError: McpToolCallError): string;
18
+ export declare function mcpToolCallErrorFromJSON(jsonString: string): SafeParseResult<McpToolCallError, SDKValidationError>;
14
19
  //# sourceMappingURL=mcptoolcallerror.d.ts.map
@@ -3,9 +3,17 @@
3
3
  * @generated-id: ce8691448f5c
4
4
  */
5
5
  import * as z from "zod/v4";
6
- import { McpHttpError$outboundSchema, } from "./mcphttperror.js";
7
- import { McpProtocolError$outboundSchema, } from "./mcpprotocolerror.js";
8
- import { McpToolExecutionError$outboundSchema, } from "./mcptoolexecutionerror.js";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ import { McpHttpError$inboundSchema, McpHttpError$outboundSchema, } from "./mcphttperror.js";
8
+ import { McpProtocolError$inboundSchema, McpProtocolError$outboundSchema, } from "./mcpprotocolerror.js";
9
+ import { McpToolExecutionError$inboundSchema, McpToolExecutionError$outboundSchema, } from "./mcptoolexecutionerror.js";
10
+ /** @internal */
11
+ export const McpToolCallError$inboundSchema = z.union([
12
+ McpProtocolError$inboundSchema,
13
+ McpHttpError$inboundSchema,
14
+ McpToolExecutionError$inboundSchema,
15
+ z.string(),
16
+ ]);
9
17
  /** @internal */
10
18
  export const McpToolCallError$outboundSchema = z.union([
11
19
  McpProtocolError$outboundSchema,
@@ -16,4 +24,7 @@ export const McpToolCallError$outboundSchema = z.union([
16
24
  export function mcpToolCallErrorToJSON(mcpToolCallError) {
17
25
  return JSON.stringify(McpToolCallError$outboundSchema.parse(mcpToolCallError));
18
26
  }
27
+ export function mcpToolCallErrorFromJSON(jsonString) {
28
+ return safeParse(jsonString, (x) => McpToolCallError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpToolCallError' from JSON`);
29
+ }
19
30
  //# sourceMappingURL=mcptoolcallerror.js.map
@@ -1,5 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
3
5
  export declare const McpToolExecutionErrorType: {
4
6
  readonly McpToolExecutionError: "mcp_tool_execution_error";
5
7
  };
@@ -12,8 +14,12 @@ export type McpToolExecutionError = {
12
14
  type: McpToolExecutionErrorType;
13
15
  };
14
16
  /** @internal */
17
+ export declare const McpToolExecutionErrorType$inboundSchema: z.ZodEnum<typeof McpToolExecutionErrorType>;
18
+ /** @internal */
15
19
  export declare const McpToolExecutionErrorType$outboundSchema: z.ZodEnum<typeof McpToolExecutionErrorType>;
16
20
  /** @internal */
21
+ export declare const McpToolExecutionError$inboundSchema: z.ZodType<McpToolExecutionError, unknown>;
22
+ /** @internal */
17
23
  export type McpToolExecutionError$Outbound = {
18
24
  content?: any | undefined;
19
25
  type: string;
@@ -21,4 +27,5 @@ export type McpToolExecutionError$Outbound = {
21
27
  /** @internal */
22
28
  export declare const McpToolExecutionError$outboundSchema: z.ZodType<McpToolExecutionError$Outbound, McpToolExecutionError>;
23
29
  export declare function mcpToolExecutionErrorToJSON(mcpToolExecutionError: McpToolExecutionError): string;
30
+ export declare function mcpToolExecutionErrorFromJSON(jsonString: string): SafeParseResult<McpToolExecutionError, SDKValidationError>;
24
31
  //# sourceMappingURL=mcptoolexecutionerror.d.ts.map
@@ -3,11 +3,19 @@
3
3
  * @generated-id: 0e07ebbb9169
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
6
7
  export const McpToolExecutionErrorType = {
7
8
  McpToolExecutionError: "mcp_tool_execution_error",
8
9
  };
9
10
  /** @internal */
10
- export const McpToolExecutionErrorType$outboundSchema = z.enum(McpToolExecutionErrorType);
11
+ export const McpToolExecutionErrorType$inboundSchema = z.enum(McpToolExecutionErrorType);
12
+ /** @internal */
13
+ export const McpToolExecutionErrorType$outboundSchema = McpToolExecutionErrorType$inboundSchema;
14
+ /** @internal */
15
+ export const McpToolExecutionError$inboundSchema = z.object({
16
+ content: z.any().optional(),
17
+ type: McpToolExecutionErrorType$inboundSchema,
18
+ });
11
19
  /** @internal */
12
20
  export const McpToolExecutionError$outboundSchema = z.object({
13
21
  content: z.any().optional(),
@@ -16,4 +24,7 @@ export const McpToolExecutionError$outboundSchema = z.object({
16
24
  export function mcpToolExecutionErrorToJSON(mcpToolExecutionError) {
17
25
  return JSON.stringify(McpToolExecutionError$outboundSchema.parse(mcpToolExecutionError));
18
26
  }
27
+ export function mcpToolExecutionErrorFromJSON(jsonString) {
28
+ return safeParse(jsonString, (x) => McpToolExecutionError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpToolExecutionError' from JSON`);
29
+ }
19
30
  //# sourceMappingURL=mcptoolexecutionerror.js.map
@@ -2,6 +2,8 @@ import * as z from "zod/v4";
2
2
  import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ import { McpCallItem } from "./mcpcallitem.js";
6
+ import { McpListToolsItem } from "./mcplisttoolsitem.js";
5
7
  import { OutputAdvisorServerToolItem } from "./outputadvisorservertoolitem.js";
6
8
  import { OutputApplyPatchCallItem } from "./outputapplypatchcallitem.js";
7
9
  import { OutputApplyPatchServerToolItem } from "./outputapplypatchservertoolitem.js";
@@ -21,7 +23,6 @@ import { OutputFunctionCallItem } from "./outputfunctioncallitem.js";
21
23
  import { OutputFusionServerToolItem } from "./outputfusionservertoolitem.js";
22
24
  import { OutputImageGenerationCallItem } from "./outputimagegenerationcallitem.js";
23
25
  import { OutputImageGenerationServerToolItem } from "./outputimagegenerationservertoolitem.js";
24
- import { OutputMcpServerToolItem } from "./outputmcpservertoolitem.js";
25
26
  import { OutputMemoryServerToolItem } from "./outputmemoryservertoolitem.js";
26
27
  import { OutputMessageItem } from "./outputmessageitem.js";
27
28
  import { OutputReasoningItem } from "./outputreasoningitem.js";
@@ -47,6 +48,10 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
47
48
  type: "file_search_call";
48
49
  }) | OutputFunctionCallItem | (OutputImageGenerationCallItem & {
49
50
  type: "image_generation_call";
51
+ }) | (McpCallItem & {
52
+ type: "mcp_call";
53
+ }) | (McpListToolsItem & {
54
+ type: "mcp_list_tools";
50
55
  }) | OutputMessageItem | (OutputAdvisorServerToolItem & {
51
56
  type: "openrouter:advisor";
52
57
  }) | (OutputApplyPatchServerToolItem & {
@@ -71,8 +76,6 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
71
76
  type: "openrouter:fusion";
72
77
  }) | (OutputImageGenerationServerToolItem & {
73
78
  type: "openrouter:image_generation";
74
- }) | (OutputMcpServerToolItem & {
75
- type: "openrouter:mcp";
76
79
  }) | (OutputMemoryServerToolItem & {
77
80
  type: "openrouter:memory";
78
81
  }) | (OutputShellServerToolItem & {
@@ -5,6 +5,8 @@
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import { discriminatedUnion } from "../types/discriminatedUnion.js";
8
+ import { McpCallItem$inboundSchema } from "./mcpcallitem.js";
9
+ import { McpListToolsItem$inboundSchema, } from "./mcplisttoolsitem.js";
8
10
  import { OutputAdvisorServerToolItem$inboundSchema, } from "./outputadvisorservertoolitem.js";
9
11
  import { OutputApplyPatchCallItem$inboundSchema, } from "./outputapplypatchcallitem.js";
10
12
  import { OutputApplyPatchServerToolItem$inboundSchema, } from "./outputapplypatchservertoolitem.js";
@@ -24,7 +26,6 @@ import { OutputFunctionCallItem$inboundSchema, } from "./outputfunctioncallitem.
24
26
  import { OutputFusionServerToolItem$inboundSchema, } from "./outputfusionservertoolitem.js";
25
27
  import { OutputImageGenerationCallItem$inboundSchema, } from "./outputimagegenerationcallitem.js";
26
28
  import { OutputImageGenerationServerToolItem$inboundSchema, } from "./outputimagegenerationservertoolitem.js";
27
- import { OutputMcpServerToolItem$inboundSchema, } from "./outputmcpservertoolitem.js";
28
29
  import { OutputMemoryServerToolItem$inboundSchema, } from "./outputmemoryservertoolitem.js";
29
30
  import { OutputMessageItem$inboundSchema, } from "./outputmessageitem.js";
30
31
  import { OutputReasoningItem$inboundSchema, } from "./outputreasoningitem.js";
@@ -49,6 +50,8 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
49
50
  file_search_call: OutputFileSearchCallItem$inboundSchema.and(z.object({ type: z.literal("file_search_call") })),
50
51
  function_call: OutputFunctionCallItem$inboundSchema,
51
52
  image_generation_call: OutputImageGenerationCallItem$inboundSchema.and(z.object({ type: z.literal("image_generation_call") })),
53
+ mcp_call: McpCallItem$inboundSchema.and(z.object({ type: z.literal("mcp_call") })),
54
+ mcp_list_tools: McpListToolsItem$inboundSchema.and(z.object({ type: z.literal("mcp_list_tools") })),
52
55
  message: OutputMessageItem$inboundSchema,
53
56
  ["openrouter:advisor"]: OutputAdvisorServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:advisor") })),
54
57
  ["openrouter:apply_patch"]: OutputApplyPatchServerToolItem$inboundSchema
@@ -65,7 +68,6 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
65
68
  ["openrouter:files"]: OutputFilesServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:files") })),
66
69
  ["openrouter:fusion"]: OutputFusionServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:fusion") })),
67
70
  ["openrouter:image_generation"]: OutputImageGenerationServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:image_generation") })),
68
- ["openrouter:mcp"]: OutputMcpServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:mcp") })),
69
71
  ["openrouter:memory"]: OutputMemoryServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:memory") })),
70
72
  ["openrouter:shell"]: OutputShellServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:shell") })),
71
73
  ["openrouter:subagent"]: OutputSubagentServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:subagent") })),
@@ -31,6 +31,14 @@ import { ImageGenCallCompletedEvent } from "./imagegencallcompletedevent.js";
31
31
  import { ImageGenCallGeneratingEvent } from "./imagegencallgeneratingevent.js";
32
32
  import { ImageGenCallInProgressEvent } from "./imagegencallinprogressevent.js";
33
33
  import { ImageGenCallPartialImageEvent } from "./imagegencallpartialimageevent.js";
34
+ import { McpCallArgumentsDeltaEvent } from "./mcpcallargumentsdeltaevent.js";
35
+ import { McpCallArgumentsDoneEvent } from "./mcpcallargumentsdoneevent.js";
36
+ import { McpCallCompletedEvent } from "./mcpcallcompletedevent.js";
37
+ import { McpCallFailedEvent } from "./mcpcallfailedevent.js";
38
+ import { McpCallInProgressEvent } from "./mcpcallinprogressevent.js";
39
+ import { McpListToolsCompletedEvent } from "./mcplisttoolscompletedevent.js";
40
+ import { McpListToolsFailedEvent } from "./mcplisttoolsfailedevent.js";
41
+ import { McpListToolsInProgressEvent } from "./mcplisttoolsinprogressevent.js";
34
42
  import { OpenResponsesCreatedEvent } from "./openresponsescreatedevent.js";
35
43
  import { OpenResponsesInProgressEvent } from "./openresponsesinprogressevent.js";
36
44
  import { ReasoningDeltaEvent } from "./reasoningdeltaevent.js";
@@ -54,7 +62,7 @@ import { WebSearchCallSearchingEvent } from "./websearchcallsearchingevent.js";
54
62
  /**
55
63
  * Union of all possible event types emitted during response streaming
56
64
  */
57
- export type StreamEvents = ErrorEvent | ApplyPatchCallOperationDiffDeltaEvent | ApplyPatchCallOperationDiffDoneEvent | CodeInterpreterCallCodeDeltaEvent | CodeInterpreterCallCodeDoneEvent | CodeInterpreterCallCompletedEvent | CodeInterpreterCallInProgressEvent | CodeInterpreterCallInterpretingEvent | StreamEventsResponseCompleted | ContentPartAddedEvent | ContentPartDoneEvent | OpenResponsesCreatedEvent | CustomToolCallInputDeltaEvent | CustomToolCallInputDoneEvent | DebugEvent | StreamEventsResponseFailed | FunctionCallArgsDeltaEvent | FunctionCallArgsDoneEvent | FusionCallAnalysisCompletedEvent | FusionCallAnalysisInProgressEvent | FusionCallCompletedEvent | FusionCallInProgressEvent | FusionCallPanelAddedEvent | FusionCallPanelCompletedEvent | FusionCallPanelDeltaEvent | FusionCallPanelFailedEvent | FusionCallPanelReasoningDeltaEvent | ImageGenCallCompletedEvent | ImageGenCallGeneratingEvent | ImageGenCallInProgressEvent | ImageGenCallPartialImageEvent | OpenResponsesInProgressEvent | StreamEventsResponseIncomplete | StreamEventsResponseOutputItemAdded | StreamEventsResponseOutputItemDone | AnnotationAddedEvent | TextDeltaEvent | TextDoneEvent | ReasoningSummaryPartAddedEvent | ReasoningSummaryPartDoneEvent | ReasoningSummaryTextDeltaEvent | ReasoningSummaryTextDoneEvent | ReasoningDeltaEvent | ReasoningDoneEvent | RefusalDeltaEvent | RefusalDoneEvent | WebSearchCallCompletedEvent | WebSearchCallInProgressEvent | WebSearchCallSearchingEvent | discriminatedUnionTypes.Unknown<"type">;
65
+ export type StreamEvents = ErrorEvent | ApplyPatchCallOperationDiffDeltaEvent | ApplyPatchCallOperationDiffDoneEvent | CodeInterpreterCallCodeDeltaEvent | CodeInterpreterCallCodeDoneEvent | CodeInterpreterCallCompletedEvent | CodeInterpreterCallInProgressEvent | CodeInterpreterCallInterpretingEvent | StreamEventsResponseCompleted | ContentPartAddedEvent | ContentPartDoneEvent | OpenResponsesCreatedEvent | CustomToolCallInputDeltaEvent | CustomToolCallInputDoneEvent | DebugEvent | StreamEventsResponseFailed | FunctionCallArgsDeltaEvent | FunctionCallArgsDoneEvent | FusionCallAnalysisCompletedEvent | FusionCallAnalysisInProgressEvent | FusionCallCompletedEvent | FusionCallInProgressEvent | FusionCallPanelAddedEvent | FusionCallPanelCompletedEvent | FusionCallPanelDeltaEvent | FusionCallPanelFailedEvent | FusionCallPanelReasoningDeltaEvent | ImageGenCallCompletedEvent | ImageGenCallGeneratingEvent | ImageGenCallInProgressEvent | ImageGenCallPartialImageEvent | OpenResponsesInProgressEvent | StreamEventsResponseIncomplete | McpCallArgumentsDeltaEvent | McpCallArgumentsDoneEvent | McpCallCompletedEvent | McpCallFailedEvent | McpCallInProgressEvent | McpListToolsCompletedEvent | McpListToolsFailedEvent | McpListToolsInProgressEvent | StreamEventsResponseOutputItemAdded | StreamEventsResponseOutputItemDone | AnnotationAddedEvent | TextDeltaEvent | TextDoneEvent | ReasoningSummaryPartAddedEvent | ReasoningSummaryPartDoneEvent | ReasoningSummaryTextDeltaEvent | ReasoningSummaryTextDoneEvent | ReasoningDeltaEvent | ReasoningDoneEvent | RefusalDeltaEvent | RefusalDoneEvent | WebSearchCallCompletedEvent | WebSearchCallInProgressEvent | WebSearchCallSearchingEvent | discriminatedUnionTypes.Unknown<"type">;
58
66
  /** @internal */
59
67
  export declare const StreamEvents$inboundSchema: z.ZodType<StreamEvents, unknown>;
60
68
  export declare function streamEventsFromJSON(jsonString: string): SafeParseResult<StreamEvents, SDKValidationError>;
@@ -33,6 +33,14 @@ import { ImageGenCallCompletedEvent$inboundSchema, } from "./imagegencallcomplet
33
33
  import { ImageGenCallGeneratingEvent$inboundSchema, } from "./imagegencallgeneratingevent.js";
34
34
  import { ImageGenCallInProgressEvent$inboundSchema, } from "./imagegencallinprogressevent.js";
35
35
  import { ImageGenCallPartialImageEvent$inboundSchema, } from "./imagegencallpartialimageevent.js";
36
+ import { McpCallArgumentsDeltaEvent$inboundSchema, } from "./mcpcallargumentsdeltaevent.js";
37
+ import { McpCallArgumentsDoneEvent$inboundSchema, } from "./mcpcallargumentsdoneevent.js";
38
+ import { McpCallCompletedEvent$inboundSchema, } from "./mcpcallcompletedevent.js";
39
+ import { McpCallFailedEvent$inboundSchema, } from "./mcpcallfailedevent.js";
40
+ import { McpCallInProgressEvent$inboundSchema, } from "./mcpcallinprogressevent.js";
41
+ import { McpListToolsCompletedEvent$inboundSchema, } from "./mcplisttoolscompletedevent.js";
42
+ import { McpListToolsFailedEvent$inboundSchema, } from "./mcplisttoolsfailedevent.js";
43
+ import { McpListToolsInProgressEvent$inboundSchema, } from "./mcplisttoolsinprogressevent.js";
36
44
  import { OpenResponsesCreatedEvent$inboundSchema, } from "./openresponsescreatedevent.js";
37
45
  import { OpenResponsesInProgressEvent$inboundSchema, } from "./openresponsesinprogressevent.js";
38
46
  import { ReasoningDeltaEvent$inboundSchema, } from "./reasoningdeltaevent.js";
@@ -88,6 +96,14 @@ export const StreamEvents$inboundSchema = discriminatedUnion("type", {
88
96
  ["response.image_generation_call.partial_image"]: ImageGenCallPartialImageEvent$inboundSchema,
89
97
  ["response.in_progress"]: OpenResponsesInProgressEvent$inboundSchema,
90
98
  ["response.incomplete"]: StreamEventsResponseIncomplete$inboundSchema,
99
+ ["response.mcp_call_arguments.delta"]: McpCallArgumentsDeltaEvent$inboundSchema,
100
+ ["response.mcp_call_arguments.done"]: McpCallArgumentsDoneEvent$inboundSchema,
101
+ ["response.mcp_call.completed"]: McpCallCompletedEvent$inboundSchema,
102
+ ["response.mcp_call.failed"]: McpCallFailedEvent$inboundSchema,
103
+ ["response.mcp_call.in_progress"]: McpCallInProgressEvent$inboundSchema,
104
+ ["response.mcp_list_tools.completed"]: McpListToolsCompletedEvent$inboundSchema,
105
+ ["response.mcp_list_tools.failed"]: McpListToolsFailedEvent$inboundSchema,
106
+ ["response.mcp_list_tools.in_progress"]: McpListToolsInProgressEvent$inboundSchema,
91
107
  ["response.output_item.added"]: StreamEventsResponseOutputItemAdded$inboundSchema,
92
108
  ["response.output_item.done"]: StreamEventsResponseOutputItemDone$inboundSchema,
93
109
  ["response.output_text.annotation.added"]: AnnotationAddedEvent$inboundSchema,
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.53",
5
+ "version": "1.5.54",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "1.5.53",
3
+ "version": "1.5.54",
4
4
  "author": "OpenRouter",
5
5
  "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
6
6
  "keywords": [
@@ -73,15 +73,15 @@
73
73
  "lint": "eslint --cache --max-warnings=0 src",
74
74
  "build": "tsc && node scripts/unbarrel-imports.js",
75
75
  "prepublishOnly": "npm run build",
76
- "typecheck": "tsc --noEmit",
77
- "typecheck:transit": "exit 0",
78
76
  "compile": "tsc && node scripts/unbarrel-imports.js",
79
77
  "postinstall": "node scripts/check-types.js || true",
80
78
  "prepare": "npm run build",
81
- "test": "vitest --run --project unit",
82
79
  "test:e2e": "vitest --run --project e2e",
80
+ "test:watch": "vitest --watch --project unit",
81
+ "typecheck": "tsc --noEmit",
82
+ "test": "vitest --run --project unit",
83
83
  "test:transit": "exit 0",
84
- "test:watch": "vitest --watch --project unit"
84
+ "typecheck:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {
87
87
 
@@ -1,38 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { ClosedEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- import { ToolCallStatus } from "./toolcallstatus.js";
6
- export declare const OutputMcpServerToolItemType: {
7
- readonly OpenrouterMcp: "openrouter:mcp";
8
- };
9
- export type OutputMcpServerToolItemType = ClosedEnum<typeof OutputMcpServerToolItemType>;
10
- /**
11
- * An openrouter:mcp server tool output item
12
- */
13
- export type OutputMcpServerToolItem = {
14
- id?: string | undefined;
15
- serverLabel?: string | undefined;
16
- status: ToolCallStatus;
17
- toolName?: string | undefined;
18
- type: OutputMcpServerToolItemType;
19
- };
20
- /** @internal */
21
- export declare const OutputMcpServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputMcpServerToolItemType>;
22
- /** @internal */
23
- export declare const OutputMcpServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputMcpServerToolItemType>;
24
- /** @internal */
25
- export declare const OutputMcpServerToolItem$inboundSchema: z.ZodType<OutputMcpServerToolItem, unknown>;
26
- /** @internal */
27
- export type OutputMcpServerToolItem$Outbound = {
28
- id?: string | undefined;
29
- serverLabel?: string | undefined;
30
- status: string;
31
- toolName?: string | undefined;
32
- type: string;
33
- };
34
- /** @internal */
35
- export declare const OutputMcpServerToolItem$outboundSchema: z.ZodType<OutputMcpServerToolItem$Outbound, OutputMcpServerToolItem>;
36
- export declare function outputMcpServerToolItemToJSON(outputMcpServerToolItem: OutputMcpServerToolItem): string;
37
- export declare function outputMcpServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputMcpServerToolItem, SDKValidationError>;
38
- //# sourceMappingURL=outputmcpservertoolitem.d.ts.map
@@ -1,37 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: dd859086c9c7
4
- */
5
- import * as z from "zod/v4";
6
- import { safeParse } from "../lib/schemas.js";
7
- import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
8
- export const OutputMcpServerToolItemType = {
9
- OpenrouterMcp: "openrouter:mcp",
10
- };
11
- /** @internal */
12
- export const OutputMcpServerToolItemType$inboundSchema = z.enum(OutputMcpServerToolItemType);
13
- /** @internal */
14
- export const OutputMcpServerToolItemType$outboundSchema = OutputMcpServerToolItemType$inboundSchema;
15
- /** @internal */
16
- export const OutputMcpServerToolItem$inboundSchema = z.object({
17
- id: z.string().optional(),
18
- serverLabel: z.string().optional(),
19
- status: ToolCallStatus$inboundSchema,
20
- toolName: z.string().optional(),
21
- type: OutputMcpServerToolItemType$inboundSchema,
22
- });
23
- /** @internal */
24
- export const OutputMcpServerToolItem$outboundSchema = z.object({
25
- id: z.string().optional(),
26
- serverLabel: z.string().optional(),
27
- status: ToolCallStatus$outboundSchema,
28
- toolName: z.string().optional(),
29
- type: OutputMcpServerToolItemType$outboundSchema,
30
- });
31
- export function outputMcpServerToolItemToJSON(outputMcpServerToolItem) {
32
- return JSON.stringify(OutputMcpServerToolItem$outboundSchema.parse(outputMcpServerToolItem));
33
- }
34
- export function outputMcpServerToolItemFromJSON(jsonString) {
35
- return safeParse(jsonString, (x) => OutputMcpServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputMcpServerToolItem' from JSON`);
36
- }
37
- //# sourceMappingURL=outputmcpservertoolitem.js.map