Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Resolve conflicts
  • Loading branch information
nightnei committed Jul 3, 2026
commit a04daa95c7caf392c7718dfd68438f8fbdb7261b
15 changes: 13 additions & 2 deletions apps/cli/vite.config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const phpSourceCodePath = resolve( __dirname, 'php' );
// The Skill tool loads skills from `<chunk dir>/skills` at runtime (see
// `ai/skills.ts`), so they must sit directly next to the built chunks.
const skillsSourcePath = resolve( __dirname, 'ai/skills' );

const dataLiberationSourcePath = resolve(
__dirname,
'..',
Expand All @@ -41,6 +42,12 @@ const dataLiberationSourcePath = resolve(
);
const repoRoot = resolve( __dirname, '..', '..' );

// The `studio ui` command serves the built browser UI (apps/ui `dist-local`)
// from `<chunk dir>/ui`, so it must sit next to the built chunks too. Built
// separately (`npm run build:local --workspace=apps/ui`); absent in API-only
// or dev-server setups, which is fine.
const localUiDistPath = resolve( __dirname, '../ui/dist-local' );

export const baseConfig = defineConfig( {
oxc: {
target: `node${ semver.major( minimumNodeVersion ) }`,
Expand All @@ -65,6 +72,7 @@ export const baseConfig = defineConfig( {
if ( existsSync( skillsSourcePath ) ) {
cpSync( skillsSourcePath, resolve( outDir, 'skills' ), { recursive: true } );
}

execSync( 'npm -w data-liberation run build', { cwd: repoRoot, stdio: 'inherit' } );
cpSync( dataLiberationSourcePath, resolve( outDir, 'data-liberation-agent' ), {
recursive: true,
Expand All @@ -73,8 +81,7 @@ export const baseConfig = defineConfig( {
if ( rel === '' ) {
return true;
}
// Ship the compiled engine, its package.json, and the skills/ the
// data_liberation bridge reads at runtime (engineDir/skills/*/SKILL.md).

const top = rel.split( sep )[ 0 ];
if ( top !== 'dist' && top !== 'package.json' && top !== 'skills' ) {
return false;
Expand All @@ -83,6 +90,10 @@ export const baseConfig = defineConfig( {
return ! /\.(d\.ts|test\.js|js\.map|tsbuildinfo)$/.test( rel );
},
} );

if ( existsSync( localUiDistPath ) ) {
cpSync( localUiDistPath, resolve( outDir, 'ui' ), { recursive: true } );
}
},
},
],
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.