test(tools): type the path-safety harnesses instead of erasing with any
These two files are the template every service copied during the path-hardening sweep, and both open with:
type AnyTool = ToolConfig<any, any>
// ...
return new URL(url(buildParams(tool, value) as any)).pathname
CLAUDE.md forbids any outright ("No any — use proper types or unknown with type guards"). Because these are the template, the violation propagated into ten in-flight PRs before review caught it there. Fixing the source stops the next copy inheriting it.
Why the obvious repair doesn't compile
Swapping in ToolConfig<Record<string, unknown>, ToolResponse> on its own fails across the whole barrel union:
Type '(params: VercelAddProjectDomainParams) => string' is not assignable to
type '(params: Record<string, unknown>) => string'
ToolConfig takes its param type in the contravariant position of request.url, so no concrete member is assignable to the widened alias. And filter's type-predicate overload intersects rather than replaces, so filtering the union directly leaves the mismatch standing.
Seeding the enumeration as Object.values<unknown>(...) makes the existing isVercelTool / isDaytonaTool predicate the single narrowing point — the unknown-plus-type-guard form the guidelines actually prescribe — and removes the need for a cast at the call site entirely.
These files have no type coverage in CI
Worth recording, because it is why the pattern survived: apps/sim/tsconfig.json excludes **/*.test.ts, and vitest does not typecheck. So neither direction would have flagged this.
I verified with a temporary tsconfig lifting the exclusion, and confirmed via --listFiles that both files were genuinely in the program — an empty program also reports zero errors, which is an easy way to fool yourself here. Zero errors in both. That config was not committed.
Checks
vitest run tools/vercel tools/daytona— 1129 pass, identical to before (pure typing change, no behavioural effect)bun run lint— cleanbun run check:audits— 39/39check-block-registry.ts origin/staging— pass- Type-check with the test exclusion lifted — zero errors in both harnesses