nat-engine 1__py3-none-any.whl
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.
- mannf/__init__.py +33 -0
- mannf/__main__.py +10 -0
- mannf/_version.py +8 -0
- mannf/agents/__init__.py +7 -0
- mannf/agents/analyzer_agent.py +9 -0
- mannf/agents/base.py +9 -0
- mannf/agents/bdi_agent.py +9 -0
- mannf/agents/belief_state.py +9 -0
- mannf/agents/coordinator_agent.py +9 -0
- mannf/agents/executor_agent.py +9 -0
- mannf/agents/monitor_agent.py +9 -0
- mannf/agents/oracle_agent.py +9 -0
- mannf/agents/planner_agent.py +9 -0
- mannf/agents/test_agent.py +9 -0
- mannf/anomaly/__init__.py +7 -0
- mannf/anomaly/enhanced_detector.py +9 -0
- mannf/cli.py +9 -0
- mannf/core/__init__.py +26 -0
- mannf/core/agents/__init__.py +52 -0
- mannf/core/agents/accessibility_scanner_agent.py +245 -0
- mannf/core/agents/analyzer_agent.py +224 -0
- mannf/core/agents/autonomous_loop_agent.py +1086 -0
- mannf/core/agents/autonomous_loop_models.py +62 -0
- mannf/core/agents/autonomous_run_differ.py +427 -0
- mannf/core/agents/base.py +128 -0
- mannf/core/agents/bdi_agent.py +330 -0
- mannf/core/agents/belief_state.py +202 -0
- mannf/core/agents/browser_coordinator_agent.py +224 -0
- mannf/core/agents/browser_executor_agent.py +410 -0
- mannf/core/agents/coordinator_agent.py +262 -0
- mannf/core/agents/executor_agent.py +222 -0
- mannf/core/agents/monitor_agent.py +188 -0
- mannf/core/agents/oracle_agent.py +150 -0
- mannf/core/agents/performance_testing_agent.py +279 -0
- mannf/core/agents/planner_agent.py +128 -0
- mannf/core/agents/test_agent.py +249 -0
- mannf/core/agents/visual_regression_agent.py +311 -0
- mannf/core/agents/web_crawler_agent.py +510 -0
- mannf/core/agents/worker_pool.py +366 -0
- mannf/core/anomaly/__init__.py +14 -0
- mannf/core/anomaly/enhanced_detector.py +541 -0
- mannf/core/browser/__init__.py +63 -0
- mannf/core/browser/accessibility_scanner.py +424 -0
- mannf/core/browser/discovery_model.py +178 -0
- mannf/core/browser/dom_snapshot.py +349 -0
- mannf/core/browser/ingestor_bridge.py +371 -0
- mannf/core/browser/performance_metrics.py +217 -0
- mannf/core/browser/reflection_analyzer.py +442 -0
- mannf/core/browser/scenario_generator.py +1100 -0
- mannf/core/browser/security_scenario_generator.py +695 -0
- mannf/core/browser/visual_comparer.py +159 -0
- mannf/core/diagnostics/__init__.py +28 -0
- mannf/core/diagnostics/failure_clusterer.py +211 -0
- mannf/core/diagnostics/flake_detector.py +233 -0
- mannf/core/diagnostics/root_cause_analyzer.py +273 -0
- mannf/core/distributed/__init__.py +16 -0
- mannf/core/distributed/endpoint.py +139 -0
- mannf/core/distributed/system_under_test.py +207 -0
- mannf/core/functional_orchestrator.py +428 -0
- mannf/core/messaging/__init__.py +11 -0
- mannf/core/messaging/bus.py +113 -0
- mannf/core/messaging/messages.py +89 -0
- mannf/core/nat_orchestrator.py +342 -0
- mannf/core/neural/__init__.py +183 -0
- mannf/core/orchestrator.py +272 -0
- mannf/core/prioritization/__init__.py +17 -0
- mannf/core/prioritization/adaptive_controller.py +509 -0
- mannf/core/prioritization/belief_prioritizer.py +231 -0
- mannf/core/prioritization/risk_scorer.py +430 -0
- mannf/core/reporting/__init__.py +12 -0
- mannf/core/reporting/unified_report.py +664 -0
- mannf/core/testing/__init__.py +17 -0
- mannf/core/testing/adaptive_controller.py +149 -0
- mannf/core/testing/models.py +179 -0
- mannf/core/validation/__init__.py +10 -0
- mannf/core/validation/self_validation_runner.py +180 -0
- mannf/dashboard/__init__.py +7 -0
- mannf/dashboard/app.py +9 -0
- mannf/dashboard/models.py +9 -0
- mannf/dashboard/static/index.html +2538 -0
- mannf/dashboard/telemetry.py +9 -0
- mannf/distributed/__init__.py +7 -0
- mannf/distributed/endpoint.py +9 -0
- mannf/distributed/system_under_test.py +9 -0
- mannf/healing/__init__.py +7 -0
- mannf/healing/graphql_schema_diff.py +9 -0
- mannf/healing/healer.py +9 -0
- mannf/healing/models.py +9 -0
- mannf/healing/schema_diff.py +9 -0
- mannf/integrations/__init__.py +7 -0
- mannf/integrations/auth.py +9 -0
- mannf/integrations/graphql_parser.py +9 -0
- mannf/integrations/graphql_sut.py +9 -0
- mannf/integrations/http_sut.py +9 -0
- mannf/integrations/openapi_parser.py +9 -0
- mannf/integrations/postman_parser.py +9 -0
- mannf/llm/__init__.py +7 -0
- mannf/llm/anthropic_provider.py +9 -0
- mannf/llm/base.py +9 -0
- mannf/llm/config.py +9 -0
- mannf/llm/factory.py +9 -0
- mannf/llm/openai_provider.py +9 -0
- mannf/llm/prompts.py +9 -0
- mannf/messaging/__init__.py +7 -0
- mannf/messaging/bus.py +9 -0
- mannf/messaging/messages.py +9 -0
- mannf/nat_orchestrator.py +9 -0
- mannf/neural/__init__.py +7 -0
- mannf/orchestrator.py +9 -0
- mannf/prioritization/__init__.py +7 -0
- mannf/prioritization/adaptive_controller.py +9 -0
- mannf/prioritization/belief_prioritizer.py +9 -0
- mannf/prioritization/risk_scorer.py +9 -0
- mannf/product/__init__.py +29 -0
- mannf/product/admin/__init__.py +3 -0
- mannf/product/admin/routes.py +514 -0
- mannf/product/auth/__init__.py +5 -0
- mannf/product/auth/saml.py +212 -0
- mannf/product/billing/__init__.py +5 -0
- mannf/product/billing/audit.py +160 -0
- mannf/product/billing/feature_gates.py +180 -0
- mannf/product/billing/metering.py +179 -0
- mannf/product/billing/notifications.py +181 -0
- mannf/product/billing/plans.py +133 -0
- mannf/product/billing/rate_limits.py +35 -0
- mannf/product/billing/stripe_billing.py +906 -0
- mannf/product/billing/tenant_auth.py +233 -0
- mannf/product/billing/tenant_manager.py +873 -0
- mannf/product/cli.py +3900 -0
- mannf/product/cli_admin.py +408 -0
- mannf/product/dashboard/__init__.py +61 -0
- mannf/product/dashboard/app.py +3567 -0
- mannf/product/dashboard/models.py +460 -0
- mannf/product/dashboard/static/index.html +6347 -0
- mannf/product/dashboard/static/manifest.json +25 -0
- mannf/product/dashboard/static/pwa-icon-192.png +0 -0
- mannf/product/dashboard/static/pwa-icon-512.png +0 -0
- mannf/product/dashboard/static/sw.js +64 -0
- mannf/product/dashboard/telemetry.py +547 -0
- mannf/product/database.py +145 -0
- mannf/product/demo.py +844 -0
- mannf/product/doctor.py +509 -0
- mannf/product/exporters/__init__.py +65 -0
- mannf/product/exporters/azuredevops_exporter.py +257 -0
- mannf/product/exporters/base.py +307 -0
- mannf/product/exporters/bugzilla_exporter.py +200 -0
- mannf/product/exporters/dedup.py +275 -0
- mannf/product/exporters/finding_adapter.py +216 -0
- mannf/product/exporters/github_exporter.py +197 -0
- mannf/product/exporters/gitlab_exporter.py +215 -0
- mannf/product/exporters/jira_exporter.py +180 -0
- mannf/product/exporters/linear_exporter.py +195 -0
- mannf/product/exporters/loader.py +233 -0
- mannf/product/exporters/pagerduty_exporter.py +363 -0
- mannf/product/exporters/sentry_exporter.py +322 -0
- mannf/product/exporters/servicenow_exporter.py +240 -0
- mannf/product/exporters/shortcut_exporter.py +231 -0
- mannf/product/exporters/webhook_exporter.py +383 -0
- mannf/product/formatters/__init__.py +18 -0
- mannf/product/formatters/allure_formatter.py +161 -0
- mannf/product/formatters/ctrf_formatter.py +149 -0
- mannf/product/healing/__init__.py +30 -0
- mannf/product/healing/graphql_schema_diff.py +152 -0
- mannf/product/healing/healer.py +141 -0
- mannf/product/healing/models.py +175 -0
- mannf/product/healing/schema_diff.py +251 -0
- mannf/product/ingestors/__init__.py +77 -0
- mannf/product/ingestors/base.py +256 -0
- mannf/product/ingestors/bgstm_ingestor.py +764 -0
- mannf/product/ingestors/curl_ingestor.py +1019 -0
- mannf/product/ingestors/cypress_ingestor.py +487 -0
- mannf/product/ingestors/gherkin_ingestor.py +967 -0
- mannf/product/ingestors/graphql_ingestor.py +845 -0
- mannf/product/ingestors/grpc_ingestor.py +591 -0
- mannf/product/ingestors/har_ingestor.py +976 -0
- mannf/product/ingestors/loader.py +284 -0
- mannf/product/ingestors/models.py +146 -0
- mannf/product/ingestors/openapi_ingestor.py +606 -0
- mannf/product/ingestors/playwright_ingestor.py +449 -0
- mannf/product/ingestors/postman_ingestor.py +631 -0
- mannf/product/ingestors/traffic_ingestor.py +679 -0
- mannf/product/ingestors/websocket_ingestor.py +526 -0
- mannf/product/integrations/__init__.py +21 -0
- mannf/product/integrations/auth.py +190 -0
- mannf/product/integrations/graphql_parser.py +436 -0
- mannf/product/integrations/graphql_sut.py +247 -0
- mannf/product/integrations/grpc_sut.py +469 -0
- mannf/product/integrations/http_sut.py +237 -0
- mannf/product/integrations/kafka_adapter.py +342 -0
- mannf/product/integrations/openapi_parser.py +513 -0
- mannf/product/integrations/postman_parser.py +467 -0
- mannf/product/integrations/webhook_receiver.py +344 -0
- mannf/product/integrations/websocket_sut.py +434 -0
- mannf/product/llm/__init__.py +25 -0
- mannf/product/llm/anthropic_provider.py +94 -0
- mannf/product/llm/base.py +267 -0
- mannf/product/llm/config.py +48 -0
- mannf/product/llm/factory.py +42 -0
- mannf/product/llm/openai_provider.py +93 -0
- mannf/product/llm/prompts.py +403 -0
- mannf/product/llm/root_cause_service.py +311 -0
- mannf/product/llm/test_plan_models.py +78 -0
- mannf/product/metrics.py +149 -0
- mannf/product/middleware/__init__.py +3 -0
- mannf/product/middleware/audit_middleware.py +112 -0
- mannf/product/middleware/tenant_isolation.py +114 -0
- mannf/product/models.py +347 -0
- mannf/product/notifications/__init__.py +24 -0
- mannf/product/notifications/dispatcher.py +411 -0
- mannf/product/onboarding.py +190 -0
- mannf/product/orchestration/__init__.py +39 -0
- mannf/product/orchestration/ingest_scan_orchestrator.py +339 -0
- mannf/product/orchestration/pipeline.py +401 -0
- mannf/product/orchestrator.py +987 -0
- mannf/product/orchestrator_models.py +269 -0
- mannf/product/regression/__init__.py +36 -0
- mannf/product/regression/differ.py +172 -0
- mannf/product/regression/masking.py +100 -0
- mannf/product/regression/models.py +232 -0
- mannf/product/regression/recorder.py +124 -0
- mannf/product/regression/replayer.py +168 -0
- mannf/product/reports/__init__.py +10 -0
- mannf/product/reports/pdf.py +132 -0
- mannf/product/scheduling/__init__.py +57 -0
- mannf/product/scheduling/cron_utils.py +251 -0
- mannf/product/scheduling/engine.py +473 -0
- mannf/product/scheduling/models.py +86 -0
- mannf/product/scheduling/queue.py +894 -0
- mannf/product/scheduling/store.py +235 -0
- mannf/product/security/__init__.py +21 -0
- mannf/product/security/belief_guided.py +143 -0
- mannf/product/security/checks/__init__.py +55 -0
- mannf/product/security/checks/base.py +69 -0
- mannf/product/security/checks/bfla.py +77 -0
- mannf/product/security/checks/bola.py +77 -0
- mannf/product/security/checks/bopla.py +80 -0
- mannf/product/security/checks/broken_auth.py +86 -0
- mannf/product/security/checks/graphql_security.py +299 -0
- mannf/product/security/checks/inventory.py +70 -0
- mannf/product/security/checks/misconfig.py +158 -0
- mannf/product/security/checks/resource_consumption.py +70 -0
- mannf/product/security/checks/sensitive_flows.py +80 -0
- mannf/product/security/checks/ssrf.py +101 -0
- mannf/product/security/checks/unsafe_consumption.py +120 -0
- mannf/product/security/models.py +92 -0
- mannf/product/security/plugin_loader.py +182 -0
- mannf/product/security/reporter.py +92 -0
- mannf/product/security/scanner.py +183 -0
- mannf/product/server.py +6220 -0
- mannf/product/setup_wizard.py +873 -0
- mannf/product/status.py +404 -0
- mannf/product/storage/__init__.py +10 -0
- mannf/product/storage/artifact_store.py +343 -0
- mannf/product/telemetry.py +300 -0
- mannf/product/uninstall.py +169 -0
- mannf/product/upgrade.py +139 -0
- mannf/product/weights/__init__.py +13 -0
- mannf/product/weights/blob_store.py +299 -0
- mannf/product/weights/factory.py +42 -0
- mannf/product/weights/registry.py +159 -0
- mannf/product/weights/store.py +210 -0
- mannf/regression/__init__.py +7 -0
- mannf/regression/differ.py +9 -0
- mannf/regression/masking.py +9 -0
- mannf/regression/models.py +9 -0
- mannf/regression/recorder.py +9 -0
- mannf/regression/replayer.py +9 -0
- mannf/security/__init__.py +7 -0
- mannf/security/belief_guided.py +9 -0
- mannf/security/checks/__init__.py +7 -0
- mannf/security/checks/base.py +9 -0
- mannf/security/checks/bfla.py +9 -0
- mannf/security/checks/bola.py +9 -0
- mannf/security/checks/bopla.py +9 -0
- mannf/security/checks/broken_auth.py +9 -0
- mannf/security/checks/graphql_security.py +9 -0
- mannf/security/checks/inventory.py +9 -0
- mannf/security/checks/misconfig.py +9 -0
- mannf/security/checks/resource_consumption.py +9 -0
- mannf/security/checks/sensitive_flows.py +9 -0
- mannf/security/checks/ssrf.py +9 -0
- mannf/security/checks/unsafe_consumption.py +9 -0
- mannf/security/models.py +9 -0
- mannf/security/reporter.py +9 -0
- mannf/security/scanner.py +9 -0
- mannf/server.py +9 -0
- mannf/testing/__init__.py +7 -0
- mannf/testing/adaptive_controller.py +9 -0
- mannf/testing/models.py +9 -0
- mannf/weights/__init__.py +7 -0
- mannf/weights/registry.py +9 -0
- mannf/weights/store.py +9 -0
- nat_engine-1.dist-info/METADATA +555 -0
- nat_engine-1.dist-info/RECORD +299 -0
- nat_engine-1.dist-info/WHEEL +5 -0
- nat_engine-1.dist-info/entry_points.txt +4 -0
- nat_engine-1.dist-info/licenses/LICENSE +651 -0
- nat_engine-1.dist-info/licenses/NOTICE +178 -0
- nat_engine-1.dist-info/top_level.txt +1 -0
mannf/__init__.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
MANNF – Multi-Agent Neural Network Framework
|
|
8
|
+
for Adaptive Testing of Large-Scale Distributed Software Systems.
|
|
9
|
+
|
|
10
|
+
Implements NeuroAgentTest (NAT) from the 1999 doctoral thesis by J. Brad
|
|
11
|
+
Guider, adapted to modern Python using:
|
|
12
|
+
• asyncio for concurrent agent execution
|
|
13
|
+
• NumPy-based neural networks with backpropagation
|
|
14
|
+
• BDI (Belief–Desire–Intention) agent architecture
|
|
15
|
+
• Extended Contract Net Protocol (ECNP) for task coordination
|
|
16
|
+
• Dataclasses & type hints throughout
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from mannf.core.orchestrator import Orchestrator
|
|
20
|
+
from mannf.core.nat_orchestrator import NATOrchestrator
|
|
21
|
+
from mannf.core.testing.models import TestCase, TestResult, TestSuite
|
|
22
|
+
from mannf.core.distributed.system_under_test import SystemUnderTest
|
|
23
|
+
from mannf.core.agents.belief_state import BeliefState
|
|
24
|
+
from mannf._version import __version__
|
|
25
|
+
__all__ = [
|
|
26
|
+
"Orchestrator",
|
|
27
|
+
"NATOrchestrator",
|
|
28
|
+
"TestCase",
|
|
29
|
+
"TestResult",
|
|
30
|
+
"TestSuite",
|
|
31
|
+
"SystemUnderTest",
|
|
32
|
+
"BeliefState",
|
|
33
|
+
]
|
mannf/__main__.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
"""Enable ``python -m mannf`` execution."""
|
|
7
|
+
|
|
8
|
+
from mannf.cli import main
|
|
9
|
+
|
|
10
|
+
main()
|
mannf/_version.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Copyright (C) 2026 NAT Contributors
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
"""Single source of truth for the NAT package version."""
|
|
7
|
+
|
|
8
|
+
__version__ = "1.0.0"
|
mannf/agents/__init__.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents
|
|
7
|
+
from mannf.core.agents import * # noqa: F401, F403
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents.analyzer_agent
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.agents.analyzer_agent as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
mannf/agents/base.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents.base
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.agents.base as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents.bdi_agent
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.agents.bdi_agent as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents.belief_state
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.agents.belief_state as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents.coordinator_agent
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.agents.coordinator_agent as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents.executor_agent
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.agents.executor_agent as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents.monitor_agent
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.agents.monitor_agent as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents.oracle_agent
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.agents.oracle_agent as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents.planner_agent
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.agents.planner_agent as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.agents.test_agent
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.agents.test_agent as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.anomaly
|
|
7
|
+
from mannf.core.anomaly import * # noqa: F401, F403
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.core.anomaly.enhanced_detector
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.core.anomaly.enhanced_detector as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
mannf/cli.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
# Backward-compatible shim — source of truth has moved to mannf.product.cli
|
|
7
|
+
import sys
|
|
8
|
+
import mannf.product.cli as _real
|
|
9
|
+
sys.modules[__name__] = _real
|
mannf/core/__init__.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
NAT Core Engine — IP-protected algorithms and BDI/ECNP framework.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from mannf.core.orchestrator import Orchestrator
|
|
11
|
+
from mannf.core.nat_orchestrator import NATOrchestrator
|
|
12
|
+
from mannf.core.testing.models import TestCase, TestResult, TestSuite
|
|
13
|
+
from mannf.core.distributed.system_under_test import SystemUnderTest
|
|
14
|
+
from mannf.core.agents.belief_state import BeliefState
|
|
15
|
+
from mannf.core.reporting import UnifiedReportGenerator
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
"Orchestrator",
|
|
19
|
+
"NATOrchestrator",
|
|
20
|
+
"TestCase",
|
|
21
|
+
"TestResult",
|
|
22
|
+
"TestSuite",
|
|
23
|
+
"SystemUnderTest",
|
|
24
|
+
"BeliefState",
|
|
25
|
+
"UnifiedReportGenerator",
|
|
26
|
+
]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
"""Agents sub-package for the Multi-Agent Neural Network Framework."""
|
|
7
|
+
|
|
8
|
+
from mannf.core.agents.base import BaseAgent
|
|
9
|
+
from mannf.core.agents.bdi_agent import BDIAgent
|
|
10
|
+
from mannf.core.agents.belief_state import BeliefState
|
|
11
|
+
from mannf.core.agents.test_agent import TestAgent
|
|
12
|
+
from mannf.core.agents.monitor_agent import MonitorAgent
|
|
13
|
+
from mannf.core.agents.oracle_agent import OracleAgent
|
|
14
|
+
from mannf.core.agents.planner_agent import PlannerAgent
|
|
15
|
+
from mannf.core.agents.executor_agent import ExecutorAgent
|
|
16
|
+
from mannf.core.agents.analyzer_agent import AnalyzerAgent
|
|
17
|
+
from mannf.core.agents.coordinator_agent import CoordinatorAgent
|
|
18
|
+
from mannf.core.agents.browser_executor_agent import BrowserExecutorAgent
|
|
19
|
+
from mannf.core.agents.browser_coordinator_agent import BrowserCoordinatorAgent
|
|
20
|
+
from mannf.core.agents.visual_regression_agent import VisualRegressionAgent
|
|
21
|
+
from mannf.core.agents.accessibility_scanner_agent import AccessibilityScannerAgent
|
|
22
|
+
from mannf.core.agents.performance_testing_agent import PerformanceTestingAgent
|
|
23
|
+
from mannf.core.agents.web_crawler_agent import WebCrawlerAgent
|
|
24
|
+
from mannf.core.agents.worker_pool import WorkerPool
|
|
25
|
+
|
|
26
|
+
__all__ = [
|
|
27
|
+
"BaseAgent",
|
|
28
|
+
"BDIAgent",
|
|
29
|
+
"BeliefState",
|
|
30
|
+
# Original agents (backward-compat)
|
|
31
|
+
"TestAgent",
|
|
32
|
+
"MonitorAgent",
|
|
33
|
+
"OracleAgent",
|
|
34
|
+
# NAT BDI agents
|
|
35
|
+
"PlannerAgent",
|
|
36
|
+
"ExecutorAgent",
|
|
37
|
+
"AnalyzerAgent",
|
|
38
|
+
"CoordinatorAgent",
|
|
39
|
+
# Browser / Functional Testing agents
|
|
40
|
+
"BrowserExecutorAgent",
|
|
41
|
+
"BrowserCoordinatorAgent",
|
|
42
|
+
# Visual Regression
|
|
43
|
+
"VisualRegressionAgent",
|
|
44
|
+
# Accessibility Scanning
|
|
45
|
+
"AccessibilityScannerAgent",
|
|
46
|
+
# Performance Testing
|
|
47
|
+
"PerformanceTestingAgent",
|
|
48
|
+
# Web Crawler
|
|
49
|
+
"WebCrawlerAgent",
|
|
50
|
+
# Worker Pool
|
|
51
|
+
"WorkerPool",
|
|
52
|
+
]
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# Copyright (C) 2026 Brad Guider
|
|
2
|
+
# This file is part of NAT (Neural Agent Testing Framework).
|
|
3
|
+
# Licensed under the AGPL-3.0. See LICENSE for details.
|
|
4
|
+
# Commercial licensing available — see COMMERCIAL_LICENSE.md.
|
|
5
|
+
|
|
6
|
+
"""AccessibilityScannerAgent – BDI agent that audits page accessibility.
|
|
7
|
+
|
|
8
|
+
Listens for :attr:`~mannf.core.messaging.messages.MessageType.DOM_SNAPSHOT`
|
|
9
|
+
events published by browser agents, runs
|
|
10
|
+
:func:`~mannf.core.browser.accessibility_scanner.scan_accessibility` against
|
|
11
|
+
the registered :class:`~mannf.core.browser.dom_snapshot.DOMSnapshot`, and
|
|
12
|
+
publishes :attr:`~MessageType.ACCESSIBILITY_SCAN_RESULT` with the findings.
|
|
13
|
+
|
|
14
|
+
DOM snapshots must be deposited via :meth:`register_snapshot` before (or
|
|
15
|
+
immediately after) the :attr:`~MessageType.DOM_SNAPSHOT` message arrives so
|
|
16
|
+
the agent can retrieve them for analysis.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
import logging
|
|
22
|
+
from typing import Any
|
|
23
|
+
|
|
24
|
+
from mannf.core.agents.bdi_agent import BDIAgent
|
|
25
|
+
from mannf.core.browser.accessibility_scanner import (
|
|
26
|
+
AccessibilityScanResult,
|
|
27
|
+
scan_accessibility,
|
|
28
|
+
)
|
|
29
|
+
from mannf.core.browser.dom_snapshot import DOMSnapshot
|
|
30
|
+
from mannf.core.messaging.bus import MessageBus
|
|
31
|
+
from mannf.core.messaging.messages import Message, MessageType
|
|
32
|
+
|
|
33
|
+
logger = logging.getLogger(__name__)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class AccessibilityScannerAgent(BDIAgent):
|
|
37
|
+
"""BDI agent that performs accessibility scanning on captured DOM snapshots.
|
|
38
|
+
|
|
39
|
+
Parameters
|
|
40
|
+
----------
|
|
41
|
+
agent_id:
|
|
42
|
+
Unique identifier for this agent.
|
|
43
|
+
bus:
|
|
44
|
+
Shared message bus.
|
|
45
|
+
service_names:
|
|
46
|
+
Services in the system under test (forwarded to :class:`BDIAgent`).
|
|
47
|
+
min_compliance_score:
|
|
48
|
+
Minimum compliance percentage (0–100) below which a scan is considered
|
|
49
|
+
failing. Defaults to ``80.0``.
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
def __init__(
|
|
53
|
+
self,
|
|
54
|
+
agent_id: str,
|
|
55
|
+
bus: MessageBus,
|
|
56
|
+
service_names: list[str],
|
|
57
|
+
min_compliance_score: float = 80.0,
|
|
58
|
+
) -> None:
|
|
59
|
+
super().__init__(agent_id=agent_id, bus=bus, service_names=service_names)
|
|
60
|
+
|
|
61
|
+
self._min_compliance_score = min_compliance_score
|
|
62
|
+
|
|
63
|
+
# url -> DOMSnapshot deposited by browser agents / orchestrator
|
|
64
|
+
self._snapshot_registry: dict[str, DOMSnapshot] = {}
|
|
65
|
+
|
|
66
|
+
# Scan results accumulated across all processed snapshots
|
|
67
|
+
self._scan_results: list[AccessibilityScanResult] = []
|
|
68
|
+
|
|
69
|
+
# ------------------------------------------------------------------
|
|
70
|
+
# BDIAgent contract
|
|
71
|
+
# ------------------------------------------------------------------
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def subscribed_types(self) -> set[MessageType]:
|
|
75
|
+
return {
|
|
76
|
+
MessageType.DOM_SNAPSHOT,
|
|
77
|
+
MessageType.INTERACTION_RESULT,
|
|
78
|
+
MessageType.BELIEF_UPDATE,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async def _handle_message(self, message: Message) -> None:
|
|
82
|
+
if message.type == MessageType.DOM_SNAPSHOT:
|
|
83
|
+
await self._on_dom_snapshot(message)
|
|
84
|
+
elif message.type == MessageType.INTERACTION_RESULT:
|
|
85
|
+
self._on_interaction_result(message)
|
|
86
|
+
elif message.type == MessageType.BELIEF_UPDATE:
|
|
87
|
+
payload = message.payload or {}
|
|
88
|
+
peer_beliefs = payload.get("beliefs", {})
|
|
89
|
+
if peer_beliefs:
|
|
90
|
+
self._absorb_peer_beliefs(message.sender_id, peer_beliefs)
|
|
91
|
+
|
|
92
|
+
# ------------------------------------------------------------------
|
|
93
|
+
# Snapshot registry
|
|
94
|
+
# ------------------------------------------------------------------
|
|
95
|
+
|
|
96
|
+
def register_snapshot(self, url: str, snapshot: DOMSnapshot) -> None:
|
|
97
|
+
"""Deposit a :class:`DOMSnapshot` for the given URL.
|
|
98
|
+
|
|
99
|
+
The snapshot will be retrieved when a
|
|
100
|
+
:attr:`~MessageType.DOM_SNAPSHOT` message arrives for *url*.
|
|
101
|
+
|
|
102
|
+
Parameters
|
|
103
|
+
----------
|
|
104
|
+
url:
|
|
105
|
+
The page URL the snapshot was captured from.
|
|
106
|
+
snapshot:
|
|
107
|
+
The :class:`DOMSnapshot` to store.
|
|
108
|
+
"""
|
|
109
|
+
self._snapshot_registry[url] = snapshot
|
|
110
|
+
|
|
111
|
+
# ------------------------------------------------------------------
|
|
112
|
+
# Message handlers
|
|
113
|
+
# ------------------------------------------------------------------
|
|
114
|
+
|
|
115
|
+
async def _on_dom_snapshot(self, message: Message) -> None:
|
|
116
|
+
payload = message.payload or {}
|
|
117
|
+
url: str = payload.get("url", "")
|
|
118
|
+
|
|
119
|
+
snapshot = self._snapshot_registry.get(url)
|
|
120
|
+
if snapshot is None:
|
|
121
|
+
logger.debug(
|
|
122
|
+
"AccessibilityScannerAgent %s: no snapshot registered for %s — skipping",
|
|
123
|
+
self.agent_id, url,
|
|
124
|
+
)
|
|
125
|
+
return
|
|
126
|
+
|
|
127
|
+
await self._run_scan(url, snapshot)
|
|
128
|
+
|
|
129
|
+
def _on_interaction_result(self, message: Message) -> None:
|
|
130
|
+
# No-op — retained for symmetry with VisualRegressionAgent and to allow
|
|
131
|
+
# future enrichment (e.g. correlating scan results to test steps).
|
|
132
|
+
pass
|
|
133
|
+
|
|
134
|
+
# ------------------------------------------------------------------
|
|
135
|
+
# Core scanning logic
|
|
136
|
+
# ------------------------------------------------------------------
|
|
137
|
+
|
|
138
|
+
async def _run_scan(self, url: str, snapshot: DOMSnapshot) -> AccessibilityScanResult:
|
|
139
|
+
"""Run the accessibility scan on *snapshot* and publish the result.
|
|
140
|
+
|
|
141
|
+
Parameters
|
|
142
|
+
----------
|
|
143
|
+
url:
|
|
144
|
+
Page URL (used for logging and the published payload).
|
|
145
|
+
snapshot:
|
|
146
|
+
The :class:`DOMSnapshot` to audit.
|
|
147
|
+
|
|
148
|
+
Returns
|
|
149
|
+
-------
|
|
150
|
+
AccessibilityScanResult
|
|
151
|
+
The scan outcome (also stored internally for reporting).
|
|
152
|
+
"""
|
|
153
|
+
result = scan_accessibility(snapshot)
|
|
154
|
+
self._scan_results.append(result)
|
|
155
|
+
|
|
156
|
+
passed = result.compliance_score >= self._min_compliance_score
|
|
157
|
+
logger.info(
|
|
158
|
+
"AccessibilityScannerAgent %s: url=%s violations=%d score=%.1f%% %s",
|
|
159
|
+
self.agent_id,
|
|
160
|
+
url,
|
|
161
|
+
result.violation_count,
|
|
162
|
+
result.compliance_score,
|
|
163
|
+
"PASS" if passed else "FAIL",
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
await self._publish(
|
|
167
|
+
Message(
|
|
168
|
+
MessageType.ACCESSIBILITY_SCAN_RESULT,
|
|
169
|
+
sender_id=self.agent_id,
|
|
170
|
+
payload={
|
|
171
|
+
"url": url,
|
|
172
|
+
"violation_count": result.violation_count,
|
|
173
|
+
"compliance_score": result.compliance_score,
|
|
174
|
+
"passed": passed,
|
|
175
|
+
"violations": [
|
|
176
|
+
{
|
|
177
|
+
"rule_id": v.rule_id,
|
|
178
|
+
"description": v.description,
|
|
179
|
+
"impact": v.impact,
|
|
180
|
+
"wcag_criteria": v.wcag_criteria,
|
|
181
|
+
"selector": v.selector,
|
|
182
|
+
"element_html": v.element_html,
|
|
183
|
+
}
|
|
184
|
+
for v in result.violations
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
)
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
return result
|
|
191
|
+
|
|
192
|
+
# ------------------------------------------------------------------
|
|
193
|
+
# Reporting
|
|
194
|
+
# ------------------------------------------------------------------
|
|
195
|
+
|
|
196
|
+
def get_accessibility_report(self) -> dict[str, Any]:
|
|
197
|
+
"""Return a summary of all accessibility scans performed.
|
|
198
|
+
|
|
199
|
+
Returns
|
|
200
|
+
-------
|
|
201
|
+
dict
|
|
202
|
+
``{total_scans, passed, failed, avg_compliance_score,
|
|
203
|
+
results: [{url, violation_count, compliance_score, passed}...]}``
|
|
204
|
+
"""
|
|
205
|
+
total = len(self._scan_results)
|
|
206
|
+
passed_count = sum(
|
|
207
|
+
1 for r in self._scan_results
|
|
208
|
+
if r.compliance_score >= self._min_compliance_score
|
|
209
|
+
)
|
|
210
|
+
failed_count = total - passed_count
|
|
211
|
+
avg_score = (
|
|
212
|
+
round(
|
|
213
|
+
sum(r.compliance_score for r in self._scan_results) / total,
|
|
214
|
+
1,
|
|
215
|
+
)
|
|
216
|
+
if total > 0
|
|
217
|
+
else 100.0
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
return {
|
|
221
|
+
"total_scans": total,
|
|
222
|
+
"passed": passed_count,
|
|
223
|
+
"failed": failed_count,
|
|
224
|
+
"avg_compliance_score": avg_score,
|
|
225
|
+
"results": [
|
|
226
|
+
{
|
|
227
|
+
"url": r.url,
|
|
228
|
+
"violation_count": r.violation_count,
|
|
229
|
+
"compliance_score": r.compliance_score,
|
|
230
|
+
"passed": r.compliance_score >= self._min_compliance_score,
|
|
231
|
+
"violations": [
|
|
232
|
+
{
|
|
233
|
+
"rule_id": v.rule_id,
|
|
234
|
+
"description": v.description,
|
|
235
|
+
"impact": v.impact,
|
|
236
|
+
"wcag_criteria": v.wcag_criteria,
|
|
237
|
+
"selector": v.selector,
|
|
238
|
+
"element_html": v.element_html,
|
|
239
|
+
}
|
|
240
|
+
for v in r.violations
|
|
241
|
+
],
|
|
242
|
+
}
|
|
243
|
+
for r in self._scan_results
|
|
244
|
+
],
|
|
245
|
+
}
|