Independent React, TypeScript and Vite web application for MaskanX. Includes the chat console, agent and persona configuration, MCP client management, model and provider settings, cron jobs, sessions, and diagnostics. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
33 lines
1.3 KiB
JavaScript
33 lines
1.3 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import { fileURLToPath } from "node:url";
|
|
import { dirname, resolve } from "node:path";
|
|
|
|
const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
const read = (path) => readFileSync(resolve(root, path), "utf8");
|
|
|
|
const providerMeta = read("src/shared/providerMeta.ts");
|
|
assert.match(providerMeta, /MASKANX_AI_PROVIDER_ID\s*=\s*"maskanx-host-ai"/);
|
|
assert.match(providerMeta, /\[MASKANX_AI_PROVIDER_ID\]\s*:\s*0/);
|
|
|
|
const providerApi = read("src/api/modules/provider.ts");
|
|
assert.match(providerApi, /getProviderUsage/);
|
|
assert.match(
|
|
providerApi,
|
|
/\/models\/\$\{encodeURIComponent\(providerId\)\}\/usage/,
|
|
);
|
|
|
|
const providerTypes = read("src/api/types/provider.ts");
|
|
assert.match(providerTypes, /ProviderUsageInfo/);
|
|
assert.match(providerTypes, /messages_remaining/);
|
|
|
|
const modelsSection = read(
|
|
"src/pages/Settings/Models/components/sections/ModelsSection.tsx",
|
|
);
|
|
assert.match(modelsSection, /MASKANX_AI_PROVIDER_ID/);
|
|
assert.match(modelsSection, /getProviderUsage/);
|
|
assert.match(modelsSection, /models\.MaskanXAiMessagesRemaining/);
|
|
assert.match(modelsSection, /selectedProviderId === MASKANX_AI_PROVIDER_ID/);
|
|
|
|
console.log("ok - MaskanX AI Models UI source contract verified");
|