UNPKG

@blueprintlabio/prompt-injector

Version:

Experimental TypeScript library for generating AI security test conversations

46 lines 1.36 kB
/** * Core types for the Prompt Injector library * Based on the experimental V0.1 design */ export type AttackIntent = 'data-exfiltration' | 'safety-bypass' | 'privilege-escalation' | 'instruction-override' | 'information-disclosure'; export type ObfuscationLevel = 'none' | 'light' | 'heavy'; export type Timing = 'opener' | 'middle' | 'closer' | 'any'; export interface Turn { message: string; primitive: string; turnNumber: number; technique?: string; } export interface ConversationContext { goal: string; turnNumber: number; previousTurns: Turn[]; strategy: string; } export interface AttackPrimitive { readonly id: string; readonly name: string; readonly description: string; generate(goal: string, context: ConversationContext): Turn; readonly timing: Timing[]; readonly canFollow?: string[]; readonly researchNotes?: string; readonly obfuscationLevel: ObfuscationLevel; readonly targetIntents: AttackIntent[]; } export interface AttackOptions { strategy?: string; maxTurns?: number; preferredPrimitives?: string[]; } export interface AttackConversation { goal: string; strategy: string; turns: Turn[]; metadata: { generatedAt: Date; primitivesUsed: string[]; researchBasis: string[]; }; } //# sourceMappingURL=types.d.ts.map