Path: redb-route/redb.Route.Llm/Storage/Redb/Schemas/ToolAuditProps.cs Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.Llm/Storage/Redb/Schemas/ToolAuditProps.cs ---- using redb.Core.Attributes; namespace redb.Route.Llm.Storage.Redb.Schemas; /// /// One row per tool invocation, written by the audit observer. The scheme is built around the dimensions /// every audit dashboard slices by — , , /// , . /// /// Two different filters, and they cost differently. WhereRedb narrows by OBJECT rows — the columns /// of _objects (id, name, value_*, parent, dates) — which is the fast path, on the owner's /// measurements an order of magnitude faster. Where narrows by VALUES: a props-typed predicate /// resolves through the values table. Both are server-side; the second merely pays for the extra table. /// A dashboard that needs cheap slicing by tool therefore rides a base field — which is why the row /// name leads with the tool name (WhereRedb(o => o.Name.Contains(tool))), and a base filter /// combines with a props predicate in one chain — WhereRedb(...).Where(...), cheap clause first. /// /// [RedbScheme("LLM Tool Audit")] public class ToolAuditProps { /// Owning conversation. public string ConversationId { get; set; } = string.Empty; /// Message id this audit is attached to (the tool-use message). public string? MessageId { get; set; } /// Tool that was invoked. public string ToolName { get; set; } = string.Empty; /// Tool-use id from the model response. public string ToolUseId { get; set; } = string.Empty; /// When the invocation started. public DateTimeOffset InvokedAtUtc { get; set; } /// Wall-clock duration in milliseconds. public int DurationMs { get; set; } /// Outcome bucket: "success" / "error" / "skipped" / "denied". public string Outcome { get; set; } = string.Empty; /// Reason text when is "skipped" / "denied". public string? SkipReason { get; set; } /// JSON-serialized tool input as it was dispatched. public string InputJson { get; set; } = "{}"; /// JSON-serialized tool output; null on failure. public string? OutputJson { get; set; } /// Exception message when is "error". public string? ErrorMessage { get; set; } }