Documentation
¶
Index ¶
- Constants
- func AttachFSRel(ws Service, name string) string
- func AttachRel(ws Service, filename string) string
- func CanonicalWorkPath(workDir, rel string) string
- func FirstScoped(files []string, scope string) (string, error)
- func IsScoped(rel string) bool
- func JoinWork(workDir, rel string) string
- func LocalPath(rel string) string
- func NormalizeAgentRel(workDir, rel string) string
- func ParseScoped(rel string) (scope, path string, ok bool)
- func ScopedPath(scope, rel string) string
- func StripWorkPrefix(workDir, rel string) string
- func UploadWorkRel(ws Service) string
- func WorkLayout(ws Service) (workDir, uploadDir string)
- type Layout
- type LocalTenantWalker
- type Service
Constants ¶
const ( ScopeGlobal = "global" ScopeLocal = "local" )
Variables ¶
This section is empty.
Functions ¶
func AttachFSRel ¶ added in v0.3.33
AttachFSRel is the agent-facing path for a file under upload (e.g. upload/foo).
func AttachRel ¶ added in v0.3.33
AttachRel returns the tenant-root-relative path for a file under the configured upload directory.
func CanonicalWorkPath ¶ added in v0.3.33
CanonicalWorkPath normalizes to tenant-root-relative form under workDir. Scoped paths (global:/local:) and Windows drive paths are returned unchanged.
func FirstScoped ¶ added in v0.3.33
FirstScoped returns the first entry in files whose global:/local: prefix matches scope. For ScopeLocal, a bare path (no colon) is used when no local: entry exists. Other colon-bearing strings (URLs, Windows drives) are not treated as bare paths.
func IsScoped ¶ added in v0.3.33
IsScoped reports whether rel uses a configuration-only global:/local: prefix.
func LocalPath ¶ added in v0.3.33
LocalPath adds the local: scope prefix for configuration (e.g. shell cwd, bootstrap workDir). Runtime code should use tenant-root-relative work/… paths and runtime/workspace.ResolveFile.
func NormalizeAgentRel ¶ added in v0.3.33
NormalizeAgentRel maps agent-facing paths to tenant-root-relative form under workDir, stripping redundant work/ prefixes. Scoped and Windows drive paths pass through.
func ParseScoped ¶
ParseScoped splits configuration paths such as "global:skills" or "local:.". Bare paths and absolute paths (~/foo, /abs) are not scoped.
func ScopedPath ¶ added in v0.3.33
ScopedPath prefixes a tenant-local relative path for workspace.Resolve.
func StripWorkPrefix ¶ added in v0.3.33
StripWorkPrefix removes leading workDir/ segments from tenant-root-relative paths.
func UploadWorkRel ¶ added in v0.3.33
UploadWorkRel is the upload directory relative to the agent work tree (e.g. upload).
func WorkLayout ¶ added in v0.3.33
WorkLayout reads agent work layout from the workspace service.
Types ¶
type Layout ¶ added in v0.3.23
Layout reports tenant-local agent directory layout (inbound uploads, shell cwd). workspace/default and workspace/tenant implement this; keep filesystem/local.config.root and tool/shell-bash.config.workDir aligned with WorkDirRel().
type LocalTenantWalker ¶ added in v0.3.13
type LocalTenantWalker interface {
Service
WalkLocalTenants(ctx context.Context, fn func(context.Context) error) error
}
LocalTenantWalker enumerates isolated local workspace roots (multi-tenant setups). Implementations call fn with TurnEnvelope.Workspace set for each tenant.
type Service ¶
Service maps configuration-relative paths to host absolute paths for the current request context. Resolve always returns a cleaned absolute path when it succeeds.
The global:/local: prefixes (see ParseScoped) are configuration vocabulary only — YAML, preset fields, and plugin constructor config. After resolution (plugin init or per-request via Resolve / runtime/workspace.ResolveFile), runtime code and model-facing surfaces must not carry those prefixes.