25 lines
801 B
JavaScript
25 lines
801 B
JavaScript
|
|
// All intercepted domains + URL patterns per tool
|
||
|
|
|
||
|
|
const TARGET_HOSTS = [
|
||
|
|
"daily-cloudcode-pa.googleapis.com",
|
||
|
|
"cloudcode-pa.googleapis.com",
|
||
|
|
"api.individual.githubcopilot.com",
|
||
|
|
"q.us-east-1.amazonaws.com",
|
||
|
|
];
|
||
|
|
|
||
|
|
const URL_PATTERNS = {
|
||
|
|
antigravity: [":generateContent", ":streamGenerateContent"],
|
||
|
|
copilot: ["/chat/completions", "/v1/messages", "/responses"],
|
||
|
|
kiro: ["/generateAssistantResponse"],
|
||
|
|
};
|
||
|
|
|
||
|
|
function getToolForHost(host) {
|
||
|
|
const h = (host || "").split(":")[0];
|
||
|
|
if (h === "api.individual.githubcopilot.com") return "copilot";
|
||
|
|
if (h === "daily-cloudcode-pa.googleapis.com" || h === "cloudcode-pa.googleapis.com") return "antigravity";
|
||
|
|
if (h === "q.us-east-1.amazonaws.com") return "kiro";
|
||
|
|
return null;
|
||
|
|
}
|
||
|
|
|
||
|
|
module.exports = { TARGET_HOSTS, URL_PATTERNS, getToolForHost };
|