build cleanup

This commit is contained in:
Brian Madison
2025-06-08 20:46:44 -05:00
parent 8788c1d20f
commit 8ad54024d5
11 changed files with 26 additions and 62 deletions

View File

@@ -176,7 +176,7 @@ class WebBuilder {
// Resolve dependencies
const agentDependencies = this.resolver.resolveBundleDependencies(
agentIds,
bundleConfig.target_environment,
'web',
bundleConfig.optimize !== false
);
@@ -274,7 +274,7 @@ class WebBuilder {
// Add bundle metadata as a comment
content += `<!-- Bundle: ${bundle.metadata.name} -->\n`;
content += `<!-- Generated: ${bundle.metadata.generatedAt} -->\n`;
content += `<!-- Environment: ${bundle.metadata.environment} -->\n\n`;
content += `<!-- Environment: web -->\n\n`;
// Add agent configurations section
content += `==================== START: agent-config ====================\n`;
@@ -305,7 +305,7 @@ class WebBuilder {
const agentConfigContent = yaml.dump({
name: bundle.metadata.name,
version: bundle.metadata.version || '1.0.0',
environment: bundle.metadata.environment,
environment: 'web',
agents: bundle.agents,
commands: config.output?.orchestrator_commands || [],
metadata: {
@@ -417,15 +417,12 @@ class WebBuilder {
// Check if this has bundle config
if (config.bundle) {
// Only include web bundles (exclude IDE-specific bundles)
if (config.bundle.target_environment === 'web') {
// Merge agents list from root level into bundle config
const bundleConfig = { ...config.bundle };
if (config.agents && !bundleConfig.agents) {
bundleConfig.agents = config.agents;
}
configs.push(bundleConfig);
// Merge agents list from root level into bundle config
const bundleConfig = { ...config.bundle };
if (config.agents && !bundleConfig.agents) {
bundleConfig.agents = config.agents;
}
configs.push(bundleConfig);
}
} catch (error) {
console.warn(`Warning: Failed to load config ${file}:`, error.message);
@@ -442,15 +439,12 @@ class WebBuilder {
// Check if this is a team bundle (team-*.yml) with bundle config
if (filename.startsWith('team-') && config.bundle) {
// Only include web bundles (exclude IDE-specific bundles)
if (config.bundle.target_environment === 'web') {
// Merge agents list from root level into bundle config
const bundleConfig = { ...config.bundle };
if (config.agents && !bundleConfig.agents) {
bundleConfig.agents = config.agents;
}
configs.push(bundleConfig);
// Merge agents list from root level into bundle config
const bundleConfig = { ...config.bundle };
if (config.agents && !bundleConfig.agents) {
bundleConfig.agents = config.agents;
}
configs.push(bundleConfig);
}
} catch (error) {
console.warn(`Warning: Failed to load config ${file}:`, error.message);

View File

@@ -20,7 +20,7 @@ class BundleOptimizer {
metadata: {
name: bundleConfig.name,
version: bundleConfig.version,
environment: bundleConfig.target_environment,
environment: 'web',
generatedAt: new Date().toISOString(),
optimization: bundleConfig.optimize || false
},
@@ -55,9 +55,7 @@ class BundleOptimizer {
this.loadResources(optimizedBundle, agentDependencies.bundleResources, agentDependencies.agents);
// Create optimized sections for web output
if (bundleConfig.target_environment === 'web') {
this.createWebSections(optimizedBundle, bundleConfig);
}
this.createWebSections(optimizedBundle, bundleConfig);
// Calculate statistics
optimizedBundle.statistics = this.calculateBundleStats(optimizedBundle, agentDependencies);
@@ -176,7 +174,7 @@ class BundleOptimizer {
const bundleConfig = {
name: `${agentDep.config.name} Standalone`,
version: agentDep.config.version || '1.0.0',
target_environment: environment,
// Environment is always 'web' for standalone agents
optimize: true
};