mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-02 02:41:54 +00:00
Fix: Correctly detect agent platform for locks
- Updated `src/utils.mjs` to detect 'claude' platform via `CLAUDE_API_KEY`, `ANTHROPIC_API_KEY`, or `CLAUDE_SESSION_ID`. - Updated `scripts/agent/scheduler-utils.mjs` `getSafeEnv` to preserve `JULES_`, `CODEX_`, `CLAUDE_`, `ANTHROPIC_`, and `GOOSE_` environment variables when spawning child processes. - Updated `scripts/agent/run-scheduler-cycle.mjs` to use `detectPlatform()` as a fallback for `AGENT_PLATFORM` instead of hardcoding `'codex'`, ensuring the correct platform is used for lock creation. - Added unit tests for `detectPlatform` in `test/utils.test.mjs`. This resolves the issue where lock cards displayed "Unknown" or incorrect platforms. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
a5c8912487
commit
ae2e382bfd
4 files changed
+69
-3
No files matched your search
@@ -20,7 +20,12 @@ export function getSafeEnv() {
|
||||
key.startsWith('NOSTR_') ||
|
||||
key.startsWith('TORCH_') ||
|
||||
key.startsWith('SCHEDULER_') ||
|
||||
key.startsWith('AGENT_')) {
|
||||
key.startsWith('AGENT_') ||
|
||||
key.startsWith('JULES_') ||
|
||||
key.startsWith('CODEX_') ||
|
||||
key.startsWith('CLAUDE_') ||
|
||||
key.startsWith('ANTHROPIC_') ||
|
||||
key.startsWith('GOOSE_')) {
|
||||
safeEnv[key] = process.env[key];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user