Namespace Kuestenlogik.Bowire.Ai

Classes

AiSecurityScanSteps

Concrete ISecurityScanSteps for #104 — wires the orchestration engine to the real work: an Microsoft.Extensions.AI.IChatClient drives the threat-model

  • triage + report-summary stages, and an injected ISecurityScanProbeRunner executes the probe stage. Every AI stage degrades to a deterministic default when no model is connected or the model's output can't be parsed, so the pipeline always completes: threat-model → a path heuristic; triage → keep-by-default; report → the deterministic markdown without the AI summary.
BowireAiEndpoints

HTTP API surface for the optional Kuestenlogik.Bowire.Ai package (#25 Phase 2). Three endpoints:

  • GET /api/ai/probe-local -- 300ms probe against Ollama (127.0.0.1:11434) and LM Studio (127.0.0.1:1234). Returns the model list each one advertises so the AI settings UI can offer a 'detected' pick.
  • GET /api/ai/status -- returns the active BowireAiOptions plus whether an Microsoft.Extensions.AI.IChatClient is registered.
  • POST /api/ai/chat -- proxy a chat completion via the registered Microsoft.Extensions.AI.IChatClient. Body shape mirrors a minimal subset of the OpenAI chat-completions request so the workbench's JS can keep one client shape across providers.
BowireAiModuleContribution

Module contribution for the AI assistant / chat surface (#294 Phase E).

BowireAiOptions

Configuration knobs for the optional Kuestenlogik.Bowire.Ai package (#25). Bound from Bowire:Ai; the CLI's --ai-provider / --ai-endpoint / --ai-model / --ai-api-key flags feed the same keys via the in-memory configuration overlay.

BowireAiRuntime

Holds the live AI configuration + the active provider client. The Settings UI (#63) calls Update(BowireAiOptions) to swap provider / endpoint / model at runtime; Kuestenlogik.Bowire.Ai.MutableChatClient wraps this so the singleton Microsoft.Extensions.AI.IChatClient registration always dispatches to the current provider without restarting the host.

BowireAiServiceCollectionExtensions

DI helpers for the optional Kuestenlogik.Bowire.Ai package (#25). Idempotent — re-calling AddBowireAi(IServiceCollection, IConfiguration, Action<BowireAiOptions>?) is a no-op rather than registering a duplicate.

BowireAiUserConfigStore

Reads + writes the per-user AI configuration (ai-config.json) through the IBowireUserStore seam (#28 Phase 2) so the Settings UI (#63) survives restart. Single-user installs land at ~/.bowire/ai-config.json; multi-tenant installs partition by authenticated identity once the SCIM phase ships.

Interfaces

IBowireAiProviderFactory

Plugin seam for AI provider connectors. Each provider package (Kuestenlogik.Bowire.Ai.OpenAi / .Anthropic / .Mcp) registers exactly one implementation against the DI container. The core Kuestenlogik.Bowire.Ai package ships only the Ollama / LM Studio factory and the seam itself — embedded hosts pay only for the providers they install.