agentshield-sdk 7.3.0 → 8.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 +64 -0
- package/README.md +63 -7
- package/package.json +8 -3
- package/src/agent-intent.js +807 -0
- package/src/agent-protocol.js +4 -0
- package/src/allowlist.js +605 -603
- package/src/audit-streaming.js +486 -469
- package/src/audit.js +1 -1
- package/src/behavior-profiling.js +299 -289
- package/src/behavioral-dna.js +4 -9
- package/src/canary.js +273 -271
- package/src/compliance.js +619 -617
- package/src/confidence-tuning.js +328 -324
- package/src/context-scoring.js +362 -360
- package/src/cost-optimizer.js +1024 -1024
- package/src/cross-turn.js +663 -0
- package/src/detector-core.js +186 -0
- package/src/distributed.js +5 -1
- package/src/embedding.js +310 -307
- package/src/ensemble.js +523 -0
- package/src/herd-immunity.js +12 -12
- package/src/honeypot.js +332 -328
- package/src/integrations.js +1 -2
- package/src/intent-firewall.js +14 -14
- package/src/llm-redteam.js +678 -670
- package/src/main.js +63 -0
- package/src/middleware.js +5 -2
- package/src/model-fingerprint.js +1059 -1042
- package/src/multi-agent-trust.js +459 -453
- package/src/multi-agent.js +1 -1
- package/src/normalizer.js +734 -0
- package/src/persistent-learning.js +677 -0
- package/src/pii.js +4 -0
- package/src/policy-dsl.js +775 -775
- package/src/presets.js +409 -409
- package/src/production.js +22 -9
- package/src/redteam.js +475 -475
- package/src/response-handler.js +436 -429
- package/src/scanners.js +358 -357
- package/src/self-healing.js +368 -363
- package/src/self-training.js +772 -0
- package/src/semantic.js +339 -339
- package/src/shield-score.js +250 -250
- package/src/smart-config.js +812 -0
- package/src/sso-saml.js +8 -4
- package/src/testing.js +24 -2
- package/src/tool-guard.js +412 -412
- package/src/watermark.js +242 -235
- package/src/worker-scanner.js +608 -601
- package/types/index.d.ts +660 -0
package/src/agent-protocol.js
CHANGED
|
@@ -300,6 +300,10 @@ class SecureChannel {
|
|
|
300
300
|
|
|
301
301
|
const { encrypted, signature, sequenceNum } = envelope;
|
|
302
302
|
|
|
303
|
+
if (!encrypted || !signature || sequenceNum === undefined) {
|
|
304
|
+
throw new Error('[Agent Shield] Invalid message envelope: missing required fields');
|
|
305
|
+
}
|
|
306
|
+
|
|
303
307
|
// Verify HMAC signature
|
|
304
308
|
if (!this._verify(encrypted, signature, this.sharedSecret)) {
|
|
305
309
|
throw new Error('[Agent Shield] Message signature verification failed');
|