@blade-hq/agent-kit 1.0.33 → 1.0.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/README.md +95 -2
- package/dist/chunk-6KO3AOJ7.js +251 -0
- package/dist/chunk-6KO3AOJ7.js.map +1 -0
- package/dist/{chunk-FK4CV6R2.js → chunk-C63X3RCM.js} +629 -32
- package/dist/chunk-C63X3RCM.js.map +1 -0
- package/dist/{chunk-IGMLETZX.js → chunk-DOBX7XP3.js} +15 -12
- package/dist/chunk-DOBX7XP3.js.map +1 -0
- package/dist/{chunk-EGGBOVVF.js → chunk-IP7EZVT5.js} +2 -2
- package/dist/{chunk-OICNN4K4.js → chunk-J6H4TMTH.js} +2 -2
- package/dist/{chunk-F4Y7SUBC.js → chunk-SEHOWQVO.js} +2 -2
- package/dist/{chunk-IDVNG3YJ.js → chunk-YJSN44Q4.js} +16 -3
- package/dist/{chunk-IDVNG3YJ.js.map → chunk-YJSN44Q4.js.map} +1 -1
- package/dist/{chunk-E7FQV4IX.js → chunk-ZPPYDQPU.js} +3 -3
- package/dist/client/auth.d.ts +55 -0
- package/dist/client/blade-client.d.ts +19 -3
- package/dist/client/connection.d.ts +41 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +11 -3
- package/dist/client/resources/auth.d.ts +1 -26
- package/dist/client/socket.d.ts +1 -0
- package/dist/client/types/rest.d.ts +246 -17
- package/dist/client/types/socket-events.d.ts +4 -0
- package/dist/react/api/model-config.d.ts +14 -2
- package/dist/react/api/published-apps.js +3 -3
- package/dist/react/api/sessions.js +2 -2
- package/dist/react/bootstrap.d.ts +1 -1
- package/dist/react/components/chat/index.js +5 -5
- package/dist/react/components/connection/BladeConnectionButton.d.ts +7 -0
- package/dist/react/components/connection/BladeConnectionPanel.d.ts +7 -0
- package/dist/react/components/connection/index.d.ts +2 -0
- package/dist/react/components/connection/index.js +15 -0
- package/dist/react/components/connection/index.js.map +1 -0
- package/dist/react/components/plan/index.js +4 -4
- package/dist/react/components/session/index.js +3 -3
- package/dist/react/components/workspace/index.js +3 -3
- package/dist/react/hooks/use-blade-connection.d.ts +14 -0
- package/dist/react/index.d.ts +6 -2
- package/dist/react/index.js +33 -28
- package/dist/react/index.js.map +1 -1
- package/dist/react/sockets/event-bridge.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +5 -1
- package/dist/chunk-FK4CV6R2.js.map +0 -1
- package/dist/chunk-IGMLETZX.js.map +0 -1
- /package/dist/{chunk-EGGBOVVF.js.map → chunk-IP7EZVT5.js.map} +0 -0
- /package/dist/{chunk-OICNN4K4.js.map → chunk-J6H4TMTH.js.map} +0 -0
- /package/dist/{chunk-F4Y7SUBC.js.map → chunk-SEHOWQVO.js.map} +0 -0
- /package/dist/{chunk-E7FQV4IX.js.map → chunk-ZPPYDQPU.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSessionFilePath,
|
|
3
3
|
resolveSessionFilePreviewTarget
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-J6H4TMTH.js";
|
|
5
5
|
import {
|
|
6
6
|
CardJSON,
|
|
7
7
|
cardRegistry
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
formatToolName,
|
|
12
12
|
getAuthedUrl,
|
|
13
13
|
useUiStore
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YJSN44Q4.js";
|
|
15
15
|
import {
|
|
16
16
|
cn,
|
|
17
17
|
copyToClipboard
|
|
@@ -2065,4 +2065,4 @@ export {
|
|
|
2065
2065
|
PlanSummaryCard,
|
|
2066
2066
|
extractLatestPlanMessages
|
|
2067
2067
|
};
|
|
2068
|
-
//# sourceMappingURL=chunk-
|
|
2068
|
+
//# sourceMappingURL=chunk-ZPPYDQPU.js.map
|
package/dist/client/auth.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { BladeClient } from "./blade-client.js";
|
|
2
|
+
import { type BladeAuthenticatedUser, type BladeConnectionSnapshot, type BladePopupOptions, type BladeServiceInfo } from "./connection.js";
|
|
1
3
|
export interface AuthOptions {
|
|
2
4
|
token?: string | (() => string | null | undefined);
|
|
3
5
|
}
|
|
@@ -6,3 +8,56 @@ export declare function buildSocketAuth(options: AuthOptions): {
|
|
|
6
8
|
token: string;
|
|
7
9
|
} | undefined;
|
|
8
10
|
export declare function resolveAuthToken(options: AuthOptions): string | null;
|
|
11
|
+
export interface UserInfo extends BladeAuthenticatedUser {
|
|
12
|
+
token: string;
|
|
13
|
+
auth_type: "casdoor" | "api_key";
|
|
14
|
+
is_admin?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ProvidersResponse {
|
|
17
|
+
providers: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
authorize_url: string;
|
|
20
|
+
}>;
|
|
21
|
+
password_enabled: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class AuthResource {
|
|
24
|
+
private client;
|
|
25
|
+
private readonly listeners;
|
|
26
|
+
private readonly memoryStorage;
|
|
27
|
+
private storage;
|
|
28
|
+
private persistent;
|
|
29
|
+
private restorePromise;
|
|
30
|
+
private baseUrlGeneration;
|
|
31
|
+
private pendingConnection;
|
|
32
|
+
private activePopup;
|
|
33
|
+
private cancelPending;
|
|
34
|
+
private snapshot;
|
|
35
|
+
constructor(client: BladeClient);
|
|
36
|
+
getProviders(): Promise<ProvidersResponse>;
|
|
37
|
+
getMe(): Promise<UserInfo>;
|
|
38
|
+
logout(): Promise<{
|
|
39
|
+
logout_url: string;
|
|
40
|
+
}>;
|
|
41
|
+
getConnectionSnapshot(): BladeConnectionSnapshot;
|
|
42
|
+
subscribe(listener: () => void): () => void;
|
|
43
|
+
probe(): Promise<BladeServiceInfo>;
|
|
44
|
+
restore(): Promise<BladeConnectionSnapshot>;
|
|
45
|
+
private runRestore;
|
|
46
|
+
retry(): Promise<BladeConnectionSnapshot>;
|
|
47
|
+
connectWithPopup(options?: BladePopupOptions): Promise<BladeAuthenticatedUser>;
|
|
48
|
+
disconnect(): Promise<void>;
|
|
49
|
+
_handleUnauthorized(): Promise<void>;
|
|
50
|
+
_handleBaseUrlChange(): Promise<void>;
|
|
51
|
+
private runPopupFlow;
|
|
52
|
+
private waitForPopup;
|
|
53
|
+
private assertNoMixedContent;
|
|
54
|
+
private assertGeneration;
|
|
55
|
+
private url;
|
|
56
|
+
private storageKey;
|
|
57
|
+
private storageGet;
|
|
58
|
+
private storageSet;
|
|
59
|
+
private clearManagedAuth;
|
|
60
|
+
private useMemoryStorage;
|
|
61
|
+
private update;
|
|
62
|
+
private toConnectionError;
|
|
63
|
+
}
|
|
@@ -16,18 +16,25 @@ import { SkillsResource } from "./resources/skills.js";
|
|
|
16
16
|
import { SolutionsResource } from "./resources/solutions.js";
|
|
17
17
|
import { UserPreferencesResource } from "./resources/user-preferences.js";
|
|
18
18
|
import { type TypedSocket } from "./socket.js";
|
|
19
|
+
import type { BladeAuthStorage } from "./connection.js";
|
|
19
20
|
export interface BladeClientOptions {
|
|
20
|
-
baseUrl
|
|
21
|
+
baseUrl?: string;
|
|
22
|
+
port?: number;
|
|
21
23
|
token?: string | (() => string | null | undefined);
|
|
24
|
+
authStorage?: BladeAuthStorage | false;
|
|
22
25
|
fetchImpl?: typeof fetch;
|
|
23
26
|
onRefreshSuccess?: () => void | Promise<void>;
|
|
24
27
|
}
|
|
25
28
|
export declare class BladeClient {
|
|
26
29
|
private refreshPromise;
|
|
27
30
|
private socketInstance;
|
|
31
|
+
private managedToken;
|
|
32
|
+
private readonly baseUrlChangeListeners;
|
|
28
33
|
private storeRestTokenResolver;
|
|
29
34
|
private storeSocketTokenResolver;
|
|
30
|
-
readonly options: BladeClientOptions
|
|
35
|
+
readonly options: BladeClientOptions & {
|
|
36
|
+
baseUrl: string;
|
|
37
|
+
};
|
|
31
38
|
readonly apiKeys: ApiKeysResource;
|
|
32
39
|
readonly appDevTemplates: AppDevTemplatesResource;
|
|
33
40
|
readonly auth: AuthResource;
|
|
@@ -44,10 +51,15 @@ export declare class BladeClient {
|
|
|
44
51
|
readonly skills: SkillsResource;
|
|
45
52
|
readonly solutions: SolutionsResource;
|
|
46
53
|
readonly userPreferences: UserPreferencesResource;
|
|
47
|
-
constructor(options
|
|
54
|
+
constructor(options?: BladeClientOptions);
|
|
48
55
|
_attachStoreRestTokenResolver(fn: () => string | null | undefined): void;
|
|
49
56
|
_attachStoreSocketTokenResolver(fn: () => string | null | undefined): void;
|
|
50
57
|
setBaseUrl(baseUrl: string): void;
|
|
58
|
+
onBaseUrlChange(listener: () => void): () => void;
|
|
59
|
+
get baseUrl(): string;
|
|
60
|
+
_setManagedToken(token: string | null): void;
|
|
61
|
+
_reconnectSocketWithCurrentAuth(): void;
|
|
62
|
+
_disconnectSocket(): void;
|
|
51
63
|
socket(): TypedSocket;
|
|
52
64
|
json<T>(method: HttpMethod, path: string, body?: unknown): Promise<T>;
|
|
53
65
|
jsonFromInit<T>(path: string, init?: RequestInit): Promise<T>;
|
|
@@ -67,12 +79,15 @@ export declare class BladeClient {
|
|
|
67
79
|
private toBaseRelativePath;
|
|
68
80
|
private isSameBackendUrl;
|
|
69
81
|
private shouldRefreshFor401;
|
|
82
|
+
private defaultCredentials;
|
|
83
|
+
private shouldOmitManagedCredentials;
|
|
70
84
|
private hasExplicitBearerToken;
|
|
71
85
|
private tryRefresh;
|
|
72
86
|
private resolveTokenForUrl;
|
|
73
87
|
private resolveRestToken;
|
|
74
88
|
private resolveSocketToken;
|
|
75
89
|
private resolveToken;
|
|
90
|
+
private resolveConfiguredToken;
|
|
76
91
|
private formDataWithUploadProgress;
|
|
77
92
|
}
|
|
78
93
|
export interface UploadProgress {
|
|
@@ -80,3 +95,4 @@ export interface UploadProgress {
|
|
|
80
95
|
total?: number;
|
|
81
96
|
percent?: number;
|
|
82
97
|
}
|
|
98
|
+
export declare function resolveBladeBaseUrl(options?: Pick<BladeClientOptions, "baseUrl" | "port">): string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface BladeAuthenticatedUser {
|
|
2
|
+
id: string;
|
|
3
|
+
username: string;
|
|
4
|
+
display_name?: string | null;
|
|
5
|
+
avatar_url: string | null;
|
|
6
|
+
}
|
|
7
|
+
export interface BladeStoredAuth {
|
|
8
|
+
accessToken: string;
|
|
9
|
+
user: BladeAuthenticatedUser;
|
|
10
|
+
savedAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface BladeAuthStorage {
|
|
13
|
+
get(key: string): BladeStoredAuth | null | Promise<BladeStoredAuth | null>;
|
|
14
|
+
set(key: string, value: BladeStoredAuth): void | Promise<void>;
|
|
15
|
+
remove(key: string): void | Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export type BladeConnectionStatus = "checking_service" | "service_unavailable" | "signed_out" | "waiting_for_authorization" | "connecting" | "connected" | "expired" | "configuration_error";
|
|
18
|
+
export type BladeConnectionErrorCode = "invalid_url" | "service_unreachable" | "not_blade_agent" | "incompatible_server" | "mixed_content" | "popup_blocked" | "popup_closed" | "authorization_denied" | "authorization_expired" | "origin_mismatch" | "invalid_credentials" | "token_exchange_failed";
|
|
19
|
+
export declare class BladeConnectionError extends Error {
|
|
20
|
+
readonly code: BladeConnectionErrorCode;
|
|
21
|
+
constructor(code: BladeConnectionErrorCode, message: string, options?: ErrorOptions);
|
|
22
|
+
}
|
|
23
|
+
export interface BladeConnectionSnapshot {
|
|
24
|
+
status: BladeConnectionStatus;
|
|
25
|
+
baseUrl: string;
|
|
26
|
+
user: BladeAuthenticatedUser | null;
|
|
27
|
+
error: BladeConnectionError | null;
|
|
28
|
+
persistent: boolean;
|
|
29
|
+
managedBySdk: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface BladeServiceInfo {
|
|
32
|
+
status: "ok";
|
|
33
|
+
service: "blade-agent";
|
|
34
|
+
sdk_auth_version: "1";
|
|
35
|
+
}
|
|
36
|
+
export interface BladePopupOptions {
|
|
37
|
+
timeoutMs?: number;
|
|
38
|
+
windowFeatures?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function createMemoryAuthStorage(): BladeAuthStorage;
|
|
41
|
+
export declare function createLocalAuthStorage(): BladeAuthStorage;
|
package/dist/client/index.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ export { BladeApiError } from "./rest.js";
|
|
|
4
4
|
export type { BladeFetchInit, HttpMethod } from "./rest.js";
|
|
5
5
|
export { createSocket } from "./socket.js";
|
|
6
6
|
export type { CreateSocketOptions, TypedSocket } from "./socket.js";
|
|
7
|
+
export { resolveBladeBaseUrl } from "./blade-client.js";
|
|
8
|
+
export { BladeConnectionError, createLocalAuthStorage, createMemoryAuthStorage, } from "./connection.js";
|
|
9
|
+
export type { BladeAuthenticatedUser, BladeAuthStorage, BladeConnectionErrorCode, BladeConnectionSnapshot, BladeConnectionStatus, BladePopupOptions, BladeServiceInfo, BladeStoredAuth, } from "./connection.js";
|
|
7
10
|
export * from "./resources/api-keys.js";
|
|
8
11
|
export * from "./resources/app-dev-templates.js";
|
|
9
12
|
export * from "./resources/auth.js";
|
package/dist/client/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
AuthResource,
|
|
5
5
|
BladeApiError,
|
|
6
6
|
BladeClient,
|
|
7
|
+
BladeConnectionError,
|
|
7
8
|
GisResource,
|
|
8
9
|
HeadlessError,
|
|
9
10
|
HeadlessResource,
|
|
@@ -20,9 +21,12 @@ import {
|
|
|
20
21
|
SkillsResource,
|
|
21
22
|
SolutionsResource,
|
|
22
23
|
UserPreferencesResource,
|
|
24
|
+
createLocalAuthStorage,
|
|
25
|
+
createMemoryAuthStorage,
|
|
23
26
|
createSocket,
|
|
24
|
-
normalizeResource
|
|
25
|
-
|
|
27
|
+
normalizeResource,
|
|
28
|
+
resolveBladeBaseUrl
|
|
29
|
+
} from "../chunk-C63X3RCM.js";
|
|
26
30
|
import "../chunk-PZ5AY32C.js";
|
|
27
31
|
export {
|
|
28
32
|
ApiKeysResource,
|
|
@@ -30,6 +34,7 @@ export {
|
|
|
30
34
|
AuthResource,
|
|
31
35
|
BladeApiError,
|
|
32
36
|
BladeClient,
|
|
37
|
+
BladeConnectionError,
|
|
33
38
|
GisResource,
|
|
34
39
|
HeadlessError,
|
|
35
40
|
HeadlessResource,
|
|
@@ -46,7 +51,10 @@ export {
|
|
|
46
51
|
SkillsResource,
|
|
47
52
|
SolutionsResource,
|
|
48
53
|
UserPreferencesResource,
|
|
54
|
+
createLocalAuthStorage,
|
|
55
|
+
createMemoryAuthStorage,
|
|
49
56
|
createSocket,
|
|
50
|
-
normalizeResource
|
|
57
|
+
normalizeResource,
|
|
58
|
+
resolveBladeBaseUrl
|
|
51
59
|
};
|
|
52
60
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface UserInfo {
|
|
3
|
-
id: string;
|
|
4
|
-
username: string;
|
|
5
|
-
display_name?: string | null;
|
|
6
|
-
avatar_url: string | null;
|
|
7
|
-
token: string;
|
|
8
|
-
auth_type: "casdoor";
|
|
9
|
-
is_admin?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface ProvidersResponse {
|
|
12
|
-
providers: Array<{
|
|
13
|
-
name: string;
|
|
14
|
-
authorize_url: string;
|
|
15
|
-
}>;
|
|
16
|
-
password_enabled: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare class AuthResource {
|
|
19
|
-
private client;
|
|
20
|
-
constructor(client: BladeClient);
|
|
21
|
-
getProviders(): Promise<ProvidersResponse>;
|
|
22
|
-
getMe(): Promise<UserInfo>;
|
|
23
|
-
logout(): Promise<{
|
|
24
|
-
logout_url: string;
|
|
25
|
-
}>;
|
|
26
|
-
}
|
|
1
|
+
export { AuthResource, type ProvidersResponse, type UserInfo, } from "../auth.js";
|
package/dist/client/socket.d.ts
CHANGED
|
@@ -5,5 +5,6 @@ export type TypedSocket = Socket<ServerToClientEvents, ClientToServerEvents>;
|
|
|
5
5
|
export interface CreateSocketOptions extends AuthOptions {
|
|
6
6
|
baseUrl: string;
|
|
7
7
|
path?: string;
|
|
8
|
+
withCredentials?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare function createSocket(options: CreateSocketOptions): TypedSocket;
|
|
@@ -305,6 +305,41 @@ export interface paths {
|
|
|
305
305
|
patch?: never;
|
|
306
306
|
trace?: never;
|
|
307
307
|
};
|
|
308
|
+
"/api/auth/sdk/authorize": {
|
|
309
|
+
parameters: {
|
|
310
|
+
query?: never;
|
|
311
|
+
header?: never;
|
|
312
|
+
path?: never;
|
|
313
|
+
cookie?: never;
|
|
314
|
+
};
|
|
315
|
+
/** Authorize Sdk */
|
|
316
|
+
get: operations["authorize_sdk_api_auth_sdk_authorize_get"];
|
|
317
|
+
put?: never;
|
|
318
|
+
/** Confirm Sdk Authorization */
|
|
319
|
+
post: operations["confirm_sdk_authorization_api_auth_sdk_authorize_post"];
|
|
320
|
+
delete?: never;
|
|
321
|
+
options?: never;
|
|
322
|
+
head?: never;
|
|
323
|
+
patch?: never;
|
|
324
|
+
trace?: never;
|
|
325
|
+
};
|
|
326
|
+
"/api/auth/sdk/token": {
|
|
327
|
+
parameters: {
|
|
328
|
+
query?: never;
|
|
329
|
+
header?: never;
|
|
330
|
+
path?: never;
|
|
331
|
+
cookie?: never;
|
|
332
|
+
};
|
|
333
|
+
get?: never;
|
|
334
|
+
put?: never;
|
|
335
|
+
/** Exchange Sdk Token */
|
|
336
|
+
post: operations["exchange_sdk_token_api_auth_sdk_token_post"];
|
|
337
|
+
delete?: never;
|
|
338
|
+
options?: never;
|
|
339
|
+
head?: never;
|
|
340
|
+
patch?: never;
|
|
341
|
+
trace?: never;
|
|
342
|
+
};
|
|
308
343
|
"/api/browser-extension/sessions": {
|
|
309
344
|
parameters: {
|
|
310
345
|
query?: never;
|
|
@@ -1939,7 +1974,7 @@ export interface paths {
|
|
|
1939
1974
|
patch?: never;
|
|
1940
1975
|
trace?: never;
|
|
1941
1976
|
};
|
|
1942
|
-
"/api/admin/model-config/{
|
|
1977
|
+
"/api/admin/model-config/models/{model_id}": {
|
|
1943
1978
|
parameters: {
|
|
1944
1979
|
query?: never;
|
|
1945
1980
|
header?: never;
|
|
@@ -1948,16 +1983,16 @@ export interface paths {
|
|
|
1948
1983
|
};
|
|
1949
1984
|
get?: never;
|
|
1950
1985
|
/** Update Model Config */
|
|
1951
|
-
put: operations["
|
|
1986
|
+
put: operations["update_model_config_api_admin_model_config_models__model_id__put"];
|
|
1952
1987
|
post?: never;
|
|
1953
1988
|
/** Delete Model Config */
|
|
1954
|
-
delete: operations["
|
|
1989
|
+
delete: operations["delete_model_config_api_admin_model_config_models__model_id__delete"];
|
|
1955
1990
|
options?: never;
|
|
1956
1991
|
head?: never;
|
|
1957
1992
|
patch?: never;
|
|
1958
1993
|
trace?: never;
|
|
1959
1994
|
};
|
|
1960
|
-
"/api/admin/model-config/
|
|
1995
|
+
"/api/admin/model-config/default": {
|
|
1961
1996
|
parameters: {
|
|
1962
1997
|
query?: never;
|
|
1963
1998
|
header?: never;
|
|
@@ -1966,7 +2001,24 @@ export interface paths {
|
|
|
1966
2001
|
};
|
|
1967
2002
|
get?: never;
|
|
1968
2003
|
/** Set Default Model Config */
|
|
1969
|
-
put: operations["
|
|
2004
|
+
put: operations["set_default_model_config_api_admin_model_config_default_put"];
|
|
2005
|
+
post?: never;
|
|
2006
|
+
delete?: never;
|
|
2007
|
+
options?: never;
|
|
2008
|
+
head?: never;
|
|
2009
|
+
patch?: never;
|
|
2010
|
+
trace?: never;
|
|
2011
|
+
};
|
|
2012
|
+
"/api/admin/model-config/default/reset": {
|
|
2013
|
+
parameters: {
|
|
2014
|
+
query?: never;
|
|
2015
|
+
header?: never;
|
|
2016
|
+
path?: never;
|
|
2017
|
+
cookie?: never;
|
|
2018
|
+
};
|
|
2019
|
+
get?: never;
|
|
2020
|
+
/** Clear Default Model Config */
|
|
2021
|
+
put: operations["clear_default_model_config_api_admin_model_config_default_reset_put"];
|
|
1970
2022
|
post?: never;
|
|
1971
2023
|
delete?: never;
|
|
1972
2024
|
options?: never;
|
|
@@ -5528,10 +5580,29 @@ export interface components {
|
|
|
5528
5580
|
service: components["schemas"]["ModelServiceResponse"];
|
|
5529
5581
|
/** Items */
|
|
5530
5582
|
items: components["schemas"]["ModelConfigResponse"][];
|
|
5531
|
-
/** Default
|
|
5532
|
-
|
|
5583
|
+
/** Default Model Id */
|
|
5584
|
+
default_model_id: string;
|
|
5585
|
+
/** Default Source */
|
|
5586
|
+
default_source: string;
|
|
5587
|
+
/** Admin Default Model Id */
|
|
5588
|
+
admin_default_model_id?: string | null;
|
|
5589
|
+
/**
|
|
5590
|
+
* Admin Default Available
|
|
5591
|
+
* @default false
|
|
5592
|
+
*/
|
|
5593
|
+
admin_default_available: boolean;
|
|
5533
5594
|
/** Source */
|
|
5534
5595
|
source: string;
|
|
5596
|
+
/**
|
|
5597
|
+
* Catalog Incomplete
|
|
5598
|
+
* @default false
|
|
5599
|
+
*/
|
|
5600
|
+
catalog_incomplete: boolean;
|
|
5601
|
+
/**
|
|
5602
|
+
* Catalog Stale
|
|
5603
|
+
* @default false
|
|
5604
|
+
*/
|
|
5605
|
+
catalog_stale: boolean;
|
|
5535
5606
|
};
|
|
5536
5607
|
/** ModelConfigInput */
|
|
5537
5608
|
ModelConfigInput: {
|
|
@@ -5542,6 +5613,13 @@ export interface components {
|
|
|
5542
5613
|
/** Id */
|
|
5543
5614
|
id: string;
|
|
5544
5615
|
model: components["schemas"]["ModelDetailsResponse"];
|
|
5616
|
+
/** Source */
|
|
5617
|
+
source: string;
|
|
5618
|
+
/**
|
|
5619
|
+
* Overridden
|
|
5620
|
+
* @default false
|
|
5621
|
+
*/
|
|
5622
|
+
overridden: boolean;
|
|
5545
5623
|
};
|
|
5546
5624
|
/** ModelConfigTestResponse */
|
|
5547
5625
|
ModelConfigTestResponse: {
|
|
@@ -5557,7 +5635,7 @@ export interface components {
|
|
|
5557
5635
|
/** Id */
|
|
5558
5636
|
id: string;
|
|
5559
5637
|
/** Context Window */
|
|
5560
|
-
context_window
|
|
5638
|
+
context_window?: number | null;
|
|
5561
5639
|
/**
|
|
5562
5640
|
* Supports Vision
|
|
5563
5641
|
* @default true
|
|
@@ -5568,6 +5646,8 @@ export interface components {
|
|
|
5568
5646
|
ModelDetailsResponse: {
|
|
5569
5647
|
/** Id */
|
|
5570
5648
|
id: string;
|
|
5649
|
+
/** Label */
|
|
5650
|
+
label: string;
|
|
5571
5651
|
/** Context Window */
|
|
5572
5652
|
context_window: number;
|
|
5573
5653
|
/** Supports Vision */
|
|
@@ -5609,6 +5689,12 @@ export interface components {
|
|
|
5609
5689
|
* @enum {string}
|
|
5610
5690
|
*/
|
|
5611
5691
|
thinking_request_format: "auto" | "none" | "openai_reasoning_effort" | "openrouter_reasoning" | "deepseek_thinking" | "together_reasoning" | "zai_thinking" | "qwen_enable_thinking" | "sglang_chat_template";
|
|
5692
|
+
/**
|
|
5693
|
+
* Auth Mode
|
|
5694
|
+
* @default fixed_key
|
|
5695
|
+
* @enum {string}
|
|
5696
|
+
*/
|
|
5697
|
+
auth_mode: "current_user" | "fixed_key" | "none";
|
|
5612
5698
|
};
|
|
5613
5699
|
/** ModelServiceResponse */
|
|
5614
5700
|
ModelServiceResponse: {
|
|
@@ -5628,6 +5714,11 @@ export interface components {
|
|
|
5628
5714
|
* @enum {string}
|
|
5629
5715
|
*/
|
|
5630
5716
|
effective_thinking_request_format: "none" | "openai_reasoning_effort" | "openrouter_reasoning" | "deepseek_thinking" | "together_reasoning" | "zai_thinking" | "qwen_enable_thinking" | "sglang_chat_template";
|
|
5717
|
+
/**
|
|
5718
|
+
* Auth Mode
|
|
5719
|
+
* @enum {string}
|
|
5720
|
+
*/
|
|
5721
|
+
auth_mode: "current_user" | "fixed_key" | "none";
|
|
5631
5722
|
};
|
|
5632
5723
|
/** ModelsConfig */
|
|
5633
5724
|
ModelsConfig: {
|
|
@@ -5960,6 +6051,37 @@ export interface components {
|
|
|
5960
6051
|
/** Model */
|
|
5961
6052
|
model?: string | null;
|
|
5962
6053
|
};
|
|
6054
|
+
/** SdkAuthorizedUser */
|
|
6055
|
+
SdkAuthorizedUser: {
|
|
6056
|
+
/** Id */
|
|
6057
|
+
id: string;
|
|
6058
|
+
/** Username */
|
|
6059
|
+
username: string;
|
|
6060
|
+
/** Display Name */
|
|
6061
|
+
display_name: string;
|
|
6062
|
+
/** Avatar Url */
|
|
6063
|
+
avatar_url: string | null;
|
|
6064
|
+
};
|
|
6065
|
+
/** SdkTokenRequest */
|
|
6066
|
+
SdkTokenRequest: {
|
|
6067
|
+
/** Code */
|
|
6068
|
+
code: string;
|
|
6069
|
+
/** State */
|
|
6070
|
+
state: string;
|
|
6071
|
+
/** Client Origin */
|
|
6072
|
+
client_origin: string;
|
|
6073
|
+
};
|
|
6074
|
+
/** SdkTokenResponse */
|
|
6075
|
+
SdkTokenResponse: {
|
|
6076
|
+
/** Access Token */
|
|
6077
|
+
access_token: string;
|
|
6078
|
+
/**
|
|
6079
|
+
* Token Type
|
|
6080
|
+
* @default Bearer
|
|
6081
|
+
*/
|
|
6082
|
+
token_type: string;
|
|
6083
|
+
user: components["schemas"]["SdkAuthorizedUser"];
|
|
6084
|
+
};
|
|
5963
6085
|
/** SessionMemoryRequest */
|
|
5964
6086
|
SessionMemoryRequest: {
|
|
5965
6087
|
/** Memory Enabled */
|
|
@@ -7127,6 +7249,91 @@ export interface operations {
|
|
|
7127
7249
|
};
|
|
7128
7250
|
};
|
|
7129
7251
|
};
|
|
7252
|
+
authorize_sdk_api_auth_sdk_authorize_get: {
|
|
7253
|
+
parameters: {
|
|
7254
|
+
query: {
|
|
7255
|
+
client_origin: string;
|
|
7256
|
+
state: string;
|
|
7257
|
+
};
|
|
7258
|
+
header?: never;
|
|
7259
|
+
path?: never;
|
|
7260
|
+
cookie?: never;
|
|
7261
|
+
};
|
|
7262
|
+
requestBody?: never;
|
|
7263
|
+
responses: {
|
|
7264
|
+
/** @description Successful Response */
|
|
7265
|
+
200: {
|
|
7266
|
+
headers: {
|
|
7267
|
+
[name: string]: unknown;
|
|
7268
|
+
};
|
|
7269
|
+
content: {
|
|
7270
|
+
"application/json": unknown;
|
|
7271
|
+
};
|
|
7272
|
+
};
|
|
7273
|
+
/** @description Validation Error */
|
|
7274
|
+
422: {
|
|
7275
|
+
headers: {
|
|
7276
|
+
[name: string]: unknown;
|
|
7277
|
+
};
|
|
7278
|
+
content: {
|
|
7279
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
7280
|
+
};
|
|
7281
|
+
};
|
|
7282
|
+
};
|
|
7283
|
+
};
|
|
7284
|
+
confirm_sdk_authorization_api_auth_sdk_authorize_post: {
|
|
7285
|
+
parameters: {
|
|
7286
|
+
query?: never;
|
|
7287
|
+
header?: never;
|
|
7288
|
+
path?: never;
|
|
7289
|
+
cookie?: never;
|
|
7290
|
+
};
|
|
7291
|
+
requestBody?: never;
|
|
7292
|
+
responses: {
|
|
7293
|
+
/** @description Successful Response */
|
|
7294
|
+
200: {
|
|
7295
|
+
headers: {
|
|
7296
|
+
[name: string]: unknown;
|
|
7297
|
+
};
|
|
7298
|
+
content: {
|
|
7299
|
+
"application/json": unknown;
|
|
7300
|
+
};
|
|
7301
|
+
};
|
|
7302
|
+
};
|
|
7303
|
+
};
|
|
7304
|
+
exchange_sdk_token_api_auth_sdk_token_post: {
|
|
7305
|
+
parameters: {
|
|
7306
|
+
query?: never;
|
|
7307
|
+
header?: never;
|
|
7308
|
+
path?: never;
|
|
7309
|
+
cookie?: never;
|
|
7310
|
+
};
|
|
7311
|
+
requestBody: {
|
|
7312
|
+
content: {
|
|
7313
|
+
"application/json": components["schemas"]["SdkTokenRequest"];
|
|
7314
|
+
};
|
|
7315
|
+
};
|
|
7316
|
+
responses: {
|
|
7317
|
+
/** @description Successful Response */
|
|
7318
|
+
200: {
|
|
7319
|
+
headers: {
|
|
7320
|
+
[name: string]: unknown;
|
|
7321
|
+
};
|
|
7322
|
+
content: {
|
|
7323
|
+
"application/json": components["schemas"]["SdkTokenResponse"];
|
|
7324
|
+
};
|
|
7325
|
+
};
|
|
7326
|
+
/** @description Validation Error */
|
|
7327
|
+
422: {
|
|
7328
|
+
headers: {
|
|
7329
|
+
[name: string]: unknown;
|
|
7330
|
+
};
|
|
7331
|
+
content: {
|
|
7332
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
7333
|
+
};
|
|
7334
|
+
};
|
|
7335
|
+
};
|
|
7336
|
+
};
|
|
7130
7337
|
list_extension_sessions_api_browser_extension_sessions_get: {
|
|
7131
7338
|
parameters: {
|
|
7132
7339
|
query?: {
|
|
@@ -10393,12 +10600,12 @@ export interface operations {
|
|
|
10393
10600
|
};
|
|
10394
10601
|
};
|
|
10395
10602
|
};
|
|
10396
|
-
|
|
10603
|
+
update_model_config_api_admin_model_config_models__model_id__put: {
|
|
10397
10604
|
parameters: {
|
|
10398
10605
|
query?: never;
|
|
10399
10606
|
header?: never;
|
|
10400
10607
|
path: {
|
|
10401
|
-
|
|
10608
|
+
model_id: string;
|
|
10402
10609
|
};
|
|
10403
10610
|
cookie?: never;
|
|
10404
10611
|
};
|
|
@@ -10428,12 +10635,12 @@ export interface operations {
|
|
|
10428
10635
|
};
|
|
10429
10636
|
};
|
|
10430
10637
|
};
|
|
10431
|
-
|
|
10638
|
+
delete_model_config_api_admin_model_config_models__model_id__delete: {
|
|
10432
10639
|
parameters: {
|
|
10433
10640
|
query?: never;
|
|
10434
10641
|
header?: never;
|
|
10435
10642
|
path: {
|
|
10436
|
-
|
|
10643
|
+
model_id: string;
|
|
10437
10644
|
};
|
|
10438
10645
|
cookie?: never;
|
|
10439
10646
|
};
|
|
@@ -10459,16 +10666,18 @@ export interface operations {
|
|
|
10459
10666
|
};
|
|
10460
10667
|
};
|
|
10461
10668
|
};
|
|
10462
|
-
|
|
10669
|
+
set_default_model_config_api_admin_model_config_default_put: {
|
|
10463
10670
|
parameters: {
|
|
10464
10671
|
query?: never;
|
|
10465
10672
|
header?: never;
|
|
10466
|
-
path
|
|
10467
|
-
config_id: string;
|
|
10468
|
-
};
|
|
10673
|
+
path?: never;
|
|
10469
10674
|
cookie?: never;
|
|
10470
10675
|
};
|
|
10471
|
-
requestBody
|
|
10676
|
+
requestBody: {
|
|
10677
|
+
content: {
|
|
10678
|
+
"application/json": components["schemas"]["ModelProbeRequest"];
|
|
10679
|
+
};
|
|
10680
|
+
};
|
|
10472
10681
|
responses: {
|
|
10473
10682
|
/** @description Successful Response */
|
|
10474
10683
|
200: {
|
|
@@ -10490,6 +10699,26 @@ export interface operations {
|
|
|
10490
10699
|
};
|
|
10491
10700
|
};
|
|
10492
10701
|
};
|
|
10702
|
+
clear_default_model_config_api_admin_model_config_default_reset_put: {
|
|
10703
|
+
parameters: {
|
|
10704
|
+
query?: never;
|
|
10705
|
+
header?: never;
|
|
10706
|
+
path?: never;
|
|
10707
|
+
cookie?: never;
|
|
10708
|
+
};
|
|
10709
|
+
requestBody?: never;
|
|
10710
|
+
responses: {
|
|
10711
|
+
/** @description Successful Response */
|
|
10712
|
+
200: {
|
|
10713
|
+
headers: {
|
|
10714
|
+
[name: string]: unknown;
|
|
10715
|
+
};
|
|
10716
|
+
content: {
|
|
10717
|
+
"application/json": components["schemas"]["ModelConfigCollectionResponse"];
|
|
10718
|
+
};
|
|
10719
|
+
};
|
|
10720
|
+
};
|
|
10721
|
+
};
|
|
10493
10722
|
list_model_candidates_api_admin_model_config_candidates_post: {
|
|
10494
10723
|
parameters: {
|
|
10495
10724
|
query?: never;
|
|
@@ -166,11 +166,15 @@ export declare namespace SessionUpdatedPayloadSchema {
|
|
|
166
166
|
[k: string]: unknown;
|
|
167
167
|
} | null);
|
|
168
168
|
type Intent = (string | null);
|
|
169
|
+
type ProjectId = (number | null);
|
|
170
|
+
type ProjectName = (string | null);
|
|
169
171
|
interface SessionUpdatedPayload {
|
|
170
172
|
session_id: SessionId;
|
|
171
173
|
model?: Model;
|
|
172
174
|
replay_state?: ReplayState;
|
|
173
175
|
intent?: Intent;
|
|
176
|
+
project_id?: ProjectId;
|
|
177
|
+
project_name?: ProjectName;
|
|
174
178
|
[k: string]: unknown;
|
|
175
179
|
}
|
|
176
180
|
}
|