codsh-bundle 0.6.1 → 0.8.0
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/lib/index.js +1143 -176
- package/lib/types/bang.d.ts +6 -0
- package/lib/types/completion.d.ts +20 -0
- package/lib/types/console.d.ts +59 -5
- package/lib/types/editor.d.ts +58 -0
- package/lib/types/inputbox.d.ts +13 -1
- package/lib/types/keys.d.ts +4 -0
- package/lib/types/prompt.d.ts +17 -1
- package/lib/types/screen.d.ts +67 -1
- package/lib/types/selector.d.ts +14 -3
- package/lib/types/ship.d.ts +6 -5
- package/lib/types/spinner.d.ts +7 -0
- package/lib/types/status.d.ts +5 -4
- package/lib/types/transcript.d.ts +21 -0
- package/lib/types/vision.d.ts +34 -5
- package/package.json +2 -1
package/lib/types/vision.d.ts
CHANGED
|
@@ -4,14 +4,16 @@
|
|
|
4
4
|
* DeepSeek Vision routes receive first-class image blocks before this module
|
|
5
5
|
* is involved. For text-only routes such as Flash and Pro, codsh gives an
|
|
6
6
|
* image two honest lives: it is always saved to a stable file the agent's
|
|
7
|
-
* tools can touch — inspect, commit, embed.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* transcribed, structure narrated. Both ride the same message the person
|
|
7
|
+
* tools can touch — inspect, commit, embed. An explicit `CODSH_VISION_*`
|
|
8
|
+
* sidecar, or DeepSeek's built-in Vision Exp bridge when no sidecar is set,
|
|
9
|
+
* can also describe it into text the model can actually read: everything in
|
|
10
|
+
* it transcribed, structure narrated. Both ride the same message the person
|
|
11
11
|
* sent, so they persist in durable history and survive `--resume`.
|
|
12
12
|
* @module codsh-bundle/src/vision
|
|
13
13
|
*/
|
|
14
|
-
import type { EncodedImageAttachment, ImageAttachmentLimits } from '@deepseek-ai/dsh-attachment/types';
|
|
14
|
+
import type { EncodedImageAttachment, ImageAttachmentLimits, ImageAttachmentRef } from '@deepseek-ai/dsh-attachment/types';
|
|
15
|
+
import type { GenerateOptions, LlmCallConfig, ModelModality, StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
16
|
+
import type { SessionId } from '@deepseek-ai/dsh-session';
|
|
15
17
|
/** A vision sidecar: an OpenAI-compatible endpoint that can see. */
|
|
16
18
|
export interface VisionConfig {
|
|
17
19
|
/** The API base, e.g. `https://open.bigmodel.cn/api/paas/v4`. */
|
|
@@ -21,6 +23,16 @@ export interface VisionConfig {
|
|
|
21
23
|
/** The multimodal model to ask. */
|
|
22
24
|
model: string;
|
|
23
25
|
}
|
|
26
|
+
/** The sibling route that lends sight to DeepSeek's text-only models. */
|
|
27
|
+
export declare const DEEPSEEK_VISION_MODEL = "deepseek-v4-flash-vision-exp";
|
|
28
|
+
/** The provider-owned preparation seam needed for one auxiliary vision call. */
|
|
29
|
+
export interface VisionLlm {
|
|
30
|
+
prepareCall(config: LlmCallConfig, signal?: AbortSignal): Promise<{
|
|
31
|
+
readonly config: LlmCallConfig;
|
|
32
|
+
readonly inputModalities?: readonly ModelModality[];
|
|
33
|
+
stream(options: GenerateOptions): AsyncIterable<StreamChunk>;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
24
36
|
/**
|
|
25
37
|
* The sidecar from the environment, or undefined when none is configured.
|
|
26
38
|
* @param env - the process environment.
|
|
@@ -36,6 +48,23 @@ export declare function visionConfigFromEnv(env: Record<string, string | undefin
|
|
|
36
48
|
* @throws on timeout, a non-2xx answer, or an answer with no text.
|
|
37
49
|
*/
|
|
38
50
|
export declare function describeImage(image: EncodedImageAttachment, config: VisionConfig, signal?: AbortSignal): Promise<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Ask DeepSeek's native vision sibling to describe one durable image.
|
|
53
|
+
*
|
|
54
|
+
* This is deliberately a one-shot auxiliary call: it receives no conversation
|
|
55
|
+
* history, system prompt, or tools, and its answer is returned as plain text
|
|
56
|
+
* for the selected text model's ordinary user turn.
|
|
57
|
+
* @param image - the image reference already admitted to the durable store.
|
|
58
|
+
* @param llm - the provider-neutral runtime serving the DeepSeek route.
|
|
59
|
+
* @param options - optional caller cancellation and request attribution.
|
|
60
|
+
* @returns the visible text emitted by the vision model.
|
|
61
|
+
* @throws when the route cannot see, the provider fails, the call is aborted,
|
|
62
|
+
* or the response contains no visible text.
|
|
63
|
+
*/
|
|
64
|
+
export declare function describeImageWithLlm(image: ImageAttachmentRef, llm: VisionLlm, options?: {
|
|
65
|
+
signal?: AbortSignal;
|
|
66
|
+
sessionId?: SessionId;
|
|
67
|
+
}): Promise<string>;
|
|
39
68
|
/**
|
|
40
69
|
* The upstream store's default admission limits, for use when no store is
|
|
41
70
|
* mounted: the sidecar payload is bounded by the same line either way.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codsh-bundle",
|
|
3
3
|
"description": "The codsh runtime: the interactive TTY surface and code-cli agent preset, installed into a dsh profile. Users install codsh-cli (the launcher) — this package is what it registers.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@deepseek-ai/dsh-lsp-stdio": "^0.1.1-rc.2",
|
|
51
51
|
"@deepseek-ai/dsh-persona": "^0.1.1-rc.2",
|
|
52
52
|
"@deepseek-ai/dsh-plan-mode": "^0.1.1-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-skill": "^0.1.1-rc.2",
|
|
53
54
|
"@deepseek-ai/dsh-skill-filesystem": "^0.1.1-rc.2",
|
|
54
55
|
"@deepseek-ai/dsh-terminal": "^0.1.1-rc.2",
|
|
55
56
|
"@deepseek-ai/dsh-terminal-bash": "^0.1.1-rc.2",
|