`@supermemory/tools` fails `check-types`: 31 errors in `test/`, including an import of a file that no longer exists

Author: rajarshidattapyCreated Aug 19, 2026Updated Sep 24, 2026
Labelsbug

Severity: Medium (blocks the monorepo type-check gate) Files: packages/tools/test/**

Reproduction

$ cd packages/tools && bunx tsc --noEmit

Description

All 31 errors are in test/; src/ is clean. Breakdown:

19  test/mastra/unit.test.ts
 5  test/test-memory-tool.ts
 5  test/mastra/integration.test.ts
 2  test/with-supermemory/unit.test.ts

Three separate causes:

1. Stale Mastra fixtures (24 errors). ProcessInputArgs / ProcessOutputResultArgs gained a required state property in the installed Mastra version; the hand-built fixtures never got it:

test/mastra/unit.test.ts(187,10): error TS2741: Property 'state' is missing in type
  '{ messages: MastraDBMessage[]; systemMessages: never[]; ... }'
  but required in type 'ProcessInputArgs<unknown>'

2. Dangling import after a file move (test/test-memory-tool.ts).

test/test-memory-tool.ts(7,60): error TS2307: Cannot find module './claude-memory'

claude-memory.ts lives in packages/tools/src/, not test/. The remaining 4 errors in that file ('testCase' is possibly 'undefined') are downstream of the unresolved import.

3. Stale AI-SDK usage fixture (2 errors). LanguageModelV2Usage now requires totalTokens:

test/with-supermemory/unit.test.ts(446,5): error TS2741: Property 'totalTokens' is missing

Suggested fix

Add state to the Mastra fixtures, repoint the import to ../src/claude-memory (or delete test/test-memory-tool.ts if the vitest suites already cover it — it's a standalone script, not a *.test.ts), and add totalTokens to the two usage fixtures.

Source: supermemoryai/supermemory