evOo-local/packages/contracts/src/local-settings.js
cynarAI 6c7eed7580 Initial clean evOo-local from f00577b
Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline
(Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/*
packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
2026-09-20 17:15:16 +02:00

29 lines
850 B
JavaScript

/** Local host capability: limited to server configuration and its owner's model settings. */
export const LOCAL_SETTINGS_PAGE = "/desktop-settings";
export const LOCAL_SETTINGS_RPC = "/api/desktop-settings/rpc";
export const LOCAL_SETTINGS_TOKEN_HEADER = "x-rakazo-local-settings-token";
const procedures = new Set([
"me",
"models/list",
"models/credentials",
"models/connect",
"models/probeOpenAiCompatible",
"models/beginOAuth",
"models/submitOAuthCode",
"models/completeOAuth",
"models/finishOAuth",
"models/cancelOAuth",
"models/setDefault",
"integrationSetup/get",
"integrationSetup/save",
]);
/** @param {string} pathname */
export function isLocalSettingsProcedure(pathname) {
return (
pathname.startsWith(`${LOCAL_SETTINGS_RPC}/`) &&
procedures.has(pathname.slice(LOCAL_SETTINGS_RPC.length + 1))
);
}