agentshield-sdk 8.0.0 → 11.0.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +21 -21
  3. package/README.md +257 -50
  4. package/bin/agentshield-audit +51 -0
  5. package/package.json +7 -10
  6. package/src/adaptive.js +330 -330
  7. package/src/alert-tuning.js +480 -480
  8. package/src/attack-surface.js +408 -0
  9. package/src/audit-streaming.js +1 -1
  10. package/src/badges.js +196 -196
  11. package/src/behavioral-dna.js +12 -0
  12. package/src/canary.js +2 -3
  13. package/src/certification.js +563 -563
  14. package/src/circuit-breaker.js +2 -2
  15. package/src/confused-deputy.js +4 -0
  16. package/src/continuous-security.js +237 -0
  17. package/src/conversation.js +494 -494
  18. package/src/cross-turn.js +3 -17
  19. package/src/ctf.js +462 -462
  20. package/src/detector-core.js +845 -105
  21. package/src/document-scanner.js +795 -795
  22. package/src/drift-monitor.js +356 -0
  23. package/src/encoding.js +429 -429
  24. package/src/enterprise.js +405 -405
  25. package/src/flight-recorder.js +2 -0
  26. package/src/i18n-patterns.js +523 -523
  27. package/src/index.js +19 -0
  28. package/src/intent-binding.js +314 -0
  29. package/src/intent-graph.js +381 -0
  30. package/src/main.js +134 -41
  31. package/src/mcp-guard.js +1532 -0
  32. package/src/message-integrity.js +226 -0
  33. package/src/micro-model.js +939 -0
  34. package/src/ml-detector.js +316 -0
  35. package/src/model-finetuning.js +884 -884
  36. package/src/multimodal.js +296 -296
  37. package/src/nist-mapping.js +2 -2
  38. package/src/observability.js +330 -330
  39. package/src/openclaw.js +450 -450
  40. package/src/otel.js +544 -544
  41. package/src/owasp-2025.js +1 -1
  42. package/src/owasp-agentic.js +420 -0
  43. package/src/plugin-marketplace.js +628 -628
  44. package/src/plugin-system.js +349 -349
  45. package/src/policy-extended.js +635 -635
  46. package/src/policy.js +443 -443
  47. package/src/prompt-hardening.js +195 -0
  48. package/src/prompt-leakage.js +2 -2
  49. package/src/real-attack-datasets.js +2 -2
  50. package/src/redteam-cli.js +440 -0
  51. package/src/self-training.js +586 -631
  52. package/src/semantic-isolation.js +303 -0
  53. package/src/sota-benchmark.js +491 -0
  54. package/src/supply-chain-scanner.js +889 -0
  55. package/src/testing.js +5 -1
  56. package/src/threat-encyclopedia.js +629 -629
  57. package/src/threat-intel-network.js +1017 -1017
  58. package/src/token-analysis.js +467 -467
  59. package/src/tool-output-validator.js +354 -354
  60. package/src/watermark.js +1 -2
package/src/cross-turn.js CHANGED
@@ -263,11 +263,7 @@ class CrossTurnTracker {
263
263
 
264
264
  if (crossTurnDetection) {
265
265
  this._stats.crossTurnDetections++;
266
- console.log(
267
- '[Agent Shield] Cross-turn injection detected: ' +
268
- crossTurnThreats.length + ' threat(s) found across ' +
269
- eligible.length + ' messages'
270
- );
266
+ console.log('[Agent Shield] Cross-turn injection detected: ' + crossTurnThreats.length + ' threat(s) found across ' + eligible.length + ' messages');
271
267
 
272
268
  if (this.onDetection) {
273
269
  try {
@@ -435,13 +431,7 @@ class AdaptiveThresholdCalibrator {
435
431
  thresholds[category] = newThreshold;
436
432
  }
437
433
 
438
- console.log(
439
- '[Agent Shield] Adaptive thresholds recalibrated (round ' +
440
- this._calibrationCount + '): ' +
441
- Object.entries(thresholds)
442
- .map(([cat, th]) => cat + '=' + th.toFixed(3))
443
- .join(', ')
444
- );
434
+ console.log('[Agent Shield] Adaptive thresholds recalibrated (round ' + this._calibrationCount + '): ' + Object.entries(thresholds).map(([cat, th]) => cat + '=' + th.toFixed(3)).join(', '));
445
435
 
446
436
  return {
447
437
  thresholds,
@@ -554,11 +544,7 @@ class AdaptiveThresholdCalibrator {
554
544
  this._categories['default'] = this._createCategoryData();
555
545
  }
556
546
 
557
- console.log(
558
- '[Agent Shield] Calibration data imported: ' +
559
- this._totalSamples + ' samples, ' +
560
- Object.keys(this._categories).length + ' categories'
561
- );
547
+ console.log('[Agent Shield] Calibration data imported: ' + this._totalSamples + ' samples, ' + Object.keys(this._categories).length + ' categories');
562
548
  }
563
549
 
564
550
  /**