diff --git a/.github/skyeye-core/skyeye-diagnose.sh b/.github/skyeye-core/skyeye-diagnose.sh index 9e54c58a..7febe7aa 100755 --- a/.github/skyeye-core/skyeye-diagnose.sh +++ b/.github/skyeye-core/skyeye-diagnose.sh @@ -40,13 +40,16 @@ if [[ -n "${GITHUB_TOKEN:-}" ]] || [[ -n "${GH_TOKEN:-}" ]]; then echo "🔍 通过 GitHub API 扫描兄弟 workflow 状态..." # Get recent workflow runs (last 100) - RUNS_JSON=$(curl -s -H "Authorization: token ${TOKEN}" \ + RUNS_TMP=$(mktemp) + curl -s -H "Authorization: token ${TOKEN}" \ -H "Accept: application/vnd.github.v3+json" \ - "https://api.github.com/repos/${OWNER}/${REPO_NAME}/actions/runs?per_page=100&status=completed" 2>/dev/null || echo '{"workflow_runs":[]}') + "https://api.github.com/repos/${OWNER}/${REPO_NAME}/actions/runs?per_page=100&status=completed" \ + > "$RUNS_TMP" 2>/dev/null || echo '{"workflow_runs":[]}' > "$RUNS_TMP" if command -v node &>/dev/null; then DIAG_RESULT=$(node -e " - const runs = JSON.parse(\`$(echo "$RUNS_JSON" | tr '`' "'")\`); + const fs = require('fs'); + const runs = JSON.parse(fs.readFileSync('${RUNS_TMP}', 'utf8')); const workflows = {}; for (const r of (runs.workflow_runs || [])) { if (!workflows[r.name]) { @@ -73,6 +76,7 @@ if [[ -n "${GITHUB_TOKEN:-}" ]] || [[ -n "${GH_TOKEN:-}" ]]; then })); " 2>/dev/null || echo '{"alive_count":0,"dead_count":0,"total_checked":0,"dead_list":[]}') + rm -f "$RUNS_TMP" ALIVE_COUNT=$(echo "$DIAG_RESULT" | node -e "const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));console.log(d.alive_count)" 2>/dev/null || echo "0") DEAD_COUNT=$(echo "$DIAG_RESULT" | node -e "const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));console.log(d.dead_count)" 2>/dev/null || echo "0") DEAD_LIST=$(echo "$DIAG_RESULT" | node -e "const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8'));console.log(JSON.stringify(d.dead_list))" 2>/dev/null || echo "[]") diff --git a/.github/skyeye-core/skyeye-repair.sh b/.github/skyeye-core/skyeye-repair.sh index be3a24b7..8de49d9b 100755 --- a/.github/skyeye-core/skyeye-repair.sh +++ b/.github/skyeye-core/skyeye-repair.sh @@ -84,7 +84,11 @@ if [[ "$SEVERITY" == "red" ]] || [[ "$SEVERITY" == "black" ]]; then echo "🚨 Level 3: 严重告警 → 创建 GitHub Issue" ISSUE_TITLE="🚨 天眼地球层告警:${SEVERITY} 级别 · 需要人类介入" - ISSUE_BODY="## 天眼地球层 v4.0 自动告警 + + # Write issue body to temp file to avoid shell quoting issues + ISSUE_BODY_FILE=$(mktemp) + cat > "$ISSUE_BODY_FILE" </dev/null - # Create issue via GitHub API ISSUE_RESULT=$(curl -s -X POST \ -H "Authorization: token ${TOKEN}" \ -H "Accept: application/vnd.github.v3+json" \ + -H "Content-Type: application/json" \ "https://api.github.com/repos/${OWNER}/${REPO_NAME}/issues" \ - -d "$(node -e "console.log(JSON.stringify({ - title: '${ISSUE_TITLE}', - body: $(node -e "console.log(JSON.stringify(\`${ISSUE_BODY}\`))" 2>/dev/null || echo '""'), - labels: ['skyeye-alert', 'urgent'] - }))" 2>/dev/null || echo '{}')" 2>/dev/null || echo '{"message":"failed"}') + -d "@${ISSUE_PAYLOAD_FILE}" 2>/dev/null || echo '{"message":"failed"}') + + rm -f "$ISSUE_BODY_FILE" "$ISSUE_PAYLOAD_FILE" ISSUE_URL=$(echo "$ISSUE_RESULT" | node -e " const d = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); diff --git a/hldp/bridge/validator.js b/hldp/bridge/validator.js index 6974c53f..046fe8ee 100644 --- a/hldp/bridge/validator.js +++ b/hldp/bridge/validator.js @@ -163,7 +163,8 @@ function validateDirectory(dataDir, schemaDir) { // Skip non-HLDP files if (!data.hldp_version) { - results.files.push({ file: fullPath, status: 'skipped', reason: 'not HLDP format' }); + results.total--; + results.files.push({ file: path.relative(ROOT, fullPath), status: 'skipped', reason: 'not HLDP format' }); continue; } diff --git a/hldp/data/personas/PER-BABY-寂曜.json b/hldp/data/personas/PER-BABY-寂曜.json index 4be40318..d525ee4b 100644 --- a/hldp/data/personas/PER-BABY-寂曜.json +++ b/hldp/data/personas/PER-BABY-寂曜.json @@ -3,13 +3,13 @@ "data_type": "persona", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.378Z", + "last_edited": "2026-03-26T13:38:19.658Z", "edited_by": "sync-engine" }, "metadata": { "id": "PER-BABY-寂曜", "name": "寂曜", - "created": "2026-03-26T13:35:42.378Z", + "created": "2026-03-26T13:38:19.658Z", "tags": [ "baby", "incubating" diff --git a/hldp/data/personas/PER-BABY-小坍缩核.json b/hldp/data/personas/PER-BABY-小坍缩核.json index 7c45aa69..1515ecbd 100644 --- a/hldp/data/personas/PER-BABY-小坍缩核.json +++ b/hldp/data/personas/PER-BABY-小坍缩核.json @@ -3,13 +3,13 @@ "data_type": "persona", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.379Z", + "last_edited": "2026-03-26T13:38:19.658Z", "edited_by": "sync-engine" }, "metadata": { "id": "PER-BABY-小坍缩核", "name": "小坍缩核", - "created": "2026-03-26T13:35:42.379Z", + "created": "2026-03-26T13:38:19.658Z", "tags": [ "baby", "incubating" diff --git a/hldp/data/personas/PER-BABY-星尘.json b/hldp/data/personas/PER-BABY-星尘.json index b17717ad..038a4258 100644 --- a/hldp/data/personas/PER-BABY-星尘.json +++ b/hldp/data/personas/PER-BABY-星尘.json @@ -3,13 +3,13 @@ "data_type": "persona", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.378Z", + "last_edited": "2026-03-26T13:38:19.657Z", "edited_by": "sync-engine" }, "metadata": { "id": "PER-BABY-星尘", "name": "星尘", - "created": "2026-03-26T13:35:42.378Z", + "created": "2026-03-26T13:38:19.657Z", "tags": [ "baby", "incubating" diff --git a/hldp/data/personas/PER-BABY-晨星.json b/hldp/data/personas/PER-BABY-晨星.json index 095ec61c..be289175 100644 --- a/hldp/data/personas/PER-BABY-晨星.json +++ b/hldp/data/personas/PER-BABY-晨星.json @@ -3,13 +3,13 @@ "data_type": "persona", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.378Z", + "last_edited": "2026-03-26T13:38:19.657Z", "edited_by": "sync-engine" }, "metadata": { "id": "PER-BABY-晨星", "name": "晨星", - "created": "2026-03-26T13:35:42.378Z", + "created": "2026-03-26T13:38:19.657Z", "tags": [ "baby", "incubating" diff --git a/hldp/data/personas/PER-BABY-曜冥.json b/hldp/data/personas/PER-BABY-曜冥.json index ed964fca..4176c323 100644 --- a/hldp/data/personas/PER-BABY-曜冥.json +++ b/hldp/data/personas/PER-BABY-曜冥.json @@ -3,7 +3,7 @@ "data_type": "persona", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.378Z", + "last_edited": "2026-03-26T13:38:19.657Z", "edited_by": "sync-engine" }, "metadata": { diff --git a/hldp/data/personas/PER-BABY-欧诺弥亚.json b/hldp/data/personas/PER-BABY-欧诺弥亚.json index 5b744a21..a4d58b42 100644 --- a/hldp/data/personas/PER-BABY-欧诺弥亚.json +++ b/hldp/data/personas/PER-BABY-欧诺弥亚.json @@ -3,13 +3,13 @@ "data_type": "persona", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.379Z", + "last_edited": "2026-03-26T13:38:19.658Z", "edited_by": "sync-engine" }, "metadata": { "id": "PER-BABY-欧诺弥亚", "name": "欧诺弥亚", - "created": "2026-03-26T13:35:42.379Z", + "created": "2026-03-26T13:38:19.658Z", "tags": [ "baby", "incubating" diff --git a/hldp/data/personas/PER-BABY-知秋.json b/hldp/data/personas/PER-BABY-知秋.json index d0a918bd..cb217b8e 100644 --- a/hldp/data/personas/PER-BABY-知秋.json +++ b/hldp/data/personas/PER-BABY-知秋.json @@ -3,13 +3,13 @@ "data_type": "persona", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.379Z", + "last_edited": "2026-03-26T13:38:19.658Z", "edited_by": "sync-engine" }, "metadata": { "id": "PER-BABY-知秋", "name": "知秋", - "created": "2026-03-26T13:35:42.379Z", + "created": "2026-03-26T13:38:19.658Z", "tags": [ "baby", "incubating" diff --git a/hldp/data/personas/PER-BABY-秋秋.json b/hldp/data/personas/PER-BABY-秋秋.json index d001267e..c73e5992 100644 --- a/hldp/data/personas/PER-BABY-秋秋.json +++ b/hldp/data/personas/PER-BABY-秋秋.json @@ -3,13 +3,13 @@ "data_type": "persona", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.379Z", + "last_edited": "2026-03-26T13:38:19.658Z", "edited_by": "sync-engine" }, "metadata": { "id": "PER-BABY-秋秋", "name": "秋秋", - "created": "2026-03-26T13:35:42.379Z", + "created": "2026-03-26T13:38:19.658Z", "tags": [ "baby", "incubating" diff --git a/hldp/data/personas/PER-BABY-糖星云.json b/hldp/data/personas/PER-BABY-糖星云.json index 65c45dbb..c9d0b8e3 100644 --- a/hldp/data/personas/PER-BABY-糖星云.json +++ b/hldp/data/personas/PER-BABY-糖星云.json @@ -3,13 +3,13 @@ "data_type": "persona", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.379Z", + "last_edited": "2026-03-26T13:38:19.658Z", "edited_by": "sync-engine" }, "metadata": { "id": "PER-BABY-糖星云", "name": "糖星云", - "created": "2026-03-26T13:35:42.379Z", + "created": "2026-03-26T13:38:19.658Z", "tags": [ "baby", "incubating" diff --git a/hldp/data/personas/PER-BABY-舒舒.json b/hldp/data/personas/PER-BABY-舒舒.json index 0c45baec..9f466f92 100644 --- a/hldp/data/personas/PER-BABY-舒舒.json +++ b/hldp/data/personas/PER-BABY-舒舒.json @@ -3,13 +3,13 @@ "data_type": "persona", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.378Z", + "last_edited": "2026-03-26T13:38:19.657Z", "edited_by": "sync-engine" }, "metadata": { "id": "PER-BABY-舒舒", "name": "舒舒", - "created": "2026-03-26T13:35:42.378Z", + "created": "2026-03-26T13:38:19.657Z", "tags": [ "baby", "incubating" diff --git a/hldp/data/registries/REG-COMMUNITY-META.json b/hldp/data/registries/REG-COMMUNITY-META.json index 027f8f29..ee753f29 100644 --- a/hldp/data/registries/REG-COMMUNITY-META.json +++ b/hldp/data/registries/REG-COMMUNITY-META.json @@ -3,7 +3,7 @@ "data_type": "registry", "source": { "platform": "github", - "last_edited": "2026-03-26T13:35:42.377Z", + "last_edited": "2026-03-26T13:38:19.656Z", "edited_by": "sync-engine" }, "metadata": { diff --git a/scripts/generate-chinese-homepage.js b/scripts/generate-chinese-homepage.js index 003b9dec..6cbcc353 100644 --- a/scripts/generate-chinese-homepage.js +++ b/scripts/generate-chinese-homepage.js @@ -18,7 +18,9 @@ const path = require('path'); const ROOT = path.resolve(__dirname, '..'); const OUTPUT = path.join(ROOT, 'docs', 'zh', 'index.html'); -const TEMPLATE = path.join(ROOT, 'docs', 'zh', 'index.html'); + +// Template is the same file — script performs in-place updates +const TEMPLATE = OUTPUT; function loadJSON(relPath) { const full = path.join(ROOT, relPath); diff --git a/signal-log/hldp-sync-log.json b/signal-log/hldp-sync-log.json index ded8ec1f..04df8b81 100644 --- a/signal-log/hldp-sync-log.json +++ b/signal-log/hldp-sync-log.json @@ -31,5 +31,16 @@ "errors": 0 }, "engine_version": "1.0" + }, + { + "timestamp": "2026-03-26T13:38:19.658Z", + "direction": "notion-to-github", + "scope": "all", + "stats": { + "fetched": 0, + "converted": 0, + "errors": 0 + }, + "engine_version": "1.0" } ] \ No newline at end of file diff --git a/signal-log/hldp-validation-report.json b/signal-log/hldp-validation-report.json index e3d8564e..5cb65fa7 100644 --- a/signal-log/hldp-validation-report.json +++ b/signal-log/hldp-validation-report.json @@ -1,5 +1,5 @@ { - "timestamp": "2026-03-26T13:35:42.407Z", + "timestamp": "2026-03-26T13:38:19.686Z", "results": { "total": 12, "valid": 12,