Anthropic SDK for TypeScript 0.123

Last reviewed Sep 6, 2026

Export as PDF

Prompt Details

Prompt Composition

4prompts
  1. JavaScript ES2026102 lines · 3.1K tokens
  2. Node.js 24101 lines · 5.3K tokens
  3. TypeScript 746 lines · 1.5K tokens
  4. 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 Anthropic only in trusted server or worker code. Do not set dangerouslyAllowBrowser: true with an API key or other reusable credential.
  • Select one authentication mechanism deliberately. API-key strings and authToken values, including environment defaults, take precedence over credentials and config; set apiKey: null and authToken: null when selecting those providers. Automatic resolution can read environment variables and local profile/config files.
  • Treat credential-file locations, profile names, resolved base_url values, and configuration contents as deployment policy. Require restrictive ownership and permissions, and separately allowlist the HTTPS API and token-exchange origins: a profile's base_url can select the token endpoint even when baseURL overrides the API host.
  • Keep baseURL, defaultHeaders, per-request headers, defaultQuery, custom fetch, fetchOptions, and middleware out 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-id and anthropic-user-profile-id to the authorized tenant