dsh-agy-link 0.4.80 → 0.4.81

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.81 (2026-10-29)
4
+
5
+ ### English
6
+
7
+ - **Fix(parser): bound a runaway un-newline-terminated stdout buffer.**
8
+ - `StreamJsonParser.feed()` only split on `\n`, so a malformed/runaway stream that produced megabytes with no newline (or one giant partial line) grew the internal buffer without bound. A partial line over `MAX_STREAM_LINE_BYTES` (8 MiB) is now dropped and surfaced as a `garbage` event, keeping memory bounded; well-formed newline-delimited events are unaffected. Adds a regression test.
9
+
10
+ ### 中文
11
+
12
+ - **修复(parser):限制无换行结尾的超大 stdout 缓冲。**
13
+ - `StreamJsonParser.feed()` 只按 `\n` 切分,若输出异常/失控产生数 MB 且不含换行(或一整条超长未完成的行),内部缓冲会无界增长。现在超过 `MAX_STREAM_LINE_BYTES`(8 MiB)的未完成行会被丢弃并以 `garbage` 事件上报,内存保持有界;正常的按行 NDJSON 事件不受影响。补充回归测试。
14
+
15
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.4.80...v0.4.81
16
+
3
17
  ## 0.4.80 (2026-10-29)
4
18
 
5
19
  ### English
package/dist/index.js CHANGED
@@ -2728,6 +2728,16 @@ var StreamJsonParser = class {
2728
2728
  const ev = this.takeLine(line);
2729
2729
  if (ev) out.push(ev);
2730
2730
  }
2731
+ if (this.buffer.length > 8388608) {
2732
+ const dropped = this.buffer.length;
2733
+ this.buffer = "";
2734
+ this.stats.garbage++;
2735
+ this.stats.consecutiveGarbage++;
2736
+ out.push({
2737
+ kind: "garbage",
2738
+ line: "<dropped over-long line: " + dropped + " bytes>"
2739
+ });
2740
+ }
2731
2741
  return out;
2732
2742
  }
2733
2743
  /** Flush a trailing line without a newline (agy killed mid-write). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agy-link",
3
- "version": "0.4.80",
3
+ "version": "0.4.81",
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",