@openrouter/sdk 1.2.54 → 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.
Files changed (41) hide show
  1. package/esm/funcs/containersDownloadContainerFileContent.d.ts +18 -0
  2. package/esm/funcs/containersDownloadContainerFileContent.js +107 -0
  3. package/esm/funcs/containersGetContainerFile.d.ts +19 -0
  4. package/esm/funcs/containersGetContainerFile.js +107 -0
  5. package/esm/funcs/containersListContainerFiles.d.ts +19 -0
  6. package/esm/funcs/containersListContainerFiles.js +108 -0
  7. package/esm/lib/config.d.ts +2 -2
  8. package/esm/lib/config.js +2 -2
  9. package/esm/models/chatcontentfile.d.ts +8 -8
  10. package/esm/models/chatcontentfile.js +8 -8
  11. package/esm/models/containerfile.d.ts +53 -0
  12. package/esm/models/containerfile.js +40 -0
  13. package/esm/models/containerfilelistresponse.d.ts +25 -0
  14. package/esm/models/containerfilelistresponse.js +31 -0
  15. package/esm/models/containerreferenceenvironment.d.ts +2 -2
  16. package/esm/models/index.d.ts +2 -0
  17. package/esm/models/index.js +2 -0
  18. package/esm/models/messagesbashtoolresultblock.d.ts +37 -0
  19. package/esm/models/messagesbashtoolresultblock.js +29 -0
  20. package/esm/models/messagesshelltoolresultblock.d.ts +37 -0
  21. package/esm/models/messagesshelltoolresultblock.js +29 -0
  22. package/esm/models/operations/downloadcontainerfilecontent.d.ts +63 -0
  23. package/esm/models/operations/downloadcontainerfilecontent.js +24 -0
  24. package/esm/models/operations/getcontainerfile.d.ts +63 -0
  25. package/esm/models/operations/getcontainerfile.js +24 -0
  26. package/esm/models/operations/index.d.ts +3 -0
  27. package/esm/models/operations/index.js +3 -0
  28. package/esm/models/operations/listcontainerfiles.d.ts +68 -0
  29. package/esm/models/operations/listcontainerfiles.js +24 -0
  30. package/esm/models/outputbashservertoolitem.d.ts +46 -5
  31. package/esm/models/outputbashservertoolitem.js +58 -5
  32. package/esm/models/outputshellcalloutputitem.d.ts +26 -0
  33. package/esm/models/outputshellcalloutputitem.js +28 -0
  34. package/esm/models/outputshellservertoolitem.d.ts +46 -5
  35. package/esm/models/outputshellservertoolitem.js +58 -5
  36. package/esm/sdk/containers.d.ts +27 -0
  37. package/esm/sdk/containers.js +39 -0
  38. package/esm/sdk/sdk.d.ts +3 -0
  39. package/esm/sdk/sdk.js +4 -0
  40. package/jsr.json +1 -1
  41. package/package.json +7 -7
@@ -1,10 +1,10 @@
1
1
  import * as z from "zod/v4";
2
2
  /**
3
- * Reference to a previously created container to reuse.
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
- * Identifier of an existing container to reuse (max 20 characters).
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";
@@ -148,6 +148,8 @@ export * from "./compoundfilter.js";
148
148
  export * from "./computeruseservertool.js";
149
149
  export * from "./conflictresponseerrordata.js";
150
150
  export * from "./containerautoenvironment.js";
151
+ export * from "./containerfile.js";
152
+ export * from "./containerfilelistresponse.js";
151
153
  export * from "./containerreferenceenvironment.js";
152
154
  export * from "./contentfilteraction.js";
153
155
  export * from "./contentfilterbuiltinaction.js";
@@ -152,6 +152,8 @@ export * from "./compoundfilter.js";
152
152
  export * from "./computeruseservertool.js";
153
153
  export * from "./conflictresponseerrordata.js";
154
154
  export * from "./containerautoenvironment.js";
155
+ export * from "./containerfile.js";
156
+ export * from "./containerfilelistresponse.js";
155
157
  export * from "./containerreferenceenvironment.js";
156
158
  export * from "./contentfilteraction.js";
157
159
  export * from "./contentfilterbuiltinaction.js";
@@ -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
  });
@@ -0,0 +1,63 @@
1
+ import * as z from "zod/v4";
2
+ export type DownloadContainerFileContentGlobals = {
3
+ /**
4
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
+ *
6
+ * @remarks
7
+ * This is used to track API usage per application.
8
+ */
9
+ httpReferer?: string | undefined;
10
+ /**
11
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
+ *
13
+ * @remarks
14
+ */
15
+ appTitle?: string | undefined;
16
+ /**
17
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
18
+ *
19
+ * @remarks
20
+ */
21
+ appCategories?: string | undefined;
22
+ };
23
+ export type DownloadContainerFileContentRequest = {
24
+ /**
25
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
26
+ *
27
+ * @remarks
28
+ * This is used to track API usage per application.
29
+ */
30
+ httpReferer?: string | undefined;
31
+ /**
32
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
33
+ *
34
+ * @remarks
35
+ */
36
+ appTitle?: string | undefined;
37
+ /**
38
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
39
+ *
40
+ * @remarks
41
+ */
42
+ appCategories?: string | undefined;
43
+ /**
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
+ */
46
+ containerId: string;
47
+ /**
48
+ * Container file id (`cfile_` + base64url of the file path).
49
+ */
50
+ fileId: string;
51
+ };
52
+ /** @internal */
53
+ export type DownloadContainerFileContentRequest$Outbound = {
54
+ "HTTP-Referer"?: string | undefined;
55
+ appTitle?: string | undefined;
56
+ appCategories?: string | undefined;
57
+ container_id: string;
58
+ file_id: string;
59
+ };
60
+ /** @internal */
61
+ export declare const DownloadContainerFileContentRequest$outboundSchema: z.ZodType<DownloadContainerFileContentRequest$Outbound, DownloadContainerFileContentRequest>;
62
+ export declare function downloadContainerFileContentRequestToJSON(downloadContainerFileContentRequest: DownloadContainerFileContentRequest): string;
63
+ //# sourceMappingURL=downloadcontainerfilecontent.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 0bc1bd778769
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ /** @internal */
8
+ export const DownloadContainerFileContentRequest$outboundSchema = z.object({
9
+ httpReferer: z.string().optional(),
10
+ appTitle: z.string().optional(),
11
+ appCategories: z.string().optional(),
12
+ containerId: z.string(),
13
+ fileId: z.string(),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ httpReferer: "HTTP-Referer",
17
+ containerId: "container_id",
18
+ fileId: "file_id",
19
+ });
20
+ });
21
+ export function downloadContainerFileContentRequestToJSON(downloadContainerFileContentRequest) {
22
+ return JSON.stringify(DownloadContainerFileContentRequest$outboundSchema.parse(downloadContainerFileContentRequest));
23
+ }
24
+ //# sourceMappingURL=downloadcontainerfilecontent.js.map
@@ -0,0 +1,63 @@
1
+ import * as z from "zod/v4";
2
+ export type GetContainerFileGlobals = {
3
+ /**
4
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
+ *
6
+ * @remarks
7
+ * This is used to track API usage per application.
8
+ */
9
+ httpReferer?: string | undefined;
10
+ /**
11
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
+ *
13
+ * @remarks
14
+ */
15
+ appTitle?: string | undefined;
16
+ /**
17
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
18
+ *
19
+ * @remarks
20
+ */
21
+ appCategories?: string | undefined;
22
+ };
23
+ export type GetContainerFileRequest = {
24
+ /**
25
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
26
+ *
27
+ * @remarks
28
+ * This is used to track API usage per application.
29
+ */
30
+ httpReferer?: string | undefined;
31
+ /**
32
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
33
+ *
34
+ * @remarks
35
+ */
36
+ appTitle?: string | undefined;
37
+ /**
38
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
39
+ *
40
+ * @remarks
41
+ */
42
+ appCategories?: string | undefined;
43
+ /**
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
+ */
46
+ containerId: string;
47
+ /**
48
+ * Container file id (`cfile_` + base64url of the file path).
49
+ */
50
+ fileId: string;
51
+ };
52
+ /** @internal */
53
+ export type GetContainerFileRequest$Outbound = {
54
+ "HTTP-Referer"?: string | undefined;
55
+ appTitle?: string | undefined;
56
+ appCategories?: string | undefined;
57
+ container_id: string;
58
+ file_id: string;
59
+ };
60
+ /** @internal */
61
+ export declare const GetContainerFileRequest$outboundSchema: z.ZodType<GetContainerFileRequest$Outbound, GetContainerFileRequest>;
62
+ export declare function getContainerFileRequestToJSON(getContainerFileRequest: GetContainerFileRequest): string;
63
+ //# sourceMappingURL=getcontainerfile.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 2fb4120bb6ff
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ /** @internal */
8
+ export const GetContainerFileRequest$outboundSchema = z.object({
9
+ httpReferer: z.string().optional(),
10
+ appTitle: z.string().optional(),
11
+ appCategories: z.string().optional(),
12
+ containerId: z.string(),
13
+ fileId: z.string(),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ httpReferer: "HTTP-Referer",
17
+ containerId: "container_id",
18
+ fileId: "file_id",
19
+ });
20
+ });
21
+ export function getContainerFileRequestToJSON(getContainerFileRequest) {
22
+ return JSON.stringify(GetContainerFileRequest$outboundSchema.parse(getContainerFileRequest));
23
+ }
24
+ //# sourceMappingURL=getcontainerfile.js.map
@@ -30,12 +30,14 @@ export * from "./deleteobservabilitydestination.js";
30
30
  export * from "./deletescimgroupmapping.js";
31
31
  export * from "./deleteworkspace.js";
32
32
  export * from "./deleteworkspacebudget.js";
33
+ export * from "./downloadcontainerfilecontent.js";
33
34
  export * from "./downloadfilecontent.js";
34
35
  export * from "./exchangeauthcodeforapikey.js";
35
36
  export * from "./getanalyticsmeta.js";
36
37
  export * from "./getapprankings.js";
37
38
  export * from "./getbenchmarks.js";
38
39
  export * from "./getbyokkey.js";
40
+ export * from "./getcontainerfile.js";
39
41
  export * from "./getcredits.js";
40
42
  export * from "./getcurrentkey.js";
41
43
  export * from "./getfilemetadata.js";
@@ -57,6 +59,7 @@ export * from "./getworkspace.js";
57
59
  export * from "./getworkspacebudget.js";
58
60
  export * from "./list.js";
59
61
  export * from "./listbyokkeys.js";
62
+ export * from "./listcontainerfiles.js";
60
63
  export * from "./listembeddingsmodels.js";
61
64
  export * from "./listendpoints.js";
62
65
  export * from "./listendpointszdr.js";
@@ -34,12 +34,14 @@ export * from "./deleteobservabilitydestination.js";
34
34
  export * from "./deletescimgroupmapping.js";
35
35
  export * from "./deleteworkspace.js";
36
36
  export * from "./deleteworkspacebudget.js";
37
+ export * from "./downloadcontainerfilecontent.js";
37
38
  export * from "./downloadfilecontent.js";
38
39
  export * from "./exchangeauthcodeforapikey.js";
39
40
  export * from "./getanalyticsmeta.js";
40
41
  export * from "./getapprankings.js";
41
42
  export * from "./getbenchmarks.js";
42
43
  export * from "./getbyokkey.js";
44
+ export * from "./getcontainerfile.js";
43
45
  export * from "./getcredits.js";
44
46
  export * from "./getcurrentkey.js";
45
47
  export * from "./getfilemetadata.js";
@@ -61,6 +63,7 @@ export * from "./getworkspace.js";
61
63
  export * from "./getworkspacebudget.js";
62
64
  export * from "./list.js";
63
65
  export * from "./listbyokkeys.js";
66
+ export * from "./listcontainerfiles.js";
64
67
  export * from "./listembeddingsmodels.js";
65
68
  export * from "./listendpoints.js";
66
69
  export * from "./listendpointszdr.js";
@@ -0,0 +1,68 @@
1
+ import * as z from "zod/v4";
2
+ export type ListContainerFilesGlobals = {
3
+ /**
4
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
+ *
6
+ * @remarks
7
+ * This is used to track API usage per application.
8
+ */
9
+ httpReferer?: string | undefined;
10
+ /**
11
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
+ *
13
+ * @remarks
14
+ */
15
+ appTitle?: string | undefined;
16
+ /**
17
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
18
+ *
19
+ * @remarks
20
+ */
21
+ appCategories?: string | undefined;
22
+ };
23
+ export type ListContainerFilesRequest = {
24
+ /**
25
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
26
+ *
27
+ * @remarks
28
+ * This is used to track API usage per application.
29
+ */
30
+ httpReferer?: string | undefined;
31
+ /**
32
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
33
+ *
34
+ * @remarks
35
+ */
36
+ appTitle?: string | undefined;
37
+ /**
38
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
39
+ *
40
+ * @remarks
41
+ */
42
+ appCategories?: string | undefined;
43
+ /**
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
+ */
46
+ containerId: string;
47
+ /**
48
+ * Maximum number of files to return (1-1000). Defaults to 100 when absent.
49
+ */
50
+ limit?: number | undefined;
51
+ /**
52
+ * Forward cursor: a container file id from a previous page (typically `last_id`); listing resumes strictly after that file.
53
+ */
54
+ after?: string | undefined;
55
+ };
56
+ /** @internal */
57
+ export type ListContainerFilesRequest$Outbound = {
58
+ "HTTP-Referer"?: string | undefined;
59
+ appTitle?: string | undefined;
60
+ appCategories?: string | undefined;
61
+ container_id: string;
62
+ limit: number;
63
+ after?: string | undefined;
64
+ };
65
+ /** @internal */
66
+ export declare const ListContainerFilesRequest$outboundSchema: z.ZodType<ListContainerFilesRequest$Outbound, ListContainerFilesRequest>;
67
+ export declare function listContainerFilesRequestToJSON(listContainerFilesRequest: ListContainerFilesRequest): string;
68
+ //# sourceMappingURL=listcontainerfiles.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 833ac1772f55
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ /** @internal */
8
+ export const ListContainerFilesRequest$outboundSchema = z.object({
9
+ httpReferer: z.string().optional(),
10
+ appTitle: z.string().optional(),
11
+ appCategories: z.string().optional(),
12
+ containerId: z.string(),
13
+ limit: z.int().default(100),
14
+ after: z.string().optional(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ httpReferer: "HTTP-Referer",
18
+ containerId: "container_id",
19
+ });
20
+ });
21
+ export function listContainerFilesRequestToJSON(listContainerFilesRequest) {
22
+ return JSON.stringify(ListContainerFilesRequest$outboundSchema.parse(listContainerFilesRequest));
23
+ }
24
+ //# sourceMappingURL=listcontainerfiles.js.map
@@ -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 OutputBashServerToolItemType: {
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 OutputBashServerToolItemType = ClosedEnum<typeof OutputBashServerToolItemType>;
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: OutputBashServerToolItemType;
48
+ type: OutputBashServerToolItemTypeOpenrouterBash;
29
49
  };
30
50
  /** @internal */
31
- export declare const OutputBashServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputBashServerToolItemType>;
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 OutputBashServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputBashServerToolItemType>;
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;