AIGuiders.Platform.Modeling.Paths
0.1.0
dotnet add package AIGuiders.Platform.Modeling.Paths --version 0.1.0
NuGet\Install-Package AIGuiders.Platform.Modeling.Paths -Version 0.1.0
<PackageReference Include="AIGuiders.Platform.Modeling.Paths" Version="0.1.0" />
<PackageVersion Include="AIGuiders.Platform.Modeling.Paths" Version="0.1.0" />
<PackageReference Include="AIGuiders.Platform.Modeling.Paths" />
paket add AIGuiders.Platform.Modeling.Paths --version 0.1.0
#r "nuget: AIGuiders.Platform.Modeling.Paths, 0.1.0"
#:package AIGuiders.Platform.Modeling.Paths@0.1.0
#addin nuget:?package=AIGuiders.Platform.Modeling.Paths&version=0.1.0
#tool nuget:?package=AIGuiders.Platform.Modeling.Paths&version=0.1.0
AIGuiders.Platform.Modeling.Paths
LogicalPath — a repo/workspace-relative path value with canonical forward slashes, plus the boundary mapper to OS-absolute paths.
What you get
LogicalPath— a struct, repo/workspace-relative path in canonical form:Create/Parse/TryParse/Normalize— normalize on the way inCombine— join segments without double-slash guessingStartsWith— prefix check (ordinal-ignore-case by default)AsDocPath— strip a leading slash for document addressingMatchesAnchor— anchor match: exact, suffix under the anchor, or file-name anchor- custom equality on the canonical value (ordinal), no ordering
LogicalPathOps.normalize— the canonicalization rules as one function: backslashes to/, repeated/collapsed, leading.//and trailing/trimmedPathBoundary— the logical/physical boundary at a workspace root:toLogical— absolute path under the root →LogicalPath(empty when the path escapes the root)toPhysical—LogicalPath+ workspace root → absolute path stringtryCanonicalPhysical— canonical absolute form of a raw path, null on failure
- TruePath does the physical-path heavy lifting inside
PathBoundarybut is never exposed — the public surface is string +LogicalPath
Quick start
open AIGuiders.Platform.Modeling.Paths
// Canonical form: backslashes in, forward slashes out
let doc = LogicalPath.Create @"src\App\Program.fs" // "src/App/Program.fs"
// Compose segments
let nested = (LogicalPath.Create "src").Combine "App/Program.fs"
// Prefix check
let inSrc = nested.StartsWith(LogicalPath.Create "src") // true
// Cross the workspace boundary back to an OS-absolute path
let abs = PathBoundary.toPhysical @"D:\repo" nested // "D:\repo\src\App\Program.fs"
Problem
- Repo-relative identity keeps breaking in subtle ways:
src\App\Program.fsvssrc/App/Program.fsvs./src//App/Program.fsare the same file, and string-compare says no. System.IO.Pathis OS-local — the same code answers differently on Windows and POSIX, so cross-machine identity (anchors, saved references, docs pointing at code) drifts.- Without one canonical value type, every workspace feature re-rolls its own
Replace('\\','/')+GetFullPathdance, each with its own edge cases.
Solution
- One canonical logical form carried in a value type: normalize on construction, compare ordinally, join safely — and a single boundary module that owns the OS-absolute world (TruePath stays an implementation detail at the IO edge).
- The path layer of the Guiders federation (ADR-0050) — the base dependency of navigation, language-intelligence relations and IDE session modeling in this solution.
When not to use
- Wire paths — slash commands and catalog phrases (
buffer open,import <grain/…>) are not filesystem paths and deliberately live elsewhere (Notations/Authoring, see ADR-0050). - Segment-aware prefixing —
StartsWithis a string prefix check:"srcFoo/x"starts with"src", and comparison is case-insensitive by default. If you need segment boundaries or case sensitivity, enforce them at your call site. - Physical file IO — this package canonicalizes and maps; open/read/write stays in your IO layer.
Learn more
MIT · Source & issues · part of the Guiders federation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FSharp.Core (>= 10.1.401)
- TruePath (>= 1.12.0)
- TruePath.SystemIo (>= 1.12.0)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on AIGuiders.Platform.Modeling.Paths:
| Package | Downloads |
|---|---|
|
AIGuiders.Platform.Modeling.LanguageIntelligence.Relations
Federation RelationSpec kernel — typed relation witness before Resolve/Materialize. |
|
|
AIGuiders.Platform.Modeling.Documentation.Correspondence
Documentation correspondence wire shapes — CRS model, forward/reverse map shapes (F# SSOT). |
|
|
AIGuiders.Platform.Modeling.Ide.Session
IDE solution session graph IR — projects, capabilities, lifecycle, validation (F# SSOT). |
|
|
AIGuiders.Platform.Modeling.Core
Cross-product intent envelope shapes — IntentOutcome, RoutedIntent, pulse rules. |
|
|
AIGuiders.Platform.Modeling.Navigation
Navigation scene IR — anchor, nodes, edges, caps (F# SSOT). |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 123 | 10/24/2026 |