dsh-agy-link 0.4.12 → 0.4.13
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/CHANGELOG.md +7 -0
- package/dist/index.js +17 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.13 (2026-08-21)
|
|
4
|
+
|
|
5
|
+
- **Fixed Multimodal Image Attachment Staging & Direct Disk Fallback.**
|
|
6
|
+
- **Dynamic Attachment Service Lookup**: Fixed Cordis proxy boundary issue where `(ctx as any).attachments` evaluated to `undefined` when not statically declared in `inject`; now resolves via `ctx.get('attachments')`.
|
|
7
|
+
- **Local Storage Direct Disk Fallback**: Added direct fallback to read from DSH's local content-addressed storage (`~/.dsh/attachments/v1/objects/<prefix>/<id>`), guaranteeing 100% reliable image byte extraction even if service bindings are uninitialized.
|
|
8
|
+
- **Explicit Vision Tool Directives**: Enhanced prompt staging lines to explicitly reference the `view_file` tool and absolute file path (`[image attached: "..." staged at ... Inspect it using the view_file tool with AbsolutePath: "..."]`), ensuring `agy` proactively inspects attached images even when the user sends an image without accompanying text.
|
|
9
|
+
|
|
3
10
|
## 0.4.12 (2026-08-21)
|
|
4
11
|
|
|
5
12
|
- **Adaptive Tool Dispatch for Both Standard / Native Mode and Code Mode.**
|
package/dist/index.js
CHANGED
|
@@ -1601,7 +1601,7 @@ async function stageImages(opts) {
|
|
|
1601
1601
|
height: ref.height,
|
|
1602
1602
|
bytes: ref.bytes
|
|
1603
1603
|
});
|
|
1604
|
-
lines.push("[image attached: \"" + label + "\" —
|
|
1604
|
+
lines.push("[image attached: \"" + label + "\" — staged at " + path + " (" + ref.width + "x" + ref.height + ", " + ref.bytes + " bytes). Inspect it using the view_file tool with AbsolutePath: \"" + path + "\"]");
|
|
1605
1605
|
i++;
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
@@ -2146,7 +2146,10 @@ var AgyAdapter = class extends LlmAdapter {
|
|
|
2146
2146
|
const imageRefs = [];
|
|
2147
2147
|
for (const m of trailingUser) for (const b of m.content ?? []) {
|
|
2148
2148
|
const blk = b;
|
|
2149
|
-
if (blk && blk.type === "image"
|
|
2149
|
+
if (blk && blk.type === "image") {
|
|
2150
|
+
if (blk.attachment && typeof blk.attachment === "object") imageRefs.push(blk.attachment);
|
|
2151
|
+
else if (typeof blk.attachmentId === "string") imageRefs.push(blk);
|
|
2152
|
+
}
|
|
2150
2153
|
}
|
|
2151
2154
|
if (imageRefs.length > 0 && this.deps.readImage) {
|
|
2152
2155
|
const dir = cfg.mediaDir !== "" ? cfg.mediaDir : defaultMediaDir(stateDir());
|
|
@@ -2158,7 +2161,7 @@ var AgyAdapter = class extends LlmAdapter {
|
|
|
2158
2161
|
maxImages: cfg.mediaMaxImages,
|
|
2159
2162
|
maxBytes: cfg.mediaMaxBytes
|
|
2160
2163
|
});
|
|
2161
|
-
if (res.promptSuffix !== "") prompt = prompt === "" ? res.promptSuffix : prompt + "\n\n" + res.promptSuffix;
|
|
2164
|
+
if (res.promptSuffix !== "") prompt = prompt === "" ? res.promptSuffix + "\n\n[Please inspect the attached image(s) using view_file and assist the user.]" : prompt + "\n\n" + res.promptSuffix;
|
|
2162
2165
|
if (res.staged.length > 0) stagedDirs = [dir];
|
|
2163
2166
|
}
|
|
2164
2167
|
if (prompt.trim() === "") throw new LlmError("request carries no user text or images to forward to agy", Err.AGY_ERROR);
|
|
@@ -28067,13 +28070,21 @@ function apply(ctx, entryConfig = {}) {
|
|
|
28067
28070
|
lastParser = p;
|
|
28068
28071
|
},
|
|
28069
28072
|
readImage: async (ref) => {
|
|
28070
|
-
const svc = ctx.attachments;
|
|
28071
|
-
if (
|
|
28073
|
+
const svc = ctx.get("attachments") ?? ctx.attachments;
|
|
28074
|
+
if (svc && typeof svc.readImage === "function") try {
|
|
28075
|
+
const stored = await svc.readImage(ref);
|
|
28076
|
+
if (stored?.data) return stored.data;
|
|
28077
|
+
} catch {}
|
|
28072
28078
|
try {
|
|
28073
|
-
|
|
28079
|
+
const id = ref.attachmentId;
|
|
28080
|
+
if (id && typeof id === "string") {
|
|
28081
|
+
const diskPath = join(dshHome(), "attachments", "v1", "objects", id.slice(0, 2), id);
|
|
28082
|
+
if (existsSync(diskPath)) return readFileSync(diskPath);
|
|
28083
|
+
}
|
|
28074
28084
|
} catch {
|
|
28075
28085
|
return null;
|
|
28076
28086
|
}
|
|
28087
|
+
return null;
|
|
28077
28088
|
}
|
|
28078
28089
|
});
|
|
28079
28090
|
const setOverride = (key, value) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agy-link",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.13",
|
|
4
4
|
"description": "Google Antigravity (agy CLI) models for DeepSeek Harness — stream Gemini/Claude/GPT-OSS subscriptions into DSH with thinking, tool activity, token usage and in-GUI Google OAuth login.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|