workpath

package
v0.3.24 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyPath = errEmptyPath{}

ErrEmptyPath is returned when ResolveFile gets an empty path.

Functions

func AttachRel

func AttachRel(ws cw.Service, filename string) string

AttachRel returns the tenant-root-relative path for a file under the configured upload directory.

func CanonicalWorkPath

func CanonicalWorkPath(workDir, rel string) string

CanonicalWorkPath normalizes to tenant-root-relative form under workDir. Scoped paths (global:/local:) and Windows drive paths are returned unchanged.

func JoinWork

func JoinWork(workDir, rel string) string

JoinWork builds a tenant-root-relative path under workDir.

func LocalPath

func LocalPath(rel string) string

LocalPath adds the local: scope prefix for configuration (e.g. shell cwd, bootstrap workDir). Runtime code should use tenant-root-relative work/… paths and workpath.ResolveFile instead.

func ResolveFile

func ResolveFile(ctx context.Context, ws cw.Service, path string) (string, error)

ResolveFile maps a stored or model path to an absolute filesystem path. Accepts local:/global: scoped paths or tenant-root-relative paths (work/upload/…).

func ScopedPath

func ScopedPath(scope, rel string) string

ScopedPath prefixes a tenant-local relative path for workspace.Resolve.

func StripWorkPrefix

func StripWorkPrefix(workDir, rel string) string

StripWorkPrefix removes leading workDir/ segments from tenant-root-relative paths.

func TrimRedundantFSRootPrefix

func TrimRedundantFSRootPrefix(fsRoot, path string) string

TrimRedundantFSRootPrefix drops a leading fsRoot/ prefix when the fs tool root is already fsRoot.

func WorkLayout

func WorkLayout(ws cw.Service) (workDir, uploadDir string)

WorkLayout reads agent work layout from the workspace service.

Types

This section is empty.

Jump to

Keyboard shortcuts

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