feat(ui): דף /scripts — קטלוג סקריפטים read-only מ-SCRIPTS.md
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 8s

מגיש את scripts/SCRIPTS.md כדף ב-/scripts: שם · סוג · תפקיד · תזמון
לכל סקריפט בתיקיית scripts/. מקור-האמת היחיד נשאר SCRIPTS.md (G2 — אין
מסלול-תוכן מקביל); עריכה דרך git, לא מה-UI.

- web/app.py: GET /api/scripts/catalog קורא את הקובץ בזמן-ריצה (מחקה את
  דפוס get_curator_prompt; HTTPException על כשל — אין בליעה שקטה §6)
- Dockerfile: COPY scripts/SCRIPTS.md (לא הועתק לקונטיינר עד כה)
- web-ui: דף /scripts (AppShell + רכיב Markdown הקיים) + מודול api + קישור ניווט
- SCRIPTS.md: תיעוד ingest_bulletins.py — היה הקובץ היחיד מ-73 שלא תועד

Invariants: G2 (מקור-אמת יחיד), G12 (אין מגע-Paperclip), X6 (UI↔API).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-11 19:42:44 +00:00
parent 24480950f1
commit 8651529327
6 changed files with 136 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { apiRequest } from "./client";
// ── Scripts catalog ───────────────────────────────────────────────
// Surfaces the maintained `scripts/SCRIPTS.md` (single source of truth for
// every script under scripts/) read-only at /scripts. Edits go through
// git/Gitea, not the UI — the backend just reads the file at runtime.
export type ScriptsCatalog = {
content: string;
filename: string;
bytes: number;
last_modified: number;
gitea_url: string;
};
export function fetchScriptsCatalog(signal?: AbortSignal) {
return apiRequest<ScriptsCatalog>("/api/scripts/catalog", { signal });
}