harness

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package harness is experimental and outside the private beta scope.

It is kept in-tree for later work and should not be treated as beta-ready.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	ID           AgentID    `json:"id"`
	Mode         AgentMode  `json:"mode"`
	SystemPrompt string     `json:"system_prompt"`
	Permissions  Permission `json:"permissions"`
}

func NewAgent

func NewAgent(id AgentID, mode AgentMode, permissions Permission, systemPrompt string) *Agent

func NewBuildAgent

func NewBuildAgent() *Agent

Fallback default config

func NewExploreAgent

func NewExploreAgent() *Agent

func NewPlanAgent

func NewPlanAgent() *Agent

func NewRogueAgent

func NewRogueAgent() *Agent

type AgentID

type AgentID string

type AgentMode

type AgentMode string
const (
	ModeBuild   AgentMode = "build"
	ModePlan    AgentMode = "plan"
	ModeExplore AgentMode = "explore"
	ModeRogue   AgentMode = "rogue"
)

func (AgentMode) String

func (m AgentMode) String() string

type Config

type Config struct {
	Agents []Agent `json:"agents"`
}

type Permission

type Permission uint64
const (

	// Allow Agent to read files from session root and downwards
	PermissionRead Permission = 1 << iota

	// Allow Agent to read files from user root folder and downwards
	PermissionLocalSearch

	// Allow Agent to edit files
	PermissionEdit

	// Allow bash execution of trusted commands, by default commands that do not change anything on PC
	PermissionBashSafe

	// Allow bash execution of ALL commands
	PermissionBashUnsafe

	// Allow bash execution of commands specefied in config file, in case user wants to allow only specific commands
	PermissionBashCustom

	// Allow usign WebSearch tools
	PermissionWebSearch

	// PermissionAll is a bitmask that allows all permissions
	// Permission(0) = 0000...000, and ^ is reversing it, so each bit is set to 1
	PermissionAll = ^Permission(0)
)

func PermissionByName

func PermissionByName(name string) (Permission, bool)

func (*Permission) Allow

func (p *Permission) Allow(required Permission)

func (*Permission) Deny

func (p *Permission) Deny(required Permission)

func (Permission) IsAllowed

func (p Permission) IsAllowed(required Permission) bool

type Registry

type Registry map[AgentID]*Agent

func DefaultRegistry

func DefaultRegistry() Registry

func RegistryFromConfig

func RegistryFromConfig(cfg Config) (Registry, error)

Jump to

Keyboard shortcuts

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