@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
@@ -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 OutputBashServerToolItemType = {
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 OutputBashServerToolItemType$inboundSchema = z.enum(OutputBashServerToolItemType);
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 OutputBashServerToolItemType$outboundSchema = OutputBashServerToolItemType$inboundSchema;
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: OutputBashServerToolItemType$inboundSchema,
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: OutputBashServerToolItemType$outboundSchema,
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 OutputShellServerToolItemType: {
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 OutputShellServerToolItemType = ClosedEnum<typeof OutputShellServerToolItemType>;
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: OutputShellServerToolItemType;
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 OutputShellServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputShellServerToolItemType>;
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 OutputShellServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputShellServerToolItemType>;
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 OutputShellServerToolItemType = {
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 OutputShellServerToolItemType$inboundSchema = z.enum(OutputShellServerToolItemType);
45
+ export const OutputShellServerToolItemTypeContainerFileCitation$inboundSchema = z.enum(OutputShellServerToolItemTypeContainerFileCitation);
43
46
  /** @internal */
44
- export const OutputShellServerToolItemType$outboundSchema = OutputShellServerToolItemType$inboundSchema;
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: OutputShellServerToolItemType$inboundSchema,
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: OutputShellServerToolItemType$outboundSchema,
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) {
@@ -0,0 +1,27 @@
1
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
+ import * as models from "../models/index.js";
3
+ import * as operations from "../models/operations/index.js";
4
+ export declare class Containers extends ClientSDK {
5
+ /**
6
+ * List container files
7
+ *
8
+ * @remarks
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
+ */
11
+ listContainerFiles(request: operations.ListContainerFilesRequest, options?: RequestOptions): Promise<models.ContainerFileListResponse>;
12
+ /**
13
+ * Retrieve a container file
14
+ *
15
+ * @remarks
16
+ * Returns the metadata of a single file in a container.
17
+ */
18
+ getContainerFile(request: operations.GetContainerFileRequest, options?: RequestOptions): Promise<models.ContainerFile>;
19
+ /**
20
+ * Download container file content
21
+ *
22
+ * @remarks
23
+ * Streams the raw bytes of a file in a container.
24
+ */
25
+ downloadContainerFileContent(request: operations.DownloadContainerFileContentRequest, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
26
+ }
27
+ //# sourceMappingURL=containers.d.ts.map
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: f772470024e6
4
+ */
5
+ import { containersDownloadContainerFileContent } from "../funcs/containersDownloadContainerFileContent.js";
6
+ import { containersGetContainerFile } from "../funcs/containersGetContainerFile.js";
7
+ import { containersListContainerFiles } from "../funcs/containersListContainerFiles.js";
8
+ import { ClientSDK } from "../lib/sdks.js";
9
+ import { unwrapAsync } from "../types/fp.js";
10
+ export class Containers extends ClientSDK {
11
+ /**
12
+ * List container files
13
+ *
14
+ * @remarks
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
+ */
17
+ async listContainerFiles(request, options) {
18
+ return unwrapAsync(containersListContainerFiles(this, request, options));
19
+ }
20
+ /**
21
+ * Retrieve a container file
22
+ *
23
+ * @remarks
24
+ * Returns the metadata of a single file in a container.
25
+ */
26
+ async getContainerFile(request, options) {
27
+ return unwrapAsync(containersGetContainerFile(this, request, options));
28
+ }
29
+ /**
30
+ * Download container file content
31
+ *
32
+ * @remarks
33
+ * Streams the raw bytes of a file in a container.
34
+ */
35
+ async downloadContainerFileContent(request, options) {
36
+ return unwrapAsync(containersDownloadContainerFileContent(this, request, options));
37
+ }
38
+ }
39
+ //# sourceMappingURL=containers.js.map
package/esm/sdk/sdk.d.ts CHANGED
@@ -6,6 +6,7 @@ import { Beta } from "./beta.js";
6
6
  import { BYOK } from "./byok.js";
7
7
  import { Chat } from "./chat.js";
8
8
  import { Classifications } from "./classifications.js";
9
+ import { Containers } from "./containers.js";
9
10
  import { Credits } from "./credits.js";
10
11
  import { Datasets } from "./datasets.js";
11
12
  import { Embeddings } from "./embeddings.js";
@@ -50,6 +51,8 @@ export declare class OpenRouter extends ClientSDK {
50
51
  get chat(): Chat;
51
52
  private _classifications?;
52
53
  get classifications(): Classifications;
54
+ private _containers?;
55
+ get containers(): Containers;
53
56
  private _credits?;
54
57
  get credits(): Credits;
55
58
  private _datasets?;
package/esm/sdk/sdk.js CHANGED
@@ -10,6 +10,7 @@ import { Beta } from "./beta.js";
10
10
  import { BYOK } from "./byok.js";
11
11
  import { Chat } from "./chat.js";
12
12
  import { Classifications } from "./classifications.js";
13
+ import { Containers } from "./containers.js";
13
14
  import { Credits } from "./credits.js";
14
15
  import { Datasets } from "./datasets.js";
15
16
  import { Embeddings } from "./embeddings.js";
@@ -60,6 +61,9 @@ export class OpenRouter extends ClientSDK {
60
61
  get classifications() {
61
62
  return (this._classifications ?? (this._classifications = new Classifications(this._options)));
62
63
  }
64
+ get containers() {
65
+ return (this._containers ?? (this._containers = new Containers(this._options)));
66
+ }
63
67
  get credits() {
64
68
  return (this._credits ?? (this._credits = new Credits(this._options)));
65
69
  }
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.54",
5
+ "version": "1.2.56",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "1.2.54",
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,15 +73,15 @@
73
73
  "lint": "eslint --cache --max-warnings=0 src",
74
74
  "build": "tsc",
75
75
  "prepublishOnly": "npm run build",
76
- "postinstall": "node scripts/check-types.js || true",
77
- "test": "vitest --run --project unit",
78
- "test:e2e": "vitest --run --project e2e",
76
+ "compile": "tsc",
77
+ "prepare": "npm run build",
79
78
  "test:transit": "exit 0",
80
79
  "test:watch": "vitest --watch --project unit",
80
+ "typecheck": "tsc --noEmit",
81
81
  "typecheck:transit": "exit 0",
82
- "compile": "tsc",
83
- "prepare": "npm run build",
84
- "typecheck": "tsc --noEmit"
82
+ "postinstall": "node scripts/check-types.js || true",
83
+ "test": "vitest --run --project unit",
84
+ "test:e2e": "vitest --run --project e2e"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {