Skip to content

[Export Audit] Unused type re-export AgentEnvironmentParams from agent-environment barrel #3733

@github-actions

Description

@github-actions

API Surface Issue

Category

Unused export

Summary

  • File: src/services/agent-environment.ts (barrel re-export)
  • Original: src/services/agent-environment/types.ts
  • Symbol: AgentEnvironmentParams
  • Issue: Type re-exported from barrel module but never imported externally

Evidence

The AgentEnvironmentParams type is defined in types.ts and re-exported from the agent-environment barrel:

// src/services/agent-environment.ts
export type { AgentEnvironmentParams } from './agent-environment/types';

Internal usage only:

$ grep -r "import.*AgentEnvironmentParams" src/ --include="*.ts"
src/services/agent-environment/environment-builder.ts:import { AgentEnvironmentParams } from './types';
src/services/agent-environment/api-proxy-environment.ts:import { AgentEnvironmentParams } from './types';
src/services/agent-environment/core-environment.ts:import { AgentEnvironmentParams } from './types';

All imports use the internal ./types path, not the barrel export.

No external imports from barrel:

$ grep -r "from.*agent-environment.*AgentEnvironmentParams" src/ tests/ --include="*.ts"
(no results)

The type is only used internally within the agent-environment module to share parameter structure between builder functions. External consumers call buildAgentEnvironment() with object literals and don't need access to this type.

Recommended Fix

Remove the type re-export from the barrel module:

// src/services/agent-environment.ts
export { buildAgentEnvironment } from './agent-environment/environment-builder';
// Remove: export type { AgentEnvironmentParams } from './agent-environment/types';

The type remains available for internal module use via ./types, but is no longer part of the public API.

Impact

  • Dead code risk: Low — The type is used internally, just unnecessarily exposed
  • Maintenance burden: Low — Simple one-line deletion
  • API clarity: Medium — Reduces public API surface by removing unused type re-export

Detected by Export Audit workflow. Triggered by push to main on 2026-05-25

Generated by API Surface & Export Audit · ● 5M ·

  • expires on Jun 24, 2026, 4:06 AM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions