@teevee98/synapse-hub 3.10.0 → 4.1.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/.agents/rules/context-engineering.md +3 -3
- package/.agents/rules/mandatory-playwright-live.md +18 -4
- package/.agents/rules/security_testing_rules.md +8 -5
- package/.agents/rules/stack-auto-router.md +11 -4
- package/.agents/skills/{playwright-webapp-testing → 01-web-automation/playwright-webapp-testing}/SKILL.md +18 -1
- package/.agents/skills/05-security-and-compliance/wcag-audit-patterns/SKILL.md +116 -0
- package/.agents/workflows/generate_manual_testcases_rbt.md +1 -1
- package/Dockerfile +14 -6
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/agentskills.json +16 -2
- package/docs/ARCHITECTURE.en.md +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills_manifest.json +505 -394
- package/synapse.config.json +17 -1
- package/tools/__init__.py +1 -1
- package/tools/ast_cache.py +171 -0
- package/tools/author_integrity.py +7 -2
- package/tools/benchmark_swarm_context.py +242 -151
- package/tools/browser_helpers.js +2 -2
- package/tools/build_consolidated_report.py +6 -6
- package/tools/cache_resolver.py +11 -6
- package/tools/check_version_sync.py +56 -0
- package/tools/cli.py +16 -3
- package/tools/core/file_lock.py +187 -14
- package/tools/core/process_supervisor.py +25 -0
- package/tools/core/telemetry.py +139 -1
- package/tools/core/token_estimator.py +145 -0
- package/tools/count_tokens.py +28 -0
- package/tools/dashboard_generator.py +6 -6
- package/tools/debt_harvester.py +20 -9
- package/tools/diagram_architect.py +0 -1
- package/tools/distill_log.py +266 -89
- package/tools/git_pre_commit_guard.py +6 -4
- package/tools/git_worktree_manager.py +1 -1
- package/tools/infer_linter.py +2 -2
- package/tools/lint_ai_docs.py +19 -5
- package/tools/mcp_docx_server.py +1 -1
- package/tools/mcp_excel_server.py +1 -1
- package/tools/mcp_server.py +1 -1
- package/tools/mechanical_ui_gate.py +1 -1
- package/tools/micro_mutator.py +51 -10
- package/tools/pairwise_generator.py +0 -1
- package/tools/pentest_scope_guard.py +328 -0
- package/tools/perf/benchmark_perf_runner.py +226 -0
- package/tools/pinpoint_failure.py +14 -2
- package/tools/rules_router.py +596 -0
- package/tools/token_telemetry.py +224 -0
- package/tools/ui_server.py +1 -1
- package/tools/update_sentinel.py +3 -3
- package/tools/verify_all.py +67 -7
- package/tools/wcag_audit.py +1 -1
- package/tools/welcome_page.py +1 -1
- package/.agents/skills/wcag-audit-patterns/SKILL.md +0 -77
- /package/.agents/skills/{auth-session-and-cookie-manager → 01-web-automation/auth-session-and-cookie-manager}/SKILL.md +0 -0
- /package/.agents/skills/{auth-session-and-cookie-manager → 01-web-automation/auth-session-and-cookie-manager}/examples/multi_role_auth_matrix.md +0 -0
- /package/.agents/skills/{auth-session-and-cookie-manager → 01-web-automation/auth-session-and-cookie-manager}/examples/storage_state_sample.json +0 -0
- /package/.agents/skills/{bats-testing-patterns → 01-web-automation/bats-testing-patterns}/SKILL.md +0 -0
- /package/.agents/skills/{bats-testing-patterns → 01-web-automation/bats-testing-patterns}/examples/cli_runner_test.bats +0 -0
- /package/.agents/skills/{bats-testing-patterns → 01-web-automation/bats-testing-patterns}/resources/implementation-playbook.md +0 -0
- /package/.agents/skills/{clean-pom-crafter → 01-web-automation/clean-pom-crafter}/SKILL.md +0 -0
- /package/.agents/skills/{clean-pom-crafter → 01-web-automation/clean-pom-crafter}/examples/standard_test_case.groovy +0 -0
- /package/.agents/skills/{clean-pom-crafter → 01-web-automation/clean-pom-crafter}/references/pom_patterns.groovy +0 -0
- /package/.agents/skills/{e2e-testing-patterns → 01-web-automation/e2e-testing-patterns}/SKILL.md +0 -0
- /package/.agents/skills/{e2e-testing-patterns → 01-web-automation/e2e-testing-patterns}/examples/playwright_sharded_config.ts +0 -0
- /package/.agents/skills/{e2e-testing-patterns → 01-web-automation/e2e-testing-patterns}/resources/implementation-playbook.md +0 -0
- /package/.agents/skills/{katalon-cli-runner → 01-web-automation/katalon-cli-runner}/SKILL.md +0 -0
- /package/.agents/skills/{katalon-cli-runner → 01-web-automation/katalon-cli-runner}/examples/headless_kre_exec.sh +0 -0
- /package/.agents/skills/{katalon-cli-runner → 01-web-automation/katalon-cli-runner}/references/groovy-patterns.md +0 -0
- /package/.agents/skills/{katalon-cli-runner → 01-web-automation/katalon-cli-runner}/references/katalon-api.md +0 -0
- /package/.agents/skills/{katalon-cli-runner → 01-web-automation/katalon-cli-runner}/references/runner_commands.md +0 -0
- /package/.agents/skills/{lam-script-generator → 01-web-automation/lam-script-generator}/SKILL.md +0 -0
- /package/.agents/skills/{lam-script-generator → 01-web-automation/lam-script-generator}/examples/user_story_sample.md +0 -0
- /package/.agents/skills/{mobile-appium-som → 01-web-automation/mobile-appium-som}/SKILL.md +0 -0
- /package/.agents/skills/{mobile-appium-som → 01-web-automation/mobile-appium-som}/examples/BaseScreen.java +0 -0
- /package/.agents/skills/{mobile-appium-som → 01-web-automation/mobile-appium-som}/examples/LoginScreen.java +0 -0
- /package/.agents/skills/{mobile-appium-som → 01-web-automation/mobile-appium-som}/examples/TC_MobileLogin.java +0 -0
- /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/SKILL.md +0 -0
- /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/examples/live_probe_script.js +0 -0
- /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/references/advanced_superpowers.md +0 -0
- /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/references/compact_accessibility_snapshots.md +0 -0
- /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/references/recipes.md +0 -0
- /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/references/swarm_orchestration.md +0 -0
- /package/.agents/skills/{playwright-webapp-testing → 01-web-automation/playwright-webapp-testing}/examples/server_lifecycle_playwright.py +0 -0
- /package/.agents/skills/{web-agent-gym-benchmarking → 01-web-automation/web-agent-gym-benchmarking}/SKILL.md +0 -0
- /package/.agents/skills/{web-agent-gym-benchmarking → 01-web-automation/web-agent-gym-benchmarking}/examples/benchmark_report_sample.json +0 -0
- /package/.agents/skills/{web-agent-gym-benchmarking → 01-web-automation/web-agent-gym-benchmarking}/examples/enterprise_tasks_suite.json +0 -0
- /package/.agents/skills/{architecture-decision-records → 02-test-design/architecture-decision-records}/SKILL.md +0 -0
- /package/.agents/skills/{architecture-decision-records → 02-test-design/architecture-decision-records}/examples/0001-record-architecture-decisions.md +0 -0
- /package/.agents/skills/{gherkin-to-suite → 02-test-design/gherkin-to-suite}/SKILL.md +0 -0
- /package/.agents/skills/{gherkin-to-suite → 02-test-design/gherkin-to-suite}/examples/checkout.feature +0 -0
- /package/.agents/skills/{gherkin-to-suite → 02-test-design/gherkin-to-suite}/examples/suite_report_sample.json +0 -0
- /package/.agents/skills/{rbt-manual-testing → 02-test-design/rbt-manual-testing}/SKILL.md +0 -0
- /package/.agents/skills/{rbt-manual-testing → 02-test-design/rbt-manual-testing}/examples/checkout_rbt_manual_suite.md +0 -0
- /package/.agents/skills/{rbt-manual-testing → 02-test-design/rbt-manual-testing}/references/field_validation_checklist.md +0 -0
- /package/.agents/skills/{review-spec → 02-test-design/review-spec}/SKILL.md +0 -0
- /package/.agents/skills/{review-spec → 02-test-design/review-spec}/examples/pocock_grilling_decision_rubric.md +0 -0
- /package/.agents/skills/{review-spec → 02-test-design/review-spec}/examples/sample_spec_review.md +0 -0
- /package/.agents/skills/{tot-exploratory-testing → 02-test-design/tot-exploratory-testing}/SKILL.md +0 -0
- /package/.agents/skills/{tot-exploratory-testing → 02-test-design/tot-exploratory-testing}/examples/payment_gateway_tot_tree.json +0 -0
- /package/.agents/skills/{tot-exploratory-testing → 02-test-design/tot-exploratory-testing}/examples/tot_graph_sample.json +0 -0
- /package/.agents/skills/{api-network-mocking-interception → 03-api-and-contracts/api-network-mocking-interception}/SKILL.md +0 -0
- /package/.agents/skills/{api-network-mocking-interception → 03-api-and-contracts/api-network-mocking-interception}/examples/network_route_stub.json +0 -0
- /package/.agents/skills/{api-spec-to-e2e-matrix → 03-api-and-contracts/api-spec-to-e2e-matrix}/SKILL.md +0 -0
- /package/.agents/skills/{api-spec-to-e2e-matrix → 03-api-and-contracts/api-spec-to-e2e-matrix}/examples/sample_openapi.json +0 -0
- /package/.agents/skills/{consumer-driven-contract-testing → 03-api-and-contracts/consumer-driven-contract-testing}/SKILL.md +0 -0
- /package/.agents/skills/{consumer-driven-contract-testing → 03-api-and-contracts/consumer-driven-contract-testing}/examples/order_service_pact.json +0 -0
- /package/.agents/skills/{backend-load-and-stress-patterns → 04-performance-and-load/backend-load-and-stress-patterns}/SKILL.md +0 -0
- /package/.agents/skills/{backend-load-and-stress-patterns → 04-performance-and-load/backend-load-and-stress-patterns}/examples/k6_load_test_sample.js +0 -0
- /package/.agents/skills/{backend-load-and-stress-patterns → 04-performance-and-load/backend-load-and-stress-patterns}/references/k6_load_template.js +0 -0
- /package/.agents/skills/{lean-impact-scoreboard → 04-performance-and-load/lean-impact-scoreboard}/SKILL.md +0 -0
- /package/.agents/skills/{lean-impact-scoreboard → 04-performance-and-load/lean-impact-scoreboard}/examples/sample_benchmark_gain.md +0 -0
- /package/.agents/skills/{lean-impact-scoreboard → 04-performance-and-load/lean-impact-scoreboard}/examples/sample_scoreboard.md +0 -0
- /package/.agents/skills/{web-vitals-and-performance-profiler → 04-performance-and-load/web-vitals-and-performance-profiler}/SKILL.md +0 -0
- /package/.agents/skills/{web-vitals-and-performance-profiler → 04-performance-and-load/web-vitals-and-performance-profiler}/examples/cwv_budget_policy.json +0 -0
- /package/.agents/skills/{web-vitals-and-performance-profiler → 04-performance-and-load/web-vitals-and-performance-profiler}/examples/playwright_cwv_profiler_fixture.ts +0 -0
- /package/.agents/skills/{security-dast-sentinel → 05-security-and-compliance/security-dast-sentinel}/SKILL.md +0 -0
- /package/.agents/skills/{security-dast-sentinel → 05-security-and-compliance/security-dast-sentinel}/examples/dast_scan_config.json +0 -0
- /package/.agents/skills/{security-dast-sentinel → 05-security-and-compliance/security-dast-sentinel}/references/AI-AND-LLM.md +0 -0
- /package/.agents/skills/{security-dast-sentinel → 05-security-and-compliance/security-dast-sentinel}/references/ATTACK-CLASSES.md +0 -0
- /package/.agents/skills/{security-dast-sentinel → 05-security-and-compliance/security-dast-sentinel}/references/dast_recipes.ts +0 -0
- /package/.agents/skills/{skillspector-security-guard → 05-security-and-compliance/skillspector-security-guard}/SKILL.md +0 -0
- /package/.agents/skills/{skillspector-security-guard → 05-security-and-compliance/skillspector-security-guard}/examples/audit_threat_vectors_report.json +0 -0
- /package/.agents/skills/{skillspector-security-guard → 05-security-and-compliance/skillspector-security-guard}/examples/safe_mcp_config.json +0 -0
- /package/.agents/skills/{wcag-audit-patterns → 05-security-and-compliance/wcag-audit-patterns}/examples/wcag_compliance_checklist.json +0 -0
- /package/.agents/skills/{wcag-audit-patterns → 05-security-and-compliance/wcag-audit-patterns}/resources/implementation-playbook.md +0 -0
- /package/.agents/skills/{agentless-qa-repair → 06-healing-and-resilience/agentless-qa-repair}/SKILL.md +0 -0
- /package/.agents/skills/{agentless-qa-repair → 06-healing-and-resilience/agentless-qa-repair}/examples/healing_report_sample.json +0 -0
- /package/.agents/skills/{agentless-qa-repair → 06-healing-and-resilience/agentless-qa-repair}/examples/three_phase_repair_workflow.md +0 -0
- /package/.agents/skills/{antigravity-test-sentinel → 06-healing-and-resilience/antigravity-test-sentinel}/SKILL.md +0 -0
- /package/.agents/skills/{antigravity-test-sentinel → 06-healing-and-resilience/antigravity-test-sentinel}/examples/dod_gate_policy.json +0 -0
- /package/.agents/skills/{antigravity-test-sentinel → 06-healing-and-resilience/antigravity-test-sentinel}/examples/sprint_dod_enforcement.md +0 -0
- /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/SKILL.md +0 -0
- /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/examples/closed_loop_healing_walkthrough.md +0 -0
- /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/examples/sample_junit_failure.xml +0 -0
- /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/references/healing_matrix.md +0 -0
- /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/references/qa_investigation_protocol.md +0 -0
- /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/scripts/triage_failures.sh +0 -0
- /package/.agents/skills/{flaky-test-sentinel-and-quarantine → 06-healing-and-resilience/flaky-test-sentinel-and-quarantine}/SKILL.md +0 -0
- /package/.agents/skills/{flaky-test-sentinel-and-quarantine → 06-healing-and-resilience/flaky-test-sentinel-and-quarantine}/examples/quarantine_registry.json +0 -0
- /package/.agents/skills/{self-healing-locator → 06-healing-and-resilience/self-healing-locator}/SKILL.md +0 -0
- /package/.agents/skills/{self-healing-locator → 06-healing-and-resilience/self-healing-locator}/examples/aom_diff_sample.json +0 -0
- /package/.agents/skills/{systematic-debugging → 06-healing-and-resilience/systematic-debugging}/SKILL.md +0 -0
- /package/.agents/skills/{systematic-debugging → 06-healing-and-resilience/systematic-debugging}/examples/four_phase_case.md +0 -0
- /package/.agents/skills/{test-driven-development → 06-healing-and-resilience/test-driven-development}/SKILL.md +0 -0
- /package/.agents/skills/{test-driven-development → 06-healing-and-resilience/test-driven-development}/examples/red_green_refactor_qa.md +0 -0
- /package/.agents/skills/{verification-before-completion → 06-healing-and-resilience/verification-before-completion}/SKILL.md +0 -0
- /package/.agents/skills/{verification-before-completion → 06-healing-and-resilience/verification-before-completion}/examples/evidence_log_example.md +0 -0
- /package/.agents/skills/{visual-regression-sentinel → 06-healing-and-resilience/visual-regression-sentinel}/SKILL.md +0 -0
- /package/.agents/skills/{visual-regression-sentinel → 06-healing-and-resilience/visual-regression-sentinel}/examples/visual_mask_rules.json +0 -0
- /package/.agents/skills/{db-state-verifier-and-seeder → 07-data-and-state/db-state-verifier-and-seeder}/SKILL.md +0 -0
- /package/.agents/skills/{db-state-verifier-and-seeder → 07-data-and-state/db-state-verifier-and-seeder}/examples/db_fixture_seed.json +0 -0
- /package/.agents/skills/{file-and-report-validator → 07-data-and-state/file-and-report-validator}/SKILL.md +0 -0
- /package/.agents/skills/{file-and-report-validator → 07-data-and-state/file-and-report-validator}/examples/sample_export_schema.json +0 -0
- /package/.agents/skills/{synthetic-test-data-generator → 07-data-and-state/synthetic-test-data-generator}/SKILL.md +0 -0
- /package/.agents/skills/{synthetic-test-data-generator → 07-data-and-state/synthetic-test-data-generator}/examples/idempotent_data_recipe.json +0 -0
- /package/.agents/skills/{code-refactoring-refactor-clean → 08-code-quality/code-refactoring-refactor-clean}/SKILL.md +0 -0
- /package/.agents/skills/{code-refactoring-refactor-clean → 08-code-quality/code-refactoring-refactor-clean}/examples/refactored_page_sample.groovy +0 -0
- /package/.agents/skills/{code-refactoring-refactor-clean → 08-code-quality/code-refactoring-refactor-clean}/examples/refactored_playwright_pom.ts +0 -0
- /package/.agents/skills/{code-refactoring-refactor-clean → 08-code-quality/code-refactoring-refactor-clean}/resources/implementation-playbook.md +0 -0
- /package/.agents/skills/{graphify-impact-analyzer → 08-code-quality/graphify-impact-analyzer}/SKILL.md +0 -0
- /package/.agents/skills/{graphify-impact-analyzer → 08-code-quality/graphify-impact-analyzer}/examples/dependency_blast_radius.json +0 -0
- /package/.agents/skills/{lean-code-ladder → 08-code-quality/lean-code-ladder}/SKILL.md +0 -0
- /package/.agents/skills/{lean-code-ladder → 08-code-quality/lean-code-ladder}/examples/ladder_walkthrough.md +0 -0
- /package/.agents/skills/{repo-quality-audit → 08-code-quality/repo-quality-audit}/SKILL.md +0 -0
- /package/.agents/skills/{repo-quality-audit → 08-code-quality/repo-quality-audit}/examples/sample_audit_walkthrough.md +0 -0
- /package/.agents/skills/{repo-quality-audit → 08-code-quality/repo-quality-audit}/examples/sample_repo_audit.md +0 -0
- /package/.agents/skills/{senior-code-review → 08-code-quality/senior-code-review}/SKILL.md +0 -0
- /package/.agents/skills/{senior-code-review → 08-code-quality/senior-code-review}/examples/sample_review_walkthrough.md +0 -0
- /package/.agents/skills/{surgical-coding-principles → 08-code-quality/surgical-coding-principles}/SKILL.md +0 -0
- /package/.agents/skills/{surgical-coding-principles → 08-code-quality/surgical-coding-principles}/examples/surgical_vs_scope_creep.md +0 -0
- /package/.agents/skills/{technical-debt-harvester → 08-code-quality/technical-debt-harvester}/SKILL.md +0 -0
- /package/.agents/skills/{technical-debt-harvester → 08-code-quality/technical-debt-harvester}/examples/sample_debt_ledger.md +0 -0
- /package/.agents/skills/{technical-debt-harvester → 08-code-quality/technical-debt-harvester}/examples/sample_ledger_output.md +0 -0
- /package/.agents/skills/{github-actions-templates → 09-ci-and-devops/github-actions-templates}/SKILL.md +0 -0
- /package/.agents/skills/{github-actions-templates → 09-ci-and-devops/github-actions-templates}/examples/matrix_test_pipeline.yml +0 -0
- /package/.agents/skills/{actor-qa-swarm → 10-agent-orchestration/actor-qa-swarm}/SKILL.md +0 -0
- /package/.agents/skills/{actor-qa-swarm → 10-agent-orchestration/actor-qa-swarm}/examples/broker_sharding_sample.json +0 -0
- /package/.agents/skills/{agent-orchestration-multi-agent-optimize → 10-agent-orchestration/agent-orchestration-multi-agent-optimize}/SKILL.md +0 -0
- /package/.agents/skills/{agent-orchestration-multi-agent-optimize → 10-agent-orchestration/agent-orchestration-multi-agent-optimize}/examples/swarm_workload_config.json +0 -0
- /package/.agents/skills/{event-stream-qa-orchestrator → 10-agent-orchestration/event-stream-qa-orchestrator}/SKILL.md +0 -0
- /package/.agents/skills/{event-stream-qa-orchestrator → 10-agent-orchestration/event-stream-qa-orchestrator}/examples/timeline_sample.jsonl +0 -0
- /package/.agents/skills/{persistent-planning-files → 10-agent-orchestration/persistent-planning-files}/SKILL.md +0 -0
- /package/.agents/skills/{persistent-planning-files → 10-agent-orchestration/persistent-planning-files}/examples/task_plan_example.md +0 -0
- /package/.agents/skills/{qa-memory-os → 10-agent-orchestration/qa-memory-os}/SKILL.md +0 -0
- /package/.agents/skills/{qa-memory-os → 10-agent-orchestration/qa-memory-os}/examples/archival_memory_sample.json +0 -0
- /package/.agents/skills/{meta-prompt-crafter → 11-ai-and-prompting/meta-prompt-crafter}/SKILL.md +0 -0
- /package/.agents/skills/{meta-prompt-crafter → 11-ai-and-prompting/meta-prompt-crafter}/examples/qa_prompt_template.md +0 -0
- /package/.agents/skills/{mipro-prompt-compiler → 11-ai-and-prompting/mipro-prompt-compiler}/SKILL.md +0 -0
- /package/.agents/skills/{mipro-prompt-compiler → 11-ai-and-prompting/mipro-prompt-compiler}/examples/compiled_module_sample.json +0 -0
- /package/.agents/skills/{mipro-prompt-compiler → 11-ai-and-prompting/mipro-prompt-compiler}/examples/dspy_assertion_optimizer_case.md +0 -0
- /package/.agents/skills/{qa-aci-interface → 11-ai-and-prompting/qa-aci-interface}/SKILL.md +0 -0
- /package/.agents/skills/{qa-aci-interface → 11-ai-and-prompting/qa-aci-interface}/examples/surgical_code_window_walkthrough.md +0 -0
- /package/.agents/skills/{qa-aci-interface → 11-ai-and-prompting/qa-aci-interface}/examples/surgical_edit_sample.json +0 -0
- /package/.agents/skills/{token-and-context-optimizer → 11-ai-and-prompting/token-and-context-optimizer}/SKILL.md +0 -0
- /package/.agents/skills/{token-and-context-optimizer → 11-ai-and-prompting/token-and-context-optimizer}/examples/distilled_log_sample.txt +0 -0
- /package/.agents/skills/{token-and-context-optimizer → 11-ai-and-prompting/token-and-context-optimizer}/references/context_engineering_guide.md +0 -0
package/synapse.config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/TeeVee98/Synapse-Hub/main/docs/schemas/synapse.config.schema.json",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"quality_gates": {
|
|
5
5
|
"mutation_min_score": 80,
|
|
6
6
|
"gates": {
|
|
@@ -16,6 +16,22 @@
|
|
|
16
16
|
"gate_10_performance_sla": true
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
+
"performance": {
|
|
20
|
+
"sla": {
|
|
21
|
+
"p95_ms": 500.0,
|
|
22
|
+
"p99_ms": 1000.0,
|
|
23
|
+
"max_error_rate_pct": 1.0
|
|
24
|
+
},
|
|
25
|
+
"auto_benchmark_fallback": true
|
|
26
|
+
},
|
|
27
|
+
"security": {
|
|
28
|
+
"allowed_pentest_hosts": [
|
|
29
|
+
"localhost",
|
|
30
|
+
"127.0.0.1",
|
|
31
|
+
"staging-api.synapse.local"
|
|
32
|
+
],
|
|
33
|
+
"require_consent": true
|
|
34
|
+
},
|
|
19
35
|
"infer_linter": {
|
|
20
36
|
"enabled": true,
|
|
21
37
|
"strict": true,
|
package/tools/__init__.py
CHANGED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: Copyright (c) 2026 Thế Vị (@TeeVee98). All rights reserved.
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
# Project: Synapse-Hub (https://github.com/TeeVee98/Synapse-Hub)
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
tools/ast_cache.py — AST Dataflow Pre-Validation Cache (Boost B3)
|
|
8
|
+
----------------------------------------------------------------
|
|
9
|
+
Provides high-speed persistent caching for AST syntax integrity, undefined variable
|
|
10
|
+
checks (F821), and syntactic mutation scans.
|
|
11
|
+
Uses mtime_ns + file size fast invalidation with SHA-256 fallback to eliminate
|
|
12
|
+
redundant AST parsing across recurring verification runs.
|
|
13
|
+
Uses cross-platform file locking to guarantee concurrency safety under multi-agent swarms.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
import os
|
|
20
|
+
import sys
|
|
21
|
+
from typing import Any, Dict, Optional, Tuple
|
|
22
|
+
|
|
23
|
+
# Ensure repository root is on sys.path for direct script execution
|
|
24
|
+
_REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
|
25
|
+
if _REPO_ROOT not in sys.path:
|
|
26
|
+
sys.path.insert(0, _REPO_ROOT)
|
|
27
|
+
|
|
28
|
+
# Import cross-platform advisory file lock
|
|
29
|
+
try:
|
|
30
|
+
from tools.core.file_lock import locked_json_read, locked_json_write
|
|
31
|
+
except ImportError:
|
|
32
|
+
try:
|
|
33
|
+
from core.file_lock import locked_json_read, locked_json_write
|
|
34
|
+
except ImportError:
|
|
35
|
+
# Fallback in case tools is executed without root in sys.path
|
|
36
|
+
sys.path.insert(0, os.path.dirname(__file__))
|
|
37
|
+
from core.file_lock import locked_json_read, locked_json_write
|
|
38
|
+
|
|
39
|
+
DEFAULT_CACHE_REL = os.path.join(".synapse", "ast_cache.json")
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ASTValidationCache:
|
|
43
|
+
"""
|
|
44
|
+
Persistent key-value cache for Python AST verification results.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def __init__(self, repo_root: Optional[str] = None, cache_path: Optional[str] = None):
|
|
48
|
+
if repo_root is None:
|
|
49
|
+
repo_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
|
50
|
+
self.repo_root = os.path.abspath(repo_root)
|
|
51
|
+
|
|
52
|
+
if cache_path is None:
|
|
53
|
+
self.cache_path = os.path.join(self.repo_root, DEFAULT_CACHE_REL)
|
|
54
|
+
else:
|
|
55
|
+
self.cache_path = os.path.abspath(cache_path)
|
|
56
|
+
|
|
57
|
+
self._entries: Dict[str, Dict[str, Any]] = {}
|
|
58
|
+
self._dirty = False
|
|
59
|
+
self.load()
|
|
60
|
+
|
|
61
|
+
def load(self) -> None:
|
|
62
|
+
"""Loads cached AST records from disk under advisory shared lock."""
|
|
63
|
+
if os.path.isfile(self.cache_path):
|
|
64
|
+
try:
|
|
65
|
+
data = locked_json_read(self.cache_path, timeout=5.0)
|
|
66
|
+
if isinstance(data, dict):
|
|
67
|
+
self._entries = data.get("entries", {})
|
|
68
|
+
except Exception:
|
|
69
|
+
self._entries = {}
|
|
70
|
+
else:
|
|
71
|
+
self._entries = {}
|
|
72
|
+
self._dirty = False
|
|
73
|
+
|
|
74
|
+
def save(self) -> None:
|
|
75
|
+
"""Flushes modified cache records to disk under exclusive atomic lock with disk-merge."""
|
|
76
|
+
if not self._dirty:
|
|
77
|
+
return
|
|
78
|
+
os.makedirs(os.path.dirname(self.cache_path), exist_ok=True)
|
|
79
|
+
# Read and merge existing entries to prevent concurrent worker/swarm overwrites
|
|
80
|
+
current_entries: Dict[str, Any] = {}
|
|
81
|
+
if os.path.isfile(self.cache_path):
|
|
82
|
+
try:
|
|
83
|
+
disk_data = locked_json_read(self.cache_path, timeout=5.0)
|
|
84
|
+
if isinstance(disk_data, dict):
|
|
85
|
+
current_entries = disk_data.get("entries", {})
|
|
86
|
+
except Exception:
|
|
87
|
+
current_entries = {}
|
|
88
|
+
current_entries.update(self._entries)
|
|
89
|
+
payload = {
|
|
90
|
+
"version": "1.0",
|
|
91
|
+
"repo_root": self.repo_root,
|
|
92
|
+
"entries": current_entries,
|
|
93
|
+
}
|
|
94
|
+
try:
|
|
95
|
+
locked_json_write(self.cache_path, payload, indent=2, timeout=5.0, atomic=True)
|
|
96
|
+
self._entries = current_entries
|
|
97
|
+
self._dirty = False
|
|
98
|
+
except Exception as err:
|
|
99
|
+
_ = err
|
|
100
|
+
|
|
101
|
+
def get_signature(self, file_path: str) -> Optional[Tuple[int, int]]:
|
|
102
|
+
"""Returns (mtime_ns, size) for fast freshness check."""
|
|
103
|
+
try:
|
|
104
|
+
st = os.stat(file_path)
|
|
105
|
+
return (st.st_mtime_ns, st.st_size)
|
|
106
|
+
except OSError:
|
|
107
|
+
return None
|
|
108
|
+
|
|
109
|
+
def get_cached_result(self, rel_path: str, mtime_ns: int, size: int) -> Optional[Dict[str, Any]]:
|
|
110
|
+
"""Retrieves cached result if signature matches."""
|
|
111
|
+
entry = self._entries.get(rel_path)
|
|
112
|
+
if entry is None:
|
|
113
|
+
return None
|
|
114
|
+
if entry.get("mtime_ns") == mtime_ns and entry.get("size") == size:
|
|
115
|
+
return entry.get("data")
|
|
116
|
+
return None
|
|
117
|
+
|
|
118
|
+
def put_result(self, rel_path: str, mtime_ns: int, size: int, data: Dict[str, Any]) -> None:
|
|
119
|
+
"""Records a new validation outcome in memory."""
|
|
120
|
+
self._entries[rel_path] = {
|
|
121
|
+
"mtime_ns": mtime_ns,
|
|
122
|
+
"size": size,
|
|
123
|
+
"data": data,
|
|
124
|
+
}
|
|
125
|
+
self._dirty = True
|
|
126
|
+
|
|
127
|
+
def clear(self) -> None:
|
|
128
|
+
"""Clears memory and persisted cache."""
|
|
129
|
+
self._entries.clear()
|
|
130
|
+
self._dirty = False
|
|
131
|
+
os.makedirs(os.path.dirname(self.cache_path), exist_ok=True)
|
|
132
|
+
payload = {
|
|
133
|
+
"version": "1.0",
|
|
134
|
+
"repo_root": self.repo_root,
|
|
135
|
+
"entries": {},
|
|
136
|
+
}
|
|
137
|
+
try:
|
|
138
|
+
locked_json_write(self.cache_path, payload, indent=2, timeout=5.0, atomic=True)
|
|
139
|
+
except Exception as err:
|
|
140
|
+
_ = err
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
# Module-level singleton helper
|
|
144
|
+
_GLOBAL_CACHE: Optional[ASTValidationCache] = None
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def get_ast_cache(repo_root: Optional[str] = None) -> ASTValidationCache:
|
|
148
|
+
"""Returns or initializes the process-wide AST cache."""
|
|
149
|
+
global _GLOBAL_CACHE
|
|
150
|
+
if _GLOBAL_CACHE is None:
|
|
151
|
+
_GLOBAL_CACHE = ASTValidationCache(repo_root=repo_root)
|
|
152
|
+
return _GLOBAL_CACHE
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def main():
|
|
156
|
+
parser = argparse.ArgumentParser(description="AST Dataflow Pre-Validation Cache (Boost B3)")
|
|
157
|
+
parser.add_argument("--clear", action="store_true", help="Clear persisted AST cache")
|
|
158
|
+
parser.add_argument("--stats", action="store_true", help="Print cache statistics")
|
|
159
|
+
args = parser.parse_args()
|
|
160
|
+
|
|
161
|
+
cache = get_ast_cache()
|
|
162
|
+
if args.clear:
|
|
163
|
+
cache.clear()
|
|
164
|
+
print("[AST CACHE] Cache cleared successfully.")
|
|
165
|
+
else:
|
|
166
|
+
entries = cache._entries
|
|
167
|
+
print(f"[AST CACHE] Path: {cache.cache_path} | Entries: {len(entries)}")
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
if __name__ == "__main__":
|
|
171
|
+
main()
|
|
@@ -4,13 +4,18 @@
|
|
|
4
4
|
# Project: Synapse-Hub (https://github.com/TeeVee998/Synapse-Hub)
|
|
5
5
|
|
|
6
6
|
"""
|
|
7
|
-
tools/author_integrity.py — Author Attribution &
|
|
7
|
+
tools/author_integrity.py — Author Attribution & Repository Provenance Guard
|
|
8
8
|
-----------------------------------------------------------------------------
|
|
9
|
-
Verifies
|
|
9
|
+
Verifies author provenance and copyright attribution across Synapse Hub repository assets.
|
|
10
10
|
Enforces the mandatory Attribution condition of the MIT License:
|
|
11
11
|
"The above copyright notice and this permission notice shall be included
|
|
12
12
|
in all copies or substantial portions of the Software."
|
|
13
13
|
|
|
14
|
+
Note on Legal Scope:
|
|
15
|
+
This script serves as an in-repository integrity and provenance verification sentinel.
|
|
16
|
+
It confirms internal file consistency and attribution headers, but is not a substitute
|
|
17
|
+
for external legal SBOM scans or formal trademark/copyright enforcement.
|
|
18
|
+
|
|
14
19
|
Checks:
|
|
15
20
|
1. LICENSE file exists with original copyright notice (Thế Vị @TeeVee998).
|
|
16
21
|
2. package.json maintains the original author attribution.
|