This is a public, read-only report. Striff reads this repository's docs, turns each sentence that makes a claim about the code into a rule, and checks the rule against the code on the default branch. How this works
Each sentence below has a stale name: a type the default branch doesn't declare, or declares somewhere else. Edit the doc so it matches the code, or bring the type back.
GoneProviderComponentHelper
Delegates the menu and serialization to ProviderComponentHelper.
The repository once had src/SmartHopper.Core/ComponentBase/ProviderComponentHelper.cs. It doesn't now. Closest name there: ProviderComponentBase.
GH_AIInputPayload — Wraps an AIInputPayload (a collection of IAIInteraction items with a capability hint and payload type).
2 rules from this sentence
GH_AIInputPayload depends on AIInputPayload
Holds
GH_AIInputPayload depends on IAIInteraction
Holds
GH_AIInputPayload — Wraps an AIInputPayload (a collection of IAIInteraction items with a capability hint and payload type). Persisted as JSON via AIInputPayloadCodec.
AIInputPayloadCodec depends on GH_AIInputPayload
Holds
Provider EnvironmentContextProvider, Source SmartHopper.Core, Data OS, Rhino version, platform
EnvironmentContextProvider is in SmartHopper.Core
Holds
Provider TimeContextProvider, Source SmartHopper.Core, Data Current time and timezone
TimeContextProvider is in SmartHopper.Core
Holds
Provider FileContextProvider, Source SmartHopper.Core, Data Current file, selection, object counts
FileContextProvider is in SmartHopper.Core
Holds
Type CanvasMutationConsentProposal, Responsibility Adapts CanvasChangeReviewSession to consent
CanvasMutationConsentProposal depends on CanvasChangeReviewSession
Holds
McpServerLifecycle is ref-counted: Acquire(object key, McpServerOptions options) starts the shared server for a port when needed.
McpServerLifecycle has an Acquire method
Holds
The user-facing component is SmartHopperMcpServerComponent in src/SmartHopper.Components/Mcp/.
SmartHopperMcpServerComponent is in SmartHopper.Components.Mcp
Holds
Field inputSchema, Source AITool.ParametersSchema, Purpose JSON schema for tool arguments
AITool has a ParametersSchema field
Holds
Field outputSchema, Source AITool.OutputSchema, Purpose JSON schema describing the tool's result payload
AITool has an OutputSchema field
Holds
Field tags, Source AITool.Tags, Purpose Category and behavior tags (e.g., canvas , scripting , read-only , mutating )
AITool has a Tags field
Holds
Field annotations, Source AITool.Annotations, Purpose MCP hints readOnlyHint , destructiveHint , openWorldHint , idempotentHint , title
AITool has an Annotations field
Holds
AIToolMcpAdapter checks the tool exists, then AITool.Enabled, then EnabledTools, then ExposeMutatingTools/AITool.MutatesCanvas and AllowViewControl/AITool.Category.
AIToolMcpAdapter depends on AITool
Holds
AIToolMcpAdapter builds an AIToolCall and invokes it through the configured executor (AIToolCall.Exec() by default).
2 rules from this sentence
AIToolMcpAdapter depends on AIToolCall
Holds
AIToolCall has an Exec method
Holds
The adapter extracts the last AIInteractionToolResult from AIReturn.Body and returns it as the MCP response payload;
AIReturn has Body
Holds
McpServerOptions.BypassMutationsApproval (component input Bypass Edition Validation) flows into MutationInvocationContext.BypassMutationsApproval when the adapter builds the call.
2 rules from this sentence
McpServerOptions has BypassMutationsApproval
Holds
MutationInvocationContext has BypassMutationsApproval
Holds
ConsentGate.RequestAsync short-circuits before presenter resolution when Surface == AIToolSurface.Mcp and the flag is set, returning Approved with every proposal item key — the review dialog is never invoked and undo recording is unaffected.
2 rules from this sentence
ConsentGate has RequestAsync
Holds
AIToolSurface has Mcp
Holds
When argument validation fails (SHRuntimeMessageOrigin.Validation), the MCP error payload includes only the called tool's expectedSchema plus the error message — the full tool catalog is never echoed inside an error response.
SHRuntimeMessageOrigin has Validation
Holds
WebChatUtils.CreateWebChatRequest prepends the internal assistant-core document to every WebChat system prompt before caller/user specialization.
WebChatUtils has CreateWebChatRequest
Holds
Release(object key, int port) stops it when the last holder leaves.
McpServerLifecycle has a Release method
Holds
Find(int port) returns the currently running instance, if any.
resolved at use-time through ProviderManager.GetDefaultAIProvider().
ProviderManager has a GetDefaultAIProvider method
Holds
Provider change is a real input change.InputsChanged() is overridden to add "AIProvider" to the list whenever HasProviderChanged() is true, so the state machine treats it like any other input change.
AIProviderComponentBase has an InputsChanged method
Holds
Custom attributes.CreateAttributes() installs AIProviderComponentAttributes, which renders the provider logo and the small status badge.
AIProviderComponentBase has a CreateAttributes method
Holds
string SelectedProviderName — the literal stored value (may be "Default").
AIProviderComponentBase has SelectedProviderName
Holds
string GetActualAIProviderName() — resolves "Default" through ProviderManager.
AIProviderComponentBase has a GetActualAIProviderName method
Holds
AIProvider GetActualAIProvider() — the concrete provider instance, or null.
AIProviderComponentBase has a GetActualAIProvider method
Holds
void SetSelectedProviderName(string name).
AIProviderComponentBase has a SetSelectedProviderName method
Holds
ProcessingUnit<T> (internal struct in DataTreeProcessor)
ProcessingUnit is a value type
Holds
GH_Path InputPath – original branch path.
ProcessingUnit has InputPath
Holds
int? ItemIndex – index within the branch for item mode;
ProcessingUnit has ItemIndex
Holds
IReadOnlyList<GH_Path> TargetPaths – one or more output paths mapped from this input path.
ProcessingUnit has TargetPaths
Holds
Workers/components choose a topology through ProcessingOptions.Topology, and the runner derives the appropriate schedule internally.
ProcessingOptions has Topology
Holds
AIChatComponent (AIStatefulAsyncComponentBase) — schema not applicable.
Tooltip template. Sets AIProviderComponentAttributes.ProviderTooltipTemplate = "Settings for %provider%" so the badge tooltip reflects the menu's intent.
AIProviderComponentAttributes has ProviderTooltipTemplate
Holds
Inherits directly from GH_Component and implements IProviderComponent.
ProviderComponentBase has a GetActualAIProviderName method
Holds
ProviderComponentBase has a GetActualAIProvider method
Holds
File2AIComponent and Web2AIComponent inherit from AIStatefulAsyncComponentBase so they can perform AI-powered image descriptions through the batch system.
Component Class Text2AIComponent, Nickname Text2AI, Category Text, Description Wraps text input into an AIInputPayload
Text2AIComponent depends on AIInputPayload
Holds
Component Class Json2AIComponent, Nickname Json2AI, Category JSON, Description Wraps JSON data into an AIInputPayload
Json2AIComponent depends on AIInputPayload
Holds
StatefulComponentBase.Write(GH_IWriter) writes current output trees using GHPersistenceService.WriteOutputsV2(). StatefulComponentBase.Read(GH_IReader) reads output trees using GHPersistenceService.ReadOutputsV2() and restores them to the component's outputs.
StatefulComponentBase depends on GHPersistenceService
All output components inherit from AIOutputAdapterBase:
14 rules from this sentence
AI2TextComponent, AI2TextListComponent, AI2MarkdownComponent and 11 more extend AIOutputAdapterBase
Holdsall 14
Fluent builder for constructing and mutating AIBody instances
AIBodyBuilder depends on AIBody
Holds
Create() — static factory for a new empty builder
AIBodyBuilder has a Create method
Holds
FromImmutable(AIBody body) — copy constructor from an existing body;
AIBodyBuilder has a FromImmutable method
Holds
WithToolFilter(string filter) — set the tool filter expression (e.g., -* = disable all, +gh_* = enable Grasshopper tools)
AIBodyBuilder has a WithToolFilter method
Holds
WithContextFilter(string filter) — set the context filter expression for provider injection
AIBodyBuilder has a WithContextFilter method
Holds
WithJsonOutputSchema(string jsonSchema) — set the JSON Schema to instruct providers to produce structured output
AIBodyBuilder has a WithJsonOutputSchema method
Holds
WithTurnId(string turnId) — set the default TurnId applied to interactions lacking one;
AIBodyBuilder has a WithTurnId method
Holds
WithDefaultNewness(bool markAsNew) — set the default newness flag for subsequent Add/Replace operations
AIBodyBuilder has a WithDefaultNewness method
Holds
AsHistory() — convenience method;
AIBodyBuilder has an AsHistory method
Holds
AsNew() — convenience method;
AIBodyBuilder has an AsNew method
Holds
Build() — produce the immutable AIBody record with all accumulated interactions and settings
AIBodyBuilder has a Build method
Holds
SessionId (string, nullable) — filter by session
MetricsFilter has SessionId
Holds
RequestId (string, nullable) — filter by request
MetricsFilter has RequestId
Holds
ToolInvocationId (string, nullable) — filter by tool invocation
MetricsFilter has ToolInvocationId
Holds
EventType (AIMetricsEventType, nullable) — filter by event type
MetricsFilter has EventType
Holds
Timestamp (DateTimeOffset) — when the event occurred
AIMetricsEvent has Timestamp
Holds
EventType (AIMetricsEventType) — type of event
AIMetricsEvent has EventType
Holds
Correlation (MetricsCorrelation) — correlation keys for tracing
AIMetricsEvent has Correlation
Holds
Payload (object) — event-specific data (one of the metric records below)
AIMetricsEvent has Payload
Holds
filter with AIBody.ToolFilter to avoid unintended tool loading;
AIBody has ToolFilter
Holds
The ConversationSession type is the primary orchestrator for multi-turn AI conversations, including automatic tool execution and streaming support. It wraps AIRequestCall.Exec() into a higher-level loop that handles turn limits, tool passes, and observer notifications.
ConversationSession depends on AIRequestCall
Holds
It wraps AIRequestCall.Exec() into a higher-level loop that handles turn limits, tool passes, and observer notifications.
AIRequestCall has an Exec method
Holds
ConversationSession.Stream(...) gates streaming using request validation rules.
ConversationSession has a Stream method
Holds
Both RunToStableResult(...) and Stream(...) delegate to the same internal turn loop;
ConversationSession has a RunToStableResult method
Holds
Both public APIs now delegate to the same internal loop TurnLoopAsync(...) for consistent behavior.
ConversationSession has a TurnLoopAsync method
Holds
Automatic greeting: when the session is constructed with generateGreeting: true, the first RunToStableResult/Stream call is intercepted before validation and routed to GenerateGreetingAsync, which executes the built-in GreetingSpecialTurn (dedicated greeting prompt, provider's default Text2Text model, all tools disabled via OverrideToolFilter = "-*", 30 s timeout, PersistResult).
ConversationSession has GenerateGreetingAsync
Holds
The one-shot flag is cleared after emitting, so callers (e.g., WebChatDialog.InitializeNewConversationAsync) trigger the greeting simply by starting a run — they must not invoke it again.
WebChatDialog has InitializeNewConversationAsync
Holds
Every provider turn allocates one turnId, and all interactions produced during that turn (text, tool calls, tool results, streaming deltas) are stamped with it via InteractionUtility.EnsureTurnId, which overwrites any value already present.
InteractionUtility has EnsureTurnId
Holds
This is required because provider results are built through AIReturn.SetBody(...) → AIBodyBuilder.Build(), which assigns a random TurnId to every interaction lacking one; treating that value as authoritative would put each delta in its own turn (observers key UI messages by TurnId, so this manifests as one bubble per streaming chunk).
2 rules from this sentence
AIReturn has a SetBody method
Holds
AIBodyBuilder has a Build method
Holds
Each run maintains a usage ledger (_runTokensEffective) that meters every completed provider call exactly once at two choke points — ExecProviderAsync (non-streaming) and ProcessStreamingDeltasAsync (streaming, taking the last delta that carries metrics).
2 rules from this sentence
ConversationSession has ExecProviderAsync
Holds
ConversationSession has ProcessStreamingDeltasAsync
Holds
Consumption uses effective tokens (max(actual, estimated) via AIMetrics.EffectiveTotalTokens).
AIMetrics has EffectiveTotalTokens
Holds
Fields: Id, Name, Arguments (JObject)
3 rules from this sentence
AIInteractionToolCall has an Id field
Holds
AIInteractionToolCall has a Name field
Holds
AIInteractionToolCall has an Arguments field
Holds
Methods: ToString() pretty prints name, id and JSON args
Response policies run after the provider call to decode raw JSON, standardize fields, and attach diagnostics via AIReturn.AddRuntimeMessage(...).
AIReturn has an AddRuntimeMessage method
Holds
Policy SchemaAttachRequestPolicy, File Request/SchemaAttachRequestPolicy.cs, Trigger Request, Description Attaches JSON output schema to the request when AIBody.JsonOutputSchema is set Passes schema to provider encoding layer for structured output inference
AIBody has JsonOutputSchema
Holds
Policy SchemaValidateResponsePolicy, File Response/SchemaValidateResponsePolicy.cs, Trigger Response, Description Validates the response against the requested JSON schema (if set) Uses JsonSchemaResponseValidator to check structure Emits validation errors as structured messages via AddRuntimeMessage()
SchemaValidateResponsePolicy depends on JsonSchemaResponseValidator
Holds
These types stay host-side in SmartHopper.Infrastructure and the rest of the application: ProviderManager, ProviderHashVerifier, ProviderClassifier, trust dialogs, signature/hash policy, SmartHopperSettings persistence, secret storage.
4 rules from this sentence
ProviderManager is in SmartHopper.Infrastructure
Holds
ProviderHashVerifier is in SmartHopper.Infrastructure
Holds
ProviderClassifier is in SmartHopper.Infrastructure
Holds
SmartHopperSettings is in SmartHopper.Infrastructure
AIProvider.Call wrapped by RetryPolicy and RedactionPolicy to ensure no sensitive data.
AIProvider has Call
Holds
CanvasButton and AIChatComponent open/reuse the dialog via WebChatUtils.
AIChatComponent depends on WebChatUtils
Holds
Supported via HtmlChatRenderer.RenderInteraction(...) and CSS classes:
HtmlChatRenderer has a RenderInteraction method
Holds
During streaming, assistant token deltas are surfaced via IConversationObserver.OnDelta(...) and aggregated under a constant stream key computed via GetStreamKey();
IConversationObserver has an OnDelta method
Holds
Static utility applied by FileConverterRegistry.ConvertAsync to every successful conversion result, regardless of format
FileConverterRegistry depends on MarkdownListRenumberer
Holds
Static utility applied by FileConverterRegistry.ConvertAsync after MarkdownListRenumberer, to every successful conversion result
FileConverterRegistry depends on MarkdownStyleCleanup
Holds
All converters implement IFileConverter and are registered in FileConverterRegistry:
13 rules from this sentence
PdfConverter, DocxConverter, XlsxConverter and 10 more implement IFileConverter
Converter EmlConverter, File EmlConverter.cs, Extensions .eml, Library MimeKit, Features From/To/Subject/Date, HTML or plain text body, attachment list
EmlConverter imports MimeKit
Holds
Converter UrlConverter, File UrlConverter.cs, Extensions (HTTP/HTTPS URLs), Library HtmlAgilityPack, Features Fetches and converts web pages
UrlConverter imports HtmlAgilityPack
Holds
FileConversionOptions carries behavior flags (table preservation, header/footer removal, image extraction, hyperlinks, footnotes/endnotes, math, inline formatting) to every converter
13 rules from this sentence
PdfConverter, DocxConverter, XlsxConverter and 10 more depend on FileConversionOptions