Files
Shadowbroker/openclaw-skills/shadowbroker/sb_get_summary.py
T
cfbeabda1e Feat/gt analytics openclaw (#392)
* feat(telegram): auto-translate OSINT channel posts to English

Cherry-picked from @Bobpick PR #391 (telegram-only slice): server-side translation during fetch, SHOW ORIGINAL toggle in TelegramOsintPopup, and on-demand /api/telegram-feed?lang=.

Co-authored-by: Robert Pickett <bobpickettsr@yahoo.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(gt): experimental Derived OSINT analytics with lean-node safeguards

Cherry-picked from @Bobpick PR #391 (GT + OpenClaw slice): Bayesian strategic-risk engine, map overlay, OpenClaw commands, and telegram_rhetoric watchdog. Off by default (GT_ANALYTICS_ENABLED=false, gt_risk layer false). 1 vCPU nodes get cgroup detection, UI warning on layer toggle, and lean profile that skips scheduled ingest/Louvain unless GT_ANALYTICS_ACK_LOW_CPU=true. Backtest HUD removed from dashboard (OpenClaw/API regression only).

Co-authored-by: Robert Pickett <bobpickettsr@yahoo.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Robert Pickett <bobpickettsr@yahoo.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 17:05:46 -06:00

41 lines
1.1 KiB
Python
Executable File

#!/usr/bin/env python3
"""One-shot get_summary for OpenClaw exec — loads .env.shadowbroker automatically."""
from __future__ import annotations
import asyncio
import json
import os
from pathlib import Path
def _load_env() -> None:
candidates = [
Path.home() / ".openclaw" / "workspace" / ".env.shadowbroker",
Path(__file__).resolve().parent.parent.parent / ".env.shadowbroker",
]
for path in candidates:
if not path.is_file():
continue
for line in path.read_text(encoding="utf-8").splitlines():
line = line.strip()
if not line or line.startswith("#") or "=" not in line:
continue
key, value = line.split("=", 1)
os.environ.setdefault(key.strip(), value.strip())
break
async def main() -> None:
_load_env()
from sb_query import ShadowBrokerClient
sb = ShadowBrokerClient()
try:
resp = await sb.send_command("get_summary", {"compact": True})
print(json.dumps(resp, indent=2))
finally:
await sb.close()
if __name__ == "__main__":
asyncio.run(main())