Documentation
¶
Index ¶
- func AppendPrefrontal(path, content string)
- func AutoCondenseIfNeeded(cfg Config) (bool, error)
- func BuildDeveloperMessage(agentConfig, soul, neo, stmContext, convContext, prompt string, refs []FileRef, ...) string
- func ClearShortTerm(cfg Config) error
- func CondenseShortTerm(cfg Config) (string, error)
- func ContextFileSize(brainDir string) int
- func EnsureBrainLayout(brainDir, repoRoot string) error
- func ExtractFileMentions(prompt string) []string
- func FormatDeletesSummary(deletes []DeleteOp) string
- func FormatDeletesSummaryWithTitle(title string, deletes []DeleteOp) string
- func FormatPatchesSummary(patches []PatchOp) string
- func FormatPatchesSummaryWithTitle(title string, patches []PatchOp) string
- func FormatWritesSummary(writes []WriteOp) string
- func FormatWritesSummaryWithTitle(title string, writes []WriteOp) string
- func ListFiles(root string, maxFiles int) ([]string, bool)
- func ListRelevantFiles(root, prompt string, maxFiles int) ([]string, bool)
- func ParseReadLines(s string) []string
- func ProjectConfigPath(root string) string
- func ResolveBrainDir() (string, error)
- func SaveProjectConfig(root string, cfg ProjectConfig) error
- func WritePrefrontalHeader(path, prompt string, mentions []string, refs []FileRef) error
- type Config
- type DeleteOp
- type FileRef
- type MemoryStats
- type PatchOp
- type PermissionState
- type ProjectConfig
- type Result
- type UsageStats
- type WriteOp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendPrefrontal ¶
func AppendPrefrontal(path, content string)
func AutoCondenseIfNeeded ¶
func BuildDeveloperMessage ¶
func ClearShortTerm ¶
func CondenseShortTerm ¶
func ContextFileSize ¶
func EnsureBrainLayout ¶
func ExtractFileMentions ¶
func FormatDeletesSummary ¶
func FormatPatchesSummary ¶
func FormatWritesSummary ¶
func ParseReadLines ¶
func ProjectConfigPath ¶
func ResolveBrainDir ¶
func SaveProjectConfig ¶
func SaveProjectConfig(root string, cfg ProjectConfig) error
Types ¶
type Config ¶
type Config struct {
RootDir string
BrainDir string
Model string
TimeoutSec int
NeoPath string
PrefrontalPath string
StmMaxBytes int
StmContextBytes int
ConversationBytes int
ContextBudgetTokens int
AllowReadAll bool
ApplyWrites bool
ReadPaths []string
MaxFilesListed int
MaxFileBytes int
MaxTotalReadBytes int
}
type MemoryStats ¶
func GetMemoryStats ¶
func GetMemoryStats(brainDir, neoPath, prefrontalPath string) (MemoryStats, error)
type PermissionState ¶
type PermissionState struct {
Project ProjectConfig
AllowRead bool
AllowWrite bool
DenyWrite bool
}
func ResolvePermissionState ¶
func ResolvePermissionState(root string, envRead, envWrite bool) PermissionState
type ProjectConfig ¶
type ProjectConfig struct {
AllowReadAlways bool `json:"allow_read_always"`
AllowWriteAlways bool `json:"allow_write_always"`
DenyWriteAlways bool `json:"deny_write_always"`
}
func LoadProjectConfig ¶
func LoadProjectConfig(root string) ProjectConfig
type Result ¶
type Result struct {
LLMOutput string
ProposedWrites []WriteOp
ProposedDeletes []DeleteOp
ProposedPatches []PatchOp
AppliedWrites []WriteOp
AppliedDeletes []DeleteOp
AppliedPatches []PatchOp
Applied bool
PrefrontalPath string
Mentions []string
FileRefs []FileRef
FileList []string
FileListTruncated bool
Memory MemoryStats
Condensed bool
}
type UsageStats ¶
type UsageStats struct {
LtmBytes int
StmBytes int
StmContextBytes int
ConvBytes int
ConvContextBytes int
ApproxTokens int
BudgetTokens int
}
func GetUsageStats ¶
func GetUsageStats(cfg Config) (UsageStats, error)
Click to show internal directories.
Click to hide internal directories.