@@ -13,7 +13,7 @@ import path from "node:path";
1313import os from "node:os" ;
1414import { fileURLToPath } from "node:url" ;
1515import { Command , Option } from "commander" ;
16- import { RuntimeKind } from "syncpoint-adapters" ;
16+ import { RuntimeKind , type AgentProvider , type AgentRole } from "syncpoint-adapters" ;
1717import { InternalError } from "syncpoint-kernel" ;
1818import { initSyncpointDir , getSyncpointDir , isProjectLocal , getRawDb } from "syncpoint-server" ;
1919import * as repo from "syncpoint-server/repositories" ;
@@ -206,8 +206,8 @@ export function registerConnectCommands(program: Command): void {
206206
207207 const agent = repo . createAgent ( {
208208 name : p . name ,
209- provider : p . provider as any ,
210- role : p . role as any ,
209+ provider : p . provider as AgentProvider ,
210+ role : p . role as AgentRole ,
211211 } ) ;
212212
213213 const boundAgent = bindRuntime ( agent , p . provider , projectRoot ) ;
@@ -338,13 +338,13 @@ export function registerConnectCommands(program: Command): void {
338338 try {
339339 const rawDb = getRawDb ( ) ;
340340 if ( rawDb ) {
341- const integrityResult = rawDb . prepare ( "PRAGMA integrity_check" ) . get ( ) as any ;
341+ const integrityResult = rawDb . prepare ( "PRAGMA integrity_check" ) . get ( ) as { integrity_check : string } ;
342342 if ( integrityResult ?. integrity_check === "ok" ) {
343343 checks . push ( { check : "db-integrity" , status : "ok" , detail : "PRAGMA integrity_check: ok" } ) ;
344344 } else {
345345 checks . push ( { check : "db-integrity" , status : "fail" , detail : `integrity_check: ${ JSON . stringify ( integrityResult ) } ` } ) ;
346346 }
347- const journalMode = rawDb . prepare ( "PRAGMA journal_mode" ) . get ( ) as any ;
347+ const journalMode = rawDb . prepare ( "PRAGMA journal_mode" ) . get ( ) as { journal_mode : string } ;
348348 const mode = journalMode ?. journal_mode ?? "unknown" ;
349349 checks . push ( { check : "db-wal" , status : mode === "wal" ? "ok" : "warn" , detail : `journal_mode: ${ mode } ` } ) ;
350350 }
@@ -363,7 +363,7 @@ export function registerConnectCommands(program: Command): void {
363363 if ( rawDb ) {
364364 const orphanResources = rawDb . prepare (
365365 "SELECT COUNT(*) as cnt FROM resource_claim_resource WHERE claim_id NOT IN (SELECT id FROM resource_claim)"
366- ) . get ( ) as any ;
366+ ) . get ( ) as { cnt : number } ;
367367 if ( orphanResources ?. cnt > 0 ) {
368368 checks . push ( { check : "orphans" , status : "warn" , detail : `${ orphanResources . cnt } orphan resource_claim_resource rows` } ) ;
369369 }
0 commit comments