feat(ui): דף /scripts — קטלוג סקריפטים read-only מ-SCRIPTS.md
All checks were successful
G12 Leak-Guard / leak-guard (pull_request) Successful in 8s
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:
18
web-ui/src/lib/api/scripts.ts
Normal file
18
web-ui/src/lib/api/scripts.ts
Normal 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 });
|
||||
}
|
||||
Reference in New Issue
Block a user