@vibedev-si/dsh-vibedev 0.2.1
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/LICENSE +21 -0
- package/README.md +155 -0
- package/THIRD-PARTY-NOTICES.txt +566 -0
- package/client/client.js +1368 -0
- package/cordis.patch.yml +5 -0
- package/icon.svg +7 -0
- package/lib/account/index.d.ts +118 -0
- package/lib/anthropic-messages-KOS0z8Fy.js +13472 -0
- package/lib/auth/credentials.d.ts +47 -0
- package/lib/auth/login.d.ts +154 -0
- package/lib/gateway/assets.d.ts +61 -0
- package/lib/gateway/catalog.d.ts +126 -0
- package/lib/gateway/errors.d.ts +76 -0
- package/lib/gateway/http.d.ts +94 -0
- package/lib/index.d.ts +105 -0
- package/lib/index.js +7301 -0
- package/lib/llm/adapter.d.ts +129 -0
- package/lib/llm/catalog.d.ts +75 -0
- package/lib/llm/context.d.ts +54 -0
- package/lib/llm/index.d.ts +69 -0
- package/lib/llm/limits.d.ts +19 -0
- package/lib/llm/models.d.ts +67 -0
- package/lib/llm/replay.d.ts +66 -0
- package/lib/llm/stream.d.ts +46 -0
- package/lib/media/chat.d.ts +49 -0
- package/lib/media/sources.d.ts +46 -0
- package/lib/models-CAcLevEN.js +1045 -0
- package/lib/node-Cujw_a4_.js +2403 -0
- package/lib/node-vkDR3GtK.js +25 -0
- package/lib/openai-completions-DqTCiqpS.js +983 -0
- package/lib/openai-prompt-cache-kzRZVokq.js +9567 -0
- package/lib/openai-responses-DygWnsye.js +832 -0
- package/lib/pricing.d.ts +49 -0
- package/lib/runtime.d.ts +150 -0
- package/lib/search/provider.d.ts +86 -0
- package/lib/service.d.ts +99 -0
- package/lib/tasks/remote.d.ts +47 -0
- package/lib/tasks/store.d.ts +132 -0
- package/lib/tasks/tracker.d.ts +127 -0
- package/lib/tools/account.d.ts +21 -0
- package/lib/tools/audio.d.ts +13 -0
- package/lib/tools/common.d.ts +77 -0
- package/lib/tools/image.d.ts +50 -0
- package/lib/tools/models.d.ts +13 -0
- package/lib/tools/tasks.d.ts +13 -0
- package/lib/tools/transcribe.d.ts +19 -0
- package/lib/tools/video.d.ts +48 -0
- package/lib/transform-messages-Csvf2ItW.js +1023 -0
- package/lib/util/files.d.ts +80 -0
- package/lib/video/plan.d.ts +96 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +127 -0
package/cordis.patch.yml
ADDED
package/icon.svg
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#D77757"/>
|
|
3
|
+
<rect x="11" y="15" width="34" height="26" rx="6" fill="#FFF7F2"/>
|
|
4
|
+
<path d="M24 22.5v11l9.5-5.5z" fill="#D77757"/>
|
|
5
|
+
<path d="M47 33l2.2 5.8L55 41l-5.8 2.2L47 49l-2.2-5.8L39 41l5.8-2.2z" fill="#5769F7"/>
|
|
6
|
+
<rect x="11" y="45" width="22" height="4" rx="2" fill="#FFF7F2" opacity="0.85"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The VibeDev account as the plugin's pages see it, and the Host routes they
|
|
3
|
+
* call (`/api/dsh-vibedev/account…`, on the client connection like every
|
|
4
|
+
* plugin route):
|
|
5
|
+
*
|
|
6
|
+
* - `GET /api/dsh-vibedev/account` — where the credential comes from (the
|
|
7
|
+
* app's account, the plugin's own sign-in, a development key, or none), who
|
|
8
|
+
* is signed in, the balance, a sign-in waiting for the browser, and how many
|
|
9
|
+
* VibeDev models the pickers list; `?fresh=1` reads the balance again;
|
|
10
|
+
* - `POST /api/dsh-vibedev/account/sign-in` — `{ open?: boolean }`: start the
|
|
11
|
+
* plugin's own sign-in; answers the authorization link (`open: false` leaves
|
|
12
|
+
* opening it to the page);
|
|
13
|
+
* - `POST /api/dsh-vibedev/account/cancel` — stop a waiting sign-in;
|
|
14
|
+
* - `POST /api/dsh-vibedev/account/sign-out` — end the plugin's own sign-in
|
|
15
|
+
* (an app account is signed out in the app, so that answers 409).
|
|
16
|
+
*
|
|
17
|
+
* The DeepSeek account is never touched: it stays the Harness's own.
|
|
18
|
+
* @module dsh-vibedev/account
|
|
19
|
+
*/
|
|
20
|
+
import type { ConnectionFetchRoute } from '@deepseek-ai/dsh-client-connection';
|
|
21
|
+
import type { CredentialChain } from '../auth/credentials.js';
|
|
22
|
+
import type { PluginLogin } from '../auth/login.js';
|
|
23
|
+
/** Path prefix of the plugin's Host routes. */
|
|
24
|
+
export declare const ACCOUNT_ROUTE_PREFIX = "/api/dsh-vibedev/account";
|
|
25
|
+
/** Where the active credential comes from. */
|
|
26
|
+
export type AccountSource = 'host' | 'plugin' | 'key' | 'none';
|
|
27
|
+
/** What the account pages render. */
|
|
28
|
+
export interface AccountView {
|
|
29
|
+
readonly source: AccountSource;
|
|
30
|
+
/** The signed-in person, when known. */
|
|
31
|
+
readonly user?: {
|
|
32
|
+
readonly id?: string;
|
|
33
|
+
readonly email?: string;
|
|
34
|
+
readonly nickname?: string;
|
|
35
|
+
};
|
|
36
|
+
/** The balance, when it could be read. */
|
|
37
|
+
readonly balance?: {
|
|
38
|
+
readonly amount: string;
|
|
39
|
+
readonly currency: string;
|
|
40
|
+
};
|
|
41
|
+
/** A sign-in waiting for the browser. */
|
|
42
|
+
readonly pending?: {
|
|
43
|
+
readonly url: string;
|
|
44
|
+
readonly expiresAt: number;
|
|
45
|
+
};
|
|
46
|
+
/** VibeDev chat models the pickers list now, and why there are none. */
|
|
47
|
+
readonly models: {
|
|
48
|
+
readonly count: number;
|
|
49
|
+
readonly hidden?: 'signed-out' | 'host-account';
|
|
50
|
+
};
|
|
51
|
+
/** Pages on the gateway's site. */
|
|
52
|
+
readonly links: {
|
|
53
|
+
readonly topUp: string;
|
|
54
|
+
readonly register: string;
|
|
55
|
+
readonly usage: string;
|
|
56
|
+
};
|
|
57
|
+
/** The VibeDev account is the app's main account (the VibeDev app): its row leads the sidebar foot and Settings. */
|
|
58
|
+
readonly primary: boolean;
|
|
59
|
+
}
|
|
60
|
+
/** What the account routes need from the plugin. */
|
|
61
|
+
export interface AccountServiceOptions {
|
|
62
|
+
readonly origin: string;
|
|
63
|
+
readonly userAgent: string;
|
|
64
|
+
readonly chain: CredentialChain;
|
|
65
|
+
readonly login: PluginLogin;
|
|
66
|
+
/** The VibeDev route's model count and why it is empty. */
|
|
67
|
+
readonly models: () => {
|
|
68
|
+
count: number;
|
|
69
|
+
hidden?: 'signed-out' | 'host-account';
|
|
70
|
+
};
|
|
71
|
+
/** Present the VibeDev account as the app's main account. */
|
|
72
|
+
readonly primary?: boolean;
|
|
73
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
74
|
+
readonly now?: () => number;
|
|
75
|
+
}
|
|
76
|
+
/** The account state behind the pages. */
|
|
77
|
+
export declare class AccountService {
|
|
78
|
+
private readonly options;
|
|
79
|
+
private balanceCache;
|
|
80
|
+
private readonly now;
|
|
81
|
+
/**
|
|
82
|
+
* @param options - origin, credential chain, the plugin's sign-in and the route's model state.
|
|
83
|
+
*/
|
|
84
|
+
constructor(options: AccountServiceOptions);
|
|
85
|
+
/** Links to the gateway's pages. */
|
|
86
|
+
links(): AccountView['links'];
|
|
87
|
+
/**
|
|
88
|
+
* The account as it stands.
|
|
89
|
+
* @param fresh - read the balance again instead of reusing a recent read.
|
|
90
|
+
* @returns the view.
|
|
91
|
+
*/
|
|
92
|
+
view(fresh?: boolean): Promise<AccountView>;
|
|
93
|
+
/** `GET /v1/account/auth/me` for one token, reused for a minute. */
|
|
94
|
+
private me;
|
|
95
|
+
/**
|
|
96
|
+
* Start the plugin's own sign-in.
|
|
97
|
+
* @param open - open the system browser (false: the page opens the link itself).
|
|
98
|
+
* @returns the authorization link and whether a browser was opened.
|
|
99
|
+
*/
|
|
100
|
+
signIn(open: boolean): Promise<{
|
|
101
|
+
url: string;
|
|
102
|
+
expiresAt: number;
|
|
103
|
+
opened: boolean;
|
|
104
|
+
}>;
|
|
105
|
+
/** Stop a waiting sign-in. */
|
|
106
|
+
cancel(): void;
|
|
107
|
+
/**
|
|
108
|
+
* End the plugin's own sign-in.
|
|
109
|
+
* @returns false when the credential is the app's account, which is signed out in the app.
|
|
110
|
+
*/
|
|
111
|
+
signOut(): Promise<boolean>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The account routes.
|
|
115
|
+
* @param account - the account service.
|
|
116
|
+
* @returns routes for the client connection.
|
|
117
|
+
*/
|
|
118
|
+
export declare function accountRoutes(account: AccountService): ConnectionFetchRoute[];
|