@openrouter/sdk 1.5.16 → 1.5.17

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.
@@ -12,7 +12,7 @@ import { Result } from "../types/fp.js";
12
12
  * List the connections an intern can use
13
13
  *
14
14
  * @remarks
15
- * Lists the connections in scope for the intern, by the key of their card on the dashboard's Connections tab: `github`, `slack`, `google`, a catalog MCP server such as `linear` or `notion`, or `mcp:<host>` for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. `ori features add` checks a feature's `ori.requires.connections` against this list. Keys only, never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern's own API key is confined to that intern: it can always read the intern's secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
15
+ * Lists the connections in scope for the intern, by the key of their card on the dashboard's Connections tab: `github`, `slack`, `google`, a catalog MCP server such as `linear` or `notion`, or `mcp:<host>` for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. `ori features add` checks a feature's `ori.requires.connections` against this list. `routing` is the vault's routing table for the intern: the credentials it holds and what it would inject each for, from the same lookups the egress proxy picks a credential with, GitHub repository coverage read through the installation token and cached. `routing_text` is that table as the lines the intern reads in its instructions. Never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern's own API key is confined to that intern: it can always read the intern's secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
16
  *
17
17
  * If set, this operation will use {@link Security.apiKey} from the global security.
18
18
  */
@@ -16,7 +16,7 @@ import { APIPromise } from "../types/async.js";
16
16
  * List the connections an intern can use
17
17
  *
18
18
  * @remarks
19
- * Lists the connections in scope for the intern, by the key of their card on the dashboard's Connections tab: `github`, `slack`, `google`, a catalog MCP server such as `linear` or `notion`, or `mcp:<host>` for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. `ori features add` checks a feature's `ori.requires.connections` against this list. Keys only, never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern's own API key is confined to that intern: it can always read the intern's secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
19
+ * Lists the connections in scope for the intern, by the key of their card on the dashboard's Connections tab: `github`, `slack`, `google`, a catalog MCP server such as `linear` or `notion`, or `mcp:<host>` for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. `ori features add` checks a feature's `ori.requires.connections` against this list. `routing` is the vault's routing table for the intern: the credentials it holds and what it would inject each for, from the same lookups the egress proxy picks a credential with, GitHub repository coverage read through the installation token and cached. `routing_text` is that table as the lines the intern reads in its instructions. Never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern's own API key is confined to that intern: it can always read the intern's secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
20
  *
21
21
  * If set, this operation will use {@link Security.apiKey} from the global security.
22
22
  */
@@ -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.5.16";
53
+ readonly sdkVersion: "1.5.17";
54
54
  readonly genVersion: "2.948.4";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.16 2.948.4 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.17 2.948.4 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.5.16",
32
+ sdkVersion: "1.5.17",
33
33
  genVersion: "2.948.4",
34
- userAgent: "speakeasy-sdk/typescript 1.5.16 2.948.4 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.17 2.948.4 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -795,6 +795,7 @@ export * from "./urlcitation.js";
795
795
  export * from "./validateprivateendpointrequest.js";
796
796
  export * from "./vaulteffectivesecret.js";
797
797
  export * from "./vaulteffectivesecretlistresponse.js";
798
+ export * from "./vaultroutingtable.js";
798
799
  export * from "./vaultsecret.js";
799
800
  export * from "./vaultsecretcopyrequest.js";
800
801
  export * from "./vaultsecretcopyresponse.js";
@@ -799,6 +799,7 @@ export * from "./urlcitation.js";
799
799
  export * from "./validateprivateendpointrequest.js";
800
800
  export * from "./vaulteffectivesecret.js";
801
801
  export * from "./vaulteffectivesecretlistresponse.js";
802
+ export * from "./vaultroutingtable.js";
802
803
  export * from "./vaultsecret.js";
803
804
  export * from "./vaultsecretcopyrequest.js";
804
805
  export * from "./vaultsecretcopyresponse.js";
@@ -1,6 +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
+ import * as models from "../index.js";
4
5
  export type ListInternConnectionsGlobals = {
5
6
  /**
6
7
  * The app identifier should be your app's URL and is used as the primary identifier for rankings.
@@ -55,6 +56,14 @@ export type ListInternConnectionsData = {
55
56
  */
56
57
  export type ListInternConnectionsResponse = {
57
58
  data: Array<ListInternConnectionsData>;
59
+ /**
60
+ * The intern's routing table, for the intern's own key only; null for any other caller or when the vault could not build it in time. The keys still list.
61
+ */
62
+ routing: models.VaultRoutingTable | null;
63
+ /**
64
+ * The routing table as the plain lines the intern reads in its instructions' Connections section, or a notice that it could not be read; null for a caller other than the intern.
65
+ */
66
+ routingText: string | null;
58
67
  };
59
68
  /** @internal */
60
69
  export type ListInternConnectionsRequest$Outbound = {
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { VaultRoutingTable$inboundSchema as models_VaultRoutingTable$inboundSchema } from "../vaultroutingtable.js";
8
9
  /** @internal */
9
10
  export const ListInternConnectionsRequest$outboundSchema = z.object({
10
11
  httpReferer: z.string().optional(),
@@ -29,6 +30,12 @@ export function listInternConnectionsDataFromJSON(jsonString) {
29
30
  /** @internal */
30
31
  export const ListInternConnectionsResponse$inboundSchema = z.object({
31
32
  data: z.array(z.lazy(() => ListInternConnectionsData$inboundSchema)),
33
+ routing: z.nullable(models_VaultRoutingTable$inboundSchema),
34
+ routing_text: z.nullable(z.string()),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "routing_text": "routingText",
38
+ });
32
39
  });
33
40
  export function listInternConnectionsResponseFromJSON(jsonString) {
34
41
  return safeParse(jsonString, (x) => ListInternConnectionsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListInternConnectionsResponse' from JSON`);
@@ -0,0 +1,333 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ export declare const CustomOriginState: {
6
+ readonly Usable: "usable";
7
+ readonly NoCredential: "no_credential";
8
+ readonly Failing: "failing";
9
+ };
10
+ export type CustomOriginState = OpenEnum<typeof CustomOriginState>;
11
+ /**
12
+ * The vault injection decision for this destination, at `read_at`.
13
+ */
14
+ export type CustomOriginStatus = {
15
+ /**
16
+ * The credential failure code when `state` is `failing`; null otherwise.
17
+ */
18
+ failure: string | null;
19
+ state: CustomOriginState;
20
+ };
21
+ export type CustomOrigin = {
22
+ host: string;
23
+ pathPrefix: string | null;
24
+ /**
25
+ * The vault injection decision for this destination, at `read_at`.
26
+ */
27
+ status: CustomOriginStatus;
28
+ };
29
+ export declare const AccountType: {
30
+ readonly Organization: "organization";
31
+ readonly User: "user";
32
+ };
33
+ export type AccountType = OpenEnum<typeof AccountType>;
34
+ export declare const Selection: {
35
+ readonly All: "all";
36
+ readonly Selected: "selected";
37
+ };
38
+ export type Selection = OpenEnum<typeof Selection>;
39
+ /**
40
+ * What GitHub says the installation covers; null until read.
41
+ */
42
+ export type Coverage = {
43
+ /**
44
+ * When GitHub answered, through the installation token the vault holds.
45
+ */
46
+ checkedAt: Date;
47
+ /**
48
+ * Repositories the installation covers; null when GitHub did not count them.
49
+ */
50
+ repositoryCount: number | null;
51
+ selection: Selection;
52
+ };
53
+ /**
54
+ * What egress uses instead of this installation for a request to its account: an earlier installation on the same account, or a token pinned to the account. Null when this installation answers.
55
+ */
56
+ export declare const ShadowedBy: {
57
+ readonly Installation: "installation";
58
+ readonly Token: "token";
59
+ };
60
+ /**
61
+ * What egress uses instead of this installation for a request to its account: an earlier installation on the same account, or a token pinned to the account. Null when this installation answers.
62
+ */
63
+ export type ShadowedBy = OpenEnum<typeof ShadowedBy>;
64
+ export type Installation = {
65
+ /**
66
+ * The account the App is installed on, as GitHub spells it.
67
+ */
68
+ account: string;
69
+ accountType: AccountType | null;
70
+ /**
71
+ * What GitHub says the installation covers; null until read.
72
+ */
73
+ coverage: Coverage | null;
74
+ credentialId: string;
75
+ /**
76
+ * Whether the vault holds a current installation token to inject.
77
+ */
78
+ holdsToken: boolean;
79
+ isEnabled: boolean;
80
+ /**
81
+ * The workspace turned this shared installation off or hid it for this intern.
82
+ */
83
+ isOffForIntern: boolean;
84
+ /**
85
+ * What egress uses instead of this installation for a request to its account: an earlier installation on the same account, or a token pinned to the account. Null when this installation answers.
86
+ */
87
+ shadowedBy: ShadowedBy | null;
88
+ };
89
+ /**
90
+ * How the vault picks this link for the App, by the same selection egress uses.
91
+ */
92
+ export declare const Via: {
93
+ readonly AppLink: "app_link";
94
+ readonly Token: "token";
95
+ readonly AnyLink: "any_link";
96
+ };
97
+ /**
98
+ * How the vault picks this link for the App, by the same selection egress uses.
99
+ */
100
+ export type Via = OpenEnum<typeof Via>;
101
+ export type AppMemberLink = {
102
+ holdsToken: boolean;
103
+ login: string;
104
+ /**
105
+ * How the vault picks this link for the App, by the same selection egress uses.
106
+ */
107
+ via: Via;
108
+ };
109
+ /**
110
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
111
+ */
112
+ export declare const AppScope: {
113
+ readonly Workspace: "workspace";
114
+ readonly Intern: "intern";
115
+ };
116
+ /**
117
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
118
+ */
119
+ export type AppScope = OpenEnum<typeof AppScope>;
120
+ export type App = {
121
+ appId: string | null;
122
+ appSlug: string | null;
123
+ installations: Array<Installation>;
124
+ /**
125
+ * Members whose own account the vault would act as on this App's accounts; GitHub still limits a member's token to what that member can reach.
126
+ */
127
+ memberLinks: Array<AppMemberLink>;
128
+ /**
129
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
130
+ */
131
+ scope: AppScope;
132
+ };
133
+ /**
134
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
135
+ */
136
+ export declare const TokenScope: {
137
+ readonly Workspace: "workspace";
138
+ readonly Intern: "intern";
139
+ };
140
+ /**
141
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
142
+ */
143
+ export type TokenScope = OpenEnum<typeof TokenScope>;
144
+ export type Token = {
145
+ holdsToken: boolean;
146
+ login: string;
147
+ owner: string | null;
148
+ repositoryCount: number | null;
149
+ /**
150
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
151
+ */
152
+ scope: TokenScope;
153
+ };
154
+ export type Github = {
155
+ apps: Array<App>;
156
+ tokens: Array<Token>;
157
+ };
158
+ /**
159
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
160
+ */
161
+ export declare const AccountScope: {
162
+ readonly Workspace: "workspace";
163
+ readonly Intern: "intern";
164
+ };
165
+ /**
166
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
167
+ */
168
+ export type AccountScope = OpenEnum<typeof AccountScope>;
169
+ export type Account = {
170
+ delegatedCapabilities: Array<string>;
171
+ email: string;
172
+ holdsGrant: boolean;
173
+ isDelegatedToIntern: boolean;
174
+ /**
175
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
176
+ */
177
+ scope: AccountScope;
178
+ };
179
+ export type Google = {
180
+ accounts: Array<Account>;
181
+ };
182
+ export type HostRule = {
183
+ holdsSecret: boolean;
184
+ host: string;
185
+ secretName: string;
186
+ };
187
+ export type Route = {
188
+ host: string;
189
+ pathPrefix: string | null;
190
+ };
191
+ export declare const McpOriginState: {
192
+ readonly Usable: "usable";
193
+ readonly NoCredential: "no_credential";
194
+ readonly Failing: "failing";
195
+ };
196
+ export type McpOriginState = OpenEnum<typeof McpOriginState>;
197
+ /**
198
+ * The vault's decision for a request to this server; null for members' own accounts, decided per acting member.
199
+ */
200
+ export type McpOriginStatus = {
201
+ /**
202
+ * The credential failure code when `state` is `failing`; null otherwise.
203
+ */
204
+ failure: string | null;
205
+ state: McpOriginState;
206
+ };
207
+ export type McpOrigin = {
208
+ accountKey: string | null;
209
+ host: string;
210
+ /**
211
+ * Members' own accounts, matched to the acting member per turn.
212
+ */
213
+ isPersonal: boolean;
214
+ routes: Array<Route>;
215
+ /**
216
+ * The vault's decision for a request to this server; null for members' own accounts, decided per acting member.
217
+ */
218
+ status: McpOriginStatus | null;
219
+ };
220
+ export declare const SecretScope: {
221
+ readonly Intern: "intern";
222
+ readonly Attached: "attached";
223
+ readonly Workspace: "workspace";
224
+ };
225
+ export type SecretScope = OpenEnum<typeof SecretScope>;
226
+ export type Secret = {
227
+ createdAt: string;
228
+ hosts: Array<string> | null;
229
+ name: string;
230
+ scope: SecretScope;
231
+ };
232
+ export type SlackMemberLink = {
233
+ holdsToken: boolean;
234
+ slackUserId: string;
235
+ };
236
+ export type Slack = {
237
+ /**
238
+ * Members whose own Slack account the vault can act as; whether the intern's own Slack app runs is a runtime fact the `connections` tool reports.
239
+ */
240
+ memberLinks: Array<SlackMemberLink>;
241
+ };
242
+ /**
243
+ * The intern's routing table, for the intern's own key only; null for any other caller or when the vault could not build it in time. The keys still list.
244
+ */
245
+ export type VaultRoutingTable = {
246
+ agentId: string;
247
+ customOrigins: Array<CustomOrigin>;
248
+ github: Github;
249
+ google: Google;
250
+ /**
251
+ * Built-in hosts the vault injects a named secret for, and whether that secret is stored.
252
+ */
253
+ hostRules: Array<HostRule>;
254
+ mcpOrigins: Array<McpOrigin>;
255
+ readAt: Date;
256
+ secrets: Array<Secret>;
257
+ slack: Slack;
258
+ };
259
+ /** @internal */
260
+ export declare const CustomOriginState$inboundSchema: z.ZodType<CustomOriginState, unknown>;
261
+ /** @internal */
262
+ export declare const CustomOriginStatus$inboundSchema: z.ZodType<CustomOriginStatus, unknown>;
263
+ export declare function customOriginStatusFromJSON(jsonString: string): SafeParseResult<CustomOriginStatus, SDKValidationError>;
264
+ /** @internal */
265
+ export declare const CustomOrigin$inboundSchema: z.ZodType<CustomOrigin, unknown>;
266
+ export declare function customOriginFromJSON(jsonString: string): SafeParseResult<CustomOrigin, SDKValidationError>;
267
+ /** @internal */
268
+ export declare const AccountType$inboundSchema: z.ZodType<AccountType, unknown>;
269
+ /** @internal */
270
+ export declare const Selection$inboundSchema: z.ZodType<Selection, unknown>;
271
+ /** @internal */
272
+ export declare const Coverage$inboundSchema: z.ZodType<Coverage, unknown>;
273
+ export declare function coverageFromJSON(jsonString: string): SafeParseResult<Coverage, SDKValidationError>;
274
+ /** @internal */
275
+ export declare const ShadowedBy$inboundSchema: z.ZodType<ShadowedBy, unknown>;
276
+ /** @internal */
277
+ export declare const Installation$inboundSchema: z.ZodType<Installation, unknown>;
278
+ export declare function installationFromJSON(jsonString: string): SafeParseResult<Installation, SDKValidationError>;
279
+ /** @internal */
280
+ export declare const Via$inboundSchema: z.ZodType<Via, unknown>;
281
+ /** @internal */
282
+ export declare const AppMemberLink$inboundSchema: z.ZodType<AppMemberLink, unknown>;
283
+ export declare function appMemberLinkFromJSON(jsonString: string): SafeParseResult<AppMemberLink, SDKValidationError>;
284
+ /** @internal */
285
+ export declare const AppScope$inboundSchema: z.ZodType<AppScope, unknown>;
286
+ /** @internal */
287
+ export declare const App$inboundSchema: z.ZodType<App, unknown>;
288
+ export declare function appFromJSON(jsonString: string): SafeParseResult<App, SDKValidationError>;
289
+ /** @internal */
290
+ export declare const TokenScope$inboundSchema: z.ZodType<TokenScope, unknown>;
291
+ /** @internal */
292
+ export declare const Token$inboundSchema: z.ZodType<Token, unknown>;
293
+ export declare function tokenFromJSON(jsonString: string): SafeParseResult<Token, SDKValidationError>;
294
+ /** @internal */
295
+ export declare const Github$inboundSchema: z.ZodType<Github, unknown>;
296
+ export declare function githubFromJSON(jsonString: string): SafeParseResult<Github, SDKValidationError>;
297
+ /** @internal */
298
+ export declare const AccountScope$inboundSchema: z.ZodType<AccountScope, unknown>;
299
+ /** @internal */
300
+ export declare const Account$inboundSchema: z.ZodType<Account, unknown>;
301
+ export declare function accountFromJSON(jsonString: string): SafeParseResult<Account, SDKValidationError>;
302
+ /** @internal */
303
+ export declare const Google$inboundSchema: z.ZodType<Google, unknown>;
304
+ export declare function googleFromJSON(jsonString: string): SafeParseResult<Google, SDKValidationError>;
305
+ /** @internal */
306
+ export declare const HostRule$inboundSchema: z.ZodType<HostRule, unknown>;
307
+ export declare function hostRuleFromJSON(jsonString: string): SafeParseResult<HostRule, SDKValidationError>;
308
+ /** @internal */
309
+ export declare const Route$inboundSchema: z.ZodType<Route, unknown>;
310
+ export declare function routeFromJSON(jsonString: string): SafeParseResult<Route, SDKValidationError>;
311
+ /** @internal */
312
+ export declare const McpOriginState$inboundSchema: z.ZodType<McpOriginState, unknown>;
313
+ /** @internal */
314
+ export declare const McpOriginStatus$inboundSchema: z.ZodType<McpOriginStatus, unknown>;
315
+ export declare function mcpOriginStatusFromJSON(jsonString: string): SafeParseResult<McpOriginStatus, SDKValidationError>;
316
+ /** @internal */
317
+ export declare const McpOrigin$inboundSchema: z.ZodType<McpOrigin, unknown>;
318
+ export declare function mcpOriginFromJSON(jsonString: string): SafeParseResult<McpOrigin, SDKValidationError>;
319
+ /** @internal */
320
+ export declare const SecretScope$inboundSchema: z.ZodType<SecretScope, unknown>;
321
+ /** @internal */
322
+ export declare const Secret$inboundSchema: z.ZodType<Secret, unknown>;
323
+ export declare function secretFromJSON(jsonString: string): SafeParseResult<Secret, SDKValidationError>;
324
+ /** @internal */
325
+ export declare const SlackMemberLink$inboundSchema: z.ZodType<SlackMemberLink, unknown>;
326
+ export declare function slackMemberLinkFromJSON(jsonString: string): SafeParseResult<SlackMemberLink, SDKValidationError>;
327
+ /** @internal */
328
+ export declare const Slack$inboundSchema: z.ZodType<Slack, unknown>;
329
+ export declare function slackFromJSON(jsonString: string): SafeParseResult<Slack, SDKValidationError>;
330
+ /** @internal */
331
+ export declare const VaultRoutingTable$inboundSchema: z.ZodType<VaultRoutingTable, unknown>;
332
+ export declare function vaultRoutingTableFromJSON(jsonString: string): SafeParseResult<VaultRoutingTable, SDKValidationError>;
333
+ //# sourceMappingURL=vaultroutingtable.d.ts.map
@@ -0,0 +1,341 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 920bcc895e92
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import * as openEnums from "../types/enums.js";
9
+ export const CustomOriginState = {
10
+ Usable: "usable",
11
+ NoCredential: "no_credential",
12
+ Failing: "failing",
13
+ };
14
+ export const AccountType = {
15
+ Organization: "organization",
16
+ User: "user",
17
+ };
18
+ export const Selection = {
19
+ All: "all",
20
+ Selected: "selected",
21
+ };
22
+ /**
23
+ * What egress uses instead of this installation for a request to its account: an earlier installation on the same account, or a token pinned to the account. Null when this installation answers.
24
+ */
25
+ export const ShadowedBy = {
26
+ Installation: "installation",
27
+ Token: "token",
28
+ };
29
+ /**
30
+ * How the vault picks this link for the App, by the same selection egress uses.
31
+ */
32
+ export const Via = {
33
+ AppLink: "app_link",
34
+ Token: "token",
35
+ AnyLink: "any_link",
36
+ };
37
+ /**
38
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
39
+ */
40
+ export const AppScope = {
41
+ Workspace: "workspace",
42
+ Intern: "intern",
43
+ };
44
+ /**
45
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
46
+ */
47
+ export const TokenScope = {
48
+ Workspace: "workspace",
49
+ Intern: "intern",
50
+ };
51
+ /**
52
+ * `workspace` applies to every intern of the workspace; `intern` to this intern alone.
53
+ */
54
+ export const AccountScope = {
55
+ Workspace: "workspace",
56
+ Intern: "intern",
57
+ };
58
+ export const McpOriginState = {
59
+ Usable: "usable",
60
+ NoCredential: "no_credential",
61
+ Failing: "failing",
62
+ };
63
+ export const SecretScope = {
64
+ Intern: "intern",
65
+ Attached: "attached",
66
+ Workspace: "workspace",
67
+ };
68
+ /** @internal */
69
+ export const CustomOriginState$inboundSchema = openEnums.inboundSchema(CustomOriginState);
70
+ /** @internal */
71
+ export const CustomOriginStatus$inboundSchema = z.object({
72
+ failure: z.nullable(z.string()),
73
+ state: CustomOriginState$inboundSchema,
74
+ });
75
+ export function customOriginStatusFromJSON(jsonString) {
76
+ return safeParse(jsonString, (x) => CustomOriginStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CustomOriginStatus' from JSON`);
77
+ }
78
+ /** @internal */
79
+ export const CustomOrigin$inboundSchema = z
80
+ .object({
81
+ host: z.string(),
82
+ path_prefix: z.nullable(z.string()),
83
+ status: z.lazy(() => CustomOriginStatus$inboundSchema),
84
+ }).transform((v) => {
85
+ return remap$(v, {
86
+ "path_prefix": "pathPrefix",
87
+ });
88
+ });
89
+ export function customOriginFromJSON(jsonString) {
90
+ return safeParse(jsonString, (x) => CustomOrigin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CustomOrigin' from JSON`);
91
+ }
92
+ /** @internal */
93
+ export const AccountType$inboundSchema = openEnums.inboundSchema(AccountType);
94
+ /** @internal */
95
+ export const Selection$inboundSchema = openEnums
96
+ .inboundSchema(Selection);
97
+ /** @internal */
98
+ export const Coverage$inboundSchema = z.object({
99
+ checked_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
100
+ repository_count: z.nullable(z.int()),
101
+ selection: Selection$inboundSchema,
102
+ }).transform((v) => {
103
+ return remap$(v, {
104
+ "checked_at": "checkedAt",
105
+ "repository_count": "repositoryCount",
106
+ });
107
+ });
108
+ export function coverageFromJSON(jsonString) {
109
+ return safeParse(jsonString, (x) => Coverage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Coverage' from JSON`);
110
+ }
111
+ /** @internal */
112
+ export const ShadowedBy$inboundSchema = openEnums.inboundSchema(ShadowedBy);
113
+ /** @internal */
114
+ export const Installation$inboundSchema = z
115
+ .object({
116
+ account: z.string(),
117
+ account_type: z.nullable(AccountType$inboundSchema),
118
+ coverage: z.nullable(z.lazy(() => Coverage$inboundSchema)),
119
+ credential_id: z.string(),
120
+ holds_token: z.boolean(),
121
+ is_enabled: z.boolean(),
122
+ is_off_for_intern: z.boolean(),
123
+ shadowed_by: z.nullable(ShadowedBy$inboundSchema),
124
+ }).transform((v) => {
125
+ return remap$(v, {
126
+ "account_type": "accountType",
127
+ "credential_id": "credentialId",
128
+ "holds_token": "holdsToken",
129
+ "is_enabled": "isEnabled",
130
+ "is_off_for_intern": "isOffForIntern",
131
+ "shadowed_by": "shadowedBy",
132
+ });
133
+ });
134
+ export function installationFromJSON(jsonString) {
135
+ return safeParse(jsonString, (x) => Installation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Installation' from JSON`);
136
+ }
137
+ /** @internal */
138
+ export const Via$inboundSchema = openEnums
139
+ .inboundSchema(Via);
140
+ /** @internal */
141
+ export const AppMemberLink$inboundSchema = z
142
+ .object({
143
+ holds_token: z.boolean(),
144
+ login: z.string(),
145
+ via: Via$inboundSchema,
146
+ }).transform((v) => {
147
+ return remap$(v, {
148
+ "holds_token": "holdsToken",
149
+ });
150
+ });
151
+ export function appMemberLinkFromJSON(jsonString) {
152
+ return safeParse(jsonString, (x) => AppMemberLink$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AppMemberLink' from JSON`);
153
+ }
154
+ /** @internal */
155
+ export const AppScope$inboundSchema = openEnums
156
+ .inboundSchema(AppScope);
157
+ /** @internal */
158
+ export const App$inboundSchema = z.object({
159
+ app_id: z.nullable(z.string()),
160
+ app_slug: z.nullable(z.string()),
161
+ installations: z.array(z.lazy(() => Installation$inboundSchema)),
162
+ member_links: z.array(z.lazy(() => AppMemberLink$inboundSchema)),
163
+ scope: AppScope$inboundSchema,
164
+ }).transform((v) => {
165
+ return remap$(v, {
166
+ "app_id": "appId",
167
+ "app_slug": "appSlug",
168
+ "member_links": "memberLinks",
169
+ });
170
+ });
171
+ export function appFromJSON(jsonString) {
172
+ return safeParse(jsonString, (x) => App$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'App' from JSON`);
173
+ }
174
+ /** @internal */
175
+ export const TokenScope$inboundSchema = openEnums.inboundSchema(TokenScope);
176
+ /** @internal */
177
+ export const Token$inboundSchema = z.object({
178
+ holds_token: z.boolean(),
179
+ login: z.string(),
180
+ owner: z.nullable(z.string()),
181
+ repository_count: z.nullable(z.int()),
182
+ scope: TokenScope$inboundSchema,
183
+ }).transform((v) => {
184
+ return remap$(v, {
185
+ "holds_token": "holdsToken",
186
+ "repository_count": "repositoryCount",
187
+ });
188
+ });
189
+ export function tokenFromJSON(jsonString) {
190
+ return safeParse(jsonString, (x) => Token$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Token' from JSON`);
191
+ }
192
+ /** @internal */
193
+ export const Github$inboundSchema = z.object({
194
+ apps: z.array(z.lazy(() => App$inboundSchema)),
195
+ tokens: z.array(z.lazy(() => Token$inboundSchema)),
196
+ });
197
+ export function githubFromJSON(jsonString) {
198
+ return safeParse(jsonString, (x) => Github$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Github' from JSON`);
199
+ }
200
+ /** @internal */
201
+ export const AccountScope$inboundSchema = openEnums.inboundSchema(AccountScope);
202
+ /** @internal */
203
+ export const Account$inboundSchema = z.object({
204
+ delegated_capabilities: z.array(z.string()),
205
+ email: z.string(),
206
+ holds_grant: z.boolean(),
207
+ is_delegated_to_intern: z.boolean(),
208
+ scope: AccountScope$inboundSchema,
209
+ }).transform((v) => {
210
+ return remap$(v, {
211
+ "delegated_capabilities": "delegatedCapabilities",
212
+ "holds_grant": "holdsGrant",
213
+ "is_delegated_to_intern": "isDelegatedToIntern",
214
+ });
215
+ });
216
+ export function accountFromJSON(jsonString) {
217
+ return safeParse(jsonString, (x) => Account$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Account' from JSON`);
218
+ }
219
+ /** @internal */
220
+ export const Google$inboundSchema = z.object({
221
+ accounts: z.array(z.lazy(() => Account$inboundSchema)),
222
+ });
223
+ export function googleFromJSON(jsonString) {
224
+ return safeParse(jsonString, (x) => Google$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Google' from JSON`);
225
+ }
226
+ /** @internal */
227
+ export const HostRule$inboundSchema = z.object({
228
+ holds_secret: z.boolean(),
229
+ host: z.string(),
230
+ secret_name: z.string(),
231
+ }).transform((v) => {
232
+ return remap$(v, {
233
+ "holds_secret": "holdsSecret",
234
+ "secret_name": "secretName",
235
+ });
236
+ });
237
+ export function hostRuleFromJSON(jsonString) {
238
+ return safeParse(jsonString, (x) => HostRule$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HostRule' from JSON`);
239
+ }
240
+ /** @internal */
241
+ export const Route$inboundSchema = z.object({
242
+ host: z.string(),
243
+ path_prefix: z.nullable(z.string()),
244
+ }).transform((v) => {
245
+ return remap$(v, {
246
+ "path_prefix": "pathPrefix",
247
+ });
248
+ });
249
+ export function routeFromJSON(jsonString) {
250
+ return safeParse(jsonString, (x) => Route$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Route' from JSON`);
251
+ }
252
+ /** @internal */
253
+ export const McpOriginState$inboundSchema = openEnums.inboundSchema(McpOriginState);
254
+ /** @internal */
255
+ export const McpOriginStatus$inboundSchema = z.object({
256
+ failure: z.nullable(z.string()),
257
+ state: McpOriginState$inboundSchema,
258
+ });
259
+ export function mcpOriginStatusFromJSON(jsonString) {
260
+ return safeParse(jsonString, (x) => McpOriginStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpOriginStatus' from JSON`);
261
+ }
262
+ /** @internal */
263
+ export const McpOrigin$inboundSchema = z.object({
264
+ account_key: z.nullable(z.string()),
265
+ host: z.string(),
266
+ is_personal: z.boolean(),
267
+ routes: z.array(z.lazy(() => Route$inboundSchema)),
268
+ status: z.nullable(z.lazy(() => McpOriginStatus$inboundSchema)),
269
+ }).transform((v) => {
270
+ return remap$(v, {
271
+ "account_key": "accountKey",
272
+ "is_personal": "isPersonal",
273
+ });
274
+ });
275
+ export function mcpOriginFromJSON(jsonString) {
276
+ return safeParse(jsonString, (x) => McpOrigin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'McpOrigin' from JSON`);
277
+ }
278
+ /** @internal */
279
+ export const SecretScope$inboundSchema = openEnums.inboundSchema(SecretScope);
280
+ /** @internal */
281
+ export const Secret$inboundSchema = z.object({
282
+ created_at: z.string(),
283
+ hosts: z.nullable(z.array(z.string())),
284
+ name: z.string(),
285
+ scope: SecretScope$inboundSchema,
286
+ }).transform((v) => {
287
+ return remap$(v, {
288
+ "created_at": "createdAt",
289
+ });
290
+ });
291
+ export function secretFromJSON(jsonString) {
292
+ return safeParse(jsonString, (x) => Secret$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Secret' from JSON`);
293
+ }
294
+ /** @internal */
295
+ export const SlackMemberLink$inboundSchema = z.object({
296
+ holds_token: z.boolean(),
297
+ slack_user_id: z.string(),
298
+ }).transform((v) => {
299
+ return remap$(v, {
300
+ "holds_token": "holdsToken",
301
+ "slack_user_id": "slackUserId",
302
+ });
303
+ });
304
+ export function slackMemberLinkFromJSON(jsonString) {
305
+ return safeParse(jsonString, (x) => SlackMemberLink$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SlackMemberLink' from JSON`);
306
+ }
307
+ /** @internal */
308
+ export const Slack$inboundSchema = z.object({
309
+ member_links: z.array(z.lazy(() => SlackMemberLink$inboundSchema)),
310
+ }).transform((v) => {
311
+ return remap$(v, {
312
+ "member_links": "memberLinks",
313
+ });
314
+ });
315
+ export function slackFromJSON(jsonString) {
316
+ return safeParse(jsonString, (x) => Slack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Slack' from JSON`);
317
+ }
318
+ /** @internal */
319
+ export const VaultRoutingTable$inboundSchema = z.object({
320
+ agent_id: z.string(),
321
+ custom_origins: z.array(z.lazy(() => CustomOrigin$inboundSchema)),
322
+ github: z.lazy(() => Github$inboundSchema),
323
+ google: z.lazy(() => Google$inboundSchema),
324
+ host_rules: z.array(z.lazy(() => HostRule$inboundSchema)),
325
+ mcp_origins: z.array(z.lazy(() => McpOrigin$inboundSchema)),
326
+ read_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
327
+ secrets: z.array(z.lazy(() => Secret$inboundSchema)),
328
+ slack: z.lazy(() => Slack$inboundSchema),
329
+ }).transform((v) => {
330
+ return remap$(v, {
331
+ "agent_id": "agentId",
332
+ "custom_origins": "customOrigins",
333
+ "host_rules": "hostRules",
334
+ "mcp_origins": "mcpOrigins",
335
+ "read_at": "readAt",
336
+ });
337
+ });
338
+ export function vaultRoutingTableFromJSON(jsonString) {
339
+ return safeParse(jsonString, (x) => VaultRoutingTable$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultRoutingTable' from JSON`);
340
+ }
341
+ //# sourceMappingURL=vaultroutingtable.js.map
@@ -6,7 +6,7 @@ export declare class Vault extends ClientSDK {
6
6
  * List the connections an intern can use
7
7
  *
8
8
  * @remarks
9
- * Lists the connections in scope for the intern, by the key of their card on the dashboard's Connections tab: `github`, `slack`, `google`, a catalog MCP server such as `linear` or `notion`, or `mcp:<host>` for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. `ori features add` checks a feature's `ori.requires.connections` against this list. Keys only, never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern's own API key is confined to that intern: it can always read the intern's secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
9
+ * Lists the connections in scope for the intern, by the key of their card on the dashboard's Connections tab: `github`, `slack`, `google`, a catalog MCP server such as `linear` or `notion`, or `mcp:<host>` for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. `ori features add` checks a feature's `ori.requires.connections` against this list. `routing` is the vault's routing table for the intern: the credentials it holds and what it would inject each for, from the same lookups the egress proxy picks a credential with, GitHub repository coverage read through the installation token and cached. `routing_text` is that table as the lines the intern reads in its instructions. Never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern's own API key is confined to that intern: it can always read the intern's secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
10
10
  */
11
11
  listInternConnections(request: operations.ListInternConnectionsRequest, options?: RequestOptions): Promise<operations.ListInternConnectionsResponse>;
12
12
  /**
package/esm/sdk/vault.js CHANGED
@@ -18,7 +18,7 @@ export class Vault extends ClientSDK {
18
18
  * List the connections an intern can use
19
19
  *
20
20
  * @remarks
21
- * Lists the connections in scope for the intern, by the key of their card on the dashboard's Connections tab: `github`, `slack`, `google`, a catalog MCP server such as `linear` or `notion`, or `mcp:<host>` for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. `ori features add` checks a feature's `ori.requires.connections` against this list. Keys only, never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern's own API key is confined to that intern: it can always read the intern's secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
+ * Lists the connections in scope for the intern, by the key of their card on the dashboard's Connections tab: `github`, `slack`, `google`, a catalog MCP server such as `linear` or `notion`, or `mcp:<host>` for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. `ori features add` checks a feature's `ori.requires.connections` against this list. `routing` is the vault's routing table for the intern: the credentials it holds and what it would inject each for, from the same lookups the egress proxy picks a credential with, GitHub repository coverage read through the installation token and cached. `routing_text` is that table as the lines the intern reads in its instructions. Never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern's own API key is confined to that intern: it can always read the intern's secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
22
22
  */
23
23
  async listInternConnections(request, options) {
24
24
  return unwrapAsync(vaultListInternConnections(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.16",
5
+ "version": "1.5.17",
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.5.16",
3
+ "version": "1.5.17",
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 && node scripts/unbarrel-imports.js",
75
75
  "prepublishOnly": "npm run build",
76
- "test:transit": "exit 0",
77
- "test:watch": "vitest --watch --project unit",
78
- "typecheck": "tsc --noEmit",
79
- "typecheck:transit": "exit 0",
76
+ "compile": "tsc && node scripts/unbarrel-imports.js",
80
77
  "postinstall": "node scripts/check-types.js || true",
81
78
  "test": "vitest --run --project unit",
82
79
  "test:e2e": "vitest --run --project e2e",
83
- "compile": "tsc && node scripts/unbarrel-imports.js",
84
- "prepare": "npm run build"
80
+ "test:watch": "vitest --watch --project unit",
81
+ "typecheck": "tsc --noEmit",
82
+ "prepare": "npm run build",
83
+ "test:transit": "exit 0",
84
+ "typecheck:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {
87
87