( teamConfig: TeamaiConfig, localConfig: LocalConfig, lastPullRev: string | null, )
| 37 | * This is a no-op when `lastPullRev` is null (first run or after re-init). |
| 38 | */ |
| 39 | export async function syncTeamUpdatesToLocal( |
| 40 | teamConfig: TeamaiConfig, |
| 41 | localConfig: LocalConfig, |
| 42 | lastPullRev: string | null, |
| 43 | ): Promise<void> { |
| 44 | if (!lastPullRev) { |
| 45 | log.debug('No lastPullRev — skipping pre-push sync'); |
| 46 | return; |
| 47 | } |
| 48 | |
| 49 | const repoPath = localConfig.repo.localPath; |
| 50 | const baseDir = resolveBaseDir(localConfig); |
| 51 | |
| 52 | await syncRulesToLocal(teamConfig, localConfig, repoPath, baseDir, lastPullRev); |
| 53 | await syncSkillsToLocal(teamConfig, localConfig, repoPath, baseDir, lastPullRev); |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Sync rules: for each tool's rules/ directory, find rule files that differ |
no test coverage detected