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.
- package/CHANGELOG.md +19 -0
- package/LICENSE +21 -21
- package/README.md +257 -50
- package/bin/agentshield-audit +51 -0
- package/package.json +7 -10
- package/src/adaptive.js +330 -330
- package/src/alert-tuning.js +480 -480
- package/src/attack-surface.js +408 -0
- package/src/audit-streaming.js +1 -1
- package/src/badges.js +196 -196
- package/src/behavioral-dna.js +12 -0
- package/src/canary.js +2 -3
- package/src/certification.js +563 -563
- package/src/circuit-breaker.js +2 -2
- package/src/confused-deputy.js +4 -0
- package/src/continuous-security.js +237 -0
- package/src/conversation.js +494 -494
- package/src/cross-turn.js +3 -17
- package/src/ctf.js +462 -462
- package/src/detector-core.js +845 -105
- package/src/document-scanner.js +795 -795
- package/src/drift-monitor.js +356 -0
- package/src/encoding.js +429 -429
- package/src/enterprise.js +405 -405
- package/src/flight-recorder.js +2 -0
- package/src/i18n-patterns.js +523 -523
- package/src/index.js +19 -0
- package/src/intent-binding.js +314 -0
- package/src/intent-graph.js +381 -0
- package/src/main.js +134 -41
- package/src/mcp-guard.js +1532 -0
- package/src/message-integrity.js +226 -0
- package/src/micro-model.js +939 -0
- package/src/ml-detector.js +316 -0
- package/src/model-finetuning.js +884 -884
- package/src/multimodal.js +296 -296
- package/src/nist-mapping.js +2 -2
- package/src/observability.js +330 -330
- package/src/openclaw.js +450 -450
- package/src/otel.js +544 -544
- package/src/owasp-2025.js +1 -1
- package/src/owasp-agentic.js +420 -0
- package/src/plugin-marketplace.js +628 -628
- package/src/plugin-system.js +349 -349
- package/src/policy-extended.js +635 -635
- package/src/policy.js +443 -443
- package/src/prompt-hardening.js +195 -0
- package/src/prompt-leakage.js +2 -2
- package/src/real-attack-datasets.js +2 -2
- package/src/redteam-cli.js +440 -0
- package/src/self-training.js +586 -631
- package/src/semantic-isolation.js +303 -0
- package/src/sota-benchmark.js +491 -0
- package/src/supply-chain-scanner.js +889 -0
- package/src/testing.js +5 -1
- package/src/threat-encyclopedia.js +629 -629
- package/src/threat-intel-network.js +1017 -1017
- package/src/token-analysis.js +467 -467
- package/src/tool-output-validator.js +354 -354
- 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
|
/**
|