cvpfus Codex commited on
Commit ·
cc093a3
1
Parent(s): d5a24a3
Render live runtime status details
Browse filesCo-authored-by: Codex <codex@openai.com>
- FIELD_NOTES.md +1 -1
- README.md +1 -1
- SUBMISSION.md +1 -1
- scripts/verify.py +3 -0
- static/app.js +27 -0
- static/index.html +1 -0
FIELD_NOTES.md
CHANGED
|
@@ -85,4 +85,4 @@ The app exposes `/api/award-evidence` and renders that data in the session panel
|
|
| 85 |
|
| 86 |
The app also renders `/api/submission-readiness`, so the Field Notes story has a single rollup of which submission claims are currently backed by app evidence.
|
| 87 |
|
| 88 |
-
`/api/runtime-status` keeps the demo honest: if llama.cpp or Kokoro is unavailable, the UI labels the fallback state instead of silently pretending that every model path is online.
|
|
|
|
| 85 |
|
| 86 |
The app also renders `/api/submission-readiness`, so the Field Notes story has a single rollup of which submission claims are currently backed by app evidence.
|
| 87 |
|
| 88 |
+
`/api/runtime-status` keeps the demo honest: if llama.cpp or Kokoro is unavailable, the UI labels the fallback state instead of silently pretending that every model path is online. The session panel also lists the live or fallback state for reader brain, vision, speech, and image generation.
|
README.md
CHANGED
|
@@ -135,4 +135,4 @@ The Copy Evidence button reads `/api/evidence-bundle` and copies the core judge
|
|
| 135 |
|
| 136 |
A runtime-plan panel reads `/api/runtime-setup` and summarizes each model path's runtime plus fallback, keeping the live demo honest about what is online and what is deterministic.
|
| 137 |
|
| 138 |
-
`/api/runtime-status` performs a short readiness check for llama.cpp and local speech dependencies, then reports which fallback paths are ready for a live demo.
|
|
|
|
| 135 |
|
| 136 |
A runtime-plan panel reads `/api/runtime-setup` and summarizes each model path's runtime plus fallback, keeping the live demo honest about what is online and what is deterministic.
|
| 137 |
|
| 138 |
+
`/api/runtime-status` performs a short readiness check for llama.cpp and local speech dependencies, then reports which fallback paths are ready for a live demo. The session panel renders live status details for reader brain, vision, speech, and image generation.
|
SUBMISSION.md
CHANGED
|
@@ -39,7 +39,7 @@ The prototype is designed for a live hackathon demo: every model-facing path has
|
|
| 39 |
- `/api/health`: app identity, custom frontend marker, llama.cpp base URL, and model manifest.
|
| 40 |
- `/api/model-budget`: Tiny Titan parameter proof with numeric `params_billion` values.
|
| 41 |
- `/api/runtime-setup`: app command, model runtime commands, environment values, and fallback paths.
|
| 42 |
-
- `/api/runtime-status`: online or fallback-ready status for model
|
| 43 |
- `/api/accessibility-audit`: semantic queue, keyboard navigation, reader cursor state, shortcut safety, live narration, alt text, transcript, user control, and fallback evidence.
|
| 44 |
- `/api/demo-script`: repeatable judge runbook and API checks.
|
| 45 |
- `/api/image-descriptions`: generated article image descriptions plus prompt, seed, model, asset URL, and fallback status receipts.
|
|
|
|
| 39 |
- `/api/health`: app identity, custom frontend marker, llama.cpp base URL, and model manifest.
|
| 40 |
- `/api/model-budget`: Tiny Titan parameter proof with numeric `params_billion` values.
|
| 41 |
- `/api/runtime-setup`: app command, model runtime commands, environment values, and fallback paths.
|
| 42 |
+
- `/api/runtime-status`: online or fallback-ready status for each model path, rendered in the session panel.
|
| 43 |
- `/api/accessibility-audit`: semantic queue, keyboard navigation, reader cursor state, shortcut safety, live narration, alt text, transcript, user control, and fallback evidence.
|
| 44 |
- `/api/demo-script`: repeatable judge runbook and API checks.
|
| 45 |
- `/api/image-descriptions`: generated article image descriptions plus prompt, seed, model, asset URL, and fallback status receipts.
|
scripts/verify.py
CHANGED
|
@@ -45,9 +45,11 @@ def verify_static_assets() -> None:
|
|
| 45 |
assert_true("demoScriptList" in index_html, "Article should expose the judge demo runbook")
|
| 46 |
assert_true("demoApiCheckList" in index_html, "Article should expose judge API evidence checks")
|
| 47 |
assert_true("imageReceiptList" in index_html, "Article should expose generated image receipts")
|
|
|
|
| 48 |
assert_true("submissionReadinessList" in index_html, "Article should expose submission readiness checks")
|
| 49 |
assert_true("copyEvidenceButton" in index_html, "Article should expose a copyable evidence bundle button")
|
| 50 |
assert_true("loadDemoScript" in app_js, "Frontend should render the structured demo script")
|
|
|
|
| 51 |
assert_true("payload.api_checks" in app_js, "Frontend should render structured demo API checks")
|
| 52 |
assert_true("demo-api-command" in app_js, "Frontend should render copyable demo commands")
|
| 53 |
assert_true("demo-command-copy" in app_js, "Frontend should expose copy buttons for demo commands")
|
|
@@ -210,6 +212,7 @@ def verify_routes() -> None:
|
|
| 210 |
assert_true("summaryButton" in home.text, "Home route should include summary control")
|
| 211 |
assert_true("imageStatus" in home.text, "Home route should include image status")
|
| 212 |
assert_true("readinessStatus" in home.text, "Home route should include readiness status")
|
|
|
|
| 213 |
assert_true("voiceStatus" in home.text, "Home route should include voice status")
|
| 214 |
assert_true("latencyStatus" in home.text, "Home route should include latency status")
|
| 215 |
assert_true("voiceControl" in home.text, "Home route should include voice control")
|
|
|
|
| 45 |
assert_true("demoScriptList" in index_html, "Article should expose the judge demo runbook")
|
| 46 |
assert_true("demoApiCheckList" in index_html, "Article should expose judge API evidence checks")
|
| 47 |
assert_true("imageReceiptList" in index_html, "Article should expose generated image receipts")
|
| 48 |
+
assert_true("runtimeStatusList" in index_html, "Article should expose live runtime status details")
|
| 49 |
assert_true("submissionReadinessList" in index_html, "Article should expose submission readiness checks")
|
| 50 |
assert_true("copyEvidenceButton" in index_html, "Article should expose a copyable evidence bundle button")
|
| 51 |
assert_true("loadDemoScript" in app_js, "Frontend should render the structured demo script")
|
| 52 |
+
assert_true("runtimeStatusList.innerHTML" in app_js, "Frontend should render live runtime status details")
|
| 53 |
assert_true("payload.api_checks" in app_js, "Frontend should render structured demo API checks")
|
| 54 |
assert_true("demo-api-command" in app_js, "Frontend should render copyable demo commands")
|
| 55 |
assert_true("demo-command-copy" in app_js, "Frontend should expose copy buttons for demo commands")
|
|
|
|
| 212 |
assert_true("summaryButton" in home.text, "Home route should include summary control")
|
| 213 |
assert_true("imageStatus" in home.text, "Home route should include image status")
|
| 214 |
assert_true("readinessStatus" in home.text, "Home route should include readiness status")
|
| 215 |
+
assert_true("runtimeStatusList" in home.text, "Home route should include runtime status list")
|
| 216 |
assert_true("voiceStatus" in home.text, "Home route should include voice status")
|
| 217 |
assert_true("latencyStatus" in home.text, "Home route should include latency status")
|
| 218 |
assert_true("voiceControl" in home.text, "Home route should include voice control")
|
static/app.js
CHANGED
|
@@ -3,6 +3,7 @@ const readerBar = document.querySelector(".reader-bar");
|
|
| 3 |
const modeStatus = document.querySelector("#modeStatus");
|
| 4 |
const currentStatus = document.querySelector("#currentStatus");
|
| 5 |
const runtimeStatus = document.querySelector("#runtimeStatus");
|
|
|
|
| 6 |
const modelStatus = document.querySelector("#modelStatus");
|
| 7 |
const readinessStatus = document.querySelector("#readinessStatus");
|
| 8 |
const imageStatus = document.querySelector("#imageStatus");
|
|
@@ -382,8 +383,34 @@ async function loadRuntimeStatus() {
|
|
| 382 |
const brainLabel = brain.available ? "llama.cpp online" : "llama.cpp fallback";
|
| 383 |
const speechLabel = speech.available ? "Kokoro online" : "voice fallback";
|
| 384 |
readinessStatus.textContent = `${brainLabel}, ${speechLabel}`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 385 |
} catch {
|
| 386 |
readinessStatus.textContent = "Fallback ready";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 387 |
}
|
| 388 |
}
|
| 389 |
|
|
|
|
| 3 |
const modeStatus = document.querySelector("#modeStatus");
|
| 4 |
const currentStatus = document.querySelector("#currentStatus");
|
| 5 |
const runtimeStatus = document.querySelector("#runtimeStatus");
|
| 6 |
+
const runtimeStatusList = document.querySelector("#runtimeStatusList");
|
| 7 |
const modelStatus = document.querySelector("#modelStatus");
|
| 8 |
const readinessStatus = document.querySelector("#readinessStatus");
|
| 9 |
const imageStatus = document.querySelector("#imageStatus");
|
|
|
|
| 383 |
const brainLabel = brain.available ? "llama.cpp online" : "llama.cpp fallback";
|
| 384 |
const speechLabel = speech.available ? "Kokoro online" : "voice fallback";
|
| 385 |
readinessStatus.textContent = `${brainLabel}, ${speechLabel}`;
|
| 386 |
+
const runtimeItems = [
|
| 387 |
+
["Reader brain", payload.reader_brain],
|
| 388 |
+
["Vision", payload.vision],
|
| 389 |
+
["Speech", payload.speech],
|
| 390 |
+
["Image generation", payload.image_generation],
|
| 391 |
+
];
|
| 392 |
+
runtimeStatusList.innerHTML = runtimeItems
|
| 393 |
+
.map(([label, item]) => `
|
| 394 |
+
<li>
|
| 395 |
+
<div class="runtime-row">
|
| 396 |
+
<span>${escapeHtml(label)}</span>
|
| 397 |
+
<span class="runtime-pill">${escapeHtml(item.status)}</span>
|
| 398 |
+
</div>
|
| 399 |
+
<p>${escapeHtml(item.model)}${item.fallback ? ` | ${escapeHtml(item.fallback)}` : ""}</p>
|
| 400 |
+
</li>
|
| 401 |
+
`)
|
| 402 |
+
.join("");
|
| 403 |
} catch {
|
| 404 |
readinessStatus.textContent = "Fallback ready";
|
| 405 |
+
runtimeStatusList.innerHTML = `
|
| 406 |
+
<li>
|
| 407 |
+
<div class="runtime-row">
|
| 408 |
+
<span>Runtime status</span>
|
| 409 |
+
<span class="runtime-pill">offline</span>
|
| 410 |
+
</div>
|
| 411 |
+
<p>Live runtime status is unavailable; deterministic fallbacks remain documented.</p>
|
| 412 |
+
</li>
|
| 413 |
+
`;
|
| 414 |
}
|
| 415 |
}
|
| 416 |
|
static/index.html
CHANGED
|
@@ -116,6 +116,7 @@
|
|
| 116 |
<p id="liveNarration" class="live-narration" aria-live="polite">
|
| 117 |
Turn on screen reader mode to begin.
|
| 118 |
</p>
|
|
|
|
| 119 |
<div class="history-header">
|
| 120 |
<h3>Transcript</h3>
|
| 121 |
<button id="copyTranscriptButton" type="button">Copy</button>
|
|
|
|
| 116 |
<p id="liveNarration" class="live-narration" aria-live="polite">
|
| 117 |
Turn on screen reader mode to begin.
|
| 118 |
</p>
|
| 119 |
+
<ul id="runtimeStatusList" class="runtime-list" aria-label="Live model runtime status"></ul>
|
| 120 |
<div class="history-header">
|
| 121 |
<h3>Transcript</h3>
|
| 122 |
<button id="copyTranscriptButton" type="button">Copy</button>
|