@@ -2,15 +2,15 @@ import { readFileSync } from "node:fs";
22import { readGithubTokenFromEnv } from "@posthog/git/signed-commit" ;
33
44// helpers for resolving the in-sandbox GitHub token
5- // agentsh env file (NUL-delimited `key=value` pairs) that the PostHog backend
6- // rewrites in place when it refreshes the sandbox's GitHub credentials
5+ // Dedicated agentsh credential file (NUL-delimited `key=value` pairs) that the
6+ // PostHog backend rewrites in place when it refreshes GitHub credentials
77// mid-session. The agent-server process env is frozen at launch, so reading
88// this live file is how in-process tools pick up a refreshed token without a
99// process restart.
10- export const SANDBOX_ENV_FILE = "/tmp/agent-env" ;
10+ const SANDBOX_GITHUB_ENV_FILE = "/tmp/agent-github -env" ;
1111
1212export function readGithubTokenFromSandboxEnvFile (
13- envFilePath : string = SANDBOX_ENV_FILE ,
13+ envFilePath : string = SANDBOX_GITHUB_ENV_FILE ,
1414) : string | undefined {
1515 try {
1616 const raw = readFileSync ( envFilePath , "utf8" ) ;
@@ -36,7 +36,7 @@ export function readGithubTokenFromSandboxEnvFile(
3636 * signed-commit tool — pick up a refreshed token without a restart.
3737 */
3838export function resolveGithubToken (
39- envFilePath : string = SANDBOX_ENV_FILE ,
39+ envFilePath : string = SANDBOX_GITHUB_ENV_FILE ,
4040) : string | undefined {
4141 return (
4242 readGithubTokenFromSandboxEnvFile ( envFilePath ) ?? readGithubTokenFromEnv ( )
0 commit comments