codsh-bundle 0.6.0 → 0.6.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/lib/index.js +16 -7
- package/lib/types/vision.d.ts +6 -5
- package/package.json +47 -47
package/lib/index.js
CHANGED
|
@@ -5368,14 +5368,23 @@ async function run(ctx, config, io) {
|
|
|
5368
5368
|
/**
|
|
5369
5369
|
* Whether the current route explicitly accepts image input.
|
|
5370
5370
|
*
|
|
5371
|
-
*
|
|
5372
|
-
*
|
|
5373
|
-
*
|
|
5371
|
+
* Exact-model metadata, not the advisory catalog, owns this decision. The
|
|
5372
|
+
* catalog is fetched in the background and can be empty or stale while a
|
|
5373
|
+
* saved route is already usable. The same explicit-true test the adapter
|
|
5374
|
+
* applies before throwing UNSUPPORTED_CONTENT remains fail-closed: absent
|
|
5375
|
+
* modalities or a failed resolution get the text fallback, which degrades,
|
|
5376
|
+
* where the block path would crash the turn.
|
|
5374
5377
|
*/
|
|
5375
|
-
const routeAcceptsImages = () => {
|
|
5378
|
+
const routeAcceptsImages = async () => {
|
|
5376
5379
|
const current = selection.current;
|
|
5377
5380
|
if (current === void 0) return false;
|
|
5378
|
-
|
|
5381
|
+
const llm = ctx.get("llm");
|
|
5382
|
+
if (llm === void 0) return false;
|
|
5383
|
+
try {
|
|
5384
|
+
return (await llm.resolveModelInfo(current.provider, current.model)).inputModalities?.includes("image") === true;
|
|
5385
|
+
} catch {
|
|
5386
|
+
return false;
|
|
5387
|
+
}
|
|
5379
5388
|
};
|
|
5380
5389
|
/**
|
|
5381
5390
|
* Resolve a /model argument to a selection.
|
|
@@ -5969,7 +5978,7 @@ async function run(ctx, config, io) {
|
|
|
5969
5978
|
if (images.length === 0) return void 0;
|
|
5970
5979
|
const store = ctx.get("attachments");
|
|
5971
5980
|
const limits = store?.imageLimits ?? DEFAULT_IMAGE_LIMITS;
|
|
5972
|
-
if (routeAcceptsImages() && store !== void 0) try {
|
|
5981
|
+
if (await routeAcceptsImages() && store !== void 0) try {
|
|
5973
5982
|
return {
|
|
5974
5983
|
leading: (await admitEncodedImages(store, await Promise.all(images.map((pending) => fitWithinLimits(pending.image, limits))))).map((attachment) => ({
|
|
5975
5984
|
type: "image",
|
|
@@ -6131,7 +6140,7 @@ async function run(ctx, config, io) {
|
|
|
6131
6140
|
continue;
|
|
6132
6141
|
}
|
|
6133
6142
|
let batch = [];
|
|
6134
|
-
if (images.length > 0) if (routeAcceptsImages()) {
|
|
6143
|
+
if (images.length > 0) if (await routeAcceptsImages()) {
|
|
6135
6144
|
const limits = ctx.get("attachments")?.imageLimits ?? DEFAULT_IMAGE_LIMITS;
|
|
6136
6145
|
batch = await Promise.all(images.map((pending) => fitWithinLimits(pending.image, limits)));
|
|
6137
6146
|
} else prompt.setFlash(theme.error(" this model does not accept images with commands — they were dropped"));
|
package/lib/types/vision.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What a pasted image becomes when the model cannot see.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* DeepSeek Vision routes receive first-class image blocks before this module
|
|
5
|
+
* is involved. For text-only routes such as Flash and Pro, codsh gives an
|
|
6
|
+
* image two honest lives: it is always saved to a stable file the agent's
|
|
7
|
+
* tools can touch — inspect, commit, embed. And when a vision sidecar is
|
|
8
|
+
* configured (`CODSH_VISION_*`: any OpenAI-compatible multimodal endpoint),
|
|
9
|
+
* the image is also described into text the model can actually read: everything in it
|
|
9
10
|
* transcribed, structure narrated. Both ride the same message the person
|
|
10
11
|
* sent, so they persist in durable history and survive `--resume`.
|
|
11
12
|
* @module codsh-bundle/src/vision
|
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.6.
|
|
4
|
+
"version": "0.6.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "lib/index.js",
|
|
@@ -38,38 +38,38 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@deepseek-ai/dsh-agent-instructions": "^0.1.
|
|
42
|
-
"@deepseek-ai/dsh-agent-presets": "^0.1.
|
|
43
|
-
"@deepseek-ai/dsh-attachment": "^0.1.
|
|
44
|
-
"@deepseek-ai/dsh-cmdline": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-code-runtime-worker-thread": "^0.1.
|
|
46
|
-
"@deepseek-ai/dsh-command-compact": "^0.1.
|
|
47
|
-
"@deepseek-ai/dsh-compaction-basic": "^0.1.
|
|
48
|
-
"@deepseek-ai/dsh-compaction-tool-result-pruner": "^0.1.
|
|
49
|
-
"@deepseek-ai/dsh-lsp": "^0.1.
|
|
50
|
-
"@deepseek-ai/dsh-lsp-stdio": "^0.1.
|
|
51
|
-
"@deepseek-ai/dsh-persona": "^0.1.
|
|
52
|
-
"@deepseek-ai/dsh-plan-mode": "^0.1.
|
|
53
|
-
"@deepseek-ai/dsh-skill-filesystem": "^0.1.
|
|
54
|
-
"@deepseek-ai/dsh-terminal": "^0.1.
|
|
55
|
-
"@deepseek-ai/dsh-terminal-bash": "^0.1.
|
|
56
|
-
"@deepseek-ai/dsh-tool-ask-user": "^0.1.
|
|
57
|
-
"@deepseek-ai/dsh-tool-bash": "^0.1.
|
|
58
|
-
"@deepseek-ai/dsh-tool-fs": "^0.1.
|
|
59
|
-
"@deepseek-ai/dsh-tool-fs-search": "^0.1.
|
|
60
|
-
"@deepseek-ai/dsh-tool-goal": "^0.1.
|
|
61
|
-
"@deepseek-ai/dsh-tool-jobs": "^0.1.
|
|
62
|
-
"@deepseek-ai/dsh-tool-lsp": "^0.1.
|
|
63
|
-
"@deepseek-ai/dsh-tool-pwsh": "^0.1.
|
|
64
|
-
"@deepseek-ai/dsh-tool-ralph": "^0.1.
|
|
65
|
-
"@deepseek-ai/dsh-tool-skill": "^0.1.
|
|
66
|
-
"@deepseek-ai/dsh-tool-subagent": "^0.1.
|
|
67
|
-
"@deepseek-ai/dsh-tool-subagent-control": "^0.1.
|
|
68
|
-
"@deepseek-ai/dsh-tool-terminal": "^0.1.
|
|
69
|
-
"@deepseek-ai/dsh-tool-todo": "^0.1.
|
|
70
|
-
"@deepseek-ai/dsh-tool-web": "^0.1.
|
|
71
|
-
"@deepseek-ai/dsh-tool-workflow": "^0.1.
|
|
72
|
-
"@deepseek-ai/dsh-workflow-worker-thread": "^0.1.
|
|
41
|
+
"@deepseek-ai/dsh-agent-instructions": "^0.1.1-rc.2",
|
|
42
|
+
"@deepseek-ai/dsh-agent-presets": "^0.1.1-rc.2",
|
|
43
|
+
"@deepseek-ai/dsh-attachment": "^0.1.1-rc.2",
|
|
44
|
+
"@deepseek-ai/dsh-cmdline": "^0.1.1-rc.2",
|
|
45
|
+
"@deepseek-ai/dsh-code-runtime-worker-thread": "^0.1.1-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-command-compact": "^0.1.1-rc.2",
|
|
47
|
+
"@deepseek-ai/dsh-compaction-basic": "^0.1.1-rc.2",
|
|
48
|
+
"@deepseek-ai/dsh-compaction-tool-result-pruner": "^0.1.1-rc.2",
|
|
49
|
+
"@deepseek-ai/dsh-lsp": "^0.1.1-rc.2",
|
|
50
|
+
"@deepseek-ai/dsh-lsp-stdio": "^0.1.1-rc.2",
|
|
51
|
+
"@deepseek-ai/dsh-persona": "^0.1.1-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-plan-mode": "^0.1.1-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-skill-filesystem": "^0.1.1-rc.2",
|
|
54
|
+
"@deepseek-ai/dsh-terminal": "^0.1.1-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-terminal-bash": "^0.1.1-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-tool-ask-user": "^0.1.1-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-tool-bash": "^0.1.1-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-tool-fs": "^0.1.1-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-tool-fs-search": "^0.1.1-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-tool-goal": "^0.1.1-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-tool-jobs": "^0.1.1-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-tool-lsp": "^0.1.1-rc.2",
|
|
63
|
+
"@deepseek-ai/dsh-tool-pwsh": "^0.1.1-rc.2",
|
|
64
|
+
"@deepseek-ai/dsh-tool-ralph": "^0.1.1-rc.2",
|
|
65
|
+
"@deepseek-ai/dsh-tool-skill": "^0.1.1-rc.2",
|
|
66
|
+
"@deepseek-ai/dsh-tool-subagent": "^0.1.1-rc.2",
|
|
67
|
+
"@deepseek-ai/dsh-tool-subagent-control": "^0.1.1-rc.2",
|
|
68
|
+
"@deepseek-ai/dsh-tool-terminal": "^0.1.1-rc.2",
|
|
69
|
+
"@deepseek-ai/dsh-tool-todo": "^0.1.1-rc.2",
|
|
70
|
+
"@deepseek-ai/dsh-tool-web": "^0.1.1-rc.2",
|
|
71
|
+
"@deepseek-ai/dsh-tool-workflow": "^0.1.1-rc.2",
|
|
72
|
+
"@deepseek-ai/dsh-workflow-worker-thread": "^0.1.1-rc.2",
|
|
73
73
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
74
74
|
"commander": "^15.0.0",
|
|
75
75
|
"diff": "^9.0.0",
|
|
@@ -79,20 +79,20 @@
|
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
81
81
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.2",
|
|
82
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
83
|
-
"@deepseek-ai/dsh-agent-default-model": "^0.1.
|
|
84
|
-
"@deepseek-ai/dsh-commands": "^0.1.
|
|
85
|
-
"@deepseek-ai/dsh-home-paths": "^0.1.
|
|
86
|
-
"@deepseek-ai/dsh-invariants": "^0.1.
|
|
87
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
88
|
-
"@deepseek-ai/dsh-permission-presets": "^0.1.
|
|
89
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
90
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
91
|
-
"@deepseek-ai/dsh-session-query": "^0.1.
|
|
92
|
-
"@deepseek-ai/dsh-token-meter": "^0.1.
|
|
93
|
-
"@deepseek-ai/dsh-tools": "^0.1.
|
|
94
|
-
"@deepseek-ai/dsh-user-approval": "^0.1.
|
|
95
|
-
"@deepseek-ai/dsh-user-questions": "^0.1.
|
|
82
|
+
"@deepseek-ai/dsh-agent": "^0.1.1-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-agent-default-model": "^0.1.1-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-commands": "^0.1.1-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-home-paths": "^0.1.1-rc.2",
|
|
86
|
+
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
|
|
88
|
+
"@deepseek-ai/dsh-permission-presets": "^0.1.1-rc.2",
|
|
89
|
+
"@deepseek-ai/dsh-session": "^0.1.1-rc.2",
|
|
90
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.1-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-session-query": "^0.1.1-rc.2",
|
|
92
|
+
"@deepseek-ai/dsh-token-meter": "^0.1.1-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
94
|
+
"@deepseek-ai/dsh-user-approval": "^0.1.1-rc.2",
|
|
95
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.1-rc.2"
|
|
96
96
|
},
|
|
97
97
|
"engines": {
|
|
98
98
|
"node": ">=22.19"
|