dstsetup

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package dstsetup wires compile/test regression checks into an Agent. Every write-file tool call is followed by a synchronous go build / go test check. Passes are recorded into a ProofChain for per-turn agent memory; failures roll back the file and surface a "rolled back: ..." error. No async LLM verification — the proof chain alone gives the agent structured memory of verified state across turns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSTRunner

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

DSTRunner wraps an agent.Runner and injects compile/test hooks. It also serves as the DST facade for the Controller (toggle, status).

func Init

func Init(a *agent.Agent, proofChain *core.ProofChain, workDir, compileCmd, testCmd string) *DSTRunner

Init wires compile/test hooks into the agent and returns a DSTRunner. proofChain accumulates verification results for per-turn memory injection. workDir is the project root; compileCmd/testCmd are e.g. "go build ./...". If the agent is nil, returns nil.

func (*DSTRunner) Disable

func (d *DSTRunner) Disable()

Disable turns off compile/test checks. Safe to call on a nil receiver.

func (*DSTRunner) Enable

func (d *DSTRunner) Enable()

Enable turns on per-step compile/test hooks. Safe to call on a nil receiver.

func (*DSTRunner) Hooks

func (d *DSTRunner) Hooks() *dstvalid.DSTHooks

Hooks returns the DSTHooks instance, for wrapping with additional hook layers.

func (*DSTRunner) IsAvailable

func (d *DSTRunner) IsAvailable() bool

IsAvailable reports whether the guard was successfully initialised.

func (*DSTRunner) IsEnabled

func (d *DSTRunner) IsEnabled() bool

IsEnabled reports whether per-step compile/test checks are active. Safe to call on a nil *DSTRunner (returns false).

func (*DSTRunner) Run

func (d *DSTRunner) Run(ctx context.Context, input string) error

Run delegates to the inner runner (compile/test hooks fire in PostToolUse).

func (*DSTRunner) SetSink

func (d *DSTRunner) SetSink(s event.Sink)

SetSink sets the event sink for DST status output.

Jump to

Keyboard shortcuts

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