@@ -13,8 +13,8 @@ import { join } from "node:path";
1313import { cwd } from "node:process" ;
1414import { ZodError , type ZodIssue } from "zod" ;
1515import { getAvailableTools } from "@src/adapters/registry.js" ;
16- import type { VibeConfig , ConfigLevel } from "@src/types/config.js" ;
17- import { createVibeConfigSchema } from "@src/types/config.js" ;
16+ import type { VSyncConfig , ConfigLevel } from "@src/types/config.js" ;
17+ import { createVSyncConfigSchema } from "@src/types/config.js" ;
1818import { atomicWrite } from "@src/utils/atomic-write.js" ;
1919
2020/**
@@ -60,12 +60,12 @@ export async function loadConfig(
6060 level : ConfigLevel ,
6161 projectDir ?: string ,
6262 userDir ?: string ,
63- ) : Promise < VibeConfig > {
63+ ) : Promise < VSyncConfig > {
6464 const configPath = getConfigPath ( level , projectDir , userDir ) ;
6565
6666 try {
6767 const content = await readFile ( configPath , "utf-8" ) ;
68- const config = JSON . parse ( content ) as VibeConfig ;
68+ const config = JSON . parse ( content ) as VSyncConfig ;
6969
7070 // Validate loaded config
7171 const validation = validateConfig ( config ) ;
@@ -97,7 +97,7 @@ export async function loadConfig(
9797 * @param userDir - User home directory (optional)
9898 */
9999export async function saveConfig (
100- config : VibeConfig ,
100+ config : VSyncConfig ,
101101 level : ConfigLevel ,
102102 projectDir ?: string ,
103103 userDir ?: string ,
@@ -128,9 +128,9 @@ export async function saveConfig(
128128 * @throws Error if both configs are undefined
129129 */
130130export function mergeConfigs (
131- userConfig ?: VibeConfig ,
132- projectConfig ?: VibeConfig ,
133- ) : VibeConfig {
131+ userConfig ?: VSyncConfig ,
132+ projectConfig ?: VSyncConfig ,
133+ ) : VSyncConfig {
134134 if ( ! userConfig && ! projectConfig ) {
135135 throw new Error ( "At least one config must be provided" ) ;
136136 }
@@ -140,7 +140,7 @@ export function mergeConfigs(
140140 if ( ! projectConfig ) return userConfig ;
141141
142142 // Merge with project taking precedence
143- const merged : VibeConfig = {
143+ const merged : VSyncConfig = {
144144 version : projectConfig . version || userConfig . version ,
145145 level : projectConfig . level , // Always use project level when merging
146146 } ;
@@ -209,9 +209,9 @@ export function mergeConfigs(
209209export async function loadMergedConfig (
210210 projectDir : string ,
211211 userDir ?: string ,
212- ) : Promise < VibeConfig > {
213- let userConfig : VibeConfig | undefined ;
214- let projectConfig : VibeConfig | undefined ;
212+ ) : Promise < VSyncConfig > {
213+ let userConfig : VSyncConfig | undefined ;
214+ let projectConfig : VSyncConfig | undefined ;
215215
216216 // Try to load user config
217217 try {
@@ -296,13 +296,13 @@ function extractZodErrors(issues: ZodIssue[]): string[] {
296296 * @param config - Configuration to validate
297297 * @returns Validation result with errors if any
298298 */
299- export function validateConfig ( config : VibeConfig ) : ValidationResult {
299+ export function validateConfig ( config : VSyncConfig ) : ValidationResult {
300300 try {
301301 // Get valid tools from registry (dynamic validation)
302302 const validTools = getAvailableTools ( ) ;
303303
304304 // Create schema with current valid tools
305- const schema = createVibeConfigSchema ( validTools ) ;
305+ const schema = createVSyncConfigSchema ( validTools ) ;
306306
307307 // Validate config
308308 schema . parse ( config ) ;
0 commit comments