Package com.embabel.agent.tools.file
Class LocalDirectory
-
- All Implemented Interfaces:
-
com.embabel.agent.api.common.LlmReference,com.embabel.agent.api.common.support.SelfToolCallbackPublisher,com.embabel.agent.core.ToolCallbackPublisher,com.embabel.agent.core.ToolCallbackSpec,com.embabel.agent.tools.DirectoryBased,com.embabel.agent.tools.file.FileAccessLog,com.embabel.agent.tools.file.FileReadLog,com.embabel.agent.tools.file.FileReadTools,com.embabel.agent.tools.file.PatternSearch,com.embabel.common.ai.prompt.PromptContributor,com.embabel.common.ai.prompt.PromptElement,com.embabel.common.core.types.Described,com.embabel.common.core.types.Named,com.embabel.common.core.types.NamedAndDescribed
public final class LocalDirectory implements FileReadTools, PatternSearch, FileReadLog, LlmReference
Readonly access to a project on the local filesystem.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final Stringrootprivate final Stringdescriptionprivate final Stringnotesprivate final List<StringTransformer>fileContentTransformersprivate final List<ToolCallback>toolCallbacksprivate final PromptContributionLocationpromptContributionLocationprivate final Stringrole
-
Constructor Summary
Constructors Constructor Description LocalDirectory(String root, String description, String notes, List<StringTransformer> fileContentTransformers)
-
Method Summary
Modifier and Type Method Description StringgetName()StringgetRoot()Root on host machine StringgetDescription()final StringgetNotes()List<StringTransformer>getFileContentTransformers()Provide sanitizers that run on file content before returning it. Stringnotes()Notes about this reference, such as usage guidance. -
Methods inherited from class com.embabel.agent.api.common.support.SelfToolCallbackPublisher
getToolCallbacks -
Methods inherited from class com.embabel.common.ai.prompt.PromptElement
getPromptContributionLocation, getRole -
Methods inherited from class com.embabel.agent.tools.file.FileReadTools
exists, fileCount, findFiles, findFiles, getPathsAccessed, listFiles, readFile, resolveAndValidateFile, resolvePath, safeReadFile -
Methods inherited from class com.embabel.agent.tools.file.FileReadLog
flushReads, getPathsRead, getReads, recordRead -
Methods inherited from class com.embabel.agent.tools.file.PatternSearch
findPatternInProject, findPatternInProject, matchesGlob -
Methods inherited from class com.embabel.agent.api.common.LlmReference
contribution, toolInstance, toolObject, toolPrefix -
Methods inherited from class com.embabel.common.ai.prompt.PromptContributor
promptContribution -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
LocalDirectory
LocalDirectory(String root, String description, String notes, List<StringTransformer> fileContentTransformers)
-
-
Method Detail
-
getDescription
String getDescription()
-
getFileContentTransformers
List<StringTransformer> getFileContentTransformers()
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.
-
-
-
-