refactor(tool): delegate pkg/tool to github.com/gollem-dev/tools#222
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the tool implementations in the pkg/tool directory (including abusech, bigquery, github, intune, ipdb, otx, shodan, slack, urlscan, vt, webfetch, and whois) by externalizing their core execution and specification logic to the github.com/gollem-dev/tools module. The local packages have been simplified to thin wrappers that bind CLI flags and handle planner metadata/prompts, while delegating the runtime execution to the externalized packages. Corresponding tests have been updated to verify this delegation. Feedback on the changes points out a redundant nil check for x.client in pkg/tool/webfetch/action.go that can be safely removed.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
Replaces warren's in-tree implementations of the 12 external
pkg/tool/*integrations with the independently published modules undergithub.com/gollem-dev/tools(@v0.1.0). Each tool'sSpecs/Runlogic (HTTP clients, API parsing, query execution) now lives upstream; warren retains only the ToolSet interface extension — a thin wrapper per tool that binds CLI flags, planner metadata (ID/Description/Prompt),Configure,LogValue, andHelper.Tools migrated:
otx,urlscan,vt,shodan,abusech,ipdb,whois,intune,slack,github,bigquery,webfetch.What stays in warren
ErrActionUnavailablegating — unchanged, so runtime behavior is equivalent.Prompt()built from it (the external module has no repo-hint concept).Prompt()rendered from configured tables/runbooks, plus thegenerate-configHelper()subcommand and its support code (absent upstream). Only the runtime query execution (run.go) is delegated.--webfetch-llm-*flags (llmflag.go) and HITL gating (RequiresHITL); the built client is passed to the external toolset viaWithLLMClient.Out of scope
pkg/agents/*(bigquery/slack/falcon) — a separate, still-wired tool system; untouched.pkg/tool/baseandpkg/tool/knowledge— warren-internal, no upstream equivalent.Regression review
A diff of old vs. external behavior found no loss of tool functions, parameters, output keys, or warren-specific features. Remaining differences are improvements (correct URL encoding, stricter param specs) or minor (webfetch now caps responses at 10 MiB; shodan/abusech drop redundant 200-response shape checks). These were accepted as-is since the
Specs/Runlogic intentionally moved upstream.Breaking changes (intentional)
pkg/tool/*is application-internal (warren is not published as a library); these are accepted breaking changes, called out here for completeness:Specs()now requiresConfigure()first. The wrappers delegateSpecs/Runto the external*ToolSet, which only exists afterConfigure()builds it; callingSpecs()on a zero-valueActionnow returns an error instead of the previously-static spec list. All warren callers invokeSpecs()afterToolSets()(which configures every tool), so there is no internal impact.pkg/tool/github(CodeSearchResult,IssueSearchResult,ContentResult,CommitResult,BlameRange,BlameResult) andpkg/tool/slack(SearchOptions,SearchResponse,SearchOutput, …) DTOs were moved upstream / removed along with their Run logic. No package in this repo imports them.Verification
go vet ./...,go test ./...— all passgolangci-lint run(tool + cli) — 0 issuesgosec(tool) — no findings