@veroq/sdk 2.1.0 → 2.1.2
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 +34 -2
- package/dist/cjs/agent.js +1 -1
- package/dist/cjs/agent.js.map +1 -1
- package/dist/cjs/cli.js +1 -1
- package/dist/cjs/cli.js.map +1 -1
- package/dist/cjs/client.d.ts +34 -0
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +78 -2
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/middleware.d.ts +46 -0
- package/dist/cjs/middleware.d.ts.map +1 -0
- package/dist/cjs/middleware.js +133 -0
- package/dist/cjs/middleware.js.map +1 -0
- package/dist/cjs/shield.d.ts +63 -2
- package/dist/cjs/shield.d.ts.map +1 -1
- package/dist/cjs/shield.js +113 -5
- package/dist/cjs/shield.js.map +1 -1
- package/dist/esm/agent.js +1 -1
- package/dist/esm/agent.js.map +1 -1
- package/dist/esm/cli.js +1 -1
- package/dist/esm/cli.js.map +1 -1
- package/dist/esm/client.d.ts +34 -0
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +78 -2
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/middleware.d.ts +46 -0
- package/dist/esm/middleware.d.ts.map +1 -0
- package/dist/esm/middleware.js +128 -0
- package/dist/esm/middleware.js.map +1 -0
- package/dist/esm/shield.d.ts +63 -2
- package/dist/esm/shield.d.ts.map +1 -1
- package/dist/esm/shield.js +111 -4
- package/dist/esm/shield.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/shield.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
export interface ShieldOptions {
|
|
20
|
-
/** Source identifier (e.g., "gpt-
|
|
20
|
+
/** Source identifier (e.g., "gpt-5.4", "claude-sonnet-4.6") */
|
|
21
21
|
source?: string;
|
|
22
22
|
/** Agent ID for memory integration */
|
|
23
23
|
agentId?: string;
|
|
@@ -25,6 +25,8 @@ export interface ShieldOptions {
|
|
|
25
25
|
maxClaims?: number;
|
|
26
26
|
/** API key override */
|
|
27
27
|
apiKey?: string;
|
|
28
|
+
/** API base URL override */
|
|
29
|
+
baseUrl?: string;
|
|
28
30
|
/** If true, throws VeroqError when claims are contradicted */
|
|
29
31
|
blockIfUntrusted?: boolean;
|
|
30
32
|
}
|
|
@@ -98,11 +100,70 @@ export declare class ShieldResult {
|
|
|
98
100
|
*
|
|
99
101
|
* // With options
|
|
100
102
|
* const result = await shield(llmOutput, {
|
|
101
|
-
* source: "gpt-
|
|
103
|
+
* source: "gpt-5.4",
|
|
102
104
|
* agentId: "my-bot",
|
|
103
105
|
* blockIfUntrusted: true,
|
|
104
106
|
* });
|
|
105
107
|
* ```
|
|
106
108
|
*/
|
|
107
109
|
export declare function shield(text: string, options?: ShieldOptions): Promise<ShieldResult>;
|
|
110
|
+
export interface CachedShieldOptions {
|
|
111
|
+
/** Maximum entries in the LRU cache (default 500) */
|
|
112
|
+
maxCache?: number;
|
|
113
|
+
/** Time-to-live for cached results in milliseconds (default 3_600_000 = 1 hour) */
|
|
114
|
+
ttlMs?: number;
|
|
115
|
+
/** API key override */
|
|
116
|
+
apiKey?: string;
|
|
117
|
+
/** API base URL override */
|
|
118
|
+
baseUrl?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface CachedShieldStats {
|
|
121
|
+
hits: number;
|
|
122
|
+
misses: number;
|
|
123
|
+
hitRate: number;
|
|
124
|
+
size: number;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Lightweight shield with local caching for repeated verifications.
|
|
128
|
+
*
|
|
129
|
+
* Caches results by SHA-256 hash of text. Reduces API calls for repeated or
|
|
130
|
+
* similar content. Useful for high-volume pipelines or edge/offline scenarios.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* import { CachedShield } from "@veroq/sdk";
|
|
135
|
+
*
|
|
136
|
+
* const cached = new CachedShield({ maxCache: 1000, ttlMs: 30 * 60_000 });
|
|
137
|
+
* const r1 = await cached.shield("NVIDIA reported $22B in Q4 revenue"); // API call
|
|
138
|
+
* const r2 = await cached.shield("NVIDIA reported $22B in Q4 revenue"); // instant cache hit
|
|
139
|
+
* console.log(cached.stats()); // { hits: 1, misses: 1, hitRate: 0.5, size: 1 }
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
export declare class CachedShield {
|
|
143
|
+
private readonly _maxCache;
|
|
144
|
+
private readonly _ttlMs;
|
|
145
|
+
private readonly _apiKey?;
|
|
146
|
+
private readonly _baseUrl?;
|
|
147
|
+
private readonly _cache;
|
|
148
|
+
private readonly _inFlight;
|
|
149
|
+
private _hits;
|
|
150
|
+
private _misses;
|
|
151
|
+
private _lastEvict;
|
|
152
|
+
constructor(options?: CachedShieldOptions);
|
|
153
|
+
private static _hashText;
|
|
154
|
+
private _evictExpired;
|
|
155
|
+
private _evictLru;
|
|
156
|
+
/**
|
|
157
|
+
* Verify text using cached shield.
|
|
158
|
+
*
|
|
159
|
+
* Checks local cache first (by SHA-256 of text). On miss, calls the
|
|
160
|
+
* regular shield() function and stores the result. Deduplicates
|
|
161
|
+
* concurrent calls for the same text.
|
|
162
|
+
*/
|
|
163
|
+
shield(text: string, options?: ShieldOptions): Promise<ShieldResult>;
|
|
164
|
+
/** Return cache hit/miss statistics. */
|
|
165
|
+
stats(): CachedShieldStats;
|
|
166
|
+
/** Clear the cache and reset stats. */
|
|
167
|
+
clear(): void;
|
|
168
|
+
}
|
|
108
169
|
//# sourceMappingURL=shield.d.ts.map
|
package/dist/esm/shield.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shield.d.ts","sourceRoot":"","sources":["../../src/shield.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"shield.d.ts","sourceRoot":"","sources":["../../src/shield.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7E;AAED,qBAAa,YAAY;IACvB,gCAAgC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wBAAwB;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC;IAC/B,iCAAiC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,gCAAgC;IACh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,MAAM,CAAC;IAChB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAOD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsC;IAC7D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiD;IAC3E,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,UAAU,CAAK;gBAEX,OAAO,GAAE,mBAAwB;IAO7C,OAAO,CAAC,MAAM,CAAC,SAAS;IAIxB,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,SAAS;IAQjB;;;;;;OAMG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,YAAY,CAAC;IAwC9E,wCAAwC;IACxC,KAAK,IAAI,iBAAiB;IAU1B,uCAAuC;IACvC,KAAK,IAAI,IAAI;CAMd"}
|
package/dist/esm/shield.js
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* const verified = await shield(response.choices[0].message.content);
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
+
import { createHash } from "node:crypto";
|
|
19
20
|
import { VeroqClient } from "./client.js";
|
|
20
21
|
import { VeroqError } from "./errors.js";
|
|
21
22
|
export class ShieldResult {
|
|
@@ -69,9 +70,9 @@ export class ShieldResult {
|
|
|
69
70
|
}
|
|
70
71
|
// Module-level client
|
|
71
72
|
let _client = null;
|
|
72
|
-
function getClient(apiKey) {
|
|
73
|
+
function getClient(apiKey, baseUrl) {
|
|
73
74
|
if (!_client || apiKey) {
|
|
74
|
-
_client = new VeroqClient({ apiKey });
|
|
75
|
+
_client = new VeroqClient({ apiKey, baseUrl });
|
|
75
76
|
}
|
|
76
77
|
return _client;
|
|
77
78
|
}
|
|
@@ -91,7 +92,7 @@ function getClient(apiKey) {
|
|
|
91
92
|
*
|
|
92
93
|
* // With options
|
|
93
94
|
* const result = await shield(llmOutput, {
|
|
94
|
-
* source: "gpt-
|
|
95
|
+
* source: "gpt-5.4",
|
|
95
96
|
* agentId: "my-bot",
|
|
96
97
|
* blockIfUntrusted: true,
|
|
97
98
|
* });
|
|
@@ -108,7 +109,7 @@ export async function shield(text, options = {}) {
|
|
|
108
109
|
summary: "Text too short to extract verifiable claims.",
|
|
109
110
|
});
|
|
110
111
|
}
|
|
111
|
-
const client = getClient(options.apiKey);
|
|
112
|
+
const client = getClient(options.apiKey, options.baseUrl);
|
|
112
113
|
const raw = await client.verifyOutput(text, {
|
|
113
114
|
source: options.source,
|
|
114
115
|
maxClaims: options.maxClaims,
|
|
@@ -129,4 +130,110 @@ export async function shield(text, options = {}) {
|
|
|
129
130
|
}
|
|
130
131
|
return result;
|
|
131
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Lightweight shield with local caching for repeated verifications.
|
|
135
|
+
*
|
|
136
|
+
* Caches results by SHA-256 hash of text. Reduces API calls for repeated or
|
|
137
|
+
* similar content. Useful for high-volume pipelines or edge/offline scenarios.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```typescript
|
|
141
|
+
* import { CachedShield } from "@veroq/sdk";
|
|
142
|
+
*
|
|
143
|
+
* const cached = new CachedShield({ maxCache: 1000, ttlMs: 30 * 60_000 });
|
|
144
|
+
* const r1 = await cached.shield("NVIDIA reported $22B in Q4 revenue"); // API call
|
|
145
|
+
* const r2 = await cached.shield("NVIDIA reported $22B in Q4 revenue"); // instant cache hit
|
|
146
|
+
* console.log(cached.stats()); // { hits: 1, misses: 1, hitRate: 0.5, size: 1 }
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
export class CachedShield {
|
|
150
|
+
constructor(options = {}) {
|
|
151
|
+
this._cache = new Map();
|
|
152
|
+
this._inFlight = new Map();
|
|
153
|
+
this._hits = 0;
|
|
154
|
+
this._misses = 0;
|
|
155
|
+
this._lastEvict = 0;
|
|
156
|
+
this._maxCache = Math.max(1, options.maxCache ?? 500);
|
|
157
|
+
this._ttlMs = Math.max(1, options.ttlMs ?? 3600000);
|
|
158
|
+
this._apiKey = options.apiKey;
|
|
159
|
+
this._baseUrl = options.baseUrl;
|
|
160
|
+
}
|
|
161
|
+
static _hashText(text) {
|
|
162
|
+
return createHash("sha256").update(text, "utf8").digest("hex");
|
|
163
|
+
}
|
|
164
|
+
_evictExpired() {
|
|
165
|
+
const now = Date.now();
|
|
166
|
+
for (const [key, entry] of this._cache) {
|
|
167
|
+
if (now - entry.timestamp > this._ttlMs) {
|
|
168
|
+
this._cache.delete(key);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
_evictLru() {
|
|
173
|
+
// Map iteration order is insertion order; oldest entries are first.
|
|
174
|
+
while (this._cache.size > this._maxCache) {
|
|
175
|
+
const firstKey = this._cache.keys().next().value;
|
|
176
|
+
this._cache.delete(firstKey);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Verify text using cached shield.
|
|
181
|
+
*
|
|
182
|
+
* Checks local cache first (by SHA-256 of text). On miss, calls the
|
|
183
|
+
* regular shield() function and stores the result. Deduplicates
|
|
184
|
+
* concurrent calls for the same text.
|
|
185
|
+
*/
|
|
186
|
+
async shield(text, options = {}) {
|
|
187
|
+
const key = CachedShield._hashText(text);
|
|
188
|
+
// Amortize TTL eviction — run at most once per second
|
|
189
|
+
const now = Date.now();
|
|
190
|
+
if (now - this._lastEvict > 1000) {
|
|
191
|
+
this._evictExpired();
|
|
192
|
+
this._lastEvict = now;
|
|
193
|
+
}
|
|
194
|
+
const cached = this._cache.get(key);
|
|
195
|
+
if (cached) {
|
|
196
|
+
// Move to end (most recently used) by re-inserting
|
|
197
|
+
this._cache.delete(key);
|
|
198
|
+
this._cache.set(key, cached);
|
|
199
|
+
this._hits++;
|
|
200
|
+
return cached.result;
|
|
201
|
+
}
|
|
202
|
+
// Deduplicate concurrent calls for the same text (counts as a miss, not a hit)
|
|
203
|
+
const inflight = this._inFlight.get(key);
|
|
204
|
+
if (inflight) {
|
|
205
|
+
return inflight;
|
|
206
|
+
}
|
|
207
|
+
// Cache miss — call API and share the Promise with any concurrent callers
|
|
208
|
+
this._misses++;
|
|
209
|
+
const promise = shield(text, { ...options, apiKey: this._apiKey ?? options.apiKey, baseUrl: this._baseUrl ?? options.baseUrl });
|
|
210
|
+
this._inFlight.set(key, promise);
|
|
211
|
+
try {
|
|
212
|
+
const result = await promise;
|
|
213
|
+
this._cache.set(key, { result, timestamp: Date.now() });
|
|
214
|
+
this._evictLru();
|
|
215
|
+
return result;
|
|
216
|
+
}
|
|
217
|
+
finally {
|
|
218
|
+
this._inFlight.delete(key);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/** Return cache hit/miss statistics. */
|
|
222
|
+
stats() {
|
|
223
|
+
const total = this._hits + this._misses;
|
|
224
|
+
return {
|
|
225
|
+
hits: this._hits,
|
|
226
|
+
misses: this._misses,
|
|
227
|
+
hitRate: total > 0 ? this._hits / total : 0,
|
|
228
|
+
size: this._cache.size,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
/** Clear the cache and reset stats. */
|
|
232
|
+
clear() {
|
|
233
|
+
this._cache.clear();
|
|
234
|
+
this._inFlight.clear();
|
|
235
|
+
this._hits = 0;
|
|
236
|
+
this._misses = 0;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
132
239
|
//# sourceMappingURL=shield.js.map
|
package/dist/esm/shield.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shield.js","sourceRoot":"","sources":["../../src/shield.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"shield.js","sourceRoot":"","sources":["../../src/shield.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA2BzC,MAAM,OAAO,YAAY;IA6BvB,YAAY,GAAwB,EAAE,QAAiB;QACrD,IAAI,CAAC,SAAS,GAAG,QAAQ,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,SAAS,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC;YAChD,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,OAAO,EAAE,CAAC,CAAC,OAAO;YAClB,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,CAAC;YAC7B,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,IAAI;YAChC,SAAS,EAAE,CAAC,CAAC,UAAU,IAAI,IAAI;YAC/B,aAAa,EAAE,CAAC,CAAC,cAAc,IAAI,EAAE;SACtC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sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "VeroQ TypeScript SDK — the verified intelligence layer for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"homepage": "https://veroq.ai",
|
|
57
57
|
"repository": {
|
|
58
58
|
"type": "git",
|
|
59
|
-
"url": "https://github.com/
|
|
59
|
+
"url": "https://github.com/veroq-ai/veroq-sdk",
|
|
60
60
|
"directory": "veroq-sdk"
|
|
61
61
|
},
|
|
62
62
|
"bugs": {
|
|
63
|
-
"url": "https://github.com/
|
|
63
|
+
"url": "https://github.com/veroq-ai/veroq-sdk/issues"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=18"
|