feat(prompt-context): singleton HostDataProvider injects host info #89

Merged
jasoncouture merged 1 commit from agent-refactor into main 2026-05-17 01:50:36 -04:00
jasoncouture commented 2026-05-17 01:50:34 -04:00 (Migrated from github.com)

Summary

  • New HostData record (Hostname, Username, OperatingSystem, RuntimeIdentifier, ProcessorArchitecture) captured at process start.
  • HostDataProvider is a singleton IDataContextItemProvider; values resolved once in its constructor and returned to every data context under the host key.
  • Wired into AddCore via AddSingletonDataProvider<HostDataProvider>(), alongside the existing scoped providers.

Test plan

  • dotnet build clean (only the pre-existing [Obsolete] warnings on the slash commands)
  • dotnet test — 519/519 pass
  • Manual: confirm prompt-context templates can render the host.* fields

🤖 Generated with Claude Code

## Summary - New `HostData` record (Hostname, Username, OperatingSystem, RuntimeIdentifier, ProcessorArchitecture) captured at process start. - `HostDataProvider` is a singleton `IDataContextItemProvider`; values resolved once in its constructor and returned to every data context under the `host` key. - Wired into `AddCore` via `AddSingletonDataProvider<HostDataProvider>()`, alongside the existing scoped providers. ## Test plan - [x] `dotnet build` clean (only the pre-existing `[Obsolete]` warnings on the slash commands) - [x] `dotnet test` — 519/519 pass - [ ] Manual: confirm prompt-context templates can render the `host.*` fields 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026-05-17 01:51:41 -04:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

Adds a singleton HostDataProvider that exposes host system info (hostname, username, OS, RID, architecture) on the data context under the host key, captured once at process start.

Changes:

  • New HostData record in LlamaShears.Core.Abstractions.Common with a DataKey = "host" constant.
  • New internal HostDataProvider singleton that captures host info once in its constructor.
  • Wired into AddCore via AddSingletonDataProvider<HostDataProvider>(); corresponding API docs added.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/public/LlamaShears.Core.Abstractions/Common/HostData.cs New record exposing host metadata and the host data-context key.
src/LlamaShears.Core/PromptContext/HostDataProvider.cs Singleton IDataContextItemProvider returning a cached HostData.
src/LlamaShears.Core/CoreServiceCollectionExtensions.cs Registers HostDataProvider as a singleton data provider in AddCore.
docs/api/.../Common/HostData.md Generated API documentation for HostData.
docs/api/.../Common/index.md Adds HostData entry to namespace listing.
docs/api/LlamaShears.Core.Abstractions/index.md Adds HostData to top-level type index.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

## Pull request overview Adds a singleton `HostDataProvider` that exposes host system info (hostname, username, OS, RID, architecture) on the data context under the `host` key, captured once at process start. **Changes:** - New `HostData` record in `LlamaShears.Core.Abstractions.Common` with a `DataKey = "host"` constant. - New internal `HostDataProvider` singleton that captures host info once in its constructor. - Wired into `AddCore` via `AddSingletonDataProvider<HostDataProvider>()`; corresponding API docs added. ### Reviewed changes Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments. <details> <summary>Show a summary per file</summary> | File | Description | | ---- | ----------- | | src/public/LlamaShears.Core.Abstractions/Common/HostData.cs | New record exposing host metadata and the `host` data-context key. | | src/LlamaShears.Core/PromptContext/HostDataProvider.cs | Singleton `IDataContextItemProvider` returning a cached `HostData`. | | src/LlamaShears.Core/CoreServiceCollectionExtensions.cs | Registers `HostDataProvider` as a singleton data provider in `AddCore`. | | docs/api/.../Common/HostData.md | Generated API documentation for `HostData`. | | docs/api/.../Common/index.md | Adds `HostData` entry to namespace listing. | | docs/api/LlamaShears.Core.Abstractions/index.md | Adds `HostData` to top-level type index. | </details> --- 💡 <a href="/jasoncouture/llama-shears/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
github-actions[bot] commented 2026-05-17 01:52:18 -04:00 (Migrated from github.com)
Package Line Rate Branch Rate Complexity Health
LlamaShears.Core.Eventing 91% 84% 53
LlamaShears.Core.Abstractions 49% 34% 365
LlamaShears.Api 29% 30% 461
LlamaShears.Provider.Ollama 44% 28% 188
LlamaShears.Core.Eventing.Extensions 100% 100% 1
LlamaShears.Core 45% 41% 1386
LlamaShears.Provider.Onnx.Embeddings 37% 38% 72
LlamaShears.Provider.OpenAI 65% 65% 227
LlamaShears.Api.Web 1% 1% 428
LlamaShears.Hosting 33% 21% 27
LlamaShears.Plugins 0% 100% 1
LlamaShears.Core.Eventing 89% 75% 53
LlamaShears 52% 36% 25
LlamaShears.Plugins.Host 34% 24% 36
LlamaShears.Core.Abstractions 33% 14% 365
LlamaShears.Api 7% 1% 461
LlamaShears.Provider.Ollama 3% 1% 188
LlamaShears.Core.Eventing.Extensions 100% 100% 1
StrangeSoft.Plugins.Host 20% 21% 87
LlamaShears.Core 40% 27% 1386
LlamaShears.Provider.Onnx.Embeddings 3% 0% 72
LlamaShears.Provider.OpenAI 2% 0% 227
LlamaShears.Api.Web 21% 10% 428
LlamaShears.Hosting 26% 8% 27
LlamaShears.Plugins 0% 100% 1
LlamaShears.Core.Eventing 89% 75% 53
LlamaShears 52% 36% 25
LlamaShears.Plugins.Host 34% 24% 36
LlamaShears.Core.Abstractions 33% 14% 365
LlamaShears.IntegrationTests 85% 73% 72
LlamaShears.Api 9% 3% 461
LlamaShears.Provider.Ollama 3% 1% 188
LlamaShears.Core.Eventing.Extensions 100% 100% 1
StrangeSoft.Plugins.Host 20% 21% 87
LlamaShears.Core 41% 28% 1386
LlamaShears.Provider.Onnx.Embeddings 3% 0% 72
LlamaShears.Provider.OpenAI 2% 0% 227
LlamaShears.Api.Web 31% 17% 428
LlamaShears.Hosting 26% 8% 27
LlamaShears.Analyzers.CodeFixes 85% 69% 60
LlamaShears.Analyzers 88% 76% 199
Summary 46% (10704 / 31331) 36% (2318 / 9476) 10253
Package | Line Rate | Branch Rate | Complexity | Health -------- | --------- | ----------- | ---------- | ------ LlamaShears.Core.Eventing | 91% | 84% | 53 | ✔ LlamaShears.Core.Abstractions | 49% | 34% | 365 | ❌ LlamaShears.Api | 29% | 30% | 461 | ❌ LlamaShears.Provider.Ollama | 44% | 28% | 188 | ❌ LlamaShears.Core.Eventing.Extensions | 100% | 100% | 1 | ✔ LlamaShears.Core | 45% | 41% | 1386 | ❌ LlamaShears.Provider.Onnx.Embeddings | 37% | 38% | 72 | ❌ LlamaShears.Provider.OpenAI | 65% | 65% | 227 | ➖ LlamaShears.Api.Web | 1% | 1% | 428 | ❌ LlamaShears.Hosting | 33% | 21% | 27 | ❌ LlamaShears.Plugins | 0% | 100% | 1 | ❌ LlamaShears.Core.Eventing | 89% | 75% | 53 | ✔ LlamaShears | 52% | 36% | 25 | ➖ LlamaShears.Plugins.Host | 34% | 24% | 36 | ❌ LlamaShears.Core.Abstractions | 33% | 14% | 365 | ❌ LlamaShears.Api | 7% | 1% | 461 | ❌ LlamaShears.Provider.Ollama | 3% | 1% | 188 | ❌ LlamaShears.Core.Eventing.Extensions | 100% | 100% | 1 | ✔ StrangeSoft.Plugins.Host | 20% | 21% | 87 | ❌ LlamaShears.Core | 40% | 27% | 1386 | ❌ LlamaShears.Provider.Onnx.Embeddings | 3% | 0% | 72 | ❌ LlamaShears.Provider.OpenAI | 2% | 0% | 227 | ❌ LlamaShears.Api.Web | 21% | 10% | 428 | ❌ LlamaShears.Hosting | 26% | 8% | 27 | ❌ LlamaShears.Plugins | 0% | 100% | 1 | ❌ LlamaShears.Core.Eventing | 89% | 75% | 53 | ✔ LlamaShears | 52% | 36% | 25 | ➖ LlamaShears.Plugins.Host | 34% | 24% | 36 | ❌ LlamaShears.Core.Abstractions | 33% | 14% | 365 | ❌ LlamaShears.IntegrationTests | 85% | 73% | 72 | ✔ LlamaShears.Api | 9% | 3% | 461 | ❌ LlamaShears.Provider.Ollama | 3% | 1% | 188 | ❌ LlamaShears.Core.Eventing.Extensions | 100% | 100% | 1 | ✔ StrangeSoft.Plugins.Host | 20% | 21% | 87 | ❌ LlamaShears.Core | 41% | 28% | 1386 | ❌ LlamaShears.Provider.Onnx.Embeddings | 3% | 0% | 72 | ❌ LlamaShears.Provider.OpenAI | 2% | 0% | 227 | ❌ LlamaShears.Api.Web | 31% | 17% | 428 | ❌ LlamaShears.Hosting | 26% | 8% | 27 | ❌ LlamaShears.Analyzers.CodeFixes | 85% | 69% | 60 | ✔ LlamaShears.Analyzers | 88% | 76% | 199 | ✔ **Summary** | **46%** (10704 / 31331) | **36%** (2318 / 9476) | **10253** | ❌ <!-- Sticky Pull Request Commentcoverage -->
Sign in to join this conversation.
No description provided.