thincoder 0.8.7 → 0.8.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thincoder",
3
- "version": "0.8.7",
3
+ "version": "0.8.8",
4
4
  "description": "Thin coding agent - zero dependencies, no build step, Node.js native. Sharp code, zero bloat.",
5
5
  "keywords": [
6
6
  "ai",
@@ -17,16 +17,6 @@ import { spawn, execFileSync } from "node:child_process";
17
17
  import { readFile, readdir, stat, lstat } from "node:fs/promises";
18
18
  import { join } from "node:path";
19
19
 
20
- /** Child process environment variable whitelist: only pass through safe variables, isolate sensitive info like API keys */
21
- const SAFE_ENV_KEYS = new Set([
22
- "PATH", "HOME", "USERPROFILE", "APPDATA", "LOCALAPPDATA",
23
- "TEMP", "TMP", "TMPDIR", "LANG", "LC_ALL", "LC_CTYPE", "SHELL",
24
- "ComSpec", "PATHEXT", "SystemRoot", "windir",
25
- "NUMBER_OF_PROCESSORS", "PROCESSOR_ARCHITECTURE", "OS",
26
- "PYTHONIOENCODING", "GIT_EDITOR", "EDITOR", "VISUAL",
27
- "GIT_PAGER", "PAGER", "TERM",
28
- ])
29
-
30
20
  /** Maximum buffer size per stream (stdout / stderr) before truncation */
31
21
  const MAX_STREAM_BUF = 2_000_000
32
22
 
@@ -67,16 +57,14 @@ function checkBashSafety(command, cwd) {
67
57
  }
68
58
 
69
59
  /**
70
- * Build a sanitized environment for the child process.
71
- * Whitelists safe variables, forces non-interactive defaults (EDITOR/PAGER/TERM),
72
- * and sets PYTHONIOENCODING on Windows to override GBK default for Python scripts.
60
+ * Build environment for child process.
61
+ * Passes through all parent env vars, with non-interactive overrides (EDITOR/PAGER/TERM).
62
+ * Sets PYTHONIOENCODING on Windows to override GBK default for Python scripts.
73
63
  */
74
64
  function buildBashEnv() {
75
65
  const winCmd = process.platform === "win32"
76
66
  return {
77
- ...Object.fromEntries(
78
- Object.entries(process.env).filter(([k]) => SAFE_ENV_KEYS.has(k))
79
- ),
67
+ ...process.env,
80
68
  GIT_EDITOR: "true",
81
69
  EDITOR: "true",
82
70
  VISUAL: "true",