@openrouter/sdk 1.2.71 → 1.2.72

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.
@@ -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.71";
53
+ readonly sdkVersion: "1.2.72";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.2.71 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.2.72 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.71",
32
+ sdkVersion: "1.2.72",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.2.71 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.2.72 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -2,26 +2,62 @@ import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
3
  import { ShellCallOutputContent, ShellCallOutputContent$Outbound } from "./shellcalloutputcontent.js";
4
4
  import { ToolCallStatus } from "./toolcallstatus.js";
5
- export declare const ShellCallOutputItemType: {
5
+ export declare const ShellCallOutputItemTypeContainerFileCitation: {
6
+ readonly ContainerFileCitation: "container_file_citation";
7
+ };
8
+ export type ShellCallOutputItemTypeContainerFileCitation = ClosedEnum<typeof ShellCallOutputItemTypeContainerFileCitation>;
9
+ export type ShellCallOutputItemFile = {
10
+ containerId: string;
11
+ endIndex: number;
12
+ fileId: string;
13
+ filename: string;
14
+ startIndex: number;
15
+ type: ShellCallOutputItemTypeContainerFileCitation;
16
+ };
17
+ export declare const ShellCallOutputItemTypeShellCallOutput: {
6
18
  readonly ShellCallOutput: "shell_call_output";
7
19
  };
8
- export type ShellCallOutputItemType = ClosedEnum<typeof ShellCallOutputItemType>;
20
+ export type ShellCallOutputItemTypeShellCallOutput = ClosedEnum<typeof ShellCallOutputItemTypeShellCallOutput>;
9
21
  /**
10
22
  * Output from a shell command execution (newer variant)
11
23
  */
12
24
  export type ShellCallOutputItem = {
13
25
  callId: string;
26
+ /**
27
+ * 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.
28
+ */
29
+ containerId?: string | undefined;
30
+ /**
31
+ * Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API.
32
+ */
33
+ files?: Array<ShellCallOutputItemFile> | undefined;
14
34
  id?: string | null | undefined;
15
35
  maxOutputLength?: number | null | undefined;
16
36
  output: Array<ShellCallOutputContent>;
17
37
  status?: ToolCallStatus | null | undefined;
18
- type: ShellCallOutputItemType;
38
+ type: ShellCallOutputItemTypeShellCallOutput;
19
39
  };
20
40
  /** @internal */
21
- export declare const ShellCallOutputItemType$outboundSchema: z.ZodEnum<typeof ShellCallOutputItemType>;
41
+ export declare const ShellCallOutputItemTypeContainerFileCitation$outboundSchema: z.ZodEnum<typeof ShellCallOutputItemTypeContainerFileCitation>;
42
+ /** @internal */
43
+ export type ShellCallOutputItemFile$Outbound = {
44
+ container_id: string;
45
+ end_index: number;
46
+ file_id: string;
47
+ filename: string;
48
+ start_index: number;
49
+ type: string;
50
+ };
51
+ /** @internal */
52
+ export declare const ShellCallOutputItemFile$outboundSchema: z.ZodType<ShellCallOutputItemFile$Outbound, ShellCallOutputItemFile>;
53
+ export declare function shellCallOutputItemFileToJSON(shellCallOutputItemFile: ShellCallOutputItemFile): string;
54
+ /** @internal */
55
+ export declare const ShellCallOutputItemTypeShellCallOutput$outboundSchema: z.ZodEnum<typeof ShellCallOutputItemTypeShellCallOutput>;
22
56
  /** @internal */
23
57
  export type ShellCallOutputItem$Outbound = {
24
58
  call_id: string;
59
+ container_id?: string | undefined;
60
+ files?: Array<ShellCallOutputItemFile$Outbound> | undefined;
25
61
  id?: string | null | undefined;
26
62
  max_output_length?: number | null | undefined;
27
63
  output: Array<ShellCallOutputContent$Outbound>;
@@ -6,22 +6,50 @@ import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { ShellCallOutputContent$outboundSchema, } from "./shellcalloutputcontent.js";
8
8
  import { ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
9
- export const ShellCallOutputItemType = {
9
+ export const ShellCallOutputItemTypeContainerFileCitation = {
10
+ ContainerFileCitation: "container_file_citation",
11
+ };
12
+ export const ShellCallOutputItemTypeShellCallOutput = {
10
13
  ShellCallOutput: "shell_call_output",
11
14
  };
12
15
  /** @internal */
13
- export const ShellCallOutputItemType$outboundSchema = z.enum(ShellCallOutputItemType);
16
+ export const ShellCallOutputItemTypeContainerFileCitation$outboundSchema = z.enum(ShellCallOutputItemTypeContainerFileCitation);
17
+ /** @internal */
18
+ export const ShellCallOutputItemFile$outboundSchema = z.object({
19
+ containerId: z.string(),
20
+ endIndex: z.int(),
21
+ fileId: z.string(),
22
+ filename: z.string(),
23
+ startIndex: z.int(),
24
+ type: ShellCallOutputItemTypeContainerFileCitation$outboundSchema,
25
+ }).transform((v) => {
26
+ return remap$(v, {
27
+ containerId: "container_id",
28
+ endIndex: "end_index",
29
+ fileId: "file_id",
30
+ startIndex: "start_index",
31
+ });
32
+ });
33
+ export function shellCallOutputItemFileToJSON(shellCallOutputItemFile) {
34
+ return JSON.stringify(ShellCallOutputItemFile$outboundSchema.parse(shellCallOutputItemFile));
35
+ }
36
+ /** @internal */
37
+ export const ShellCallOutputItemTypeShellCallOutput$outboundSchema = z.enum(ShellCallOutputItemTypeShellCallOutput);
14
38
  /** @internal */
15
39
  export const ShellCallOutputItem$outboundSchema = z.object({
16
40
  callId: z.string(),
41
+ containerId: z.string().optional(),
42
+ files: z.array(z.lazy(() => ShellCallOutputItemFile$outboundSchema))
43
+ .optional(),
17
44
  id: z.nullable(z.string()).optional(),
18
45
  maxOutputLength: z.nullable(z.int()).optional(),
19
46
  output: z.array(ShellCallOutputContent$outboundSchema),
20
47
  status: z.nullable(ToolCallStatus$outboundSchema).optional(),
21
- type: ShellCallOutputItemType$outboundSchema,
48
+ type: ShellCallOutputItemTypeShellCallOutput$outboundSchema,
22
49
  }).transform((v) => {
23
50
  return remap$(v, {
24
51
  callId: "call_id",
52
+ containerId: "container_id",
25
53
  maxOutputLength: "max_output_length",
26
54
  });
27
55
  });
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.71",
5
+ "version": "1.2.72",
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.71",
3
+ "version": "1.2.72",
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": [
@@ -21,8 +21,8 @@
21
21
  "license": "Apache-2.0",
22
22
  "packageManager": "pnpm@10.22.0",
23
23
  "publishConfig": {
24
- "provenance": true,
25
- "access": "public"
24
+ "access": "public",
25
+ "provenance": true
26
26
  },
27
27
  "type": "module",
28
28
  "main": "./esm/index.js",
@@ -73,15 +73,15 @@
73
73
  "lint": "eslint --cache --max-warnings=0 src",
74
74
  "build": "tsc",
75
75
  "prepublishOnly": "npm run build",
76
+ "compile": "tsc",
77
+ "prepare": "npm run build",
76
78
  "test:e2e": "vitest --run --project e2e",
77
79
  "test:transit": "exit 0",
78
- "compile": "tsc",
79
- "postinstall": "node scripts/check-types.js || true",
80
- "test": "vitest --run --project unit",
81
80
  "test:watch": "vitest --watch --project unit",
82
- "typecheck": "tsc --noEmit",
83
81
  "typecheck:transit": "exit 0",
84
- "prepare": "npm run build"
82
+ "postinstall": "node scripts/check-types.js || true",
83
+ "test": "vitest --run --project unit",
84
+ "typecheck": "tsc --noEmit"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {