Files
archie/internal/tools/builtin/builtin.go
T
sam 6703cc77cf refactor(indexing): delete the workspace codesearch indexer
The index built google/codesearch over the chat workspace on every daemon
start, for the process lifetime, through a child-process helper and a
SQLite metadata DB -- and grep consulted it only for searches confined to
the workspace root, which the analysed sessions showed was a small
fraction of searches. The compute was continuous; the benefit was not.

Removes internal/indexing, the workspace-codesearch helper subcommand,
the [indexing] config section, and the GrepIndex accelerator seam from
the grep tool, which returns to its direct walk. google/codesearch
leaves go.mod with it.
2026-09-23 00:36:38 +10:00

40 lines
1.3 KiB
Go

// Lifted from tau internal/agent/tools/builtin.go
// tau commit f5289ea3782c099339c2d26fe3af8ebcf42ba52d (2026-07-27).
//
// Mutations from upstream:
// - package renamed tools -> builtin (archie-core already has an
// internal/tools package holding the registry these are registered into).
// - the docs tool is not registered and docs.go was not lifted. It serves
// tau's own embedded documentation via the tau/docs package, which has
// no meaning here. The pluginDocs parameter went with it.
// - the workspace codesearch index parameter was removed along with the
// index itself; RegisterBuiltins takes only the registry and cwd.
//
// Refresh by diffing against that path at a newer tau commit. Do not
// edit without recording the change above.
package builtin
// RegisterBuiltins registers all built-in tools into the given registry.
// The cwd parameter sets the working directory for file and shell operations.
func RegisterBuiltins(reg *Registry, cwd string) error {
mq := NewMutationQueue()
rt := NewReadTracker()
builtins := []Tool{
NewReadTool(cwd, rt),
NewWriteTool(cwd, mq, rt),
NewEditTool(cwd, mq, rt),
NewShellTool(cwd, mq),
NewGrepTool(cwd),
NewFindTool(cwd),
}
for _, tool := range builtins {
if err := reg.Register(tool); err != nil {
return err
}
}
return nil
}