@enclave-vm/ast
Advanced tools
+1
-1
@@ -10,3 +10,3 @@ # Changelog | ||
| ## [2.10.0] - 2026-02-01 | ||
| ## [2.11.0] - 2026-02-20 | ||
@@ -13,0 +13,0 @@ ## [2.4.0] - 2026-01-09 |
+1
-1
| { | ||
| "name": "@enclave-vm/ast", | ||
| "version": "2.10.1", | ||
| "version": "2.11.0", | ||
| "description": "A production-ready AST security guard for JavaScript - validate, protect, and enforce code safety with extensible rules", | ||
@@ -5,0 +5,0 @@ "author": "AgentFront <info@agentfront.dev>", |
@@ -56,4 +56,12 @@ import { ValidationRule } from '../interfaces'; | ||
| /** | ||
| * List of allowed global identifiers (APIs available to agent code) | ||
| * List of allowed global identifiers (APIs available to agent code). | ||
| * If provided, overrides the securityLevel-based defaults. | ||
| * | ||
| * Identifiers in this list are also removed from the built-in dangerous | ||
| * identifiers blocklist, so a custom global like `process` won't be | ||
| * rejected by DisallowedIdentifierRule. | ||
| * | ||
| * Note: `additionalDisallowedIdentifiers` takes higher precedence — | ||
| * if the same identifier appears in both lists, it remains blocked. | ||
| * | ||
| * Default: Based on securityLevel (see getAgentScriptGlobals) | ||
@@ -63,3 +71,15 @@ */ | ||
| /** | ||
| * Additional identifiers to block beyond the default dangerous set | ||
| * Additional identifiers to block beyond the default dangerous set. | ||
| * | ||
| * These always take precedence over `allowedGlobals`. If an identifier | ||
| * is listed here, it will be blocked even if it also appears in | ||
| * `allowedGlobals`. | ||
| * | ||
| * @example | ||
| * // Allow most custom globals but force-block `dangerousApi`: | ||
| * createAgentScriptPreset({ | ||
| * allowedGlobals: ['callTool', 'safeApi', 'dangerousApi'], | ||
| * additionalDisallowedIdentifiers: ['dangerousApi'], | ||
| * }); | ||
| * // Result: 'safeApi' is allowed, 'dangerousApi' is blocked. | ||
| */ | ||
@@ -66,0 +86,0 @@ additionalDisallowedIdentifiers?: string[]; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
621157
0.44%16983
0.38%