mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-22 15:12:23 +03:00
* fix(antigravity): preserve protocol fidelity and fail closed * chore: add PR-numbered changelog fragment * test: split oversized Antigravity suites * refactor(antigravity): align official IDE and CLI identities * fix(antigravity): align catalog with callable models * test(antigravity): update 2 test files to renamed version-cache API (#8013 fix) Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: nguyenha935 <208228297+nguyenha935@users.noreply.github.com> Co-authored-by: backryun <backryun@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: nguyenha935 <nguyenha935@users.noreply.github.com> Co-authored-by: Probe Test <probe@example.com>
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
export const ANTIGRAVITY_CLIENT_PROFILE_VALUES = ["ide", "cli"] as const;
|
|
|
|
export type AntigravityClientProfile = (typeof ANTIGRAVITY_CLIENT_PROFILE_VALUES)[number];
|
|
|
|
export const DEFAULT_ANTIGRAVITY_CLIENT_PROFILE: AntigravityClientProfile = "ide";
|
|
|
|
export type AntigravityClientProfileSetting = AntigravityClientProfile;
|
|
|
|
export const ANTIGRAVITY_CLIENT_PROFILE_OPTIONS: Array<{
|
|
value: AntigravityClientProfileSetting;
|
|
labelKey: "antigravityClientProfileIde" | "antigravityClientProfileCli";
|
|
}> = [
|
|
{ value: "ide", labelKey: "antigravityClientProfileIde" },
|
|
{ value: "cli", labelKey: "antigravityClientProfileCli" },
|
|
];
|
|
|
|
export function normalizeAntigravityClientProfile(value: unknown): AntigravityClientProfile {
|
|
if (typeof value === "string") {
|
|
const normalized = value.trim().toLowerCase();
|
|
if (normalized === "ide" || normalized === "cli") {
|
|
return normalized;
|
|
}
|
|
// Read-only compatibility for values persisted before the official CLI profile
|
|
// replaced OmniRoute's synthetic harness/sdk naming. New writes are validated
|
|
// against ANTIGRAVITY_CLIENT_PROFILE_VALUES and cannot reintroduce these aliases.
|
|
if (normalized === "harness" || normalized === "sdk") {
|
|
return "cli";
|
|
}
|
|
}
|
|
return DEFAULT_ANTIGRAVITY_CLIENT_PROFILE;
|
|
}
|
|
|
|
export const normalizeAntigravityClientProfileSetting = normalizeAntigravityClientProfile;
|