@teevee98/synapse-hub 4.1.3 → 4.2.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/git-push-protocol.md +2 -2
- package/.agents/skills/01-web-automation/auth-session-and-cookie-manager/SKILL.md +6 -1
- package/.agents/skills/01-web-automation/bats-testing-patterns/SKILL.md +6 -1
- package/.agents/skills/01-web-automation/clean-pom-crafter/SKILL.md +8 -3
- 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/SKILL.md +6 -1
- package/.agents/skills/01-web-automation/e2e-testing-patterns/examples/playwright_sharded_config.ts +3 -0
- package/.agents/skills/01-web-automation/katalon-cli-runner/SKILL.md +6 -1
- package/.agents/skills/01-web-automation/lam-script-generator/SKILL.md +6 -1
- package/.agents/skills/01-web-automation/mobile-appium-som/SKILL.md +6 -1
- package/.agents/skills/01-web-automation/mobile-appium-som/examples/BaseScreen.java +2 -2
- package/.agents/skills/01-web-automation/mobile-appium-som/examples/LoginScreen.java +2 -2
- package/.agents/skills/01-web-automation/mobile-appium-som/examples/TC_MobileLogin.java +2 -2
- package/.agents/skills/01-web-automation/playwright-live-interaction/SKILL.md +7 -2
- package/.agents/skills/01-web-automation/playwright-webapp-testing/SKILL.md +6 -1
- package/.agents/skills/01-web-automation/playwright-webapp-testing/examples/server_lifecycle_playwright.py +3 -0
- package/.agents/skills/01-web-automation/web-agent-gym-benchmarking/SKILL.md +6 -1
- package/.agents/skills/02-test-design/architecture-decision-records/SKILL.md +6 -1
- package/.agents/skills/02-test-design/gherkin-to-suite/SKILL.md +6 -1
- package/.agents/skills/02-test-design/rbt-manual-testing/SKILL.md +6 -1
- package/.agents/skills/02-test-design/review-spec/SKILL.md +4 -1
- package/.agents/skills/02-test-design/tot-exploratory-testing/SKILL.md +6 -1
- package/.agents/skills/03-api-and-contracts/api-network-mocking-interception/SKILL.md +6 -1
- package/.agents/skills/03-api-and-contracts/api-spec-to-e2e-matrix/SKILL.md +6 -1
- package/.agents/skills/03-api-and-contracts/consumer-driven-contract-testing/SKILL.md +7 -2
- package/.agents/skills/04-performance-and-load/backend-load-and-stress-patterns/SKILL.md +7 -2
- package/.agents/skills/04-performance-and-load/lean-impact-scoreboard/SKILL.md +4 -1
- package/.agents/skills/04-performance-and-load/web-vitals-and-performance-profiler/SKILL.md +6 -1
- 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/SKILL.md +6 -1
- package/.agents/skills/05-security-and-compliance/security-dast-sentinel/references/dast_recipes.ts +3 -0
- package/.agents/skills/05-security-and-compliance/skillspector-security-guard/SKILL.md +6 -1
- package/.agents/skills/05-security-and-compliance/wcag-audit-patterns/SKILL.md +6 -1
- package/.agents/skills/06-healing-and-resilience/agentless-qa-repair/SKILL.md +6 -1
- package/.agents/skills/06-healing-and-resilience/antigravity-test-sentinel/SKILL.md +6 -1
- package/.agents/skills/06-healing-and-resilience/failure-autopsy-and-healing/SKILL.md +7 -2
- package/.agents/skills/06-healing-and-resilience/flaky-test-sentinel-and-quarantine/SKILL.md +6 -1
- package/.agents/skills/06-healing-and-resilience/self-healing-locator/SKILL.md +6 -1
- package/.agents/skills/06-healing-and-resilience/systematic-debugging/SKILL.md +6 -1
- package/.agents/skills/06-healing-and-resilience/test-driven-development/SKILL.md +6 -1
- package/.agents/skills/06-healing-and-resilience/verification-before-completion/SKILL.md +6 -1
- package/.agents/skills/06-healing-and-resilience/visual-regression-sentinel/SKILL.md +6 -1
- package/.agents/skills/07-data-and-state/db-state-verifier-and-seeder/SKILL.md +6 -1
- package/.agents/skills/07-data-and-state/file-and-report-validator/SKILL.md +6 -1
- package/.agents/skills/07-data-and-state/synthetic-test-data-generator/SKILL.md +6 -1
- package/.agents/skills/08-code-quality/code-refactoring-refactor-clean/SKILL.md +6 -1
- 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/08-code-quality/graphify-impact-analyzer/SKILL.md +6 -1
- package/.agents/skills/08-code-quality/lean-code-ladder/SKILL.md +6 -1
- package/.agents/skills/08-code-quality/repo-quality-audit/SKILL.md +4 -1
- package/.agents/skills/08-code-quality/senior-code-review/SKILL.md +4 -1
- package/.agents/skills/08-code-quality/surgical-coding-principles/SKILL.md +6 -1
- package/.agents/skills/08-code-quality/technical-debt-harvester/SKILL.md +4 -1
- package/.agents/skills/09-ci-and-devops/github-actions-templates/SKILL.md +6 -1
- package/.agents/skills/10-agent-orchestration/actor-qa-swarm/SKILL.md +6 -1
- package/.agents/skills/10-agent-orchestration/agent-orchestration-multi-agent-optimize/SKILL.md +6 -1
- package/.agents/skills/10-agent-orchestration/event-stream-qa-orchestrator/SKILL.md +6 -1
- package/.agents/skills/10-agent-orchestration/persistent-planning-files/SKILL.md +6 -1
- package/.agents/skills/10-agent-orchestration/qa-memory-os/SKILL.md +6 -1
- package/.agents/skills/11-ai-and-prompting/meta-prompt-crafter/SKILL.md +6 -1
- package/.agents/skills/11-ai-and-prompting/mipro-prompt-compiler/SKILL.md +6 -1
- package/.agents/skills/11-ai-and-prompting/qa-aci-interface/SKILL.md +6 -1
- package/.agents/skills/11-ai-and-prompting/qa-aci-interface/examples/surgical_code_window_walkthrough.md +1 -1
- package/.agents/skills/11-ai-and-prompting/token-and-context-optimizer/SKILL.md +6 -1
- package/AGENTS.md +7 -1
- package/LICENSE +5 -5
- package/NOTICE +1 -1
- package/README.en.md +4 -4
- package/README.md +4 -4
- package/agentskills.json +1 -1
- package/docs/ARCHITECTURE.en.md +2 -2
- package/docs/ARCHITECTURE.md +11 -2
- package/docs/CLI_REFERENCE.en.md +6 -4
- package/docs/CLI_REFERENCE.md +1 -1
- package/docs/CONTRIBUTING.en.md +1 -1
- package/docs/CONTRIBUTING.md +2 -2
- package/docs/PERFORMANCE_AUDIT_REPORT.md +2 -2
- package/docs/TOOL_CATALOG.md +6 -2
- package/docs/research/agent_skill_training_analysis.md +1 -1
- 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 +320 -55
- package/synapse.config.json +1 -1
- package/templates/ui/index.html +2 -2
- package/tools/.infer_baseline.json +3 -796
- package/tools/TOOL_CATALOG.json +63 -3
- 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 +182 -118
- package/tools/ast_cache.py +4 -2
- package/tools/author_integrity.py +174 -12
- package/tools/auto_heal.py +7 -2
- package/tools/autogen_qa_broker.py +14 -15
- package/tools/benchmark_swarm_context.py +119 -18
- package/tools/break_ui_generator.py +233 -0
- 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 +21 -50
- package/tools/ci_healing_hook.py +3 -0
- package/tools/cli.py +116 -22
- package/tools/config_decoupler.py +3 -0
- package/tools/core/__init__.py +3 -0
- package/tools/core/bm25_retriever.py +218 -0
- package/tools/core/file_lock.py +23 -14
- package/tools/core/i18n.py +13 -11
- package/tools/core/memory_bus.py +6 -3
- package/tools/core/process_supervisor.py +28 -18
- package/tools/core/provider_usage_adapter.py +317 -0
- package/tools/core/token_estimator.py +83 -18
- package/tools/count_tokens.py +16 -7
- package/tools/coverage_reporter.py +245 -0
- package/tools/create_mock_docx.py +3 -0
- package/tools/dashboard_generator.py +17 -15
- package/tools/db_sandbox.py +150 -5
- package/tools/debt_harvester.py +2 -2
- package/tools/diagram_architect.py +3 -0
- package/tools/distill_log.py +22 -2
- package/tools/distill_skill.py +191 -0
- 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 +25 -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/humanize_linter.py +3 -0
- 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 +78 -15
- package/tools/md_to_xlsx.py +3 -0
- package/tools/mechanical_ui_gate.py +3 -0
- package/tools/micro_mutator.py +93 -19
- 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 +401 -58
- package/tools/perf/__init__.py +3 -0
- package/tools/perf/benchmark_perf_runner.py +42 -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 +426 -34
- package/tools/runaway_stopper.py +3 -0
- package/tools/safety_firewall.py +3 -0
- package/tools/security_scanner.py +80 -0
- package/tools/senior_code_review.py +14 -0
- package/tools/setup_project.py +9 -4
- package/tools/skill_canonical_digest.py +244 -0
- package/tools/skill_collision_guard.py +2 -2
- package/tools/skill_profiles.py +77 -7
- package/tools/skillspector.py +2 -1
- package/tools/slide_deck_exporter.py +477 -0
- package/tools/smart_visual_masker.py +3 -0
- package/tools/sync_skills_manifest.py +166 -0
- package/tools/task_memory_manager.py +260 -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/validate_host_interop.py +485 -0
- package/tools/validate_skills_schema.py +282 -0
- package/tools/verify_all.py +600 -63
- 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 +2 -2
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
5
|
+
# -*- coding: utf-8 -*-
|
|
6
|
+
"""
|
|
7
|
+
tools/distill_skill.py — Dual-Skill Distillation Engine
|
|
8
|
+
Inspired by titanwings/distilly (26.6k ⭐).
|
|
9
|
+
|
|
10
|
+
Distills unified agent skills and guidelines into two decoupled artifacts:
|
|
11
|
+
1. work_skill.md: Concrete procedures, CLI commands, step sequences, and DoD gates.
|
|
12
|
+
2. persona_skill.md: Cognitive heuristics, identity, communication style, and invariants.
|
|
13
|
+
|
|
14
|
+
Prevents persona drift and execution ambiguity across multi-agent swarms.
|
|
15
|
+
100% Python Standard Library (zero external dependencies).
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
import os
|
|
20
|
+
import re
|
|
21
|
+
import sys
|
|
22
|
+
from typing import Dict, List, Optional, Tuple
|
|
23
|
+
|
|
24
|
+
PERSONA_KEYWORDS = {
|
|
25
|
+
"identity", "role", "tone", "communication", "telemetry", "badge",
|
|
26
|
+
"heuristic", "ruling", "philosophy", "senior dev", "protocol",
|
|
27
|
+
"style", "mindset", "falsification", "anti-pattern", "blacklist",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
PROCEDURE_KEYWORDS = {
|
|
31
|
+
"command", "cli", "run", "step", "execute", "workflow", "script",
|
|
32
|
+
"verification", "dod", "gate", "curl", "test", "matrix", "schema",
|
|
33
|
+
"setup", "install", "teardown", "mutation", "assertion",
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def parse_frontmatter(content: str) -> Tuple[Dict[str, str], str]:
|
|
38
|
+
"""Extracts YAML frontmatter if present and returns (frontmatter_dict, remaining_body)."""
|
|
39
|
+
match = re.match(r"^---\s*\n(.*?)\n---\s*\n(.*)$", content, re.DOTALL)
|
|
40
|
+
if not match:
|
|
41
|
+
return {}, content
|
|
42
|
+
|
|
43
|
+
raw_yaml = match.group(1)
|
|
44
|
+
body = match.group(2)
|
|
45
|
+
meta = {}
|
|
46
|
+
for line in raw_yaml.splitlines():
|
|
47
|
+
if ":" in line:
|
|
48
|
+
key, val = line.split(":", 1)
|
|
49
|
+
meta[key.strip()] = val.strip().strip("\"'")
|
|
50
|
+
return meta, body
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def split_markdown_sections(body: str) -> List[Tuple[str, str]]:
|
|
54
|
+
"""Splits markdown content into a list of (heading_title, section_text)."""
|
|
55
|
+
lines = body.splitlines()
|
|
56
|
+
sections: List[Tuple[str, str]] = []
|
|
57
|
+
current_title = "Introduction"
|
|
58
|
+
current_lines: List[str] = []
|
|
59
|
+
in_code_block = False
|
|
60
|
+
|
|
61
|
+
for line in lines:
|
|
62
|
+
stripped = line.strip()
|
|
63
|
+
if stripped.startswith("```"):
|
|
64
|
+
in_code_block = not in_code_block
|
|
65
|
+
|
|
66
|
+
heading_match = re.match(r"^(#{1,3})\s+(.*)$", line)
|
|
67
|
+
if heading_match and not in_code_block:
|
|
68
|
+
if current_lines:
|
|
69
|
+
sections.append((current_title, "\n".join(current_lines)))
|
|
70
|
+
current_lines = []
|
|
71
|
+
current_title = heading_match.group(2).strip()
|
|
72
|
+
current_lines.append(line)
|
|
73
|
+
else:
|
|
74
|
+
current_lines.append(line)
|
|
75
|
+
|
|
76
|
+
if current_lines:
|
|
77
|
+
sections.append((current_title, "\n".join(current_lines)))
|
|
78
|
+
|
|
79
|
+
return sections
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def classify_section(title: str, text: str) -> str:
|
|
83
|
+
"""Classifies a section as 'work', 'persona', or 'shared'."""
|
|
84
|
+
lower_title = title.lower()
|
|
85
|
+
lower_text = text.lower()
|
|
86
|
+
|
|
87
|
+
persona_score = sum(1 for kw in PERSONA_KEYWORDS if kw in lower_title) * 3
|
|
88
|
+
persona_score += sum(1 for kw in PERSONA_KEYWORDS if kw in lower_text)
|
|
89
|
+
|
|
90
|
+
proc_score = sum(1 for kw in PROCEDURE_KEYWORDS if kw in lower_title) * 3
|
|
91
|
+
proc_score += sum(1 for kw in PROCEDURE_KEYWORDS if kw in lower_text)
|
|
92
|
+
|
|
93
|
+
# Code blocks strongly indicate procedural work
|
|
94
|
+
code_blocks = len(re.findall(r"```[a-zA-Z0-9_-]*", text))
|
|
95
|
+
proc_score += code_blocks * 2
|
|
96
|
+
|
|
97
|
+
if persona_score > proc_score * 1.5:
|
|
98
|
+
return "persona"
|
|
99
|
+
if proc_score > persona_score * 1.2:
|
|
100
|
+
return "work"
|
|
101
|
+
return "shared"
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def distill_skill(content: str, base_name: str = "agent-skill") -> Tuple[str, str]:
|
|
105
|
+
"""
|
|
106
|
+
Distills skill content into (work_skill_markdown, persona_skill_markdown).
|
|
107
|
+
"""
|
|
108
|
+
meta, body = parse_frontmatter(content)
|
|
109
|
+
sections = split_markdown_sections(body)
|
|
110
|
+
|
|
111
|
+
work_sections: List[str] = []
|
|
112
|
+
persona_sections: List[str] = []
|
|
113
|
+
|
|
114
|
+
for title, text in sections:
|
|
115
|
+
classification = classify_section(title, text)
|
|
116
|
+
if classification == "persona":
|
|
117
|
+
persona_sections.append(text)
|
|
118
|
+
elif classification == "work":
|
|
119
|
+
work_sections.append(text)
|
|
120
|
+
else:
|
|
121
|
+
# Shared: include in both if relevant
|
|
122
|
+
work_sections.append(text)
|
|
123
|
+
persona_sections.append(text)
|
|
124
|
+
|
|
125
|
+
skill_title = meta.get("name", base_name)
|
|
126
|
+
skill_desc = meta.get("description", "Distilled Agent Skill")
|
|
127
|
+
|
|
128
|
+
work_skill_md = (
|
|
129
|
+
f"---\n"
|
|
130
|
+
f"name: {skill_title}-work\n"
|
|
131
|
+
f"description: \"Procedural execution guide for {skill_desc}\"\n"
|
|
132
|
+
f"type: procedural_work_skill\n"
|
|
133
|
+
f"---\n\n"
|
|
134
|
+
f"# {skill_title} — Procedural Work Skill\n\n"
|
|
135
|
+
+ "\n\n".join(work_sections).strip() + "\n"
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
persona_skill_md = (
|
|
139
|
+
f"---\n"
|
|
140
|
+
f"name: {skill_title}-persona\n"
|
|
141
|
+
f"description: \"Cognitive heuristics, persona invariants and communication for {skill_desc}\"\n"
|
|
142
|
+
f"type: cognitive_persona_skill\n"
|
|
143
|
+
f"---\n\n"
|
|
144
|
+
f"# {skill_title} — Cognitive Persona Skill\n\n"
|
|
145
|
+
+ "\n\n".join(persona_sections).strip() + "\n"
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
return work_skill_md, persona_skill_md
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def distill_file(input_path: str, output_dir: Optional[str] = None) -> Tuple[str, str]:
|
|
152
|
+
"""Reads a file, distills it, and writes work_skill.md & persona_skill.md."""
|
|
153
|
+
if not os.path.isfile(input_path):
|
|
154
|
+
raise FileNotFoundError(f"Input skill file not found: {input_path}")
|
|
155
|
+
|
|
156
|
+
with open(input_path, "r", encoding="utf-8") as f:
|
|
157
|
+
content = f.read()
|
|
158
|
+
|
|
159
|
+
base_name = os.path.splitext(os.path.basename(input_path))[0]
|
|
160
|
+
out_dir = output_dir or os.path.dirname(os.path.abspath(input_path))
|
|
161
|
+
os.makedirs(out_dir, exist_ok=True)
|
|
162
|
+
|
|
163
|
+
work_md, persona_md = distill_skill(content, base_name=base_name)
|
|
164
|
+
|
|
165
|
+
work_path = os.path.join(out_dir, "work_skill.md")
|
|
166
|
+
persona_path = os.path.join(out_dir, "persona_skill.md")
|
|
167
|
+
|
|
168
|
+
with open(work_path, "w", encoding="utf-8") as f:
|
|
169
|
+
f.write(work_md)
|
|
170
|
+
|
|
171
|
+
with open(persona_path, "w", encoding="utf-8") as f:
|
|
172
|
+
f.write(persona_md)
|
|
173
|
+
|
|
174
|
+
return work_path, persona_path
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def main() -> int:
|
|
178
|
+
parser = argparse.ArgumentParser(description="Dual-Skill Distillation Engine (titanwings/distilly pattern)")
|
|
179
|
+
parser.add_argument("input", help="Path to input SKILL.md or guideline file")
|
|
180
|
+
parser.add_argument("--out-dir", default=None, help="Output directory for work_skill.md and persona_skill.md")
|
|
181
|
+
args = parser.parse_args()
|
|
182
|
+
|
|
183
|
+
work_p, persona_p = distill_file(args.input, args.out_dir)
|
|
184
|
+
print("✅ Successfully distilled dual skills:")
|
|
185
|
+
print(f" - Procedural Work Skill: {work_p}")
|
|
186
|
+
print(f" - Cognitive Persona: {persona_p}")
|
|
187
|
+
return 0
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
if __name__ == "__main__":
|
|
191
|
+
sys.exit(main())
|
package/tools/e2e_flow_prober.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
|
Enterprise E2E Flow Prober & XPath Crawler Dispatcher (Cross-Platform)
|
|
4
7
|
----------------------------------------------------------------------
|
|
@@ -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
|
# -*- coding: utf-8 -*-
|
|
3
6
|
"""
|
|
4
7
|
tools/export_postman_collection.py — Enterprise API to Postman Collection v2.1.0 Exporter (Postman Pinnacle)
|
package/tools/flaky_detector.py
CHANGED
package/tools/fsm_enforcer.py
CHANGED
|
@@ -135,8 +135,8 @@ def compute_artifact_hashes(artifacts: List[str], base_dir: Optional[str] = None
|
|
|
135
135
|
with open(target, "rb") as f:
|
|
136
136
|
file_bytes = f.read()
|
|
137
137
|
hashes[item] = hashlib.sha256(file_bytes).hexdigest()
|
|
138
|
-
except OSError
|
|
139
|
-
|
|
138
|
+
except OSError:
|
|
139
|
+
continue
|
|
140
140
|
return hashes
|
|
141
141
|
|
|
142
142
|
|
package/tools/fuzz_payloads.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
|
Enterprise Edge-Case Fuzzing & Input Sanitization Payload Catalog
|
|
4
7
|
------------------------------------------------------------------
|
|
@@ -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 Allure HTML Report Generator (Cross-Platform)
|
|
4
7
|
---------------------------------------------------------
|
|
@@ -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
|
# -*- coding: utf-8 -*-
|
|
3
6
|
"""
|
|
4
7
|
tools/generate_api_matrix.py — OpenAPI / Swagger to E2E Testing Matrix Generator
|
|
@@ -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
|
# -*- coding: utf-8 -*-
|
|
3
6
|
"""
|
|
4
7
|
tools/generate_jmx_plan.py — Enterprise Apache JMeter 5.x Test Plan XML Generator (JMeter 360° Pinnacle)
|
|
@@ -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 Test Report Aggregator & summaryTemp Generator (Cross-Platform)
|
|
4
7
|
-------------------------------------------------------------------------
|
|
@@ -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 Git Pre-Commit Architecture & Discipline Guard
|
|
4
7
|
--------------------------------------------------
|
|
@@ -23,12 +26,20 @@ if hasattr(sys.stdout, 'reconfigure'):
|
|
|
23
26
|
except Exception:
|
|
24
27
|
pass
|
|
25
28
|
|
|
26
|
-
FORBIDDEN_PATHS = ["/Users/", "C:\\Workspace\\", "D:\\Workspace\\", "file:///c:", "file:///d:"]
|
|
29
|
+
FORBIDDEN_PATHS = ["/Users/", "/home/", "C:\\Workspace\\", "D:\\Workspace\\", "file:///c:", "file:///d:"]
|
|
27
30
|
FORBIDDEN_HUB_PREFIXES = (
|
|
28
31
|
"Scripts/", "Keywords/", "Object Repository/", "Test Suites/", "Data Files/", "Include/",
|
|
29
32
|
"e2e/", "pages/", "cypress/"
|
|
30
33
|
)
|
|
31
34
|
|
|
35
|
+
def check_no_verify_attempt(args: list) -> bool:
|
|
36
|
+
"""Block any bypass attempt using --no-verify flag (Inspired by wshobson block-no-verify)."""
|
|
37
|
+
if any(arg in ("--no-verify", "-n") for arg in args):
|
|
38
|
+
print("❌ [CRITICAL SECURITY BLOCKED] Git pre-commit bypass flag (--no-verify / -n) is strictly forbidden in Synapse Hub.")
|
|
39
|
+
print(" All commits must adhere to the 10 DoD Quality Gates without exception.")
|
|
40
|
+
return False
|
|
41
|
+
return True
|
|
42
|
+
|
|
32
43
|
def is_test_script(file_path: str) -> bool:
|
|
33
44
|
"""
|
|
34
45
|
Identifies test scripts across polyglot test frameworks:
|
|
@@ -94,13 +105,15 @@ def check_forbidden_paths(files):
|
|
|
94
105
|
if not os.path.exists(f) or os.path.isdir(f):
|
|
95
106
|
continue
|
|
96
107
|
# Skip this guard script itself and binary files
|
|
97
|
-
if
|
|
108
|
+
if os.path.basename(f) == "git_pre_commit_guard.py" or f.endswith(
|
|
109
|
+
(".db", ".png", ".jpg", ".jpeg", ".zip", ".tar", ".gz", ".ico", ".bin")
|
|
110
|
+
):
|
|
98
111
|
continue
|
|
99
112
|
try:
|
|
100
113
|
with open(f, "r", encoding="utf-8", errors="ignore") as fp:
|
|
101
114
|
for line_no, line in enumerate(fp, 1):
|
|
102
115
|
# Allow mention in historical report or gitignore
|
|
103
|
-
if "FINAL_REPORT.md" in f or ".gitignore" in f:
|
|
116
|
+
if "FINAL_REPORT.md" in f or "AUDIT_REPORT.md" in f or "PROJECT_HEALTH_REPORT.md" in f or ".gitignore" in f:
|
|
104
117
|
continue
|
|
105
118
|
for forbidden in FORBIDDEN_PATHS:
|
|
106
119
|
if forbidden in line:
|
|
@@ -115,6 +128,9 @@ def check_scripts_clean_pom(files):
|
|
|
115
128
|
xpath_pattern = re.compile(
|
|
116
129
|
r'(?<!:)//(?:\*|table|input|button|div|span|form|select|textarea|a(?=[\[/@\s\'"]|$))'
|
|
117
130
|
)
|
|
131
|
+
semantic_locator_pattern = re.compile(
|
|
132
|
+
r'(?:page|frame)\.(?:getByRole|getByLabel|getByPlaceholder|getByText|getByTestId|getByAltText|getByTitle)\s*\('
|
|
133
|
+
)
|
|
118
134
|
for f in files:
|
|
119
135
|
if not os.path.exists(f):
|
|
120
136
|
continue
|
|
@@ -133,6 +149,8 @@ def check_scripts_clean_pom(files):
|
|
|
133
149
|
violations.append((f, line_no, "Raw findTestObject is forbidden in test scripts"))
|
|
134
150
|
if "xpath=" in line:
|
|
135
151
|
violations.append((f, line_no, "Explicit xpath= locator is forbidden in test scripts"))
|
|
152
|
+
if semantic_locator_pattern.search(line):
|
|
153
|
+
violations.append((f, line_no, "Raw Playwright semantic locator is forbidden in test scripts (encapsulate in Page Class)"))
|
|
136
154
|
# Strip standard HTTP/HTTPS URLs before checking XPath syntax
|
|
137
155
|
line_no_urls = re.sub(r'https?://[^\s\'"]+', '', line)
|
|
138
156
|
if "//" in line_no_urls and xpath_pattern.search(line_no_urls):
|
|
@@ -194,6 +212,10 @@ def main():
|
|
|
194
212
|
print(f" - Pre-push: {pre_push_path} (Auto-runs cache_resolver.py sync on git push)")
|
|
195
213
|
sys.exit(0)
|
|
196
214
|
|
|
215
|
+
# Block --no-verify attempt
|
|
216
|
+
if not check_no_verify_attempt(sys.argv[1:]):
|
|
217
|
+
sys.exit(1)
|
|
218
|
+
|
|
197
219
|
# Get staged files
|
|
198
220
|
res = run_cmd("git diff --cached --name-only")
|
|
199
221
|
staged_files = [f.strip() for f in res.stdout.splitlines() if f.strip()]
|
package/tools/heal/__init__.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
1
4
|
"""
|
|
2
5
|
Synapse Hub — Self-Healing & Autonomous Repair Engines (tools.heal)
|
|
3
6
|
-------------------------------------------------------------------
|
|
@@ -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 Self-Healing Confidence Scorer & PR Automator
|
|
4
7
|
---------------------------------------------------------
|
|
@@ -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
|
3-Layer Heuristic Locator Matcher (0-Token Autonomous Recovery)
|
|
4
7
|
--------------------------------------------------------------
|
package/tools/hub_publisher.py
CHANGED
|
@@ -409,7 +409,7 @@ def check_npm_registry_live_version(package_name: Optional[str] = None) -> Optio
|
|
|
409
409
|
data = json.loads(resp.read().decode("utf-8"))
|
|
410
410
|
return data.get("version")
|
|
411
411
|
except Exception as exc:
|
|
412
|
-
|
|
412
|
+
log_warn(f"npm HTTP probe skipped: {exc}")
|
|
413
413
|
return None
|
|
414
414
|
|
|
415
415
|
|
|
@@ -465,10 +465,10 @@ def step_4_and_5_monitor_packages_and_npm(owner: str, repo: str, version: str, t
|
|
|
465
465
|
log_warn(f"GitHub Actions publish_npm.yml completed with conclusion: {conclusion}")
|
|
466
466
|
break
|
|
467
467
|
except Exception as exc:
|
|
468
|
-
|
|
468
|
+
log_warn(f"GitHub Actions poll skipped: {exc}")
|
|
469
469
|
|
|
470
470
|
print(f" Waiting for NPM registry replication... ({int(time.time() - start_time)}s/{wait_timeout}s)")
|
|
471
|
-
time.sleep(poll_interval)
|
|
471
|
+
time.sleep(poll_interval) # synapse-ignore: HARD_DELAY_ANTI_PATTERN
|
|
472
472
|
|
|
473
473
|
if not npm_verified:
|
|
474
474
|
# Final fallback check
|
package/tools/humanize_linter.py
CHANGED
|
@@ -180,6 +180,9 @@ CLICHE_PHRASES: List[Tuple[str, str]] = [
|
|
|
180
180
|
(r"\bwithout further ado\b", "dive directly into technical content"),
|
|
181
181
|
(r"\bi hope this helps\b", "omit conversational fluff"),
|
|
182
182
|
(r"\bhere is the updated code\b", "deliver code directly"),
|
|
183
|
+
(r"\byou(?:'re| are) absolutely right\b", "omit sycophantic praise (Coder rule)"),
|
|
184
|
+
(r"\bi apologize for the confusion\b", "omit conversational apology; state factual fix (Ruff rule)"),
|
|
185
|
+
(r"\bgreat question\b", "omit sycophantic opener; answer directly"),
|
|
183
186
|
]
|
|
184
187
|
|
|
185
188
|
# Words that are fine in isolation, but suspicious when piled up (>= 3 times)
|
package/tools/infer_linter.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
|
Universal QA Static Defect & Assertion Sentinel (Inspired by facebook/infer)
|
|
4
7
|
-------------------------------------------------------------------
|
|
@@ -19,6 +22,7 @@ import glob
|
|
|
19
22
|
import ast
|
|
20
23
|
import html as html_lib
|
|
21
24
|
import argparse
|
|
25
|
+
import logging
|
|
22
26
|
from datetime import datetime
|
|
23
27
|
|
|
24
28
|
# Enforce UTF-8 stdout encoding for Windows console compatibility
|
|
@@ -222,8 +226,8 @@ def load_config(repo_root=None, config_path=None):
|
|
|
222
226
|
try:
|
|
223
227
|
with open(config_path, "r", encoding="utf-8") as f:
|
|
224
228
|
return json.load(f)
|
|
225
|
-
except (OSError, json.JSONDecodeError):
|
|
226
|
-
|
|
229
|
+
except (OSError, json.JSONDecodeError) as err:
|
|
230
|
+
logging.getLogger("infer_linter").debug("Failed to read config from %s: %s", config_path, err)
|
|
227
231
|
|
|
228
232
|
root = repo_root or REPO_ROOT
|
|
229
233
|
candidates = [
|
|
@@ -255,9 +259,11 @@ def load_baseline(baseline_path):
|
|
|
255
259
|
f_path = it.get("file", "").replace("\\", "/")
|
|
256
260
|
d_type = it.get("type", "").upper()
|
|
257
261
|
d_line = it.get("line")
|
|
258
|
-
signatures.add((f_path, d_type))
|
|
259
262
|
if d_line is not None:
|
|
260
|
-
|
|
263
|
+
try:
|
|
264
|
+
signatures.add((f_path, d_type, int(d_line)))
|
|
265
|
+
except (ValueError, TypeError):
|
|
266
|
+
signatures.add((f_path, d_type, d_line))
|
|
261
267
|
return signatures
|
|
262
268
|
except (OSError, json.JSONDecodeError):
|
|
263
269
|
return set()
|
|
@@ -611,8 +617,8 @@ def analyze_script(file_path, baseline_set=None, disabled_rules=None):
|
|
|
611
617
|
"line": line_no,
|
|
612
618
|
"message": f"Test data creation detected without paired teardown cleanup ('{raw_line}'). Risk of DB state pollution per AGENTS.md Rule 1.3."
|
|
613
619
|
})
|
|
614
|
-
except SyntaxError:
|
|
615
|
-
|
|
620
|
+
except SyntaxError as err:
|
|
621
|
+
logging.getLogger("infer_linter").debug("AST parse skipped due to syntax error: %s", err)
|
|
616
622
|
|
|
617
623
|
# Rule 5 (L4): Unawaited Playwright Assertions in JS/TS
|
|
618
624
|
if file_path.endswith((".ts", ".tsx", ".js", ".jsx")):
|
|
@@ -727,7 +733,8 @@ def analyze_script(file_path, baseline_set=None, disabled_rules=None):
|
|
|
727
733
|
|
|
728
734
|
# Check baseline suppression
|
|
729
735
|
if baseline_set:
|
|
730
|
-
|
|
736
|
+
norm_abs = os.path.abspath(file_path).replace("\\", "/")
|
|
737
|
+
if (norm_rel, d_type, line_idx) in baseline_set or (norm_abs, d_type, line_idx) in baseline_set:
|
|
731
738
|
continue
|
|
732
739
|
|
|
733
740
|
active_defects.append(d)
|
|
@@ -940,8 +947,11 @@ def run_infer_linter(target_dir=None, output_path=None, strict: bool = False,
|
|
|
940
947
|
print(f"Detailed audit saved to: {dest_json}\n")
|
|
941
948
|
|
|
942
949
|
if strict:
|
|
943
|
-
|
|
944
|
-
|
|
950
|
+
anti_pattern_count = sum(1 for r in results for d in r["defects"] if d["type"] in (
|
|
951
|
+
"FAKE_PASS_NO_ASSERTION", "NO_ASSERTION_IN_TEST", "DANGLING_ASSERTION_NO_MATCHER",
|
|
952
|
+
"HARD_DELAY_ANTI_PATTERN", "EXCESSIVE_HARD_DELAY"
|
|
953
|
+
))
|
|
954
|
+
return 0 if (critical_count == 0 and anti_pattern_count == 0) else 1
|
|
945
955
|
return 0 if critical_count == 0 else 1
|
|
946
956
|
|
|
947
957
|
|
package/tools/init_config.py
CHANGED
|
@@ -50,9 +50,8 @@ def is_hub_directory(target_path: Path) -> bool:
|
|
|
50
50
|
return True
|
|
51
51
|
if (resolved / "skills_manifest.json").is_file() and (resolved / "AGENTS.md").is_file():
|
|
52
52
|
return True
|
|
53
|
-
except (OSError, ValueError)
|
|
54
|
-
|
|
55
|
-
return False
|
|
53
|
+
except (OSError, ValueError):
|
|
54
|
+
return False
|
|
56
55
|
|
|
57
56
|
|
|
58
57
|
def get_hub_version() -> str:
|
|
@@ -62,9 +61,8 @@ def get_hub_version() -> str:
|
|
|
62
61
|
if pkg_file.is_file():
|
|
63
62
|
with open(pkg_file, "r", encoding="utf-8") as f:
|
|
64
63
|
return json.load(f).get("version", "3.2.1")
|
|
65
|
-
except (OSError, json.JSONDecodeError)
|
|
66
|
-
|
|
67
|
-
return "3.2.1"
|
|
64
|
+
except (OSError, json.JSONDecodeError):
|
|
65
|
+
return "3.2.1"
|
|
68
66
|
|
|
69
67
|
|
|
70
68
|
def detect_git_user_name() -> Optional[str]:
|
|
@@ -78,9 +76,8 @@ def detect_git_user_name() -> Optional[str]:
|
|
|
78
76
|
)
|
|
79
77
|
if res.returncode == 0 and res.stdout.strip():
|
|
80
78
|
return res.stdout.strip()
|
|
81
|
-
except (subprocess.SubprocessError, OSError)
|
|
82
|
-
|
|
83
|
-
return None
|
|
79
|
+
except (subprocess.SubprocessError, OSError):
|
|
80
|
+
return None
|
|
84
81
|
|
|
85
82
|
|
|
86
83
|
def build_default_config(
|
package/tools/jtl_analyzer.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
|
# -*- coding: utf-8 -*-
|
|
3
6
|
"""
|
|
4
7
|
tools/jtl_analyzer.py — Enterprise Apache JMeter JTL Results Analyzer & CI/CD Gatekeeper
|
package/tools/lint/__init__.py
CHANGED
package/tools/lint_ai_docs.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
|
Enterprise AI Documentation & Artifact Linter (Anti-Drift Guard v2.0)
|
|
4
7
|
---------------------------------------------------------------
|
package/tools/lookup_tc.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
|
Enterprise QA: Fast Test Case Metadata Lookup (lookup_tc.py)
|
|
4
7
|
-------------------------------------------------------------
|
package/tools/lookup_xpath.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
|
Enterprise QA: Fast XPath / Selector Lookup (lookup_xpath.py)
|
|
4
7
|
-------------------------------------------------------------
|
package/tools/matrix_sharder.py
CHANGED
package/tools/mcp/__init__.py
CHANGED
package/tools/mcp_docx_server.py
CHANGED
|
@@ -60,7 +60,7 @@ if hasattr(sys.stdout, 'reconfigure'):
|
|
|
60
60
|
except Exception:
|
|
61
61
|
pass
|
|
62
62
|
|
|
63
|
-
SERVER_VERSION = "4.
|
|
63
|
+
SERVER_VERSION = "4.2.0"
|
|
64
64
|
MAX_DOCX_SIZE = 50 * 1024 * 1024 # 50 MB
|
|
65
65
|
MAX_UNCOMPRESSED_SIZE = 200 * 1024 * 1024 # 200 MB
|
|
66
66
|
MAX_RATIO = 100 # 100:1 compression ratio limit
|
|
@@ -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 Cross-Platform MCP Excel Server (Zero-Dependency)
|
|
4
7
|
-----------------------------------------------------------
|
|
@@ -52,7 +55,7 @@ if hasattr(sys.stdout, 'reconfigure'):
|
|
|
52
55
|
except Exception:
|
|
53
56
|
pass
|
|
54
57
|
|
|
55
|
-
SERVER_VERSION = "4.
|
|
58
|
+
SERVER_VERSION = "4.2.0"
|
|
56
59
|
MAX_XLSX_SIZE = 50 * 1024 * 1024 # 50 MB
|
|
57
60
|
MAX_UNCOMPRESSED_SIZE = 200 * 1024 * 1024 # 200 MB
|
|
58
61
|
MAX_RATIO = 100 # 100:1 compression ratio limit
|