Documentation
¶
Index ¶
Constants ¶
const ( SubdirUploads = "uploads" SubdirImages = "uploads/images" SubdirDocuments = "uploads/documents" SubdirOther = "uploads/other" SubdirPlans = "plans" SubdirArtifacts = "artifacts" )
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
DefaultPath returns the default workspace path for a session without creating it.
Types ¶
type Context ¶
type Context struct {
Root string `json:"root"`
}
Context represents the filesystem boundary for one agent session.
func (*Context) ArtifactsPath ¶
ArtifactsPath returns the absolute path to the artifacts directory.
func (*Context) EnsureSubdirs ¶
EnsureSubdirs creates the standard subdirectory layout inside the workspace. Safe to call multiple times; existing directories are left untouched.
func (*Context) Resolve ¶
Resolve resolves rel against the workspace root. Relative paths are anchored to the workspace root and validated to stay inside it. Absolute paths are resolved as-is — the caller (sandbox FilesystemPolicy) handles dangerous-prefix blocking; workspace containment is not enforced for absolute paths so that the user can explicitly approve writes to /tmp or other out-of-workspace dirs.
func (*Context) UploadsPath ¶
UploadsPath returns the absolute path to the uploads sub-category directory. category should be one of "images", "documents", or "other".