Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,26 @@ public interface IAIClientProvider
/// <summary>
/// Determines whether this provider can handle the specified provider name.
/// </summary>
/// <param name = "providerName">The name of the provider to check.</param>
/// <param name = "clientName">The name of the provider to check.</param>
/// <returns><c>true</c> if the provider can be handled; otherwise, <c>false</c>.</returns>
bool CanHandle(string providerName);
bool CanHandle(string clientName);

/// <summary>
/// Gets an AI chat client for the specified connection and deployment.
/// </summary>
/// <param name = "connection">The connection entry containing provider configuration.</param>
/// <param name = "deploymentName">The optional deployment name to use.</param>
/// <returns>A <see cref = "ValueTask{IChatClient}"/> representing the asynchronous operation.</returns>
ValueTask<IChatClient> GetChatClientAsync(AIProviderConnectionEntry connection, string deploymentName = null);

/// <summary>
/// Gets an embedding generator for the specified connection and deployment.
/// </summary>
/// <param name = "connection">The connection entry containing provider configuration.</param>
/// <param name = "deploymentName">The optional deployment name to use.</param>
/// <returns>A <see cref = "ValueTask{IEmbeddingGenerator}"/> representing the asynchronous operation.</returns>
ValueTask<IEmbeddingGenerator<string, Embedding<float>>> GetEmbeddingGeneratorAsync(AIProviderConnectionEntry connection, string deploymentName = null);

/// <summary>
/// Gets an image generator for the specified connection and deployment.
/// </summary>
Expand All @@ -35,7 +38,6 @@ public interface IAIClientProvider
/// <returns>A <see cref = "ValueTask{IImageGenerator}"/> representing the asynchronous operation.</returns>

#pragma warning disable MEAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

ValueTask<IImageGenerator> GetImageGeneratorAsync(AIProviderConnectionEntry connection, string deploymentName = null);
#pragma warning restore MEAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

Expand All @@ -45,9 +47,7 @@ public interface IAIClientProvider
/// <param name = "connection">The connection entry containing provider configuration.</param>
/// <param name = "deploymentName">The optional deployment name to use.</param>
/// <returns>A <see cref = "ValueTask{ISpeechToTextClient}"/> representing the asynchronous operation.</returns>

#pragma warning disable MEAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

ValueTask<ISpeechToTextClient> GetSpeechToTextClientAsync(AIProviderConnectionEntry connection, string deploymentName = null);
#pragma warning restore MEAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

Expand All @@ -57,9 +57,7 @@ public interface IAIClientProvider
/// <param name = "connection">The connection entry containing provider configuration.</param>
/// <param name = "deploymentName">The optional deployment name to use.</param>
/// <returns>A <see cref = "ValueTask{ITextToSpeechClient}"/> representing the asynchronous operation.</returns>

#pragma warning disable MEAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

ValueTask<ITextToSpeechClient> GetTextToSpeechClientAsync(AIProviderConnectionEntry connection, string deploymentName = null);
#pragma warning restore MEAI001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IAICompletionClient
/// This name is used to distinguish between different implementations of the clients.
/// Each implementation should return a distinct name that identifies it clearly.
/// </summary>
string Name { get; }
string ClientName { get; }

/// <summary>
/// Sends a series of messages to the AI chat service and returns the completion response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ public sealed class AICompletionUsageRecord : ExtensibleEntity

public bool IsAuthenticated { get; set; }

public string ProviderName { get; set; }

public string ClientName { get; set; }

public string ConnectionName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace CrestApps.Core.AI.Models;

public sealed class CompletionServiceConfigureContext
{
public string ProviderName { get; set; }
public string ClientName { get; set; }

public string ImplemenationName { get; set; }

Expand Down
16 changes: 8 additions & 8 deletions src/CrestApps.Core.Docs/docs/a2a/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@ You can use both in the same application — A2A for agent delegation and MCP fo
│ │ A2AToolRegistryProvider│ │ │ │ Agent Card Generator │ │
│ │ (discovers skills as │ │ │ │ (profiles → agent cards) │ │
│ │ tool entries) │ │ │ └───────────────────┬────────┘ │
│ └─────┬──────────────────┘ │ │ │ │
│ └─────┬──────────────────┘ │ │ │
│ │ │ │ ┌──────────────────▼─────────┐ │
│ ┌─────▼──────────────────┐ │ fetch │ │ /.well-known/agent.json │ │
│ │ A2AAgentProxyTool ├─────┼──────────┼──► (Agent Card endpoint) │ │
│ │ (proxies messages │ │ │ └───────────────────────────┘ │
│ │ to remote agent) │ │ send │ │
│ │ ├─────┼──────────┼──► /a2a (message endpoint) │
│ ┌─────▼──────────────────┐ │ fetch │ │ /.well-known/agent.json │
│ │ A2AAgentProxyTool ├─────┼──────────┼──► (Agent Card endpoint) │
│ │ (proxies messages │ │ │ └───────────────────────────┘
│ │ to remote agent) │ │ send │
│ │ ├─────┼──────────┼──► /a2a (message endpoint)
│ └────────────────────────┘ │ │ │
│ │ │ Authentication: │
│ Authentication: │ │ • OpenID Connect │
│ • API Key, Basic, OAuth2, │ │ • API Key │
│ mTLS, Custom Headers │ │ • None (dev only) │
│ • API Key, Basic, OAuth2, │ │ • API Key │
│ mTLS, Custom Headers │ │ • None (dev only) │
└─────────────────────────────────┘ └──────────────────────────────────┘
```

Expand Down
1 change: 1 addition & 0 deletions src/CrestApps.Core.Docs/docs/changelog/v1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ description: Initial standalone release notes for the CrestApps.Core repository.
- renames `CrestApps.Core.AI.AISearch` to `CrestApps.Core.AI.Azure.AISearch`, groups the docs navigation around orchestrators, surfaces the Claude docs page, renames AI Providers to AI Clients, and updates the OpenAI docs to call out common OpenAI-compatible endpoints plus the dedicated Claude path
- aligns the built-in Entity Framework Core stores with the same `IStoreCommitter` unit-of-work pattern as YesSql and refreshes the storage/getting-started docs to explain MVC, Minimal API, SignalR, and background commit boundaries consistently
- adds hierarchical document retrieval mode support so document RAG can rank on chunks and then inject full matched document text when hosts or profiles opt into that behavior
- removes Azure OpenAI connection-level logging flags in favor of shared `CrestApps:AI:AzureClient` settings, keeps Azure completion resolution deployment-driven, and refreshes the AI client docs around `ClientName`-based configuration
- clarifies deployment-store registration by introducing `IAIDeploymentStore` for persisted deployments, moves Chat Interactions ahead of AI Profiles / AI Chat in the MVC sample onboarding flow, and adds dedicated AI Profile documentation that explains how profiles power reusable chat, agents, orchestration, retrieval, and session processing
- centralizes reusable MCP runtime registration in `AddCoreAIMcpServices()`, moves the shared MCP metadata, capability-resolution, tool-registry, SSE settings-handler, and invoke-function services into `CrestApps.Core.AI.Mcp`, and splits optional StdIO transport registration so hosts can enable it only where needed
- treats aborted and canceled request-stream failures in the Aspire AppHost as observed task exceptions so local development no longer floods the console with benign unobserved-task noise
Expand Down
14 changes: 7 additions & 7 deletions src/CrestApps.Core.Docs/docs/core/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,25 @@ User message
┌──────────────────┐
│ Primary Model │ ← Chat profile with tools + agents
│ (Orchestrator)
│ Primary Model │ ← Chat profile with tools + agents
│ (Orchestrator) │
└────────┬─────────┘
│ calls agent tool
┌──────────────────┐
│ AgentProxyTool │ ← Receives { "prompt": "Review this code..." }
│ AgentProxyTool │ ← Receives { "prompt": "Review this code..." }
└────────┬─────────┘
│ builds agent context
┌──────────────────┐
│ Agent Model │ ← Agent profile (own system prompt, deployment)
│ (tools disabled)
│ Agent Model │ ← Agent profile (own system prompt, deployment)
│ (tools disabled)│
└────────┬─────────┘
│ returns response
┌──────────────────┐
│ Primary Model │ ← Incorporates agent's response and continues
│ (continues)
│ Primary Model │ ← Incorporates agent's response and continues
│ (continues) │
└──────────────────┘
```

Expand Down
4 changes: 2 additions & 2 deletions src/CrestApps.Core.Docs/docs/core/ai-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ A **deployment** maps a logical name to a specific model on a specific provider
2. Connection-level default deployment
3. Global default deployment

### Provider Connection
### AI Connection

A **provider connection** stores credentials and endpoint information for a specific AI provider (API key, endpoint URL, provider name).
An **AI connection** stores credentials and endpoint information for a specific AI client (API key, endpoint URL, and `ClientName`).

## Services Registered by `AddCoreAIServices()`

Expand Down
2 changes: 1 addition & 1 deletion src/CrestApps.Core.Docs/docs/core/ai-memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,5 @@ These tools are intended for long-lived facts such as preferences, recurring pro

## Related guidance

- Pair memory with **[Orchestration](./orchestration.md)** when you want automatic recall
- Pair memory with **[Orchestration Overview](../orchestration/index.md)** when you want automatic recall
- Pair memory with **[Data Sources](../data-sources/index.md)** when you also need document or index-backed RAG
2 changes: 1 addition & 1 deletion src/CrestApps.Core.Docs/docs/core/chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ The `GenerateChartTool` returns [Chart.js](https://www.chartjs.org/) configurati
When Chart.js is loaded, chart responses are rendered as interactive `<canvas>` elements. When Chart.js is **not** loaded, the raw JSON is displayed instead and a warning is logged to the browser console so you know chart rendering is available.

:::tip
Both tools are registered automatically by the orchestration pipeline and listed under [Built-in System Tools](./orchestration.md#built-in-system-tools).
Both tools are registered automatically by the orchestration pipeline and listed under [Built-in System Tools](../orchestration/index.md#built-in-system-tools).
:::

## Client-Side Assets
Expand Down
6 changes: 3 additions & 3 deletions src/CrestApps.Core.Docs/docs/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ The quickest way to validate the setup is to use **Chat Interactions** first, th
| Builder entrypoint | `AddCrestAppsCore(builder => ...)` | `CrestApps.Core` | [ASP.NET Core integration](./getting-started-aspnet.md) |
| Core services | `AddCoreServices()` | `CrestApps.Core` | [Core Services](./core-services.md) |
| AI services | `AddCoreAIServices()` | `CrestApps.Core.AI` | [AI Core](./ai-core.md) |
| Orchestration | `AddCoreAIOrchestration()` | `CrestApps.Core.AI` | [Orchestration](./orchestration.md) |
| Orchestration | `AddCoreAIOrchestration()` | `CrestApps.Core.AI` | [Orchestration Overview](../orchestration/index.md) |
| Chat | `AddCoreAIChatInteractions()` | `CrestApps.Core.AI.Chat` | [Chat Interactions](./chat.md) |
| Documents | `AddCoreAIDocumentProcessing()` | `CrestApps.Core.AI.Documents` | [Document Processing](./document-processing.md) |
| Templates | `AddTemplating()` | `CrestApps.Core.Templates` | [AI Templates](./ai-templates.md) |
| Custom tools | `AddCoreAITool<T>()` | `CrestApps.Core.AI` | [Custom AI Tools](./tools.md) |
| Agents | Agent and orchestration registrations | `CrestApps.Core.AI` | [AI Agents](./agents.md) |
| Copilot orchestration | `AddCoreAICopilotOrchestrator()` | `CrestApps.Core.AI.Copilot` | [Copilot Orchestrator](./copilot.md) |
| Claude orchestration | `AddCoreAIClaudeOrchestrator()` | `CrestApps.Core.AI.Claude` | [Claude Orchestrator](./claude.md) |
| Copilot orchestration | `AddCoreAICopilotOrchestrator()` | `CrestApps.Core.AI.Copilot` | [Copilot Orchestrator](../orchestration/copilot.md) |
| Claude orchestration | `AddCoreAIClaudeOrchestrator()` | `CrestApps.Core.AI.Claude` | [Claude Orchestrator](../orchestration/claude.md) |
| SignalR and widgets | `AddCoreSignalR()` | `CrestApps.Core.SignalR` | [SignalR](./signalr.md) |
| Data storage | Store registration extensions | `CrestApps.Core.Data.YesSql` | [Data Storage](./data-storage.md) |
| AI clients | Provider-specific extensions | Provider packages | [AI Clients](../providers/index.md) |
Expand Down
2 changes: 1 addition & 1 deletion src/CrestApps.Core.Docs/docs/core/interfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ Provider packages add focused extension points for specific transports and SDKs:
2. Open the owning package in `src\Abstractions` or `src\Primitives`.
3. Use the source for the exact current signature.

For end-to-end usage patterns, pair this page with **[Core Overview](./index.md)**, **[Core Services](./core-services.md)**, and **[Orchestration](./orchestration.md)**.
For end-to-end usage patterns, pair this page with **[Core Overview](./index.md)**, **[Core Services](./core-services.md)**, and **[Orchestration Overview](../orchestration/index.md)**.
Loading
Loading