instar 0.7.35 → 0.7.36
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/dist/core/SessionManager.js +18 -1
- package/package.json +1 -1
|
@@ -142,7 +142,16 @@ export class SessionManager extends EventEmitter {
|
|
|
142
142
|
'new-session', '-d',
|
|
143
143
|
'-s', tmuxSession,
|
|
144
144
|
'-c', this.config.projectDir,
|
|
145
|
-
'-e', 'CLAUDECODE=',
|
|
145
|
+
'-e', 'CLAUDECODE=', // Prevent nested Claude Code detection
|
|
146
|
+
'-e', 'ANTHROPIC_API_KEY=', // Clear stale/invalid API keys — agents use Claude subscription
|
|
147
|
+
// Isolate database credentials — spawned sessions must never inherit production
|
|
148
|
+
// database URLs from the parent shell. This prevents accidental schema changes
|
|
149
|
+
// or data operations against the wrong database. (Learned from Portal incident 2026-02-22)
|
|
150
|
+
'-e', 'DATABASE_URL=',
|
|
151
|
+
'-e', 'DIRECT_DATABASE_URL=',
|
|
152
|
+
'-e', 'DATABASE_URL_PROD=',
|
|
153
|
+
'-e', 'DATABASE_URL_DEV=',
|
|
154
|
+
'-e', 'DATABASE_URL_TEST=',
|
|
146
155
|
this.config.claudePath, ...claudeArgs,
|
|
147
156
|
], { encoding: 'utf-8' });
|
|
148
157
|
}
|
|
@@ -375,6 +384,14 @@ export class SessionManager extends EventEmitter {
|
|
|
375
384
|
'-c', this.config.projectDir,
|
|
376
385
|
'-x', '200', '-y', '50',
|
|
377
386
|
'-e', 'CLAUDECODE=', // Prevent nested Claude Code detection
|
|
387
|
+
'-e', 'ANTHROPIC_API_KEY=', // Clear stale/invalid API keys — agents use Claude subscription
|
|
388
|
+
// Isolate database credentials — spawned sessions must never inherit production
|
|
389
|
+
// database URLs from the parent shell. (Learned from Portal incident 2026-02-22)
|
|
390
|
+
'-e', 'DATABASE_URL=',
|
|
391
|
+
'-e', 'DIRECT_DATABASE_URL=',
|
|
392
|
+
'-e', 'DATABASE_URL_PROD=',
|
|
393
|
+
'-e', 'DATABASE_URL_DEV=',
|
|
394
|
+
'-e', 'DATABASE_URL_TEST=',
|
|
378
395
|
];
|
|
379
396
|
if (options?.telegramTopicId) {
|
|
380
397
|
tmuxArgs.push('-e', `INSTAR_TELEGRAM_TOPIC=${options.telegramTopicId}`);
|