Skip to content

Commit 9bc63ac

Browse files
committed
Remove slop
1 parent 44bc90c commit 9bc63ac

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

src/utils/execution/interactive-process.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ function createInteractiveProcess(
7373
export function getDefaultInteractiveSpawner(): InteractiveSpawner {
7474
if (process.env.VITEST === 'true' || process.env.NODE_ENV === 'test') {
7575
throw new Error(
76-
`🚨 REAL INTERACTIVE SPAWNER DETECTED IN TEST! 🚨\n` +
77-
`This test is trying to spawn a real interactive process.\n` +
78-
`Fix: Inject a mock InteractiveSpawner in your test setup.`,
76+
'Interactive process spawn blocked in tests. Inject a mock InteractiveSpawner.',
7977
);
8078
}
8179

src/utils/typed-tool-factory.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ function createValidatedHandler<TParams, TContext>(
2323
): (args: Record<string, unknown>) => Promise<ToolResponse> {
2424
return async (args: Record<string, unknown>): Promise<ToolResponse> => {
2525
try {
26-
// Runtime validation - the ONLY safe way to cross the type boundary
27-
// This provides both compile-time and runtime type safety
2826
const validatedParams = schema.parse(args);
2927

30-
// Now we have guaranteed type safety - no assertions needed!
3128
return await logicFunction(validatedParams, getContext());
3229
} catch (error) {
3330
if (error instanceof z.ZodError) {
@@ -45,9 +42,6 @@ function createValidatedHandler<TParams, TContext>(
4542
* Creates a type-safe tool handler that validates parameters at runtime
4643
* before passing them to the typed logic function.
4744
*
48-
* This is the ONLY safe way to cross the type boundary from the generic
49-
* MCP handler signature to our typed domain logic.
50-
*
5145
* @param schema - Zod schema for parameter validation
5246
* @param logicFunction - The typed logic function to execute
5347
* @param getExecutor - Function to get the command executor (must be provided)

0 commit comments

Comments
 (0)