WaveGuardClient 3.0.0__tar.gz → 3.3.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: WaveGuardClient
3
- Version: 3.0.0
3
+ Version: 3.3.0
4
4
  Summary: Python SDK for WaveGuard — physics-based anomaly detection, fingerprinting & crypto risk API
5
5
  Author: Greg Partin
6
6
  License-Expression: MIT
@@ -36,7 +36,7 @@ Dynamic: license-file
36
36
 
37
37
  <p align="center">
38
38
  <img src="https://img.shields.io/pypi/v/WaveGuardClient?style=for-the-badge&color=blueviolet" alt="PyPI">
39
- <img src="https://img.shields.io/badge/API-v2.2.0_stateless-brightgreen?style=for-the-badge" alt="v2.2.0">
39
+ <img src="https://img.shields.io/badge/API-v3.1.0_stateless-brightgreen?style=for-the-badge" alt="v3.1.0">
40
40
  <img src="https://img.shields.io/badge/GPU-CUDA_accelerated-76B900?style=for-the-badge&logo=nvidia" alt="CUDA">
41
41
  <img src="https://img.shields.io/badge/MCP-Claude_Desktop-orange?style=for-the-badge" alt="MCP">
42
42
  <a href="https://smithery.ai/servers/emergentphysicslab/waveguard"><img src="https://smithery.ai/badge/emergentphysicslab/waveguard" alt="Smithery"></a>
@@ -46,7 +46,7 @@ Dynamic: license-file
46
46
 
47
47
  <p align="center">
48
48
  <strong>Anomaly detection powered by wave physics. Not machine learning.</strong><br>
49
- One API call. Fully stateless. Works on any data type. Zero false alarms.
49
+ One API call. Fully stateless. Works on any data type.
50
50
  </p>
51
51
 
52
52
  <p align="center">
@@ -125,6 +125,20 @@ Results saved to `benchmarks/benchmark_results.json`. Benchmarks use determinist
125
125
 
126
126
  </details>
127
127
 
128
+ ## Real-World Validation: Crypto Crash Detection
129
+
130
+ WaveGuard powers [CryptoGuard](https://github.com/gpartin/CryptoGuard), a crypto risk scanner. Backtested against 7 historical crashes (LUNA, FTX, Celsius, 3AC, UST, SOL/FTX, TITAN):
131
+
132
+ | Method | Recall | Avg Lead Time | False Positive Rate |
133
+ |--------|--------|---------------|---------------------|
134
+ | **WaveGuard** | **100% (7/7)** | **27.4 days** | **6.1%** |
135
+ | Z-score baseline | 100% (7/7) | 28.4 days | 29.9% |
136
+ | Rolling volatility | 86% (6/7) | 15.5 days | 4.0% |
137
+
138
+ WaveGuard flagged FTT (FTX token) at CAUTION on October 16, 2022 — **23 days before the 94% crash** — while z-score analysis showed nothing unusual.
139
+
140
+ 5× fewer false alarms than statistical baselines with the same recall. Full results: [CryptoGuard backtest](https://github.com/gpartin/CryptoGuard/tree/main/backtest).
141
+
128
142
  ## Install
129
143
 
130
144
  ```bash
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <img src="https://img.shields.io/pypi/v/WaveGuardClient?style=for-the-badge&color=blueviolet" alt="PyPI">
3
- <img src="https://img.shields.io/badge/API-v2.2.0_stateless-brightgreen?style=for-the-badge" alt="v2.2.0">
3
+ <img src="https://img.shields.io/badge/API-v3.1.0_stateless-brightgreen?style=for-the-badge" alt="v3.1.0">
4
4
  <img src="https://img.shields.io/badge/GPU-CUDA_accelerated-76B900?style=for-the-badge&logo=nvidia" alt="CUDA">
5
5
  <img src="https://img.shields.io/badge/MCP-Claude_Desktop-orange?style=for-the-badge" alt="MCP">
6
6
  <a href="https://smithery.ai/servers/emergentphysicslab/waveguard"><img src="https://smithery.ai/badge/emergentphysicslab/waveguard" alt="Smithery"></a>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <p align="center">
12
12
  <strong>Anomaly detection powered by wave physics. Not machine learning.</strong><br>
13
- One API call. Fully stateless. Works on any data type. Zero false alarms.
13
+ One API call. Fully stateless. Works on any data type.
14
14
  </p>
15
15
 
16
16
  <p align="center">
@@ -89,6 +89,20 @@ Results saved to `benchmarks/benchmark_results.json`. Benchmarks use determinist
89
89
 
90
90
  </details>
91
91
 
92
+ ## Real-World Validation: Crypto Crash Detection
93
+
94
+ WaveGuard powers [CryptoGuard](https://github.com/gpartin/CryptoGuard), a crypto risk scanner. Backtested against 7 historical crashes (LUNA, FTX, Celsius, 3AC, UST, SOL/FTX, TITAN):
95
+
96
+ | Method | Recall | Avg Lead Time | False Positive Rate |
97
+ |--------|--------|---------------|---------------------|
98
+ | **WaveGuard** | **100% (7/7)** | **27.4 days** | **6.1%** |
99
+ | Z-score baseline | 100% (7/7) | 28.4 days | 29.9% |
100
+ | Rolling volatility | 86% (6/7) | 15.5 days | 4.0% |
101
+
102
+ WaveGuard flagged FTT (FTX token) at CAUTION on October 16, 2022 — **23 days before the 94% crash** — while z-score analysis showed nothing unusual.
103
+
104
+ 5× fewer false alarms than statistical baselines with the same recall. Full results: [CryptoGuard backtest](https://github.com/gpartin/CryptoGuard/tree/main/backtest).
105
+
92
106
  ## Install
93
107
 
94
108
  ```bash
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: WaveGuardClient
3
- Version: 3.0.0
3
+ Version: 3.3.0
4
4
  Summary: Python SDK for WaveGuard — physics-based anomaly detection, fingerprinting & crypto risk API
5
5
  Author: Greg Partin
6
6
  License-Expression: MIT
@@ -36,7 +36,7 @@ Dynamic: license-file
36
36
 
37
37
  <p align="center">
38
38
  <img src="https://img.shields.io/pypi/v/WaveGuardClient?style=for-the-badge&color=blueviolet" alt="PyPI">
39
- <img src="https://img.shields.io/badge/API-v2.2.0_stateless-brightgreen?style=for-the-badge" alt="v2.2.0">
39
+ <img src="https://img.shields.io/badge/API-v3.1.0_stateless-brightgreen?style=for-the-badge" alt="v3.1.0">
40
40
  <img src="https://img.shields.io/badge/GPU-CUDA_accelerated-76B900?style=for-the-badge&logo=nvidia" alt="CUDA">
41
41
  <img src="https://img.shields.io/badge/MCP-Claude_Desktop-orange?style=for-the-badge" alt="MCP">
42
42
  <a href="https://smithery.ai/servers/emergentphysicslab/waveguard"><img src="https://smithery.ai/badge/emergentphysicslab/waveguard" alt="Smithery"></a>
@@ -46,7 +46,7 @@ Dynamic: license-file
46
46
 
47
47
  <p align="center">
48
48
  <strong>Anomaly detection powered by wave physics. Not machine learning.</strong><br>
49
- One API call. Fully stateless. Works on any data type. Zero false alarms.
49
+ One API call. Fully stateless. Works on any data type.
50
50
  </p>
51
51
 
52
52
  <p align="center">
@@ -125,6 +125,20 @@ Results saved to `benchmarks/benchmark_results.json`. Benchmarks use determinist
125
125
 
126
126
  </details>
127
127
 
128
+ ## Real-World Validation: Crypto Crash Detection
129
+
130
+ WaveGuard powers [CryptoGuard](https://github.com/gpartin/CryptoGuard), a crypto risk scanner. Backtested against 7 historical crashes (LUNA, FTX, Celsius, 3AC, UST, SOL/FTX, TITAN):
131
+
132
+ | Method | Recall | Avg Lead Time | False Positive Rate |
133
+ |--------|--------|---------------|---------------------|
134
+ | **WaveGuard** | **100% (7/7)** | **27.4 days** | **6.1%** |
135
+ | Z-score baseline | 100% (7/7) | 28.4 days | 29.9% |
136
+ | Rolling volatility | 86% (6/7) | 15.5 days | 4.0% |
137
+
138
+ WaveGuard flagged FTT (FTX token) at CAUTION on October 16, 2022 — **23 days before the 94% crash** — while z-score analysis showed nothing unusual.
139
+
140
+ 5× fewer false alarms than statistical baselines with the same recall. Full results: [CryptoGuard backtest](https://github.com/gpartin/CryptoGuard/tree/main/backtest).
141
+
128
142
  ## Install
129
143
 
130
144
  ```bash
@@ -371,7 +371,7 @@ class MCPStdioServer:
371
371
  def __init__(self) -> None:
372
372
  self.server_info = {
373
373
  "name": "waveguard",
374
- "version": "2.3.0",
374
+ "version": "3.1.0",
375
375
  }
376
376
 
377
377
  def handle_message(self, msg: dict) -> Optional[dict]:
@@ -403,6 +403,20 @@ class MCPStdioServer:
403
403
  "result": {"tools": TOOLS},
404
404
  }
405
405
 
406
+ elif method == "resources/list":
407
+ return {
408
+ "jsonrpc": "2.0",
409
+ "id": msg_id,
410
+ "result": {"resources": []},
411
+ }
412
+
413
+ elif method == "prompts/list":
414
+ return {
415
+ "jsonrpc": "2.0",
416
+ "id": msg_id,
417
+ "result": {"prompts": []},
418
+ }
419
+
406
420
  elif method == "tools/call":
407
421
  tool_name = params.get("name", "")
408
422
  arguments = params.get("arguments", {})
@@ -435,7 +449,7 @@ class MCPStdioServer:
435
449
  def run_stdio(self) -> None:
436
450
  """Run the MCP server on stdin/stdout."""
437
451
  sys.stderr.write(
438
- f"WaveGuard MCP server v2.3.0 started (API: {API_URL})\n"
452
+ f"WaveGuard MCP server v3.1.0 started (API: {API_URL})\n"
439
453
  )
440
454
  sys.stderr.flush()
441
455
 
@@ -470,7 +484,7 @@ def run_http_server(port: int = 3001) -> None:
470
484
  print("HTTP transport requires: pip install fastapi uvicorn")
471
485
  sys.exit(1)
472
486
 
473
- mcp_app = FA(title="WaveGuard MCP Server", version="2.3.0")
487
+ mcp_app = FA(title="WaveGuard MCP Server", version="3.1.0")
474
488
  server = MCPStdioServer()
475
489
 
476
490
  @mcp_app.post("/mcp")
@@ -481,7 +495,7 @@ def run_http_server(port: int = 3001) -> None:
481
495
  async def mcp_tools() -> dict: # type: ignore[type-arg]
482
496
  return {"tools": TOOLS}
483
497
 
484
- print(f"WaveGuard MCP HTTP server v2.3.0 on port {port}")
498
+ print(f"WaveGuard MCP HTTP server v3.1.0 on port {port}")
485
499
  uvicorn.run(mcp_app, host="0.0.0.0", port=port)
486
500
 
487
501
 
@@ -492,7 +506,7 @@ def run_http_server(port: int = 3001) -> None:
492
506
  def main():
493
507
  """Entry point for `waveguard-mcp` console script."""
494
508
  parser = argparse.ArgumentParser(
495
- description="WaveGuard MCP Server v2.3.0"
509
+ description="WaveGuard MCP Server v3.0.0"
496
510
  )
497
511
  parser.add_argument(
498
512
  "--http",
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "WaveGuardClient"
7
- version = "3.0.0"
7
+ version = "3.3.0"
8
8
  description = "Python SDK for WaveGuard — physics-based anomaly detection, fingerprinting & crypto risk API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -42,7 +42,7 @@ from .exceptions import (
42
42
  ServerError,
43
43
  )
44
44
 
45
- __version__ = "3.0.0"
45
+ __version__ = "3.2.0"
46
46
 
47
47
  logger = logging.getLogger("waveguard")
48
48
 
@@ -145,15 +145,17 @@ class FingerprintResult:
145
145
  Attributes
146
146
  ----------
147
147
  fingerprint : list[float]
148
- 52-dimensional physics embedding vector.
148
+ Physics embedding vector (52-dim at L0, 62-dim at L1).
149
149
  dimensions : int
150
- Number of dimensions (typically 52).
150
+ Number of dimensions (52 at Level 0, 62 at Level 1).
151
151
  labels : list[str]
152
152
  Human-readable label for each dimension.
153
153
  encoder_type : str
154
154
  Encoder used to map input data onto the lattice.
155
155
  latency_ms : float
156
156
  Server-side processing time.
157
+ field_level : int
158
+ Field level used (0=real scalar, 1=complex).
157
159
  raw : dict
158
160
  Full JSON response.
159
161
  """
@@ -163,6 +165,7 @@ class FingerprintResult:
163
165
  labels: List[str]
164
166
  encoder_type: str
165
167
  latency_ms: float
168
+ field_level: int = 0
166
169
  raw: Dict[str, Any] = field(default_factory=dict)
167
170
 
168
171
 
@@ -177,9 +180,9 @@ class CompareResult:
177
180
  distance : float
178
181
  Euclidean distance between fingerprints.
179
182
  fingerprint_a : list[float]
180
- 52-dim embedding of data_a.
181
- fingerprint_b : list[float]
182
- 52-dim embedding of data_b.
183
+ Physics embedding of data_a.
184
+ fingerprint_b: List[float]
185
+ Physics embedding of data_b.
183
186
  dimensions : int
184
187
  Number of dimensions.
185
188
  encoder_type : str
@@ -266,6 +269,7 @@ class WaveGuard:
266
269
  test: List[Any],
267
270
  encoder_type: Optional[str] = None,
268
271
  sensitivity: Optional[float] = None,
272
+ field_level: int = 0,
269
273
  ) -> ScanResult:
270
274
  """Scan test data for anomalies against a training baseline.
271
275
 
@@ -282,11 +286,15 @@ class WaveGuard:
282
286
  1+ samples to check for anomalies.
283
287
  encoder_type : str, optional
284
288
  Force a specific encoder: ``"json"``, ``"numeric"``,
285
- ``"text"``, ``"timeseries"``, ``"tabular"``.
289
+ ``"text"``, ``"timeseries"``, ``"tabular"``,
290
+ ``"complex_numeric"``.
286
291
  Leave *None* for auto-detection (recommended).
287
292
  sensitivity : float, optional
288
293
  Detection sensitivity in the range 0.5–3.0.
289
294
  Lower values are more sensitive (flag more anomalies).
295
+ field_level : int
296
+ Physics field complexity. 0 = real scalar (default).
297
+ 1 = complex field (phase-aware, 62-dim fingerprints).
290
298
 
291
299
  Returns
292
300
  -------
@@ -302,6 +310,8 @@ class WaveGuard:
302
310
  body["encoder_type"] = encoder_type
303
311
  if sensitivity is not None:
304
312
  body["sensitivity"] = sensitivity
313
+ if field_level:
314
+ body["field_level"] = field_level
305
315
 
306
316
  resp = self._post("/v1/scan", body)
307
317
  return self._parse_scan(resp, len(training), len(test))
@@ -310,8 +320,9 @@ class WaveGuard:
310
320
  self,
311
321
  data: Any,
312
322
  encoder_type: Optional[str] = None,
323
+ field_level: int = 0,
313
324
  ) -> FingerprintResult:
314
- """Get a 52-dimensional physics embedding of any data item.
325
+ """Get a physics embedding of any data item.
315
326
 
316
327
  Parameters
317
328
  ----------
@@ -319,16 +330,21 @@ class WaveGuard:
319
330
  A single data item to fingerprint (JSON object, list, string, etc.).
320
331
  encoder_type : str, optional
321
332
  Force a specific encoder. Leave *None* for auto-detection.
333
+ field_level : int
334
+ 0 = real scalar (52-dim, default).
335
+ 1 = complex field (62-dim, includes phase statistics).
322
336
 
323
337
  Returns
324
338
  -------
325
339
  FingerprintResult
326
- ``.fingerprint`` is the 52-dim vector.
340
+ ``.fingerprint`` is the embedding vector (52 or 62 dims).
327
341
  ``.labels`` names each dimension.
328
342
  """
329
343
  body: Dict[str, Any] = {"data": data}
330
344
  if encoder_type is not None:
331
345
  body["encoder_type"] = encoder_type
346
+ if field_level:
347
+ body["field_level"] = field_level
332
348
 
333
349
  resp = self._post("/v1/fingerprint", body)
334
350
  return FingerprintResult(
@@ -337,6 +353,7 @@ class WaveGuard:
337
353
  labels=resp.get("labels", []),
338
354
  encoder_type=resp.get("encoder_type", "auto"),
339
355
  latency_ms=resp.get("latency_ms", 0.0),
356
+ field_level=resp.get("field_level", 0),
340
357
  raw=resp,
341
358
  )
342
359
 
File without changes