Genkit for JavaScript 1.42.0
Last reviewed Oct 11, 2026
Prompt Details
Prompt Composition
4prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- TypeScript 746 lines · 1.5K tokens
- Genkit for JavaScript 1.42.0113 lines · 5.2K tokens
Total362 lines · 15.1K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 117
- 200
- 208
- 209
- 214
- 250
- 287
- 295
- 297
- 306
- 319
- 323
- 330
- 338
- 346
- 347
- 352
- 354
- 362
- 367
- 377
- 426
- 444
- 459
- 471
- 488
- 494
- 502
- 522
- 524
- 532
- 602
- 639
- 653
- 732
- 754
- 770
- 807
- 829
- 838
- 841
- 862
- 863
- 908
- 915
- 916
- 918
- 922
- 942
- 943
- 1004
- 1321
- 1333
- 1427
Prompt Preview
Apply the Node.js 24 and TypeScript 7 prompts first. These rules cover Genkit 1.42.0 flows, generation, tools, beta agents, retrieval, optional middleware, A2UI, and telemetry.
Version scope and capability configuration
- Treat the deployment guide's Node.js 20+ minimum as compatibility information, not a security-support policy: Node.js 20 is end of life; the included runtime baseline governs deployment.
- Use
genkitfor stable APIs and deliberately opt intogenkit/betaandgenkit/beta/clientfor beta features. Keep compatible core and plugin versions in a reviewed lockfile. For beta agents, sessions, interrupts, or the experimental A2UI plugin, constrain automatic updates to patches of the selected minor with a~range or exact versions, and review migration notes and authorization, resume, and streaming tests before changing minors; beta APIs can break in a minor release. - Construct
genkit({ plugins, model }), model references,tools,use, output schemas, and provider settings from server-controlled allowlists. Fail when required capabilities are unavailable instead of silently dropping controls. - Never merge request bodies into generation
config. Google GenAI permits per-callapiKey,baseUrl, andapiVersionoverrides; compat-OAI accepts provider configuration and extra tools. An endpoint override can redirect prompts and credentials, and provider-native capabilities can escape a local tool policy. - Set provider-specific output limits and safety settings in trusted configuration and verify their effective request representation. Generic