dsh-agy-link 0.4.83 → 0.4.85

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,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.85 (2026-10-29)
4
+
5
+ ### English
6
+
7
+ - **Security(doctor): redact `Authorization: Basic`, `Cookie` and `X-Api-Key` headers.**
8
+ - `redactLine()` only masked `Bearer …` tokens, so a doctor log line carrying `Authorization: Basic <base64>`, `Cookie:` / `Set-Cookie:`, or `X-Api-Key:` values landed in the report verbatim. All auth-carrying headers are now masked (`<name>: <redacted>`) while ordinary text is preserved. Adds a regression test.
9
+
10
+ ### 中文
11
+
12
+ - **安全(doctor):脱敏 `Authorization: Basic`、`Cookie`、`X-Api-Key` 等头。**
13
+ - `redactLine()` 此前只处理 `Bearer …`,因此 doctor 日志中 `Authorization: Basic <base64>`、`Cookie:`/`Set-Cookie:`、`X-Api-Key:` 的值会原样落入报告。现将这些携带凭据的头统一脱敏为 `<name>: <redacted>`,普通文本不变。补充回归测试。
14
+
15
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.4.84...v0.4.85
16
+
17
+ ## 0.4.84 (2026-10-29)
18
+
19
+ ### English
20
+
21
+ - **Perf(parser): parse a multi-line chunk in O(n) instead of O(n²).**
22
+ - `StreamJsonParser.feed()` walked the buffer with a `while` loop that re-sliced `this.buffer` on every newline — each slice copies the whole remainder, so a large chunk carrying many lines was quadratic in copied bytes. It now splits once (`split('\n')`, keep the torn tail), which is linear; behaviour (incl. `\r\n` stripping and torn-chunk buffering) is unchanged. Adds a large-single-chunk regression test.
23
+
24
+ ### 中文
25
+
26
+ - **性能(parser):多行 chunk 由 O(n²) 改为 O(n) 解析。**
27
+ - `StreamJsonParser.feed()` 原来用 `while` 循环逐行 `this.buffer = this.buffer.slice(...)`,每次 slice 都会复制整个剩余缓冲,含大量行的大 chunk 呈平方级复制。现改为一次性 `split('\n')` 并保留未完成的尾部(线性);`\r\n` 去除与断块缓冲等行为不变。补充「单个大 chunk」回归测试。
28
+
29
+ **Full Changelog**: https://github.com/amlyczz/dsh-agy-link/compare/v0.4.83...v0.4.84
30
+
3
31
  ## 0.4.83 (2026-10-29)
4
32
 
5
33
  ### English
package/dist/index.js CHANGED
@@ -2721,12 +2721,13 @@ var StreamJsonParser = class {
2721
2721
  feed(chunk) {
2722
2722
  this.buffer += chunk;
2723
2723
  const out = [];
2724
- let nl;
2725
- while ((nl = this.buffer.indexOf("\n")) >= 0) {
2726
- const line = this.buffer.slice(0, nl).replace(/\r$/, "");
2727
- this.buffer = this.buffer.slice(nl + 1);
2728
- const ev = this.takeLine(line);
2729
- if (ev) out.push(ev);
2724
+ if (this.buffer.indexOf("\n") >= 0) {
2725
+ const parts = this.buffer.split("\n");
2726
+ this.buffer = parts.pop() ?? "";
2727
+ for (const part of parts) {
2728
+ const ev = this.takeLine(part.replace(/\r$/, ""));
2729
+ if (ev) out.push(ev);
2730
+ }
2730
2731
  }
2731
2732
  if (this.buffer.length > 8388608) {
2732
2733
  const dropped = this.buffer.length;
@@ -32412,6 +32413,7 @@ function redactLine(line) {
32412
32413
  out = out.replace(/\beyJ[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}\b/g, "<jwt-redacted>");
32413
32414
  out = out.replace(/\bsk-[A-Za-z0-9_-]{16,}\b/g, "<api-key-redacted>");
32414
32415
  out = out.replace(/\bGOCSPX-[A-Za-z0-9_-]{10,}\b/g, "<api-key-redacted>");
32416
+ out = out.replace(/\b((?:proxy-)?authorization|cookie|set-cookie|x-api-key)\s*:\s*[^\r\n]+/gi, "$1: <redacted>");
32415
32417
  out = out.replace(/\b(?:https?|socks[45]):\/\/[^\s/]*:[^\s/@]*@[^\s]+/gi, "<proxy-url-redacted>");
32416
32418
  return out;
32417
32419
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agy-link",
3
- "version": "0.4.83",
3
+ "version": "0.4.85",
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",