refactor: remove Mixture of Agents and Kimi usage

MOA_* was never configured, so enrichArbiterPromptWithMoa always
returned the prompt unchanged and the Kimi usage fetch only produced an
empty dashboard row. Remove src/moa.ts, src/kimi-usage.ts, the arbiter
prompt enrichment, MoA config/schema, the Kimi row and MoA line in the
Discord status dashboard, and the MOA_* / unused FALLBACK_* provider
examples from the docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-10-01 18:49:34 +09:00
parent 1c0fbaf26a
commit 60ff19177a
17 changed files with 6 additions and 770 deletions

View File

@@ -15,13 +15,7 @@ import {
STATUS_SHOW_ROOMS,
USAGE_DASHBOARD_ENABLED,
CODEX_WARMUP_CONFIG,
getMoaConfig,
} from './config.js';
import {
fetchKimiUsage,
buildKimiUsageRows,
type KimiUsageData,
} from './kimi-usage.js';
import { getGlobalFailoverInfo } from './service-routing.js';
import {
fetchAllClaudeUsage,
@@ -109,7 +103,6 @@ const DASHBOARD_DUPLICATE_CLEANUP_POLL_MS = 300_000;
let statusMessageId: string | null = null;
let cachedUsageContent = '';
let cachedClaudeAccounts: ClaudeAccountUsage[] = [];
let cachedKimiUsage: KimiUsageData | null = null;
let usageUpdateInProgress = false;
let channelMetaCache = new Map<string, ChannelMeta>();
let channelMetaLastRefresh = 0;
@@ -142,7 +135,7 @@ export function requestImmediateStatusUpdate(): void {
let cachedCodexUsageRows: UsageRow[] = [];
/** Codex service only: ISO timestamp of last successful usage fetch. */
let codexUsageFetchedAt: string | null = null;
/** Renderer service only: ISO timestamp of last successful Claude/Kimi usage render. */
/** Renderer service only: ISO timestamp of last successful Claude usage render. */
let rendererUsageFetchedAt: string | null = null;
export interface WatcherTaskSummary {
@@ -279,14 +272,12 @@ export function formatRoomName(
export function buildWebUsageRowsForSnapshot(args: {
serviceAgentType: AgentType;
claudeAccounts: ClaudeAccountUsage[];
kimiUsage: KimiUsageData | null;
codexRows: UsageRow[];
}): UsageRow[] {
const rows: UsageRow[] = [];
if (args.serviceAgentType === 'claude-code') {
rows.push(...buildClaudeUsageRows(args.claudeAccounts));
rows.push(...buildKimiUsageRows(args.kimiUsage));
}
rows.push(...args.codexRows);
@@ -300,7 +291,6 @@ function buildUsageSnapshotRows(opts: UnifiedDashboardOptions): {
const rows = buildWebUsageRowsForSnapshot({
serviceAgentType: opts.serviceAgentType,
claudeAccounts: cachedClaudeAccounts,
kimiUsage: cachedKimiUsage,
codexRows: cachedCodexUsageRows,
});
@@ -625,13 +615,6 @@ async function buildUsageContent(): Promise<string> {
}
}
// Kimi usage
try {
cachedKimiUsage = await fetchKimiUsage();
} catch (err) {
logger.warn({ err }, 'Failed to fetch Kimi usage for dashboard');
}
const lines: string[] = ['📊 *사용량*'];
const bar = (pct: number) => {
const filled = Math.max(0, Math.min(5, Math.round(pct / 20)));
@@ -663,10 +646,6 @@ async function buildUsageContent(): Promise<string> {
);
}
// Group 3: Kimi coding plan
const kimiRows = buildKimiUsageRows(cachedKimiUsage);
claudeBotRows.push(...kimiRows);
lines.push(...renderUsageTable(claudeBotRows, codexBotRows));
lines.push('');
@@ -806,15 +785,6 @@ function buildModelConfigSection(): string {
}
}
// MoA status
const moaConfig = getMoaConfig();
if (moaConfig.enabled) {
const refs = moaConfig.referenceModels
.map((m) => `${m.name} \`${m.model}\``)
.join(', ');
lines.push(` **MoA** — ${refs}`);
}
if (failover.active) {
lines.push(` ⚠️ **Failover 활성** — ${failover.reason || '알 수 없음'}`);
}