@vibedev-si/dsh-vibedev 0.10.0 → 0.11.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/README.md +120 -2
- package/THIRD-PARTY-NOTICES.txt +1 -1
- package/client/client.account-center.js +23 -18
- package/client/client.js +228 -31
- package/lib/announcements/routes.d.ts +1 -1
- package/lib/auth/credentials.d.ts +8 -0
- package/lib/chat-consent/contract.d.ts +150 -0
- package/lib/chat-consent/install.d.ts +37 -0
- package/lib/chat-consent/service.d.ts +86 -0
- package/lib/gateway/http.d.ts +4 -1
- package/lib/index.d.ts +29 -0
- package/lib/index.js +767 -124
- package/lib/llm/adapter.d.ts +7 -0
- package/lib/llm/context.d.ts +34 -2
- package/lib/llm/limits.d.ts +6 -1
- package/package.json +1 -1
package/lib/llm/adapter.d.ts
CHANGED
|
@@ -125,6 +125,13 @@ export declare class GatewayAdapter extends LlmAdapter {
|
|
|
125
125
|
private owns;
|
|
126
126
|
private assertOwned;
|
|
127
127
|
private modelOf;
|
|
128
|
+
/**
|
|
129
|
+
* The request-image target for a stored image: the one `toPiContext` reads the request version with, from the same
|
|
130
|
+
* function and the same budgets. Computer Use asks for it to size and encode a screenshot and to map coordinates onto
|
|
131
|
+
* the image the model sees; the base class returns the source size, which would let `toPiContext` shrink the
|
|
132
|
+
* screenshot again afterwards and put the model's coordinates out of step with the tool's.
|
|
133
|
+
*/
|
|
134
|
+
imageRequestTarget(_provider: string, _model: string, image: ImageAttachmentRef): import("./context.js").CompatImageRequestTarget;
|
|
128
135
|
providerInfo(provider: string): LlmProviderInfo;
|
|
129
136
|
providerRetryPolicy(provider: string): ResolvedRetryPolicy | undefined;
|
|
130
137
|
listModels(provider: string): Promise<readonly GatewayListedModel[]>;
|
package/lib/llm/context.d.ts
CHANGED
|
@@ -4,12 +4,15 @@
|
|
|
4
4
|
* image-limit import moved to ./limits.ts,
|
|
5
5
|
* so the gateway adapter can choose a wire protocol per model. Keep it in step with upstream.
|
|
6
6
|
*
|
|
7
|
+
* Kept in step with 0.2.3 for what changes at run time: the request-image target (see `requestImageTarget`) and the text of a
|
|
8
|
+
* system message (see `systemText`).
|
|
9
|
+
*
|
|
7
10
|
* Harness request-history conversion into pi-ai's Context vocabulary.
|
|
8
11
|
*
|
|
9
12
|
* @module dsh-llm-pi-ai/context
|
|
10
13
|
*/
|
|
11
14
|
import type { GenerateOptions, ImageAttachmentAccessResolver } from '@deepseek-ai/dsh-llm';
|
|
12
|
-
import type { AttachmentStore } from '@deepseek-ai/dsh-attachment';
|
|
15
|
+
import type { AttachmentStore, ImageAttachmentRef } from '@deepseek-ai/dsh-attachment';
|
|
13
16
|
import type { Context as PiContext } from '@earendil-works/pi-ai';
|
|
14
17
|
/** Inputs that bind deterministic request images to one current tool execution world. */
|
|
15
18
|
export interface PiImageRequestContext {
|
|
@@ -26,9 +29,38 @@ export interface PiImageRequestContext {
|
|
|
26
29
|
export interface PiImageRequestBudget {
|
|
27
30
|
/** Total-pixel budget; larger sources are downscaled proportionally. */
|
|
28
31
|
maxPixels: number;
|
|
29
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Raw encoded bytes for one request image. DSH 0.2.3 treats it as a hard limit (a larger encoding is shrunk
|
|
34
|
+
* further) and also as the preferred size; DSH 0.2.2-rc.5 treated it as a target only.
|
|
35
|
+
*/
|
|
30
36
|
maxBytes: number;
|
|
31
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* A request-image target that both DSH generations accept. `ImageRequestTarget` changed between them:
|
|
40
|
+
* - DSH 0.2.2-rc.5: `{ width, height, maxBytes }`;
|
|
41
|
+
* - DSH 0.2.3: `{ width, height, maxImageBytes, imageTargetBytes }`, where `maxImageBytes` is the hard limit,
|
|
42
|
+
* `imageTargetBytes` the preferred size (never above the limit), and `readImageRequest` rejects a target
|
|
43
|
+
* missing either with `INVALID_ATTACHMENT_REF` ("maxImageBytes must be a positive integer").
|
|
44
|
+
* 0.2.3 validates only the fields it knows and rc.5 ignores extra ones, so one object carries all three byte fields,
|
|
45
|
+
* each the same budget (the shape DSH's own pi-ai adapter builds, which sets `imageTargetBytes = maxImageBytes`).
|
|
46
|
+
* Drop `maxBytes` once rc.5 is no longer supported.
|
|
47
|
+
*/
|
|
48
|
+
export interface CompatImageRequestTarget {
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
/** rc.5's byte target. */
|
|
52
|
+
maxBytes: number;
|
|
53
|
+
/** 0.2.3's hard limit on the encoded bytes. */
|
|
54
|
+
maxImageBytes: number;
|
|
55
|
+
/** 0.2.3's preferred encoded size; not above `maxImageBytes`. */
|
|
56
|
+
imageTargetBytes: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Deterministic request target for one source under the route budgets.
|
|
60
|
+
* Assigned to `ImageRequestTarget` of whichever `@deepseek-ai/dsh-attachment` the host runs: the declared type
|
|
61
|
+
* changed in 0.2.3, and the object satisfies both.
|
|
62
|
+
*/
|
|
63
|
+
export declare function requestImageTarget(ref: ImageAttachmentRef, budget: PiImageRequestBudget): CompatImageRequestTarget;
|
|
32
64
|
/**
|
|
33
65
|
* Convert text-only harness history to a synchronous pi-ai Context. Tool
|
|
34
66
|
* result names are recovered from preceding assistant tool calls.
|
package/lib/llm/limits.d.ts
CHANGED
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
export declare const DEFAULT_MAX_REQUEST_IMAGE_BYTES: number;
|
|
10
10
|
/** Total-pixel budget that preserves the complete 2048px normalized attachment. */
|
|
11
11
|
export declare const DEFAULT_REQUEST_IMAGE_PIXEL_BUDGET: number;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Raw encoded bytes allowed for one request image, before inline base64 expansion. A hard limit under DSH 0.2.3 (a larger
|
|
14
|
+
* encoding is shrunk further; that is also the preferred size) and a target under rc.5. DSH's pi-ai default is 0.75 MiB
|
|
15
|
+
* (a 20 MiB request over 20 images); 1 MiB keeps what 0.11.0 sent, and the oldest images are offloaded when the request
|
|
16
|
+
* exceeds `DEFAULT_MAX_REQUEST_IMAGE_BYTES`.
|
|
17
|
+
*/
|
|
13
18
|
export declare const DEFAULT_REQUEST_IMAGE_MAX_BYTES: number;
|
|
14
19
|
/** Maximum provider idle time while one stream read is outstanding. */
|
|
15
20
|
export declare const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 300000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibedev-si/dsh-vibedev",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "VibeDev 账号与模型:在 DeepSeek Harness 里登录 VibeDev,与 DeepSeek 账号并存,使用 VibeDev 网关的模型(Claude、GPT 等),并生成图片、视频、音乐和播客 · VibeDev account and models for DeepSeek Harness: sign in to VibeDev next to the DeepSeek account and use the VibeDev gateway's models (Claude, GPT and more), plus image, video, music and podcast generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|