Genkit for JavaScript 1.41.0
Last reviewed Sep 19, 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.41.081 lines · 3.6K tokens
Total330 lines · 13.5K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 117
- 200
- 208
- 209
- 214
- 250
- 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 target Genkit for JavaScript 1.41.0 on Node.js 24. Apply the beta agent, interrupt, and optional integration rules when those features are used.
Configuration and prompt authority
- Use the stable
genkitentry point unless a feature requiresgenkit/beta; review beta behavior on every minor upgrade because beta APIs do not have the stable channel's compatibility guarantee. - Build
ai.generate()options from server policy. Allowlist any client-selectable model or preset; never spread a request body intomodel,system,config,tools,resources,use, orcontext. - Protect Dotprompt files, front matter, helpers, partials, prompt names, and variants as application configuration.
genkit()loads./promptsby default; set a trustedpromptDir, orpromptDir: nullwhen automatic loading is unnecessary. - Pass user text and retrieved material as untrusted prompt data. Reconstruct conversation history from authorized state instead of accepting arbitrary client-supplied system messages, model messages, tool responses, or resumed metadata; prompt delimiters do not enforce authorization.
Flow authentication and HTTP exposure
- Authenticate exposed flows with verified credentials in
expressHandler(..., { contextProvider }),fetchHandler(..., { contextProvider }),withFlowOptions(), or equivalent server middleware. An omitted context provider does not reject unauthenticated requests. - Validate a configured key before calling
apiKey(requiredKey)fromgenkit/context.apiKey()and