promptguard-sdk 1.5.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/dist/auto.d.ts +1 -2
- package/dist/auto.d.ts.map +1 -1
- package/dist/auto.js +6 -19
- package/dist/auto.js.map +1 -1
- package/dist/client.d.ts +230 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +210 -0
- package/dist/client.js.map +1 -0
- package/dist/guard.d.ts +1 -1
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +7 -5
- package/dist/guard.js.map +1 -1
- package/dist/index.d.ts +4 -224
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -202
- package/dist/index.js.map +1 -1
- package/dist/integrations/langchain.d.ts +1 -5
- package/dist/integrations/langchain.d.ts.map +1 -1
- package/dist/integrations/langchain.js +4 -23
- package/dist/integrations/langchain.js.map +1 -1
- package/dist/integrations/vercel-ai.d.ts +3 -3
- package/dist/integrations/vercel-ai.d.ts.map +1 -1
- package/dist/integrations/vercel-ai.js +6 -23
- package/dist/integrations/vercel-ai.js.map +1 -1
- package/dist/patches/anthropic.d.ts +2 -2
- package/dist/patches/anthropic.d.ts.map +1 -1
- package/dist/patches/anthropic.js +32 -74
- package/dist/patches/anthropic.js.map +1 -1
- package/dist/patches/base.d.ts +20 -0
- package/dist/patches/base.d.ts.map +1 -0
- package/dist/patches/base.js +63 -0
- package/dist/patches/base.js.map +1 -0
- package/dist/patches/bedrock.d.ts +1 -1
- package/dist/patches/bedrock.d.ts.map +1 -1
- package/dist/patches/bedrock.js +28 -69
- package/dist/patches/bedrock.js.map +1 -1
- package/dist/patches/cohere.d.ts +1 -1
- package/dist/patches/cohere.d.ts.map +1 -1
- package/dist/patches/cohere.js +16 -56
- package/dist/patches/cohere.js.map +1 -1
- package/dist/patches/google.d.ts +2 -2
- package/dist/patches/google.d.ts.map +1 -1
- package/dist/patches/google.js +17 -53
- package/dist/patches/google.js.map +1 -1
- package/dist/patches/openai.d.ts +2 -2
- package/dist/patches/openai.d.ts.map +1 -1
- package/dist/patches/openai.js +21 -64
- package/dist/patches/openai.js.map +1 -1
- package/dist/resolve.d.ts +9 -0
- package/dist/resolve.d.ts.map +1 -0
- package/dist/resolve.js +19 -0
- package/dist/resolve.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/package.json +4 -4
package/dist/guard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,YAAY,EAAE,CAAA;IACxB,SAAS,EAAE,OAAO,GAAG,QAAQ,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB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AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAQ;gBAEpB,MAAM,EAAE,iBAAiB;IAOrC,OAAO,CAAC,OAAO;IASf;;;;;OAKG;IACG,IAAI,CACR,QAAQ,EAAE,YAAY,EAAE,EACxB,SAAS,GAAE,OAAO,GAAG,QAAkB,EACvC,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,aAAa,CAAC;CA8B1B"}
|
package/dist/guard.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Guard client
|
|
3
|
+
* Guard client - calls the PromptGuard Guard API for content scanning.
|
|
4
4
|
*
|
|
5
5
|
* Used internally by auto-instrumentation patches and framework
|
|
6
6
|
* integrations. Sends messages to POST /api/v1/guard and returns
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.GuardClient = exports.PromptGuardBlockedError = exports.GuardApiError = exports.GuardDecision = void 0;
|
|
11
|
+
const resolve_1 = require("./resolve");
|
|
12
|
+
const version_1 = require("./version");
|
|
11
13
|
// ---------------------------------------------------------------------------
|
|
12
|
-
// GuardDecision
|
|
14
|
+
// GuardDecision - immutable result object
|
|
13
15
|
// ---------------------------------------------------------------------------
|
|
14
16
|
class GuardDecision {
|
|
15
17
|
constructor(data) {
|
|
@@ -56,16 +58,16 @@ exports.PromptGuardBlockedError = PromptGuardBlockedError;
|
|
|
56
58
|
class GuardClient {
|
|
57
59
|
constructor(config) {
|
|
58
60
|
this.apiKey = config.apiKey;
|
|
59
|
-
const base = (config.baseUrl ??
|
|
61
|
+
const base = (config.baseUrl ?? resolve_1.DEFAULT_BASE_URL).replace(/\/$/, "");
|
|
60
62
|
this.guardUrl = `${base}/guard`;
|
|
61
63
|
this.timeout = config.timeout ?? 10000;
|
|
62
64
|
}
|
|
63
65
|
headers() {
|
|
64
66
|
return {
|
|
65
|
-
|
|
67
|
+
"X-API-Key": this.apiKey,
|
|
66
68
|
"Content-Type": "application/json",
|
|
67
69
|
"X-PromptGuard-SDK": "node-auto",
|
|
68
|
-
"X-PromptGuard-Version":
|
|
70
|
+
"X-PromptGuard-Version": version_1.SDK_VERSION,
|
|
69
71
|
};
|
|
70
72
|
}
|
|
71
73
|
/**
|
package/dist/guard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;
|
|
1
|
+
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,uCAA4C;AAC5C,uCAAuC;AA2CvC,8EAA8E;AAC9E,0CAA0C;AAC1C,8EAA8E;AAE9E,MAAa,aAAa;IASxB,YAAY,IAAgC;QAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,OAAO,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAClC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,CAAC,CAAA;QACtC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAA;QAClC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,CAAA;QAC9C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,CAAA;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,UAAU,IAAI,CAAC,CAAA;IACvC,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,KAAK,OAAO,CAAA;IAClC,CAAC;I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,MAAM,IAAI,CAAC,IAAI,EAAE,CAAsB,CAAA;QACrD,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;CACF;AA9DD,kCA8DC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Drop-in security for AI applications.
|
|
5
5
|
*
|
|
6
|
-
* **Option 1
|
|
6
|
+
* **Option 1 - Auto-instrumentation (recommended)**
|
|
7
7
|
* @example
|
|
8
8
|
* ```ts
|
|
9
9
|
* import { init } from 'promptguard-sdk';
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* // All LLM calls are now secured automatically.
|
|
12
12
|
* ```
|
|
13
13
|
*
|
|
14
|
-
* **Option 2
|
|
14
|
+
* **Option 2 - Proxy mode**
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts
|
|
17
17
|
* import { PromptGuard } from 'promptguard-sdk';
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* const response = await pg.chat.completions.create({ ... });
|
|
20
20
|
* ```
|
|
21
21
|
*
|
|
22
|
-
* **Option 3
|
|
22
|
+
* **Option 3 - Framework integrations**
|
|
23
23
|
* @example
|
|
24
24
|
* ```ts
|
|
25
25
|
* import { PromptGuardCallbackHandler } from 'promptguard-sdk/integrations/langchain';
|
|
@@ -27,228 +27,8 @@
|
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
29
|
export { type InitOptions, init, shutdown } from "./auto";
|
|
30
|
+
export { default, PromptGuard, PromptGuardError } from "./client";
|
|
30
31
|
export { GuardApiError, GuardClient, type GuardClientConfig, type GuardContext, GuardDecision, type GuardMessage, type GuardRequestBody, type GuardResponseBody, PromptGuardBlockedError, type ThreatDetail, } from "./guard";
|
|
31
32
|
export { PromptGuardCallbackHandler } from "./integrations/langchain";
|
|
32
33
|
export { promptGuardMiddleware } from "./integrations/vercel-ai";
|
|
33
|
-
export interface PromptGuardConfig {
|
|
34
|
-
apiKey: string;
|
|
35
|
-
baseUrl?: string;
|
|
36
|
-
timeout?: number;
|
|
37
|
-
maxRetries?: number;
|
|
38
|
-
retryDelay?: number;
|
|
39
|
-
}
|
|
40
|
-
export interface Message {
|
|
41
|
-
role: "system" | "user" | "assistant";
|
|
42
|
-
content: string;
|
|
43
|
-
}
|
|
44
|
-
export interface ChatCompletionRequest {
|
|
45
|
-
model: string;
|
|
46
|
-
messages: Message[];
|
|
47
|
-
temperature?: number;
|
|
48
|
-
maxTokens?: number;
|
|
49
|
-
stream?: boolean;
|
|
50
|
-
[key: string]: unknown;
|
|
51
|
-
}
|
|
52
|
-
export interface ChatCompletionResponse {
|
|
53
|
-
id: string;
|
|
54
|
-
object: string;
|
|
55
|
-
created: number;
|
|
56
|
-
model: string;
|
|
57
|
-
choices: Array<{
|
|
58
|
-
index: number;
|
|
59
|
-
message: Message;
|
|
60
|
-
finish_reason: string;
|
|
61
|
-
}>;
|
|
62
|
-
usage?: {
|
|
63
|
-
prompt_tokens: number;
|
|
64
|
-
completion_tokens: number;
|
|
65
|
-
total_tokens: number;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export interface SecurityScanResult {
|
|
69
|
-
blocked: boolean;
|
|
70
|
-
decision: "allow" | "block" | "redact";
|
|
71
|
-
reason?: string;
|
|
72
|
-
threatType?: string;
|
|
73
|
-
confidence?: number;
|
|
74
|
-
}
|
|
75
|
-
export interface RedactResult {
|
|
76
|
-
original: string;
|
|
77
|
-
redacted: string;
|
|
78
|
-
piiFound: string[];
|
|
79
|
-
}
|
|
80
|
-
export interface CompletionRequest {
|
|
81
|
-
model: string;
|
|
82
|
-
prompt: string;
|
|
83
|
-
temperature?: number;
|
|
84
|
-
maxTokens?: number;
|
|
85
|
-
[key: string]: unknown;
|
|
86
|
-
}
|
|
87
|
-
export interface CompletionResponse {
|
|
88
|
-
id: string;
|
|
89
|
-
object: string;
|
|
90
|
-
created: number;
|
|
91
|
-
model: string;
|
|
92
|
-
choices: Array<{
|
|
93
|
-
text: string;
|
|
94
|
-
index: number;
|
|
95
|
-
finish_reason: string;
|
|
96
|
-
}>;
|
|
97
|
-
usage?: {
|
|
98
|
-
prompt_tokens: number;
|
|
99
|
-
completion_tokens: number;
|
|
100
|
-
total_tokens: number;
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
export interface EmbeddingRequest {
|
|
104
|
-
model: string;
|
|
105
|
-
input: string | string[];
|
|
106
|
-
[key: string]: unknown;
|
|
107
|
-
}
|
|
108
|
-
export interface EmbeddingResponse {
|
|
109
|
-
object: string;
|
|
110
|
-
data: Array<{
|
|
111
|
-
object: string;
|
|
112
|
-
embedding: number[];
|
|
113
|
-
index: number;
|
|
114
|
-
}>;
|
|
115
|
-
model: string;
|
|
116
|
-
usage?: {
|
|
117
|
-
prompt_tokens: number;
|
|
118
|
-
total_tokens: number;
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
declare class ChatCompletions {
|
|
122
|
-
private client;
|
|
123
|
-
constructor(client: PromptGuard);
|
|
124
|
-
create(params: ChatCompletionRequest): Promise<ChatCompletionResponse>;
|
|
125
|
-
}
|
|
126
|
-
declare class Chat {
|
|
127
|
-
completions: ChatCompletions;
|
|
128
|
-
constructor(client: PromptGuard);
|
|
129
|
-
}
|
|
130
|
-
declare class Completions {
|
|
131
|
-
private client;
|
|
132
|
-
constructor(client: PromptGuard);
|
|
133
|
-
create(params: CompletionRequest): Promise<CompletionResponse>;
|
|
134
|
-
}
|
|
135
|
-
declare class Embeddings {
|
|
136
|
-
private client;
|
|
137
|
-
constructor(client: PromptGuard);
|
|
138
|
-
create(params: EmbeddingRequest): Promise<EmbeddingResponse>;
|
|
139
|
-
}
|
|
140
|
-
declare class Security {
|
|
141
|
-
private client;
|
|
142
|
-
constructor(client: PromptGuard);
|
|
143
|
-
scan(content: string, type?: "prompt" | "response"): Promise<SecurityScanResult>;
|
|
144
|
-
redact(content: string, piiTypes?: string[]): Promise<RedactResult>;
|
|
145
|
-
}
|
|
146
|
-
export interface ScrapeResult {
|
|
147
|
-
url: string;
|
|
148
|
-
status: "safe" | "blocked";
|
|
149
|
-
content: string;
|
|
150
|
-
threats_detected: string[];
|
|
151
|
-
message?: string;
|
|
152
|
-
}
|
|
153
|
-
declare class Scrape {
|
|
154
|
-
private client;
|
|
155
|
-
constructor(client: PromptGuard);
|
|
156
|
-
url(url: string, options?: {
|
|
157
|
-
renderJs?: boolean;
|
|
158
|
-
extractText?: boolean;
|
|
159
|
-
timeout?: number;
|
|
160
|
-
}): Promise<ScrapeResult>;
|
|
161
|
-
batch(urls: string[], options?: Record<string, unknown>): Promise<{
|
|
162
|
-
job_id: string;
|
|
163
|
-
}>;
|
|
164
|
-
}
|
|
165
|
-
export interface ToolValidationResult {
|
|
166
|
-
allowed: boolean;
|
|
167
|
-
risk_score: number;
|
|
168
|
-
risk_level: string;
|
|
169
|
-
reason: string;
|
|
170
|
-
warnings: string[];
|
|
171
|
-
blocked_reasons: string[];
|
|
172
|
-
}
|
|
173
|
-
declare class Agent {
|
|
174
|
-
private client;
|
|
175
|
-
constructor(client: PromptGuard);
|
|
176
|
-
validateTool(agentId: string, toolName: string, args: Record<string, unknown>, sessionId?: string): Promise<ToolValidationResult>;
|
|
177
|
-
stats(agentId: string): Promise<Record<string, unknown>>;
|
|
178
|
-
}
|
|
179
|
-
export interface RedTeamTestResult {
|
|
180
|
-
test_name: string;
|
|
181
|
-
prompt: string;
|
|
182
|
-
decision: string;
|
|
183
|
-
reason: string;
|
|
184
|
-
threat_type?: string;
|
|
185
|
-
confidence: number;
|
|
186
|
-
blocked: boolean;
|
|
187
|
-
details: Record<string, unknown>;
|
|
188
|
-
}
|
|
189
|
-
export interface RedTeamSummary {
|
|
190
|
-
total_tests: number;
|
|
191
|
-
blocked: number;
|
|
192
|
-
allowed: number;
|
|
193
|
-
block_rate: number;
|
|
194
|
-
results: RedTeamTestResult[];
|
|
195
|
-
}
|
|
196
|
-
export interface AutonomousRedTeamRequest {
|
|
197
|
-
budget?: number;
|
|
198
|
-
target_preset?: string;
|
|
199
|
-
enabled_detectors?: string[];
|
|
200
|
-
}
|
|
201
|
-
export interface AutonomousRedTeamReport {
|
|
202
|
-
grade: string;
|
|
203
|
-
bypass_rate: number;
|
|
204
|
-
total_attempts: number;
|
|
205
|
-
bypasses_found: number;
|
|
206
|
-
bypasses: Array<Record<string, unknown>>;
|
|
207
|
-
recommendations: string[];
|
|
208
|
-
}
|
|
209
|
-
export interface IntelligenceStats {
|
|
210
|
-
total_patterns: number;
|
|
211
|
-
by_category: Record<string, number>;
|
|
212
|
-
by_severity: Record<string, number>;
|
|
213
|
-
recent_discoveries: number;
|
|
214
|
-
}
|
|
215
|
-
declare class RedTeam {
|
|
216
|
-
private client;
|
|
217
|
-
private base;
|
|
218
|
-
constructor(client: PromptGuard);
|
|
219
|
-
listTests(): Promise<{
|
|
220
|
-
total: number;
|
|
221
|
-
tests: Array<Record<string, unknown>>;
|
|
222
|
-
}>;
|
|
223
|
-
runTest(testName: string, targetPreset?: string): Promise<RedTeamTestResult>;
|
|
224
|
-
runAll(targetPreset?: string): Promise<RedTeamSummary>;
|
|
225
|
-
runCustom(prompt: string, targetPreset?: string): Promise<RedTeamTestResult>;
|
|
226
|
-
/**
|
|
227
|
-
* Run the autonomous red team agent.
|
|
228
|
-
*
|
|
229
|
-
* Uses LLM-powered mutation to discover novel attack vectors
|
|
230
|
-
* that bypass the current policy configuration.
|
|
231
|
-
*/
|
|
232
|
-
runAutonomous(options?: AutonomousRedTeamRequest): Promise<AutonomousRedTeamReport>;
|
|
233
|
-
/** Get statistics from the Attack Intelligence DB. */
|
|
234
|
-
intelligenceStats(): Promise<IntelligenceStats>;
|
|
235
|
-
}
|
|
236
|
-
export declare class PromptGuard {
|
|
237
|
-
private config;
|
|
238
|
-
chat: Chat;
|
|
239
|
-
completions: Completions;
|
|
240
|
-
embeddings: Embeddings;
|
|
241
|
-
security: Security;
|
|
242
|
-
scrape: Scrape;
|
|
243
|
-
agent: Agent;
|
|
244
|
-
redteam: RedTeam;
|
|
245
|
-
constructor(config: PromptGuardConfig);
|
|
246
|
-
request<T>(method: string, path: string, body?: unknown): Promise<T>;
|
|
247
|
-
}
|
|
248
|
-
export declare class PromptGuardError extends Error {
|
|
249
|
-
code: string;
|
|
250
|
-
statusCode: number;
|
|
251
|
-
constructor(message: string, code: string, statusCode: number);
|
|
252
|
-
}
|
|
253
|
-
export default PromptGuard;
|
|
254
34
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAAE,KAAK,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEzD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAAE,KAAK,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEzD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEjE,OAAO,EACL,aAAa,EACb,WAAW,EACX,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,KAAK,YAAY,GAClB,MAAM,SAAS,CAAA;AAGhB,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Drop-in security for AI applications.
|
|
6
6
|
*
|
|
7
|
-
* **Option 1
|
|
7
|
+
* **Option 1 - Auto-instrumentation (recommended)**
|
|
8
8
|
* @example
|
|
9
9
|
* ```ts
|
|
10
10
|
* import { init } from 'promptguard-sdk';
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* // All LLM calls are now secured automatically.
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
|
-
* **Option 2
|
|
15
|
+
* **Option 2 - Proxy mode**
|
|
16
16
|
* @example
|
|
17
17
|
* ```ts
|
|
18
18
|
* import { PromptGuard } from 'promptguard-sdk';
|
|
@@ -20,19 +20,27 @@
|
|
|
20
20
|
* const response = await pg.chat.completions.create({ ... });
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
|
-
* **Option 3
|
|
23
|
+
* **Option 3 - Framework integrations**
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
26
26
|
* import { PromptGuardCallbackHandler } from 'promptguard-sdk/integrations/langchain';
|
|
27
27
|
* import { promptGuardMiddleware } from 'promptguard-sdk/integrations/vercel-ai';
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
|
+
};
|
|
30
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.
|
|
34
|
+
exports.promptGuardMiddleware = exports.PromptGuardCallbackHandler = exports.PromptGuardBlockedError = exports.GuardDecision = exports.GuardClient = exports.GuardApiError = exports.PromptGuardError = exports.PromptGuard = exports.default = exports.shutdown = exports.init = void 0;
|
|
32
35
|
// Auto-instrumentation
|
|
33
36
|
var auto_1 = require("./auto");
|
|
34
37
|
Object.defineProperty(exports, "init", { enumerable: true, get: function () { return auto_1.init; } });
|
|
35
38
|
Object.defineProperty(exports, "shutdown", { enumerable: true, get: function () { return auto_1.shutdown; } });
|
|
39
|
+
// Proxy client
|
|
40
|
+
var client_1 = require("./client");
|
|
41
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(client_1).default; } });
|
|
42
|
+
Object.defineProperty(exports, "PromptGuard", { enumerable: true, get: function () { return client_1.PromptGuard; } });
|
|
43
|
+
Object.defineProperty(exports, "PromptGuardError", { enumerable: true, get: function () { return client_1.PromptGuardError; } });
|
|
36
44
|
// Guard client (standalone scanning)
|
|
37
45
|
var guard_1 = require("./guard");
|
|
38
46
|
Object.defineProperty(exports, "GuardApiError", { enumerable: true, get: function () { return guard_1.GuardApiError; } });
|
|
@@ -44,202 +52,4 @@ var langchain_1 = require("./integrations/langchain");
|
|
|
44
52
|
Object.defineProperty(exports, "PromptGuardCallbackHandler", { enumerable: true, get: function () { return langchain_1.PromptGuardCallbackHandler; } });
|
|
45
53
|
var vercel_ai_1 = require("./integrations/vercel-ai");
|
|
46
54
|
Object.defineProperty(exports, "promptGuardMiddleware", { enumerable: true, get: function () { return vercel_ai_1.promptGuardMiddleware; } });
|
|
47
|
-
const RETRYABLE_STATUS_CODES = new Set([429, 500, 502, 503, 504]);
|
|
48
|
-
class ChatCompletions {
|
|
49
|
-
constructor(client) {
|
|
50
|
-
this.client = client;
|
|
51
|
-
}
|
|
52
|
-
async create(params) {
|
|
53
|
-
return this.client.request("POST", "/chat/completions", params);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
class Chat {
|
|
57
|
-
constructor(client) {
|
|
58
|
-
this.completions = new ChatCompletions(client);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
class Completions {
|
|
62
|
-
constructor(client) {
|
|
63
|
-
this.client = client;
|
|
64
|
-
}
|
|
65
|
-
async create(params) {
|
|
66
|
-
return this.client.request("POST", "/completions", params);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
class Embeddings {
|
|
70
|
-
constructor(client) {
|
|
71
|
-
this.client = client;
|
|
72
|
-
}
|
|
73
|
-
async create(params) {
|
|
74
|
-
return this.client.request("POST", "/embeddings", params);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
class Security {
|
|
78
|
-
constructor(client) {
|
|
79
|
-
this.client = client;
|
|
80
|
-
}
|
|
81
|
-
async scan(content, type = "prompt") {
|
|
82
|
-
return this.client.request("POST", "/security/scan", {
|
|
83
|
-
content,
|
|
84
|
-
type,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
async redact(content, piiTypes) {
|
|
88
|
-
return this.client.request("POST", "/security/redact", {
|
|
89
|
-
content,
|
|
90
|
-
pii_types: piiTypes,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
class Scrape {
|
|
95
|
-
constructor(client) {
|
|
96
|
-
this.client = client;
|
|
97
|
-
}
|
|
98
|
-
async url(url, options) {
|
|
99
|
-
return this.client.request("POST", "/scrape", {
|
|
100
|
-
url,
|
|
101
|
-
render_js: options?.renderJs ?? false,
|
|
102
|
-
extract_text: options?.extractText ?? true,
|
|
103
|
-
timeout: options?.timeout ?? 30,
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
async batch(urls, options) {
|
|
107
|
-
return this.client.request("POST", "/scrape/batch", {
|
|
108
|
-
urls,
|
|
109
|
-
...options,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
class Agent {
|
|
114
|
-
constructor(client) {
|
|
115
|
-
this.client = client;
|
|
116
|
-
}
|
|
117
|
-
async validateTool(agentId, toolName, args, sessionId) {
|
|
118
|
-
return this.client.request("POST", "/agent/validate-tool", {
|
|
119
|
-
agent_id: agentId,
|
|
120
|
-
tool_name: toolName,
|
|
121
|
-
arguments: args,
|
|
122
|
-
session_id: sessionId,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
async stats(agentId) {
|
|
126
|
-
return this.client.request("GET", `/agent/${agentId}/stats`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
class RedTeam {
|
|
130
|
-
constructor(client) {
|
|
131
|
-
this.base = "/internal/redteam";
|
|
132
|
-
this.client = client;
|
|
133
|
-
}
|
|
134
|
-
async listTests() {
|
|
135
|
-
return this.client.request("GET", `${this.base}/tests`);
|
|
136
|
-
}
|
|
137
|
-
async runTest(testName, targetPreset = "default") {
|
|
138
|
-
return this.client.request("POST", `${this.base}/test/${testName}`, {
|
|
139
|
-
target_preset: targetPreset,
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
async runAll(targetPreset = "default") {
|
|
143
|
-
return this.client.request("POST", `${this.base}/test-all`, {
|
|
144
|
-
target_preset: targetPreset,
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
async runCustom(prompt, targetPreset = "default") {
|
|
148
|
-
return this.client.request("POST", `${this.base}/test-custom`, {
|
|
149
|
-
custom_prompt: prompt,
|
|
150
|
-
target_preset: targetPreset,
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Run the autonomous red team agent.
|
|
155
|
-
*
|
|
156
|
-
* Uses LLM-powered mutation to discover novel attack vectors
|
|
157
|
-
* that bypass the current policy configuration.
|
|
158
|
-
*/
|
|
159
|
-
async runAutonomous(options) {
|
|
160
|
-
return this.client.request("POST", `${this.base}/autonomous`, {
|
|
161
|
-
budget: options?.budget ?? 100,
|
|
162
|
-
target_preset: options?.target_preset ?? "default",
|
|
163
|
-
...(options?.enabled_detectors && { enabled_detectors: options.enabled_detectors }),
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
/** Get statistics from the Attack Intelligence DB. */
|
|
167
|
-
async intelligenceStats() {
|
|
168
|
-
return this.client.request("GET", `${this.base}/intelligence/stats`);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
class PromptGuard {
|
|
172
|
-
constructor(config) {
|
|
173
|
-
const apiKey = config.apiKey ?? process.env.PROMPTGUARD_API_KEY;
|
|
174
|
-
if (!apiKey) {
|
|
175
|
-
throw new Error("API key required. Pass apiKey in config or set PROMPTGUARD_API_KEY environment variable.");
|
|
176
|
-
}
|
|
177
|
-
this.config = {
|
|
178
|
-
apiKey,
|
|
179
|
-
baseUrl: config.baseUrl ??
|
|
180
|
-
process.env.PROMPTGUARD_BASE_URL ??
|
|
181
|
-
"https://api.promptguard.co/api/v1/proxy",
|
|
182
|
-
timeout: config.timeout ?? 30000,
|
|
183
|
-
maxRetries: config.maxRetries ?? 3,
|
|
184
|
-
retryDelay: config.retryDelay ?? 1000,
|
|
185
|
-
};
|
|
186
|
-
// OpenAI-compatible
|
|
187
|
-
this.chat = new Chat(this);
|
|
188
|
-
this.completions = new Completions(this);
|
|
189
|
-
this.embeddings = new Embeddings(this);
|
|
190
|
-
// PromptGuard-specific
|
|
191
|
-
this.security = new Security(this);
|
|
192
|
-
this.scrape = new Scrape(this);
|
|
193
|
-
this.agent = new Agent(this);
|
|
194
|
-
this.redteam = new RedTeam(this);
|
|
195
|
-
}
|
|
196
|
-
async request(method, path, body) {
|
|
197
|
-
const url = `${this.config.baseUrl}${path}`;
|
|
198
|
-
let lastError;
|
|
199
|
-
for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {
|
|
200
|
-
try {
|
|
201
|
-
const response = await fetch(url, {
|
|
202
|
-
method,
|
|
203
|
-
headers: {
|
|
204
|
-
Authorization: `Bearer ${this.config.apiKey}`,
|
|
205
|
-
"Content-Type": "application/json",
|
|
206
|
-
"X-PromptGuard-SDK": "node",
|
|
207
|
-
"X-PromptGuard-Version": "1.3.0",
|
|
208
|
-
},
|
|
209
|
-
body: body ? JSON.stringify(body) : undefined,
|
|
210
|
-
signal: AbortSignal.timeout(this.config.timeout),
|
|
211
|
-
});
|
|
212
|
-
if (RETRYABLE_STATUS_CODES.has(response.status) && attempt < this.config.maxRetries) {
|
|
213
|
-
await new Promise((r) => setTimeout(r, this.config.retryDelay * 2 ** attempt));
|
|
214
|
-
continue;
|
|
215
|
-
}
|
|
216
|
-
if (!response.ok) {
|
|
217
|
-
const errorBody = (await response.json().catch(() => ({})));
|
|
218
|
-
throw new PromptGuardError(errorBody.error?.message || "Request failed", errorBody.error?.code || "UNKNOWN", response.status);
|
|
219
|
-
}
|
|
220
|
-
return response.json();
|
|
221
|
-
}
|
|
222
|
-
catch (err) {
|
|
223
|
-
if (err instanceof PromptGuardError)
|
|
224
|
-
throw err;
|
|
225
|
-
lastError = err;
|
|
226
|
-
if (attempt < this.config.maxRetries) {
|
|
227
|
-
await new Promise((r) => setTimeout(r, this.config.retryDelay * 2 ** attempt));
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
throw lastError ?? new PromptGuardError("Max retries exceeded", "MAX_RETRIES", 0);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
exports.PromptGuard = PromptGuard;
|
|
235
|
-
class PromptGuardError extends Error {
|
|
236
|
-
constructor(message, code, statusCode) {
|
|
237
|
-
super(`${code}: ${message}`);
|
|
238
|
-
this.name = "PromptGuardError";
|
|
239
|
-
this.code = code;
|
|
240
|
-
this.statusCode = statusCode;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
exports.PromptGuardError = PromptGuardError;
|
|
244
|
-
exports.default = PromptGuard;
|
|
245
55
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;;;;AAEH,uBAAuB;AACvB,+BAAyD;AAA9B,4FAAA,IAAI,OAAA;AAAE,gGAAA,QAAQ,OAAA;AACzC,eAAe;AACf,mCAAiE;AAAxD,kHAAA,OAAO,OAAA;AAAE,qGAAA,WAAW,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAC/C,qCAAqC;AACrC,iCAWgB;AAVd,sGAAA,aAAa,OAAA;AACb,oGAAA,WAAW,OAAA;AAGX,sGAAA,aAAa,OAAA;AAIb,gHAAA,uBAAuB,OAAA;AAIzB,uDAAuD;AACvD,sDAAqE;AAA5D,uHAAA,0BAA0B,OAAA;AACnC,sDAAgE;AAAvD,kHAAA,qBAAqB,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* LangChain.js integration
|
|
2
|
+
* LangChain.js integration - PromptGuardCallbackHandler.
|
|
3
3
|
*
|
|
4
4
|
* Implements the LangChain BaseCallbackHandler interface to scan prompts
|
|
5
5
|
* before LLM calls and responses after, with rich context about chains,
|
|
@@ -41,10 +41,6 @@ export declare class PromptGuardCallbackHandler {
|
|
|
41
41
|
handleToolStart(serialized: Record<string, unknown>, input: string, runId: string, parentRunId?: string, tags?: string[], metadata?: Record<string, unknown>): Promise<void>;
|
|
42
42
|
handleToolEnd(output: unknown, runId: string): Promise<void>;
|
|
43
43
|
handleToolError(_error: Error, runId: string): void;
|
|
44
|
-
handleRetrieverStart(..._args: unknown[]): void;
|
|
45
|
-
handleRetrieverEnd(..._args: unknown[]): void;
|
|
46
|
-
handleRetrieverError(..._args: unknown[]): void;
|
|
47
|
-
handleText(..._args: unknown[]): void;
|
|
48
44
|
private safeScan;
|
|
49
45
|
private handleDecision;
|
|
50
46
|
private buildContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"langchain.d.ts","sourceRoot":"","sources":["../../src/integrations/langchain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAEL,KAAK,iBAAiB,EAKvB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"langchain.d.ts","sourceRoot":"","sources":["../../src/integrations/langchain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAEL,KAAK,iBAAiB,EAKvB,MAAM,UAAU,CAAA;AAOjB,MAAM,WAAW,0BAA2B,SAAQ,iB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