Files
Jarvis/webview/bus-harness.html
james.maes 23aa5c74f8 fix(02): sync canonical webview/bus-harness.html to match 02-03's bundle copy
02-02 initially wrote an import-based harness (dynamic import from
./packages/bus/dist/index.js). 02-03 replaced the bundle copy with an
injection-based harness (relies on the WKUserScript document-start
Injection.js to set up window.jarvisBus before any inline script runs).

The injection-based approach is architecturally correct per RESEARCH.md
§handshake — it lets the native side inject the bridge before any web
code runs, and removes the compile-time dependency on the dist/
bundle layout.

Syncing canonical to match so check-bus-harness-parity.sh passes.
2026-04-23 18:12:17 -05:00

24 lines
799 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Jarvis Bus Harness</title>
</head>
<body>
<div style="color:#888;font-size:10px;opacity:0.4;position:fixed;bottom:8px;left:8px;">
jarvis-bus-harness v2.0.0
</div>
<!-- The document-start WKUserScript from packages/Bus/Sources/Bus/Resources/Injection.js
already installed window.jarvisBus before this script runs. This
inline script is a marker — no imports required for P2. P3 replaces
this file with the full React bundle entrypoint. -->
<script>
if (!window.jarvisBus) {
console.error("[bus-harness] window.jarvisBus missing — injection failed");
} else {
console.log("[bus-harness] armed at v" + window.jarvisBus.protocolVersion);
}
</script>
</body>
</html>