@teevee98/synapse-hub 4.3.0 → 4.4.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/agents/api-engineer.md +8 -0
- package/.agents/agents/perf-engineer.md +10 -2
- package/.agents/hooks/session_start.py +52 -0
- package/.agents/hooks.json +12 -0
- package/.agents/rules/performance_testing_rules.md +4 -3
- package/.agents/skills/01-web-automation/clean-pom-crafter/SKILL.md +6 -3
- package/.agents/skills/01-web-automation/e2e-testing-patterns/SKILL.md +3 -1
- package/.agents/skills/02-test-design/rbt-manual-testing/SKILL.md +11 -5
- package/.agents/skills/04-performance-and-load/backend-load-and-stress-patterns/SKILL.md +4 -1
- package/.agents/skills/04-performance-and-load/backend-load-and-stress-patterns/references/performance_test_plan_29119.md +106 -0
- package/.agents/skills/04-performance-and-load/web-vitals-and-performance-profiler/SKILL.md +75 -14
- package/.agents/skills/05-security-and-compliance/security-dast-sentinel/SKILL.md +13 -2
- package/.agents/skills/05-security-and-compliance/wcag-audit-patterns/SKILL.md +4 -1
- package/.agents/skills/07-data-and-state/file-and-report-validator/SKILL.md +8 -1
- package/.agents/skills/07-data-and-state/synthetic-test-data-generator/SKILL.md +4 -1
- package/.agents/skills/11-ai-and-prompting/mipro-prompt-compiler/SKILL.md +8 -0
- package/.agents/templates/performance-test-plan-template.md +106 -0
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/agentskills.json +1 -1
- package/docs/ARCHITECTURE.en.md +95 -2
- package/docs/ARCHITECTURE.md +86 -2
- package/docs/TOOL_CATALOG.md +11 -2
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills_manifest.json +1 -1
- package/synapse.config.json +1 -1
- package/tools/.infer_baseline.json +44 -3
- package/tools/TOOLS_RUNBOOK.md +237 -0
- package/tools/TOOL_CATALOG.json +138 -3
- package/tools/__init__.py +1 -1
- package/tools/ai_eval_sentinel.py +403 -0
- package/tools/asvs_auditor.py +410 -0
- package/tools/browser_helpers.js +2 -2
- package/tools/chaos_resilience_probe.py +362 -0
- package/tools/cldr_l10n_verifier.py +309 -0
- package/tools/cli.py +191 -3
- package/tools/cvss_calculator.py +412 -0
- package/tools/dashboard_generator.py +8 -8
- package/tools/dspy_qa_signatures.py +105 -1
- package/tools/etl_data_reconciler.py +460 -0
- package/tools/generate_jmx_plan.py +12 -4
- package/tools/jtl_analyzer.py +23 -1
- 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/mobile_resilience_sentinel.py +273 -0
- package/tools/observability_tester.py +235 -0
- package/tools/payment_interop_simulator.py +337 -0
- package/tools/pre_push_guard.py +306 -0
- package/tools/regulatory_compliance.py +336 -0
- package/tools/rules_router.py +1 -1
- package/tools/task_memory_manager.py +12 -1
- package/tools/test_memory_os.py +48 -0
- package/tools/tmmi_auditor.py +172 -0
- package/tools/tot_exploratory_tester.py +17 -0
- package/tools/ui_server.py +1 -1
- package/tools/update_sentinel.py +109 -43
- package/tools/vpat_exporter.py +428 -0
- package/tools/welcome_page.py +1 -1
package/tools/update_sentinel.py
CHANGED
|
@@ -68,7 +68,7 @@ def get_local_version():
|
|
|
68
68
|
try:
|
|
69
69
|
with open(pkg_file, "r", encoding="utf-8") as f:
|
|
70
70
|
data = json.load(f)
|
|
71
|
-
return data.get("version", "4.
|
|
71
|
+
return data.get("version", "4.4.0")
|
|
72
72
|
except (OSError, json.JSONDecodeError):
|
|
73
73
|
data = {}
|
|
74
74
|
|
|
@@ -77,11 +77,11 @@ def get_local_version():
|
|
|
77
77
|
try:
|
|
78
78
|
with open(manifest_file, "r", encoding="utf-8") as f:
|
|
79
79
|
data = json.load(f)
|
|
80
|
-
return data.get("version", "4.
|
|
80
|
+
return data.get("version", "4.4.0")
|
|
81
81
|
except (OSError, json.JSONDecodeError):
|
|
82
82
|
data = {}
|
|
83
83
|
|
|
84
|
-
return "4.
|
|
84
|
+
return "4.4.0"
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
def fetch_remote_version():
|
|
@@ -237,34 +237,37 @@ def verify_git_provenance(cwd):
|
|
|
237
237
|
return True, "Provenance verified"
|
|
238
238
|
|
|
239
239
|
|
|
240
|
-
def perform_update():
|
|
240
|
+
def perform_update(silent=False):
|
|
241
241
|
"""
|
|
242
242
|
Executes 1-click update:
|
|
243
243
|
1. If inside a git repository (local clone or global plugin): pulls latest changes.
|
|
244
244
|
2. Synchronizes SQLite central memory.
|
|
245
245
|
3. Re-runs DoD Quality Gates to guarantee integrity.
|
|
246
246
|
"""
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
247
|
+
if not silent:
|
|
248
|
+
print(f"\n{BOLD}{CYAN}======================================================================{RESET}")
|
|
249
|
+
print(f"{BOLD}{CYAN} SYNAPSE-HUB: 1-CLICK AUTOMATED UPDATE ENGINE {RESET}")
|
|
250
|
+
print(f"{BOLD}{CYAN}======================================================================{RESET}")
|
|
250
251
|
|
|
251
252
|
local_ver = get_local_version()
|
|
252
|
-
|
|
253
|
-
|
|
253
|
+
if not silent:
|
|
254
|
+
print(f"📦 Current Hub Version: {BOLD}v{local_ver}{RESET}")
|
|
255
|
+
print("🔍 Checking upstream for latest releases...")
|
|
254
256
|
|
|
255
257
|
has_update, local_ver, remote_ver = check_for_updates(force=True, notify=False)
|
|
256
|
-
if
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
if not silent:
|
|
259
|
+
if remote_ver:
|
|
260
|
+
print(f"🌐 Latest Upstream Version: {BOLD}{GREEN}v{remote_ver}{RESET}")
|
|
261
|
+
else:
|
|
262
|
+
print("⚠️ Could not reach upstream registry (offline or network timeout).")
|
|
260
263
|
|
|
261
264
|
# Detect if repo is a git clone
|
|
262
265
|
git_dir = os.path.join(HUB_ROOT, ".git")
|
|
263
266
|
is_git_repo = os.path.exists(git_dir)
|
|
264
267
|
|
|
265
|
-
|
|
266
268
|
if is_git_repo:
|
|
267
|
-
|
|
269
|
+
if not silent:
|
|
270
|
+
print(f"\n{BOLD}[1/3] Pulling latest updates via Git...{RESET}")
|
|
268
271
|
try:
|
|
269
272
|
res = subprocess.run(
|
|
270
273
|
["git", "pull", "--ff-only"],
|
|
@@ -275,28 +278,38 @@ def perform_update():
|
|
|
275
278
|
timeout=30.0
|
|
276
279
|
)
|
|
277
280
|
if res.returncode == 0:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
+
if not silent:
|
|
282
|
+
print(f" {GREEN}[OK] Git pull successful:{RESET}")
|
|
283
|
+
for line in res.stdout.strip().splitlines():
|
|
284
|
+
print(f" {line}")
|
|
281
285
|
ok, msg = verify_git_provenance(HUB_ROOT)
|
|
282
|
-
if not
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
+
if not silent:
|
|
287
|
+
if not ok:
|
|
288
|
+
print(f" {RED}⚠️ Provenance Warning: {msg}{RESET}")
|
|
289
|
+
else:
|
|
290
|
+
print(f" {GREEN}[OK] {msg}{RESET}")
|
|
286
291
|
# If this is the first pull, show the welcome landing page
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
welcome_page.
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
292
|
+
if not silent:
|
|
293
|
+
try:
|
|
294
|
+
import welcome_page
|
|
295
|
+
if welcome_page.is_first_run(HUB_ROOT):
|
|
296
|
+
welcome_page.generate_welcome_page(target_repo=HUB_ROOT, open_browser=True)
|
|
297
|
+
welcome_page.mark_first_run_completed(HUB_ROOT)
|
|
298
|
+
except (ImportError, OSError):
|
|
299
|
+
welcome_page = None
|
|
294
300
|
else:
|
|
295
|
-
|
|
301
|
+
if not silent:
|
|
302
|
+
print(f" ⚠️ Git pull notice: {res.stderr.strip() or res.stdout.strip()}")
|
|
303
|
+
else:
|
|
304
|
+
sys.stderr.write(f"[update_sentinel] Git pull skipped: {res.stderr.strip() or res.stdout.strip()}\n")
|
|
296
305
|
except Exception as e:
|
|
297
|
-
|
|
306
|
+
if not silent:
|
|
307
|
+
print(f" ⚠️ Could not execute git pull: {e}")
|
|
308
|
+
else:
|
|
309
|
+
sys.stderr.write(f"[update_sentinel] Git pull error: {e}\n")
|
|
298
310
|
else:
|
|
299
|
-
|
|
311
|
+
if not silent:
|
|
312
|
+
print(f"\n{BOLD}[1/3] Checking NPM package installation...{RESET}")
|
|
300
313
|
try:
|
|
301
314
|
res = subprocess.run(
|
|
302
315
|
["npm", "install", "-g", "@teevee98/synapse-hub@latest"],
|
|
@@ -305,7 +318,7 @@ def perform_update():
|
|
|
305
318
|
text=True,
|
|
306
319
|
timeout=60.0
|
|
307
320
|
)
|
|
308
|
-
if res.returncode == 0:
|
|
321
|
+
if res.returncode == 0 and not silent:
|
|
309
322
|
print(f" {GREEN}[OK] Global NPM package updated to latest!{RESET}")
|
|
310
323
|
except (subprocess.SubprocessError, OSError) as err:
|
|
311
324
|
import logging
|
|
@@ -313,12 +326,14 @@ def perform_update():
|
|
|
313
326
|
|
|
314
327
|
# 2. Check Global Plugin
|
|
315
328
|
if os.path.exists(GLOBAL_PLUGIN_DIR) and GLOBAL_PLUGIN_DIR.lower() != HUB_ROOT.lower():
|
|
316
|
-
|
|
329
|
+
if not silent:
|
|
330
|
+
print(f"\n{BOLD}[2/3] Synchronizing Global Antigravity Plugin...{RESET}")
|
|
317
331
|
plugin_git = os.path.join(GLOBAL_PLUGIN_DIR, ".git")
|
|
318
332
|
if os.path.exists(plugin_git):
|
|
319
333
|
try:
|
|
320
334
|
subprocess.run(["git", "pull", "--ff-only"], cwd=GLOBAL_PLUGIN_DIR, stdout=subprocess.DEVNULL, timeout=30.0)
|
|
321
|
-
|
|
335
|
+
if not silent:
|
|
336
|
+
print(f" {GREEN}[OK] Updated Global Plugin repository: {GLOBAL_PLUGIN_DIR}{RESET}")
|
|
322
337
|
except (subprocess.SubprocessError, OSError) as err:
|
|
323
338
|
import logging
|
|
324
339
|
logging.getLogger("update_sentinel").debug("Git pull skipped: %s", err)
|
|
@@ -331,19 +346,23 @@ def perform_update():
|
|
|
331
346
|
dst_f = os.path.join(GLOBAL_PLUGIN_DIR, meta_f)
|
|
332
347
|
if os.path.exists(src_f):
|
|
333
348
|
shutil.copy2(src_f, dst_f)
|
|
334
|
-
|
|
349
|
+
if not silent:
|
|
350
|
+
print(f" {GREEN}[OK] Refreshed metadata & LICENSE in: {GLOBAL_PLUGIN_DIR}{RESET}")
|
|
335
351
|
except OSError as err:
|
|
336
352
|
import logging
|
|
337
353
|
logging.getLogger("update_sentinel").debug("Failed to refresh metadata: %s", err)
|
|
338
354
|
|
|
339
355
|
# 3. Re-initialize SQLite Memory Cache
|
|
340
|
-
|
|
356
|
+
if not silent:
|
|
357
|
+
print(f"\n{BOLD}[3/3] Synchronizing Central Agent Memory Cache...{RESET}")
|
|
341
358
|
try:
|
|
342
359
|
import cache_resolver
|
|
343
360
|
cache_resolver.init_db(seed=True)
|
|
344
|
-
|
|
361
|
+
if not silent:
|
|
362
|
+
print(f" {GREEN}[OK] Synced episodic solution memory (0-token cache).{RESET}")
|
|
345
363
|
except Exception as e:
|
|
346
|
-
|
|
364
|
+
if not silent:
|
|
365
|
+
print(f" ⚠️ Cache sync notice: {e}")
|
|
347
366
|
|
|
348
367
|
# Clear update cache so banner dismisses
|
|
349
368
|
new_local_ver = get_local_version()
|
|
@@ -355,20 +374,67 @@ def perform_update():
|
|
|
355
374
|
}
|
|
356
375
|
write_update_cache(cache)
|
|
357
376
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
377
|
+
if not silent:
|
|
378
|
+
print(f"\n{BOLD}{CYAN}======================================================================{RESET}")
|
|
379
|
+
print(f"{BOLD}{GREEN} 🎉 UPDATE COMPLETE: Synapse-Hub is up to date (v{new_local_ver})! {RESET}")
|
|
380
|
+
print(f"{BOLD}{CYAN}======================================================================{RESET}\n")
|
|
361
381
|
return True
|
|
362
382
|
|
|
363
383
|
|
|
384
|
+
def run_auto_update_hook(force=False):
|
|
385
|
+
"""
|
|
386
|
+
Executes automated non-interactive update check for Antigravity SessionStart lifecycle hook.
|
|
387
|
+
Outputs strict JSON to stdout matching the Antigravity hook contract:
|
|
388
|
+
{"injectSteps": [{"systemMessage": {"systemMessage": "...", "metadata": {"user_markdown": "..."}}}]}
|
|
389
|
+
"""
|
|
390
|
+
try:
|
|
391
|
+
has_update, local_ver, remote_ver = check_for_updates(force=force, notify=False)
|
|
392
|
+
if not has_update or not remote_ver:
|
|
393
|
+
print(json.dumps({"injectSteps": []}))
|
|
394
|
+
return
|
|
395
|
+
|
|
396
|
+
# Perform silent update
|
|
397
|
+
perform_update(silent=True)
|
|
398
|
+
new_local_ver = get_local_version()
|
|
399
|
+
|
|
400
|
+
if parse_semver(new_local_ver) > parse_semver(local_ver):
|
|
401
|
+
msg = f"Synapse-Hub auto-updated from v{local_ver} to v{new_local_ver}."
|
|
402
|
+
badge = f"> 🚀 **Synapse Hub Auto-Updated:** `v{local_ver}` → `v{new_local_ver}` (Session Ready with 56 skills)"
|
|
403
|
+
else:
|
|
404
|
+
msg = f"Synapse-Hub update v{remote_ver} available upstream."
|
|
405
|
+
badge = f"> ℹ️ **Synapse Hub Update Available:** `v{remote_ver}` available upstream."
|
|
406
|
+
|
|
407
|
+
payload = {
|
|
408
|
+
"injectSteps": [
|
|
409
|
+
{
|
|
410
|
+
"systemMessage": {
|
|
411
|
+
"systemMessage": msg,
|
|
412
|
+
"metadata": {
|
|
413
|
+
"user_markdown": badge
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
print(json.dumps(payload))
|
|
420
|
+
except Exception as err:
|
|
421
|
+
sys.stderr.write(f"[update_sentinel] Auto-update hook notice: {err}\n")
|
|
422
|
+
print(json.dumps({"injectSteps": []}))
|
|
423
|
+
|
|
424
|
+
|
|
364
425
|
def main():
|
|
365
426
|
import argparse
|
|
366
427
|
parser = argparse.ArgumentParser(description="Synapse-Hub Auto-Update & Drift Sentinel")
|
|
367
428
|
parser.add_argument("--check", action="store_true", help="Check for available updates without applying")
|
|
368
429
|
parser.add_argument("--update", action="store_true", help="Perform 1-click update to latest version")
|
|
430
|
+
parser.add_argument("--auto", action="store_true", help="Non-interactive silent auto-update for Antigravity hooks")
|
|
369
431
|
parser.add_argument("--force", action="store_true", help="Force refresh update check bypassing cache")
|
|
370
432
|
args = parser.parse_args()
|
|
371
433
|
|
|
434
|
+
if args.auto:
|
|
435
|
+
run_auto_update_hook(force=args.force)
|
|
436
|
+
sys.exit(0)
|
|
437
|
+
|
|
372
438
|
if args.check:
|
|
373
439
|
has_update, cur, rem = check_for_updates(force=True, notify=False)
|
|
374
440
|
print(f"Current Hub Version : v{cur}")
|
|
@@ -380,7 +446,7 @@ def main():
|
|
|
380
446
|
print(f"{GREEN}✅ Synapse-Hub is up to date.{RESET}")
|
|
381
447
|
sys.exit(0)
|
|
382
448
|
|
|
383
|
-
if args.update or not (args.check or args.force):
|
|
449
|
+
if args.update or not (args.check or args.force or args.auto):
|
|
384
450
|
perform_update()
|
|
385
451
|
sys.exit(0)
|
|
386
452
|
|