Skip to main content

Module scope

Module scope 

Source
Expand description

Logical scope data and path resolution independent of project configuration.

Structs§

Artifact
Access data computed by the caller, without declarations, evals, or owner commands.
ArtifactId
An Artifact’s ID: [A-Za-z0-9][A-Za-z0-9_-]{0,63}, so it can never smuggle a path separator, a dot component, or control text into a scope key or a tool result.
ChildPrefix
Scope
ScopeError
ScopedPath

Enums§

ArtifactKind
OpenError
Why a scoped open failed. A missing entry stays distinct, so a caller that knows the logical path the user asked for can name it.

Constants§

MAX_ARTIFACT_ID_BYTES
Bound Artifact IDs like artifactize’s Artifact names, so they stay short in tool output.
MAX_PATH_UNITS
Bound logical tool paths in UTF-16 units, matching JSON Schema string limits across supported clients without tying scoped paths to an OS-specific PATH_MAX.

Functions§

logical_from_native
The logical form of a native relative path: its components joined with /, whatever separator the platform uses. None when a component is not UTF-8 or not a plain name.
logical_path
open_child
Open one entry of a pinned directory without following a symlink.
open_input
Open each component relative to its pinned parent, so replacement cannot redirect a read through a link.
open_scoped
Open a relative path below an absolute root without following any symlink components.
scoped_path
Resolve a physical input below a canonical root. No component may be a symlink.