@openrouter/sdk 1.2.38 → 1.2.40
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/esm/funcs/workspacesDelete.d.ts +1 -1
- package/esm/funcs/workspacesDelete.js +2 -6
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/index.d.ts +2 -0
- package/esm/models/index.js +2 -0
- package/esm/models/inputsunion.d.ts +5 -4
- package/esm/models/inputsunion.js +3 -0
- package/esm/models/operations/deleteworkspace.d.ts +0 -5
- package/esm/models/operations/deleteworkspace.js +0 -2
- package/esm/models/outputbashservertoolitem.d.ts +4 -4
- package/esm/models/outputbashservertoolitem.js +4 -4
- package/esm/models/outputfilesservertoolitem.d.ts +10 -0
- package/esm/models/outputfilesservertoolitem.js +6 -0
- package/esm/models/outputitems.d.ts +3 -0
- package/esm/models/outputitems.js +2 -0
- package/esm/models/outputshellcallitem.d.ts +4 -0
- package/esm/models/outputshellcallitem.js +1 -0
- package/esm/models/outputshellcalloutputitem.d.ts +2 -27
- package/esm/models/outputshellcalloutputitem.js +2 -42
- package/esm/models/outputshellservertoolitem.d.ts +66 -0
- package/esm/models/outputshellservertoolitem.js +81 -0
- package/esm/models/shellcallitem.d.ts +5 -0
- package/esm/models/shellcallitem.js +1 -0
- package/esm/models/shellcalloutputcontent.d.ts +74 -0
- package/esm/models/shellcalloutputcontent.js +109 -0
- package/esm/models/shellcalloutputitem.d.ts +3 -20
- package/esm/models/shellcalloutputitem.js +2 -19
- package/esm/sdk/workspaces.d.ts +1 -1
- package/esm/sdk/workspaces.js +1 -1
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Delete a workspace
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out.
|
|
16
|
+
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
18
|
export declare function workspacesDelete(client: OpenRouterCore, request: operations.DeleteWorkspaceRequest, options?: RequestOptions): APIPromise<Result<models.DeleteWorkspaceResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=workspacesDelete.d.ts.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
* @generated-id: 548699dffed1
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
6
6
|
import { matchStatusCode } from "../lib/http.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* Delete a workspace
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out.
|
|
20
|
+
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
21
|
*/
|
|
22
22
|
export function workspacesDelete(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
@@ -36,9 +36,6 @@ async function $do(client, request, options) {
|
|
|
36
36
|
}),
|
|
37
37
|
};
|
|
38
38
|
const path = pathToFunc("/workspaces/{id}")(pathParams);
|
|
39
|
-
const query = encodeFormQuery({
|
|
40
|
-
"confirm_default_settings_deletion": payload.confirm_default_settings_deletion,
|
|
41
|
-
});
|
|
42
39
|
const headers = new Headers(compactMap({
|
|
43
40
|
Accept: "application/json",
|
|
44
41
|
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
@@ -76,7 +73,6 @@ async function $do(client, request, options) {
|
|
|
76
73
|
baseURL: options?.serverURL,
|
|
77
74
|
path: path,
|
|
78
75
|
headers: headers,
|
|
79
|
-
query: query,
|
|
80
76
|
body: body,
|
|
81
77
|
userAgent: client._options.userAgent,
|
|
82
78
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "1.2.
|
|
52
|
+
readonly sdkVersion: "1.2.40";
|
|
53
53
|
readonly genVersion: "2.914.0";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.40 2.914.0 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "1.2.
|
|
29
|
+
sdkVersion: "1.2.40",
|
|
30
30
|
genVersion: "2.914.0",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 1.2.40 2.914.0 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -413,6 +413,7 @@ export * from "./outputreasoningitem.js";
|
|
|
413
413
|
export * from "./outputsearchmodelsservertoolitem.js";
|
|
414
414
|
export * from "./outputshellcallitem.js";
|
|
415
415
|
export * from "./outputshellcalloutputitem.js";
|
|
416
|
+
export * from "./outputshellservertoolitem.js";
|
|
416
417
|
export * from "./outputsubagentservertoolitem.js";
|
|
417
418
|
export * from "./outputtexteditorservertoolitem.js";
|
|
418
419
|
export * from "./outputtoolsearchservertoolitem.js";
|
|
@@ -504,6 +505,7 @@ export * from "./sessioncostitem.js";
|
|
|
504
505
|
export * from "./sessioncostmeta.js";
|
|
505
506
|
export * from "./sessioncostresponse.js";
|
|
506
507
|
export * from "./shellcallitem.js";
|
|
508
|
+
export * from "./shellcalloutputcontent.js";
|
|
507
509
|
export * from "./shellcalloutputitem.js";
|
|
508
510
|
export * from "./shellcallstatus.js";
|
|
509
511
|
export * from "./shellservertool.js";
|
package/esm/models/index.js
CHANGED
|
@@ -417,6 +417,7 @@ export * from "./outputreasoningitem.js";
|
|
|
417
417
|
export * from "./outputsearchmodelsservertoolitem.js";
|
|
418
418
|
export * from "./outputshellcallitem.js";
|
|
419
419
|
export * from "./outputshellcalloutputitem.js";
|
|
420
|
+
export * from "./outputshellservertoolitem.js";
|
|
420
421
|
export * from "./outputsubagentservertoolitem.js";
|
|
421
422
|
export * from "./outputtexteditorservertoolitem.js";
|
|
422
423
|
export * from "./outputtoolsearchservertoolitem.js";
|
|
@@ -508,6 +509,7 @@ export * from "./sessioncostitem.js";
|
|
|
508
509
|
export * from "./sessioncostmeta.js";
|
|
509
510
|
export * from "./sessioncostresponse.js";
|
|
510
511
|
export * from "./shellcallitem.js";
|
|
512
|
+
export * from "./shellcalloutputcontent.js";
|
|
511
513
|
export * from "./shellcalloutputitem.js";
|
|
512
514
|
export * from "./shellcallstatus.js";
|
|
513
515
|
export * from "./shellservertool.js";
|
|
@@ -39,6 +39,7 @@ import { OutputImageGenerationServerToolItem, OutputImageGenerationServerToolIte
|
|
|
39
39
|
import { OutputMcpServerToolItem, OutputMcpServerToolItem$Outbound } from "./outputmcpservertoolitem.js";
|
|
40
40
|
import { OutputMemoryServerToolItem, OutputMemoryServerToolItem$Outbound } from "./outputmemoryservertoolitem.js";
|
|
41
41
|
import { OutputSearchModelsServerToolItem, OutputSearchModelsServerToolItem$Outbound } from "./outputsearchmodelsservertoolitem.js";
|
|
42
|
+
import { OutputShellServerToolItem, OutputShellServerToolItem$Outbound } from "./outputshellservertoolitem.js";
|
|
42
43
|
import { OutputSubagentServerToolItem, OutputSubagentServerToolItem$Outbound } from "./outputsubagentservertoolitem.js";
|
|
43
44
|
import { OutputTextEditorServerToolItem, OutputTextEditorServerToolItem$Outbound } from "./outputtexteditorservertoolitem.js";
|
|
44
45
|
import { OutputToolSearchServerToolItem, OutputToolSearchServerToolItem$Outbound } from "./outputtoolsearchservertoolitem.js";
|
|
@@ -134,11 +135,11 @@ export type InputsMessage = {
|
|
|
134
135
|
status?: InputsStatusCompleted1 | InputsStatusIncomplete1 | InputsStatusInProgress1 | undefined;
|
|
135
136
|
type?: InputsTypeMessage | undefined;
|
|
136
137
|
};
|
|
137
|
-
export type InputsUnion1 = FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem | ContextCompactionItem;
|
|
138
|
+
export type InputsUnion1 = FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem | ContextCompactionItem;
|
|
138
139
|
/**
|
|
139
140
|
* Input for a response request - can be a string or array of items
|
|
140
141
|
*/
|
|
141
|
-
export type InputsUnion = string | Array<FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem | ContextCompactionItem>;
|
|
142
|
+
export type InputsUnion = string | Array<FunctionCallItem | LocalShellCallItem | McpApprovalRequestItem | McpCallItem | ApplyPatchCallItem | OutputFunctionCallItem | OutputCustomToolCallItem | OutputFileSearchCallItem | OutputComputerCallItem | OutputDatetimeItem | McpListToolsItem | CustomToolCallItem | AgentMessageItem | ReasoningItem | FunctionCallOutputItem | ApplyPatchCallOutputItem | InputsMessage | InputsReasoning | OutputWebSearchCallItem | OutputImageGenerationCallItem | OutputCodeInterpreterCallItem | LocalShellCallOutputItem | ShellCallItem | ShellCallOutputItem | McpApprovalResponseItem | CustomToolCallOutputItem | AdditionalToolsItem | OutputWebSearchServerToolItem | OutputCodeInterpreterServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputBrowserUseServerToolItem | OutputBashServerToolItem | OutputTextEditorServerToolItem | OutputApplyPatchServerToolItem | OutputWebFetchServerToolItem | OutputToolSearchServerToolItem | OutputMemoryServerToolItem | OutputMcpServerToolItem | OutputSearchModelsServerToolItem | OutputFusionServerToolItem | OutputAdvisorServerToolItem | OutputSubagentServerToolItem | OutputFilesServerToolItem | OutputShellServerToolItem | CompactionItem | ItemReferenceItem | EasyInputMessage | InputMessageItem | ContextCompactionItem>;
|
|
142
143
|
/** @internal */
|
|
143
144
|
export declare const InputsStatusInProgress2$outboundSchema: z.ZodEnum<typeof InputsStatusInProgress2>;
|
|
144
145
|
/** @internal */
|
|
@@ -213,12 +214,12 @@ export type InputsMessage$Outbound = {
|
|
|
213
214
|
export declare const InputsMessage$outboundSchema: z.ZodType<InputsMessage$Outbound, InputsMessage>;
|
|
214
215
|
export declare function inputsMessageToJSON(inputsMessage: InputsMessage): string;
|
|
215
216
|
/** @internal */
|
|
216
|
-
export type InputsUnion1$Outbound = FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$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 | 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 | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound;
|
|
217
|
+
export type InputsUnion1$Outbound = FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$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 | 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 | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound;
|
|
217
218
|
/** @internal */
|
|
218
219
|
export declare const InputsUnion1$outboundSchema: z.ZodType<InputsUnion1$Outbound, InputsUnion1>;
|
|
219
220
|
export declare function inputsUnion1ToJSON(inputsUnion1: InputsUnion1): string;
|
|
220
221
|
/** @internal */
|
|
221
|
-
export type InputsUnion$Outbound = string | Array<FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$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 | 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 | CompactionItem$Outbound | ItemReferenceItem$Outbound | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound>;
|
|
222
|
+
export type InputsUnion$Outbound = string | Array<FunctionCallItem$Outbound | LocalShellCallItem$Outbound | McpApprovalRequestItem$Outbound | McpCallItem$Outbound | ApplyPatchCallItem$Outbound | OutputFunctionCallItem$Outbound | OutputCustomToolCallItem$Outbound | OutputFileSearchCallItem$Outbound | OutputComputerCallItem$Outbound | OutputDatetimeItem$Outbound | McpListToolsItem$Outbound | CustomToolCallItem$Outbound | AgentMessageItem$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 | 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 | EasyInputMessage$Outbound | InputMessageItem$Outbound | ContextCompactionItem$Outbound>;
|
|
222
223
|
/** @internal */
|
|
223
224
|
export declare const InputsUnion$outboundSchema: z.ZodType<InputsUnion$Outbound, InputsUnion>;
|
|
224
225
|
export declare function inputsUnionToJSON(inputsUnion: InputsUnion): string;
|
|
@@ -43,6 +43,7 @@ import { OutputImageGenerationServerToolItem$outboundSchema, } from "./outputima
|
|
|
43
43
|
import { OutputMcpServerToolItem$outboundSchema, } from "./outputmcpservertoolitem.js";
|
|
44
44
|
import { OutputMemoryServerToolItem$outboundSchema, } from "./outputmemoryservertoolitem.js";
|
|
45
45
|
import { OutputSearchModelsServerToolItem$outboundSchema, } from "./outputsearchmodelsservertoolitem.js";
|
|
46
|
+
import { OutputShellServerToolItem$outboundSchema, } from "./outputshellservertoolitem.js";
|
|
46
47
|
import { OutputSubagentServerToolItem$outboundSchema, } from "./outputsubagentservertoolitem.js";
|
|
47
48
|
import { OutputTextEditorServerToolItem$outboundSchema, } from "./outputtexteditorservertoolitem.js";
|
|
48
49
|
import { OutputToolSearchServerToolItem$outboundSchema, } from "./outputtoolsearchservertoolitem.js";
|
|
@@ -249,6 +250,7 @@ export const InputsUnion1$outboundSchema = z.union([
|
|
|
249
250
|
OutputAdvisorServerToolItem$outboundSchema,
|
|
250
251
|
OutputSubagentServerToolItem$outboundSchema,
|
|
251
252
|
OutputFilesServerToolItem$outboundSchema,
|
|
253
|
+
OutputShellServerToolItem$outboundSchema,
|
|
252
254
|
CompactionItem$outboundSchema,
|
|
253
255
|
ItemReferenceItem$outboundSchema,
|
|
254
256
|
EasyInputMessage$outboundSchema,
|
|
@@ -306,6 +308,7 @@ export const InputsUnion$outboundSchema = z.union([
|
|
|
306
308
|
OutputAdvisorServerToolItem$outboundSchema,
|
|
307
309
|
OutputSubagentServerToolItem$outboundSchema,
|
|
308
310
|
OutputFilesServerToolItem$outboundSchema,
|
|
311
|
+
OutputShellServerToolItem$outboundSchema,
|
|
309
312
|
CompactionItem$outboundSchema,
|
|
310
313
|
ItemReferenceItem$outboundSchema,
|
|
311
314
|
EasyInputMessage$outboundSchema,
|
|
@@ -44,10 +44,6 @@ export type DeleteWorkspaceRequest = {
|
|
|
44
44
|
* The workspace ID (UUID) or slug
|
|
45
45
|
*/
|
|
46
46
|
id: string;
|
|
47
|
-
/**
|
|
48
|
-
* Required to delete the default workspace (not yet generally available; callers not enabled for it receive a 403 while the capability rolls out). Deleting it permanently disables the account’s unscoped inference API keys (management/provisioning keys are retained) and its budgets, guardrails, classifiers, and broadcast destinations. Ignored for non-default workspaces.
|
|
49
|
-
*/
|
|
50
|
-
confirmDefaultSettingsDeletion?: boolean | undefined;
|
|
51
47
|
};
|
|
52
48
|
/** @internal */
|
|
53
49
|
export type DeleteWorkspaceRequest$Outbound = {
|
|
@@ -55,7 +51,6 @@ export type DeleteWorkspaceRequest$Outbound = {
|
|
|
55
51
|
appTitle?: string | undefined;
|
|
56
52
|
appCategories?: string | undefined;
|
|
57
53
|
id: string;
|
|
58
|
-
confirm_default_settings_deletion?: boolean | undefined;
|
|
59
54
|
};
|
|
60
55
|
/** @internal */
|
|
61
56
|
export declare const DeleteWorkspaceRequest$outboundSchema: z.ZodType<DeleteWorkspaceRequest$Outbound, DeleteWorkspaceRequest>;
|
|
@@ -10,11 +10,9 @@ export const DeleteWorkspaceRequest$outboundSchema = z.object({
|
|
|
10
10
|
appTitle: z.string().optional(),
|
|
11
11
|
appCategories: z.string().optional(),
|
|
12
12
|
id: z.string(),
|
|
13
|
-
confirmDefaultSettingsDeletion: z.boolean().optional(),
|
|
14
13
|
}).transform((v) => {
|
|
15
14
|
return remap$(v, {
|
|
16
15
|
httpReferer: "HTTP-Referer",
|
|
17
|
-
confirmDefaultSettingsDeletion: "confirm_default_settings_deletion",
|
|
18
16
|
});
|
|
19
17
|
});
|
|
20
18
|
export function deleteWorkspaceRequestToJSON(deleteWorkspaceRequest) {
|
|
@@ -14,11 +14,11 @@ export type OutputBashServerToolItem = {
|
|
|
14
14
|
/**
|
|
15
15
|
* The raw tool-call arguments string as emitted by the model.
|
|
16
16
|
*/
|
|
17
|
-
arguments?: string | undefined;
|
|
17
|
+
arguments?: string | null | undefined;
|
|
18
18
|
/**
|
|
19
19
|
* The model-generated tool call id from the originating turn.
|
|
20
20
|
*/
|
|
21
|
-
callId?: string | undefined;
|
|
21
|
+
callId?: string | null | undefined;
|
|
22
22
|
command?: string | undefined;
|
|
23
23
|
exitCode?: number | undefined;
|
|
24
24
|
id?: string | undefined;
|
|
@@ -35,8 +35,8 @@ export declare const OutputBashServerToolItemType$outboundSchema: z.ZodEnum<type
|
|
|
35
35
|
export declare const OutputBashServerToolItem$inboundSchema: z.ZodType<OutputBashServerToolItem, unknown>;
|
|
36
36
|
/** @internal */
|
|
37
37
|
export type OutputBashServerToolItem$Outbound = {
|
|
38
|
-
arguments?: string | undefined;
|
|
39
|
-
call_id?: string | undefined;
|
|
38
|
+
arguments?: string | null | undefined;
|
|
39
|
+
call_id?: string | null | undefined;
|
|
40
40
|
command?: string | undefined;
|
|
41
41
|
exitCode?: number | undefined;
|
|
42
42
|
id?: string | undefined;
|
|
@@ -15,8 +15,8 @@ export const OutputBashServerToolItemType$inboundSchema = z.enum(OutputBashServe
|
|
|
15
15
|
export const OutputBashServerToolItemType$outboundSchema = OutputBashServerToolItemType$inboundSchema;
|
|
16
16
|
/** @internal */
|
|
17
17
|
export const OutputBashServerToolItem$inboundSchema = z.object({
|
|
18
|
-
arguments: z.string().optional(),
|
|
19
|
-
call_id: z.string().optional(),
|
|
18
|
+
arguments: z.nullable(z.string()).optional(),
|
|
19
|
+
call_id: z.nullable(z.string()).optional(),
|
|
20
20
|
command: z.string().optional(),
|
|
21
21
|
exitCode: z.int().optional(),
|
|
22
22
|
id: z.string().optional(),
|
|
@@ -31,8 +31,8 @@ export const OutputBashServerToolItem$inboundSchema = z.object({
|
|
|
31
31
|
});
|
|
32
32
|
/** @internal */
|
|
33
33
|
export const OutputBashServerToolItem$outboundSchema = z.object({
|
|
34
|
-
arguments: z.string().optional(),
|
|
35
|
-
callId: z.string().optional(),
|
|
34
|
+
arguments: z.nullable(z.string()).optional(),
|
|
35
|
+
callId: z.nullable(z.string()).optional(),
|
|
36
36
|
command: z.string().optional(),
|
|
37
37
|
exitCode: z.int().optional(),
|
|
38
38
|
id: z.string().optional(),
|
|
@@ -11,6 +11,14 @@ export type OutputFilesServerToolItemType = ClosedEnum<typeof OutputFilesServerT
|
|
|
11
11
|
* An openrouter:files server tool output item
|
|
12
12
|
*/
|
|
13
13
|
export type OutputFilesServerToolItem = {
|
|
14
|
+
/**
|
|
15
|
+
* The raw tool-call arguments string as emitted by the model.
|
|
16
|
+
*/
|
|
17
|
+
arguments?: string | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The model-generated tool call id from the originating turn.
|
|
20
|
+
*/
|
|
21
|
+
callId?: string | null | undefined;
|
|
14
22
|
/**
|
|
15
23
|
* Error message when the file operation failed.
|
|
16
24
|
*/
|
|
@@ -43,6 +51,8 @@ export declare const OutputFilesServerToolItemType$outboundSchema: z.ZodEnum<typ
|
|
|
43
51
|
export declare const OutputFilesServerToolItem$inboundSchema: z.ZodType<OutputFilesServerToolItem, unknown>;
|
|
44
52
|
/** @internal */
|
|
45
53
|
export type OutputFilesServerToolItem$Outbound = {
|
|
54
|
+
arguments?: string | null | undefined;
|
|
55
|
+
call_id?: string | null | undefined;
|
|
46
56
|
error?: string | undefined;
|
|
47
57
|
file_id?: string | undefined;
|
|
48
58
|
filename?: string | undefined;
|
|
@@ -15,6 +15,8 @@ export const OutputFilesServerToolItemType$inboundSchema = z.enum(OutputFilesSer
|
|
|
15
15
|
export const OutputFilesServerToolItemType$outboundSchema = OutputFilesServerToolItemType$inboundSchema;
|
|
16
16
|
/** @internal */
|
|
17
17
|
export const OutputFilesServerToolItem$inboundSchema = z.object({
|
|
18
|
+
arguments: z.nullable(z.string()).optional(),
|
|
19
|
+
call_id: z.nullable(z.string()).optional(),
|
|
18
20
|
error: z.string().optional(),
|
|
19
21
|
file_id: z.string().optional(),
|
|
20
22
|
filename: z.string().optional(),
|
|
@@ -25,11 +27,14 @@ export const OutputFilesServerToolItem$inboundSchema = z.object({
|
|
|
25
27
|
type: OutputFilesServerToolItemType$inboundSchema,
|
|
26
28
|
}).transform((v) => {
|
|
27
29
|
return remap$(v, {
|
|
30
|
+
"call_id": "callId",
|
|
28
31
|
"file_id": "fileId",
|
|
29
32
|
});
|
|
30
33
|
});
|
|
31
34
|
/** @internal */
|
|
32
35
|
export const OutputFilesServerToolItem$outboundSchema = z.object({
|
|
36
|
+
arguments: z.nullable(z.string()).optional(),
|
|
37
|
+
callId: z.nullable(z.string()).optional(),
|
|
33
38
|
error: z.string().optional(),
|
|
34
39
|
fileId: z.string().optional(),
|
|
35
40
|
filename: z.string().optional(),
|
|
@@ -40,6 +45,7 @@ export const OutputFilesServerToolItem$outboundSchema = z.object({
|
|
|
40
45
|
type: OutputFilesServerToolItemType$outboundSchema,
|
|
41
46
|
}).transform((v) => {
|
|
42
47
|
return remap$(v, {
|
|
48
|
+
callId: "call_id",
|
|
43
49
|
fileId: "file_id",
|
|
44
50
|
});
|
|
45
51
|
});
|
|
@@ -26,6 +26,7 @@ import { OutputReasoningItem } from "./outputreasoningitem.js";
|
|
|
26
26
|
import { OutputSearchModelsServerToolItem } from "./outputsearchmodelsservertoolitem.js";
|
|
27
27
|
import { OutputShellCallItem } from "./outputshellcallitem.js";
|
|
28
28
|
import { OutputShellCallOutputItem } from "./outputshellcalloutputitem.js";
|
|
29
|
+
import { OutputShellServerToolItem } from "./outputshellservertoolitem.js";
|
|
29
30
|
import { OutputSubagentServerToolItem } from "./outputsubagentservertoolitem.js";
|
|
30
31
|
import { OutputTextEditorServerToolItem } from "./outputtexteditorservertoolitem.js";
|
|
31
32
|
import { OutputToolSearchServerToolItem } from "./outputtoolsearchservertoolitem.js";
|
|
@@ -73,6 +74,8 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
|
|
|
73
74
|
type: "openrouter:mcp";
|
|
74
75
|
}) | (OutputMemoryServerToolItem & {
|
|
75
76
|
type: "openrouter:memory";
|
|
77
|
+
}) | (OutputShellServerToolItem & {
|
|
78
|
+
type: "openrouter:shell";
|
|
76
79
|
}) | (OutputSubagentServerToolItem & {
|
|
77
80
|
type: "openrouter:subagent";
|
|
78
81
|
}) | (OutputTextEditorServerToolItem & {
|
|
@@ -29,6 +29,7 @@ import { OutputReasoningItem$inboundSchema, } from "./outputreasoningitem.js";
|
|
|
29
29
|
import { OutputSearchModelsServerToolItem$inboundSchema, } from "./outputsearchmodelsservertoolitem.js";
|
|
30
30
|
import { OutputShellCallItem$inboundSchema, } from "./outputshellcallitem.js";
|
|
31
31
|
import { OutputShellCallOutputItem$inboundSchema, } from "./outputshellcalloutputitem.js";
|
|
32
|
+
import { OutputShellServerToolItem$inboundSchema, } from "./outputshellservertoolitem.js";
|
|
32
33
|
import { OutputSubagentServerToolItem$inboundSchema, } from "./outputsubagentservertoolitem.js";
|
|
33
34
|
import { OutputTextEditorServerToolItem$inboundSchema, } from "./outputtexteditorservertoolitem.js";
|
|
34
35
|
import { OutputToolSearchServerToolItem$inboundSchema, } from "./outputtoolsearchservertoolitem.js";
|
|
@@ -61,6 +62,7 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
|
|
|
61
62
|
["openrouter:image_generation"]: OutputImageGenerationServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:image_generation") })),
|
|
62
63
|
["openrouter:mcp"]: OutputMcpServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:mcp") })),
|
|
63
64
|
["openrouter:memory"]: OutputMemoryServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:memory") })),
|
|
65
|
+
["openrouter:shell"]: OutputShellServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:shell") })),
|
|
64
66
|
["openrouter:subagent"]: OutputSubagentServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:subagent") })),
|
|
65
67
|
["openrouter:text_editor"]: OutputTextEditorServerToolItem$inboundSchema
|
|
66
68
|
.and(z.object({ type: z.literal("openrouter:text_editor") })),
|
|
@@ -12,6 +12,10 @@ export type OutputShellCallItemAction = {
|
|
|
12
12
|
*/
|
|
13
13
|
export type OutputShellCallItem = {
|
|
14
14
|
action?: OutputShellCallItemAction | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The raw tool-call arguments string as emitted by the model. Echo back unchanged when replaying history; used verbatim to preserve provider prompt-cache prefixes.
|
|
17
|
+
*/
|
|
18
|
+
arguments?: string | null | undefined;
|
|
15
19
|
callId: string;
|
|
16
20
|
id: string;
|
|
17
21
|
/**
|
|
@@ -23,6 +23,7 @@ export function outputShellCallItemActionFromJSON(jsonString) {
|
|
|
23
23
|
/** @internal */
|
|
24
24
|
export const OutputShellCallItem$inboundSchema = z.object({
|
|
25
25
|
action: z.lazy(() => OutputShellCallItemAction$inboundSchema).optional(),
|
|
26
|
+
arguments: z.nullable(z.string()).optional(),
|
|
26
27
|
call_id: z.string(),
|
|
27
28
|
id: z.string(),
|
|
28
29
|
status: ShellCallStatus$inboundSchema,
|
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { ShellCallOutputContent } from "./shellcalloutputcontent.js";
|
|
5
5
|
import { ShellCallStatus } from "./shellcallstatus.js";
|
|
6
|
-
export type OutcomeTimeout = {
|
|
7
|
-
type: "timeout";
|
|
8
|
-
};
|
|
9
|
-
export type OutcomeExit = {
|
|
10
|
-
exitCode: number;
|
|
11
|
-
type: "exit";
|
|
12
|
-
};
|
|
13
|
-
export type Outcome = OutcomeExit | OutcomeTimeout | discriminatedUnionTypes.Unknown<"type">;
|
|
14
|
-
export type OutputShellCallOutputItemOutput = {
|
|
15
|
-
outcome: OutcomeExit | OutcomeTimeout | discriminatedUnionTypes.Unknown<"type">;
|
|
16
|
-
stderr: string;
|
|
17
|
-
stdout: string;
|
|
18
|
-
};
|
|
19
6
|
/**
|
|
20
7
|
* A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome.
|
|
21
8
|
*/
|
|
@@ -23,7 +10,7 @@ export type OutputShellCallOutputItem = {
|
|
|
23
10
|
callId: string;
|
|
24
11
|
id: string;
|
|
25
12
|
maxOutputLength?: number | null | undefined;
|
|
26
|
-
output: Array<
|
|
13
|
+
output: Array<ShellCallOutputContent>;
|
|
27
14
|
/**
|
|
28
15
|
* Status of a shell call or its output.
|
|
29
16
|
*/
|
|
@@ -31,18 +18,6 @@ export type OutputShellCallOutputItem = {
|
|
|
31
18
|
type: "shell_call_output";
|
|
32
19
|
};
|
|
33
20
|
/** @internal */
|
|
34
|
-
export declare const OutcomeTimeout$inboundSchema: z.ZodType<OutcomeTimeout, unknown>;
|
|
35
|
-
export declare function outcomeTimeoutFromJSON(jsonString: string): SafeParseResult<OutcomeTimeout, SDKValidationError>;
|
|
36
|
-
/** @internal */
|
|
37
|
-
export declare const OutcomeExit$inboundSchema: z.ZodType<OutcomeExit, unknown>;
|
|
38
|
-
export declare function outcomeExitFromJSON(jsonString: string): SafeParseResult<OutcomeExit, SDKValidationError>;
|
|
39
|
-
/** @internal */
|
|
40
|
-
export declare const Outcome$inboundSchema: z.ZodType<Outcome, unknown>;
|
|
41
|
-
export declare function outcomeFromJSON(jsonString: string): SafeParseResult<Outcome, SDKValidationError>;
|
|
42
|
-
/** @internal */
|
|
43
|
-
export declare const OutputShellCallOutputItemOutput$inboundSchema: z.ZodType<OutputShellCallOutputItemOutput, unknown>;
|
|
44
|
-
export declare function outputShellCallOutputItemOutputFromJSON(jsonString: string): SafeParseResult<OutputShellCallOutputItemOutput, SDKValidationError>;
|
|
45
|
-
/** @internal */
|
|
46
21
|
export declare const OutputShellCallOutputItem$inboundSchema: z.ZodType<OutputShellCallOutputItem, unknown>;
|
|
47
22
|
export declare function outputShellCallOutputItemFromJSON(jsonString: string): SafeParseResult<OutputShellCallOutputItem, SDKValidationError>;
|
|
48
23
|
//# sourceMappingURL=outputshellcalloutputitem.d.ts.map
|
|
@@ -5,54 +5,14 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
-
import {
|
|
8
|
+
import { ShellCallOutputContent$inboundSchema, } from "./shellcalloutputcontent.js";
|
|
9
9
|
import { ShellCallStatus$inboundSchema, } from "./shellcallstatus.js";
|
|
10
10
|
/** @internal */
|
|
11
|
-
export const OutcomeTimeout$inboundSchema = z.object({
|
|
12
|
-
type: z.literal("timeout"),
|
|
13
|
-
});
|
|
14
|
-
export function outcomeTimeoutFromJSON(jsonString) {
|
|
15
|
-
return safeParse(jsonString, (x) => OutcomeTimeout$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutcomeTimeout' from JSON`);
|
|
16
|
-
}
|
|
17
|
-
/** @internal */
|
|
18
|
-
export const OutcomeExit$inboundSchema = z
|
|
19
|
-
.object({
|
|
20
|
-
exit_code: z.int(),
|
|
21
|
-
type: z.literal("exit"),
|
|
22
|
-
}).transform((v) => {
|
|
23
|
-
return remap$(v, {
|
|
24
|
-
"exit_code": "exitCode",
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
export function outcomeExitFromJSON(jsonString) {
|
|
28
|
-
return safeParse(jsonString, (x) => OutcomeExit$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutcomeExit' from JSON`);
|
|
29
|
-
}
|
|
30
|
-
/** @internal */
|
|
31
|
-
export const Outcome$inboundSchema = discriminatedUnion("type", {
|
|
32
|
-
exit: z.lazy(() => OutcomeExit$inboundSchema),
|
|
33
|
-
timeout: z.lazy(() => OutcomeTimeout$inboundSchema),
|
|
34
|
-
});
|
|
35
|
-
export function outcomeFromJSON(jsonString) {
|
|
36
|
-
return safeParse(jsonString, (x) => Outcome$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Outcome' from JSON`);
|
|
37
|
-
}
|
|
38
|
-
/** @internal */
|
|
39
|
-
export const OutputShellCallOutputItemOutput$inboundSchema = z.object({
|
|
40
|
-
outcome: discriminatedUnion("type", {
|
|
41
|
-
exit: z.lazy(() => OutcomeExit$inboundSchema),
|
|
42
|
-
timeout: z.lazy(() => OutcomeTimeout$inboundSchema),
|
|
43
|
-
}),
|
|
44
|
-
stderr: z.string(),
|
|
45
|
-
stdout: z.string(),
|
|
46
|
-
});
|
|
47
|
-
export function outputShellCallOutputItemOutputFromJSON(jsonString) {
|
|
48
|
-
return safeParse(jsonString, (x) => OutputShellCallOutputItemOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputShellCallOutputItemOutput' from JSON`);
|
|
49
|
-
}
|
|
50
|
-
/** @internal */
|
|
51
11
|
export const OutputShellCallOutputItem$inboundSchema = z.object({
|
|
52
12
|
call_id: z.string(),
|
|
53
13
|
id: z.string(),
|
|
54
14
|
max_output_length: z.nullable(z.int()).optional(),
|
|
55
|
-
output: z.array(
|
|
15
|
+
output: z.array(ShellCallOutputContent$inboundSchema),
|
|
56
16
|
status: ShellCallStatus$inboundSchema,
|
|
57
17
|
type: z.literal("shell_call_output"),
|
|
58
18
|
}).transform((v) => {
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { ShellCallOutputContent, ShellCallOutputContent$Outbound } from "./shellcalloutputcontent.js";
|
|
6
|
+
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
7
|
+
export type OutputShellServerToolItemAction = {
|
|
8
|
+
commands: Array<string>;
|
|
9
|
+
maxOutputLength?: number | null | undefined;
|
|
10
|
+
timeoutMs?: number | null | undefined;
|
|
11
|
+
};
|
|
12
|
+
export declare const OutputShellServerToolItemType: {
|
|
13
|
+
readonly OpenrouterShell: "openrouter:shell";
|
|
14
|
+
};
|
|
15
|
+
export type OutputShellServerToolItemType = ClosedEnum<typeof OutputShellServerToolItemType>;
|
|
16
|
+
/**
|
|
17
|
+
* An openrouter:shell server tool output item
|
|
18
|
+
*/
|
|
19
|
+
export type OutputShellServerToolItem = {
|
|
20
|
+
action?: OutputShellServerToolItemAction | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The raw tool-call arguments string as emitted by the model.
|
|
23
|
+
*/
|
|
24
|
+
arguments?: string | null | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The model-generated tool call id from the originating turn.
|
|
27
|
+
*/
|
|
28
|
+
callId?: string | null | undefined;
|
|
29
|
+
id?: string | undefined;
|
|
30
|
+
output?: Array<ShellCallOutputContent> | undefined;
|
|
31
|
+
status: ToolCallStatus;
|
|
32
|
+
type: OutputShellServerToolItemType;
|
|
33
|
+
};
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const OutputShellServerToolItemAction$inboundSchema: z.ZodType<OutputShellServerToolItemAction, unknown>;
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type OutputShellServerToolItemAction$Outbound = {
|
|
38
|
+
commands: Array<string>;
|
|
39
|
+
max_output_length?: number | null | undefined;
|
|
40
|
+
timeout_ms?: number | null | undefined;
|
|
41
|
+
};
|
|
42
|
+
/** @internal */
|
|
43
|
+
export declare const OutputShellServerToolItemAction$outboundSchema: z.ZodType<OutputShellServerToolItemAction$Outbound, OutputShellServerToolItemAction>;
|
|
44
|
+
export declare function outputShellServerToolItemActionToJSON(outputShellServerToolItemAction: OutputShellServerToolItemAction): string;
|
|
45
|
+
export declare function outputShellServerToolItemActionFromJSON(jsonString: string): SafeParseResult<OutputShellServerToolItemAction, SDKValidationError>;
|
|
46
|
+
/** @internal */
|
|
47
|
+
export declare const OutputShellServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputShellServerToolItemType>;
|
|
48
|
+
/** @internal */
|
|
49
|
+
export declare const OutputShellServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputShellServerToolItemType>;
|
|
50
|
+
/** @internal */
|
|
51
|
+
export declare const OutputShellServerToolItem$inboundSchema: z.ZodType<OutputShellServerToolItem, unknown>;
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type OutputShellServerToolItem$Outbound = {
|
|
54
|
+
action?: OutputShellServerToolItemAction$Outbound | undefined;
|
|
55
|
+
arguments?: string | null | undefined;
|
|
56
|
+
call_id?: string | null | undefined;
|
|
57
|
+
id?: string | undefined;
|
|
58
|
+
output?: Array<ShellCallOutputContent$Outbound> | undefined;
|
|
59
|
+
status: string;
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
/** @internal */
|
|
63
|
+
export declare const OutputShellServerToolItem$outboundSchema: z.ZodType<OutputShellServerToolItem$Outbound, OutputShellServerToolItem>;
|
|
64
|
+
export declare function outputShellServerToolItemToJSON(outputShellServerToolItem: OutputShellServerToolItem): string;
|
|
65
|
+
export declare function outputShellServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputShellServerToolItem, SDKValidationError>;
|
|
66
|
+
//# sourceMappingURL=outputshellservertoolitem.d.ts.map
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 369a1cd63f40
|
|
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
|
+
import { ShellCallOutputContent$inboundSchema, ShellCallOutputContent$outboundSchema, } from "./shellcalloutputcontent.js";
|
|
9
|
+
import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
10
|
+
export const OutputShellServerToolItemType = {
|
|
11
|
+
OpenrouterShell: "openrouter:shell",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const OutputShellServerToolItemAction$inboundSchema = z.object({
|
|
15
|
+
commands: z.array(z.string()),
|
|
16
|
+
max_output_length: z.nullable(z.int()).optional(),
|
|
17
|
+
timeout_ms: z.nullable(z.int()).optional(),
|
|
18
|
+
}).transform((v) => {
|
|
19
|
+
return remap$(v, {
|
|
20
|
+
"max_output_length": "maxOutputLength",
|
|
21
|
+
"timeout_ms": "timeoutMs",
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const OutputShellServerToolItemAction$outboundSchema = z.object({
|
|
26
|
+
commands: z.array(z.string()),
|
|
27
|
+
maxOutputLength: z.nullable(z.int()).optional(),
|
|
28
|
+
timeoutMs: z.nullable(z.int()).optional(),
|
|
29
|
+
}).transform((v) => {
|
|
30
|
+
return remap$(v, {
|
|
31
|
+
maxOutputLength: "max_output_length",
|
|
32
|
+
timeoutMs: "timeout_ms",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
export function outputShellServerToolItemActionToJSON(outputShellServerToolItemAction) {
|
|
36
|
+
return JSON.stringify(OutputShellServerToolItemAction$outboundSchema.parse(outputShellServerToolItemAction));
|
|
37
|
+
}
|
|
38
|
+
export function outputShellServerToolItemActionFromJSON(jsonString) {
|
|
39
|
+
return safeParse(jsonString, (x) => OutputShellServerToolItemAction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputShellServerToolItemAction' from JSON`);
|
|
40
|
+
}
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const OutputShellServerToolItemType$inboundSchema = z.enum(OutputShellServerToolItemType);
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const OutputShellServerToolItemType$outboundSchema = OutputShellServerToolItemType$inboundSchema;
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const OutputShellServerToolItem$inboundSchema = z.object({
|
|
47
|
+
action: z.lazy(() => OutputShellServerToolItemAction$inboundSchema)
|
|
48
|
+
.optional(),
|
|
49
|
+
arguments: z.nullable(z.string()).optional(),
|
|
50
|
+
call_id: z.nullable(z.string()).optional(),
|
|
51
|
+
id: z.string().optional(),
|
|
52
|
+
output: z.array(ShellCallOutputContent$inboundSchema).optional(),
|
|
53
|
+
status: ToolCallStatus$inboundSchema,
|
|
54
|
+
type: OutputShellServerToolItemType$inboundSchema,
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
"call_id": "callId",
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const OutputShellServerToolItem$outboundSchema = z.object({
|
|
62
|
+
action: z.lazy(() => OutputShellServerToolItemAction$outboundSchema)
|
|
63
|
+
.optional(),
|
|
64
|
+
arguments: z.nullable(z.string()).optional(),
|
|
65
|
+
callId: z.nullable(z.string()).optional(),
|
|
66
|
+
id: z.string().optional(),
|
|
67
|
+
output: z.array(ShellCallOutputContent$outboundSchema).optional(),
|
|
68
|
+
status: ToolCallStatus$outboundSchema,
|
|
69
|
+
type: OutputShellServerToolItemType$outboundSchema,
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
callId: "call_id",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
export function outputShellServerToolItemToJSON(outputShellServerToolItem) {
|
|
76
|
+
return JSON.stringify(OutputShellServerToolItem$outboundSchema.parse(outputShellServerToolItem));
|
|
77
|
+
}
|
|
78
|
+
export function outputShellServerToolItemFromJSON(jsonString) {
|
|
79
|
+
return safeParse(jsonString, (x) => OutputShellServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputShellServerToolItem' from JSON`);
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=outputshellservertoolitem.js.map
|
|
@@ -15,6 +15,10 @@ export type ShellCallItemType = ClosedEnum<typeof ShellCallItemType>;
|
|
|
15
15
|
*/
|
|
16
16
|
export type ShellCallItem = {
|
|
17
17
|
action: ShellCallItemAction;
|
|
18
|
+
/**
|
|
19
|
+
* The raw tool-call arguments string as emitted by the model. Echo back unchanged when replaying history; used verbatim to preserve provider prompt-cache prefixes.
|
|
20
|
+
*/
|
|
21
|
+
arguments?: string | null | undefined;
|
|
18
22
|
callId: string;
|
|
19
23
|
environment?: any | undefined;
|
|
20
24
|
id?: string | null | undefined;
|
|
@@ -35,6 +39,7 @@ export declare const ShellCallItemType$outboundSchema: z.ZodEnum<typeof ShellCal
|
|
|
35
39
|
/** @internal */
|
|
36
40
|
export type ShellCallItem$Outbound = {
|
|
37
41
|
action: ShellCallItemAction$Outbound;
|
|
42
|
+
arguments?: string | null | undefined;
|
|
38
43
|
call_id: string;
|
|
39
44
|
environment?: any | undefined;
|
|
40
45
|
id?: string | null | undefined;
|
|
@@ -27,6 +27,7 @@ export const ShellCallItemType$outboundSchema = z.enum(ShellCallItemType);
|
|
|
27
27
|
/** @internal */
|
|
28
28
|
export const ShellCallItem$outboundSchema = z.object({
|
|
29
29
|
action: z.lazy(() => ShellCallItemAction$outboundSchema),
|
|
30
|
+
arguments: z.nullable(z.string()).optional(),
|
|
30
31
|
callId: z.string(),
|
|
31
32
|
environment: z.any().optional(),
|
|
32
33
|
id: z.nullable(z.string()).optional(),
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export type OutcomeTimeout = {
|
|
6
|
+
type: "timeout";
|
|
7
|
+
additionalProperties?: {
|
|
8
|
+
[k: string]: any;
|
|
9
|
+
} | undefined;
|
|
10
|
+
};
|
|
11
|
+
export type OutcomeExit = {
|
|
12
|
+
exitCode: number;
|
|
13
|
+
type: "exit";
|
|
14
|
+
additionalProperties?: {
|
|
15
|
+
[k: string]: any;
|
|
16
|
+
} | undefined;
|
|
17
|
+
};
|
|
18
|
+
export type Outcome = OutcomeExit | OutcomeTimeout | discriminatedUnionTypes.Unknown<"type">;
|
|
19
|
+
/**
|
|
20
|
+
* Captured stdout and stderr for one command of a shell call, with its exit or timeout outcome.
|
|
21
|
+
*/
|
|
22
|
+
export type ShellCallOutputContent = {
|
|
23
|
+
outcome: OutcomeExit | OutcomeTimeout | discriminatedUnionTypes.Unknown<"type">;
|
|
24
|
+
stderr: string;
|
|
25
|
+
stdout: string;
|
|
26
|
+
additionalProperties?: {
|
|
27
|
+
[k: string]: any;
|
|
28
|
+
} | undefined;
|
|
29
|
+
};
|
|
30
|
+
/** @internal */
|
|
31
|
+
export declare const OutcomeTimeout$inboundSchema: z.ZodType<OutcomeTimeout, unknown>;
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type OutcomeTimeout$Outbound = {
|
|
34
|
+
type: "timeout";
|
|
35
|
+
[additionalProperties: string]: unknown;
|
|
36
|
+
};
|
|
37
|
+
/** @internal */
|
|
38
|
+
export declare const OutcomeTimeout$outboundSchema: z.ZodType<OutcomeTimeout$Outbound, OutcomeTimeout>;
|
|
39
|
+
export declare function outcomeTimeoutToJSON(outcomeTimeout: OutcomeTimeout): string;
|
|
40
|
+
export declare function outcomeTimeoutFromJSON(jsonString: string): SafeParseResult<OutcomeTimeout, SDKValidationError>;
|
|
41
|
+
/** @internal */
|
|
42
|
+
export declare const OutcomeExit$inboundSchema: z.ZodType<OutcomeExit, unknown>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type OutcomeExit$Outbound = {
|
|
45
|
+
exit_code: number;
|
|
46
|
+
type: "exit";
|
|
47
|
+
[additionalProperties: string]: unknown;
|
|
48
|
+
};
|
|
49
|
+
/** @internal */
|
|
50
|
+
export declare const OutcomeExit$outboundSchema: z.ZodType<OutcomeExit$Outbound, OutcomeExit>;
|
|
51
|
+
export declare function outcomeExitToJSON(outcomeExit: OutcomeExit): string;
|
|
52
|
+
export declare function outcomeExitFromJSON(jsonString: string): SafeParseResult<OutcomeExit, SDKValidationError>;
|
|
53
|
+
/** @internal */
|
|
54
|
+
export declare const Outcome$inboundSchema: z.ZodType<Outcome, unknown>;
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type Outcome$Outbound = OutcomeExit$Outbound | OutcomeTimeout$Outbound;
|
|
57
|
+
/** @internal */
|
|
58
|
+
export declare const Outcome$outboundSchema: z.ZodType<Outcome$Outbound, Outcome>;
|
|
59
|
+
export declare function outcomeToJSON(outcome: Outcome): string;
|
|
60
|
+
export declare function outcomeFromJSON(jsonString: string): SafeParseResult<Outcome, SDKValidationError>;
|
|
61
|
+
/** @internal */
|
|
62
|
+
export declare const ShellCallOutputContent$inboundSchema: z.ZodType<ShellCallOutputContent, unknown>;
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type ShellCallOutputContent$Outbound = {
|
|
65
|
+
outcome: OutcomeExit$Outbound | OutcomeTimeout$Outbound;
|
|
66
|
+
stderr: string;
|
|
67
|
+
stdout: string;
|
|
68
|
+
[additionalProperties: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
/** @internal */
|
|
71
|
+
export declare const ShellCallOutputContent$outboundSchema: z.ZodType<ShellCallOutputContent$Outbound, ShellCallOutputContent>;
|
|
72
|
+
export declare function shellCallOutputContentToJSON(shellCallOutputContent: ShellCallOutputContent): string;
|
|
73
|
+
export declare function shellCallOutputContentFromJSON(jsonString: string): SafeParseResult<ShellCallOutputContent, SDKValidationError>;
|
|
74
|
+
//# sourceMappingURL=shellcalloutputcontent.d.ts.map
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ec44d931b43f
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../lib/schemas.js";
|
|
8
|
+
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const OutcomeTimeout$inboundSchema = collectExtraKeys$(z.object({
|
|
11
|
+
type: z.literal("timeout"),
|
|
12
|
+
}).catchall(z.any()), "additionalProperties", true);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const OutcomeTimeout$outboundSchema = z.object({
|
|
15
|
+
type: z.literal("timeout"),
|
|
16
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
17
|
+
}).transform((v) => {
|
|
18
|
+
return {
|
|
19
|
+
...v.additionalProperties,
|
|
20
|
+
...remap$(v, {
|
|
21
|
+
additionalProperties: null,
|
|
22
|
+
}),
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
export function outcomeTimeoutToJSON(outcomeTimeout) {
|
|
26
|
+
return JSON.stringify(OutcomeTimeout$outboundSchema.parse(outcomeTimeout));
|
|
27
|
+
}
|
|
28
|
+
export function outcomeTimeoutFromJSON(jsonString) {
|
|
29
|
+
return safeParse(jsonString, (x) => OutcomeTimeout$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutcomeTimeout' from JSON`);
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const OutcomeExit$inboundSchema = collectExtraKeys$(z.object({
|
|
33
|
+
exit_code: z.int(),
|
|
34
|
+
type: z.literal("exit"),
|
|
35
|
+
}).catchall(z.any()), "additionalProperties", true).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"exit_code": "exitCode",
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const OutcomeExit$outboundSchema = z.object({
|
|
42
|
+
exitCode: z.int(),
|
|
43
|
+
type: z.literal("exit"),
|
|
44
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
45
|
+
}).transform((v) => {
|
|
46
|
+
return {
|
|
47
|
+
...v.additionalProperties,
|
|
48
|
+
...remap$(v, {
|
|
49
|
+
exitCode: "exit_code",
|
|
50
|
+
additionalProperties: null,
|
|
51
|
+
}),
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
export function outcomeExitToJSON(outcomeExit) {
|
|
55
|
+
return JSON.stringify(OutcomeExit$outboundSchema.parse(outcomeExit));
|
|
56
|
+
}
|
|
57
|
+
export function outcomeExitFromJSON(jsonString) {
|
|
58
|
+
return safeParse(jsonString, (x) => OutcomeExit$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutcomeExit' from JSON`);
|
|
59
|
+
}
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const Outcome$inboundSchema = discriminatedUnion("type", {
|
|
62
|
+
exit: z.lazy(() => OutcomeExit$inboundSchema),
|
|
63
|
+
timeout: z.lazy(() => OutcomeTimeout$inboundSchema),
|
|
64
|
+
});
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const Outcome$outboundSchema = z
|
|
67
|
+
.union([
|
|
68
|
+
z.lazy(() => OutcomeExit$outboundSchema),
|
|
69
|
+
z.lazy(() => OutcomeTimeout$outboundSchema),
|
|
70
|
+
]);
|
|
71
|
+
export function outcomeToJSON(outcome) {
|
|
72
|
+
return JSON.stringify(Outcome$outboundSchema.parse(outcome));
|
|
73
|
+
}
|
|
74
|
+
export function outcomeFromJSON(jsonString) {
|
|
75
|
+
return safeParse(jsonString, (x) => Outcome$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Outcome' from JSON`);
|
|
76
|
+
}
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const ShellCallOutputContent$inboundSchema = collectExtraKeys$(z.object({
|
|
79
|
+
outcome: discriminatedUnion("type", {
|
|
80
|
+
exit: z.lazy(() => OutcomeExit$inboundSchema),
|
|
81
|
+
timeout: z.lazy(() => OutcomeTimeout$inboundSchema),
|
|
82
|
+
}),
|
|
83
|
+
stderr: z.string(),
|
|
84
|
+
stdout: z.string(),
|
|
85
|
+
}).catchall(z.any()), "additionalProperties", true);
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const ShellCallOutputContent$outboundSchema = z.object({
|
|
88
|
+
outcome: z.union([
|
|
89
|
+
z.lazy(() => OutcomeExit$outboundSchema),
|
|
90
|
+
z.lazy(() => OutcomeTimeout$outboundSchema),
|
|
91
|
+
]),
|
|
92
|
+
stderr: z.string(),
|
|
93
|
+
stdout: z.string(),
|
|
94
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
95
|
+
}).transform((v) => {
|
|
96
|
+
return {
|
|
97
|
+
...v.additionalProperties,
|
|
98
|
+
...remap$(v, {
|
|
99
|
+
additionalProperties: null,
|
|
100
|
+
}),
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
export function shellCallOutputContentToJSON(shellCallOutputContent) {
|
|
104
|
+
return JSON.stringify(ShellCallOutputContent$outboundSchema.parse(shellCallOutputContent));
|
|
105
|
+
}
|
|
106
|
+
export function shellCallOutputContentFromJSON(jsonString) {
|
|
107
|
+
return safeParse(jsonString, (x) => ShellCallOutputContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ShellCallOutputContent' from JSON`);
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=shellcalloutputcontent.js.map
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { ShellCallOutputContent, ShellCallOutputContent$Outbound } from "./shellcalloutputcontent.js";
|
|
3
4
|
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
4
|
-
export type ShellCallOutputItemOutput = {
|
|
5
|
-
content?: string | null | undefined;
|
|
6
|
-
exitCode?: number | null | undefined;
|
|
7
|
-
type: string;
|
|
8
|
-
additionalProperties?: {
|
|
9
|
-
[k: string]: any;
|
|
10
|
-
} | undefined;
|
|
11
|
-
};
|
|
12
5
|
export declare const ShellCallOutputItemType: {
|
|
13
6
|
readonly ShellCallOutput: "shell_call_output";
|
|
14
7
|
};
|
|
@@ -20,28 +13,18 @@ export type ShellCallOutputItem = {
|
|
|
20
13
|
callId: string;
|
|
21
14
|
id?: string | null | undefined;
|
|
22
15
|
maxOutputLength?: number | null | undefined;
|
|
23
|
-
output: Array<
|
|
16
|
+
output: Array<ShellCallOutputContent>;
|
|
24
17
|
status?: ToolCallStatus | null | undefined;
|
|
25
18
|
type: ShellCallOutputItemType;
|
|
26
19
|
};
|
|
27
20
|
/** @internal */
|
|
28
|
-
export type ShellCallOutputItemOutput$Outbound = {
|
|
29
|
-
content?: string | null | undefined;
|
|
30
|
-
exit_code?: number | null | undefined;
|
|
31
|
-
type: string;
|
|
32
|
-
[additionalProperties: string]: unknown;
|
|
33
|
-
};
|
|
34
|
-
/** @internal */
|
|
35
|
-
export declare const ShellCallOutputItemOutput$outboundSchema: z.ZodType<ShellCallOutputItemOutput$Outbound, ShellCallOutputItemOutput>;
|
|
36
|
-
export declare function shellCallOutputItemOutputToJSON(shellCallOutputItemOutput: ShellCallOutputItemOutput): string;
|
|
37
|
-
/** @internal */
|
|
38
21
|
export declare const ShellCallOutputItemType$outboundSchema: z.ZodEnum<typeof ShellCallOutputItemType>;
|
|
39
22
|
/** @internal */
|
|
40
23
|
export type ShellCallOutputItem$Outbound = {
|
|
41
24
|
call_id: string;
|
|
42
25
|
id?: string | null | undefined;
|
|
43
26
|
max_output_length?: number | null | undefined;
|
|
44
|
-
output: Array<
|
|
27
|
+
output: Array<ShellCallOutputContent$Outbound>;
|
|
45
28
|
status?: string | null | undefined;
|
|
46
29
|
type: string;
|
|
47
30
|
};
|
|
@@ -4,36 +4,19 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { ShellCallOutputContent$outboundSchema, } from "./shellcalloutputcontent.js";
|
|
7
8
|
import { ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
8
9
|
export const ShellCallOutputItemType = {
|
|
9
10
|
ShellCallOutput: "shell_call_output",
|
|
10
11
|
};
|
|
11
12
|
/** @internal */
|
|
12
|
-
export const ShellCallOutputItemOutput$outboundSchema = z.object({
|
|
13
|
-
content: z.nullable(z.string()).optional(),
|
|
14
|
-
exitCode: z.nullable(z.int()).optional(),
|
|
15
|
-
type: z.string(),
|
|
16
|
-
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
17
|
-
}).transform((v) => {
|
|
18
|
-
return {
|
|
19
|
-
...v.additionalProperties,
|
|
20
|
-
...remap$(v, {
|
|
21
|
-
exitCode: "exit_code",
|
|
22
|
-
additionalProperties: null,
|
|
23
|
-
}),
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
export function shellCallOutputItemOutputToJSON(shellCallOutputItemOutput) {
|
|
27
|
-
return JSON.stringify(ShellCallOutputItemOutput$outboundSchema.parse(shellCallOutputItemOutput));
|
|
28
|
-
}
|
|
29
|
-
/** @internal */
|
|
30
13
|
export const ShellCallOutputItemType$outboundSchema = z.enum(ShellCallOutputItemType);
|
|
31
14
|
/** @internal */
|
|
32
15
|
export const ShellCallOutputItem$outboundSchema = z.object({
|
|
33
16
|
callId: z.string(),
|
|
34
17
|
id: z.nullable(z.string()).optional(),
|
|
35
18
|
maxOutputLength: z.nullable(z.int()).optional(),
|
|
36
|
-
output: z.array(
|
|
19
|
+
output: z.array(ShellCallOutputContent$outboundSchema),
|
|
37
20
|
status: z.nullable(ToolCallStatus$outboundSchema).optional(),
|
|
38
21
|
type: ShellCallOutputItemType$outboundSchema,
|
|
39
22
|
}).transform((v) => {
|
package/esm/sdk/workspaces.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare class Workspaces extends ClientSDK {
|
|
|
23
23
|
* Delete a workspace
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
|
-
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out.
|
|
26
|
+
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
27
27
|
*/
|
|
28
28
|
delete(request: operations.DeleteWorkspaceRequest, options?: RequestOptions): Promise<models.DeleteWorkspaceResponse>;
|
|
29
29
|
/**
|
package/esm/sdk/workspaces.js
CHANGED
|
@@ -40,7 +40,7 @@ export class Workspaces extends ClientSDK {
|
|
|
40
40
|
* Delete a workspace
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
|
-
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out.
|
|
43
|
+
* Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is not yet generally available; callers not enabled for it receive a 403 while the capability rolls out. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
44
44
|
*/
|
|
45
45
|
async delete(request, options) {
|
|
46
46
|
return unwrapAsync(workspacesDelete(this, request, options));
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.40",
|
|
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",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
76
|
+
"typecheck": "tsc --noEmit",
|
|
77
|
+
"typecheck:transit": "exit 0",
|
|
78
78
|
"test": "vitest --run --project unit",
|
|
79
79
|
"test:e2e": "vitest --run --project e2e",
|
|
80
80
|
"test:transit": "exit 0",
|
|
81
|
-
"typecheck:transit": "exit 0",
|
|
82
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
83
81
|
"test:watch": "vitest --watch --project unit",
|
|
84
|
-
"
|
|
82
|
+
"compile": "tsc",
|
|
83
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
84
|
+
"prepare": "npm run build"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|