@princeverma130104/agentguard 1.0.0 → 1.0.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 +115 -31
- package/dist/guard.d.ts +51 -2
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +204 -39
- package/dist/guard.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/langchain.d.ts +4 -1
- package/dist/langchain.d.ts.map +1 -1
- package/dist/langchain.js +30 -12
- package/dist/langchain.js.map +1 -1
- package/dist/mastra.d.ts.map +1 -1
- package/dist/mastra.js +4 -9
- package/dist/mastra.js.map +1 -1
- package/dist/middleware.d.ts +10 -5
- package/dist/middleware.d.ts.map +1 -1
- package/dist/middleware.js +13 -48
- package/dist/middleware.js.map +1 -1
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +11 -2
- package/dist/scanner.js.map +1 -1
- package/dist/vault.d.ts +23 -3
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +169 -16
- package/dist/vault.js.map +1 -1
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 🛡️ AgentGuard
|
|
2
2
|
|
|
3
3
|
> **Privacy & Context Redaction Middleware for AI Agents**
|
|
4
|
-
> Detect, tokenise, and restore PII/
|
|
4
|
+
> Detect, tokenise, and restore supported PII/credential patterns. Detected values are kept in your configured Redis vault and are not sent to the LLM.
|
|
5
5
|
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
[](https://nodejs.org)
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
## The Problem
|
|
13
13
|
|
|
14
|
-
When
|
|
14
|
+
When AI agents handle user data — such as resumes, emails, SSNs, or API keys — sensitive values may be sent to an LLM provider unless the application protects them.
|
|
15
15
|
|
|
16
16
|
## The Solution
|
|
17
17
|
|
|
@@ -19,30 +19,30 @@ AgentGuard acts as an invisible middleware layer between your agent framework an
|
|
|
19
19
|
|
|
20
20
|
```
|
|
21
21
|
┌──────────────────────┐
|
|
22
|
-
│ Agent Framework
|
|
22
|
+
│ Agent Framework │ (1) Raw Prompt: "Register John at john@x.com"
|
|
23
23
|
│ (Mastra / LangChain)│
|
|
24
24
|
└──────────┬───────────┘
|
|
25
25
|
│
|
|
26
26
|
▼
|
|
27
27
|
┌──────────────────────┐
|
|
28
|
-
│ AgentGuard SDK
|
|
29
|
-
│ (Local Middleware)
|
|
28
|
+
│ AgentGuard SDK │ (2) Detect supported PII with patterns
|
|
29
|
+
│ (Local Middleware) │ (3) Store in Redis: {[EMAIL_1]: john@x.com}
|
|
30
30
|
└──────────┬───────────┘
|
|
31
31
|
│ (4) Sanitized: "Register [NAME_1] at [EMAIL_1]"
|
|
32
32
|
▼
|
|
33
33
|
┌──────────────────────┐
|
|
34
|
-
│ LLM Provider
|
|
35
|
-
│ (OpenAI / Claude)
|
|
34
|
+
│ LLM Provider │ ← Does not receive detected values
|
|
35
|
+
│ (OpenAI / Claude) │
|
|
36
36
|
└──────────┬───────────┘
|
|
37
37
|
│ (5) Response: "Fill form with [NAME_1], [EMAIL_1]"
|
|
38
38
|
▼
|
|
39
39
|
┌──────────────────────┐
|
|
40
|
-
│ AgentGuard SDK
|
|
40
|
+
│ AgentGuard SDK │ (6) Restore: "Fill form with John, john@x.com"
|
|
41
41
|
└──────────┬───────────┘
|
|
42
42
|
│
|
|
43
43
|
▼
|
|
44
44
|
┌──────────────────────┐
|
|
45
|
-
│ Tool / Browser
|
|
45
|
+
│ Tool / Browser │ ← Gets real values for execution
|
|
46
46
|
└──────────────────────┘
|
|
47
47
|
```
|
|
48
48
|
|
|
@@ -72,7 +72,7 @@ AgentGuard acts as an invisible middleware layer between your agent framework an
|
|
|
72
72
|
### 1. Install
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
npm install agentguard
|
|
75
|
+
npm install @princeverma130104/agentguard
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
### 2. Start Redis
|
|
@@ -84,7 +84,7 @@ docker-compose up -d
|
|
|
84
84
|
### 3. Use
|
|
85
85
|
|
|
86
86
|
```typescript
|
|
87
|
-
import { AgentGuard } from 'agentguard';
|
|
87
|
+
import { AgentGuard } from '@princeverma130104/agentguard';
|
|
88
88
|
|
|
89
89
|
const guard = new AgentGuard({
|
|
90
90
|
redisUrl: 'redis://localhost:6379',
|
|
@@ -110,12 +110,62 @@ await guard.destroySession(sessionId);
|
|
|
110
110
|
await guard.close();
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
+
### Fail-closed outbound calls and approval
|
|
114
|
+
|
|
115
|
+
Route model calls through `sendToLLM` so scanning and vault writes finish before
|
|
116
|
+
the outbound callback is invoked. Add an approval callback when your application
|
|
117
|
+
requires a policy or human decision:
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
const { result, sessionId } = await guard.sendToLLM(
|
|
121
|
+
(sanitizedPrompt) => llm.generate(sanitizedPrompt),
|
|
122
|
+
userPrompt,
|
|
123
|
+
{
|
|
124
|
+
approve: async ({ sanitizedPrompt, redactionSummary }) =>
|
|
125
|
+
approvalPolicy.allow({ sanitizedPrompt, redactionSummary }),
|
|
126
|
+
},
|
|
127
|
+
);
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Only a literal `true` approves the call. A denial, thrown error, or sanitizer
|
|
131
|
+
failure prevents the LLM callback from running. The approval callback receives
|
|
132
|
+
sanitized text and entity counts only—not the original prompt or detected
|
|
133
|
+
values. Without an `approve` callback this method still sanitizes, but sends
|
|
134
|
+
without an approval decision; that is the default for compatibility and ease
|
|
135
|
+
of use.
|
|
136
|
+
|
|
137
|
+
Construct the prompt with only the minimum context needed before calling this
|
|
138
|
+
API. AgentGuard cannot know which facts a user considers sensitive, certify
|
|
139
|
+
arbitrary text as safe, or prevent an application from bypassing this method.
|
|
140
|
+
Ensure every provider call uses the gate, and do not let the send callback
|
|
141
|
+
ignore its `sanitizedPrompt` argument or close over the original prompt.
|
|
142
|
+
|
|
143
|
+
### Structured JSON
|
|
144
|
+
|
|
145
|
+
Use the core API when your model accepts structured input or when you are not
|
|
146
|
+
using Express middleware. It traverses nested arrays and objects, redacts string
|
|
147
|
+
values and property names, and uses one session for the complete structure:
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
const { sanitizedValue, sessionId } = await guard.anonymizeObject({
|
|
151
|
+
customer: { email: 'jane@example.com' },
|
|
152
|
+
messages: ['Call me at 415-555-0123'],
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// Send sanitizedValue to the model, then restore only for an authorized use:
|
|
156
|
+
const restored = await guard.deanonymizeObject(modelOutput, sessionId);
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Structured methods accept JSON-compatible values only, enforce the same text
|
|
160
|
+
size limit per string, and reject cyclic, excessively deep, or unsupported
|
|
161
|
+
objects. Keep and authorize `sessionId` as a bearer capability.
|
|
162
|
+
|
|
113
163
|
---
|
|
114
164
|
|
|
115
165
|
## Mastra Integration
|
|
116
166
|
|
|
117
167
|
```typescript
|
|
118
|
-
import { createMastraGuard } from 'agentguard/mastra';
|
|
168
|
+
import { createMastraGuard } from '@princeverma130104/agentguard/mastra';
|
|
119
169
|
|
|
120
170
|
const { wrapStep } = createMastraGuard({
|
|
121
171
|
redisUrl: process.env.REDIS_URL,
|
|
@@ -136,7 +186,7 @@ const myStep = {
|
|
|
136
186
|
## LangChain.js Integration
|
|
137
187
|
|
|
138
188
|
```typescript
|
|
139
|
-
import { createLangChainGuard } from 'agentguard/langchain';
|
|
189
|
+
import { createLangChainGuard } from '@princeverma130104/agentguard/langchain';
|
|
140
190
|
import { ChatOpenAI } from '@langchain/openai';
|
|
141
191
|
|
|
142
192
|
const { handler, restore } = createLangChainGuard({
|
|
@@ -157,7 +207,7 @@ const clean = await restore(result.content, handler.sessionId);
|
|
|
157
207
|
|
|
158
208
|
```typescript
|
|
159
209
|
import express from 'express';
|
|
160
|
-
import { createGuardMiddleware } from 'agentguard/middleware';
|
|
210
|
+
import { createGuardMiddleware } from '@princeverma130104/agentguard/middleware';
|
|
161
211
|
|
|
162
212
|
const app = express();
|
|
163
213
|
app.use(express.json());
|
|
@@ -198,6 +248,9 @@ app.post('/chat', async (req, res) => {
|
|
|
198
248
|
const guard = new AgentGuard({
|
|
199
249
|
redisUrl: 'redis://localhost:6379', // default
|
|
200
250
|
ttlSeconds: 900, // 15 minutes default
|
|
251
|
+
maxTokensPerSession: 10_000, // cap vault growth per session
|
|
252
|
+
maxTextLength: 1_000_000, // maximum characters per text input
|
|
253
|
+
vaultEncryptionKey: process.env.AGENTGUARD_VAULT_KEY, // optional 32-byte hex key
|
|
201
254
|
verbose: false, // console logging (no PII)
|
|
202
255
|
});
|
|
203
256
|
```
|
|
@@ -206,7 +259,17 @@ const guard = new AgentGuard({
|
|
|
206
259
|
|---|---|---|---|
|
|
207
260
|
| `redisUrl` | `string` | `redis://localhost:6379` | Redis connection URL |
|
|
208
261
|
| `ttlSeconds` | `number` | `900` | Session TTL in seconds |
|
|
209
|
-
| `
|
|
262
|
+
| `maxTokensPerSession` | `number` | `10000` | Maximum distinct vault values per session |
|
|
263
|
+
| `maxTextLength` | `number` | `1000000` | Maximum UTF-16 code units in a text input |
|
|
264
|
+
| `vaultEncryptionKey` | `string` | unset | Optional 32-byte hex key for AES-256-GCM encryption of Redis vault values |
|
|
265
|
+
| `verbose` | `boolean` | `false` | Log operation metadata and a truncated session hash (never raw session IDs or PII) |
|
|
266
|
+
|
|
267
|
+
The Express-compatible middleware handles string bodies and nested JSON values.
|
|
268
|
+
It also scans JSON property names, not just values. Configure a strict request
|
|
269
|
+
body-size limit in your HTTP framework before AgentGuard middleware; the
|
|
270
|
+
`maxTextLength` limit applies to each string passed to the core guard.
|
|
271
|
+
The middleware factory returns an array-compatible stack with a `close()` method;
|
|
272
|
+
call it during graceful shutdown to release its Redis connection.
|
|
210
273
|
|
|
211
274
|
---
|
|
212
275
|
|
|
@@ -233,9 +296,9 @@ vault must be reachable from that service.
|
|
|
233
296
|
|
|
234
297
|
### Prepare a release
|
|
235
298
|
|
|
236
|
-
1.
|
|
237
|
-
account, change `name` in `package.json`
|
|
238
|
-
|
|
299
|
+
1. The published package name is `@princeverma130104/agentguard`. To publish
|
|
300
|
+
under a different npm account, change `name` in `package.json` and the
|
|
301
|
+
lockfile to a scope that account owns.
|
|
239
302
|
2. Replace the repository, bugs, homepage, and author placeholders in
|
|
240
303
|
`package.json` with your project details.
|
|
241
304
|
3. Run the production checks and inspect the package contents:
|
|
@@ -264,16 +327,21 @@ vault must be reachable from that service.
|
|
|
264
327
|
Redis service with TLS for production; do not expose the local Docker Redis
|
|
265
328
|
port to the public internet.
|
|
266
329
|
2. Set `REDIS_URL` in the application host's secret/environment settings. Use
|
|
267
|
-
the provider's TLS URL (`rediss://...`)
|
|
268
|
-
|
|
269
|
-
3. Set
|
|
330
|
+
the provider's TLS URL (`rediss://...`), authentication, and least-privilege
|
|
331
|
+
ACLs. Never commit credentials or encryption keys to source control.
|
|
332
|
+
3. Set `AGENTGUARD_VAULT_KEY` to a secret 64-character hex value and pass it as
|
|
333
|
+
`vaultEncryptionKey` for application-level vault encryption. Keep it stable
|
|
334
|
+
across instances; wait for existing sessions to expire before rotation.
|
|
335
|
+
4. Set `AGENTGUARD_TTL_SECONDS` if the default 900 seconds is not appropriate.
|
|
270
336
|
Configure your app to pass `REDIS_URL` and the desired TTL to `AgentGuard`.
|
|
271
|
-
|
|
337
|
+
5. Install the published package in the application, deploy the service using
|
|
272
338
|
its normal Node.js deployment process, and verify Redis connectivity with
|
|
273
339
|
`await guard.healthCheck()` before accepting traffic.
|
|
274
|
-
|
|
340
|
+
6. Ensure your Redis provider's persistence, backups, access controls, and
|
|
275
341
|
retention settings meet your privacy requirements. AgentGuard cannot disable
|
|
276
342
|
persistence on an externally managed Redis service.
|
|
343
|
+
7. If using `createGuardMiddleware`, call `await stack.close()` during graceful
|
|
344
|
+
application shutdown to close its Redis connection.
|
|
277
345
|
|
|
278
346
|
The included `docker-compose.yml` is for local development only. It binds Redis
|
|
279
347
|
to localhost and disables RDB snapshots and AOF persistence; it is not a
|
|
@@ -298,7 +366,9 @@ agentguard/
|
|
|
298
366
|
├── tests/
|
|
299
367
|
│ ├── scanner.test.ts # Scanner unit tests
|
|
300
368
|
│ ├── vault.test.ts # Vault unit tests
|
|
301
|
-
│
|
|
369
|
+
│ ├── guard.test.ts # Integration tests
|
|
370
|
+
│ ├── structured.test.ts # Structured data API tests
|
|
371
|
+
│ └── outbound.test.ts # Outbound gate tests
|
|
302
372
|
├── examples/
|
|
303
373
|
│ ├── basic-usage.ts # Standalone example
|
|
304
374
|
│ └── mastra-quickstart.ts
|
|
@@ -312,19 +382,33 @@ agentguard/
|
|
|
312
382
|
|
|
313
383
|
## Security & Compliance
|
|
314
384
|
|
|
315
|
-
- **
|
|
385
|
+
- **Important limitation**: Detection is pattern-based and can miss sensitive information. Integrate and test AgentGuard for your application; it does not by itself guarantee security or regulatory compliance.
|
|
386
|
+
- **Vault contents**: Configure `vaultEncryptionKey` from a secret manager to encrypt vault values with AES-256-GCM and HMAC the reverse index. Without it, values are stored unencrypted for compatibility. Use the same key across application instances; rotating it makes existing encrypted sessions unreadable, so wait for the maximum TTL or migrate before rotation. Also use private Redis with TLS (`rediss://`), authentication, least-privilege ACLs, network restrictions, and provider-controlled encryption/backup retention.
|
|
387
|
+
- **Enabling encryption on an existing deployment**: Existing plaintext Redis entries remain readable during their TTL. Destroy those sessions or wait for expiration before treating the Redis dataset as fully encrypted.
|
|
316
388
|
- **TTL enforcement**: All session data expires automatically (default 15 min)
|
|
317
|
-
- **Session isolation**: Each session has its own Redis key namespace
|
|
318
|
-
- **
|
|
319
|
-
- **
|
|
389
|
+
- **Session isolation**: Each session has its own Redis key namespace; isolation assumes callers use the correct session ID and does not replace authorization.
|
|
390
|
+
- **Session authorization**: Session IDs are bearer capabilities for restoring values. Keep them out of client-visible responses, prompts, logs, and URLs; authorize callers before reusing one. AgentGuard does not authenticate users or authorize access to sessions.
|
|
391
|
+
- **Audit log**: Operations are logged with timestamps, entity types, counts, and a truncated SHA-256 session hash; raw PII and full session IDs are not logged.
|
|
392
|
+
- **Atomic allocation and limits**: Redis Lua scripts allocate tokens atomically and enforce a per-session vault size cap.
|
|
393
|
+
- **Middleware session handling**: The response-restoration middleware keeps session IDs in a weak map rather than attaching bearer IDs to request/response objects.
|
|
394
|
+
- **Outbound gate**: `sendToLLM` awaits sanitization before sending and supports an optional fail-closed approval callback.
|
|
395
|
+
|
|
396
|
+
Only restore tokens for an authorized destination. Validate LLM output and tool
|
|
397
|
+
arguments independently; redaction is not authorization, prompt-injection
|
|
398
|
+
protection, or a safe-execution mechanism. Never let a model choose privileged
|
|
399
|
+
actions solely because AgentGuard restored a token. Treat custom regex patterns
|
|
400
|
+
as trusted code; do not load patterns from users or other untrusted sources.
|
|
401
|
+
Test each framework integration against the exact framework/model versions in
|
|
402
|
+
your application to verify the sanitized content is what actually reaches the
|
|
403
|
+
provider.
|
|
320
404
|
|
|
321
405
|
### NFR Compliance
|
|
322
406
|
|
|
323
407
|
| Requirement | Target | Implementation |
|
|
324
408
|
|---|---|---|
|
|
325
|
-
| Latency overhead |
|
|
326
|
-
|
|
|
327
|
-
| Session isolation | Per session | Namespaced Redis keys per session
|
|
409
|
+
| Latency overhead | Not benchmarked | Depends on text size, regex patterns, and Redis |
|
|
410
|
+
| Redis persistence | Deployment-configured | Local Compose disables RDB/AOF; production Redis persistence is provider-configured |
|
|
411
|
+
| Session isolation | Per session | Namespaced Redis keys per session identifier |
|
|
328
412
|
| Scalability | Horizontal | Stateless middleware + shared Redis |
|
|
329
413
|
|
|
330
414
|
---
|
package/dist/guard.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface GuardOptions extends VaultOptions {
|
|
|
16
16
|
* Defaults to false.
|
|
17
17
|
*/
|
|
18
18
|
verbose?: boolean;
|
|
19
|
+
/** Maximum number of UTF-16 code units accepted in a single text input. Defaults to 1,000,000. */
|
|
20
|
+
maxTextLength?: number;
|
|
19
21
|
}
|
|
20
22
|
export interface AnonymizeResult {
|
|
21
23
|
/** The sanitized text with all PII replaced by placeholder tokens */
|
|
@@ -25,19 +27,47 @@ export interface AnonymizeResult {
|
|
|
25
27
|
/** Summary of what was redacted (types and counts only — no raw values) */
|
|
26
28
|
redactionSummary: Record<string, number>;
|
|
27
29
|
}
|
|
30
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
31
|
+
[key: string]: JsonValue;
|
|
32
|
+
};
|
|
33
|
+
export interface AnonymizeObjectResult {
|
|
34
|
+
sanitizedValue: JsonValue;
|
|
35
|
+
sessionId: string;
|
|
36
|
+
redactionSummary: Record<string, number>;
|
|
37
|
+
}
|
|
28
38
|
export interface AuditEntry {
|
|
29
39
|
timestamp: string;
|
|
30
|
-
|
|
31
|
-
operation: 'anonymize' | 'deanonymize' | 'session_destroy';
|
|
40
|
+
sessionIdHash: string;
|
|
41
|
+
operation: 'anonymize' | 'deanonymize' | 'session_destroy' | 'outbound_approved' | 'outbound_rejected';
|
|
32
42
|
entityTypesRedacted?: string[];
|
|
33
43
|
totalTokensRestored?: number;
|
|
34
44
|
}
|
|
45
|
+
export interface OutboundApprovalRequest {
|
|
46
|
+
/** Sanitized content only. Raw input is never passed to the approval callback. */
|
|
47
|
+
sanitizedPrompt: string;
|
|
48
|
+
/** Entity types detected in this prompt; no matched values are included. */
|
|
49
|
+
redactionSummary: Readonly<Record<string, number>>;
|
|
50
|
+
}
|
|
51
|
+
export interface OutboundCallOptions {
|
|
52
|
+
sessionId?: string;
|
|
53
|
+
/** Return true to permit the outbound call. Any other result blocks it. */
|
|
54
|
+
approve?: (request: OutboundApprovalRequest) => boolean | Promise<boolean>;
|
|
55
|
+
}
|
|
56
|
+
export interface OutboundCallResult<T> {
|
|
57
|
+
result: T;
|
|
58
|
+
sessionId: string;
|
|
59
|
+
redactionSummary: Record<string, number>;
|
|
60
|
+
}
|
|
61
|
+
export declare class OutboundApprovalError extends Error {
|
|
62
|
+
constructor();
|
|
63
|
+
}
|
|
35
64
|
export declare class AgentGuard {
|
|
36
65
|
private readonly options;
|
|
37
66
|
private readonly vault;
|
|
38
67
|
private readonly verbose;
|
|
39
68
|
private readonly auditLog;
|
|
40
69
|
constructor(options?: GuardOptions);
|
|
70
|
+
private readonly maxTextLength;
|
|
41
71
|
/**
|
|
42
72
|
* Scans input text, replaces all detected PII with deterministic tokens,
|
|
43
73
|
* and stores the (token → rawValue) mapping in the ephemeral Redis vault.
|
|
@@ -60,6 +90,22 @@ export declare class AgentGuard {
|
|
|
60
90
|
* @returns Text with all tokens replaced by original values
|
|
61
91
|
*/
|
|
62
92
|
deanonymize(tokenizedText: string, sessionId: string): Promise<string>;
|
|
93
|
+
/**
|
|
94
|
+
* Anonymizes strings throughout a JSON-compatible value, including property
|
|
95
|
+
* names, and reuses one vault session for the complete structure.
|
|
96
|
+
*/
|
|
97
|
+
anonymizeObject(value: unknown, sessionId?: string): Promise<AnonymizeObjectResult>;
|
|
98
|
+
/**
|
|
99
|
+
* Restores tokens throughout a JSON-compatible value using one session.
|
|
100
|
+
* Only call this for a session authorized by the consuming application.
|
|
101
|
+
*/
|
|
102
|
+
deanonymizeObject(value: unknown, sessionId: string): Promise<JsonValue>;
|
|
103
|
+
/**
|
|
104
|
+
* Anonymizes a prompt before invoking the caller's outbound LLM function.
|
|
105
|
+
* If supplied, approval receives sanitized text only; any result other than
|
|
106
|
+
* literal true blocks the call. Sanitization or approval errors fail closed.
|
|
107
|
+
*/
|
|
108
|
+
sendToLLM<T>(send: (sanitizedPrompt: string) => Promise<T>, prompt: string, options?: OutboundCallOptions): Promise<OutboundCallResult<T>>;
|
|
63
109
|
/**
|
|
64
110
|
* Wraps an async function, automatically anonymizing its string input
|
|
65
111
|
* and deanonymizing the string output. Useful for wrapping LLM calls.
|
|
@@ -92,5 +138,8 @@ export declare class AgentGuard {
|
|
|
92
138
|
*/
|
|
93
139
|
close(): Promise<void>;
|
|
94
140
|
private recordAudit;
|
|
141
|
+
private hashSessionId;
|
|
142
|
+
private validateSessionId;
|
|
143
|
+
private mapJsonValue;
|
|
95
144
|
}
|
|
96
145
|
//# sourceMappingURL=guard.d.ts.map
|
package/dist/guard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAc,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,YAAa,SAAQ,YAAY;IAChD;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,MAAM,CAAC,CAAC,CAAC;IAC3D;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kGAAkG;IAClG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,aAAa,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAED,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjC,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,SAAS,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,M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