Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SourceAnt agent

The process that stays up on a developer's machine. It supervises the SourceAnt indexer, keeps the local code graph current, and serves it to the CLI and the local UI.

It never parses code. The grammars and the graph shape live in the Python core, so that one index serves every client.

What it does

Starts the core on a free port and waits for it to answer. Restarts it when it dies, backing off as failures repeat. Serves its own HTTP surface on 127.0.0.1:8930, where /health reports whether the core is up and how many times it has been started, and /api/repositories and /api/graph read the index.

It also serves the local view at /: Overview, Knowledge, Graphs, Repositories, Settings. The assets are embedded in the binary, so the view works with no network and cannot drift from the agent serving it.

The view is Vue, built by Vite from ui/: Tailwind for the design tokens, lucide for icons, force-graph in 2D and 3d-force-graph for Tree, Radial, Layered and Force.

There are no reviews here. A review reads a pull request, and nothing on a machine produces one.

Loopback is the default because the agent reads a working tree. The machine it runs on is the only audience it has.

Running it

Building needs Go and npm: make build builds the view, then the binary that embeds it. make build-go skips the view when nothing about it changed, and make ui-dev runs it against an agent already running.

make build
./sourceant-agent

It starts whatever sourceant install put on this machine, reading ~/.sourceant/config.json: a container, or the core as a program. A container binds every interface inside and is published to loopback outside, because one binding the container's own loopback could be reached by nothing.

With nothing installed it looks for sourceant on PATH, which is what somebody working on the core itself already has. See sourceant/cli to install one, and sourceant/sourceant for the core.

Variable Default Meaning
SOURCEANT_AGENT_LISTEN 127.0.0.1:8930 Where the agent answers
SOURCEANT_CORE what was installed A core to supervise instead, overriding the install
SOURCEANT_CORE_PORT chosen at start The port to start the core on

Building

make qa      # fmt-check, vet, lint, test
make build

Licence

MIT.

About

The SourceAnt local agent: supervises the indexer, watches repositories, serves the local UI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages