Context
PR #321 (refactor 3/12) deleted src/utils/responses/index.ts and removed processToolResponse from next-steps-renderer.ts, but ~50 files still import from the barrel. This broke the docs:check pre-commit hook (and would break runtime) because the CLI loads all tools at boot.
PR #322 restored both the barrel and processToolResponse as a stopgap.
What needs to happen
- Migrate all ~50 consumers of
src/utils/responses/index.ts to import directly from source modules:
createTextResponse from ../utils/validation.ts
createErrorResponse, ValidationError, SystemError, DependencyError, AxeError from ../utils/errors.ts
processToolResponse, renderNextStep, renderNextStepsSection from ../utils/responses/next-steps-renderer.ts
- Types from
../../types/common.ts
- Delete
src/utils/responses/index.ts once no consumers remain
- Confirm
processToolResponse is still needed by tool-registry.ts and cli/output.ts, or refactor those call sites if the rendering pipeline has replaced it
Files importing from the barrel
src/utils/typed-tool-factory.ts
src/utils/tool-registry.ts
src/utils/simulator-utils.ts
src/cli/output.ts
src/runtime/tool-invoker.ts
src/integrations/xcode-tools-bridge/standalone.ts
src/integrations/xcode-tools-bridge/manager.ts
src/utils/debugger/ui-automation-guard.ts
src/mcp/tools/simulator/build_run_sim.ts
src/mcp/tools/simulator/get_sim_app_path.ts
src/mcp/tools/simulator/record_sim_video.ts
src/mcp/tools/device/build_run_device.ts
src/mcp/tools/device/get_device_app_path.ts
src/mcp/tools/device/test_device.ts
src/mcp/tools/macos/test_macos.ts
src/mcp/tools/macos/build_run_macos.ts
src/mcp/tools/project-discovery/list_schemes.ts
src/mcp/tools/project-discovery/show_build_settings.ts
src/mcp/tools/project-scaffolding/scaffold_ios_project.ts
src/mcp/tools/project-scaffolding/scaffold_macos_project.ts
src/mcp/tools/swift-package/*.ts
src/mcp/tools/debugging/*.ts
src/mcp/tools/ui-automation/*.ts
src/mcp/tools/utilities/clean.ts
src/mcp/tools/workflow-discovery/manage_workflows.ts
src/mcp/tools/xcode-ide/*.ts
Context
PR #321 (refactor 3/12) deleted
src/utils/responses/index.tsand removedprocessToolResponsefromnext-steps-renderer.ts, but ~50 files still import from the barrel. This broke thedocs:checkpre-commit hook (and would break runtime) because the CLI loads all tools at boot.PR #322 restored both the barrel and
processToolResponseas a stopgap.What needs to happen
src/utils/responses/index.tsto import directly from source modules:createTextResponsefrom../utils/validation.tscreateErrorResponse,ValidationError,SystemError,DependencyError,AxeErrorfrom../utils/errors.tsprocessToolResponse,renderNextStep,renderNextStepsSectionfrom../utils/responses/next-steps-renderer.ts../../types/common.tssrc/utils/responses/index.tsonce no consumers remainprocessToolResponseis still needed bytool-registry.tsandcli/output.ts, or refactor those call sites if the rendering pipeline has replaced itFiles importing from the barrel