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
+6 -6
View File
@@ -215,14 +215,14 @@ export class EditTool implements AgentTool<TInput> {
this.session = session;
const {
OMP_EDIT_FUZZY: editFuzzy = "auto",
OMP_EDIT_FUZZY_THRESHOLD: editFuzzyThreshold = "auto",
OMP_EDIT_VARIANT: envEditVariant = "auto",
PI_EDIT_FUZZY: editFuzzy = "auto",
PI_EDIT_FUZZY_THRESHOLD: editFuzzyThreshold = "auto",
PI_EDIT_VARIANT: envEditVariant = "auto",
} = process.env;
this.envEditVariant = envEditVariant;
if (envEditVariant !== "replace" && envEditVariant !== "patch" && envEditVariant !== "auto") {
throw new Error(`Invalid OMP_EDIT_VARIANT: ${envEditVariant}`);
throw new Error(`Invalid PI_EDIT_VARIANT: ${envEditVariant}`);
}
switch (editFuzzy) {
@@ -238,7 +238,7 @@ export class EditTool implements AgentTool<TInput> {
this.allowFuzzy = session.settings.get("edit.fuzzyMatch");
break;
default:
throw new Error(`Invalid OMP_EDIT_FUZZY: ${editFuzzy}`);
throw new Error(`Invalid PI_EDIT_FUZZY: ${editFuzzy}`);
}
switch (editFuzzyThreshold) {
case "auto":
@@ -247,7 +247,7 @@ export class EditTool implements AgentTool<TInput> {
default:
this.fuzzyThreshold = parseFloat(editFuzzyThreshold);
if (Number.isNaN(this.fuzzyThreshold) || this.fuzzyThreshold < 0 || this.fuzzyThreshold > 1) {
throw new Error(`Invalid OMP_EDIT_FUZZY_THRESHOLD: ${editFuzzyThreshold}`);
throw new Error(`Invalid PI_EDIT_FUZZY_THRESHOLD: ${editFuzzyThreshold}`);
}
break;
}