agentid-sdk 0.1.37 → 0.1.40
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 +303 -57
- package/dist/agentid-BWlN5KCq.d.mts +400 -0
- package/dist/agentid-BWlN5KCq.d.ts +400 -0
- package/dist/{chunk-HWES3LI2.mjs → chunk-25SZBEYX.mjs} +1596 -169
- package/dist/index.d.mts +19 -3
- package/dist/index.d.ts +19 -3
- package/dist/index.js +1655 -168
- package/dist/index.mjs +66 -1
- package/dist/langchain.d.mts +15 -1
- package/dist/langchain.d.ts +15 -1
- package/dist/langchain.js +988 -71
- package/dist/langchain.mjs +451 -16
- package/dist/transparency-badge.d.mts +1 -1
- package/dist/transparency-badge.d.ts +1 -1
- package/package.json +9 -5
- package/dist/agentid-JQx2Iy7B.d.mts +0 -240
- package/dist/agentid-JQx2Iy7B.d.ts +0 -240
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { P as PIIManager } from './agentid-
|
|
2
|
-
export { A as AgentID, D as DependencyError, G as GuardParams,
|
|
1
|
+
import { P as PIIAnonymizeOptions, a as PIIManager } from './agentid-BWlN5KCq.mjs';
|
|
2
|
+
export { A as AgentEventType, b as AgentID, c as AgentIDWorkflowRunHooks, d as AgentIDWorkflowStep, e as AgentIDWorkflowStepParams, f as AgentIDWorkflowTrail, g as AgentIDWorkflowTrailOptions, h as AgentOperationCategory, i as AgentOperationStatus, j as AgentTelemetryContext, D as DependencyError, G as GuardAttachment, k as GuardParams, l as GuardResponse, L as LogParams, O as OperationLogParams, m as PIIMapping, n as PreparedInput, R as RequestOptions, S as SecurityBlockError, T as TransparencyMetadata, W as WrapOpenAIOptions, o as createAgentIdCorrelationId, p as createAgentIdOperationLog, q as createAgentIdTelemetryContext, r as createAgentIdWorkflowTrail } from './agentid-BWlN5KCq.mjs';
|
|
3
3
|
|
|
4
4
|
type TokenUsage = Record<string, unknown>;
|
|
5
|
+
type ExtractedGuardAttachment = {
|
|
6
|
+
filename: string;
|
|
7
|
+
mime_type?: string;
|
|
8
|
+
content_base64?: string;
|
|
9
|
+
};
|
|
5
10
|
interface LLMAdapter {
|
|
6
11
|
extractInput(req: unknown): string | null;
|
|
12
|
+
extractAttachments(req: unknown): ExtractedGuardAttachment[];
|
|
7
13
|
getModelName(req: unknown, res?: unknown): string;
|
|
8
14
|
extractOutput(res: unknown): string;
|
|
9
15
|
getTokenUsage(res: unknown): TokenUsage | undefined;
|
|
@@ -11,12 +17,22 @@ interface LLMAdapter {
|
|
|
11
17
|
}
|
|
12
18
|
declare class OpenAIAdapter implements LLMAdapter {
|
|
13
19
|
extractInput(req: any): string | null;
|
|
20
|
+
extractAttachments(req: any): ExtractedGuardAttachment[];
|
|
14
21
|
getModelName(req: any, res?: any): string;
|
|
15
22
|
extractOutput(res: any): string;
|
|
16
23
|
getTokenUsage(res: any): TokenUsage | undefined;
|
|
17
24
|
isStream(req: any): boolean;
|
|
18
25
|
}
|
|
19
26
|
|
|
27
|
+
type ProtectMessageHistoryOptions = PIIAnonymizeOptions;
|
|
28
|
+
type ProtectMessageHistoryResult<T> = {
|
|
29
|
+
messages: T;
|
|
30
|
+
transformed: boolean;
|
|
31
|
+
textPartsCount: number;
|
|
32
|
+
transformedTextPartsCount: number;
|
|
33
|
+
};
|
|
34
|
+
declare function protectMessageHistory<T>(messages: T, options?: ProtectMessageHistoryOptions): ProtectMessageHistoryResult<T>;
|
|
35
|
+
|
|
20
36
|
type InjectionScanParams = {
|
|
21
37
|
prompt: string;
|
|
22
38
|
apiKey: string;
|
|
@@ -47,4 +63,4 @@ declare class InjectionScanner {
|
|
|
47
63
|
}
|
|
48
64
|
declare function getInjectionScanner(): InjectionScanner;
|
|
49
65
|
|
|
50
|
-
export { type InjectionScanParams, InjectionScanner, type LLMAdapter, OpenAIAdapter, PIIManager, type TokenUsage, getInjectionScanner, scanWithRegex };
|
|
66
|
+
export { type ExtractedGuardAttachment, type InjectionScanParams, InjectionScanner, type LLMAdapter, OpenAIAdapter, PIIAnonymizeOptions, PIIManager, type ProtectMessageHistoryOptions, type ProtectMessageHistoryResult, type TokenUsage, getInjectionScanner, protectMessageHistory, scanWithRegex };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { P as PIIManager } from './agentid-
|
|
2
|
-
export { A as AgentID, D as DependencyError, G as GuardParams,
|
|
1
|
+
import { P as PIIAnonymizeOptions, a as PIIManager } from './agentid-BWlN5KCq.js';
|
|
2
|
+
export { A as AgentEventType, b as AgentID, c as AgentIDWorkflowRunHooks, d as AgentIDWorkflowStep, e as AgentIDWorkflowStepParams, f as AgentIDWorkflowTrail, g as AgentIDWorkflowTrailOptions, h as AgentOperationCategory, i as AgentOperationStatus, j as AgentTelemetryContext, D as DependencyError, G as GuardAttachment, k as GuardParams, l as GuardResponse, L as LogParams, O as OperationLogParams, m as PIIMapping, n as PreparedInput, R as RequestOptions, S as SecurityBlockError, T as TransparencyMetadata, W as WrapOpenAIOptions, o as createAgentIdCorrelationId, p as createAgentIdOperationLog, q as createAgentIdTelemetryContext, r as createAgentIdWorkflowTrail } from './agentid-BWlN5KCq.js';
|
|
3
3
|
|
|
4
4
|
type TokenUsage = Record<string, unknown>;
|
|
5
|
+
type ExtractedGuardAttachment = {
|
|
6
|
+
filename: string;
|
|
7
|
+
mime_type?: string;
|
|
8
|
+
content_base64?: string;
|
|
9
|
+
};
|
|
5
10
|
interface LLMAdapter {
|
|
6
11
|
extractInput(req: unknown): string | null;
|
|
12
|
+
extractAttachments(req: unknown): ExtractedGuardAttachment[];
|
|
7
13
|
getModelName(req: unknown, res?: unknown): string;
|
|
8
14
|
extractOutput(res: unknown): string;
|
|
9
15
|
getTokenUsage(res: unknown): TokenUsage | undefined;
|
|
@@ -11,12 +17,22 @@ interface LLMAdapter {
|
|
|
11
17
|
}
|
|
12
18
|
declare class OpenAIAdapter implements LLMAdapter {
|
|
13
19
|
extractInput(req: any): string | null;
|
|
20
|
+
extractAttachments(req: any): ExtractedGuardAttachment[];
|
|
14
21
|
getModelName(req: any, res?: any): string;
|
|
15
22
|
extractOutput(res: any): string;
|
|
16
23
|
getTokenUsage(res: any): TokenUsage | undefined;
|
|
17
24
|
isStream(req: any): boolean;
|
|
18
25
|
}
|
|
19
26
|
|
|
27
|
+
type ProtectMessageHistoryOptions = PIIAnonymizeOptions;
|
|
28
|
+
type ProtectMessageHistoryResult<T> = {
|
|
29
|
+
messages: T;
|
|
30
|
+
transformed: boolean;
|
|
31
|
+
textPartsCount: number;
|
|
32
|
+
transformedTextPartsCount: number;
|
|
33
|
+
};
|
|
34
|
+
declare function protectMessageHistory<T>(messages: T, options?: ProtectMessageHistoryOptions): ProtectMessageHistoryResult<T>;
|
|
35
|
+
|
|
20
36
|
type InjectionScanParams = {
|
|
21
37
|
prompt: string;
|
|
22
38
|
apiKey: string;
|
|
@@ -47,4 +63,4 @@ declare class InjectionScanner {
|
|
|
47
63
|
}
|
|
48
64
|
declare function getInjectionScanner(): InjectionScanner;
|
|
49
65
|
|
|
50
|
-
export { type InjectionScanParams, InjectionScanner, type LLMAdapter, OpenAIAdapter, PIIManager, type TokenUsage, getInjectionScanner, scanWithRegex };
|
|
66
|
+
export { type ExtractedGuardAttachment, type InjectionScanParams, InjectionScanner, type LLMAdapter, OpenAIAdapter, PIIAnonymizeOptions, PIIManager, type ProtectMessageHistoryOptions, type ProtectMessageHistoryResult, type TokenUsage, getInjectionScanner, protectMessageHistory, scanWithRegex };
|