Skip to content

Commit e7c107d

Browse files
authored
Merge pull request #7 from D-Naveenz/development
Integrate MindVault, enhance Dhara tooling, and update README
2 parents 82f28e6 + 4db68af commit e7c107d

170 files changed

Lines changed: 3575 additions & 2277 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
###############################################################################
6161
# Git LFS tracked file types
6262
#
63-
*.rpkg filter=lfs diff=lfs merge=lfs -text
63+
*.dhbin filter=lfs diff=lfs merge=lfs -text
6464
*.mp4 filter=lfs diff=lfs merge=lfs -text
6565
*.pdf filter=lfs diff=lfs merge=lfs -text
6666
*.png filter=lfs diff=lfs merge=lfs -text

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: Swatinem/rust-cache@v2
3737

3838
- name: Verify CI
39-
run: cargo run -p rheo_tool -- verify ci
39+
run: cargo run -p dhara_tool -- verify ci
4040

4141
docs:
4242
name: verify docs (windows)
@@ -58,5 +58,5 @@ jobs:
5858
- name: Cache Cargo dependencies
5959
uses: Swatinem/rust-cache@v2
6060

61-
- name: Build docs for Rheo crates
62-
run: cargo run -p rheo_tool -- verify docs
61+
- name: Build docs for Dhara crates
62+
run: cargo run -p dhara_tool -- verify docs

.github/workflows/package-verify.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ jobs:
4545
uses: Swatinem/rust-cache@v2
4646

4747
- name: Verify package
48-
run: cargo run -p rheo_tool -- verify package
48+
run: cargo run -p dhara_tool -- verify package
4949

5050
- name: Upload NuGet artifacts
5151
uses: actions/upload-artifact@v7
5252
with:
53-
name: Rheo.Storage-package
53+
name: Dhara.Storage-package
5454
path: |
55-
.artifacts/rheo_tool/nuget/*.nupkg
56-
.artifacts/rheo_tool/nuget/*.snupkg
55+
.artifacts/dhara_tool/nuget/*.nupkg
56+
.artifacts/dhara_tool/nuget/*.snupkg

.github/workflows/publish-nuget.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ concurrency:
2626

2727
jobs:
2828
publish:
29-
name: publish Rheo.Storage (windows)
29+
name: publish Dhara.Storage (windows)
3030
runs-on: windows-latest
3131
environment: nuget-production
3232

@@ -59,7 +59,7 @@ jobs:
5959
INPUT_DRY_RUN: ${{ inputs.dry_run }}
6060
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
6161
run: |
62-
$arguments = @("run", "-p", "rheo_tool", "--", "release", "publish")
62+
$arguments = @("run", "-p", "dhara_tool", "--", "release", "publish")
6363
6464
if ($env:INPUT_VERSION) {
6565
$arguments += @("--version", $env:INPUT_VERSION)

.github/workflows/release-rust.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ jobs:
8989
9090
- name: Validate workspace before release
9191
run: |
92-
cargo run -p rheo_tool -- verify release-config
93-
cargo test -p rheo_storage --all-features
94-
cargo test -p rheo_storage_ffi
95-
cargo test -p rheo_tool_rheo_storage
96-
cargo test -p rheo_tool
97-
dotnet test --configuration Release bindings/dotnet/Rheo.Storage.Tests/Rheo.Storage.Tests.csproj
92+
cargo run -p dhara_tool -- verify release-config
93+
cargo test -p dhara_storage --all-features
94+
cargo test -p dhara_storage_native
95+
cargo test -p dhara_tool_dhara_storage
96+
cargo test -p dhara_tool
97+
dotnet test --configuration Release bindings/dotnet/Dhara.Storage.Tests/Dhara.Storage.Tests.csproj
9898
9999
- name: Ensure crates.io token is present
100100
if: ${{ inputs.execute }}

AGENTS.md

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,21 @@
1-
# Rheo Storage Agents
1+
# Dhara Storage Agents
22

33
## Purpose
4-
- This repository is the Rust-first rewrite of `Rheo.Storage`.
5-
- The rewrite prioritizes secure, idiomatic Rust APIs over C# surface compatibility.
6-
- The current repo already includes the core runtime, the reusable `rheo_tool` platform, and the .NET/native FFI delivery layers.
4+
- `dhara_storage` is the Rust-first rewrite of `Dhara.Storage`.
5+
- The workspace now includes the core runtime, the reusable `dhara_tool` platform, and the active .NET/FFI delivery layers.
6+
- Canonical AI-operational knowledge for this workspace lives in MindVault, not in repo-local notes.
77

8-
## Read Order
9-
1. `docs/ai/index.md`
10-
2. `docs/ai/project-guidelines.md`
11-
3. `docs/adr/ADR-001-rust-first-rewrite.md`
12-
4. `docs/reference/legacy-rheo-storage.md`
13-
5. `docs/ai/continuous-learning.md`
14-
15-
## Guardrails
16-
- Keep the public API Rust-native. Do not recreate `FileObject` or `DirectoryObject` class shapes unless an ADR changes that decision.
17-
- Treat Windows as the primary runtime target for now, but keep pure analysis logic portable when it naturally can be.
18-
- Keep ABI-layer constraints out of the Rust core. Solve WinRT-specific shape issues in `rheo_storage_winrt`.
19-
- Prefer typed errors, deterministic test fixtures, and explicit handling of file-sharing semantics on Windows.
20-
- Keep project-specific AI guidance in this repo, not in a global skill.
21-
- Keep durable repo guidance in `AGENTS.md` and `docs/ai/`; use `.codex/` only for Codex app setup and project-scoped Codex configuration.
8+
## Vault Location
9+
- `%USERPROFILE%\OneDrive\Documents\MindVault`
2210

23-
## Current Milestone
24-
- `rheo_storage` owns analysis, immutable metadata, file and directory operations, navigation, debounced watching, typed errors, and filedefs package deserialization/loading.
25-
- The operations layer should keep the simple path fast: do not force info or analysis loading for plain copy, move, read, write, or delete calls.
26-
- `rheo_rpkg` owns the generic MessagePack-based `RPKG` v2 container format, package purposes, compression, section layout, and integrity framing.
27-
- `rheo_tool_rheo_storage` owns package inspection, normalization, filedefs package serialization, vendored MIME validation, floodgate reduction, interactive shell flows, and TrID XML source ingestion from `.xml`, extracted directories, and `.7z` archives.
28-
- `filedefs.rpkg` is now a single `RPKG` v2 filedefs package; backward-compatibility readers for older ad hoc package formats are intentionally out of scope.
29-
- `rheo_storage_ffi` and `bindings/dotnet/Rheo.Storage` are the active ABI and managed wrapper layers over the Rust core and should keep ABI-specific concerns out of `rheo_storage`.
30-
- CI, docs, and release automation should assume Windows as the primary build/test/doc platform.
31-
- `filedefs.rpkg` and other large runtime fixtures may be tracked with Git LFS, so CI and release workflows must explicitly enable LFS checkout when those assets are needed.
32-
33-
## Working Rhythm
34-
- Update `docs/ai/continuous-learning.md` whenever a repeated implementation lesson appears.
35-
- Record durable architecture decisions under `docs/adr/`.
36-
- If a change shifts scope across milestones, update both `docs/ai/project-guidelines.md` and the relevant ADR in the same change.
11+
## Read Order
12+
1. `%USERPROFILE%\OneDrive\Documents\MindVault\AI\Workspaces\rheo-storage\Home.md`
13+
2. `%USERPROFILE%\OneDrive\Documents\MindVault\AI\Workspaces\rheo-storage\Overview.md`
14+
3. `%USERPROFILE%\OneDrive\Documents\MindVault\AI\Workspaces\rheo-storage\Guardrails.md`
3715

38-
## Where To Look Next
39-
- Use `docs/ai/index.md` as the entrypoint for detailed repo guidance.
40-
- Use `docs/ai/runbooks/` for operational runbooks that are too detailed for this file.
41-
- Use `.codex/environments/environment.toml` only for Codex app worktree setup, cleanup, and app actions.
16+
## Local Caveats
17+
- Treat repo code, manifests, tests, and workflow files as the source of truth if a vault note drifts.
18+
- Keep `dhara_storage` Rust-native; solve .NET interop constraints in `dhara_storage_native` and `bindings/dotnet/Dhara.Storage`.
19+
- Keep `dhara_tool` and `dhara.config.toml` as the supported operator surface for config sync, verification, packaging, and publishing flows.
20+
- Treat Windows as the primary runtime and CI target unless a concrete portability goal says otherwise.
21+
- Avoid rebuilding repo-local AI docs unless a non-AI publishing or tooling requirement explicitly depends on them.

Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
[workspace]
22
members = [
3-
"rheo_rpkg",
4-
"rheo_storage",
5-
"rheo_storage_ffi",
6-
"tooling/rheo_tool",
7-
"tooling/rheo_tool_rheo_storage",
3+
"dhara_dhbin",
4+
"dhara_storage",
5+
"dhara_storage_native",
6+
"tooling/dhara_tool",
7+
"tooling/dhara_tool_dhara_storage",
88
]
99
resolver = "3"
1010

1111
[workspace.package]
12-
version = "0.3.0"
12+
version = "0.4.0"
1313
edition = "2024"
1414
authors = ["Naveen Dharmathunga <dasheenaveen@outlook.com>"]
1515
license = "Apache-2.0"
1616
repository = "https://github.com/D-Naveenz/rheo_storage"
1717
homepage = "https://github.com/D-Naveenz/rheo_storage"
1818

1919
[workspace.dependencies]
20-
rheo_rpkg = { version = "0.3.0", path = "rheo_rpkg" }
21-
rheo_storage = { version = "0.3.0", path = "rheo_storage" }
22-
rheo_tool_rheo_storage = { version = "0.3.0", path = "tooling/rheo_tool_rheo_storage" }
20+
dhara_dhbin = { version = "0.4.0", path = "dhara_dhbin" }
21+
dhara_storage = { version = "0.4.0", path = "dhara_storage" }
22+
dhara_tool_dhara_storage = { version = "0.4.0", path = "tooling/dhara_tool_dhara_storage" }
2323

2424
# Read the optimization guideline for more details: https://ratatui.rs/recipes/apps/release-your-app/#optimizations
2525
[profile.release]

Dhara.Storage.slnx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Solution>
2+
<Folder Name="/Bindings/" />
3+
<Folder Name="/Bindings/Dotnet/">
4+
<Project Path="Bindings/Dotnet/Dhara.Storage.Tests/Dhara.Storage.Tests.csproj" />
5+
<Project Path="Bindings/Dotnet/Dhara.Storage/Dhara.Storage.csproj" />
6+
</Folder>
7+
<Folder Name="/Solution Items/">
8+
<File Path=".editorconfig" />
9+
</Folder>
10+
<Project Path="bindings/dotnet/Dhara.Storage.ConsumerSmoke/Dhara.Storage.ConsumerSmoke.csproj" />
11+
</Solution>

README.md

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,98 @@
1-
# Rheo Storage
1+
# Dhara Storage
22

3-
Rheo Storage is a Rust-first storage runtime with a Windows-first delivery story.
3+
![Crates.io Version](https://img.shields.io/crates/v/:crate)
4+
[![License: Apache-2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE.txt)
5+
6+
Dhara Storage is a Rust-first storage runtime with a Windows-first delivery story.
47
It combines definition-driven file analysis, path-based file and directory operations,
5-
debounced watching, a reusable `RPKG` package format, and a managed .NET wrapper over
8+
debounced watching, a reusable `DHBIN` package format, and a managed .NET wrapper over
69
the native core.
710

811
## Workspace
912

10-
| Project | Purpose |
11-
| --- | --- |
12-
| `rheo_rpkg` | Shared `RPKG` v2 container crate for MessagePack payloads, optional metadata, and integrity sections |
13-
| `rheo_storage` | Rust-native runtime for analysis, metadata, operations, navigation, and watching |
14-
| `rheo_storage_ffi` | Thin C ABI over `rheo_storage` for managed and native hosts |
15-
| `bindings/dotnet/Rheo.Storage` | `net10.0` wrapper over `rheo_storage_ffi` |
16-
| `tooling/rheo_tool` | Operator CLI for verification, packaging, release, and defs workflows |
17-
| `tooling/rheo_tool_rheo_storage` | Repository-specific capability pack used by `rheo_tool` |
13+
| Project | Purpose |
14+
| ---------------------------------- | ----------------------------------------------------------------------------------------------------- |
15+
| `dhara_dhbin` | Shared `DHBIN` v2 container crate for MessagePack payloads, optional metadata, and integrity sections |
16+
| `dhara_storage` | Rust-native runtime for analysis, metadata, operations, navigation, and watching |
17+
| `dhara_storage_native` | Thin C ABI over `dhara_storage` for managed and native hosts |
18+
| `bindings/dotnet/Dhara.Storage` | `net10.0` wrapper over `dhara_storage_native` |
19+
| `tooling/dhara_tool` | Operator CLI for verification, packaging, release, and defs workflows |
20+
| `tooling/dhara_tool_dhara_storage` | Repository-specific capability pack used by `dhara_tool` |
1821

1922
## Highlights
2023

21-
- Rust-native public API in `rheo_storage`, not a class-for-class port of the legacy C# model
22-
- Bundled `filedefs.rpkg` runtime package for content-based file analysis
24+
- Rust-native public API in `dhara_storage`, not a class-for-class port of the legacy C# model
25+
- Bundled `filedefs.dhbin` runtime package for content-based file analysis
2326
- File and directory operations that keep the simple path fast and opt into progress only when needed
2427
- Debounced directory watching for stable change notifications
25-
- Structured logging with `tracing` in Rust, native log forwarding through `rheo_storage_ffi`, and host integration through `Microsoft.Extensions.Logging`
28+
- Structured logging with `tracing` in Rust, native log forwarding through `dhara_storage_native`, and host integration through `Microsoft.Extensions.Logging`
2629
- Multi-runtime NuGet packaging for Windows `win-x64` and `win-arm64`
2730

2831
## Quick Start
2932

3033
Rust runtime:
3134

3235
```rust
33-
use rheo_storage::{FileStorage, analyze_path};
36+
use dhara_storage::{FileStorage, analyze_path};
3437

3538
let report = analyze_path("sample.pdf")?;
3639
let bytes = FileStorage::from_existing("sample.pdf")?.read()?;
37-
# Ok::<(), rheo_storage::StorageError>(())
40+
# Ok::<(), dhara_storage::StorageError>(())
3841
```
3942

4043
.NET wrapper:
4144

4245
```csharp
4346
using Microsoft.Extensions.Logging;
44-
using Rheo.Storage;
47+
using Dhara.Storage;
4548

4649
using var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());
47-
RheoStorage.UseLoggerFactory(loggerFactory);
50+
DharaStorage.UseLoggerFactory(loggerFactory);
4851

49-
var file = RheoStorage.File(@"C:\data\sample.pdf");
52+
var file = DharaStorage.File(@"C:\data\sample.pdf");
5053
var analysis = file.Analyze();
5154
var bytes = await file.ReadBytesAsync();
5255
```
5356

5457
Tooling:
5558

5659
```powershell
57-
cargo run -p rheo_tool -- verify ci
58-
cargo run -p rheo_tool -- package verify
60+
cargo run -p dhara_tool -- verify ci
61+
cargo run -p dhara_tool -- verify package
5962
```
6063

6164
## Support Matrix
6265

63-
| Surface | Status |
64-
| --- | --- |
65-
| `rheo_rpkg` | Portable Rust crate |
66-
| `rheo_storage` | Windows-first runtime; portable where the underlying functionality naturally is |
67-
| `rheo_storage_ffi` | Windows-first native ABI |
68-
| `Rheo.Storage` NuGet package | Windows `win-x64` and `win-arm64` only |
66+
| Surface | Status |
67+
| ----------------------------- | ------------------------------------------------------------------------------- |
68+
| `dhara_dhbin` | Portable Rust crate |
69+
| `dhara_storage` | Windows-first runtime; portable where the underlying functionality naturally is |
70+
| `dhara_storage_native` | Windows-first native ABI |
71+
| `Dhara.Storage` NuGet package | Windows `win-x64` and `win-arm64` only |
6972

7073
The NuGet package now fails clearly during package consumption for unsupported RIDs such as `win-x86`,
7174
and the managed wrapper also throws a `PlatformNotSupportedException` when loaded outside Windows `x64` or `arm64`.
7275

7376
## Logging
7477

7578
- Rust crates emit structured `tracing` events for analysis, metadata loading, operations, watching, package verification, and release flows.
76-
- `rheo_storage_ffi` exposes a native logger registration API that forwards JSON log records across the ABI.
77-
- `Rheo.Storage` forwards both managed wrapper logs and native runtime logs into a host `ILoggerFactory`.
78-
- `rheo_tool` and `rheo_tool_rheo_storage` now emit richer command, configuration, transfer, and verification logs for release diagnostics.
79+
- `dhara_storage_native` exposes a native logger registration API that forwards JSON log records across the ABI.
80+
- `Dhara.Storage` forwards both managed wrapper logs and native runtime logs into a host `ILoggerFactory`.
81+
- `dhara_tool` and `dhara_tool_dhara_storage` now emit richer command, configuration, transfer, and verification logs for release diagnostics.
7982

8083
## Release Flow
8184

82-
- Shared release metadata lives in [rheo.config.toml](./rheo.config.toml).
85+
- Shared release metadata lives in [dhara.config.toml](./dhara.config.toml).
8386
- Local secrets belong in [.env.local](./.env.example), created from the example file.
84-
- [tooling/rheo_tool](./tooling/rheo_tool/README.md) is the supported operator surface for config sync, verification, packaging, and publish flows.
85-
- NuGet verification checks that both `runtimes/win-x64/native/rheo_storage_ffi.dll` and `runtimes/win-arm64/native/rheo_storage_ffi.dll` are present in the package.
87+
- [tooling/dhara_tool](./tooling/dhara_tool/README.md) is the supported operator surface for config sync, verification, packaging, and publish flows.
88+
- NuGet verification checks that both `runtimes/win-x64/native/dhara_storage_native.dll` and `runtimes/win-arm64/native/dhara_storage_native.dll` are present in the package.
8689

8790
## Docs
8891

89-
- [Rust consumer guide](./docs/reference/rust-consumer.md)
90-
- [.NET consumer guide](./docs/reference/dotnet-consumer.md)
91-
- [.NET release guide](./docs/reference/releasing-rheo-storage-dotnet.md)
92-
- [rheo_rpkg README](./rheo_rpkg/README.md)
93-
- [rheo_storage README](./rheo_storage/README.md)
94-
- [rheo_storage_ffi README](./rheo_storage_ffi/README.md)
95-
- [Rheo.Storage README](./bindings/dotnet/Rheo.Storage/README.md)
92+
- Rust consumer guide: `%USERPROFILE%\OneDrive\Documents\MindVault\AI\Workspaces\rheo-storage\References\Rust Consumer.md`
93+
- .NET consumer guide: `%USERPROFILE%\OneDrive\Documents\MindVault\AI\Workspaces\rheo-storage\References\DotNET Consumer.md`
94+
- .NET release guide: `%USERPROFILE%\OneDrive\Documents\MindVault\AI\Workspaces\rheo-storage\References\Releasing Rheo.Storage for DotNET.md`
95+
- [dhara_dhbin README](./dhara_dhbin/README.md)
96+
- [dhara_storage README](./dhara_storage/README.md)
97+
- [dhara_storage_native README](./dhara_storage_native/README.md)
98+
- [Dhara.Storage README](./bindings/dotnet/Dhara.Storage/README.md)

Rheo.Storage.slnx

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)