@openrouter/sdk 1.3.34 → 1.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/funcs/internsGetInternDaemon.d.ts +21 -0
- package/esm/funcs/internsGetInternDaemon.js +105 -0
- package/esm/funcs/internsGetInternDaemonAccess.d.ts +4 -2
- package/esm/funcs/internsGetInternDaemonAccess.js +4 -2
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/messagesrequest.d.ts +14 -4
- package/esm/models/messagesrequest.js +9 -0
- package/esm/models/operations/getinterndaemon.d.ts +58 -0
- package/esm/models/operations/getinterndaemon.js +21 -0
- package/esm/models/operations/index.d.ts +1 -0
- package/esm/models/operations/index.js +1 -0
- package/esm/sdk/interns.d.ts +9 -0
- package/esm/sdk/interns.js +12 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as models from "../models/index.js";
|
|
9
|
+
import * as operations from "../models/operations/index.js";
|
|
10
|
+
import { APIPromise } from "../types/async.js";
|
|
11
|
+
import { Result } from "../types/fp.js";
|
|
12
|
+
/**
|
|
13
|
+
* Get an intern's daemon access
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
17
|
+
*
|
|
18
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
19
|
+
*/
|
|
20
|
+
export declare function internsGetInternDaemon(client: OpenRouterCore, request: operations.GetInternDaemonRequest, options?: RequestOptions): APIPromise<Result<models.InternDaemonAccess, errors.InternLifecycleError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
21
|
+
//# sourceMappingURL=internsGetInternDaemon.d.ts.map
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 727cbeff5468
|
|
4
|
+
*/
|
|
5
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import { InternLifecycleError$inboundSchema as errors_InternLifecycleError$inboundSchema } from "../models/errors/internlifecycleerror.js";
|
|
13
|
+
import { InternDaemonAccess$inboundSchema as models_InternDaemonAccess$inboundSchema } from "../models/interndaemonaccess.js";
|
|
14
|
+
import { GetInternDaemonRequest$outboundSchema as operations_GetInternDaemonRequest$outboundSchema } from "../models/operations/getinterndaemon.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* Get an intern's daemon access
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
21
|
+
*
|
|
22
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
23
|
+
*/
|
|
24
|
+
export function internsGetInternDaemon(client, request, options) {
|
|
25
|
+
return new APIPromise($do(client, request, options));
|
|
26
|
+
}
|
|
27
|
+
async function $do(client, request, options) {
|
|
28
|
+
const parsed = safeParse(request, (value) => operations_GetInternDaemonRequest$outboundSchema.parse(value), "Input validation failed");
|
|
29
|
+
if (!parsed.ok) {
|
|
30
|
+
return [parsed, { status: "invalid" }];
|
|
31
|
+
}
|
|
32
|
+
const payload = parsed.value;
|
|
33
|
+
const body = null;
|
|
34
|
+
const pathParams = {
|
|
35
|
+
internId: encodeSimple("internId", payload.internId, {
|
|
36
|
+
explode: false,
|
|
37
|
+
charEncoding: "percent",
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
const path = pathToFunc("/interns/{internId}/daemon")(pathParams);
|
|
41
|
+
const headers = new Headers(compactMap({
|
|
42
|
+
Accept: "application/json",
|
|
43
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
44
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
45
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
46
|
+
}));
|
|
47
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
48
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
49
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
50
|
+
const context = {
|
|
51
|
+
options: client._options,
|
|
52
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
53
|
+
operationID: "getInternDaemon",
|
|
54
|
+
oAuth2Scopes: null,
|
|
55
|
+
resolvedSecurity: requestSecurity,
|
|
56
|
+
securitySource: client._options.apiKey,
|
|
57
|
+
retryConfig: options?.retries
|
|
58
|
+
|| client._options.retryConfig
|
|
59
|
+
|| {
|
|
60
|
+
strategy: "backoff",
|
|
61
|
+
backoff: {
|
|
62
|
+
initialInterval: 500,
|
|
63
|
+
maxInterval: 60000,
|
|
64
|
+
exponent: 1.5,
|
|
65
|
+
maxElapsedTime: 3600000,
|
|
66
|
+
},
|
|
67
|
+
retryConnectionErrors: true,
|
|
68
|
+
}
|
|
69
|
+
|| { strategy: "none" },
|
|
70
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
71
|
+
};
|
|
72
|
+
const requestRes = client._createRequest(context, {
|
|
73
|
+
security: requestSecurity,
|
|
74
|
+
method: "GET",
|
|
75
|
+
baseURL: options?.serverURL,
|
|
76
|
+
path: path,
|
|
77
|
+
headers: headers,
|
|
78
|
+
body: body,
|
|
79
|
+
userAgent: client._options.userAgent,
|
|
80
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
81
|
+
}, options);
|
|
82
|
+
if (!requestRes.ok) {
|
|
83
|
+
return [requestRes, { status: "invalid" }];
|
|
84
|
+
}
|
|
85
|
+
const req = requestRes.value;
|
|
86
|
+
const doResult = await client._do(req, {
|
|
87
|
+
context,
|
|
88
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
89
|
+
retryConfig: context.retryConfig,
|
|
90
|
+
retryCodes: context.retryCodes,
|
|
91
|
+
});
|
|
92
|
+
if (!doResult.ok) {
|
|
93
|
+
return [doResult, { status: "request-error", request: req }];
|
|
94
|
+
}
|
|
95
|
+
const response = doResult.value;
|
|
96
|
+
const responseFields = {
|
|
97
|
+
HttpMeta: { Response: response, Request: req },
|
|
98
|
+
};
|
|
99
|
+
const [result] = await M.match(M.json(200, models_InternDaemonAccess$inboundSchema), M.jsonErr([401, 403, 404, 408, 409], errors_InternLifecycleError$inboundSchema), M.jsonErr(500, errors_InternLifecycleError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
100
|
+
if (!result.ok) {
|
|
101
|
+
return [result, { status: "complete", request: req, response }];
|
|
102
|
+
}
|
|
103
|
+
return [result, { status: "complete", request: req, response }];
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=internsGetInternDaemon.js.map
|
|
@@ -10,12 +10,14 @@ import * as operations from "../models/operations/index.js";
|
|
|
10
10
|
import { APIPromise } from "../types/async.js";
|
|
11
11
|
import { Result } from "../types/fp.js";
|
|
12
12
|
/**
|
|
13
|
-
* Get an intern's daemon access
|
|
13
|
+
* Get an intern's daemon access (deprecated alias)
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
*
|
|
16
|
+
* Deprecated alias of `GET /interns/{internId}/daemon` with the same request, response, and errors. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
17
17
|
*
|
|
18
18
|
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
19
21
|
*/
|
|
20
22
|
export declare function internsGetInternDaemonAccess(client: OpenRouterCore, request: operations.GetInternDaemonAccessRequest, options?: RequestOptions): APIPromise<Result<models.InternDaemonAccess, errors.InternLifecycleError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
21
23
|
//# sourceMappingURL=internsGetInternDaemonAccess.d.ts.map
|
|
@@ -14,12 +14,14 @@ import { InternDaemonAccess$inboundSchema as models_InternDaemonAccess$inboundSc
|
|
|
14
14
|
import { GetInternDaemonAccessRequest$outboundSchema as operations_GetInternDaemonAccessRequest$outboundSchema } from "../models/operations/getinterndaemonaccess.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
17
|
-
* Get an intern's daemon access
|
|
17
|
+
* Get an intern's daemon access (deprecated alias)
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
*
|
|
20
|
+
* Deprecated alias of `GET /interns/{internId}/daemon` with the same request, response, and errors. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
21
21
|
*
|
|
22
22
|
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
23
|
+
*
|
|
24
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
23
25
|
*/
|
|
24
26
|
export function internsGetInternDaemonAccess(client, request, options) {
|
|
25
27
|
return new APIPromise($do(client, request, options));
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.3.
|
|
53
|
+
readonly sdkVersion: "1.3.35";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.3.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.3.35 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.3.
|
|
32
|
+
sdkVersion: "1.3.35",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.3.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.3.35 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -99,6 +99,9 @@ export declare const Speed: {
|
|
|
99
99
|
*/
|
|
100
100
|
export type Speed = OpenEnum<typeof Speed>;
|
|
101
101
|
export type System = string | Array<AnthropicTextBlockParam>;
|
|
102
|
+
export type ThinkingBetweenTools = {
|
|
103
|
+
type: "between_tools";
|
|
104
|
+
};
|
|
102
105
|
export type ThinkingAdaptive = {
|
|
103
106
|
blockBinding?: AnthropicThinkingBlockBinding | null | undefined;
|
|
104
107
|
display?: AnthropicThinkingDisplay | null | undefined;
|
|
@@ -113,7 +116,7 @@ export type ThinkingEnabled = {
|
|
|
113
116
|
display?: AnthropicThinkingDisplay | null | undefined;
|
|
114
117
|
type: "enabled";
|
|
115
118
|
};
|
|
116
|
-
export type Thinking = ThinkingEnabled | ThinkingDisabled | ThinkingAdaptive;
|
|
119
|
+
export type Thinking = ThinkingEnabled | ThinkingDisabled | ThinkingAdaptive | ThinkingBetweenTools;
|
|
117
120
|
export type ToolChoiceTool = {
|
|
118
121
|
disableParallelToolUse?: boolean | undefined;
|
|
119
122
|
name: string;
|
|
@@ -301,7 +304,7 @@ export type MessagesRequest = {
|
|
|
301
304
|
stream?: boolean | undefined;
|
|
302
305
|
system?: string | Array<AnthropicTextBlockParam> | undefined;
|
|
303
306
|
temperature?: number | undefined;
|
|
304
|
-
thinking?: ThinkingEnabled | ThinkingDisabled | ThinkingAdaptive | undefined;
|
|
307
|
+
thinking?: ThinkingEnabled | ThinkingDisabled | ThinkingAdaptive | ThinkingBetweenTools | undefined;
|
|
305
308
|
toolChoice?: ToolChoiceAuto | ToolChoiceAny | ToolChoiceNone | ToolChoiceTool | undefined;
|
|
306
309
|
tools?: Array<ToolAdvisor20260301 | ToolCustom | ToolBash20250124 | ToolTextEditor20250124 | ToolWebSearch20250305 | ToolWebSearch20260209 | AnthropicToolSearchToolBm25 | AnthropicToolSearchToolRegex | BashServerTool | DatetimeServerTool | ImageGenerationServerToolOpenRouter | MessagesSearchModelsServerTool | WebFetchServerTool | OpenRouterWebSearchServerTool | MessagesRequestTool | ShellServerToolOpenRouter | ToolSearchServerTool> | undefined;
|
|
307
310
|
topK?: number | undefined;
|
|
@@ -413,6 +416,13 @@ export type System$Outbound = string | Array<AnthropicTextBlockParam$Outbound>;
|
|
|
413
416
|
export declare const System$outboundSchema: z.ZodType<System$Outbound, System>;
|
|
414
417
|
export declare function systemToJSON(system: System): string;
|
|
415
418
|
/** @internal */
|
|
419
|
+
export type ThinkingBetweenTools$Outbound = {
|
|
420
|
+
type: "between_tools";
|
|
421
|
+
};
|
|
422
|
+
/** @internal */
|
|
423
|
+
export declare const ThinkingBetweenTools$outboundSchema: z.ZodType<ThinkingBetweenTools$Outbound, ThinkingBetweenTools>;
|
|
424
|
+
export declare function thinkingBetweenToolsToJSON(thinkingBetweenTools: ThinkingBetweenTools): string;
|
|
425
|
+
/** @internal */
|
|
416
426
|
export type ThinkingAdaptive$Outbound = {
|
|
417
427
|
block_binding?: AnthropicThinkingBlockBinding$Outbound | null | undefined;
|
|
418
428
|
display?: string | null | undefined;
|
|
@@ -439,7 +449,7 @@ export type ThinkingEnabled$Outbound = {
|
|
|
439
449
|
export declare const ThinkingEnabled$outboundSchema: z.ZodType<ThinkingEnabled$Outbound, ThinkingEnabled>;
|
|
440
450
|
export declare function thinkingEnabledToJSON(thinkingEnabled: ThinkingEnabled): string;
|
|
441
451
|
/** @internal */
|
|
442
|
-
export type Thinking$Outbound = ThinkingEnabled$Outbound | ThinkingDisabled$Outbound | ThinkingAdaptive$Outbound;
|
|
452
|
+
export type Thinking$Outbound = ThinkingEnabled$Outbound | ThinkingDisabled$Outbound | ThinkingAdaptive$Outbound | ThinkingBetweenTools$Outbound;
|
|
443
453
|
/** @internal */
|
|
444
454
|
export declare const Thinking$outboundSchema: z.ZodType<Thinking$Outbound, Thinking>;
|
|
445
455
|
export declare function thinkingToJSON(thinking: Thinking): string;
|
|
@@ -619,7 +629,7 @@ export type MessagesRequest$Outbound = {
|
|
|
619
629
|
stream?: boolean | undefined;
|
|
620
630
|
system?: string | Array<AnthropicTextBlockParam$Outbound> | undefined;
|
|
621
631
|
temperature?: number | undefined;
|
|
622
|
-
thinking?: ThinkingEnabled$Outbound | ThinkingDisabled$Outbound | ThinkingAdaptive$Outbound | undefined;
|
|
632
|
+
thinking?: ThinkingEnabled$Outbound | ThinkingDisabled$Outbound | ThinkingAdaptive$Outbound | ThinkingBetweenTools$Outbound | undefined;
|
|
623
633
|
tool_choice?: ToolChoiceAuto$Outbound | ToolChoiceAny$Outbound | ToolChoiceNone$Outbound | ToolChoiceTool$Outbound | undefined;
|
|
624
634
|
tools?: Array<ToolAdvisor20260301$Outbound | ToolCustom$Outbound | ToolBash20250124$Outbound | ToolTextEditor20250124$Outbound | ToolWebSearch20250305$Outbound | ToolWebSearch20260209$Outbound | AnthropicToolSearchToolBm25$Outbound | AnthropicToolSearchToolRegex$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | ImageGenerationServerToolOpenRouter$Outbound | MessagesSearchModelsServerTool$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | MessagesRequestTool$Outbound | ShellServerToolOpenRouter$Outbound | ToolSearchServerTool$Outbound> | undefined;
|
|
625
635
|
top_k?: number | undefined;
|
|
@@ -246,6 +246,13 @@ export function systemToJSON(system) {
|
|
|
246
246
|
return JSON.stringify(System$outboundSchema.parse(system));
|
|
247
247
|
}
|
|
248
248
|
/** @internal */
|
|
249
|
+
export const ThinkingBetweenTools$outboundSchema = z.object({
|
|
250
|
+
type: z.literal("between_tools"),
|
|
251
|
+
});
|
|
252
|
+
export function thinkingBetweenToolsToJSON(thinkingBetweenTools) {
|
|
253
|
+
return JSON.stringify(ThinkingBetweenTools$outboundSchema.parse(thinkingBetweenTools));
|
|
254
|
+
}
|
|
255
|
+
/** @internal */
|
|
249
256
|
export const ThinkingAdaptive$outboundSchema = z.object({
|
|
250
257
|
blockBinding: z.nullable(AnthropicThinkingBlockBinding$outboundSchema)
|
|
251
258
|
.optional(),
|
|
@@ -288,6 +295,7 @@ export const Thinking$outboundSchema = z
|
|
|
288
295
|
z.lazy(() => ThinkingEnabled$outboundSchema),
|
|
289
296
|
z.lazy(() => ThinkingDisabled$outboundSchema),
|
|
290
297
|
z.lazy(() => ThinkingAdaptive$outboundSchema),
|
|
298
|
+
z.lazy(() => ThinkingBetweenTools$outboundSchema),
|
|
291
299
|
]);
|
|
292
300
|
export function thinkingToJSON(thinking) {
|
|
293
301
|
return JSON.stringify(Thinking$outboundSchema.parse(thinking));
|
|
@@ -580,6 +588,7 @@ export const MessagesRequest$outboundSchema = z.object({
|
|
|
580
588
|
z.lazy(() => ThinkingEnabled$outboundSchema),
|
|
581
589
|
z.lazy(() => ThinkingDisabled$outboundSchema),
|
|
582
590
|
z.lazy(() => ThinkingAdaptive$outboundSchema),
|
|
591
|
+
z.lazy(() => ThinkingBetweenTools$outboundSchema),
|
|
583
592
|
]).optional(),
|
|
584
593
|
toolChoice: z.union([
|
|
585
594
|
z.lazy(() => ToolChoiceAuto$outboundSchema),
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type GetInternDaemonGlobals = {
|
|
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 GetInternDaemonRequest = {
|
|
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
|
+
* ID of an intern visible to the authenticated API key.
|
|
45
|
+
*/
|
|
46
|
+
internId: string;
|
|
47
|
+
};
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type GetInternDaemonRequest$Outbound = {
|
|
50
|
+
"HTTP-Referer"?: string | undefined;
|
|
51
|
+
appTitle?: string | undefined;
|
|
52
|
+
appCategories?: string | undefined;
|
|
53
|
+
internId: string;
|
|
54
|
+
};
|
|
55
|
+
/** @internal */
|
|
56
|
+
export declare const GetInternDaemonRequest$outboundSchema: z.ZodType<GetInternDaemonRequest$Outbound, GetInternDaemonRequest>;
|
|
57
|
+
export declare function getInternDaemonRequestToJSON(getInternDaemonRequest: GetInternDaemonRequest): string;
|
|
58
|
+
//# sourceMappingURL=getinterndaemon.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 2f48932593a9
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const GetInternDaemonRequest$outboundSchema = z.object({
|
|
9
|
+
httpReferer: z.string().optional(),
|
|
10
|
+
appTitle: z.string().optional(),
|
|
11
|
+
appCategories: z.string().optional(),
|
|
12
|
+
internId: z.string(),
|
|
13
|
+
}).transform((v) => {
|
|
14
|
+
return remap$(v, {
|
|
15
|
+
httpReferer: "HTTP-Referer",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
export function getInternDaemonRequestToJSON(getInternDaemonRequest) {
|
|
19
|
+
return JSON.stringify(GetInternDaemonRequest$outboundSchema.parse(getInternDaemonRequest));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=getinterndaemon.js.map
|
|
@@ -57,6 +57,7 @@ export * from "./getfilemetadata.js";
|
|
|
57
57
|
export * from "./getgeneration.js";
|
|
58
58
|
export * from "./getguardrail.js";
|
|
59
59
|
export * from "./getintern.js";
|
|
60
|
+
export * from "./getinterndaemon.js";
|
|
60
61
|
export * from "./getinterndaemonaccess.js";
|
|
61
62
|
export * from "./getkey.js";
|
|
62
63
|
export * from "./getmodel.js";
|
|
@@ -61,6 +61,7 @@ export * from "./getfilemetadata.js";
|
|
|
61
61
|
export * from "./getgeneration.js";
|
|
62
62
|
export * from "./getguardrail.js";
|
|
63
63
|
export * from "./getintern.js";
|
|
64
|
+
export * from "./getinterndaemon.js";
|
|
64
65
|
export * from "./getinterndaemonaccess.js";
|
|
65
66
|
export * from "./getkey.js";
|
|
66
67
|
export * from "./getmodel.js";
|
package/esm/sdk/interns.d.ts
CHANGED
|
@@ -43,6 +43,15 @@ export declare class Interns extends ClientSDK {
|
|
|
43
43
|
* @remarks
|
|
44
44
|
* Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
45
45
|
*/
|
|
46
|
+
getInternDaemon(request: operations.GetInternDaemonRequest, options?: RequestOptions): Promise<models.InternDaemonAccess>;
|
|
47
|
+
/**
|
|
48
|
+
* Get an intern's daemon access (deprecated alias)
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* Deprecated alias of `GET /interns/{internId}/daemon` with the same request, response, and errors. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
52
|
+
*
|
|
53
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
54
|
+
*/
|
|
46
55
|
getInternDaemonAccess(request: operations.GetInternDaemonAccessRequest, options?: RequestOptions): Promise<models.InternDaemonAccess>;
|
|
47
56
|
/**
|
|
48
57
|
* Provision an intern
|
package/esm/sdk/interns.js
CHANGED
|
@@ -6,6 +6,7 @@ import { internsChat } from "../funcs/internsChat.js";
|
|
|
6
6
|
import { internsCreateIntern } from "../funcs/internsCreateIntern.js";
|
|
7
7
|
import { internsDeleteIntern } from "../funcs/internsDeleteIntern.js";
|
|
8
8
|
import { internsGetIntern } from "../funcs/internsGetIntern.js";
|
|
9
|
+
import { internsGetInternDaemon } from "../funcs/internsGetInternDaemon.js";
|
|
9
10
|
import { internsGetInternDaemonAccess } from "../funcs/internsGetInternDaemonAccess.js";
|
|
10
11
|
import { internsInvoke } from "../funcs/internsInvoke.js";
|
|
11
12
|
import { internsListInterns } from "../funcs/internsListInterns.js";
|
|
@@ -66,6 +67,17 @@ export class Interns extends ClientSDK {
|
|
|
66
67
|
* @remarks
|
|
67
68
|
* Returns the origin and daemon token that attach `ori tui --host` to one visible, running intern. The token is a credential: the response is sent with `Cache-Control: no-store`, and each reveal is logged by caller and intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
68
69
|
*/
|
|
70
|
+
async getInternDaemon(request, options) {
|
|
71
|
+
return unwrapAsync(internsGetInternDaemon(this, request, options));
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Get an intern's daemon access (deprecated alias)
|
|
75
|
+
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* Deprecated alias of `GET /interns/{internId}/daemon` with the same request, response, and errors. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
78
|
+
*
|
|
79
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
80
|
+
*/
|
|
69
81
|
async getInternDaemonAccess(request, options) {
|
|
70
82
|
return unwrapAsync(internsGetInternDaemonAccess(this, request, options));
|
|
71
83
|
}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.35",
|
|
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
|
-
"
|
|
25
|
-
"
|
|
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 && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
+
"prepare": "npm run build",
|
|
76
77
|
"typecheck": "tsc --noEmit",
|
|
77
|
-
"typecheck:transit": "exit 0",
|
|
78
78
|
"compile": "tsc && node scripts/unbarrel-imports.js",
|
|
79
79
|
"postinstall": "node scripts/check-types.js || true",
|
|
80
|
-
"prepare": "npm run build",
|
|
81
80
|
"test": "vitest --run --project unit",
|
|
82
81
|
"test:e2e": "vitest --run --project e2e",
|
|
83
82
|
"test:transit": "exit 0",
|
|
84
|
-
"test:watch": "vitest --watch --project unit"
|
|
83
|
+
"test:watch": "vitest --watch --project unit",
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|