Genkit for Dart 0.15.1

Last reviewed Sep 19, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Dart 3.13109 lines · 2.9K tokens
  2. Genkit for Dart 0.15.168 lines · 3.6K tokens
Total177 lines · 6.6K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 78
  • 79
  • 201
  • 209
  • 287
  • 295
  • 306
  • 319
  • 323
  • 338
  • 352
  • 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 0.15.1 on Dart 3.13; its SDK constraint is >=3.10.0 <4.0.0. Optional integration rules refer to genkit_shelf 0.1.11, genkit_middleware 0.5.1, genkit_mcp 0.2.3, and Schemantic 0.2.2 with its 0.1.2 builder. Keep their resolved versions compatible with this release; newer Genkit documentation can describe different APIs and safeguards.

Configuration, prompts, and model authority

  • Construct Genkit, plugins, model references, config, middleware use, and tool selections from trusted application policy. Keep privileged orchestration and provider credentials on a trusted server when callers control the Dart or Flutter client.
  • Set promptDir: null when automatic loading is unnecessary; otherwise point it at an immutable application directory. The default ./prompts loader recursively registers templates, partials, and variants, and .prompt frontmatter can select models, tools, middleware, toolChoice, maxTurns, and returnToolRequests.
  • Keep definePrompt templates, helpers, system instructions, and PromptGenerateOptions overrides under application control. Supply user text as data; do not accept arbitrary messages, roles, tool-request parts, or template source as a public generation interface.
  • Treat retrieved documents, DocumentData metadata, media, tool results, and remembered messages as untrusted content. Authorize documents before embedding or adding them to a model request, enforce tenant filters in the retrieval service, and never interpret retrieved instructions as