refactor: remove dead exports and orphan modules

Delete exported symbols that nothing in src/, setup/, scripts/ or
runners/ references (and no test exercises), iterated to a fixed point:
service-routing lease/failover helpers, paired-workspace-manager
fingerprint/registration helpers, message-runtime-rules trigger helpers,
utils.fetchWithTimeout, detectPnpmStorePath, isCodexMainService,
isDeltaHandoffEnabledForGroup with the unused DELTA_HANDOFF config, the
deprecated db/schema.applySchemaMigrations alias, unused db wrappers
(memories, router state, sessions-by-agent-type, room skill override
writes, recent chat/turn-output queries) and a few unused type aliases.

Orphan files: src/dashboard.ts + src/dashboard-status-content.ts (only
referenced each other), src/restart-context-cli.ts (never invoked) and
the unused src/config/index.ts barrel.

Service-handoff / channel-owner-lease code is left for a later batch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-10-01 19:04:03 +09:00
parent 02ea212be0
commit a9fe9dac54
40 changed files with 1 additions and 1101 deletions

View File

@@ -38,14 +38,6 @@ export interface StoredRoomSkillOverride {
updatedAt: string;
}
export interface StoredRoomSkillOverrideInput {
chatJid: string;
agentType: AgentType;
skillScope: string;
skillName: string;
enabled: boolean;
}
export interface AssignRoomInput {
name: string;
roomMode?: RoomMode;
@@ -384,56 +376,6 @@ export function getStoredRoomSkillOverridesFromDatabase(
.filter((row): row is StoredRoomSkillOverride => Boolean(row));
}
export function upsertStoredRoomSkillOverrideInDatabase(
database: Database,
input: StoredRoomSkillOverrideInput,
): void {
const agentType = normalizeStoredAgentType(input.agentType);
if (!agentType) {
throw new Error(`Unsupported agent type: ${input.agentType}`);
}
const now = new Date().toISOString();
database
.prepare(
`INSERT INTO room_skill_overrides (
chat_jid, agent_type, skill_scope, skill_name, enabled,
created_at, updated_at
) VALUES (?, ?, ?, ?, ?, ?, ?)
ON CONFLICT(chat_jid, agent_type, skill_scope, skill_name)
DO UPDATE SET
enabled = excluded.enabled,
updated_at = excluded.updated_at`,
)
.run(
input.chatJid,
agentType,
input.skillScope,
input.skillName,
input.enabled ? 1 : 0,
now,
now,
);
}
export function deleteStoredRoomSkillOverrideFromDatabase(
database: Database,
input: Omit<StoredRoomSkillOverrideInput, 'enabled'>,
): void {
const agentType = normalizeStoredAgentType(input.agentType);
if (!agentType) {
throw new Error(`Unsupported agent type: ${input.agentType}`);
}
database
.prepare(
`DELETE FROM room_skill_overrides
WHERE chat_jid = ?
AND agent_type = ?
AND skill_scope = ?
AND skill_name = ?`,
)
.run(input.chatJid, agentType, input.skillScope, input.skillName);
}
function getStoredRoomModeRowFromDatabase(
database: Database,
chatJid: string,