codegraph

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package codegraph wraps the external `codegraph` CLI as a bee tool.

Auto-registers when both the `codegraph` binary is on PATH and the project has a `.codegraph/codegraph.db` indexed store. One tool, op-dispatched, so the prompt manifest stays small while the model gets full query surface (search, callers, callees, context, impact, trace, affected, files, status, query).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available(cwd string) (binPath string, ok bool)

Available reports whether codegraph integration should be enabled for the given working directory. Both conditions must hold: a project-local `.codegraph/codegraph.db` store and a `codegraph` binary on PATH.

Types

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

Tool is the codegraph wrapper tool.

func New

func New(cwd, bin string) *Tool

New returns a codegraph tool for cwd. Caller is expected to gate construction on Available(cwd) returning ok.

func (*Tool) Run

func (t *Tool) Run(ctx context.Context, in map[string]any) (tools.Result, error)

func (*Tool) Spec

func (t *Tool) Spec() llm.ToolSpec

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL