Skip to content

Component: Smrt.Chat.Core

Canonical source: SmrtApps/src/Smrt.Chat.Core/README.md (mirrored below)


Smrt.Chat.Core

Shared chat domain + orchestration library.

Overview and responsibilities

  • Shared chat domain models and orchestration.
  • Capability routing through Smrt.CloudProviders (chat and chat-with-vision).
  • Privacy-safe behavior: no prompt/response logging unless explicitly designed and policy-approved.

Public surface / entry points

  • Orchestration:
    • ChatOrchestrator (planning + session creation + send message)
  • Capability routing:
    • ChatCapabilityRouter (routes to CapabilityId.ChatCompletion / CapabilityId.ChatCompletionWithVision via Smrt.CloudProviders)
  • Storage (metadata-only):
    • Storage/ChatStateStore (loads/saves ChatState)
    • Storage/ChatState + ChatSessionState (session metadata schema)

Dependencies and integrations

  • Integrates with Smrt.CloudProviders for capability routing and provider selection.

Configuration and operational data

  • Persists metadata-only state (session ids, timestamps, provider selection).
  • Canonical paths + mutex naming are owned by Storage/ChatPaths:
    • State file: chat-state.json under the chat config slug
    • Named mutex: ChatPaths.StateMutexName

Observability and diagnostics

  • Must not log prompts/responses.
  • Must not persist message text.

Testing and validation

  • Unit tests: SmrtApps/src/Smrt.Chat.Core.Tests/README.md

  • Build (Debug, win-x64):

    • dotnet build SmrtApps/src/Smrt.Chat.Core/Smrt.Chat.Core.csproj -c Debug -r win-x64
  • Unit tests:
    • dotnet test SmrtApps/src/Smrt.Chat.Core.Tests/Smrt.Chat.Core.Tests.csproj -c Debug -r win-x64 --no-build

Support Bundle

  • Not applicable directly (library); collect host application logs via Support Bundle.
  • README.Files/SmrtHub-vNext-Architecture/Plans/Smrt.Chat.Core.plan.md

Key responsibilities: - Chat sessions and message models (non-secret state) - Capability routing through Smrt.CloudProviders (chat + chat-with-vision) - Privacy-safe diagnostics (no prompt/response logging unless explicitly designed and policy-approved)

Privacy/state notes: - Smrt.Chat.Core must not log prompts/responses. - The default state store persists metadata only (session ids, timestamps, provider selection); no message text.

See also: - README.Files/SmrtHub-vNext-Architecture/Plans/Smrt.Chat.Core.plan.md