@tpmjs/tools-csp-compose
Compose a Content Security Policy header from directive configurations
Test @tpmjs/tools-csp-compose (cspComposeTool) with AI-powered execution
0/2000 characters
Install this tool and use it with the AI SDK
npm install @tpmjs/tools-csp-composepnpm add @tpmjs/tools-csp-composeyarn add @tpmjs/tools-csp-composebun add @tpmjs/tools-csp-composedeno add npm:@tpmjs/tools-csp-composeimport { cspComposeTool } from '@tpmjs/tools-csp-compose';import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { cspComposeTool } from '@tpmjs/tools-csp-compose';
const result = await generateText({
model: openai('gpt-4o'),
tools: { cspComposeTool },
prompt: 'Your prompt here...',
});
console.log(result.text);(policies: Record<string, unknown>) => Promise<unknown>Available configuration options
policiesobjectCSP directives mapped to source arrays
Schema extracted: 3/1/2026, 4:29:11 AM
ERROR: No README data found!
Downloads/month
60
GitHub Stars
0
Quality Score