/** * Group orchestration shared by MCP (LocalBackend) and CLI. * DB access is injected via GroupToolPort so this module stays free of LocalBackend private API. */ import type { GroupContextResult } from './types.js'; export interface GroupRepoHandle { id: string; name: string; repoPath: string; storagePath: string; indexedAt?: string; lastCommit?: string; } export interface GroupToolPort { resolveRepo(repoParam?: string): Promise; impact(repo: GroupRepoHandle, params: { target: string; direction: 'upstream' | 'downstream'; maxDepth?: number; relationTypes?: string[]; includeTests?: boolean; minConfidence?: number; }): Promise; query(repo: GroupRepoHandle, params: { query: string; task_context?: string; goal?: string; limit?: number; max_symbols?: number; include_content?: boolean; }): Promise; impactByUid(repoId: string, uid: string, direction: string, opts: { maxDepth: number; relationTypes: string[]; minConfidence: number; includeTests: boolean; }): Promise; context(repo: GroupRepoHandle, params: { name?: string; uid?: string; file_path?: string; include_content?: boolean; }): Promise; } export declare class GroupService { private readonly port; constructor(port: GroupToolPort); groupList(params: Record): Promise; groupSync(params: Record): Promise; groupContracts(params: Record): Promise; groupImpact(params: Record): Promise; groupContext(params: Record): Promise; groupQuery(params: Record): Promise; groupStatus(params: Record): Promise; }