@kya-os/agentshield-nextjs 0.1.48 → 0.2.0

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/dist/index.mjs CHANGED
@@ -2003,7 +2003,7 @@ var AgentShieldClient = class {
2003
2003
  throw new Error("AgentShield API key is required");
2004
2004
  }
2005
2005
  this.apiKey = config.apiKey;
2006
- this.useEdge = config.useEdge || false;
2006
+ this.useEdge = config.useEdge !== false;
2007
2007
  this.baseUrl = config.baseUrl || (this.useEdge ? EDGE_DETECT_URL : DEFAULT_BASE_URL);
2008
2008
  this.timeout = config.timeout || DEFAULT_TIMEOUT;
2009
2009
  this.debug = config.debug || false;
@@ -2105,7 +2105,8 @@ function getAgentShieldClient(config) {
2105
2105
  clientInstance = new AgentShieldClient({
2106
2106
  apiKey,
2107
2107
  baseUrl: config?.baseUrl || process.env.AGENTSHIELD_API_URL,
2108
- useEdge: config?.useEdge || process.env.AGENTSHIELD_USE_EDGE === "true",
2108
+ // Default to edge detection unless explicitly disabled
2109
+ useEdge: config?.useEdge ?? process.env.AGENTSHIELD_USE_EDGE !== "false",
2109
2110
  timeout: config?.timeout,
2110
2111
  debug: config?.debug || process.env.AGENTSHIELD_DEBUG === "true"
2111
2112
  });