GnOuGo.Workspace
0.20.0
dotnet add package GnOuGo.Workspace --version 0.20.0
NuGet\Install-Package GnOuGo.Workspace -Version 0.20.0
<PackageReference Include="GnOuGo.Workspace" Version="0.20.0" />
<PackageVersion Include="GnOuGo.Workspace" Version="0.20.0" />
<PackageReference Include="GnOuGo.Workspace" />
paket add GnOuGo.Workspace --version 0.20.0
#r "nuget: GnOuGo.Workspace, 0.20.0"
#:package GnOuGo.Workspace@0.20.0
#addin nuget:?package=GnOuGo.Workspace&version=0.20.0
#tool nuget:?package=GnOuGo.Workspace&version=0.20.0
GnOuGo.Workspace
Shared library that centralizes workspace directory resolution logic used across all GnOuGo components.
Purpose
This library eliminates duplicated code for:
- Desktop directory resolution — robust fallback chain for Native AOT, sandboxed, and headless environments.
- Default working directory — resolves
Desktop/GnOuGo(or a configured path) and ensures it exists. - Workspace root discovery — walks up the directory tree looking for
.slnor.gitmarkers. - Path containment checks — verifies a path is inside an allowed root directory.
- Database path resolution — resolves configured relative paths such as
.GnOuGo/data/app.dbunder the default working directory. - Local model path resolution — resolves shared model assets under
.GnOuGo/models/. - Workflow workspace resolution — keeps visible workflow-owned checkouts and artifacts below
workflows/while classifying.GnOuGo/as reserved internal state.
Workspace convention
Desktop/GnOuGo/workflows/ is the visible root for workflow-owned working directories. Use purpose-specific children such as workflows/github-review-123; the directory is created lazily by the operation that materializes a workspace.
Desktop/GnOuGo/.GnOuGo/ is reserved for GnOuGo-managed databases, agents, uploads, traces, and internal temporary files. Workflow-facing project and file paths must never target that subtree.
API
All methods are on the static class GnOuGoWorkspace:
| Method | Description |
|---|---|
ResolveDesktopDirectory() |
Returns the current user's Desktop path with robust fallbacks. |
ResolveDefaultWorkingDirectory(configuredPath?) |
Resolves and creates the GnOuGo working directory. |
ResolveDefaultWorkingDirectorySafe(configuredPath?, contentRootPath?) |
Same as above, but never throws — falls back to HOME/tmp. |
ResolveDatabasePath(configuredPath?, baseDirectory, defaultRelativePath) |
Resolves a .db file path using the GnOuGo data convention. |
ResolveLocalModelsDirectory(baseDirectory) |
Resolves the shared .GnOuGo/models/ directory; the owning model manager creates it when needed. |
ResolveWorkflowWorkspacesDirectory(workspaceRoot) |
Resolves the visible workflows/ root without creating it. |
IsReservedWorkspacePath(path, workspaceRoot) |
Returns true for .GnOuGo and its descendants. |
IsWorkflowWorkspacePath(path, workspaceRoot) |
Returns true for workflows and its descendants. |
DiscoverWorkspaceRoot(startPath) |
Finds the nearest parent with a .sln or .git. |
IsPathWithinRoot(path, root) |
Returns true if path is under root. |
Build
dotnet build src/GnOuGo.Workspace/GnOuGo.Workspace.csproj
Test
dotnet test tests/GnOuGo.Workspace.Tests/GnOuGo.Workspace.Tests.csproj
Usage
using GnOuGo.Workspace;
// Resolve Desktop/GnOuGo for generic working-directory scenarios
var workDir = GnOuGoWorkspace.ResolveDefaultWorkingDirectory();
// Check workspace root
var root = GnOuGoWorkspace.DiscoverWorkspaceRoot(AppContext.BaseDirectory);
// Resolve a database path under Desktop/GnOuGo/.GnOuGo/data by default
var dbPath = GnOuGoWorkspace.ResolveDatabasePath(null, baseDir, ".GnOuGo/data/my-app.db");
// Resolve shared, host-level GGUF model assets
var modelsPath = GnOuGoWorkspace.ResolveLocalModelsDirectory(workDir);
// Resolve the visible root for workflow-owned workspaces
var workflowRoot = GnOuGoWorkspace.ResolveWorkflowWorkspacesDirectory(workDir);
| 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
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on GnOuGo.Workspace:
| Package | Downloads |
|---|---|
|
GnOuGo.AI.Local
Embedded LLamaSharp runtime and verified local model lifecycle for GnOuGo. |
|
|
GnOuGo.Flow.Integrations
AI provider and MCP transport integrations for the autonomous GnOuGo.Flow.Core workflow engine. |
|
|
GnOuGo.KeyVault.Core
Package Description |
|
|
GnOuGo.Flow.Persistence
Tenant-owned encrypted workflow execution journals with rebuildable EF Core and SQLite indexes. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.20.0 | 55 | 10/2/2026 |
| 0.20.0-dev.847 | 52 | 9/30/2026 |
| 0.20.0-dev.837 | 61 | 9/30/2026 |
| 0.20.0-dev.786 | 63 | 9/25/2026 |
| 0.20.0-dev.784 | 60 | 9/25/2026 |
| 0.19.4-dev.756 | 59 | 9/24/2026 |
| 0.19.3 | 118 | 9/24/2026 |
| 0.19.3-dev.730 | 64 | 9/23/2026 |
| 0.19.3-dev.728 | 69 | 9/22/2026 |
| 0.19.2 | 108 | 9/22/2026 |
| 0.19.2-dev.715 | 64 | 9/22/2026 |
| 0.19.1 | 124 | 8/16/2026 |
| 0.19.0 | 112 | 8/16/2026 |