@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.
Files changed (60) hide show
  1. package/.agents/agents/api-engineer.md +8 -0
  2. package/.agents/agents/perf-engineer.md +10 -2
  3. package/.agents/hooks/session_start.py +52 -0
  4. package/.agents/hooks.json +12 -0
  5. package/.agents/rules/performance_testing_rules.md +4 -3
  6. package/.agents/skills/01-web-automation/clean-pom-crafter/SKILL.md +6 -3
  7. package/.agents/skills/01-web-automation/e2e-testing-patterns/SKILL.md +3 -1
  8. package/.agents/skills/02-test-design/rbt-manual-testing/SKILL.md +11 -5
  9. package/.agents/skills/04-performance-and-load/backend-load-and-stress-patterns/SKILL.md +4 -1
  10. package/.agents/skills/04-performance-and-load/backend-load-and-stress-patterns/references/performance_test_plan_29119.md +106 -0
  11. package/.agents/skills/04-performance-and-load/web-vitals-and-performance-profiler/SKILL.md +75 -14
  12. package/.agents/skills/05-security-and-compliance/security-dast-sentinel/SKILL.md +13 -2
  13. package/.agents/skills/05-security-and-compliance/wcag-audit-patterns/SKILL.md +4 -1
  14. package/.agents/skills/07-data-and-state/file-and-report-validator/SKILL.md +8 -1
  15. package/.agents/skills/07-data-and-state/synthetic-test-data-generator/SKILL.md +4 -1
  16. package/.agents/skills/11-ai-and-prompting/mipro-prompt-compiler/SKILL.md +8 -0
  17. package/.agents/templates/performance-test-plan-template.md +106 -0
  18. package/README.en.md +2 -2
  19. package/README.md +2 -2
  20. package/agentskills.json +1 -1
  21. package/docs/ARCHITECTURE.en.md +95 -2
  22. package/docs/ARCHITECTURE.md +86 -2
  23. package/docs/TOOL_CATALOG.md +11 -2
  24. package/package.json +1 -1
  25. package/plugin.json +1 -1
  26. package/skills_manifest.json +1 -1
  27. package/synapse.config.json +1 -1
  28. package/tools/.infer_baseline.json +44 -3
  29. package/tools/TOOLS_RUNBOOK.md +237 -0
  30. package/tools/TOOL_CATALOG.json +138 -3
  31. package/tools/__init__.py +1 -1
  32. package/tools/ai_eval_sentinel.py +403 -0
  33. package/tools/asvs_auditor.py +410 -0
  34. package/tools/browser_helpers.js +2 -2
  35. package/tools/chaos_resilience_probe.py +362 -0
  36. package/tools/cldr_l10n_verifier.py +309 -0
  37. package/tools/cli.py +191 -3
  38. package/tools/cvss_calculator.py +412 -0
  39. package/tools/dashboard_generator.py +8 -8
  40. package/tools/dspy_qa_signatures.py +105 -1
  41. package/tools/etl_data_reconciler.py +460 -0
  42. package/tools/generate_jmx_plan.py +12 -4
  43. package/tools/jtl_analyzer.py +23 -1
  44. package/tools/mcp_docx_server.py +1 -1
  45. package/tools/mcp_excel_server.py +1 -1
  46. package/tools/mcp_server.py +1 -1
  47. package/tools/mobile_resilience_sentinel.py +273 -0
  48. package/tools/observability_tester.py +235 -0
  49. package/tools/payment_interop_simulator.py +337 -0
  50. package/tools/pre_push_guard.py +306 -0
  51. package/tools/regulatory_compliance.py +336 -0
  52. package/tools/rules_router.py +1 -1
  53. package/tools/task_memory_manager.py +12 -1
  54. package/tools/test_memory_os.py +48 -0
  55. package/tools/tmmi_auditor.py +172 -0
  56. package/tools/tot_exploratory_tester.py +17 -0
  57. package/tools/ui_server.py +1 -1
  58. package/tools/update_sentinel.py +109 -43
  59. package/tools/vpat_exporter.py +428 -0
  60. package/tools/welcome_page.py +1 -1
@@ -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.3.0")
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.3.0")
80
+ return data.get("version", "4.4.0")
81
81
  except (OSError, json.JSONDecodeError):
82
82
  data = {}
83
83
 
84
- return "4.3.0"
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
- print(f"\n{BOLD}{CYAN}======================================================================{RESET}")
248
- print(f"{BOLD}{CYAN} SYNAPSE-HUB: 1-CLICK AUTOMATED UPDATE ENGINE {RESET}")
249
- print(f"{BOLD}{CYAN}======================================================================{RESET}")
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
- print(f"📦 Current Hub Version: {BOLD}v{local_ver}{RESET}")
253
- print("🔍 Checking upstream for latest releases...")
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 remote_ver:
257
- print(f"🌐 Latest Upstream Version: {BOLD}{GREEN}v{remote_ver}{RESET}")
258
- else:
259
- print("⚠️ Could not reach upstream registry (offline or network timeout).")
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
- print(f"\n{BOLD}[1/3] Pulling latest updates via Git...{RESET}")
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
- print(f" {GREEN}[OK] Git pull successful:{RESET}")
279
- for line in res.stdout.strip().splitlines():
280
- print(f" {line}")
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 ok:
283
- print(f" {RED}⚠️ Provenance Warning: {msg}{RESET}")
284
- else:
285
- print(f" {GREEN}[OK] {msg}{RESET}")
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
- try:
288
- import welcome_page
289
- if welcome_page.is_first_run(HUB_ROOT):
290
- welcome_page.generate_welcome_page(target_repo=HUB_ROOT, open_browser=True)
291
- welcome_page.mark_first_run_completed(HUB_ROOT)
292
- except (ImportError, OSError):
293
- welcome_page = None
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
- print(f" ⚠️ Git pull notice: {res.stderr.strip() or res.stdout.strip()}")
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
- print(f" ⚠️ Could not execute git pull: {e}")
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
- print(f"\n{BOLD}[1/3] Checking NPM package installation...{RESET}")
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
- print(f"\n{BOLD}[2/3] Synchronizing Global Antigravity Plugin...{RESET}")
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
- print(f" {GREEN}[OK] Updated Global Plugin repository: {GLOBAL_PLUGIN_DIR}{RESET}")
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
- print(f" {GREEN}[OK] Refreshed metadata & LICENSE in: {GLOBAL_PLUGIN_DIR}{RESET}")
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
- print(f"\n{BOLD}[3/3] Synchronizing Central Agent Memory Cache...{RESET}")
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
- print(f" {GREEN}[OK] Synced episodic solution memory (0-token cache).{RESET}")
361
+ if not silent:
362
+ print(f" {GREEN}[OK] Synced episodic solution memory (0-token cache).{RESET}")
345
363
  except Exception as e:
346
- print(f" ⚠️ Cache sync notice: {e}")
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
- print(f"\n{BOLD}{CYAN}======================================================================{RESET}")
359
- print(f"{BOLD}{GREEN} 🎉 UPDATE COMPLETE: Synapse-Hub is up to date (v{new_local_ver})! {RESET}")
360
- print(f"{BOLD}{CYAN}======================================================================{RESET}\n")
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