SoftwareProject

open class SoftwareProject constructor(val root: String, val url: String? = null, val tech: String = "Java,Embabel,Spring Boot,Maven", val defaultCodingStyle: String = """ No coding style guide found at ${DEFAULT_CODING_STYLE_GUIDE}. Try to follow the conventions of files you read in the project. """.trimIndent(), val buildCommand: String = "mvn clean test", val wasCreated: Boolean = false) : LlmReference, FileTools, SymbolSearch, FileChangeLog, FileReadLog

Open to allow extension

Constructors

Link copied to clipboard
constructor(root: String, url: String? = null, tech: String = "Java,Embabel,Spring Boot,Maven", defaultCodingStyle: String = """ No coding style guide found at ${DEFAULT_CODING_STYLE_GUIDE}. Try to follow the conventions of files you read in the project. """.trimIndent(), buildCommand: String = "mvn clean test", wasCreated: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val ci: Ci
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Provide sanitizers that run on file content before returning it. They must be sure not to change any content that may need to be replaced as this will break editing if editing is done in the same session.

Link copied to clipboard
open val name: <Error class: unknown class>
Link copied to clipboard
open override val root: String

Root on host machine

Link copied to clipboard
Link copied to clipboard
open override val toolCallbacks: List<<Error class: unknown class>>

Tool callbacks referenced or exposed.

Link copied to clipboard
val url: String? = null
Link copied to clipboard
val wasCreated: Boolean = false

Functions

Link copied to clipboard
open fun appendFile(path: String, content: String): String
Link copied to clipboard
open fun appendToFile(path: String, content: String, createIfNotExists: Boolean)

Append content to a file, creating it if it doesn't exist. If create is true, the file will be created if it doesn't exist. If createIfNotExists is false, an exception will be thrown if the file doesn't exist.

Link copied to clipboard

Expose the ToolGroup as an interface

Link copied to clipboard
fun build(command: String): String
Link copied to clipboard
open fun classPattern(className: String): <Error class: unknown class>
Link copied to clipboard
open fun contribution(): String
Link copied to clipboard
open fun createDirectory(path: String): String
Link copied to clipboard
open fun createFile(path: String, content: String): String

Create a file at the relative path under the root

open fun createFile(path: String, content: String, overwrite: Boolean): Path

Create a file with the given content.

Link copied to clipboard
open fun delete(path: String): String
Link copied to clipboard
open fun editFile(path: String, oldContent: String, newContent: String): String
Link copied to clipboard
open fun exists(): Boolean

Does this file exist?

Link copied to clipboard
open fun fileCount(): Int

Count the total number of files in the repository (excluding .git directory). Uses FileVisitor for cross-platform compatibility (Windows and Linux).

Link copied to clipboard
fun findClass(name: String): String
Link copied to clipboard
open fun findClassInProject(className: String, globPattern: String = "**/*.{kt,java}", useParallelSearch: Boolean = true): List<PatternSearch.PatternMatch>
Link copied to clipboard
open fun findFiles(glob: String): List<String>

open fun findFiles(glob: String, findHighest: Boolean): List<String>

Find files using glob patterns.

Link copied to clipboard
fun findPattern(regex: String, globPattern: String): String
Link copied to clipboard
open fun findPatternInProject(pattern: String, globPattern: String): String

open fun findPatternInProject(pattern: <Error class: unknown class>, globPattern: String, useParallelSearch: Boolean = true): List<PatternSearch.PatternMatch>

Finds files containing the specified pattern using glob patterns

Link copied to clipboard
open override fun flushChanges()
Link copied to clipboard
open override fun flushReads()
Link copied to clipboard
open override fun getChanges(): List<FileModification>
Link copied to clipboard
open override fun getPathsAccessed(): List<String>
Link copied to clipboard
open override fun getPathsRead(): List<String>
Link copied to clipboard
open override fun getReads(): List<FileReads>
Link copied to clipboard
open fun listFiles(path: String): List<String>
Link copied to clipboard
open fun matchesGlob(path: String, globPattern: String): Boolean

Checks if a file path matches a glob pattern

Link copied to clipboard
open override fun notes(): <Error class: unknown class>

Notes about this reference, such as usage guidance. Does not need to consider prompt prefix, name or description as they will be added automatically.

Link copied to clipboard
open fun readFile(path: String): String
Link copied to clipboard
open override fun recordChange(c: FileModification)
Link copied to clipboard
open override fun recordRead(path: String)
Link copied to clipboard
Link copied to clipboard
open fun resolvePath(path: String): Path
Link copied to clipboard
open fun safeReadFile(path: String): String?

Use for safe reading of files. Returns null if the file doesn't exist or is not readable.

Link copied to clipboard

Create a tool object for this reference.

Link copied to clipboard
open fun toolPrefix(): String

A safe prefix for LLM tools associated with this reference. Defaults to the name lowercased with spaces replaced by underscores. Subclasses can override it

Link copied to clipboard
open override fun toString(): String