swarph-shared

v0.8.1 safe
2.6
Low Risk

Shared substrate primitives for swarph-mesh ecosystem (caller convention, subprocess env scrubbing, JSON-mode harness, peer-name registry, cell.yaml schema, LLM cost reconciliation). v0.8.0 adds llm_cost: one LiteLLM-sourced price base + one cost function for the whole mesh, self-checking via claude -p's own reported cost per call. v0.8.1 fixes fetch_price_base() silently zero-pricing entries LiteLLM has no real listing for, instead of excluding them.

📦 Package Quality Overall: Low (4.8/10)

✦ High Test Suite 9.0

Test suite present — 12 test file(s) found

  • Test runner config found: pyproject.toml
  • 12 test file(s) detected (e.g. test_548_default_gateway.py)
◈ Medium Documentation 5.0

Some documentation present

  • Detailed PyPI description (7579 chars)
○ Low Contributing Guide 4.0

No contributing guide or governance files found

  • Development Status classifier >= Beta
◈ Medium Type Annotations 5.0

Partial type annotation coverage

  • 46 type-annotated function signatures detected in source
○ Low Multiple Contributors 1.0

Could not retrieve contributor data from GitHub

  • GitHub API error: 401

🔬 Heuristic Checks

⚠ Outbound Network Calls score 9.0

Found 6 network call pattern(s)

  • tch_live() -> dict: req = urllib.request.Request(LITELLM_URL, headers={"User-Agent": "swarph-shared/l
  • h-shared/llm_cost"}) with urllib.request.urlopen(req, timeout=20) as resp: return json.loads(
  • rip("/") + "/peers" req = urllib.request.Request(url) if token: req.add_header("Authoriza
  • , f"Bearer {token}") with urllib.request.urlopen(req, timeout=timeout_seconds) as resp: # nosec B310
  • .""" with patch( "urllib.request.urlopen", return_value=_mock_response(["droplet", "l
  • .""" with patch( "urllib.request.urlopen", return_value=_mock_response(["lab-ovh"]),
⚠ Code Obfuscation score 2.0

Found 1 obfuscation pattern(s)

  • d.llm_cost.os.replace", wraps=__import__("os").replace) as mock_replace: fetch_price_base(force_re
⚠ Shell / Subprocess Execution score 10.0

Found 6 shell execution pattern(s)

  • Use case: proc = subprocess.run( ["claude", "-p", prompt, "--model", model],
  • ict suitable for passing to ``subprocess.run(env=...)``. Caller adds any extra env vars on top (e
  • e instead. """ return subprocess.run( ["git", *args], cwd=str(workdir), c
  • if os.name == "nt": subprocess.run( ["icacls", str(path), "/deny", "*S-1-1-0:R"],
  • ] = str(SRC.parent) out = subprocess.run( [sys.executable, "-c", "from swarph_shared
  • ) """ ) out = subprocess.run([sys.executable, "-c", code], captu
✓ Credential Harvesting

No credential harvesting patterns detected

✓ Typosquatting

No typosquatting candidates detected

✓ Registered Email Domain

No author email provided

✓ Suspicious Page Links

All external links appear legitimate

⚠ Git Repository History score 3.0

GitHub API error: 401

  • GitHub API error: 401
⚠ Maintainer History score 2.0

1 maintainer concern(s) found

  • Author "Pierre Samson, Claude Opus" appears to have only 1 package on PyPI (new or inactive account)
✓ Known CVE Vulnerabilities

No known vulnerabilities found in OSV database.

💡 AI App Starter Prompt

Use this prompt to build a project with swarph-shared
Build a simple Python application using the swarph-shared package to demonstrate its core features.

💬 Discussion Feed

Leave a comment

No discussion yet. Be the first to share your thoughts!