@openrouter/sdk 1.2.55 → 1.2.56
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/containersDownloadContainerFileContent.d.ts +1 -1
- package/esm/funcs/containersDownloadContainerFileContent.js +4 -4
- package/esm/funcs/containersGetContainerFile.d.ts +1 -1
- package/esm/funcs/containersGetContainerFile.js +4 -4
- package/esm/funcs/containersListContainerFiles.d.ts +1 -1
- package/esm/funcs/containersListContainerFiles.js +3 -3
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/chatcontentfile.d.ts +8 -8
- package/esm/models/chatcontentfile.js +8 -8
- package/esm/models/containerfile.d.ts +2 -2
- package/esm/models/containerreferenceenvironment.d.ts +2 -2
- package/esm/models/messagesbashtoolresultblock.d.ts +37 -0
- package/esm/models/messagesbashtoolresultblock.js +29 -0
- package/esm/models/messagesshelltoolresultblock.d.ts +37 -0
- package/esm/models/messagesshelltoolresultblock.js +29 -0
- package/esm/models/operations/downloadcontainerfilecontent.d.ts +3 -3
- package/esm/models/operations/downloadcontainerfilecontent.js +2 -2
- package/esm/models/operations/getcontainerfile.d.ts +3 -3
- package/esm/models/operations/getcontainerfile.js +2 -2
- package/esm/models/operations/listcontainerfiles.d.ts +3 -3
- package/esm/models/operations/listcontainerfiles.js +2 -2
- package/esm/models/outputbashservertoolitem.d.ts +46 -5
- package/esm/models/outputbashservertoolitem.js +58 -5
- package/esm/models/outputshellcalloutputitem.d.ts +26 -0
- package/esm/models/outputshellcalloutputitem.js +28 -0
- package/esm/models/outputshellservertoolitem.d.ts +46 -5
- package/esm/models/outputshellservertoolitem.js +58 -5
- package/esm/sdk/containers.d.ts +3 -3
- package/esm/sdk/containers.js +3 -3
- package/jsr.json +1 -1
- package/package.json +4 -4
|
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
|
|
|
12
12
|
* Download container file content
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Streams the raw bytes of a file
|
|
15
|
+
* Streams the raw bytes of a file in a container.
|
|
16
16
|
*/
|
|
17
17
|
export declare function containersDownloadContainerFileContent(client: OpenRouterCore, request: operations.DownloadContainerFileContentRequest, options?: RequestOptions): APIPromise<Result<ReadableStream<Uint8Array>, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
18
|
//# sourceMappingURL=containersDownloadContainerFileContent.d.ts.map
|
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* Download container file content
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Streams the raw bytes of a file
|
|
20
|
+
* Streams the raw bytes of a file in a container.
|
|
21
21
|
*/
|
|
22
22
|
export function containersDownloadContainerFileContent(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
@@ -30,16 +30,16 @@ async function $do(client, request, options) {
|
|
|
30
30
|
const payload = parsed.value;
|
|
31
31
|
const body = null;
|
|
32
32
|
const pathParams = {
|
|
33
|
-
|
|
33
|
+
container_id: encodeSimple("container_id", payload.container_id, {
|
|
34
34
|
explode: false,
|
|
35
35
|
charEncoding: "percent",
|
|
36
36
|
}),
|
|
37
|
-
|
|
37
|
+
file_id: encodeSimple("file_id", payload.file_id, {
|
|
38
38
|
explode: false,
|
|
39
39
|
charEncoding: "percent",
|
|
40
40
|
}),
|
|
41
41
|
};
|
|
42
|
-
const path = pathToFunc("/containers/{
|
|
42
|
+
const path = pathToFunc("/containers/{container_id}/files/{file_id}/content")(pathParams);
|
|
43
43
|
const headers = new Headers(compactMap({
|
|
44
44
|
Accept: "application/octet-stream",
|
|
45
45
|
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Retrieve a container file
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Returns the metadata of a single file
|
|
16
|
+
* Returns the metadata of a single file in a container.
|
|
17
17
|
*/
|
|
18
18
|
export declare function containersGetContainerFile(client: OpenRouterCore, request: operations.GetContainerFileRequest, options?: RequestOptions): APIPromise<Result<models.ContainerFile, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=containersGetContainerFile.d.ts.map
|
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* Retrieve a container file
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Returns the metadata of a single file
|
|
20
|
+
* Returns the metadata of a single file in a container.
|
|
21
21
|
*/
|
|
22
22
|
export function containersGetContainerFile(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
@@ -30,16 +30,16 @@ async function $do(client, request, options) {
|
|
|
30
30
|
const payload = parsed.value;
|
|
31
31
|
const body = null;
|
|
32
32
|
const pathParams = {
|
|
33
|
-
|
|
33
|
+
container_id: encodeSimple("container_id", payload.container_id, {
|
|
34
34
|
explode: false,
|
|
35
35
|
charEncoding: "percent",
|
|
36
36
|
}),
|
|
37
|
-
|
|
37
|
+
file_id: encodeSimple("file_id", payload.file_id, {
|
|
38
38
|
explode: false,
|
|
39
39
|
charEncoding: "percent",
|
|
40
40
|
}),
|
|
41
41
|
};
|
|
42
|
-
const path = pathToFunc("/containers/{
|
|
42
|
+
const path = pathToFunc("/containers/{container_id}/files/{file_id}")(pathParams);
|
|
43
43
|
const headers = new Headers(compactMap({
|
|
44
44
|
Accept: "application/json",
|
|
45
45
|
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* List container files
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Lists the files
|
|
16
|
+
* Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.
|
|
17
17
|
*/
|
|
18
18
|
export declare function containersListContainerFiles(client: OpenRouterCore, request: operations.ListContainerFilesRequest, options?: RequestOptions): APIPromise<Result<models.ContainerFileListResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=containersListContainerFiles.d.ts.map
|
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* List container files
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Lists the files
|
|
20
|
+
* Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.
|
|
21
21
|
*/
|
|
22
22
|
export function containersListContainerFiles(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
@@ -30,12 +30,12 @@ async function $do(client, request, options) {
|
|
|
30
30
|
const payload = parsed.value;
|
|
31
31
|
const body = null;
|
|
32
32
|
const pathParams = {
|
|
33
|
-
|
|
33
|
+
container_id: encodeSimple("container_id", payload.container_id, {
|
|
34
34
|
explode: false,
|
|
35
35
|
charEncoding: "percent",
|
|
36
36
|
}),
|
|
37
37
|
};
|
|
38
|
-
const path = pathToFunc("/containers/{
|
|
38
|
+
const path = pathToFunc("/containers/{container_id}/files")(pathParams);
|
|
39
39
|
const query = encodeFormQuery({
|
|
40
40
|
"after": payload.after,
|
|
41
41
|
"limit": payload.limit,
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -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.2.
|
|
53
|
+
readonly sdkVersion: "1.2.56";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.56 2.914.0 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.2.
|
|
32
|
+
sdkVersion: "1.2.56",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.56 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
-
export type
|
|
4
|
+
export type ChatContentFileFile = {
|
|
5
5
|
/**
|
|
6
6
|
* File content as base64 data URL or URL
|
|
7
7
|
*/
|
|
@@ -19,26 +19,26 @@ export type FileT = {
|
|
|
19
19
|
* File content part for document processing
|
|
20
20
|
*/
|
|
21
21
|
export type ChatContentFile = {
|
|
22
|
-
file:
|
|
22
|
+
file: ChatContentFileFile;
|
|
23
23
|
type: "file";
|
|
24
24
|
};
|
|
25
25
|
/** @internal */
|
|
26
|
-
export declare const
|
|
26
|
+
export declare const ChatContentFileFile$inboundSchema: z.ZodType<ChatContentFileFile, unknown>;
|
|
27
27
|
/** @internal */
|
|
28
|
-
export type
|
|
28
|
+
export type ChatContentFileFile$Outbound = {
|
|
29
29
|
file_data?: string | undefined;
|
|
30
30
|
file_id?: string | undefined;
|
|
31
31
|
filename?: string | undefined;
|
|
32
32
|
};
|
|
33
33
|
/** @internal */
|
|
34
|
-
export declare const
|
|
35
|
-
export declare function
|
|
36
|
-
export declare function
|
|
34
|
+
export declare const ChatContentFileFile$outboundSchema: z.ZodType<ChatContentFileFile$Outbound, ChatContentFileFile>;
|
|
35
|
+
export declare function chatContentFileFileToJSON(chatContentFileFile: ChatContentFileFile): string;
|
|
36
|
+
export declare function chatContentFileFileFromJSON(jsonString: string): SafeParseResult<ChatContentFileFile, SDKValidationError>;
|
|
37
37
|
/** @internal */
|
|
38
38
|
export declare const ChatContentFile$inboundSchema: z.ZodType<ChatContentFile, unknown>;
|
|
39
39
|
/** @internal */
|
|
40
40
|
export type ChatContentFile$Outbound = {
|
|
41
|
-
file:
|
|
41
|
+
file: ChatContentFileFile$Outbound;
|
|
42
42
|
type: "file";
|
|
43
43
|
};
|
|
44
44
|
/** @internal */
|
|
@@ -6,7 +6,7 @@ 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
8
|
/** @internal */
|
|
9
|
-
export const
|
|
9
|
+
export const ChatContentFileFile$inboundSchema = z.object({
|
|
10
10
|
file_data: z.string().optional(),
|
|
11
11
|
file_id: z.string().optional(),
|
|
12
12
|
filename: z.string().optional(),
|
|
@@ -17,7 +17,7 @@ export const FileT$inboundSchema = z.object({
|
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
19
|
/** @internal */
|
|
20
|
-
export const
|
|
20
|
+
export const ChatContentFileFile$outboundSchema = z.object({
|
|
21
21
|
fileData: z.string().optional(),
|
|
22
22
|
fileId: z.string().optional(),
|
|
23
23
|
filename: z.string().optional(),
|
|
@@ -27,20 +27,20 @@ export const FileT$outboundSchema = z.object({
|
|
|
27
27
|
fileId: "file_id",
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
|
-
export function
|
|
31
|
-
return JSON.stringify(
|
|
30
|
+
export function chatContentFileFileToJSON(chatContentFileFile) {
|
|
31
|
+
return JSON.stringify(ChatContentFileFile$outboundSchema.parse(chatContentFileFile));
|
|
32
32
|
}
|
|
33
|
-
export function
|
|
34
|
-
return safeParse(jsonString, (x) =>
|
|
33
|
+
export function chatContentFileFileFromJSON(jsonString) {
|
|
34
|
+
return safeParse(jsonString, (x) => ChatContentFileFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatContentFileFile' from JSON`);
|
|
35
35
|
}
|
|
36
36
|
/** @internal */
|
|
37
37
|
export const ChatContentFile$inboundSchema = z.object({
|
|
38
|
-
file: z.lazy(() =>
|
|
38
|
+
file: z.lazy(() => ChatContentFileFile$inboundSchema),
|
|
39
39
|
type: z.literal("file"),
|
|
40
40
|
});
|
|
41
41
|
/** @internal */
|
|
42
42
|
export const ChatContentFile$outboundSchema = z.object({
|
|
43
|
-
file: z.lazy(() =>
|
|
43
|
+
file: z.lazy(() => ChatContentFileFile$outboundSchema),
|
|
44
44
|
type: z.literal("file"),
|
|
45
45
|
});
|
|
46
46
|
export function chatContentFileToJSON(chatContentFile) {
|
|
@@ -22,7 +22,7 @@ export type ContainerFile = {
|
|
|
22
22
|
*/
|
|
23
23
|
bytes: number;
|
|
24
24
|
/**
|
|
25
|
-
* The container the file belongs to — echoes the `
|
|
25
|
+
* The container the file belongs to — echoes the `container_id` path parameter (OpenAI field name).
|
|
26
26
|
*/
|
|
27
27
|
containerId: string;
|
|
28
28
|
/**
|
|
@@ -35,7 +35,7 @@ export type ContainerFile = {
|
|
|
35
35
|
id: string;
|
|
36
36
|
object: ContainerFileObject;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Container-relative file path.
|
|
39
39
|
*/
|
|
40
40
|
path: string;
|
|
41
41
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
/**
|
|
3
|
-
* Reference to a previously
|
|
3
|
+
* Reference to a container by its canonical id — a previously returned container_id or a fresh name to create a persistent container.
|
|
4
4
|
*/
|
|
5
5
|
export type ContainerReferenceEnvironment = {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Canonical container id to reuse (max 40 characters, letters/digits/underscores/hyphens). Any container_id previously returned by a bash or shell tool result works here and reattaches to the same container and files — including session-derived ids (sess_...) and generation-derived ids (gen_...). Note that a session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id you sent. Using the same container_id from both the bash and shell tools shares the same files, with last-write-wins when both flush concurrently. A fresh name creates a new persistent container. Containers are always scoped to your account and workspace.
|
|
8
8
|
*/
|
|
9
9
|
containerId: string;
|
|
10
10
|
type: "container_reference";
|
|
@@ -1,19 +1,56 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
export declare const MessagesBashToolResultBlockTypeContainerFileCitation: {
|
|
4
|
+
readonly ContainerFileCitation: "container_file_citation";
|
|
5
|
+
};
|
|
6
|
+
export type MessagesBashToolResultBlockTypeContainerFileCitation = ClosedEnum<typeof MessagesBashToolResultBlockTypeContainerFileCitation>;
|
|
7
|
+
export type MessagesBashToolResultBlockFile = {
|
|
8
|
+
containerId: string;
|
|
9
|
+
endIndex: number;
|
|
10
|
+
fileId: string;
|
|
11
|
+
filename: string;
|
|
12
|
+
startIndex: number;
|
|
13
|
+
type: MessagesBashToolResultBlockTypeContainerFileCitation;
|
|
14
|
+
};
|
|
2
15
|
/**
|
|
3
16
|
* Output of a sandbox-executed `openrouter:bash` call from a prior assistant turn. Accepted on replay and dropped before the provider request — Anthropic has no equivalent block.
|
|
4
17
|
*/
|
|
5
18
|
export type MessagesBashToolResultBlock = {
|
|
19
|
+
/**
|
|
20
|
+
* The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.
|
|
21
|
+
*/
|
|
22
|
+
containerId?: string | undefined;
|
|
6
23
|
content: {
|
|
7
24
|
[k: string]: any;
|
|
8
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.
|
|
28
|
+
*/
|
|
29
|
+
files?: Array<MessagesBashToolResultBlockFile> | undefined;
|
|
9
30
|
toolUseId: string;
|
|
10
31
|
type: "openrouter_bash_tool_result";
|
|
11
32
|
};
|
|
12
33
|
/** @internal */
|
|
34
|
+
export declare const MessagesBashToolResultBlockTypeContainerFileCitation$outboundSchema: z.ZodEnum<typeof MessagesBashToolResultBlockTypeContainerFileCitation>;
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type MessagesBashToolResultBlockFile$Outbound = {
|
|
37
|
+
container_id: string;
|
|
38
|
+
end_index: number;
|
|
39
|
+
file_id: string;
|
|
40
|
+
filename: string;
|
|
41
|
+
start_index: number;
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
/** @internal */
|
|
45
|
+
export declare const MessagesBashToolResultBlockFile$outboundSchema: z.ZodType<MessagesBashToolResultBlockFile$Outbound, MessagesBashToolResultBlockFile>;
|
|
46
|
+
export declare function messagesBashToolResultBlockFileToJSON(messagesBashToolResultBlockFile: MessagesBashToolResultBlockFile): string;
|
|
47
|
+
/** @internal */
|
|
13
48
|
export type MessagesBashToolResultBlock$Outbound = {
|
|
49
|
+
container_id?: string | undefined;
|
|
14
50
|
content: {
|
|
15
51
|
[k: string]: any;
|
|
16
52
|
};
|
|
53
|
+
files?: Array<MessagesBashToolResultBlockFile$Outbound> | undefined;
|
|
17
54
|
tool_use_id: string;
|
|
18
55
|
type: "openrouter_bash_tool_result";
|
|
19
56
|
};
|
|
@@ -4,13 +4,42 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
export const MessagesBashToolResultBlockTypeContainerFileCitation = {
|
|
8
|
+
ContainerFileCitation: "container_file_citation",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const MessagesBashToolResultBlockTypeContainerFileCitation$outboundSchema = z
|
|
12
|
+
.enum(MessagesBashToolResultBlockTypeContainerFileCitation);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const MessagesBashToolResultBlockFile$outboundSchema = z.object({
|
|
15
|
+
containerId: z.string(),
|
|
16
|
+
endIndex: z.int(),
|
|
17
|
+
fileId: z.string(),
|
|
18
|
+
filename: z.string(),
|
|
19
|
+
startIndex: z.int(),
|
|
20
|
+
type: MessagesBashToolResultBlockTypeContainerFileCitation$outboundSchema,
|
|
21
|
+
}).transform((v) => {
|
|
22
|
+
return remap$(v, {
|
|
23
|
+
containerId: "container_id",
|
|
24
|
+
endIndex: "end_index",
|
|
25
|
+
fileId: "file_id",
|
|
26
|
+
startIndex: "start_index",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
export function messagesBashToolResultBlockFileToJSON(messagesBashToolResultBlockFile) {
|
|
30
|
+
return JSON.stringify(MessagesBashToolResultBlockFile$outboundSchema.parse(messagesBashToolResultBlockFile));
|
|
31
|
+
}
|
|
7
32
|
/** @internal */
|
|
8
33
|
export const MessagesBashToolResultBlock$outboundSchema = z.object({
|
|
34
|
+
containerId: z.string().optional(),
|
|
9
35
|
content: z.record(z.string(), z.any()),
|
|
36
|
+
files: z.array(z.lazy(() => MessagesBashToolResultBlockFile$outboundSchema))
|
|
37
|
+
.optional(),
|
|
10
38
|
toolUseId: z.string(),
|
|
11
39
|
type: z.literal("openrouter_bash_tool_result"),
|
|
12
40
|
}).transform((v) => {
|
|
13
41
|
return remap$(v, {
|
|
42
|
+
containerId: "container_id",
|
|
14
43
|
toolUseId: "tool_use_id",
|
|
15
44
|
});
|
|
16
45
|
});
|
|
@@ -1,19 +1,56 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
export declare const MessagesShellToolResultBlockTypeContainerFileCitation: {
|
|
4
|
+
readonly ContainerFileCitation: "container_file_citation";
|
|
5
|
+
};
|
|
6
|
+
export type MessagesShellToolResultBlockTypeContainerFileCitation = ClosedEnum<typeof MessagesShellToolResultBlockTypeContainerFileCitation>;
|
|
7
|
+
export type MessagesShellToolResultBlockFile = {
|
|
8
|
+
containerId: string;
|
|
9
|
+
endIndex: number;
|
|
10
|
+
fileId: string;
|
|
11
|
+
filename: string;
|
|
12
|
+
startIndex: number;
|
|
13
|
+
type: MessagesShellToolResultBlockTypeContainerFileCitation;
|
|
14
|
+
};
|
|
2
15
|
/**
|
|
3
16
|
* Output of an `openrouter:shell` call from a prior assistant turn. Accepted on replay and dropped before the provider request — Anthropic has no equivalent block.
|
|
4
17
|
*/
|
|
5
18
|
export type MessagesShellToolResultBlock = {
|
|
19
|
+
/**
|
|
20
|
+
* The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.
|
|
21
|
+
*/
|
|
22
|
+
containerId?: string | undefined;
|
|
6
23
|
content: {
|
|
7
24
|
[k: string]: any;
|
|
8
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.
|
|
28
|
+
*/
|
|
29
|
+
files?: Array<MessagesShellToolResultBlockFile> | undefined;
|
|
9
30
|
toolUseId: string;
|
|
10
31
|
type: "openrouter_shell_tool_result";
|
|
11
32
|
};
|
|
12
33
|
/** @internal */
|
|
34
|
+
export declare const MessagesShellToolResultBlockTypeContainerFileCitation$outboundSchema: z.ZodEnum<typeof MessagesShellToolResultBlockTypeContainerFileCitation>;
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type MessagesShellToolResultBlockFile$Outbound = {
|
|
37
|
+
container_id: string;
|
|
38
|
+
end_index: number;
|
|
39
|
+
file_id: string;
|
|
40
|
+
filename: string;
|
|
41
|
+
start_index: number;
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
/** @internal */
|
|
45
|
+
export declare const MessagesShellToolResultBlockFile$outboundSchema: z.ZodType<MessagesShellToolResultBlockFile$Outbound, MessagesShellToolResultBlockFile>;
|
|
46
|
+
export declare function messagesShellToolResultBlockFileToJSON(messagesShellToolResultBlockFile: MessagesShellToolResultBlockFile): string;
|
|
47
|
+
/** @internal */
|
|
13
48
|
export type MessagesShellToolResultBlock$Outbound = {
|
|
49
|
+
container_id?: string | undefined;
|
|
14
50
|
content: {
|
|
15
51
|
[k: string]: any;
|
|
16
52
|
};
|
|
53
|
+
files?: Array<MessagesShellToolResultBlockFile$Outbound> | undefined;
|
|
17
54
|
tool_use_id: string;
|
|
18
55
|
type: "openrouter_shell_tool_result";
|
|
19
56
|
};
|
|
@@ -4,13 +4,42 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
export const MessagesShellToolResultBlockTypeContainerFileCitation = {
|
|
8
|
+
ContainerFileCitation: "container_file_citation",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const MessagesShellToolResultBlockTypeContainerFileCitation$outboundSchema = z
|
|
12
|
+
.enum(MessagesShellToolResultBlockTypeContainerFileCitation);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const MessagesShellToolResultBlockFile$outboundSchema = z.object({
|
|
15
|
+
containerId: z.string(),
|
|
16
|
+
endIndex: z.int(),
|
|
17
|
+
fileId: z.string(),
|
|
18
|
+
filename: z.string(),
|
|
19
|
+
startIndex: z.int(),
|
|
20
|
+
type: MessagesShellToolResultBlockTypeContainerFileCitation$outboundSchema,
|
|
21
|
+
}).transform((v) => {
|
|
22
|
+
return remap$(v, {
|
|
23
|
+
containerId: "container_id",
|
|
24
|
+
endIndex: "end_index",
|
|
25
|
+
fileId: "file_id",
|
|
26
|
+
startIndex: "start_index",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
export function messagesShellToolResultBlockFileToJSON(messagesShellToolResultBlockFile) {
|
|
30
|
+
return JSON.stringify(MessagesShellToolResultBlockFile$outboundSchema.parse(messagesShellToolResultBlockFile));
|
|
31
|
+
}
|
|
7
32
|
/** @internal */
|
|
8
33
|
export const MessagesShellToolResultBlock$outboundSchema = z.object({
|
|
34
|
+
containerId: z.string().optional(),
|
|
9
35
|
content: z.record(z.string(), z.any()),
|
|
36
|
+
files: z.array(z.lazy(() => MessagesShellToolResultBlockFile$outboundSchema))
|
|
37
|
+
.optional(),
|
|
10
38
|
toolUseId: z.string(),
|
|
11
39
|
type: z.literal("openrouter_shell_tool_result"),
|
|
12
40
|
}).transform((v) => {
|
|
13
41
|
return remap$(v, {
|
|
42
|
+
containerId: "container_id",
|
|
14
43
|
toolUseId: "tool_use_id",
|
|
15
44
|
});
|
|
16
45
|
});
|
|
@@ -41,9 +41,9 @@ export type DownloadContainerFileContentRequest = {
|
|
|
41
41
|
*/
|
|
42
42
|
appCategories?: string | undefined;
|
|
43
43
|
/**
|
|
44
|
-
* The
|
|
44
|
+
* The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r<nonce>`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
containerId: string;
|
|
47
47
|
/**
|
|
48
48
|
* Container file id (`cfile_` + base64url of the file path).
|
|
49
49
|
*/
|
|
@@ -54,7 +54,7 @@ export type DownloadContainerFileContentRequest$Outbound = {
|
|
|
54
54
|
"HTTP-Referer"?: string | undefined;
|
|
55
55
|
appTitle?: string | undefined;
|
|
56
56
|
appCategories?: string | undefined;
|
|
57
|
-
|
|
57
|
+
container_id: string;
|
|
58
58
|
file_id: string;
|
|
59
59
|
};
|
|
60
60
|
/** @internal */
|
|
@@ -9,12 +9,12 @@ export const DownloadContainerFileContentRequest$outboundSchema = z.object({
|
|
|
9
9
|
httpReferer: z.string().optional(),
|
|
10
10
|
appTitle: z.string().optional(),
|
|
11
11
|
appCategories: z.string().optional(),
|
|
12
|
-
|
|
12
|
+
containerId: z.string(),
|
|
13
13
|
fileId: z.string(),
|
|
14
14
|
}).transform((v) => {
|
|
15
15
|
return remap$(v, {
|
|
16
16
|
httpReferer: "HTTP-Referer",
|
|
17
|
-
|
|
17
|
+
containerId: "container_id",
|
|
18
18
|
fileId: "file_id",
|
|
19
19
|
});
|
|
20
20
|
});
|
|
@@ -41,9 +41,9 @@ export type GetContainerFileRequest = {
|
|
|
41
41
|
*/
|
|
42
42
|
appCategories?: string | undefined;
|
|
43
43
|
/**
|
|
44
|
-
* The
|
|
44
|
+
* The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r<nonce>`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
containerId: string;
|
|
47
47
|
/**
|
|
48
48
|
* Container file id (`cfile_` + base64url of the file path).
|
|
49
49
|
*/
|
|
@@ -54,7 +54,7 @@ export type GetContainerFileRequest$Outbound = {
|
|
|
54
54
|
"HTTP-Referer"?: string | undefined;
|
|
55
55
|
appTitle?: string | undefined;
|
|
56
56
|
appCategories?: string | undefined;
|
|
57
|
-
|
|
57
|
+
container_id: string;
|
|
58
58
|
file_id: string;
|
|
59
59
|
};
|
|
60
60
|
/** @internal */
|
|
@@ -9,12 +9,12 @@ export const GetContainerFileRequest$outboundSchema = z.object({
|
|
|
9
9
|
httpReferer: z.string().optional(),
|
|
10
10
|
appTitle: z.string().optional(),
|
|
11
11
|
appCategories: z.string().optional(),
|
|
12
|
-
|
|
12
|
+
containerId: z.string(),
|
|
13
13
|
fileId: z.string(),
|
|
14
14
|
}).transform((v) => {
|
|
15
15
|
return remap$(v, {
|
|
16
16
|
httpReferer: "HTTP-Referer",
|
|
17
|
-
|
|
17
|
+
containerId: "container_id",
|
|
18
18
|
fileId: "file_id",
|
|
19
19
|
});
|
|
20
20
|
});
|
|
@@ -41,9 +41,9 @@ export type ListContainerFilesRequest = {
|
|
|
41
41
|
*/
|
|
42
42
|
appCategories?: string | undefined;
|
|
43
43
|
/**
|
|
44
|
-
* The
|
|
44
|
+
* The canonical container id, exactly as returned in a bash/shell tool result — a restarted session has its own `-r<nonce>`-suffixed id. A session-derived id is always `sess_` + the sanitized session key, which is not necessarily the raw session id that was sent.
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
containerId: string;
|
|
47
47
|
/**
|
|
48
48
|
* Maximum number of files to return (1-1000). Defaults to 100 when absent.
|
|
49
49
|
*/
|
|
@@ -58,7 +58,7 @@ export type ListContainerFilesRequest$Outbound = {
|
|
|
58
58
|
"HTTP-Referer"?: string | undefined;
|
|
59
59
|
appTitle?: string | undefined;
|
|
60
60
|
appCategories?: string | undefined;
|
|
61
|
-
|
|
61
|
+
container_id: string;
|
|
62
62
|
limit: number;
|
|
63
63
|
after?: string | undefined;
|
|
64
64
|
};
|
|
@@ -9,13 +9,13 @@ export const ListContainerFilesRequest$outboundSchema = z.object({
|
|
|
9
9
|
httpReferer: z.string().optional(),
|
|
10
10
|
appTitle: z.string().optional(),
|
|
11
11
|
appCategories: z.string().optional(),
|
|
12
|
-
|
|
12
|
+
containerId: z.string(),
|
|
13
13
|
limit: z.int().default(100),
|
|
14
14
|
after: z.string().optional(),
|
|
15
15
|
}).transform((v) => {
|
|
16
16
|
return remap$(v, {
|
|
17
17
|
httpReferer: "HTTP-Referer",
|
|
18
|
-
|
|
18
|
+
containerId: "container_id",
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
21
|
export function listContainerFilesRequestToJSON(listContainerFilesRequest) {
|
|
@@ -3,10 +3,22 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const OutputBashServerToolItemTypeContainerFileCitation: {
|
|
7
|
+
readonly ContainerFileCitation: "container_file_citation";
|
|
8
|
+
};
|
|
9
|
+
export type OutputBashServerToolItemTypeContainerFileCitation = ClosedEnum<typeof OutputBashServerToolItemTypeContainerFileCitation>;
|
|
10
|
+
export type OutputBashServerToolItemFile = {
|
|
11
|
+
containerId: string;
|
|
12
|
+
endIndex: number;
|
|
13
|
+
fileId: string;
|
|
14
|
+
filename: string;
|
|
15
|
+
startIndex: number;
|
|
16
|
+
type: OutputBashServerToolItemTypeContainerFileCitation;
|
|
17
|
+
};
|
|
18
|
+
export declare const OutputBashServerToolItemTypeOpenrouterBash: {
|
|
7
19
|
readonly OpenrouterBash: "openrouter:bash";
|
|
8
20
|
};
|
|
9
|
-
export type
|
|
21
|
+
export type OutputBashServerToolItemTypeOpenrouterBash = ClosedEnum<typeof OutputBashServerToolItemTypeOpenrouterBash>;
|
|
10
22
|
/**
|
|
11
23
|
* An openrouter:bash server tool output item
|
|
12
24
|
*/
|
|
@@ -20,17 +32,44 @@ export type OutputBashServerToolItem = {
|
|
|
20
32
|
*/
|
|
21
33
|
callId?: string | null | undefined;
|
|
22
34
|
command?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.
|
|
37
|
+
*/
|
|
38
|
+
containerId?: string | undefined;
|
|
23
39
|
exitCode?: number | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.
|
|
42
|
+
*/
|
|
43
|
+
files?: Array<OutputBashServerToolItemFile> | undefined;
|
|
24
44
|
id?: string | undefined;
|
|
25
45
|
status: ToolCallStatus;
|
|
26
46
|
stderr?: string | undefined;
|
|
27
47
|
stdout?: string | undefined;
|
|
28
|
-
type:
|
|
48
|
+
type: OutputBashServerToolItemTypeOpenrouterBash;
|
|
29
49
|
};
|
|
30
50
|
/** @internal */
|
|
31
|
-
export declare const
|
|
51
|
+
export declare const OutputBashServerToolItemTypeContainerFileCitation$inboundSchema: z.ZodEnum<typeof OutputBashServerToolItemTypeContainerFileCitation>;
|
|
52
|
+
/** @internal */
|
|
53
|
+
export declare const OutputBashServerToolItemTypeContainerFileCitation$outboundSchema: z.ZodEnum<typeof OutputBashServerToolItemTypeContainerFileCitation>;
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare const OutputBashServerToolItemFile$inboundSchema: z.ZodType<OutputBashServerToolItemFile, unknown>;
|
|
56
|
+
/** @internal */
|
|
57
|
+
export type OutputBashServerToolItemFile$Outbound = {
|
|
58
|
+
container_id: string;
|
|
59
|
+
end_index: number;
|
|
60
|
+
file_id: string;
|
|
61
|
+
filename: string;
|
|
62
|
+
start_index: number;
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
65
|
+
/** @internal */
|
|
66
|
+
export declare const OutputBashServerToolItemFile$outboundSchema: z.ZodType<OutputBashServerToolItemFile$Outbound, OutputBashServerToolItemFile>;
|
|
67
|
+
export declare function outputBashServerToolItemFileToJSON(outputBashServerToolItemFile: OutputBashServerToolItemFile): string;
|
|
68
|
+
export declare function outputBashServerToolItemFileFromJSON(jsonString: string): SafeParseResult<OutputBashServerToolItemFile, SDKValidationError>;
|
|
69
|
+
/** @internal */
|
|
70
|
+
export declare const OutputBashServerToolItemTypeOpenrouterBash$inboundSchema: z.ZodEnum<typeof OutputBashServerToolItemTypeOpenrouterBash>;
|
|
32
71
|
/** @internal */
|
|
33
|
-
export declare const
|
|
72
|
+
export declare const OutputBashServerToolItemTypeOpenrouterBash$outboundSchema: z.ZodEnum<typeof OutputBashServerToolItemTypeOpenrouterBash>;
|
|
34
73
|
/** @internal */
|
|
35
74
|
export declare const OutputBashServerToolItem$inboundSchema: z.ZodType<OutputBashServerToolItem, unknown>;
|
|
36
75
|
/** @internal */
|
|
@@ -38,7 +77,9 @@ export type OutputBashServerToolItem$Outbound = {
|
|
|
38
77
|
arguments?: string | null | undefined;
|
|
39
78
|
call_id?: string | null | undefined;
|
|
40
79
|
command?: string | undefined;
|
|
80
|
+
container_id?: string | undefined;
|
|
41
81
|
exitCode?: number | undefined;
|
|
82
|
+
files?: Array<OutputBashServerToolItemFile$Outbound> | undefined;
|
|
42
83
|
id?: string | undefined;
|
|
43
84
|
status: string;
|
|
44
85
|
stderr?: string | undefined;
|
|
@@ -6,27 +6,76 @@ 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
8
|
import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
9
|
-
export const
|
|
9
|
+
export const OutputBashServerToolItemTypeContainerFileCitation = {
|
|
10
|
+
ContainerFileCitation: "container_file_citation",
|
|
11
|
+
};
|
|
12
|
+
export const OutputBashServerToolItemTypeOpenrouterBash = {
|
|
10
13
|
OpenrouterBash: "openrouter:bash",
|
|
11
14
|
};
|
|
12
15
|
/** @internal */
|
|
13
|
-
export const
|
|
16
|
+
export const OutputBashServerToolItemTypeContainerFileCitation$inboundSchema = z.enum(OutputBashServerToolItemTypeContainerFileCitation);
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const OutputBashServerToolItemTypeContainerFileCitation$outboundSchema = OutputBashServerToolItemTypeContainerFileCitation$inboundSchema;
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const OutputBashServerToolItemFile$inboundSchema = z.object({
|
|
21
|
+
container_id: z.string(),
|
|
22
|
+
end_index: z.int(),
|
|
23
|
+
file_id: z.string(),
|
|
24
|
+
filename: z.string(),
|
|
25
|
+
start_index: z.int(),
|
|
26
|
+
type: OutputBashServerToolItemTypeContainerFileCitation$inboundSchema,
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
"container_id": "containerId",
|
|
30
|
+
"end_index": "endIndex",
|
|
31
|
+
"file_id": "fileId",
|
|
32
|
+
"start_index": "startIndex",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const OutputBashServerToolItemFile$outboundSchema = z.object({
|
|
37
|
+
containerId: z.string(),
|
|
38
|
+
endIndex: z.int(),
|
|
39
|
+
fileId: z.string(),
|
|
40
|
+
filename: z.string(),
|
|
41
|
+
startIndex: z.int(),
|
|
42
|
+
type: OutputBashServerToolItemTypeContainerFileCitation$outboundSchema,
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
containerId: "container_id",
|
|
46
|
+
endIndex: "end_index",
|
|
47
|
+
fileId: "file_id",
|
|
48
|
+
startIndex: "start_index",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
export function outputBashServerToolItemFileToJSON(outputBashServerToolItemFile) {
|
|
52
|
+
return JSON.stringify(OutputBashServerToolItemFile$outboundSchema.parse(outputBashServerToolItemFile));
|
|
53
|
+
}
|
|
54
|
+
export function outputBashServerToolItemFileFromJSON(jsonString) {
|
|
55
|
+
return safeParse(jsonString, (x) => OutputBashServerToolItemFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputBashServerToolItemFile' from JSON`);
|
|
56
|
+
}
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const OutputBashServerToolItemTypeOpenrouterBash$inboundSchema = z.enum(OutputBashServerToolItemTypeOpenrouterBash);
|
|
14
59
|
/** @internal */
|
|
15
|
-
export const
|
|
60
|
+
export const OutputBashServerToolItemTypeOpenrouterBash$outboundSchema = OutputBashServerToolItemTypeOpenrouterBash$inboundSchema;
|
|
16
61
|
/** @internal */
|
|
17
62
|
export const OutputBashServerToolItem$inboundSchema = z.object({
|
|
18
63
|
arguments: z.nullable(z.string()).optional(),
|
|
19
64
|
call_id: z.nullable(z.string()).optional(),
|
|
20
65
|
command: z.string().optional(),
|
|
66
|
+
container_id: z.string().optional(),
|
|
21
67
|
exitCode: z.int().optional(),
|
|
68
|
+
files: z.array(z.lazy(() => OutputBashServerToolItemFile$inboundSchema))
|
|
69
|
+
.optional(),
|
|
22
70
|
id: z.string().optional(),
|
|
23
71
|
status: ToolCallStatus$inboundSchema,
|
|
24
72
|
stderr: z.string().optional(),
|
|
25
73
|
stdout: z.string().optional(),
|
|
26
|
-
type:
|
|
74
|
+
type: OutputBashServerToolItemTypeOpenrouterBash$inboundSchema,
|
|
27
75
|
}).transform((v) => {
|
|
28
76
|
return remap$(v, {
|
|
29
77
|
"call_id": "callId",
|
|
78
|
+
"container_id": "containerId",
|
|
30
79
|
});
|
|
31
80
|
});
|
|
32
81
|
/** @internal */
|
|
@@ -34,15 +83,19 @@ export const OutputBashServerToolItem$outboundSchema = z.object({
|
|
|
34
83
|
arguments: z.nullable(z.string()).optional(),
|
|
35
84
|
callId: z.nullable(z.string()).optional(),
|
|
36
85
|
command: z.string().optional(),
|
|
86
|
+
containerId: z.string().optional(),
|
|
37
87
|
exitCode: z.int().optional(),
|
|
88
|
+
files: z.array(z.lazy(() => OutputBashServerToolItemFile$outboundSchema))
|
|
89
|
+
.optional(),
|
|
38
90
|
id: z.string().optional(),
|
|
39
91
|
status: ToolCallStatus$outboundSchema,
|
|
40
92
|
stderr: z.string().optional(),
|
|
41
93
|
stdout: z.string().optional(),
|
|
42
|
-
type:
|
|
94
|
+
type: OutputBashServerToolItemTypeOpenrouterBash$outboundSchema,
|
|
43
95
|
}).transform((v) => {
|
|
44
96
|
return remap$(v, {
|
|
45
97
|
callId: "call_id",
|
|
98
|
+
containerId: "container_id",
|
|
46
99
|
});
|
|
47
100
|
});
|
|
48
101
|
export function outputBashServerToolItemToJSON(outputBashServerToolItem) {
|
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
5
|
import { ShellCallOutputContent } from "./shellcalloutputcontent.js";
|
|
5
6
|
import { ShellCallStatus } from "./shellcallstatus.js";
|
|
7
|
+
export declare const OutputShellCallOutputItemTypeContainerFileCitation: {
|
|
8
|
+
readonly ContainerFileCitation: "container_file_citation";
|
|
9
|
+
};
|
|
10
|
+
export type OutputShellCallOutputItemTypeContainerFileCitation = ClosedEnum<typeof OutputShellCallOutputItemTypeContainerFileCitation>;
|
|
11
|
+
export type OutputShellCallOutputItemFile = {
|
|
12
|
+
containerId: string;
|
|
13
|
+
endIndex: number;
|
|
14
|
+
fileId: string;
|
|
15
|
+
filename: string;
|
|
16
|
+
startIndex: number;
|
|
17
|
+
type: OutputShellCallOutputItemTypeContainerFileCitation;
|
|
18
|
+
};
|
|
6
19
|
/**
|
|
7
20
|
* A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome.
|
|
8
21
|
*/
|
|
9
22
|
export type OutputShellCallOutputItem = {
|
|
10
23
|
callId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.
|
|
26
|
+
*/
|
|
27
|
+
containerId?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.
|
|
30
|
+
*/
|
|
31
|
+
files?: Array<OutputShellCallOutputItemFile> | undefined;
|
|
11
32
|
id: string;
|
|
12
33
|
maxOutputLength?: number | null | undefined;
|
|
13
34
|
output: Array<ShellCallOutputContent>;
|
|
@@ -18,6 +39,11 @@ export type OutputShellCallOutputItem = {
|
|
|
18
39
|
type: "shell_call_output";
|
|
19
40
|
};
|
|
20
41
|
/** @internal */
|
|
42
|
+
export declare const OutputShellCallOutputItemTypeContainerFileCitation$inboundSchema: z.ZodEnum<typeof OutputShellCallOutputItemTypeContainerFileCitation>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const OutputShellCallOutputItemFile$inboundSchema: z.ZodType<OutputShellCallOutputItemFile, unknown>;
|
|
45
|
+
export declare function outputShellCallOutputItemFileFromJSON(jsonString: string): SafeParseResult<OutputShellCallOutputItemFile, SDKValidationError>;
|
|
46
|
+
/** @internal */
|
|
21
47
|
export declare const OutputShellCallOutputItem$inboundSchema: z.ZodType<OutputShellCallOutputItem, unknown>;
|
|
22
48
|
export declare function outputShellCallOutputItemFromJSON(jsonString: string): SafeParseResult<OutputShellCallOutputItem, SDKValidationError>;
|
|
23
49
|
//# sourceMappingURL=outputshellcalloutputitem.d.ts.map
|
|
@@ -7,9 +7,36 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import { ShellCallOutputContent$inboundSchema, } from "./shellcalloutputcontent.js";
|
|
9
9
|
import { ShellCallStatus$inboundSchema, } from "./shellcallstatus.js";
|
|
10
|
+
export const OutputShellCallOutputItemTypeContainerFileCitation = {
|
|
11
|
+
ContainerFileCitation: "container_file_citation",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const OutputShellCallOutputItemTypeContainerFileCitation$inboundSchema = z.enum(OutputShellCallOutputItemTypeContainerFileCitation);
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const OutputShellCallOutputItemFile$inboundSchema = z.object({
|
|
17
|
+
container_id: z.string(),
|
|
18
|
+
end_index: z.int(),
|
|
19
|
+
file_id: z.string(),
|
|
20
|
+
filename: z.string(),
|
|
21
|
+
start_index: z.int(),
|
|
22
|
+
type: OutputShellCallOutputItemTypeContainerFileCitation$inboundSchema,
|
|
23
|
+
}).transform((v) => {
|
|
24
|
+
return remap$(v, {
|
|
25
|
+
"container_id": "containerId",
|
|
26
|
+
"end_index": "endIndex",
|
|
27
|
+
"file_id": "fileId",
|
|
28
|
+
"start_index": "startIndex",
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
export function outputShellCallOutputItemFileFromJSON(jsonString) {
|
|
32
|
+
return safeParse(jsonString, (x) => OutputShellCallOutputItemFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputShellCallOutputItemFile' from JSON`);
|
|
33
|
+
}
|
|
10
34
|
/** @internal */
|
|
11
35
|
export const OutputShellCallOutputItem$inboundSchema = z.object({
|
|
12
36
|
call_id: z.string(),
|
|
37
|
+
container_id: z.string().optional(),
|
|
38
|
+
files: z.array(z.lazy(() => OutputShellCallOutputItemFile$inboundSchema))
|
|
39
|
+
.optional(),
|
|
13
40
|
id: z.string(),
|
|
14
41
|
max_output_length: z.nullable(z.int()).optional(),
|
|
15
42
|
output: z.array(ShellCallOutputContent$inboundSchema),
|
|
@@ -18,6 +45,7 @@ export const OutputShellCallOutputItem$inboundSchema = z.object({
|
|
|
18
45
|
}).transform((v) => {
|
|
19
46
|
return remap$(v, {
|
|
20
47
|
"call_id": "callId",
|
|
48
|
+
"container_id": "containerId",
|
|
21
49
|
"max_output_length": "maxOutputLength",
|
|
22
50
|
});
|
|
23
51
|
});
|
|
@@ -9,10 +9,22 @@ export type OutputShellServerToolItemAction = {
|
|
|
9
9
|
maxOutputLength?: number | null | undefined;
|
|
10
10
|
timeoutMs?: number | null | undefined;
|
|
11
11
|
};
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const OutputShellServerToolItemTypeContainerFileCitation: {
|
|
13
|
+
readonly ContainerFileCitation: "container_file_citation";
|
|
14
|
+
};
|
|
15
|
+
export type OutputShellServerToolItemTypeContainerFileCitation = ClosedEnum<typeof OutputShellServerToolItemTypeContainerFileCitation>;
|
|
16
|
+
export type OutputShellServerToolItemFile = {
|
|
17
|
+
containerId: string;
|
|
18
|
+
endIndex: number;
|
|
19
|
+
fileId: string;
|
|
20
|
+
filename: string;
|
|
21
|
+
startIndex: number;
|
|
22
|
+
type: OutputShellServerToolItemTypeContainerFileCitation;
|
|
23
|
+
};
|
|
24
|
+
export declare const OutputShellServerToolItemTypeOpenrouterShell: {
|
|
13
25
|
readonly OpenrouterShell: "openrouter:shell";
|
|
14
26
|
};
|
|
15
|
-
export type
|
|
27
|
+
export type OutputShellServerToolItemTypeOpenrouterShell = ClosedEnum<typeof OutputShellServerToolItemTypeOpenrouterShell>;
|
|
16
28
|
/**
|
|
17
29
|
* An openrouter:shell server tool output item
|
|
18
30
|
*/
|
|
@@ -26,10 +38,18 @@ export type OutputShellServerToolItem = {
|
|
|
26
38
|
* The model-generated tool call id from the originating turn.
|
|
27
39
|
*/
|
|
28
40
|
callId?: string | null | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed.
|
|
43
|
+
*/
|
|
44
|
+
containerId?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.
|
|
47
|
+
*/
|
|
48
|
+
files?: Array<OutputShellServerToolItemFile> | undefined;
|
|
29
49
|
id?: string | undefined;
|
|
30
50
|
output?: Array<ShellCallOutputContent> | undefined;
|
|
31
51
|
status: ToolCallStatus;
|
|
32
|
-
type:
|
|
52
|
+
type: OutputShellServerToolItemTypeOpenrouterShell;
|
|
33
53
|
};
|
|
34
54
|
/** @internal */
|
|
35
55
|
export declare const OutputShellServerToolItemAction$inboundSchema: z.ZodType<OutputShellServerToolItemAction, unknown>;
|
|
@@ -44,9 +64,28 @@ export declare const OutputShellServerToolItemAction$outboundSchema: z.ZodType<O
|
|
|
44
64
|
export declare function outputShellServerToolItemActionToJSON(outputShellServerToolItemAction: OutputShellServerToolItemAction): string;
|
|
45
65
|
export declare function outputShellServerToolItemActionFromJSON(jsonString: string): SafeParseResult<OutputShellServerToolItemAction, SDKValidationError>;
|
|
46
66
|
/** @internal */
|
|
47
|
-
export declare const
|
|
67
|
+
export declare const OutputShellServerToolItemTypeContainerFileCitation$inboundSchema: z.ZodEnum<typeof OutputShellServerToolItemTypeContainerFileCitation>;
|
|
68
|
+
/** @internal */
|
|
69
|
+
export declare const OutputShellServerToolItemTypeContainerFileCitation$outboundSchema: z.ZodEnum<typeof OutputShellServerToolItemTypeContainerFileCitation>;
|
|
70
|
+
/** @internal */
|
|
71
|
+
export declare const OutputShellServerToolItemFile$inboundSchema: z.ZodType<OutputShellServerToolItemFile, unknown>;
|
|
72
|
+
/** @internal */
|
|
73
|
+
export type OutputShellServerToolItemFile$Outbound = {
|
|
74
|
+
container_id: string;
|
|
75
|
+
end_index: number;
|
|
76
|
+
file_id: string;
|
|
77
|
+
filename: string;
|
|
78
|
+
start_index: number;
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
/** @internal */
|
|
82
|
+
export declare const OutputShellServerToolItemFile$outboundSchema: z.ZodType<OutputShellServerToolItemFile$Outbound, OutputShellServerToolItemFile>;
|
|
83
|
+
export declare function outputShellServerToolItemFileToJSON(outputShellServerToolItemFile: OutputShellServerToolItemFile): string;
|
|
84
|
+
export declare function outputShellServerToolItemFileFromJSON(jsonString: string): SafeParseResult<OutputShellServerToolItemFile, SDKValidationError>;
|
|
85
|
+
/** @internal */
|
|
86
|
+
export declare const OutputShellServerToolItemTypeOpenrouterShell$inboundSchema: z.ZodEnum<typeof OutputShellServerToolItemTypeOpenrouterShell>;
|
|
48
87
|
/** @internal */
|
|
49
|
-
export declare const
|
|
88
|
+
export declare const OutputShellServerToolItemTypeOpenrouterShell$outboundSchema: z.ZodEnum<typeof OutputShellServerToolItemTypeOpenrouterShell>;
|
|
50
89
|
/** @internal */
|
|
51
90
|
export declare const OutputShellServerToolItem$inboundSchema: z.ZodType<OutputShellServerToolItem, unknown>;
|
|
52
91
|
/** @internal */
|
|
@@ -54,6 +93,8 @@ export type OutputShellServerToolItem$Outbound = {
|
|
|
54
93
|
action?: OutputShellServerToolItemAction$Outbound | undefined;
|
|
55
94
|
arguments?: string | null | undefined;
|
|
56
95
|
call_id?: string | null | undefined;
|
|
96
|
+
container_id?: string | undefined;
|
|
97
|
+
files?: Array<OutputShellServerToolItemFile$Outbound> | undefined;
|
|
57
98
|
id?: string | undefined;
|
|
58
99
|
output?: Array<ShellCallOutputContent$Outbound> | undefined;
|
|
59
100
|
status: string;
|
|
@@ -7,7 +7,10 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import { ShellCallOutputContent$inboundSchema, ShellCallOutputContent$outboundSchema, } from "./shellcalloutputcontent.js";
|
|
9
9
|
import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
10
|
-
export const
|
|
10
|
+
export const OutputShellServerToolItemTypeContainerFileCitation = {
|
|
11
|
+
ContainerFileCitation: "container_file_citation",
|
|
12
|
+
};
|
|
13
|
+
export const OutputShellServerToolItemTypeOpenrouterShell = {
|
|
11
14
|
OpenrouterShell: "openrouter:shell",
|
|
12
15
|
};
|
|
13
16
|
/** @internal */
|
|
@@ -39,22 +42,68 @@ export function outputShellServerToolItemActionFromJSON(jsonString) {
|
|
|
39
42
|
return safeParse(jsonString, (x) => OutputShellServerToolItemAction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputShellServerToolItemAction' from JSON`);
|
|
40
43
|
}
|
|
41
44
|
/** @internal */
|
|
42
|
-
export const
|
|
45
|
+
export const OutputShellServerToolItemTypeContainerFileCitation$inboundSchema = z.enum(OutputShellServerToolItemTypeContainerFileCitation);
|
|
43
46
|
/** @internal */
|
|
44
|
-
export const
|
|
47
|
+
export const OutputShellServerToolItemTypeContainerFileCitation$outboundSchema = OutputShellServerToolItemTypeContainerFileCitation$inboundSchema;
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const OutputShellServerToolItemFile$inboundSchema = z.object({
|
|
50
|
+
container_id: z.string(),
|
|
51
|
+
end_index: z.int(),
|
|
52
|
+
file_id: z.string(),
|
|
53
|
+
filename: z.string(),
|
|
54
|
+
start_index: z.int(),
|
|
55
|
+
type: OutputShellServerToolItemTypeContainerFileCitation$inboundSchema,
|
|
56
|
+
}).transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
"container_id": "containerId",
|
|
59
|
+
"end_index": "endIndex",
|
|
60
|
+
"file_id": "fileId",
|
|
61
|
+
"start_index": "startIndex",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const OutputShellServerToolItemFile$outboundSchema = z.object({
|
|
66
|
+
containerId: z.string(),
|
|
67
|
+
endIndex: z.int(),
|
|
68
|
+
fileId: z.string(),
|
|
69
|
+
filename: z.string(),
|
|
70
|
+
startIndex: z.int(),
|
|
71
|
+
type: OutputShellServerToolItemTypeContainerFileCitation$outboundSchema,
|
|
72
|
+
}).transform((v) => {
|
|
73
|
+
return remap$(v, {
|
|
74
|
+
containerId: "container_id",
|
|
75
|
+
endIndex: "end_index",
|
|
76
|
+
fileId: "file_id",
|
|
77
|
+
startIndex: "start_index",
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
export function outputShellServerToolItemFileToJSON(outputShellServerToolItemFile) {
|
|
81
|
+
return JSON.stringify(OutputShellServerToolItemFile$outboundSchema.parse(outputShellServerToolItemFile));
|
|
82
|
+
}
|
|
83
|
+
export function outputShellServerToolItemFileFromJSON(jsonString) {
|
|
84
|
+
return safeParse(jsonString, (x) => OutputShellServerToolItemFile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputShellServerToolItemFile' from JSON`);
|
|
85
|
+
}
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const OutputShellServerToolItemTypeOpenrouterShell$inboundSchema = z.enum(OutputShellServerToolItemTypeOpenrouterShell);
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const OutputShellServerToolItemTypeOpenrouterShell$outboundSchema = OutputShellServerToolItemTypeOpenrouterShell$inboundSchema;
|
|
45
90
|
/** @internal */
|
|
46
91
|
export const OutputShellServerToolItem$inboundSchema = z.object({
|
|
47
92
|
action: z.lazy(() => OutputShellServerToolItemAction$inboundSchema)
|
|
48
93
|
.optional(),
|
|
49
94
|
arguments: z.nullable(z.string()).optional(),
|
|
50
95
|
call_id: z.nullable(z.string()).optional(),
|
|
96
|
+
container_id: z.string().optional(),
|
|
97
|
+
files: z.array(z.lazy(() => OutputShellServerToolItemFile$inboundSchema))
|
|
98
|
+
.optional(),
|
|
51
99
|
id: z.string().optional(),
|
|
52
100
|
output: z.array(ShellCallOutputContent$inboundSchema).optional(),
|
|
53
101
|
status: ToolCallStatus$inboundSchema,
|
|
54
|
-
type:
|
|
102
|
+
type: OutputShellServerToolItemTypeOpenrouterShell$inboundSchema,
|
|
55
103
|
}).transform((v) => {
|
|
56
104
|
return remap$(v, {
|
|
57
105
|
"call_id": "callId",
|
|
106
|
+
"container_id": "containerId",
|
|
58
107
|
});
|
|
59
108
|
});
|
|
60
109
|
/** @internal */
|
|
@@ -63,13 +112,17 @@ export const OutputShellServerToolItem$outboundSchema = z.object({
|
|
|
63
112
|
.optional(),
|
|
64
113
|
arguments: z.nullable(z.string()).optional(),
|
|
65
114
|
callId: z.nullable(z.string()).optional(),
|
|
115
|
+
containerId: z.string().optional(),
|
|
116
|
+
files: z.array(z.lazy(() => OutputShellServerToolItemFile$outboundSchema))
|
|
117
|
+
.optional(),
|
|
66
118
|
id: z.string().optional(),
|
|
67
119
|
output: z.array(ShellCallOutputContent$outboundSchema).optional(),
|
|
68
120
|
status: ToolCallStatus$outboundSchema,
|
|
69
|
-
type:
|
|
121
|
+
type: OutputShellServerToolItemTypeOpenrouterShell$outboundSchema,
|
|
70
122
|
}).transform((v) => {
|
|
71
123
|
return remap$(v, {
|
|
72
124
|
callId: "call_id",
|
|
125
|
+
containerId: "container_id",
|
|
73
126
|
});
|
|
74
127
|
});
|
|
75
128
|
export function outputShellServerToolItemToJSON(outputShellServerToolItem) {
|
package/esm/sdk/containers.d.ts
CHANGED
|
@@ -6,21 +6,21 @@ export declare class Containers extends ClientSDK {
|
|
|
6
6
|
* List container files
|
|
7
7
|
*
|
|
8
8
|
* @remarks
|
|
9
|
-
* Lists the files
|
|
9
|
+
* Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.
|
|
10
10
|
*/
|
|
11
11
|
listContainerFiles(request: operations.ListContainerFilesRequest, options?: RequestOptions): Promise<models.ContainerFileListResponse>;
|
|
12
12
|
/**
|
|
13
13
|
* Retrieve a container file
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Returns the metadata of a single file
|
|
16
|
+
* Returns the metadata of a single file in a container.
|
|
17
17
|
*/
|
|
18
18
|
getContainerFile(request: operations.GetContainerFileRequest, options?: RequestOptions): Promise<models.ContainerFile>;
|
|
19
19
|
/**
|
|
20
20
|
* Download container file content
|
|
21
21
|
*
|
|
22
22
|
* @remarks
|
|
23
|
-
* Streams the raw bytes of a file
|
|
23
|
+
* Streams the raw bytes of a file in a container.
|
|
24
24
|
*/
|
|
25
25
|
downloadContainerFileContent(request: operations.DownloadContainerFileContentRequest, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
|
|
26
26
|
}
|
package/esm/sdk/containers.js
CHANGED
|
@@ -12,7 +12,7 @@ export class Containers extends ClientSDK {
|
|
|
12
12
|
* List container files
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Lists the files
|
|
15
|
+
* Lists the files in a container, in lexicographic path order. The container id is the canonical id returned in bash/shell tool results; a restarted session is a separate container with its own id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.
|
|
16
16
|
*/
|
|
17
17
|
async listContainerFiles(request, options) {
|
|
18
18
|
return unwrapAsync(containersListContainerFiles(this, request, options));
|
|
@@ -21,7 +21,7 @@ export class Containers extends ClientSDK {
|
|
|
21
21
|
* Retrieve a container file
|
|
22
22
|
*
|
|
23
23
|
* @remarks
|
|
24
|
-
* Returns the metadata of a single file
|
|
24
|
+
* Returns the metadata of a single file in a container.
|
|
25
25
|
*/
|
|
26
26
|
async getContainerFile(request, options) {
|
|
27
27
|
return unwrapAsync(containersGetContainerFile(this, request, options));
|
|
@@ -30,7 +30,7 @@ export class Containers extends ClientSDK {
|
|
|
30
30
|
* Download container file content
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Streams the raw bytes of a file
|
|
33
|
+
* Streams the raw bytes of a file in a container.
|
|
34
34
|
*/
|
|
35
35
|
async downloadContainerFileContent(request, options) {
|
|
36
36
|
return unwrapAsync(containersDownloadContainerFileContent(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.56",
|
|
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,14 +73,14 @@
|
|
|
73
73
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"
|
|
76
|
+
"compile": "tsc",
|
|
77
77
|
"prepare": "npm run build",
|
|
78
|
-
"test": "vitest --run --project unit",
|
|
79
78
|
"test:transit": "exit 0",
|
|
80
79
|
"test:watch": "vitest --watch --project unit",
|
|
81
80
|
"typecheck": "tsc --noEmit",
|
|
82
81
|
"typecheck:transit": "exit 0",
|
|
83
|
-
"
|
|
82
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
83
|
+
"test": "vitest --run --project unit",
|
|
84
84
|
"test:e2e": "vitest --run --project e2e"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|