@kya-os/agentshield-nextjs 0.1.48 → 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/dist/index.mjs CHANGED
@@ -533,11 +533,9 @@ var KNOWN_KEYS = {
533
533
  // Source: https://chatgpt.com/.well-known/http-message-signatures-directory
534
534
  publicKey: "7F_3jDlxaquwh291MiACkcS3Opq88NksyHiakzS-Y1g",
535
535
  validFrom: 1735689600,
536
- // Jan 1, 2025 (from OpenAI's nbf)
537
- // Extended expiration as fallback safety - API fetch should provide fresh keys
538
- // Check OpenAI's well-known endpoint for actual expiration dates
539
- validUntil: 1799625600
540
- // Jan 1, 2027 (extended for fallback safety)
536
+ // Jan 1, 2025 (nbf from OpenAI)
537
+ validUntil: 1769029093
538
+ // Jan 21, 2026 (exp from OpenAI)
541
539
  }
542
540
  ]
543
541
  };
@@ -2003,7 +2001,7 @@ var AgentShieldClient = class {
2003
2001
  throw new Error("AgentShield API key is required");
2004
2002
  }
2005
2003
  this.apiKey = config.apiKey;
2006
- this.useEdge = config.useEdge || false;
2004
+ this.useEdge = config.useEdge !== false;
2007
2005
  this.baseUrl = config.baseUrl || (this.useEdge ? EDGE_DETECT_URL : DEFAULT_BASE_URL);
2008
2006
  this.timeout = config.timeout || DEFAULT_TIMEOUT;
2009
2007
  this.debug = config.debug || false;
@@ -2105,7 +2103,8 @@ function getAgentShieldClient(config) {
2105
2103
  clientInstance = new AgentShieldClient({
2106
2104
  apiKey,
2107
2105
  baseUrl: config?.baseUrl || process.env.AGENTSHIELD_API_URL,
2108
- useEdge: config?.useEdge || process.env.AGENTSHIELD_USE_EDGE === "true",
2106
+ // Default to edge detection unless explicitly disabled
2107
+ useEdge: config?.useEdge ?? process.env.AGENTSHIELD_USE_EDGE !== "false",
2109
2108
  timeout: config?.timeout,
2110
2109
  debug: config?.debug || process.env.AGENTSHIELD_DEBUG === "true"
2111
2110
  });