Genkit for Dart 0.16.1

Last reviewed Sep 20, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Dart 3.13109 lines · 2.9K tokens
  2. Genkit for Dart 0.16.1117 lines · 4.9K tokens
Total226 lines · 7.8K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 78
  • 79
  • 201
  • 209
  • 287
  • 295
  • 306
  • 319
  • 323
  • 338
  • 362
  • 367
  • 377
  • 426
  • 532
  • 602
  • 636
  • 639
  • 704
  • 770
  • 772
  • 798
  • 807
  • 862
  • 863
  • 915
  • 918
  • 922
  • 940
  • 942
  • 1333
  • 1395
  • 1426
  • 1427

Prompt Preview

Apply the Dart 3.13 prompt first. These rules cover Genkit for Dart 0.16.1 and the Shelf, middleware, session-store, MCP, and experimental A2UI integrations shipped with its release tag.

Version and runtime scope

  • Lock genkit and its companion packages in pubspec.lock, and review each resolved version on upgrade: genkit_shelf, genkit_middleware, genkit_google_cloud, genkit_mcp, genkit_a2ui, and schemantic are versioned independently of the core package, so upgrading genkit doesn't move them. These rules compose with the Dart 3.13 baseline; the package declares Dart >=3.10.0 <4.0.0.
  • Treat the Genkit Dart SDK's Preview status and A2UI's experimental status as compatibility boundaries; verify tools, transports, serializers, and provider behavior against the exact locked packages before upgrading.
  • Accept the context parameter in custom AgentTransport.getSnapshot and abort overrides and forward it, just as turns, polling, and store notifications do; a dropped context makes a context-scoped store such as FirestoreSessionStore with snapshotPathPrefix fall back to the shared global prefix instead of the tenant's.
  • Use ActionType.tool and /tool.v2/<name> for the multipart tool contract; allowlist action types and names even though ActionType permits arbitrary string values.

Shelf endpoints and authenticated context

  • Expose an explicit action allowlist through reviewed Shelf routes; startFlowServer binds InternetAddress.anyIPv4 on port 3400 by default despite printing a localhost URL, and plain flow/action entries receive no