refactor(env): migrated environment variables from OMP_ to PI_ prefix and centralized access via getEnv()

- Migrated environment variable access from direct process.env to centralized getEnv() utility function across all packages.
- Renamed environment variable prefix from OMP_ to PI_ throughout codebase (e.g., OMP_CODING_AGENT_DIR -> PI_CODING_AGENT_DIR).
- Removed automatic environment variable migration from PI_ to OMP_ prefixes via migrate-env.ts module.
- Removed env setting from configuration schema and applyEnvironmentVariables() method from settings.
- Updated CI/CD build configuration to use PI_COMPILED flag instead of OMP_COMPILED.
- Changed venvPath property in PythonRuntime from nullable (string | null) to optional (string | undefined).
This commit is contained in:
can1357
2026-02-05 02:55:01 +01:00
parent 2c34b641cd
commit ec801665bc
83 changed files with 400 additions and 352 deletions
@@ -9,7 +9,7 @@ describe("Python gateway environment filtering", () => {
OPENAI_API_KEY: "secret",
ANTHROPIC_API_KEY: "also-secret",
UNSAFE_TOKEN: "nope",
OMP_CUSTOM: "1",
PI_CUSTOM: "1",
LC_ALL: "en_US.UTF-8",
};
@@ -17,7 +17,7 @@ describe("Python gateway environment filtering", () => {
expect(filtered.PATH).toBe("/bin");
expect(filtered.HOME).toBe("/home/test");
expect(filtered.OMP_CUSTOM).toBe("1");
expect(filtered.PI_CUSTOM).toBe("1");
expect(filtered.LC_ALL).toBe("en_US.UTF-8");
expect(filtered.OPENAI_API_KEY).toBeUndefined();
expect(filtered.ANTHROPIC_API_KEY).toBeUndefined();
@@ -45,12 +45,12 @@ describe("Python gateway environment filtering", () => {
PATH: "/usr/bin",
HOME: "/home/test",
OPENAI_API_KEY: "secret",
OMP_DEBUG: "1",
PI_DEBUG: "1",
};
const filtered = filterEnv(env);
expect(filtered.OPENAI_API_KEY).toBeUndefined();
expect(filtered.PATH).toBe("/usr/bin");
expect(filtered.OMP_DEBUG).toBe("1");
expect(filtered.PI_DEBUG).toBe("1");
});
});