You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running TypeScript typechecking on packages/agent-runtime (bun run typecheck) failed with 2 compilation errors:
src/__tests__/read-docs-tool.test.ts:17:29 - error TS2307: Cannot find module '../../../../agents-graveyard/researcher/researcher' or its corresponding type declarations.
src/__tests__/web-search-tool.test.ts:17:29 - error TS2307: Cannot find module '../../../../agents-graveyard/researcher/researcher' or its corresponding type declarations.
The agents-graveyard directory was an archived internal path that was never exported to the public repository. Both test suites crashed at import when executed in the public codebase.
Changes Made
In packages/agent-runtime/src/__tests__/read-docs-tool.test.ts: Replaced the dead agents-graveyard import with the active public definition from agents/researcher/researcher-docs.ts.
In packages/agent-runtime/src/__tests__/web-search-tool.test.ts: Replaced the dead agents-graveyard import with the active public definition from agents/researcher/researcher-web.ts.
Architecture & Conventions Conformance
Adheres to Dependency Injection (contracts defined in common/src/types/contracts/, no module monkey patching)
Terminal commands use terminalCommandBroker (no direct spawn or TUI-process bypass)
Environment hygiene respected (getCliEnv() for CLI, getSdkEnv() for SDK, no forbidden getProcessEnv() imports)
Freebuff mode compatibility (IS_FREEBUFF preserved, no paid features introduced)
Imports ordered and explicit (import type used for types)
Scope Verification
All modified files are within allowed public directories: packages/agent-runtime/src/__tests__/
NO modifications to web/, freebuff/web/, packages/internal/, packages/billing/, packages/bigquery/, or packages/build-tools/
Testing & Verification
bun run --cwd packages/agent-runtime typecheck passed with 0 errors (was 2 errors).
bun test packages/agent-runtime/src/__tests__/read-docs-tool.test.ts packages/agent-runtime/src/__tests__/web-search-tool.test.ts passed 15/15 tests (was failing due to missing module).
bun run build:sdk passed cleanly.
bun run build:freebuff passed cleanly.
bun cli/scripts/smoke-binary.ts cli/bin/freebuff passed cleanly.
Good catch — agents-graveyard isn't present in the public tree, so these two test files were dead on arrival for anyone running bun run typecheck or the test suite. Given the "graveyard" naming, it's plausible this directory was actually removed upstream too and these two test files were simply missed, which would make this a genuine bug rather than just an export artifact.
The fix itself is minimal and in-scope (packages/agent-runtime/src/__tests__/*), which is exactly the right size for a PR like this.
One thing worth double-checking before this gets ported: in both files you do const researcherAgent = { ...researcherDocsAgent, id: 'researcher' } / { ...researcherWebAgent, id: 'researcher' }. That patches the type error and gets tests green, but it's not obviously equivalent to what the original researcher agent from the graveyard exposed — researcher-docs and researcher-web may have different tool sets, prompts, or behavior than whatever the tests were originally written against. If the assertions in read-docs-tool.test.ts and web-search-tool.test.ts depend on specific agent config (allowed tools, system prompt, etc.), silently swapping in a different agent and overriding just the id field could make the tests pass for the wrong reasons rather than actually validating the intended behavior. Worth a comment in the test file explaining why researcher-docs/researcher-web are the correct stand-ins, or ideally confirming the swapped agent's tool surface matches what the test exercises.
Overall: right instinct, correct scope, small diff — just flag the substitution rationale so a maintainer porting this can verify semantic equivalence rather than just compile success.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem & Context
Running TypeScript typechecking on
packages/agent-runtime(bun run typecheck) failed with 2 compilation errors:The
agents-graveyarddirectory was an archived internal path that was never exported to the public repository. Both test suites crashed at import when executed in the public codebase.Changes Made
packages/agent-runtime/src/__tests__/read-docs-tool.test.ts: Replaced the deadagents-graveyardimport with the active public definition fromagents/researcher/researcher-docs.ts.packages/agent-runtime/src/__tests__/web-search-tool.test.ts: Replaced the deadagents-graveyardimport with the active public definition fromagents/researcher/researcher-web.ts.Architecture & Conventions Conformance
common/src/types/contracts/, no module monkey patching)terminalCommandBroker(no directspawnor TUI-process bypass)getCliEnv()for CLI,getSdkEnv()for SDK, no forbiddengetProcessEnv()imports)IS_FREEBUFFpreserved, no paid features introduced)import typeused for types)Scope Verification
packages/agent-runtime/src/__tests__/web/,freebuff/web/,packages/internal/,packages/billing/,packages/bigquery/, orpackages/build-tools/Testing & Verification
bun run --cwd packages/agent-runtime typecheckpassed with 0 errors (was 2 errors).bun test packages/agent-runtime/src/__tests__/read-docs-tool.test.ts packages/agent-runtime/src/__tests__/web-search-tool.test.tspassed 15/15 tests (was failing due to missing module).bun run build:sdkpassed cleanly.bun run build:freebuffpassed cleanly.bun cli/scripts/smoke-binary.ts cli/bin/freebuffpassed cleanly.