Ansight.Annotations
1.7.0
dotnet add package Ansight.Annotations --version 1.7.0
NuGet\Install-Package Ansight.Annotations -Version 1.7.0
<PackageReference Include="Ansight.Annotations" Version="1.7.0" />
<PackageVersion Include="Ansight.Annotations" Version="1.7.0" />
<PackageReference Include="Ansight.Annotations" />
paket add Ansight.Annotations --version 1.7.0
#r "nuget: Ansight.Annotations, 1.7.0"
#:package Ansight.Annotations@1.7.0
#addin nuget:?package=Ansight.Annotations&version=1.7.0
#tool nuget:?package=Ansight.Annotations&version=1.7.0
Ansight.Annotations
Debug-only in-app annotation capture for Ansight .NET apps.
Annotate.PresentAsync() uses the annotation engine in the native Android and Apple core packages. It timestamps the request, captures a screenshot and registered visual trees before opening the editor, and seals a versioned .ansightannotation bundle. The native editor supports free draw, undo, clear, and overall feedback text. The bundle is retained in a native outbox until it can be sent over the active host session. The host can infer approximate shapes from free-draw paths.
Ansight and Ansight.Maui include this standalone package. Their default builders register annotation capture automatically for Debug application builds. WithAnnotatedFeedback(...) customizes screenshot and visual-tree capture. A Release application build remains disabled.
Setup
using Ansight;
using Ansight.Annotations;
var options = Options.CreateBuilder()
.WithAnsightSdk()
.Build();
Runtime.InitializeAndActivate(options);
For MAUI, UseAnsight registers the Debug default. Configure it in the callback when needed:
using Ansight.Annotations;
using Ansight.Maui;
builder.UseAnsight<App>(ansight =>
{
ansight.WithAnnotatedFeedback();
});
Trigger the built-in overlay from app UI:
var result = await Annotate.PresentAsync();
Native Android apps can pass the foreground activity explicitly. This is recommended when the app does not use MAUI:
var result = await Annotate.PresentAsync(this);
A host-owned UI can bypass the built-in overlay and submit its own normalized shapes:
var result = await Annotate.CaptureAsync(new AnnotationCaptureRequest
{
Feedback = "The total overlaps the action button.",
Shapes =
[
new AnnotationShape(AnnotationShapeKind.Rectangle, 0.62, 0.74, 0.31, 0.12)
]
});
Hooks and artifacts
Hooks run for the managed Annotate.CaptureAsync(request) path after evidence capture and before its bundle is sealed. The native PresentAsync() path does not currently invoke managed hooks or managed offline sinks.
using System.Text.Json.Nodes;
using Ansight.Annotations;
using Ansight.Artifacts;
sealed class FeedbackContextHook : IAnnotationCaptureHook
{
public ValueTask ContributeAsync(
AnnotationCaptureContext context,
CancellationToken cancellationToken)
{
context.AddCustomData("account", JsonValue.Create("example"));
context.AddArtifact(new AnnotationArtifact(
"Navigation state",
"application/json",
"navigation.json",
ArtifactPayload.FromText("{\"route\":\"/checkout\"}")));
return ValueTask.CompletedTask;
}
}
ansight.WithAnnotatedFeedback(annotations =>
{
annotations.AddHook(new FeedbackContextHook());
});
Use WithEvidencePolicy(...) to deny individual evidence sources. Screenshot, visual-tree provider, hook, artifact, outbox, and destination failures are isolated and represented as results where possible; a missing or disallowed source does not abort the rest of the annotation.
Visual trees and delivery
Annotation capture queries VisualTreeProviderRegistry at capture time and captures every registered source. The built-in native provider is always present. Ansight.Maui also registers the maui provider independently of whether remote tools are enabled.
When the host is connected, the sealed bundle is submitted through the live session. The native PresentAsync() path retains undelivered bundles in a native outbox and retries on reconnection. The managed CaptureAsync(request) path also supports offline-capture sinks, which store bundles under annotations/bundles and append annotations/index.jsonl.
Feedback is obsolete and forwards to Annotate for existing callers.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-android35.0 is compatible. net9.0-browser was computed. net9.0-ios was computed. net9.0-ios18.0 is compatible. net9.0-maccatalyst was computed. net9.0-maccatalyst18.0 is compatible. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Ansight.Core (>= 1.7.0)
- Ansight.Tools.VisualTree (>= 1.7.0)
-
net9.0-android35.0
- Ansight.Core (>= 1.7.0)
- Ansight.Tools.VisualTree (>= 1.7.0)
-
net9.0-ios18.0
- Ansight.Core (>= 1.7.0)
- Ansight.Tools.VisualTree (>= 1.7.0)
-
net9.0-maccatalyst18.0
- Ansight.Core (>= 1.7.0)
- Ansight.Tools.VisualTree (>= 1.7.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Ansight.Annotations:
| Package | Downloads |
|---|---|
|
Ansight
.NET and MAUI SDK for Ansight: runtime evidence from your app for coding agents. Screenshots, visual trees, logs, network, telemetry, and app state, with pairing and remote tools included. |
|
|
Ansight.Maui
All-in-one Ansight SDK package for .NET MAUI apps, including core runtime, pairing, remote tools, automatic lifecycle and page-view telemetry, and MAUI inspection tools. |
|
|
Ansight.OfflineCapture
Offline Ansight capture storage, retention, and export support for .NET apps. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.7.0 | 40 | 10/6/2026 |
| 1.6.3 | 81 | 10/1/2026 |
| 1.6.2 | 95 | 10/1/2026 |
| 1.6.1 | 142 | 9/23/2026 |
| 1.6.0 | 134 | 9/17/2026 |
| 1.5.0 | 141 | 9/14/2026 |
| 1.4.0 | 158 | 9/7/2026 |
| 1.4.0-preview.5 | 117 | 8/26/2026 |
| 1.4.0-preview.3 | 85 | 8/25/2026 |
| 1.4.0-preview.1 | 113 | 8/24/2026 |
| 1.3.0-preview.12 | 91 | 8/24/2026 |
| 1.3.0-preview.11 | 94 | 8/23/2026 |
| 1.3.0-preview.10 | 99 | 8/21/2026 |
| 1.3.0-preview.9 | 92 | 8/20/2026 |
| 1.3.0-preview.8 | 97 | 8/20/2026 |
| 1.3.0-preview.6 | 107 | 8/19/2026 |
| 1.3.0-preview.5 | 97 | 8/19/2026 |
| 1.3.0-preview.4 | 98 | 8/17/2026 |
| 1.3.0-preview.3 | 97 | 8/10/2026 |
| 1.3.0-preview.2 | 86 | 8/10/2026 |