Agent-JAE/packages/web-ui/example/index.html
JAE d8dc140252
Some checks are pending
CI / build-check-test (push) Waiting to run
fix: add SES lockdown diagnostics and Vite cache busting
- Add diagnostics.html page to test Lit event binding
- Add SES protection script in index.html (runs before modules)
- Force Vite dep optimization to prevent stale caches
- Fixes for users with crypto wallet extensions (MetaMask etc.)
2026-03-27 18:25:53 +00:00

40 lines
No EOL
1.5 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Agent JAE</title>
<meta name="description" content="Agent JAE - AI Coding Agent by JaeSwift" />
<script>
// SES Lockdown Protection - prevents crypto wallet extensions
// (MetaMask, Phantom etc.) from breaking Lit event bindings.
// Must run BEFORE any module imports.
(function() {
try {
// Save critical prototypes before SES freezes them
var origDefineProperty = Object.defineProperty;
var origGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var origAddEventListener = EventTarget.prototype.addEventListener;
var origRemoveEventListener = EventTarget.prototype.removeEventListener;
// Ensure Lit can still define properties on elements
if (Object.isFrozen && Object.isFrozen(EventTarget.prototype)) {
console.warn("[JAE] SES lockdown detected - applying event binding fix");
}
// Polyfill: ensure addEventListener is always available and unfrozen
window.__jae_addEventListener = origAddEventListener;
window.__jae_removeEventListener = origRemoveEventListener;
} catch(e) {
// Silent fail - normal when no SES present
}
})();
</script>
</head>
<body class="bg-background">
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>