agentid-sdk 0.1.20 → 0.1.22
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 +1 -0
- package/dist/{langchain-BipmisU1.d.mts → agentid-BmsXTOCc.d.mts} +3 -29
- package/dist/{langchain-BipmisU1.d.ts → agentid-BmsXTOCc.d.ts} +3 -29
- package/dist/{chunk-LOZUJLLF.mjs → chunk-FVTL572H.mjs} +655 -1046
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +37 -427
- package/dist/index.mjs +1 -3
- package/dist/langchain.d.mts +30 -2
- package/dist/langchain.d.ts +30 -2
- package/dist/langchain.js +1 -1
- package/dist/langchain.mjs +423 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -202,6 +202,7 @@ By default, AgentID is designed to keep your application running if the AgentID
|
|
|
202
202
|
- `guard()` returns a verdict (`allowed`, `reason`); handle deny paths explicitly.
|
|
203
203
|
- `wrapOpenAI()` and LangChain handlers throw `SecurityBlockError` when a prompt is blocked.
|
|
204
204
|
- If `strictMode` is not explicitly set in SDK code, runtime behavior follows the system configuration from AgentID (`strict_security_mode` / `failure_mode`).
|
|
205
|
+
- Local prompt-injection heuristics are enabled only when dashboard policy enables injection blocking (`block_on_heuristic` / legacy injection flags). `strictMode` does not force local heuristic blocking.
|
|
205
206
|
- Ingest retries transient failures (5xx/429) and logs warnings if persistence fails.
|
|
206
207
|
|
|
207
208
|
## 7. Security & Compliance
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
|
|
2
|
-
|
|
3
1
|
type CapabilityConfig = {
|
|
4
2
|
shadow_mode: boolean;
|
|
5
3
|
strict_security_mode: boolean;
|
|
6
4
|
failure_mode: "fail_open" | "fail_close";
|
|
5
|
+
block_on_heuristic: boolean;
|
|
7
6
|
block_pii_leakage: boolean;
|
|
8
7
|
block_db_access: boolean;
|
|
9
8
|
block_code_execution: boolean;
|
|
@@ -103,6 +102,7 @@ declare class AgentID {
|
|
|
103
102
|
getCapabilityConfig(force?: boolean, options?: RequestOptions): Promise<CapabilityConfig>;
|
|
104
103
|
private getCachedCapabilityConfig;
|
|
105
104
|
private resolveEffectiveStrictMode;
|
|
105
|
+
private shouldRunLocalInjectionScan;
|
|
106
106
|
prepareInputForDispatch(params: {
|
|
107
107
|
input: string;
|
|
108
108
|
systemId: string;
|
|
@@ -150,30 +150,4 @@ declare class AgentID {
|
|
|
150
150
|
}): T;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
* LangChainJS callback handler (dependency-free shape).
|
|
155
|
-
*
|
|
156
|
-
* Usage (LangChain):
|
|
157
|
-
* callbacks: [new AgentIDCallbackHandler(agent, { system_id: "..." })]
|
|
158
|
-
*/
|
|
159
|
-
declare class AgentIDCallbackHandler extends BaseCallbackHandler {
|
|
160
|
-
name: string;
|
|
161
|
-
private agent;
|
|
162
|
-
private systemId;
|
|
163
|
-
private apiKeyOverride?;
|
|
164
|
-
private runs;
|
|
165
|
-
constructor(agent: AgentID, options: {
|
|
166
|
-
system_id: string;
|
|
167
|
-
apiKey?: string;
|
|
168
|
-
api_key?: string;
|
|
169
|
-
});
|
|
170
|
-
private get requestOptions();
|
|
171
|
-
private getLangchainCapabilities;
|
|
172
|
-
private preflight;
|
|
173
|
-
handleLLMStart(serialized: unknown, prompts: unknown, runId?: string, _parentRunId?: string, extraParams?: unknown): Promise<void>;
|
|
174
|
-
handleChatModelStart(serialized: unknown, messages: unknown, runId?: string, _parentRunId?: string, extraParams?: unknown): Promise<void>;
|
|
175
|
-
handleLLMEnd(output: unknown, runId?: string): Promise<void>;
|
|
176
|
-
handleLLMError(err: unknown, runId?: string): Promise<void>;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export { AgentID as A, type GuardParams as G, type LogParams as L, type PreparedInput as P, type RequestOptions as R, SecurityBlockError as S, AgentIDCallbackHandler as a, type GuardResponse as b };
|
|
153
|
+
export { AgentID as A, type GuardParams as G, type LogParams as L, type PreparedInput as P, type RequestOptions as R, SecurityBlockError as S, type GuardResponse as a };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { BaseCallbackHandler } from '@langchain/core/callbacks/base';
|
|
2
|
-
|
|
3
1
|
type CapabilityConfig = {
|
|
4
2
|
shadow_mode: boolean;
|
|
5
3
|
strict_security_mode: boolean;
|
|
6
4
|
failure_mode: "fail_open" | "fail_close";
|
|
5
|
+
block_on_heuristic: boolean;
|
|
7
6
|
block_pii_leakage: boolean;
|
|
8
7
|
block_db_access: boolean;
|
|
9
8
|
block_code_execution: boolean;
|
|
@@ -103,6 +102,7 @@ declare class AgentID {
|
|
|
103
102
|
getCapabilityConfig(force?: boolean, options?: RequestOptions): Promise<CapabilityConfig>;
|
|
104
103
|
private getCachedCapabilityConfig;
|
|
105
104
|
private resolveEffectiveStrictMode;
|
|
105
|
+
private shouldRunLocalInjectionScan;
|
|
106
106
|
prepareInputForDispatch(params: {
|
|
107
107
|
input: string;
|
|
108
108
|
systemId: string;
|
|
@@ -150,30 +150,4 @@ declare class AgentID {
|
|
|
150
150
|
}): T;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
* LangChainJS callback handler (dependency-free shape).
|
|
155
|
-
*
|
|
156
|
-
* Usage (LangChain):
|
|
157
|
-
* callbacks: [new AgentIDCallbackHandler(agent, { system_id: "..." })]
|
|
158
|
-
*/
|
|
159
|
-
declare class AgentIDCallbackHandler extends BaseCallbackHandler {
|
|
160
|
-
name: string;
|
|
161
|
-
private agent;
|
|
162
|
-
private systemId;
|
|
163
|
-
private apiKeyOverride?;
|
|
164
|
-
private runs;
|
|
165
|
-
constructor(agent: AgentID, options: {
|
|
166
|
-
system_id: string;
|
|
167
|
-
apiKey?: string;
|
|
168
|
-
api_key?: string;
|
|
169
|
-
});
|
|
170
|
-
private get requestOptions();
|
|
171
|
-
private getLangchainCapabilities;
|
|
172
|
-
private preflight;
|
|
173
|
-
handleLLMStart(serialized: unknown, prompts: unknown, runId?: string, _parentRunId?: string, extraParams?: unknown): Promise<void>;
|
|
174
|
-
handleChatModelStart(serialized: unknown, messages: unknown, runId?: string, _parentRunId?: string, extraParams?: unknown): Promise<void>;
|
|
175
|
-
handleLLMEnd(output: unknown, runId?: string): Promise<void>;
|
|
176
|
-
handleLLMError(err: unknown, runId?: string): Promise<void>;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export { AgentID as A, type GuardParams as G, type LogParams as L, type PreparedInput as P, type RequestOptions as R, SecurityBlockError as S, AgentIDCallbackHandler as a, type GuardResponse as b };
|
|
153
|
+
export { AgentID as A, type GuardParams as G, type LogParams as L, type PreparedInput as P, type RequestOptions as R, SecurityBlockError as S, type GuardResponse as a };
|