dsh-agy-link 0.4.91 → 0.4.93
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 +28 -0
- package/dist/index.js +18 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.93 (2026-10-29)
|
|
4
|
+
|
|
5
|
+
### English
|
|
6
|
+
|
|
7
|
+
- **Fix(oneshot): don't split a UTF-8 character when truncating an inlined file.**
|
|
8
|
+
- `inlineFiles()` truncated a large text file with a raw byte slice (`buf.subarray(0, INLINE_MAX_BYTES)`), so if the 256 KiB boundary fell inside a multibyte character the prompt got a replacement char (`�`). Truncation now walks back to a UTF-8 code-point boundary (`truncateUtf8`). Adds a regression test that places a 3-byte char across the boundary.
|
|
9
|
+
|
|
10
|
+
### 中文
|
|
11
|
+
|
|
12
|
+
- **修复(oneshot):截断内联大文件时不再把一个 UTF-8 字符切断。**
|
|
13
|
+
- `inlineFiles()` 之前用裸字节切片(`buf.subarray(0, INLINE_MAX_BYTES)`),若 256 KiB 边界落在多字节字符中间,prompt 里会出现替换符 `�`。现截断回退到 UTF-8 码点边界(`truncateUtf8`)。补充把一个 3 字节字符跨边界放置的回归测试。
|
|
14
|
+
|
|
15
|
+
**Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.4.92...v0.4.93
|
|
16
|
+
|
|
17
|
+
## 0.4.92 (2026-10-29)
|
|
18
|
+
|
|
19
|
+
### English
|
|
20
|
+
|
|
21
|
+
- **Fix(models): don't parse lowercase `error:`/`failed:` diagnostic lines into bogus model slugs.**
|
|
22
|
+
- The two-column text fallback skipped rows starting with capital `Fetching`/`Error` only, so a lowercase `error: …` / `failed: …` line (two-space aligned) was parsed as a model with slug `error:`. The banner filter is now case-insensitive and also covers `failed`. Adds a regression test.
|
|
23
|
+
|
|
24
|
+
### 中文
|
|
25
|
+
|
|
26
|
+
- **修复(models):不再把小写的 `error:`/`failed:` 诊断行解析成假模型条目。**
|
|
27
|
+
- 两列文本回退只跳过首字母大写的 `Fetching`/`Error`,因此小写且以两空格对齐的 `error: …`/`failed: …` 会被解析成 slug 为 `error:` 的假模型。现 banner 过滤改为大小写不敏感并覆盖 `failed`。补充回归测试。
|
|
28
|
+
|
|
29
|
+
**Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.4.91...v0.4.92
|
|
30
|
+
|
|
3
31
|
## 0.4.91 (2026-10-29)
|
|
4
32
|
|
|
5
33
|
### English
|
package/dist/index.js
CHANGED
|
@@ -2142,7 +2142,7 @@ function parseModelsOutput(stdout) {
|
|
|
2142
2142
|
const out = [];
|
|
2143
2143
|
for (const line of text.split(/\n/)) {
|
|
2144
2144
|
const t = line.trim();
|
|
2145
|
-
if (t === "" ||
|
|
2145
|
+
if (t === "" || /^(fetching|error|failed|warning|please sign in|tip:)/i.test(t)) continue;
|
|
2146
2146
|
const m = t.match(/^(\S+)(?:\t+|\s{2,})(.+)$/);
|
|
2147
2147
|
if (m && m[1] !== void 0 && m[2] !== void 0) out.push({
|
|
2148
2148
|
slug: m[1],
|
|
@@ -31843,6 +31843,22 @@ function detectContinuation(messages) {
|
|
|
31843
31843
|
//#region src/host/oneshot.ts
|
|
31844
31844
|
/** Per-file inline cap; larger files are truncated. */
|
|
31845
31845
|
const INLINE_MAX_BYTES = 262144;
|
|
31846
|
+
/** Truncate a buffer to <= max bytes without splitting a UTF-8 code point. */
|
|
31847
|
+
function truncateUtf8(buf, max) {
|
|
31848
|
+
if (buf.length <= max) return buf;
|
|
31849
|
+
let end = max;
|
|
31850
|
+
let i = end - 1;
|
|
31851
|
+
let back = 0;
|
|
31852
|
+
while (i >= 0 && (buf[i] & 192) === 128 && back < 3) {
|
|
31853
|
+
i--;
|
|
31854
|
+
back++;
|
|
31855
|
+
}
|
|
31856
|
+
if (i >= 0) {
|
|
31857
|
+
const lead = buf[i];
|
|
31858
|
+
if (i + (lead >= 240 ? 4 : lead >= 224 ? 3 : lead >= 192 ? 2 : 1) > end) end = i;
|
|
31859
|
+
}
|
|
31860
|
+
return buf.subarray(0, end);
|
|
31861
|
+
}
|
|
31846
31862
|
/** Text-detection: anything that is very likely not binary. */
|
|
31847
31863
|
function looksTextual(head) {
|
|
31848
31864
|
if (head === "") return true;
|
|
@@ -31871,7 +31887,7 @@ async function inlineFiles(prompt, paths, cwd) {
|
|
|
31871
31887
|
if (!looksTextual(buf.subarray(0, Math.min(buf.length, 4096)).toString("utf8"))) note = "(skipped: binary file - reference it by path and let agy read it with its own tools)";
|
|
31872
31888
|
else if (buf.byteLength > INLINE_MAX_BYTES) {
|
|
31873
31889
|
note = "(truncated to the first 262144 bytes)";
|
|
31874
|
-
body = buf
|
|
31890
|
+
body = truncateUtf8(buf, INLINE_MAX_BYTES).toString("utf8");
|
|
31875
31891
|
} else body = buf.toString("utf8");
|
|
31876
31892
|
} catch {
|
|
31877
31893
|
note = "(skipped: unreadable - " + raw + ")";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agy-link",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.93",
|
|
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",
|