@teevee98/synapse-hub 4.1.2 → 4.1.4
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/.agents/skills/01-web-automation/clean-pom-crafter/examples/standard_test_case.groovy +3 -0
- package/.agents/skills/01-web-automation/clean-pom-crafter/references/pom_patterns.groovy +3 -0
- package/.agents/skills/01-web-automation/e2e-testing-patterns/examples/playwright_sharded_config.ts +3 -0
- package/.agents/skills/01-web-automation/playwright-webapp-testing/examples/server_lifecycle_playwright.py +3 -0
- package/.agents/skills/04-performance-and-load/web-vitals-and-performance-profiler/examples/playwright_cwv_profiler_fixture.ts +3 -0
- package/.agents/skills/05-security-and-compliance/security-dast-sentinel/references/dast_recipes.ts +3 -0
- package/.agents/skills/08-code-quality/code-refactoring-refactor-clean/examples/refactored_page_sample.groovy +3 -0
- package/.agents/skills/08-code-quality/code-refactoring-refactor-clean/examples/refactored_playwright_pom.ts +3 -0
- package/.agents/skills/11-ai-and-prompting/qa-aci-interface/examples/surgical_code_window_walkthrough.md +1 -1
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/agentskills.json +1 -1
- package/docs/ARCHITECTURE.en.md +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/PERFORMANCE_AUDIT_REPORT.md +2 -2
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/scripts/generate_skill_examples.py +3 -0
- package/scripts/package_dist.py +3 -0
- package/skills_manifest.json +1 -1
- package/synapse.config.json +1 -1
- package/tools/.infer_baseline.json +3 -796
- package/tools/__init__.py +4 -1
- package/tools/agent_canary.py +3 -0
- package/tools/analyze_project.py +3 -0
- package/tools/api_drift_sentinel.py +3 -0
- package/tools/api_fuzzer.py +3 -0
- package/tools/ast_cache.py +4 -2
- package/tools/author_integrity.py +53 -1
- package/tools/auto_heal.py +7 -2
- package/tools/autogen_qa_broker.py +14 -15
- package/tools/benchmark_swarm_context.py +10 -2
- package/tools/browser_helpers.js +2 -2
- package/tools/bug_reporter.py +3 -0
- package/tools/build_consolidated_report.py +3 -0
- package/tools/bump_version.py +4 -1
- package/tools/cache_resolver.py +7 -3
- package/tools/check_env.py +3 -0
- package/tools/check_version_sync.py +3 -0
- package/tools/ci_healing_hook.py +3 -0
- package/tools/cli.py +10 -7
- package/tools/config_decoupler.py +3 -0
- package/tools/core/__init__.py +3 -0
- package/tools/core/file_lock.py +23 -14
- package/tools/core/i18n.py +9 -7
- package/tools/core/memory_bus.py +6 -3
- package/tools/core/process_supervisor.py +28 -18
- package/tools/core/token_estimator.py +55 -18
- package/tools/count_tokens.py +11 -7
- package/tools/create_mock_docx.py +3 -0
- package/tools/dashboard_generator.py +17 -15
- package/tools/db_sandbox.py +4 -1
- package/tools/debt_harvester.py +2 -2
- package/tools/diagram_architect.py +3 -0
- package/tools/distill_log.py +119 -26
- package/tools/e2e_flow_prober.py +3 -0
- package/tools/export_postman_collection.py +3 -0
- package/tools/flaky_detector.py +3 -0
- package/tools/fsm_enforcer.py +2 -2
- package/tools/fuzz_payloads.py +3 -0
- package/tools/generate_allure_report.py +3 -0
- package/tools/generate_api_matrix.py +3 -0
- package/tools/generate_jmx_plan.py +3 -0
- package/tools/generate_tc_from_story.py +3 -0
- package/tools/generate_test_reports.py +3 -0
- package/tools/git_pre_commit_guard.py +13 -3
- package/tools/git_worktree_manager.py +3 -0
- package/tools/heal/__init__.py +3 -0
- package/tools/heal_pr_automator.py +3 -0
- package/tools/heuristic_locator_matcher.py +3 -0
- package/tools/hub_publisher.py +3 -3
- package/tools/infer_linter.py +19 -9
- package/tools/init_config.py +6 -9
- package/tools/jtl_analyzer.py +3 -0
- package/tools/lint/__init__.py +3 -0
- package/tools/lint_ai_docs.py +3 -0
- package/tools/lookup_tc.py +3 -0
- package/tools/lookup_xpath.py +3 -0
- package/tools/matrix_sharder.py +3 -0
- package/tools/mcp/__init__.py +3 -0
- package/tools/mcp_docx_server.py +1 -1
- package/tools/mcp_excel_server.py +4 -1
- package/tools/mcp_server.py +4 -1
- package/tools/md_to_xlsx.py +3 -0
- package/tools/mechanical_ui_gate.py +3 -0
- package/tools/micro_mutator.py +9 -5
- package/tools/network_mock_shield.py +3 -0
- package/tools/newman_analyzer.py +3 -0
- package/tools/omni_emitter.py +3 -0
- package/tools/omni_parser.py +3 -0
- package/tools/omni_transpiler.py +3 -0
- package/tools/output_formatter.py +3 -0
- package/tools/package_release.py +6 -6
- package/tools/pairwise_generator.py +3 -0
- package/tools/pentest_scope_guard.py +2 -2
- package/tools/perf/__init__.py +3 -0
- package/tools/pinpoint_failure.py +3 -0
- package/tools/project_state.py +3 -0
- package/tools/repo_map.py +3 -0
- package/tools/report/__init__.py +3 -0
- package/tools/rules_router.py +42 -10
- package/tools/runaway_stopper.py +3 -0
- package/tools/safety_firewall.py +3 -0
- package/tools/setup_project.py +9 -4
- package/tools/skill_collision_guard.py +2 -2
- package/tools/skillspector.py +2 -1
- package/tools/smart_visual_masker.py +3 -0
- package/tools/telemetry_correlator.py +3 -0
- package/tools/template_excel_exporter.py +2 -2
- package/tools/test_impact.py +3 -0
- package/tools/trace_data_flow.py +3 -0
- package/tools/traffic_session_converter.py +3 -0
- package/tools/ui_server.py +2 -2
- package/tools/universal_ir.py +3 -0
- package/tools/update_sentinel.py +15 -9
- package/tools/validate_groovy_scripts.py +3 -0
- package/tools/verify_all.py +27 -20
- package/tools/visual_diff_canvas.py +3 -0
- package/tools/visual_som_helper.py +3 -0
- package/tools/watch_mode.py +4 -4
- package/tools/wcag_audit.py +3 -0
- package/tools/welcome_page.py +1 -1
package/tools/verify_all.py
CHANGED
|
@@ -55,27 +55,28 @@ for stream in (sys.stdout, sys.stderr):
|
|
|
55
55
|
pass
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
def safe_print(text="", stream=
|
|
58
|
+
def safe_print(text="", stream=None):
|
|
59
59
|
"""Safely prints text to the given stream, handling BlockingIOError or encoding issues."""
|
|
60
|
+
target_stream = stream if stream is not None else sys.stdout
|
|
60
61
|
try:
|
|
61
62
|
if text:
|
|
62
|
-
|
|
63
|
+
target_stream.write(f"{text}\n")
|
|
63
64
|
else:
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
target_stream.write("\n")
|
|
66
|
+
target_stream.flush()
|
|
66
67
|
except BlockingIOError:
|
|
67
68
|
try:
|
|
68
|
-
if hasattr(
|
|
69
|
-
os.set_blocking(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
except OSError
|
|
73
|
-
|
|
69
|
+
if hasattr(target_stream, 'fileno'):
|
|
70
|
+
os.set_blocking(target_stream.fileno(), True)
|
|
71
|
+
target_stream.write(f"{text}\n")
|
|
72
|
+
target_stream.flush()
|
|
73
|
+
except OSError: # synapse-ignore: SWALLOWED_EXCEPTION
|
|
74
|
+
pass
|
|
74
75
|
except Exception:
|
|
75
76
|
try:
|
|
76
|
-
|
|
77
|
-
except Exception
|
|
78
|
-
|
|
77
|
+
sys.stderr.write(f"{text}\n")
|
|
78
|
+
except Exception: # synapse-ignore: SWALLOWED_EXCEPTION
|
|
79
|
+
pass
|
|
79
80
|
|
|
80
81
|
BOM_EXTENSIONS = (
|
|
81
82
|
".groovy", ".tc", ".ts", ".glbl", ".md", ".py", ".json", ".ps1",
|
|
@@ -90,8 +91,7 @@ REPO_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, ".."))
|
|
|
90
91
|
FORBIDDEN_PATH_PATTERNS = [
|
|
91
92
|
(re.compile(r'file:///[a-zA-Z]:', re.IGNORECASE), "Machine file URI (file:///...)"),
|
|
92
93
|
(re.compile(r'\b[a-zA-Z]:\\Users\\[a-zA-Z0-9_\-]+\\', re.IGNORECASE), "Windows User directory path"),
|
|
93
|
-
(re.compile(r'\
|
|
94
|
-
(re.compile(r'\b/home/[a-zA-Z0-9_\-]+/', re.IGNORECASE), "Linux User home directory path"),
|
|
94
|
+
(re.compile(r'(?:^|[\s"\'`\(\[\{</])/(?:Users|home)/[a-zA-Z0-9_\-]+/', re.IGNORECASE), "User home directory path (/Users/ or /home/)"),
|
|
95
95
|
(re.compile(r'\b[a-zA-Z]:[/\\](?:agent-skills|workspace|jenkins|builds)\b', re.IGNORECASE), "Machine-specific repository path"),
|
|
96
96
|
(re.compile(r'[/\\\\]legacy_abs_path[/\\\\]', re.IGNORECASE), "Legacy absolute path reference"),
|
|
97
97
|
]
|
|
@@ -236,7 +236,7 @@ MOJIBAKE_INDICATORS = (
|
|
|
236
236
|
def gate_1_bom_check(repo_root, mode="AUTO"):
|
|
237
237
|
"""Gate 1: Verifies 100% UTF-8 encoding with zero Byte Order Mark (BOM) bytes and zero corrupted control characters."""
|
|
238
238
|
print("\n[GATE 1] Scanning UTF-8 No BOM and Encoding Integrity across repository...")
|
|
239
|
-
ignored_dirs = {".git", ".gradle", "node_modules", "allure-results", "graphify-out", "__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "build", "dist", "claude-ecosystem-repos", "external_repos", "teamwork"}
|
|
239
|
+
ignored_dirs = {".git", ".gradle", "node_modules", "allure-results", "graphify-out", "__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "build", "dist", "claude-ecosystem-repos", "external_repos", "teamwork", ".synapse", ".sandbox_snapshots"}
|
|
240
240
|
ignored_files = {"verify_all.py", "test_tools.py"}
|
|
241
241
|
bom_violations = []
|
|
242
242
|
mojibake_violations = []
|
|
@@ -291,12 +291,12 @@ def gate_2_path_portability(repo_root, mode="AUTO"):
|
|
|
291
291
|
ignored_dirs = {
|
|
292
292
|
".git", ".gradle", "node_modules", "allure-results", "Screenshots",
|
|
293
293
|
"Reports", "reports", "TestReports", "testreports", "Libs", ".settings", "graphify-out",
|
|
294
|
-
"__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "agent_qa.egg-info", "dist", "build", "claude-ecosystem-repos", "external_repos", "teamwork"
|
|
294
|
+
"__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "agent_qa.egg-info", "dist", "build", "claude-ecosystem-repos", "external_repos", "teamwork", ".synapse", ".sandbox_snapshots"
|
|
295
295
|
}
|
|
296
296
|
ignored_files = {
|
|
297
297
|
".project", ".classpath", ".DS_Store", "memory_cache.db",
|
|
298
298
|
"verify_all.py", "git_pre_commit_guard.py", "agent_canary.py", "repo_map.txt", "repo_map.json",
|
|
299
|
-
"PROJECT_HEALTH_REPORT.md", "PROJECT_STATE.md"
|
|
299
|
+
"PROJECT_HEALTH_REPORT.md", "PROJECT_STATE.md", "AUDIT_REPORT.md"
|
|
300
300
|
}
|
|
301
301
|
violations = []
|
|
302
302
|
for root, dirs, files in os.walk(repo_root):
|
|
@@ -374,6 +374,9 @@ def gate_3_clean_pom(repo_root, mode="AUTO"):
|
|
|
374
374
|
r'(?:\.(?:click|dblclick|fill|type|press|check|locator|waitForSelector|hover|selectOption)|cy\.(?:get|find)|driver\.find[A-Za-z]*|WebUI\.[a-zA-Z]+)\s*\(\s*[\x22\x27`](?P<sel>[^\x22\x27`]+)[\x22\x27`]'
|
|
375
375
|
)
|
|
376
376
|
RAW_XPATH_PATTERN = re.compile(r'[\x22\x27`](?:xpath=|\/{2}[a-zA-Z*@\[])[^\x22\x27`]*[\x22\x27`]')
|
|
377
|
+
SEMANTIC_LOCATOR_PATTERN = re.compile(
|
|
378
|
+
r'(?:page|frame)\.(?:getByRole|getByLabel|getByPlaceholder|getByText|getByTestId|getByAltText|getByTitle)\s*\('
|
|
379
|
+
)
|
|
377
380
|
|
|
378
381
|
violations = []
|
|
379
382
|
for full_path in sorted(set(test_files)):
|
|
@@ -392,6 +395,10 @@ def gate_3_clean_pom(repo_root, mode="AUTO"):
|
|
|
392
395
|
if "findTestObject" in line:
|
|
393
396
|
violations.append((rel_path, line_no, "Raw findTestObject"))
|
|
394
397
|
continue
|
|
398
|
+
# Check Playwright semantic locators in test script
|
|
399
|
+
if SEMANTIC_LOCATOR_PATTERN.search(stripped):
|
|
400
|
+
violations.append((rel_path, line_no, f"Raw Playwright semantic locator in Test Script: '{stripped}'"))
|
|
401
|
+
continue
|
|
395
402
|
# Check locator calls taking raw CSS/XPath selectors
|
|
396
403
|
m = LOCATOR_CALL_PATTERN.search(stripped)
|
|
397
404
|
if m:
|
|
@@ -530,7 +537,7 @@ def gate_6_credential_security(repo_root, mode="AUTO"):
|
|
|
530
537
|
ignored_dirs = {
|
|
531
538
|
".git", ".gradle", "node_modules", "allure-results", "Screenshots",
|
|
532
539
|
"Reports", "reports", "TestReports", "testreports", "Libs", ".settings", "graphify-out",
|
|
533
|
-
"__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "agent_qa.egg-info", "dist", "build", "claude-ecosystem-repos", "external_repos", "teamwork"
|
|
540
|
+
"__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "agent_qa.egg-info", "dist", "build", "claude-ecosystem-repos", "external_repos", "teamwork", ".synapse", ".sandbox_snapshots"
|
|
534
541
|
}
|
|
535
542
|
|
|
536
543
|
for root, dirs, files in os.walk(repo_root):
|
|
@@ -890,7 +897,7 @@ def gate_7_infer_linter(repo_root, mode="AUTO"):
|
|
|
890
897
|
else:
|
|
891
898
|
safe_print("[PASS] Hub Mode Regression Test Suite: Verified via active parent test runner.")
|
|
892
899
|
|
|
893
|
-
test_dirs = ["
|
|
900
|
+
test_dirs = ["examples"] if effective_mode == "HUB" else ["Scripts", "tests", "test", "e2e", "specs", "cypress"]
|
|
894
901
|
has_tests = False
|
|
895
902
|
target_scan_dir = None
|
|
896
903
|
for td in test_dirs:
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
Enterprise Vision-Grounded Fallback & Set-of-Marks (SoM) Engine
|
|
4
7
|
--------------------------------------------------------------
|
package/tools/watch_mode.py
CHANGED
|
@@ -46,19 +46,19 @@ IGNORED_DIRS = {
|
|
|
46
46
|
".git", ".gradle", "node_modules", "allure-results", "Screenshots",
|
|
47
47
|
"Reports", "reports", "TestReports", "testreports", "bin", "Libs", ".settings",
|
|
48
48
|
"graphify-out", "__pycache__", "agent_qa.egg-info", "dist", "build", ".pytest_cache",
|
|
49
|
-
"claude-ecosystem-repos", "external_repos", "teamwork"
|
|
49
|
+
"claude-ecosystem-repos", "external_repos", "teamwork", ".synapse", ".sandbox_snapshots"
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
IGNORED_FILES = {
|
|
53
53
|
".project", ".classpath", ".DS_Store", "memory_cache.db",
|
|
54
54
|
"verify_all.py", "git_pre_commit_guard.py", "agent_canary.py", "watch_mode.py",
|
|
55
|
-
"repo_map.txt", "repo_map.json", "PROJECT_HEALTH_REPORT.md", "PROJECT_STATE.md"
|
|
55
|
+
"repo_map.txt", "repo_map.json", "PROJECT_HEALTH_REPORT.md", "PROJECT_STATE.md", "AUDIT_REPORT.md"
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
FORBIDDEN_PATH_PATTERNS = [
|
|
59
59
|
(re.compile(r'file:///[a-zA-Z]:', re.IGNORECASE), "Machine file URI (file:///...)"),
|
|
60
60
|
(re.compile(r'\b[a-zA-Z]:\\Users\\[a-zA-Z0-9_\-]+\\', re.IGNORECASE), "Windows User directory path"),
|
|
61
|
-
(re.compile(r'\
|
|
61
|
+
(re.compile(r'(?:^|[\s"\'`\(\[\{</])/(?:Users|home)/[a-zA-Z0-9_\-]+/', re.IGNORECASE), "User home directory path (/Users/ or /home/)"),
|
|
62
62
|
]
|
|
63
63
|
|
|
64
64
|
# ANSI colors
|
|
@@ -263,7 +263,7 @@ def watch_directory(target_dir: str, debounce: float = 0.8, run_once: bool = Fal
|
|
|
263
263
|
|
|
264
264
|
try:
|
|
265
265
|
while True:
|
|
266
|
-
time.sleep(debounce)
|
|
266
|
+
time.sleep(debounce) # synapse-ignore: HARD_DELAY_ANTI_PATTERN
|
|
267
267
|
current_states = scan_file_states(target_dir)
|
|
268
268
|
changed_files = []
|
|
269
269
|
|
package/tools/wcag_audit.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
tools/wcag_audit.py - Automated Accessibility (WCAG 2.2) Linter & Auditor
|
|
4
7
|
Operationalizes the .agents/skills/05-security-and-compliance/wcag-audit-patterns skill for Web & Enterprise Applications.
|
package/tools/welcome_page.py
CHANGED
|
@@ -47,7 +47,7 @@ def get_hub_metadata() -> Dict[str, Any]:
|
|
|
47
47
|
"""Retrieves version and catalog count from skills_manifest.json."""
|
|
48
48
|
manifest_path = os.path.join(HUB_ROOT, "skills_manifest.json")
|
|
49
49
|
meta = {
|
|
50
|
-
"version": "4.1.
|
|
50
|
+
"version": "4.1.4",
|
|
51
51
|
"totalSkills": 42,
|
|
52
52
|
"author": "Thế Vị (@TeeVee98)",
|
|
53
53
|
"repo": "https://github.com/TeeVee98/Synapse-Hub"
|