@agentbouncr/core 0.2.0 → 0.2.1
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @agentbouncr/core
|
|
2
2
|
|
|
3
|
-
The governance layer for AI agents. Policy Engine, Audit Trail, Kill-Switch, Event System, and Injection Detection.
|
|
3
|
+
The governance layer for AI agents. Deterministic rules — not another AI — decide what each agent can do. Policy Engine, Audit Trail, Kill-Switch, Event System, and Injection Detection. Works with LangChain, Vercel AI SDK, OpenAI, CrewAI, or any agent framework.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The governance layer for AI agents.
|
|
5
5
|
* The agent does not decide what it may do — the system decides.
|
|
6
6
|
*/
|
|
7
|
-
export declare const VERSION = "0.1
|
|
7
|
+
export declare const VERSION = "0.2.1";
|
|
8
8
|
export { GovernanceError, type FailureCategory, type InjectionDetectionResult, type KillSwitchResult, type PermissionResult, type EvaluateRequest, type EvaluateResult, type AppliedRule, type ToolResult, type ToolExecutionContext, type AuditEvent, type AuditEventInput, type AuditFilter, type AuditChainVerificationResult, type ConditionOperator, type PolicyCondition, type Policy, type PolicyRule, type PolicyVersion, type AgentRunStatus, type AgentConfig, type AgentStatus, type TransactionClient, type DatabaseAdapter, type ToolFilter, type GovernanceEventRecord, type GovernanceEventFilter, type ApprovalStatus, type ApprovalRequest, type ApprovalRequestInput, type ApprovalFilter, type ApprovalResolution, } from './types/index.js';
|
|
9
9
|
export { governanceToolSchema, governanceToolParameterSchema, toolParameterConstraintsSchema, riskLevelSchema, toolSourceSchema, parametersToJsonSchema, type GovernanceTool, type GovernanceToolParameter, type ToolParameterConstraints, type RiskLevel, type ToolSource, } from './schema/tool-schema.js';
|
|
10
10
|
export { logger, securityLogger } from './utils/logger.js';
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* The governance layer for AI agents.
|
|
5
5
|
* The agent does not decide what it may do — the system decides.
|
|
6
6
|
*/
|
|
7
|
-
export const VERSION = '0.1
|
|
7
|
+
export const VERSION = '0.2.1';
|
|
8
8
|
// Types
|
|
9
9
|
export { GovernanceError, } from './types/index.js';
|
|
10
10
|
// Canonical Tool Schema
|
|
@@ -8,26 +8,26 @@ import { z } from 'zod/v4';
|
|
|
8
8
|
import { policySchema } from '../core/policy-schema.js';
|
|
9
9
|
// --- EvaluateRequest Schema ---
|
|
10
10
|
export const evaluateRequestSchema = z.object({
|
|
11
|
-
agentId: z.string().min(1),
|
|
12
|
-
tool: z.string().min(1),
|
|
11
|
+
agentId: z.string().min(1).max(128),
|
|
12
|
+
tool: z.string().min(1).max(256),
|
|
13
13
|
params: z.record(z.string(), z.unknown()).optional(),
|
|
14
|
-
traceId: z.string().optional(),
|
|
14
|
+
traceId: z.string().max(256).optional(),
|
|
15
15
|
});
|
|
16
16
|
// --- AgentConfig Schema ---
|
|
17
17
|
export const agentConfigSchema = z.object({
|
|
18
|
-
agentId: z.string().min(1),
|
|
19
|
-
name: z.string().min(1),
|
|
20
|
-
description: z.string().optional(),
|
|
21
|
-
allowedTools: z.array(z.string()).default([]),
|
|
22
|
-
policyName: z.string().optional(),
|
|
18
|
+
agentId: z.string().min(1).max(128),
|
|
19
|
+
name: z.string().min(1).max(256),
|
|
20
|
+
description: z.string().max(2000).optional(),
|
|
21
|
+
allowedTools: z.array(z.string().max(256)).default([]),
|
|
22
|
+
policyName: z.string().max(128).optional(),
|
|
23
23
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
24
24
|
});
|
|
25
25
|
// --- Dry-Run Request Schema ---
|
|
26
26
|
export const dryRunRequestSchema = z.object({
|
|
27
|
-
agentId: z.string().min(1),
|
|
28
|
-
tool: z.string().min(1),
|
|
27
|
+
agentId: z.string().min(1).max(128),
|
|
28
|
+
tool: z.string().min(1).max(256),
|
|
29
29
|
params: z.record(z.string(), z.unknown()).optional(),
|
|
30
|
-
traceId: z.string().optional(),
|
|
30
|
+
traceId: z.string().max(256).optional(),
|
|
31
31
|
policy: policySchema,
|
|
32
32
|
});
|
|
33
33
|
//# sourceMappingURL=middleware-schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware-schemas.js","sourceRoot":"","sources":["../../src/lifecycle/middleware-schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,iCAAiC;AAEjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"middleware-schemas.js","sourceRoot":"","sources":["../../src/lifecycle/middleware-schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,iCAAiC;AAEjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,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