feat: 用 react-map-gl + MapLibre 替换 react-simple-maps 实现 2D 地图
- 替换 react-simple-maps/d3-geo/topojson-client 为 react-map-gl + maplibre-gl - 使用 CARTO dark-matter 免费暗色瓦片,自带国家/城市名标注 - 基于 locale 动态切换地图标注语言(name:zh / name_en) - MapLibre 原生 heatmap + circle 双层渲染替代 SVG 热力图 - 提取 MapPopup 组件,配合 react-map-gl Popup 实现点击弹窗 - continent page 改为 dynamic import (ssr: false) - dev 模式去掉 Turbopack 以兼容 maplibre-gl - 删除 heatmap-layer.tsx 和 react-simple-maps 类型声明
This commit is contained in:
26
skill/openclaw-reporter/scripts/heartbeat.sh
Executable file
26
skill/openclaw-reporter/scripts/heartbeat.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# OpenClaw heartbeat — sends platform + model to heatmap server.
|
||||
# Rate-limited: sends at most once per 180 seconds.
|
||||
# Called by both SessionStart and PostToolUse hooks.
|
||||
# No tool names, arguments, or results are read or sent.
|
||||
|
||||
CONFIG="$HOME/.openclaw/config.json"
|
||||
[ -f "$CONFIG" ] || exit 0
|
||||
|
||||
# --- Rate limit check (fast path: exit in <1ms) ---
|
||||
LAST_FILE="$HOME/.openclaw/.last_heartbeat"
|
||||
NOW=$(date +%s)
|
||||
if [ -f "$LAST_FILE" ]; then
|
||||
LAST=$(cat "$LAST_FILE" 2>/dev/null || echo 0)
|
||||
[ $((NOW - LAST)) -lt 180 ] && exit 0
|
||||
fi
|
||||
|
||||
# --- Send heartbeat ---
|
||||
KEY=$(python3 -c "import json; print(json.load(open('$CONFIG'))['apiKey'])" 2>/dev/null) || exit 0
|
||||
[ -z "$KEY" ] && exit 0
|
||||
|
||||
curl -s -o /dev/null --max-time 5 -X POST 'https://kymr.top/api/v1/heartbeat' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H "Authorization: Bearer $KEY" \
|
||||
-d "{\"platform\":\"$(uname -s | tr '[:upper:]' '[:lower:]')\",\"model\":\"${CLAUDE_MODEL:-unknown}\"}" \
|
||||
2>/dev/null && echo "$NOW" > "$LAST_FILE" || true
|
||||
14
skill/openclaw-reporter/scripts/task-report.sh
Executable file
14
skill/openclaw-reporter/scripts/task-report.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# OpenClaw task report — Stop hook
|
||||
# Sends a generic task completion signal. Fails silently.
|
||||
|
||||
CONFIG="$HOME/.openclaw/config.json"
|
||||
[ -f "$CONFIG" ] || exit 0
|
||||
|
||||
KEY=$(python3 -c "import json; print(json.load(open('$CONFIG'))['apiKey'])" 2>/dev/null) || exit 0
|
||||
[ -z "$KEY" ] && exit 0
|
||||
|
||||
curl -s -o /dev/null --max-time 5 -X POST 'https://kymr.top/api/v1/task' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H "Authorization: Bearer $KEY" \
|
||||
-d "{\"summary\":\"Completed a task\",\"model\":\"${CLAUDE_MODEL:-unknown}\"}" 2>/dev/null || true
|
||||
Reference in New Issue
Block a user