refactor: remove legacy config and state aliases (PR5)

This commit is contained in:
ejclaw
2026-04-10 22:09:04 +09:00
parent 312d19c0d1
commit e5bd721ac4
18 changed files with 155 additions and 980 deletions

View File

@@ -65,16 +65,19 @@ export function setRouterStateForServiceInDatabase(
.run(prefixedKey, value);
}
export function getLegacyRouterStateKeysFromDatabase(
export function getUnsupportedRouterStateKeysFromDatabase(
database: Database,
): string[] {
const rows = database
.prepare(
`SELECT key
FROM router_state
WHERE key IN ('last_timestamp', 'last_agent_timestamp')
OR key LIKE '%:last_timestamp'
OR key LIKE '%:last_agent_timestamp'
WHERE (
CASE
WHEN instr(key, ':') > 0 THEN substr(key, instr(key, ':') + 1)
ELSE key
END
) NOT IN ('last_seq', 'last_agent_seq')
ORDER BY key`,
)
.all() as Array<{ key: string }>;