API Surface Issue
Category
Dead barrel file / Unused export
Summary
- File:
src/services/agent-environment.ts
- Symbol:
buildAgentEnvironment
- Issue: The entire barrel file is unused - the re-exported function is never imported from this location
Evidence
The barrel file exists and re-exports buildAgentEnvironment:
export { buildAgentEnvironment } from './agent-environment/environment-builder';
However, no source files import from this barrel:
$ grep -r "from './services/agent-environment'" src/ --include="*.ts"
# (no results - zero imports)
All consumers import buildAgentEnvironment from services/agent-service.ts instead:
// src/compose-generator.ts
import { buildAgentEnvironment, buildAgentVolumes, buildAgentService, buildIptablesInitService } from './services/agent-service';
This barrel was created during the refactoring that split agent-environment into a subdirectory, but was never actually used as the import path.
Recommended Fix
Remove the entire barrel file src/services/agent-environment.ts:
rm src/services/agent-environment.ts
The export is already available through services/agent-service.ts, which is the canonical import location used by all consumers.
Impact
- Dead code risk: Medium - unused barrel adds maintenance burden
- Maintenance burden: Low - removing the file eliminates potential confusion about import paths
Related
Detected by Export Audit workflow. Triggered by push to main on 2026-05-25
Generated by API Surface & Export Audit · ● 8.7M · ◷
API Surface Issue
Category
Dead barrel file / Unused export
Summary
src/services/agent-environment.tsbuildAgentEnvironmentEvidence
The barrel file exists and re-exports
buildAgentEnvironment:However, no source files import from this barrel:
All consumers import
buildAgentEnvironmentfromservices/agent-service.tsinstead:This barrel was created during the refactoring that split agent-environment into a subdirectory, but was never actually used as the import path.
Recommended Fix
Remove the entire barrel file
src/services/agent-environment.ts:The export is already available through
services/agent-service.ts, which is the canonical import location used by all consumers.Impact
Related
AgentEnvironmentParamsfrom this barrelDetected by Export Audit workflow. Triggered by push to main on 2026-05-25