repoburg 1.3.236 → 1.3.238

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.
@@ -10,8 +10,8 @@
10
10
  href="https://fonts.googleapis.com/css2?family=Inter:wght@400;450;510;590;600&family=JetBrains+Mono:wght@400;500&display=swap"
11
11
  rel="stylesheet"
12
12
  />
13
- <script type="module" crossorigin src="/assets/index-BKidPoB0.js"></script>
14
- <link rel="stylesheet" crossorigin href="/assets/index-qS_kafxG.css">
13
+ <script type="module" crossorigin src="/assets/index-DzSfNOM7.js"></script>
14
+ <link rel="stylesheet" crossorigin href="/assets/index-DoOFz9GF.css">
15
15
  </head>
16
16
  <body>
17
17
  <div id="root"></div>
@@ -60,6 +60,10 @@ function backendScriptPath(fromDir) {
60
60
  * production-shaped base env. The dev daemon's shell env (NODE_ENV,
61
61
  * REPOBURG_* overrides, ts-node hooks, ...) must never leak into an
62
62
  * instance; production instances get exactly this shape.
63
+ *
64
+ * The base keys MUST stay in sync with INSTANCE_ENTRY_ALLOWED_KEYS
65
+ * (daemon/instance-entry-keys.js) — the wrapper allowlist is the final
66
+ * gate, so a key missing here cannot be recovered downstream.
63
67
  */
64
68
  function instanceEnv(projectPath, name, port) {
65
69
  const base = {
@@ -68,6 +72,9 @@ function instanceEnv(projectPath, name, port) {
68
72
  USER: process.env.USER,
69
73
  SHELL: process.env.SHELL ?? '/bin/zsh',
70
74
  LANG: process.env.LANG,
75
+ LC_ALL: process.env.LC_ALL,
76
+ TERM: process.env.TERM,
77
+ TZ: process.env.TZ,
71
78
  TMPDIR: process.env.TMPDIR,
72
79
  NODE_ENV: 'production',
73
80
  PORT: String(port),
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const path_1 = __importDefault(require("path"));
7
7
  const serviceManager_1 = require("./serviceManager");
8
+ const instanceEntry_1 = require("./instanceEntry");
8
9
  describe('backendScriptPath', () => {
9
10
  it('resolves the instance-entry wrapper inside the daemon package', () => {
10
11
  expect((0, serviceManager_1.backendScriptPath)(path_1.default.join('/repo', 'daemon', 'src'))).toBe(path_1.default.join('/repo', 'daemon', 'instance-entry.js'));
@@ -14,14 +15,23 @@ describe('backendScriptPath', () => {
14
15
  describe('instanceEnv', () => {
15
16
  it('builds the prod-parity instance env without the caller shell env', () => {
16
17
  process.env.REPOBURG_BACKEND_URL = 'http://leak:1';
18
+ process.env.TZ = 'Europe/Istanbul';
19
+ process.env.LC_ALL = 'en_US.UTF-8';
20
+ process.env.TERM = 'xterm-256color';
17
21
  const env = (0, serviceManager_1.instanceEnv)('/work/proj', 'proj', 3400);
18
22
  delete process.env.REPOBURG_BACKEND_URL;
23
+ delete process.env.TZ;
24
+ delete process.env.LC_ALL;
25
+ delete process.env.TERM;
19
26
  expect(env).toEqual({
20
27
  HOME: process.env.HOME,
21
28
  PATH: process.env.PATH,
22
29
  USER: process.env.USER,
23
30
  SHELL: process.env.SHELL ?? '/bin/zsh',
24
31
  LANG: process.env.LANG,
32
+ LC_ALL: 'en_US.UTF-8',
33
+ TERM: 'xterm-256color',
34
+ TZ: 'Europe/Istanbul',
25
35
  TMPDIR: process.env.TMPDIR,
26
36
  NODE_ENV: 'production',
27
37
  PORT: '3400',
@@ -30,6 +40,14 @@ describe('instanceEnv', () => {
30
40
  });
31
41
  expect(env.REPOBURG_BACKEND_URL).toBeUndefined();
32
42
  });
43
+ it('keeps instanceEnv keys in sync with the wrapper allowlist', () => {
44
+ // instance-entry-keys.js is the wrapper's final gate — every base key
45
+ // here must be allowed there or it is silently dropped at spawn time.
46
+ const env = (0, serviceManager_1.instanceEnv)('/w', 'w', 3400);
47
+ for (const key of Object.keys(env)) {
48
+ expect((0, instanceEntry_1.instanceEntryAllows)(key)).toBe(true);
49
+ }
50
+ });
33
51
  });
34
52
  describe('describeError', () => {
35
53
  it('returns the message of an Error', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repoburg",
3
- "version": "1.3.236",
3
+ "version": "1.3.238",
4
4
  "description": "A local AI-powered software developer assistant that runs on your own machine.",
5
5
  "author": "Celal Ertug",
6
6
  "license": "SEE LICENSE IN LICENSE",