Anthropic SDK for TypeScript 0.123
Last reviewed Sep 6, 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
- Anthropic SDK for TypeScript 0.12362 lines · 2.2K tokens
Total311 lines · 12.1K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 116
- 117
- 200
- 208
- 209
- 214
- 250
- 294
- 295
- 297
- 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 @anthropic-ai/sdk 0.123 clients, Messages, tools, streams, files, webhooks, beta resources, and organization administration.
Clients, credentials, and endpoints
- Construct
Anthropiconly in trusted server or worker code. Do not setdangerouslyAllowBrowser: truewith an API key or other reusable credential. - Select one authentication mechanism deliberately. API-key strings and
authTokenvalues, including environment defaults, take precedence overcredentialsandconfig; setapiKey: nullandauthToken: nullwhen selecting those providers. Automatic resolution can read environment variables and local profile/config files. - Treat credential-file locations, profile names, resolved
base_urlvalues, and configuration contents as deployment policy. Require restrictive ownership and permissions, and separately allowlist the HTTPS API and token-exchange origins: a profile'sbase_urlcan select the token endpoint even whenbaseURLoverrides the API host. - Keep
baseURL,defaultHeaders, per-requestheaders,defaultQuery, customfetch,fetchOptions, andmiddlewareout of request-controlled data; each can redirect requests, inject authorization context, or observe secrets and content. - Use separate credentials, organization/workspace scope, quotas, and spend limits per environment and tenant boundary. Never reuse an organization administration credential for ordinary Messages calls.
- Bind
anthropic-workspace-idandanthropic-user-profile-idto the authorized tenant